@hybridaione/hybridclaw 0.6.0 → 0.7.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 (380) hide show
  1. package/AGENTS.md +377 -58
  2. package/CHANGELOG.md +64 -0
  3. package/README.md +48 -5
  4. package/config.example.json +27 -3
  5. package/console/dist/assets/index-D00hMcZD.js +13 -0
  6. package/console/dist/assets/index-Dou3u0ob.css +1 -0
  7. package/console/dist/index.html +16 -0
  8. package/console/package.json +24 -0
  9. package/container/dist/approval-policy.js +43 -3
  10. package/container/dist/approval-policy.js.map +1 -1
  11. package/container/dist/discord-cdn.js +20 -0
  12. package/container/dist/discord-cdn.js.map +1 -0
  13. package/container/dist/index.js +81 -248
  14. package/container/dist/index.js.map +1 -1
  15. package/container/dist/native-media.js +273 -0
  16. package/container/dist/native-media.js.map +1 -0
  17. package/container/dist/providers/hybridai.js +1 -0
  18. package/container/dist/providers/hybridai.js.map +1 -1
  19. package/container/dist/providers/local-ollama.js +19 -4
  20. package/container/dist/providers/local-ollama.js.map +1 -1
  21. package/container/dist/providers/local-openai-compat.js +27 -6
  22. package/container/dist/providers/local-openai-compat.js.map +1 -1
  23. package/container/dist/providers/openai-codex.js +4 -3
  24. package/container/dist/providers/openai-codex.js.map +1 -1
  25. package/container/dist/providers/shared.js +32 -8
  26. package/container/dist/providers/shared.js.map +1 -1
  27. package/container/dist/providers/thinking-extractor.js +46 -0
  28. package/container/dist/providers/thinking-extractor.js.map +1 -1
  29. package/container/dist/ralph.js +63 -0
  30. package/container/dist/ralph.js.map +1 -0
  31. package/container/dist/runtime-paths.js +32 -1
  32. package/container/dist/runtime-paths.js.map +1 -1
  33. package/container/dist/token-usage.js +4 -0
  34. package/container/dist/token-usage.js.map +1 -1
  35. package/container/dist/tools.js +147 -76
  36. package/container/dist/tools.js.map +1 -1
  37. package/container/package-lock.json +2 -2
  38. package/container/package.json +1 -1
  39. package/container/src/approval-policy.ts +51 -5
  40. package/container/src/discord-cdn.ts +21 -0
  41. package/container/src/index.ts +105 -275
  42. package/container/src/native-media.ts +326 -0
  43. package/container/src/providers/hybridai.ts +1 -0
  44. package/container/src/providers/local-ollama.ts +18 -4
  45. package/container/src/providers/local-openai-compat.ts +27 -5
  46. package/container/src/providers/openai-codex.ts +4 -0
  47. package/container/src/providers/shared.ts +41 -8
  48. package/container/src/providers/thinking-extractor.ts +54 -0
  49. package/container/src/ralph.ts +71 -0
  50. package/container/src/runtime-paths.ts +42 -4
  51. package/container/src/token-usage.ts +4 -0
  52. package/container/src/tools.ts +995 -839
  53. package/container/src/types.ts +16 -1
  54. package/dist/agent/agent.d.ts +3 -2
  55. package/dist/agent/agent.d.ts.map +1 -1
  56. package/dist/agent/agent.js +13 -10
  57. package/dist/agent/agent.js.map +1 -1
  58. package/dist/agent/conversation.d.ts +1 -0
  59. package/dist/agent/conversation.d.ts.map +1 -1
  60. package/dist/agent/conversation.js +2 -1
  61. package/dist/agent/conversation.js.map +1 -1
  62. package/dist/agent/executor-types.d.ts +30 -0
  63. package/dist/agent/executor-types.d.ts.map +1 -0
  64. package/dist/agent/executor-types.js +2 -0
  65. package/dist/agent/executor-types.js.map +1 -0
  66. package/dist/agent/executor.d.ts +2 -24
  67. package/dist/agent/executor.d.ts.map +1 -1
  68. package/dist/agent/executor.js +5 -0
  69. package/dist/agent/executor.js.map +1 -1
  70. package/dist/agent/prompt-hooks.d.ts +0 -1
  71. package/dist/agent/prompt-hooks.d.ts.map +1 -1
  72. package/dist/agent/prompt-hooks.js +10 -8
  73. package/dist/agent/prompt-hooks.js.map +1 -1
  74. package/dist/agent/tool-summary.d.ts +7 -0
  75. package/dist/agent/tool-summary.d.ts.map +1 -1
  76. package/dist/agent/tool-summary.js +13 -0
  77. package/dist/agent/tool-summary.js.map +1 -1
  78. package/dist/agents/agent-registry.d.ts +24 -0
  79. package/dist/agents/agent-registry.d.ts.map +1 -0
  80. package/dist/agents/agent-registry.js +386 -0
  81. package/dist/agents/agent-registry.js.map +1 -0
  82. package/dist/agents/agent-types.d.ts +23 -0
  83. package/dist/agents/agent-types.d.ts.map +1 -0
  84. package/dist/agents/agent-types.js +2 -0
  85. package/dist/agents/agent-types.js.map +1 -0
  86. package/dist/audit/audit-events.d.ts.map +1 -1
  87. package/dist/audit/audit-events.js +11 -4
  88. package/dist/audit/audit-events.js.map +1 -1
  89. package/dist/audit/audit-trail.d.ts.map +1 -1
  90. package/dist/audit/audit-trail.js +2 -47
  91. package/dist/audit/audit-trail.js.map +1 -1
  92. package/dist/channels/discord/attachments.d.ts.map +1 -1
  93. package/dist/channels/discord/attachments.js +131 -126
  94. package/dist/channels/discord/attachments.js.map +1 -1
  95. package/dist/channels/discord/inbound.d.ts +0 -1
  96. package/dist/channels/discord/inbound.d.ts.map +1 -1
  97. package/dist/channels/discord/inbound.js +4 -23
  98. package/dist/channels/discord/inbound.js.map +1 -1
  99. package/dist/channels/discord/prompt-adapter.js +3 -3
  100. package/dist/channels/discord/prompt-adapter.js.map +1 -1
  101. package/dist/channels/discord/runtime.d.ts +1 -0
  102. package/dist/channels/discord/runtime.d.ts.map +1 -1
  103. package/dist/channels/discord/runtime.js +50 -21
  104. package/dist/channels/discord/runtime.js.map +1 -1
  105. package/dist/channels/discord/send-files.d.ts +1 -0
  106. package/dist/channels/discord/send-files.d.ts.map +1 -1
  107. package/dist/channels/discord/send-files.js +2 -0
  108. package/dist/channels/discord/send-files.js.map +1 -1
  109. package/dist/channels/discord/slash-commands.d.ts.map +1 -1
  110. package/dist/channels/discord/slash-commands.js +33 -572
  111. package/dist/channels/discord/slash-commands.js.map +1 -1
  112. package/dist/channels/discord/tool-actions.d.ts +3 -1
  113. package/dist/channels/discord/tool-actions.d.ts.map +1 -1
  114. package/dist/channels/discord/tool-actions.js +66 -25
  115. package/dist/channels/discord/tool-actions.js.map +1 -1
  116. package/dist/channels/message/tool-actions.d.ts +3 -0
  117. package/dist/channels/message/tool-actions.d.ts.map +1 -0
  118. package/dist/channels/message/tool-actions.js +151 -0
  119. package/dist/channels/message/tool-actions.js.map +1 -0
  120. package/dist/channels/prompt-adapters.d.ts.map +1 -1
  121. package/dist/channels/prompt-adapters.js +11 -2
  122. package/dist/channels/prompt-adapters.js.map +1 -1
  123. package/dist/channels/whatsapp/auth.d.ts +12 -0
  124. package/dist/channels/whatsapp/auth.d.ts.map +1 -0
  125. package/dist/channels/whatsapp/auth.js +34 -0
  126. package/dist/channels/whatsapp/auth.js.map +1 -0
  127. package/dist/channels/whatsapp/connection.d.ts +11 -0
  128. package/dist/channels/whatsapp/connection.d.ts.map +1 -0
  129. package/dist/channels/whatsapp/connection.js +265 -0
  130. package/dist/channels/whatsapp/connection.js.map +1 -0
  131. package/dist/channels/whatsapp/debounce.d.ts +28 -0
  132. package/dist/channels/whatsapp/debounce.d.ts.map +1 -0
  133. package/dist/channels/whatsapp/debounce.js +69 -0
  134. package/dist/channels/whatsapp/debounce.js.map +1 -0
  135. package/dist/channels/whatsapp/delivery.d.ts +20 -0
  136. package/dist/channels/whatsapp/delivery.d.ts.map +1 -0
  137. package/dist/channels/whatsapp/delivery.js +96 -0
  138. package/dist/channels/whatsapp/delivery.js.map +1 -0
  139. package/dist/channels/whatsapp/inbound.d.ts +39 -0
  140. package/dist/channels/whatsapp/inbound.d.ts.map +1 -0
  141. package/dist/channels/whatsapp/inbound.js +284 -0
  142. package/dist/channels/whatsapp/inbound.js.map +1 -0
  143. package/dist/channels/whatsapp/markdown.d.ts +2 -0
  144. package/dist/channels/whatsapp/markdown.d.ts.map +1 -0
  145. package/dist/channels/whatsapp/markdown.js +39 -0
  146. package/dist/channels/whatsapp/markdown.js.map +1 -0
  147. package/dist/channels/whatsapp/mime-utils.d.ts +3 -0
  148. package/dist/channels/whatsapp/mime-utils.d.ts.map +1 -0
  149. package/dist/channels/whatsapp/mime-utils.js +33 -0
  150. package/dist/channels/whatsapp/mime-utils.js.map +1 -0
  151. package/dist/channels/whatsapp/phone.d.ts +8 -0
  152. package/dist/channels/whatsapp/phone.d.ts.map +1 -0
  153. package/dist/channels/whatsapp/phone.js +73 -0
  154. package/dist/channels/whatsapp/phone.js.map +1 -0
  155. package/dist/channels/whatsapp/prompt-adapter.d.ts +3 -0
  156. package/dist/channels/whatsapp/prompt-adapter.d.ts.map +1 -0
  157. package/dist/channels/whatsapp/prompt-adapter.js +24 -0
  158. package/dist/channels/whatsapp/prompt-adapter.js.map +1 -0
  159. package/dist/channels/whatsapp/runtime.d.ts +31 -0
  160. package/dist/channels/whatsapp/runtime.d.ts.map +1 -0
  161. package/dist/channels/whatsapp/runtime.js +192 -0
  162. package/dist/channels/whatsapp/runtime.js.map +1 -0
  163. package/dist/channels/whatsapp/self-echo-cache.d.ts +14 -0
  164. package/dist/channels/whatsapp/self-echo-cache.d.ts.map +1 -0
  165. package/dist/channels/whatsapp/self-echo-cache.js +57 -0
  166. package/dist/channels/whatsapp/self-echo-cache.js.map +1 -0
  167. package/dist/channels/whatsapp/typing.d.ts +12 -0
  168. package/dist/channels/whatsapp/typing.d.ts.map +1 -0
  169. package/dist/channels/whatsapp/typing.js +74 -0
  170. package/dist/channels/whatsapp/typing.js.map +1 -0
  171. package/dist/cli.d.ts.map +1 -1
  172. package/dist/cli.js +288 -9
  173. package/dist/cli.js.map +1 -1
  174. package/dist/command-registry.d.ts +35 -0
  175. package/dist/command-registry.d.ts.map +1 -0
  176. package/dist/command-registry.js +806 -0
  177. package/dist/command-registry.js.map +1 -0
  178. package/dist/config/config.d.ts +21 -1
  179. package/dist/config/config.d.ts.map +1 -1
  180. package/dist/config/config.js +30 -2
  181. package/dist/config/config.js.map +1 -1
  182. package/dist/config/runtime-config.d.ts +54 -2
  183. package/dist/config/runtime-config.d.ts.map +1 -1
  184. package/dist/config/runtime-config.js +294 -3
  185. package/dist/config/runtime-config.js.map +1 -1
  186. package/dist/gateway/chat-result.d.ts +8 -0
  187. package/dist/gateway/chat-result.d.ts.map +1 -0
  188. package/dist/gateway/chat-result.js +206 -0
  189. package/dist/gateway/chat-result.js.map +1 -0
  190. package/dist/gateway/fullauto.d.ts +104 -0
  191. package/dist/gateway/fullauto.d.ts.map +1 -0
  192. package/dist/gateway/fullauto.js +1181 -0
  193. package/dist/gateway/fullauto.js.map +1 -0
  194. package/dist/gateway/gateway-agent-cards.d.ts +21 -0
  195. package/dist/gateway/gateway-agent-cards.d.ts.map +1 -0
  196. package/dist/gateway/gateway-agent-cards.js +334 -0
  197. package/dist/gateway/gateway-agent-cards.js.map +1 -0
  198. package/dist/gateway/gateway-error-utils.d.ts +3 -0
  199. package/dist/gateway/gateway-error-utils.d.ts.map +1 -0
  200. package/dist/gateway/gateway-error-utils.js +38 -0
  201. package/dist/gateway/gateway-error-utils.js.map +1 -0
  202. package/dist/gateway/gateway-formatting.d.ts +4 -0
  203. package/dist/gateway/gateway-formatting.d.ts.map +1 -0
  204. package/dist/gateway/gateway-formatting.js +30 -0
  205. package/dist/gateway/gateway-formatting.js.map +1 -0
  206. package/dist/gateway/gateway-request-runtime.d.ts +11 -0
  207. package/dist/gateway/gateway-request-runtime.d.ts.map +1 -0
  208. package/dist/gateway/gateway-request-runtime.js +72 -0
  209. package/dist/gateway/gateway-request-runtime.js.map +1 -0
  210. package/dist/gateway/gateway-service.d.ts +91 -7
  211. package/dist/gateway/gateway-service.d.ts.map +1 -1
  212. package/dist/gateway/gateway-service.js +1377 -285
  213. package/dist/gateway/gateway-service.js.map +1 -1
  214. package/dist/gateway/gateway-session-status.d.ts +14 -0
  215. package/dist/gateway/gateway-session-status.d.ts.map +1 -0
  216. package/dist/gateway/gateway-session-status.js +95 -0
  217. package/dist/gateway/gateway-session-status.js.map +1 -0
  218. package/dist/gateway/gateway-time.d.ts +5 -0
  219. package/dist/gateway/gateway-time.d.ts.map +1 -0
  220. package/dist/gateway/gateway-time.js +38 -0
  221. package/dist/gateway/gateway-time.js.map +1 -0
  222. package/dist/gateway/gateway-types.d.ts +298 -2
  223. package/dist/gateway/gateway-types.d.ts.map +1 -1
  224. package/dist/gateway/gateway-types.js.map +1 -1
  225. package/dist/gateway/gateway-utils.d.ts +5 -0
  226. package/dist/gateway/gateway-utils.d.ts.map +1 -0
  227. package/dist/gateway/gateway-utils.js +28 -0
  228. package/dist/gateway/gateway-utils.js.map +1 -0
  229. package/dist/gateway/gateway.js +201 -31
  230. package/dist/gateway/gateway.js.map +1 -1
  231. package/dist/gateway/health.d.ts.map +1 -1
  232. package/dist/gateway/health.js +388 -100
  233. package/dist/gateway/health.js.map +1 -1
  234. package/dist/gateway/proactive-delivery.d.ts +3 -1
  235. package/dist/gateway/proactive-delivery.d.ts.map +1 -1
  236. package/dist/gateway/proactive-delivery.js +18 -1
  237. package/dist/gateway/proactive-delivery.js.map +1 -1
  238. package/dist/gateway/show-mode.d.ts +10 -0
  239. package/dist/gateway/show-mode.d.ts.map +1 -0
  240. package/dist/gateway/show-mode.js +46 -0
  241. package/dist/gateway/show-mode.js.map +1 -0
  242. package/dist/infra/container-runner.d.ts +6 -18
  243. package/dist/infra/container-runner.d.ts.map +1 -1
  244. package/dist/infra/container-runner.js +42 -7
  245. package/dist/infra/container-runner.js.map +1 -1
  246. package/dist/infra/container-setup.d.ts.map +1 -1
  247. package/dist/infra/container-setup.js +1 -19
  248. package/dist/infra/container-setup.js.map +1 -1
  249. package/dist/infra/host-runner.d.ts +6 -33
  250. package/dist/infra/host-runner.d.ts.map +1 -1
  251. package/dist/infra/host-runner.js +40 -6
  252. package/dist/infra/host-runner.js.map +1 -1
  253. package/dist/infra/ipc.d.ts.map +1 -1
  254. package/dist/infra/ipc.js +3 -1
  255. package/dist/infra/ipc.js.map +1 -1
  256. package/dist/infra/stream-debug.d.ts +1 -0
  257. package/dist/infra/stream-debug.d.ts.map +1 -1
  258. package/dist/infra/stream-debug.js +4 -0
  259. package/dist/infra/stream-debug.js.map +1 -1
  260. package/dist/logger.d.ts +2 -0
  261. package/dist/logger.d.ts.map +1 -1
  262. package/dist/logger.js +9 -1
  263. package/dist/logger.js.map +1 -1
  264. package/dist/media/audio-transcription-backends.d.ts +28 -0
  265. package/dist/media/audio-transcription-backends.d.ts.map +1 -0
  266. package/dist/media/audio-transcription-backends.js +764 -0
  267. package/dist/media/audio-transcription-backends.js.map +1 -0
  268. package/dist/media/audio-transcription.d.ts +19 -0
  269. package/dist/media/audio-transcription.d.ts.map +1 -0
  270. package/dist/media/audio-transcription.js +140 -0
  271. package/dist/media/audio-transcription.js.map +1 -0
  272. package/dist/media/mime-utils.d.ts +3 -0
  273. package/dist/media/mime-utils.d.ts.map +1 -0
  274. package/dist/media/mime-utils.js +8 -0
  275. package/dist/media/mime-utils.js.map +1 -0
  276. package/dist/media/path-utils.d.ts +2 -0
  277. package/dist/media/path-utils.d.ts.map +1 -0
  278. package/dist/media/path-utils.js +12 -0
  279. package/dist/media/path-utils.js.map +1 -0
  280. package/dist/media/pdf-context.d.ts +1 -0
  281. package/dist/media/pdf-context.d.ts.map +1 -1
  282. package/dist/media/pdf-context.js +12 -2
  283. package/dist/media/pdf-context.js.map +1 -1
  284. package/dist/memory/db.d.ts +39 -2
  285. package/dist/memory/db.d.ts.map +1 -1
  286. package/dist/memory/db.js +550 -4
  287. package/dist/memory/db.js.map +1 -1
  288. package/dist/memory/memory-service.d.ts +2 -2
  289. package/dist/memory/memory-service.d.ts.map +1 -1
  290. package/dist/memory/memory-service.js +20 -11
  291. package/dist/memory/memory-service.js.map +1 -1
  292. package/dist/onboarding.d.ts +0 -1
  293. package/dist/onboarding.d.ts.map +1 -1
  294. package/dist/onboarding.js +0 -6
  295. package/dist/onboarding.js.map +1 -1
  296. package/dist/providers/anthropic.d.ts.map +1 -1
  297. package/dist/providers/anthropic.js +0 -5
  298. package/dist/providers/anthropic.js.map +1 -1
  299. package/dist/providers/factory.d.ts +0 -1
  300. package/dist/providers/factory.d.ts.map +1 -1
  301. package/dist/providers/factory.js +3 -4
  302. package/dist/providers/factory.js.map +1 -1
  303. package/dist/providers/hybridai.d.ts.map +1 -1
  304. package/dist/providers/hybridai.js +3 -6
  305. package/dist/providers/hybridai.js.map +1 -1
  306. package/dist/providers/local-ollama.d.ts.map +1 -1
  307. package/dist/providers/local-ollama.js +3 -5
  308. package/dist/providers/local-ollama.js.map +1 -1
  309. package/dist/providers/local-openai-compat.d.ts.map +1 -1
  310. package/dist/providers/local-openai-compat.js +3 -2
  311. package/dist/providers/local-openai-compat.js.map +1 -1
  312. package/dist/providers/openai.d.ts.map +1 -1
  313. package/dist/providers/openai.js +3 -6
  314. package/dist/providers/openai.js.map +1 -1
  315. package/dist/providers/types.d.ts +1 -1
  316. package/dist/providers/types.d.ts.map +1 -1
  317. package/dist/scheduler/heartbeat.d.ts.map +1 -1
  318. package/dist/scheduler/heartbeat.js +34 -17
  319. package/dist/scheduler/heartbeat.js.map +1 -1
  320. package/dist/scheduler/scheduled-task-runner.d.ts.map +1 -1
  321. package/dist/scheduler/scheduled-task-runner.js +10 -1
  322. package/dist/scheduler/scheduled-task-runner.js.map +1 -1
  323. package/dist/scheduler/scheduler.d.ts +2 -0
  324. package/dist/scheduler/scheduler.d.ts.map +1 -1
  325. package/dist/scheduler/scheduler.js +5 -0
  326. package/dist/scheduler/scheduler.js.map +1 -1
  327. package/dist/security/media-paths.d.ts +19 -0
  328. package/dist/security/media-paths.d.ts.map +1 -0
  329. package/dist/security/media-paths.js +125 -0
  330. package/dist/security/media-paths.js.map +1 -0
  331. package/dist/security/redact.d.ts +10 -0
  332. package/dist/security/redact.d.ts.map +1 -0
  333. package/dist/security/redact.js +131 -0
  334. package/dist/security/redact.js.map +1 -0
  335. package/dist/security/runtime-secrets.d.ts +1 -1
  336. package/dist/security/runtime-secrets.d.ts.map +1 -1
  337. package/dist/security/runtime-secrets.js +5 -0
  338. package/dist/security/runtime-secrets.js.map +1 -1
  339. package/dist/session/session-maintenance.d.ts.map +1 -1
  340. package/dist/session/session-maintenance.js +23 -5
  341. package/dist/session/session-maintenance.js.map +1 -1
  342. package/dist/session/token-efficiency.d.ts.map +1 -1
  343. package/dist/session/token-efficiency.js +4 -0
  344. package/dist/session/token-efficiency.js.map +1 -1
  345. package/dist/skills/skills.d.ts +1 -0
  346. package/dist/skills/skills.d.ts.map +1 -1
  347. package/dist/skills/skills.js +9 -1
  348. package/dist/skills/skills.js.map +1 -1
  349. package/dist/tui-fullauto.d.ts +15 -0
  350. package/dist/tui-fullauto.d.ts.map +1 -0
  351. package/dist/tui-fullauto.js +56 -0
  352. package/dist/tui-fullauto.js.map +1 -0
  353. package/dist/tui-proactive.d.ts +3 -0
  354. package/dist/tui-proactive.d.ts.map +1 -0
  355. package/dist/tui-proactive.js +9 -0
  356. package/dist/tui-proactive.js.map +1 -0
  357. package/dist/tui-slash-command.d.ts +10 -0
  358. package/dist/tui-slash-command.d.ts.map +1 -1
  359. package/dist/tui-slash-command.js +25 -1
  360. package/dist/tui-slash-command.js.map +1 -1
  361. package/dist/tui-thinking.d.ts +14 -0
  362. package/dist/tui-thinking.d.ts.map +1 -0
  363. package/dist/tui-thinking.js +140 -0
  364. package/dist/tui-thinking.js.map +1 -0
  365. package/dist/tui.js +536 -143
  366. package/dist/tui.js.map +1 -1
  367. package/dist/types.d.ts +27 -2
  368. package/dist/types.d.ts.map +1 -1
  369. package/dist/types.js.map +1 -1
  370. package/dist/utils/sleep.d.ts +2 -0
  371. package/dist/utils/sleep.d.ts.map +1 -0
  372. package/dist/utils/sleep.js +7 -0
  373. package/dist/utils/sleep.js.map +1 -0
  374. package/docs/agents.html +2177 -0
  375. package/docs/chat.html +194 -2
  376. package/docs/development/README.md +2 -0
  377. package/docs/development/runtime.md +69 -6
  378. package/docs/development/voice-tts.md +123 -0
  379. package/docs/index.html +116 -81
  380. package/package.json +14 -5
