68 Commits

Author SHA1 Message Date
38d92d5883 feat: move default db to config dir, add skill/mcp enable toggles
- Store default SQLite database at <config_dir>/data/picobot.db instead of
  the workspace, keeping session data independent of the workspace; the
  reload equivalence check and docs follow the new default
- Add per-skill enable/disable persisted in <config_dir>/skills_state.json;
  skills default to enabled, disabled skills are excluded from prompts,
  listings, and get_skill at load time
- Add mcp.servers[].enabled (default true); disabled servers are skipped
  at activation and by health checks
- WebUI Tools page: switches for Skills and MCP servers, plus a concrete
  MCP tool list with connection status and errors
- Add PUT /api/skills/{name} API and expose enabled/tool details in the
  skills/status APIs
- Bump version to 1.15.0
2026-08-13 21:58:20 +08:00
b558a0a99b feat: make sub-agent orchestration always-on, consolidate design docs
Remove the agent_orchestration enabled feature switch and root_delegates config; delegation edges now derive from the catalog's delegate_targets. Replace the four orchestration design/review docs with a single SUB_AGENT_DESIGN.md. Bump version to 1.13.0.
2026-08-13 18:07:32 +08:00
5501c539fc feat: remove agent run groups, add WebUI agent definition management
- drop agent_run_groups table and group_id/scope_kind/scope_id columns (schema v8)
- remove group_id from AgentExecutionContext and recovery group counters
- flatten TasksPage background tab into a per-run list
- add WebUI Agents page with definition CRUD and inline provider/model
- bump version to 1.11.0
2026-08-13 14:03:01 +08:00
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
ac201a3949 feat: durable agent orchestration with run persistence, inbox continuation, and signal/steer
- AgentCatalog/definitions with strict Markdown frontmatter, delegation graph,
  fail-closed tool scoping, and signal contracts
- structured cancellation (AgentError::Cancelled/TimedOut) across provider
  streams, tool batches, and sleep; /stop drives the same terminal state
- schema v6 run/group/inbox persistence with execution-ID conditional
  transitions and completion-slot reservations
- ExecutionGate separating run quota from provider/tool step permits
- background completion inbox with hidden-trigger continuation turns,
  fairness scheduling, lease release, dead-lettering, and activation recovery
- typed TurnMailbox with two-phase steer admission and atomic consumption at
  turn commit; /stop releases admitted steer events back to pending
- emit_signal tool with contract-enforced rate/dedupe/severity/size limits
- WS run/event projection (GetAgentRuns, AgentRunUpdated, AgentEventUpdated),
  /api/agent-runs* management endpoints, /api/tasks union, WebUI run tree
  and signal cards
- ChannelContext.durable_private persisted for continuation delivery reuse

