agent-nuvira 3.3.3 → 3.3.4

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 (349) hide show
  1. package/README.md +13 -5
  2. package/dist/agent-sdk/src/agent.d.ts +2 -0
  3. package/dist/agent-sdk/src/agent.d.ts.map +1 -1
  4. package/dist/agent-sdk/src/define.d.ts +64 -0
  5. package/dist/agent-sdk/src/define.d.ts.map +1 -0
  6. package/dist/agent-sdk/src/define.js +76 -0
  7. package/dist/agent-sdk/src/define.js.map +1 -0
  8. package/dist/agent-sdk/src/index.d.ts +9 -0
  9. package/dist/agent-sdk/src/index.d.ts.map +1 -1
  10. package/dist/agent-sdk/src/index.js +9 -0
  11. package/dist/agent-sdk/src/index.js.map +1 -1
  12. package/dist/agent-sdk/src/scaffold.d.ts +11 -0
  13. package/dist/agent-sdk/src/scaffold.d.ts.map +1 -1
  14. package/dist/agent-sdk/src/scaffold.js +16 -6
  15. package/dist/agent-sdk/src/scaffold.js.map +1 -1
  16. package/dist/agents/long-form-plan.d.ts.map +1 -1
  17. package/dist/agents/long-form-plan.js +2 -1
  18. package/dist/agents/long-form-plan.js.map +1 -1
  19. package/dist/agents/orchestrator.d.ts.map +1 -1
  20. package/dist/agents/orchestrator.js +5 -4
  21. package/dist/agents/orchestrator.js.map +1 -1
  22. package/dist/cli/agent.d.ts +2 -2
  23. package/dist/cli/agent.js +10 -10
  24. package/dist/cli/chat.d.ts +94 -0
  25. package/dist/cli/chat.d.ts.map +1 -1
  26. package/dist/cli/chat.js +354 -20
  27. package/dist/cli/chat.js.map +1 -1
  28. package/dist/cli/cli-program.d.ts.map +1 -1
  29. package/dist/cli/cli-program.js +5 -0
  30. package/dist/cli/cli-program.js.map +1 -1
  31. package/dist/cli/config.d.ts.map +1 -1
  32. package/dist/cli/config.js +9 -1
  33. package/dist/cli/config.js.map +1 -1
  34. package/dist/cli/doctor.d.ts.map +1 -1
  35. package/dist/cli/doctor.js +3 -2
  36. package/dist/cli/doctor.js.map +1 -1
  37. package/dist/cli/edit.js +2 -2
  38. package/dist/cli/eval.d.ts +17 -0
  39. package/dist/cli/eval.d.ts.map +1 -1
  40. package/dist/cli/eval.js +105 -2
  41. package/dist/cli/eval.js.map +1 -1
  42. package/dist/cli/execute.d.ts +16 -1
  43. package/dist/cli/execute.d.ts.map +1 -1
  44. package/dist/cli/execute.js +192 -22
  45. package/dist/cli/execute.js.map +1 -1
  46. package/dist/cli/loop-executor.d.ts +55 -0
  47. package/dist/cli/loop-executor.d.ts.map +1 -1
  48. package/dist/cli/loop-executor.js +212 -13
  49. package/dist/cli/loop-executor.js.map +1 -1
  50. package/dist/cli/model.d.ts.map +1 -1
  51. package/dist/cli/model.js +9 -8
  52. package/dist/cli/model.js.map +1 -1
  53. package/dist/cli/models.d.ts +1 -1
  54. package/dist/cli/models.js +4 -4
  55. package/dist/cli/parity.d.ts +85 -0
  56. package/dist/cli/parity.d.ts.map +1 -0
  57. package/dist/cli/parity.js +506 -0
  58. package/dist/cli/parity.js.map +1 -0
  59. package/dist/cli/plan.d.ts.map +1 -1
  60. package/dist/cli/plan.js +2 -1
  61. package/dist/cli/plan.js.map +1 -1
  62. package/dist/cli/retrieval.d.ts.map +1 -1
  63. package/dist/cli/retrieval.js +5 -4
  64. package/dist/cli/retrieval.js.map +1 -1
  65. package/dist/cli/sdk.js +4 -4
  66. package/dist/cli/sdk.js.map +1 -1
  67. package/dist/cli/trace.d.ts.map +1 -1
  68. package/dist/cli/trace.js +2 -1
  69. package/dist/cli/trace.js.map +1 -1
  70. package/dist/cli/workflow.js +2 -2
  71. package/dist/cli/workflow.js.map +1 -1
  72. package/dist/config/types.d.ts +44 -0
  73. package/dist/config/types.d.ts.map +1 -1
  74. package/dist/findings/verdicts.d.ts +241 -0
  75. package/dist/findings/verdicts.d.ts.map +1 -0
  76. package/dist/findings/verdicts.js +284 -0
  77. package/dist/findings/verdicts.js.map +1 -0
  78. package/dist/gateway/adapters.d.ts +65 -0
  79. package/dist/gateway/adapters.d.ts.map +1 -1
  80. package/dist/gateway/adapters.js +216 -10
  81. package/dist/gateway/adapters.js.map +1 -1
  82. package/dist/gateway/channel-directory.d.ts +31 -0
  83. package/dist/gateway/channel-directory.d.ts.map +1 -1
  84. package/dist/gateway/channel-directory.js +40 -0
  85. package/dist/gateway/channel-directory.js.map +1 -1
  86. package/dist/gateway/gateway-log.d.ts +1 -1
  87. package/dist/gateway/gateway-log.d.ts.map +1 -1
  88. package/dist/gateway/gateway-log.js.map +1 -1
  89. package/dist/gateway/hooks.d.ts +87 -19
  90. package/dist/gateway/hooks.d.ts.map +1 -1
  91. package/dist/gateway/hooks.js +62 -23
  92. package/dist/gateway/hooks.js.map +1 -1
  93. package/dist/gateway/inbound-media.d.ts +147 -0
  94. package/dist/gateway/inbound-media.d.ts.map +1 -0
  95. package/dist/gateway/inbound-media.js +317 -0
  96. package/dist/gateway/inbound-media.js.map +1 -0
  97. package/dist/gateway/inbox.d.ts +8 -1
  98. package/dist/gateway/inbox.d.ts.map +1 -1
  99. package/dist/gateway/inbox.js.map +1 -1
  100. package/dist/gateway/platform-config.d.ts +14 -0
  101. package/dist/gateway/platform-config.d.ts.map +1 -1
  102. package/dist/gateway/platform-config.js +26 -8
  103. package/dist/gateway/platform-config.js.map +1 -1
  104. package/dist/gateway/realtime.d.ts +114 -0
  105. package/dist/gateway/realtime.d.ts.map +1 -0
  106. package/dist/gateway/realtime.js +402 -0
  107. package/dist/gateway/realtime.js.map +1 -0
  108. package/dist/gateway/registry.d.ts +31 -0
  109. package/dist/gateway/registry.d.ts.map +1 -1
  110. package/dist/gateway/registry.js +224 -4
  111. package/dist/gateway/registry.js.map +1 -1
  112. package/dist/gateway/whatsapp/baileys-bridge.d.ts +11 -1
  113. package/dist/gateway/whatsapp/baileys-bridge.d.ts.map +1 -1
  114. package/dist/gateway/whatsapp/baileys-bridge.js +123 -4
  115. package/dist/gateway/whatsapp/baileys-bridge.js.map +1 -1
  116. package/dist/gateway/whatsapp/bridge.d.ts +6 -2
  117. package/dist/gateway/whatsapp/bridge.d.ts.map +1 -1
  118. package/dist/gateway/whatsapp/bridge.js.map +1 -1
  119. package/dist/index.js +8 -0
  120. package/dist/index.js.map +1 -1
  121. package/dist/inference/factory.d.ts +14 -0
  122. package/dist/inference/factory.d.ts.map +1 -1
  123. package/dist/inference/factory.js +17 -0
  124. package/dist/inference/factory.js.map +1 -1
  125. package/dist/inference/groq-adapter.d.ts +2 -0
  126. package/dist/inference/groq-adapter.d.ts.map +1 -1
  127. package/dist/inference/groq-adapter.js +16 -6
  128. package/dist/inference/groq-adapter.js.map +1 -1
  129. package/dist/inference/tools.d.ts.map +1 -1
  130. package/dist/inference/tools.js +29 -0
  131. package/dist/inference/tools.js.map +1 -1
  132. package/dist/learning/benchmark.d.ts.map +1 -1
  133. package/dist/learning/benchmark.js +3 -2
  134. package/dist/learning/benchmark.js.map +1 -1
  135. package/dist/learning/continuation.d.ts.map +1 -1
  136. package/dist/learning/continuation.js +2 -1
  137. package/dist/learning/continuation.js.map +1 -1
  138. package/dist/learning/cost-tracker.d.ts.map +1 -1
  139. package/dist/learning/cost-tracker.js +2 -1
  140. package/dist/learning/cost-tracker.js.map +1 -1
  141. package/dist/learning/deferred-task.d.ts.map +1 -1
  142. package/dist/learning/deferred-task.js +13 -4
  143. package/dist/learning/deferred-task.js.map +1 -1
  144. package/dist/learning/eval-framework.d.ts.map +1 -1
  145. package/dist/learning/eval-framework.js +2 -1
  146. package/dist/learning/eval-framework.js.map +1 -1
  147. package/dist/learning/long-form.d.ts.map +1 -1
  148. package/dist/learning/long-form.js +2 -1
  149. package/dist/learning/long-form.js.map +1 -1
  150. package/dist/learning/model-registry.d.ts.map +1 -1
  151. package/dist/learning/model-registry.js +2 -1
  152. package/dist/learning/model-registry.js.map +1 -1
  153. package/dist/learning/reasoning-cache.d.ts.map +1 -1
  154. package/dist/learning/reasoning-cache.js +2 -1
  155. package/dist/learning/reasoning-cache.js.map +1 -1
  156. package/dist/learning/reasoning-trace.d.ts +37 -1
  157. package/dist/learning/reasoning-trace.d.ts.map +1 -1
  158. package/dist/learning/reasoning-trace.js +66 -0
  159. package/dist/learning/reasoning-trace.js.map +1 -1
  160. package/dist/learning/resilient-call.d.ts.map +1 -1
  161. package/dist/learning/resilient-call.js +2 -1
  162. package/dist/learning/resilient-call.js.map +1 -1
  163. package/dist/learning/retrieval.d.ts.map +1 -1
  164. package/dist/learning/retrieval.js +2 -1
  165. package/dist/learning/retrieval.js.map +1 -1
  166. package/dist/learning/seeded-benchmark.d.ts +160 -0
  167. package/dist/learning/seeded-benchmark.d.ts.map +1 -0
  168. package/dist/learning/seeded-benchmark.js +321 -0
  169. package/dist/learning/seeded-benchmark.js.map +1 -0
  170. package/dist/learning/seeded-bugs.d.ts +142 -0
  171. package/dist/learning/seeded-bugs.d.ts.map +1 -0
  172. package/dist/learning/seeded-bugs.js +535 -0
  173. package/dist/learning/seeded-bugs.js.map +1 -0
  174. package/dist/learning/step-checkpoint.d.ts +127 -0
  175. package/dist/learning/step-checkpoint.d.ts.map +1 -0
  176. package/dist/learning/step-checkpoint.js +244 -0
  177. package/dist/learning/step-checkpoint.js.map +1 -0
  178. package/dist/nlu/intent-confirm.d.ts +23 -1
  179. package/dist/nlu/intent-confirm.d.ts.map +1 -1
  180. package/dist/nlu/intent-confirm.js +85 -2
  181. package/dist/nlu/intent-confirm.js.map +1 -1
  182. package/dist/nlu/learnings.d.ts +7 -0
  183. package/dist/nlu/learnings.d.ts.map +1 -1
  184. package/dist/nlu/learnings.js +7 -0
  185. package/dist/nlu/learnings.js.map +1 -1
  186. package/dist/observability/debug-log.d.ts +250 -0
  187. package/dist/observability/debug-log.d.ts.map +1 -0
  188. package/dist/observability/debug-log.js +500 -0
  189. package/dist/observability/debug-log.js.map +1 -0
  190. package/dist/observability/event-bus.d.ts.map +1 -1
  191. package/dist/observability/event-bus.js +4 -1
  192. package/dist/observability/event-bus.js.map +1 -1
  193. package/dist/observability/otel.d.ts +278 -0
  194. package/dist/observability/otel.d.ts.map +1 -0
  195. package/dist/observability/otel.js +590 -0
  196. package/dist/observability/otel.js.map +1 -0
  197. package/dist/parity/drivers.d.ts +99 -0
  198. package/dist/parity/drivers.d.ts.map +1 -0
  199. package/dist/parity/drivers.js +1362 -0
  200. package/dist/parity/drivers.js.map +1 -0
  201. package/dist/parity/graph.d.ts +73 -0
  202. package/dist/parity/graph.d.ts.map +1 -0
  203. package/dist/parity/graph.js +162 -0
  204. package/dist/parity/graph.js.map +1 -0
  205. package/dist/parity/matrix.d.ts +105 -0
  206. package/dist/parity/matrix.d.ts.map +1 -0
  207. package/dist/parity/matrix.js +352 -0
  208. package/dist/parity/matrix.js.map +1 -0
  209. package/dist/parity/observation.d.ts +444 -0
  210. package/dist/parity/observation.d.ts.map +1 -0
  211. package/dist/parity/observation.js +333 -0
  212. package/dist/parity/observation.js.map +1 -0
  213. package/dist/parity/scenarios.d.ts +229 -0
  214. package/dist/parity/scenarios.d.ts.map +1 -0
  215. package/dist/parity/scenarios.js +175 -0
  216. package/dist/parity/scenarios.js.map +1 -0
  217. package/dist/parity/surfaces.d.ts +122 -0
  218. package/dist/parity/surfaces.d.ts.map +1 -0
  219. package/dist/parity/surfaces.js +190 -0
  220. package/dist/parity/surfaces.js.map +1 -0
  221. package/dist/runtime/fault-injection.d.ts +173 -0
  222. package/dist/runtime/fault-injection.d.ts.map +1 -0
  223. package/dist/runtime/fault-injection.js +281 -0
  224. package/dist/runtime/fault-injection.js.map +1 -0
  225. package/dist/tools/child-agent-entry.d.ts +23 -0
  226. package/dist/tools/child-agent-entry.d.ts.map +1 -0
  227. package/dist/tools/child-agent-entry.js +129 -0
  228. package/dist/tools/child-agent-entry.js.map +1 -0
  229. package/dist/tools/child-agent-runtime.d.ts +124 -0
  230. package/dist/tools/child-agent-runtime.d.ts.map +1 -0
  231. package/dist/tools/child-agent-runtime.js +704 -0
  232. package/dist/tools/child-agent-runtime.js.map +1 -0
  233. package/dist/tools/coding-tools.d.ts.map +1 -1
  234. package/dist/tools/coding-tools.js +82 -10
  235. package/dist/tools/coding-tools.js.map +1 -1
  236. package/dist/tools/delegation-system.d.ts +31 -0
  237. package/dist/tools/delegation-system.d.ts.map +1 -1
  238. package/dist/tools/delegation-system.js +70 -9
  239. package/dist/tools/delegation-system.js.map +1 -1
  240. package/dist/tools/extract/docx.d.ts +27 -0
  241. package/dist/tools/extract/docx.d.ts.map +1 -0
  242. package/dist/tools/extract/docx.js +48 -0
  243. package/dist/tools/extract/docx.js.map +1 -0
  244. package/dist/tools/extract/html-text.d.ts +27 -0
  245. package/dist/tools/extract/html-text.d.ts.map +1 -0
  246. package/dist/tools/extract/html-text.js +86 -0
  247. package/dist/tools/extract/html-text.js.map +1 -0
  248. package/dist/tools/extract/pdf-ocr.d.ts +58 -0
  249. package/dist/tools/extract/pdf-ocr.d.ts.map +1 -0
  250. package/dist/tools/extract/pdf-ocr.js +116 -0
  251. package/dist/tools/extract/pdf-ocr.js.map +1 -0
  252. package/dist/tools/extract/pdf.d.ts +65 -0
  253. package/dist/tools/extract/pdf.d.ts.map +1 -0
  254. package/dist/tools/extract/pdf.js +197 -0
  255. package/dist/tools/extract/pdf.js.map +1 -0
  256. package/dist/tools/extract/pptx.d.ts +32 -0
  257. package/dist/tools/extract/pptx.d.ts.map +1 -0
  258. package/dist/tools/extract/pptx.js +77 -0
  259. package/dist/tools/extract/pptx.js.map +1 -0
  260. package/dist/tools/extract/xlsx.d.ts +47 -0
  261. package/dist/tools/extract/xlsx.d.ts.map +1 -0
  262. package/dist/tools/extract/xlsx.js +111 -0
  263. package/dist/tools/extract/xlsx.js.map +1 -0
  264. package/dist/tools/finding-tool.d.ts +76 -0
  265. package/dist/tools/finding-tool.d.ts.map +1 -0
  266. package/dist/tools/finding-tool.js +125 -0
  267. package/dist/tools/finding-tool.js.map +1 -0
  268. package/dist/tools/messaging-tools.d.ts +41 -11
  269. package/dist/tools/messaging-tools.d.ts.map +1 -1
  270. package/dist/tools/messaging-tools.js +104 -55
  271. package/dist/tools/messaging-tools.js.map +1 -1
  272. package/dist/tools/neutts-synth.d.ts +27 -3
  273. package/dist/tools/neutts-synth.d.ts.map +1 -1
  274. package/dist/tools/neutts-synth.js +57 -13
  275. package/dist/tools/neutts-synth.js.map +1 -1
  276. package/dist/tools/pipeline-tool.d.ts +43 -1
  277. package/dist/tools/pipeline-tool.d.ts.map +1 -1
  278. package/dist/tools/pipeline-tool.js +13 -2
  279. package/dist/tools/pipeline-tool.js.map +1 -1
  280. package/dist/tools/read-extract.d.ts +116 -45
  281. package/dist/tools/read-extract.d.ts.map +1 -1
  282. package/dist/tools/read-extract.js +494 -158
  283. package/dist/tools/read-extract.js.map +1 -1
  284. package/dist/tools/registry.d.ts +2 -2
  285. package/dist/tools/registry.d.ts.map +1 -1
  286. package/dist/tools/registry.js +152 -23
  287. package/dist/tools/registry.js.map +1 -1
  288. package/dist/tools/subagent-refusal.d.ts +15 -0
  289. package/dist/tools/subagent-refusal.d.ts.map +1 -0
  290. package/dist/tools/subagent-refusal.js +18 -0
  291. package/dist/tools/subagent-refusal.js.map +1 -0
  292. package/dist/tools/subagent-spawner.d.ts +122 -0
  293. package/dist/tools/subagent-spawner.d.ts.map +1 -1
  294. package/dist/tools/subagent-spawner.js +249 -28
  295. package/dist/tools/subagent-spawner.js.map +1 -1
  296. package/dist/tools/tool-hooks.d.ts +177 -0
  297. package/dist/tools/tool-hooks.d.ts.map +1 -0
  298. package/dist/tools/tool-hooks.js +427 -0
  299. package/dist/tools/tool-hooks.js.map +1 -0
  300. package/dist/tools/tool-loop.d.ts +82 -0
  301. package/dist/tools/tool-loop.d.ts.map +1 -1
  302. package/dist/tools/tool-loop.js +167 -9
  303. package/dist/tools/tool-loop.js.map +1 -1
  304. package/dist/tools/tool-refusal.d.ts +68 -0
  305. package/dist/tools/tool-refusal.d.ts.map +1 -0
  306. package/dist/tools/tool-refusal.js +78 -0
  307. package/dist/tools/tool-refusal.js.map +1 -0
  308. package/dist/tools/toolsets.d.ts +8 -0
  309. package/dist/tools/toolsets.d.ts.map +1 -1
  310. package/dist/tools/toolsets.js +12 -2
  311. package/dist/tools/toolsets.js.map +1 -1
  312. package/dist/tools/vision-tools.d.ts +88 -83
  313. package/dist/tools/vision-tools.d.ts.map +1 -1
  314. package/dist/tools/vision-tools.js +134 -103
  315. package/dist/tools/vision-tools.js.map +1 -1
  316. package/dist/tools/worktree.d.ts +210 -0
  317. package/dist/tools/worktree.d.ts.map +1 -0
  318. package/dist/tools/worktree.js +374 -0
  319. package/dist/tools/worktree.js.map +1 -0
  320. package/dist/utils/format.d.ts +3 -0
  321. package/dist/utils/format.d.ts.map +1 -0
  322. package/dist/utils/format.js +32 -0
  323. package/dist/utils/format.js.map +1 -0
  324. package/dist/web-dashboard/attachment-extract.d.ts +64 -0
  325. package/dist/web-dashboard/attachment-extract.d.ts.map +1 -0
  326. package/dist/web-dashboard/attachment-extract.js +154 -0
  327. package/dist/web-dashboard/attachment-extract.js.map +1 -0
  328. package/dist/web-dashboard/chat-console.d.ts +108 -1
  329. package/dist/web-dashboard/chat-console.d.ts.map +1 -1
  330. package/dist/web-dashboard/chat-console.js +36 -0
  331. package/dist/web-dashboard/chat-console.js.map +1 -1
  332. package/dist/web-dashboard/hub-data.d.ts +37 -0
  333. package/dist/web-dashboard/hub-data.d.ts.map +1 -1
  334. package/dist/web-dashboard/hub-data.js +61 -1
  335. package/dist/web-dashboard/hub-data.js.map +1 -1
  336. package/dist/web-dashboard/server.d.ts +14 -0
  337. package/dist/web-dashboard/server.d.ts.map +1 -1
  338. package/dist/web-dashboard/server.js +247 -13
  339. package/dist/web-dashboard/server.js.map +1 -1
  340. package/dist/web-dashboard/src/types.d.ts +196 -48
  341. package/dist/web-dashboard/src/types.d.ts.map +1 -1
  342. package/package.json +18 -3
  343. package/src/web-dashboard/public/assets/{index-Cyd6tIew.css → index-XJjj2cBX.css} +1 -1
  344. package/src/web-dashboard/public/assets/index-YWF9FpwQ.js +207 -0
  345. package/src/web-dashboard/public/assets/index-YWF9FpwQ.js.map +1 -0
  346. package/src/web-dashboard/public/index.html +2 -2
  347. package/dist/tools/child-agent-worker.js +0 -212
  348. package/src/web-dashboard/public/assets/index-CxDj7p6i.js +0 -207
  349. package/src/web-dashboard/public/assets/index-CxDj7p6i.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"read-extract.js","sourceRoot":"","sources":["../../src/tools/read-extract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAmB7B,+EAA+E;AAE/E,MAAM,kBAAkB;IACd,gBAAgB,GAAG,IAAI,GAAG,CAAC;QACjC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;QACrF,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;KAClC,CAAC,CAAC;IAEH;;OAEG;IACH,KAAK,CAAC,OAAO,CAAC,QAAgB;QAC5B,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;QAEjD,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACpC,OAAO;gBACL,IAAI,EAAE,EAAE;gBACR,MAAM,EAAE,GAAG;gBACX,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,uBAAuB,GAAG,gBAAgB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;aAChG,CAAC;QACJ,CAAC;QAED,IAAI,CAAC;YACH,QAAQ,GAAG,EAAE,CAAC;gBACZ,KAAK,MAAM,CAAC;gBACZ,KAAK,KAAK,CAAC;gBACX,KAAK,WAAW;oBACd,OAAO,IAAI,CAA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KAAK,GAAG,EAAE,CAAC;YACtB,QAAQ,GAAG,IAAI,CAAC;QAClB,CAAC;aAAM,IAAI,EAAE,KAAK,SAAS,EAAE,CAAC;YAC5B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YACzB,KAAK,GAAG,EAAE,CAAC;QACb,CAAC;aAAM,CAAC;YACN,KAAK,IAAI,EAAE,CAAC;QACd,CAAC;IACH,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IACzB,OAAO,KAAK,CAAC;AACf,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,iBAAiB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACtC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,QAAgB;IACrD,OAAO,qBAAqB,EAAE,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AAC7D,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,qBAAqB;IACnC,OAAO,qBAAqB,EAAE,CAAC,mBAAmB,EAAE,CAAC;AACvD,CAAC;AAED,+EAA+E;AAE/E,IAAI,SAAS,GAA8B,IAAI,CAAC;AAEhD,MAAM,UAAU,qBAAqB;IACnC,IAAI,CAAC,SAAS;QAAE,SAAS,GAAG,IAAI,kBAAkB,EAAE,CAAC;IACrD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,CAAC"}