package/AGENTS.md CHANGED
@@ -1,85 +1,295 @@
1
- # AGENTS.md
2
-
3
- ## Scope
1
+ # AGENTS.md — HybridClaw Engineering Protocol
4
2
 
5
3
  This file is the canonical repo-level instruction set for coding agents working
6
- in HybridClaw.
4
+ in HybridClaw. Read it before any code change.
5
+
6
+ ## Scope
7
7
 
8
8
  - Follow this file first.
9
9
  - If a deeper directory contains its own `AGENTS.md`, that file overrides this
10
10
  one for its subtree.
11
11
  - Keep `CLAUDE.md` aligned with this file. `CLAUDE.md` should only carry
12
12
  tool-specific deltas.
13
+ - `templates/*.md` are product runtime workspace bootstrap files, not repo
14
+ contributor onboarding docs.
15
+
16
+ ---
17
+
18
+ ## 1) Project Snapshot
19
+
20
+ HybridClaw is a personal AI assistant bot for Discord, powered by HybridAI.
21
+ Enterprise-grade Node.js 22 application with gateway service, TUI client, and
22
+ Docker-sandboxed container runtime.
23
+
24
+ **Version:** 0.6.0  |  **Package:** `@hybridaione/hybridclaw`
25
+  |  **License:** see `LICENSE`
26
+
27
+ Architecture: gateway (core runtime, SQLite persistence, REST API, Discord
28
+ integration) → container (Docker-sandboxed tool execution via file-based IPC) →
29
+ TUI (thin HTTP client). Agent workspaces are bootstrapped from `templates/` and
30
+ seeded with identity, memory, and context files managed by `src/workspace.ts`.
31
+
32
+ ---
33
+
34
+ ## 2) Project Map
35
+
36
+ ```
37
+ src/
38
+ cli.ts CLI entry point and command dispatch
39
+ types.ts Core type definitions (ChatMessage, ContainerInput, ToolExecution, etc.)
40
+ workspace.ts Workspace bootstrap (SOUL.md, IDENTITY.md, USER.md, etc.)
41
+ logger.ts Structured logging (pino)
42
+ tui.ts Terminal UI
43
+ onboarding.ts Interactive onboarding
44
+ model-selection.ts Model selection logic
45
+ agent/ Agent execution: conversation loop, tool executor, prompt hooks, delegation
46
+ audit/ Append-only audit trail, approval tracking, hash-chain integrity
47
+ auth/ HybridAI and OpenAI Codex authentication flows
48
+ channels/discord/ Discord integration and delivery logic
49
+ config/ CLI flag parsing, runtime config management
50
+ gateway/ Core gateway service: HTTP APIs, health, session mgmt, approvals
51
+ infra/ Container setup, IPC (file-based), worker signatures, runners
52
+ memory/ SQLite database, semantic memory, compaction, consolidation, chunking
53
+ providers/ Model providers (HybridAI, Anthropic, OpenAI, Ollama, LM Studio, vLLM)
54
+ scheduler/ Scheduled task execution and cron management
55
+ security/ Mount allowlists, approval policies, secret redaction, instruction audit
56
+ session/ Session transcripts, token tracking, compaction, export
57
+ skills/ Skill resolution, installation, trust-aware guard
58
+ utils/ Shared utilities
59
+ media/ Media handling and context management
60
+
61
+ container/ Sandboxed runtime (separate npm package)
62
+ src/ Container agent runtime, tool execution, provider adapters, MCP client
63
+ Dockerfile Container build definition
64
+ package.json Container-specific deps (Playwright, agent-browser, PDF, MCP SDK)
65
+
66
+ skills/ Bundled SKILL.md skills (pdf, docx, xlsx, pptx, office, personality, etc.)
67
+ templates/ Runtime workspace bootstrap files seeded into agent workspaces
68
+ tests/ Vitest suites: unit, integration, e2e, live
69
+ docs/ Static site assets, development reference docs
70
+ console/ Web console workspace package
71
+ ```
72
+
73
+ ### Key Data Flows
74
+
75
+ ```
76
+ User message → Gateway (HTTP/Discord) → ContainerInput (JSON)
77
+ → Container spawns (Docker sandbox, file-based IPC)
78
+ → Agent loop (tool calls, approvals, MCP)
79
+ → ContainerOutput (JSON) → Gateway → User
80
+ → Session persisted (SQLite), audit logged (wire.jsonl, hash-chained)
81
+ ```
82
+
83
+ ### Extension Points
84
+
85
+ | Extension | Interface / Registration | Playbook |
86
+ |---------------|--------------------------------------------------------------|----------|
87
+ | Skill | `skills/<name>/SKILL.md` frontmatter | §7.1 |
88
+ | Provider | `src/providers/<name>.ts` + factory | §7.2 |
89
+ | MCP Server | `~/.hybridclaw/config.json` (`mcpServers.*`) → tool namespace | §7.3 |
90
+ | Approval rule | `.hybridclaw/policy.yaml` | §7.4 |
91
+ | Template | `templates/<name>.md` + `src/workspace.ts` | §7.5 |
92
+
93
+ ---
94
+
95
+ ## 3) Engineering Principles
96
+
97
+ These are implementation constraints, not suggestions.
98
+
99
+ ### 3.1 KISS
100
+
101
+ - Prefer straightforward control flow over abstraction.
102
+ - Keep error paths obvious and localized.
103
+ - Three similar lines of code is better than a premature helper.
104
+
105
+ ### 3.2 YAGNI
106
+
107
+ - Do not add config keys, interfaces, or feature flags without a concrete caller.
108
+ - Do not add error handling for scenarios that cannot happen.
109
+ - Do not design for hypothetical future requirements.
110
+
111
+ ### 3.3 DRY — Rule of Three
112
+
113
+ - Duplicate small local logic when it preserves clarity.
114
+ - Extract shared helpers only after three repeated, stable patterns.
115
+ - When extracting, preserve module boundaries.
116
+
117
+ ### 3.4 Fail Fast
118
+
119
+ - Prefer explicit errors for unsupported or unsafe states.
120
+ - Never silently broaden permissions or capabilities.
121
+ - Validate at system boundaries (user input, external APIs, IPC); trust internal
122
+ code.
123
+
124
+ ### 3.5 Secure by Default
125
+
126
+ - LLM output is untrusted by default.
127
+ - Defaults are deny-by-default (mount allowlists, approval tiers, sandbox).
128
+ - Never log secrets, raw tokens, or sensitive payloads.
129
+ - Read `SECURITY.md` and `TRUST_MODEL.md` before touching security surfaces.
130
+
131
+ ---
132
+
133
+ ## 4) Risk Tiers by Path
134
+
135
+ Classify changes by blast radius. When uncertain, classify higher.
136
+
137
+ | Tier | Paths |
138
+ |--------|-----------------------------------------------------------------------------|
139
+ | High | `src/security/`, `src/gateway/`, `src/infra/`, `src/audit/`, `container/src/approval-policy.ts`, `container/src/extensions.ts`, `.hybridclaw/policy.yaml` |
140
+ | Medium | `src/agent/`, `src/providers/`, `src/session/`, `src/memory/`, `src/skills/`, `container/src/`, `templates/` |
141
+ | Low | `docs/`, `skills/` (bundled SKILL.md), test additions, comments, formatting |
142
+
143
+ **High-risk changes** must include threat/risk notes and boundary/failure-mode
144
+ tests. **Medium-risk changes** need targeted test coverage. **Low-risk changes**
145
+ should verify no broken references.
146
+
147
+ ---
148
+
149
+ ## 5) Setup and Commands
150
+
151
+ ### Prerequisites
152
+
153
+ - Node.js 22 (matches CI and `engines` field)
154
+ - npm
155
+ - Docker when working on container-mode behavior or image builds
13
156
 
