@gajae-code/coding-agent 0.11.0 → 0.11.2

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 (418) hide show
  1. package/CHANGELOG.md +63 -1
  2. package/dist/types/async/job-manager.d.ts +46 -7
  3. package/dist/types/cli/config-cli.d.ts +11 -1
  4. package/dist/types/cli/notify-cli.d.ts +1 -0
  5. package/dist/types/cli/session-picker.d.ts +2 -1
  6. package/dist/types/cli/setup-cli.d.ts +1 -1
  7. package/dist/types/commands/mcp-serve.d.ts +33 -0
  8. package/dist/types/commands/mcp.d.ts +1 -1
  9. package/dist/types/commands/notify.d.ts +0 -2
  10. package/dist/types/commands/sdk.d.ts +1 -1
  11. package/dist/types/config/atomic-yaml-patch.d.ts +18 -0
  12. package/dist/types/config/file-lock.d.ts +14 -4
  13. package/dist/types/config/keybindings.d.ts +42 -1
  14. package/dist/types/config/model-auth.d.ts +3 -0
  15. package/dist/types/config/model-bindings-applier.d.ts +13 -0
  16. package/dist/types/config/model-discovery-manager.d.ts +49 -0
  17. package/dist/types/config/model-equivalence.d.ts +20 -0
  18. package/dist/types/config/model-registry.d.ts +16 -15
  19. package/dist/types/config/model-resolver.d.ts +28 -18
  20. package/dist/types/config/models-config-schema.d.ts +11 -0
  21. package/dist/types/config/settings-schema.d.ts +56 -1
  22. package/dist/types/config/settings.d.ts +14 -11
  23. package/dist/types/coordinator-mcp/policy.d.ts +5 -0
  24. package/dist/types/coordinator-mcp/question-gate-codec.d.ts +129 -0
  25. package/dist/types/coordinator-mcp/question-state.d.ts +356 -0
  26. package/dist/types/coordinator-mcp/server.d.ts +4 -0
  27. package/dist/types/discovery/helpers.d.ts +0 -6
  28. package/dist/types/edit/index.d.ts +3 -0
  29. package/dist/types/eval/py/env.d.ts +9 -0
  30. package/dist/types/extensibility/extensions/loader.d.ts +2 -1
  31. package/dist/types/extensibility/extensions/runner.d.ts +2 -2
  32. package/dist/types/extensibility/extensions/types.d.ts +34 -3
  33. package/dist/types/extensibility/hooks/runner.d.ts +1 -1
  34. package/dist/types/extensibility/shared-events.d.ts +2 -0
  35. package/dist/types/gjc-runtime/deep-interview-recorder.d.ts +10 -1
  36. package/dist/types/gjc-runtime/deep-interview-state.d.ts +44 -0
  37. package/dist/types/gjc-runtime/goal-mode-request.d.ts +11 -1
  38. package/dist/types/gjc-runtime/launch-worktree.d.ts +4 -2
  39. package/dist/types/gjc-runtime/linux-proc.d.ts +29 -0
  40. package/dist/types/gjc-runtime/session-resolution.d.ts +2 -2
  41. package/dist/types/gjc-runtime/state-migrations.d.ts +1 -1
  42. package/dist/types/gjc-runtime/state-writer.d.ts +2 -1
  43. package/dist/types/gjc-runtime/team-launch.d.ts +59 -0
  44. package/dist/types/gjc-runtime/team-notify.d.ts +45 -0
  45. package/dist/types/gjc-runtime/team-runtime.d.ts +29 -121
  46. package/dist/types/gjc-runtime/team-store.d.ts +160 -0
  47. package/dist/types/gjc-runtime/team-workers.d.ts +78 -0
  48. package/dist/types/gjc-runtime/tmux-owner-isolation.d.ts +8 -0
  49. package/dist/types/gjc-runtime/ultragoal-change-set.d.ts +13 -0
  50. package/dist/types/gjc-runtime/ultragoal-evidence.d.ts +38 -0
  51. package/dist/types/gjc-runtime/ultragoal-guard.d.ts +7 -0
  52. package/dist/types/gjc-runtime/ultragoal-pipeline.d.ts +23 -0
  53. package/dist/types/gjc-runtime/ultragoal-receipt-freshness.d.ts +11 -0
  54. package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +55 -33
  55. package/dist/types/gjc-runtime/workflow-cli-common.d.ts +8 -0
  56. package/dist/types/gjc-runtime/workflow-manifest.d.ts +3 -0
  57. package/dist/types/goals/continuation-timeout-guard.d.ts +22 -0
  58. package/dist/types/goals/runtime.d.ts +1 -0
  59. package/dist/types/goals/state.d.ts +8 -0
  60. package/dist/types/harness-control-plane/lifecycle-reconciliation.d.ts +17 -0
  61. package/dist/types/harness-control-plane/phase-rollup.d.ts +4 -7
  62. package/dist/types/harness-control-plane/receipt-ingest.d.ts +5 -0
  63. package/dist/types/harness-control-plane/receipt-spool.d.ts +4 -0
  64. package/dist/types/hindsight/state.d.ts +11 -4
  65. package/dist/types/lsp/lspmux.d.ts +5 -3
  66. package/dist/types/lsp/path-trust.d.ts +1 -0
  67. package/dist/types/main.d.ts +3 -2
  68. package/dist/types/memories/storage.d.ts +1 -0
  69. package/dist/types/modes/action-registry.d.ts +29 -0
  70. package/dist/types/modes/components/chrome.d.ts +14 -0
  71. package/dist/types/modes/components/command-palette.d.ts +27 -0
  72. package/dist/types/modes/components/custom-provider-wizard.d.ts +1 -0
  73. package/dist/types/modes/components/index.d.ts +2 -1
  74. package/dist/types/modes/components/pet-selector.d.ts +1 -1
  75. package/dist/types/modes/components/plan-preview-overlay.d.ts +43 -0
  76. package/dist/types/modes/components/queue-mode-selector.d.ts +1 -1
  77. package/dist/types/modes/components/queue-pane.d.ts +12 -0
  78. package/dist/types/modes/components/read-tool-group.d.ts +6 -0
  79. package/dist/types/modes/components/session-observer-overlay.d.ts +3 -4
  80. package/dist/types/modes/components/sessions-dashboard.d.ts +32 -0
  81. package/dist/types/modes/components/settings-selector.d.ts +1 -1
  82. package/dist/types/modes/components/show-images-selector.d.ts +1 -1
  83. package/dist/types/modes/components/status-line/types.d.ts +1 -1
  84. package/dist/types/modes/components/status-line.d.ts +1 -94
  85. package/dist/types/modes/components/tasks-pane.d.ts +15 -0
  86. package/dist/types/modes/components/theme-selector.d.ts +1 -1
  87. package/dist/types/modes/components/tool-execution.d.ts +15 -0
  88. package/dist/types/modes/components/tool-status-header.d.ts +111 -0
  89. package/dist/types/modes/components/transcript-viewer-overlay.d.ts +42 -0
  90. package/dist/types/modes/controllers/command-controller.d.ts +2 -2
  91. package/dist/types/modes/controllers/extension-ui-controller.d.ts +1 -0
  92. package/dist/types/modes/controllers/goal-mode-controller.d.ts +62 -0
  93. package/dist/types/modes/controllers/input-controller.d.ts +8 -1
  94. package/dist/types/modes/controllers/mode-gate.d.ts +8 -0
  95. package/dist/types/modes/controllers/plan-mode-controller.d.ts +65 -0
  96. package/dist/types/modes/controllers/selector-controller.d.ts +15 -3
  97. package/dist/types/modes/controllers/stt-controller.d.ts +26 -0
  98. package/dist/types/modes/interactive-mode.d.ts +21 -19
  99. package/dist/types/modes/jobs-observer.d.ts +2 -0
  100. package/dist/types/modes/shared/agent-wire/deep-interview-gate.d.ts +4 -11
  101. package/dist/types/modes/shared/agent-wire/workflow-gate-broker.d.ts +21 -2
  102. package/dist/types/modes/shared/agent-wire/workflow-gate-types.d.ts +31 -0
  103. package/dist/types/modes/tasks-aggregator.d.ts +39 -0
  104. package/dist/types/modes/transcript-item-registry.d.ts +60 -0
  105. package/dist/types/modes/types.d.ts +22 -15
  106. package/dist/types/modes/utils/ui-helpers.d.ts +2 -2
  107. package/dist/types/runtime-mcp/manager.d.ts +1 -1
  108. package/dist/types/sdk/broker/broker.d.ts +78 -12
  109. package/dist/types/sdk/broker/ensure.d.ts +9 -0
  110. package/dist/types/sdk/broker/lifecycle-codec.d.ts +4 -0
  111. package/dist/types/sdk/broker/lifecycle-ledger.d.ts +15 -1
  112. package/dist/types/sdk/broker/lifecycle.d.ts +6 -2
  113. package/dist/types/sdk/broker/process-incarnation.d.ts +2 -0
  114. package/dist/types/sdk/broker/session-index.d.ts +0 -1
  115. package/dist/types/sdk/broker/state-version.d.ts +2 -0
  116. package/dist/types/sdk/bus/chat-effect-journal.d.ts +1 -0
  117. package/dist/types/sdk/bus/config-commands.d.ts +1 -1
  118. package/dist/types/sdk/bus/config.d.ts +11 -0
  119. package/dist/types/sdk/bus/daemon-paths.d.ts +1 -0
  120. package/dist/types/sdk/bus/discord-daemon.d.ts +5 -0
  121. package/dist/types/sdk/bus/html-format.d.ts +3 -2
  122. package/dist/types/sdk/bus/index.d.ts +27 -0
  123. package/dist/types/sdk/bus/lifecycle-control-runtime.d.ts +4 -0
  124. package/dist/types/sdk/bus/notification-service.d.ts +20 -0
  125. package/dist/types/sdk/bus/rate-limit-pool.d.ts +13 -2
  126. package/dist/types/sdk/bus/recent-activity.d.ts +21 -12
  127. package/dist/types/sdk/bus/rich-document.d.ts +7 -0
  128. package/dist/types/sdk/bus/rich-render.d.ts +18 -41
  129. package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +9 -4
  130. package/dist/types/sdk/bus/telegram-daemon.d.ts +69 -3
  131. package/dist/types/sdk/bus/threaded-inbound.d.ts +1 -1
  132. package/dist/types/sdk/bus/threaded-render.d.ts +13 -0
  133. package/dist/types/sdk/bus/topic-registry.d.ts +24 -2
  134. package/dist/types/sdk/host/control/operations.d.ts +1 -1
  135. package/dist/types/sdk/host/host.d.ts +2 -0
  136. package/dist/types/sdk/index.d.ts +1 -0
  137. package/dist/types/sdk/session-directory.d.ts +56 -0
  138. package/dist/types/session/agent-session.d.ts +82 -47
  139. package/dist/types/session/agent-storage.d.ts +7 -0
  140. package/dist/types/session/fallback-chain-controller.d.ts +10 -2
  141. package/dist/types/session/internal/managed-session-scope.d.ts +102 -0
  142. package/dist/types/session/internal/managed-session-storage.d.ts +38 -0
  143. package/dist/types/session/messages.d.ts +16 -0
  144. package/dist/types/session/session-manager-internal.d.ts +14 -0
  145. package/dist/types/session/session-manager.d.ts +82 -12
  146. package/dist/types/session/session-storage.d.ts +43 -3
  147. package/dist/types/session/volatile-context-pruning.d.ts +15 -0
  148. package/dist/types/skill-state/{deep-interview-mutation-guard.d.ts → workflow-mutation-guard.d.ts} +24 -8
  149. package/dist/types/skill-state/workflow-state-contract.d.ts +1 -3
  150. package/dist/types/slash-commands/builtin-registry.d.ts +4 -1
  151. package/dist/types/system-prompt.d.ts +2 -11
  152. package/dist/types/task/executor.d.ts +3 -1
  153. package/dist/types/thinking.d.ts +7 -0
  154. package/dist/types/tool-discovery/tool-index.d.ts +1 -50
  155. package/dist/types/tools/ask.d.ts +64 -2
  156. package/dist/types/tools/bash.d.ts +3 -0
  157. package/dist/types/tools/browser/dead-tab-recovery.d.ts +24 -0
  158. package/dist/types/tools/browser/tab-supervisor.d.ts +21 -0
  159. package/dist/types/tools/cron.d.ts +2 -0
  160. package/dist/types/tools/fetch.d.ts +1 -0
  161. package/dist/types/tools/index.d.ts +30 -15
  162. package/dist/types/tools/output-meta.d.ts +1 -0
  163. package/dist/types/tools/read.d.ts +3 -0
  164. package/dist/types/tools/search-tool-bm25.d.ts +3 -4
  165. package/dist/types/tools/subagent-render.d.ts +1 -0
  166. package/dist/types/tools/subagent.d.ts +6 -1
  167. package/dist/types/utils/event-bus.d.ts +1 -1
  168. package/dist/types/web/search/index.d.ts +3 -1
  169. package/package.json +21 -9
  170. package/scripts/build-sdk-package-smoke.ts +39 -1
  171. package/scripts/generate-hotkeys-docs.ts +74 -0
  172. package/scripts/generate-sdk-operation-inventory.ts +64 -20
  173. package/scripts/verify-gjc-sdk-canonicalization.ts +182 -2
  174. package/src/async/job-manager.ts +455 -69
  175. package/src/cli/config-cli.ts +75 -2
  176. package/src/cli/notify-cli.ts +92 -26
  177. package/src/cli/session-picker.ts +20 -3
  178. package/src/cli/setup-cli.ts +1 -1
  179. package/src/cli.ts +1 -1
  180. package/src/commands/config.ts +1 -1
  181. package/src/commands/harness.ts +34 -106
  182. package/src/commands/launch.ts +6 -4
  183. package/src/commands/mcp-serve.ts +85 -8
  184. package/src/commands/mcp.ts +2 -2
  185. package/src/commands/notify.ts +8 -4
  186. package/src/commands/sdk.ts +61 -40
  187. package/src/commands/ultragoal.ts +4 -1
  188. package/src/config/atomic-yaml-patch.ts +80 -13
  189. package/src/config/file-lock.ts +105 -43
  190. package/src/config/keybindings.ts +64 -20
  191. package/src/config/model-auth.ts +9 -0
  192. package/src/config/model-bindings-applier.ts +139 -0
  193. package/src/config/model-discovery-manager.ts +224 -0
  194. package/src/config/model-equivalence.ts +66 -0
  195. package/src/config/model-registry.ts +169 -302
  196. package/src/config/model-resolver.ts +361 -369
  197. package/src/config/models-config-schema.ts +5 -4
  198. package/src/config/settings-schema.ts +159 -2
  199. package/src/config/settings.ts +458 -482
  200. package/src/coordinator-mcp/policy.ts +76 -11
  201. package/src/coordinator-mcp/question-gate-codec.ts +274 -0
  202. package/src/coordinator-mcp/question-state.ts +778 -0
  203. package/src/coordinator-mcp/server.ts +1702 -238
  204. package/src/debug/index.ts +1 -1
  205. package/src/defaults/gjc/skills/deep-interview/SKILL.md +13 -1
  206. package/src/defaults/gjc/skills/team/SKILL.md +16 -0
  207. package/src/discovery/helpers.ts +1 -50
  208. package/src/edit/index.ts +64 -0
  209. package/src/eval/py/env.ts +26 -0
  210. package/src/eval/py/kernel.ts +5 -3
  211. package/src/extensibility/extensions/loader.ts +9 -1
  212. package/src/extensibility/extensions/runner.ts +12 -3
  213. package/src/extensibility/extensions/types.ts +39 -1
  214. package/src/extensibility/gjc-plugins/installer.ts +16 -16
  215. package/src/extensibility/hooks/runner.ts +2 -2
  216. package/src/extensibility/runtime-skill-discovery.ts +33 -13
  217. package/src/extensibility/shared-events.ts +2 -0
  218. package/src/gjc-runtime/deep-interview-recorder.ts +63 -3
  219. package/src/gjc-runtime/deep-interview-runtime.ts +76 -27
  220. package/src/gjc-runtime/deep-interview-state.ts +317 -5
  221. package/src/gjc-runtime/goal-mode-request.ts +55 -8
  222. package/src/gjc-runtime/launch-tmux.ts +2 -5
  223. package/src/gjc-runtime/launch-worktree.ts +5 -5
  224. package/src/gjc-runtime/linux-proc.ts +71 -0
  225. package/src/gjc-runtime/ralplan-runtime.ts +74 -90
  226. package/src/gjc-runtime/session-resolution.ts +18 -3
  227. package/src/gjc-runtime/session-state-sidecar.ts +6 -107
  228. package/src/gjc-runtime/state-migrations.ts +1 -1
  229. package/src/gjc-runtime/state-runtime.ts +320 -249
  230. package/src/gjc-runtime/state-writer.ts +36 -40
  231. package/src/gjc-runtime/team-launch.ts +319 -0
  232. package/src/gjc-runtime/team-notify.ts +326 -0
  233. package/src/gjc-runtime/team-runtime.ts +1099 -1482
  234. package/src/gjc-runtime/team-store.ts +828 -0
  235. package/src/gjc-runtime/team-workers.ts +962 -0
  236. package/src/gjc-runtime/tmux-owner-isolation-cli.ts +2 -11
  237. package/src/gjc-runtime/tmux-owner-isolation.ts +14 -9
  238. package/src/gjc-runtime/tmux-sessions.ts +4 -21
  239. package/src/gjc-runtime/ultragoal-change-set.ts +172 -0
  240. package/src/gjc-runtime/ultragoal-evidence.ts +874 -0
  241. package/src/gjc-runtime/ultragoal-guard.ts +83 -12
  242. package/src/gjc-runtime/ultragoal-pipeline.ts +306 -0
  243. package/src/gjc-runtime/ultragoal-receipt-freshness.ts +102 -1
  244. package/src/gjc-runtime/ultragoal-runtime.ts +156 -1319
  245. package/src/gjc-runtime/workflow-cli-common.ts +30 -0
  246. package/src/gjc-runtime/workflow-manifest.generated.json +58 -0
  247. package/src/gjc-runtime/workflow-manifest.ts +18 -0
  248. package/src/goals/continuation-timeout-guard.ts +79 -0
  249. package/src/goals/runtime.ts +7 -5
  250. package/src/goals/state.ts +18 -0
  251. package/src/harness-control-plane/lifecycle-reconciliation.ts +64 -0
  252. package/src/harness-control-plane/phase-rollup.ts +4 -7
  253. package/src/harness-control-plane/receipt-ingest.ts +5 -0
  254. package/src/harness-control-plane/receipt-spool.ts +51 -7
  255. package/src/harness-control-plane/session-lease.ts +12 -130
  256. package/src/hindsight/backend.ts +26 -27
  257. package/src/hindsight/state.ts +101 -32
  258. package/src/hooks/skill-state.ts +17 -11
  259. package/src/internal-urls/docs-index.generated.ts +21 -18
  260. package/src/lsp/client.ts +1 -1
  261. package/src/lsp/config.ts +145 -26
  262. package/src/lsp/index.ts +1 -1
  263. package/src/lsp/lspmux.ts +39 -10
  264. package/src/lsp/path-trust.ts +81 -0
  265. package/src/main.ts +28 -8
  266. package/src/memories/index.ts +1 -0
  267. package/src/memories/storage.ts +6 -2
  268. package/src/modes/action-registry.ts +165 -0
  269. package/src/modes/components/chrome.ts +40 -0
  270. package/src/modes/components/command-palette.ts +168 -0
  271. package/src/modes/components/custom-editor.ts +1 -1
  272. package/src/modes/components/custom-provider-wizard.ts +51 -14
  273. package/src/modes/components/index.ts +2 -1
  274. package/src/modes/components/pet-selector.ts +11 -17
  275. package/src/modes/components/plan-preview-overlay.ts +295 -0
  276. package/src/modes/components/queue-mode-selector.ts +10 -27
  277. package/src/modes/components/queue-pane.ts +79 -0
  278. package/src/modes/components/read-tool-group.ts +13 -0
  279. package/src/modes/components/session-observer-overlay.ts +207 -772
  280. package/src/modes/components/sessions-dashboard.ts +181 -0
  281. package/src/modes/components/settings-selector.ts +1 -1
  282. package/src/modes/components/show-images-selector.ts +10 -24
  283. package/src/modes/components/status-line/types.ts +1 -1
  284. package/src/modes/components/status-line.ts +1 -969
  285. package/src/modes/components/tasks-pane.ts +73 -0
  286. package/src/modes/components/theme-selector.ts +11 -31
  287. package/src/modes/components/tool-execution.ts +22 -0
  288. package/src/modes/components/tool-status-header.ts +1056 -0
  289. package/src/modes/components/transcript-viewer-overlay.ts +384 -0
  290. package/src/modes/controllers/btw-controller.ts +1 -0
  291. package/src/modes/controllers/command-controller.ts +9 -15
  292. package/src/modes/controllers/event-controller.ts +3 -2
  293. package/src/modes/controllers/extension-ui-controller.ts +72 -25
  294. package/src/modes/controllers/goal-mode-controller.ts +474 -0
  295. package/src/modes/controllers/input-controller.ts +764 -229
  296. package/src/modes/controllers/mode-gate.ts +24 -0
  297. package/src/modes/controllers/plan-mode-controller.ts +517 -0
  298. package/src/modes/controllers/selector-controller.ts +225 -10
  299. package/src/modes/controllers/stt-controller.ts +125 -0
  300. package/src/modes/interactive-mode.ts +302 -1151
  301. package/src/modes/jobs-observer.ts +3 -0
  302. package/src/modes/runtime-init.ts +8 -0
  303. package/src/modes/shared/agent-wire/deep-interview-gate.ts +31 -106
  304. package/src/modes/shared/agent-wire/workflow-gate-broker.ts +78 -19
  305. package/src/modes/shared/agent-wire/workflow-gate-types.ts +177 -0
  306. package/src/modes/tasks-aggregator.ts +199 -0
  307. package/src/modes/transcript-item-registry.ts +229 -0
  308. package/src/modes/types.ts +47 -20
  309. package/src/modes/utils/ui-helpers.ts +17 -9
  310. package/src/prompts/agent-fragments/ralplan-persistence.md +6 -0
  311. package/src/prompts/agent-fragments/restricted-bash.md +1 -0
  312. package/src/prompts/agents/architect.md +2 -8
  313. package/src/prompts/agents/critic.md +2 -8
  314. package/src/prompts/agents/executor.md +3 -0
  315. package/src/prompts/agents/planner.md +4 -12
  316. package/src/prompts/system/custom-system-prompt.md +1 -23
  317. package/src/prompts/system/plan-mode-approved.md +8 -0
  318. package/src/prompts/system/system-prompt.md +17 -96
  319. package/src/prompts/tools/bash.md +4 -4
  320. package/src/prompts/tools/browser.md +15 -52
  321. package/src/prompts/tools/find.md +2 -2
  322. package/src/prompts/tools/hashline.md +13 -55
  323. package/src/prompts/tools/read.md +3 -6
  324. package/src/prompts/tools/search-tool-bm25.md +0 -2
  325. package/src/prompts/tools/search.md +2 -4
  326. package/src/prompts/tools/skill-discovery.md +1 -2
  327. package/src/prompts/tools/task.md +1 -1
  328. package/src/runtime-mcp/manager.ts +1 -1
  329. package/src/sdk/broker/broker.ts +206 -78
  330. package/src/sdk/broker/discovery.ts +21 -2
  331. package/src/sdk/broker/ensure.ts +85 -25
  332. package/src/sdk/broker/lifecycle-codec.ts +11 -0
  333. package/src/sdk/broker/lifecycle-ledger.ts +371 -74
  334. package/src/sdk/broker/lifecycle.ts +1399 -142
  335. package/src/sdk/broker/process-incarnation.ts +5 -13
  336. package/src/sdk/broker/session-index.ts +145 -56
  337. package/src/sdk/broker/state-version.ts +21 -0
  338. package/src/sdk/broker/transport.ts +1 -1
  339. package/src/sdk/bus/chat-daemon-cli.ts +2 -0
  340. package/src/sdk/bus/chat-daemon-control.ts +8 -28
  341. package/src/sdk/bus/chat-effect-journal.ts +14 -4
  342. package/src/sdk/bus/config-commands.ts +5 -4
  343. package/src/sdk/bus/config.ts +98 -0
  344. package/src/sdk/bus/conversation-store.ts +5 -29
  345. package/src/sdk/bus/daemon-paths.ts +2 -0
  346. package/src/sdk/bus/discord-daemon.ts +25 -8
  347. package/src/sdk/bus/html-format.ts +20 -3
  348. package/src/sdk/bus/index.ts +834 -113
  349. package/src/sdk/bus/lifecycle-control-runtime.ts +91 -33
  350. package/src/sdk/bus/native-runtime-compatibility.ts +1 -1
  351. package/src/sdk/bus/natives-augment.d.ts +26 -1
  352. package/src/sdk/bus/notification-service.ts +168 -20
  353. package/src/sdk/bus/rate-limit-pool.ts +58 -14
  354. package/src/sdk/bus/recent-activity.ts +188 -74
  355. package/src/sdk/bus/rich-document.ts +258 -0
  356. package/src/sdk/bus/rich-render.ts +62 -70
  357. package/src/sdk/bus/telegram-daemon-cli.ts +15 -59
  358. package/src/sdk/bus/telegram-daemon-contract.ts +9 -4
  359. package/src/sdk/bus/telegram-daemon.ts +1491 -247
  360. package/src/sdk/bus/threaded-inbound.ts +8 -3
  361. package/src/sdk/bus/threaded-render.ts +57 -1
  362. package/src/sdk/bus/topic-registry.ts +120 -13
  363. package/src/sdk/host/control/dispatch.ts +14 -2
  364. package/src/sdk/host/control/operations.ts +6 -1
  365. package/src/sdk/host/host.ts +31 -1
  366. package/src/sdk/host/query/handlers.ts +20 -22
  367. package/src/sdk/host/query/revision-store.ts +80 -57
  368. package/src/sdk/index.ts +1 -0
  369. package/src/sdk/protocol/operation-inventory.generated.json +943 -1907
  370. package/src/sdk/session-directory.ts +141 -0
  371. package/src/sdk/session.ts +458 -479
  372. package/src/session/agent-session.ts +1901 -637
  373. package/src/session/agent-storage.ts +18 -0
  374. package/src/session/cache-economics.ts +25 -8
  375. package/src/session/fallback-chain-controller.ts +53 -3
  376. package/src/session/internal/managed-session-scope.ts +2226 -0
  377. package/src/session/internal/managed-session-storage.ts +453 -0
  378. package/src/session/messages.ts +91 -2
  379. package/src/session/session-manager-internal.ts +33 -0
  380. package/src/session/session-manager.ts +1112 -333
  381. package/src/session/session-storage.ts +444 -39
  382. package/src/session/volatile-context-pruning.ts +78 -0
  383. package/src/setup/credential-auto-import.ts +2 -1
  384. package/src/setup/hermes/templates/operator-instructions.v1.md +1 -1
  385. package/src/setup/provider-onboarding.ts +36 -61
  386. package/src/setup/provider-presets.json +5 -0
  387. package/src/skill-state/active-state.ts +3 -13
  388. package/src/skill-state/{deep-interview-mutation-guard.ts → workflow-mutation-guard.ts} +47 -29
  389. package/src/skill-state/workflow-state-contract.ts +6 -41
  390. package/src/slash-commands/builtin-registry.ts +46 -11
  391. package/src/system-prompt.ts +37 -44
  392. package/src/task/agents.ts +19 -1
  393. package/src/task/executor.ts +90 -6
  394. package/src/task/index.ts +62 -37
  395. package/src/thinking.ts +21 -6
  396. package/src/tool-discovery/tool-index.ts +2 -134
  397. package/src/tools/ask.ts +157 -21
  398. package/src/tools/ast-edit.ts +1 -1
  399. package/src/tools/bash.ts +38 -0
  400. package/src/tools/browser/dead-tab-recovery.ts +78 -0
  401. package/src/tools/browser/tab-supervisor.ts +282 -36
  402. package/src/tools/computer.ts +10 -3
  403. package/src/tools/cron.ts +30 -16
  404. package/src/tools/eval.ts +1 -2
  405. package/src/tools/fetch.ts +11 -4
  406. package/src/tools/index.ts +76 -24
  407. package/src/tools/output-meta.ts +13 -5
  408. package/src/tools/read.ts +37 -1
  409. package/src/tools/resource-gc.ts +2 -2
  410. package/src/tools/search-tool-bm25.ts +11 -74
  411. package/src/tools/subagent-render.ts +19 -8
  412. package/src/tools/subagent.ts +84 -32
  413. package/src/utils/event-bus.ts +9 -4
  414. package/src/web/search/index.ts +3 -3
  415. package/dist/types/discovery/plugin-dir-roots.d.ts +0 -15
  416. package/dist/types/runtime-mcp/discoverable-tool-metadata.d.ts +0 -7
  417. package/src/discovery/plugin-dir-roots.ts +0 -28
  418. package/src/runtime-mcp/discoverable-tool-metadata.ts +0 -25
