@nac3/forge-cli 0.2.0-alpha.4 → 0.2.0-alpha.59z.118

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 (773) hide show
  1. package/README.md +16 -1
  2. package/dist/a11y/helpers.d.ts +88 -0
  3. package/dist/a11y/helpers.d.ts.map +1 -0
  4. package/dist/a11y/helpers.js +109 -0
  5. package/dist/a11y/helpers.js.map +1 -0
  6. package/dist/agents/config_resolver.d.ts +16 -0
  7. package/dist/agents/config_resolver.d.ts.map +1 -0
  8. package/dist/agents/config_resolver.js +133 -0
  9. package/dist/agents/config_resolver.js.map +1 -0
  10. package/dist/agents/config_schema.d.ts +42 -0
  11. package/dist/agents/config_schema.d.ts.map +1 -0
  12. package/dist/agents/config_schema.js +204 -0
  13. package/dist/agents/config_schema.js.map +1 -0
  14. package/dist/agents/defaults.d.ts +21 -0
  15. package/dist/agents/defaults.d.ts.map +1 -0
  16. package/dist/agents/defaults.js +56 -0
  17. package/dist/agents/defaults.js.map +1 -0
  18. package/dist/agents/runner.d.ts +94 -0
  19. package/dist/agents/runner.d.ts.map +1 -0
  20. package/dist/agents/runner.js +165 -0
  21. package/dist/agents/runner.js.map +1 -0
  22. package/dist/agents/store.d.ts +33 -0
  23. package/dist/agents/store.d.ts.map +1 -0
  24. package/dist/agents/store.js +210 -0
  25. package/dist/agents/store.js.map +1 -0
  26. package/dist/agents/types.d.ts +112 -0
  27. package/dist/agents/types.d.ts.map +1 -0
  28. package/dist/agents/types.js +39 -0
  29. package/dist/agents/types.js.map +1 -0
  30. package/dist/bin/yf.d.ts.map +1 -1
  31. package/dist/bin/yf.js +86 -2
  32. package/dist/bin/yf.js.map +1 -1
  33. package/dist/chat/claude.d.ts +53 -15
  34. package/dist/chat/claude.d.ts.map +1 -1
  35. package/dist/chat/claude.js +152 -27
  36. package/dist/chat/claude.js.map +1 -1
  37. package/dist/chat/graph_auto_ingest.d.ts +46 -0
  38. package/dist/chat/graph_auto_ingest.d.ts.map +1 -0
  39. package/dist/chat/graph_auto_ingest.js +162 -0
  40. package/dist/chat/graph_auto_ingest.js.map +1 -0
  41. package/dist/chat/graph_component_watcher.d.ts +30 -0
  42. package/dist/chat/graph_component_watcher.d.ts.map +1 -0
  43. package/dist/chat/graph_component_watcher.js +220 -0
  44. package/dist/chat/graph_component_watcher.js.map +1 -0
  45. package/dist/chat/panel.d.ts.map +1 -1
  46. package/dist/chat/panel.js +5815 -1455
  47. package/dist/chat/panel.js.map +1 -1
  48. package/dist/chat/project_slug.d.ts +6 -0
  49. package/dist/chat/project_slug.d.ts.map +1 -0
  50. package/dist/chat/project_slug.js +78 -0
  51. package/dist/chat/project_slug.js.map +1 -0
  52. package/dist/chat/semantic_graph_ingest.d.ts +31 -0
  53. package/dist/chat/semantic_graph_ingest.d.ts.map +1 -0
  54. package/dist/chat/semantic_graph_ingest.js +84 -0
  55. package/dist/chat/semantic_graph_ingest.js.map +1 -0
  56. package/dist/chat/semantic_graph_inject.d.ts +25 -0
  57. package/dist/chat/semantic_graph_inject.d.ts.map +1 -0
  58. package/dist/chat/semantic_graph_inject.js +64 -0
  59. package/dist/chat/semantic_graph_inject.js.map +1 -0
  60. package/dist/chat/server.d.ts +50 -0
  61. package/dist/chat/server.d.ts.map +1 -1
  62. package/dist/chat/server.js +1914 -63
  63. package/dist/chat/server.js.map +1 -1
  64. package/dist/chat/spec_extract.d.ts +1 -2
  65. package/dist/chat/spec_extract.d.ts.map +1 -1
  66. package/dist/chat/spec_extract.js +18 -59
  67. package/dist/chat/spec_extract.js.map +1 -1
  68. package/dist/chat/spec_plan.d.ts +1 -2
  69. package/dist/chat/spec_plan.d.ts.map +1 -1
  70. package/dist/chat/spec_plan.js +15 -60
  71. package/dist/chat/spec_plan.js.map +1 -1
  72. package/dist/chat/tools/app_backend_dispatch.d.ts +39 -0
  73. package/dist/chat/tools/app_backend_dispatch.d.ts.map +1 -0
  74. package/dist/chat/tools/app_backend_dispatch.js +239 -0
  75. package/dist/chat/tools/app_backend_dispatch.js.map +1 -0
  76. package/dist/chat/tools/audit_consumers.d.ts +66 -0
  77. package/dist/chat/tools/audit_consumers.d.ts.map +1 -0
  78. package/dist/chat/tools/audit_consumers.js +231 -0
  79. package/dist/chat/tools/audit_consumers.js.map +1 -0
  80. package/dist/chat/tools/fs_editor.d.ts +11 -0
  81. package/dist/chat/tools/fs_editor.d.ts.map +1 -0
  82. package/dist/chat/tools/fs_editor.js +162 -0
  83. package/dist/chat/tools/fs_editor.js.map +1 -0
  84. package/dist/chat/tools/git.d.ts +24 -0
  85. package/dist/chat/tools/git.d.ts.map +1 -1
  86. package/dist/chat/tools/git.js +82 -4
  87. package/dist/chat/tools/git.js.map +1 -1
  88. package/dist/chat/tools/github.js +3 -3
  89. package/dist/chat/tools/keys.d.ts +9 -0
  90. package/dist/chat/tools/keys.d.ts.map +1 -0
  91. package/dist/chat/tools/keys.js +152 -0
  92. package/dist/chat/tools/keys.js.map +1 -0
  93. package/dist/chat/tools/lifecycle.js +3 -3
  94. package/dist/chat/tools/manual.js +1 -1
  95. package/dist/chat/tools/misc_verbs.d.ts +36 -0
  96. package/dist/chat/tools/misc_verbs.d.ts.map +1 -0
  97. package/dist/chat/tools/misc_verbs.js +405 -0
  98. package/dist/chat/tools/misc_verbs.js.map +1 -0
  99. package/dist/chat/tools/nac3_invoke.d.ts +53 -0
  100. package/dist/chat/tools/nac3_invoke.d.ts.map +1 -0
  101. package/dist/chat/tools/nac3_invoke.js +886 -0
  102. package/dist/chat/tools/nac3_invoke.js.map +1 -0
  103. package/dist/chat/tools/pizarron.d.ts +40 -0
  104. package/dist/chat/tools/pizarron.d.ts.map +1 -0
  105. package/dist/chat/tools/pizarron.js +123 -0
  106. package/dist/chat/tools/pizarron.js.map +1 -0
  107. package/dist/chat/tools/project_lifecycle.d.ts +24 -0
  108. package/dist/chat/tools/project_lifecycle.d.ts.map +1 -0
  109. package/dist/chat/tools/project_lifecycle.js +184 -0
  110. package/dist/chat/tools/project_lifecycle.js.map +1 -0
  111. package/dist/chat/tools/reader.d.ts.map +1 -1
  112. package/dist/chat/tools/reader.js +152 -9
  113. package/dist/chat/tools/reader.js.map +1 -1
  114. package/dist/chat/tools/shell.d.ts +58 -0
  115. package/dist/chat/tools/shell.d.ts.map +1 -0
  116. package/dist/chat/tools/shell.js +253 -0
  117. package/dist/chat/tools/shell.js.map +1 -0
  118. package/dist/chat/tools/workflow.d.ts +45 -0
  119. package/dist/chat/tools/workflow.d.ts.map +1 -0
  120. package/dist/chat/tools/workflow.js +404 -0
  121. package/dist/chat/tools/workflow.js.map +1 -0
  122. package/dist/chat/tools.d.ts +27 -0
  123. package/dist/chat/tools.d.ts.map +1 -1
  124. package/dist/chat/tools.js +366 -17
  125. package/dist/chat/tools.js.map +1 -1
  126. package/dist/chat/workflow_inject.d.ts +52 -0
  127. package/dist/chat/workflow_inject.d.ts.map +1 -0
  128. package/dist/chat/workflow_inject.js +346 -0
  129. package/dist/chat/workflow_inject.js.map +1 -0
  130. package/dist/commands/agent.d.ts +22 -0
  131. package/dist/commands/agent.d.ts.map +1 -0
  132. package/dist/commands/agent.js +190 -0
  133. package/dist/commands/agent.js.map +1 -0
  134. package/dist/commands/approve.d.ts +32 -0
  135. package/dist/commands/approve.d.ts.map +1 -0
  136. package/dist/commands/approve.js +198 -0
  137. package/dist/commands/approve.js.map +1 -0
  138. package/dist/commands/block.d.ts +28 -0
  139. package/dist/commands/block.d.ts.map +1 -0
  140. package/dist/commands/block.js +189 -0
  141. package/dist/commands/block.js.map +1 -0
  142. package/dist/commands/bootstrap.d.ts +35 -0
  143. package/dist/commands/bootstrap.d.ts.map +1 -0
  144. package/dist/commands/bootstrap.js +205 -0
  145. package/dist/commands/bootstrap.js.map +1 -0
  146. package/dist/commands/brain.d.ts +17 -0
  147. package/dist/commands/brain.d.ts.map +1 -0
  148. package/dist/commands/brain.js +129 -0
  149. package/dist/commands/brain.js.map +1 -0
  150. package/dist/commands/chat.d.ts +3 -0
  151. package/dist/commands/chat.d.ts.map +1 -1
  152. package/dist/commands/chat.js +112 -1
  153. package/dist/commands/chat.js.map +1 -1
  154. package/dist/commands/clarify.d.ts +30 -0
  155. package/dist/commands/clarify.d.ts.map +1 -0
  156. package/dist/commands/clarify.js +671 -0
  157. package/dist/commands/clarify.js.map +1 -0
  158. package/dist/commands/discover.d.ts +30 -0
  159. package/dist/commands/discover.d.ts.map +1 -0
  160. package/dist/commands/discover.js +178 -0
  161. package/dist/commands/discover.js.map +1 -0
  162. package/dist/commands/doctor.js +26 -4
  163. package/dist/commands/doctor.js.map +1 -1
  164. package/dist/commands/doctrine.d.ts +24 -0
  165. package/dist/commands/doctrine.d.ts.map +1 -0
  166. package/dist/commands/doctrine.js +106 -0
  167. package/dist/commands/doctrine.js.map +1 -0
  168. package/dist/commands/doctrines.d.ts +21 -0
  169. package/dist/commands/doctrines.d.ts.map +1 -0
  170. package/dist/commands/doctrines.js +158 -0
  171. package/dist/commands/doctrines.js.map +1 -0
  172. package/dist/commands/graph.d.ts +21 -0
  173. package/dist/commands/graph.d.ts.map +1 -0
  174. package/dist/commands/graph.js +363 -0
  175. package/dist/commands/graph.js.map +1 -0
  176. package/dist/commands/keys_setup.d.ts.map +1 -1
  177. package/dist/commands/keys_setup.js +80 -0
  178. package/dist/commands/keys_setup.js.map +1 -1
  179. package/dist/commands/legacy-audit.d.ts +34 -0
  180. package/dist/commands/legacy-audit.d.ts.map +1 -0
  181. package/dist/commands/legacy-audit.js +270 -0
  182. package/dist/commands/legacy-audit.js.map +1 -0
  183. package/dist/commands/lessons.d.ts +28 -0
  184. package/dist/commands/lessons.d.ts.map +1 -0
  185. package/dist/commands/lessons.js +309 -0
  186. package/dist/commands/lessons.js.map +1 -0
  187. package/dist/commands/license.d.ts.map +1 -1
  188. package/dist/commands/license.js +56 -1
  189. package/dist/commands/license.js.map +1 -1
  190. package/dist/commands/limits.d.ts +15 -0
  191. package/dist/commands/limits.d.ts.map +1 -0
  192. package/dist/commands/limits.js +51 -0
  193. package/dist/commands/limits.js.map +1 -0
  194. package/dist/commands/manifest-cli.d.ts +12 -0
  195. package/dist/commands/manifest-cli.d.ts.map +1 -0
  196. package/dist/commands/manifest-cli.js +42 -0
  197. package/dist/commands/manifest-cli.js.map +1 -0
  198. package/dist/commands/mcp.d.ts +24 -0
  199. package/dist/commands/mcp.d.ts.map +1 -0
  200. package/dist/commands/mcp.js +163 -0
  201. package/dist/commands/mcp.js.map +1 -0
  202. package/dist/commands/nac3.d.ts +22 -0
  203. package/dist/commands/nac3.d.ts.map +1 -0
  204. package/dist/commands/nac3.js +125 -0
  205. package/dist/commands/nac3.js.map +1 -0
  206. package/dist/commands/operate.d.ts +22 -0
  207. package/dist/commands/operate.d.ts.map +1 -0
  208. package/dist/commands/operate.js +523 -0
  209. package/dist/commands/operate.js.map +1 -0
  210. package/dist/commands/qa.d.ts +24 -0
  211. package/dist/commands/qa.d.ts.map +1 -0
  212. package/dist/commands/qa.js +349 -0
  213. package/dist/commands/qa.js.map +1 -0
  214. package/dist/commands/spec.d.ts +38 -0
  215. package/dist/commands/spec.d.ts.map +1 -0
  216. package/dist/commands/spec.js +256 -0
  217. package/dist/commands/spec.js.map +1 -0
  218. package/dist/commands/support.d.ts +22 -0
  219. package/dist/commands/support.d.ts.map +1 -0
  220. package/dist/commands/support.js +165 -0
  221. package/dist/commands/support.js.map +1 -0
  222. package/dist/commands/triage.d.ts +34 -0
  223. package/dist/commands/triage.d.ts.map +1 -0
  224. package/dist/commands/triage.js +228 -0
  225. package/dist/commands/triage.js.map +1 -0
  226. package/dist/commands/vault-inventory.d.ts +30 -0
  227. package/dist/commands/vault-inventory.d.ts.map +1 -0
  228. package/dist/commands/vault-inventory.js +222 -0
  229. package/dist/commands/vault-inventory.js.map +1 -0
  230. package/dist/commands/vault.d.ts.map +1 -1
  231. package/dist/commands/vault.js +5 -0
  232. package/dist/commands/vault.js.map +1 -1
  233. package/dist/commands/voice.d.ts.map +1 -1
  234. package/dist/commands/voice.js +47 -4
  235. package/dist/commands/voice.js.map +1 -1
  236. package/dist/commands/workflow-coverage.d.ts +30 -0
  237. package/dist/commands/workflow-coverage.d.ts.map +1 -0
  238. package/dist/commands/workflow-coverage.js +138 -0
  239. package/dist/commands/workflow-coverage.js.map +1 -0
  240. package/dist/core/ansi_strip.d.ts +39 -0
  241. package/dist/core/ansi_strip.d.ts.map +1 -0
  242. package/dist/core/ansi_strip.js +71 -0
  243. package/dist/core/ansi_strip.js.map +1 -0
  244. package/dist/core/audit_log.d.ts +43 -0
  245. package/dist/core/audit_log.d.ts.map +1 -0
  246. package/dist/core/audit_log.js +80 -0
  247. package/dist/core/audit_log.js.map +1 -0
  248. package/dist/core/brain_config.d.ts +33 -0
  249. package/dist/core/brain_config.d.ts.map +1 -0
  250. package/dist/core/brain_config.js +132 -0
  251. package/dist/core/brain_config.js.map +1 -0
  252. package/dist/core/budget.d.ts +96 -0
  253. package/dist/core/budget.d.ts.map +1 -0
  254. package/dist/core/budget.js +300 -0
  255. package/dist/core/budget.js.map +1 -0
  256. package/dist/core/cost_meter.d.ts +35 -0
  257. package/dist/core/cost_meter.d.ts.map +1 -0
  258. package/dist/core/cost_meter.js +111 -0
  259. package/dist/core/cost_meter.js.map +1 -0
  260. package/dist/core/cost_router.d.ts +106 -0
  261. package/dist/core/cost_router.d.ts.map +1 -0
  262. package/dist/core/cost_router.js +465 -0
  263. package/dist/core/cost_router.js.map +1 -0
  264. package/dist/core/doctrine_resolver.d.ts +23 -0
  265. package/dist/core/doctrine_resolver.d.ts.map +1 -0
  266. package/dist/core/doctrine_resolver.js +108 -0
  267. package/dist/core/doctrine_resolver.js.map +1 -0
  268. package/dist/core/error_catalog.d.ts +80 -0
  269. package/dist/core/error_catalog.d.ts.map +1 -0
  270. package/dist/core/error_catalog.js +168 -0
  271. package/dist/core/error_catalog.js.map +1 -0
  272. package/dist/core/error_formatter.d.ts +30 -0
  273. package/dist/core/error_formatter.d.ts.map +1 -0
  274. package/dist/core/error_formatter.js +155 -0
  275. package/dist/core/error_formatter.js.map +1 -0
  276. package/dist/core/incomplete_detector.d.ts +51 -0
  277. package/dist/core/incomplete_detector.d.ts.map +1 -0
  278. package/dist/core/incomplete_detector.js +140 -0
  279. package/dist/core/incomplete_detector.js.map +1 -0
  280. package/dist/core/learnings_client.d.ts +104 -0
  281. package/dist/core/learnings_client.d.ts.map +1 -0
  282. package/dist/core/learnings_client.js +262 -0
  283. package/dist/core/learnings_client.js.map +1 -0
  284. package/dist/core/limits_config.d.ts +76 -0
  285. package/dist/core/limits_config.d.ts.map +1 -0
  286. package/dist/core/limits_config.js +297 -0
  287. package/dist/core/limits_config.js.map +1 -0
  288. package/dist/core/provider_keys.d.ts +35 -0
  289. package/dist/core/provider_keys.d.ts.map +1 -0
  290. package/dist/core/provider_keys.js +260 -0
  291. package/dist/core/provider_keys.js.map +1 -0
  292. package/dist/core/reasoning_gate.d.ts +72 -0
  293. package/dist/core/reasoning_gate.d.ts.map +1 -0
  294. package/dist/core/reasoning_gate.js +192 -0
  295. package/dist/core/reasoning_gate.js.map +1 -0
  296. package/dist/core/shell_classifier.d.ts +49 -0
  297. package/dist/core/shell_classifier.d.ts.map +1 -0
  298. package/dist/core/shell_classifier.js +159 -0
  299. package/dist/core/shell_classifier.js.map +1 -0
  300. package/dist/core/sq_resolver.d.ts +14 -0
  301. package/dist/core/sq_resolver.d.ts.map +1 -0
  302. package/dist/core/sq_resolver.js +230 -0
  303. package/dist/core/sq_resolver.js.map +1 -0
  304. package/dist/core/truncation_detector.d.ts +68 -0
  305. package/dist/core/truncation_detector.d.ts.map +1 -0
  306. package/dist/core/truncation_detector.js +115 -0
  307. package/dist/core/truncation_detector.js.map +1 -0
  308. package/dist/core/turn_classifier.d.ts +62 -0
  309. package/dist/core/turn_classifier.d.ts.map +1 -0
  310. package/dist/core/turn_classifier.js +213 -0
  311. package/dist/core/turn_classifier.js.map +1 -0
  312. package/dist/core/whats_new.d.ts +42 -0
  313. package/dist/core/whats_new.d.ts.map +1 -0
  314. package/dist/core/whats_new.js +214 -0
  315. package/dist/core/whats_new.js.map +1 -0
  316. package/dist/deploy/adapter.d.ts +93 -0
  317. package/dist/deploy/adapter.d.ts.map +1 -0
  318. package/dist/deploy/adapter.js +42 -0
  319. package/dist/deploy/adapter.js.map +1 -0
  320. package/dist/deploy/aws_adapter.d.ts +28 -0
  321. package/dist/deploy/aws_adapter.d.ts.map +1 -0
  322. package/dist/deploy/aws_adapter.js +98 -0
  323. package/dist/deploy/aws_adapter.js.map +1 -0
  324. package/dist/deploy/cloudflare.d.ts +24 -0
  325. package/dist/deploy/cloudflare.d.ts.map +1 -0
  326. package/dist/deploy/cloudflare.js +169 -0
  327. package/dist/deploy/cloudflare.js.map +1 -0
  328. package/dist/docs/LIMITED_RESPONSIBILITY.md +216 -0
  329. package/dist/docs/PRIVACY_POLICY.md +169 -0
  330. package/dist/docs/SQ.md +1397 -0
  331. package/dist/docs/SQ_BY_STEP.yaml +147 -0
  332. package/dist/docs/doctrine/accessibility.md +78 -0
  333. package/dist/docs/doctrine/agent-orchestrator.md +76 -0
  334. package/dist/docs/doctrine/byok-vs-managed.md +81 -0
  335. package/dist/docs/doctrine/cost-router-escalation.md +73 -0
  336. package/dist/docs/doctrine/explain-results.md +90 -0
  337. package/dist/docs/doctrine/g-doc.md +46 -0
  338. package/dist/docs/doctrine/gates.md +21 -0
  339. package/dist/docs/doctrine/lessons-workflow.md +68 -0
  340. package/dist/docs/doctrine/mcp-bridge-lifecycle.md +75 -0
  341. package/dist/docs/doctrine/nac3-attrs.md +23 -0
  342. package/dist/docs/doctrine/office-tools.md +102 -0
  343. package/dist/docs/doctrine/pizarron.md +52 -0
  344. package/dist/docs/doctrine/r8-modal.md +60 -0
  345. package/dist/docs/doctrine/safety-refusals.md +73 -0
  346. package/dist/docs/doctrine/verb-composition.md +68 -0
  347. package/dist/docs/doctrine/workflow-phases.md +108 -0
  348. package/dist/docs/doctrine/workflow.md +58 -0
  349. package/dist/docs/doctrine/yf-commands.md +49 -0
  350. package/dist/json/query.d.ts +38 -0
  351. package/dist/json/query.d.ts.map +1 -0
  352. package/dist/json/query.js +177 -0
  353. package/dist/json/query.js.map +1 -0
  354. package/dist/license/hito4_client.d.ts +19 -0
  355. package/dist/license/hito4_client.d.ts.map +1 -1
  356. package/dist/license/hito4_client.js +110 -0
  357. package/dist/license/hito4_client.js.map +1 -1
  358. package/dist/license/index.d.ts.map +1 -1
  359. package/dist/license/index.js +7 -0
  360. package/dist/license/index.js.map +1 -1
  361. package/dist/license/sync.d.ts +54 -0
  362. package/dist/license/sync.d.ts.map +1 -0
  363. package/dist/license/sync.js +138 -0
  364. package/dist/license/sync.js.map +1 -0
  365. package/dist/llm/cohere_client.d.ts +81 -0
  366. package/dist/llm/cohere_client.d.ts.map +1 -0
  367. package/dist/llm/cohere_client.js +195 -0
  368. package/dist/llm/cohere_client.js.map +1 -0
  369. package/dist/llm/deepseek_client.d.ts +63 -0
  370. package/dist/llm/deepseek_client.d.ts.map +1 -0
  371. package/dist/llm/deepseek_client.js +188 -0
  372. package/dist/llm/deepseek_client.js.map +1 -0
  373. package/dist/llm/gemini_client.d.ts +78 -0
  374. package/dist/llm/gemini_client.d.ts.map +1 -0
  375. package/dist/llm/gemini_client.js +189 -0
  376. package/dist/llm/gemini_client.js.map +1 -0
  377. package/dist/llm/managed_client.d.ts +70 -0
  378. package/dist/llm/managed_client.d.ts.map +1 -0
  379. package/dist/llm/managed_client.js +251 -0
  380. package/dist/llm/managed_client.js.map +1 -0
  381. package/dist/llm/mistral_client.d.ts +54 -0
  382. package/dist/llm/mistral_client.d.ts.map +1 -0
  383. package/dist/llm/mistral_client.js +174 -0
  384. package/dist/llm/mistral_client.js.map +1 -0
  385. package/dist/llm/multi_provider_client.d.ts +57 -0
  386. package/dist/llm/multi_provider_client.d.ts.map +1 -0
  387. package/dist/llm/multi_provider_client.js +109 -0
  388. package/dist/llm/multi_provider_client.js.map +1 -0
  389. package/dist/llm/openai_client.d.ts +77 -0
  390. package/dist/llm/openai_client.d.ts.map +1 -0
  391. package/dist/llm/openai_client.js +200 -0
  392. package/dist/llm/openai_client.js.map +1 -0
  393. package/dist/llm/xai_client.d.ts +51 -0
  394. package/dist/llm/xai_client.d.ts.map +1 -0
  395. package/dist/llm/xai_client.js +174 -0
  396. package/dist/llm/xai_client.js.map +1 -0
  397. package/dist/mcp/bridge_registry.d.ts +77 -0
  398. package/dist/mcp/bridge_registry.d.ts.map +1 -0
  399. package/dist/mcp/bridge_registry.js +220 -0
  400. package/dist/mcp/bridge_registry.js.map +1 -0
  401. package/dist/mcp/config.d.ts +25 -0
  402. package/dist/mcp/config.d.ts.map +1 -0
  403. package/dist/mcp/config.js +116 -0
  404. package/dist/mcp/config.js.map +1 -0
  405. package/dist/mcp/protocol_client.d.ts +63 -0
  406. package/dist/mcp/protocol_client.d.ts.map +1 -0
  407. package/dist/mcp/protocol_client.js +340 -0
  408. package/dist/mcp/protocol_client.js.map +1 -0
  409. package/dist/mcp/state.d.ts +38 -0
  410. package/dist/mcp/state.d.ts.map +1 -0
  411. package/dist/mcp/state.js +144 -0
  412. package/dist/mcp/state.js.map +1 -0
  413. package/dist/migrate/ai-decorator.d.ts.map +1 -1
  414. package/dist/migrate/ai-decorator.js +33 -145
  415. package/dist/migrate/ai-decorator.js.map +1 -1
  416. package/dist/nac3/approval_queue.d.ts +36 -0
  417. package/dist/nac3/approval_queue.d.ts.map +1 -0
  418. package/dist/nac3/approval_queue.js +105 -0
  419. package/dist/nac3/approval_queue.js.map +1 -0
  420. package/dist/nac3/backend_tools.d.ts +89 -0
  421. package/dist/nac3/backend_tools.d.ts.map +1 -0
  422. package/dist/nac3/backend_tools.js +271 -0
  423. package/dist/nac3/backend_tools.js.map +1 -0
  424. package/dist/nac3/dispatch_log.d.ts +35 -0
  425. package/dist/nac3/dispatch_log.d.ts.map +1 -0
  426. package/dist/nac3/dispatch_log.js +126 -0
  427. package/dist/nac3/dispatch_log.js.map +1 -0
  428. package/dist/nac3/internal_manifest.d.ts +62 -0
  429. package/dist/nac3/internal_manifest.d.ts.map +1 -0
  430. package/dist/nac3/internal_manifest.js +1846 -0
  431. package/dist/nac3/internal_manifest.js.map +1 -0
  432. package/dist/nac3/manifest_lazy.d.ts +71 -0
  433. package/dist/nac3/manifest_lazy.d.ts.map +1 -0
  434. package/dist/nac3/manifest_lazy.js +141 -0
  435. package/dist/nac3/manifest_lazy.js.map +1 -0
  436. package/dist/nac3/verb_tier_map.d.ts +80 -0
  437. package/dist/nac3/verb_tier_map.d.ts.map +1 -0
  438. package/dist/nac3/verb_tier_map.js +159 -0
  439. package/dist/nac3/verb_tier_map.js.map +1 -0
  440. package/dist/office/excel.d.ts +110 -0
  441. package/dist/office/excel.d.ts.map +1 -0
  442. package/dist/office/excel.js +276 -0
  443. package/dist/office/excel.js.map +1 -0
  444. package/dist/office/pdf.d.ts +35 -0
  445. package/dist/office/pdf.d.ts.map +1 -0
  446. package/dist/office/pdf.js +70 -0
  447. package/dist/office/pdf.js.map +1 -0
  448. package/dist/office/word.d.ts +64 -0
  449. package/dist/office/word.d.ts.map +1 -0
  450. package/dist/office/word.js +243 -0
  451. package/dist/office/word.js.map +1 -0
  452. package/dist/qa/brain_matrix/ab_runner.d.ts +44 -0
  453. package/dist/qa/brain_matrix/ab_runner.d.ts.map +1 -0
  454. package/dist/qa/brain_matrix/ab_runner.js +144 -0
  455. package/dist/qa/brain_matrix/ab_runner.js.map +1 -0
  456. package/dist/qa/brain_matrix/brains.json +80 -0
  457. package/dist/qa/brain_matrix/compare.d.ts +27 -0
  458. package/dist/qa/brain_matrix/compare.d.ts.map +1 -0
  459. package/dist/qa/brain_matrix/compare.js +122 -0
  460. package/dist/qa/brain_matrix/compare.js.map +1 -0
  461. package/dist/qa/brain_matrix/fake_brain.d.ts +36 -0
  462. package/dist/qa/brain_matrix/fake_brain.d.ts.map +1 -0
  463. package/dist/qa/brain_matrix/fake_brain.js +27 -0
  464. package/dist/qa/brain_matrix/fake_brain.js.map +1 -0
  465. package/dist/qa/brain_matrix/fixtures/scenario_a11y_announce_intent.json +22 -0
  466. package/dist/qa/brain_matrix/fixtures/scenario_a11y_announce_no_speak_default.json +23 -0
  467. package/dist/qa/brain_matrix/fixtures/scenario_a11y_consecutive_announces.json +37 -0
  468. package/dist/qa/brain_matrix/fixtures/scenario_a11y_focus_after_action.json +22 -0
  469. package/dist/qa/brain_matrix/fixtures/scenario_a11y_label_with_shortcut.json +22 -0
  470. package/dist/qa/brain_matrix/fixtures/scenario_announce_min_tool_calls.json +23 -0
  471. package/dist/qa/brain_matrix/fixtures/scenario_app_invoke_happy_path.json +65 -0
  472. package/dist/qa/brain_matrix/fixtures/scenario_app_no_invent_without_backend.json +18 -0
  473. package/dist/qa/brain_matrix/fixtures/scenario_app_schema_fail_recover.json +48 -0
  474. package/dist/qa/brain_matrix/fixtures/scenario_approval_modal_no_redundancy.json +21 -0
  475. package/dist/qa/brain_matrix/fixtures/scenario_args_redacted_in_audit.json +17 -0
  476. package/dist/qa/brain_matrix/fixtures/scenario_audit_consumers_intent.json +19 -0
  477. package/dist/qa/brain_matrix/fixtures/scenario_audit_consumers_intent_en.json +19 -0
  478. package/dist/qa/brain_matrix/fixtures/scenario_audit_log_on_destructive.json +18 -0
  479. package/dist/qa/brain_matrix/fixtures/scenario_brain_explains_after_invoke.json +28 -0
  480. package/dist/qa/brain_matrix/fixtures/scenario_byok_on_managed_brain_overflow.json +28 -0
  481. package/dist/qa/brain_matrix/fixtures/scenario_byok_required_policy.json +35 -0
  482. package/dist/qa/brain_matrix/fixtures/scenario_concise_no_loop.json +23 -0
  483. package/dist/qa/brain_matrix/fixtures/scenario_consult_nac_spec_intent.json +19 -0
  484. package/dist/qa/brain_matrix/fixtures/scenario_contradiction_rfp_cost.json +38 -0
  485. package/dist/qa/brain_matrix/fixtures/scenario_cost_router_attachment_frontier.json +24 -0
  486. package/dist/qa/brain_matrix/fixtures/scenario_cost_router_escalation_explicit.json +23 -0
  487. package/dist/qa/brain_matrix/fixtures/scenario_cost_router_idle_reset.json +24 -0
  488. package/dist/qa/brain_matrix/fixtures/scenario_csv_via_excel_read.json +22 -0
  489. package/dist/qa/brain_matrix/fixtures/scenario_destructive_no_text_confirm.json +20 -0
  490. package/dist/qa/brain_matrix/fixtures/scenario_diff_explains_changes.json +32 -0
  491. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_after_unknown_intent.json +17 -0
  492. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_a11y.json +24 -0
  493. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_agent_orchestrator.json +24 -0
  494. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_byok_vs_managed.json +24 -0
  495. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_cost_router.json +24 -0
  496. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_g_doc.json +24 -0
  497. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_gates.json +23 -0
  498. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_intent_en.json +19 -0
  499. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_lessons_workflow.json +24 -0
  500. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_mcp_lifecycle.json +24 -0
  501. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_nac3_attrs.json +24 -0
  502. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_office.json +24 -0
  503. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_pizarron.json +23 -0
  504. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_r8_modal.json +23 -0
  505. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_workflow.json +23 -0
  506. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_workflow_phases.json +24 -0
  507. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_yf_commands.json +24 -0
  508. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_explain_results.json +22 -0
  509. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_safety_refusals.json +22 -0
  510. package/dist/qa/brain_matrix/fixtures/scenario_doctrine_verb_composition.json +22 -0
  511. package/dist/qa/brain_matrix/fixtures/scenario_eco_defers_complex.json +17 -0
  512. package/dist/qa/brain_matrix/fixtures/scenario_eco_short_query.json +27 -0
  513. package/dist/qa/brain_matrix/fixtures/scenario_env_list_intent.json +20 -0
  514. package/dist/qa/brain_matrix/fixtures/scenario_env_list_intent_en.json +20 -0
  515. package/dist/qa/brain_matrix/fixtures/scenario_env_no_secret_leak.json +21 -0
  516. package/dist/qa/brain_matrix/fixtures/scenario_env_secret_suppression.json +35 -0
  517. package/dist/qa/brain_matrix/fixtures/scenario_env_secret_suppression_en.json +21 -0
  518. package/dist/qa/brain_matrix/fixtures/scenario_excel_append_handles_csv_refusal.json +28 -0
  519. package/dist/qa/brain_matrix/fixtures/scenario_excel_append_sheet_intent.json +20 -0
  520. package/dist/qa/brain_matrix/fixtures/scenario_excel_append_sheet_intent_en.json +20 -0
  521. package/dist/qa/brain_matrix/fixtures/scenario_excel_append_then_list.json +34 -0
  522. package/dist/qa/brain_matrix/fixtures/scenario_excel_list_sheets_first.json +22 -0
  523. package/dist/qa/brain_matrix/fixtures/scenario_excel_sheet_named.json +23 -0
  524. package/dist/qa/brain_matrix/fixtures/scenario_explain_voice_yes.json +22 -0
  525. package/dist/qa/brain_matrix/fixtures/scenario_explains_forge_error.json +39 -0
  526. package/dist/qa/brain_matrix/fixtures/scenario_focus_after_modal_open.json +29 -0
  527. package/dist/qa/brain_matrix/fixtures/scenario_fs_find_intent.json +21 -0
  528. package/dist/qa/brain_matrix/fixtures/scenario_fs_find_intent_en.json +20 -0
  529. package/dist/qa/brain_matrix/fixtures/scenario_fs_find_with_glob.json +22 -0
  530. package/dist/qa/brain_matrix/fixtures/scenario_fs_mkdir_intent.json +20 -0
  531. package/dist/qa/brain_matrix/fixtures/scenario_fs_move_intent.json +20 -0
  532. package/dist/qa/brain_matrix/fixtures/scenario_fs_read_handles_missing.json +28 -0
  533. package/dist/qa/brain_matrix/fixtures/scenario_fs_stat_before_read.json +22 -0
  534. package/dist/qa/brain_matrix/fixtures/scenario_generated_app_nac3_default.json +24 -0
  535. package/dist/qa/brain_matrix/fixtures/scenario_git_branch_list_intent.json +20 -0
  536. package/dist/qa/brain_matrix/fixtures/scenario_git_diff_intent.json +20 -0
  537. package/dist/qa/brain_matrix/fixtures/scenario_git_log_intent.json +20 -0
  538. package/dist/qa/brain_matrix/fixtures/scenario_git_log_intent_en.json +20 -0
  539. package/dist/qa/brain_matrix/fixtures/scenario_git_pull_intent.json +19 -0
  540. package/dist/qa/brain_matrix/fixtures/scenario_git_push_intent.json +20 -0
  541. package/dist/qa/brain_matrix/fixtures/scenario_git_show_metadata_only.json +22 -0
  542. package/dist/qa/brain_matrix/fixtures/scenario_git_status_branch_combo.json +44 -0
  543. package/dist/qa/brain_matrix/fixtures/scenario_git_status_intent.json +20 -0
  544. package/dist/qa/brain_matrix/fixtures/scenario_git_status_intent_en.json +20 -0
  545. package/dist/qa/brain_matrix/fixtures/scenario_github_clone_repo_intent.json +20 -0
  546. package/dist/qa/brain_matrix/fixtures/scenario_github_create_repo_intent.json +20 -0
  547. package/dist/qa/brain_matrix/fixtures/scenario_id_format_in_reply.json +27 -0
  548. package/dist/qa/brain_matrix/fixtures/scenario_iterations_idempotent_adenda.json +27 -0
  549. package/dist/qa/brain_matrix/fixtures/scenario_iterations_query_history.json +29 -0
  550. package/dist/qa/brain_matrix/fixtures/scenario_iterations_tracker_acknowledge.json +28 -0
  551. package/dist/qa/brain_matrix/fixtures/scenario_json_parse_handles_malformed.json +34 -0
  552. package/dist/qa/brain_matrix/fixtures/scenario_json_parse_intent.json +30 -0
  553. package/dist/qa/brain_matrix/fixtures/scenario_json_parse_intent_en.json +30 -0
  554. package/dist/qa/brain_matrix/fixtures/scenario_json_query_extract.json +23 -0
  555. package/dist/qa/brain_matrix/fixtures/scenario_json_stringify_intent.json +20 -0
  556. package/dist/qa/brain_matrix/fixtures/scenario_json_stringify_intent_en.json +20 -0
  557. package/dist/qa/brain_matrix/fixtures/scenario_keys_set_intent.json +20 -0
  558. package/dist/qa/brain_matrix/fixtures/scenario_keys_status_intent.json +20 -0
  559. package/dist/qa/brain_matrix/fixtures/scenario_keys_status_intent_en.json +20 -0
  560. package/dist/qa/brain_matrix/fixtures/scenario_lazy_complex_verb.json +27 -0
  561. package/dist/qa/brain_matrix/fixtures/scenario_lazy_doctrine_only_when_needed.json +17 -0
  562. package/dist/qa/brain_matrix/fixtures/scenario_lazy_simple_verb.json +21 -0
  563. package/dist/qa/brain_matrix/fixtures/scenario_lesson_recall_overrides.json +22 -0
  564. package/dist/qa/brain_matrix/fixtures/scenario_lifecycle_restart_app_intent.json +19 -0
  565. package/dist/qa/brain_matrix/fixtures/scenario_lifecycle_run_app_intent.json +19 -0
  566. package/dist/qa/brain_matrix/fixtures/scenario_lifecycle_run_app_intent_en.json +19 -0
  567. package/dist/qa/brain_matrix/fixtures/scenario_lifecycle_stop_app_intent.json +20 -0
  568. package/dist/qa/brain_matrix/fixtures/scenario_lifecycle_stop_app_intent_en.json +20 -0
  569. package/dist/qa/brain_matrix/fixtures/scenario_long_doctrine_no_truncate.json +23 -0
  570. package/dist/qa/brain_matrix/fixtures/scenario_manifest_read_intent.json +19 -0
  571. package/dist/qa/brain_matrix/fixtures/scenario_manual_open_intent.json +19 -0
  572. package/dist/qa/brain_matrix/fixtures/scenario_mcp_bridge_unreachable_graceful.json +39 -0
  573. package/dist/qa/brain_matrix/fixtures/scenario_mcp_disabled_bridge_no_verbs.json +18 -0
  574. package/dist/qa/brain_matrix/fixtures/scenario_mcp_discover_tools_intent.json +19 -0
  575. package/dist/qa/brain_matrix/fixtures/scenario_mcp_invariant_1_no_verbs.json +19 -0
  576. package/dist/qa/brain_matrix/fixtures/scenario_mcp_invoke_two_hop.json +68 -0
  577. package/dist/qa/brain_matrix/fixtures/scenario_mcp_invoke_with_auth_loaded.json +76 -0
  578. package/dist/qa/brain_matrix/fixtures/scenario_mcp_revoked_token_graceful.json +33 -0
  579. package/dist/qa/brain_matrix/fixtures/scenario_mcp_set_creds_intent.json +21 -0
  580. package/dist/qa/brain_matrix/fixtures/scenario_mcp_set_creds_no_token_arg.json +27 -0
  581. package/dist/qa/brain_matrix/fixtures/scenario_mcp_show_tools_before_invoke.json +44 -0
  582. package/dist/qa/brain_matrix/fixtures/scenario_mcp_toggle_intent.json +20 -0
  583. package/dist/qa/brain_matrix/fixtures/scenario_multi_turn_clarify_then_act.json +24 -0
  584. package/dist/qa/brain_matrix/fixtures/scenario_nac3_attrs_doctrine.json +53 -0
  585. package/dist/qa/brain_matrix/fixtures/scenario_nac3_discover_schemas_intent.json +19 -0
  586. package/dist/qa/brain_matrix/fixtures/scenario_nac3_required_attr_missing.json +19 -0
  587. package/dist/qa/brain_matrix/fixtures/scenario_no_bare_ok_after_destructive.json +27 -0
  588. package/dist/qa/brain_matrix/fixtures/scenario_no_global_learnings_no_recall.json +20 -0
  589. package/dist/qa/brain_matrix/fixtures/scenario_no_id_leak_in_reply.json +24 -0
  590. package/dist/qa/brain_matrix/fixtures/scenario_no_invent_verb.json +18 -0
  591. package/dist/qa/brain_matrix/fixtures/scenario_no_loop_after_repeated_fail.json +42 -0
  592. package/dist/qa/brain_matrix/fixtures/scenario_no_password_echo.json +28 -0
  593. package/dist/qa/brain_matrix/fixtures/scenario_npm_outdated_all_current.json +28 -0
  594. package/dist/qa/brain_matrix/fixtures/scenario_npm_outdated_intent.json +20 -0
  595. package/dist/qa/brain_matrix/fixtures/scenario_npm_outdated_intent_en.json +20 -0
  596. package/dist/qa/brain_matrix/fixtures/scenario_npm_outdated_then_explain.json +35 -0
  597. package/dist/qa/brain_matrix/fixtures/scenario_office_excel_read_intent.json +24 -0
  598. package/dist/qa/brain_matrix/fixtures/scenario_office_excel_write_required_args.json +23 -0
  599. package/dist/qa/brain_matrix/fixtures/scenario_office_overwrite_explicit.json +23 -0
  600. package/dist/qa/brain_matrix/fixtures/scenario_office_word_write_intent.json +27 -0
  601. package/dist/qa/brain_matrix/fixtures/scenario_panel_open_settings_intent.json +19 -0
  602. package/dist/qa/brain_matrix/fixtures/scenario_panel_send_message_intent.json +19 -0
  603. package/dist/qa/brain_matrix/fixtures/scenario_pdf_read_intent.json +22 -0
  604. package/dist/qa/brain_matrix/fixtures/scenario_pizarron_clear_tab_explicit_close.json +17 -0
  605. package/dist/qa/brain_matrix/fixtures/scenario_pizarron_for_chart.json +30 -0
  606. package/dist/qa/brain_matrix/fixtures/scenario_pizarron_for_long_table.json +28 -0
  607. package/dist/qa/brain_matrix/fixtures/scenario_pizarron_read_tab_intent.json +20 -0
  608. package/dist/qa/brain_matrix/fixtures/scenario_pizarron_render_not_inline.json +20 -0
  609. package/dist/qa/brain_matrix/fixtures/scenario_prefer_native_read_file.json +28 -0
  610. package/dist/qa/brain_matrix/fixtures/scenario_prefer_native_verb_over_shell.json +22 -0
  611. package/dist/qa/brain_matrix/fixtures/scenario_prefer_native_workflow_state.json +28 -0
  612. package/dist/qa/brain_matrix/fixtures/scenario_project_init_intent.json +20 -0
  613. package/dist/qa/brain_matrix/fixtures/scenario_project_set_root_intent.json +20 -0
  614. package/dist/qa/brain_matrix/fixtures/scenario_promote_lesson_after_correction.json +17 -0
  615. package/dist/qa/brain_matrix/fixtures/scenario_r8_destructive_shell_exec.json +21 -0
  616. package/dist/qa/brain_matrix/fixtures/scenario_read_then_parse_order.json +36 -0
  617. package/dist/qa/brain_matrix/fixtures/scenario_reader_bookmark_jump_intent.json +19 -0
  618. package/dist/qa/brain_matrix/fixtures/scenario_reader_bookmark_set_intent.json +19 -0
  619. package/dist/qa/brain_matrix/fixtures/scenario_reader_for_long_doc.json +21 -0
  620. package/dist/qa/brain_matrix/fixtures/scenario_reader_list_docs_intent.json +19 -0
  621. package/dist/qa/brain_matrix/fixtures/scenario_reader_next_block_intent.json +19 -0
  622. package/dist/qa/brain_matrix/fixtures/scenario_reader_read_section_intent.json +19 -0
  623. package/dist/qa/brain_matrix/fixtures/scenario_reader_recap_intent.json +19 -0
  624. package/dist/qa/brain_matrix/fixtures/scenario_reader_search_intent.json +20 -0
  625. package/dist/qa/brain_matrix/fixtures/scenario_reader_search_intent_en.json +20 -0
  626. package/dist/qa/brain_matrix/fixtures/scenario_refuses_blanket_chmod_777.json +17 -0
  627. package/dist/qa/brain_matrix/fixtures/scenario_refuses_bypass_approval_modal.json +18 -0
  628. package/dist/qa/brain_matrix/fixtures/scenario_refuses_delete_critical_en.json +18 -0
  629. package/dist/qa/brain_matrix/fixtures/scenario_refuses_disable_vault_encryption.json +18 -0
  630. package/dist/qa/brain_matrix/fixtures/scenario_refuses_drop_database.json +17 -0
  631. package/dist/qa/brain_matrix/fixtures/scenario_refuses_force_push_main.json +17 -0
  632. package/dist/qa/brain_matrix/fixtures/scenario_refuses_force_push_main_en.json +17 -0
  633. package/dist/qa/brain_matrix/fixtures/scenario_refuses_leak_vault_en.json +18 -0
  634. package/dist/qa/brain_matrix/fixtures/scenario_refuses_modify_node_modules.json +17 -0
  635. package/dist/qa/brain_matrix/fixtures/scenario_refuses_skip_hooks.json +17 -0
  636. package/dist/qa/brain_matrix/fixtures/scenario_refuses_skip_hooks_en.json +17 -0
  637. package/dist/qa/brain_matrix/fixtures/scenario_refuses_to_delete_critical.json +18 -0
  638. package/dist/qa/brain_matrix/fixtures/scenario_refuses_to_leak_vault.json +18 -0
  639. package/dist/qa/brain_matrix/fixtures/scenario_respects_global_learnings.json +28 -0
  640. package/dist/qa/brain_matrix/fixtures/scenario_respects_workflow_gate_g2.json +39 -0
  641. package/dist/qa/brain_matrix/fixtures/scenario_revoke_lesson_request.json +21 -0
  642. package/dist/qa/brain_matrix/fixtures/scenario_sq_rules_active.json +30 -0
  643. package/dist/qa/brain_matrix/fixtures/scenario_text_diff_intent.json +20 -0
  644. package/dist/qa/brain_matrix/fixtures/scenario_text_diff_intent_en.json +20 -0
  645. package/dist/qa/brain_matrix/fixtures/scenario_truncated_response_retry.json +22 -0
  646. package/dist/qa/brain_matrix/fixtures/scenario_unknown_command_clarify.json +23 -0
  647. package/dist/qa/brain_matrix/fixtures/scenario_url_parse_compose.json +23 -0
  648. package/dist/qa/brain_matrix/fixtures/scenario_url_parse_handles_invalid.json +27 -0
  649. package/dist/qa/brain_matrix/fixtures/scenario_url_parse_intent.json +20 -0
  650. package/dist/qa/brain_matrix/fixtures/scenario_url_parse_intent_en.json +20 -0
  651. package/dist/qa/brain_matrix/fixtures/scenario_url_parse_then_inspect_query.json +28 -0
  652. package/dist/qa/brain_matrix/fixtures/scenario_url_then_stringify_order.json +34 -0
  653. package/dist/qa/brain_matrix/fixtures/scenario_user_just_greets.json +17 -0
  654. package/dist/qa/brain_matrix/fixtures/scenario_user_overrides_proceeds.json +24 -0
  655. package/dist/qa/brain_matrix/fixtures/scenario_user_revokes_in_middle.json +22 -0
  656. package/dist/qa/brain_matrix/fixtures/scenario_voice_open_pizarron.json +21 -0
  657. package/dist/qa/brain_matrix/fixtures/scenario_word_outline_extraction.json +22 -0
  658. package/dist/qa/brain_matrix/fixtures/scenario_word_overwrite_explicit.json +20 -0
  659. package/dist/qa/brain_matrix/fixtures/scenario_word_section_count.json +28 -0
  660. package/dist/qa/brain_matrix/fixtures/scenario_workflow_doctrine.json +53 -0
  661. package/dist/qa/brain_matrix/fixtures/scenario_workflow_done_specs.json +32 -0
  662. package/dist/qa/brain_matrix/fixtures/scenario_workflow_intent_capture.json +22 -0
  663. package/dist/qa/brain_matrix/fixtures/scenario_workflow_phase_jump_block.json +26 -0
  664. package/dist/qa/brain_matrix/fixtures/scenario_workflow_phase_v_step_15.json +41 -0
  665. package/dist/qa/brain_matrix/fixtures/scenario_workflow_run_step_intent.json +19 -0
  666. package/dist/qa/brain_matrix/fixtures/scenario_workflow_set_intent.json +20 -0
  667. package/dist/qa/brain_matrix/fixtures/scenario_workflow_state_injection.json +32 -0
  668. package/dist/qa/brain_matrix/fixtures/scenario_workflow_state_recovers_after_clarify.json +25 -0
  669. package/dist/qa/brain_matrix/fixtures/scenario_workflow_step_1_intake.json +24 -0
  670. package/dist/qa/brain_matrix/fixtures/scenario_yf_command_doctrine.json +56 -0
  671. package/dist/qa/brain_matrix/fixtures/scenario_yf_doctrine_list_intent.json +19 -0
  672. package/dist/qa/brain_matrix/fixtures/scenario_yf_qa_compare_intent.json +17 -0
  673. package/dist/qa/brain_matrix/invariants.d.ts +18 -0
  674. package/dist/qa/brain_matrix/invariants.d.ts.map +1 -0
  675. package/dist/qa/brain_matrix/invariants.js +333 -0
  676. package/dist/qa/brain_matrix/invariants.js.map +1 -0
  677. package/dist/qa/brain_matrix/report.d.ts +12 -0
  678. package/dist/qa/brain_matrix/report.d.ts.map +1 -0
  679. package/dist/qa/brain_matrix/report.js +131 -0
  680. package/dist/qa/brain_matrix/report.js.map +1 -0
  681. package/dist/qa/brain_matrix/runner.d.ts +31 -0
  682. package/dist/qa/brain_matrix/runner.d.ts.map +1 -0
  683. package/dist/qa/brain_matrix/runner.js +561 -0
  684. package/dist/qa/brain_matrix/runner.js.map +1 -0
  685. package/dist/qa/brain_matrix/types.d.ts +180 -0
  686. package/dist/qa/brain_matrix/types.d.ts.map +1 -0
  687. package/dist/qa/brain_matrix/types.js +2 -0
  688. package/dist/qa/brain_matrix/types.js.map +1 -0
  689. package/dist/qa/brain_matrix/validate_scenario.d.ts +23 -0
  690. package/dist/qa/brain_matrix/validate_scenario.d.ts.map +1 -0
  691. package/dist/qa/brain_matrix/validate_scenario.js +128 -0
  692. package/dist/qa/brain_matrix/validate_scenario.js.map +1 -0
  693. package/dist/support/github_dispatcher.d.ts +36 -0
  694. package/dist/support/github_dispatcher.d.ts.map +1 -0
  695. package/dist/support/github_dispatcher.js +292 -0
  696. package/dist/support/github_dispatcher.js.map +1 -0
  697. package/dist/support/reports.d.ts +31 -0
  698. package/dist/support/reports.d.ts.map +1 -0
  699. package/dist/support/reports.js +162 -0
  700. package/dist/support/reports.js.map +1 -0
  701. package/dist/telemetry/usage.d.ts +67 -0
  702. package/dist/telemetry/usage.d.ts.map +1 -0
  703. package/dist/telemetry/usage.js +208 -0
  704. package/dist/telemetry/usage.js.map +1 -0
  705. package/dist/version.d.ts +1 -1
  706. package/dist/version.d.ts.map +1 -1
  707. package/dist/version.js +1 -1
  708. package/dist/version.js.map +1 -1
  709. package/dist/voice/config.d.ts +12 -0
  710. package/dist/voice/config.d.ts.map +1 -1
  711. package/dist/voice/config.js +25 -2
  712. package/dist/voice/config.js.map +1 -1
  713. package/dist/voice/intents.d.ts +1 -1
  714. package/dist/voice/intents.js +0 -0
  715. package/dist/voice/providers/google.d.ts +9 -0
  716. package/dist/voice/providers/google.d.ts.map +1 -1
  717. package/dist/voice/providers/google.js +197 -28
  718. package/dist/voice/providers/google.js.map +1 -1
  719. package/dist/voice/router.d.ts +10 -0
  720. package/dist/voice/router.d.ts.map +1 -1
  721. package/dist/voice/router.js +39 -20
  722. package/dist/voice/router.js.map +1 -1
  723. package/dist/voice/types.d.ts +5 -2
  724. package/dist/voice/types.d.ts.map +1 -1
  725. package/dist/voice/types.js.map +1 -1
  726. package/dist/workflow/phase_inference.d.ts +56 -0
  727. package/dist/workflow/phase_inference.d.ts.map +1 -0
  728. package/dist/workflow/phase_inference.js +107 -0
  729. package/dist/workflow/phase_inference.js.map +1 -0
  730. package/dist/workflow/state.d.ts +238 -0
  731. package/dist/workflow/state.d.ts.map +1 -0
  732. package/dist/workflow/state.js +213 -0
  733. package/dist/workflow/state.js.map +1 -0
  734. package/docs/SQ.md +1397 -0
  735. package/docs/SQ_BY_STEP.yaml +147 -0
  736. package/docs/doctrine/accessibility.md +78 -0
  737. package/docs/doctrine/agent-orchestrator.md +76 -0
  738. package/docs/doctrine/byok-vs-managed.md +81 -0
  739. package/docs/doctrine/cost-router-escalation.md +73 -0
  740. package/docs/doctrine/explain-results.md +90 -0
  741. package/docs/doctrine/g-doc.md +46 -0
  742. package/docs/doctrine/gates.md +21 -0
  743. package/docs/doctrine/lessons-workflow.md +68 -0
  744. package/docs/doctrine/mcp-bridge-lifecycle.md +75 -0
  745. package/docs/doctrine/nac3-attrs.md +23 -0
  746. package/docs/doctrine/office-tools.md +102 -0
  747. package/docs/doctrine/pizarron.md +52 -0
  748. package/docs/doctrine/r8-modal.md +60 -0
  749. package/docs/doctrine/safety-refusals.md +73 -0
  750. package/docs/doctrine/verb-composition.md +68 -0
  751. package/docs/doctrine/workflow-phases.md +108 -0
  752. package/docs/doctrine/workflow.md +58 -0
  753. package/docs/doctrine/yf-commands.md +49 -0
  754. package/package.json +21 -15
  755. package/src/i18n/catalogs/ar.json +55 -10
  756. package/src/i18n/catalogs/de.json +55 -10
  757. package/src/i18n/catalogs/en.json +66 -1
  758. package/src/i18n/catalogs/es.json +66 -1
  759. package/src/i18n/catalogs/fr.json +55 -10
  760. package/src/i18n/catalogs/hi.json +55 -10
  761. package/src/i18n/catalogs/it.json +55 -10
  762. package/src/i18n/catalogs/ja.json +55 -10
  763. package/src/i18n/catalogs/pt.json +55 -10
  764. package/src/i18n/catalogs/zh.json +55 -10
  765. package/templates/nextjs-app/README.md +48 -0
  766. package/templates/nextjs-app/next.config.js +8 -0
  767. package/templates/nextjs-app/package.json +33 -0
  768. package/templates/nextjs-app/src/app/globals.css +43 -0
  769. package/templates/nextjs-app/src/app/layout.tsx +29 -0
  770. package/templates/nextjs-app/src/app/page.tsx +63 -0
  771. package/templates/nextjs-app/src/nac/manifest.ts +36 -0
  772. package/templates/nextjs-app/tsconfig.json +21 -0
  773. package/templates/nextjs-app/yujin.forge.json +11 -0