Version 1.7.0
2026-08-11 11:51:20 +08:00
b1b8e2d923 feat: migrate browser tooling to agent-browser 2026-07-27 23:53:55 +08:00
b49f0ec8a5 feat(gateway): PUT/DELETE /api/memories/{key} write endpoints 2026-07-26 21:58:01 +08:00
3f09793864 feat(gateway): /ws/logs real-time log streaming endpoint 2026-07-26 21:54:26 +08:00
5e2771c538 feat(gateway): GET /api/skills 2026-07-26 21:26:57 +08:00
119df57b49 feat(gateway): GET /api/tools with capability metadata 2026-07-26 21:21:32 +08:00
b14edc40d3 feat(gateway): GET /api/status runtime snapshot 2026-07-24 18:16:31 +08:00
aa989cbaf1 feat(gateway): runtime introspection for status endpoint 2026-07-24 18:02:28 +08:00
14ca5dd7b4 feat(webui): app shell with flat nav, activity spine, and theme init 2026-07-24 10:01:07 +08:00
3118083707 feat(webui): embed latin fonts and serve via /fonts route 2026-07-24 09:06:48 +08:00
0d61354ba1 feat: add gateway configuration hot reload 2026-07-21 12:59:46 +08:00
515a07ec1f refactor: route gateway messages concurrently 2026-07-19 13:28:53 +08:00
7a5d95e786 merge: streaming turn architecture 2026-07-17 17:47:41 +08:00
c6e022f6cb feat: stream turns through Feishu cards 2026-07-17 17:30:38 +08:00
6230ac8e36 feat: stream turn snapshots to TUI and WebUI 2026-07-17 16:53:21 +08:00
55da3204f8 feat: coordinate live turn delivery 2026-07-17 15:56:52 +08:00
e3b2ff2472 feat(config): load layered startup env files 2026-07-16 23:20:00 +08:00
f4172fea38 实现tui和webui的附件收发,优化文件在消息中的处理 2026-07-16 17:49:51 +08:00
e37581c909 增加tui和web的配对码要求。 2026-07-16 15:18:21 +08:00
351af8870d 初步实现todo功能 2026-07-15 17:48:14 +08:00
9ac898acbb 扩充定时任务功能、实现类似其他agent软件的heartbeat功能 2026-07-15 16:36:10 +08:00
dba1a046c0 增加内嵌webui 2026-07-15 10:40:56 +08:00
89a1512350 新增service子命令 2026-07-14 16:10:08 +08:00
27d126cf73 tui客户端增强。 2026-07-14 14:31:16 +08:00
954bfd1d75 fix(messaging): make persistence and delivery explicit 2026-07-14 11:49:02 +08:00
a9c297764e fix(channels): unify lifecycle ownership 2026-07-14 11:24:03 +08:00
3d580828b5 fix(runtime): harden persistence scheduling and shutdown
Add versioned SQLite migrations, enforced runtime pragmas, and transactional message constraints. Claim scheduled jobs with durable leases, execute them concurrently within bounds, and commit completion atomically. Supervise background tasks and clean up WebSocket clients and writer tasks during ordered shutdown.
2026-07-14 10:37:58 +08:00
e707774175 清理代码问题 2026-06-16 22:56:01 +08:00
c6f4392e63 Fix CLI session routing and dialog controls 2026-06-15 23:44:41 +08:00
41b4895ff0 增加sub-agent机制。 2026-05-25 23:23:10 +08:00
22be6e404b 优化斜杠命令处理机制,增加/stop命令 2026-05-24 18:12:18 +08:00
b85578a7d2 新增浏览器调用能力。 2026-05-21 17:11:53 +08:00
52925fcd73 增加MCP适配 2026-05-13 16:43:38 +08:00
ebbf7e4036 refactor(session): make cron stateless, split session lock, eliminate deadlock
- handle_cron_message: bypass Session entirely, use create_cron_agent() for direct LLM call; cron LLM delivers results via send_message tool
- handle_message: split session lock into Phase1(prepare)/Phase2(LLM unlocked)/Phase3(persist), allowing send_message to lock freely
- send_message: restore lock().await (remove try_lock workaround)
- scheduler: remove outbound publish (LLM handles delivery via send_message)
2026-05-13 10:40:58 +08:00
5aec8cefb9 feat: add config.example.json template and update AGENTS.md with new config path 2026-05-10 18:45:53 +08:00
af07eaf820 feat: add default AGENTS.md and USER.md templates and ensure their presence in the user's config directory 2026-05-10 18:07:50 +08:00
bafa7a606c fix: update database filename and improve session management in chat manager 2026-05-10 15:51:03 +08:00
2617558a27 记忆工具合并文件,改成记忆系统总是开启。 2026-05-08 10:28:34 +08:00
c602a0695d feat: add memory system with FTS5 search and context compression integration 2026-05-07 23:32:59 +08:00
61d2fe9ef0 修复及完善cron任务 2026-05-07 16:24:13 +08:00
62f4326131 refactor: move scheduler store to storage module, cron tools to tools module
- storage/scheduler.rs: ScheduledJob/JobRun types + CRUD on Storage
- tools/cron.rs: 6 cron agent tools (add/list/remove/enable/disable/update)
- scheduler/types.rs: keep only Schedule enum
- scheduler/mod.rs: use Arc<Storage> instead of raw SqlitePool
- gateway/mod.rs: inject Storage directly, replace pool field
- storage/mod.rs: scheduler tables in init_schema
2026-05-05 00:49:54 +08:00
f7b0a33e66 feat: add 6 cron agent tools (add/list/remove/enable/disable/update) 2026-05-05 00:27:27 +08:00
205b814933 feat: wire scheduler into GatewayState startup and message processing 2026-05-05 00:17:19 +08:00
98eb7bea3d 新增跨session消息发送能力 2026-05-04 00:32:24 +08:00
c48ed83a23 refactor(session): 移除 InboundMessage.dialog_id,dialog_id 完全由 SessionManager 管理
Channel 消息不再携带 dialog_id,完全由 SessionManager 通过
current_sessions 内部管理。/new 后下一条消息会自动路由到新 session。

改动:
- InboundMessage 移除 dialog_id 字段
- handle_message 移除 dialog_id 参数
- Feishu/CLI channel 创建 InboundMessage 时不再设置 dialog_id
- 路由逻辑简化为:current_sessions → find_active_session → 创建新 session
2026-04-28 23:05:06 +08:00
ac7576bb4b feat(session): Phase 3 - SessionManager 完善
- SessionManager::new 接收 Arc<Storage> 参数
- create_session / get_or_create_session 写入/恢复 Storage
- handle_message 支持无 dialog_id 时自动查找最近活跃 session 或创建新 session
- 实现 list_dialogs() — 从 Storage 读取最近 10 条
- 实现 switch_dialog() — 从 Storage 恢复 session
- 实现 delete_dialog() — 软删除 Storage + 内存移除
- 实现 rename_dialog() — 更新 Storage 和内存 title
- 实现 archive_dialog()(空实现,archive 概念已删除)
- 新增 start_cleanup_task() 后台 TTL 清理任务
- GatewayConfig 新增 session_db_path 和 cleanup_interval_minutes 配置
- Gateway::new 改为 async,创建 Storage 并启动清理任务
- rename_dialog / delete_dialog 改为 async(需 .await)
- WsOutbound::SystemNotification 已在 Phase 2 添加
2026-04-28 22:29:24 +08:00