@@ -17,7 +17,7 @@ Review plan clarity, completeness, verification, big-picture fit, referenced fil
17
17
 
18
18
  <constraints>
19
19
  - Read-only: do not write, edit, format, commit, push, or mutate files.
20
- - Exception: you may use restricted `bash` only for sanctioned GJC workflow CLI persistence (`gjc ralplan --write ...`) and GJC workflow state read/write/contract commands (`gjc state ...`). For `gjc ralplan --write`, pass evaluation markdown through `GJC_RALPLAN_ARTIFACT` and `--artifact-env GJC_RALPLAN_ARTIFACT`, not as a file path. Do not use bash for product-source writes, direct handoffs, state clears, or general shell work.
20
+ {{restrictedBash}}
21
21
  - A lone file path is valid input; read and evaluate it.
22
22
  - Reject YAML-only plans as invalid plan format when a human-readable plan is required.
23
23
  - Do not invent problems; report no issues found when the plan passes.
@@ -62,11 +62,5 @@ What execution may proceed with, and what remains outside approval.
62
62
  ## Required Changes
63
63
  If not OKAY, list concrete defect fixes or expansion requirements; otherwise write `None`.
64
64
 
65
- Persistence (ralplan runs only):
66
- - Only when your assignment is part of an active ralplan run (the assignment references a ralplan stage or `stage_n`), persist the full evaluation through the restricted bash CLI:
67
-
68
- gjc ralplan --write --stage critic --stage_n <N> --artifact-env GJC_RALPLAN_ARTIFACT --json
69
-
70
- Use the assignment-provided `stage_n`; if a duplicate-write error occurs, retry with the incremented N. Then return ONLY the write receipt (`run_id`, `path`, `sha256`, `stage`, `stage_n`) plus compact verdict (OKAY / ITERATE / REJECT) in `yield.result.data`. Never paste the full evaluation body back; the caller reads the persisted artifact when needed.
71
- - Otherwise (any non-ralplan invocation), do NOT call `gjc ralplan --write`; return the full evaluation in `yield.result.data` instead.
65
+ {{ralplanPersistence}}
72
66
  </output_contract>