@@ -0,0 +1,1846 @@
1
+ /**
2
+ * NAC3 internal manifest -- Forge dogfood.
3
+ *
4
+ * Single source of truth for every verb the LLM can invoke.
5
+ * The chat panel reads this at boot, the system prompt embeds
6
+ * the JSON-serialised version of `manifest()`, and `nac3_invoke`
7
+ * uses `findVerb()` + `validateArgs()` to gate calls.
8
+ *
9
+ * Adding a new verb is one declaration here -- no separate tool
10
+ * spec, no separate handler registration, no system prompt edit.
11
+ *
12
+ * Contract: docs/NAC3_INTERNAL_MANIFEST.md
13
+ *
14
+ * ASCII-only.
15
+ */
16
+ import { VERSION as FORGE_VERSION } from '../version.js';
17
+ /* ============================================================
18
+ * Verb declarations
19
+ *
20
+ * Add new verbs here. The single source of truth.
21
+ * ============================================================ */
22
+ const VERBS = [
23
+ /* ============================================================
24
+ * PIZARRON -- two distinct verbs.
25
+ *
26
+ * yujin.pizarron.create-tab -- ad-hoc content YOU generated.
27
+ * Side effects: dom ONLY. No file_path. The pizarron is a
28
+ * canvas, NOT a file-edit affordance.
29
+ *
30
+ * yujin.pizarron.open-file -- read a project file from disk
31
+ * AND open it as an editor tab. Side effects: filesystem +
32
+ * dom. The verb makes the read explicit. The LLM that calls
33
+ * this commits to "te abri el archivo" with a real disk read
34
+ * behind it. To persist edits, pair with yujin.fs.write-
35
+ * project-file.
36
+ * ============================================================ */
37
+ {
38
+ id: 'yujin.pizarron.create-tab',
39
+ role: 'action',
40
+ action: 'create_tab',
41
+ label: 'Crear pestana en pizarron (contenido ad-hoc)',
42
+ description: 'Open a new tab in the pizarron with AD-HOC content YOU '
43
+ + 'generated (table, code you wrote, doc, BPMN, flow). NOT '
44
+ + 'for opening files from disk -- for that use '
45
+ + 'yujin.pizarron.open-file. After invoking, your chat '
46
+ + 'reply must be 1-3 short sentences pointing at the '
47
+ + 'pizarron.',
48
+ schema: {
49
+ type: 'object',
50
+ properties: {
51
+ title: { type: 'string', description: 'Tab header label. Max 80 chars.', minLength: 1, maxLength: 80 },
52
+ kind: { type: 'string', description: 'Render mode.', enum: ['code', 'table', 'markdown', 'bpmn', 'flow', 'document', 'tree'] },
53
+ content: { type: 'string', description: 'Body text. Max 100000 chars.', minLength: 1, maxLength: 100000 },
54
+ language: { type: 'string', description: 'For kind=code: language hint.', maxLength: 40 },
55
+ },
56
+ required: ['title', 'kind', 'content'],
57
+ },
58
+ policy: 'unrestricted',
59
+ side_effects: ['dom'],
60
+ visible: false,
61
+ handler_side: 'panel',
62
+ deprecated_aliases: ['forge_show_in_pizarron'],
63
+ },
64
+ /* ============================================================
65
+ * PANEL VISIBLE VERBS (alpha.44 C3)
66
+ *
67
+ * The 33 verbs above are all visible:false (server / panel
68
+ * actions without a DOM element). These three correspond to
69
+ * visible UI controls. The LLM can invoke them so a fully
70
+ * voice-driven flow does NOT depend on the user clicking the
71
+ * chrome -- "abri la configuracion" / "pasa a modo full" /
72
+ * "mandame X" all resolve to these verbs.
73
+ * ============================================================ */
74
+ {
75
+ id: 'yujin.panel.open-settings',
76
+ role: 'button',
77
+ action: 'open_settings',
78
+ label: 'Abrir el dropdown de configuracion',
79
+ description: 'Open the panel settings dropdown (the gear icon). Use when '
80
+ + 'the user says "abrime la configuracion" / "donde cambio X" '
81
+ + '/ "abri ajustes". This shows the language selector, the '
82
+ + 'mode toggle, the keys editor, etc.',
83
+ schema: { type: 'object', properties: {}, required: [] },
84
+ policy: 'unrestricted',
85
+ side_effects: ['dom'],
86
+ visible: true,
87
+ handler_side: 'panel',
88
+ },
89
+ {
90
+ id: 'yujin.panel.switch-mode',
91
+ role: 'control',
92
+ action: 'switch_mode',
93
+ label: 'Cambiar el modo del panel (globito / mini / full)',
94
+ description: 'Switch the panel view mode. Use when the user says "pasa a '
95
+ + 'modo full" / "minimiza" / "ocultalo en el globito".',
96
+ schema: {
97
+ type: 'object',
98
+ properties: {
99
+ mode: {
100
+ type: 'string',
101
+ description: 'Target mode.',
102
+ enum: ['globito', 'mini', 'full'],
103
+ },
104
+ },
105
+ required: ['mode'],
106
+ },
107
+ policy: 'unrestricted',
108
+ side_effects: ['dom'],
109
+ visible: true,
110
+ handler_side: 'panel',
111
+ },
112
+ {
113
+ id: 'yujin.panel.send-message',
114
+ role: 'action',
115
+ action: 'send_message',
116
+ label: 'Enviar un mensaje desde la barra del chat',
117
+ description: 'Inject text into the chat input + submit it. Use only when '
118
+ + 'the user dictated a message intended for the chat itself '
119
+ + '(e.g. "mandale esto al chat: ..."). For tool actions use '
120
+ + 'the matching NAC3 verb directly, not this.',
121
+ schema: {
122
+ type: 'object',
123
+ properties: {
124
+ text: { type: 'string', description: 'Message body.', minLength: 1, maxLength: 4000 },
125
+ },
126
+ required: ['text'],
127
+ },
128
+ policy: 'confirm',
129
+ side_effects: ['dom'],
130
+ visible: true,
131
+ handler_side: 'panel',
132
+ },
133
+ {
134
+ id: 'yujin.pizarron.read-tab',
135
+ role: 'action',
136
+ action: 'read_tab',
137
+ label: 'Leer en voz alta una pestana del pizarron',
138
+ description: 'TTS over a pizarron tab. THIS IS THE ONE FOR "leeme el '
139
+ + 'codigo del pizarron" / "leeme la tabla" / "leemelo en '
140
+ + 'voz alta" / "que dice esto" -- ANY voice-read request '
141
+ + 'targeting content already shown in the pizarron. The '
142
+ + 'panel pre-processes per kind: code blocks summarized as '
143
+ + '"codigo en N lineas en <language>" (NOT literal source), '
144
+ + 'tables serialized to "fila uno: columna A es X, ...", '
145
+ + 'markdown/document with code fences stripped.\n\n'
146
+ + 'DO NOT CONFUSE with yujin.reader.open -- that one is for '
147
+ + 'opening a NEW document FROM DISK into the document reader '
148
+ + '(pdf/docx/epub/etc), NOT for reading aloud a tab that is '
149
+ + 'already on screen. If the user references "la tabla / el '
150
+ + 'codigo / la pestana / esto / lo que pusiste / el pizarron", '
151
+ + 'they mean an already-open tab -> use read-tab.\n\n'
152
+ + 'Use without item_id to read the ACTIVE tab; pass item_id '
153
+ + 'only when the user named a specific other tab.',
154
+ schema: {
155
+ type: 'object',
156
+ properties: {
157
+ item_id: { type: 'string', description: 'Optional tab id. Default: the active tab.', maxLength: 80 },
158
+ },
159
+ required: [],
160
+ },
161
+ policy: 'unrestricted',
162
+ side_effects: ['dom', 'external-api'],
163
+ visible: false,
164
+ handler_side: 'panel',
165
+ },
166
+ {
167
+ id: 'yujin.pizarron.open-file',
168
+ role: 'action',
169
+ action: 'open_file',
170
+ label: 'Abrir archivo del proyecto en editor',
171
+ description: 'Read a project file from disk AND open it as an EDITOR '
172
+ + 'tab in the pizarron. Use when the user says "edita / '
173
+ + 'abrime / mostrame el archivo X". The file is read '
174
+ + 'server-side; the panel renders the tab in edit mode. '
175
+ + 'Opening does NOT persist anything to disk -- to save, '
176
+ + 'call yujin.fs.write-project-file with the new content.',
177
+ schema: {
178
+ type: 'object',
179
+ properties: {
180
+ path: { type: 'string', description: 'Project-relative path.', minLength: 1, maxLength: 500 },
181
+ language: { type: 'string', description: 'Optional language hint.', maxLength: 40 },
182
+ },
183
+ required: ['path'],
184
+ },
185
+ policy: 'project-root-gated',
186
+ side_effects: ['filesystem', 'dom'],
187
+ visible: false,
188
+ handler_side: 'server',
189
+ panel_consume: true,
190
+ deprecated_aliases: ['forge_open_file_for_editor'],
191
+ },
192
+ /* ============================================================
193
+ * FILESYSTEM
194
+ * ============================================================ */
195
+ {
196
+ id: 'yujin.fs.list-files',
197
+ role: 'query',
198
+ action: 'list_files',
199
+ label: 'Listar archivos del proyecto',
200
+ description: 'List source files under a project subdirectory. Returns '
201
+ + 'paths + sizes. Refuses absolute paths and ../.',
202
+ schema: {
203
+ type: 'object',
204
+ properties: {
205
+ subdir: { type: 'string', description: 'Relative subdir. Default "src".', maxLength: 200 },
206
+ glob: { type: 'string', description: 'Optional basename glob.', maxLength: 60 },
207
+ max_files: { type: 'number', description: 'Default 100, max 500.' },
208
+ },
209
+ required: [],
210
+ },
211
+ policy: 'project-root-gated',
212
+ side_effects: ['filesystem'],
213
+ visible: false,
214
+ handler_side: 'server',
215
+ deprecated_aliases: ['forge_list_files'],
216
+ },
217
+ {
218
+ id: 'yujin.fs.find',
219
+ role: 'query',
220
+ action: 'find',
221
+ label: 'Buscar texto via regex en archivos',
222
+ description: 'Search the project for files containing lines that match '
223
+ + 'a regex. Returns a list of {path, line, match, context} '
224
+ + 'hits with caps + truncation. Skips binary files, deps, '
225
+ + 'build output. Faster + safer than yujin.shell.exec with '
226
+ + 'grep / ripgrep on a fresh checkout.',
227
+ schema: {
228
+ type: 'object',
229
+ properties: {
230
+ pattern: { type: 'string', description: 'Regex pattern.', minLength: 1, maxLength: 400 },
231
+ subdir: { type: 'string', description: 'Project-relative dir. Default ".".', maxLength: 200 },
232
+ glob: { type: 'string', description: 'Basename glob (e.g. "*.ts").', maxLength: 80 },
233
+ max_hits: { type: 'number', description: 'Default 50, max 500.' },
234
+ max_files: { type: 'number', description: 'Default 1000, max 5000.' },
235
+ flags: { type: 'string', description: 'Regex flags. Default "i".', maxLength: 8 },
236
+ },
237
+ required: ['pattern'],
238
+ },
239
+ policy: 'project-root-gated',
240
+ side_effects: ['filesystem'],
241
+ visible: false,
242
+ handler_side: 'server',
243
+ },
244
+ {
245
+ id: 'yujin.fs.read-file',
246
+ role: 'query',
247
+ action: 'read_file',
248
+ label: 'Leer archivo del proyecto',
249
+ description: 'Read a single text file. Refuses binary. Path is project-'
250
+ + 'relative.',
251
+ schema: {
252
+ type: 'object',
253
+ properties: {
254
+ path: { type: 'string', description: 'Project-relative path.', minLength: 1, maxLength: 500 },
255
+ max_bytes: { type: 'number', description: 'Default 65536, max 262144.' },
256
+ },
257
+ required: ['path'],
258
+ },
259
+ policy: 'project-root-gated',
260
+ side_effects: ['filesystem'],
261
+ visible: false,
262
+ handler_side: 'server',
263
+ deprecated_aliases: ['forge_read_file'],
264
+ },
265
+ {
266
+ id: 'yujin.fs.write-project-file',
267
+ role: 'action',
268
+ action: 'write_project_file',
269
+ label: 'Escribir archivo en el proyecto',
270
+ description: 'Write text content to a project-relative path. Creates '
271
+ + 'parent dirs as needed. Refuses absolute paths, ../, '
272
+ + 'and binary content. Returns bytes_written + path. THIS '
273
+ + 'PERSISTS TO DISK. Use only when the user explicitly '
274
+ + 'asked to save / write / create a file. NOT for showing '
275
+ + 'content (use create-tab or open-file).',
276
+ schema: {
277
+ type: 'object',
278
+ properties: {
279
+ path: { type: 'string', description: 'Project-relative path.', minLength: 1, maxLength: 500 },
280
+ content: { type: 'string', description: 'Text content. Max 1 MB.', maxLength: 1048576 },
281
+ create_dirs: { type: 'boolean', description: 'Create missing parents. Default true.' },
282
+ },
283
+ required: ['path', 'content'],
284
+ },
285
+ policy: 'approval-required',
286
+ side_effects: ['filesystem'],
287
+ visible: false,
288
+ handler_side: 'server',
289
+ deprecated_aliases: ['forge_write_project_file'],
290
+ },
291
+ /* ============================================================
292
+ * MANIFEST + CONSULT
293
+ * ============================================================ */
294
+ {
295
+ id: 'yujin.manifest.read',
296
+ role: 'query',
297
+ action: 'read_manifest',
298
+ label: 'Leer manifest NAC-3 del proyecto activo',
299
+ description: 'Read the public NAC-3 manifest of the adopter project '
300
+ + '(NOT this Forge-internal manifest, which you already '
301
+ + 'see in the system prompt). Optional plugin_slug filter.',
302
+ schema: {
303
+ type: 'object',
304
+ properties: {
305
+ plugin_slug: { type: 'string', description: 'Filter elements whose id starts with this slug + ".".', maxLength: 120 },
306
+ },
307
+ required: [],
308
+ },
309
+ policy: 'project-root-gated',
310
+ side_effects: ['filesystem'],
311
+ visible: false,
312
+ handler_side: 'server',
313
+ deprecated_aliases: ['forge_read_manifest'],
314
+ },
315
+ {
316
+ id: 'yujin.consult.nac-spec',
317
+ role: 'query',
318
+ action: 'consult_nac_spec',
319
+ label: 'Consultar la especificacion NAC-3',
320
+ description: 'Search the canonical NAC-3 spec (docs/SPEC.md) for '
321
+ + 'paragraphs matching a free-text query.',
322
+ schema: {
323
+ type: 'object',
324
+ properties: {
325
+ query: { type: 'string', description: 'Free-text query.', minLength: 1, maxLength: 200 },
326
+ max_results: { type: 'number', description: 'Default 5, max 20.' },
327
+ },
328
+ required: ['query'],
329
+ },
330
+ policy: 'unrestricted',
331
+ side_effects: ['filesystem'],
332
+ visible: false,
333
+ handler_side: 'server',
334
+ deprecated_aliases: ['forge_consult_nac_spec'],
335
+ },
336
+ /* ============================================================
337
+ * KEYS (BYOK)
338
+ * ============================================================ */
339
+ {
340
+ id: 'yujin.keys.status',
341
+ role: 'query',
342
+ action: 'get_byok_status',
343
+ label: 'Estado de las API keys (BYOK)',
344
+ description: 'Report which BYOK provider keys are configured. Returns '
345
+ + 'booleans only -- never the values.',
346
+ schema: { type: 'object', properties: {}, required: [] },
347
+ policy: 'unrestricted',
348
+ side_effects: ['filesystem'],
349
+ visible: false,
350
+ handler_side: 'server',
351
+ deprecated_aliases: ['forge_get_byok_status'],
352
+ },
353
+ {
354
+ id: 'yujin.keys.set',
355
+ role: 'action',
356
+ action: 'set_byok_key',
357
+ label: 'Guardar una API key (BYOK)',
358
+ description: 'Store a BYOK provider key locally. Atomic write, mode '
359
+ + '0600. NEVER echo the value back.',
360
+ schema: {
361
+ type: 'object',
362
+ properties: {
363
+ slot: { type: 'string', description: 'Slot (anthropic_api_key, openai_api_key, google_ai_key, google_stt_key, google_tts_key, whisper_api_key, elevenlabs_api_key).', minLength: 1, maxLength: 80 },
364
+ value: { type: 'string', description: 'Key value. Empty string clears.', maxLength: 4096 },
365
+ },
366
+ required: ['slot', 'value'],
367
+ },
368
+ policy: 'confirm',
369
+ side_effects: ['filesystem'],
370
+ visible: false,
371
+ handler_side: 'server',
372
+ deprecated_aliases: ['forge_set_byok_key'],
373
+ },
374
+ /* ============================================================
375
+ * GIT (local repo)
376
+ * ============================================================ */
377
+ {
378
+ id: 'yujin.git.commit',
379
+ role: 'action',
380
+ action: 'git_commit',
381
+ label: 'Commit en git',
382
+ description: 'Commit staged changes (or all tracked with all=true). '
383
+ + 'Returns the commit hash. THIS MUTATES GIT STATE.',
384
+ schema: {
385
+ type: 'object',
386
+ properties: {
387
+ repo_dir: { type: 'string', description: 'Default: project root.', maxLength: 500 },
388
+ message: { type: 'string', description: 'Commit message.', minLength: 1, maxLength: 4096 },
389
+ all: { type: 'boolean', description: 'Commit all tracked changes. Default false.' },
390
+ },
391
+ required: ['message'],
392
+ },
393
+ policy: 'destructive',
394
+ side_effects: ['git', 'filesystem'],
395
+ visible: false,
396
+ handler_side: 'server',
397
+ deprecated_aliases: ['forge_git_commit'],
398
+ },
399
+ {
400
+ id: 'yujin.git.push',
401
+ role: 'action',
402
+ action: 'git_push',
403
+ label: 'Push a remote git',
404
+ description: 'Push current branch to remote. force=true uses '
405
+ + '--force-with-lease (irreversible).',
406
+ schema: {
407
+ type: 'object',
408
+ properties: {
409
+ repo_dir: { type: 'string', maxLength: 500 },
410
+ remote: { type: 'string', maxLength: 80 },
411
+ branch: { type: 'string', maxLength: 200 },
412
+ force: { type: 'boolean' },
413
+ },
414
+ required: [],
415
+ },
416
+ policy: 'destructive',
417
+ side_effects: ['git', 'network'],
418
+ visible: false,
419
+ handler_side: 'server',
420
+ deprecated_aliases: ['forge_git_push'],
421
+ },
422
+ {
423
+ id: 'yujin.git.pull',
424
+ role: 'action',
425
+ action: 'git_pull',
426
+ label: 'Pull desde remote git',
427
+ description: 'Fast-forward pull from configured remote.',
428
+ schema: {
429
+ type: 'object',
430
+ properties: {
431
+ repo_dir: { type: 'string', maxLength: 500 },
432
+ remote: { type: 'string', maxLength: 80 },
433
+ branch: { type: 'string', maxLength: 200 },
434
+ },
435
+ required: [],
436
+ },
437
+ policy: 'approval-required',
438
+ side_effects: ['git', 'network'],
439
+ visible: false,
440
+ handler_side: 'server',
441
+ deprecated_aliases: ['forge_git_pull'],
442
+ },
443
+ {
444
+ id: 'yujin.git.log',
445
+ role: 'query',
446
+ action: 'git_log',
447
+ label: 'Log de commits',
448
+ description: 'Return the last N commits. Default 10, max 50.',
449
+ schema: {
450
+ type: 'object',
451
+ properties: {
452
+ repo_dir: { type: 'string', maxLength: 500 },
453
+ max: { type: 'number', description: 'Default 10, max 50.' },
454
+ },
455
+ required: [],
456
+ },
457
+ policy: 'unrestricted',
458
+ side_effects: ['filesystem'],
459
+ visible: false,
460
+ handler_side: 'server',
461
+ deprecated_aliases: ['forge_git_log'],
462
+ },
463
+ {
464
+ id: 'yujin.git.diff',
465
+ role: 'query',
466
+ action: 'git_diff',
467
+ label: 'Diff de cambios',
468
+ description: 'Run `git diff <ref>` and return the diff output. ref '
469
+ + 'defaults to HEAD. Pass two refs with .. or ... for a '
470
+ + 'range. Optional path filter. Lines hard-capped + the '
471
+ + 'tail truncated.',
472
+ schema: {
473
+ type: 'object',
474
+ properties: {
475
+ repo_dir: { type: 'string', maxLength: 500 },
476
+ ref: { type: 'string', description: 'Default HEAD.', maxLength: 200 },
477
+ path: { type: 'string', description: 'Limit to a path.', maxLength: 500 },
478
+ name_only: { type: 'boolean', description: 'Default false. Returns only file names + status.' },
479
+ max_lines: { type: 'number', description: 'Default 100, max 2000.' },
480
+ },
481
+ required: [],
482
+ },
483
+ policy: 'unrestricted',
484
+ side_effects: ['filesystem'],
485
+ visible: false,
486
+ handler_side: 'server',
487
+ },
488
+ {
489
+ id: 'yujin.git.show',
490
+ role: 'query',
491
+ action: 'git_show',
492
+ label: 'Mostrar un commit',
493
+ description: 'Run `git show <ref>` -- returns the commit metadata '
494
+ + '(hash, author, date, subject, body) and the diff. '
495
+ + 'Pass metadata_only=true to skip the diff body for cheap '
496
+ + 'lookups.',
497
+ schema: {
498
+ type: 'object',
499
+ properties: {
500
+ repo_dir: { type: 'string', maxLength: 500 },
501
+ ref: { type: 'string', description: 'Commit hash, ref name, or HEAD~N.', minLength: 1, maxLength: 200 },
502
+ metadata_only: { type: 'boolean', description: 'Skip diff body. Default false.' },
503
+ max_lines: { type: 'number', description: 'Default 100, max 2000.' },
504
+ },
505
+ required: ['ref'],
506
+ },
507
+ policy: 'unrestricted',
508
+ side_effects: ['filesystem'],
509
+ visible: false,
510
+ handler_side: 'server',
511
+ },
512
+ {
513
+ id: 'yujin.git.status',
514
+ role: 'query',
515
+ action: 'git_status',
516
+ label: 'Estado del worktree',
517
+ description: 'Run `git status --porcelain=v2` and return the parsed list '
518
+ + 'of staged + unstaged + untracked files plus the current '
519
+ + 'branch + ahead/behind counts. No side effects.',
520
+ schema: {
521
+ type: 'object',
522
+ properties: {
523
+ repo_dir: { type: 'string', maxLength: 500 },
524
+ },
525
+ required: [],
526
+ },
527
+ policy: 'unrestricted',
528
+ side_effects: ['filesystem'],
529
+ visible: false,
530
+ handler_side: 'server',
531
+ },
532
+ {
533
+ id: 'yujin.git.branch-list',
534
+ role: 'query',
535
+ action: 'git_branch_list',
536
+ label: 'Listar ramas',
537
+ description: 'Return the local branches with their last commit hash + '
538
+ + 'subject + whether they are the current branch. Pass '
539
+ + 'include_remotes=true to also list remote-tracking refs.',
540
+ schema: {
541
+ type: 'object',
542
+ properties: {
543
+ repo_dir: { type: 'string', maxLength: 500 },
544
+ include_remotes: { type: 'boolean', description: 'Default false.' },
545
+ },
546
+ required: [],
547
+ },
548
+ policy: 'unrestricted',
549
+ side_effects: ['filesystem'],
550
+ visible: false,
551
+ handler_side: 'server',
552
+ },
553
+ /* ============================================================
554
+ * GITHUB (remote)
555
+ * ============================================================ */
556
+ {
557
+ id: 'yujin.github.create-repo',
558
+ role: 'action',
559
+ action: 'create_github_repo',
560
+ label: 'Crear repositorio en GitHub',
561
+ description: 'Create a new repository under the authenticated GitHub '
562
+ + 'user. Requires vault slot github_token with repo scope.',
563
+ schema: {
564
+ type: 'object',
565
+ properties: {
566
+ name: { type: 'string', description: 'Repo name [a-zA-Z0-9._-].', minLength: 1, maxLength: 100 },
567
+ private: { type: 'boolean', description: 'Default true.' },
568
+ description: { type: 'string', maxLength: 400 },
569
+ },
570
+ required: ['name'],
571
+ },
572
+ policy: 'approval-required',
573
+ side_effects: ['network', 'external-api'],
574
+ visible: false,
575
+ handler_side: 'server',
576
+ deprecated_aliases: ['forge_create_github_repo'],
577
+ },
578
+ {
579
+ id: 'yujin.github.clone-repo',
580
+ role: 'action',
581
+ action: 'clone_repo',
582
+ label: 'Clonar repositorio',
583
+ description: 'Clone a remote git repo locally. Public repos need no '
584
+ + 'auth; private repos use github_token vault slot.',
585
+ schema: {
586
+ type: 'object',
587
+ properties: {
588
+ url: { type: 'string', description: 'HTTPS clone URL.', minLength: 1, maxLength: 500 },
589
+ target_dir: { type: 'string', description: 'Default ./<repo>.', maxLength: 500 },
590
+ },
591
+ required: ['url'],
592
+ },
593
+ policy: 'approval-required',
594
+ side_effects: ['filesystem', 'network', 'process'],
595
+ visible: false,
596
+ handler_side: 'server',
597
+ deprecated_aliases: ['forge_clone_repo'],
598
+ },
599
+ {
600
+ id: 'yujin.github.branch-status',
601
+ role: 'query',
602
+ action: 'branch_status',
603
+ label: 'Estado del branch local',
604
+ description: 'Read current git branch + dirty-tree status. Returns '
605
+ + 'branch, ahead/behind counts, dirty files (max 50).',
606
+ schema: {
607
+ type: 'object',
608
+ properties: {
609
+ repo_dir: { type: 'string', description: 'Default: project root.', maxLength: 500 },
610
+ },
611
+ required: [],
612
+ },
613
+ policy: 'unrestricted',
614
+ side_effects: ['filesystem'],
615
+ visible: false,
616
+ handler_side: 'server',
617
+ deprecated_aliases: ['forge_branch_status'],
618
+ },
619
+ /* ============================================================
620
+ * DOCTRINE META (alpha.59z.0 -- doctrine-on-demand)
621
+ *
622
+ * yujin.doctrine.discover -- fetch long-form rules / reference
623
+ * blocks (workflow, nac3-attrs, g-doc, pizarron-condensed,
624
+ * r8-modal, gates) from docs/doctrine/{slug}.md on demand.
625
+ * Same pattern as nac3.discover-schemas: bulk array of
626
+ * slugs, returns markdown content per slug.
627
+ *
628
+ * When unknown slug -> {error, available: [...]} so the LLM
629
+ * can recover.
630
+ *
631
+ * Side effects: none. Pure read of doctrine markdown files.
632
+ * ============================================================ */
633
+ {
634
+ id: 'yujin.doctrine.discover',
635
+ role: 'query',
636
+ action: 'discover_doctrine',
637
+ label: 'Traer doctrinas / reglas long-form por slug',
638
+ description: 'Return the full markdown text for one or more doctrine '
639
+ + 'slugs. Use when the system prompt references a doctrine '
640
+ + 'by name but you need the full rules (e.g. workflow, '
641
+ + 'nac3-attrs, g-doc). Bulk: pass an array of slugs in one '
642
+ + 'call. Returns {ok, slug, content} per entry; unknown '
643
+ + 'slugs return {error, available: [...]} for recovery.',
644
+ schema: {
645
+ type: 'object',
646
+ properties: {
647
+ slugs: {
648
+ type: 'array',
649
+ description: 'List of doctrine slugs (kebab-case). Empty array '
650
+ + 'returns just the list of available slugs.',
651
+ },
652
+ },
653
+ required: ['slugs'],
654
+ },
655
+ policy: 'unrestricted',
656
+ side_effects: ['none'],
657
+ visible: false,
658
+ handler_side: 'server',
659
+ },
660
+ /* ============================================================
661
+ * NAC3 META (alpha.59x -- manifest lazy)
662
+ *
663
+ * yujin.nac3.discover-schemas -- fetch full schema + description
664
+ * + policy detail for one or more verb_ids. Used in lazy
665
+ * manifest mode (YF_MANIFEST_MODE=lazy, default) where the
666
+ * stub embedded in the system prompt only carries name +
667
+ * policy + label + args_hint. When the LLM needs the full
668
+ * schema (enum values, length limits, etc) it calls this
669
+ * FIRST, then composes args + invokes the real verb.
670
+ *
671
+ * Side effects: none. Read-only enumeration over the in-memory
672
+ * manifest. Safe to call multiple times per turn.
673
+ * ============================================================ */
674
+ {
675
+ id: 'yujin.nac3.discover-schemas',
676
+ role: 'query',
677
+ action: 'discover_schemas',
678
+ label: 'Traer schemas completos de verbos por id',
679
+ description: 'Return the full schema + description + policy + side_effects '
680
+ + 'for one or more verb_ids. Use BEFORE invoking a verb when '
681
+ + 'you need the exact arg names, types, enums, or length '
682
+ + 'limits and the stub args_hint is not enough. Bulk: pass '
683
+ + 'multiple verb_ids in one call (no extra rounds).',
684
+ schema: {
685
+ type: 'object',
686
+ properties: {
687
+ verb_ids: {
688
+ type: 'array',
689
+ description: 'List of verb_ids to fetch schemas for. Unknown ids '
690
+ + 'return null in the result with a suggestion field.',
691
+ },
692
+ },
693
+ required: ['verb_ids'],
694
+ },
695
+ policy: 'unrestricted',
696
+ side_effects: ['none'],
697
+ visible: false,
698
+ handler_side: 'server',
699
+ },
700
+ /* ============================================================
701
+ * AUDIT
702
+ * ============================================================ */
703
+ {
704
+ id: 'yujin.audit.consumers',
705
+ role: 'query',
706
+ action: 'audit_consumers',
707
+ label: 'Auditar consumidores de un concepto',
708
+ description: 'Enumerate every file that reads/writes a concept (env '
709
+ + 'var, JSON key, type, tool name, vault slot). Use BEFORE '
710
+ + 'any commit that changes a shared structure.',
711
+ schema: {
712
+ type: 'object',
713
+ properties: {
714
+ concept: { type: 'string', description: 'Identifier.', minLength: 1, maxLength: 200 },
715
+ include_tests: { type: 'boolean', description: 'Default true.' },
716
+ include_docs: { type: 'boolean', description: 'Default true.' },
717
+ max_hits: { type: 'number', description: 'Default 200.' },
718
+ },
719
+ required: ['concept'],
720
+ },
721
+ policy: 'unrestricted',
722
+ side_effects: ['filesystem'],
723
+ visible: false,
724
+ handler_side: 'server',
725
+ deprecated_aliases: ['forge_audit_consumers'],
726
+ },
727
+ /* ============================================================
728
+ * WORKFLOW (18-step methodology state machine)
729
+ * ============================================================ */
730
+ {
731
+ id: 'yujin.workflow.state',
732
+ role: 'query',
733
+ action: 'workflow_state',
734
+ label: 'Estado del workflow del proyecto',
735
+ description: 'Read project workflow state from yujin.forge.json. Use '
736
+ + 'at the START of every chat turn to know where the user '
737
+ + 'is in the 18-step methodology.',
738
+ schema: {
739
+ type: 'object',
740
+ properties: {
741
+ scope: { type: 'string', description: 'Optional group filter.', maxLength: 60 },
742
+ },
743
+ required: [],
744
+ },
745
+ policy: 'unrestricted',
746
+ side_effects: ['filesystem'],
747
+ visible: false,
748
+ handler_side: 'server',
749
+ deprecated_aliases: ['forge_workflow_state'],
750
+ },
751
+ {
752
+ id: 'yujin.workflow.set',
753
+ role: 'action',
754
+ action: 'workflow_set',
755
+ label: 'Persistir respuestas del workflow',
756
+ description: 'Patch workflow.<group> in yujin.forge.json after '
757
+ + 'collecting triage / discover / clarification answers.',
758
+ schema: {
759
+ type: 'object',
760
+ properties: {
761
+ group: { type: 'string', description: 'Group to patch.', minLength: 1, maxLength: 60 },
762
+ patch: { type: 'object', description: 'Partial merged into group.' },
763
+ top_level: { type: 'boolean', description: 'Top-level (tier/blocks_progress/etc).' },
764
+ },
765
+ required: ['group', 'patch'],
766
+ },
767
+ policy: 'unrestricted',
768
+ side_effects: ['filesystem'],
769
+ visible: false,
770
+ handler_side: 'server',
771
+ deprecated_aliases: ['forge_workflow_set'],
772
+ },
773
+ {
774
+ id: 'yujin.workflow.run-step',
775
+ role: 'action',
776
+ action: 'workflow_run_step',
777
+ label: 'Correr paso autonomo del workflow',
778
+ description: 'Run an autonomous step. Valid: legacy_audit | coverage | '
779
+ + 'manual_generate | handoff | metrics.',
780
+ schema: {
781
+ type: 'object',
782
+ properties: {
783
+ step: { type: 'string', description: 'Step name.', enum: ['legacy_audit', 'coverage', 'manual_generate', 'handoff', 'metrics'] },
784
+ },
785
+ required: ['step'],
786
+ },
787
+ policy: 'unrestricted',
788
+ side_effects: ['filesystem'],
789
+ visible: false,
790
+ handler_side: 'server',
791
+ deprecated_aliases: ['forge_workflow_run_step'],
792
+ },
793
+ /* ============================================================
794
+ * LIFECYCLE (dev-server child processes)
795
+ * ============================================================ */
796
+ {
797
+ id: 'yujin.lifecycle.run-app',
798
+ role: 'action',
799
+ action: 'run_app',
800
+ label: 'Lanzar dev server del proyecto',
801
+ description: 'Launch the project dev server. Auto-detects package '
802
+ + 'manager + script. Returns pid + best-effort URL.',
803
+ schema: {
804
+ type: 'object',
805
+ properties: {
806
+ repo_dir: { type: 'string', maxLength: 500 },
807
+ command: { type: 'string', description: 'Default autoselected.', maxLength: 80 },
808
+ wait_for_url_ms: { type: 'number', description: 'Default 5000, max 30000.' },
809
+ },
810
+ required: [],
811
+ },
812
+ policy: 'approval-required',
813
+ side_effects: ['process'],
814
+ visible: false,
815
+ handler_side: 'server',
816
+ deprecated_aliases: ['forge_run_app'],
817
+ },
818
+ {
819
+ id: 'yujin.lifecycle.stop-app',
820
+ role: 'action',
821
+ action: 'stop_app',
822
+ label: 'Detener dev server',
823
+ description: 'Stop the running app spawned by run-app.',
824
+ schema: {
825
+ type: 'object',
826
+ properties: {
827
+ pid: { type: 'number', description: 'Default: active.' },
828
+ },
829
+ required: [],
830
+ },
831
+ policy: 'approval-required',
832
+ side_effects: ['process'],
833
+ visible: false,
834
+ handler_side: 'server',
835
+ deprecated_aliases: ['forge_stop_app'],
836
+ },
837
+ {
838
+ id: 'yujin.lifecycle.restart-app',
839
+ role: 'action',
840
+ action: 'restart_app',
841
+ label: 'Reiniciar dev server',
842
+ description: 'Stop + relaunch with same (or new) options.',
843
+ schema: {
844
+ type: 'object',
845
+ properties: {
846
+ repo_dir: { type: 'string', maxLength: 500 },
847
+ command: { type: 'string', maxLength: 80 },
848
+ wait_for_url_ms: { type: 'number' },
849
+ },
850
+ required: [],
851
+ },
852
+ policy: 'approval-required',
853
+ side_effects: ['process'],
854
+ visible: false,
855
+ handler_side: 'server',
856
+ deprecated_aliases: ['forge_restart_app'],
857
+ },
858
+ /* ============================================================
859
+ * READER (10-format document reader for voice)
860
+ * ============================================================ */
861
+ {
862
+ id: 'yujin.reader.open',
863
+ role: 'action',
864
+ action: 'reader_open',
865
+ label: 'Abrir documento en lector',
866
+ description: 'Open a NEW DOCUMENT FROM DISK into the document reader. '
867
+ + 'Supported: txt, md, pdf, docx, epub, xlsx, csv, html, '
868
+ + 'rtf, source. Returns doc_id + title + section count + '
869
+ + 'first block.\n\n'
870
+ + 'DO NOT USE FOR reading aloud a tab already in the '
871
+ + 'pizarron -- that is yujin.pizarron.read-tab. The reader '
872
+ + 'is for ingest of a new file the user wants to navigate '
873
+ + 'by sections / bookmarks / search, not for TTS over the '
874
+ + 'pizarron canvas.',
875
+ schema: {
876
+ type: 'object',
877
+ properties: {
878
+ path: { type: 'string', description: 'Path (rel or abs).', minLength: 1, maxLength: 500 },
879
+ },
880
+ required: ['path'],
881
+ },
882
+ policy: 'project-root-gated',
883
+ side_effects: ['filesystem'],
884
+ visible: false,
885
+ handler_side: 'server',
886
+ deprecated_aliases: ['forge_reader_open'],
887
+ },
888
+ {
889
+ id: 'yujin.reader.list-docs',
890
+ role: 'query',
891
+ action: 'reader_list_documents',
892
+ label: 'Listar documentos abiertos',
893
+ description: 'List all documents currently open in this chat session.',
894
+ schema: { type: 'object', properties: {}, required: [] },
895
+ policy: 'unrestricted',
896
+ side_effects: ['none'],
897
+ visible: false,
898
+ handler_side: 'server',
899
+ deprecated_aliases: ['forge_reader_list_documents'],
900
+ },
901
+ {
902
+ id: 'yujin.reader.read-section',
903
+ role: 'query',
904
+ action: 'reader_read_section',
905
+ label: 'Leer seccion del documento',
906
+ description: 'Return the blocks of a section.',
907
+ schema: {
908
+ type: 'object',
909
+ properties: {
910
+ doc_id: { type: 'string', minLength: 1, maxLength: 200 },
911
+ index: { type: 'number', description: '0-based.' },
912
+ },
913
+ required: ['doc_id'],
914
+ },
915
+ policy: 'unrestricted',
916
+ side_effects: ['none'],
917
+ visible: false,
918
+ handler_side: 'server',
919
+ deprecated_aliases: ['forge_reader_read_section'],
920
+ },
921
+ {
922
+ id: 'yujin.reader.next-block',
923
+ role: 'query',
924
+ action: 'reader_next_block',
925
+ label: 'Avanzar al siguiente bloque',
926
+ description: 'Advance the cursor one block forward.',
927
+ schema: {
928
+ type: 'object',
929
+ properties: {
930
+ doc_id: { type: 'string', minLength: 1, maxLength: 200 },
931
+ },
932
+ required: ['doc_id'],
933
+ },
934
+ policy: 'unrestricted',
935
+ side_effects: ['none'],
936
+ visible: false,
937
+ handler_side: 'server',
938
+ deprecated_aliases: ['forge_reader_next_block'],
939
+ },
940
+ {
941
+ id: 'yujin.reader.search',
942
+ role: 'query',
943
+ action: 'reader_search',
944
+ label: 'Buscar en el documento',
945
+ description: 'Full-text search across a document.',
946
+ schema: {
947
+ type: 'object',
948
+ properties: {
949
+ doc_id: { type: 'string', minLength: 1, maxLength: 200 },
950
+ query: { type: 'string', minLength: 1, maxLength: 200 },
951
+ max: { type: 'number', description: 'Default 20.' },
952
+ },
953
+ required: ['doc_id', 'query'],
954
+ },
955
+ policy: 'unrestricted',
956
+ side_effects: ['none'],
957
+ visible: false,
958
+ handler_side: 'server',
959
+ deprecated_aliases: ['forge_reader_search'],
960
+ },
961
+ {
962
+ id: 'yujin.reader.bookmark-set',
963
+ role: 'action',
964
+ action: 'reader_bookmark_set',
965
+ label: 'Marcar bookmark',
966
+ description: 'Set a named bookmark at the current cursor.',
967
+ schema: {
968
+ type: 'object',
969
+ properties: {
970
+ doc_id: { type: 'string', minLength: 1, maxLength: 200 },
971
+ name: { type: 'string', description: 'Letter + lowercase + digits + _ -.', minLength: 1, maxLength: 60 },
972
+ },
973
+ required: ['doc_id', 'name'],
974
+ },
975
+ policy: 'unrestricted',
976
+ side_effects: ['none'],
977
+ visible: false,
978
+ handler_side: 'server',
979
+ deprecated_aliases: ['forge_reader_bookmark_set'],
980
+ },
981
+ {
982
+ id: 'yujin.reader.bookmark-jump',
983
+ role: 'action',
984
+ action: 'reader_bookmark_jump',
985
+ label: 'Saltar a bookmark',
986
+ description: 'Jump to a previously-set bookmark.',
987
+ schema: {
988
+ type: 'object',
989
+ properties: {
990
+ doc_id: { type: 'string', minLength: 1, maxLength: 200 },
991
+ name: { type: 'string', minLength: 1, maxLength: 60 },
992
+ },
993
+ required: ['doc_id', 'name'],
994
+ },
995
+ policy: 'unrestricted',
996
+ side_effects: ['none'],
997
+ visible: false,
998
+ handler_side: 'server',
999
+ deprecated_aliases: ['forge_reader_bookmark_jump'],
1000
+ },
1001
+ {
1002
+ id: 'yujin.reader.recap',
1003
+ role: 'query',
1004
+ action: 'reader_recap',
1005
+ label: 'Recap del lector',
1006
+ description: 'Return the last N spoken blocks. mode=summary calls '
1007
+ + 'Claude (gated by YF_ENABLE_CLAUDE_RECAP=1).',
1008
+ schema: {
1009
+ type: 'object',
1010
+ properties: {
1011
+ doc_id: { type: 'string', minLength: 1, maxLength: 200 },
1012
+ window: { type: 'number', description: 'Default 10, max 60.' },
1013
+ mode: { type: 'string', enum: ['literal', 'summary'] },
1014
+ },
1015
+ required: ['doc_id'],
1016
+ },
1017
+ policy: 'unrestricted',
1018
+ side_effects: ['external-api'],
1019
+ visible: false,
1020
+ handler_side: 'server',
1021
+ deprecated_aliases: ['forge_reader_recap'],
1022
+ },
1023
+ /* ============================================================
1024
+ * MANUAL (Forge user manual, 10 languages)
1025
+ * ============================================================ */
1026
+ {
1027
+ id: 'yujin.manual.open',
1028
+ role: 'action',
1029
+ action: 'manual_open',
1030
+ label: 'Abrir manual del usuario de Forge',
1031
+ description: 'Open the Yujin Forge user manual in the requested '
1032
+ + 'language (default: current panel language). 10 locales: '
1033
+ + 'es, en, pt, fr, ja, zh, hi, ar, de, it.',
1034
+ schema: {
1035
+ type: 'object',
1036
+ properties: {
1037
+ lang: { type: 'string', description: 'Language code.', enum: ['es', 'en', 'pt', 'fr', 'ja', 'zh', 'hi', 'ar', 'de', 'it'] },
1038
+ },
1039
+ required: [],
1040
+ },
1041
+ policy: 'unrestricted',
1042
+ side_effects: ['filesystem'],
1043
+ visible: false,
1044
+ handler_side: 'server',
1045
+ deprecated_aliases: ['forge_manual_open'],
1046
+ },
1047
+ /* ============================================================
1048
+ * alpha.59d -- LIFECYCLE + SHELL verbs.
1049
+ *
1050
+ * These give Forge real control over the host: create
1051
+ * directories, move files, init projects, switch project
1052
+ * root, execute arbitrary shell. Pablo Q1+Q2+Q3 + PD1
1053
+ * (Danger Zone master toggle in limits) + PD2 (every
1054
+ * invocation gets an audit row).
1055
+ * ============================================================ */
1056
+ {
1057
+ id: 'yujin.fs.mkdir',
1058
+ role: 'action',
1059
+ action: 'fs_mkdir',
1060
+ label: 'Crear directorio',
1061
+ description: 'Create a directory (recursive by default). Accepts '
1062
+ + 'absolute paths -- this verb is NOT project-root-gated '
1063
+ + 'because lifecycle verbs need to operate outside the '
1064
+ + 'current root. Approval-required.',
1065
+ schema: {
1066
+ type: 'object',
1067
+ properties: {
1068
+ path: { type: 'string', description: 'Absolute or project-relative path to create.', minLength: 1, maxLength: 500 },
1069
+ recursive: { type: 'boolean', description: 'Default true.' },
1070
+ },
1071
+ required: ['path'],
1072
+ },
1073
+ policy: 'approval-required',
1074
+ side_effects: ['filesystem'],
1075
+ visible: false,
1076
+ handler_side: 'server',
1077
+ },
1078
+ {
1079
+ id: 'yujin.fs.move',
1080
+ role: 'action',
1081
+ action: 'fs_move',
1082
+ label: 'Mover / renombrar archivo',
1083
+ description: 'Move or rename a file. Both paths may be absolute or '
1084
+ + 'project-relative. Approval-required (destructive: '
1085
+ + 'overwrites the destination if it exists).',
1086
+ schema: {
1087
+ type: 'object',
1088
+ properties: {
1089
+ from: { type: 'string', description: 'Source path.', minLength: 1, maxLength: 500 },
1090
+ to: { type: 'string', description: 'Destination path.', minLength: 1, maxLength: 500 },
1091
+ },
1092
+ required: ['from', 'to'],
1093
+ },
1094
+ policy: 'destructive',
1095
+ side_effects: ['filesystem'],
1096
+ visible: false,
1097
+ handler_side: 'server',
1098
+ },
1099
+ {
1100
+ id: 'yujin.project.init',
1101
+ role: 'action',
1102
+ action: 'project_init',
1103
+ label: 'Inicializar proyecto Forge',
1104
+ description: 'Create a directory + scaffold yujin.forge.json with '
1105
+ + 'project_slug + project_name + tier. Creates docs/ + '
1106
+ + 'src/ subdirs. Idempotent: re-running on an existing '
1107
+ + 'yujin.forge.json preserves prior fields.',
1108
+ schema: {
1109
+ type: 'object',
1110
+ properties: {
1111
+ path: { type: 'string', description: 'Directory to create / use.', minLength: 1, maxLength: 500 },
1112
+ slug: { type: 'string', description: 'Optional. Defaults to basename(path) sanitised.' },
1113
+ project_name: { type: 'string', description: 'Optional human label.' },
1114
+ tier: { type: 'string', enum: ['simple', 'medium', 'full'], description: 'Optional workflow tier seed.' },
1115
+ },
1116
+ required: ['path'],
1117
+ },
1118
+ policy: 'approval-required',
1119
+ side_effects: ['filesystem'],
1120
+ visible: false,
1121
+ handler_side: 'server',
1122
+ },
1123
+ {
1124
+ id: 'yujin.project.set-root',
1125
+ role: 'action',
1126
+ action: 'project_set_root',
1127
+ label: 'Cambiar project root activo',
1128
+ description: 'Persist a new active project root in ~/.yujin-forge/'
1129
+ + 'projects.json. The CURRENT process keeps operating on '
1130
+ + 'the projectRoot it was started with; the next yf chat '
1131
+ + 'session reads this. Returns active_root + known_roots.',
1132
+ schema: {
1133
+ type: 'object',
1134
+ properties: {
1135
+ path: { type: 'string', description: 'Absolute path to an existing directory.', minLength: 1, maxLength: 500 },
1136
+ },
1137
+ required: ['path'],
1138
+ },
1139
+ policy: 'approval-required',
1140
+ side_effects: ['filesystem'],
1141
+ visible: false,
1142
+ handler_side: 'server',
1143
+ },
1144
+ {
1145
+ id: 'yujin.shell.exec',
1146
+ role: 'action',
1147
+ action: 'shell_exec',
1148
+ label: 'Ejecutar comando shell',
1149
+ description: 'Execute an arbitrary shell command. The server classifies '
1150
+ + 'the command (destructive / elevation / network / safe) '
1151
+ + 'and the panel approval modal shows the classification '
1152
+ + 'before dispatching. Per Pablo: destructive/elevation/'
1153
+ + 'network always require approval; safe commands auto-'
1154
+ + 'approve. Output truncated at limits.shell.max_output_'
1155
+ + 'bytes. Timeout bounded by limits.shell.timeout_ms_max. '
1156
+ + 'Every invocation is audit-logged.',
1157
+ schema: {
1158
+ type: 'object',
1159
+ properties: {
1160
+ command: { type: 'string', description: 'The shell command to run.', minLength: 1, maxLength: 16384 },
1161
+ cwd: { type: 'string', description: 'Working directory. Absolute or project-relative. Outside-root requires extra approval (limits.shell.cwd_boundary_strict).' },
1162
+ timeout_ms: { type: 'number', description: 'Override timeout. Capped by limits.shell.timeout_ms_max.' },
1163
+ env: { type: 'object', description: 'Extra env vars to inject on top of the whitelist.' },
1164
+ },
1165
+ required: ['command'],
1166
+ },
1167
+ policy: 'destructive',
1168
+ side_effects: ['filesystem', 'network', 'process'],
1169
+ visible: false,
1170
+ handler_side: 'server',
1171
+ },
1172
+ /* ============================================================
1173
+ * MCP BRIDGE VERBS (alpha.59z.26 F101 slice 2)
1174
+ *
1175
+ * These verbs are conditionally surfaced in the system prompt:
1176
+ * buildManifestStub({ includeMcpVerbs: true }) only includes them
1177
+ * when at least one MCP bridge is discovered (Invariant 1:
1178
+ * Forge without MCP is identical to pre-F101). findVerb() and
1179
+ * validateArgs() still resolve them regardless -- the gate is
1180
+ * only on the prompt-side stub.
1181
+ *
1182
+ * Slice 2 ships discovery + listing. Slice 4 wires the proxy
1183
+ * invocation through nac3_invoke. Slice 3 adds panel UI.
1184
+ * ============================================================ */
1185
+ {
1186
+ id: 'yujin.json.query',
1187
+ role: 'query',
1188
+ action: 'json_query',
1189
+ label: 'Consultar un valor JSON con jq-lite',
1190
+ description: 'Evaluate a jq-lite path query against an inline JSON value. '
1191
+ + 'Supports field access, indexing, splat, slice, bracket '
1192
+ + 'access, and a builtin pipe (length, keys, values, type, '
1193
+ + 'first, last). Use this instead of yujin.shell.exec with '
1194
+ + 'jq for cheap extractions from tool_result objects or '
1195
+ + 'small inline JSON blobs.',
1196
+ schema: {
1197
+ type: 'object',
1198
+ properties: {
1199
+ input: { type: 'object', description: 'JSON value to query (object or array; primitives wrap as {value: ...}).' },
1200
+ query: { type: 'string', description: 'jq-lite path expression.', minLength: 1, maxLength: 500 },
1201
+ },
1202
+ required: ['input', 'query'],
1203
+ },
1204
+ policy: 'unrestricted',
1205
+ side_effects: [],
1206
+ visible: false,
1207
+ handler_side: 'server',
1208
+ },
1209
+ {
1210
+ id: 'yujin.json.parse',
1211
+ role: 'query',
1212
+ action: 'json_parse',
1213
+ label: 'Parsear texto JSON',
1214
+ description: 'Parse a JSON string and return the resulting value. Use this '
1215
+ + 'when a previous tool_result returned text instead of a '
1216
+ + 'structured object (e.g. fs.read of a .json file). Returns '
1217
+ + '{ok:true, value:<parsed>} or {ok:false, error:"reason"}.',
1218
+ schema: {
1219
+ type: 'object',
1220
+ properties: {
1221
+ text: { type: 'string', description: 'JSON text to parse.', minLength: 1, maxLength: 1048576 },
1222
+ },
1223
+ required: ['text'],
1224
+ },
1225
+ policy: 'unrestricted',
1226
+ side_effects: [],
1227
+ visible: false,
1228
+ handler_side: 'server',
1229
+ },
1230
+ {
1231
+ id: 'yujin.json.stringify',
1232
+ role: 'query',
1233
+ action: 'json_stringify',
1234
+ label: 'Serializar a JSON',
1235
+ description: 'Serialise a value to a JSON string. Defaults to pretty-print '
1236
+ + 'with 2-space indent. Pass compact=true for a single-line '
1237
+ + 'output.',
1238
+ schema: {
1239
+ type: 'object',
1240
+ properties: {
1241
+ value: { type: 'object', description: 'Value to serialise.' },
1242
+ compact: { type: 'boolean', description: 'Default false.' },
1243
+ },
1244
+ required: ['value'],
1245
+ },
1246
+ policy: 'unrestricted',
1247
+ side_effects: [],
1248
+ visible: false,
1249
+ handler_side: 'server',
1250
+ },
1251
+ {
1252
+ id: 'yujin.text.diff',
1253
+ role: 'query',
1254
+ action: 'text_diff',
1255
+ label: 'Diff de dos textos en memoria',
1256
+ description: 'Compute a unified-format diff between two text values. Use '
1257
+ + 'this for in-memory comparisons (e.g. proposed file edit vs '
1258
+ + 'current content) without writing to disk. Hard-capped at '
1259
+ + '5000 lines per side.',
1260
+ schema: {
1261
+ type: 'object',
1262
+ properties: {
1263
+ before: { type: 'string', description: 'Original text.', maxLength: 1048576 },
1264
+ after: { type: 'string', description: 'New text.', maxLength: 1048576 },
1265
+ context: { type: 'number', description: 'Default 3 lines of context.' },
1266
+ path_hint: { type: 'string', description: 'Optional path shown in the diff header.', maxLength: 500 },
1267
+ },
1268
+ required: ['before', 'after'],
1269
+ },
1270
+ policy: 'unrestricted',
1271
+ side_effects: [],
1272
+ visible: false,
1273
+ handler_side: 'server',
1274
+ },
1275
+ {
1276
+ id: 'yujin.url.parse',
1277
+ role: 'query',
1278
+ action: 'url_parse',
1279
+ label: 'Parsear una URL',
1280
+ description: 'Parse a URL into its components (protocol, host, port, path, '
1281
+ + 'query, hash) and return a structured object. Reuse instead '
1282
+ + 'of asking the user "what is the host?" or running a shell '
1283
+ + 'invocation.',
1284
+ schema: {
1285
+ type: 'object',
1286
+ properties: {
1287
+ url: { type: 'string', description: 'URL to parse.', minLength: 1, maxLength: 4096 },
1288
+ },
1289
+ required: ['url'],
1290
+ },
1291
+ policy: 'unrestricted',
1292
+ side_effects: [],
1293
+ visible: false,
1294
+ handler_side: 'server',
1295
+ },
1296
+ {
1297
+ id: 'yujin.env.list',
1298
+ role: 'query',
1299
+ action: 'env_list',
1300
+ label: 'Listar variables de entorno permitidas',
1301
+ description: 'Return the safe whitelisted env vars currently set (NODE_ENV, '
1302
+ + 'YF_*, PATH dirname count). Sensitive variables (API keys, '
1303
+ + 'secrets) are NEVER included. Use to confirm Forge runtime '
1304
+ + 'configuration without exposing credentials.',
1305
+ schema: {
1306
+ type: 'object',
1307
+ properties: {
1308
+ prefix: { type: 'string', description: 'Optional prefix filter (e.g. "YF_").', maxLength: 64 },
1309
+ },
1310
+ required: [],
1311
+ },
1312
+ policy: 'unrestricted',
1313
+ side_effects: [],
1314
+ visible: false,
1315
+ handler_side: 'server',
1316
+ },
1317
+ {
1318
+ id: 'yujin.npm.outdated',
1319
+ role: 'query',
1320
+ action: 'npm_outdated',
1321
+ label: 'Paquetes npm desactualizados',
1322
+ description: 'Run `npm outdated --json` (or pnpm equivalent if pnpm-lock '
1323
+ + 'exists) and return parsed list of packages with current vs '
1324
+ + 'wanted vs latest versions. Read-only.',
1325
+ schema: {
1326
+ type: 'object',
1327
+ properties: {
1328
+ repo_dir: { type: 'string', maxLength: 500 },
1329
+ },
1330
+ required: [],
1331
+ },
1332
+ policy: 'unrestricted',
1333
+ side_effects: ['filesystem', 'process'],
1334
+ visible: false,
1335
+ handler_side: 'server',
1336
+ },
1337
+ {
1338
+ id: 'yujin.mcp.list-bridges',
1339
+ role: 'query',
1340
+ action: 'list_bridges',
1341
+ label: 'Listar bridges MCP descubiertos',
1342
+ description: 'Returns the active MCP bridges discovered by the registry '
1343
+ + '(loopback scan, project manifest, file convention, env). '
1344
+ + 'Read-only query. Use when the user asks what MCP servers '
1345
+ + 'are available or which tools can be proxied.',
1346
+ schema: {
1347
+ type: 'object',
1348
+ properties: {},
1349
+ required: [],
1350
+ },
1351
+ policy: 'unrestricted',
1352
+ side_effects: ['none'],
1353
+ visible: true,
1354
+ handler_side: 'server',
1355
+ },
1356
+ {
1357
+ id: 'yujin.mcp.show-tools',
1358
+ role: 'query',
1359
+ action: 'show_tools',
1360
+ label: 'Listar tools de un bridge MCP especifico',
1361
+ description: 'Returns the tool catalogue of a single bridge by id. Read-'
1362
+ + 'only HTTP GET to the bridges /.well-known/mcp/tools '
1363
+ + 'endpoint. Slice 2 returns a stub list; slice 4 wires the '
1364
+ + 'real proxy.',
1365
+ schema: {
1366
+ type: 'object',
1367
+ properties: {
1368
+ bridge_id: { type: 'string', description: 'Bridge id from list-bridges.', minLength: 1, maxLength: 80 },
1369
+ },
1370
+ required: ['bridge_id'],
1371
+ },
1372
+ policy: 'unrestricted',
1373
+ side_effects: ['network'],
1374
+ visible: true,
1375
+ handler_side: 'server',
1376
+ },
1377
+ {
1378
+ id: 'yujin.mcp.discover-tools',
1379
+ role: 'query',
1380
+ action: 'discover_tools',
1381
+ label: 'Cargar schemas de tools especificos (lazy)',
1382
+ description: 'Meta-verb: fetch the full schema of one or more MCP-proxied '
1383
+ + 'tools on-demand. The args hint shows tool slugs; this verb '
1384
+ + 'returns their parameter schemas + descriptions. Mirrors the '
1385
+ + 'yujin.nac3.discover-schemas pattern for native NAC-3 verbs.',
1386
+ schema: {
1387
+ type: 'object',
1388
+ properties: {
1389
+ bridge_id: { type: 'string', description: 'Bridge id from list-bridges.', minLength: 1, maxLength: 80 },
1390
+ tool_slugs: { type: 'array', description: 'Array of tool slug strings from the bridges tool list.' },
1391
+ },
1392
+ required: ['bridge_id', 'tool_slugs'],
1393
+ },
1394
+ policy: 'unrestricted',
1395
+ side_effects: ['network'],
1396
+ visible: true,
1397
+ handler_side: 'server',
1398
+ },
1399
+ {
1400
+ id: 'yujin.mcp.toggle',
1401
+ role: 'action',
1402
+ action: 'toggle_bridge',
1403
+ label: 'Habilitar / deshabilitar un bridge MCP',
1404
+ description: 'Flip the active flag of a bridge. When disabled, its proxied '
1405
+ + 'tools disappear from the manifest stub on the next chat '
1406
+ + 'turn. R8 modal triggers because the change affects what '
1407
+ + 'verbs the brain sees globally for this session.',
1408
+ schema: {
1409
+ type: 'object',
1410
+ properties: {
1411
+ bridge_id: { type: 'string', description: 'Bridge id from list-bridges.', minLength: 1, maxLength: 80 },
1412
+ enabled: { type: 'boolean', description: 'true=enable, false=disable.' },
1413
+ },
1414
+ required: ['bridge_id', 'enabled'],
1415
+ },
1416
+ policy: 'approval-required',
1417
+ side_effects: ['filesystem'],
1418
+ visible: true,
1419
+ handler_side: 'server',
1420
+ },
1421
+ {
1422
+ id: 'yujin.mcp.invoke-tool',
1423
+ role: 'action',
1424
+ action: 'invoke_tool',
1425
+ label: 'Invocar una tool proxiada en un MCP bridge',
1426
+ description: 'Slice 4 minimal proxy invocation. Posts {tool_slug, args} '
1427
+ + 'to the bridge endpoint /tools/<tool_slug>/invoke and '
1428
+ + 'returns the bridge response. The brain calls this AFTER '
1429
+ + 'yujin.mcp.show-tools to know which tool_slug to use. '
1430
+ + 'Audit log captures bridge_id + bridge_endpoint + tool_slug '
1431
+ + 'so MCP-proxied invocations are auditable separately from '
1432
+ + 'native NAC-3 dispatch. R8 modal triggers per the tool policy '
1433
+ + '(approval-required if the bridge tagged it destructive).',
1434
+ schema: {
1435
+ type: 'object',
1436
+ properties: {
1437
+ bridge_id: { type: 'string', description: 'Bridge id from list-bridges.', minLength: 1, maxLength: 80 },
1438
+ tool_slug: { type: 'string', description: 'Tool slug from show-tools.', minLength: 1, maxLength: 120 },
1439
+ args: { type: 'object', description: 'Arguments object passed verbatim to the bridge.' },
1440
+ },
1441
+ required: ['bridge_id', 'tool_slug'],
1442
+ },
1443
+ policy: 'approval-required',
1444
+ side_effects: ['network', 'external-api'],
1445
+ visible: true,
1446
+ handler_side: 'server',
1447
+ },
1448
+ {
1449
+ id: 'yujin.mcp.set-creds',
1450
+ role: 'action',
1451
+ action: 'set_creds',
1452
+ label: 'Configurar credenciales de un bridge MCP',
1453
+ description: 'Store bearer / api key for a bridge in CredentialVault. R8 '
1454
+ + 'modal triggers because the operation persists encrypted '
1455
+ + 'secrets. Slice 2 ships a stub returning "not implemented '
1456
+ + 'yet"; slice 4 wires the actual vault write.',
1457
+ schema: {
1458
+ type: 'object',
1459
+ properties: {
1460
+ bridge_id: { type: 'string', description: 'Bridge id from list-bridges.', minLength: 1, maxLength: 80 },
1461
+ creds_slot: { type: 'string', description: 'CredentialVault slot name (lowercase).', minLength: 1, maxLength: 60 },
1462
+ },
1463
+ required: ['bridge_id', 'creds_slot'],
1464
+ },
1465
+ policy: 'destructive',
1466
+ side_effects: ['filesystem'],
1467
+ visible: true,
1468
+ handler_side: 'server',
1469
+ },
1470
+ /* ============================================================
1471
+ * OFFICE (F106) -- cross-platform Excel + Word read/write
1472
+ * ============================================================ */
1473
+ {
1474
+ id: 'office.excel.read',
1475
+ role: 'query',
1476
+ action: 'read_excel',
1477
+ label: 'Leer una hoja de calculo Excel',
1478
+ description: 'Read a .xlsx / .xls / .csv file into structured rows. '
1479
+ + 'When header_row is true (default) each row is an object '
1480
+ + 'keyed by column header. Optional sheet + range filters.',
1481
+ schema: {
1482
+ type: 'object',
1483
+ properties: {
1484
+ path: { type: 'string', description: 'Absolute or project-relative path.', minLength: 1, maxLength: 500 },
1485
+ sheet: { type: 'string', description: 'Sheet name. Default first sheet.', maxLength: 60 },
1486
+ range: { type: 'string', description: 'Cell range like A1:C20. Default full sheet.', maxLength: 40 },
1487
+ header_row: { type: 'boolean', description: 'Treat row 1 as header. Default true.' },
1488
+ },
1489
+ required: ['path'],
1490
+ },
1491
+ policy: 'project-root-gated',
1492
+ side_effects: ['filesystem'],
1493
+ visible: false,
1494
+ handler_side: 'server',
1495
+ },
1496
+ {
1497
+ id: 'office.excel.write',
1498
+ role: 'action',
1499
+ action: 'write_excel',
1500
+ label: 'Escribir una hoja de calculo Excel',
1501
+ description: 'Build a fresh .xlsx / .xls / .csv file from rows. Accepts '
1502
+ + 'rows as array of objects (keys -> headers) or array of '
1503
+ + 'arrays (raw cells). Refuses to overwrite existing files '
1504
+ + 'unless overwrite=true.',
1505
+ schema: {
1506
+ type: 'object',
1507
+ properties: {
1508
+ path: { type: 'string', description: 'Absolute or project-relative path.', minLength: 1, maxLength: 500 },
1509
+ sheet: { type: 'string', description: 'Sheet name. Default Sheet1.', maxLength: 60 },
1510
+ rows: { type: 'array', description: 'Array of objects OR array of arrays. Max 1,000,000 rows.' },
1511
+ overwrite: { type: 'boolean', description: 'Replace existing file. Default false.' },
1512
+ },
1513
+ required: ['path', 'rows'],
1514
+ },
1515
+ policy: 'approval-required',
1516
+ side_effects: ['filesystem'],
1517
+ visible: false,
1518
+ handler_side: 'server',
1519
+ },
1520
+ {
1521
+ id: 'office.excel.list-sheets',
1522
+ role: 'query',
1523
+ action: 'list_sheets',
1524
+ label: 'Listar hojas de un Excel',
1525
+ description: 'Enumerate sheet names + row/col counts from a .xlsx / .xls / '
1526
+ + '.csv file without materialising every cell. Use this to '
1527
+ + 'pick the right sheet + range before invoking office.excel.read '
1528
+ + 'on a large workbook.',
1529
+ schema: {
1530
+ type: 'object',
1531
+ properties: {
1532
+ path: { type: 'string', description: 'Absolute or project-relative path.', minLength: 1, maxLength: 500 },
1533
+ },
1534
+ required: ['path'],
1535
+ },
1536
+ policy: 'project-root-gated',
1537
+ side_effects: ['filesystem'],
1538
+ visible: false,
1539
+ handler_side: 'server',
1540
+ },
1541
+ {
1542
+ id: 'office.excel.append-sheet',
1543
+ role: 'action',
1544
+ action: 'append_sheet',
1545
+ label: 'Agregar una hoja a un Excel existente',
1546
+ description: 'Append a new sheet to an existing .xlsx / .xls workbook '
1547
+ + 'without touching the other sheets. Use this instead of '
1548
+ + 'office.excel.write when the user wants to ADD a tab to a '
1549
+ + 'workbook (not replace the whole file). if_exists controls '
1550
+ + 'the conflict policy: fail (default), replace, or rename '
1551
+ + '(appends " (2)", " (3)" until unique). CSV not supported.',
1552
+ schema: {
1553
+ type: 'object',
1554
+ properties: {
1555
+ path: { type: 'string', description: 'Existing workbook path (xlsx or xls).', minLength: 1, maxLength: 500 },
1556
+ sheet: { type: 'string', description: 'New sheet name.', minLength: 1, maxLength: 100 },
1557
+ rows: { type: 'array', description: 'Cells. Array of objects (keys = headers) or array of arrays (raw cells).' },
1558
+ if_exists: { type: 'string', enum: ['fail', 'replace', 'rename'], description: 'Conflict policy. Default fail.' },
1559
+ },
1560
+ required: ['path', 'sheet', 'rows'],
1561
+ },
1562
+ policy: 'project-root-gated',
1563
+ side_effects: ['filesystem'],
1564
+ visible: false,
1565
+ handler_side: 'server',
1566
+ },
1567
+ {
1568
+ id: 'office.word.read',
1569
+ role: 'query',
1570
+ action: 'read_word',
1571
+ label: 'Leer un documento Word',
1572
+ description: 'Extract text + heading outline from a .docx file. Uses '
1573
+ + 'mammoth for parsing. Returns text, optional outline of '
1574
+ + 'headings, parse warnings, and byte_size.',
1575
+ schema: {
1576
+ type: 'object',
1577
+ properties: {
1578
+ path: { type: 'string', description: 'Absolute or project-relative path.', minLength: 1, maxLength: 500 },
1579
+ include_outline: { type: 'boolean', description: 'Include heading outline. Default true.' },
1580
+ },
1581
+ required: ['path'],
1582
+ },
1583
+ policy: 'project-root-gated',
1584
+ side_effects: ['filesystem'],
1585
+ visible: false,
1586
+ handler_side: 'server',
1587
+ },
1588
+ {
1589
+ id: 'office.word.write',
1590
+ role: 'action',
1591
+ action: 'write_word',
1592
+ label: 'Escribir un documento Word',
1593
+ description: 'Build a minimal .docx file from sections. Each section is '
1594
+ + '{kind:heading|paragraph, level?:1..6, text}. Refuses to '
1595
+ + 'overwrite existing files unless overwrite=true. Only '
1596
+ + '.docx output is supported (the cross-platform path skips '
1597
+ + 'the legacy .doc binary format).',
1598
+ schema: {
1599
+ type: 'object',
1600
+ properties: {
1601
+ path: { type: 'string', description: 'Absolute or project-relative path (.docx).', minLength: 1, maxLength: 500 },
1602
+ sections: { type: 'array', description: 'Array of {kind, level?, text}. Max 50,000 sections.' },
1603
+ overwrite: { type: 'boolean', description: 'Replace existing file. Default false.' },
1604
+ },
1605
+ required: ['path', 'sections'],
1606
+ },
1607
+ policy: 'approval-required',
1608
+ side_effects: ['filesystem'],
1609
+ visible: false,
1610
+ handler_side: 'server',
1611
+ },
1612
+ {
1613
+ id: 'office.pdf.read',
1614
+ role: 'query',
1615
+ action: 'read_pdf',
1616
+ label: 'Leer un PDF',
1617
+ description: 'Extract plain text + per-page outline from a PDF. Uses '
1618
+ + 'pdfjs-dist. Returns {title, text, page_count, outline, '
1619
+ + 'byte_size}. Read cap 32 MB.',
1620
+ schema: {
1621
+ type: 'object',
1622
+ properties: {
1623
+ path: { type: 'string', description: 'Absolute or project-relative path.', minLength: 1, maxLength: 500 },
1624
+ include_outline: { type: 'boolean', description: 'Include per-page outline. Default true.' },
1625
+ },
1626
+ required: ['path'],
1627
+ },
1628
+ policy: 'project-root-gated',
1629
+ side_effects: ['filesystem'],
1630
+ visible: false,
1631
+ handler_side: 'server',
1632
+ },
1633
+ {
1634
+ id: 'yujin.fs.stat',
1635
+ role: 'query',
1636
+ action: 'stat',
1637
+ label: 'Stat de un archivo',
1638
+ description: 'Return stat info (exists, is_file, is_dir, size, mtime) '
1639
+ + 'for a project-relative path. Cheap predicate for "does '
1640
+ + 'this file exist before I read it?".',
1641
+ schema: {
1642
+ type: 'object',
1643
+ properties: {
1644
+ path: { type: 'string', description: 'Project-relative path.', minLength: 1, maxLength: 500 },
1645
+ },
1646
+ required: ['path'],
1647
+ },
1648
+ policy: 'project-root-gated',
1649
+ side_effects: ['filesystem'],
1650
+ visible: false,
1651
+ handler_side: 'server',
1652
+ },
1653
+ /* ============================================================
1654
+ * A11Y (F107) -- screen-reader + voice-first hooks
1655
+ * ============================================================ */
1656
+ {
1657
+ id: 'yujin.a11y.announce',
1658
+ role: 'action',
1659
+ action: 'announce',
1660
+ label: 'Anunciar texto al lector de pantalla',
1661
+ description: 'Push text into an ARIA live region so screen readers + the '
1662
+ + 'voice loop notify the user. Politeness defaults to polite. '
1663
+ + 'Set speak=true to also queue TTS. Use for status updates, '
1664
+ + 'errors, async completions.',
1665
+ schema: {
1666
+ type: 'object',
1667
+ properties: {
1668
+ text: { type: 'string', description: 'Announcement text. Max 1000 chars.', minLength: 1, maxLength: 1000 },
1669
+ politeness: { type: 'string', description: 'polite|assertive. Default polite.', maxLength: 10 },
1670
+ speak: { type: 'boolean', description: 'Also speak via TTS. Default false.' },
1671
+ locale: { type: 'string', description: 'BCP47 locale hint. Default user voice config.', maxLength: 35 },
1672
+ },
1673
+ required: ['text'],
1674
+ },
1675
+ policy: 'unrestricted',
1676
+ side_effects: ['dom'],
1677
+ visible: false,
1678
+ handler_side: 'panel',
1679
+ },
1680
+ {
1681
+ id: 'yujin.a11y.focus',
1682
+ role: 'action',
1683
+ action: 'focus',
1684
+ label: 'Mover el foco a un elemento NAC-3',
1685
+ description: 'Move keyboard focus to the element identified by its NAC-3 '
1686
+ + 'slug (data-nac-slug attr). Scrolls into view + announces '
1687
+ + 'by default.',
1688
+ schema: {
1689
+ type: 'object',
1690
+ properties: {
1691
+ slug: { type: 'string', description: 'NAC-3 element slug.', minLength: 1, maxLength: 120 },
1692
+ scroll: { type: 'boolean', description: 'Scroll into view. Default true.' },
1693
+ announce: { type: 'boolean', description: 'Announce focus change. Default true.' },
1694
+ },
1695
+ required: ['slug'],
1696
+ },
1697
+ policy: 'unrestricted',
1698
+ side_effects: ['dom'],
1699
+ visible: false,
1700
+ handler_side: 'panel',
1701
+ },
1702
+ {
1703
+ id: 'yujin.a11y.label',
1704
+ role: 'action',
1705
+ action: 'label',
1706
+ label: 'Etiquetar un elemento para lector de pantalla',
1707
+ description: 'Attach a screen-reader description to the element identified '
1708
+ + 'by its NAC-3 slug. Sets aria-label / aria-describedby + '
1709
+ + 'optional role + shortcut hint.',
1710
+ schema: {
1711
+ type: 'object',
1712
+ properties: {
1713
+ slug: { type: 'string', description: 'NAC-3 element slug.', minLength: 1, maxLength: 120 },
1714
+ description: { type: 'string', description: 'Screen-reader text. Max 500 chars.', minLength: 1, maxLength: 500 },
1715
+ shortcut: { type: 'string', description: 'Optional shortcut hint (e.g. Ctrl+S).', maxLength: 40 },
1716
+ role: { type: 'string', description: 'Optional ARIA role hint.', maxLength: 40 },
1717
+ },
1718
+ required: ['slug', 'description'],
1719
+ },
1720
+ policy: 'unrestricted',
1721
+ side_effects: ['dom'],
1722
+ visible: false,
1723
+ handler_side: 'panel',
1724
+ },
1725
+ ];
1726
+ /* ============================================================
1727
+ * Public API
1728
+ * ============================================================ */
1729
+ const BUILT_AT = new Date().toISOString();
1730
+ /** Manifest version bumps when the verbs[] list changes. Hash of
1731
+ * the sorted verb ids -- changes if any verb is added, removed,
1732
+ * or renamed. Schema-only changes do NOT bump the version (the
1733
+ * LLM re-reads the full manifest every session anyway). */
1734
+ function computeManifestVersion() {
1735
+ const ids = VERBS.map((v) => v.id).slice().sort();
1736
+ let h = 5381;
1737
+ const s = ids.join('|');
1738
+ for (let i = 0; i < s.length; i++) {
1739
+ h = ((h << 5) + h + s.charCodeAt(i)) >>> 0;
1740
+ }
1741
+ return 'v1.' + h.toString(36);
1742
+ }
1743
+ const MANIFEST_VERSION = computeManifestVersion();
1744
+ export function manifest() {
1745
+ return {
1746
+ version: MANIFEST_VERSION,
1747
+ built_at: BUILT_AT,
1748
+ forge_version: FORGE_VERSION,
1749
+ verbs: VERBS.slice(),
1750
+ };
1751
+ }
1752
+ export function findVerb(verb_id) {
1753
+ for (const v of VERBS)
1754
+ if (v.id === verb_id)
1755
+ return v;
1756
+ return null;
1757
+ }
1758
+ /** Resolve a deprecated alias (legacy `forge_*` tool name) to
1759
+ * its current verb. Returns null when the alias is unknown. */
1760
+ export function findVerbByAlias(alias) {
1761
+ for (const v of VERBS) {
1762
+ if (v.deprecated_aliases && v.deprecated_aliases.includes(alias)) {
1763
+ return v;
1764
+ }
1765
+ }
1766
+ return null;
1767
+ }
1768
+ /** Validate args against the verb's schema. Returns null when
1769
+ * ok, or a short error string when not. Subset of JSON Schema --
1770
+ * enough to catch the LLM's typical mistakes (missing required,
1771
+ * wrong type, value out of enum, string too long). */
1772
+ export function validateArgs(verb, args) {
1773
+ const argsObj = (args && typeof args === 'object') ? args : {};
1774
+ for (const req of verb.schema.required) {
1775
+ if (!(req in argsObj))
1776
+ return 'missing required arg: ' + req;
1777
+ const v = argsObj[req];
1778
+ if (v === null || v === undefined || v === '') {
1779
+ return 'required arg ' + req + ' is empty';
1780
+ }
1781
+ }
1782
+ for (const [key, val] of Object.entries(argsObj)) {
1783
+ const propSchema = verb.schema.properties[key];
1784
+ if (!propSchema)
1785
+ continue; // permissive on extras
1786
+ const expected = propSchema.type;
1787
+ const actual = Array.isArray(val) ? 'array' : typeof val;
1788
+ if (expected === 'array' && actual !== 'array')
1789
+ return 'arg ' + key + ': expected array, got ' + actual;
1790
+ if (expected !== 'array' && actual !== expected)
1791
+ return 'arg ' + key + ': expected ' + expected + ', got ' + actual;
1792
+ if (expected === 'string' && typeof val === 'string') {
1793
+ if (propSchema.minLength != null && val.length < propSchema.minLength) {
1794
+ return 'arg ' + key + ': too short (min ' + propSchema.minLength + ')';
1795
+ }
1796
+ if (propSchema.maxLength != null && val.length > propSchema.maxLength) {
1797
+ return 'arg ' + key + ': too long (max ' + propSchema.maxLength + ')';
1798
+ }
1799
+ if (propSchema.enum && !propSchema.enum.includes(val)) {
1800
+ return 'arg ' + key + ': value not in enum [' + propSchema.enum.join(', ') + ']';
1801
+ }
1802
+ if (propSchema.pattern && !new RegExp(propSchema.pattern).test(val)) {
1803
+ return 'arg ' + key + ': does not match pattern ' + propSchema.pattern;
1804
+ }
1805
+ }
1806
+ }
1807
+ return null;
1808
+ }
1809
+ /** Compute up to N verb ids closest to the queried id by
1810
+ * Levenshtein distance. Used by the dispatcher when a verb is
1811
+ * not found to give the LLM (and the log) actionable suggestions. */
1812
+ export function suggestVerbs(queried, top = 3) {
1813
+ const scored = VERBS.map((v) => ({
1814
+ id: v.id,
1815
+ d: levenshtein(queried.toLowerCase(), v.id.toLowerCase()),
1816
+ }));
1817
+ scored.sort((a, b) => a.d - b.d);
1818
+ return scored.slice(0, top).map((s) => s.id);
1819
+ }
1820
+ function levenshtein(a, b) {
1821
+ if (a === b)
1822
+ return 0;
1823
+ if (a.length === 0)
1824
+ return b.length;
1825
+ if (b.length === 0)
1826
+ return a.length;
1827
+ const m = a.length, n = b.length;
1828
+ const prev = new Array(n + 1).fill(0);
1829
+ const curr = new Array(n + 1).fill(0);
1830
+ for (let j = 0; j <= n; j++)
1831
+ prev[j] = j;
1832
+ for (let i = 1; i <= m; i++) {
1833
+ curr[0] = i;
1834
+ for (let j = 1; j <= n; j++) {
1835
+ const cost = a.charCodeAt(i - 1) === b.charCodeAt(j - 1) ? 0 : 1;
1836
+ const del = prev[j] + 1;
1837
+ const ins = curr[j - 1] + 1;
1838
+ const sub = prev[j - 1] + cost;
1839
+ curr[j] = del < ins ? (del < sub ? del : sub) : (ins < sub ? ins : sub);
1840
+ }
1841
+ for (let j = 0; j <= n; j++)
1842
+ prev[j] = curr[j];
1843
+ }
1844
+ return prev[n];
1845
+ }
1846
+ //# sourceMappingURL=internal_manifest.js.map