@hybridaione/hybridclaw 0.4.3 → 0.6.0

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 (256) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +167 -2
  3. package/config.example.json +58 -1
  4. package/container/Dockerfile +10 -1
  5. package/container/dist/approval-policy.js +180 -36
  6. package/container/dist/approval-policy.js.map +1 -1
  7. package/container/dist/artifacts.js +83 -0
  8. package/container/dist/artifacts.js.map +1 -0
  9. package/container/dist/browser-tools.js +69 -21
  10. package/container/dist/browser-tools.js.map +1 -1
  11. package/container/dist/extensions.js.map +1 -1
  12. package/container/dist/index.js +161 -96
  13. package/container/dist/index.js.map +1 -1
  14. package/container/dist/mcp/client-manager.js +443 -0
  15. package/container/dist/mcp/client-manager.js.map +1 -0
  16. package/container/dist/mcp/config-watcher.js +47 -0
  17. package/container/dist/mcp/config-watcher.js.map +1 -0
  18. package/container/dist/mcp/tool-classifier.js +74 -0
  19. package/container/dist/mcp/tool-classifier.js.map +1 -0
  20. package/container/dist/mcp/types.js +2 -0
  21. package/container/dist/mcp/types.js.map +1 -0
  22. package/container/dist/model-client.js +14 -0
  23. package/container/dist/model-client.js.map +1 -1
  24. package/container/dist/model-retry.js +19 -4
  25. package/container/dist/model-retry.js.map +1 -1
  26. package/container/dist/providers/local-ollama.js +258 -0
  27. package/container/dist/providers/local-ollama.js.map +1 -0
  28. package/container/dist/providers/local-openai-compat.js +512 -0
  29. package/container/dist/providers/local-openai-compat.js.map +1 -0
  30. package/container/dist/providers/shared.js +17 -1
  31. package/container/dist/providers/shared.js.map +1 -1
  32. package/container/dist/providers/thinking-extractor.js +93 -0
  33. package/container/dist/providers/thinking-extractor.js.map +1 -0
  34. package/container/dist/providers/tool-call-normalizer.js +603 -0
  35. package/container/dist/providers/tool-call-normalizer.js.map +1 -0
  36. package/container/dist/runtime-capabilities.js +40 -0
  37. package/container/dist/runtime-capabilities.js.map +1 -0
  38. package/container/dist/stalled-turns.js +8 -0
  39. package/container/dist/stalled-turns.js.map +1 -0
  40. package/container/dist/system-messages.js +56 -0
  41. package/container/dist/system-messages.js.map +1 -0
  42. package/container/dist/tool-loop-detection.js +192 -0
  43. package/container/dist/tool-loop-detection.js.map +1 -0
  44. package/container/dist/tools.js +825 -722
  45. package/container/dist/tools.js.map +1 -1
  46. package/container/package-lock.json +1015 -7
  47. package/container/package.json +3 -1
  48. package/container/src/approval-policy.ts +198 -37
  49. package/container/src/artifacts.ts +111 -0
  50. package/container/src/browser-tools.ts +82 -23
  51. package/container/src/extensions.ts +4 -0
  52. package/container/src/index.ts +219 -89
  53. package/container/src/mcp/client-manager.ts +607 -0
  54. package/container/src/mcp/config-watcher.ts +66 -0
  55. package/container/src/mcp/tool-classifier.ts +78 -0
  56. package/container/src/mcp/types.ts +34 -0
  57. package/container/src/model-client.ts +20 -0
  58. package/container/src/model-retry.ts +27 -4
  59. package/container/src/providers/local-ollama.ts +374 -0
  60. package/container/src/providers/local-openai-compat.ts +674 -0
  61. package/container/src/providers/shared.ts +28 -2
  62. package/container/src/providers/thinking-extractor.ts +116 -0
  63. package/container/src/providers/tool-call-normalizer.ts +751 -0
  64. package/container/src/runtime-capabilities.ts +63 -0
  65. package/container/src/stalled-turns.ts +12 -0
  66. package/container/src/system-messages.ts +63 -0
  67. package/container/src/tool-loop-detection.ts +241 -0
  68. package/container/src/tools.ts +238 -90
  69. package/container/src/types.ts +13 -1
  70. package/dist/agent/prompt-hooks.d.ts +1 -0
  71. package/dist/agent/prompt-hooks.d.ts.map +1 -1
  72. package/dist/agent/prompt-hooks.js +29 -5
  73. package/dist/agent/prompt-hooks.js.map +1 -1
  74. package/dist/agent/tool-summary.d.ts.map +1 -1
  75. package/dist/agent/tool-summary.js +10 -1
  76. package/dist/agent/tool-summary.js.map +1 -1
  77. package/dist/channels/discord/approval-buttons.d.ts +8 -0
  78. package/dist/channels/discord/approval-buttons.d.ts.map +1 -0
  79. package/dist/channels/discord/approval-buttons.js +40 -0
  80. package/dist/channels/discord/approval-buttons.js.map +1 -0
  81. package/dist/channels/discord/attachments.d.ts.map +1 -1
  82. package/dist/channels/discord/attachments.js +53 -0
  83. package/dist/channels/discord/attachments.js.map +1 -1
  84. package/dist/channels/discord/debounce.js +1 -1
  85. package/dist/channels/discord/debounce.js.map +1 -1
  86. package/dist/channels/discord/delivery.d.ts +12 -5
  87. package/dist/channels/discord/delivery.d.ts.map +1 -1
  88. package/dist/channels/discord/delivery.js +10 -6
  89. package/dist/channels/discord/delivery.js.map +1 -1
  90. package/dist/channels/discord/inbound.d.ts.map +1 -1
  91. package/dist/channels/discord/inbound.js +2 -0
  92. package/dist/channels/discord/inbound.js.map +1 -1
  93. package/dist/channels/discord/prompt-adapter.d.ts.map +1 -1
  94. package/dist/channels/discord/prompt-adapter.js +1 -0
  95. package/dist/channels/discord/prompt-adapter.js.map +1 -1
  96. package/dist/channels/discord/runtime.d.ts +10 -2
  97. package/dist/channels/discord/runtime.d.ts.map +1 -1
  98. package/dist/channels/discord/runtime.js +203 -216
  99. package/dist/channels/discord/runtime.js.map +1 -1
  100. package/dist/channels/discord/send-files.d.ts +8 -0
  101. package/dist/channels/discord/send-files.d.ts.map +1 -0
  102. package/dist/channels/discord/send-files.js +65 -0
  103. package/dist/channels/discord/send-files.js.map +1 -0
  104. package/dist/channels/discord/slash-commands.d.ts +34 -0
  105. package/dist/channels/discord/slash-commands.d.ts.map +1 -0
  106. package/dist/channels/discord/slash-commands.js +596 -0
  107. package/dist/channels/discord/slash-commands.js.map +1 -0
  108. package/dist/channels/discord/stream.d.ts.map +1 -1
  109. package/dist/channels/discord/stream.js +4 -1
  110. package/dist/channels/discord/stream.js.map +1 -1
  111. package/dist/channels/discord/tool-actions.d.ts +4 -1
  112. package/dist/channels/discord/tool-actions.d.ts.map +1 -1
  113. package/dist/channels/discord/tool-actions.js +14 -5
  114. package/dist/channels/discord/tool-actions.js.map +1 -1
  115. package/dist/cli.d.ts.map +1 -1
  116. package/dist/cli.js +204 -2
  117. package/dist/cli.js.map +1 -1
  118. package/dist/config/config.d.ts +17 -0
  119. package/dist/config/config.d.ts.map +1 -1
  120. package/dist/config/config.js +34 -0
  121. package/dist/config/config.js.map +1 -1
  122. package/dist/config/runtime-config.d.ts +5 -1
  123. package/dist/config/runtime-config.d.ts.map +1 -1
  124. package/dist/config/runtime-config.js +165 -2
  125. package/dist/config/runtime-config.js.map +1 -1
  126. package/dist/gateway/approval-confirmation.d.ts +3 -0
  127. package/dist/gateway/approval-confirmation.d.ts.map +1 -0
  128. package/dist/gateway/approval-confirmation.js +34 -0
  129. package/dist/gateway/approval-confirmation.js.map +1 -0
  130. package/dist/gateway/gateway-service.d.ts +4 -0
  131. package/dist/gateway/gateway-service.d.ts.map +1 -1
  132. package/dist/gateway/gateway-service.js +316 -15
  133. package/dist/gateway/gateway-service.js.map +1 -1
  134. package/dist/gateway/gateway-types.d.ts +11 -0
  135. package/dist/gateway/gateway-types.d.ts.map +1 -1
  136. package/dist/gateway/gateway-types.js.map +1 -1
  137. package/dist/gateway/gateway.js +95 -45
  138. package/dist/gateway/gateway.js.map +1 -1
  139. package/dist/gateway/health.d.ts.map +1 -1
  140. package/dist/gateway/health.js +141 -5
  141. package/dist/gateway/health.js.map +1 -1
  142. package/dist/gateway/pending-approvals.d.ts +39 -0
  143. package/dist/gateway/pending-approvals.d.ts.map +1 -0
  144. package/dist/gateway/pending-approvals.js +84 -0
  145. package/dist/gateway/pending-approvals.js.map +1 -0
  146. package/dist/gateway/reset-confirmation.d.ts +16 -0
  147. package/dist/gateway/reset-confirmation.d.ts.map +1 -0
  148. package/dist/gateway/reset-confirmation.js +49 -0
  149. package/dist/gateway/reset-confirmation.js.map +1 -0
  150. package/dist/infra/container-runner.d.ts.map +1 -1
  151. package/dist/infra/container-runner.js +29 -13
  152. package/dist/infra/container-runner.js.map +1 -1
  153. package/dist/infra/host-runner.d.ts.map +1 -1
  154. package/dist/infra/host-runner.js +27 -13
  155. package/dist/infra/host-runner.js.map +1 -1
  156. package/dist/infra/ipc.d.ts +16 -0
  157. package/dist/infra/ipc.d.ts.map +1 -1
  158. package/dist/infra/ipc.js +37 -6
  159. package/dist/infra/ipc.js.map +1 -1
  160. package/dist/infra/worker-signature.d.ts +9 -0
  161. package/dist/infra/worker-signature.d.ts.map +1 -0
  162. package/dist/infra/worker-signature.js +15 -0
  163. package/dist/infra/worker-signature.js.map +1 -0
  164. package/dist/logger.d.ts.map +1 -1
  165. package/dist/logger.js +56 -7
  166. package/dist/logger.js.map +1 -1
  167. package/dist/model-selection.d.ts +3 -0
  168. package/dist/model-selection.d.ts.map +1 -0
  169. package/dist/model-selection.js +18 -0
  170. package/dist/model-selection.js.map +1 -0
  171. package/dist/onboarding.d.ts.map +1 -1
  172. package/dist/onboarding.js +13 -1
  173. package/dist/onboarding.js.map +1 -1
  174. package/dist/providers/factory.d.ts.map +1 -1
  175. package/dist/providers/factory.js +15 -9
  176. package/dist/providers/factory.js.map +1 -1
  177. package/dist/providers/local-discovery.d.ts +18 -0
  178. package/dist/providers/local-discovery.d.ts.map +1 -0
  179. package/dist/providers/local-discovery.js +311 -0
  180. package/dist/providers/local-discovery.js.map +1 -0
  181. package/dist/providers/local-health.d.ts +10 -0
  182. package/dist/providers/local-health.d.ts.map +1 -0
  183. package/dist/providers/local-health.js +163 -0
  184. package/dist/providers/local-health.js.map +1 -0
  185. package/dist/providers/local-ollama.d.ts +3 -0
  186. package/dist/providers/local-ollama.d.ts.map +1 -0
  187. package/dist/providers/local-ollama.js +46 -0
  188. package/dist/providers/local-ollama.js.map +1 -0
  189. package/dist/providers/local-openai-compat.d.ts +4 -0
  190. package/dist/providers/local-openai-compat.d.ts.map +1 -0
  191. package/dist/providers/local-openai-compat.js +55 -0
  192. package/dist/providers/local-openai-compat.js.map +1 -0
  193. package/dist/providers/local-types.d.ts +60 -0
  194. package/dist/providers/local-types.d.ts.map +1 -0
  195. package/dist/providers/local-types.js +2 -0
  196. package/dist/providers/local-types.js.map +1 -0
  197. package/dist/providers/model-catalog.d.ts +6 -0
  198. package/dist/providers/model-catalog.d.ts.map +1 -0
  199. package/dist/providers/model-catalog.js +35 -0
  200. package/dist/providers/model-catalog.js.map +1 -0
  201. package/dist/providers/types.d.ts +6 -2
  202. package/dist/providers/types.d.ts.map +1 -1
  203. package/dist/scheduler/heartbeat.d.ts.map +1 -1
  204. package/dist/scheduler/heartbeat.js +18 -7
  205. package/dist/scheduler/heartbeat.js.map +1 -1
  206. package/dist/scheduler/scheduled-task-runner.d.ts.map +1 -1
  207. package/dist/scheduler/scheduled-task-runner.js +3 -1
  208. package/dist/scheduler/scheduled-task-runner.js.map +1 -1
  209. package/dist/session/session-maintenance.d.ts.map +1 -1
  210. package/dist/session/session-maintenance.js +9 -1
  211. package/dist/session/session-maintenance.js.map +1 -1
  212. package/dist/skills/skills.d.ts +1 -1
  213. package/dist/skills/skills.d.ts.map +1 -1
  214. package/dist/skills/skills.js +107 -12
  215. package/dist/skills/skills.js.map +1 -1
  216. package/dist/tui-slash-command.d.ts +6 -0
  217. package/dist/tui-slash-command.d.ts.map +1 -0
  218. package/dist/tui-slash-command.js +26 -0
  219. package/dist/tui-slash-command.js.map +1 -0
  220. package/dist/tui.js +46 -13
  221. package/dist/tui.js.map +1 -1
  222. package/dist/types.d.ts +16 -1
  223. package/dist/types.d.ts.map +1 -1
  224. package/dist/types.js.map +1 -1
  225. package/dist/workspace.d.ts +10 -1
  226. package/dist/workspace.d.ts.map +1 -1
  227. package/dist/workspace.js +29 -0
  228. package/dist/workspace.js.map +1 -1
  229. package/docs/CNAME +1 -0
  230. package/docs/chat.html +130 -2
  231. package/docs/development/runtime.md +92 -0
  232. package/docs/development/skills.md +1 -0
  233. package/docs/index.html +14 -14
  234. package/package.json +7 -2
  235. package/skills/docx/SKILL.md +93 -0
  236. package/skills/docx/scripts/accept_changes.cjs +114 -0
  237. package/skills/docx/scripts/comment.cjs +418 -0
  238. package/skills/office/SKILL.md +14 -0
  239. package/skills/office/helpers/merge_runs.cjs +134 -0
  240. package/skills/office/helpers/simplify_redlines.cjs +76 -0
  241. package/skills/office/pack.cjs +214 -0
  242. package/skills/office/soffice.cjs +245 -0
  243. package/skills/office/templates/.gitkeep +1 -0
  244. package/skills/office/unpack.cjs +191 -0
  245. package/skills/office/validate.cjs +348 -0
  246. package/skills/office/xml.cjs +195 -0
  247. package/skills/office-workflows/SKILL.md +51 -0
  248. package/skills/pptx/SKILL.md +75 -0
  249. package/skills/pptx/editing.md +44 -0
  250. package/skills/pptx/pptxgenjs.md +95 -0
  251. package/skills/pptx/scripts/thumbnail.cjs +189 -0
  252. package/skills/xlsx/SKILL.md +99 -0
  253. package/skills/xlsx/references/financial-modeling.md +33 -0
  254. package/skills/xlsx/scripts/import_delimited.cjs +338 -0
  255. package/skills/xlsx/scripts/recalc.cjs +15 -0
  256. package/skills/repo-orientation/SKILL.md +0 -74
