PicoBot/src/storage/background_task.rs
xiaoxixi 78d6e29672 feat: enable bash delegation, drop legacy anonymous general agent, ship built-in general-purpose Agent
- bash is now Delegatable so named Agents may run shell commands
- remove the legacy anonymous 'general' path entirely: SubAgentManager
  run_background/run_foreground_batch/run_inline/run_foreground,
  filter_tools/get_skills_prompt, TaskNotification direct delivery,
  DelegateContext task-local, background_permits/admission, and the
  delegate tool's check_task/cancel_task/list_tasks actions (agent_task
  replaces them); /stop and todo migrate off the task-local bridge
- stop writing the legacy background_tasks table (read-only transition);
  /api/tasks union still renders historical records
- ship a built-in general-purpose Agent definition (resources/agents)
  released to ~/.picobot/agents on first run like built-in skills, with
  bash/read-only/search/web/calculator/sleep tools; root_delegates now
  defaults to it so orchestration works out of the box
- update AGENTS/README/architecture/config/db-schema docs accordingly
2026-08-13 08:50:22 +08:00

20 lines
512 B
Rust

use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BackgroundTask {
pub id: String,
pub session_id: String,
pub channel: String,
pub chat_id: String,
pub prompt: String,
pub allowed_tools: Option<String>,
pub status: String,
pub result: Option<String>,
pub error: Option<String>,
pub tool_calls_count: i64,
pub iterations: i64,
pub started_at: Option<i64>,
pub finished_at: Option<i64>,
pub created_at: i64,
}