14
- ## Project Map
157
+ ### Common Commands
15
158
 
16
- - `src/` core CLI, gateway, providers, auth, audit, scheduler, and runtime
17
- wiring
18
- - `container/` sandboxed runtime, tool executor, provider adapters, and
19
- container build inputs
20
- - `skills/` bundled `SKILL.md` skills plus any supporting scripts or reference
21
- material
22
- - `templates/` runtime workspace bootstrap files seeded into agent workspaces
23
- - `tests/` Vitest suites across unit, integration, e2e, and live coverage
24
- - `docs/` static site assets and maintainer/development reference docs
159
+ ```bash
160
+ npm install # install deps + Husky hooks
161
+ npm run setup # install container/ deps
162
+ npm run build # compile root + container TypeScript
163
+ npm run typecheck # tsc --noEmit
164
+ npm run lint # tsc --noEmit with unused detection
165
+ npm run check # biome check src
166
+ npm run format # biome check --write src
167
+ npm run test:unit # vitest unit suite
168
+ npm run test:integration # integration tests
169
+ npm run test:e2e # end-to-end tests
170
+ npm run test:live # live tests (requires credentials)
171
+ npm run release:check # verify release readiness
172
+ npm --prefix container run lint # container lint
173
+ npm --prefix container run release:check # container release check
174
+ npm run build:container # build Docker image
175
+ ```
176
+
177
+ ### Dev Mode
178
+
179
+ ```bash
180
+ npm run dev # tsx src/cli.ts gateway (hot reload)
181
+ npm run tui # tsx src/cli.ts tui
182
+ ```
25
183
 
