@bastani/atomic 0.9.11-alpha.5 → 0.9.11-alpha.6

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 (1026) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +12 -5
  3. package/dist/builtin/intercom/package.json +2 -2
  4. package/dist/builtin/mcp/CHANGELOG.md +6 -0
  5. package/dist/builtin/mcp/README.md +3 -3
  6. package/dist/builtin/mcp/cli.js +0 -1
  7. package/dist/builtin/mcp/config.ts +0 -2
  8. package/dist/builtin/mcp/package.json +3 -3
  9. package/dist/builtin/mcp/types.ts +0 -1
  10. package/dist/builtin/subagents/CHANGELOG.md +12 -0
  11. package/dist/builtin/subagents/README.md +1 -1
  12. package/dist/builtin/subagents/agents/code-simplifier.md +47 -102
  13. package/dist/builtin/subagents/agents/codebase-analyzer.md +27 -130
  14. package/dist/builtin/subagents/agents/codebase-locator.md +24 -83
  15. package/dist/builtin/subagents/agents/codebase-online-researcher.md +60 -259
  16. package/dist/builtin/subagents/agents/codebase-pattern-finder.md +29 -207
  17. package/dist/builtin/subagents/agents/codebase-research-analyzer.md +28 -150
  18. package/dist/builtin/subagents/agents/codebase-research-locator.md +21 -118
  19. package/dist/builtin/subagents/agents/debugger.md +27 -65
  20. package/dist/builtin/subagents/agents/worker.md +23 -30
  21. package/dist/builtin/subagents/package.json +4 -4
  22. package/dist/builtin/subagents/prompts/gather-context-and-clarify.md +18 -11
  23. package/dist/builtin/subagents/prompts/parallel-cleanup.md +34 -33
  24. package/dist/builtin/subagents/prompts/parallel-context-build.md +22 -36
  25. package/dist/builtin/subagents/prompts/parallel-handoff-plan.md +20 -52
  26. package/dist/builtin/subagents/prompts/parallel-research.md +17 -41
  27. package/dist/builtin/subagents/prompts/parallel-review.md +23 -28
  28. package/dist/builtin/subagents/prompts/review-loop.md +18 -27
  29. package/dist/builtin/subagents/src/extension/prompt-guidance.ts +1 -1
  30. package/dist/builtin/subagents/src/runs/background/async-execution-chain.ts +23 -4
  31. package/dist/builtin/subagents/src/runs/background/async-execution-single.ts +2 -0
  32. package/dist/builtin/subagents/src/runs/background/async-execution-types.ts +10 -0
  33. package/dist/builtin/subagents/src/runs/background/subagent-runner-step.ts +1 -0
  34. package/dist/builtin/subagents/src/runs/foreground/chain-execution-dynamic-step.ts +2 -0
  35. package/dist/builtin/subagents/src/runs/foreground/chain-execution-parallel-runner.ts +8 -0
  36. package/dist/builtin/subagents/src/runs/foreground/chain-execution-parallel-step.ts +1 -0
  37. package/dist/builtin/subagents/src/runs/foreground/chain-execution-sequential-step.ts +6 -0
  38. package/dist/builtin/subagents/src/runs/foreground/chain-execution-types.ts +2 -0
  39. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-async.ts +7 -0
  40. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-chain.ts +1 -0
  41. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-resume.ts +3 -0
  42. package/dist/builtin/subagents/src/runs/shared/mcp-direct-tool-allowlist.ts +1 -2
  43. package/dist/builtin/subagents/src/runs/shared/parallel-utils.ts +1 -0
  44. package/dist/builtin/subagents/src/runs/shared/pi-args.ts +5 -3
  45. package/dist/builtin/subagents/src/shared/settings.ts +4 -0
  46. package/dist/builtin/web-access/package.json +2 -2
  47. package/dist/builtin/workflows/CHANGELOG.md +44 -0
  48. package/dist/builtin/workflows/README.md +72 -70
  49. package/dist/builtin/workflows/ambient.d.ts +0 -5
  50. package/dist/builtin/workflows/builtin/adversarial-verification-prompts.ts +7 -4
  51. package/dist/builtin/workflows/builtin/adversarial-verification-runner.ts +1 -1
  52. package/dist/builtin/workflows/builtin/adversarial-verification.ts +2 -1
  53. package/dist/builtin/workflows/builtin/classify-and-act-prompts.ts +5 -2
  54. package/dist/builtin/workflows/builtin/classify-and-act-runner.ts +5 -7
  55. package/dist/builtin/workflows/builtin/classify-and-act.ts +3 -2
  56. package/dist/builtin/workflows/builtin/fan-out-and-synthesize-prompts.ts +6 -3
  57. package/dist/builtin/workflows/builtin/fan-out-and-synthesize-runner.ts +5 -5
  58. package/dist/builtin/workflows/builtin/fan-out-and-synthesize.ts +3 -2
  59. package/dist/builtin/workflows/builtin/generate-and-filter-prompts.ts +7 -4
  60. package/dist/builtin/workflows/builtin/generate-and-filter-runner.ts +6 -3
  61. package/dist/builtin/workflows/builtin/generate-and-filter.ts +3 -2
  62. package/dist/builtin/workflows/builtin/goal-models.ts +14 -18
  63. package/dist/builtin/workflows/builtin/goal-orchestrator-prompts.ts +39 -78
  64. package/dist/builtin/workflows/builtin/goal-prompts.ts +64 -244
  65. package/dist/builtin/workflows/builtin/goal-runner.ts +32 -64
  66. package/dist/builtin/workflows/builtin/goal.ts +2 -1
  67. package/dist/builtin/workflows/builtin/index.d.ts +17 -112
  68. package/dist/builtin/workflows/builtin/index.ts +1 -2
  69. package/dist/builtin/workflows/builtin/loop-until-done-prompts.ts +20 -12
  70. package/dist/builtin/workflows/builtin/loop-until-done-runner.ts +3 -0
  71. package/dist/builtin/workflows/builtin/loop-until-done.ts +3 -2
  72. package/dist/builtin/workflows/builtin/open-claude-design-phases.ts +52 -55
  73. package/dist/builtin/workflows/builtin/open-claude-design-runner.ts +45 -52
  74. package/dist/builtin/workflows/builtin/open-claude-design-setup.ts +41 -46
  75. package/dist/builtin/workflows/builtin/open-claude-design-utils.ts +16 -21
  76. package/dist/builtin/workflows/builtin/open-claude-design.ts +2 -1
  77. package/dist/builtin/workflows/builtin/ralph-core.ts +61 -57
  78. package/dist/builtin/workflows/builtin/ralph-forked-prompts.ts +41 -45
  79. package/dist/builtin/workflows/builtin/ralph-models.ts +33 -43
  80. package/dist/builtin/workflows/builtin/ralph-reviewer-prompt.ts +35 -120
  81. package/dist/builtin/workflows/builtin/ralph-runner.ts +81 -108
  82. package/dist/builtin/workflows/builtin/ralph.ts +2 -1
  83. package/dist/builtin/workflows/builtin/shared-prompts.ts +110 -93
  84. package/dist/builtin/workflows/builtin/steering-context.ts +51 -0
  85. package/dist/builtin/workflows/builtin/tournament-prompts.ts +21 -12
  86. package/dist/builtin/workflows/builtin/tournament-runner.ts +3 -0
  87. package/dist/builtin/workflows/builtin/tournament.ts +3 -2
  88. package/dist/builtin/workflows/package.json +2 -2
  89. package/dist/builtin/workflows/skills/create-spec/SKILL.md +1 -1
  90. package/dist/builtin/workflows/skills/impeccable/reference/hooks.md +6 -8
  91. package/dist/builtin/workflows/skills/impeccable/reference/live.md +3 -4
  92. package/dist/builtin/workflows/skills/impeccable/scripts/hook-admin.mjs +2 -20
  93. package/dist/builtin/workflows/skills/impeccable/scripts/hook-lib.mjs +4 -42
  94. package/dist/builtin/workflows/skills/impeccable/scripts/hook.mjs +3 -3
  95. package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +2 -3
  96. package/dist/builtin/workflows/skills/impeccable/scripts/live-inject.mjs +0 -1
  97. package/dist/builtin/workflows/skills/impeccable/scripts/live-poll.mjs +2 -2
  98. package/dist/builtin/workflows/skills/impeccable/scripts/pin.mjs +4 -4
  99. package/dist/builtin/workflows/skills/prompt-engineer/SKILL.md +57 -252
  100. package/dist/builtin/workflows/skills/prompt-engineer/references/advanced_patterns.md +70 -226
  101. package/dist/builtin/workflows/skills/prompt-engineer/references/core_prompting.md +64 -103
  102. package/dist/builtin/workflows/skills/prompt-engineer/references/quality_improvement.md +81 -155
  103. package/dist/builtin/workflows/src/authoring.d.ts +5 -1
  104. package/dist/builtin/workflows/src/durable/backend.ts +68 -9
  105. package/dist/builtin/workflows/src/durable/boundary-lifecycle.ts +148 -0
  106. package/dist/builtin/workflows/src/durable/boundary-topology.ts +420 -0
  107. package/dist/builtin/workflows/src/durable/child-invocation.ts +14 -0
  108. package/dist/builtin/workflows/src/durable/child-primitive.ts +74 -44
  109. package/dist/builtin/workflows/src/durable/completed-catalog-stage-groups.ts +250 -0
  110. package/dist/builtin/workflows/src/durable/completed-catalog.ts +205 -131
  111. package/dist/builtin/workflows/src/durable/completed-inspection.ts +8 -2
  112. package/dist/builtin/workflows/src/durable/completed-subtree.ts +31 -0
  113. package/dist/builtin/workflows/src/durable/dbos-backend.ts +28 -24
  114. package/dist/builtin/workflows/src/durable/dbos-envelope.ts +130 -3
  115. package/dist/builtin/workflows/src/durable/dbos-metadata.ts +18 -0
  116. package/dist/builtin/workflows/src/durable/scoped-backend.ts +64 -17
  117. package/dist/builtin/workflows/src/durable/stage-primitive.ts +60 -60
  118. package/dist/builtin/workflows/src/durable/stage-topology-validation.ts +234 -0
  119. package/dist/builtin/workflows/src/durable/stage-topology.ts +53 -0
  120. package/dist/builtin/workflows/src/durable/tool-failure-checkpoint.ts +49 -0
  121. package/dist/builtin/workflows/src/durable/tool-outcome.ts +120 -0
  122. package/dist/builtin/workflows/src/durable/tool-primitive.ts +367 -58
  123. package/dist/builtin/workflows/src/durable/types.ts +97 -0
  124. package/dist/builtin/workflows/src/durable/ui-primitive.ts +46 -0
  125. package/dist/builtin/workflows/src/durable/workflow-child-result.ts +58 -0
  126. package/dist/builtin/workflows/src/engine/options.ts +1 -0
  127. package/dist/builtin/workflows/src/engine/primitives/workflow.ts +19 -10
  128. package/dist/builtin/workflows/src/engine/run-durable-finalize.ts +11 -1
  129. package/dist/builtin/workflows/src/engine/run-durable-topology.ts +190 -18
  130. package/dist/builtin/workflows/src/engine/run-terminal-event.ts +37 -0
  131. package/dist/builtin/workflows/src/engine/run-terminal-failure.ts +50 -0
  132. package/dist/builtin/workflows/src/engine/run-tool-execution-tracker.ts +152 -0
  133. package/dist/builtin/workflows/src/engine/run-tool-node-lifecycle.ts +87 -0
  134. package/dist/builtin/workflows/src/engine/run.ts +111 -110
  135. package/dist/builtin/workflows/src/engine/runtime.ts +15 -2
  136. package/dist/builtin/workflows/src/extension/extension-factory.ts +1 -0
  137. package/dist/builtin/workflows/src/extension/extension-runtime-state.ts +11 -0
  138. package/dist/builtin/workflows/src/extension/index.bundle.mjs +6514 -4793
  139. package/dist/builtin/workflows/src/extension/lifecycle-notifications.ts +16 -5
  140. package/dist/builtin/workflows/src/extension/render-result.ts +16 -2
  141. package/dist/builtin/workflows/src/extension/runtime-durable-resume.ts +3 -0
  142. package/dist/builtin/workflows/src/extension/runtime.ts +4 -0
  143. package/dist/builtin/workflows/src/extension/wiring.ts +3 -1
  144. package/dist/builtin/workflows/src/extension/workflow-command-surfaces.ts +1 -0
  145. package/dist/builtin/workflows/src/extension/workflow-durable-resume-command.ts +9 -3
  146. package/dist/builtin/workflows/src/extension/workflow-module-loader.ts +18 -3
  147. package/dist/builtin/workflows/src/extension/workflow-prompts.ts +22 -11
  148. package/dist/builtin/workflows/src/extension/workflow-status-summary.ts +43 -0
  149. package/dist/builtin/workflows/src/extension/workflow-targets.ts +34 -30
  150. package/dist/builtin/workflows/src/extension/workflow-tool-content.ts +12 -5
  151. package/dist/builtin/workflows/src/extension/workflow-tool-send.ts +162 -63
  152. package/dist/builtin/workflows/src/runs/background/run-inspect.ts +7 -1
  153. package/dist/builtin/workflows/src/runs/background/status.ts +18 -8
  154. package/dist/builtin/workflows/src/runs/background/workflow-lifecycle-aggregate.ts +3 -11
  155. package/dist/builtin/workflows/src/runs/foreground/executor-child-boundary.ts +24 -21
  156. package/dist/builtin/workflows/src/runs/foreground/executor-hil.ts +1 -1
  157. package/dist/builtin/workflows/src/runs/foreground/executor-lifecycle.ts +30 -13
  158. package/dist/builtin/workflows/src/runs/foreground/executor-prompt-nodes.ts +102 -53
  159. package/dist/builtin/workflows/src/runs/foreground/executor-stage-call.ts +13 -5
  160. package/dist/builtin/workflows/src/runs/foreground/executor-stage-control.ts +26 -8
  161. package/dist/builtin/workflows/src/runs/foreground/executor-stage-factory.ts +11 -4
  162. package/dist/builtin/workflows/src/runs/foreground/executor-stage-types.ts +4 -1
  163. package/dist/builtin/workflows/src/runs/foreground/executor-types.ts +7 -1
  164. package/dist/builtin/workflows/src/runs/foreground/postmortem-stage-chat.ts +35 -1
  165. package/dist/builtin/workflows/src/runs/foreground/stage-control-registry.ts +136 -17
  166. package/dist/builtin/workflows/src/runs/foreground/stage-runner-context.ts +12 -4
  167. package/dist/builtin/workflows/src/runs/foreground/stage-runner-controller.ts +35 -42
  168. package/dist/builtin/workflows/src/runs/foreground/stage-runner-options.ts +5 -1
  169. package/dist/builtin/workflows/src/runs/foreground/stage-runner-pause.ts +195 -0
  170. package/dist/builtin/workflows/src/runs/foreground/stage-runner-session-options.ts +0 -13
  171. package/dist/builtin/workflows/src/runs/foreground/stage-runner-types.ts +14 -2
  172. package/dist/builtin/workflows/src/runs/shared/model-fallback-candidates.ts +3 -143
  173. package/dist/builtin/workflows/src/sdk-surface.ts +1 -1
  174. package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +6 -11
  175. package/dist/builtin/workflows/src/shared/authoring-contract-stage.ts +6 -11
  176. package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +57 -6
  177. package/dist/builtin/workflows/src/shared/authoring-contract-ui.ts +76 -11
  178. package/dist/builtin/workflows/src/shared/expanded-workflow-graph.ts +206 -116
  179. package/dist/builtin/workflows/src/shared/intercom-group.ts +17 -10
  180. package/dist/builtin/workflows/src/shared/persistence-restore-helpers.ts +30 -0
  181. package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +5 -0
  182. package/dist/builtin/workflows/src/shared/render-inputs-schema.ts +3 -3
  183. package/dist/builtin/workflows/src/shared/store-factory.ts +2 -0
  184. package/dist/builtin/workflows/src/shared/store-internal.ts +8 -0
  185. package/dist/builtin/workflows/src/shared/store-public-types.ts +8 -0
  186. package/dist/builtin/workflows/src/shared/store-run-methods.ts +9 -0
  187. package/dist/builtin/workflows/src/shared/store-stage-methods.ts +2 -0
  188. package/dist/builtin/workflows/src/shared/store-tool-node-methods.ts +46 -0
  189. package/dist/builtin/workflows/src/shared/store-types.ts +34 -0
  190. package/dist/builtin/workflows/src/shared/types.ts +14 -24
  191. package/dist/builtin/workflows/src/shared/workflow-failures-classifier.ts +11 -5
  192. package/dist/builtin/workflows/src/shared/workflow-failures-signals.ts +58 -0
  193. package/dist/builtin/workflows/src/shared/workflow-run-ownership.ts +53 -0
  194. package/dist/builtin/workflows/src/tui/graph-view-input.ts +2 -8
  195. package/dist/builtin/workflows/src/tui/graph-view-render-helpers.ts +11 -4
  196. package/dist/builtin/workflows/src/tui/graph-view-render.ts +1 -0
  197. package/dist/builtin/workflows/src/tui/graph-view-state.ts +27 -9
  198. package/dist/builtin/workflows/src/tui/graph-view-types.ts +4 -3
  199. package/dist/builtin/workflows/src/tui/node-card.ts +4 -3
  200. package/dist/builtin/workflows/src/tui/overlay-adapter.ts +0 -4
  201. package/dist/builtin/workflows/src/tui/run-detail.ts +53 -17
  202. package/dist/builtin/workflows/src/tui/session-list.ts +8 -4
  203. package/dist/builtin/workflows/src/tui/stage-chat-view-render-helpers.ts +12 -0
  204. package/dist/builtin/workflows/src/tui/stage-chat-view-render-settings.ts +21 -1
  205. package/dist/builtin/workflows/src/tui/stage-chat-view-state.ts +3 -19
  206. package/dist/builtin/workflows/src/tui/stage-chat-view.ts +4 -2
  207. package/dist/builtin/workflows/src/tui/switcher.ts +13 -3
  208. package/dist/builtin/workflows/src/tui/workflow-attach-pane-handle.ts +1 -1
  209. package/dist/builtin/workflows/src/tui/workflow-attach-pane-types.ts +0 -9
  210. package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +16 -49
  211. package/dist/builtin/workflows/src/tui/workflow-status.ts +7 -0
  212. package/dist/builtin/workflows/src/workflows/identity.ts +1 -1
  213. package/dist/cli/args.d.ts +0 -1
  214. package/dist/cli/args.d.ts.map +1 -1
  215. package/dist/cli/args.js +1 -20
  216. package/dist/cli/args.js.map +1 -1
  217. package/dist/cli/config-selector.js +1 -1
  218. package/dist/cli/config-selector.js.map +1 -1
  219. package/dist/cli/list-models.d.ts.map +1 -1
  220. package/dist/cli/list-models.js +1 -2
  221. package/dist/cli/list-models.js.map +1 -1
  222. package/dist/cli/session-picker.d.ts.map +1 -1
  223. package/dist/cli/session-picker.js +2 -1
  224. package/dist/cli/session-picker.js.map +1 -1
  225. package/dist/cli/startup-ui.js +2 -2
  226. package/dist/cli/startup-ui.js.map +1 -1
  227. package/dist/config-self-update.js +1 -1
  228. package/dist/config-self-update.js.map +1 -1
  229. package/dist/config.d.ts +2 -0
  230. package/dist/config.d.ts.map +1 -1
  231. package/dist/config.js +34 -10
  232. package/dist/config.js.map +1 -1
  233. package/dist/core/agent-session-accessors.d.ts.map +1 -1
  234. package/dist/core/agent-session-accessors.js +2 -1
  235. package/dist/core/agent-session-accessors.js.map +1 -1
  236. package/dist/core/agent-session-auto-compaction.d.ts +4 -3
  237. package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
  238. package/dist/core/agent-session-auto-compaction.js +55 -59
  239. package/dist/core/agent-session-auto-compaction.js.map +1 -1
  240. package/dist/core/agent-session-bash.d.ts +9 -6
  241. package/dist/core/agent-session-bash.d.ts.map +1 -1
  242. package/dist/core/agent-session-bash.js +32 -13
  243. package/dist/core/agent-session-bash.js.map +1 -1
  244. package/dist/core/agent-session-compaction.d.ts +11 -1
  245. package/dist/core/agent-session-compaction.d.ts.map +1 -1
  246. package/dist/core/agent-session-compaction.js +87 -19
  247. package/dist/core/agent-session-compaction.js.map +1 -1
  248. package/dist/core/agent-session-custom-message-commit.d.ts +14 -0
  249. package/dist/core/agent-session-custom-message-commit.d.ts.map +1 -0
  250. package/dist/core/agent-session-custom-message-commit.js +141 -0
  251. package/dist/core/agent-session-custom-message-commit.js.map +1 -0
  252. package/dist/core/agent-session-delivery-forwarding.d.ts +9 -0
  253. package/dist/core/agent-session-delivery-forwarding.d.ts.map +1 -0
  254. package/dist/core/agent-session-delivery-forwarding.js +36 -0
  255. package/dist/core/agent-session-delivery-forwarding.js.map +1 -0
  256. package/dist/core/agent-session-events.d.ts +1 -1
  257. package/dist/core/agent-session-events.d.ts.map +1 -1
  258. package/dist/core/agent-session-events.js +45 -14
  259. package/dist/core/agent-session-events.js.map +1 -1
  260. package/dist/core/agent-session-extension-bindings.d.ts +2 -6
  261. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  262. package/dist/core/agent-session-extension-bindings.js +18 -11
  263. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  264. package/dist/core/agent-session-message-queue.d.ts +5 -2
  265. package/dist/core/agent-session-message-queue.d.ts.map +1 -1
  266. package/dist/core/agent-session-message-queue.js +91 -97
  267. package/dist/core/agent-session-message-queue.js.map +1 -1
  268. package/dist/core/agent-session-methods.d.ts +47 -39
  269. package/dist/core/agent-session-methods.d.ts.map +1 -1
  270. package/dist/core/agent-session-methods.js.map +1 -1
  271. package/dist/core/agent-session-models.d.ts +2 -38
  272. package/dist/core/agent-session-models.d.ts.map +1 -1
  273. package/dist/core/agent-session-models.js +5 -147
  274. package/dist/core/agent-session-models.js.map +1 -1
  275. package/dist/core/agent-session-persistent-custom-messages.d.ts +47 -0
  276. package/dist/core/agent-session-persistent-custom-messages.d.ts.map +1 -0
  277. package/dist/core/agent-session-persistent-custom-messages.js +267 -0
  278. package/dist/core/agent-session-persistent-custom-messages.js.map +1 -0
  279. package/dist/core/agent-session-post-tool-compaction.d.ts.map +1 -1
  280. package/dist/core/agent-session-post-tool-compaction.js +34 -9
  281. package/dist/core/agent-session-post-tool-compaction.js.map +1 -1
  282. package/dist/core/agent-session-prompt.d.ts +2 -0
  283. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  284. package/dist/core/agent-session-prompt.js +42 -16
  285. package/dist/core/agent-session-prompt.js.map +1 -1
  286. package/dist/core/agent-session-queue-pause.d.ts +10 -0
  287. package/dist/core/agent-session-queue-pause.d.ts.map +1 -0
  288. package/dist/core/agent-session-queue-pause.js +86 -0
  289. package/dist/core/agent-session-queue-pause.js.map +1 -0
  290. package/dist/core/agent-session-retry.d.ts +0 -11
  291. package/dist/core/agent-session-retry.d.ts.map +1 -1
  292. package/dist/core/agent-session-retry.js +8 -57
  293. package/dist/core/agent-session-retry.js.map +1 -1
  294. package/dist/core/agent-session-runtime-auth.d.ts +6 -0
  295. package/dist/core/agent-session-runtime-auth.d.ts.map +1 -0
  296. package/dist/core/agent-session-runtime-auth.js +26 -0
  297. package/dist/core/agent-session-runtime-auth.js.map +1 -0
  298. package/dist/core/agent-session-runtime.d.ts +13 -2
  299. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  300. package/dist/core/agent-session-runtime.js +32 -6
  301. package/dist/core/agent-session-runtime.js.map +1 -1
  302. package/dist/core/agent-session-services.d.ts +0 -2
  303. package/dist/core/agent-session-services.d.ts.map +1 -1
  304. package/dist/core/agent-session-services.js +6 -7
  305. package/dist/core/agent-session-services.js.map +1 -1
  306. package/dist/core/agent-session-state.d.ts.map +1 -1
  307. package/dist/core/agent-session-state.js +3 -0
  308. package/dist/core/agent-session-state.js.map +1 -1
  309. package/dist/core/agent-session-tool-hooks.d.ts.map +1 -1
  310. package/dist/core/agent-session-tool-hooks.js +6 -1
  311. package/dist/core/agent-session-tool-hooks.js.map +1 -1
  312. package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
  313. package/dist/core/agent-session-tool-registry.js +2 -18
  314. package/dist/core/agent-session-tool-registry.js.map +1 -1
  315. package/dist/core/agent-session-transfer.d.ts +4 -0
  316. package/dist/core/agent-session-transfer.d.ts.map +1 -0
  317. package/dist/core/agent-session-transfer.js +71 -0
  318. package/dist/core/agent-session-transfer.js.map +1 -0
  319. package/dist/core/agent-session-tree.js +1 -1
  320. package/dist/core/agent-session-tree.js.map +1 -1
  321. package/dist/core/agent-session-types.d.ts +5 -11
  322. package/dist/core/agent-session-types.d.ts.map +1 -1
  323. package/dist/core/agent-session-types.js +0 -3
  324. package/dist/core/agent-session-types.js.map +1 -1
  325. package/dist/core/agent-session.d.ts +12 -2
  326. package/dist/core/agent-session.d.ts.map +1 -1
  327. package/dist/core/agent-session.js +8 -2
  328. package/dist/core/agent-session.js.map +1 -1
  329. package/dist/core/atomic-guide-command.d.ts.map +1 -1
  330. package/dist/core/atomic-guide-command.js +31 -33
  331. package/dist/core/atomic-guide-command.js.map +1 -1
  332. package/dist/core/auth-storage.js +2 -2
  333. package/dist/core/auth-storage.js.map +1 -1
  334. package/dist/core/bash-executor.d.ts +5 -3
  335. package/dist/core/bash-executor.d.ts.map +1 -1
  336. package/dist/core/bash-executor.js +5 -4
  337. package/dist/core/bash-executor.js.map +1 -1
  338. package/dist/core/builtin-packages.d.ts.map +1 -1
  339. package/dist/core/builtin-packages.js +0 -6
  340. package/dist/core/builtin-packages.js.map +1 -1
  341. package/dist/core/compaction/branch-summarization.d.ts +8 -3
  342. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  343. package/dist/core/compaction/branch-summarization.js +17 -6
  344. package/dist/core/compaction/branch-summarization.js.map +1 -1
  345. package/dist/core/compaction/compaction-boundary.d.ts +18 -1
  346. package/dist/core/compaction/compaction-boundary.d.ts.map +1 -1
  347. package/dist/core/compaction/compaction-boundary.js +2 -2
  348. package/dist/core/compaction/compaction-boundary.js.map +1 -1
  349. package/dist/core/compaction/compaction-runner.d.ts +61 -6
  350. package/dist/core/compaction/compaction-runner.d.ts.map +1 -1
  351. package/dist/core/compaction/compaction-runner.js +242 -18
  352. package/dist/core/compaction/compaction-runner.js.map +1 -1
  353. package/dist/core/compaction/compaction-types.d.ts +53 -2
  354. package/dist/core/compaction/compaction-types.d.ts.map +1 -1
  355. package/dist/core/compaction/compaction-types.js.map +1 -1
  356. package/dist/core/compaction/fallback-planner.d.ts +64 -0
  357. package/dist/core/compaction/fallback-planner.d.ts.map +1 -0
  358. package/dist/core/compaction/fallback-planner.js +75 -0
  359. package/dist/core/compaction/fallback-planner.js.map +1 -0
  360. package/dist/core/compaction/index.d.ts +3 -0
  361. package/dist/core/compaction/index.d.ts.map +1 -1
  362. package/dist/core/compaction/index.js +3 -0
  363. package/dist/core/compaction/index.js.map +1 -1
  364. package/dist/core/compaction/planner-outcome.d.ts +86 -0
  365. package/dist/core/compaction/planner-outcome.d.ts.map +1 -0
  366. package/dist/core/compaction/planner-outcome.js +122 -0
  367. package/dist/core/compaction/planner-outcome.js.map +1 -0
  368. package/dist/core/compaction/range-planner-diagnostics.d.ts +58 -6
  369. package/dist/core/compaction/range-planner-diagnostics.d.ts.map +1 -1
  370. package/dist/core/compaction/range-planner-diagnostics.js +69 -31
  371. package/dist/core/compaction/range-planner-diagnostics.js.map +1 -1
  372. package/dist/core/compaction/range-planner.d.ts +36 -8
  373. package/dist/core/compaction/range-planner.d.ts.map +1 -1
  374. package/dist/core/compaction/range-planner.js +136 -51
  375. package/dist/core/compaction/range-planner.js.map +1 -1
  376. package/dist/core/compaction/region-trimming.d.ts +34 -0
  377. package/dist/core/compaction/region-trimming.d.ts.map +1 -0
  378. package/dist/core/compaction/region-trimming.js +73 -0
  379. package/dist/core/compaction/region-trimming.js.map +1 -0
  380. package/dist/core/compaction/transcript-serialization.d.ts +8 -1
  381. package/dist/core/compaction/transcript-serialization.d.ts.map +1 -1
  382. package/dist/core/compaction/transcript-serialization.js +78 -27
  383. package/dist/core/compaction/transcript-serialization.js.map +1 -1
  384. package/dist/core/context-tool-pairing.d.ts +19 -0
  385. package/dist/core/context-tool-pairing.d.ts.map +1 -0
  386. package/dist/core/context-tool-pairing.js +50 -0
  387. package/dist/core/context-tool-pairing.js.map +1 -0
  388. package/dist/core/diagnostics.d.ts +8 -0
  389. package/dist/core/diagnostics.d.ts.map +1 -1
  390. package/dist/core/diagnostics.js.map +1 -1
  391. package/dist/core/extensions/context-types.d.ts +3 -0
  392. package/dist/core/extensions/context-types.d.ts.map +1 -1
  393. package/dist/core/extensions/context-types.js.map +1 -1
  394. package/dist/core/extensions/index.d.ts +2 -0
  395. package/dist/core/extensions/index.d.ts.map +1 -1
  396. package/dist/core/extensions/index.js.map +1 -1
  397. package/dist/core/extensions/loader-api.d.ts.map +1 -1
  398. package/dist/core/extensions/loader-api.js +48 -27
  399. package/dist/core/extensions/loader-api.js.map +1 -1
  400. package/dist/core/extensions/loader-runtime.d.ts +2 -4
  401. package/dist/core/extensions/loader-runtime.d.ts.map +1 -1
  402. package/dist/core/extensions/loader-runtime.js +199 -18
  403. package/dist/core/extensions/loader-runtime.js.map +1 -1
  404. package/dist/core/extensions/message-types.d.ts +7 -4
  405. package/dist/core/extensions/message-types.d.ts.map +1 -1
  406. package/dist/core/extensions/message-types.js.map +1 -1
  407. package/dist/core/extensions/provider-types.d.ts +9 -4
  408. package/dist/core/extensions/provider-types.d.ts.map +1 -1
  409. package/dist/core/extensions/provider-types.js.map +1 -1
  410. package/dist/core/extensions/runner-context.d.ts +2 -0
  411. package/dist/core/extensions/runner-context.d.ts.map +1 -1
  412. package/dist/core/extensions/runner-context.js +4 -0
  413. package/dist/core/extensions/runner-context.js.map +1 -1
  414. package/dist/core/extensions/runner.d.ts +1 -0
  415. package/dist/core/extensions/runner.d.ts.map +1 -1
  416. package/dist/core/extensions/runner.js +28 -20
  417. package/dist/core/extensions/runner.js.map +1 -1
  418. package/dist/core/extensions/runtime-types.d.ts +25 -0
  419. package/dist/core/extensions/runtime-types.d.ts.map +1 -1
  420. package/dist/core/extensions/runtime-types.js.map +1 -1
  421. package/dist/core/extensions/tool-types.d.ts +7 -3
  422. package/dist/core/extensions/tool-types.d.ts.map +1 -1
  423. package/dist/core/extensions/tool-types.js.map +1 -1
  424. package/dist/core/extensions/ui-types.d.ts +14 -4
  425. package/dist/core/extensions/ui-types.d.ts.map +1 -1
  426. package/dist/core/extensions/ui-types.js.map +1 -1
  427. package/dist/core/fallback-models.d.ts +37 -0
  428. package/dist/core/fallback-models.d.ts.map +1 -0
  429. package/dist/core/fallback-models.js +48 -0
  430. package/dist/core/fallback-models.js.map +1 -0
  431. package/dist/core/flattened-tool-arguments.d.ts +4 -7
  432. package/dist/core/flattened-tool-arguments.d.ts.map +1 -1
  433. package/dist/core/flattened-tool-arguments.js +4 -7
  434. package/dist/core/flattened-tool-arguments.js.map +1 -1
  435. package/dist/core/http-dispatcher.d.ts.map +1 -1
  436. package/dist/core/http-dispatcher.js +0 -5
  437. package/dist/core/http-dispatcher.js.map +1 -1
  438. package/dist/core/messages.d.ts +14 -2
  439. package/dist/core/messages.d.ts.map +1 -1
  440. package/dist/core/messages.js +28 -4
  441. package/dist/core/messages.js.map +1 -1
  442. package/dist/core/model-capabilities.d.ts +18 -0
  443. package/dist/core/model-capabilities.d.ts.map +1 -0
  444. package/dist/core/model-capabilities.js +23 -0
  445. package/dist/core/model-capabilities.js.map +1 -0
  446. package/dist/core/model-registry-auth.d.ts.map +1 -1
  447. package/dist/core/model-registry-auth.js +0 -2
  448. package/dist/core/model-registry-auth.js.map +1 -1
  449. package/dist/core/model-registry-builtins.d.ts +0 -2
  450. package/dist/core/model-registry-builtins.d.ts.map +1 -1
  451. package/dist/core/model-registry-builtins.js +9 -76
  452. package/dist/core/model-registry-builtins.js.map +1 -1
  453. package/dist/core/model-registry-custom-loader.d.ts.map +1 -1
  454. package/dist/core/model-registry-custom-loader.js +1 -12
  455. package/dist/core/model-registry-custom-loader.js.map +1 -1
  456. package/dist/core/model-registry-dynamic.d.ts.map +1 -1
  457. package/dist/core/model-registry-dynamic.js +3 -15
  458. package/dist/core/model-registry-dynamic.js.map +1 -1
  459. package/dist/core/model-registry-extension-refresh.d.ts +23 -0
  460. package/dist/core/model-registry-extension-refresh.d.ts.map +1 -0
  461. package/dist/core/model-registry-extension-refresh.js +32 -0
  462. package/dist/core/model-registry-extension-refresh.js.map +1 -0
  463. package/dist/core/model-registry-schemas.d.ts +118 -9
  464. package/dist/core/model-registry-schemas.d.ts.map +1 -1
  465. package/dist/core/model-registry-schemas.js +10 -3
  466. package/dist/core/model-registry-schemas.js.map +1 -1
  467. package/dist/core/model-registry-types.d.ts +5 -5
  468. package/dist/core/model-registry-types.d.ts.map +1 -1
  469. package/dist/core/model-registry-types.js.map +1 -1
  470. package/dist/core/model-registry-validation.d.ts +7 -0
  471. package/dist/core/model-registry-validation.d.ts.map +1 -0
  472. package/dist/core/model-registry-validation.js +12 -0
  473. package/dist/core/model-registry-validation.js.map +1 -0
  474. package/dist/core/model-registry.d.ts +5 -3
  475. package/dist/core/model-registry.d.ts.map +1 -1
  476. package/dist/core/model-registry.js +34 -33
  477. package/dist/core/model-registry.js.map +1 -1
  478. package/dist/core/model-resolver-defaults.d.ts.map +1 -1
  479. package/dist/core/model-resolver-defaults.js +0 -1
  480. package/dist/core/model-resolver-defaults.js.map +1 -1
  481. package/dist/core/model-resolver-initial.d.ts.map +1 -1
  482. package/dist/core/model-resolver-initial.js +9 -0
  483. package/dist/core/model-resolver-initial.js.map +1 -1
  484. package/dist/core/model-resolver-patterns.d.ts.map +1 -1
  485. package/dist/core/model-resolver-patterns.js +0 -2
  486. package/dist/core/model-resolver-patterns.js.map +1 -1
  487. package/dist/core/model-resolver-scope.d.ts +2 -0
  488. package/dist/core/model-resolver-scope.d.ts.map +1 -1
  489. package/dist/core/model-resolver-scope.js +18 -4
  490. package/dist/core/model-resolver-scope.js.map +1 -1
  491. package/dist/core/model-resolver-types.d.ts +2 -0
  492. package/dist/core/model-resolver-types.d.ts.map +1 -1
  493. package/dist/core/model-resolver-types.js.map +1 -1
  494. package/dist/core/oauth-provider-bridge.d.ts +21 -0
  495. package/dist/core/oauth-provider-bridge.d.ts.map +1 -1
  496. package/dist/core/oauth-provider-bridge.js +68 -7
  497. package/dist/core/oauth-provider-bridge.js.map +1 -1
  498. package/dist/core/package-manager-auto-resources.d.ts.map +1 -1
  499. package/dist/core/package-manager-auto-resources.js +12 -4
  500. package/dist/core/package-manager-auto-resources.js.map +1 -1
  501. package/dist/core/package-manager-resolver.d.ts.map +1 -1
  502. package/dist/core/package-manager-resolver.js +42 -11
  503. package/dist/core/package-manager-resolver.js.map +1 -1
  504. package/dist/core/package-manager-types.d.ts +2 -0
  505. package/dist/core/package-manager-types.d.ts.map +1 -1
  506. package/dist/core/package-manager-types.js.map +1 -1
  507. package/dist/core/package-manager.d.ts +1 -1
  508. package/dist/core/package-manager.d.ts.map +1 -1
  509. package/dist/core/package-manager.js.map +1 -1
  510. package/dist/core/remote-catalog-provider.d.ts +1 -1
  511. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  512. package/dist/core/remote-catalog-provider.js +17 -11
  513. package/dist/core/remote-catalog-provider.js.map +1 -1
  514. package/dist/core/resource-loader-assets.d.ts.map +1 -1
  515. package/dist/core/resource-loader-assets.js +30 -4
  516. package/dist/core/resource-loader-assets.js.map +1 -1
  517. package/dist/core/resource-loader-context-files.d.ts.map +1 -1
  518. package/dist/core/resource-loader-context-files.js +3 -1
  519. package/dist/core/resource-loader-context-files.js.map +1 -1
  520. package/dist/core/resource-loader-core.d.ts +2 -1
  521. package/dist/core/resource-loader-core.d.ts.map +1 -1
  522. package/dist/core/resource-loader-core.js +3 -0
  523. package/dist/core/resource-loader-core.js.map +1 -1
  524. package/dist/core/resource-loader-extensions.d.ts +1 -0
  525. package/dist/core/resource-loader-extensions.d.ts.map +1 -1
  526. package/dist/core/resource-loader-extensions.js +120 -7
  527. package/dist/core/resource-loader-extensions.js.map +1 -1
  528. package/dist/core/resource-loader-package-resources.d.ts.map +1 -1
  529. package/dist/core/resource-loader-package-resources.js +14 -1
  530. package/dist/core/resource-loader-package-resources.js.map +1 -1
  531. package/dist/core/resource-loader-reload.d.ts.map +1 -1
  532. package/dist/core/resource-loader-reload.js +2 -1
  533. package/dist/core/resource-loader-reload.js.map +1 -1
  534. package/dist/core/resource-loader-source-info.d.ts.map +1 -1
  535. package/dist/core/resource-loader-source-info.js +6 -3
  536. package/dist/core/resource-loader-source-info.js.map +1 -1
  537. package/dist/core/sdk-types.d.ts +11 -10
  538. package/dist/core/sdk-types.d.ts.map +1 -1
  539. package/dist/core/sdk-types.js.map +1 -1
  540. package/dist/core/sdk.d.ts +1 -0
  541. package/dist/core/sdk.d.ts.map +1 -1
  542. package/dist/core/sdk.js +13 -84
  543. package/dist/core/sdk.js.map +1 -1
  544. package/dist/core/session-manager-core.d.ts +3 -3
  545. package/dist/core/session-manager-core.d.ts.map +1 -1
  546. package/dist/core/session-manager-core.js +18 -25
  547. package/dist/core/session-manager-core.js.map +1 -1
  548. package/dist/core/session-manager-entries.d.ts +2 -5
  549. package/dist/core/session-manager-entries.d.ts.map +1 -1
  550. package/dist/core/session-manager-entries.js +2 -8
  551. package/dist/core/session-manager-entries.js.map +1 -1
  552. package/dist/core/session-manager-history.d.ts +3 -3
  553. package/dist/core/session-manager-history.d.ts.map +1 -1
  554. package/dist/core/session-manager-history.js +49 -27
  555. package/dist/core/session-manager-history.js.map +1 -1
  556. package/dist/core/session-manager-storage.d.ts +6 -0
  557. package/dist/core/session-manager-storage.d.ts.map +1 -1
  558. package/dist/core/session-manager-storage.js +38 -5
  559. package/dist/core/session-manager-storage.js.map +1 -1
  560. package/dist/core/session-manager-types.d.ts +6 -6
  561. package/dist/core/session-manager-types.d.ts.map +1 -1
  562. package/dist/core/session-manager-types.js.map +1 -1
  563. package/dist/core/session-manager.d.ts +1 -1
  564. package/dist/core/session-manager.d.ts.map +1 -1
  565. package/dist/core/session-manager.js.map +1 -1
  566. package/dist/core/settings-manager-basic-accessors.d.ts +0 -4
  567. package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
  568. package/dist/core/settings-manager-basic-accessors.js +0 -50
  569. package/dist/core/settings-manager-basic-accessors.js.map +1 -1
  570. package/dist/core/settings-manager-core.d.ts +2 -4
  571. package/dist/core/settings-manager-core.d.ts.map +1 -1
  572. package/dist/core/settings-manager-core.js +5 -51
  573. package/dist/core/settings-manager-core.js.map +1 -1
  574. package/dist/core/settings-manager.d.ts +1 -1
  575. package/dist/core/settings-manager.d.ts.map +1 -1
  576. package/dist/core/settings-manager.js.map +1 -1
  577. package/dist/core/settings-storage.d.ts +3 -1
  578. package/dist/core/settings-storage.d.ts.map +1 -1
  579. package/dist/core/settings-storage.js +22 -0
  580. package/dist/core/settings-storage.js.map +1 -1
  581. package/dist/core/settings-types.d.ts +2 -4
  582. package/dist/core/settings-types.d.ts.map +1 -1
  583. package/dist/core/settings-types.js.map +1 -1
  584. package/dist/core/slash-commands.d.ts.map +1 -1
  585. package/dist/core/slash-commands.js +68 -22
  586. package/dist/core/slash-commands.js.map +1 -1
  587. package/dist/core/source-info.d.ts +3 -1
  588. package/dist/core/source-info.d.ts.map +1 -1
  589. package/dist/core/source-info.js +2 -0
  590. package/dist/core/source-info.js.map +1 -1
  591. package/dist/core/tools/ask-user-question/ask-user-question.js +1 -1
  592. package/dist/core/tools/ask-user-question/ask-user-question.js.map +1 -1
  593. package/dist/core/tools/bash-session-environment.d.ts +13 -0
  594. package/dist/core/tools/bash-session-environment.d.ts.map +1 -0
  595. package/dist/core/tools/bash-session-environment.js +35 -0
  596. package/dist/core/tools/bash-session-environment.js.map +1 -0
  597. package/dist/core/tools/bash.d.ts +4 -1
  598. package/dist/core/tools/bash.d.ts.map +1 -1
  599. package/dist/core/tools/bash.js +16 -8
  600. package/dist/core/tools/bash.js.map +1 -1
  601. package/dist/core/tools/tool-definition-wrapper.d.ts +3 -0
  602. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  603. package/dist/core/tools/tool-definition-wrapper.js +10 -2
  604. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  605. package/dist/extensions/index.js +1 -1
  606. package/dist/extensions/index.js.map +1 -1
  607. package/dist/extensions/llama/provider.d.ts +3 -2
  608. package/dist/extensions/llama/provider.d.ts.map +1 -1
  609. package/dist/extensions/llama/provider.js +9 -3
  610. package/dist/extensions/llama/provider.js.map +1 -1
  611. package/dist/index-extensions.d.ts +1 -1
  612. package/dist/index-extensions.d.ts.map +1 -1
  613. package/dist/index-extensions.js.map +1 -1
  614. package/dist/index.d.ts +2 -3
  615. package/dist/index.d.ts.map +1 -1
  616. package/dist/index.js +1 -2
  617. package/dist/index.js.map +1 -1
  618. package/dist/main-session-options.d.ts.map +1 -1
  619. package/dist/main-session-options.js +0 -4
  620. package/dist/main-session-options.js.map +1 -1
  621. package/dist/main-session.d.ts.map +1 -1
  622. package/dist/main-session.js +2 -1
  623. package/dist/main-session.js.map +1 -1
  624. package/dist/main.d.ts.map +1 -1
  625. package/dist/main.js +1 -17
  626. package/dist/main.js.map +1 -1
  627. package/dist/modes/index.d.ts +1 -1
  628. package/dist/modes/index.d.ts.map +1 -1
  629. package/dist/modes/index.js.map +1 -1
  630. package/dist/modes/interactive/chat-input-actions.d.ts +1 -1
  631. package/dist/modes/interactive/chat-input-actions.d.ts.map +1 -1
  632. package/dist/modes/interactive/chat-input-actions.js +14 -96
  633. package/dist/modes/interactive/chat-input-actions.js.map +1 -1
  634. package/dist/modes/interactive/components/atomic-banner.d.ts +9 -8
  635. package/dist/modes/interactive/components/atomic-banner.d.ts.map +1 -1
  636. package/dist/modes/interactive/components/atomic-banner.js +68 -24
  637. package/dist/modes/interactive/components/atomic-banner.js.map +1 -1
  638. package/dist/modes/interactive/components/atomic-working-status.d.ts +52 -0
  639. package/dist/modes/interactive/components/atomic-working-status.d.ts.map +1 -0
  640. package/dist/modes/interactive/components/atomic-working-status.js +202 -0
  641. package/dist/modes/interactive/components/atomic-working-status.js.map +1 -0
  642. package/dist/modes/interactive/components/chat-message-renderer.js +1 -1
  643. package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
  644. package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
  645. package/dist/modes/interactive/components/chat-session-host-actions.js +99 -7
  646. package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
  647. package/dist/modes/interactive/components/chat-session-host-editor.js +3 -3
  648. package/dist/modes/interactive/components/chat-session-host-editor.js.map +1 -1
  649. package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
  650. package/dist/modes/interactive/components/chat-session-host-events.js +52 -9
  651. package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
  652. package/dist/modes/interactive/components/chat-session-host-rendering.d.ts.map +1 -1
  653. package/dist/modes/interactive/components/chat-session-host-rendering.js +23 -7
  654. package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
  655. package/dist/modes/interactive/components/chat-session-host-runtime.d.ts +2 -0
  656. package/dist/modes/interactive/components/chat-session-host-runtime.d.ts.map +1 -1
  657. package/dist/modes/interactive/components/chat-session-host-runtime.js +67 -18
  658. package/dist/modes/interactive/components/chat-session-host-runtime.js.map +1 -1
  659. package/dist/modes/interactive/components/chat-session-host-state.d.ts +9 -0
  660. package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
  661. package/dist/modes/interactive/components/chat-session-host-state.js +5 -0
  662. package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
  663. package/dist/modes/interactive/components/chat-session-host-types.d.ts +10 -0
  664. package/dist/modes/interactive/components/chat-session-host-types.d.ts.map +1 -1
  665. package/dist/modes/interactive/components/chat-session-host-types.js.map +1 -1
  666. package/dist/modes/interactive/components/compaction-boundary-message.d.ts.map +1 -1
  667. package/dist/modes/interactive/components/compaction-boundary-message.js +2 -1
  668. package/dist/modes/interactive/components/compaction-boundary-message.js.map +1 -1
  669. package/dist/modes/interactive/components/custom-message.d.ts +3 -1
  670. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  671. package/dist/modes/interactive/components/custom-message.js +9 -2
  672. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  673. package/dist/modes/interactive/components/extension-editor.d.ts +3 -2
  674. package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
  675. package/dist/modes/interactive/components/extension-editor.js +14 -43
  676. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  677. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  678. package/dist/modes/interactive/components/scoped-models-selector.js +18 -13
  679. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  680. package/dist/modes/interactive/components/startup-identity.d.ts +22 -0
  681. package/dist/modes/interactive/components/startup-identity.d.ts.map +1 -0
  682. package/dist/modes/interactive/components/startup-identity.js +58 -0
  683. package/dist/modes/interactive/components/startup-identity.js.map +1 -0
  684. package/dist/modes/interactive/components/tree-selector-content.d.ts.map +1 -1
  685. package/dist/modes/interactive/components/tree-selector-content.js +0 -6
  686. package/dist/modes/interactive/components/tree-selector-content.js.map +1 -1
  687. package/dist/modes/interactive/components/tree-selector-model.d.ts.map +1 -1
  688. package/dist/modes/interactive/components/tree-selector-model.js +0 -1
  689. package/dist/modes/interactive/components/tree-selector-model.js.map +1 -1
  690. package/dist/modes/interactive/components/working-status.d.ts +5 -11
  691. package/dist/modes/interactive/components/working-status.d.ts.map +1 -1
  692. package/dist/modes/interactive/components/working-status.js +14 -15
  693. package/dist/modes/interactive/components/working-status.js.map +1 -1
  694. package/dist/modes/interactive/external-editor.d.ts +23 -0
  695. package/dist/modes/interactive/external-editor.d.ts.map +1 -0
  696. package/dist/modes/interactive/external-editor.js +120 -0
  697. package/dist/modes/interactive/external-editor.js.map +1 -0
  698. package/dist/modes/interactive/interactive-agent-events.js +25 -20
  699. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  700. package/dist/modes/interactive/interactive-auth-login.js +16 -6
  701. package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
  702. package/dist/modes/interactive/interactive-auth-routing.js +3 -0
  703. package/dist/modes/interactive/interactive-auth-routing.js.map +1 -1
  704. package/dist/modes/interactive/interactive-bash-compact.d.ts +2 -1
  705. package/dist/modes/interactive/interactive-bash-compact.d.ts.map +1 -1
  706. package/dist/modes/interactive/interactive-bash-compact.js +8 -0
  707. package/dist/modes/interactive/interactive-bash-compact.js.map +1 -1
  708. package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
  709. package/dist/modes/interactive/interactive-deferred-startup.js +49 -19
  710. package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
  711. package/dist/modes/interactive/interactive-editor-actions.js +4 -3
  712. package/dist/modes/interactive/interactive-editor-actions.js.map +1 -1
  713. package/dist/modes/interactive/interactive-extension-dialogs.js +1 -1
  714. package/dist/modes/interactive/interactive-extension-dialogs.js.map +1 -1
  715. package/dist/modes/interactive/interactive-extension-runtime.js +3 -2
  716. package/dist/modes/interactive/interactive-extension-runtime.js.map +1 -1
  717. package/dist/modes/interactive/interactive-initial-session-binding.d.ts +4 -0
  718. package/dist/modes/interactive/interactive-initial-session-binding.d.ts.map +1 -0
  719. package/dist/modes/interactive/interactive-initial-session-binding.js +23 -0
  720. package/dist/modes/interactive/interactive-initial-session-binding.js.map +1 -0
  721. package/dist/modes/interactive/interactive-input-handling.d.ts +2 -1
  722. package/dist/modes/interactive/interactive-input-handling.d.ts.map +1 -1
  723. package/dist/modes/interactive/interactive-input-handling.js +27 -51
  724. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  725. package/dist/modes/interactive/interactive-mode-base.d.ts +11 -7
  726. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  727. package/dist/modes/interactive/interactive-mode-base.js +14 -6
  728. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  729. package/dist/modes/interactive/interactive-mode-deps.d.ts +2 -4
  730. package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
  731. package/dist/modes/interactive/interactive-mode-deps.js +2 -4
  732. package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
  733. package/dist/modes/interactive/interactive-mode-surface.d.ts +9 -8
  734. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  735. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  736. package/dist/modes/interactive/interactive-mode.d.ts +1 -0
  737. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  738. package/dist/modes/interactive/interactive-mode.js +1 -0
  739. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  740. package/dist/modes/interactive/interactive-model-catalog-startup.d.ts +2 -3
  741. package/dist/modes/interactive/interactive-model-catalog-startup.d.ts.map +1 -1
  742. package/dist/modes/interactive/interactive-model-catalog-startup.js +3 -6
  743. package/dist/modes/interactive/interactive-model-catalog-startup.js.map +1 -1
  744. package/dist/modes/interactive/interactive-model-routing.js +26 -97
  745. package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
  746. package/dist/modes/interactive/interactive-pause.d.ts +4 -0
  747. package/dist/modes/interactive/interactive-pause.d.ts.map +1 -0
  748. package/dist/modes/interactive/interactive-pause.js +8 -0
  749. package/dist/modes/interactive/interactive-pause.js.map +1 -0
  750. package/dist/modes/interactive/interactive-process-lifecycle.js +5 -4
  751. package/dist/modes/interactive/interactive-process-lifecycle.js.map +1 -1
  752. package/dist/modes/interactive/interactive-prompt-turn.d.ts +2 -0
  753. package/dist/modes/interactive/interactive-prompt-turn.d.ts.map +1 -0
  754. package/dist/modes/interactive/interactive-prompt-turn.js +41 -0
  755. package/dist/modes/interactive/interactive-prompt-turn.js.map +1 -0
  756. package/dist/modes/interactive/interactive-render-chat.js +20 -8
  757. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  758. package/dist/modes/interactive/interactive-resource-paths.js +11 -2
  759. package/dist/modes/interactive/interactive-resource-paths.js.map +1 -1
  760. package/dist/modes/interactive/interactive-resource-rendering.js +99 -0
  761. package/dist/modes/interactive/interactive-resource-rendering.js.map +1 -1
  762. package/dist/modes/interactive/interactive-session-runtime.js +1 -1
  763. package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
  764. package/dist/modes/interactive/interactive-slash-commands.js +1 -1
  765. package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
  766. package/dist/modes/interactive/interactive-startup-chat-container.d.ts +20 -0
  767. package/dist/modes/interactive/interactive-startup-chat-container.d.ts.map +1 -0
  768. package/dist/modes/interactive/interactive-startup-chat-container.js +26 -0
  769. package/dist/modes/interactive/interactive-startup-chat-container.js.map +1 -0
  770. package/dist/modes/interactive/interactive-startup.d.ts +1 -1
  771. package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
  772. package/dist/modes/interactive/interactive-startup.js +30 -25
  773. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  774. package/dist/modes/interactive/interactive-summarization-retry-events.d.ts.map +1 -1
  775. package/dist/modes/interactive/interactive-summarization-retry-events.js +9 -3
  776. package/dist/modes/interactive/interactive-summarization-retry-events.js.map +1 -1
  777. package/dist/modes/interactive/theme/catppuccin-frappe.json +1 -1
  778. package/dist/modes/interactive/theme/catppuccin-latte.json +1 -1
  779. package/dist/modes/interactive/theme/catppuccin-macchiato.json +1 -1
  780. package/dist/modes/interactive/theme/catppuccin-mocha.json +9 -1
  781. package/dist/modes/interactive/theme/dark.json +1 -1
  782. package/dist/modes/interactive/theme/light.json +1 -1
  783. package/dist/modes/interactive/theme/theme-class.d.ts +4 -0
  784. package/dist/modes/interactive/theme/theme-class.d.ts.map +1 -1
  785. package/dist/modes/interactive/theme/theme-class.js +7 -0
  786. package/dist/modes/interactive/theme/theme-class.js.map +1 -1
  787. package/dist/modes/interactive/theme/theme-loading.d.ts.map +1 -1
  788. package/dist/modes/interactive/theme/theme-loading.js +4 -0
  789. package/dist/modes/interactive/theme/theme-loading.js.map +1 -1
  790. package/dist/modes/interactive/theme/theme-schema.d.ts +32 -0
  791. package/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -1
  792. package/dist/modes/interactive/theme/theme-schema.js +8 -0
  793. package/dist/modes/interactive/theme/theme-schema.js.map +1 -1
  794. package/dist/modes/interactive/theme/theme-schema.json +15 -2
  795. package/dist/modes/interactive/whimsical-messages.d.ts +1 -0
  796. package/dist/modes/interactive/whimsical-messages.d.ts.map +1 -1
  797. package/dist/modes/interactive/whimsical-messages.js +2 -2
  798. package/dist/modes/interactive/whimsical-messages.js.map +1 -1
  799. package/dist/modes/interactive-engine/create-isolated-runtime.d.ts.map +1 -1
  800. package/dist/modes/interactive-engine/create-isolated-runtime.js +3 -1
  801. package/dist/modes/interactive-engine/create-isolated-runtime.js.map +1 -1
  802. package/dist/modes/interactive-engine/engine-args.d.ts.map +1 -1
  803. package/dist/modes/interactive-engine/engine-args.js +0 -1
  804. package/dist/modes/interactive-engine/engine-args.js.map +1 -1
  805. package/dist/modes/interactive-engine/engine-custom-ui.d.ts.map +1 -1
  806. package/dist/modes/interactive-engine/engine-custom-ui.js +5 -17
  807. package/dist/modes/interactive-engine/engine-custom-ui.js.map +1 -1
  808. package/dist/modes/interactive-engine/engine-render-service.d.ts.map +1 -1
  809. package/dist/modes/interactive-engine/engine-render-service.js +8 -19
  810. package/dist/modes/interactive-engine/engine-render-service.js.map +1 -1
  811. package/dist/modes/interactive-engine/extension-ui-bridge.d.ts +2 -0
  812. package/dist/modes/interactive-engine/extension-ui-bridge.d.ts.map +1 -1
  813. package/dist/modes/interactive-engine/extension-ui-bridge.js +3 -0
  814. package/dist/modes/interactive-engine/extension-ui-bridge.js.map +1 -1
  815. package/dist/modes/interactive-engine/isolated-auth.d.ts +10 -0
  816. package/dist/modes/interactive-engine/isolated-auth.d.ts.map +1 -0
  817. package/dist/modes/interactive-engine/isolated-auth.js +14 -0
  818. package/dist/modes/interactive-engine/isolated-auth.js.map +1 -0
  819. package/dist/modes/interactive-engine/isolated-runtime.d.ts +9 -1
  820. package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
  821. package/dist/modes/interactive-engine/isolated-runtime.js +46 -34
  822. package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
  823. package/dist/modes/interactive-engine/protocol.d.ts +1 -1
  824. package/dist/modes/interactive-engine/protocol.d.ts.map +1 -1
  825. package/dist/modes/interactive-engine/protocol.js +3 -10
  826. package/dist/modes/interactive-engine/protocol.js.map +1 -1
  827. package/dist/modes/interactive-engine/remote-model-catalog.d.ts +1 -0
  828. package/dist/modes/interactive-engine/remote-model-catalog.d.ts.map +1 -1
  829. package/dist/modes/interactive-engine/remote-model-catalog.js +10 -1
  830. package/dist/modes/interactive-engine/remote-model-catalog.js.map +1 -1
  831. package/dist/modes/interactive-engine/remote-queue-pause.d.ts +13 -0
  832. package/dist/modes/interactive-engine/remote-queue-pause.d.ts.map +1 -0
  833. package/dist/modes/interactive-engine/remote-queue-pause.js +38 -0
  834. package/dist/modes/interactive-engine/remote-queue-pause.js.map +1 -0
  835. package/dist/modes/interactive-engine/remote-renderer.d.ts +3 -1
  836. package/dist/modes/interactive-engine/remote-renderer.d.ts.map +1 -1
  837. package/dist/modes/interactive-engine/remote-renderer.js +4 -1
  838. package/dist/modes/interactive-engine/remote-renderer.js.map +1 -1
  839. package/dist/modes/print-mode.d.ts.map +1 -1
  840. package/dist/modes/print-mode.js +5 -0
  841. package/dist/modes/print-mode.js.map +1 -1
  842. package/dist/modes/rpc/jsonl.d.ts +2 -7
  843. package/dist/modes/rpc/jsonl.d.ts.map +1 -1
  844. package/dist/modes/rpc/jsonl.js +7 -24
  845. package/dist/modes/rpc/jsonl.js.map +1 -1
  846. package/dist/modes/rpc/queued-writer.d.ts +19 -0
  847. package/dist/modes/rpc/queued-writer.d.ts.map +1 -0
  848. package/dist/modes/rpc/{bounded-writer.js → queued-writer.js} +7 -30
  849. package/dist/modes/rpc/queued-writer.js.map +1 -0
  850. package/dist/modes/rpc/rpc-bash-request-owners.d.ts +24 -0
  851. package/dist/modes/rpc/rpc-bash-request-owners.d.ts.map +1 -0
  852. package/dist/modes/rpc/rpc-bash-request-owners.js +45 -0
  853. package/dist/modes/rpc/rpc-bash-request-owners.js.map +1 -0
  854. package/dist/modes/rpc/rpc-client-api.d.ts +8 -5
  855. package/dist/modes/rpc/rpc-client-api.d.ts.map +1 -1
  856. package/dist/modes/rpc/rpc-client-api.js +10 -11
  857. package/dist/modes/rpc/rpc-client-api.js.map +1 -1
  858. package/dist/modes/rpc/rpc-client-process.d.ts +1 -4
  859. package/dist/modes/rpc/rpc-client-process.d.ts.map +1 -1
  860. package/dist/modes/rpc/rpc-client-process.js +2 -14
  861. package/dist/modes/rpc/rpc-client-process.js.map +1 -1
  862. package/dist/modes/rpc/rpc-client.d.ts +8 -4
  863. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  864. package/dist/modes/rpc/rpc-client.js +21 -30
  865. package/dist/modes/rpc/rpc-client.js.map +1 -1
  866. package/dist/modes/rpc/rpc-command-handler.d.ts +7 -4
  867. package/dist/modes/rpc/rpc-command-handler.d.ts.map +1 -1
  868. package/dist/modes/rpc/rpc-command-handler.js +76 -93
  869. package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
  870. package/dist/modes/rpc/rpc-input-scheduler.d.ts +3 -3
  871. package/dist/modes/rpc/rpc-input-scheduler.d.ts.map +1 -1
  872. package/dist/modes/rpc/rpc-input-scheduler.js +7 -4
  873. package/dist/modes/rpc/rpc-input-scheduler.js.map +1 -1
  874. package/dist/modes/rpc/rpc-mode.d.ts +1 -1
  875. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  876. package/dist/modes/rpc/rpc-mode.js +5 -5
  877. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  878. package/dist/modes/rpc/rpc-model-fallback-prompt.d.ts +4 -0
  879. package/dist/modes/rpc/rpc-model-fallback-prompt.d.ts.map +1 -0
  880. package/dist/modes/rpc/rpc-model-fallback-prompt.js +11 -0
  881. package/dist/modes/rpc/rpc-model-fallback-prompt.js.map +1 -0
  882. package/dist/modes/rpc/rpc-oauth-client.d.ts +22 -0
  883. package/dist/modes/rpc/rpc-oauth-client.d.ts.map +1 -0
  884. package/dist/modes/rpc/rpc-oauth-client.js +74 -0
  885. package/dist/modes/rpc/rpc-oauth-client.js.map +1 -0
  886. package/dist/modes/rpc/rpc-oauth-interaction.d.ts +9 -0
  887. package/dist/modes/rpc/rpc-oauth-interaction.d.ts.map +1 -0
  888. package/dist/modes/rpc/rpc-oauth-interaction.js +49 -0
  889. package/dist/modes/rpc/rpc-oauth-interaction.js.map +1 -0
  890. package/dist/modes/rpc/rpc-output-buffer.d.ts +2 -1
  891. package/dist/modes/rpc/rpc-output-buffer.d.ts.map +1 -1
  892. package/dist/modes/rpc/rpc-output-buffer.js +4 -39
  893. package/dist/modes/rpc/rpc-output-buffer.js.map +1 -1
  894. package/dist/modes/rpc/rpc-provider-auth.d.ts +23 -0
  895. package/dist/modes/rpc/rpc-provider-auth.d.ts.map +1 -0
  896. package/dist/modes/rpc/rpc-provider-auth.js +145 -0
  897. package/dist/modes/rpc/rpc-provider-auth.js.map +1 -0
  898. package/dist/modes/rpc/rpc-responses.d.ts +0 -1
  899. package/dist/modes/rpc/rpc-responses.d.ts.map +1 -1
  900. package/dist/modes/rpc/rpc-responses.js +0 -14
  901. package/dist/modes/rpc/rpc-responses.js.map +1 -1
  902. package/dist/modes/rpc/rpc-types.d.ts +83 -27
  903. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  904. package/dist/modes/rpc/rpc-types.js.map +1 -1
  905. package/dist/utils/clipboard.d.ts.map +1 -1
  906. package/dist/utils/clipboard.js +21 -8
  907. package/dist/utils/clipboard.js.map +1 -1
  908. package/dist/utils/version-check.d.ts.map +1 -1
  909. package/dist/utils/version-check.js +3 -1
  910. package/dist/utils/version-check.js.map +1 -1
  911. package/docs/changelog.mdx +12 -1
  912. package/docs/compaction.md +101 -18
  913. package/docs/custom-provider.md +13 -4
  914. package/docs/docs.json +1 -0
  915. package/docs/environment-variables.md +37 -0
  916. package/docs/extensions.md +45 -9
  917. package/docs/index.md +1 -0
  918. package/docs/intercom.md +1 -1
  919. package/docs/json.md +4 -4
  920. package/docs/keybindings.md +4 -2
  921. package/docs/llama-cpp.md +3 -1
  922. package/docs/models.md +29 -43
  923. package/docs/providers.md +18 -24
  924. package/docs/quickstart.md +19 -16
  925. package/docs/rpc.md +38 -85
  926. package/docs/sdk.md +15 -22
  927. package/docs/session-format.md +2 -15
  928. package/docs/sessions.md +1 -1
  929. package/docs/settings.md +10 -15
  930. package/docs/skills.md +8 -0
  931. package/docs/subagents.md +17 -9
  932. package/docs/themes.md +10 -1
  933. package/docs/tui.md +3 -3
  934. package/docs/usage.md +21 -2
  935. package/docs/windows.md +1 -1
  936. package/docs/workflows.md +1096 -518
  937. package/examples/extensions/README.md +1 -1
  938. package/examples/extensions/handoff.ts +8 -1
  939. package/examples/extensions/message-renderer.ts +2 -2
  940. package/examples/extensions/summarize.ts +3 -0
  941. package/examples/extensions/working-indicator.ts +2 -2
  942. package/npm-shrinkwrap.json +40 -46
  943. package/package.json +9 -7
  944. package/dist/builtin/cursor/CHANGELOG.md +0 -281
  945. package/dist/builtin/cursor/LICENSE +0 -26
  946. package/dist/builtin/cursor/README.md +0 -24
  947. package/dist/builtin/cursor/index.ts +0 -9
  948. package/dist/builtin/cursor/package.json +0 -47
  949. package/dist/builtin/cursor/src/auth.ts +0 -352
  950. package/dist/builtin/cursor/src/catalog-cache.ts +0 -155
  951. package/dist/builtin/cursor/src/config.ts +0 -123
  952. package/dist/builtin/cursor/src/conversation-state.ts +0 -135
  953. package/dist/builtin/cursor/src/cursor-models-raw.json +0 -412
  954. package/dist/builtin/cursor/src/model-mapper.ts +0 -369
  955. package/dist/builtin/cursor/src/model-reference.ts +0 -282
  956. package/dist/builtin/cursor/src/models.ts +0 -54
  957. package/dist/builtin/cursor/src/native-loader.ts +0 -71
  958. package/dist/builtin/cursor/src/proto/README.md +0 -34
  959. package/dist/builtin/cursor/src/proto/agent_pb.ts +0 -15294
  960. package/dist/builtin/cursor/src/proto/protobuf-codec-base64.ts +0 -22
  961. package/dist/builtin/cursor/src/proto/protobuf-codec-json.ts +0 -44
  962. package/dist/builtin/cursor/src/proto/protobuf-codec-request.ts +0 -311
  963. package/dist/builtin/cursor/src/proto/protobuf-codec-wire.ts +0 -248
  964. package/dist/builtin/cursor/src/proto/protobuf-codec.ts +0 -200
  965. package/dist/builtin/cursor/src/provider.ts +0 -301
  966. package/dist/builtin/cursor/src/stream.ts +0 -494
  967. package/dist/builtin/cursor/src/transport-errors.ts +0 -74
  968. package/dist/builtin/cursor/src/transport-frame.ts +0 -56
  969. package/dist/builtin/cursor/src/transport-http2.ts +0 -122
  970. package/dist/builtin/cursor/src/transport-native-client.ts +0 -161
  971. package/dist/builtin/cursor/src/transport-run-stream.ts +0 -188
  972. package/dist/builtin/cursor/src/transport-timeouts.ts +0 -87
  973. package/dist/builtin/cursor/src/transport-types.ts +0 -143
  974. package/dist/builtin/cursor/src/transport.ts +0 -26
  975. package/dist/builtin/workflows/builtin/deep-research-codebase-runner.ts +0 -492
  976. package/dist/builtin/workflows/builtin/deep-research-codebase-utils.ts +0 -383
  977. package/dist/builtin/workflows/builtin/deep-research-codebase.d.ts +0 -35
  978. package/dist/builtin/workflows/builtin/deep-research-codebase.ts +0 -47
  979. package/dist/builtin/workflows/skills/impeccable/scripts/hook-before-edit.mjs +0 -516
  980. package/dist/core/context-window.d.ts +0 -54
  981. package/dist/core/context-window.d.ts.map +0 -1
  982. package/dist/core/context-window.js +0 -110
  983. package/dist/core/context-window.js.map +0 -1
  984. package/dist/core/copilot-anthropic-sse-repair.d.ts +0 -23
  985. package/dist/core/copilot-anthropic-sse-repair.d.ts.map +0 -1
  986. package/dist/core/copilot-anthropic-sse-repair.js +0 -340
  987. package/dist/core/copilot-anthropic-sse-repair.js.map +0 -1
  988. package/dist/core/copilot-errors.d.ts +0 -9
  989. package/dist/core/copilot-errors.d.ts.map +0 -1
  990. package/dist/core/copilot-errors.js +0 -32
  991. package/dist/core/copilot-errors.js.map +0 -1
  992. package/dist/core/copilot-gemini-payload-sanitizer.d.ts +0 -72
  993. package/dist/core/copilot-gemini-payload-sanitizer.d.ts.map +0 -1
  994. package/dist/core/copilot-gemini-payload-sanitizer.js +0 -296
  995. package/dist/core/copilot-gemini-payload-sanitizer.js.map +0 -1
  996. package/dist/core/copilot-gemini-reasoning.d.ts +0 -126
  997. package/dist/core/copilot-gemini-reasoning.d.ts.map +0 -1
  998. package/dist/core/copilot-gemini-reasoning.js +0 -265
  999. package/dist/core/copilot-gemini-reasoning.js.map +0 -1
  1000. package/dist/core/copilot-gemini-tool-arguments.d.ts +0 -42
  1001. package/dist/core/copilot-gemini-tool-arguments.d.ts.map +0 -1
  1002. package/dist/core/copilot-gemini-tool-arguments.js +0 -159
  1003. package/dist/core/copilot-gemini-tool-arguments.js.map +0 -1
  1004. package/dist/core/copilot-hosts.d.ts +0 -12
  1005. package/dist/core/copilot-hosts.d.ts.map +0 -1
  1006. package/dist/core/copilot-hosts.js +0 -33
  1007. package/dist/core/copilot-hosts.js.map +0 -1
  1008. package/dist/core/copilot-model-catalog.d.ts +0 -114
  1009. package/dist/core/copilot-model-catalog.d.ts.map +0 -1
  1010. package/dist/core/copilot-model-catalog.js +0 -392
  1011. package/dist/core/copilot-model-catalog.js.map +0 -1
  1012. package/dist/core/copilot-model-static-fallbacks.d.ts +0 -43
  1013. package/dist/core/copilot-model-static-fallbacks.d.ts.map +0 -1
  1014. package/dist/core/copilot-model-static-fallbacks.js +0 -50
  1015. package/dist/core/copilot-model-static-fallbacks.js.map +0 -1
  1016. package/dist/core/copilot-model-synthesis.d.ts +0 -10
  1017. package/dist/core/copilot-model-synthesis.d.ts.map +0 -1
  1018. package/dist/core/copilot-model-synthesis.js +0 -91
  1019. package/dist/core/copilot-model-synthesis.js.map +0 -1
  1020. package/dist/modes/interactive/components/context-window-selector.d.ts +0 -53
  1021. package/dist/modes/interactive/components/context-window-selector.d.ts.map +0 -1
  1022. package/dist/modes/interactive/components/context-window-selector.js +0 -136
  1023. package/dist/modes/interactive/components/context-window-selector.js.map +0 -1
  1024. package/dist/modes/rpc/bounded-writer.d.ts +0 -27
  1025. package/dist/modes/rpc/bounded-writer.d.ts.map +0 -1
  1026. package/dist/modes/rpc/bounded-writer.js.map +0 -1