@@ -373,9 +373,9 @@ export declare function toolJsonSchemas(toolNames?: string[]): ToolJsonSchema[];
373
373
  * calling suggest_followups with exactly 3 followups, and clarifies ambiguous
374
374
  * requests via ask_user instead of guessing.
375
375
  */
376
- export declare const TOOL_CONTRACT = "You have tools available. Call them when appropriate.\n\n- If a request is ambiguous or incomplete, call `ask_user` with a question and 2\u20134 choices \u2014 never guess, never ask in plain text.\n- If a request needs code written, debugged, or prior work resumed, call `build`, `repair`, or `resume` with the goal.\n- If a request needs documentation, a website, analysis of a project, or running tests, call `document`, `website`, `analyze`, or `test` with the goal.\n- If a request asks to publish a release (npm/GitHub), call `publish`. It leaves this machine and is irreversible \u2014 confirm the bump type and target with the user via `ask_user` first unless they already specified them.\n- If a request's completeness is uncertain, call `verify_requirement` first.\n- If a request asks to deliver a message or result to a DIFFERENT contact/channel than the one you are currently chatting on (WhatsApp, Telegram, Slack, email, \u2026), call `gateway_send` with the target (e.g. `whatsapp:Alex`) and the text. Do NOT call gateway_send to reply to the CURRENT conversation \u2014 your text response is automatically delivered back. If the target contact is not configured, tell the user what to set up.\n- If a request asks to manage the system/agent itself in plain English \u2014 start/stop the dashboard or gateway, check status, add/remove a verified sender, configure a platform (telegram/whatsapp), run evals, show stats \u2014 call `run_cli` with the plain-English ask. It resolves the exact `nuvira` command and runs it. If the user's own request already resolves to that command (\"stop the dashboard\"), it just runs \u2014 do not ask for permission to do what was just asked. If it reports AMBIGUOUS, call `ask_user` with the two choices; if the intent is one YOU chose rather than the user (or is irreversible: history.clear, memory.prune, stats.cost.clear, publish), call `ask_user` first and retry with confirm:true.\n- If a subtask can be delegated to a specialized sub-agent (gather context, review, security scan, run tests), call `delegate` with the agent type, a focused prompt, and optional file paths.\n- To find code matching a pattern (context gathering, locating definitions/usages), call `code_search` with the pattern and optional globs.\n- To READ the project: call `read_file` to open a file (with line numbers), `list_dir` to see a directory's contents, or `glob` to find files by pattern. Always prefer reading the actual file over assuming its contents \u2014 a large file reports a line range, continue with offset/limit.\n- To CHANGE code (after reading it): call `edit_file` for a surgical exact-text replacement, or `write_file` to create/replace a file. CREATING a file the request asked for is applied directly \u2014 no confirmation needed, so just call it. An `edit_file` that is surgical (small relative to the file) also applies directly, as does one on a file the request names \u2014 the verify loop must not need a human between iterations. A whole-file write over existing content, or an edit that rewrites most of a file, refuses without confirm \u2014 call `ask_user` with a one-line summary, then retry with confirm:true.\n- NEVER ask for permission to do work the user already asked for \u2014 not via `ask_user` and never in plain text. Decide it yourself, state the decision in your answer, and continue. Reserve `ask_user` for a decision that is genuinely the user's: it cannot proceed without an answer, it is high-impact AND irreversible, and there is no sensible default (overwriting existing work, deleting data, spending money, publishing).\n- To VERIFY code by actual invocation: call `run_terminal` with the real command (`npx vitest run tests/x.test.ts`, `npx tsc --noEmit`, `npm run build`, `git diff`). Read-only verify commands run directly, and so do recoverable workspace commands (`npm/pnpm/yarn/bun install`, `pip install`, `mkdir`, `touch`, `cp`, `mv`, `git add`, `npm init`) when the request authorized the work \u2014 the build you were asked for is your job to set up. Everything else state-changing (network fetches, arbitrary code, global installs, anything leaving the machine) needs confirm:true after the user approves via ask_user. Never guess that a test passes \u2014 run it and read the output. Use run_cli (not run_terminal) for buff/agent-nuvira control commands, and the `git` tool (not run_terminal) to commit.\n- END EVERY RESPONSE by calling `suggest_followups` with exactly 3 followups the user is likely to want next \u2014 natural next questions, deeper dives, or related directions that build on what you just said; specific to this conversation, not generic.\n- If you have nothing to add, answer directly and still end with suggest_followups.\n- ORDERING (non-negotiable): deliver the user's answer FIRST, then suggest_followups. The followup call must come only AFTER the complete answer is written \u2014 never before it, never instead of it. A bare lead-in (\"Sure, I can help!\") is NOT an answer; write the full answer in the same step as the followup call.";
376
+ export declare const TOOL_CONTRACT = "You have tools available. Call them when appropriate.\n\n- If a request is ambiguous or incomplete, call `ask_user` with a question and 2\u20134 choices \u2014 never guess, never ask in plain text.\n- If a request needs code written, debugged, or prior work resumed, call `build`, `repair`, or `resume` with the goal.\n- If a request needs documentation, a website, analysis of a project, or running tests, call `document`, `website`, `analyze`, or `test` with the goal.\n- If a request asks to publish a release (npm/GitHub), call `publish`. It leaves this machine and is irreversible \u2014 confirm the bump type and target with the user via `ask_user` first unless they already specified them.\n- When your answer ASSERTS something a second party could check (a test passed, a file contains X, the count is N, a command was run), call `finding` with the claim, what became of it, and the evidence you ACTUALLY checked \u2014 the command and its real output, the path you read, a quote from the request. Usable evidence records it CONFIRMED; with none it is recorded PLAUSIBLE, which is the honest result for a reasoned guess. You cannot set the verdict and must never claim a check you did not perform.\n- If a request's completeness is uncertain, call `verify_requirement` first.\n- If a request asks to deliver a message or result to a DIFFERENT contact/channel than the one you are currently chatting on (WhatsApp, Telegram, Slack, email, \u2026), call `gateway_send` with the target (e.g. `whatsapp:Alex`) and the text. Do NOT call gateway_send to reply to the CURRENT conversation \u2014 your text response is automatically delivered back. If the target contact is not configured, tell the user what to set up.\n- If a request asks to manage the system/agent itself in plain English \u2014 start/stop the dashboard or gateway, check status, add/remove a verified sender, configure a platform (telegram/whatsapp), run evals, show stats \u2014 call `run_cli` with the plain-English ask. It resolves the exact `nuvira` command and runs it. If the user's own request already resolves to that command (\"stop the dashboard\"), it just runs \u2014 do not ask for permission to do what was just asked. If it reports AMBIGUOUS, call `ask_user` with the two choices; if the intent is one YOU chose rather than the user (or is irreversible: history.clear, memory.prune, stats.cost.clear, publish), call `ask_user` first and retry with confirm:true.\n- If a subtask can be delegated to a specialized sub-agent (gather context, review, security scan, run tests), call `delegate` with the agent type, a focused prompt, and optional file paths.\n- To find code matching a pattern (context gathering, locating definitions/usages), call `code_search` with the pattern and optional globs.\n- To READ the project: call `read_file` to open a file (with line numbers), `list_dir` to see a directory's contents, or `glob` to find files by pattern. Always prefer reading the actual file over assuming its contents \u2014 a large file reports a line range, continue with offset/limit.\n- To CHANGE code (after reading it): call `edit_file` for a surgical exact-text replacement, or `write_file` to create/replace a file. CREATING a file the request asked for is applied directly \u2014 no confirmation needed, so just call it. An `edit_file` that is surgical (small relative to the file) also applies directly, as does one on a file the request names \u2014 the verify loop must not need a human between iterations. A whole-file write over existing content, or an edit that rewrites most of a file, refuses without confirm \u2014 call `ask_user` with a one-line summary, then retry with confirm:true.\n- NEVER ask for permission to do work the user already asked for \u2014 not via `ask_user` and never in plain text. Decide it yourself, state the decision in your answer, and continue. Reserve `ask_user` for a decision that is genuinely the user's: it cannot proceed without an answer, it is high-impact AND irreversible, and there is no sensible default (overwriting existing work, deleting data, spending money, publishing).\n- To VERIFY code by actual invocation: call `run_terminal` with the real command (`npx vitest run tests/x.test.ts`, `npx tsc --noEmit`, `npm run build`, `git diff`). Read-only verify commands run directly, and so do recoverable workspace commands (`npm/pnpm/yarn/bun install`, `pip install`, `mkdir`, `touch`, `cp`, `mv`, `git add`, `npm init`) when the request authorized the work \u2014 the build you were asked for is your job to set up. Everything else state-changing (network fetches, arbitrary code, global installs, anything leaving the machine) needs confirm:true after the user approves via ask_user. Never guess that a test passes \u2014 run it and read the output. Use run_cli (not run_terminal) for buff/agent-nuvira control commands, and the `git` tool (not run_terminal) to commit.\n- END EVERY RESPONSE by calling `suggest_followups` with exactly 3 followups the user is likely to want next \u2014 natural next questions, deeper dives, or related directions that build on what you just said; specific to this conversation, not generic.\n- If you have nothing to add, answer directly and still end with suggest_followups.\n- ORDERING (non-negotiable): deliver the user's answer FIRST, then suggest_followups. The followup call must come only AFTER the complete answer is written \u2014 never before it, never instead of it. A bare lead-in (\"Sure, I can help!\") is NOT an answer; write the full answer in the same step as the followup call.";
377
377
  /** The JSON-fallback tool contract — for providers WITHOUT native tool-calling. */
