@swarmclawai/swarmclaw 0.7.1 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/README.md +155 -150
  2. package/package.json +1 -1
  3. package/src/app/api/agents/[id]/route.ts +26 -0
  4. package/src/app/api/agents/[id]/thread/route.ts +37 -9
  5. package/src/app/api/agents/route.ts +13 -2
  6. package/src/app/api/auth/route.ts +76 -7
  7. package/src/app/api/chatrooms/[id]/chat/route.ts +7 -2
  8. package/src/app/api/{sessions → chats}/[id]/browser/route.ts +5 -1
  9. package/src/app/api/{sessions → chats}/[id]/chat/route.ts +7 -3
  10. package/src/app/api/{sessions → chats}/[id]/checkpoints/route.ts +1 -1
  11. package/src/app/api/chats/[id]/main-loop/route.ts +13 -0
  12. package/src/app/api/{sessions → chats}/[id]/messages/route.ts +19 -13
  13. package/src/app/api/{sessions → chats}/[id]/restore/route.ts +1 -1
  14. package/src/app/api/{sessions → chats}/[id]/route.ts +22 -52
  15. package/src/app/api/{sessions → chats}/[id]/stop/route.ts +6 -1
  16. package/src/app/api/{sessions → chats}/route.ts +21 -7
  17. package/src/app/api/connectors/[id]/doctor/route.ts +26 -0
  18. package/src/app/api/connectors/doctor/route.ts +13 -0
  19. package/src/app/api/files/open/route.ts +16 -14
  20. package/src/app/api/memory/maintenance/route.ts +11 -1
  21. package/src/app/api/openclaw/agent-files/route.ts +27 -4
  22. package/src/app/api/openclaw/skills/route.ts +11 -3
  23. package/src/app/api/plugins/dependencies/route.ts +24 -0
  24. package/src/app/api/plugins/install/route.ts +15 -92
  25. package/src/app/api/plugins/route.ts +6 -26
  26. package/src/app/api/plugins/settings/route.ts +40 -0
  27. package/src/app/api/plugins/ui/route.ts +1 -0
  28. package/src/app/api/settings/route.ts +49 -7
  29. package/src/app/api/tasks/[id]/route.ts +15 -6
  30. package/src/app/api/tasks/bulk/route.ts +2 -2
  31. package/src/app/api/tasks/route.ts +9 -4
  32. package/src/app/api/usage/route.ts +30 -0
  33. package/src/app/api/webhooks/[id]/route.ts +8 -1
  34. package/src/app/page.tsx +9 -2
  35. package/src/cli/index.js +39 -33
  36. package/src/cli/index.ts +43 -49
  37. package/src/cli/spec.js +29 -27
  38. package/src/components/agents/agent-card.tsx +16 -13
  39. package/src/components/agents/agent-chat-list.tsx +104 -4
  40. package/src/components/agents/agent-list.tsx +54 -22
  41. package/src/components/agents/agent-sheet.tsx +209 -18
  42. package/src/components/agents/cron-job-form.tsx +3 -3
  43. package/src/components/agents/inspector-panel.tsx +110 -50
  44. package/src/components/auth/access-key-gate.tsx +36 -97
  45. package/src/components/auth/setup-wizard.tsx +5 -38
  46. package/src/components/chat/chat-area.tsx +39 -27
  47. package/src/components/{sessions/session-card.tsx → chat/chat-card.tsx} +7 -23
  48. package/src/components/chat/chat-header.tsx +299 -314
  49. package/src/components/{sessions/session-list.tsx → chat/chat-list.tsx} +11 -14
  50. package/src/components/chat/chat-tool-toggles.tsx +26 -17
  51. package/src/components/chat/checkpoint-timeline.tsx +4 -4
  52. package/src/components/chat/message-bubble.tsx +4 -1
  53. package/src/components/chat/message-list.tsx +5 -3
  54. package/src/components/chat/session-debug-panel.tsx +1 -1
  55. package/src/components/chat/tool-request-banner.tsx +3 -3
  56. package/src/components/chatrooms/agent-hover-card.tsx +3 -3
  57. package/src/components/chatrooms/chatroom-tool-request-banner.tsx +2 -2
  58. package/src/components/chatrooms/chatroom-view.tsx +347 -205
  59. package/src/components/connectors/connector-list.tsx +265 -127
  60. package/src/components/connectors/connector-sheet.tsx +218 -1
  61. package/src/components/home/home-view.tsx +129 -5
  62. package/src/components/layout/app-layout.tsx +392 -182
  63. package/src/components/layout/mobile-header.tsx +26 -8
  64. package/src/components/plugins/plugin-list.tsx +487 -254
  65. package/src/components/plugins/plugin-sheet.tsx +236 -13
  66. package/src/components/projects/project-detail.tsx +183 -0
  67. package/src/components/settings/gateway-connection-panel.tsx +1 -1
  68. package/src/components/shared/agent-picker-list.tsx +2 -2
  69. package/src/components/shared/command-palette.tsx +111 -25
  70. package/src/components/shared/settings/plugin-manager.tsx +20 -4
  71. package/src/components/shared/settings/section-capability-policy.tsx +105 -0
  72. package/src/components/shared/settings/section-heartbeat.tsx +78 -1
  73. package/src/components/shared/settings/section-orchestrator.tsx +3 -3
  74. package/src/components/shared/settings/section-providers.tsx +1 -1
  75. package/src/components/shared/settings/section-runtime-loop.tsx +5 -5
  76. package/src/components/shared/settings/section-secrets.tsx +6 -6
  77. package/src/components/shared/settings/section-user-preferences.tsx +1 -1
  78. package/src/components/shared/settings/section-voice.tsx +5 -1
  79. package/src/components/shared/settings/section-web-search.tsx +10 -2
  80. package/src/components/shared/settings/settings-page.tsx +244 -56
  81. package/src/components/tasks/approvals-panel.tsx +205 -18
  82. package/src/components/tasks/task-board.tsx +242 -46
  83. package/src/components/usage/metrics-dashboard.tsx +147 -1
  84. package/src/components/wallets/wallet-panel.tsx +17 -5
  85. package/src/components/webhooks/webhook-sheet.tsx +8 -8
  86. package/src/lib/auth.ts +17 -0
  87. package/src/lib/chat-streaming-state.test.ts +108 -0
  88. package/src/lib/chat-streaming-state.ts +108 -0
  89. package/src/lib/chat.ts +1 -1
  90. package/src/lib/{sessions.ts → chats.ts} +28 -18
  91. package/src/lib/openclaw-agent-id.test.ts +14 -0
  92. package/src/lib/openclaw-agent-id.ts +31 -0
  93. package/src/lib/providers/claude-cli.ts +1 -1
  94. package/src/lib/server/agent-assignment.test.ts +112 -0
  95. package/src/lib/server/agent-assignment.ts +169 -0
  96. package/src/lib/server/approval-connector-notify.test.ts +253 -0
  97. package/src/lib/server/approvals-auto-approve.test.ts +205 -0
  98. package/src/lib/server/approvals.ts +483 -75
  99. package/src/lib/server/autonomy-runtime.test.ts +341 -0
  100. package/src/lib/server/browser-state.test.ts +118 -0
  101. package/src/lib/server/browser-state.ts +123 -0
  102. package/src/lib/server/build-llm.test.ts +36 -0
  103. package/src/lib/server/build-llm.ts +11 -4
  104. package/src/lib/server/builtin-plugins.ts +34 -0
  105. package/src/lib/server/capability-router.ts +10 -8
  106. package/src/lib/server/chat-execution-heartbeat.test.ts +40 -0
  107. package/src/lib/server/chat-execution-tool-events.test.ts +134 -0
  108. package/src/lib/server/chat-execution.ts +285 -165
  109. package/src/lib/server/chatroom-health.test.ts +26 -0
  110. package/src/lib/server/chatroom-health.ts +2 -3
  111. package/src/lib/server/chatroom-helpers.test.ts +67 -2
  112. package/src/lib/server/chatroom-helpers.ts +48 -8
  113. package/src/lib/server/connectors/discord.ts +175 -11
  114. package/src/lib/server/connectors/doctor.test.ts +80 -0
  115. package/src/lib/server/connectors/doctor.ts +116 -0
  116. package/src/lib/server/connectors/manager.ts +948 -112
  117. package/src/lib/server/connectors/policy.test.ts +222 -0
  118. package/src/lib/server/connectors/policy.ts +452 -0
  119. package/src/lib/server/connectors/slack.ts +188 -9
  120. package/src/lib/server/connectors/telegram.ts +65 -15
  121. package/src/lib/server/connectors/thread-context.test.ts +44 -0
  122. package/src/lib/server/connectors/thread-context.ts +72 -0
  123. package/src/lib/server/connectors/types.ts +41 -11
  124. package/src/lib/server/cost.ts +34 -1
  125. package/src/lib/server/daemon-state.ts +61 -3
  126. package/src/lib/server/data-dir.ts +13 -0
  127. package/src/lib/server/delegation-jobs.test.ts +140 -0
  128. package/src/lib/server/delegation-jobs.ts +248 -0
  129. package/src/lib/server/document-utils.test.ts +47 -0
  130. package/src/lib/server/document-utils.ts +397 -0
  131. package/src/lib/server/heartbeat-service.ts +14 -40
  132. package/src/lib/server/heartbeat-source.test.ts +22 -0
  133. package/src/lib/server/heartbeat-source.ts +7 -0
  134. package/src/lib/server/identity-continuity.test.ts +77 -0
  135. package/src/lib/server/identity-continuity.ts +127 -0
  136. package/src/lib/server/mailbox-utils.ts +347 -0
  137. package/src/lib/server/main-agent-loop.ts +28 -1103
  138. package/src/lib/server/memory-db.ts +4 -6
  139. package/src/lib/server/memory-tiers.ts +40 -0
  140. package/src/lib/server/openclaw-agent-resolver.test.ts +70 -0
  141. package/src/lib/server/openclaw-agent-resolver.ts +128 -0
  142. package/src/lib/server/openclaw-exec-config.ts +5 -6
  143. package/src/lib/server/openclaw-skills-normalize.test.ts +56 -0
  144. package/src/lib/server/openclaw-skills-normalize.ts +136 -0
  145. package/src/lib/server/openclaw-sync.ts +3 -2
  146. package/src/lib/server/orchestrator-lg.ts +20 -9
  147. package/src/lib/server/orchestrator.ts +7 -7
  148. package/src/lib/server/playwright-proxy.mjs +27 -3
  149. package/src/lib/server/plugins.test.ts +207 -0
  150. package/src/lib/server/plugins.ts +927 -66
  151. package/src/lib/server/provider-health.ts +38 -6
  152. package/src/lib/server/queue.ts +13 -28
  153. package/src/lib/server/scheduler.ts +2 -0
  154. package/src/lib/server/session-archive-memory.test.ts +85 -0
  155. package/src/lib/server/session-archive-memory.ts +230 -0
  156. package/src/lib/server/session-mailbox.ts +8 -18
  157. package/src/lib/server/session-reset-policy.test.ts +99 -0
  158. package/src/lib/server/session-reset-policy.ts +311 -0
  159. package/src/lib/server/session-run-manager.ts +33 -82
  160. package/src/lib/server/session-tools/autonomy-tools.test.ts +105 -0
  161. package/src/lib/server/session-tools/calendar.ts +366 -0
  162. package/src/lib/server/session-tools/canvas.ts +1 -1
  163. package/src/lib/server/session-tools/chatroom.ts +4 -2
  164. package/src/lib/server/session-tools/connector.ts +114 -10
  165. package/src/lib/server/session-tools/context.ts +21 -5
  166. package/src/lib/server/session-tools/crawl.ts +447 -0
  167. package/src/lib/server/session-tools/crud.ts +74 -28
  168. package/src/lib/server/session-tools/delegate-fallback.test.ts +219 -0
  169. package/src/lib/server/session-tools/delegate.ts +497 -24
  170. package/src/lib/server/session-tools/discovery.ts +24 -6
  171. package/src/lib/server/session-tools/document.ts +283 -0
  172. package/src/lib/server/session-tools/edit_file.ts +4 -2
  173. package/src/lib/server/session-tools/email.ts +320 -0
  174. package/src/lib/server/session-tools/extract.ts +137 -0
  175. package/src/lib/server/session-tools/file-normalize.test.ts +93 -0
  176. package/src/lib/server/session-tools/file-send.test.ts +84 -1
  177. package/src/lib/server/session-tools/file.ts +241 -25
  178. package/src/lib/server/session-tools/git.ts +1 -1
  179. package/src/lib/server/session-tools/http.ts +1 -1
  180. package/src/lib/server/session-tools/human-loop.ts +227 -0
  181. package/src/lib/server/session-tools/image-gen.ts +380 -0
  182. package/src/lib/server/session-tools/index.ts +130 -50
  183. package/src/lib/server/session-tools/mailbox.ts +276 -0
  184. package/src/lib/server/session-tools/memory.ts +172 -3
  185. package/src/lib/server/session-tools/monitor.ts +151 -8
  186. package/src/lib/server/session-tools/normalize-tool-args.ts +17 -14
  187. package/src/lib/server/session-tools/openclaw-nodes.ts +1 -1
  188. package/src/lib/server/session-tools/openclaw-workspace.ts +1 -1
  189. package/src/lib/server/session-tools/platform-normalize.test.ts +142 -0
  190. package/src/lib/server/session-tools/platform.ts +148 -7
  191. package/src/lib/server/session-tools/plugin-creator.ts +89 -26
  192. package/src/lib/server/session-tools/primitive-tools.test.ts +257 -0
  193. package/src/lib/server/session-tools/replicate.ts +301 -0
  194. package/src/lib/server/session-tools/sample-ui.ts +1 -1
  195. package/src/lib/server/session-tools/sandbox.ts +4 -2
  196. package/src/lib/server/session-tools/schedule.ts +24 -12
  197. package/src/lib/server/session-tools/session-info.ts +43 -7
  198. package/src/lib/server/session-tools/session-tools-wiring.test.ts +31 -17
  199. package/src/lib/server/session-tools/shell.ts +5 -2
  200. package/src/lib/server/session-tools/subagent.ts +194 -28
  201. package/src/lib/server/session-tools/table.ts +587 -0
  202. package/src/lib/server/session-tools/wallet.ts +42 -12
  203. package/src/lib/server/session-tools/web-browser-config.test.ts +39 -0
  204. package/src/lib/server/session-tools/web.ts +926 -91
  205. package/src/lib/server/storage.ts +255 -16
  206. package/src/lib/server/stream-agent-chat.ts +116 -268
  207. package/src/lib/server/structured-extract.test.ts +72 -0
  208. package/src/lib/server/structured-extract.ts +373 -0
  209. package/src/lib/server/task-mention.test.ts +16 -2
  210. package/src/lib/server/task-mention.ts +61 -10
  211. package/src/lib/server/tool-aliases.ts +66 -18
  212. package/src/lib/server/tool-capability-policy.test.ts +9 -9
  213. package/src/lib/server/tool-capability-policy.ts +38 -27
  214. package/src/lib/server/tool-retry.ts +2 -0
  215. package/src/lib/server/watch-jobs.test.ts +173 -0
  216. package/src/lib/server/watch-jobs.ts +532 -0
  217. package/src/lib/server/ws-hub.ts +5 -3
  218. package/src/lib/tool-definitions.ts +4 -0
  219. package/src/lib/validation/schemas.test.ts +26 -0
  220. package/src/lib/validation/schemas.ts +10 -1
  221. package/src/lib/ws-client.ts +14 -12
  222. package/src/proxy.ts +5 -5
  223. package/src/stores/use-app-store.ts +5 -11
  224. package/src/stores/use-chat-store.ts +38 -9
  225. package/src/types/index.ts +352 -47
  226. package/src/app/api/sessions/[id]/main-loop/route.ts +0 -94
  227. package/src/components/sessions/new-session-sheet.tsx +0 -253
  228. package/src/lib/server/main-session.ts +0 -24
  229. package/src/lib/server/session-run-manager.test.ts +0 -23
  230. /package/src/app/api/{sessions → chats}/[id]/clear/route.ts +0 -0
  231. /package/src/app/api/{sessions → chats}/[id]/deploy/route.ts +0 -0
  232. /package/src/app/api/{sessions → chats}/[id]/devserver/route.ts +0 -0
  233. /package/src/app/api/{sessions → chats}/[id]/edit-resend/route.ts +0 -0
  234. /package/src/app/api/{sessions → chats}/[id]/fork/route.ts +0 -0
  235. /package/src/app/api/{sessions → chats}/[id]/mailbox/route.ts +0 -0
  236. /package/src/app/api/{sessions → chats}/[id]/retry/route.ts +0 -0
  237. /package/src/app/api/{sessions → chats}/heartbeat/route.ts +0 -0