26
- ## Working Rules
184
+ ---
185
+
186
+ ## 6) Working Rules
187
+
188
+ ### Code Changes
27
189
 
28
190
  - Keep changes focused. Prefer targeted fixes over broad refactors unless the
29
191
  task requires wider movement.
30
- - Match the existing TypeScript + ESM patterns already used in the touched area.
192
+ - Match the existing TypeScript + ESM patterns in the touched area.
31
193
  - Update tests and docs when behavior, commands, or repo workflows change.
32
- - Treat existing uncommitted changes as user work unless you created them.
33
194
  - Do not rename or relocate files in `templates/` without updating
34
195
  `src/workspace.ts` and the workspace bootstrap tests.
196
+ - Do not mix container and gateway changes in one commit unless they are
197
+ tightly coupled.
35
198
 
36
- ## Setup And Commands
199
+ ### Coding Style
37
200
 
38
- Prerequisites:
201
+ - **Language:** TypeScript (strict mode, ES2022 target, NodeNext modules, ESM).
202
+ - **Formatting:** Biome is authoritative. Run `npm run format` before
203
+ committing. The Husky pre-commit hook runs `npx biome check --write --staged`.
204
+ - **Single quotes** for strings (configured in `biome.json`).
205
+ - **No `any`** without strong justification. No `@ts-nocheck`.
206
+ - **File size:** aim for ~500 LOC; split when it improves clarity or
207
+ testability. `src/skills/skills-guard.ts` and `src/skills/skills.ts` are
208
+ current large exceptions — do not grow them further without splitting.
209
+ - **Comments:** brief comments for tricky or non-obvious logic only. Do not add
210
+ comments, docstrings, or type annotations to code you did not change.
211
+ - **Imports:** let Biome organize imports. Do not mix dynamic
212
+ `await import()` and static `import` for the same module in production paths.
213
+ - **Dependencies:** root `package.json` is for gateway/CLI deps. Container-only
214
+ deps go in `container/package.json`. Never add container deps to root.
39
215
 