package/CHANGELOG.md CHANGED
@@ -2,6 +2,53 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.6.0](https://github.com/HybridAIOne/hybridclaw/tree/v0.6.0)
6
+
7
+ ### Added
8
+
9
+ - **Local LLM provider support**: Added Ollama, LM Studio, and vLLM as local
10
+ backends with `hybridclaw local configure|status`, auto-discovery of running
11
+ instances, health monitoring, model catalog management, thinking extraction,
12
+ and tool-call normalization for small local models.
13
+ - **Session reset flow**: Added `reset [yes|no]` across gateway/TUI and Discord
14
+ slash commands so a session can clear history, restore per-session
15
+ model/chatbot/RAG defaults, and remove the active agent workspace after
16
+ confirmation.
17
+ - **Activity-based agent timeout**: The IPC read timeout now resets on agent
18
+ activity (text deltas, tool progress) instead of using a fixed wall clock,
19
+ so slow local models making steady progress are not killed prematurely.
20
+
21
+ ### Fixed
22
+
23
+ - **Host sandbox `/workspace` references**: System prompt skill locations and
24
+ tool guidance now use real filesystem paths when `sandbox=host` instead of
25
+ the container-only `/workspace` mount path that does not exist on the host.
26
+ - **Local provider session stability**: Pooled workers now restart when backend
27
+ targets or auth signatures change, recreated workspaces clear stale session
28
+ transcript state, and missing workspace approval policies are bootstrapped
29
+ reliably.
30
+ - **Session compaction budget accuracy**: Auto-compaction now counts system
31
+ prompt tokens instead of only message and summary tokens, so compaction
32
+ triggers at the configured threshold.
33
+ - **Misleading timeout error message**: Changed "Timeout waiting for container
34
+ output" to "Timeout waiting for agent output" since the same IPC mechanism
35
+ is used by both host and container runners.
36
+
37
+ ## [0.5.0](https://github.com/HybridAIOne/hybridclaw/tree/v0.5.0)
38
+
39
+ ### Added
40
+
41
+ - **Model Context Protocol support**: Added runtime `mcpServers` config plus container MCP client loading so HybridClaw can expose configured MCP servers as namespaced tools, with TUI `/mcp list|add|toggle|remove|reconnect` management commands.
42
+ - **Discord slash command control plane**: Added global Discord slash commands for status, approvals, compaction, channel policy, model/bot selection, RAG, Ralph loop, MCP management, usage, export, sessions, audit, and scheduling, with private approval responses.
43
+ - **Bundled office document skills**: Added `docx`, `xlsx`, `pptx`, and `office-workflows` bundled skills plus shared office helper scripts for OOXML pack/unpack, tracked-change cleanup, spreadsheet import/recalc, and presentation thumbnail QA.
44
+ - **Authenticated artifact downloads**: Added gateway `/api/artifact` serving for generated agent artifacts and cached Discord media so the web chat can render previews and download generated office outputs safely.
45
+
46
+ ### Changed
47
+
48
+ - **Runtime capability guidance**: Prompt/tool summaries now group MCP tools cleanly and add office-file guardrails so models avoid fake binary placeholders and follow document QA workflows.
49
+ - **Discord delivery workflow**: The Discord `message` tool now supports native local-file uploads via `filePath`, and runtime delivery/register flows better handle workspace files, `/discord-media-cache`, and DM-visible global slash commands.
50
+ - **Documentation and examples**: README, runtime docs, and built-in web/chat surfaces now document MCP setup, bundled office skills, and artifact handling for the new workflows.
51
+
5
52
  ## [0.4.3](https://github.com/HybridAIOne/hybridclaw/tree/v0.4.3)
6
53
 
7
54
  ### Added
package/README.md CHANGED
@@ -61,6 +61,9 @@ hybridclaw gateway
61
61
  # Or run gateway in foreground in this terminal
62
62
  hybridclaw gateway start --foreground
63
63
 
64
+ # For stdio MCP servers that rely on host tools like `docker` or `npx`
65
+ hybridclaw gateway start --foreground --sandbox=host
66
+
64
67
  # If DISCORD_TOKEN is set, gateway auto-connects to Discord.
65
68
 
66
69
  # Start terminal adapter (optional, in a second terminal)
@@ -142,16 +145,171 @@ HybridClaw creates `~/.hybridclaw/config.json` on first run and hot-reloads most
142
145
  - HybridClaw does not keep runtime state in the current working directory. If `./.env` exists, supported secrets are migrated once into `~/.hybridclaw/credentials.json`.
143
146
  - `container.*` controls execution isolation, including `sandboxMode`, `memory`, `memorySwap`, `cpus`, `network`, `binds`, and additional mounts.
144
147
  - Use `container.binds` for explicit host-to-container mounts in `host:container[:ro|rw]` format. Mounted paths appear inside the sandbox under `/workspace/extra/<container>`.
148
+ - `mcpServers.*` declares Model Context Protocol servers that HybridClaw connects to per session and exposes as namespaced tools (`server__tool`).
149
+ - `mcpServers.*.env` and `mcpServers.*.headers` are currently written to `~/.hybridclaw/config.json` as plain text. Use low-privilege tokens only, set `chmod 700 ~/.hybridclaw && chmod 600 ~/.hybridclaw/config.json`, and prefer `host` sandbox mode for stdio MCP servers that depend on host-installed tools.
145
150
  - Keep HybridAI secrets in `~/.hybridclaw/credentials.json` (`HYBRIDAI_API_KEY` required for HybridAI models, `DISCORD_TOKEN` optional). Codex OAuth sessions are stored separately in `~/.hybridclaw/codex-auth.json`.
146
151
  - Trust-model acceptance is stored in `~/.hybridclaw/config.json` under `security.*` and is required before runtime starts.
147
152
  - See [TRUST_MODEL.md](./TRUST_MODEL.md) for onboarding acceptance policy and [SECURITY.md](./SECURITY.md) for technical security guidelines.
148
153
  - For contributor workflow, see [CONTRIBUTING.md](./CONTRIBUTING.md). For deeper runtime, skills, release, and maintainer reference docs, see [docs/development/README.md](./docs/development/README.md).
149
154
 
155
+ ## Local Provider Quickstart (LM Studio Example)
156
+
157
+ If LM Studio is running locally and serving `qwen/qwen3.5-9b` on
158
+ `http://127.0.0.1:1234`, use this setup:
159
+
160
+ 1. Configure HybridClaw for LM Studio:
161
+
162
+ ```bash
163
+ hybridclaw local configure lmstudio qwen/qwen3.5-9b --base-url http://127.0.0.1:1234
164
+ ```
165
+
166
+ This enables local providers, enables the LM Studio backend, normalizes the
167
+ URL to `http://127.0.0.1:1234/v1`, and sets the default model to
168
+ `lmstudio/qwen/qwen3.5-9b`.
169
+
170
+ 2. Restart the gateway in host sandbox mode:
171
+
172
+ ```bash
173
+ hybridclaw gateway restart --foreground --sandbox=host
174
+ ```
175
+
176
+ If the gateway is not running yet, use:
177
+
178
+ ```bash
179
+ hybridclaw gateway start --foreground --sandbox=host
180
+ ```
181
+
182
+ 3. Check that HybridClaw can see LM Studio:
183
+
184
+ ```bash
185
+ hybridclaw gateway status
186
+ ```
187
+
188
+ Look for `localBackends.lmstudio.reachable: true`.
189
+
190
+ You can also inspect the saved local backend config directly:
191
+
192
+ ```bash
193
+ hybridclaw local status
194
+ ```
195
+
196
+ 4. Start the TUI:
197
+
198
+ ```bash
199
+ hybridclaw tui
200
+ ```
201
+
202
+ In the TUI, run:
203
+
204
+ ```text
205
+ /model list
206
+ /model set lmstudio/qwen/qwen3.5-9b
207
+ /model info
208
+ ```
209
+
210
+ Then send a normal prompt.
211
+
212
+ If you want to configure the backend without changing your global default model,
213
+ use:
214
+
215
+ ```bash
216
+ hybridclaw local configure lmstudio qwen/qwen3.5-9b --base-url http://127.0.0.1:1234 --no-default
217
+ ```
218
+
219
+ Other backends use the same flow:
220
+
221
+ ```bash
222
+ hybridclaw local configure ollama llama3.2
223
+ hybridclaw local configure vllm mistralai/Mistral-7B-Instruct-v0.3 --base-url http://127.0.0.1:8000 --api-key secret
224
+ ```
225
+
226
+ Restart the gateway in `--sandbox=host`, then confirm reachability with
227
+ `hybridclaw gateway status`.
228
+
229
+ Notes:
230
+
231
+ - LM Studio often shows its server as `http://127.0.0.1:1234`, but HybridClaw
232
+ should be configured with `http://127.0.0.1:1234/v1`.
233
+ - Qwen models on LM Studio use the OpenAI-compatible `/v1` API with Qwen tool
234
+ and thinking compatibility enabled automatically.
235
+ - For agent mode, load at least `16k` context in LM Studio. `32k` is the safer
236
+ default for longer sessions and tool use.
237
+ - The TUI `/model` picker and Discord `/model` slash command choices are built
238
+ from the live gateway model list, so restart the gateway after enabling a new
239
+ local backend or loading a different local model.
240
+
241
+ ## TUI MCP Quickstart
242
+
243
+ For stdio MCP servers that use host binaries such as `docker`, `node`, or
244
+ `npx`, start the gateway in host mode:
245
+
246
+ ```bash
247
+ hybridclaw gateway start --foreground --sandbox=host
248
+ hybridclaw tui
249
+ ```
250
+
251
+ In the TUI, use the MCP slash commands directly:
252
+
253
+ ```text
254
+ /mcp list
255
+ /mcp add filesystem {"transport":"stdio","command":"npx","args":["-y","@modelcontextprotocol/server-filesystem","/Users/you/project"],"enabled":true}
256
+ /mcp toggle filesystem
257
+ /mcp reconnect filesystem
258
+ /mcp remove filesystem
259
+ ```
260
+
261
+ Once a server is enabled, its tools appear in prompts as namespaced tool names
262
+ such as `filesystem__read_file` or `github__list_issues`.
263
+
150
264
  ## Bundled Skills
151
265
 
152
266
  - `pdf` is bundled and supports text extraction, page rendering, fillable form inspection/filling, and non-fillable overlay workflows.
267
+ - `xlsx` is bundled for spreadsheet creation, formula-safe editing, CSV/TSV cleanup, and LibreOffice-backed recalculation.
268
+ - `docx` is bundled for Word document creation plus OOXML unpack/edit/pack workflows, comments, and tracked-change cleanup.
269
+ - `pptx` is bundled for presentation creation with `pptxgenjs`, template-preserving OOXML edits, and thumbnail-based visual QA.
270
+ - `office-workflows` is bundled for cross-format tasks such as CSV to XLSX cleanup and XLSX to PPTX or DOCX deliverables coordinated with delegation.
153
271
  - Use `hybridclaw skill list` to inspect available installers and `hybridclaw skill install pdf [install-id]` when a bundled skill advertises optional setup helpers.
154
272
 
273
+ ## Optional Office Dependencies
274
+
275
+ When you run HybridClaw in the default container sandbox, the bundled office image already includes the main office tooling. These installs matter primarily for `--sandbox=host` workflows or when you want the same capabilities on your local machine.
276
+
277
+ What they unlock:
278
+
279
+ - LibreOffice (`soffice`) enables Office-to-PDF export, PPTX visual QA, and XLSX formula recalculation.
280
+ - Poppler (`pdftoppm`) enables slide/page thumbnail rendering for PPTX visual QA.
281
+ - Pandoc improves document conversion workflows around DOCX and Markdown.
282
+
283
+ macOS:
284
+
285
+ ```bash
286
+ brew install --cask libreoffice
287
+ brew install poppler pandoc
288
+ ```
289
+
290
+ Ubuntu / Debian:
291
+
292
+ ```bash
293
+ sudo apt-get update
294
+ sudo apt-get install -y libreoffice poppler-utils pandoc
295
+ ```
296
+
297
+ Fedora:
298
+
299
+ ```bash
300
+ sudo dnf install -y libreoffice poppler-utils pandoc
301
+ ```
302
+
303
+ Verify availability:
304
+
305
+ ```bash
306
+ sh -lc 'command -v soffice >/dev/null 2>&1 || command -v libreoffice >/dev/null 2>&1 && echo soffice_ok'
307
+ sh -lc 'command -v pdftoppm >/dev/null 2>&1 && echo pdftoppm_ok'
308
+ sh -lc 'command -v pandoc >/dev/null 2>&1 && echo pandoc_ok'
309
+ ```
310
+
311
+ Without these tools, the office skills still create and edit `.docx`, `.xlsx`, and `.pptx` files, but some higher-quality QA and conversion paths are skipped.
312
+
155
313
  ## Commands
156
314
 
157
315
  CLI runtime commands:
@@ -163,8 +321,11 @@ CLI runtime commands:
163
321
  - `hybridclaw gateway status` — Show lifecycle/API status
164
322
  - `hybridclaw gateway <command...>` — Send a command to a running gateway (for example `sessions`, `bot info`)
165
323
  - `hybridclaw gateway compact` — Archive older session history into semantic memory while preserving a recent active context tail
324
+ - `hybridclaw gateway reset [yes|no]` — Clear session history, reset per-session model/chatbot/RAG settings, and remove the current agent workspace (confirmation required)
166
325
  - `hybridclaw tui` — Start terminal client connected to gateway
167
326
  - `hybridclaw onboarding` — Run HybridAI account/API key onboarding
327
+ - `hybridclaw local status` — Show current local backend config and default model
328
+ - `hybridclaw local configure <backend> <model-id> [--base-url <url>] [--api-key <key>] [--no-default]` — Enable and configure a local backend
168
329
  - `hybridclaw hybridai login [--device-code|--browser|--import]` — Store HybridAI API credentials via browser-assisted, headless/manual, or env-import flows
169
330
  - `hybridclaw hybridai status` — Show stored HybridAI auth state, token mask, and source
170
331
  - `hybridclaw hybridai logout` — Clear stored HybridAI credentials
@@ -177,13 +338,14 @@ CLI runtime commands:
177
338
  - `hybridclaw audit ...` — Verify and inspect structured audit trail (`recent`, `search`, `approvals`, `verify`, `instructions`)
178
339
  - `hybridclaw audit instructions [--sync]` — Compare runtime instruction copies under `~/.hybridclaw/instructions/` against installed sources and restore shipped defaults when needed
179
340
 
180
- In Discord, use `!claw help` to see all commands. Key ones:
341
+ In Discord, use `!claw help` or the slash commands. Key ones:
181
342
 
182
343
  - `!claw <message>` — Talk to the agent
183
344
  - `!claw bot set <id>` — Set chatbot for this channel
184
345
  - `!claw model set <name>` — Set model for this channel
185
346
  - `!claw rag on/off` — Toggle RAG
186
347
  - `!claw compact` — Archive older history into session memory and keep a recent working tail
348
+ - `/reset` or `!claw reset` — Clear history, reset per-session model/bot settings, and remove the current agent workspace (confirmation required)
187
349
  - `!claw clear` — Clear conversation history
188
350
  - `!claw audit recent [n]` — Show recent structured audit events
189
351
  - `!claw audit verify [sessionId]` — Verify audit hash chain integrity
@@ -191,8 +353,11 @@ In Discord, use `!claw help` to see all commands. Key ones:
191
353
  - `!claw audit approvals [n] [--denied]` — Show policy approval decisions
192
354
  - `!claw usage [summary|daily|monthly|model [daily|monthly] [agentId]]` — Show token/cost aggregates
193
355
  - `!claw export session [sessionId]` — Export session snapshot as JSONL
356
+ - `!claw mcp list` — List configured MCP servers
357
+ - `!claw mcp add <name> <json>` — Add or update an MCP server config
194
358
  - `!claw schedule add "<cron>" <prompt>` — Add cron scheduled task
195
359
  - `!claw schedule add at "<ISO time>" <prompt>` — Add one-shot task
196
360
  - `!claw schedule add every <ms> <prompt>` — Add interval task
197
361
 
198
- In the TUI, use `/compact` to trigger the same session compaction flow.
362
+ In the TUI, use `/compact` for session compaction, `/reset` for the confirmed
363
+ workspace reset flow, and `/mcp ...` for runtime MCP management.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": 7,
2
+ "version": 9,
3
3
  "security": {
4
4
  "trustModelAccepted": false,
5
5
  "trustModelAcceptedAt": "",
@@ -81,6 +81,36 @@
81
81
  "openai-codex/gpt-5.1-codex-mini"
82
82
  ]
83
83
  },