@@ -14,6 +14,23 @@ export class FileSettingsStorage {
14
14
  this.globalReadPaths = (options?.globalReadPaths ?? [this.globalSettingsPath]).map((path) => normalizePath(path));
15
15
  this.projectReadPaths = (options?.projectReadPaths ?? [this.projectSettingsPath]).map((path) => normalizePath(path));
16
16
  }
17
+ getFieldOrigin(scope, field) {
18
+ const readPaths = scope === "global" ? this.globalReadPaths : this.projectReadPaths;
19
+ for (const [index, readPath] of readPaths.entries()) {
20
+ if (!existsSync(readPath))
21
+ continue;
22
+ try {
23
+ const parsed = parseJsonFileContent(readFileSync(readPath, "utf-8"));
24
+ if (Object.prototype.hasOwnProperty.call(parsed, field)) {
25
+ return index === 0 ? "primary" : "legacy";
26
+ }
27
+ }
28
+ catch {
29
+ return undefined;
30
+ }
31
+ }
32
+ return undefined;
33
+ }
17
34
  acquireLockSyncWithRetry(path) {
18
35
  const maxAttempts = 10;
19
36
  const delayMs = 20;
@@ -97,5 +114,10 @@ export class InMemorySettingsStorage {
97
114
  }
98
115
  }