40
- - Node.js 22 (matches CI)
41
- - npm
42
- - Docker when working on container-mode behavior or image builds
216
+ ### Git Discipline
217
+
218
+ - Treat existing uncommitted changes as user work unless you created them.
219
+ - Conventional Commits preferred: `feat:`, `fix:`, `test:`, `refactor:`,
220
+ `chore:`, `docs:`.
221
+ - Group related changes; avoid bundling unrelated refactors.
222
+ - Never commit real API keys, tokens, credentials, or personal data. Use
223
+ neutral placeholders in tests: `"test-key"`, `"example.com"`, `"user_a"`.
43
224
 
44
- Common commands:
225
+ ---
45
226
 
46
- ```bash
47
- npm install
48
- npm run setup
49
- npm run build
50
- npm run typecheck
51
- npm run lint
52
- npm run check
53
- npm run test:unit
54
- npm run test:integration
55
- npm run test:e2e
56
- npm run test:live
57
- npm run release:check
58
- npm --prefix container run lint
59
- npm --prefix container run release:check
60
- ```
227
+ ## 7) Change Playbooks
61
228
 
62
- ## Testing Expectations
229
+ ### 7.1 Adding a Skill
63
230
 
64
- - Docs-only changes: keep links and commands accurate; runtime tests are usually
65
- unnecessary.
66
- - `src/` changes: run `npm run typecheck`, `npm run lint`, and the relevant
67
- Vitest suites.
68
- - `container/` changes: run `npm --prefix container run lint`, `npm run build`,
69
- and targeted tests that exercise the runtime boundary.
70
- - Release or packaging changes: run both release checks and verify versioned
71
- docs stay aligned.
72
- - If you skip a relevant check, state that explicitly in your handoff.
231
+ 1. Create `skills/<name>/SKILL.md` with required frontmatter:
232
+ ```yaml
233
+ ---
234
+ name: my-skill
235
+ description: One-line description
236
+ user-invocable: true # optional, enables /<name> invocation
237
+ ---
238
+ ```
239
+ 2. Add markdown instructions and working rules in the body.
240
+ 3. If the skill needs supporting scripts, place them alongside `SKILL.md`.
241
+ 4. Bundled script paths are mirrored into `/workspace/skills/<name>` at runtime.
242
+ 5. Test: `hybridclaw skill list` should show the new skill.
73
243
 
