229 Commits

Author SHA1 Message Date
b13450498b refactor: remove sleep tool and wake-aware steering machinery
Drop the model-callable sleep tool and its TurnWakeup publisher/handle state. Async background completions and user input already inject through steer-at-safe-boundary or the queued continuation Turn, so the sleep path only misled agents into busy-waiting on non-actionable queue wakes. Cancellation still normalizes running tool blocks to Cancelled.
2026-08-13 18:08:07 +08:00
b2574dc7af feat: add sub-agent activity WebUI with streamed run transcripts
Restructure the WebUI around sub-agent activity: move definition management into Settings, turn the agents page into a live activity monitor with a read-only detail view, and slim the tasks page to scheduled jobs only. Persist incrementally streamed per-run transcripts in a new agent_run_messages table (schema v9, version-gated drops preserve v8 run history) and expose them via GET /api/agent-runs/{id}.
2026-08-13 18:07:56 +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
554d4b15ac feat: wire run quota and signal delivery persistence; remove redundant compat code
- RunQuota now enforced: background admission acquires the run permit
  (global→session) and the runner holds it until terminal commit;
  foreground never takes run permits so nested limit=1 cannot deadlock
- RuntimeAdmission activity guard held by background runners for the
  whole run; admission checked before any durable write
- signal_contract_json/signal_delivery persisted at run admission so
  definition-level steer delivery actually takes effect (was silently
  falling back to queue)
- terminal completion payload carries the run's emitted signal IDs
  (design §12.3) so the main Agent can recognise duplicates
- ROOT caller_scope_id is the literal "ROOT" (design §9.6)
- legacy general delegation returns a deprecation/migration hint

Cleanup:
- remove unused AgentCaller enum and run_parallel wrapper
- remove unreachable http_get_only prompt machinery (http_request is
  RootOnly and never enters sub-agent registries)
- drop never-read EmittedSignal fields; derive WakeupSource from
  TurnInputSource instead of duplicating match arms
- replace the /stop oneshot compatibility bridge with a plain turn_busy
  flag; the worker's forced-cancel path now selects on the cancellation
  token (implementation doc §11.1)

Version 1.8.0
2026-08-11 15:24:49 +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
1acab7f890 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	AGENTS.md
#	Cargo.toml
#	docs/ARCHITECTURE.md
#	resources/skills/about-picobot/references/architecture.md
#	src/agent/agent_loop.rs
#	src/session/session.rs
#	webui/package-lock.json
#	webui/package.json
2026-08-06 18:37:16 +08:00
c02993ae2c feat: add same-turn steering and queued input 2026-08-06 11:41:37 +08:00
e45980a282 feat: add cancellable sleep tool 2026-08-06 08:38:43 +08:00
da5ee05311 feat: add session token and context statistics 2026-08-05 16:45:56 +08:00
03bfa0ba2b feat: add persistent browsers and unified tool output 2026-07-28 23:51:30 +08:00
b1b8e2d923 feat: migrate browser tooling to agent-browser 2026-07-27 23:53:55 +08:00
751de27e45 升级组件 2026-07-27 22:40:28 +08:00
c1a6660313 feat(webui): typography scale, surface depth, motion and unified nav icons
- Replace static Space Grotesk weights with a variable font (300-700) and
  bump the type scale across all tiers for a clearer weight hierarchy
- Add dot-grid texture, ambient glow, layered shadows with machined edge
  highlights, and entrance/hover/press micro-interactions (reduced-motion aware)
- Refine sidebar and session list: sliding amber active indicator, search
  focus ring, SESSIONS label header, living status dot, backdrop-blurred bars
- Replace inconsistent glyph icons with a unified Lucide-style SVG icon set;
  rename 工具&Skills to 工具 and enlarge nav font
2026-07-26 23:46:10 +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
bee11c7735 feat(logging): tracing broadcast layer for real-time log streaming 2026-07-26 21:50:03 +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
87cf5004b9 fix(gateway): stabilize status snapshot output 2026-07-24 18:27:37 +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
5d0cf5b070 feat(agent): record tool/turn/provider metrics 2026-07-24 17:21:44 +08:00
115e77ff27 feat(config): optional provider pricing for cost metrics 2026-07-24 17:11:37 +08:00
11474c080e feat(observability): process-global Metrics collector 2026-07-24 15:24:04 +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
4b0d5e41c6 feat(webui): render image attachments inline 2026-07-20 00:11:51 +08:00
b043fcf531 fix(session): commit same-turn media with final reply 2026-07-20 00:11:39 +08:00
4175af113c fix(provider): sanitize replayed assistant media 2026-07-20 00:11:19 +08:00
762fd16e3f 增加oneshot客户端,解决一次性对话和测试的支持。 2026-07-19 23:18:39 +08:00
23e0b3e7a6 fix(feishu): bound media and retry API requests 2026-07-19 16:02:01 +08:00
7e53fa658b fix(feishu): preserve reply and thread semantics 2026-07-19 15:52:53 +08:00
0512d91729 fix(feishu): harden websocket event processing 2026-07-19 15:47:27 +08:00
5d081e2580 fix(feishu): enforce inbound admission rules 2026-07-19 15:42:01 +08:00
76de8139de perf: calibrate turn history incrementally 2026-07-19 13:51:14 +08:00
76685c3983 refactor: normalize inbound channel context 2026-07-19 13:42:43 +08:00
355244a3d6 refactor: unify turn progress delivery 2026-07-19 13:36:42 +08:00
42fe650785 refactor: centralize turn input preparation 2026-07-19 13:34:12 +08:00
515a07ec1f refactor: route gateway messages concurrently 2026-07-19 13:28:53 +08:00
0c835db380 fix: observe terminal turn delivery 2026-07-19 13:23:01 +08:00
07b09ca486 版本号变更 2026-07-19 12:50:31 +08:00
7a5d95e786 merge: streaming turn architecture 2026-07-17 17:47:41 +08:00
7a3058d8b5 docs: finalize streaming turn architecture 2026-07-17 17:45:22 +08:00
c6e022f6cb feat: stream turns through Feishu cards 2026-07-17 17:30:38 +08:00
c7ceb877a2 feat: stream Anthropic turns with signed replay state 2026-07-17 17:11:26 +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