99
116
  }
117
+ getFieldOrigin(scope, field) {
118
+ const raw = scope === "global" ? this.global : this.project;
119
+ const settings = JSON.parse(raw ?? "{}");
120
+ return Object.prototype.hasOwnProperty.call(settings, field) ? "primary" : undefined;
121
+ }
100
122
  }
101
123
  //# sourceMappingURL=settings-storage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings-storage.js","sourceRoot":"","sources":["../../src/core/settings-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,MAAM,OAAO,mBAAmB;IAM/B,YAAY,GAAW,EAAE,QAAgB,EAAE,OAAqE;QAC/G,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;QACrC,MAAM,gBAAgB,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC/C,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC;QAClE,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,WAAW,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;QAC/E,IAAI,CAAC,eAAe,GAAG,CAAC,OAAO,EAAE,eAAe,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC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eFileSync } from \"fs\";\nimport { dirname, join } from \"path\";\nimport lockfile from \"proper-lockfile\";\nimport { CONFIG_DIR_NAME } from \"../config.ts\";\nimport { normalizePath, resolvePath } from \"../utils/paths.ts\";\nimport { parseJsonFileContent } from \"../utils/json.ts\";\nimport { deepMergeSettings } from \"./settings-merge.ts\";\nimport type { Settings, SettingsScope, SettingsStorage } from \"./settings-types.ts\";\n\nexport class FileSettingsStorage implements SettingsStorage {\n\tprivate globalSettingsPath: string;\n\tprivate projectSettingsPath: string;\n\tprivate globalReadPaths: string[];\n\tprivate projectReadPaths: string[];\n\n\tconstructor(cwd: string, agentDir: string, options?: { globalReadPaths?: string[]; projectReadPaths?: string[] }) {\n\t\tconst resolvedCwd = resolvePath(cwd);\n\t\tconst resolvedAgentDir = resolvePath(agentDir);\n\t\tthis.globalSettingsPath = join(resolvedAgentDir, \"settings.json\");\n\t\tthis.projectSettingsPath = join(resolvedCwd, CONFIG_DIR_NAME, \"settings.json\");\n\t\tthis.globalReadPaths = (options?.globalReadPaths ?? [this.globalSettingsPath]).map((path) => normalizePath(path));\n\t\tthis.projectReadPaths = (options?.projectReadPaths ?? [this.projectSettingsPath]).map((path) => normalizePath(path));\n\t}\n\n\tprivate acquireLockSyncWithRetry(path: string): () => void {\n\t\tconst maxAttempts = 10;\n\t\tconst delayMs = 20;\n\t\tlet lastError: unknown;\n\n\t\tfor (let attempt = 1; attempt <= maxAttempts; attempt++) {\n\t\t\ttry {\n\t\t\t\treturn lockfile.lockSync(path, { realpath: false });\n\t\t\t} catch (error) {\n\t\t\t\tconst code =\n\t\t\t\t\ttypeof error === \"object\" && error !== null && \"code\" in error\n\t\t\t\t\t\t? String((error as { code?: unknown }).code)\n\t\t\t\t\t\t: undefined;\n\t\t\t\tif (code !== \"ELOCKED\" || attempt === maxAttempts) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t\tlastError = error;\n\t\t\t\tconst start = Date.now();\n\t\t\t\twhile (Date.now() - start < delayMs) {\n\t\t\t\t\t// Sleep synchronously to avoid changing callers to async.\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthrow (lastError as Error) ?? new Error(\"Failed to acquire settings lock\");\n\t}\n\n\tprivate readMergedSettings(readPaths: string[]): string | undefined {\n\t\tlet merged: Settings = {};\n\t\tlet found = false;\n\t\tfor (let i = readPaths.length - 1; i >= 0; i--) {\n\t\t\tconst readPath = readPaths[i]!;\n\t\t\tif (!existsSync(readPath)) continue;\n\t\t\tconst parsed = parseJsonFileContent(readFileSync(readPath, \"utf-8\")) as Settings;\n\t\t\tmerged = deepMergeSettings(merged, parsed);\n\t\t\tfound = true;\n\t\t}\n\t\treturn found ? JSON.stringify(merged, null, 2) : undefined;\n\t}\n\n\twithLock(scope: SettingsScope, fn: (current: string | undefined) => string | undefined): void {\n\t\tconst path = scope === \"global\" ? this.globalSettingsPath : this.projectSettingsPath;\n\t\tconst readPaths = scope === \"global\" ? this.globalReadPaths : this.projectReadPaths;\n\t\tconst dir = dirname(path);\n\n\t\tlet release: (() => void) | undefined;\n\t\ttry {\n\t\t\t// Only create directory and lock if the primary file exists or we need to write.\n\t\t\tconst fileExists = existsSync(path);\n\t\t\tif (fileExists) {\n\t\t\t\trelease = this.acquireLockSyncWithRetry(path);\n\t\t\t}\n\t\t\tconst current = this.readMergedSettings(readPaths);\n\t\t\tconst next = fn(current);\n\n\t\t\tif (next !== undefined) {\n\t\t\t\t// Only create directory when we actually need to write.\n\t\t\t\tif (!existsSync(dir)) {\n\t\t\t\t\tmkdirSync(dir, { recursive: true });\n\t\t\t\t}\n\t\t\t\tif (!release) {\n\t\t\t\t\tif (!existsSync(path)) writeFileSync(path, \"{}\", \"utf-8\");\n\t\t\t\t\trelease = this.acquireLockSyncWithRetry(path);\n\t\t\t\t}\n\t\t\t\twriteFileSync(path, next, \"utf-8\");\n\t\t\t}\n\t\t} finally {\n\t\t\tif (release) {\n\t\t\t\trelease();\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport class InMemorySettingsStorage implements SettingsStorage {\n\tprivate global: string | undefined;\n\tprivate project: string | undefined;\n\n\twithLock(scope: SettingsScope, fn: (current: string | undefined) => string | undefined): void {\n\t\tconst current = scope === \"global\" ? this.global : this.project;\n\t\tconst next = fn(current);\n\t\tif (next !== undefined) {\n\t\t\tif (scope === \"global\") {\n\t\t\t\tthis.global = next;\n\t\t\t} else {\n\t\t\t\tthis.project = next;\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"settings-storage.js","sourceRoot":"","sources":["../../src/core/settings-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,MAAM,OAAO,mBAAmB;IAM/B,YAAY,GAAW,EAAE,QAAgB,EAAE,OAAqE;QAC/G,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;QACrC,MAAM,gBAAgB,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC/C,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC;QAClE,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,WAAW,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;QAC/E,IAAI,CAAC,eAAe,GAAG,CAAC,OAAO,EAAE,eAAe,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,C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gBAC/C,CAAC;gBACD,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;YACpC,CAAC;QACF,CAAC;gBAAS,CAAC;YACV,IAAI,OAAO,EAAE,CAAC;gBACb,OAAO,EAAE,CAAC;YACX,CAAC;QACF,CAAC;IACF,CAAC;CACD;AAED,MAAM,OAAO,uBAAuB;IAInC,QAAQ,CAAC,KAAoB,EAAE,EAAuD;QACrF,MAAM,OAAO,GAAG,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QAChE,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC;QACzB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACxB,IAAI,KAAK,KAAK,QAAQ,EAAE,CAAC;gBACxB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YACpB,CAAC;iBAAM,CAAC;gBACP,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACrB,CAAC;QACF,CAAC;IACF,CAAC;IAED,cAAc,CAAC,KAAoB,EAAE,KAAqB;QACzD,MAAM,GAAG,GAAG,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAa,CAAC;QACrD,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IACtF,CAAC;CACD","sourcesContent":["import { existsSync, mkdirSync, readFileSync, writeFileSync } from \"fs\";\nimport { dirname, join } from \"path\";\nimport lockfile from \"proper-lockfile\";\nimport { CONFIG_DIR_NAME } from \"../config.ts\";\nimport { normalizePath, resolvePath } from \"../utils/paths.ts\";\nimport { parseJsonFileContent } from \"../utils/json.ts\";\nimport { deepMergeSettings } from \"./settings-merge.ts\";\nimport type { Settings, SettingsFieldOrigin, SettingsScope, SettingsStorage } from \"./settings-types.ts\";\n\nexport class FileSettingsStorage implements SettingsStorage {\n\tprivate globalSettingsPath: string;\n\tprivate projectSettingsPath: string;\n\tprivate globalReadPaths: string[];\n\tprivate projectReadPaths: string[];\n\n\tconstructor(cwd: string, agentDir: string, options?: { globalReadPaths?: string[]; projectReadPaths?: string[] }) {\n\t\tconst resolvedCwd = resolvePath(cwd);\n\t\tconst resolvedAgentDir = resolvePath(agentDir);\n\t\tthis.globalSettingsPath = join(resolvedAgentDir, \"settings.json\");\n\t\tthis.projectSettingsPath = join(resolvedCwd, CONFIG_DIR_NAME, \"settings.json\");\n\t\tthis.globalReadPaths = (options?.globalReadPaths ?? [this.globalSettingsPath]).map((path) => normalizePath(path));\n\t\tthis.projectReadPaths = (options?.projectReadPaths ?? [this.projectSettingsPath]).map((path) => normalizePath(path));\n\t}\n\n\tgetFieldOrigin(scope: SettingsScope, field: keyof Settings): SettingsFieldOrigin | undefined {\n\t\tconst readPaths = scope === \"global\" ? this.globalReadPaths : this.projectReadPaths;\n\t\tfor (const [index, readPath] of readPaths.entries()) {\n\t\t\tif (!existsSync(readPath)) continue;\n\t\t\ttry {\n\t\t\t\tconst parsed = parseJsonFileContent(readFileSync(readPath, \"utf-8\")) as Settings;\n\t\t\t\tif (Object.prototype.hasOwnProperty.call(parsed, field)) {\n\t\t\t\t\treturn index === 0 ? \"primary\" : \"legacy\";\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate acquireLockSyncWithRetry(path: string): () => void {\n\t\tconst maxAttempts = 10;\n\t\tconst delayMs = 20;\n\t\tlet lastError: unknown;\n\n\t\tfor (let attempt = 1; attempt <= maxAttempts; attempt++) {\n\t\t\ttry {\n\t\t\t\treturn lockfile.lockSync(path, { realpath: false });\n\t\t\t} catch (error) {\n\t\t\t\tconst code =\n\t\t\t\t\ttypeof error === \"object\" && error !== null && \"code\" in error\n\t\t\t\t\t\t? String((error as { code?: unknown }).code)\n\t\t\t\t\t\t: undefined;\n\t\t\t\tif (code !== \"ELOCKED\" || attempt === maxAttempts) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t\tlastError = error;\n\t\t\t\tconst start = Date.now();\n\t\t\t\twhile (Date.now() - start < delayMs) {\n\t\t\t\t\t// Sleep synchronously to avoid changing callers to async.\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthrow (lastError as Error) ?? new Error(\"Failed to acquire settings lock\");\n\t}\n\n\tprivate readMergedSettings(readPaths: string[]): string | undefined {\n\t\tlet merged: Settings = {};\n\t\tlet found = false;\n\t\tfor (let i = readPaths.length - 1; i >= 0; i--) {\n\t\t\tconst readPath = readPaths[i]!;\n\t\t\tif (!existsSync(readPath)) continue;\n\t\t\tconst parsed = parseJsonFileContent(readFileSync(readPath, \"utf-8\")) as Settings;\n\t\t\tmerged = deepMergeSettings(merged, parsed);\n\t\t\tfound = true;\n\t\t}\n\t\treturn found ? JSON.stringify(merged, null, 2) : undefined;\n\t}\n\n\twithLock(scope: SettingsScope, fn: (current: string | undefined) => string | undefined): void {\n\t\tconst path = scope === \"global\" ? this.globalSettingsPath : this.projectSettingsPath;\n\t\tconst readPaths = scope === \"global\" ? this.globalReadPaths : this.projectReadPaths;\n\t\tconst dir = dirname(path);\n\n\t\tlet release: (() => void) | undefined;\n\t\ttry {\n\t\t\t// Only create directory and lock if the primary file exists or we need to write.\n\t\t\tconst fileExists = existsSync(path);\n\t\t\tif (fileExists) {\n\t\t\t\trelease = this.acquireLockSyncWithRetry(path);\n\t\t\t}\n\t\t\tconst current = this.readMergedSettings(readPaths);\n\t\t\tconst next = fn(current);\n\n\t\t\tif (next !== undefined) {\n\t\t\t\t// Only create directory when we actually need to write.\n\t\t\t\tif (!existsSync(dir)) {\n\t\t\t\t\tmkdirSync(dir, { recursive: true });\n\t\t\t\t}\n\t\t\t\tif (!release) {\n\t\t\t\t\tif (!existsSync(path)) writeFileSync(path, \"{}\", \"utf-8\");\n\t\t\t\t\trelease = this.acquireLockSyncWithRetry(path);\n\t\t\t\t}\n\t\t\t\twriteFileSync(path, next, \"utf-8\");\n\t\t\t}\n\t\t} finally {\n\t\t\tif (release) {\n\t\t\t\trelease();\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport class InMemorySettingsStorage implements SettingsStorage {\n\tprivate global: string | undefined;\n\tprivate project: string | undefined;\n\n\twithLock(scope: SettingsScope, fn: (current: string | undefined) => string | undefined): void {\n\t\tconst current = scope === \"global\" ? this.global : this.project;\n\t\tconst next = fn(current);\n\t\tif (next !== undefined) {\n\t\t\tif (scope === \"global\") {\n\t\t\t\tthis.global = next;\n\t\t\t} else {\n\t\t\t\tthis.project = next;\n\t\t\t}\n\t\t}\n\t}\n\n\tgetFieldOrigin(scope: SettingsScope, field: keyof Settings): SettingsFieldOrigin | undefined {\n\t\tconst raw = scope === \"global\" ? this.global : this.project;\n\t\tconst settings = JSON.parse(raw ?? \"{}\") as Settings;\n\t\treturn Object.prototype.hasOwnProperty.call(settings, field) ? \"primary\" : undefined;\n\t}\n}\n"]}