@@ -31,6 +31,8 @@ Explore just enough context, implement the smallest correct change, and leave co
31
31
  5. Remove debug leftovers and report changed files plus evidence.
32
32
  </execution_loop>
33
33
 
34
+ {{#if ultragoalRedTeam}}
35
+
34
36
  <ultragoal_red_team_mode>
35
37
  This mode activates only when the assignment explicitly labels Executor as Ultragoal completion QA/red-team or asks for `executorQa` red-team evidence. Otherwise, preserve ordinary Executor behavior.
36
38
 
@@ -41,6 +43,7 @@ When active:
41
43
  - Do not call `ask`; record unresolved decisions with `gjc ultragoal record-review-blockers`.
42
44
  - Report blockers for missing plan/spec/acceptance source, contract ambiguity, plan/code mismatch, untestable surface, failed adversarial case, shallow evidence, or missing artifact refs.
43
45
  </ultragoal_red_team_mode>
46
+ {{/if}}
44
47
 
45
48
  <success_criteria>
46
49
  - Requested behavior is implemented in the assigned scope.
@@ -17,7 +17,7 @@ Leave execution with a right-sized, evidence-grounded plan: scope, steps, accept
17
17
 
18
18
  <constraints>
19
19
  - Read-only: never write, edit, format, commit, push, or mutate files.
20
- - Exception: you may use restricted `bash` only for sanctioned GJC workflow CLI persistence (`gjc ralplan --write ...`) and GJC workflow state read/write/contract commands (`gjc state ...`). For `gjc ralplan --write`, pass plan markdown through `GJC_RALPLAN_ARTIFACT` and `--artifact-env GJC_RALPLAN_ARTIFACT`, not as a file path. Do not use bash for product-source writes, direct handoffs, state clears, or general shell work.
20
+ {{restrictedBash}}
21
21
  - Persist durable plans only through `gjc ralplan --write`; never write plan files to `/tmp`, the repository, or any other path.
22
22
  - Inspect the repository before asking about code facts.
23
23
  - Ask only about priorities, tradeoffs, scope decisions, timelines, or preferences repository inspection cannot resolve. When running headless (no user available to ask), do not block on questions — record the assumption and open question in the plan's Decision Drivers / Risks instead.
@@ -54,17 +54,9 @@ Build one markdown plan containing:
54
54
  - Verification Plan
55
55
  - Risks and mitigations
56
56
 
57
- Default durable workflow output:
58
- - Persist the markdown through the restricted bash CLI, passing the plan through `GJC_RALPLAN_ARTIFACT` and `--artifact-env GJC_RALPLAN_ARTIFACT` (never a file path, never `/tmp`):
59
-
60
- gjc ralplan --write --stage planner --stage_n <N> --artifact-env GJC_RALPLAN_ARTIFACT --json
61
- Use the assignment-provided `stage_n`; if a duplicate-write error occurs, retry with the incremented N.
62
-
63
- - Then return ONLY the write receipt (`run_id`, `path`, `sha256`, `stage`, `stage_n`) plus a compact plan summary (<=10 lines). Never paste the full plan body back; the caller reads the persisted artifact when needed.
57
+ {{ralplanPersistence}}
64
58
 
65
59
  Inline-output exception:
66
- - If the assignment explicitly disables persistence (for example, "do not persist", "read-only: do not mutate `.gjc/`", or "leader persists it"), do NOT use `gjc ralplan --write`.
67
- - In that case, put the complete markdown document itself inside `yield.result.data.plan_markdown`.
68
- - If the assignment asks to show or return the complete plan body but does not explicitly disable persistence, keep the durable workflow output path and include any requested body alongside the receipt in `yield.result.data`; do not skip the Planner stage artifact.
69
- - Never return a pointer such as "see message body", "returned inline", or "leader persists"; subagent plain text is not the result channel, and the caller only receives `yield.result.data`.
60
+ - If the assignment explicitly disables persistence (for example, "do not persist", "read-only: do not mutate `.gjc/`", or "leader persists it"), do not persist; put the complete markdown document inside `yield.result.data.plan_markdown`.
61
+ - If the assignment asks to show or return the complete plan without disabling persistence, include it alongside the receipt.
70
62
  </output_contract>
@@ -5,9 +5,8 @@
5
5
  {{#if appendPrompt}}
6
6
  {{appendPrompt}}
7
7
  {{/if}}
8
- {{#ifAny contextFiles.length git.isRepo}}
9
- <project>
10
8
  {{#if contextFiles.length}}
9
+ <project>
11
10
  ## Context
12
11
  <instructions>
13
12
  {{#list contextFiles join="\n"}}
@@ -16,28 +15,7 @@
16
15
  </file>
17
16
  {{/list}}
18
17
  </instructions>
19
- {{/if}}
20
- {{#if git.isRepo}}
21
- ## Version Control
22
- Snapshot; does not update during conversation.
23
- Current branch: {{git.currentBranch}}
24
- Main branch: {{git.mainBranch}}
25
- {{git.status}}
26
- ### History
27
- {{git.commits}}
28
- {{/if}}
29
18
  </project>
30
- {{/ifAny}}
31
- {{#if skills.length}}
32
- Skills are specialized knowledge. Scan descriptions for your task domain.
33
- If a task-specific instruction applies, you MUST read the referenced local file before proceeding.
34
- <skills>
35
- {{#list skills join="\n"}}
36
- <skill name="{{name}}">
37
- {{description}}
38
- </skill>
39
- {{/list}}
40
- </skills>
41
19
  {{/if}}
42
20
  {{#if alwaysApplyRules.length}}
43
21
  {{#each alwaysApplyRules}}
@@ -13,6 +13,14 @@ Execution may be in fresh context. Treat the finalized plan as the source of tru
13
13
 
14
14
  {{planContent}}
15
15
 
16
+ {{#if reviewerComments}}
17
+ ## Reviewer comments
18
+
19
+ These comments are guidance to apply during implementation; they do not reopen planning.
20
+
21
+ {{reviewerComments}}
22
+ {{/if}}
23
+
16
24
  <instruction>
17
25
  You MUST execute this plan step by step from `{{finalPlanFilePath}}`. You have full tool access.
18
26
  You MUST verify each step before proceeding to the next.
@@ -18,78 +18,14 @@ Optimize for correctness first, maintainability second, and brevity third. Prefe
18
18
 
19
19
  {{#unless subagent}}
20
20
  <gjc-runtime>
21
- <public-workflow-surface>
22
- GJC exposes exactly four default workflow skills. Do not add, advertise, or route to other default workflow definitions without an explicit product decision.
23
-
24
- <skill name="deep-interview" user-entrypoint="/skill:deep-interview" cli-runtime="native: gjc deep-interview">
25
- Use for vague ideas that need Socratic requirements gathering, mathematical ambiguity scoring, topology confirmation, and a spec under `.gjc/specs/`. It is a requirements workflow; it must not mutate product code. The normal handoff is deep-interview spec → ralplan consensus refinement → pending approval → separately approved execution.
26
- </skill>
27
-
28
- <skill name="ralplan" user-entrypoint="/skill:ralplan" cli-runtime="native: gjc ralplan">
29
- Use for consensus planning when requirements are clear enough to plan but architecture, sequencing, or verification needs Planner/Architect/Critic agreement. Plans belong under `.gjc/plans/` and remain pending approval until the user explicitly approves execution.
30
- </skill>
31
-
32
- <skill name="ultragoal" user-entrypoint="/skill:ultragoal" cli-runtime="native: gjc ultragoal">
33
- Use for durable multi-goal execution ledgers under `.gjc/ultragoal/`, especially when a leader must track goal state, checkpoints, and evidence across a long-running effort.
34
- </skill>
35
-
36
- <skill name="team" user-entrypoint="/skill:team" cli-runtime="native: gjc team">
37
- Use for tmux-backed coordinated execution with workers, shared state under `.gjc/state/team/`, mailbox/dispatch APIs, worktrees, lifecycle control, and explicit verification lanes.
38
- </skill>
39
- </public-workflow-surface>
40
- Agent sessions MUST activate bundled workflow skills via the `/skill:<name>` user-entrypoint unless a skill explicitly requires its native CLI runtime. `gjc deep-interview`, `gjc ralplan`, `gjc ultragoal`, and `gjc team` are all native commands that read and write `.gjc/state`, `.gjc/plans`, and `.gjc/ultragoal` directly.
41
-
42
- <role-agent-surface>
43
- GJC also bundles four source-defined role agents for the task/sub-agent tool. These are not workflow skills and are not repo-visible `.gjc` defaults. They are implementation and review lanes loaded from source prompts.
44
-
45
- <agent name="executor">
46
- Use for bounded implementation, refactoring, fixes, and focused code changes. For sufficiently large, multi-file, or parallelizable work, fork/delegate concrete implementation slices to `executor` instead of silently shrinking scope. The parent remains responsible for integration and final verification.
47
- </agent>
48
-
49
- <agent name="planner">
50
- Use for read-only sequencing, acceptance criteria, risk mapping, and execution handoff shape when a task needs planning but not full workflow-mode consensus.
51
- </agent>
52
-
53
- <agent name="architect">
54
- Use for read-only architecture and code-review assessment, including architectural status (`CLEAR`/`WATCH`/`BLOCK`) and severity-rated review concerns.
55
- </agent>
56
-
57
- <agent name="critic">
58
- Use for read-only plan critique. It approves only when execution can proceed without guessing and verification is concrete.
59
- </agent>
60
- </role-agent-surface>
61
-
62
21
  <routing>
63
- - Clear, low-risk implementation request → implement directly with focused verification.
64
- - For simple clear implementation requests, direct tools are the default launch path. Do not invoke workflow skills or spawn role agents unless the request itself asks for a workflow, durable ledger, parallel workers, or review lane.
65
- - The workflow-intent-diff CustomEntry does not participate in LLM context; do not infer hidden workflow intent from launch plumbing.
66
- - Informational questions, bare `?`, and unambiguous explanatory prompts are answer-only/read-only: answer from available context and do not modify files, run commands, or execute workflows unless the user explicitly asks to change, run, implement, or execute something.
67
- - When a task is clear, bounded, and low-risk, make the smallest correct change and verify it; do not escalate to interviews, durable ledgers, or delegation for ceremony.
68
- - Small verification needs do not make a clear implementation request into a planning workflow.
69
- - Ambiguous implementation asks with missing target, scope, acceptance criteria, or safety boundary require clarification or the appropriate planning workflow before mutation.
70
- - Vague requirements → use `deep-interview`; clear requirements with non-trivial architecture/sequence risk → use `ralplan --deliberate` and stop at pending approval.
71
- - Architecture/sequence risk that is clear enough to plan but not safe to execute directly → use `ralplan --deliberate` and stop at pending approval.
72
- - Durable goal ledger needed → use `ultragoal`; approved work that benefits from coordinated persistent workers → use `team`.
73
- - Large enough implementation work → delegate bounded slices to `executor`; use `planner`, `architect`, and `critic` for bounded planning/review lanes when a full workflow is unnecessary.
74
- - Treat root-cause phase schema workflows as special-purpose gates only for contradiction, regression, or high-risk transition analysis; do not apply them to ordinary clear fixes.
75
- - Before explicit execution approval, planning workflows NEVER edit product source, run mutation-oriented shell commands, commit, push, open PRs, or delegate implementation tasks.
22
+ - Clear, low-risk implementation requests use direct tools and focused verification; do not invoke workflows or role agents for ceremony.
23
+ - Informational questions are answer-only/read-only unless the user explicitly requests a change, command, or execution.
24
+ - Vague requirements use `/skill:deep-interview`; clear work with non-trivial architecture or sequencing risk uses `/skill:ralplan --deliberate` and stops pending approval.
25
+ - Use `/skill:ultragoal` for durable goal ledgers and `/skill:team` for approved coordinated persistent work.
26
+ - Delegate large implementation slices to `executor`; use `planner`, `architect`, or `critic` for bounded planning and review.
27
+ - Active skills are authoritative: read and follow them; planning and read-only skills do not mutate before approval.
76
28
  </routing>
77
-
78
- <skill-discipline>
79
- - Never ignore a skill invocation or any skill text. When a skill is active, read it in full and follow it exactly.
80
- - Read-only, interview, and planning skills must not implement or mutate before approval. Code guards enforce blockable mutation boundaries; keep prompt guidance concise and obey active skill scope.
81
- - Recommend `/skill:<name>` only when the task fits a bundled skill; otherwise, when no skill is active or the active skill permits it, perform non-destructive correct action directly.
82
- </skill-discipline>
83
-
84
- <runtime-state>
85
- - Runtime state, specs, plans, and workflow ledgers belong under `.gjc/`.
86
- - Default workflow skills are bundled from `packages/coding-agent/src/defaults/gjc/skills/`. Runtime user/project `.gjc` discovery remains supported, but committed repo-visible `.gjc` defaults are not the source of truth.
87
- - Do not load or inject user-home Anthropic model or provider instructions (`~/.anthropic-model`, `~/.openai-code`) into the model context.
88
- - Public commands, paths, examples, and workflow names must use `gjc` and `.gjc`.
89
- </runtime-state>
90
- <self-awareness>
91
- - For questions about GJC usage, commands, workflows, or the gajae-code system, ground the answer in the canonical source repository cloned/reused under `/tmp`, and cite concrete source paths.
92
- </self-awareness>
93
29
  </gjc-runtime>
94
30
  {{/unless}}
95
31
 
@@ -144,13 +80,7 @@ Use tools whenever they materially improve correctness, completeness, or groundi
144
80
  {{#if toolDiscoveryActive}}
145
81
  <tool-discovery>
146
82
  Use `{{toolRefs.search_tool_bm25}}` to activate hidden tools when a purpose-built capability would improve the task; then call the activated tool. Essential tools stay loaded up front.
147
- {{#if discoverableTools.length}}The session may list discoverable tools below.{{/if}}
148
- {{#if discoverableTools.length}}
149
- Discoverable tools:
150
- {{#each discoverableTools}}
151
- - `{{name}}`{{#if summary}} — {{summary}}{{/if}}
152
- {{/each}}
153
- {{/if}}
83
+ Discoverable capabilities include browser automation, scheduling, debugging, and external integrations.
154
84
  </tool-discovery>
155
85
  {{/if}}
156
86
 
@@ -168,12 +98,6 @@ Some tool output values are intentionally redacted as `#XXXX#` tokens. Treat the
168
98
  </redacted-content>
169
99
  {{/if}}
170
100
 
171
- {{#if mcpDiscoveryMode}}
172
- <discovery>
173
- {{#if hasMCPDiscoveryServers}}Discoverable MCP servers in this session: {{#list mcpDiscoveryServerSummaries join=", "}}{{this}}{{/list}}.{{/if}}
174
- If the task may involve external systems, SaaS APIs, chat, tickets, databases, deployments, or other non-local integrations, you SHOULD call `{{toolRefs.search_tool_bm25}}` before concluding no such tool exists.
175
- </discovery>
176
- {{/if}}
177
101
 
178
102
  {{#has tools "lsp"}}
179
103
  <lsp>
@@ -209,12 +133,8 @@ Delegate by default for multi-file changes, refactors, new features, tests, and
209
133
 
210
134
  {{#has tools "task"}}
211
135
  <detached-subagents>
212
- - Normal `{{toolRefs.task}}` launches return immediately as detached background subagents; do not wait in the launch call for their final output.
213
- {{#has tools "subagent"}}- Use `{{toolRefs.subagent}}` to list, inspect, await with `timeout_ms`, or cancel detached task subagents.{{/has}}
214
- - If an await timeout elapses, the subagent is still running; this is not a failure. Inspect progress, continue independent work, and never cancel just because an await timed out; cancel only when the subagent has actually failed, gone off-track, or become unrecoverably wrong.
215
- {{#has tools "irc"}}- If live messaging is enabled, coordinate with running subagents through `{{toolRefs.irc}}`; cancellation is not a message channel.{{/has}}
216
- {{#has tools "irc"}}- When a subagent's scope shifts or needs steering, check in through `{{toolRefs.irc}}` rather than guessing its state.{{/has}}
217
- {{#has tools "job"}}- `{{toolRefs.job}}` remains the generic background-job tool for non-subagent jobs and compatibility.{{/has}}
136
+ - Normal `{{toolRefs.task}}` launches return immediately as detached background subagents.
137
+ {{#has tools "subagent"}}- Use `{{toolRefs.subagent}}` for task-subagent lifecycle control; its await/cancel doctrine is authoritative.{{/has}}
218
138
  </detached-subagents>
219
139
  {{/has}}
220
140
 
@@ -233,14 +153,15 @@ For image understanding, call `{{toolRefs.read}}` on the image path; the image i
233
153
  </exploration>
234
154
 
235
155
  <tool-priority>
236
- {{#has tools "read"}}- File/dir reads → `{{toolRefs.read}}`, not shell `cat`/`ls`.{{/has}}
237
- {{#has tools "edit"}}- Surgical text edits → `{{toolRefs.edit}}`, not shell `sed`.{{/has}}
238
- {{#has tools "write"}}- File create/overwrite → `{{toolRefs.write}}`, not shell redirection.{{/has}}
239
- {{#has tools "lsp"}}- Code intelligence → `{{toolRefs.lsp}}`, not blind text search.{{/has}}
240
- {{#has tools "search"}}- Regex search → `{{toolRefs.search}}`, not shell `grep`/`rg`/`awk`.{{/has}}
241
- {{#has tools "find"}}- File globbing → `{{toolRefs.find}}`, not shell `find`/`fd`/`ls`.{{/has}}
156
+ - NEVER use shell coreutils (`cat`, `head`, `tail`, `less`, `more`, `ls`, `grep`, `rg`, `awk`, `sed`, `find`, `fd`, and equivalents) when a dedicated tool suffices; use `read`, `search`, `find`, `edit`, or `write`.
157
+ {{#has tools "read"}}- File/dir reads → `{{toolRefs.read}}`.{{/has}}
158
+ {{#has tools "edit"}}- Surgical text edits → `{{toolRefs.edit}}`.{{/has}}
159
+ {{#has tools "write"}}- File create/overwrite → `{{toolRefs.write}}`.{{/has}}
160
+ {{#has tools "lsp"}}- Code intelligence → `{{toolRefs.lsp}}`.{{/has}}
161
+ {{#has tools "search"}}- Regex search → `{{toolRefs.search}}`.{{/has}}
162
+ {{#has tools "find"}}- File globbing → `{{toolRefs.find}}`.{{/has}}
242
163
  {{#has tools "eval"}}- Quick compute → `{{toolRefs.eval}}` when it improves correctness.{{/has}}
243
- {{#has tools "bash"}}- Shell → `{{toolRefs.bash}}` only for terminal operations that dedicated tools do not cover. Never use shell pipelines for reading, searching, globbing, or truncating output.{{/has}}
164
+ {{#has tools "bash"}}- Shell → `{{toolRefs.bash}}` only for terminal operations that dedicated tools do not cover; never pipe to truncate output.{{/has}}
244
165
  </tool-priority>
245
166
  </tools>
246
167
 
@@ -40,12 +40,12 @@ Use it only for sanctioned GJC workflow CLI persistence or state read/write/cont
40
40
 
41
41
  <critical>
42
42
  {{#when restrictionProfile "==" "read-only"}}
43
- - Use read-only bash only for approved inspection commands that are materially better than `read`, `search`, or `find`; the tool itself blocks non-approved commands and unsafe shell shapes.
43
+ - Use read-only bash only for approved inspection commands that are materially better than dedicated tools; unsafe shell shapes are blocked.
44
44
  {{else}}
45
- - NEVER use Linux coreutils (`cat`, `head`, `tail`, `less`, `more`, `ls`, `grep`, `rg`, `awk`, `sed`, `find`, `fd`, etc.) when a dedicated tool suffices — ALWAYS prefer `read`, `search`, `find`, `edit`, `write`.
45
+ - Use bash only for terminal operations that dedicated tools do not cover.
46
46
  {{/when}}
47
- - NEVER pipe through `| head -n N` or `| tail -n N` — output is already truncated with the full result available via `artifact://<id>`.
48
- - NEVER redirect with `2>&1` or `2>/dev/null` — stdout and stderr are already merged.
47
+ - Never pipe through `| head -n N` or `| tail -n N` — output is already truncated with the full result available via `artifact://<id>`.
48
+ - Never redirect with `2>&1` or `2>/dev/null` — stdout and stderr are already merged.
49
49
  </critical>
50
50
 
51
51
  <output>
@@ -1,41 +1,22 @@
1
1
  Drives a real Chromium tab with full puppeteer access via JS execution.
2
2
 
3
3
  <instruction>
4
- - For static web content (articles, docs, issues/PRs, JSON, PDFs, feeds), prefer the `read` tool with a URL — reader-mode text without spinning up a browser. Use this tool when you need JS execution, authentication, or interactive actions.
4
+ - For static web content (articles, docs, issues/PRs, JSON, PDFs, feeds), prefer the `read` tool with a URL. Use this tool only when you need JS execution, authentication, or interactive actions.
5
5
  - Four actions:
6
- - `open` — acquire (or reuse) a named tab. `name` defaults to `"main"`. Optional `url` navigates after the tab is ready. Optional `viewport` sets dimensions. Optional `dialogs: "accept" | "dismiss"` auto-handles `alert`/`confirm`/`beforeunload` so navigation/clicks don't hang (default: leave dialogs unhandled — page hangs until caller wires `page.on('dialog', …)`).
7
- - `close` — release a tab by `name`, or every tab with `all: true`. For spawned-app browsers, set `kill: true` to terminate the process tree (default leaves it running).
8
- - `act` — run a list of structured `actions` against an existing tab without writing JS (preferred for routine navigation/interaction). Each step is `{ verb, … }`; verbs: `navigate {url, wait_until?}`, `click {id|selector}`, `type {id|selector, text}`, `fill {selector, value}`, `select {selector, values}`, `press {key, selector?}`, `scroll {dx?, dy?}`, `back`, `wait {selector?|ms?}`, `observe {viewport_only?, include_all?}`, `extract {format?}`, `screenshot`. Address elements by the numeric `id` from a prior `observe` (preferred) or a selector. Steps run in order; the tool returns an array of per-step results (observations/extracted content included). Use `run` only when a verb does not cover what you need.
9
- - `run` — execute JS against an existing tab. `code` is the body of an async function with `page`, `browser`, `tab`, `display`, `assert`, `wait` in scope. The function's return value is JSON-stringified into the tool result; multiple `display(value)` calls accumulate text/images.
6
+ - `open` — acquire (or reuse) a named tab. `name` defaults to `"main"`. Optional `url`, `viewport`, and `dialogs: "accept" | "dismiss"` (auto-handles `alert`/`confirm`/`beforeunload`). The `app` field selects the browser kind (spawned binary, saved Chrome profile, or existing CDP endpoint); omitted means headless Chromium with stealth patches.
7
+ - `close` — release a tab by `name`, or every tab with `all: true`. `kill: true` also terminates a spawned-app process tree.
8
+ - `act` — run a list of structured `actions` against an existing tab without writing JS (preferred for routine navigation/interaction). Each step is `{ verb, … }`; verbs: `navigate {url, wait_until?}`, `click {id|selector}`, `type {id|selector, text}`, `fill {selector, value}`, `select {selector, values}`, `press {key, selector?}`, `scroll {dx?, dy?}`, `back`, `wait {selector?|ms?}`, `observe {viewport_only?, include_all?}`, `extract {format?}`, `screenshot`. Address elements by the numeric `id` from a prior `observe` (preferred) or a selector. Steps run in order; the tool returns per-step results.
9
+ - `run` — execute JS against an existing tab. `code` is the body of an async function with `page`, `browser`, `tab`, `display`, `assert`, `wait` in scope. The return value is JSON-stringified into the tool result; `display(value)` calls accumulate text/images. Use `run` only when an `act` verb does not cover what you need.
10
10
  - Tabs survive across `run` calls and across in-process subagents. Open once, reuse many times.
11
- - Browser kinds, selected by the `app` field on `open`:
12
- - default (no `app`) → headless Chromium with stealth patches.
13
- - `app.path` → spawn an absolute binary (Electron/CDP). If a running instance already exposes a CDP port, it is reused; otherwise stale instances are killed and a fresh one is spawned. Do not use this for a daily Chrome profile; use `app.browser: "chrome"` instead.
14
- - `app.browser: "chrome"` + `app.path` + `app.user_data_dir` + `app.profile_directory` → use an existing saved Chrome profile. GJC binds CDP to `127.0.0.1` on an ephemeral or `app.cdp_port` port, reuses a matching running profile only when it already exposes attachable localhost CDP, refuses a matching non-CDP running profile instead of killing/relaunching it, and kills only the Chrome process GJC launched. Externally-owned CDP is disconnect-only. `app.background`/`app.no_focus` add Chromium's `--no-startup-window` guard; focus avoidance is best-effort and platform-dependent.
15
- - `app.cdp_url` → connect to an existing CDP endpoint (e.g. `http://127.0.0.1:9222`). For logged-in profiles, only expose CDP on localhost and treat the endpoint as full browser-account access.
16
- - `app.target` (with `path`/`cdp_url`/Chrome profile) — substring matched against url+title to pick a BrowserWindow when the app exposes several.
17
- - Inside `run`, `tab` exposes high-level helpers; reach for `page` (raw puppeteer Page) when you need anything they don't cover.
18
- - `tab.goto(url, { waitUntil? })` — clears the element cache and navigates.
19
- - `tab.observe({ includeAll?, viewportOnly? })` — accessibility snapshot. Returns `{ url, title, viewport, scroll, elements: [{ id, role, name, value, states, … }] }`. Element ids are stable until the next observe/goto.
20
- - `tab.id(n)` — resolves an element id from the most recent observe to a real `ElementHandle` you can `.click()`, `.type()`, etc.
21
- - `tab.click(selector)` / `tab.type(selector, text)` / `tab.fill(selector, value)` / `tab.press(key, { selector? })` / `tab.scroll(dx, dy)` — selector-based actions.
22
- - `tab.waitFor(selector)` — waits until the selector is attached, returns the resolved `ElementHandle` for chaining (e.g. `const btn = await tab.waitFor('text/Submit'); await btn.click();`).
23
- - `tab.drag(from, to)` — drag from one point to another. Each endpoint is either a selector string (drag center-to-center) or a `{ x, y }` viewport-coordinate point (e.g. for canvases, sliders).
24
- - `tab.scrollIntoView(selector)` — scroll the matching element to the center of the viewport (use before clicking off-screen elements).
25
- - `tab.select(selector, …values)` — set the selected option(s) on a `<select>`. Returns the values that ended up selected. `tab.fill` NEVER works for selects.
26
- - `tab.uploadFile(selector, …filePaths)` — attach files to an `<input type="file">`. Paths resolve relative to cwd.
27
- - `tab.waitForUrl(pattern, { timeout? })` — pattern is a substring or `RegExp`. Polls `location.href` so it works for SPA pushState navigations, not just real navigations. Returns the matched URL.
28
- - `tab.waitForResponse(pattern, { timeout? })` — pattern is a substring, `RegExp`, or `(response) => boolean`. Returns the raw puppeteer `HTTPResponse` (call `.text()` / `.json()` / `.status()` / `.headers()` on it).
29
- - `tab.evaluate(fn, …args)` — sugar for `page.evaluate` with the abort signal already wired. Use this instead of dropping to `page.evaluate` for ad-hoc DOM reads.
30
- - `tab.screenshot({ selector?, fullPage?, save?, silent? })` — auto-attaches the image to the tool output unless `silent: true`. Saves full-res to `save` (or `browser.screenshotDir` setting) and a downscaled copy to the model.
31
- - `tab.extract(format = "markdown")` — Readability-extracted page content.
32
- - Selectors accept CSS as well as puppeteer query handlers: `aria/Sign in`, `text/Continue`, `xpath/…`, `pierce/…`. Playwright-style `p-aria/[name="…"]`, `p-text/…`, etc. are normalized.
33
- - Default to `tab.observe()` over `tab.screenshot()` for understanding page state. Screenshot only when visual appearance matters.
11
+ - Browser kinds: no `app` launches headless Chromium; `app.path` reuses CDP or kills stale same-path processes before spawning — NEVER use it for a daily Chrome profile; use explicit `app.browser: "chrome"` profile mode instead. Saved-profile/CDP automation has access to that profile's cookies and authenticated accounts. Profile mode refuses a matching non-CDP Chrome instead of killing/relaunching it, and `kill: true` can terminate only a Chrome process GJC launched; `app.cdp_url` is externally owned and disconnect-only. CDP must stay on `127.0.0.1`: it grants full browser-account access.
12
+ - Inside `run`, `tab` exposes high-level helpers (`goto`, `observe`, `id`, `click`, `type`, `fill`, `press`, `waitFor`, `screenshot`, `extract`, …); reach for `page` (raw puppeteer Page) when they don't cover it.
13
+ - Selectors accept CSS as well as puppeteer query handlers: `aria/Sign in`, `text/Continue`, `xpath/…`, `pierce/…`.
14
+ - Full reference — helpers, browser kinds, CDP/security details, and more examples — read `gjc://tools/browser.md`.
34
15
  </instruction>
35
16
 
36
17
  <critical>
37
18
  - You MUST call `open` before `run` or `act`. Neither implicitly creates a tab.
38
- - You NEVER screenshot just to "see what's on the page" — `tab.observe()` returns structured data with element ids you can act on immediately.
19
+ - You MUST observe before taking a screenshot to understand page state; screenshot only when visual appearance matters.
39
20
  - After a `tab.goto()` or any navigation, prior element ids from `tab.observe()` are invalidated. Re-observe before referencing them.
40
21
  - `code` runs with full Node access. Treat it as your code, not sandboxed code.
41
22
  </critical>
@@ -43,31 +24,13 @@ Drives a real Chromium tab with full puppeteer access via JS execution.
43
24
  <examples>
44
25
  # Open a tab and read structured page data
45
26
  `{"action":"open","name":"docs","url":"https://example.com"}`
46
- `{"action":"run","name":"docs","code":"const obs = await tab.observe(); display(obs); return obs.elements.length;"}`
27
+ `{"action":"act","name":"docs","actions":[{"verb":"observe"}]}`
47
28
 
48
- # Click an observed element by id
49
- `{"action":"run","name":"docs","code":"const obs = await tab.observe(); const link = obs.elements.find(e => e.role === 'link' && e.name === 'Sign in'); assert(link, 'Sign in link missing'); await (await tab.id(link.id)).click();"}`
29
+ # Click an observed element, then fill and submit a form
30
+ `{"action":"act","name":"docs","actions":[{"verb":"click","id":12},{"verb":"fill","selector":"input[name=email]","value":"me@example.com"},{"verb":"click","selector":"text/Continue"}]}`
50
31
 
51
- # Save a full-page screenshot to disk
52
- `{"action":"run","name":"docs","code":"await tab.screenshot({ fullPage: true, save: 'screenshot.png' });"}`
53
-
54
- # Fill and submit a form via selectors
55
- `{"action":"run","name":"docs","code":"await tab.fill('input[name=email]', 'me@example.com'); await tab.click('text/Continue');"}`
56
-
57
- # Attach to an existing Electron app
58
- `{"action":"open","name":"cursor","app":{"path":"/Applications/Cursor.app/Contents/MacOS/Cursor"}}`
59
-
60
- # Use an existing Chrome profile in the background
61
- `{"action":"open","name":"work-browser","app":{"browser":"chrome","path":"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","user_data_dir":"~/Library/Application Support/Google/Chrome","profile_directory":"Profile 10","background":true,"no_focus":true,"target":"example.com"}}`
62
-
63
- # Close one tab (browser stays alive if other tabs reference it)
64
- `{"action":"close","name":"docs"}`
65
-
66
- # Close every tab; leave spawned apps running
67
- `{"action":"close","all":true}`
68
-
69
- # Close every tab and kill spawned-app processes too
70
- `{"action":"close","all":true,"kill":true}`
32
+ # Use `run` only when `act` has no suitable verb
33
+ `{"action":"run","name":"docs","code":"const count = await page.locator('canvas').count(); return { count };"}`
71
34
  </examples>
72
35
 
73
36
  <output>
@@ -29,6 +29,6 @@ For open-ended searches requiring multiple rounds of globbing and searching, del
29
29
  </avoid>
30
30
 
31
31
  <critical>
32
- - You MUST use the built-in Find tool for every file-name lookup. NEVER shell out to `find`, `fd`, `locate`, `ls`, or `git ls-files` via Bash — they ignore `.gitignore`, blow past result limits, and waste tokens.
33
- - If you catch yourself typing `find -name`, `fd`, or `ls **/*.ext` in a Bash command, stop and re-issue the lookup through the Find tool with a glob pattern instead.
32
+ - Use separate array entries for multiple path globs.
33
+ - Set `gitignore: false` only when ignored files are intentionally in scope.
34
34
  </critical>
@@ -20,11 +20,13 @@ Each op line is ONE of:
20
20
  - Payload ends at the next `»`, `«`, `≔`, `§`, envelope marker, or EOF.
21
21
  - `≔A..B` with no payload deletes the range. To keep a blank line, include one explicit empty payload line.
22
22
  - **Payload is only what's NEW relative to your range:**
23
- - `≔` replaces inside; NEVER include lines outside.
23
+ - `≔` replaces inside; NEVER include lines outside or replay past B — extend B if it must go.
24
24
  - `»`/`«` adds at the anchor; NEVER repeat line A or neighbors.
25
25
  - Payload matching nearby content duplicates — drop it or widen.
26
- - **Pick a self-contained unit first.** Touching a multiline construct? Widen to the whole thing.
26
+ - **Pick a self-contained unit first.** Touching a multiline construct? Widen to the whole thing; narrow beats wide otherwise.
27
27
  - Then smallest op: add → `»`/`«`; delete/replace → `≔`.
28
+ - **Anchors reference the file as last read.** NEVER shift for prior ops, fabricate hashes, or anchor outside the visible region — re-`read` first.
29
+ - **One `»`/`«` op per block, NOT per line.** N lines = ONE op, N payloads. Collapse adjacent ops.
28
30
  </rules>
29
31
 
30
32
  <brace-shapes>
@@ -35,16 +37,6 @@ When braces bound your edit, you SHOULD prefer these shapes:
35
37
  - **End on `}`**: only when that `}` is part of the change. Otherwise extend or stop earlier.
36
38
  </brace-shapes>
37
39
 
38
- <common-failures>
39
- - **NEVER replay past your range.** Stop before B+1; extend B if it must go.
40
- - **NEVER duplicate chunks inside one payload.** Caught re-emitting? Rewrite.
41
- - **Anchor only inside the visible region.** B+1 truncated? Re-`read` first.
42
- - **You SHOULD prefer the narrowest self-contained edit.** Narrow range beats wide range.
43
- - **Anchors reference the file as last read.** NEVER shift for prior ops.
44
- - **One `»`/`«` op per block, NOT per line.** N lines = ONE op, N payloads. Collapse adjacent ops.
45
- - **NEVER fabricate anchor hashes.** Missing? Re-`read`.
46
- </common-failures>
47
-
48
40
  <case file="mod.ts">
49
41
  {{hline 1 "const TITLE = \"Mr\";"}}
50
42
  {{hline 2 "export function greet(name) {"}}
@@ -69,56 +61,22 @@ const TITLE = "Mrs";
69
61
  name?.trim() || "guest",
70
62
  ].join(" ");
71
63
 
72
- # Insert AFTER/BEFORE a line
73
- §mod.ts
74
- »{{hrefr 4}}
64
+ # Insert after / before a line
65
+ `§mod.ts`
66
+ `»{{hrefr 4}}`
75
67
  "Dr",
76
- «{{hrefr 5}}
68
+ `«{{hrefr 5}}`
77
69
  "Dr",
78
70
 
79
- # Append to file
80
- §mod.ts
81
- »EOF
82
- export const done = true;
83
-
84
71
  # Delete a line
85
- §mod.ts
86
- ≔{{hrefr 5}}
87
-
88
- # Blank a line (replace with LF: the empty payload is the blank line before `»EOF`)
89
- §mod.ts
90
- ≔{{hrefr 5}}
72
+ `§mod.ts`
73
+ `≔{{hrefr 5}}`
91
74
 
92
- »EOF
93
- export const done = true;
75
+ # Replace with one blank line: the empty payload line follows the operation
76
+ `§mod.ts`
77
+ `≔{{hrefr 5}}`
94
78
  </examples>
95
79
 
96
- <anti-pattern>
97
- # WRONG — replaces 2 lines just to add one.
98
- §mod.ts
99
- ≔{{hrefr 1}}..{{hrefr 2}}
100
- const TITLE = "Mr";
101
- const DEBUG = false;
102
- export function greet(name) {
103
- # RIGHT — same effect, one-line insert
104
- §mod.ts
105
- »{{hrefr 1}}
106
- const DEBUG = false;
107
-
108
- # WRONG — replace from the middle of a larger statement (error-prone)
109
- §mod.ts
110
- ≔{{hrefr 4}}..{{hrefr 5}}
111
- "Dr",
112
- name?.trim() || "guest",
113
- # RIGHT — widen to the full statement
114
- §mod.ts
115
- ≔{{hrefr 3}}..{{hrefr 6}}
116
- return [
117
- "Dr",
118
- name?.trim() || "guest",
119
- ].join(" ");
120
- </anti-pattern>
121
-
122
80
  <critical>
123
81
  - Copy anchors verbatim (line number + 2-char hash); NEVER include the `|TEXT` body.
124
82
  - NEVER write unified diff syntax. Headers are `§PATH`; ops are `»`/`«`/`≔`.
@@ -73,10 +73,7 @@ For `.sqlite`, `.sqlite3`, `.db`, `.db3`:
73
73
  `agent://<id>`, `artifact://<id>`, `rule://<name>`, and `local://<name>.md` resolve transparently and accept the same line selectors as filesystem paths. Use `artifact://<id>` to recover full output that a previous bash/eval/tool result spilled or truncated.
74
74
 
75
75
  <critical>
76
- - You MUST use `read` for every file, directory, archive, and URL inspection. `cat`, `head`, `tail`, `less`, `more`, `ls`, `tar`, `unzip`, `curl`, `wget` are FORBIDDEN — any such bash call is a bug, regardless of how short or convenient it looks.
77
- - You MUST prefer `read` over a browser/puppeteer tool for URL content; only reach for a browser when `read` cannot deliver reasonable content.
78
- - You MUST always include `path`. NEVER call `read` with `{}`.
79
- - For line ranges, append the selector to `path` (`path="src/foo.ts:50-200"`, `path="src/foo.ts:50+150"`). NEVER substitute `sed -n`, `awk NR`, or `head`/`tail` pipelines.
80
- - Summary footer says `read <path>:raw …`? Re-issue the exact selector it names. NEVER guess what's inside `..` / `…` markers — they carry no content.
81
- - You MAY combine selectors with URL reads and internal URIs; both paginate the cached resolved output.
76
+ - Always include `path`; never call `read` with `{}`.
77
+ - For line ranges, append the selector to `path`.
78
+ - Re-issue the selector named by a summary footer before relying on elided content.
82
79
  </critical>
@@ -1,8 +1,6 @@
1
1
  Search hidden tool metadata to discover and activate tools.
2
2
 
3
3
  Activate hidden tools (MCP and built-in) when you need a capability not in your active tool set.
4
- {{#if hasDiscoverableMCPServers}}Discoverable MCP servers in this session: {{#list discoverableMCPServerSummaries join=", "}}{{this}}{{/list}}.{{/if}}
5
- {{#if discoverableMCPToolCount}}Total discoverable tools available: {{discoverableMCPToolCount}}.{{/if}}
6
4
  Input:
7
5
  - `query` — required natural-language or keyword query
8
6
  - `limit` — optional maximum number of tools to return and activate (default `8`; start with 5–10 if unsure)
@@ -18,8 +18,6 @@ Searches files using powerful regex matching.
18
18
  </output>
19
19
 
20
20
  <critical>
21
- - You MUST use the built-in `search` tool for any content search. NEVER shell out to `grep`, `rg`, `ripgrep`, `ag`, `ack`, `git grep`, `awk`, `sed`-for-search, or any other CLI search via Bash — even for a single match, even "just to check quickly", even piped through other commands.
22
- - Bash `grep`/`rg` loses `.gitignore` semantics, bypasses result limits, and wastes tokens. The `search` tool is faster, structured, and already wired into the workspace — there is no scenario where Bash search is preferable.
23
- - If you catch yourself typing `grep`, `rg`, or `| grep` in a Bash command, stop and re-issue the lookup through the `search` tool instead.
24
- - If the search is open-ended and requires multiple rounds across subsystems, delegate a bounded fact-finding task to an appropriate canonical role agent (`planner` for sequencing/context maps or `architect` for read-only architecture assessment) instead of chaining broad `search` calls yourself.
21
+ - Search paths are an array; pass separate entries rather than comma-joined paths.
22
+ - Use a cross-line pattern only when the match actually spans lines.
25
23
  </critical>
@@ -1,8 +1,7 @@
1
1
  Discover project and user runtime skills without loading full skill content.
2
2
 
3
3
  <instruction>
4
- - Searches only custom runtime skill locations: project `.gjc/skills` and user `~/.gjc/skills`.
5
- - Built-in, bundled, and internal workflow skills are intentionally excluded.
4
+ - Searches only custom runtime skill locations: nearest project `.gjc/skills`; then, under the home directory, canonical `<config>/agent/skills`, configured legacy `<config>/skills`, and historical legacy `.gjc/skills`. `<config>` is the home-relative directory name from `GJC_CONFIG_DIR`, then `PI_CONFIG_DIR`, then `.gjc`; even an absolute-looking configured name is joined beneath `<home>`. Duplicate names use that exact precedence. Built-in, bundled, and internal workflow skills are intentionally excluded.
6
5
  - Returns thin metadata only: name, description, source scope, path, and use conditions when present.
7
6
  - To load a selected skill's full `SKILL.md`, invoke it through the existing `skill` tool with the exact `name` returned here.
8
7
  </instruction>
@@ -7,7 +7,7 @@ Launches subagents to parallelize workflows.
7
7
  {{else}}
8
8
  - Use `subagent` action `inspect` or `list` to snapshot manager state.
9
9
  {{/if}}
10
- - To wait or cancel, use the `subagent` tool; its await/cancel doctrine applies (never cancel just because an await timed out).
10
+ - To wait or cancel, use the `subagent` tool; its await/cancel doctrine is authoritative.
11
11
 
12
12
  {{#if ircEnabled}}
13
13
  Subagents have no conversation history, but they can reach you and their siblings live via the `irc` tool. Front-load every fact, file path, and direction they need in {{#if contextEnabled}}`context` or `assignment`{{else}}each `assignment`{{/if}}.
@@ -1424,7 +1424,7 @@ export class MCPManager {
1424
1424
  }
1425
1425
 
1426
1426
  /**
1427
- * Get all server instructions (for system prompt injection).
1427
+ * Get connected-server instructions for request-scoped untrusted user-role context.
1428
1428
  */
1429
1429
  getServerInstructions(): Map<string, string> {
1430
1430
  if (this.#toolsOnly) return new Map();