74
- ## Documentation Hierarchy
244
+ Skill resolution order (first match wins):
245
+ 1. `config.skills.extraDirs[]`
246
+ 2. Bundled: `skills/<name>`
247
+ 3. `$CODEX_HOME/skills`
248
+ 4. `~/.codex/skills`, `~/.claude/skills`, `~/.agents/skills`
249
+ 5. Project/workspace: `./.agents/skills`, `./skills`
75
250
 
76
- - `README.md` is the end-user and product entry point.
77
- - `CONTRIBUTING.md` is the human contributor quickstart.
78
- - `docs/development/` holds deeper maintainer and runtime reference docs.
79
- - `templates/*.md` are product runtime workspace seed files, not repo
80
- contributor onboarding docs.
251
+ ### 7.2 Adding a Provider
252
+
253
+ 1. Create `src/providers/<name>.ts` implementing the provider interface.
254
+ 2. Register in the provider factory (`src/providers/`).
255
+ 3. Add config section in `src/config/` if new credentials or endpoints needed.
256
+ 4. Add tests for factory wiring, error paths, and config parsing.
257
+ 5. Update `docs/` if the provider is user-facing.
258
+
259
+ ### 7.3 Adding an MCP Server
81
260
 
82
- ## Bump Release
261
+ 1. Add the server config to `~/.hybridclaw/config.json` under `mcpServers`:
262
+ ```json
263
+ {
264
+ "mcpServers": {
265
+ "<server-name>": {
266
+ "command": "...",
267
+ "args": ["..."],
268
+ "transport": "stdio"
269
+ }
270
+ }
271
+ }
272
+ ```
273
+ 2. Tools are auto-discovered at startup and merged into the tool namespace.
274
+ 3. Test with `hybridclaw` running in dev mode.
275
+
276
+ ### 7.4 Modifying Approval Policy
277
+
278
+ 1. Edit `.hybridclaw/policy.yaml`.
279
+ 2. Approval tiers: green (silent) → yellow (narrated) → red (explicit approval).
280
+ 3. `pinned_red` patterns are never auto-promoted.
281
+ 4. Test approval flows with integration tests that exercise the boundary.
282
+
283
+ ### 7.5 Modifying Templates
284
+
285
+ 1. Edit the file in `templates/`.
286
+ 2. **Always** update `src/workspace.ts` if you add, remove, or rename a
287
+ template file.
288
+ 3. Run workspace bootstrap tests to verify.
289
+ 4. Remember: templates are seeded into agent workspaces at runtime — changes
290
+ only apply to new sessions or after workspace reset.
291
+
292
+ ### 7.6 Bump Release
83
293
 
84
294
  When the user says "bump release":
85
295
 
@@ -93,8 +303,117 @@ When the user says "bump release":
93
303
  3. Move `CHANGELOG.md` release notes from `Unreleased` to the new version
94
304
  heading (or create one).
95
305
  4. Update `README.md` "latest tag" link/text if present.
96
- 5. Commit with a release chore message (for example `chore: release vX.Y.Z`).
306
+ 5. Commit with `chore: release vX.Y.Z`.
97
307
  6. Create an annotated git tag `vX.Y.Z`.
98
308
  7. Push the commit and tag.