378
- export declare const TOOL_CONTRACT_JSON = "You have tools available. Call them when appropriate.\n\n- If a request is ambiguous or incomplete, call `ask_user` with a question and 2\u20134 choices \u2014 never guess, never ask in plain text.\n- If a request needs code written, debugged, or prior work resumed, call `build`, `repair`, or `resume` with the goal.\n- If a request needs documentation, a website, analysis of a project, or running tests, call `document`, `website`, `analyze`, or `test` with the goal.\n- If a request asks to publish a release (npm/GitHub), call `publish`. It leaves this machine and is irreversible \u2014 confirm the bump type and target with the user via `ask_user` first unless they already specified them.\n- If a request's completeness is uncertain, call `verify_requirement` first.\n- If a request asks to deliver a message or result to a DIFFERENT contact/channel than the one you are currently chatting on (WhatsApp, Telegram, Slack, email, \u2026), call `gateway_send` with the target (e.g. `whatsapp:Alex`) and the text. Do NOT call gateway_send to reply to the CURRENT conversation \u2014 your text response is automatically delivered back. If the target contact is not configured, tell the user what to set up.\n- If a request asks to manage the system/agent itself in plain English \u2014 start/stop the dashboard or gateway, check status, add/remove a verified sender, configure a platform (telegram/whatsapp), run evals, show stats \u2014 call `run_cli` with the plain-English ask. It resolves the exact `nuvira` command and runs it. If the user's own request already resolves to that command (\"stop the dashboard\"), it just runs \u2014 do not ask for permission to do what was just asked. If it reports AMBIGUOUS, call `ask_user` with the two choices; if the intent is one YOU chose rather than the user (or is irreversible: history.clear, memory.prune, stats.cost.clear, publish), call `ask_user` first and retry with confirm:true.\n- If a subtask can be delegated to a specialized sub-agent (gather context, review, security scan, run tests), call `delegate` with the agent type, a focused prompt, and optional file paths.\n- To find code matching a pattern (context gathering, locating definitions/usages), call `code_search` with the pattern and optional globs.\n- To READ the project: call `read_file` to open a file (with line numbers), `list_dir` to see a directory's contents, or `glob` to find files by pattern. Always prefer reading the actual file over assuming its contents \u2014 a large file reports a line range, continue with offset/limit.\n- To CHANGE code (after reading it): call `edit_file` for a surgical exact-text replacement, or `write_file` to create/replace a file. CREATING a file the request asked for is applied directly \u2014 no confirmation needed, so just call it. An `edit_file` that is surgical (small relative to the file) also applies directly, as does one on a file the request names \u2014 the verify loop must not need a human between iterations. A whole-file write over existing content, or an edit that rewrites most of a file, refuses without confirm \u2014 call `ask_user` with a one-line summary, then retry with confirm:true.\n- NEVER ask for permission to do work the user already asked for \u2014 not via `ask_user` and never in plain text. Decide it yourself, state the decision in your answer, and continue. Reserve `ask_user` for a decision that is genuinely the user's: it cannot proceed without an answer, it is high-impact AND irreversible, and there is no sensible default (overwriting existing work, deleting data, spending money, publishing).\n- To VERIFY code by actual invocation: call `run_terminal` with the real command (`npx vitest run tests/x.test.ts`, `npx tsc --noEmit`, `npm run build`, `git diff`). Read-only verify commands run directly, and so do recoverable workspace commands (`npm/pnpm/yarn/bun install`, `pip install`, `mkdir`, `touch`, `cp`, `mv`, `git add`, `npm init`) when the request authorized the work \u2014 the build you were asked for is your job to set up. Everything else state-changing (network fetches, arbitrary code, global installs, anything leaving the machine) needs confirm:true after the user approves via ask_user. Never guess that a test passes \u2014 run it and read the output. Use run_cli (not run_terminal) for buff/agent-nuvira control commands, and the `git` tool (not run_terminal) to commit.\n- END EVERY RESPONSE by calling `suggest_followups` with exactly 3 followups the user is likely to want next \u2014 natural next questions, deeper dives, or related directions that build on what you just said; specific to this conversation, not generic.\n- If you have nothing to add, answer directly and still end with suggest_followups.\n- ORDERING (non-negotiable): deliver the user's answer FIRST, then suggest_followups. The followup call must come only AFTER the complete answer is written \u2014 never before it, never instead of it. A bare lead-in (\"Sure, I can help!\") is NOT an answer; write the full answer in the same step as the followup call.\n\nTOOL CALL FORMAT (JSON fallback transport):\nWhen calling a tool, emit its JSON AFTER your response text, in this exact shape:\n{\"tool\":\"<name>\",\"arguments\":{...}}\nOne tool call per block. The final block may be a suggest_followups call.";
378
+ export declare const TOOL_CONTRACT_JSON = "You have tools available. Call them when appropriate.\n\n- If a request is ambiguous or incomplete, call `ask_user` with a question and 2\u20134 choices \u2014 never guess, never ask in plain text.\n- If a request needs code written, debugged, or prior work resumed, call `build`, `repair`, or `resume` with the goal.\n- If a request needs documentation, a website, analysis of a project, or running tests, call `document`, `website`, `analyze`, or `test` with the goal.\n- If a request asks to publish a release (npm/GitHub), call `publish`. It leaves this machine and is irreversible \u2014 confirm the bump type and target with the user via `ask_user` first unless they already specified them.\n- When your answer ASSERTS something a second party could check (a test passed, a file contains X, the count is N, a command was run), call `finding` with the claim, what became of it, and the evidence you ACTUALLY checked \u2014 the command and its real output, the path you read, a quote from the request. Usable evidence records it CONFIRMED; with none it is recorded PLAUSIBLE, which is the honest result for a reasoned guess. You cannot set the verdict and must never claim a check you did not perform.\n- If a request's completeness is uncertain, call `verify_requirement` first.\n- If a request asks to deliver a message or result to a DIFFERENT contact/channel than the one you are currently chatting on (WhatsApp, Telegram, Slack, email, \u2026), call `gateway_send` with the target (e.g. `whatsapp:Alex`) and the text. Do NOT call gateway_send to reply to the CURRENT conversation \u2014 your text response is automatically delivered back. If the target contact is not configured, tell the user what to set up.\n- If a request asks to manage the system/agent itself in plain English \u2014 start/stop the dashboard or gateway, check status, add/remove a verified sender, configure a platform (telegram/whatsapp), run evals, show stats \u2014 call `run_cli` with the plain-English ask. It resolves the exact `nuvira` command and runs it. If the user's own request already resolves to that command (\"stop the dashboard\"), it just runs \u2014 do not ask for permission to do what was just asked. If it reports AMBIGUOUS, call `ask_user` with the two choices; if the intent is one YOU chose rather than the user (or is irreversible: history.clear, memory.prune, stats.cost.clear, publish), call `ask_user` first and retry with confirm:true.\n- If a subtask can be delegated to a specialized sub-agent (gather context, review, security scan, run tests), call `delegate` with the agent type, a focused prompt, and optional file paths.\n- To find code matching a pattern (context gathering, locating definitions/usages), call `code_search` with the pattern and optional globs.\n- To READ the project: call `read_file` to open a file (with line numbers), `list_dir` to see a directory's contents, or `glob` to find files by pattern. Always prefer reading the actual file over assuming its contents \u2014 a large file reports a line range, continue with offset/limit.\n- To CHANGE code (after reading it): call `edit_file` for a surgical exact-text replacement, or `write_file` to create/replace a file. CREATING a file the request asked for is applied directly \u2014 no confirmation needed, so just call it. An `edit_file` that is surgical (small relative to the file) also applies directly, as does one on a file the request names \u2014 the verify loop must not need a human between iterations. A whole-file write over existing content, or an edit that rewrites most of a file, refuses without confirm \u2014 call `ask_user` with a one-line summary, then retry with confirm:true.\n- NEVER ask for permission to do work the user already asked for \u2014 not via `ask_user` and never in plain text. Decide it yourself, state the decision in your answer, and continue. Reserve `ask_user` for a decision that is genuinely the user's: it cannot proceed without an answer, it is high-impact AND irreversible, and there is no sensible default (overwriting existing work, deleting data, spending money, publishing).\n- To VERIFY code by actual invocation: call `run_terminal` with the real command (`npx vitest run tests/x.test.ts`, `npx tsc --noEmit`, `npm run build`, `git diff`). Read-only verify commands run directly, and so do recoverable workspace commands (`npm/pnpm/yarn/bun install`, `pip install`, `mkdir`, `touch`, `cp`, `mv`, `git add`, `npm init`) when the request authorized the work \u2014 the build you were asked for is your job to set up. Everything else state-changing (network fetches, arbitrary code, global installs, anything leaving the machine) needs confirm:true after the user approves via ask_user. Never guess that a test passes \u2014 run it and read the output. Use run_cli (not run_terminal) for buff/agent-nuvira control commands, and the `git` tool (not run_terminal) to commit.\n- END EVERY RESPONSE by calling `suggest_followups` with exactly 3 followups the user is likely to want next \u2014 natural next questions, deeper dives, or related directions that build on what you just said; specific to this conversation, not generic.\n- If you have nothing to add, answer directly and still end with suggest_followups.\n- ORDERING (non-negotiable): deliver the user's answer FIRST, then suggest_followups. The followup call must come only AFTER the complete answer is written \u2014 never before it, never instead of it. A bare lead-in (\"Sure, I can help!\") is NOT an answer; write the full answer in the same step as the followup call.\n\nTOOL CALL FORMAT (JSON fallback transport):\nWhen calling a tool, emit its JSON AFTER your response text, in this exact shape:\n{\"tool\":\"<name>\",\"arguments\":{...}}\nOne tool call per block. The final block may be a suggest_followups call.";
379
379
  /**
380
380
  * Parse + validate a model's followups output against the shared
381
381
  * suggest_followups schema. Accepts both the tool shape `[{prompt,label?}]`
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,OAAO,EAAE,CAAC,EAAgB,KAAK,OAAO,EAAE,MAAM,KAAK,CAAC;AAMpD,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,CAAC;AAElE,oEAAoE;AACpE,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED;;;;GAIG;AACH,MAAM,WAAW,IAAI;IACnB,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,YAAY,CAAC;IACvB,2EAA2E;IAC3E,WAA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M,aAAa;;;;;;;;;;;;;;;iBASxB,CAAC;AAEH,yEAAyE;AACzE,eAAO,MAAM,eAAe;;;iBAG1B,CAAC;AAEH,kFAAkF;AAClF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;iBAgB1B,CAAC;AAEH,8EAA8E;AAC9E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;iBAczB,CAAC;AA0IH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;iBAejC,CAAC;AAMH;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAE7C;AAED,8BAA8B;AAC9B,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAEtD;AAED,gFAAgF;AAChF,wBAAgB,SAAS,IAAI,IAAI,EAAE,CAElC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,CAOtE;AAID;;;;;GAKG;AACH,eAAO,MAAM,aAAa,u8KAkB8R,CAAC;AAEzT,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,+rLAK2C,CAAC;AAilB3E;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAyBvE;AASD,OAAO,EACL,aAAa,EACb,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,EAClB,4BAA4B,EAC5B,+BAA+B,EAC/B,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC"}
@@ -27,6 +27,7 @@ import { envBuff } from '../config/paths.js';
27
27
  import { z, toJSONSchema } from 'zod';
28
28
  import { ACTION_BY_INTENT } from '../nlu/actions.js';
29
29
  import { detectPermissionSeeking, IRREVERSIBLE_ACTION_RE } from '../learning/autonomy-policy.js';
30
+ import { createFindingTool } from './finding-tool.js';
30
31
  // ─── Tool definitions ───────────────────────────────────────────────────────
31
32
  // ─── Shared auto-delivery helper ─────────────────────────────────────────
32
33
  // Tools that produce artifact files (generate_image, speak, video_generate)
@@ -372,6 +373,7 @@ export const TOOL_CONTRACT = `You have tools available. Call them when appropria
372
373
  - If a request needs code written, debugged, or prior work resumed, call \`build\`, \`repair\`, or \`resume\` with the goal.
373
374
  - If a request needs documentation, a website, analysis of a project, or running tests, call \`document\`, \`website\`, \`analyze\`, or \`test\` with the goal.
374
375
  - If a request asks to publish a release (npm/GitHub), call \`publish\`. It leaves this machine and is irreversible — confirm the bump type and target with the user via \`ask_user\` first unless they already specified them.
376
+ - When your answer ASSERTS something a second party could check (a test passed, a file contains X, the count is N, a command was run), call \`finding\` with the claim, what became of it, and the evidence you ACTUALLY checked — the command and its real output, the path you read, a quote from the request. Usable evidence records it CONFIRMED; with none it is recorded PLAUSIBLE, which is the honest result for a reasoned guess. You cannot set the verdict and must never claim a check you did not perform.
375
377
  - If a request's completeness is uncertain, call \`verify_requirement\` first.
376
378
  - If a request asks to deliver a message or result to a DIFFERENT contact/channel than the one you are currently chatting on (WhatsApp, Telegram, Slack, email, …), call \`gateway_send\` with the target (e.g. \`whatsapp:Alex\`) and the text. Do NOT call gateway_send to reply to the CURRENT conversation — your text response is automatically delivered back. If the target contact is not configured, tell the user what to set up.
377
379
  - If a request asks to manage the system/agent itself in plain English — start/stop the dashboard or gateway, check status, add/remove a verified sender, configure a platform (telegram/whatsapp), run evals, show stats — call \`run_cli\` with the plain-English ask. It resolves the exact \`nuvira\` command and runs it. If the user's own request already resolves to that command ("stop the dashboard"), it just runs — do not ask for permission to do what was just asked. If it reports AMBIGUOUS, call \`ask_user\` with the two choices; if the intent is one YOU chose rather than the user (or is irreversible: history.clear, memory.prune, stats.cost.clear, publish), call \`ask_user\` first and retry with confirm:true.
@@ -692,6 +694,14 @@ registerTool({
692
694
  return store.toText ? store.toText() : `Plan updated (${action}).`;
693
695
  },
694
696
  });
697
+ // ─── WS1 (#23) finding tool — a claim, and the verdict the gate computed ────
698
+ // The model states the claim, the outcome and the evidence it actually checked;
699
+ // it does NOT state the verdict (`finding-tool.ts` has no such parameter, and
700
+ // the gate refuses a promotion without a non-blank evidence reference). Each
701
+ // recorded finding is emitted as `finding:recorded` with the SAME wire form the
702
+ // gateway already logs for an intent verdict, so all five surfaces report one
703
+ // shape — which is what `findings-verdicts@<surface>` is proved against.
704
+ registerTool(createFindingTool());
695
705
  // ─── I1 web-research tools (web_search / read_page) ─────────────────────────
696
706
  // The research-tool pattern
697
707
  // `web_search_registry.py` parity: the model can search the web and read a
@@ -1432,7 +1442,10 @@ registerTool({
1432
1442
  // Delegate system tool
1433
1443
  registerTool({
1434
1444
  name: 'delegate_system',
1435
- description: 'Full delegation: spawn subagents, batch execute.',
1445
+ description: 'Full delegation: spawn subagents, batch execute. REQUIRES a child executor to be wired in — without one '
1446
+ + 'every task fails with code "not_configured" and NOTHING runs (it previously reported each task '
1447
+ + 'completed with its own goal echoed back as the result). For real delegation use `delegate`, which '
1448
+ + 'spawns a sub-agent through the resolved LLM in the loop.',
1436
1449
  category: 'workflow',
1437
1450
  inputSchema: z.object({
1438
1451
  action: z.enum(['delegate', 'batch', 'status', 'cancel']).describe('Action'),
@@ -1445,33 +1458,116 @@ registerTool({
1445
1458
  const { action, goal, id, goals } = args;
1446
1459
  const mgr = m.getDelegationManager();
1447
1460
  switch (action) {
1448
- case 'delegate': return goal ? mgr.delegate(goal).then((r) => JSON.stringify(r)) : 'goal required';
1449
- case 'batch': return goals ? mgr.delegateBatch(goals).then((r) => JSON.stringify(r)) : 'goals required';
1450
- case 'status': return id ? JSON.stringify(mgr.getTask(id)) : 'id required';
1451
- case 'cancel': return id ? (mgr.cancel(id) ? 'Cancelled' : 'Not found') : 'id required';
1461
+ // Await the RESULT, not the pending task: returning a task that had not run told
1462
+ // the model a delegation had been accepted when nothing was ever executed.
1463
+ case 'delegate': return goal
1464
+ ? mgr.delegate(goal).then((t) => mgr.waitForCompletion(t.id)).then((r) => JSON.stringify(r))
1465
+ : JSON.stringify({ success: false, code: 'unsupported_format', error: 'goal required' });
1466
+ case 'batch': return goals
1467
+ ? mgr.delegateBatch(goals).then((r) => JSON.stringify(r))
1468
+ : JSON.stringify({ success: false, code: 'unsupported_format', error: 'goals required' });
1469
+ case 'status': return id ? JSON.stringify(mgr.getTask(id)) : JSON.stringify({ success: false, code: 'unsupported_format', error: 'id required' });
1470
+ case 'cancel': return id ? (mgr.cancel(id) ? 'Cancelled' : 'Not found') : JSON.stringify({ success: false, code: 'unsupported_format', error: 'id required' });
1452
1471
  default: return 'Unknown action';
1453
1472
  }
1454
1473
  }),
1455
1474
  });
1456
- // Subagent tool
1475
+ // Subagent tool — connected (P4.1, 2026-09-28).
1476
+ //
1477
+ // The child is a real forked process running `child-agent-entry.ts`, which the
1478
+ // build emits to `dist/tools/`. It resolves a provider from YOUR configuration,
1479
+ // makes real LLM calls, runs any allowed tool through the real registry, and
1480
+ // reports its own output over IPC. What it will NOT do is answer for work that
1481
+ // did not happen: with no constructible provider, an unreachable backend, or
1482
+ // tools requested on a provider that cannot call them, it refuses with a typed
1483
+ // code (see child-agent-runtime.ts). Before this it was marked NOT CONNECTED —
1484
+ // the fork target was never shipped and the worker it wrapped simulated both the
1485
+ // model and the tools, so a "completed" subagent had done nothing at all.
1457
1486
  registerTool({
1458
1487
  name: 'subagent',
1459
- description: 'Spawn real subagents that make their own LLM calls and use tools.',
1488
+ description: 'Spawn a real subagent in its own process: it resolves your configured provider, makes its own LLM '
1489
+ + 'calls, runs the tools you allow, and returns its actual output. Pass tools:[...] to let it use '
1490
+ + 'tools (requires a tool-calling provider); omit them for a plain completion. Pass provider and/or '
1491
+ + 'model to PIN which backend it runs on — provider is one of your configured provider ids (groq, '
1492
+ + 'gemini, openrouter, local, …; see `provider list`) and model is a model id that provider itself '
1493
+ + 'serves. Without them auto routing chooses, and it can choose a model your account cannot serve, '
1494
+ + 'which fails the whole run. It REFUSES with a typed code when no provider is configured, the '
1495
+ + 'backend is unreachable, or tools were asked for on a provider that cannot call them — it never '
1496
+ + 'reports work it did not do. Every run records the provider, model and tool transport that '
1497
+ + 'actually served it, on success and on failure, and `status`/`wait` return them, so you can check '
1498
+ + 'which backend ran instead of assuming. Use `delegate` for a sub-agent inside the current tool '
1499
+ + 'loop instead of a separate process.',
1460
1500
  category: 'workflow',
1461
1501
  inputSchema: z.object({
1462
1502
  action: z.enum(['spawn', 'status', 'wait', 'kill', 'log']).describe('Action'),
1463
1503
  goal: z.string().optional().describe('Task goal'),
1464
1504
  id: z.string().optional().describe('Subagent ID'),
1465
1505
  timeout: z.number().optional().describe('Timeout'),
1466
- }),
1467
- endsAgentStep: false,
1468
- run: (args) => import('./subagent-spawner.js').then((m) => {
1469
- const { action, goal, id, timeout } = args;
1506
+ tools: z.array(z.string()).optional().describe('Tool names the subagent may use (default: none)'),
1507
+ // Exposed because auto-routing can resolve a model the account cannot serve
1508
+ // (a stale Model Availability Registry entry is the observed cause) — and the
1509
+ // run then fails on a model the caller never chose, with no way to say which
1510
+ // to use instead. Naming a provider/model pins the run. The child records the
1511
+ // pair it actually used on the run either way.
1512
+ provider: z
1513
+ .string()
1514
+ .optional()
1515
+ .describe('Provider id to pin the run to — one of your configured providers, e.g. groq, gemini, '
1516
+ + 'openrouter, local (`provider list` shows them). Default: auto-routed.'),
1517
+ model: z
1518
+ .string()
1519
+ .optional()
1520
+ .describe('Model id to pin, exactly as the provider names it. Only meaningful with provider; '
1521
+ + 'default is that provider default model.'),
1522
+ // WS5 (#27) — run the child in its own git worktree and get the diff back.
1523
+ // Exposed to the MODEL because "isolate this and show me what changed" is a
1524
+ // request a user makes conversationally, and delegating the risky work to an
1525
+ // isolated copy is the case the capability exists for.
1526
+ worktree: z
1527
+ .boolean()
1528
+ .optional()
1529
+ .describe('Run the child in its own git worktree of the current project and return the diff against '
1530
+ + 'the base commit. REFUSES (rather than running unisolated) when this is not a git repo '
1531
+ + 'with a commit. Default false.'),
1532
+ keepWorktree: z
1533
+ .boolean()
1534
+ .optional()
1535
+ .describe('Keep the isolated worktree after the run instead of removing it. Default false.'),
1536
+ }),
1537
+ endsAgentStep: false,
1538
+ run: (args, ctx) => import('./subagent-spawner.js').then((m) => {
1539
+ const { action, goal, id, timeout, tools, provider, model, worktree, keepWorktree } = args;
1470
1540
  const mgr = m.getSubagentManager();
1471
1541
  switch (action) {
1472
- case 'spawn': return goal ? mgr.spawn({ goal }).then((s) => JSON.stringify(s)) : 'goal required';
1542
+ case 'spawn': return goal
1543
+ ? mgr.spawn({
1544
+ goal,
1545
+ // WS5 (#27) — the child works where THIS turn is working. Without it
1546
+ // a subagent spawned from an isolated turn (or from a dashboard turn
1547
+ // attached to a project) forked in the process's own directory — so
1548
+ // "isolate this and delegate it" delegated a copy of the real tree.
1549
+ ...(ctx?.cwd ? { cwd: ctx.cwd } : {}),
1550
+ ...(Array.isArray(tools) && tools.length ? { tools } : {}),
1551
+ ...(typeof provider === 'string' && provider ? { provider } : {}),
1552
+ ...(typeof model === 'string' && model ? { model } : {}),
1553
+ ...(worktree === true ? { worktree: true } : {}),
1554
+ ...(keepWorktree === true ? { keepWorktree: true } : {}),
1555
+ }).then((s) => JSON.stringify(s))
1556
+ : 'goal required';
1473
1557
  case 'status': return id ? JSON.stringify(mgr.getState(id)) : 'id required';
1474
- case 'wait': return id ? mgr.waitForCompletion(id, timeout || 300_000).then((r) => JSON.stringify(r)) : 'id required';
1558
+ // `waitForCompletion` REJECTS when a subagent failed (the child's own exit
1559
+ // contract). Left uncaught, that reached the model as a raw throw and lost
1560
+ // the typed reason — this turns it into the same refusal shape every other
1561
+ // tool returns, so "it refused" is distinguishable from "it broke".
1562
+ case 'wait': return id
1563
+ ? mgr.waitForCompletion(id, timeout || 300_000)
1564
+ .then((r) => JSON.stringify(r))
1565
+ .catch((err) => JSON.stringify({
1566
+ success: false,
1567
+ code: err?.code ?? 'unavailable',
1568
+ error: err?.message ?? String(err),
1569
+ }))
1570
+ : JSON.stringify({ success: false, code: 'unsupported_format', error: 'id required' });
1475
1571
  case 'kill': return id ? (mgr.kill(id) ? 'Killed' : 'Not found') : 'id required';
1476
1572
  case 'log': return id ? mgr.getLog(id).join('\n') : 'id required';
1477
1573
  default: return 'Unknown action';
@@ -1501,9 +1597,18 @@ registerTool({
1501
1597
  }),
1502
1598
  });
1503
1599
  // Messaging tool
1600
+ // Messaging tool — NOT CONNECTED.
1601
+ //
1602
+ // Kept as an explicit refusal surface rather than deleted, so a model that reaches for
1603
+ // it is told where delivery actually happens instead of inventing one. The real sender is
1604
+ // `gateway_send` (authorization-gated, and the tool whose result the honesty guard in
1605
+ // tool-loop.ts trusts). See TOOL_TRUTHFULNESS_TRACKER.md findings #3 and #9.
1504
1606
  registerTool({
1505
1607
  name: 'messaging',
1506
- description: 'Send messages to Discord, Slack, Telegram, Feishu.',
1608
+ description: 'NOT CONNECTED — this tool has no delivery adapter and every send/react refuses with code "not_configured". '
1609
+ + 'Do NOT use it to deliver anything and never report a delivery from it. Use gateway_send instead: it sends '
1610
+ + 'through the configured gateway (WhatsApp by contact name or number, Telegram, Slack, Discord, email) and '
1611
+ + 'returns an explicit sent/refused result.',
1507
1612
  category: 'workflow',
1508
1613
  inputSchema: z.object({
1509
1614
  action: z.enum(['send', 'react']).describe('Action'),
@@ -1517,16 +1622,24 @@ registerTool({
1517
1622
  const { action, service, channel, message, emoji } = args;
1518
1623
  const mgr = m.getMessagingManager();
1519
1624
  switch (action) {
1520
- case 'send': return channel && message ? mgr.sendMessage({ platform: service, channelId: channel }, { content: message }).then((r) => JSON.stringify(r)) : 'channel and message required';
1521
- case 'react': return channel && emoji ? mgr.reactToMessage(service, channel, 'latest', emoji).then(() => 'Reacted') : 'channel and emoji required';
1522
- default: return 'Unknown action';
1625
+ case 'send': return channel && message
1626
+ ? mgr.sendMessage({ platform: service, channelId: channel }, { content: message }).then((r) => JSON.stringify(r))
1627
+ : JSON.stringify({ success: false, code: 'unsupported_format', error: 'channel and message required' });
1628
+ // Never a bare 'Reacted' — the manager refuses, so the refusal is what the model sees.
1629
+ case 'react': return channel && emoji
1630
+ ? mgr.reactToMessage(service, channel, 'latest', emoji).then((r) => JSON.stringify(r))
1631
+ : JSON.stringify({ success: false, code: 'unsupported_format', error: 'channel and emoji required' });
1632
+ default: return JSON.stringify({ success: false, code: 'unsupported_format', error: `Unknown action: ${action}` });
1523
1633
  }
1524
1634
  }),
1525
1635
  });
1526
1636
  // Vision tool — comprehensive image analysis, OCR, UI element detection
1527
1637
  registerTool({
1528
1638
  name: 'vision',
1529
- description: 'Vision tools: analyze images, extract text via OCR, detect UI elements, compare screenshots. Use when the user provides an image or asks about visual content.',
1639
+ description: 'Analyze an image and transcribe its text (OCR) through the configured vision backend (a local Ollama '
1640
+ + 'vision model or a Gemini key); `analyze` also reports real pixel dimensions. detect-elements, '
1641
+ + 'find-element and compare have NO backend and return ok:false with code "not_configured" — an empty '
1642
+ + 'element list is a refusal, never "found nothing". For a plain description prefer describe_image.',
1530
1643
  category: 'workflow',
1531
1644
  inputSchema: z.object({
1532
1645
  action: z.enum(['analyze', 'ocr', 'detect-elements', 'compare', 'find-element', 'extract-text']).describe('Vision action'),
@@ -1544,8 +1657,10 @@ registerTool({
1544
1657
  case 'ocr': return analyzer.ocr(imagePath).then((r) => JSON.stringify(r));
1545
1658
  case 'detect-elements': return analyzer.detectUIElements(imagePath).then((r) => JSON.stringify(r));
1546
1659
  case 'compare': return imagePath2 ? analyzer.compare(imagePath, imagePath2).then((r) => JSON.stringify(r)) : 'imagePath2 required for comparison';
1547
- case 'find-element': return searchText ? analyzer.findElementByText(imagePath, searchText).then((r) => JSON.stringify(r)) : 'searchText required';
1548
- case 'extract-text': return analyzer.extractText(imagePath).then((r) => JSON.stringify({ text: r }));
1660
+ // null means "refused or not found" — surfaced as `ok` so the two are distinguishable.
1661
+ case 'find-element': return searchText ? analyzer.findElementByText(imagePath, searchText).then((r) => JSON.stringify({ ok: r !== null, element: r })) : 'searchText required';
1662
+ // Same result shape as `ocr`: a refusal must not be flattened into an empty string.
1663
+ case 'extract-text': return analyzer.ocr(imagePath).then((r) => JSON.stringify(r));
1549
1664
  default: return 'Unknown action';
1550
1665
  }
1551
1666
  }),
@@ -2731,18 +2846,32 @@ registerTool({
2731
2846
  }),
2732
2847
  });
2733
2848
  // Read Extract — Document-to-text extraction
2849
+ //
2850
+ // The description advertises ONLY what is implemented (see read-extract.ts). It used
2851
+ // to list PDF/DOCX/XLSX/PPTX while reading PDF/DOCX as raw bytes — which is how a
2852
+ // model concluded an unreadable PDF had been read (TOOL_TRUTHFULNESS_TRACKER.md #1).
2853
+ // It now names the formats that genuinely work, and the refusal codes for the ones
2854
+ // that cannot, so the model can distinguish "read it" from "could not read it".
2734
2855
  registerTool({
2735
2856
  name: 'read_extract',
2736
- description: 'Extract text from documents — PDF, DOCX, XLSX, PPTX, HTML, CSV, JSON.',
2857
+ description: 'Extract text from a document. WORKS for PDF, DOCX, XLSX, PPTX, HTML, CSV/TSV, JSON, XML, YAML and '
2858
+ + 'plain text/Markdown; PDF and spreadsheet table rows are preserved so values stay paired with their '
2859
+ + 'columns. Returns success:false with a typed code when it cannot read the file — "no_data" means a '
2860
+ + 'scanned PDF with no text layer (use describe_image on a screenshot instead), "unsupported_format" '
2861
+ + 'means a legacy .doc/.xls/.ppt/.rtf/.odt, "not_configured" means a reader package is missing. '
2862
+ + 'NEVER report a document as read when this tool returned success:false.',
2737
2863
  category: 'workflow',
2738
2864
  inputSchema: z.object({
2739
2865
  filePath: z.string().describe('File path to extract text from'),
2866
+ ocr: z.boolean().optional().describe('Set true ONLY to recover text from a scanned PDF that has no text layer. Renders the pages and '
2867
+ + 'transcribes them with the vision model — slower, and the text is a transcription rather than a '
2868
+ + 'parsed layer, so digits should be verified. Leave unset for all normal documents.'),
2740
2869
  }),
2741
2870
  endsAgentStep: false,
2742
2871
  run: (args) => import('./read-extract.js').then((m) => {
2743
2872
  const mgr = m.getReadExtractManager();
2744
- const { filePath } = args;
2745
- return mgr.extract(filePath).then((r) => JSON.stringify(r));
2873
+ const { filePath, ocr } = args;
2874
+ return mgr.extract(filePath, { ocr: Boolean(ocr) }).then((r) => JSON.stringify(r));
2746
2875
  }),
2747
2876
  });
2748
2877
  // Credential Files — Credential file management