84
+ "local": {
85
+ "backends": {
86
+ "ollama": {
87
+ "enabled": true,
88
+ "baseUrl": "http://127.0.0.1:11434"
89
+ },
90
+ "lmstudio": {
91
+ "enabled": false,
92
+ "baseUrl": "http://127.0.0.1:1234/v1"
93
+ },
94
+ "vllm": {
95
+ "enabled": false,
96
+ "baseUrl": "http://127.0.0.1:8000/v1",
97
+ "apiKey": ""
98
+ }
99
+ },
100
+ "discovery": {
101
+ "enabled": true,
102
+ "intervalMs": 300000,
103
+ "maxModels": 200,
104
+ "concurrency": 8
105
+ },
106
+ "healthCheck": {
107
+ "enabled": true,
108
+ "intervalMs": 60000,
109
+ "timeoutMs": 5000
110
+ },
111
+ "defaultContextWindow": 128000,
112
+ "defaultMaxTokens": 8192
113
+ },
84
114
  "container": {
85
115
  "sandboxMode": "container",
86
116
  "image": "hybridclaw-agent",
@@ -94,6 +124,33 @@
94
124
  "maxOutputBytes": 10485760,
95
125
  "maxConcurrent": 5
96
126
  },
127
+ "mcpServers": {
128
+ "filesystem": {
129
+ "transport": "stdio",
130
+ "command": "npx",
131
+ "args": [
132
+ "-y",
133
+ "@modelcontextprotocol/server-filesystem",
134
+ "/absolute/path/to/a/workspace"
135
+ ],
136
+ "enabled": false
137
+ },
138
+ "tavily": {
139
+ "transport": "stdio",
140
+ "command": "npx",
141
+ "args": ["-y", "tavily-mcp@latest"],
142
+ "env": {
143
+ "TAVILY_API_KEY": "replace-me"
144
+ },
145
+ "enabled": false
146
+ },
147
+ "playwright": {
148
+ "transport": "stdio",
149
+ "command": "npx",
150
+ "args": ["-y", "@playwright/mcp@latest"],
151
+ "enabled": false
152
+ }
153
+ },
97
154
  "web": {
98
155
  "search": {
99
156
  "provider": "auto",
@@ -1,7 +1,8 @@
1
1
  FROM node:20-slim
2
2
 
3
3
  RUN apt-get update && apt-get install -y --no-install-recommends \
4
- ripgrep git curl python3 python3-pip poppler-utils qpdf \
4
+ ripgrep git curl python3 python3-pip poppler-utils qpdf pandoc \
5
+ libreoffice-calc libreoffice-impress libreoffice-writer \
5
6
  && rm -rf /var/lib/apt/lists/*
6
7
 
7
8
  RUN python3 -m pip install --no-cache-dir --break-system-packages \
@@ -12,6 +13,14 @@ RUN python3 -m pip install --no-cache-dir --break-system-packages \
12
13
  reportlab==4.4.4 \
13
14
  pillow==11.3.0
14
15
 
16
+ RUN npm install -g \
17
+ docx@9.5.1 \
18
+ pptxgenjs@4.0.1 \
19
+ exceljs@4.4.0 \
20
+ csv-parse@6.1.0 \
21
+ iconv-lite@0.7.0
22
+ ENV NODE_PATH=/usr/local/lib/node_modules:/app/node_modules
23
+
15
24
  WORKDIR /app
16
25
 
17
26
  COPY package.json tsconfig.json ./