package/README.md CHANGED
@@ -14,6 +14,19 @@ Inspired by [OpenClaw](https://github.com/openclaw).
14
14
 
15
15
  **[Documentation](https://swarmclaw.ai/docs)** | **[Plugin Tutorial](https://swarmclaw.ai/docs/plugin-tutorial)** | **[Website](https://swarmclaw.ai)**
16
16
 
17
+ ## Documentation Map
18
+
19
+ - [Getting Started](https://swarmclaw.ai/docs/getting-started) - install and first-run setup
20
+ - [Providers](https://swarmclaw.ai/docs/providers) - provider setup and failover options
21
+ - [Agents](https://swarmclaw.ai/docs/agents) - agent configuration, tools, and platform capabilities
22
+ - [Tools](https://swarmclaw.ai/docs/tools) - built-in tool reference and guardrails
23
+ - [Orchestration](https://swarmclaw.ai/docs/orchestration) - multi-agent flows, checkpoints, and restore
24
+ - [Chatrooms](https://swarmclaw.ai/docs/chatrooms) - multi-agent rooms and routing
25
+ - [Connectors](https://swarmclaw.ai/docs/connectors) - Discord/Slack/Telegram/WhatsApp and more
26
+ - [Plugins](https://swarmclaw.ai/docs/plugins) - plugin architecture and extension points
27
+ - [CLI Reference](https://swarmclaw.ai/docs/cli) - complete command reference
28
+ - [Deployment](https://swarmclaw.ai/docs/deployment) - VPS, Docker, and production setup
29
+
17
30
  ![Dashboard](public/screenshots/dashboard.png)
18
31
  ![Agent Builder](public/screenshots/agents.png)
19
32
  ![Task Board](public/screenshots/tasks.png)
@@ -46,7 +59,7 @@ URLs without a protocol are auto-prefixed with `http://`. For remote gateways wi
46
59
 
47
60
  ## SwarmClaw ClawHub Skill
48
61
 
49
- Use the `swarmclaw` ClawHub skill when you want an OpenClaw agent to operate your SwarmClaw control plane directly from chat: list agents, dispatch tasks, check sessions, run diagnostics, and coordinate multi-agent work.
62
+ Use the `swarmclaw` ClawHub skill when you want an OpenClaw agent to operate your SwarmClaw control plane directly from chat: list agents, dispatch tasks, check chats, run diagnostics, and coordinate multi-agent work.
50
63
 
51
64
  Install it from ClawHub:
52
65
 
@@ -68,6 +81,7 @@ Skill source and runbook: [`swarmclaw/SKILL.md`](swarmclaw/SKILL.md).
68
81
  - **Claude Code CLI** (optional, for `claude-cli` provider) — [Install](https://docs.anthropic.com/en/docs/claude-code/overview)
69
82
  - **OpenAI Codex CLI** (optional, for `codex-cli` provider) — [Install](https://github.com/openai/codex)
70
83
  - **OpenCode CLI** (optional, for `opencode-cli` provider) — [Install](https://github.com/opencode-ai/opencode)
84
+ - **Gemini CLI** (optional, for `delegate` backend `gemini`) — install and authenticate `gemini` on your host
71
85
 
72
86
  ## Quick Start
73
87
 
@@ -85,7 +99,7 @@ curl -fsSL https://raw.githubusercontent.com/swarmclawai/swarmclaw/main/install.
85
99
  ```
86
100
 
87
101
  The installer resolves the latest stable release tag and installs that version by default.
88
- To pin a version: `SWARMCLAW_VERSION=v0.7.1 curl ... | bash`
102
+ To pin a version: `SWARMCLAW_VERSION=v0.7.3 curl ... | bash`
89
103
 
90
104
  Or run locally from the repo (friendly for non-technical users):
91
105
 
@@ -149,52 +163,23 @@ Notes:
149
163
 
150
164
  ## Features
151
165
 
152
- - **15 Built-in Providers** Claude Code CLI, OpenAI Codex CLI, OpenCode CLI, Anthropic, OpenAI, Google Gemini, DeepSeek, Groq, Together AI, Mistral AI, xAI (Grok), Fireworks AI, Ollama, plus custom OpenAI-compatible endpoints
153
- - **OpenClaw Gateway** Per-agent toggle to connect any agent to a local or remote OpenClaw gateway. Each agent gets its own gateway URL and token — run a swarm of OpenClaws from one dashboard. The `openclaw` CLI ships as a bundled dependency (no separate install needed)
154
- - **OpenClaw Control Plane** — Built-in gateway connection controls, reload mode switching (hot/hybrid/full), config issue detection/repair, remote history sync, and live execution approval handling
155
- - **Gateway Watchdog** — Proactive gateway health monitoring with auto-repair via `openclaw doctor`, outbound ops alerts to Discord/Slack/custom webhooks, workspace backup/rollback/history tools for agents, and connector liveness detection
156
- - **Agent Builder** Create agents with custom personalities (soul), system prompts, tools, and skills. AI-powered generation from a description
157
- - **Agent Inspector Panel** — Per-agent side panel for OpenClaw file editing (`SOUL.md`, `IDENTITY.md`, `USER.md`, etc.), guided personality editing, skill install/enable/remove, permission presets, sandbox env allowlist, and cron automations
158
- - **Agent Fleet Management** Avatar seeds with generated avatars, running/approval fleet filters, soft-delete agent trash with restore/permanent delete, and approval counters in agent cards
159
- - **Agent Tools** — Shell, process control for long-running commands, files, edit file, send file, web search, web fetch, CLI delegation (Claude/Codex/OpenCode), Playwright browser automation, sub-agent spawning, canvas presentation, direct HTTP requests, git operations, persistent memory, and sandboxed code execution (JS/TS via Deno, Python)
160
- - **Platform Tools** Agents can manage other agents, tasks, schedules, skills, connectors, sessions, and encrypted secrets via built-in platform tools
161
- - **Orchestration** — Multi-agent workflows powered by LangGraph with automatic sub-agent routing, checkpointed execution, checkpoint timeline with time-travel restore, and rich delegation cards that link to sub-agent chat threads
162
- - **Agentic Execution Policy** — Tool-first autonomous action loop with progress updates, evidence-driven answers, and better use of platform tools for long-lived work
163
- - **Runtime Date/Time Grounding** Session, orchestrator, chatroom, and connector prompts include authoritative current timestamp context to reduce stale-date behavior
164
- - **Task Board** Queue and track agent tasks with status, comments, structured result artifacts (`outputFiles`, uploads), completion reports, and archiving. Strict capability policy pauses tasks for human approval before tool execution
165
- - **Task Metrics API** — Built-in analytics endpoint for WIP, cycle times, throughput velocity, completion/failure by agent, and priority distribution
166
- - **Background Daemon** Auto-processes queued tasks and scheduled jobs with a 30s heartbeat plus recurring health monitoring
167
- - **Scheduling** — Cron-based agent scheduling with human-friendly presets
168
- - **Loop Runtime Controls** — Switch between bounded and ongoing loops with configurable step caps, runtime guards, heartbeat cadence, and timeout budgets
169
- - **Session Run Queue** — Per-session queued runs with followup/steer/collect modes, collect coalescing for bursty inputs, and run-state APIs
170
- - **Chat Iteration Workflow** — Edit-and-resend user turns, fork a new session from any message, bookmark key messages, use contextual follow-up suggestion chips, and auto-continue after tool access grants
171
- - **Agent Chatrooms** — Multi-agent room conversations with `@mention` routing, chained agent replies, reactions, file/image-aware context, health-aware member filtering, and persistent context compaction for long-lived rooms
172
- - **Live Chat Telemetry** — Thinking/tool/responding stream phases, live main-loop status badges, connector activity presence, tone indicator, and optional sound notifications
173
- - **Global Search Palette** — `Cmd/Ctrl+K` search across agents, tasks, sessions, schedules, webhooks, and skills from anywhere in the app
174
- - **Notification Center** — Real-time in-app notifications for task/schedule/daemon events with unread tracking, mark-all/clear-read controls, and optional action links
175
- - **Preview-Rich Chat UI** — Side preview panel for tool outputs (image/browser/html/code), inline code/PDF previews for attachments, and image lightbox support
176
- - **Voice Settings** — Per-instance ElevenLabs API key + voice ID for TTS replies, plus configurable speech recognition language for chat input
177
- - **Chat Connectors** — Bridge agents to Discord, Slack, Telegram, WhatsApp, BlueBubbles (iMessage), Signal, Microsoft Teams, Google Chat, Matrix, and OpenClaw with media-aware inbound handling, inbound voice-note transcription (ElevenLabs/OpenAI fallback), and WhatsApp-friendly plain-text formatting
178
- - **Skills System** — Discover local skills, import skills from URL, and load OpenClaw `SKILL.md` files (frontmatter-compatible)
179
- - **Execution Logging** — Structured audit trail for triggers, tool calls, file ops, commits, and errors in a dedicated `logs.db`
180
- - **Context Management** — Auto-compaction of conversation history when approaching context limits, with manual `context_status` and `context_summarize` tools for agents
181
- - **Memory** — Per-agent and per-session memory with hybrid FTS5 + vector embeddings search, query expansion (LLM-generated semantic variants), MMR diversity ranking, cross-agent search (`scope: all`), pinned memories (always preloaded), memory sharing between agents, linked memory graph with interactive visualization, image attachments, and periodic auto-journaling for durable execution context
182
- - **Knowledge Base** — Shared knowledge store (`knowledge_store` / `knowledge_search` actions) with tags, source tracking, and provenance URLs — separate from per-agent memories
183
- - **Memory Graph Visualization** — Interactive force-directed graph view of linked memories with node details and relationship exploration
184
- - **Cost Tracking** — Per-message token counting and cost estimation displayed in the chat header, with per-agent monthly budget caps (`warn` or `block` enforcement)
185
- - **Provider Health Metrics** — Usage dashboard surfaces provider request volume, success rates, average latency, models used, and last-used timestamps
186
- - **Model Failover** — Automatic key rotation on rate limits and auth errors with configurable fallback credentials
187
- - **Plugin System** — Extend agent behavior with JS plugins (hooks: beforeAgentStart, afterAgentComplete, beforeToolExec, afterToolExec, onMessage, onTaskComplete, onAgentDelegation). Plugins can also define custom tools that agents can use
188
- - **Secrets Vault** — Encrypted storage for API keys and service tokens
189
- - **Custom Providers** — Add any OpenAI-compatible API as a provider
190
- - **MCP Servers** — Connect agents to any Model Context Protocol server. Per-agent server selection with tool discovery and per-tool disable toggles
191
- - **Sandboxed Code Execution** — Agents can write and run JS/TS (Deno) or Python scripts in an isolated sandbox with network access, scoped filesystem, and artifact output
192
- - **Eval Framework** — Built-in agent evaluation with scenario-based testing across categories (coding, research, companionship, multi-step, memory, planning, tool-usage), weighted scoring criteria, and LLM judge support
193
- - **Guardian Auto-Recovery** — Automatic workspace recovery when agents fail critically, rolling back to the last known good state via git reset
194
- - **Soul Library** — Browse and apply pre-built personality templates (archetypes) to agents, or create custom souls for reuse across your swarm
195
- - **Context Degradation Warnings** — Proactive alerts when context usage exceeds 85%, with strategy recommendations (save to memory, summarize, checkpoint)
196
- - **Real-Time Sync** — WebSocket push notifications for instant UI updates across tabs and devices (fallback to polling when WS is unavailable)
197
- - **Mobile-First UI** — Responsive glass-themed dark interface, works on phone and desktop
166
+ - **15 providers out of the box** - CLI providers + major hosted APIs + OpenAI-compatible custom endpoints
167
+ - **OpenClaw-native control plane** - per-agent gateway mapping, reload modes, sync, and approval flows
168
+ - **Agent builder + inspector** - personality/system tuning, skill management, and OpenClaw file editing
169
+ - **Rich toolset** - shell, files, browser, git, sandbox execution, memory, MCP, and delegation
170
+ - **Platform automation** - agents can manage tasks, schedules, chats, connectors, secrets, and more
171
+ - **LangGraph orchestration** - routing to sub-agents with checkpoint timeline and restore
172
+ - **Task board + daemon + scheduler** - long-running autonomous workflows with heartbeat safety
173
+ - **Chat UX** - edit/resend, fork, bookmarks, previews, telemetry, notifications, and search palette
174
+ - **Multi-agent chatrooms** - room routing with mentions, reactions, and persistent context compaction
175
+ - **Connector bridge** - Discord, Slack, Telegram, WhatsApp, Teams, Matrix, OpenClaw, and others
176
+ - **Memory + knowledge** - hybrid search, memory graph, shared knowledge store, and auto-journaling
177
+ - **Operational guardrails** - capability policy, cost tracking, provider health, and credential failover
178
+ - **Extensibility** - plugin hooks/tools/UI extensions plus reusable skills
179
+
180
+ For the full feature matrix and per-capability details, see:
181
+ - https://swarmclaw.ai/docs
182
+ - https://swarmclaw.ai/docs/release-notes
198
183
 
199
184
  ## Configuration
200
185
 
@@ -206,7 +191,7 @@ CREDENTIAL_SECRET=<auto-generated> # AES-256 encryption key for stored
206
191
  SWARMCLAW_PLUGIN_FAILURE_THRESHOLD=3 # Consecutive failures before auto-disabling a plugin
207
192
  ```
208
193
 
209
- Data is stored in `data/swarmclaw.db` (SQLite with WAL mode), `data/memory.db` (agent memory with FTS5 + vector embeddings), `data/logs.db` (execution audit trail), and `data/langgraph-checkpoints.db` (orchestrator checkpoints). Back the `data/` directory up if you care about your sessions, agents, and credentials. Existing JSON file data is auto-migrated to SQLite on first run.
194
+ Data is stored in `data/swarmclaw.db` (SQLite with WAL mode), `data/memory.db` (agent memory with FTS5 + vector embeddings), `data/logs.db` (execution audit trail), and `data/langgraph-checkpoints.db` (orchestrator checkpoints). Back the `data/` directory up if you care about your chats, agents, and credentials. Existing JSON file data is auto-migrated to SQLite on first run.
210
195
  Agent wallet private keys are stored encrypted (AES-256 via `CREDENTIAL_SECRET`) in `data/swarmclaw.db` and are never returned by wallet API responses; keep `data/` out of version control.
211
196
 
212
197
  The app listens on two ports: `PORT` (default 3456) for the HTTP/SSE API, and `PORT + 1` (default 3457) for WebSocket push notifications. The WS port can be customized with `--ws-port`.
@@ -264,6 +249,8 @@ src/
264
249
  | xAI (Grok) | api.x.ai | Grok 3, Grok 3 Fast, Grok 3 Mini |
265
250
  | Fireworks AI | api.fireworks.ai | DeepSeek R1, Llama 3.3 70B, Qwen 3 |
266
251
 
252
+ If a provider is configured, SwarmClaw can populate the model dropdown from that provider’s advertised model list. For OpenAI this means the selector can auto-fill current OpenAI models, while still allowing users to type a newer or custom model manually if it is not in the fetched list yet.
253
+
267
254
  ### Local & Remote
268
255
 
269
256
  | Provider | Type | Notes |
@@ -289,7 +276,7 @@ Bridge any agent to a chat platform:
289
276
  | Matrix | matrix-bot-sdk | Homeserver URL + access token |
290
277
  | OpenClaw | gateway protocol | OpenClaw connector credentials |
291
278
 
292
- Connector sessions preserve attachment visibility in chat context:
279
+ Connector chats preserve attachment visibility in chat context:
293
280
  - WhatsApp media is decoded and persisted to `/api/uploads/...` when possible
294
281
  - Telegram and Slack attachments are downloaded to uploads when possible
295
282
  - Discord attachments are captured as media metadata/URLs
@@ -309,21 +296,25 @@ Agents can use the following tools when enabled:
309
296
 
310
297
  | Tool | Description |
311
298
  |-|-|
312
- | Shell | Execute commands in the session working directory |
299
+ | Shell | Execute commands in the chat working directory |
313
300
  | Process | Control long-running shell commands (`process_tool`) |
314
301
  | Files | Read, write, list, and send files |
315
- | Copy/Move/Delete File | Optional file ops (`copy_file`, `move_file`, `delete_file`) configurable per agent/session (`delete_file` is off by default) |
302
+ | Copy/Move/Delete File | Optional file ops (`copy_file`, `move_file`, `delete_file`) configurable per agent/chat (`delete_file` is off by default) |
316
303
  | Edit File | Search-and-replace editing (exact match required) |
317
304
  | Web Search | Search the web via DuckDuckGo HTML scraping |
318
305
  | Web Fetch | Fetch and extract text content from URLs (uses cheerio) |
319
- | CLI Delegation | Delegate complex tasks to Claude Code, Codex CLI, or OpenCode CLI |
320
- | Spawn Subagent | Delegate a sub-task to another agent and capture its response in the current run |
321
- | Browser | Playwright-powered web browsing via MCP (navigate, click, type, screenshot, PDF) |
322
- | Canvas | Present/hide/snapshot live HTML content in a session canvas panel |
306
+ | CLI Delegation | Delegate complex tasks to Claude Code, Codex CLI, OpenCode CLI, or Gemini CLI, either inline or as a background job handle |
307
+ | Spawn Subagent | Delegate a sub-task to another agent with `status` / `list` / `wait` / `cancel` handles and inherited browser state when needed |
308
+ | Browser | Playwright-powered web browsing via MCP with persistent profiles, structured page reads, form helpers, verification actions, and resumable state |
309
+ | Canvas | Present/hide/snapshot live HTML content in a chat canvas panel |
323
310
  | HTTP Request | Make direct API calls with method, headers, body, redirect control, and timeout |
324
311
  | Git | Run structured git subcommands (`status`, `diff`, `log`, `add`, `commit`, `push`, etc.) with repo safety checks |
325
312
  | Memory | Store and retrieve long-term memories with FTS5 + vector search, file references, image attachments, and linked memory graph traversal |
313
+ | Monitor | Inspect system state and create durable watches over files, endpoints, tasks, webhooks, and page/content changes (`monitor_tool`) |
326
314
  | Wallet | Manage an agent-linked Solana wallet (`wallet_tool`) to check balance/address, send SOL (limits + approval), and review transaction history |
315
+ | Image Generation | Generate images from prompts (`generate_image`) via OpenAI, Stability, Replicate, fal.ai, Together, Fireworks, BFL, or custom endpoints; saved to uploads |
316
+ | Email | Send outbound email via SMTP (`email`) with `send`/`status` actions |
317
+ | Calendar | Manage Google/Outlook events (`calendar`) with list/create/update/delete/status actions |
327
318
  | Sandbox | Run JS/TS (Deno) or Python code in an isolated sandbox. Created files are returned as downloadable artifacts |
328
319
  | MCP Servers | Connect to external Model Context Protocol servers. Tools from MCP servers are injected as first-class agent tools |
329
320
 
@@ -336,16 +327,16 @@ Agents with platform tools enabled can manage the SwarmClaw instance:
336
327
  | Manage Agents | List, create, update, delete agents |
337
328
  | Manage Tasks | Create and manage task board items with agent assignment |
338
329
  | Manage Schedules | Create cron, interval, or one-time scheduled jobs |
339
- | Reminders | Schedule a conversational wake event in the current chat (`schedule_wake`) |
330
+ | Reminders | Schedule a durable conversational wake event in the current chat (`schedule_wake`) |
340
331
  | Manage Skills | List, create, update reusable skill definitions |
341
332
  | Manage Documents | Upload/search/get/delete indexed docs for lightweight RAG workflows |
342
- | Manage Webhooks | Register external webhook endpoints that trigger agent sessions |
333
+ | Manage Webhooks | Register external webhook endpoints that trigger agent chats |
343
334
  | Manage Connectors | Manage chat platform bridges |
344
335
  | Manage Chatrooms | Create/list/update chatrooms, manage members, and post room messages for multi-agent collaboration |
345
- | Manage Sessions | Enable `sessions_tool` for list/history/status/send/spawn/stop, plus `context_status` and `context_summarize` for context window management |
336
+ | Manage Chats | Enable `sessions_tool` for list/history/status/send/spawn/stop across chats, plus `context_status` and `context_summarize` for context window management |
346
337
  | Manage Secrets | Store and retrieve encrypted reusable secrets |
347
338
 
348
- Enable tools per-session or per-agent in the UI. CLI providers (Claude Code, Codex, OpenCode) handle tools natively through their own CLI.
339
+ Enable tools per-chat or per-agent in the UI. CLI providers (Claude Code, Codex, OpenCode) handle tools natively through their own CLI.
349
340
  OpenClaw provider capabilities are also managed remotely in OpenClaw itself, so local Tools/Platform toggles are hidden for OpenClaw agents.
350
341
 
351
342
  ## Starter Skills (URL Import)
@@ -359,7 +350,7 @@ Import these directly in **Skills → Import via URL**:
359
350
 
360
351
  Token usage and estimated costs are tracked per message for API-based providers (Anthropic, OpenAI). After each response, a badge in the chat header shows token count and estimated cost.
361
352
 
362
- - **API endpoint:** `GET /api/usage` — returns usage summary by session and provider
353
+ - **API endpoint:** `GET /api/usage` — returns usage summary by agent/provider plus plugin-level token rollups (`byPlugin`)
363
354
  - **Data:** Stored in `data/swarmclaw.db` (usage table)
364
355
  - Cost estimates use published model pricing (updated manually in `src/lib/server/cost.ts`)
365
356
 
@@ -372,7 +363,7 @@ Task analytics are available via API for dashboarding and release-readiness chec
372
363
 
373
364
  ## Background Daemon
374
365
 
375
- The daemon auto-processes queued tasks from the scheduler on a 30-second interval. It also runs recurring health checks that detect stale heartbeat sessions and can send proactive WhatsApp alerts when issues are detected. Toggle the daemon from the sidebar indicator or via API.
366
+ The daemon auto-processes queued tasks from the scheduler on a 30-second interval. It also runs recurring health checks that detect stale heartbeat chats and can send proactive WhatsApp alerts when issues are detected. Toggle the daemon from the sidebar indicator or via API.
376
367
 
377
368
  Daemon runtime also triggers memory consolidation (daily summary generation plus recurring dedupe/prune maintenance).
378
369
 
@@ -381,7 +372,7 @@ Daemon runtime also triggers memory consolidation (daily summary generation plus
381
372
 
382
373
  ## Main Agent Loop
383
374
 
384
- For autonomous long-running missions, enable the **Main Loop** on a session. This lets an agent pursue a goal continuously with heartbeat-driven progress checks and automatic followups.
375
+ For autonomous long-running missions, enable the **Main Loop** on an agent-thread or orchestrated chat. This lets an agent pursue a goal continuously with heartbeat-driven progress checks and automatic followups.
385
376
 
386
377
  - **Heartbeat prompts:** `SWARM_MAIN_MISSION_TICK` triggers on each heartbeat, giving the agent its goal, status, and pending events
387
378
  - **Auto-followup:** When an agent returns `[MAIN_LOOP_META] {"follow_up":true}`, the loop schedules another tick after `delay_sec`
@@ -389,8 +380,8 @@ For autonomous long-running missions, enable the **Main Loop** on a session. Thi
389
380
  - **Autonomy modes:**
390
381
  - `autonomous`: Agent executes safe actions without confirmation, only asks when blocked by permissions/credentials
391
382
  - `assist`: Agent asks before irreversible external actions (sending messages, purchases, account mutations)
392
- - **API:** `POST /api/sessions/[id]/main-loop` with `{"tick":true}` to trigger a mission tick
393
- - **CLI:** `swarmclaw sessions main-loop <id>` to inspect loop state, or `swarmclaw sessions main-loop-action <id> --data '{"action":"nudge"}'` to control it
383
+ - **API:** `POST /api/chats/[id]/main-loop` with `{"tick":true}` to trigger a mission tick
384
+ - **CLI:** `swarmclaw chats main-loop <id>` to inspect loop state, or `swarmclaw chats main-loop-action <id> --data '{"action":"nudge"}'` to control it
394
385
 
395
386
  Use this for background agents that should "keep working" on a goal until blocked or complete.
396
387
 
@@ -412,7 +403,7 @@ Configure this in **Settings → Capability Policy** to centrally govern tool ac
412
403
  - **Blocked tools:** specific tool families or concrete tool names
413
404
  - **Allowed tools:** explicit overrides when running stricter modes
414
405
 
415
- Policy is enforced in both session tool construction and direct forced tool invocations, so auto-routing and explicit tool requests use the same guardrails.
406
+ Policy is enforced in both chat tool construction and direct forced tool invocations, so auto-routing and explicit tool requests use the same guardrails.
416
407
 
417
408
  ## CLI Troubleshooting
418
409
 
@@ -430,11 +421,11 @@ Policy is enforced in both session tool construction and direct forced tool invo
430
421
  Configure these in **Settings**:
431
422
 
432
423
  - **Voice** — set `ElevenLabs API Key`, `ElevenLabs Voice ID`, and `Speech Recognition Language`
433
- - **Heartbeat** — set `Heartbeat Interval (Seconds)` and `Heartbeat Prompt` for ongoing session pings
434
- - **Global heartbeat safety** — use `Stop All Session Heartbeats` to disable heartbeat across all sessions and cancel in-flight heartbeat runs.
424
+ - **Heartbeat** — set `Heartbeat Interval (Seconds)` and `Heartbeat Prompt` for ongoing chat pings
425
+ - **Global heartbeat safety** — use `Stop All Heartbeats` to disable heartbeat across all chats and cancel in-flight heartbeat runs.
435
426
 
436
- Heartbeat pings are internal checks for ongoing sessions. If there's no new status, the assistant returns `HEARTBEAT_OK`; otherwise it returns a concise progress update and next step. In chat UI, heartbeat entries render as compact expandable cards and consecutive heartbeat streaks are collapsed to the latest item.
437
- The daemon health monitor also auto-disables heartbeat on sessions that remain stale for an extended period.
427
+ Heartbeat pings are internal checks for ongoing chats. If there's no new status, the assistant returns `HEARTBEAT_OK`; otherwise it returns a concise progress update and next step. In chat UI, heartbeat entries render as compact expandable cards and consecutive heartbeat streaks are collapsed to the latest item.
428
+ The daemon health monitor also auto-disables heartbeat on chats that remain stale for an extended period.
438
429
 
439
430
  ## Embeddings & Hybrid Memory Search
440
431
 
@@ -448,13 +439,13 @@ When enabled, new memories get vector embeddings. Search uses both FTS5 keyword
448
439
 
449
440
  ## Model Failover
450
441
 
451
- Agents and sessions can have **fallback credentials**. If the primary API key gets a 401, 429, or 500 error, SwarmClaw automatically retries with the next credential. Configure fallback keys in the agent builder UI.
442
+ Agents and chats can have **fallback credentials**. If the primary API key gets a 401, 429, or 500 error, SwarmClaw automatically retries with the next credential. Configure fallback keys in the agent builder UI.
452
443
 
453
444
  ## Plugin System
454
445
 
455
- SwarmClaw features a powerful, modular plugin system designed for both agent enhancement and application extensibility. It is fully compatible with the **OpenClaw** plugin format.
446
+ SwarmClaw features a modular plugin system for agent capabilities, UI extensions, provider/connectors, and post-turn automation. It supports the native SwarmClaw hook/tool format and the **OpenClaw** register/activate formats.
456
447
 
457
- Plugins can be managed in **Settings → Plugins** and installed via the Marketplace, URL, or by dropping `.js` files into `data/plugins/`.
448
+ Plugins can be managed in **Settings → Plugins** and installed via the Marketplace, HTTPS URL, or by dropping `.js` / `.mjs` files into `data/plugins/`.
458
449
 
459
450
  Docs:
460
451
  - Full docs: https://swarmclaw.ai/docs
@@ -465,17 +456,30 @@ Docs:
465
456
  Unlike standard tool systems, SwarmClaw plugins can modify the application itself:
466
457
 
467
458
  - **Agent Tools**: Define custom tools that agents can autonomously discover and use.
468
- - **Lifecycle Hooks**: Intercept events like `beforeAgentStart`, `afterToolExec`, and `onMessage`.
459
+ - **Lifecycle Hooks**: Intercept events like `beforeAgentStart`, `beforeToolExec`, `afterToolExec`, `afterChatTurn`, and `onMessage`.
469
460
  - **UI Extensions**:
470
461
  - `sidebarItems`: Inject new navigation links into the main sidebar.
471
462
  - `headerWidgets`: Add status badges or indicators to the chat header (e.g., Wallet Balance).
472
463
  - `chatInputActions`: Add custom action buttons next to the chat input (e.g., "Quick Scan").
473
464
  - `plugin-ui` Messages: Render rich, interactive React cards in the chat stream.
474
465
  - **Deep Chat Hooks**:
475
- - `transformInboundMessage`: Modify user messages before they reach the agent.
476
- - `transformOutboundMessage`: Modify agent responses before they are saved or displayed.
466
+ - `transformInboundMessage`: Modify user messages before they reach the agent runtime.
467
+ - `transformOutboundMessage`: Modify agent responses before they are persisted or displayed.
468
+ - `beforeToolExec`: Can rewrite tool input before the selected tool executes.
477
469
  - **Custom Providers**: Add new LLM backends (e.g., a specialized local model or a new API).
478
470
  - **Custom Connectors**: Build new chat platform bridges (e.g., a proprietary internal messenger).
471
+ - **Per-plugin Settings**: Declare `ui.settingsFields` and read/write them via `/api/plugins/settings`. Fields marked `type: 'secret'` are encrypted at rest.
472
+
473
+ ### Canonical Plugin IDs
474
+
475
+ Built-in capabilities now resolve to a single canonical plugin family ID across agent configs, policy rules, approvals, and the Plugins UI. Legacy aliases still work, but the canonical IDs are what you should document and store going forward.
476
+
477
+ - `manage_sessions` instead of `session_info`
478
+ - `manage_connectors` instead of `connectors`
479
+ - `http_request` instead of `http`
480
+ - `spawn_subagent` instead of `subagent`
481
+ - `manage_chatrooms` instead of `chatroom`
482
+ - `schedule_wake` instead of `schedule`
479
483
 
480
484
  ### Autonomous Capability Discovery
481
485
 
@@ -506,12 +510,53 @@ module.exports = {
506
510
  };
507
511
  ```
508
512
 
513
+ Hook signatures of note:
514
+
515
+ - `beforeToolExec({ toolName, input })` may return a replacement input object.
516
+ - `afterToolExec({ session, toolName, input, output })` observes completed tool executions.
517
+ - `transformInboundMessage({ session, text })` and `transformOutboundMessage({ session, text })` run sequentially across enabled plugins.
518
+
519
+ ### Building Plugins
520
+
521
+ The shortest reliable workflow for a new plugin:
522
+
523
+ 1. Create a focused `.js` or `.mjs` file under `data/plugins/`.
524
+ 2. Export `name`, `description`, any `hooks`, and optional `tools` / `ui.settingsFields`.
525
+ 3. Keep tool outputs structured when the agent needs to chain them into later steps.
526
+ 4. Use `settingsFields` for secrets or environment-specific values instead of hardcoding them.
527
+ 5. If the plugin needs third-party npm packages, attach a `package.json` manifest so SwarmClaw can manage it in a per-plugin workspace.
528
+ 6. Enable the plugin in **Settings → Plugins** and test both the tool path and any hook behavior.
529
+ 7. If you host it remotely, install from a stable HTTPS URL so SwarmClaw can record source metadata and update it later.
530
+
531
+ A fuller step-by-step walkthrough lives at https://swarmclaw.ai/docs/plugin-tutorial.
532
+
509
533
  ### Lifecycle Management
510
534
 
511
535
  - **Versioning**: All plugins support semantic versioning (e.g., `v1.2.3`).
512
- - **Updates**: Plugins can be updated individually or in bulk via the Plugins manager.
513
- - **Hot-Reload**: The system automatically reloads plugin logic when a file is updated or a new plugin is installed.
514
- - **Stability Guardrails**: Consecutive plugin failures are tracked in `data/plugin-failures.json`; failing plugins are auto-disabled, a warning notification is emitted in-app, and users can re-enable manually from the Plugins manager.
536
+ - **Updates**: External plugins installed from a recorded source URL can be updated individually or in bulk via the Plugins manager. Built-ins update with the app release.
537
+ - **Hot Reload**: Changes inside `data/plugins/` invalidate the plugin registry automatically, and installs/updates trigger an immediate reload.
538
+ - **Plugin Workspaces**: Plugins with a manifest are managed under `data/plugins/.workspaces/<plugin>/`, and dependency installs can be triggered from the plugin detail sheet or `POST /api/plugins/dependencies`.
539
+ - **Stability Guardrails**: Consecutive plugin failures are tracked in `data/plugin-failures.json`; failing external plugins are auto-disabled, a warning notification is emitted in-app, and users can re-enable manually from the Plugins manager.
540
+ - **Source Metadata**: Marketplace/URL installs record the normalized source URL and source hash in `data/plugins.json`.
541
+ - **Settings Safety**: Plugin settings are validated against declared `settingsFields`; unknown keys are ignored and `secret` values are stored encrypted.
542
+
543
+ ### Browser, Watch, and Delegation Upgrades
544
+
545
+ - **Persistent Browser Profiles**: The built-in `browser` plugin now keeps a reusable profile per chat/session, and subagents inherit the parent profile by default. Profiles live under `~/.swarmclaw/browser-profiles` unless you override `BROWSER_PROFILES_DIR`, so cookies, storage, and authenticated state survive longer-running work without polluting the project tree. Browser state is exposed at `GET /api/chats/[id]/browser`.
546
+ - **Higher-Level Browser Actions**: In addition to raw Playwright-style actions, `browser` supports workflow-oriented actions such as `read_page`, `extract_links`, `extract_form_fields`, `extract_table`, `fill_form`, `submit_form`, `scroll_until`, `download_file`, `complete_web_task`, `verify_text`, `verify_element`, `verify_list`, `verify_value`, `profile`, and `reset_profile`.
547
+ - **Structured Browser State**: Browser sessions persist recent observations, tabs, artifacts (screenshots / PDFs / downloads), current URL, and last errors in `browser_sessions`, which makes autonomous browser tasks easier to resume, inspect, and hand off across turns.
548
+ - **Durable Watches**: `schedule_wake` now uses persisted watch jobs instead of an in-memory timer, and `monitor_tool` supports `create_watch`, `list_watches`, `get_watch`, and `cancel_watch` across `time`, `http`, `file`, `task`, `webhook`, and `page` conditions. The same watch system also powers the new `mailbox`, session-mailbox, and approval waits used by human-loop flows. Watches support common checks like status/status sets, regex or text matches, content changes, existence checks, inbound mailbox correlation IDs, and webhook event filters.
549
+ - **Long-Running Delegation Handles**: `delegate` and `spawn_subagent` support handle-based flows instead of only synchronous final text. Use `background=true` or `waitForCompletion=false` to launch long-running work, then inspect or stop it with `action=status|list|wait|cancel`.
550
+ - **Delegation Job Persistence**: Delegate and subagent runs are recorded in `delegation_jobs` with checkpoints, backend/session metadata, resume IDs, child session IDs, and terminal-status recovery after daemon restarts. Late completions no longer overwrite cancelled jobs.
551
+
552
+ ### New Primitive Plugins
553
+
554
+ - **Mailbox / Inbox Automation**: The built-in `mailbox` plugin adds IMAP/SMTP inbox access with `status`, `list_messages`, `list_threads`, `search_messages`, `read_message`, `download_attachment`, `reply`, and `wait_for_email`. It supports durable inbound-email waits and reuses plugin settings / connector config where possible. Configure it in **Settings → Plugins** with `imapHost`, `smtpHost`, `user`, `password`, and optional reply defaults.
555
+ - **Human-in-the-Loop Requests**: The built-in `ask_human` plugin provides `request_input`, `request_approval`, `wait_for_reply`, `wait_for_approval`, `list_mailbox`, `ack_mailbox`, and `status`. It is backed by session mailbox envelopes plus approval records so agents can pause and resume on real human responses instead of polling ad hoc state.
556
+ - **Document Parsing / OCR**: The built-in `document` plugin adds `read`, `metadata`, `ocr`, `extract_tables`, `store`, `list`, `search`, `get`, and `delete`. It uses the shared document extraction helpers for PDFs, Office docs, OCR-able images, HTML, CSV/TSV/XLSX, ZIP inspection, and plain text files.
557
+ - **Schema-Driven Extraction**: The built-in `extract` plugin adds `extract_structured` and `summarize`, using the current session model/provider to turn raw text or local files into validated JSON objects. This is the primitive to combine with browser / document / crawl output when an agent needs structured records instead of prose.
558
+ - **Tabular Data Operations**: The built-in `table` plugin adds `read`, `load_csv`, `load_xlsx`, `summarize`, `filter`, `sort`, `group`, `pivot`, `dedupe`, `join`, and `write`. It operates on CSV, TSV, JSON array-of-objects, or XLSX inputs without forcing agents to drop into shell or Python for basic spreadsheet work, and transformed tables can be persisted with `outputPath` / `saveTo`.
559
+ - **Multi-Page Crawling**: The built-in `crawl` plugin adds `crawl_site`, `follow_pagination`, `extract_sitemap`, `dedupe_pages`, and `batch_extract`. It handles BFS-style same-origin site traversal, accepts either a fresh start URL or an explicit page list, and can hand the aggregate page set directly into structured extraction for research-heavy autonomous tasks.
515
560
 
516
561
  ## Deploy to a VPS
517
562
 
@@ -612,8 +657,8 @@ npm run update:easy # safe update helper for local installs
612
657
  SwarmClaw uses tag-based releases (`vX.Y.Z`) as the stable channel.
613
658
 
614
659
  ```bash
615
- # example minor release (v0.7.0 style)
616
- npm version minor
660
+ # example patch release (v0.7.3 style)
661
+ npm version patch
617
662
  git push origin main --follow-tags
618
663
  ```
619
664
 
@@ -622,19 +667,22 @@ On `v*` tags, GitHub Actions will:
622
667
  2. Create a GitHub Release
623
668
  3. Build and publish Docker images to `ghcr.io/swarmclawai/swarmclaw` (`:vX.Y.Z`, `:latest`, `:sha-*`)
624
669
 
625
- #### v0.7.0 Release Readiness Notes
670
+ #### v0.7.3 Release Readiness Notes
626
671
 
627
- Before shipping `v0.7.0`, confirm the following user-facing changes are reflected in docs:
672
+ Before shipping `v0.7.3`, confirm the following user-facing changes are reflected in docs:
628
673
 
629
- 1. Plugins UI now shows richer installed plugin details (description fallback, source/status, capability badges, and clearer detail sheet metadata).
630
- 2. Marketplace plugin installs normalize legacy URLs from `swarmclawai/plugins` to `swarmclawai/swarmforge` to avoid 404 installs.
631
- 3. Hydration fixes removed nested `<button>` structures in list-card UIs (Plugins, Providers, Secrets, MCP Servers).
632
- 4. Clipboard actions now use a browser-safe fallback when `navigator.clipboard` is unavailable.
633
- 5. Site docs/release notes are updated in `swarmclaw-site` (especially `content/docs/plugins.md`, `content/docs/release-notes.md`, and `public/registry/plugins.json`).
674
+ 1. New primitive plugins are documented in README and site docs: `mailbox`, `ask_human`, `document`, `extract`, `table`, and `crawl`.
675
+ 2. Browser persistence, higher-level browser actions, durable watch jobs, and delegation handles are covered in docs.
676
+ 3. Plugin docs mention canonical built-in IDs, source-backed installs/updates, hot reload, and encrypted `secret` settings.
677
+ 4. Plugin docs cover per-plugin workspaces and dependency installs for plugins that ship with a `package.json` manifest.
678
+ 5. Connector docs and CLI docs cover the connector doctor diagnostics endpoints/commands.
679
+ 6. The plugin tutorial reflects the current hook behavior, including `beforeToolExec` input rewriting and `settingsFields`.
680
+ 7. Site install/version strings are updated to `v0.7.3`, including the release notes index, install snippets, and sidebar footer.
681
+ 8. Provider docs mention that configured OpenAI models can populate the model dropdown while still allowing custom/manual entries.
634
682
 
635
683
  ## CLI
636
684
 
637
- SwarmClaw ships a built-in CLI for core operational workflows:
685
+ SwarmClaw ships a built-in CLI for setup and day-to-day operations.
638
686
 
639
687
  ```bash
640
688
  # show command help
@@ -644,80 +692,37 @@ npm run cli -- --help
644
692
  node ./bin/swarmclaw.js --help
645
693
  ```
646
694
 
647
- ### Usage
695
+ Primary groups:
696
+ - `chats` (canonical)
697
+ - `tasks`
698
+ - `schedules`
699
+ - `chatrooms`
700
+ - `connectors`
701
+ - `memory`
702
+ - `setup`
648
703
 
649
- ```bash
650
- swarmclaw [global-options] <group> <command> [command-options]
651
- ```
652
-
653
- ### Global Options
704
+ Legacy note: some compatibility paths still accept `sessions`, but `chats` is the canonical command group.
654
705
 
655
- | Flag | Description |
656
- |-|-|
657
- | `--base-url <url>` | API base URL (default: `http://localhost:3456`) |
658
- | `--access-key <key>` | Access key override (else `SWARMCLAW_API_KEY` or `platform-api-key.txt`) |
659
- | `--data <json\|@file\|->` | Request JSON body |
660
- | `--query key=value` | Query parameter (repeatable) |
661
- | `--header key=value` | Extra HTTP header (repeatable) |
662
- | `--json` | Compact JSON output |
663
- | `--wait` | Wait for run/task completion when IDs are returned |
664
- | `--timeout-ms <ms>` | Request/wait timeout (default `300000`) |
665
- | `--interval-ms <ms>` | Poll interval for `--wait` (default `2000`) |
666
- | `--out <file>` | Write binary response to file |
667
-
668
- Routing note: `swarmclaw` uses a hybrid router. Some legacy rich commands still support `-u/--url`, `-k/--key`, and `--raw`; mapped API commands use the options above.
669
-
670
- ### Command Groups
671
-
672
- Run `swarmclaw --help` to list all groups and commands (the list evolves as APIs are added).
673
- Notable setup/operations groups include:
674
-
675
- | Group | Purpose |
676
- |-|-|
677
- | `setup` | Setup helpers like provider checks and `doctor` diagnostics |
678
- | `version` | Version status and update helpers |
679
- | `sessions` | Session lifecycle, chat, browser/devserver controls, mailbox |
680
- | `chatrooms` | Multi-agent chatrooms (members, reactions, streamed room chat) |
681
- | `memory` | Memory CRUD and maintenance utilities |
682
- | `notifications` | In-app notification listing and read-state controls |
683
-
684
- ### Examples
706
+ Quick examples:
685
707
 
686
708
  ```bash
687
709
  # list agents
688
710
  swarmclaw agents list
689
711
 
690
- # get agent details
691
- swarmclaw agents get <agentId>
712
+ # create and inspect a chat
713
+ swarmclaw chats create --name "Main Ops" --agent-id <agentId>
714
+ swarmclaw chats list
692
715
 
693
- # create a task
694
- swarmclaw tasks create --title "Fix flaky CI test" --description "Stabilize retry logic" --agent-id <agentId>
716
+ # run a main loop action
717
+ swarmclaw chats main-loop-action <chatId> --data '{"action":"nudge"}'
695
718
 
696
719
  # run setup diagnostics
697
720
  swarmclaw setup doctor
698
-
699
- # interactive setup (walks through provider selection, supports multiple providers)
700
- swarmclaw setup init
701
-
702
- # or non-interactive setup with flags
703
- swarmclaw setup init --provider openai --api-key "$OPENAI_API_KEY"
704
-
705
- # run memory maintenance analysis
706
- swarmclaw memory maintenance
707
-
708
- # list chatrooms
709
- swarmclaw chatrooms list
710
-
711
- # send a room message and stream agent replies
712
- swarmclaw chatrooms chat <chatroomId> --data '{"text":"@all status update?"}'
713
-
714
- # react to a room message
715
- swarmclaw chatrooms react <chatroomId> --data '{"messageId":"<messageId>","emoji":"👍"}'
716
-
717
- # pin/unpin a room message
718
- swarmclaw chatrooms pin <chatroomId> --data '{"messageId":"<messageId>"}'
719
721
  ```
720
722
 
723
+ Full reference (groups, commands, and options):
724
+ - https://swarmclaw.ai/docs/cli
725
+
721
726
  ## Credits
722
727
 
723
728
  - Inspired by [OpenClaw](https://github.com/openclaw)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swarmclawai/swarmclaw",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "Self-hosted AI agent orchestration dashboard — manage LLM providers, orchestrate agent swarms, schedule tasks, and bridge agents to chat platforms.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -11,17 +11,43 @@ export async function PUT(req: Request, { params }: { params: Promise<{ id: stri
11
11
  const body = await req.json()
12
12
  const result = mutateItem(ops, id, (agent) => {
13
13
  Object.assign(agent, body, { updatedAt: Date.now() })
14
+ if (body.platformAssignScope === 'all' || body.platformAssignScope === 'self') {
15
+ agent.platformAssignScope = body.platformAssignScope
16
+ agent.isOrchestrator = body.platformAssignScope === 'all'
17
+ } else if (agent.platformAssignScope === 'all' || agent.platformAssignScope === 'self') {
18
+ agent.isOrchestrator = agent.platformAssignScope === 'all'
19
+ }
14
20
  if (body.apiEndpoint !== undefined) {
15
21
  agent.apiEndpoint = normalizeProviderEndpoint(
16
22
  body.provider || agent.provider,
17
23
  body.apiEndpoint,
18
24
  )
19
25
  }
26
+ delete (agent as Record<string, unknown>).isOrchestrator
27
+ agent.isOrchestrator = agent.platformAssignScope === 'all'
20
28
  delete (agent as Record<string, unknown>).id
21
29
  agent.id = id
22
30
  return agent
23
31
  })
24
32
  if (!result) return notFound()
33
+
34
+ if (result.threadSessionId) {
35
+ const sessions = loadSessions()
36
+ const shortcut = sessions[result.threadSessionId]
37
+ if (shortcut) {
38
+ let changed = false
39
+ if (shortcut.name !== result.name) {
40
+ shortcut.name = result.name
41
+ changed = true
42
+ }
43
+ if (shortcut.shortcutForAgentId !== id) {
44
+ shortcut.shortcutForAgentId = id
45
+ changed = true
46
+ }
47
+ if (changed) saveSessions(sessions)
48
+ }
49
+ }
50
+
25
51
  logActivity({ entityType: 'agent', entityId: id, action: 'updated', actor: 'user', summary: `Agent updated: "${result.name}"` })
26
52
  return NextResponse.json(result)
27
53
  }