99
- 8. Always create or publish a GitHub Release entry for the tag. Tags alone do
100
- not update the Releases list.
309
+ 8. Create or publish a GitHub Release entry for the tag.
310
+
311
+ ---
312
+
313
+ ## 8) Testing Expectations
314
+
315
+ ### What to Run
316
+
317
+ | Change scope | Required checks |
318
+ |---------------------|-------------------------------------------------------------|
319
+ | Docs only | Verify links, commands, examples |
320
+ | `src/` changes | `npm run typecheck`, `npm run lint`, targeted Vitest suites |
321
+ | `container/` changes| `npm --prefix container run lint`, `npm run build`, IPC boundary tests |
322
+ | `skills/` changes | `hybridclaw skill list`, targeted skill tests |
323
+ | Release/packaging | Both `release:check` scripts, verify versioned docs |
324
+ | Security surfaces | Include boundary and failure-mode tests |
325
+
326
+ ### Conventions
327
+
328
+ - Test files: `tests/*.test.ts`, `*.integration.test.ts`, `*.e2e.test.ts`,
329
+ `*.live.test.ts`.
330
+ - Live tests require credentials. Skip them unless your change needs them,
331
+ and state that explicitly in your handoff.
332
+ - If you skip a relevant check, state what you skipped and why.
333
+ - Never hardcode real credentials in tests. Use env vars or test fixtures.
334
+
335
+ ---
336
+
337
+ ## 9) Anti-Patterns (Do Not)
338
+
339
+ - Do not rename or relocate `templates/` files without updating
340
+ `src/workspace.ts`.
341
+ - Do not add container-only deps to root `package.json`.
342
+ - Do not grow `src/skills/skills-guard.ts` or `src/skills/skills.ts` further
343
+ without splitting.
344
+ - Do not use `@ts-nocheck` or disable lint rules without strong justification.
345
+ - Do not silently weaken security policy, approval tiers, or mount allowlists.
346
+ - Do not log secrets, tokens, or sensitive payloads — even at debug level.
347
+ - Do not modify unrelated modules "while here".
348
+ - Do not include personal identity, real phone numbers, or live config values
349
+ in tests, examples, docs, or commits.
350
+ - Do not edit `node_modules/` or vendored files.
351
+ - Do not break prompt caching: do not alter past context, change toolsets, or
352
+ rebuild system prompts mid-conversation.
353
+ - Do not return stale or mocked data for security/audit paths.
354
+
355
+ ---
356
+
357
+ ## 10) Multi-Agent Safety
358
+
359
+ When multiple agents may be working on this repo concurrently:
360
+
361
+ - **Do not** create, apply, or drop `git stash` entries unless explicitly
362
+ requested (including `git pull --rebase --autostash`).
363
+ - **Do not** switch branches or check out a different branch unless explicitly
364
+ requested.
365
+ - **Do not** create, remove, or modify `git worktree` checkouts unless
366
+ explicitly requested.
367
+ - When the user says "commit", scope to **your changes only**. When the user
368
+ says "commit all", commit everything in grouped chunks.
369
+ - When the user says "push", you may `git pull --rebase` to integrate latest
370
+ changes. Never discard other agents' work.
371
+ - When you see unrecognized files, keep going. Focus on your changes and commit
372
+ only those.
373
+ - Focus reports on your edits. End with a brief "other files present" note only
374
+ if relevant.
375
+ - Lint/format churn: if diffs are formatting-only, auto-resolve without asking.
376
+ Only ask when changes are semantic (logic/data/behavior).
377
+
378
+ ---
379
+
380
+ ## 11) Documentation Hierarchy
381
+
382
+ | Document | Audience | Purpose |
383
+ |-----------------------------|---------------------|---------------------------------|
384
+ | `README.md` | End users | Product overview, setup |
385
+ | `AGENTS.md` (this file) | Coding agents | Canonical repo instructions |
386
+ | `CLAUDE.md` | Claude Code | Thin shim → `AGENTS.md` |
387
+ | `CONTRIBUTING.md` | Human contributors | Quickstart, PR workflow |
388
+ | `SECURITY.md` | Security reviewers | Runtime security controls |
389
+ | `TRUST_MODEL.md` | Operators | Trust acceptance policy |
390
+ | `docs/development/` | Maintainers | Architecture, runtime, testing |
391
+ | `templates/*.md` | Product runtime | Agent workspace bootstrap |
392
+
393
+ ---
394
+
395
+ ## 12) Handoff Template
396
+
397
+ When handing off work (agent → agent or agent → maintainer), include:
398
+
399
+ 1. **What changed** — files touched and why.
400
+ 2. **What did not change** — scope boundaries you respected.
401
+ 3. **Validation** — which checks you ran and their results.
402
+ 4. **Skipped checks** — what you did not run and why.
403
+ 5. **Remaining risks / unknowns** — open questions or edge cases.
404
+ 6. **Next recommended action** — what to do next.
405
+
406
+ ---
407
+
408
+ ## 13) Vibe Coding Guardrails
409
+
410
+ When working in fast iterative mode:
411
+
412
+ - Keep each iteration reversible (small commits, clear rollback path).
413
+ - Validate assumptions with code search before implementing.
414
+ - Prefer deterministic behavior over clever shortcuts.
415
+ - Do not "ship and hope" on security-sensitive paths.
416
+ - If uncertain about an internal API, search `src/` for existing usage patterns
417
+ before guessing.
418
+ - If uncertain about architecture, read the type definitions in `src/types.ts`
419
+ and the workspace bootstrap in `src/workspace.ts` before implementing.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,70 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.7.0](https://github.com/HybridAIOne/hybridclaw/tree/v0.7.0)
6
+
7
+ ### Added
8
+
9
+ - **First-class agents and agent commands**: Agents now own workspaces
10
+ independently of the active model provider, with `agent` commands available
11
+ through the gateway, TUI, and Discord for inspecting, listing, creating, and
12
+ switching session bindings.
13
+ - **Agent/session dashboard split**: The `/agents` page and `/api/agents`
14
+ response now distinguish logical agents from bound sessions so operators can
15
+ see both workspace-level state and per-session runtime state.
16
+ - **Embedded admin console and full-auto sessions**: Added the `/admin` web
17
+ console plus `fullauto [status|off|on [prompt]|<prompt>]` so operators can
18
+ inspect runtime state in the browser and arm persistent background session
19
+ loops from gateway and TUI control surfaces.
20
+ - **WhatsApp channel integration and shared message routing**: Added WhatsApp
21
+ channel setup/linking plus shared `message` send routing across Discord,
22
+ WhatsApp, and local proactive channels, including local-file delivery from
23
+ workspaces and `/discord-media-cache`.
24
+ - **Inbound audio transcription**: Added multi-backend audio
25
+ transcription with local CLI auto-detect, provider fallbacks, and native
26
+ current-turn audio injection for supported local-model sessions when no
27
+ transcript backend is available.
28
+
29
+ ### Changed
30
+
31
+ - **Stable workspace identity across model/provider changes**: Session
32
+ workspaces are now keyed by agent identity instead of provider-derived agent
33
+ IDs, so switching from one backend or model family to another keeps the same
34
+ workspace and memory unless the session is explicitly rebound to another
35
+ agent.
36
+ - **Session visibility control**: Added `show all|thinking|tools|none` across
37
+ gateway, TUI, Discord, and web chat so each session can suppress thinking
38
+ previews and tool activity independently.
39
+ - **Runtime status visibility**: Shared `status` output in TUI and Discord now
40
+ includes the current session agent alongside the effective model and sandbox
41
+ state.
42
+ - **TUI streaming and thinking presentation**: TUI replies now stream as
43
+ multiline assistant output, transient thinking previews are rendered
44
+ separately from final answers, tool activity stays live during streaming, and
45
+ the thinking indicator uses the new pulsing jellyfish status line.
46
+ - **Audio/media and channel delivery flow**: Audio attachments, local media
47
+ sends, and PDF context truncation now share tighter path handling and more
48
+ consistent fallback behavior across Discord, WhatsApp, and TUI-driven turns.
49
+ - **Discord activation config cleanup**: Removed the obsolete
50
+ `discord.respondToAllMessages` config path. Guild activation now follows
51
+ `channel mode`, guild policy, and explicit free-response channel settings.
52
+
53
+ ### Fixed
54
+
55
+ - **Heartbeat/tool-call stream timeouts**: Hidden stream activity now extends
56
+ the IPC inactivity deadline even when providers emit tool-call or reasoning
57
+ chunks without visible text, preventing false heartbeat timeouts on long
58
+ local-model turns.
59
+ - **WhatsApp follow-up reliability**: Timeout, follow-up, and internal channel
60
+ handling edge cases no longer leave WhatsApp turns hanging or silently losing
61
+ queued replies.
62
+ - **Tool placeholder replies**: Placeholder `Done.` replies after failed tool
63
+ turns are now replaced with useful fallback content such as concise tool
64
+ failure summaries or derived tool results.
65
+ - **Approval/runtime hardening and redaction**: Tool-output secret redaction and
66
+ approval/runtime guards were tightened to reduce accidental leakage and make
67
+ blocked or failed actions surface more clearly.
68
+
5
69
  ## [0.6.0](https://github.com/HybridAIOne/hybridclaw/tree/v0.6.0)
6
70
 
7
71
  ### Added
package/README.md CHANGED
@@ -22,6 +22,21 @@ hybridclaw onboarding
22
22
  Prerequisites: Node.js 22. Docker is recommended when you want the default
23
23
  container sandbox.
24
24
 
25
+ ## New In 0.7.0
26
+
27
+ - **Agents are first-class**: sessions can bind to durable named agents with
28
+ their own workspaces, defaults, and memory, and the web UI now exposes both
29
+ `/agents` and `/admin` for runtime visibility.
30
+ - **Session controls are broader**: use `show all|thinking|tools|none` to tune
31
+ visible reasoning/tool activity per session and `fullauto ...` to keep a
32
+ supervised background loop running until you stop it.
33
+ - **More channels, better delivery**: WhatsApp is now a supported runtime
34
+ channel, and the shared `message` send path handles Discord, WhatsApp, local
35
+ proactive messages, workspace files, and `/discord-media-cache` consistently.
36
+ - **Audio and TUI behavior improved**: inbound audio now has layered
37
+ transcription fallbacks, and the TUI streams normal assistant output live
38
+ while keeping thinking previews and tool activity transient.
39
+
25
40
  ## HybridAI Advantage
26
41
 
27
42
  - Security-focused foundation
@@ -33,7 +48,7 @@ container sandbox.
33
48
 
34
49
  ## Architecture
35
50
 
36
- - **Gateway service** (Node.js) — shared message/command handlers, SQLite persistence (KV + semantic + knowledge graph + canonical sessions + usage events), scheduler, heartbeat, web/API, and optional Discord integration
51
+ - **Gateway service** (Node.js) — shared message/command handlers, SQLite persistence (KV + semantic + knowledge graph + canonical sessions + usage events), scheduler, heartbeat, web/API, and optional Discord and WhatsApp integration
37
52
  - **TUI client** — thin client over HTTP (`/api/chat`, `/api/command`)
38
53
  - **Container** (Docker, ephemeral) — HybridAI API client, sandboxed tool executor, and preinstalled browser automation runtime
39
54
  - Communication via file-based IPC (input.json / output.json)
@@ -65,12 +80,21 @@ hybridclaw gateway start --foreground
65
80
  hybridclaw gateway start --foreground --sandbox=host
66
81
 
67
82
  # If DISCORD_TOKEN is set, gateway auto-connects to Discord.
83
+ # If linked WhatsApp auth exists, gateway auto-connects to WhatsApp.
68
84
 
69
85
  # Start terminal adapter (optional, in a second terminal)
70
86
  hybridclaw tui
71
87
 
72
88
  # Web chat UI (built into gateway)
73
89
  # open http://127.0.0.1:9090/chat
90
+
91
+ # Agent and session dashboard
92
+ # open http://127.0.0.1:9090/agents
93
+
94
+ # Embedded admin console
95
+ # open http://127.0.0.1:9090/admin
96
+ # Includes Dashboard, Sessions, Channels, Config, Models, Scheduler, MCP, Audit, Skills, and Tools
97
+ # If WEB_API_TOKEN is unset, localhost access opens without a login prompt
74
98
  ```
75
99
 
76
100
  ## Authentication
@@ -129,6 +153,7 @@ Runtime model:
129
153
 
130
154
  - `hybridclaw gateway` is the core process and should run first.
131
155
  - If `DISCORD_TOKEN` is set, Discord runs inside gateway automatically.
156
+ - If linked WhatsApp auth exists under `~/.hybridclaw/credentials/whatsapp`, WhatsApp runs inside gateway automatically.
132
157
  - `hybridclaw tui` is a thin client that connects to the gateway.
133
158
  - `hybridclaw gateway` and `hybridclaw tui` validate the container image at startup.
134
159
  - `container.sandboxMode` defaults to `container`, but if HybridClaw is already running inside a container and the setting is not explicitly pinned, the gateway auto-switches to `host` to avoid Docker-in-Docker.
@@ -147,10 +172,13 @@ HybridClaw creates `~/.hybridclaw/config.json` on first run and hot-reloads most
147
172
  - 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
173
  - `mcpServers.*` declares Model Context Protocol servers that HybridClaw connects to per session and exposes as namespaced tools (`server__tool`).
149
174
  - `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.
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`.
175
+ - `media.audio` controls shared inbound audio transcription. By default it auto-detects local CLIs first (`sherpa-onnx-offline`, `whisper-cli`, `whisper`), then `gemini`, then provider keys (`openai`, `groq`, `deepgram`, `google`).
176
+ - `whisper-cli` auto-detect also needs a whisper.cpp model file. If the binary exists but HybridClaw still skips local transcription, set `WHISPER_CPP_MODEL` to a local `ggml-*.bin` model path.
177
+ - If no transcript backend is available, the container will now try native model audio input before tool-use fallback for supported local providers. Today that fallback is enabled for `vllm` sessions and uses the original current-turn audio attachment.
178
+ - Keep runtime secrets in `~/.hybridclaw/credentials.json` (`HYBRIDAI_API_KEY`, `OPENAI_API_KEY`, `GROQ_API_KEY`, `DEEPGRAM_API_KEY`, `GEMINI_API_KEY`, `GOOGLE_API_KEY`, `DISCORD_TOKEN`). Codex OAuth sessions are stored separately in `~/.hybridclaw/codex-auth.json`.
151
179
  - Trust-model acceptance is stored in `~/.hybridclaw/config.json` under `security.*` and is required before runtime starts.
152
180
  - See [TRUST_MODEL.md](./TRUST_MODEL.md) for onboarding acceptance policy and [SECURITY.md](./SECURITY.md) for technical security guidelines.
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).
181
+ - For contributor workflow, see [CONTRIBUTING.md](./CONTRIBUTING.md). For deeper runtime, skills, release, voice/TTS, and maintainer reference docs, see [docs/development/README.md](./docs/development/README.md).
154
182
 
155
183
  ## Local Provider Quickstart (LM Studio Example)
156
184
 
@@ -320,10 +348,15 @@ CLI runtime commands:
320
348
  - `hybridclaw gateway stop` — Stop managed gateway backend process
321
349
  - `hybridclaw gateway status` — Show lifecycle/API status
322
350
  - `hybridclaw gateway <command...>` — Send a command to a running gateway (for example `sessions`, `bot info`)
351
+ - `hybridclaw gateway agent [list|switch <id>|create <id> [--model <model>]]` — Inspect or change the current session-to-agent binding
352
+ - `hybridclaw gateway show [all|thinking|tools|none]` — Control visible thinking/tool activity for the current session
353
+ - `hybridclaw gateway fullauto [status|off|on [prompt]|<prompt>]` — Enable, inspect, or disable session full-auto mode
323
354
  - `hybridclaw gateway compact` — Archive older session history into semantic memory while preserving a recent active context tail
324
355
  - `hybridclaw gateway reset [yes|no]` — Clear session history, reset per-session model/chatbot/RAG settings, and remove the current agent workspace (confirmation required)
325
356
  - `hybridclaw tui` — Start terminal client connected to gateway
326
357
  - `hybridclaw onboarding` — Run HybridAI account/API key onboarding
358
+ - `hybridclaw channels discord setup [--token <token>] [--allow-user-id <snowflake>]... [--prefix <prefix>]` — Prepare restricted command-only Discord config and print bot/token next steps
359
+ - `hybridclaw channels whatsapp setup [--reset] [--allow-from <+E164>]...` — Prepare private-by-default WhatsApp config, enable the default `👀` ack reaction, optionally wipe stale auth, open a temporary pairing session, and print the QR code
327
360
  - `hybridclaw local status` — Show current local backend config and default model
328
361
  - `hybridclaw local configure <backend> <model-id> [--base-url <url>] [--api-key <key>] [--no-default]` — Enable and configure a local backend
329
362
  - `hybridclaw hybridai login [--device-code|--browser|--import]` — Store HybridAI API credentials via browser-assisted, headless/manual, or env-import flows
@@ -341,9 +374,15 @@ CLI runtime commands:
341
374
  In Discord, use `!claw help` or the slash commands. Key ones:
342
375
 
343
376
  - `!claw <message>` — Talk to the agent
377
+ - `/agent` or `!claw agent` — Show the current session agent and workspace
378
+ - `/agent list` or `!claw agent list` — List configured agents
379
+ - `/agent switch <id>` or `!claw agent switch <id>` — Rebind this session to another agent workspace
380
+ - `/agent create <id> [--model <model>]` or `!claw agent create <id> [--model <model>]` — Create a new agent with its own workspace
344
381
  - `!claw bot set <id>` — Set chatbot for this channel
345
382
  - `!claw model set <name>` — Set model for this channel
346
383
  - `!claw rag on/off` — Toggle RAG
384
+ - `/show <all|thinking|tools|none>` or `!claw show <all|thinking|tools|none>` — Control visible thinking/tool activity for this session
385
+ - `!claw fullauto [status|off|on [prompt]|<prompt>]` — Enable, inspect, or disable session full-auto mode
347
386
  - `!claw compact` — Archive older history into session memory and keep a recent working tail
348
387
  - `/reset` or `!claw reset` — Clear history, reset per-session model/bot settings, and remove the current agent workspace (confirmation required)
349
388
  - `!claw clear` — Clear conversation history
@@ -359,5 +398,9 @@ In Discord, use `!claw help` or the slash commands. Key ones:
359
398
  - `!claw schedule add at "<ISO time>" <prompt>` — Add one-shot task
360
399
  - `!claw schedule add every <ms> <prompt>` — Add interval task
361
400
 
362
- In the TUI, use `/compact` for session compaction, `/reset` for the confirmed
363
- workspace reset flow, and `/mcp ...` for runtime MCP management.
401
+ In the TUI, use `/agent`, `/agent list`, `/agent switch <id>`, and
402
+ `/agent create <id> [--model <model>]` for agent control; `/status` shows both
403
+ the current session and agent; `/show [all|thinking|tools|none]` controls
404
+ visible thinking/tool activity; `/fullauto [status|off|on [prompt]|prompt]`
405
+ manages full-auto mode; `/compact` handles session compaction; `/reset` runs
406
+ the confirmed workspace reset flow; and `/mcp ...` manages runtime MCP servers.