@@ -53,8 +53,6 @@ export interface CodexFastModeSettings {
53
53
  }
54
54
  export type DefaultProjectTrust = "ask" | "always" | "never";
55
55
  export type TransportSetting = Transport;
56
- export type ContextWindowSetting = number | string;
57
- export type ModelContextWindowSettings = Record<string, ContextWindowSetting>;
58
56
  /**
59
57
  * Package source for npm/git packages.
60
58
  * - String form: load all resources from the package
@@ -81,8 +79,6 @@ export interface Settings {
81
79
  defaultModel?: string;
82
80
  defaultThinkingLevel?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
83
81
  fallbackModels?: string[];
84
- defaultContextWindow?: ContextWindowSetting;
85
- defaultContextWindows?: ModelContextWindowSettings;
86
82
  transport?: TransportSetting;
87
83
  steeringMode?: "all" | "one-at-a-time";
88
84
  followUpMode?: "all" | "one-at-a-time";
@@ -133,8 +129,10 @@ export type SettingsScope = "global" | "project";
133
129
  export interface SettingsManagerCreateOptions {
134
130
  projectTrusted?: boolean;
135
131
  }
132
+ export type SettingsFieldOrigin = "primary" | "legacy";
136
133
  export interface SettingsStorage {
137
134
  withLock(scope: SettingsScope, fn: (current: string | undefined) => string | undefined): void;
135
+ getFieldOrigin?(scope: SettingsScope, field: keyof Settings): SettingsFieldOrigin | undefined;
138
136
  }
139
137
  export interface SettingsError {
140
138
  scope: SettingsScope;
@@ -1 +1 @@
1
- {"version":3,"file":"settings-types.d.ts","sourceRoot":"","sources":["../../src/core/settings-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,WAAW,kBAAkB;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,qBAAqB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,qBAAqB,CAAC;CACjC;AAED,MAAM,WAAW,gBAAgB;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAA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Q,CAAC;AAEvD,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAC9F,cAAc,CAAC,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,QAAQ,GAAG,mBAAmB,GAAG,SAAS,CAAC;CAC9F;AAED,MAAM,WAAW,aAAa;IAC7B,KAAK,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;CACb"}
@@ -1 +1 @@
1
- {"version":3,"file":"settings-types.js","sourceRoot":"","sources":["../../src/core/settings-types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Transport } from \"@earendil-works/pi-ai/compat\";\n\nexport interface CompactionSettings {\n\tenabled?: boolean; // default: true\n\treserveTokens?: number; // default: 16384\n\tcompression_ratio?: number; // default: 0.5 (fraction of compactable context to keep)\n\tpreserve_recent?: number; // default: 2 (recent context-eligible messages to keep)\n\tquery?: string; // default: auto-detected from session context\n}\n\nexport interface BranchSummarySettings {\n\treserveTokens?: number; // default: 16384 (tokens reserved for prompt + LLM response)\n\tskipPrompt?: boolean; // default: false - when true, skips \"Summarize branch?\" prompt and defaults to no summary\n}\n\nexport interface ProviderRetrySettings {\n\ttimeoutMs?: number; // SDK/provider request timeout in milliseconds\n\tmaxRetries?: number; // SDK/provider retry attempts\n\tmaxRetryDelayMs?: number; // default: 60000 (max server-requested delay before failing)\n}\n\nexport interface RetrySettings {\n\tenabled?: boolean; // default: true\n\tmaxRetries?: number; // default: 3\n\tbaseDelayMs?: number; // default: 2000 (exponential backoff: 2s, 4s, 8s)\n\tprovider?: ProviderRetrySettings;\n}\n\nexport interface TerminalSettings {\n\tshowImages?: boolean; // default: true (only relevant if terminal supports images)\n\timageWidthCells?: number; // default: 60 (preferred inline image width in terminal cells)\n\tclearOnShrink?: boolean; // default: false (clear empty rows when content shrinks)\n\tshowTerminalProgress?: boolean; // default: false (OSC 9;4 terminal progress indicators)\n}\n\nexport interface ImageSettings {\n\tautoResize?: boolean; // default: true (resize images to 2000x2000 max for better model compatibility)\n\tblockImages?: boolean; // default: false - when true, prevents all images from being sent to LLM providers\n}\n\nexport interface SearchSettings { contextBefore?: number; contextAfter?: number }\nexport interface ThinkingBudgetsSettings {\n\tminimal?: number;\n\tlow?: number;\n\tmedium?: number;\n\thigh?: number;\n}\n\nexport interface MarkdownSettings {\n\tcodeBlockIndent?: string; // default: \" \"\n}\n\nexport interface WarningSettings {\n\tanthropicExtraUsage?: boolean; // default: true\n}\n\nexport interface CodexFastModeSettings {\n\tchat?: boolean; // default: false\n\tworkflow?: boolean; // default: false\n}\n\nexport type DefaultProjectTrust = \"ask\" | \"always\" | \"never\";\n\nexport type TransportSetting = Transport;\n\nexport type ContextWindowSetting = number | string;\nexport type ModelContextWindowSettings = Record<string, ContextWindowSetting>;\n\n/**\n * Package source for npm/git packages.\n * - String form: load all resources from the package\n * - Object form: filter which resources to load\n * - autoload=false: start empty and apply only explicit resource patterns\n */\nexport type PackageSource =\n\t| string\n\t| {\n\t\t\tsource: string;\n\t\t\tautoload?: boolean;\n\t\t\textensions?: string[];\n\t\t\tskills?: string[];\n\t\t\tprompts?: string[];\n\t\t\tthemes?: string[];\n\t\t\tworkflows?: string[];\n\t };\n\nexport interface BashInterceptorSettings {\n\tenabled?: boolean; // default: false\n}\n\nexport interface Settings {\n\tlastChangelogVersion?: string;\n\tfirstRunOnboardingStartedVersion?: string;\n\tonboardedVersion?: string;\n\tdefaultProvider?: string;\n\tdefaultModel?: string;\n\tdefaultThinkingLevel?: \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\";\n\tfallbackModels?: string[]; // Ordered main-chat fallback models, optionally suffixed with :thinkingLevel\n\tdefaultContextWindow?: ContextWindowSetting; // Optional global fallback; model picker writes defaultContextWindows instead.\n\tdefaultContextWindows?: ModelContextWindowSettings; // Per-model defaults keyed as \"provider/modelId\".\n\ttransport?: TransportSetting; // default: \"auto\"\n\tsteeringMode?: \"all\" | \"one-at-a-time\";\n\tfollowUpMode?: \"all\" | \"one-at-a-time\";\n\ttheme?: string;\n\tenableAnalytics?: boolean; // storage only; no analytics transmission is performed\n\ttrackingId?: string; // stable UUID generated on first analytics opt-in\n\tshowCacheMissNotices?: boolean; // default: false\n\tcompaction?: CompactionSettings;\n\tbranchSummary?: BranchSummarySettings;\n\tretry?: RetrySettings;\n\thideThinkingBlock?: boolean;\n\texternalEditor?: string; // Command for Ctrl+G external editor; takes precedence over VISUAL/EDITOR\n\tshellPath?: string; // Custom shell path (e.g., for Cygwin users on Windows)\n\tquietStartup?: boolean;\n\tdefaultProjectTrust?: DefaultProjectTrust; // default: \"ask\"; global setting only\n\tshellCommandPrefix?: string; // Prefix prepended to every bash command (e.g., \"shopt -s expand_aliases\" for alias support)\n\tbashInterceptor?: BashInterceptorSettings; // default: disabled; when enabled, user_bash handlers can intercept bash tool execution\n\tsearch?: SearchSettings; // Context lines for search results; defaults: before=1, after=3\n\tnpmCommand?: string[]; // Command used for npm package lookup/install operations, argv-style (e.g., [\"mise\", \"exec\", \"node@20\", \"--\", \"npm\"])\n\tcollapseChangelog?: boolean; // Show condensed changelog after update (use /changelog for full)\n\tenableInstallTelemetry?: boolean; // default: true - anonymous version/update ping after changelog-detected updates\n\tpackages?: PackageSource[]; // Array of npm/git package sources (string or object with filtering)\n\textensions?: string[]; // Array of local extension file paths or directories\n\tskills?: string[]; // Array of local skill file paths or directories\n\tprompts?: string[]; // Array of local prompt template paths or directories\n\tthemes?: string[]; // Array of local theme file paths or directories\n\tworkflows?: string[]; // Array of local workflow file paths or directories\n\tenableSkillCommands?: boolean; // default: true - register skills as /skill:name commands\n\tterminal?: TerminalSettings;\n\timages?: ImageSettings;\n\tenabledModels?: string[]; // Model patterns for cycling (same format as --models CLI flag)\n\tdoubleEscapeAction?: \"fork\" | \"tree\" | \"none\"; // Action for double-escape with empty editor (default: \"tree\")\n\ttreeFilterMode?: \"default\" | \"no-tools\" | \"user-only\" | \"labeled-only\" | \"all\"; // Default filter when opening /tree\n\tthinkingBudgets?: ThinkingBudgetsSettings; // Custom token budgets for thinking levels\n\teditorPaddingX?: number; // Horizontal padding for input editor (default: 0)\n\toutputPad?: 0 | 1; // Horizontal padding for chat message output (default: 1)\n\tautocompleteMaxVisible?: number; // Max visible items in autocomplete dropdown (default: 5)\n\tshowHardwareCursor?: boolean; // Show terminal cursor while still positioning it for IME\n\tmarkdown?: MarkdownSettings;\n\twarnings?: WarningSettings;\n\tcodexFastMode?: CodexFastModeSettings; // OpenAI priority service tier toggles for chat/workflow\n\tsessionDir?: string; // Custom session storage directory (same format as --session-dir CLI flag)\n\thttpProxy?: string; // Proxy URL applied as HTTP_PROXY and HTTPS_PROXY; global setting only\n\thttpIdleTimeoutMs?: number | string; // HTTP idle timeout; 0 or \"disabled\" disables it\n\twebsocketConnectTimeoutMs?: number | string; // WebSocket connect timeout; 0 or \"disabled\" disables it\n}\n\nexport type SettingsScope = \"global\" | \"project\";\n\nexport interface SettingsManagerCreateOptions {\n\tprojectTrusted?: boolean;\n}\n\nexport interface SettingsStorage {\n\twithLock(scope: SettingsScope, fn: (current: string | undefined) => string | undefined): void;\n}\n\nexport interface SettingsError {\n\tscope: SettingsScope;\n\terror: Error;\n}\n"]}
1
+ {"version":3,"file":"settings-types.js","sourceRoot":"","sources":["../../src/core/settings-types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Transport } from \"@earendil-works/pi-ai/compat\";\n\nexport interface CompactionSettings {\n\tenabled?: boolean; // default: true\n\treserveTokens?: number; // default: 16384\n\tcompression_ratio?: number; // default: 0.5 (fraction of compactable context to keep)\n\tpreserve_recent?: number; // default: 2 (recent context-eligible messages to keep)\n\tquery?: string; // default: auto-detected from session context\n}\n\nexport interface BranchSummarySettings {\n\treserveTokens?: number; // default: 16384 (tokens reserved for prompt + LLM response)\n\tskipPrompt?: boolean; // default: false - when true, skips \"Summarize branch?\" prompt and defaults to no summary\n}\n\nexport interface ProviderRetrySettings {\n\ttimeoutMs?: number; // SDK/provider request timeout in milliseconds\n\tmaxRetries?: number; // SDK/provider retry attempts\n\tmaxRetryDelayMs?: number; // default: 60000 (max server-requested delay before failing)\n}\n\nexport interface RetrySettings {\n\tenabled?: boolean; // default: true\n\tmaxRetries?: number; // default: 3\n\tbaseDelayMs?: number; // default: 2000 (exponential backoff: 2s, 4s, 8s)\n\tprovider?: ProviderRetrySettings;\n}\n\nexport interface TerminalSettings {\n\tshowImages?: boolean; // default: true (only relevant if terminal supports images)\n\timageWidthCells?: number; // default: 60 (preferred inline image width in terminal cells)\n\tclearOnShrink?: boolean; // default: false (clear empty rows when content shrinks)\n\tshowTerminalProgress?: boolean; // default: false (OSC 9;4 terminal progress indicators)\n}\n\nexport interface ImageSettings {\n\tautoResize?: boolean; // default: true (resize images to 2000x2000 max for better model compatibility)\n\tblockImages?: boolean; // default: false - when true, prevents all images from being sent to LLM providers\n}\n\nexport interface SearchSettings { contextBefore?: number; contextAfter?: number }\nexport interface ThinkingBudgetsSettings {\n\tminimal?: number;\n\tlow?: number;\n\tmedium?: number;\n\thigh?: number;\n}\n\nexport interface MarkdownSettings {\n\tcodeBlockIndent?: string; // default: \" \"\n}\n\nexport interface WarningSettings {\n\tanthropicExtraUsage?: boolean; // default: true\n}\n\nexport interface CodexFastModeSettings {\n\tchat?: boolean; // default: false\n\tworkflow?: boolean; // default: false\n}\n\nexport type DefaultProjectTrust = \"ask\" | \"always\" | \"never\";\n\nexport type TransportSetting = Transport;\n\n\n/**\n * Package source for npm/git packages.\n * - String form: load all resources from the package\n * - Object form: filter which resources to load\n * - autoload=false: start empty and apply only explicit resource patterns\n */\nexport type PackageSource =\n\t| string\n\t| {\n\t\t\tsource: string;\n\t\t\tautoload?: boolean;\n\t\t\textensions?: string[];\n\t\t\tskills?: string[];\n\t\t\tprompts?: string[];\n\t\t\tthemes?: string[];\n\t\t\tworkflows?: string[];\n\t };\n\nexport interface BashInterceptorSettings {\n\tenabled?: boolean; // default: false\n}\n\nexport interface Settings {\n\tlastChangelogVersion?: string;\n\tfirstRunOnboardingStartedVersion?: string;\n\tonboardedVersion?: string;\n\tdefaultProvider?: string;\n\tdefaultModel?: string;\n\tdefaultThinkingLevel?: \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\";\n\tfallbackModels?: string[]; // Ordered main-chat fallback models, optionally suffixed with :thinkingLevel\n\ttransport?: TransportSetting; // default: \"auto\"\n\tsteeringMode?: \"all\" | \"one-at-a-time\";\n\tfollowUpMode?: \"all\" | \"one-at-a-time\";\n\ttheme?: string;\n\tenableAnalytics?: boolean; // storage only; no analytics transmission is performed\n\ttrackingId?: string; // stable UUID generated on first analytics opt-in\n\tshowCacheMissNotices?: boolean; // default: false\n\tcompaction?: CompactionSettings;\n\tbranchSummary?: BranchSummarySettings;\n\tretry?: RetrySettings;\n\thideThinkingBlock?: boolean;\n\texternalEditor?: string; // Command for Ctrl+G external editor; takes precedence over VISUAL/EDITOR\n\tshellPath?: string; // Custom shell path (e.g., for Cygwin users on Windows)\n\tquietStartup?: boolean;\n\tdefaultProjectTrust?: DefaultProjectTrust; // default: \"ask\"; global setting only\n\tshellCommandPrefix?: string; // Prefix prepended to every bash command (e.g., \"shopt -s expand_aliases\" for alias support)\n\tbashInterceptor?: BashInterceptorSettings; // default: disabled; when enabled, user_bash handlers can intercept bash tool execution\n\tsearch?: SearchSettings; // Context lines for search results; defaults: before=1, after=3\n\tnpmCommand?: string[]; // Command used for npm package lookup/install operations, argv-style (e.g., [\"mise\", \"exec\", \"node@20\", \"--\", \"npm\"])\n\tcollapseChangelog?: boolean; // Show condensed changelog after update (use /changelog for full)\n\tenableInstallTelemetry?: boolean; // default: true - anonymous version/update ping after changelog-detected updates\n\tpackages?: PackageSource[]; // Array of npm/git package sources (string or object with filtering)\n\textensions?: string[]; // Array of local extension file paths or directories\n\tskills?: string[]; // Array of local skill file paths or directories\n\tprompts?: string[]; // Array of local prompt template paths or directories\n\tthemes?: string[]; // Array of local theme file paths or directories\n\tworkflows?: string[]; // Array of local workflow file paths or directories\n\tenableSkillCommands?: boolean; // default: true - register skills as /skill:name commands\n\tterminal?: TerminalSettings;\n\timages?: ImageSettings;\n\tenabledModels?: string[]; // Model patterns for cycling (same format as --models CLI flag)\n\tdoubleEscapeAction?: \"fork\" | \"tree\" | \"none\"; // Action for double-escape with empty editor (default: \"tree\")\n\ttreeFilterMode?: \"default\" | \"no-tools\" | \"user-only\" | \"labeled-only\" | \"all\"; // Default filter when opening /tree\n\tthinkingBudgets?: ThinkingBudgetsSettings; // Custom token budgets for thinking levels\n\teditorPaddingX?: number; // Horizontal padding for input editor (default: 0)\n\toutputPad?: 0 | 1; // Horizontal padding for chat message output (default: 1)\n\tautocompleteMaxVisible?: number; // Max visible items in autocomplete dropdown (default: 5)\n\tshowHardwareCursor?: boolean; // Show terminal cursor while still positioning it for IME\n\tmarkdown?: MarkdownSettings;\n\twarnings?: WarningSettings;\n\tcodexFastMode?: CodexFastModeSettings; // OpenAI priority service tier toggles for chat/workflow\n\tsessionDir?: string; // Custom session storage directory (same format as --session-dir CLI flag)\n\thttpProxy?: string; // Proxy URL applied as HTTP_PROXY and HTTPS_PROXY; global setting only\n\thttpIdleTimeoutMs?: number | string; // HTTP idle timeout; 0 or \"disabled\" disables it\n\twebsocketConnectTimeoutMs?: number | string; // WebSocket connect timeout; 0 or \"disabled\" disables it\n}\n\nexport type SettingsScope = \"global\" | \"project\";\n\nexport interface SettingsManagerCreateOptions {\n\tprojectTrusted?: boolean;\n}\n\nexport type SettingsFieldOrigin = \"primary\" | \"legacy\";\n\nexport interface SettingsStorage {\n\twithLock(scope: SettingsScope, fn: (current: string | undefined) => string | undefined): void;\n\tgetFieldOrigin?(scope: SettingsScope, field: keyof Settings): SettingsFieldOrigin | undefined;\n}\n\nexport interface SettingsError {\n\tscope: SettingsScope;\n\terror: Error;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"slash-commands.d.ts","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAO/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,UAAU,EAAE,UAAU,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sBAAsB,CAAC,EAAE,CACxB,cAAc,EAAE,MAAM,KAClB,gBAAgB,EAAE,GAAG,IAAI,GAAG,OAAO,CAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC,CAAC;CACpE;AA4FD,wBAAgB,qCAAqC,CAAC,cAAc,EAAE,MAAM,GAAG,gBAAgB,EAAE,GAAG,IAAI,CAgDvG;AAED,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,mBAAmB,CA8BrE,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,aAAa,CAAC,mBAAmB,CAkB/E,CAAC"}
1
+ {"version":3,"file":"slash-commands.d.ts","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAO/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,UAAU,EAAE,UAAU,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sBAAsB,CAAC,EAAE,CACxB,cAAc,EAAE,MAAM,KAClB,gBAAgB,EAAE,GAAG,IAAI,GAAG,OAAO,CAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC,CAAC;CACpE;AA0ID,wBAAgB,qCAAqC,CAAC,cAAc,EAAE,MAAM,GAAG,gBAAgB,EAAE,GAAG,IAAI,CAgDvG;AAED,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,mBAAmB,CA8BrE,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,aAAa,CAAC,mBAAmB,CAkB/E,CAAC"}
@@ -14,45 +14,91 @@ const WORKFLOW_ADMIN_COMPLETIONS = [
14
14
  ];
15
15
  const BUNDLED_WORKFLOW_COMPLETION_METADATA = [
16
16
  {
17
- name: "deep-research-codebase",
18
- description: "Heavy research for tasks requiring comprehensive, whole-repository context.",
17
+ name: "adversarial-verification",
18
+ description: "Produce a candidate, challenge it with fresh-context rubric-based verifiers, and reduce their evidence through a bounded repair loop.",
19
19
  inputs: {
20
- prompt: { description: "Research question or investigation focus for the codebase.", kind: "string" },
21
- max_partitions: { description: "Maximum number of codebase partitions to explore in parallel.", kind: "number" },
22
- max_concurrency: { description: "Maximum number of workflow stages to run concurrently during deep research.", kind: "number" },
20
+ task: { description: "Task whose candidate result must be independently verified.", kind: "string" },
21
+ verifier_count: { description: "Number of independent verifiers per review round.", kind: "number" },
22
+ max_repairs: { description: "Maximum candidate repair rounds before rejection.", kind: "number" },
23
+ },
24
+ },
25
+ {
26
+ name: "classify-and-act",
27
+ description: "Classify a task with structured confidence, route deterministically to an isolated category action, and ask for human selection when confidence is low.",
28
+ inputs: {
29
+ prompt: { description: "Task to classify and execute.", kind: "string" },
30
+ categories: { description: "Ordered action categories available to the classifier and fallback chooser." },
31
+ confidence_threshold: { description: "Minimum structured confidence required to route without human selection.", kind: "number" },
32
+ },
33
+ },
34
+ {
35
+ name: "fan-out-and-synthesize",
36
+ description: "Partition a task, run bounded independent artifact branches, then synthesize all evidence at an explicit barrier.",
37
+ inputs: {
38
+ prompt: { description: "Task to partition, investigate, and synthesize.", kind: "string" },
39
+ max_branches: { description: "Maximum number of independent partitions produced and executed.", kind: "number" },
40
+ max_concurrency: { description: "Maximum number of branch agents running concurrently.", kind: "number" },
41
+ },
42
+ },
43
+ {
44
+ name: "generate-and-filter",
45
+ description: "Generate more independent candidates than needed, deduplicate and filter them by rubric, optionally judge them, and return a parent-consumable shortlist.",
46
+ inputs: {
47
+ prompt: { description: "Prompt for candidate generation and selection.", kind: "string" },
48
+ num_candidates: { description: "Number of independent candidates to generate.", kind: "number" },
49
+ shortlist_size: { description: "Maximum number of candidates in the final shortlist.", kind: "number" },
50
+ use_judge: { description: "Whether an independent judge reviews the filtered shortlist.", kind: "boolean" },
51
+ max_concurrency: { description: "Maximum simultaneous generator stages.", kind: "number" },
23
52
  },
24
53
  },
25
54
  {
26
55
  name: "goal",
27
- description: "Goal Runner workflow with bounded sub-agent orchestration turns, acceptance criteria, ledger artifacts, reviewers, and reducer-gated completion.",
56
+ description: "Goal Runner workflow with bounded sub-agent orchestration turns, immutable acceptance criteria, ledger artifacts, parallel reviewers, and reducer-gated completion. When launching follow-up goal runs from review findings, pass the ORIGINAL task text as acceptance_criteria so deltas cannot drift from the literal contract. If the task includes submitting a pull request (or MR/review), remove that final action from the objective text and set create_pr=true instead when preparing the workflow inputs.",
28
57
  inputs: {
29
- objective: { description: "The objective or delta for this Goal Runner workflow run.", kind: "string" },
30
- acceptance_criteria: { description: "Original immutable task contract this run must remain consistent with.", kind: "string" },
58
+ objective: { description: "The objective or delta for this Goal Runner workflow run. Do not include PR/MR submission instructions here; strip them from the task text and request them via create_pr=true instead.", kind: "string" },
59
+ acceptance_criteria: { description: "Original immutable task contract this run must remain consistent with. Defaults to objective. Orchestrators launching follow-up runs from reviewer findings should pass the ORIGINAL task text here.", kind: "string" },
31
60
  max_turns: { description: "Maximum orchestrator/review turns before Goal Runner stops as needs_human.", kind: "number" },
32
- base_branch: { description: "Optional branch reviewers compare the current code delta against.", kind: "string" },
33
- git_worktree_dir: { description: "Optional Git worktree path.", kind: "string" },
34
- create_pr: { description: "Whether to run the final pull-request creation stage after approval.", kind: "boolean" },
61
+ base_branch: { description: "Optional branch reviewers compare the current code delta against (default origin/main).", kind: "string" },
62
+ git_worktree_dir: { description: "Optional Git worktree path. Leave at the default unless the user explicitly requested worktree isolation — stages never create git worktrees on their own. Must start inside a Git repo; absolute paths are used as-is, relative paths resolve from the repo root, existing Git worktrees from the invoking repository are reused/shared as-is, and missing paths are created from base_branch.", kind: "string" },
63
+ create_pr: { description: "Whether to run the final pull-request creation stage after reviewer/reducer approval. Defaults to false; prompt text alone does not opt in. If the task asks to submit a PR/MR/review, remove that from the objective text and set this to true — only the final stage then attempts provider-appropriate PR/MR/review creation after Goal completes.", kind: "boolean" },
64
+ },
65
+ },
66
+ {
67
+ name: "loop-until-done",
68
+ description: "Repeat evidence-producing work and independent completion evaluation against a durable ledger until done or an inspectable iteration-limit failure.",
69
+ inputs: {
70
+ prompt: { description: "Objective whose explicit completion condition controls the bounded loop.", kind: "string" },
71
+ max_iterations: { description: "Maximum work/evaluation iterations before returning an inspectable failed status (1-20).", kind: "number" },
35
72
  },
36
73
  },
37
74
  {
38
75
  name: "open-claude-design",
39
- description: "AI-powered design workflow: discovery, reference research, HTML generation, refinement, and handoff.",
76
+ description: "AI-powered design workflow: combined discovery/init → design-system/reference research → curated reference discovery → HTML generation → live-driven refinement → rich HTML handoff. The discovery stage asks what to build, the output type, and which references to emulate, then runs impeccable init for PRODUCT.md/DESIGN.md (references take precedence over project context). The user iteratively reviews the generated HTML.",
40
77
  inputs: {
41
- prompt: { description: "What to design, such as a dashboard, page, component, or prototype.", kind: "string" },
42
- discover_references: { description: "Discover current reference designs and feed them to generation.", kind: "boolean" },
43
- max_refinements: { description: "Maximum generate/user-feedback loop iterations.", kind: "number" },
78
+ prompt: { description: "What to design (for example, a dashboard, page, component, or prototype). The discovery stage refines this into a confirmed brief and asks for the output type and references.", kind: "string" },
79
+ discover_references: { description: "Discover beautiful, current reference designs from notable design websites (Awwwards, recent.design, Dribbble, Monet, Motionsites) and feed them to generation. Set false to skip the network/browser reference pass.", kind: "boolean" },
80
+ max_refinements: { description: "Maximum generate/user-feedback loop iterations (default 3).", kind: "number" },
44
81
  },
45
82
  },
46
83
  {
47
84
  name: "ralph",
48
- description: "Raw prompt → research → orchestrate → multi-model parallel review loop with bounded iteration.",
85
+ description: "Raw prompt → research-prompt-refinementresearch → orchestrate → multi-model parallel review loop with bounded iteration and immutable acceptance criteria. When launching follow-up ralph runs from review findings, pass the ORIGINAL task text as acceptance_criteria so deltas cannot drift from the literal contract. If the task includes submitting a pull request (or MR/review), remove that final action from the prompt text and set create_pr=true instead when preparing the workflow inputs.",
86
+ inputs: {
87
+ prompt: { description: "The task or goal to research, execute, and refine. Do not include PR/MR submission instructions here; strip them from the task text and request them via create_pr=true instead.", kind: "string" },
88
+ acceptance_criteria: { description: "Original immutable task contract this run must remain consistent with. Defaults to prompt. Orchestrators launching follow-up runs from reviewer findings should pass the ORIGINAL task text here.", kind: "string" },
89
+ max_loops: { description: "Maximum research/orchestrate/review iterations (default 10).", kind: "number" },
90
+ base_branch: { description: "Branch reviewers compare the current code delta against (default origin/main).", kind: "string" },
91
+ git_worktree_dir: { description: "Optional Git worktree path. Leave at the default unless the user explicitly requested worktree isolation — stages never create git worktrees on their own. Must start inside a Git repo; absolute paths are used as-is, relative paths resolve from the repo root, existing Git worktrees from the invoking repository are reused/shared as-is, and missing paths are created from base_branch.", kind: "string" },
92
+ create_pr: { description: "Whether to run the final pull-request creation stage. Defaults to false; prompt text alone does not opt in. If the task asks to submit a PR/MR/review, remove that from the prompt text and set this to true — only the final stage then attempts provider-appropriate PR/MR/review creation.", kind: "boolean" },
93
+ },
94
+ },
95
+ {
96
+ name: "tournament",
97
+ description: "Run several independent whole-task attempts through a balanced pairwise judging bracket and return an auditable winner.",
49
98
  inputs: {
50
- prompt: { description: "The task or goal to research, execute, and refine.", kind: "string" },
51
- acceptance_criteria: { description: "Original immutable task contract this run must remain consistent with.", kind: "string" },
52
- max_loops: { description: "Maximum research/orchestrate/review iterations.", kind: "number" },
53
- base_branch: { description: "Branch reviewers compare the current code delta against.", kind: "string" },
54
- git_worktree_dir: { description: "Optional Git worktree path.", kind: "string" },
55
- create_pr: { description: "Whether to run the final pull-request creation stage.", kind: "boolean" },
99
+ prompt: { description: "Task every competing agent must attempt independently.", kind: "string" },
100
+ num_attempts: { description: "Number of independent whole-task attempts (2-8).", kind: "number" },
101
+ max_concurrency: { description: "Maximum simultaneously active attempts or pairwise judges (1-8).", kind: "number" },
56
102
  },
57
103
  },
58
104
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"slash-commands.js","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EACN,gCAAgC,EAChC,yBAAyB,EACzB,iCAAiC,GACjC,MAAM,2BAA2B,CAAC;AAgCnC,MAAM,0BAA0B,GAAuB;IACtD,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,mCAAmC,EAAE;IACzF,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,yCAAyC,EAAE;IAC7F,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,2BAA2B,EAAE;IAC3E,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ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;IAC5E,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,iDAAiD,EAAE;IACnF,EAAE,IAAI,EAAE,gBAAgB,EAAE,WAAW,EAAE,+CAA+C,EAAE;IACxF,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kCAAkC,EAAE;IACnE,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,yBAAyB,EAAE;IAC7D,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,+BAA+B,EAAE;CAClE,CAAC","sourcesContent":["import type { AutocompleteItem } from \"@earendil-works/pi-tui\";\nimport { APP_NAME } from \"../config.ts\";\nimport {\n\tATOMIC_GUIDE_COMMAND_DESCRIPTION,\n\tATOMIC_GUIDE_COMMAND_NAME,\n\tgetAtomicGuideArgumentCompletions,\n} from \"./atomic-guide-command.ts\";\nimport type { SourceInfo } from \"./source-info.ts\";\n\nexport type SlashCommandSource = \"extension\" | \"prompt\" | \"skill\";\n\nexport interface SlashCommandInfo {\n\tname: string;\n\tdescription?: string;\n\tsource: SlashCommandSource;\n\tsourceInfo: SourceInfo;\n}\n\nexport interface BuiltinSlashCommand {\n\tname: string;\n\tdescription: string;\n\targumentHint?: string;\n\tgetArgumentCompletions?: (\n\t\targumentPrefix: string,\n\t) => AutocompleteItem[] | null | Promise<AutocompleteItem[] | null>;\n}\n\ntype WorkflowInputCompletionMetadata = {\n\tdescription: string;\n\tkind?: \"boolean\" | \"number\" | \"string\";\n};\n\ntype WorkflowCompletionMetadata = {\n\tname: string;\n\tdescription: string;\n\tinputs: Record<string, WorkflowInputCompletionMetadata>;\n};\n\nconst WORKFLOW_ADMIN_COMPLETIONS: AutocompleteItem[] = [\n\t{ value: \"connect \", label: \"connect\", description: \"Attach to a run (picker if no id)\" },\n\t{ value: \"attach \", label: \"attach\", description: \"Open the in-place attach pane on a node\" },\n\t{ value: \"list \", label: \"list\", description: \"List registered workflows\" },\n\t{ value: \"status \", label: \"status\", description: \"List current-session active and retained terminal runs\" },\n\t{ value: \"interrupt \", label: \"interrupt\", description: \"Interrupt a run\" },\n\t{ value: \"quit \", label: \"quit\", description: \"Quit a run and keep it resumable\" },\n\t{ value: \"pause \", label: \"pause\", description: \"Pause a run or stage\" },\n\t{ value: \"resume \", label: \"resume\", description: \"Re-open overlay for a run\" },\n\t{ value: \"inputs \", label: \"inputs\", description: \"Show a workflow's input schema\" },\n\t{ value: \"reload \", label: \"reload\", description: \"Reload workflow resources\" },\n];\n\nconst BUNDLED_WORKFLOW_COMPLETION_METADATA: WorkflowCompletionMetadata[] = [\n\t{\n\t\tname: \"deep-research-codebase\",\n\t\tdescription: \"Heavy research for tasks requiring comprehensive, whole-repository context.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"Research question or investigation focus for the codebase.\", kind: \"string\" },\n\t\t\tmax_partitions: { description: \"Maximum number of codebase partitions to explore in parallel.\", kind: \"number\" },\n\t\t\tmax_concurrency: { description: \"Maximum number of workflow stages to run concurrently during deep research.\", kind: \"number\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"goal\",\n\t\tdescription: \"Goal Runner workflow with bounded sub-agent orchestration turns, acceptance criteria, ledger artifacts, reviewers, and reducer-gated completion.\",\n\t\tinputs: {\n\t\t\tobjective: { description: \"The objective or delta for this Goal Runner workflow run.\", kind: \"string\" },\n\t\t\tacceptance_criteria: { description: \"Original immutable task contract this run must remain consistent with.\", kind: \"string\" },\n\t\t\tmax_turns: { description: \"Maximum orchestrator/review turns before Goal Runner stops as needs_human.\", kind: \"number\" },\n\t\t\tbase_branch: { description: \"Optional branch reviewers compare the current code delta against.\", kind: \"string\" },\n\t\t\tgit_worktree_dir: { description: \"Optional Git worktree path.\", kind: \"string\" },\n\t\t\tcreate_pr: { description: \"Whether to run the final pull-request creation stage after approval.\", kind: \"boolean\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"open-claude-design\",\n\t\tdescription: \"AI-powered design workflow: discovery, reference research, HTML generation, refinement, and handoff.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"What to design, such as a dashboard, page, component, or prototype.\", kind: \"string\" },\n\t\t\tdiscover_references: { description: \"Discover current reference designs and feed them to generation.\", kind: \"boolean\" },\n\t\t\tmax_refinements: { description: \"Maximum generate/user-feedback loop iterations.\", kind: \"number\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"ralph\",\n\t\tdescription: \"Raw prompt → research → orchestrate → multi-model parallel review loop with bounded iteration.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"The task or goal to research, execute, and refine.\", kind: \"string\" },\n\t\t\tacceptance_criteria: { description: \"Original immutable task contract this run must remain consistent with.\", kind: \"string\" },\n\t\t\tmax_loops: { description: \"Maximum research/orchestrate/review iterations.\", kind: \"number\" },\n\t\t\tbase_branch: { description: \"Branch reviewers compare the current code delta against.\", kind: \"string\" },\n\t\t\tgit_worktree_dir: { description: \"Optional Git worktree path.\", kind: \"string\" },\n\t\t\tcreate_pr: { description: \"Whether to run the final pull-request creation stage.\", kind: \"boolean\" },\n\t\t},\n\t},\n];\n\nfunction completeWorkflowToken(argumentText: string, candidates: AutocompleteItem[]): AutocompleteItem[] | null {\n\tconst tokenStart = /\\s$/.test(argumentText)\n\t\t? argumentText.length\n\t\t: Math.max(argumentText.lastIndexOf(\" \"), argumentText.lastIndexOf(\"\\t\")) + 1;\n\tconst head = argumentText.slice(0, tokenStart);\n\tconst token = argumentText.slice(tokenStart);\n\tconst normalizedToken = token.trimEnd();\n\tconst filtered = candidates\n\t\t.filter((candidate) => candidate.value.startsWith(token) && candidate.value.trimEnd() !== normalizedToken)\n\t\t.map((candidate) => ({ ...candidate, value: `${head}${candidate.value}` }));\n\treturn filtered.length > 0 ? filtered : null;\n}\n\nfunction bundledWorkflowNameItems(): AutocompleteItem[] {\n\treturn BUNDLED_WORKFLOW_COMPLETION_METADATA.map((workflow) => ({\n\t\tvalue: `${workflow.name} `,\n\t\tlabel: workflow.name,\n\t\tdescription: `Run workflow: ${workflow.name}`,\n\t}));\n}\n\nexport function getBundledWorkflowArgumentCompletions(argumentPrefix: string): AutocompleteItem[] | null {\n\tconst parts = argumentPrefix.trim().split(/\\s+/).filter(Boolean);\n\tconst subcommand = parts[0] ?? \"\";\n\tconst workflowItems = bundledWorkflowNameItems();\n\tif (!argumentPrefix.includes(\" \")) {\n\t\treturn completeWorkflowToken(argumentPrefix, [...WORKFLOW_ADMIN_COMPLETIONS, ...workflowItems]);\n\t}\n\tif (subcommand === \"inputs\") return completeWorkflowToken(argumentPrefix, workflowItems);\n\tif (subcommand === \"interrupt\") {\n\t\treturn completeWorkflowToken(argumentPrefix, [\n\t\t\t{ value: \"--all \", label: \"--all\", description: \"Interrupt all in-flight runs\" },\n\t\t\t{ value: \"--yes \", label: \"--yes\", description: \"Skip confirmation\" },\n\t\t\t{ value: \"-y \", label: \"-y\", description: \"Skip confirmation\" },\n\t\t]);\n\t}\n\tif (subcommand === \"quit\") {\n\t\treturn completeWorkflowToken(argumentPrefix, [\n\t\t\t{ value: \"--all \", label: \"--all\", description: \"Quit and keep all in-flight runs resumable\" },\n\t\t]);\n\t}\n\tif (!subcommand) return completeWorkflowToken(argumentPrefix, [...WORKFLOW_ADMIN_COMPLETIONS, ...workflowItems]);\n\n\tconst workflow = BUNDLED_WORKFLOW_COMPLETION_METADATA.find((candidate) => candidate.name === subcommand);\n\tif (!workflow) return null;\n\tconst tokenStart = /\\s$/.test(argumentPrefix)\n\t\t? argumentPrefix.length\n\t\t: Math.max(argumentPrefix.lastIndexOf(\" \"), argumentPrefix.lastIndexOf(\"\\t\")) + 1;\n\tconst token = argumentPrefix.slice(tokenStart);\n\tconst equalsIndex = token.indexOf(\"=\");\n\tif (equalsIndex > 0) {\n\t\tconst inputName = token.slice(0, equalsIndex);\n\t\tconst input = workflow.inputs[inputName];\n\t\tif (input?.kind !== \"boolean\") return null;\n\t\treturn completeWorkflowToken(argumentPrefix, [\n\t\t\t{ value: `${inputName}=true `, label: \"true\", description: inputName },\n\t\t\t{ value: `${inputName}=false `, label: \"false\", description: inputName },\n\t\t]);\n\t}\n\n\treturn completeWorkflowToken(argumentPrefix, [\n\t\t{ value: \"--no-picker \", label: \"--no-picker\", description: \"Skip interactive input picker\" },\n\t\t{ value: \"--help \", label: \"--help\", description: \"Show this workflow's input schema\" },\n\t\t...Object.entries(workflow.inputs).map(([name, input]) => ({\n\t\t\tvalue: `${name}=`,\n\t\t\tlabel: name,\n\t\t\tdescription: input.description,\n\t\t})),\n\t]);\n}\n\nexport const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{ name: \"settings\", description: \"Open settings menu\" },\n\t{ name: \"model\", description: \"Select model (opens selector UI)\" },\n\t{ name: \"scoped-models\", description: \"Enable/disable models for ctrl+p cycling\" },\n\t{ name: \"fast\", description: \"Configure Codex fast mode for chat and workflows\" },\n\t{ name: \"export\", description: \"Export session (HTML default, or specify path: .html/.jsonl)\" },\n\t{ name: \"import\", description: \"Import and resume a session from a JSONL file\" },\n\t{ name: \"share\", description: \"Share session as a secret GitHub gist\" },\n\t{ name: \"copy\", description: \"Copy last agent message to clipboard\" },\n\t{ name: \"name\", description: \"Set session display name\" },\n\t{ name: \"session\", description: \"Show session info and stats\" },\n\t{ name: \"changelog\", description: \"Show changelog entries\" },\n\t{\n\t\tname: ATOMIC_GUIDE_COMMAND_NAME,\n\t\tdescription: ATOMIC_GUIDE_COMMAND_DESCRIPTION,\n\t\tgetArgumentCompletions: getAtomicGuideArgumentCompletions,\n\t},\n\t{ name: \"hotkeys\", description: \"Show all keyboard shortcuts\" },\n\t{ name: \"fork\", description: \"Create a new fork from a previous user message\" },\n\t{ name: \"clone\", description: \"Duplicate the current session at the current position\" },\n\t{ name: \"tree\", description: \"Navigate session tree (switch branches)\" },\n\t{ name: \"trust\", description: \"Save project trust decision for future sessions\" },\n\t{ name: \"login\", description: \"Configure provider authentication\", argumentHint: \"<provider>\" },\n\t{ name: \"logout\", description: \"Remove provider authentication\" },\n\t{ name: \"new\", description: \"Start a new session\" },\n\t{ name: \"compact\", description: \"Compact older context with verbatim line ranges\" },\n\t{ name: \"resume\", description: \"Resume a different session\" },\n\t{ name: \"reload\", description: \"Reload keybindings, extensions, skills, prompts, and themes\" },\n\t{ name: \"exit\", description: `Exit ${APP_NAME}` },\n\t{ name: \"quit\", description: `Quit ${APP_NAME}` },\n];\n\nexport const BUNDLED_EXTENSION_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{\n\t\tname: \"workflow\",\n\t\tdescription: \"Run or inspect Atomic workflows. Usage: /workflow <name> [key=value…] | /workflow [list|status|connect|attach|interrupt|quit|pause|resume|inputs|reload] [args]\",\n\t\tgetArgumentCompletions: getBundledWorkflowArgumentCompletions,\n\t},\n\t{ name: \"run\", description: \"Run a subagent directly: /run agent[output=file] [task] [--bg] [--fork]\" },\n\t{ name: \"chain\", description: \"Run agents in sequence: /chain scout task -> planner [--bg] [--fork]\" },\n\t{ name: \"run-chain\", description: \"Run a saved chain: /run-chain chainName -- task [--bg] [--fork]\" },\n\t{ name: \"parallel\", description: \"Run agents in parallel: /parallel scout task1 -> reviewer task2 [--bg] [--fork]\" },\n\t{ name: \"subagents-doctor\", description: \"Show subagent diagnostics\" },\n\t{ name: \"mcp\", description: \"Show MCP server status\" },\n\t{ name: \"mcp-auth\", description: \"Authenticate with an MCP server (OAuth)\" },\n\t{ name: \"curator\", description: \"Toggle or configure the search curator workflow\" },\n\t{ name: \"google-account\", description: \"Show the active Google account for Gemini Web\" },\n\t{ name: \"search\", description: \"Browse stored web search results\" },\n\t{ name: \"websearch\", description: \"Open web search curator\" },\n\t{ name: \"intercom\", description: \"Open session intercom overlay\" },\n];\n"]}
1
+ {"version":3,"file":"slash-commands.js","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EACN,gCAAgC,EAChC,yBAAyB,EACzB,iCAAiC,GACjC,MAAM,2BAA2B,CAAC;AA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F,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,QAAQ,EAAE,EAAE;IACjD,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,QAAQ,EAAE,EAAE;CACjD,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAuC;IACnF;QACC,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,iKAAiK;QAC9K,sBAAsB,EAAE,qCAAqC;KAC7D;IACD,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,yEAAyE,EAAE;IACvG,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,sEAAsE,EAAE;IACtG,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,iEAAiE,EAAE;IACrG,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,iFAAiF,EAAE;IACpH,EAAE,IAAI,EAAE,kBAAkB,EAAE,WAAW,EAAE,2BAA2B,EAAE;IACtE,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,wBAAwB,EAAE;IACtD,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,yCAAyC,EAAE;IAC5E,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,iDAAiD,EAAE;IACnF,EAAE,IAAI,EAAE,gBAAgB,EAAE,WAAW,EAAE,+CAA+C,EAAE;IACxF,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kCAAkC,EAAE;IACnE,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,yBAAyB,EAAE;IAC7D,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,+BAA+B,EAAE;CAClE,CAAC","sourcesContent":["import type { AutocompleteItem } from \"@earendil-works/pi-tui\";\nimport { APP_NAME } from \"../config.ts\";\nimport {\n\tATOMIC_GUIDE_COMMAND_DESCRIPTION,\n\tATOMIC_GUIDE_COMMAND_NAME,\n\tgetAtomicGuideArgumentCompletions,\n} from \"./atomic-guide-command.ts\";\nimport type { SourceInfo } from \"./source-info.ts\";\n\nexport type SlashCommandSource = \"extension\" | \"prompt\" | \"skill\";\n\nexport interface SlashCommandInfo {\n\tname: string;\n\tdescription?: string;\n\tsource: SlashCommandSource;\n\tsourceInfo: SourceInfo;\n}\n\nexport interface BuiltinSlashCommand {\n\tname: string;\n\tdescription: string;\n\targumentHint?: string;\n\tgetArgumentCompletions?: (\n\t\targumentPrefix: string,\n\t) => AutocompleteItem[] | null | Promise<AutocompleteItem[] | null>;\n}\n\ntype WorkflowInputCompletionMetadata = {\n\tdescription: string;\n\tkind?: \"boolean\" | \"number\" | \"string\";\n};\n\ntype WorkflowCompletionMetadata = {\n\tname: string;\n\tdescription: string;\n\tinputs: Record<string, WorkflowInputCompletionMetadata>;\n};\n\nconst WORKFLOW_ADMIN_COMPLETIONS: AutocompleteItem[] = [\n\t{ value: \"connect \", label: \"connect\", description: \"Attach to a run (picker if no id)\" },\n\t{ value: \"attach \", label: \"attach\", description: \"Open the in-place attach pane on a node\" },\n\t{ value: \"list \", label: \"list\", description: \"List registered workflows\" },\n\t{ value: \"status \", label: \"status\", description: \"List current-session active and retained terminal runs\" },\n\t{ value: \"interrupt \", label: \"interrupt\", description: \"Interrupt a run\" },\n\t{ value: \"quit \", label: \"quit\", description: \"Quit a run and keep it resumable\" },\n\t{ value: \"pause \", label: \"pause\", description: \"Pause a run or stage\" },\n\t{ value: \"resume \", label: \"resume\", description: \"Re-open overlay for a run\" },\n\t{ value: \"inputs \", label: \"inputs\", description: \"Show a workflow's input schema\" },\n\t{ value: \"reload \", label: \"reload\", description: \"Reload workflow resources\" },\n];\n\nconst BUNDLED_WORKFLOW_COMPLETION_METADATA: WorkflowCompletionMetadata[] = [\n\t{\n\t\tname: \"adversarial-verification\",\n\t\tdescription: \"Produce a candidate, challenge it with fresh-context rubric-based verifiers, and reduce their evidence through a bounded repair loop.\",\n\t\tinputs: {\n\t\t\ttask: { description: \"Task whose candidate result must be independently verified.\", kind: \"string\" },\n\t\t\tverifier_count: { description: \"Number of independent verifiers per review round.\", kind: \"number\" },\n\t\t\tmax_repairs: { description: \"Maximum candidate repair rounds before rejection.\", kind: \"number\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"classify-and-act\",\n\t\tdescription: \"Classify a task with structured confidence, route deterministically to an isolated category action, and ask for human selection when confidence is low.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"Task to classify and execute.\", kind: \"string\" },\n\t\t\tcategories: { description: \"Ordered action categories available to the classifier and fallback chooser.\" },\n\t\t\tconfidence_threshold: { description: \"Minimum structured confidence required to route without human selection.\", kind: \"number\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"fan-out-and-synthesize\",\n\t\tdescription: \"Partition a task, run bounded independent artifact branches, then synthesize all evidence at an explicit barrier.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"Task to partition, investigate, and synthesize.\", kind: \"string\" },\n\t\t\tmax_branches: { description: \"Maximum number of independent partitions produced and executed.\", kind: \"number\" },\n\t\t\tmax_concurrency: { description: \"Maximum number of branch agents running concurrently.\", kind: \"number\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"generate-and-filter\",\n\t\tdescription: \"Generate more independent candidates than needed, deduplicate and filter them by rubric, optionally judge them, and return a parent-consumable shortlist.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"Prompt for candidate generation and selection.\", kind: \"string\" },\n\t\t\tnum_candidates: { description: \"Number of independent candidates to generate.\", kind: \"number\" },\n\t\t\tshortlist_size: { description: \"Maximum number of candidates in the final shortlist.\", kind: \"number\" },\n\t\t\tuse_judge: { description: \"Whether an independent judge reviews the filtered shortlist.\", kind: \"boolean\" },\n\t\t\tmax_concurrency: { description: \"Maximum simultaneous generator stages.\", kind: \"number\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"goal\",\n\t\tdescription: \"Goal Runner workflow with bounded sub-agent orchestration turns, immutable acceptance criteria, ledger artifacts, parallel reviewers, and reducer-gated completion. When launching follow-up goal runs from review findings, pass the ORIGINAL task text as acceptance_criteria so deltas cannot drift from the literal contract. If the task includes submitting a pull request (or MR/review), remove that final action from the objective text and set create_pr=true instead when preparing the workflow inputs.\",\n\t\tinputs: {\n\t\t\tobjective: { description: \"The objective or delta for this Goal Runner workflow run. Do not include PR/MR submission instructions here; strip them from the task text and request them via create_pr=true instead.\", kind: \"string\" },\n\t\t\tacceptance_criteria: { description: \"Original immutable task contract this run must remain consistent with. Defaults to objective. Orchestrators launching follow-up runs from reviewer findings should pass the ORIGINAL task text here.\", kind: \"string\" },\n\t\t\tmax_turns: { description: \"Maximum orchestrator/review turns before Goal Runner stops as needs_human.\", kind: \"number\" },\n\t\t\tbase_branch: { description: \"Optional branch reviewers compare the current code delta against (default origin/main).\", kind: \"string\" },\n\t\t\tgit_worktree_dir: { description: \"Optional Git worktree path. Leave at the default unless the user explicitly requested worktree isolation — stages never create git worktrees on their own. Must start inside a Git repo; absolute paths are used as-is, relative paths resolve from the repo root, existing Git worktrees from the invoking repository are reused/shared as-is, and missing paths are created from base_branch.\", kind: \"string\" },\n\t\t\tcreate_pr: { description: \"Whether to run the final pull-request creation stage after reviewer/reducer approval. Defaults to false; prompt text alone does not opt in. If the task asks to submit a PR/MR/review, remove that from the objective text and set this to true — only the final stage then attempts provider-appropriate PR/MR/review creation after Goal completes.\", kind: \"boolean\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"loop-until-done\",\n\t\tdescription: \"Repeat evidence-producing work and independent completion evaluation against a durable ledger until done or an inspectable iteration-limit failure.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"Objective whose explicit completion condition controls the bounded loop.\", kind: \"string\" },\n\t\t\tmax_iterations: { description: \"Maximum work/evaluation iterations before returning an inspectable failed status (1-20).\", kind: \"number\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"open-claude-design\",\n\t\tdescription: \"AI-powered design workflow: combined discovery/init → design-system/reference research → curated reference discovery → HTML generation → live-driven refinement → rich HTML handoff. The discovery stage asks what to build, the output type, and which references to emulate, then runs impeccable init for PRODUCT.md/DESIGN.md (references take precedence over project context). The user iteratively reviews the generated HTML.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"What to design (for example, a dashboard, page, component, or prototype). The discovery stage refines this into a confirmed brief and asks for the output type and references.\", kind: \"string\" },\n\t\t\tdiscover_references: { description: \"Discover beautiful, current reference designs from notable design websites (Awwwards, recent.design, Dribbble, Monet, Motionsites) and feed them to generation. Set false to skip the network/browser reference pass.\", kind: \"boolean\" },\n\t\t\tmax_refinements: { description: \"Maximum generate/user-feedback loop iterations (default 3).\", kind: \"number\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"ralph\",\n\t\tdescription: \"Raw prompt → research-prompt-refinement → research → orchestrate → multi-model parallel review loop with bounded iteration and immutable acceptance criteria. When launching follow-up ralph runs from review findings, pass the ORIGINAL task text as acceptance_criteria so deltas cannot drift from the literal contract. If the task includes submitting a pull request (or MR/review), remove that final action from the prompt text and set create_pr=true instead when preparing the workflow inputs.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"The task or goal to research, execute, and refine. Do not include PR/MR submission instructions here; strip them from the task text and request them via create_pr=true instead.\", kind: \"string\" },\n\t\t\tacceptance_criteria: { description: \"Original immutable task contract this run must remain consistent with. Defaults to prompt. Orchestrators launching follow-up runs from reviewer findings should pass the ORIGINAL task text here.\", kind: \"string\" },\n\t\t\tmax_loops: { description: \"Maximum research/orchestrate/review iterations (default 10).\", kind: \"number\" },\n\t\t\tbase_branch: { description: \"Branch reviewers compare the current code delta against (default origin/main).\", kind: \"string\" },\n\t\t\tgit_worktree_dir: { description: \"Optional Git worktree path. Leave at the default unless the user explicitly requested worktree isolation — stages never create git worktrees on their own. Must start inside a Git repo; absolute paths are used as-is, relative paths resolve from the repo root, existing Git worktrees from the invoking repository are reused/shared as-is, and missing paths are created from base_branch.\", kind: \"string\" },\n\t\t\tcreate_pr: { description: \"Whether to run the final pull-request creation stage. Defaults to false; prompt text alone does not opt in. If the task asks to submit a PR/MR/review, remove that from the prompt text and set this to true — only the final stage then attempts provider-appropriate PR/MR/review creation.\", kind: \"boolean\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"tournament\",\n\t\tdescription: \"Run several independent whole-task attempts through a balanced pairwise judging bracket and return an auditable winner.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"Task every competing agent must attempt independently.\", kind: \"string\" },\n\t\t\tnum_attempts: { description: \"Number of independent whole-task attempts (2-8).\", kind: \"number\" },\n\t\t\tmax_concurrency: { description: \"Maximum simultaneously active attempts or pairwise judges (1-8).\", kind: \"number\" },\n\t\t},\n\t},\n];\n\nfunction completeWorkflowToken(argumentText: string, candidates: AutocompleteItem[]): AutocompleteItem[] | null {\n\tconst tokenStart = /\\s$/.test(argumentText)\n\t\t? argumentText.length\n\t\t: Math.max(argumentText.lastIndexOf(\" \"), argumentText.lastIndexOf(\"\\t\")) + 1;\n\tconst head = argumentText.slice(0, tokenStart);\n\tconst token = argumentText.slice(tokenStart);\n\tconst normalizedToken = token.trimEnd();\n\tconst filtered = candidates\n\t\t.filter((candidate) => candidate.value.startsWith(token) && candidate.value.trimEnd() !== normalizedToken)\n\t\t.map((candidate) => ({ ...candidate, value: `${head}${candidate.value}` }));\n\treturn filtered.length > 0 ? filtered : null;\n}\n\nfunction bundledWorkflowNameItems(): AutocompleteItem[] {\n\treturn BUNDLED_WORKFLOW_COMPLETION_METADATA.map((workflow) => ({\n\t\tvalue: `${workflow.name} `,\n\t\tlabel: workflow.name,\n\t\tdescription: `Run workflow: ${workflow.name}`,\n\t}));\n}\n\nexport function getBundledWorkflowArgumentCompletions(argumentPrefix: string): AutocompleteItem[] | null {\n\tconst parts = argumentPrefix.trim().split(/\\s+/).filter(Boolean);\n\tconst subcommand = parts[0] ?? \"\";\n\tconst workflowItems = bundledWorkflowNameItems();\n\tif (!argumentPrefix.includes(\" \")) {\n\t\treturn completeWorkflowToken(argumentPrefix, [...WORKFLOW_ADMIN_COMPLETIONS, ...workflowItems]);\n\t}\n\tif (subcommand === \"inputs\") return completeWorkflowToken(argumentPrefix, workflowItems);\n\tif (subcommand === \"interrupt\") {\n\t\treturn completeWorkflowToken(argumentPrefix, [\n\t\t\t{ value: \"--all \", label: \"--all\", description: \"Interrupt all in-flight runs\" },\n\t\t\t{ value: \"--yes \", label: \"--yes\", description: \"Skip confirmation\" },\n\t\t\t{ value: \"-y \", label: \"-y\", description: \"Skip confirmation\" },\n\t\t]);\n\t}\n\tif (subcommand === \"quit\") {\n\t\treturn completeWorkflowToken(argumentPrefix, [\n\t\t\t{ value: \"--all \", label: \"--all\", description: \"Quit and keep all in-flight runs resumable\" },\n\t\t]);\n\t}\n\tif (!subcommand) return completeWorkflowToken(argumentPrefix, [...WORKFLOW_ADMIN_COMPLETIONS, ...workflowItems]);\n\n\tconst workflow = BUNDLED_WORKFLOW_COMPLETION_METADATA.find((candidate) => candidate.name === subcommand);\n\tif (!workflow) return null;\n\tconst tokenStart = /\\s$/.test(argumentPrefix)\n\t\t? argumentPrefix.length\n\t\t: Math.max(argumentPrefix.lastIndexOf(\" \"), argumentPrefix.lastIndexOf(\"\\t\")) + 1;\n\tconst token = argumentPrefix.slice(tokenStart);\n\tconst equalsIndex = token.indexOf(\"=\");\n\tif (equalsIndex > 0) {\n\t\tconst inputName = token.slice(0, equalsIndex);\n\t\tconst input = workflow.inputs[inputName];\n\t\tif (input?.kind !== \"boolean\") return null;\n\t\treturn completeWorkflowToken(argumentPrefix, [\n\t\t\t{ value: `${inputName}=true `, label: \"true\", description: inputName },\n\t\t\t{ value: `${inputName}=false `, label: \"false\", description: inputName },\n\t\t]);\n\t}\n\n\treturn completeWorkflowToken(argumentPrefix, [\n\t\t{ value: \"--no-picker \", label: \"--no-picker\", description: \"Skip interactive input picker\" },\n\t\t{ value: \"--help \", label: \"--help\", description: \"Show this workflow's input schema\" },\n\t\t...Object.entries(workflow.inputs).map(([name, input]) => ({\n\t\t\tvalue: `${name}=`,\n\t\t\tlabel: name,\n\t\t\tdescription: input.description,\n\t\t})),\n\t]);\n}\n\nexport const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{ name: \"settings\", description: \"Open settings menu\" },\n\t{ name: \"model\", description: \"Select model (opens selector UI)\" },\n\t{ name: \"scoped-models\", description: \"Enable/disable models for ctrl+p cycling\" },\n\t{ name: \"fast\", description: \"Configure Codex fast mode for chat and workflows\" },\n\t{ name: \"export\", description: \"Export session (HTML default, or specify path: .html/.jsonl)\" },\n\t{ name: \"import\", description: \"Import and resume a session from a JSONL file\" },\n\t{ name: \"share\", description: \"Share session as a secret GitHub gist\" },\n\t{ name: \"copy\", description: \"Copy last agent message to clipboard\" },\n\t{ name: \"name\", description: \"Set session display name\" },\n\t{ name: \"session\", description: \"Show session info and stats\" },\n\t{ name: \"changelog\", description: \"Show changelog entries\" },\n\t{\n\t\tname: ATOMIC_GUIDE_COMMAND_NAME,\n\t\tdescription: ATOMIC_GUIDE_COMMAND_DESCRIPTION,\n\t\tgetArgumentCompletions: getAtomicGuideArgumentCompletions,\n\t},\n\t{ name: \"hotkeys\", description: \"Show all keyboard shortcuts\" },\n\t{ name: \"fork\", description: \"Create a new fork from a previous user message\" },\n\t{ name: \"clone\", description: \"Duplicate the current session at the current position\" },\n\t{ name: \"tree\", description: \"Navigate session tree (switch branches)\" },\n\t{ name: \"trust\", description: \"Save project trust decision for future sessions\" },\n\t{ name: \"login\", description: \"Configure provider authentication\", argumentHint: \"<provider>\" },\n\t{ name: \"logout\", description: \"Remove provider authentication\" },\n\t{ name: \"new\", description: \"Start a new session\" },\n\t{ name: \"compact\", description: \"Compact older context with verbatim line ranges\" },\n\t{ name: \"resume\", description: \"Resume a different session\" },\n\t{ name: \"reload\", description: \"Reload keybindings, extensions, skills, prompts, and themes\" },\n\t{ name: \"exit\", description: `Exit ${APP_NAME}` },\n\t{ name: \"quit\", description: `Quit ${APP_NAME}` },\n];\n\nexport const BUNDLED_EXTENSION_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{\n\t\tname: \"workflow\",\n\t\tdescription: \"Run or inspect Atomic workflows. Usage: /workflow <name> [key=value…] | /workflow [list|status|connect|attach|interrupt|quit|pause|resume|inputs|reload] [args]\",\n\t\tgetArgumentCompletions: getBundledWorkflowArgumentCompletions,\n\t},\n\t{ name: \"run\", description: \"Run a subagent directly: /run agent[output=file] [task] [--bg] [--fork]\" },\n\t{ name: \"chain\", description: \"Run agents in sequence: /chain scout task -> planner [--bg] [--fork]\" },\n\t{ name: \"run-chain\", description: \"Run a saved chain: /run-chain chainName -- task [--bg] [--fork]\" },\n\t{ name: \"parallel\", description: \"Run agents in parallel: /parallel scout task1 -> reviewer task2 [--bg] [--fork]\" },\n\t{ name: \"subagents-doctor\", description: \"Show subagent diagnostics\" },\n\t{ name: \"mcp\", description: \"Show MCP server status\" },\n\t{ name: \"mcp-auth\", description: \"Authenticate with an MCP server (OAuth)\" },\n\t{ name: \"curator\", description: \"Toggle or configure the search curator workflow\" },\n\t{ name: \"google-account\", description: \"Show the active Google account for Gemini Web\" },\n\t{ name: \"search\", description: \"Browse stored web search results\" },\n\t{ name: \"websearch\", description: \"Open web search curator\" },\n\t{ name: \"intercom\", description: \"Open session intercom overlay\" },\n];\n"]}
@@ -1,4 +1,4 @@
1
- import type { PathMetadata } from "./package-manager.ts";
1
+ import type { PathMetadata, ResourceConfigurationOrigin } from "./package-manager.ts";
2
2
  export type SourceScope = "user" | "project" | "temporary";
3
3
  export type SourceOrigin = "package" | "top-level";
4
4
  export interface SourceInfo {
@@ -7,6 +7,7 @@ export interface SourceInfo {
7
7
  scope: SourceScope;
8
8
  origin: SourceOrigin;
9
9
  baseDir?: string;
10
+ configurationOrigin?: ResourceConfigurationOrigin;
10
11
  }
11
12
  export declare function createSourceInfo(path: string, metadata: PathMetadata): SourceInfo;
12
13
  export declare function createSyntheticSourceInfo(path: string, options: {
@@ -14,5 +15,6 @@ export declare function createSyntheticSourceInfo(path: string, options: {
14
15
  scope?: SourceScope;
15
16
  origin?: SourceOrigin;
16
17
  baseDir?: string;
18
+ configurationOrigin?: ResourceConfigurationOrigin;
17
19
  }): SourceInfo;
18
20
  //# sourceMappingURL=source-info.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"source-info.d.ts","sourceRoot":"","sources":["../../src/core/source-info.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC;AAC3D,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,WAAW,CAAC;AAEnD,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,UAAU,CAQjF;AAED,wBAAgB,yBAAyB,CACxC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IACR,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,GACC,UAAU,CAQZ"}
1
+ {"version":3,"file":"source-info.d.ts","sourceRoot":"","sources":["../../src/core/source-info.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAEtF,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC;AAC3D,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,WAAW,CAAC;AAEnD,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,2BAA2B,CAAC;CAClD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,UAAU,CASjF;AAED,wBAAgB,yBAAyB,CACxC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IACR,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,2BAA2B,CAAC;CAClD,GACC,UAAU,CASZ"}
@@ -5,6 +5,7 @@ export function createSourceInfo(path, metadata) {
5
5
  scope: metadata.scope,
6
6
  origin: metadata.origin,
7
7
  baseDir: metadata.baseDir,
8
+ configurationOrigin: metadata.configurationOrigin,
8
9
  };
9
10
  }
10
11
  export function createSyntheticSourceInfo(path, options) {
@@ -14,6 +15,7 @@ export function createSyntheticSourceInfo(path, options) {
14
15
  scope: options.scope ?? "temporary",
15
16
  origin: options.origin ?? "top-level",
16
17
  baseDir: options.baseDir,
18
+ configurationOrigin: options.configurationOrigin,
17
19
  };
18
20
  }
19
21
  //# sourceMappingURL=source-info.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"source-info.js","sourceRoot":"","sources":["../../src/core/source-info.ts"],"names":[],"mappings":"AAaA,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,QAAsB;IACpE,OAAO;QACN,IAAI;QACJ,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,OAAO,EAAE,QAAQ,CAAC,OAAO;KACzB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,yBAAyB,CACxC,IAAY,EACZ,OAKC;IAED,OAAO;QACN,IAAI;QACJ,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,WAAW;QACnC,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,WAAW;QACrC,OAAO,EAAE,OAAO,CAAC,OAAO;KACxB,CAAC;AACH,CAAC","sourcesContent":["import type { PathMetadata } from \"./package-manager.ts\";\n\nexport type SourceScope = \"user\" | \"project\" | \"temporary\";\nexport type SourceOrigin = \"package\" | \"top-level\";\n\nexport interface SourceInfo {\n\tpath: string;\n\tsource: string;\n\tscope: SourceScope;\n\torigin: SourceOrigin;\n\tbaseDir?: string;\n}\n\nexport function createSourceInfo(path: string, metadata: PathMetadata): SourceInfo {\n\treturn {\n\t\tpath,\n\t\tsource: metadata.source,\n\t\tscope: metadata.scope,\n\t\torigin: metadata.origin,\n\t\tbaseDir: metadata.baseDir,\n\t};\n}\n\nexport function createSyntheticSourceInfo(\n\tpath: string,\n\toptions: {\n\t\tsource: string;\n\t\tscope?: SourceScope;\n\t\torigin?: SourceOrigin;\n\t\tbaseDir?: string;\n\t},\n): SourceInfo {\n\treturn {\n\t\tpath,\n\t\tsource: options.source,\n\t\tscope: options.scope ?? \"temporary\",\n\t\torigin: options.origin ?? \"top-level\",\n\t\tbaseDir: options.baseDir,\n\t};\n}\n"]}
1
+ {"version":3,"file":"source-info.js","sourceRoot":"","sources":["../../src/core/source-info.ts"],"names":[],"mappings":"AAcA,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,QAAsB;IACpE,OAAO;QACN,IAAI;QACJ,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,mBAAmB,EAAE,QAAQ,CAAC,mBAAmB;KACjD,CAAC;AACH,CAAC;AAED,MAAM,UAAU,yBAAyB,CACxC,IAAY,EACZ,OAMC;IAED,OAAO;QACN,IAAI;QACJ,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,WAAW;QACnC,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,WAAW;QACrC,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;KAChD,CAAC;AACH,CAAC","sourcesContent":["import type { PathMetadata, ResourceConfigurationOrigin } from \"./package-manager.ts\";\n\nexport type SourceScope = \"user\" | \"project\" | \"temporary\";\nexport type SourceOrigin = \"package\" | \"top-level\";\n\nexport interface SourceInfo {\n\tpath: string;\n\tsource: string;\n\tscope: SourceScope;\n\torigin: SourceOrigin;\n\tbaseDir?: string;\n\tconfigurationOrigin?: ResourceConfigurationOrigin;\n}\n\nexport function createSourceInfo(path: string, metadata: PathMetadata): SourceInfo {\n\treturn {\n\t\tpath,\n\t\tsource: metadata.source,\n\t\tscope: metadata.scope,\n\t\torigin: metadata.origin,\n\t\tbaseDir: metadata.baseDir,\n\t\tconfigurationOrigin: metadata.configurationOrigin,\n\t};\n}\n\nexport function createSyntheticSourceInfo(\n\tpath: string,\n\toptions: {\n\t\tsource: string;\n\t\tscope?: SourceScope;\n\t\torigin?: SourceOrigin;\n\t\tbaseDir?: string;\n\t\tconfigurationOrigin?: ResourceConfigurationOrigin;\n\t},\n): SourceInfo {\n\treturn {\n\t\tpath,\n\t\tsource: options.source,\n\t\tscope: options.scope ?? \"temporary\",\n\t\torigin: options.origin ?? \"top-level\",\n\t\tbaseDir: options.baseDir,\n\t\tconfigurationOrigin: options.configurationOrigin,\n\t};\n}\n"]}
@@ -67,7 +67,7 @@ Preview content is rendered as markdown in a monospace box. Multi-line text with
67
67
  // Suspend the animated working loader for the lifetime of the blocking dialog.
68
68
  //
69
69
  // The questionnaire mounts inline, directly below the status/working-loader row.
70
- // That loader ticks every ~80ms and calls `requestRender()` on each frame. On a
70
+ // That loader ticks every ~88ms and calls `requestRender()` on each frame. On a
71
71
  // short terminal the (tall) side-by-side dialog pushes the loader line above the
72
72
  // viewport top, so pi-tui's differential renderer sees `firstChanged < viewportTop`
73
73
  // and falls back to a full clear+replay (`\x1b[2J\x1b[H\x1b[3J`) on every tick. The
@@ -1 +1 @@
1
- {"version":3,"file":"ask-user-question.js","sourceRoot":"","sources":["../../../../src/core/tools/ask-user-question/ask-user-question.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC1F,OAAO,EACN,WAAW,EACX,aAAa,EACb,WAAW,EAIX,oBAAoB,GACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAGzE,MAAM,WAAW,GAAG,2DAA2D,CAAC;AAEhF,MAAM,UAAU,qBAAqB,CAAC,QAAsB;IAC3D,MAAM,KAAK,GAAyB,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAChE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,WAAW,EAAE,CAAC,CAAC,WAAW;KAC1B,CAAC,CAAC,CAAC;IACJ,MAAM,aAAa,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC1G,KAAK,MAAM,IAAI,IAAI,iBAAiB,CAAC,QAAQ,EAAE,aAA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AC1C,OAAO,EAAE,EAAE;oBACX,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,UAAU,CAAC,KAAK;iBACvB,CAAC,CAAC;YACJ,CAAC;YAED,MAAM,UAAU,GAA2B,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;YAEhG,+EAA+E;YAC/E,EAAE;YACF,iFAAiF;YACjF,gFAAgF;YAChF,iFAAiF;YACjF,oFAAoF;YACpF,oFAAoF;YACpF,gFAAgF;YAChF,gFAAgF;YAChF,kEAAkE;YAClE,EAAE;YACF,4EAA4E;YAC5E,gFAAgF;YAChF,8BAA8B;YAC9B,GAAG,CAAC,EAAE,CAAC,iBAAiB,EAAE,CAAC,KAAK,CAAC,CAAC;YAClC,IAAI,CAAC;gBACJ,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,MAAM,CAAsB,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;oBACjF,MAAM,OAAO,GAAG,IAAI,oBAAoB,CAAC;wBACxC,GAAG;wBACH,KAAK;wBACL,MAAM,EAAE,KAAK;wBACb,UAAU;wBACV,IAAI;qBACJ,CAAC,CAAC;oBACH,OAAO,OAAO,CAAC,SAAS,CAAC;gBAC1B,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;gBAEf,OAAO,0BAA0B,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;YAClD,CAAC;oBAAS,CAAC;gBACV,GAAG,CAAC,EAAE,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,CAAC;YAClC,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC;AAED,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,CAAC","sourcesContent":["import type { ToolDefinition } from \"../../extensions/types.ts\";\nimport { loadConfig, validateGuidanceFields } from \"./config.ts\";\nimport { QuestionnaireSession } from \"./state/questionnaire-session.ts\";\nimport { ROW_INTENT_META, sentinelsToAppend } from \"./state/row-intent.ts\";\nimport { buildQuestionnaireResponse, buildToolResult } from \"./tool/response-envelope.ts\";\nimport {\n\tMAX_OPTIONS,\n\tMAX_QUESTIONS,\n\tMIN_OPTIONS,\n\ttype QuestionData,\n\ttype QuestionnaireResult,\n\ttype QuestionParams,\n\tQuestionParamsSchema,\n} from \"./tool/types.ts\";\nimport { validateQuestionnaire } from \"./tool/validate-questionnaire.ts\";\nimport type { WrappingSelectItem } from \"./view/components/wrapping-select.ts\";\n\nconst ERROR_NO_UI = \"Error: UI not available (running in non-interactive mode)\";\n\nexport function buildItemsForQuestion(question: QuestionData): WrappingSelectItem[] {\n\tconst items: WrappingSelectItem[] = question.options.map((o) => ({\n\t\tkind: \"option\",\n\t\tlabel: o.label,\n\t\tdescription: o.description,\n\t}));\n\tconst hasAnyPreview = question.options.some((o) => typeof o.preview === \"string\" && o.preview.length > 0);\n\tfor (const kind of sentinelsToAppend(question, hasAnyPreview)) {\n\t\titems.push({ kind, label: ROW_INTENT_META[kind].label });\n\t}\n\treturn items;\n}\n\nexport const DEFAULT_PROMPT_SNIPPET = `Ask the user up to ${MAX_QUESTIONS} structured questions (${MIN_OPTIONS}-${MAX_OPTIONS} options each) when requirements are ambiguous`;\nexport const DEFAULT_PROMPT_GUIDELINES: string[] = [\n\t`Use ask_user_question whenever the user's request is underspecified and you cannot proceed without concrete decisions — you can ask up to ${MAX_QUESTIONS} questions per invocation.`,\n\t`Each question MUST have ${MIN_OPTIONS}-${MAX_OPTIONS} options. Every option requires a concise label (1-5 words) and a description explaining what the choice means or its trade-offs. The user can additionally type a custom answer (\"Type something.\" row is appended automatically to single-select questions) or pick \"Chat about this\" to abandon the questionnaire.`,\n\t`Set multiSelect: true when multiple answers are valid; this suppresses the \"Type something.\" row. Provide an options[].preview markdown string when an option benefits from richer side-by-side context (mockups, code snippets, diagrams, configs) — single-select only. NOTE: any non-empty preview on a single-select question ALSO suppresses the \"Type something.\" row (no room in the side-by-side layout); \"Chat about this\" remains the escape hatch. If you recommend a specific option, make it the first option and append \"(Recommended)\" to its label.`,\n\t\"Do not stack multiple ask_user_question calls back-to-back — group all clarifying questions into one invocation.\",\n];\n\nexport function createAskUserQuestionToolDefinition(): ToolDefinition<typeof QuestionParamsSchema, unknown> {\n\tconst guidance = validateGuidanceFields(loadConfig().guidance);\n\treturn {\n\t\tname: \"ask_user_question\",\n\t\tlabel: \"Ask User Question\",\n\t\tdescription: `Ask the user one or more structured questions during execution. Use when you need to:\n1. Gather user preferences or requirements\n2. Clarify ambiguous instructions\n3. Get decisions on implementation choices as you work\n4. Offer choices to the user about what direction to take\n\nUsage notes:\n- Users will always be able to type a custom answer (\"Type something.\" row is appended automatically to every single-select question) or pick \"Chat about this\" to abandon the questionnaire and continue in free-form conversation. Do NOT author \"Other\" / \"Type something.\" / \"Chat about this\" labels yourself — duplicates are rejected at runtime.\n- Use multiSelect: true to allow multiple answers to be selected for a question. The \"Type something.\" row is suppressed on multi-select questions, and is ALSO suppressed on single-select questions where any option carries a \\`preview\\` (the side-by-side layout has no room for inline custom text — \"Chat about this\" remains as the free-form escape hatch).\n- If you recommend a specific option, make that the first option in the list and add \"(Recommended)\" at the end of the label.\n\nPreview feature:\nUse the optional \\`preview\\` field on options when presenting concrete artifacts that users need to visually compare:\n- ASCII mockups of UI layouts or components\n- Code snippets showing different implementations\n- Diagram variations\n- Configuration examples\n\nPreview content is rendered as markdown in a monospace box. Multi-line text with newlines is supported. When any option has a preview, the UI switches to a side-by-side layout with a vertical option list on the left and preview on the right. Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect).`,\n\t\tpromptSnippet: guidance.promptSnippet ?? DEFAULT_PROMPT_SNIPPET,\n\t\tpromptGuidelines: guidance.promptGuidelines ?? DEFAULT_PROMPT_GUIDELINES,\n\t\tparameters: QuestionParamsSchema,\n\n\t\tasync execute(_toolCallId, params, signal, _onUpdate, ctx) {\n\t\t\tconst typed = params as unknown as QuestionParams;\n\t\t\tif (!ctx.hasUI) return buildToolResult(ERROR_NO_UI, { answers: [], cancelled: true, error: \"no_ui\" });\n\n\t\t\tconst validation = validateQuestionnaire(typed);\n\t\t\tif (!validation.ok) {\n\t\t\t\treturn buildToolResult(validation.message, {\n\t\t\t\t\tanswers: [],\n\t\t\t\t\tcancelled: true,\n\t\t\t\t\terror: validation.error,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst itemsByTab: WrappingSelectItem[][] = typed.questions.map((q) => buildItemsForQuestion(q));\n\n\t\t\t// Suspend the animated working loader for the lifetime of the blocking dialog.\n\t\t\t//\n\t\t\t// The questionnaire mounts inline, directly below the status/working-loader row.\n\t\t\t// That loader ticks every ~80ms and calls `requestRender()` on each frame. On a\n\t\t\t// short terminal the (tall) side-by-side dialog pushes the loader line above the\n\t\t\t// viewport top, so pi-tui's differential renderer sees `firstChanged < viewportTop`\n\t\t\t// and falls back to a full clear+replay (`\\x1b[2J\\x1b[H\\x1b[3J`) on every tick. The\n\t\t\t// transcript is replayed before the dialog each time, which is the flicker. The\n\t\t\t// loader conveys nothing while we're blocked on human input, so hide it for the\n\t\t\t// duration and restore it once the dialog closes (on every path).\n\t\t\t//\n\t\t\t// Guarded: some hosts (e.g. the workflow stage-UI broker) pass a minimal UI\n\t\t\t// context that only implements `custom`, so treat a missing loader control as a\n\t\t\t// no-op rather than throwing.\n\t\t\tctx.ui.setWorkingVisible?.(false);\n\t\t\ttry {\n\t\t\t\tconst result = await ctx.ui.custom<QuestionnaireResult>((tui, theme, _kb, done) => {\n\t\t\t\t\tconst session = new QuestionnaireSession({\n\t\t\t\t\t\ttui,\n\t\t\t\t\t\ttheme,\n\t\t\t\t\t\tparams: typed,\n\t\t\t\t\t\titemsByTab,\n\t\t\t\t\t\tdone,\n\t\t\t\t\t});\n\t\t\t\t\treturn session.component;\n\t\t\t\t}, { signal });\n\n\t\t\t\treturn buildQuestionnaireResponse(result, typed);\n\t\t\t} finally {\n\t\t\t\tctx.ui.setWorkingVisible?.(true);\n\t\t\t}\n\t\t},\n\t};\n}\n\nexport { buildQuestionnaireResponse, buildToolResult };\n"]}
1
+ {"version":3,"file":"ask-user-question.js","sourceRoot":"","sources":["../../../../src/core/tools/ask-user-question/ask-user-question.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC1F,OAAO,EACN,WAAW,EACX,aAAa,EACb,WAAW,EAIX,oBAAoB,GACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAGzE,MAAM,WAAW,GAAG,2DAA2D,CAAC;AAEhF,MAAM,UAAU,qBAAqB,CAAC,QAAsB;IAC3D,MAAM,KAAK,GAAyB,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAChE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,WAAW,EAAE,CAAC,CAAC,WAAW;KAC1B,CAAC,CAAC,CAAC;IACJ,MAAM,aAAa,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC1G,KAAK,MAAM,IAAI,IAAI,iBAAiB,CAAC,QAAQ,EAAE,aAAa,CAAC,EAAE,CAAC;QAC/D,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,CAAC,IAAI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AAC;YACJ,CAAC;YAED,MAAM,UAAU,GAA2B,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;YAEhG,+EAA+E;YAC/E,EAAE;YACF,iFAAiF;YACjF,gFAAgF;YAChF,iFAAiF;YACjF,oFAAoF;YACpF,oFAAoF;YACpF,gFAAgF;YAChF,gFAAgF;YAChF,kEAAkE;YAClE,EAAE;YACF,4EAA4E;YAC5E,gFAAgF;YAChF,8BAA8B;YAC9B,GAAG,CAAC,EAAE,CAAC,iBAAiB,EAAE,CAAC,KAAK,CAAC,CAAC;YAClC,IAAI,CAAC;gBACJ,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,MAAM,CAAsB,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;oBACjF,MAAM,OAAO,GAAG,IAAI,oBAAoB,CAAC;wBACxC,GAAG;wBACH,KAAK;wBACL,MAAM,EAAE,KAAK;wBACb,UAAU;wBACV,IAAI;qBACJ,CAAC,CAAC;oBACH,OAAO,OAAO,CAAC,SAAS,CAAC;gBAC1B,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;gBAEf,OAAO,0BAA0B,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;YAClD,CAAC;oBAAS,CAAC;gBACV,GAAG,CAAC,EAAE,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,CAAC;YAClC,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC;AAED,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,CAAC","sourcesContent":["import type { ToolDefinition } from \"../../extensions/types.ts\";\nimport { loadConfig, validateGuidanceFields } from \"./config.ts\";\nimport { QuestionnaireSession } from \"./state/questionnaire-session.ts\";\nimport { ROW_INTENT_META, sentinelsToAppend } from \"./state/row-intent.ts\";\nimport { buildQuestionnaireResponse, buildToolResult } from \"./tool/response-envelope.ts\";\nimport {\n\tMAX_OPTIONS,\n\tMAX_QUESTIONS,\n\tMIN_OPTIONS,\n\ttype QuestionData,\n\ttype QuestionnaireResult,\n\ttype QuestionParams,\n\tQuestionParamsSchema,\n} from \"./tool/types.ts\";\nimport { validateQuestionnaire } from \"./tool/validate-questionnaire.ts\";\nimport type { WrappingSelectItem } from \"./view/components/wrapping-select.ts\";\n\nconst ERROR_NO_UI = \"Error: UI not available (running in non-interactive mode)\";\n\nexport function buildItemsForQuestion(question: QuestionData): WrappingSelectItem[] {\n\tconst items: WrappingSelectItem[] = question.options.map((o) => ({\n\t\tkind: \"option\",\n\t\tlabel: o.label,\n\t\tdescription: o.description,\n\t}));\n\tconst hasAnyPreview = question.options.some((o) => typeof o.preview === \"string\" && o.preview.length > 0);\n\tfor (const kind of sentinelsToAppend(question, hasAnyPreview)) {\n\t\titems.push({ kind, label: ROW_INTENT_META[kind].label });\n\t}\n\treturn items;\n}\n\nexport const DEFAULT_PROMPT_SNIPPET = `Ask the user up to ${MAX_QUESTIONS} structured questions (${MIN_OPTIONS}-${MAX_OPTIONS} options each) when requirements are ambiguous`;\nexport const DEFAULT_PROMPT_GUIDELINES: string[] = [\n\t`Use ask_user_question whenever the user's request is underspecified and you cannot proceed without concrete decisions — you can ask up to ${MAX_QUESTIONS} questions per invocation.`,\n\t`Each question MUST have ${MIN_OPTIONS}-${MAX_OPTIONS} options. Every option requires a concise label (1-5 words) and a description explaining what the choice means or its trade-offs. The user can additionally type a custom answer (\"Type something.\" row is appended automatically to single-select questions) or pick \"Chat about this\" to abandon the questionnaire.`,\n\t`Set multiSelect: true when multiple answers are valid; this suppresses the \"Type something.\" row. Provide an options[].preview markdown string when an option benefits from richer side-by-side context (mockups, code snippets, diagrams, configs) — single-select only. NOTE: any non-empty preview on a single-select question ALSO suppresses the \"Type something.\" row (no room in the side-by-side layout); \"Chat about this\" remains the escape hatch. If you recommend a specific option, make it the first option and append \"(Recommended)\" to its label.`,\n\t\"Do not stack multiple ask_user_question calls back-to-back — group all clarifying questions into one invocation.\",\n];\n\nexport function createAskUserQuestionToolDefinition(): ToolDefinition<typeof QuestionParamsSchema, unknown> {\n\tconst guidance = validateGuidanceFields(loadConfig().guidance);\n\treturn {\n\t\tname: \"ask_user_question\",\n\t\tlabel: \"Ask User Question\",\n\t\tdescription: `Ask the user one or more structured questions during execution. Use when you need to:\n1. Gather user preferences or requirements\n2. Clarify ambiguous instructions\n3. Get decisions on implementation choices as you work\n4. Offer choices to the user about what direction to take\n\nUsage notes:\n- Users will always be able to type a custom answer (\"Type something.\" row is appended automatically to every single-select question) or pick \"Chat about this\" to abandon the questionnaire and continue in free-form conversation. Do NOT author \"Other\" / \"Type something.\" / \"Chat about this\" labels yourself — duplicates are rejected at runtime.\n- Use multiSelect: true to allow multiple answers to be selected for a question. The \"Type something.\" row is suppressed on multi-select questions, and is ALSO suppressed on single-select questions where any option carries a \\`preview\\` (the side-by-side layout has no room for inline custom text — \"Chat about this\" remains as the free-form escape hatch).\n- If you recommend a specific option, make that the first option in the list and add \"(Recommended)\" at the end of the label.\n\nPreview feature:\nUse the optional \\`preview\\` field on options when presenting concrete artifacts that users need to visually compare:\n- ASCII mockups of UI layouts or components\n- Code snippets showing different implementations\n- Diagram variations\n- Configuration examples\n\nPreview content is rendered as markdown in a monospace box. Multi-line text with newlines is supported. When any option has a preview, the UI switches to a side-by-side layout with a vertical option list on the left and preview on the right. Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect).`,\n\t\tpromptSnippet: guidance.promptSnippet ?? DEFAULT_PROMPT_SNIPPET,\n\t\tpromptGuidelines: guidance.promptGuidelines ?? DEFAULT_PROMPT_GUIDELINES,\n\t\tparameters: QuestionParamsSchema,\n\n\t\tasync execute(_toolCallId, params, signal, _onUpdate, ctx) {\n\t\t\tconst typed = params as unknown as QuestionParams;\n\t\t\tif (!ctx.hasUI) return buildToolResult(ERROR_NO_UI, { answers: [], cancelled: true, error: \"no_ui\" });\n\n\t\t\tconst validation = validateQuestionnaire(typed);\n\t\t\tif (!validation.ok) {\n\t\t\t\treturn buildToolResult(validation.message, {\n\t\t\t\t\tanswers: [],\n\t\t\t\t\tcancelled: true,\n\t\t\t\t\terror: validation.error,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst itemsByTab: WrappingSelectItem[][] = typed.questions.map((q) => buildItemsForQuestion(q));\n\n\t\t\t// Suspend the animated working loader for the lifetime of the blocking dialog.\n\t\t\t//\n\t\t\t// The questionnaire mounts inline, directly below the status/working-loader row.\n\t\t\t// That loader ticks every ~88ms and calls `requestRender()` on each frame. On a\n\t\t\t// short terminal the (tall) side-by-side dialog pushes the loader line above the\n\t\t\t// viewport top, so pi-tui's differential renderer sees `firstChanged < viewportTop`\n\t\t\t// and falls back to a full clear+replay (`\\x1b[2J\\x1b[H\\x1b[3J`) on every tick. The\n\t\t\t// transcript is replayed before the dialog each time, which is the flicker. The\n\t\t\t// loader conveys nothing while we're blocked on human input, so hide it for the\n\t\t\t// duration and restore it once the dialog closes (on every path).\n\t\t\t//\n\t\t\t// Guarded: some hosts (e.g. the workflow stage-UI broker) pass a minimal UI\n\t\t\t// context that only implements `custom`, so treat a missing loader control as a\n\t\t\t// no-op rather than throwing.\n\t\t\tctx.ui.setWorkingVisible?.(false);\n\t\t\ttry {\n\t\t\t\tconst result = await ctx.ui.custom<QuestionnaireResult>((tui, theme, _kb, done) => {\n\t\t\t\t\tconst session = new QuestionnaireSession({\n\t\t\t\t\t\ttui,\n\t\t\t\t\t\ttheme,\n\t\t\t\t\t\tparams: typed,\n\t\t\t\t\t\titemsByTab,\n\t\t\t\t\t\tdone,\n\t\t\t\t\t});\n\t\t\t\t\treturn session.component;\n\t\t\t\t}, { signal });\n\n\t\t\t\treturn buildQuestionnaireResponse(result, typed);\n\t\t\t} finally {\n\t\t\t\tctx.ui.setWorkingVisible?.(true);\n\t\t\t}\n\t\t},\n\t};\n}\n\nexport { buildQuestionnaireResponse, buildToolResult };\n"]}
@@ -0,0 +1,13 @@
1
+ import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
2
+ import type { Api, Model } from "@earendil-works/pi-ai/compat";
3
+ import type { ReadonlySessionManager } from "../session-manager.ts";
4
+ export interface BashSessionContext {
5
+ sessionManager: ReadonlySessionManager;
6
+ model: Model<Api> | undefined;
7
+ thinkingLevel?: ThinkingLevel;
8
+ }
9
+ /** Capture one internally consistent session snapshot at command execution time. */
10
+ export declare function snapshotBashSessionEnvironment(context: BashSessionContext | undefined, exposeSessionEnvironment: boolean): NodeJS.ProcessEnv;
11
+ /** Overlay named session metadata while preserving every unrelated caller variable verbatim. */
12
+ export declare function applyBashSessionEnvironment(env: NodeJS.ProcessEnv, snapshot: NodeJS.ProcessEnv): void;
13
+ //# sourceMappingURL=bash-session-environment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bash-session-environment.d.ts","sourceRoot":"","sources":["../../../src/core/tools/bash-session-environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAOpE,MAAM,WAAW,kBAAkB;IAClC,cAAc,EAAE,sBAAsB,CAAC;IACvC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IAC9B,aAAa,CAAC,EAAE,aAAa,CAAC;CAC9B;AAED,oFAAoF;AACpF,wBAAgB,8BAA8B,CAC7C,OAAO,EAAE,kBAAkB,GAAG,SAAS,EACvC,wBAAwB,EAAE,OAAO,GAC/B,MAAM,CAAC,UAAU,CAqBnB;AAED,gGAAgG;AAChG,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,UAAU,GAAG,IAAI,CAGrG"}