@bastani/atomic 0.9.80-alpha.1 → 0.9.81-alpha.1

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 (153) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/dist/builtin/intercom/CHANGELOG.md +6 -0
  3. package/dist/builtin/intercom/broker/client.ts +12 -1
  4. package/dist/builtin/intercom/index.bundle.mjs +16 -4
  5. package/dist/builtin/intercom/package.json +1 -1
  6. package/dist/builtin/mcp/package.json +1 -1
  7. package/dist/builtin/subagents/CHANGELOG.md +10 -0
  8. package/dist/builtin/subagents/package.json +1 -1
  9. package/dist/builtin/subagents/skills/agent-desktop/SKILL.md +40 -2
  10. package/dist/builtin/subagents/src/extension/index.bundle.mjs +123 -25
  11. package/dist/builtin/web-access/package.json +1 -1
  12. package/dist/builtin/workflows/CHANGELOG.md +20 -0
  13. package/dist/builtin/workflows/builtin/{chunk-m56qhe4b.js → chunk-zpkcqyhr.js} +2 -0
  14. package/dist/builtin/workflows/builtin/index.js +1 -1
  15. package/dist/builtin/workflows/builtin/ralph.js +1 -1
  16. package/dist/builtin/workflows/package.json +1 -1
  17. package/dist/builtin/workflows/src/extension/index.bundle.mjs +16 -4
  18. package/dist/builtin/workflows/src/extension/local-worker-entry.mjs +12 -2
  19. package/dist/builtin/workflows/src/index.js +12 -2
  20. package/dist/builtin/workflows/src/local-worker-entry.mjs +12 -2
  21. package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +8 -1
  22. package/dist/cli/args.d.ts.map +1 -1
  23. package/dist/cli/args.js +4 -2
  24. package/dist/cli/args.js.map +1 -1
  25. package/dist/core/cache-stats.d.ts +21 -0
  26. package/dist/core/cache-stats.d.ts.map +1 -1
  27. package/dist/core/cache-stats.js +42 -2
  28. package/dist/core/cache-stats.js.map +1 -1
  29. package/dist/core/exec.d.ts +1 -0
  30. package/dist/core/exec.d.ts.map +1 -1
  31. package/dist/core/exec.js +2 -1
  32. package/dist/core/exec.js.map +1 -1
  33. package/dist/core/execution-model-router.d.ts +17 -0
  34. package/dist/core/execution-model-router.d.ts.map +1 -1
  35. package/dist/core/execution-model-router.js +52 -23
  36. package/dist/core/execution-model-router.js.map +1 -1
  37. package/dist/core/model-fallback-failures.d.ts.map +1 -1
  38. package/dist/core/model-fallback-failures.js +1 -0
  39. package/dist/core/model-fallback-failures.js.map +1 -1
  40. package/dist/core/model-resolver-scope.d.ts +0 -1
  41. package/dist/core/model-resolver-scope.d.ts.map +1 -1
  42. package/dist/core/model-resolver-scope.js +0 -8
  43. package/dist/core/model-resolver-scope.js.map +1 -1
  44. package/dist/core/model-resolver.d.ts +1 -1
  45. package/dist/core/model-resolver.d.ts.map +1 -1
  46. package/dist/core/model-resolver.js +1 -1
  47. package/dist/core/model-resolver.js.map +1 -1
  48. package/dist/core/model-routing-candidates.d.ts +30 -5
  49. package/dist/core/model-routing-candidates.d.ts.map +1 -1
  50. package/dist/core/model-routing-candidates.js +381 -105
  51. package/dist/core/model-routing-candidates.js.map +1 -1
  52. package/dist/core/model-routing-estimates.d.ts +70 -0
  53. package/dist/core/model-routing-estimates.d.ts.map +1 -0
  54. package/dist/core/model-routing-estimates.js +244 -0
  55. package/dist/core/model-routing-estimates.js.map +1 -0
  56. package/dist/core/model-routing-needs.d.ts +1 -0
  57. package/dist/core/model-routing-needs.d.ts.map +1 -1
  58. package/dist/core/model-routing-needs.js +1 -1
  59. package/dist/core/model-routing-needs.js.map +1 -1
  60. package/dist/core/provider-display-names.js +2 -2
  61. package/dist/core/provider-display-names.js.map +1 -1
  62. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  63. package/dist/core/remote-catalog-provider.js +6 -0
  64. package/dist/core/remote-catalog-provider.js.map +1 -1
  65. package/dist/core/storage/session/released-history-files.d.ts.map +1 -1
  66. package/dist/core/storage/session/released-history-files.js +5 -0
  67. package/dist/core/storage/session/released-history-files.js.map +1 -1
  68. package/dist/core/tasks/supervisor.d.ts +1 -1
  69. package/dist/core/tasks/supervisor.d.ts.map +1 -1
  70. package/dist/core/tasks/supervisor.js.map +1 -1
  71. package/dist/core/tools/find.d.ts.map +1 -1
  72. package/dist/core/tools/find.js +20 -11
  73. package/dist/core/tools/find.js.map +1 -1
  74. package/dist/core/tools/output-accumulator.d.ts.map +1 -1
  75. package/dist/core/tools/output-accumulator.js +2 -1
  76. package/dist/core/tools/output-accumulator.js.map +1 -1
  77. package/dist/index.d.ts +1 -1
  78. package/dist/index.d.ts.map +1 -1
  79. package/dist/index.js.map +1 -1
  80. package/dist/main.d.ts.map +1 -1
  81. package/dist/main.js +30 -10
  82. package/dist/main.js.map +1 -1
  83. package/dist/modes/interactive/components/chat-session-host-actions.d.ts +5 -0
  84. package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
  85. package/dist/modes/interactive/components/chat-session-host-actions.js +86 -9
  86. package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
  87. package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
  88. package/dist/modes/interactive/components/chat-session-host-events.js +6 -3
  89. package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
  90. package/dist/modes/interactive/components/chat-session-host-rendering.d.ts.map +1 -1
  91. package/dist/modes/interactive/components/chat-session-host-rendering.js +5 -2
  92. package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
  93. package/dist/modes/interactive/components/chat-session-host-state.d.ts +5 -0
  94. package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
  95. package/dist/modes/interactive/components/chat-session-host-state.js +2 -0
  96. package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
  97. package/dist/modes/interactive/components/footer.d.ts +4 -2
  98. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  99. package/dist/modes/interactive/components/footer.js +11 -4
  100. package/dist/modes/interactive/components/footer.js.map +1 -1
  101. package/dist/modes/interactive/components/session-selector-list.d.ts +4 -1
  102. package/dist/modes/interactive/components/session-selector-list.d.ts.map +1 -1
  103. package/dist/modes/interactive/components/session-selector-list.js +24 -1
  104. package/dist/modes/interactive/components/session-selector-list.js.map +1 -1
  105. package/dist/modes/interactive/components/session-selector.d.ts +1 -0
  106. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  107. package/dist/modes/interactive/components/session-selector.js +29 -36
  108. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  109. package/dist/modes/interactive/interactive-agent-events.js +6 -6
  110. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  111. package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
  112. package/dist/modes/interactive/interactive-deferred-startup.js +11 -3
  113. package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
  114. package/dist/modes/interactive/interactive-input-handling.js +11 -1
  115. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  116. package/dist/modes/interactive/interactive-mode-deps.d.ts +1 -1
  117. package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
  118. package/dist/modes/interactive/interactive-mode-deps.js +1 -1
  119. package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
  120. package/dist/modes/interactive/interactive-process-lifecycle.js +34 -7
  121. package/dist/modes/interactive/interactive-process-lifecycle.js.map +1 -1
  122. package/dist/modes/interactive/interactive-queueing.d.ts +24 -0
  123. package/dist/modes/interactive/interactive-queueing.d.ts.map +1 -1
  124. package/dist/modes/interactive/interactive-queueing.js +61 -0
  125. package/dist/modes/interactive/interactive-queueing.js.map +1 -1
  126. package/dist/modes/interactive/interactive-render-chat.js +2 -3
  127. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  128. package/dist/modes/interactive/interactive-slash-commands.js +2 -2
  129. package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
  130. package/dist/modes/interactive-engine/isolated-runtime.d.ts +2 -0
  131. package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
  132. package/dist/modes/interactive-engine/isolated-runtime.js +10 -0
  133. package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
  134. package/dist/modes/rpc/rpc-mode.d.ts +2 -0
  135. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  136. package/dist/modes/rpc/rpc-mode.js +1 -0
  137. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  138. package/dist/modes/rpc/rpc-session-binding.d.ts +3 -1
  139. package/dist/modes/rpc/rpc-session-binding.d.ts.map +1 -1
  140. package/dist/modes/rpc/rpc-session-binding.js +4 -1
  141. package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
  142. package/docs/background-tasks.md +2 -2
  143. package/docs/extensions/api-reference.md +1 -1
  144. package/docs/models/model-selection.md +7 -7
  145. package/docs/providers.md +12 -17
  146. package/docs/skills.md +1 -1
  147. package/docs/subagents.md +3 -1
  148. package/docs/tools.md +1 -1
  149. package/docs/usage.md +1 -1
  150. package/docs/workflows/authoring.md +2 -0
  151. package/docs/workflows/operations.md +1 -1
  152. package/npm-shrinkwrap.json +57 -33
  153. package/package.json +3 -3
@@ -21,6 +21,7 @@ interface RpcSessionBindingOptions {
21
21
  requestShutdown: () => void;
22
22
  checkShutdownRequested?: () => void;
23
23
  reloadCoordinator?: KeybindingsReloadCoordinator<AgentSession>;
24
+ onStartupReload?: (session: AgentSession) => Promise<void>;
24
25
  }
25
26
  export declare class RpcSessionBinding {
26
27
  private session;
@@ -41,8 +42,9 @@ export declare class RpcSessionBinding {
41
42
  private readonly requestShutdown;
42
43
  private readonly checkShutdownRequested;
43
44
  private readonly reloadCoordinator;
45
+ private readonly onStartupReload;
44
46
  private footerDataProvider;
45
- constructor({ runtimeHost, output, pendingExtensionRequests, extensionUICapabilities, requestShutdown, checkShutdownRequested, customUi, renderService, sessionPicker, inputForm, writeEngineLine, reloadCoordinator, }: RpcSessionBindingOptions);
47
+ constructor({ runtimeHost, output, pendingExtensionRequests, extensionUICapabilities, requestShutdown, checkShutdownRequested, customUi, renderService, sessionPicker, inputForm, writeEngineLine, reloadCoordinator, onStartupReload, }: RpcSessionBindingOptions);
46
48
  private createProjectTrustContext;
47
49
  get currentSession(): AgentSession;
48
50
  rebindSession(): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"rpc-session-binding.d.ts","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-session-binding.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAI/E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gDAAgD,CAAC;AAIjG,OAAO,EAEN,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,UAAU,wBAAwB;IACjC,WAAW,EAAE,mBAAmB,CAAC;IACjC,MAAM,EAAE,SAAS,CAAC;IAClB,wBAAwB,EAAE,2BAA2B,CAAC;IACtD,uBAAuB,CAAC,EAAE,0BAA0B,CAAC;IACrD,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC,aAAa,CAAC,EAAE,0BAA0B,CAAC;IAC3C,SAAS,CAAC,EAAE,sBAAsB,CAAC;IACnC,4FAA4F;IAC5F,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,iBAAiB,CAAC,E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CAAC,IAAI,CAAC,CA+FnC;IAED,wGAAwG;IAClG,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAmB3C;IAED,oBAAoB,IAAI,IAAI,CAkB3B;CACD"}
@@ -25,8 +25,9 @@ export class RpcSessionBinding {
25
25
  requestShutdown;
26
26
  checkShutdownRequested;
27
27
  reloadCoordinator;
28
+ onStartupReload;
28
29
  footerDataProvider;
29
- constructor({ runtimeHost, output, pendingExtensionRequests, extensionUICapabilities, requestShutdown, checkShutdownRequested, customUi, renderService, sessionPicker, inputForm, writeEngineLine, reloadCoordinator, }) {
30
+ constructor({ runtimeHost, output, pendingExtensionRequests, extensionUICapabilities, requestShutdown, checkShutdownRequested, customUi, renderService, sessionPicker, inputForm, writeEngineLine, reloadCoordinator, onStartupReload, }) {
30
31
  this.runtimeHost = runtimeHost;
31
32
  this.output = output;
32
33
  this.pendingExtensionRequests = pendingExtensionRequests;
@@ -39,6 +40,7 @@ export class RpcSessionBinding {
39
40
  this.inputForm = inputForm;
40
41
  this.writeEngineLine = writeEngineLine;
41
42
  this.reloadCoordinator = reloadCoordinator;
43
+ this.onStartupReload = onStartupReload;
42
44
  this.session = runtimeHost.session;
43
45
  this.runtimeHost.setProjectTrustContextFactory?.((cwd) => this.createProjectTrustContext(cwd));
44
46
  }
@@ -172,6 +174,7 @@ export class RpcSessionBinding {
172
174
  try {
173
175
  if (!(await this.runtimeHost.completeStartup?.())) {
174
176
  await session.reload({ reason: "startup" });
177
+ await this.onStartupReload?.(session);
175
178
  }
176
179
  }
177
180
  finally {
@@ -1 +1 @@
1
- {"version":3,"file":"rpc-session-binding.js","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-session-binding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAK1E,O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CACrB,iCAAiC,CAAC;YACjC,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE;SACrE,CAAC,CACF,CAAC;QACF,IAAI,CAAC,kBAAkB,EAAE,OAAO,EAAE,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,uBAAuB,GAAG,SAAS,CAAC;QACzC,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;IACrC,CAAC;CACD","sourcesContent":["import { setCapabilityOverrides } from \"@earendil-works/pi-tui\";\nimport type { AgentSession } from \"../../core/agent-session.js\";\nimport type { AgentSessionRuntime } from \"../../core/agent-session-runtime.ts\";\nimport type { ProjectTrustContext } from \"../../core/extensions/index.js\";\nimport { FooterDataProvider } from \"../../core/footer-data-provider.ts\";\nimport { waitForRawStdoutBackpressure } from \"../../core/output-guard.ts\";\nimport type { EngineCustomUiService } from \"../interactive-engine/engine-custom-ui.ts\";\nimport type { EngineInputFormService } from \"../interactive-engine/engine-input-form.ts\";\nimport type { EngineRenderService } from \"../interactive-engine/engine-render-service.ts\";\nimport type { EngineSessionPickerService } from \"../interactive-engine/engine-session-picker.ts\";\nimport { forwardWorkflowActivity } from \"../interactive-engine/engine-workflow-activity.ts\";\nimport { serializeInteractiveEngineMessage } from \"../interactive-engine/protocol.ts\";\nimport { toJsonEvent } from \"../json-event.ts\";\nimport {\n\tcreateRpcExtensionUIContext,\n\ttype RpcExtensionUICapabilities,\n\ttype RpcPendingExtensionRequests,\n} from \"./rpc-extension-ui.ts\";\nimport type { KeybindingsReloadCoordinator } from \"./rpc-keybindings-reload.ts\";\nimport type { RpcOutput } from \"./rpc-responses.ts\";\nimport { bindEngineTaskWidget } from \"./task-ui-bridge.js\";\n\ninterface RpcSessionBindingOptions {\n\truntimeHost: AgentSessionRuntime;\n\toutput: RpcOutput;\n\tpendingExtensionRequests: RpcPendingExtensionRequests;\n\textensionUICapabilities?: RpcExtensionUICapabilities;\n\tcustomUi?: EngineCustomUiService;\n\trenderService?: EngineRenderService;\n\tsessionPicker?: EngineSessionPickerService;\n\tinputForm?: EngineInputFormService;\n\t/** Present in the interactive engine child, which reports workflow activity to its host. */\n\twriteEngineLine?: (line: string) => void;\n\trequestShutdown: () => void;\n\tcheckShutdownRequested?: () => void;\n\treloadCoordinator?: KeybindingsReloadCoordinator<AgentSession>;\n}\n\nexport class RpcSessionBinding {\n\tprivate session: AgentSession;\n\tprivate boundRunner: AgentSession[\"extensionRunner\"] | undefined;\n\tprivate unsubscribe?: () => void;\n\tprivate unsubscribeBackpressure?: () => void;\n\tprivate unsubscribeTasks?: () => void;\n\tprivate unsubscribeWorkflowActivity?: () => void;\n\tprivate readonly runtimeHost: AgentSessionRuntime;\n\tprivate readonly output: RpcOutput;\n\tprivate readonly pendingExtensionRequests: RpcPendingExtensionRequests;\n\tprivate readonly extensionUICapabilities: RpcExtensionUICapabilities | undefined;\n\tprivate readonly customUi: EngineCustomUiService | undefined;\n\tprivate readonly renderService: EngineRenderService | undefined;\n\tprivate readonly sessionPicker: EngineSessionPickerService | undefined;\n\tprivate readonly inputForm: EngineInputFormService | undefined;\n\tprivate readonly writeEngineLine: ((line: string) => void) | undefined;\n\tprivate readonly requestShutdown: () => void;\n\tprivate readonly checkShutdownRequested: (() => void) | undefined;\n\tprivate readonly reloadCoordinator: KeybindingsReloadCoordinator<AgentSession> | undefined;\n\n\tprivate footerDataProvider: FooterDataProvider | undefined;\n\tconstructor({\n\t\truntimeHost,\n\t\toutput,\n\t\tpendingExtensionRequests,\n\t\textensionUICapabilities,\n\t\trequestShutdown,\n\t\tcheckShutdownRequested,\n\t\tcustomUi,\n\t\trenderService,\n\t\tsessionPicker,\n\t\tinputForm,\n\t\twriteEngineLine,\n\t\treloadCoordinator,\n\t}: RpcSessionBindingOptions) {\n\t\tthis.runtimeHost = runtimeHost;\n\t\tthis.output = output;\n\t\tthis.pendingExtensionRequests = pendingExtensionRequests;\n\t\tthis.extensionUICapabilities = extensionUICapabilities;\n\t\tthis.requestShutdown = requestShutdown;\n\t\tthis.checkShutdownRequested = checkShutdownRequested;\n\t\tthis.customUi = customUi;\n\t\tthis.renderService = renderService;\n\t\tthis.sessionPicker = sessionPicker;\n\t\tthis.inputForm = inputForm;\n\t\tthis.writeEngineLine = writeEngineLine;\n\t\tthis.reloadCoordinator = reloadCoordinator;\n\t\tthis.session = runtimeHost.session;\n\t\tthis.runtimeHost.setProjectTrustContextFactory?.((cwd) => this.createProjectTrustContext(cwd));\n\t}\n\n\tprivate createProjectTrustContext(cwd: string): ProjectTrustContext {\n\t\tconst runner = this.runtimeHost.session.extensionRunner;\n\t\tconst ui = runner.getUIContext();\n\t\tconst hasUI = this.customUi !== undefined;\n\t\treturn {\n\t\t\tcwd,\n\t\t\tmode: hasUI ? \"tui\" : \"rpc\",\n\t\t\thasUI,\n\t\t\tui: {\n\t\t\t\tselect: (title, options, opts) =>\n\t\t\t\t\thasUI\n\t\t\t\t\t\t? runner.withProjectTrustPrompt(\"select\", title, () => ui.select(title, options, opts))\n\t\t\t\t\t\t: Promise.resolve(undefined),\n\t\t\t\tconfirm: (title, message, opts) =>\n\t\t\t\t\thasUI\n\t\t\t\t\t\t? runner.withProjectTrustPrompt(\"confirm\", title, () => ui.confirm(title, message, opts))\n\t\t\t\t\t\t: Promise.resolve(false),\n\t\t\t\tinput: (title, placeholder, opts) =>\n\t\t\t\t\thasUI\n\t\t\t\t\t\t? runner.withProjectTrustPrompt(\"input\", title, () => ui.input(title, placeholder, opts))\n\t\t\t\t\t\t: Promise.resolve(undefined),\n\t\t\t\tnotify: (message, type) => ui.notify(message, type),\n\t\t\t},\n\t\t};\n\t}\n\n\tget currentSession(): AgentSession {\n\t\treturn this.session;\n\t}\n\n\tasync rebindSession(): Promise<void> {\n\t\tif (this.session === this.runtimeHost.session && this.boundRunner === this.session.extensionRunner) return;\n\t\tthis.session = this.runtimeHost.session;\n\t\tthis.disposeSubscriptions();\n\t\tconst session = this.session;\n\t\tsetCapabilityOverrides(session.settingsManager.getTerminalCapabilityOverrides());\n\t\tthis.renderService?.bindSession(session);\n\t\tthis.footerDataProvider = new FooterDataProvider(session.sessionManager.getCwd());\n\t\t// Seed the provider count from the current catalog snapshot, mirroring\n\t\t// updateProviderCountFromSnapshot() in interactive startup, so the\n\t\t// embedded footer shows the (provider) model prefix in multi-provider\n\t\t// sessions instead of defaulting to 0.\n\t\tconst models =\n\t\t\tsession.scopedModels.length > 0\n\t\t\t\t? session.scopedModels.map((scoped) => scoped.model)\n\t\t\t\t: session.modelRuntime.getAvailableSnapshot();\n\t\tthis.footerDataProvider.setAvailableProviderCount(new Set(models.map((model) => model.provider)).size);\n\n\t\ttry {\n\t\t\tawait session.bindExtensions({\n\t\t\t\tonUIPrompt: (event) => {\n\t\t\t\t\tif (event.reason === \"ui_prompt\") {\n\t\t\t\t\t\tthis.writeEngineLine?.(serializeInteractiveEngineMessage({ type: \"engine_ui_prompt\", event }));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tuiContext: createRpcExtensionUIContext({\n\t\t\t\t\toutput: this.output,\n\t\t\t\t\tpendingExtensionRequests: this.pendingExtensionRequests,\n\t\t\t\t\tcustomUi: this.customUi,\n\t\t\t\t\tsessionPicker: this.sessionPicker,\n\t\t\t\t\tinputForm: this.inputForm,\n\t\t\t\t\tfooterDataProvider: this.footerDataProvider,\n\t\t\t\t\tcapabilities: this.extensionUICapabilities,\n\t\t\t\t}),\n\t\t\t\tmode: this.customUi ? \"tui\" : \"rpc\",\n\t\t\t\tcommandContextActions: {\n\t\t\t\t\twaitForIdle: () => this.session.agent.waitForIdle(),\n\t\t\t\t\tnewSession: async (options) => this.runtimeHost.newSession(options),\n\t\t\t\t\tfork: async (entryId, forkOptions) => {\n\t\t\t\t\t\tconst result = await this.runtimeHost.fork(entryId, forkOptions);\n\t\t\t\t\t\treturn { cancelled: result.cancelled };\n\t\t\t\t\t},\n\t\t\t\t\tnavigateTree: async (targetId, options) => {\n\t\t\t\t\t\tconst result = await this.session.navigateTree(targetId, {\n\t\t\t\t\t\t\tsummarize: options?.summarize,\n\t\t\t\t\t\t\tcustomInstructions: options?.customInstructions,\n\t\t\t\t\t\t\treplaceInstructions: options?.replaceInstructions,\n\t\t\t\t\t\t\tlabel: options?.label,\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn { cancelled: result.cancelled };\n\t\t\t\t\t},\n\t\t\t\t\tswitchSession: async (sessionPath, options) => {\n\t\t\t\t\t\treturn this.runtimeHost.switchSession(sessionPath, options);\n\t\t\t\t\t},\n\t\t\t\t\treload: async () => {\n\t\t\t\t\t\tconst steeringMode = this.session.steeringMode;\n\t\t\t\t\t\tconst followUpMode = this.session.followUpMode;\n\t\t\t\t\t\tif (this.reloadCoordinator) await this.reloadCoordinator.reload(this.session);\n\t\t\t\t\t\telse await this.session.reload();\n\t\t\t\t\t\tthis.session.setSteeringMode(steeringMode);\n\t\t\t\t\t\tthis.session.setFollowUpMode(followUpMode);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tshutdownHandler: this.requestShutdown,\n\t\t\t\tonError: (err) => {\n\t\t\t\t\tthis.output({\n\t\t\t\t\t\ttype: \"extension_error\",\n\t\t\t\t\t\textensionPath: err.extensionPath,\n\t\t\t\t\t\tevent: err.event,\n\t\t\t\t\t\terror: err.error,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t});\n\t\t\tthis.footerDataProvider.startGitWatcher();\n\t\t} catch (error) {\n\t\t\t// Leave no partially-initialized footer state behind if extension\n\t\t\t// binding fails; dispose the provider and rethrow.\n\t\t\tthis.footerDataProvider.dispose();\n\t\t\tthis.footerDataProvider = undefined;\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (this.customUi) this.unsubscribeTasks = bindEngineTaskWidget(session, session.extensionRunner.getUIContext());\n\t\tif (this.writeEngineLine) {\n\t\t\tthis.unsubscribeWorkflowActivity = forwardWorkflowActivity(session, this.writeEngineLine);\n\t\t}\n\t\tthis.unsubscribe = session.subscribe((event) => {\n\t\t\tthis.output(toJsonEvent(event));\n\t\t\tif (event.type === \"agent_settled\") this.checkShutdownRequested?.();\n\t\t});\n\t\tthis.unsubscribeBackpressure = session.agent.subscribe(async () => {\n\t\t\tawait waitForRawStdoutBackpressure();\n\t\t});\n\t\tthis.reloadCoordinator?.publishCurrentState(session);\n\t\tthis.boundRunner = session.extensionRunner;\n\t}\n\n\t/** Load and atomically publish the optional resource set after the minimal interactive engine binds. */\n\tasync loadDeferredResources(): Promise<void> {\n\t\tconst session = this.session;\n\t\ttry {\n\t\t\tif (!(await this.runtimeHost.completeStartup?.())) {\n\t\t\t\tawait session.reload({ reason: \"startup\" });\n\t\t\t}\n\t\t} finally {\n\t\t\tfor (const extensionError of session.resourceLoader.getExtensions().errors) {\n\t\t\t\tthis.output({\n\t\t\t\t\ttype: \"extension_error\",\n\t\t\t\t\textensionPath: extensionError.path,\n\t\t\t\t\tevent: \"startup\",\n\t\t\t\t\terror: extensionError.error,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif (session !== this.session) return;\n\t\tthis.reloadCoordinator?.publishCurrentState(session);\n\t}\n\n\tdisposeSubscriptions(): void {\n\t\tthis.boundRunner = undefined;\n\t\tthis.unsubscribe?.();\n\t\tthis.unsubscribeBackpressure?.();\n\t\tthis.unsubscribeTasks?.();\n\t\tthis.unsubscribeTasks = undefined;\n\t\tthis.unsubscribeWorkflowActivity?.();\n\t\tthis.unsubscribeWorkflowActivity = undefined;\n\t\tthis.writeEngineLine?.(\n\t\t\tserializeInteractiveEngineMessage({\n\t\t\t\ttype: \"engine_ui_prompt\",\n\t\t\t\tevent: { type: \"ui_prompt_end\", reason: \"ui_prompt\", kind: \"custom\" },\n\t\t\t}),\n\t\t);\n\t\tthis.footerDataProvider?.dispose();\n\t\tthis.unsubscribe = undefined;\n\t\tthis.unsubscribeBackpressure = undefined;\n\t\tthis.footerDataProvider = undefined;\n\t}\n}\n"]}
1
+ {"version":3,"file":"rpc-session-binding.js","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-session-binding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAK1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mDAAmD,CAAC;AAC5F,OAAO,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACN,2BAA2B,GAG3B,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAmB3D,MAAM,OAAO,iBAAiB;IACrB,OAAO,CAAe;IACtB,WAAW,CAA8C;IACzD,WAAW,CAAc;IACzB,uBAAuB,CAAc;IACrC,gBAAgB,CAAc;IAC9B,2BAA2B,CAAc;IAChC,WAAW,CAAsB;IACjC,MAAM,CAAY;IAClB,wBAAwB,CAA8B;IACtD,uBAAuB,CAAyC;IAChE,QAAQ,CAAoC;IAC5C,aAAa,CAAkC;IAC/C,aAAa,CAAyC;IACtD,SAAS,CAAqC;IAC9C,eAAe,CAAuC;IACtD,eAAe,CAAa;IAC5B,sBAAsB,CAA2B;IACjD,iBAAiB,CAAyD;IAC1E,eAAe,CAAyD;IAEjF,kBAAkB,CAAiC;IAC3D,YAAY,EACX,WAAW,EACX,MAAM,EACN,wBAAwB,EACxB,uBAAuB,EACvB,eAAe,EACf,sBAAsB,EACtB,QAAQ,EACR,aAAa,EACb,aAAa,EACb,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,eAAe,GACW;QAC1B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB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AiB,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC;IAED,oBAAoB;QACnB,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACrB,IAAI,CAAC,uBAAuB,EAAE,EAAE,CAAC;QACjC,IAAI,CAAC,gBAAgB,EAAE,EAAE,CAAC;QAC1B,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;QAClC,IAAI,CAAC,2BAA2B,EAAE,EAAE,CAAC;QACrC,IAAI,CAAC,2BAA2B,GAAG,SAAS,CAAC;QAC7C,IAAI,CAAC,eAAe,EAAE,CACrB,iCAAiC,CAAC;YACjC,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE;SACrE,CAAC,CACF,CAAC;QACF,IAAI,CAAC,kBAAkB,EAAE,OAAO,EAAE,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,uBAAuB,GAAG,SAAS,CAAC;QACzC,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;IACrC,CAAC;CACD","sourcesContent":["import { setCapabilityOverrides } from \"@earendil-works/pi-tui\";\nimport type { AgentSession } from \"../../core/agent-session.js\";\nimport type { AgentSessionRuntime } from \"../../core/agent-session-runtime.ts\";\nimport type { ProjectTrustContext } from \"../../core/extensions/index.js\";\nimport { FooterDataProvider } from \"../../core/footer-data-provider.ts\";\nimport { waitForRawStdoutBackpressure } from \"../../core/output-guard.ts\";\nimport type { EngineCustomUiService } from \"../interactive-engine/engine-custom-ui.ts\";\nimport type { EngineInputFormService } from \"../interactive-engine/engine-input-form.ts\";\nimport type { EngineRenderService } from \"../interactive-engine/engine-render-service.ts\";\nimport type { EngineSessionPickerService } from \"../interactive-engine/engine-session-picker.ts\";\nimport { forwardWorkflowActivity } from \"../interactive-engine/engine-workflow-activity.ts\";\nimport { serializeInteractiveEngineMessage } from \"../interactive-engine/protocol.ts\";\nimport { toJsonEvent } from \"../json-event.ts\";\nimport {\n\tcreateRpcExtensionUIContext,\n\ttype RpcExtensionUICapabilities,\n\ttype RpcPendingExtensionRequests,\n} from \"./rpc-extension-ui.ts\";\nimport type { KeybindingsReloadCoordinator } from \"./rpc-keybindings-reload.ts\";\nimport type { RpcOutput } from \"./rpc-responses.ts\";\nimport { bindEngineTaskWidget } from \"./task-ui-bridge.js\";\n\ninterface RpcSessionBindingOptions {\n\truntimeHost: AgentSessionRuntime;\n\toutput: RpcOutput;\n\tpendingExtensionRequests: RpcPendingExtensionRequests;\n\textensionUICapabilities?: RpcExtensionUICapabilities;\n\tcustomUi?: EngineCustomUiService;\n\trenderService?: EngineRenderService;\n\tsessionPicker?: EngineSessionPickerService;\n\tinputForm?: EngineInputFormService;\n\t/** Present in the interactive engine child, which reports workflow activity to its host. */\n\twriteEngineLine?: (line: string) => void;\n\trequestShutdown: () => void;\n\tcheckShutdownRequested?: () => void;\n\treloadCoordinator?: KeybindingsReloadCoordinator<AgentSession>;\n\tonStartupReload?: (session: AgentSession) => Promise<void>;\n}\n\nexport class RpcSessionBinding {\n\tprivate session: AgentSession;\n\tprivate boundRunner: AgentSession[\"extensionRunner\"] | undefined;\n\tprivate unsubscribe?: () => void;\n\tprivate unsubscribeBackpressure?: () => void;\n\tprivate unsubscribeTasks?: () => void;\n\tprivate unsubscribeWorkflowActivity?: () => void;\n\tprivate readonly runtimeHost: AgentSessionRuntime;\n\tprivate readonly output: RpcOutput;\n\tprivate readonly pendingExtensionRequests: RpcPendingExtensionRequests;\n\tprivate readonly extensionUICapabilities: RpcExtensionUICapabilities | undefined;\n\tprivate readonly customUi: EngineCustomUiService | undefined;\n\tprivate readonly renderService: EngineRenderService | undefined;\n\tprivate readonly sessionPicker: EngineSessionPickerService | undefined;\n\tprivate readonly inputForm: EngineInputFormService | undefined;\n\tprivate readonly writeEngineLine: ((line: string) => void) | undefined;\n\tprivate readonly requestShutdown: () => void;\n\tprivate readonly checkShutdownRequested: (() => void) | undefined;\n\tprivate readonly reloadCoordinator: KeybindingsReloadCoordinator<AgentSession> | undefined;\n\tprivate readonly onStartupReload: ((session: AgentSession) => Promise<void>) | undefined;\n\n\tprivate footerDataProvider: FooterDataProvider | undefined;\n\tconstructor({\n\t\truntimeHost,\n\t\toutput,\n\t\tpendingExtensionRequests,\n\t\textensionUICapabilities,\n\t\trequestShutdown,\n\t\tcheckShutdownRequested,\n\t\tcustomUi,\n\t\trenderService,\n\t\tsessionPicker,\n\t\tinputForm,\n\t\twriteEngineLine,\n\t\treloadCoordinator,\n\t\tonStartupReload,\n\t}: RpcSessionBindingOptions) {\n\t\tthis.runtimeHost = runtimeHost;\n\t\tthis.output = output;\n\t\tthis.pendingExtensionRequests = pendingExtensionRequests;\n\t\tthis.extensionUICapabilities = extensionUICapabilities;\n\t\tthis.requestShutdown = requestShutdown;\n\t\tthis.checkShutdownRequested = checkShutdownRequested;\n\t\tthis.customUi = customUi;\n\t\tthis.renderService = renderService;\n\t\tthis.sessionPicker = sessionPicker;\n\t\tthis.inputForm = inputForm;\n\t\tthis.writeEngineLine = writeEngineLine;\n\t\tthis.reloadCoordinator = reloadCoordinator;\n\t\tthis.onStartupReload = onStartupReload;\n\t\tthis.session = runtimeHost.session;\n\t\tthis.runtimeHost.setProjectTrustContextFactory?.((cwd) => this.createProjectTrustContext(cwd));\n\t}\n\n\tprivate createProjectTrustContext(cwd: string): ProjectTrustContext {\n\t\tconst runner = this.runtimeHost.session.extensionRunner;\n\t\tconst ui = runner.getUIContext();\n\t\tconst hasUI = this.customUi !== undefined;\n\t\treturn {\n\t\t\tcwd,\n\t\t\tmode: hasUI ? \"tui\" : \"rpc\",\n\t\t\thasUI,\n\t\t\tui: {\n\t\t\t\tselect: (title, options, opts) =>\n\t\t\t\t\thasUI\n\t\t\t\t\t\t? runner.withProjectTrustPrompt(\"select\", title, () => ui.select(title, options, opts))\n\t\t\t\t\t\t: Promise.resolve(undefined),\n\t\t\t\tconfirm: (title, message, opts) =>\n\t\t\t\t\thasUI\n\t\t\t\t\t\t? runner.withProjectTrustPrompt(\"confirm\", title, () => ui.confirm(title, message, opts))\n\t\t\t\t\t\t: Promise.resolve(false),\n\t\t\t\tinput: (title, placeholder, opts) =>\n\t\t\t\t\thasUI\n\t\t\t\t\t\t? runner.withProjectTrustPrompt(\"input\", title, () => ui.input(title, placeholder, opts))\n\t\t\t\t\t\t: Promise.resolve(undefined),\n\t\t\t\tnotify: (message, type) => ui.notify(message, type),\n\t\t\t},\n\t\t};\n\t}\n\n\tget currentSession(): AgentSession {\n\t\treturn this.session;\n\t}\n\n\tasync rebindSession(): Promise<void> {\n\t\tif (this.session === this.runtimeHost.session && this.boundRunner === this.session.extensionRunner) return;\n\t\tthis.session = this.runtimeHost.session;\n\t\tthis.disposeSubscriptions();\n\t\tconst session = this.session;\n\t\tsetCapabilityOverrides(session.settingsManager.getTerminalCapabilityOverrides());\n\t\tthis.renderService?.bindSession(session);\n\t\tthis.footerDataProvider = new FooterDataProvider(session.sessionManager.getCwd());\n\t\t// Seed the provider count from the current catalog snapshot, mirroring\n\t\t// updateProviderCountFromSnapshot() in interactive startup, so the\n\t\t// embedded footer shows the (provider) model prefix in multi-provider\n\t\t// sessions instead of defaulting to 0.\n\t\tconst models =\n\t\t\tsession.scopedModels.length > 0\n\t\t\t\t? session.scopedModels.map((scoped) => scoped.model)\n\t\t\t\t: session.modelRuntime.getAvailableSnapshot();\n\t\tthis.footerDataProvider.setAvailableProviderCount(new Set(models.map((model) => model.provider)).size);\n\n\t\ttry {\n\t\t\tawait session.bindExtensions({\n\t\t\t\tonUIPrompt: (event) => {\n\t\t\t\t\tif (event.reason === \"ui_prompt\") {\n\t\t\t\t\t\tthis.writeEngineLine?.(serializeInteractiveEngineMessage({ type: \"engine_ui_prompt\", event }));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tuiContext: createRpcExtensionUIContext({\n\t\t\t\t\toutput: this.output,\n\t\t\t\t\tpendingExtensionRequests: this.pendingExtensionRequests,\n\t\t\t\t\tcustomUi: this.customUi,\n\t\t\t\t\tsessionPicker: this.sessionPicker,\n\t\t\t\t\tinputForm: this.inputForm,\n\t\t\t\t\tfooterDataProvider: this.footerDataProvider,\n\t\t\t\t\tcapabilities: this.extensionUICapabilities,\n\t\t\t\t}),\n\t\t\t\tmode: this.customUi ? \"tui\" : \"rpc\",\n\t\t\t\tcommandContextActions: {\n\t\t\t\t\twaitForIdle: () => this.session.agent.waitForIdle(),\n\t\t\t\t\tnewSession: async (options) => this.runtimeHost.newSession(options),\n\t\t\t\t\tfork: async (entryId, forkOptions) => {\n\t\t\t\t\t\tconst result = await this.runtimeHost.fork(entryId, forkOptions);\n\t\t\t\t\t\treturn { cancelled: result.cancelled };\n\t\t\t\t\t},\n\t\t\t\t\tnavigateTree: async (targetId, options) => {\n\t\t\t\t\t\tconst result = await this.session.navigateTree(targetId, {\n\t\t\t\t\t\t\tsummarize: options?.summarize,\n\t\t\t\t\t\t\tcustomInstructions: options?.customInstructions,\n\t\t\t\t\t\t\treplaceInstructions: options?.replaceInstructions,\n\t\t\t\t\t\t\tlabel: options?.label,\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn { cancelled: result.cancelled };\n\t\t\t\t\t},\n\t\t\t\t\tswitchSession: async (sessionPath, options) => {\n\t\t\t\t\t\treturn this.runtimeHost.switchSession(sessionPath, options);\n\t\t\t\t\t},\n\t\t\t\t\treload: async () => {\n\t\t\t\t\t\tconst steeringMode = this.session.steeringMode;\n\t\t\t\t\t\tconst followUpMode = this.session.followUpMode;\n\t\t\t\t\t\tif (this.reloadCoordinator) await this.reloadCoordinator.reload(this.session);\n\t\t\t\t\t\telse await this.session.reload();\n\t\t\t\t\t\tthis.session.setSteeringMode(steeringMode);\n\t\t\t\t\t\tthis.session.setFollowUpMode(followUpMode);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tshutdownHandler: this.requestShutdown,\n\t\t\t\tonError: (err) => {\n\t\t\t\t\tthis.output({\n\t\t\t\t\t\ttype: \"extension_error\",\n\t\t\t\t\t\textensionPath: err.extensionPath,\n\t\t\t\t\t\tevent: err.event,\n\t\t\t\t\t\terror: err.error,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t});\n\t\t\tthis.footerDataProvider.startGitWatcher();\n\t\t} catch (error) {\n\t\t\t// Leave no partially-initialized footer state behind if extension\n\t\t\t// binding fails; dispose the provider and rethrow.\n\t\t\tthis.footerDataProvider.dispose();\n\t\t\tthis.footerDataProvider = undefined;\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (this.customUi) this.unsubscribeTasks = bindEngineTaskWidget(session, session.extensionRunner.getUIContext());\n\t\tif (this.writeEngineLine) {\n\t\t\tthis.unsubscribeWorkflowActivity = forwardWorkflowActivity(session, this.writeEngineLine);\n\t\t}\n\t\tthis.unsubscribe = session.subscribe((event) => {\n\t\t\tthis.output(toJsonEvent(event));\n\t\t\tif (event.type === \"agent_settled\") this.checkShutdownRequested?.();\n\t\t});\n\t\tthis.unsubscribeBackpressure = session.agent.subscribe(async () => {\n\t\t\tawait waitForRawStdoutBackpressure();\n\t\t});\n\t\tthis.reloadCoordinator?.publishCurrentState(session);\n\t\tthis.boundRunner = session.extensionRunner;\n\t}\n\n\t/** Load and atomically publish the optional resource set after the minimal interactive engine binds. */\n\tasync loadDeferredResources(): Promise<void> {\n\t\tconst session = this.session;\n\t\ttry {\n\t\t\tif (!(await this.runtimeHost.completeStartup?.())) {\n\t\t\t\tawait session.reload({ reason: \"startup\" });\n\t\t\t\tawait this.onStartupReload?.(session);\n\t\t\t}\n\t\t} finally {\n\t\t\tfor (const extensionError of session.resourceLoader.getExtensions().errors) {\n\t\t\t\tthis.output({\n\t\t\t\t\ttype: \"extension_error\",\n\t\t\t\t\textensionPath: extensionError.path,\n\t\t\t\t\tevent: \"startup\",\n\t\t\t\t\terror: extensionError.error,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif (session !== this.session) return;\n\t\tthis.reloadCoordinator?.publishCurrentState(session);\n\t}\n\n\tdisposeSubscriptions(): void {\n\t\tthis.boundRunner = undefined;\n\t\tthis.unsubscribe?.();\n\t\tthis.unsubscribeBackpressure?.();\n\t\tthis.unsubscribeTasks?.();\n\t\tthis.unsubscribeTasks = undefined;\n\t\tthis.unsubscribeWorkflowActivity?.();\n\t\tthis.unsubscribeWorkflowActivity = undefined;\n\t\tthis.writeEngineLine?.(\n\t\t\tserializeInteractiveEngineMessage({\n\t\t\t\ttype: \"engine_ui_prompt\",\n\t\t\t\tevent: { type: \"ui_prompt_end\", reason: \"ui_prompt\", kind: \"custom\" },\n\t\t\t}),\n\t\t);\n\t\tthis.footerDataProvider?.dispose();\n\t\tthis.unsubscribe = undefined;\n\t\tthis.unsubscribeBackpressure = undefined;\n\t\tthis.footerDataProvider = undefined;\n\t}\n}\n"]}
@@ -28,7 +28,7 @@ Run `/tasks` to inspect work without stopping it:
28
28
 
29
29
  Results and failures remain in completion cards and `/tasks` after leaving the live indicator. The command appears in workflow-stage slash suggestions even when skill commands are disabled.
30
30
 
31
- Main and workflow-stage pickers share the same layout. Their footers retain the chat's resolved model and reasoning level, current folder and Git branch, and MCP status, including during foreground streaming.
31
+ Main and workflow-stage pickers share the same layout. Their footers show the chat's resolved model and reasoning level, current folder and Git branch while the chat is idle, and MCP status throughout. While the chat's agent works, the model line shows `working` instead, because Escape closes the picker rather than interrupting.
32
32
 
33
33
  Opening `/tasks` is navigation, not approval. It does not mark the agent blocked in Herdr or produce a "Main chat needs input" notice. A genuine question waiting behind the workflow graph still shows that notice until answered or the graph is hidden or closed.
34
34
 
@@ -210,7 +210,7 @@ The cadence is fixed when the task starts, and a running task's `/tasks` detail
210
210
  | Transcript | Scrolls like a workflow stage chat: it opens at the latest message and follows new output; PageUp/PageDown move one viewport; Ctrl+Home/Ctrl+End jump to the top and to the latest message; Ctrl+Up/Ctrl+Down jump between prompts; the mouse wheel scrolls (Alt+wheel five times faster). Earlier retained history loads as you scroll toward the top. |
211
211
  | Transcript display | A transcript opens with the chat's thinking and tool-output settings. Ctrl+T toggles thinking blocks, as in the chat, and Ctrl+O toggles the transcript's tool output. |
212
212
  | Message the agent | Type in the transcript's prompt and press Enter to send the text to the agent through Intercom. Up/Down, Home/End and Left/Right edit the prompt. |
213
- | Subagent chat | A subagent's transcript has the chat box of a workflow stage chat. The prompt's top rule names the subagent's session, for example `[subagent: subagent-worker-aabcf28b-1]`: its Intercom name, or its agent name when it has none. Long names end in `…`, and terminals narrower than 40 columns show no name. While the subagent runs in this session, its usage meter and model line appear around the prompt, along with the working line and any queued messages. The footer counts the subagent's own running tasks. |
213
+ | Subagent chat | A subagent's transcript has the chat box of a workflow stage chat. The prompt's top rule names the subagent's session, for example `[subagent: subagent-worker-aabcf28b-1]`: its Intercom name, or its agent name when it has none. Long names end in `…`, and terminals narrower than 40 columns show no name. While the subagent runs in this session, its usage meter appears above the prompt, along with the working line and any queued messages; the line below the prompt shows `working` while the subagent works and its model line once it is idle. The footer counts the subagent's own running tasks. |
214
214
  | Subagent's tasks | Type `/tasks` in a subagent's transcript to list that subagent's own tasks: the shells it ran and the subagents it launched, not the parent's. In a nested subagent's transcript, `/tasks` lists that subagent's tasks. Escape or Left on that list returns to the subagent's chat. |
215
215
  | Go back | Escape returns from transcript to detail, then from detail to the list. Left does the same when the prompt is empty. While a subagent's own task list is open, Escape and Left go back within that list first. |
216
216
  | Stop | On a task's detail page, `x` requests cancellation; confirm with `y`, or keep running with `n` or Escape. A bound `app.tasks.cancel` key also works from the list. |
@@ -940,7 +940,7 @@ const result = await pi.exec("git", ["status"], { signal, timeout: 5000 });
940
940
  // result.stdout, result.stderr, result.code, result.killed, result.truncated
941
941
  ```
942
942
 
943
- Options: `signal` and `timeout` terminate the command, `cwd` sets the working directory, and `maxBuffer` limits stdout and stderr combined (default 256 MiB). When output exceeds `maxBuffer`, Atomic terminates the command and returns the output up to the limit with `truncated: true`, `killed: true`, and a nonzero `code`. `killed` is true whenever Atomic terminated the command: timeout, abort, or `maxBuffer`. A command that ignores SIGTERM gets SIGKILL after 5 seconds.
943
+ Options: `signal` and `timeout` terminate the command, `cwd` sets the working directory, and `maxBuffer` limits stdout and stderr combined (default 256 MiB). When output exceeds `maxBuffer`, Atomic terminates the command and returns the output up to the limit with `truncated: true`, `killed: true`, and a nonzero `code`. `killed` is true whenever Atomic terminated the command: timeout, abort, or `maxBuffer`. A command that ignores SIGTERM gets SIGKILL after 5 seconds. A command terminated by a signal, by Atomic or otherwise, reports 128 + the signal number as `code`, like a shell: 143 for SIGTERM, 137 for SIGKILL.
944
944
 
945
945
  ### pi.getActiveTools() / pi.getAllTools() / pi.setActiveTools(names)
946
946
 
@@ -14,11 +14,11 @@ For specific benchmark records, read [Evals](/models/evals). That page is the da
14
14
  Subagent and workflow-stage `model: "auto"` routes before execution starts, in at most two short requests:
15
15
 
16
16
  1. **Questions about the task, answered by a chat model.** Kind of work, difficulty, mistake cost, image input, very large context, and whether speed matters. The chat model is `decisionModel` when that is a chat model, otherwise your current one; a classifier such as Jev never reads the task. A task too large for that model's window is read by the cheapest eligible model that holds it. Anything the caller states in `taskNeeds` is not asked, and when the caller states all six this request is skipped. Computer-use tasks count as needing images unless the caller says otherwise.
17
- 2. **A choice between a shortlist, made by the router without the task.** Atomic narrows the eligible models in code: it drops models that cannot read images when the task needs them and prefers 400k-token windows for long-context tasks, then ranks the rest on the [Evals](/models/evals) results for that kind of work, weighing proven quality against price by how demanding the task is and preferring newer releases. The top six different models form the shortlist; a model's fast route and the same model on another provider share one place. When the caller lists models in `modelConstraints.allowedModels`, those eligible models are the shortlist instead (as many as fit one routing request). Each option carries its own evidence (release date, price tier, image input, and results on this kind of work and overall), ranked against all Evals models however few you enable. With a single option, this request is skipped.
17
+ 2. **A choice between a shortlist, made by the router without the task.** Atomic narrows the eligible models in code: it drops models that cannot read images when the task needs them and prefers 400k-token windows for long-context tasks, then ranks the rest on the [Evals](/models/evals) results for that kind of work, weighing proven quality against price by how demanding the task is and preferring newer releases. Missing results, including other efforts, are estimated with an uncertainty; ranking uses quality less that uncertainty at the task's effort. Hard coding and review rely mostly on DeepSWE and FrontierCode, and prefer models with measured results on either; terminal work on Terminal-Bench 4.0. The top six different models form the shortlist; a model's fast route and the same model on another provider share one place. When the caller lists models in `modelConstraints.allowedModels`, those eligible models are the shortlist instead (as many as fit one routing request). Each option carries its own evidence (release date, price tier, image input, results), ranked against all Evals models, with estimated results marked. With a single option, this request is skipped.
18
18
 
19
19
  Effort follows the task's difficulty, one level lower when speed matters, limited to the levels the chosen model supports. The two fallbacks are the next models in Atomic's ranking. The router cannot add candidates, bypass constraints, alter the execution prompt, or change the selected chat model. [`decisionModel`](/settings#decisionmodel) chooses the model that decides only: a registered classifier or chat language model. Unset and `auto` use the current chat model, even with saved classifier credentials. An image-generation model cannot decide.
20
20
 
21
- Only chat language models are eligible for execution `auto`, including models that accept image or PDF input. Image-generation and classifier models cannot be execution candidates, even when a classifier makes the routing decision.
21
+ Only chat language models, including ones that accept images or PDFs, are execution candidates; image-generation and classifier models are not, even when a classifier decides.
22
22
 
23
23
  In authored workflows, a classifier can make a structured triage decision without executing the stage; an image model can generate an asset inside a durable tool step. See [classifier and image models in `ctx.tool`](/workflows/authoring#classifier-and-image-models-in-ctx-tool).
24
24
 
@@ -26,11 +26,11 @@ To keep providers or models out of routing entirely, set [`modelRouting`](/setti
26
26
 
27
27
  ## Benchmarks are evidence, not policy
28
28
 
29
- Benchmark results are measurements under named harnesses, dates, models, efforts, agents, tools, prompts, prices, and scoring rules. Treat a bracketed effort level as the measurement configuration for that row, not a command to run every task at that effort. Compare only records whose measured setup resembles the decision at hand, and keep unmeasured work under ordinary validation rather than inheriting a score.
29
+ Benchmark results are measurements under named harnesses, dates, models, efforts, tools, and scoring rules. Treat a bracketed effort level as the measurement configuration for that row, not a command to run every task at that effort. Compare only records whose measured setup resembles the decision at hand, and keep unmeasured work under ordinary validation rather than inheriting a score.
30
30
 
31
- Missing evidence is unknown, not zero. A rounded lead is not proof of significance. A result for one provider, model version, effort, agent, fallback setting, or benchmark harness does not transfer to another identity.
31
+ Missing evidence is unknown, not zero. A rounded lead is not proof of significance. A result for one provider, model version, effort, or harness does not transfer to another.
32
32
 
33
- Prefer recency. Each row in [Evals](/models/evals) has a release date. When candidates fit the same role tier and price range, choose the most recently released model over an older one from the same provider or family; a newer release usually supersedes it. Do not let an older model win only because it has no published results: its missing evidence stays unknown, and a recent comparable model with evidence is the safer choice. Recency does not override the role's cost tier or explicit constraints.
33
+ Prefer recency. Each row in [Evals](/models/evals) has a release date. When candidates fit the same role tier and price range, choose the most recently released model over an older one from the same provider or family; a newer release usually supersedes it. Do not let an older model win only because it has no published results. Recency does not override the role's cost tier or explicit constraints.
34
34
 
35
35
  ## Role-based thinking effort
36
36
 
@@ -52,10 +52,10 @@ An explicit user request wins over these defaults, but the requested level must
52
52
 
53
53
  ## Pin model identity from the catalog
54
54
 
55
- Choose only eligible provider/model and effort pairs from the supplied catalog. A guide, benchmark, or outside leaderboard cannot prove that the local account has credentials, quota, region access, tool support, or entitlement.
55
+ Choose only eligible provider/model and effort pairs from the supplied catalog. A guide or leaderboard cannot prove the local account has credentials, quota, region access, or entitlement.
56
56
 
57
57
  For manual selection, use `workflow({ action: "models" })` or `--list-models` and pin a returned `fullId`. Use `modelConstraints.allowedModels` for hard provider or privacy restrictions. Put softer preferences in the task text.
58
58
 
59
59
  ## Answering model-choice questions
60
60
 
61
- For interactive advice, read [Evals](/models/evals), then consult the live source when the choice depends on current scores, prices, latency, or methodology. Cite the benchmark, source date or access date, exact model/effort/configuration, units, and any cost or latency tradeoff. If live evidence is unavailable, say that you are using the dated docs snapshot rather than claiming a refresh.
61
+ For interactive advice, read [Evals](/models/evals), then consult the live source when the choice depends on current scores, prices, latency, or methodology. Cite the benchmark, access date, exact model/effort, units, and any cost or latency tradeoff. If live evidence is unavailable, say that you are using the dated docs snapshot rather than claiming a refresh.
package/docs/providers.md CHANGED
@@ -377,17 +377,17 @@ Catalog failures preserve the last usable models for each provider. See [catalog
377
377
  | MiniMax | `MINIMAX_API_KEY` | `minimax` |
378
378
  | MiniMax (China) | `MINIMAX_CN_API_KEY` | `minimax-cn` |
379
379
  | Moonshot AI | `MOONSHOT_API_KEY` | `moonshotai` |
380
- | Moonshot AI (China) | `MOONSHOT_API_KEY` | `moonshotai-cn` |
381
- | Qwen Token Plan (existing catalog) | `QWEN_TOKEN_PLAN_API_KEY` | `qwen-token-plan` |
382
- | Qwen Token Plan (Individual) | `QWEN_TOKEN_PLAN_API_KEY` | `qwen-token-plan-individual` |
383
- | Qwen Token Plan (China) | `QWEN_TOKEN_PLAN_CN_API_KEY` | `qwen-token-plan-cn` |
384
- | Qwen Token Plan (Individual, China) | `QWEN_TOKEN_PLAN_CN_API_KEY` | `qwen-token-plan-individual-cn` |
385
- | Xiaomi MiMo | `XIAOMI_API_KEY` | `xiaomi` |
386
- | Xiaomi MiMo Token Plan (China) | `XIAOMI_TOKEN_PLAN_CN_API_KEY` | `xiaomi-token-plan-cn` |
387
- | Xiaomi MiMo Token Plan (Amsterdam) | `XIAOMI_TOKEN_PLAN_AMS_API_KEY` | `xiaomi-token-plan-ams` |
388
- | Xiaomi MiMo Token Plan (Singapore) | `XIAOMI_TOKEN_PLAN_SGP_API_KEY` | `xiaomi-token-plan-sgp` |
389
-
390
- Z.AI and Z.AI Coding Plan (China) default to `glm-5.3` (`zai/glm-5.3` and `zai-coding-cn/glm-5.3`), and both direct providers also expose the multimodal `glm-5.3-flash`. Baseten defaults to its directly selectable `zai-org/GLM-5.3` and also exposes `zai-org/GLM-5.3-Fast` and the multimodal `zai-org/GLM-5.3-Flash`; OpenRouter exposes `z-ai/glm-5.3` and `z-ai/glm-5.3-flash`. The full and Flash entries support `low`, `high`, and `max` reasoning; Baseten's Fast entry also supports `off`. Use Baseten's `zai-org/GLM-5.2` or `zai-org/GLM-5.3-Fast` when fully disabled reasoning is required. Qwen Token Plan Individual defaults to `qwen3.8-max` and uses the international `QWEN_TOKEN_PLAN_API_KEY` shared with the existing Qwen Token Plan provider. These catalogs follow their upstream providers, so use `--list-models` for the current entries.
380
+ | Moonshot AI (China) | `MOONSHOT_API_KEY` | `moonshotai-cn` |
381
+ | Qwen Token Plan Team | `QWEN_TOKEN_PLAN_TEAM_API_KEY` | `qwen-token-plan` |
382
+ | Qwen Token Plan Individual | `QWEN_TOKEN_PLAN_INDIVIDUAL_API_KEY` | `qwen-token-plan-individual` |
383
+ | Qwen Token Plan Team (China) | `QWEN_TOKEN_PLAN_TEAM_CN_API_KEY` | `qwen-token-plan-cn` |
384
+ | Qwen Token Plan Individual (China) | `QWEN_TOKEN_PLAN_INDIVIDUAL_CN_API_KEY` | `qwen-token-plan-individual-cn` |
385
+ | Xiaomi MiMo | `XIAOMI_API_KEY` | `xiaomi` |
386
+ | Xiaomi MiMo Token Plan (China) | `XIAOMI_TOKEN_PLAN_CN_API_KEY` | `xiaomi-token-plan-cn` |
387
+ | Xiaomi MiMo Token Plan (Amsterdam) | `XIAOMI_TOKEN_PLAN_AMS_API_KEY` | `xiaomi-token-plan-ams` |
388
+ | Xiaomi MiMo Token Plan (Singapore) | `XIAOMI_TOKEN_PLAN_SGP_API_KEY` | `xiaomi-token-plan-sgp` |
389
+
390
+ Z.AI and Z.AI Coding Plan (China) default to `glm-5.3` (`zai/glm-5.3` and `zai-coding-cn/glm-5.3`), and both direct providers also expose the multimodal `glm-5.3-flash`. Baseten defaults to its directly selectable `zai-org/GLM-5.3` and also exposes `zai-org/GLM-5.3-Fast` and the multimodal `zai-org/GLM-5.3-Flash`; OpenRouter exposes `z-ai/glm-5.3` and `z-ai/glm-5.3-flash`. The full and Flash entries support `low`, `high`, and `max` reasoning; Baseten's Fast entry also supports `off`. Use Baseten's `zai-org/GLM-5.2` or `zai-org/GLM-5.3-Fast` when fully disabled reasoning is required. Qwen Token Plan has separate Team (`qwen-token-plan`, `qwen-token-plan-cn`) and Individual (`qwen-token-plan-individual`, `qwen-token-plan-individual-cn`) providers per region, all defaulting to `qwen3.8-max`. Set the key variable of your plan (`QWEN_TOKEN_PLAN_TEAM_API_KEY`, `QWEN_TOKEN_PLAN_INDIVIDUAL_API_KEY`, `QWEN_TOKEN_PLAN_TEAM_CN_API_KEY`, or `QWEN_TOKEN_PLAN_INDIVIDUAL_CN_API_KEY`); the shared `QWEN_TOKEN_PLAN_API_KEY` and `QWEN_TOKEN_PLAN_CN_API_KEY` remain supported as fallbacks. These catalogs follow their upstream providers, so use `--list-models` for the current entries.
391
391
 
392
392
  Xiaomi MiMo reasoning models on `xiaomi` and all three `xiaomi-token-plan-*` providers support only `off` (thinking disabled) and `high` (thinking enabled). Use these levels when selecting thinking; Xiaomi does not distinguish intermediate effort levels.
393
393
 
@@ -422,12 +422,7 @@ Store credentials in `~/.atomic/agent/auth.json`:
422
422
  }
423
423
  ```
424
424
 
425
- `qwen-token-plan-individual` uses the same international endpoint and `QWEN_TOKEN_PLAN_API_KEY` as
426
- `qwen-token-plan`, but limits the picker to the models documented for Individual subscriptions. The existing
427
- provider keeps its broader catalog for backward compatibility. When using `auth.json`, store the credential
428
- under the provider you select; an environment variable is shared by both international providers.
429
- `qwen-token-plan-individual-cn` applies the same Individual catalog to the China endpoint and shares
430
- `QWEN_TOKEN_PLAN_CN_API_KEY` with `qwen-token-plan-cn`.
425
+ Qwen Token Plan has a Team (`qwen-token-plan`, `qwen-token-plan-cn`) and an Individual (`qwen-token-plan-individual`, `qwen-token-plan-individual-cn`) provider per region; each exposes only the models documented for its subscription. Store the credential in `auth.json` under the provider you select, or set the per-plan environment variable above.
431
426
 
432
427
  The file is created with `0600` permissions (user read/write only). Auth file credentials take priority over environment variables.
433
428
 
package/docs/skills.md CHANGED
@@ -117,7 +117,7 @@ Offline, `qlty metrics` and `qlty smells` still work through built-in static ana
117
117
 
118
118
  Load `/skill:agent-browser` first for anything it covers: websites and web apps in Chrome/Chromium, Mobile Safari in the iOS Simulator (`agent-browser -p ios`), Electron and other apps that expose a CDP port, Slack, and cloud browsers. Its text snapshots cost far fewer tokens than desktop accessibility trees and screenshots. For native desktop apps, menus and menu bars, OS dialogs and permission prompts, desktop Safari and other non-Chromium browsers, and work across apps, load `/skill:agent-desktop` and drive the app with one-shot `agent-desktop` commands; when a custom workflow's TypeScript owns the scenario, call the `agent-desktop` CLI from `ctx.tool` instead. Native iOS apps in the Simulator and Android emulators need native mobile tooling; agent-desktop sees them only as desktop windows. See [what agent-browser covers](/computer-use#what-agent-browser-covers) for the full split, and [Computer use](/computer-use#desktop-automation-with-agent-desktop) for installing the agent-desktop CLI, readiness, permissions, and [coverage limits](/computer-use#coverage-and-limits). For terminal automation/testing, prefer `/skill:herdr` on macOS, Linux and Windows. Install Herdr if missing when network access and permissions permit; fall back to `/skill:tmux` or native Windows psmux when installation or use is not possible. Preserve the upstream skill's explicit-request and managed-pane requirements. These are separate interfaces, not interchangeable command names. See [verification and desktop safety](/workflows/verification) for installation, permissions, dedicated sessions and evidence.
119
119
 
120
- The bundled [agent-desktop skill](https://github.com/vercel-labs/agent-desktop/tree/v1.2.0/skills/agent-desktop) is upstream's `skills/agent-desktop/SKILL.md` at tag `v1.2.0`, Apache-2.0 licensed. Atomic owns its frontmatter and adds one section, "Install and permissions", with the bounded install attempt and the readiness check; the rest is upstream's text. It is a short guide: the detailed guides and every reference are compiled into the CLI and printed by `agent-desktop skills get desktop`, `agent-desktop skills get platform`, and `agent-desktop skills get desktop <reference>`, so they always match the installed version. The skill does not install the `agent-desktop` executable, and Atomic never runs `npx skills add` for it. Permission prompts stay with you: on macOS the agent opens `agent-desktop permissions --guide` and you approve it.
120
+ The bundled [agent-desktop skill](https://github.com/vercel-labs/agent-desktop/tree/v1.3.0/skills/agent-desktop) is upstream's `skills/agent-desktop/SKILL.md` at tag `v1.3.0`, Apache-2.0 licensed. Atomic owns its frontmatter and adds one section, "Install and permissions", with the bounded install attempt and the readiness check; the rest is upstream's text. It is a short guide: the detailed guides and every reference are compiled into the CLI and printed by `agent-desktop skills get desktop`, `agent-desktop skills get platform`, and `agent-desktop skills get desktop <reference>`, so they always match the installed version. The skill does not install the `agent-desktop` executable, and Atomic never runs `npx skills add` for it. Permission prompts stay with you: on macOS the agent opens `agent-desktop permissions --guide` and you approve it.
121
121
 
122
122
  The bundled [Herdr skill](https://github.com/herdrdev/herdr/blob/v0.9.5/skills/herdr/SKILL.md) requires an explicit Herdr mention or request and `HERDR_ENV=1`; it stops outside a Herdr-managed pane. It does not install Herdr or authorize control of unrelated panes. Use returned pane IDs, and check completion separately from command submission.
123
123
 
package/docs/subagents.md CHANGED
@@ -316,6 +316,8 @@ The subagent action "kill" was removed. Use { action: "quit", id } to stop a chi
316
316
 
317
317
  Each background subagent launch card shows the child's latest state, including after you reopen the session with `/resume` or `atomic --session <id>`, and when you view a workflow stage's transcript: **Running in background**, **Paused (resumable)**, **Quit (resumable)**, **Interrupted (resumable)**, **Paused with its workflow stage (resumable)**, **Completed**, **Failed**, **Terminal · killed**, **Terminal · gone after a restart**, or **Terminal · its workflow stage ended**. A resumed child continues in its original launch card, marked **· resumed**, and the `resume` call's own card says the child continues in its original launch card. Expand a launch card to see the end of the child's saved transcript. Earlier `pause`, `resume`, and `quit` calls show their results, and rejected calls show their error.
318
318
 
319
+ A parallel call's card keeps one row per child, and its header counts the outcomes, for example `subagent parallel (5) · 4 done · 1 failed`. A child that could not start, for example after a `Supervisor authorization timeout`, shows **Not started** with its error on one line (expand the card for the full text); the other children still run and report their own results. The call itself fails only when no child started.
320
+
319
321
  ## Task inspection
320
322
 
321
323
  Hosts with an owner task store expose `/tasks` and `/tasks <id>` for background agents and shells, including their retained terminal results. Foreground-only work is excluded. Enter opens detail; arrows select an explicit action. Cancel asks for confirmation of the selected task. Terminal tasks retain transcript inspection but omit foreground, cancellation, and stdin actions. Escape returns from detail or stdin before returning to the composer.
@@ -332,7 +334,7 @@ In the default isolated CLI, background subagents continue running after their l
332
334
 
333
335
  Transcript inspection shows the child's conversation as a chat, with the same scrolling, keys, and display settings as a workflow stage chat: it opens at the latest message, follows new output, and loads earlier retained history as you scroll toward the top. Thinking blocks follow Ctrl+T and tool output follows Ctrl+O. Compaction boundaries, branch summaries, and extension notices appear as they do in the chat. Missing capture is reported as `Transcript unavailable`; metrics never substitute for missing messages. See [Inspect tasks](/background-tasks#inspect-tasks) for the controls.
334
336
 
335
- A subagent's transcript names the subagent in its prompt's top rule, as `[subagent: subagent-worker-aabcf28b-1]`, the way an attached workflow stage chat shows `[stage: <name>]`. The name is the subagent's Intercom name, or its agent name when it has none. The chat box is the stage chat's: pending messages, the working line and the usage meter sit above the prompt, and the model and folder line and a count of the subagent's own running tasks sit below it. While the subagent runs in this session, the usage meter and model line show its own session, and a transcript opened mid-turn shows the working line and any messages already queued for it. A subagent that has finished, or runs in another process, shows the task count only. Typing `/tasks` there opens that subagent's own tasks, the shells it ran and the subagents it launched, instead of the parent's. Inside a nested subagent's transcript, `/tasks` lists that subagent's tasks. Escape or Left returns to the subagent's chat. The main chat's `/tasks` still lists every task, including the shells subagents ran.
337
+ A subagent's transcript names the subagent in its prompt's top rule, as `[subagent: subagent-worker-aabcf28b-1]`, the way an attached workflow stage chat shows `[stage: <name>]`. The name is the subagent's Intercom name, or its agent name when it has none. The chat box is the stage chat's: pending messages, the working line and the usage meter sit above the prompt, and the model and folder line and a count of the subagent's own running tasks sit below it. While the subagent runs in this session, the usage meter and model line show its own session (the model line only while the subagent is idle; while it works, that line reads `working`), and a transcript opened mid-turn shows the working line and any messages already queued for it. A subagent that has finished, or runs in another process, shows the task count only. Typing `/tasks` there opens that subagent's own tasks, the shells it ran and the subagents it launched, instead of the parent's. Inside a nested subagent's transcript, `/tasks` lists that subagent's tasks. Escape or Left returns to the subagent's chat. The main chat's `/tasks` still lists every task, including the shells subagents ran.
336
338
 
337
339
  Type in a transcript's prompt and press Enter to message the child through its Intercom target, as an Intercom message from your session would. The child records the message, so it appears in the transcript once delivered; a message Intercom refuses or does not confirm stays in the prompt with the reason.
338
340
 
package/docs/tools.md CHANGED
@@ -167,7 +167,7 @@ Use `find` to locate paths by glob and `search` to match file contents with a re
167
167
 
168
168
  ### Finding paths
169
169
 
170
- `find.paths` is required. It accepts files, directories including filesystem roots, supported local resource selectors, and globs.
170
+ `find.paths` is required. It accepts files, directories including filesystem roots, supported local resource selectors, and globs. Relative globs start at the working directory: `src/**/*.ts` searches under `src`, while `**/src/**/*.ts` matches `src` directories at any depth beneath it.
171
171
 
172
172
  - Hidden files are included by default, and `.gitignore` rules are respected, including nested rules outside a Git checkout.
173
173
  - Broad scans prune `.git` and `node_modules` even with `gitignore: false`. To search `node_modules`, name it explicitly in the path or glob.
package/docs/usage.md CHANGED
@@ -20,7 +20,7 @@ The interface has four main areas:
20
20
  - **Startup header** - shortcuts plus named lists of loaded context files, prompt templates, skills, and extensions; use the expand-tools shortcut (Ctrl+O by default) to switch those lists to source paths
21
21
  - **Messages** - user messages, assistant responses, tool calls, tool results, notifications, errors, and extension UI
22
22
  - **Editor** - where you type; border color indicates the current thinking level
23
- - **Footer** - working directory, session name, token/cache usage, cost, context usage, and current model
23
+ - **Footer** - token/cache usage, cost, and context usage above the editor; below it, the current model, reasoning level, working directory, Git branch, and session name while the agent is idle, or `esc to interrupt` while it works (a turn, compaction, automatic retry, or `!` command)
24
24
 
25
25
  The editor can be replaced temporarily by built-in UI such as `/settings` or by custom extension UI.
26
26
 
@@ -62,6 +62,8 @@ const result = await ctx.task("analyze", {
62
62
 
63
63
  A chat model reads the complete stage prompt to answer the routing questions; a classifier router such as Jev never sees it. Hard `modelConstraints` remain enforced independently. Set `taskNeeds` in the stage options when you already know the task's kind of work, difficulty, mistake cost, or need for images, a very large context or a fast answer; stating all six skips the chat model's read, and list the contenders in `modelConstraints.allowedModels` to choose them yourself.
64
64
 
65
+ Parallel `auto` stages that do the same job, such as two reviewers of one change, can be routed to different model families so they do not share one model's blind spots. Give each a `parallelSlot` with its position and the number of stages, for example `parallelSlot: { index: 0, count: 2 }` and `parallelSlot: { index: 1, count: 2 }`. Each position takes a different family from the ranking (Claude, GPT, Gemini and so on) when enough families are eligible; otherwise the stage routes among every eligible model. The builtin `ralph` workflow's two reviewers do this.
66
+
65
67
  ```ts
66
68
  const prompt = [
67
69
  keepContext("Review only. Do not edit files. Report findings as JSON."),
@@ -220,7 +220,7 @@ Surface behavior:
220
220
  - **Stage chat scrolling** - An attached stage chat scrolls like the main transcript: the wheel follows `fullscreenWheelScrollLines`, Alt+wheel scrolls five times as far, `fullscreenScrollbar` controls its scrollbar, `ctrl+home` and `ctrl+end` jump to the top and the latest message, `ctrl+up` and `ctrl+down` jump between prompts, and the half-page bindings work once you bind them. Scrolled up, its last row offers **↓ Jump to latest message**. A `/tasks` transcript opened from a stage chat behaves the same way and follows the stage's Ctrl+T and Ctrl+O. See [Keybindings](/keybindings#tui-fullscreen-viewport).
221
221
  - **Selection and copying** - Graph panning, stage scrolling, click-to-attach, and drag or multi-click selection work without a separate selection mode. Copy uses OSC 52; if the terminal blocks it, use its Shift/Option modifier-drag bypass. `ctrl+t` retains the host thinking toggle, not a workflow action.
222
222
  - **Tool and node detail** - Attached stage chats match main chat's tool-detail expansion behavior while keeping expansion state local to the workflow UI context. Press Ctrl+O (the configurable `app.tools.expand` binding) to expand every visible workflow node and tool card, including single, parallel, and nested subagent progress, current tool activity, and artifact paths; press it again to collapse them. The toggle works for active, completed, and archived stage views, including at the supported 40-column terminal minimum. A mounted prompt, custom question, or other input-owning overlay keeps the key instead of changing it.
223
- - **Footer context** - An attached live stage chat shows its own current folder and Git branch and shows the live extension status lines that the stage's own session sets, such as the MCP server indicator, never the main chat's. Branch changes trigger a repaint through the host's cached footer provider. The compact `/tasks` picker retains this context and the stage's model and reasoning level even while its foreground turn streams; detail, transcript, input, and confirmation pages remain fullscreen.
223
+ - **Footer context** - An attached live stage chat shows its own current folder and Git branch and shows the live extension status lines that the stage's own session sets, such as the MCP server indicator, never the main chat's. Branch changes trigger a repaint through the host's cached footer provider. As in the main chat, the line with the stage's model, reasoning level, folder and branch shows only while the stage's agent is idle. While it works, that line shows `esc to interrupt`, or `working` in the compact `/tasks` picker, which keeps this context; detail, transcript, input, and confirmation pages remain fullscreen.
224
224
  - **Working indicator** - Stage chat shows `∀` during accepted prompt startup and active work, including retained-session follow-ups. Retry, fallback, compaction, cancellation, and errors take precedence. `NO_COLOR` removes foreground colors; `ATOMIC_REDUCED_MOTION=1` makes the indicator static.
225
225
  - **Subagent statusline** - If a subagent is running while the fullscreen workflow graph is open, the graph statusline mirrors its summary so the run remains visible; hide the graph with `h`, leave it with `ctrl+x`, or reconnect later to return to the full below-editor widget.
226
226
  - **Run control** - Use `pause` and `resume` for resumable live work. Pause holds a stage's queued steering and follow-up items in place without dequeuing them or starting continuation; `resume` releases those items once in their existing per-queue order, but queue release alone does not start a model turn. `resume` on a non-paused run reopens the saved snapshot or overlay. Use `quit` to pause a live run gracefully while preserving it for `/workflow resume`. `/workflow pause` selects the active run by default, accepts a full run id or `--all`, and does not open a stage picker. `/workflow pause <run-id> <stage>` pauses only that stage, named by id, name or unique prefix as `/workflow attach` resolves it, and `/workflow resume <run-id> <stage>` resumes it. The workflow tool's `stageId` does the same and also targets tool nodes.
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.9.80-alpha.1",
3
+ "version": "0.9.81-alpha.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bastani/atomic",
9
- "version": "0.9.80-alpha.1",
9
+ "version": "0.9.81-alpha.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@bastani/atomic-natives": "0.9.80-alpha.1",
13
- "@bastani/pi-ai": "0.9.80-alpha.1",
12
+ "@bastani/atomic-natives": "0.9.81-alpha.1",
13
+ "@bastani/pi-ai": "0.9.81-alpha.1",
14
14
  "@earendil-works/pi-agent-core": "1.5.2",
15
15
  "@earendil-works/pi-codemode": "1.5.2",
16
16
  "@earendil-works/pi-tui": "1.5.2",
@@ -427,18 +427,18 @@
427
427
  }
428
428
  },
429
429
  "node_modules/@bastani/atomic-natives": {
430
- "version": "0.9.80-alpha.1",
431
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.9.80-alpha.1.tgz",
430
+ "version": "0.9.81-alpha.1",
431
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.9.81-alpha.1.tgz",
432
432
  "license": "MIT",
433
433
  "optionalDependencies": {
434
- "@bastani/atomic-natives-darwin-arm64": "0.9.80-alpha.1",
435
- "@bastani/atomic-natives-darwin-x64": "0.9.80-alpha.1",
436
- "@bastani/atomic-natives-linux-arm64-gnu": "0.9.80-alpha.1",
437
- "@bastani/atomic-natives-linux-arm64-musl": "0.9.80-alpha.1",
438
- "@bastani/atomic-natives-linux-x64-gnu": "0.9.80-alpha.1",
439
- "@bastani/atomic-natives-linux-x64-musl": "0.9.80-alpha.1",
440
- "@bastani/atomic-natives-win32-arm64-msvc": "0.9.80-alpha.1",
441
- "@bastani/atomic-natives-win32-x64-msvc": "0.9.80-alpha.1"
434
+ "@bastani/atomic-natives-darwin-arm64": "0.9.81-alpha.1",
435
+ "@bastani/atomic-natives-darwin-x64": "0.9.81-alpha.1",
436
+ "@bastani/atomic-natives-linux-arm64-gnu": "0.9.81-alpha.1",
437
+ "@bastani/atomic-natives-linux-arm64-musl": "0.9.81-alpha.1",
438
+ "@bastani/atomic-natives-linux-x64-gnu": "0.9.81-alpha.1",
439
+ "@bastani/atomic-natives-linux-x64-musl": "0.9.81-alpha.1",
440
+ "@bastani/atomic-natives-win32-arm64-msvc": "0.9.81-alpha.1",
441
+ "@bastani/atomic-natives-win32-x64-msvc": "0.9.81-alpha.1"
442
442
  },
443
443
  "engines": {
444
444
  "bun": ">=1.4.2",
@@ -446,8 +446,8 @@
446
446
  }
447
447
  },
448
448
  "node_modules/@bastani/atomic-natives-darwin-arm64": {
449
- "version": "0.9.80-alpha.1",
450
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.9.80-alpha.1.tgz",
449
+ "version": "0.9.81-alpha.1",
450
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.9.81-alpha.1.tgz",
451
451
  "license": "MIT",
452
452
  "os": [
453
453
  "darwin"
@@ -458,8 +458,8 @@
458
458
  "optional": true
459
459
  },
460
460
  "node_modules/@bastani/atomic-natives-darwin-x64": {
461
- "version": "0.9.80-alpha.1",
462
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.9.80-alpha.1.tgz",
461
+ "version": "0.9.81-alpha.1",
462
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.9.81-alpha.1.tgz",
463
463
  "license": "MIT",
464
464
  "os": [
465
465
  "darwin"
@@ -470,8 +470,8 @@
470
470
  "optional": true
471
471
  },
472
472
  "node_modules/@bastani/atomic-natives-linux-arm64-gnu": {
473
- "version": "0.9.80-alpha.1",
474
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.9.80-alpha.1.tgz",
473
+ "version": "0.9.81-alpha.1",
474
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.9.81-alpha.1.tgz",
475
475
  "license": "MIT",
476
476
  "os": [
477
477
  "linux"
@@ -485,8 +485,8 @@
485
485
  "optional": true
486
486
  },
487
487
  "node_modules/@bastani/atomic-natives-linux-arm64-musl": {
488
- "version": "0.9.80-alpha.1",
489
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-musl/-/atomic-natives-linux-arm64-musl-0.9.80-alpha.1.tgz",
488
+ "version": "0.9.81-alpha.1",
489
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-musl/-/atomic-natives-linux-arm64-musl-0.9.81-alpha.1.tgz",
490
490
  "license": "MIT",
491
491
  "os": [
492
492
  "linux"
@@ -500,8 +500,8 @@
500
500
  "optional": true
501
501
  },
502
502
  "node_modules/@bastani/atomic-natives-linux-x64-gnu": {
503
- "version": "0.9.80-alpha.1",
504
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.9.80-alpha.1.tgz",
503
+ "version": "0.9.81-alpha.1",
504
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.9.81-alpha.1.tgz",
505
505
  "license": "MIT",
506
506
  "os": [
507
507
  "linux"
@@ -515,8 +515,8 @@
515
515
  "optional": true
516
516
  },
517
517
  "node_modules/@bastani/atomic-natives-linux-x64-musl": {
518
- "version": "0.9.80-alpha.1",
519
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-musl/-/atomic-natives-linux-x64-musl-0.9.80-alpha.1.tgz",
518
+ "version": "0.9.81-alpha.1",
519
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-musl/-/atomic-natives-linux-x64-musl-0.9.81-alpha.1.tgz",
520
520
  "license": "MIT",
521
521
  "os": [
522
522
  "linux"
@@ -530,8 +530,8 @@
530
530
  "optional": true
531
531
  },
532
532
  "node_modules/@bastani/atomic-natives-win32-arm64-msvc": {
533
- "version": "0.9.80-alpha.1",
534
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.9.80-alpha.1.tgz",
533
+ "version": "0.9.81-alpha.1",
534
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.9.81-alpha.1.tgz",
535
535
  "license": "MIT",
536
536
  "os": [
537
537
  "win32"
@@ -542,8 +542,8 @@
542
542
  "optional": true
543
543
  },
544
544
  "node_modules/@bastani/atomic-natives-win32-x64-msvc": {
545
- "version": "0.9.80-alpha.1",
546
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.9.80-alpha.1.tgz",
545
+ "version": "0.9.81-alpha.1",
546
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.9.81-alpha.1.tgz",
547
547
  "license": "MIT",
548
548
  "os": [
549
549
  "win32"
@@ -554,15 +554,15 @@
554
554
  "optional": true
555
555
  },
556
556
  "node_modules/@bastani/pi-ai": {
557
- "version": "0.9.80-alpha.1",
558
- "resolved": "https://registry.npmjs.org/@bastani/pi-ai/-/pi-ai-0.9.80-alpha.1.tgz",
557
+ "version": "0.9.81-alpha.1",
558
+ "resolved": "https://registry.npmjs.org/@bastani/pi-ai/-/pi-ai-0.9.81-alpha.1.tgz",
559
559
  "license": "MIT",
560
560
  "dependencies": {
561
561
  "@anthropic-ai/sdk": "0.129.0",
562
562
  "@aws-sdk/client-bedrock-runtime": "3.1127.0",
563
563
  "@earendil-works/pi-schema": "1.5.2",
564
564
  "@earendil-works/pi-telemetry": "1.5.2",
565
- "@google/genai": "2.21.0",
565
+ "@google/genai": "2.32.0",
566
566
  "@smithy/node-http-handler": "4.13.0",
567
567
  "http-proxy-agent": "9.1.0",
568
568
  "https-proxy-agent": "9.1.0",
@@ -577,6 +577,30 @@
577
577
  "node": ">=22.19.0"
578
578
  }
579
579
  },
580
+ "node_modules/@bastani/pi-ai/node_modules/@google/genai": {
581
+ "version": "2.32.0",
582
+ "resolved": "https://registry.npmjs.org/@google/genai/-/genai-2.32.0.tgz",
583
+ "integrity": "sha512-60c79uXpR0a47bmGqDxbXEBuQUalNmwo5mx5kqb91jIW4FoqpsLSt86DeVhRhtH5+s/16Wqxt3sXzFQn2U1OHQ==",
584
+ "license": "Apache-2.0",
585
+ "dependencies": {
586
+ "google-auth-library": "^10.3.0",
587
+ "p-retry": "^4.6.2",
588
+ "protobufjs": "^7.5.4",
589
+ "ws": "^8.18.0"
590
+ },
591
+ "peerDependencies": {
592
+ "@modelcontextprotocol/sdk": "^1.25.2"
593
+ },
594
+ "peerDependenciesMeta": {
595
+ "@modelcontextprotocol/sdk": {
596
+ "optional": true
597
+ }
598
+ },
599
+ "engines": {
600
+ "node": ">=20.0.0"
601
+ },
602
+ "hasInstallScript": true
603
+ },
580
604
  "node_modules/@bastani/pi-ai/node_modules/@smithy/node-http-handler": {
581
605
  "version": "4.13.0",
582
606
  "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.13.0.tgz",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.9.80-alpha.1",
3
+ "version": "0.9.81-alpha.1",
4
4
  "description": "Atomic coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "atomicConfig": {
@@ -89,8 +89,8 @@
89
89
  "prepublishOnly": "bun run clean && bun run build && bun run shrinkwrap"
90
90
  },
91
91
  "dependencies": {
92
- "@bastani/atomic-natives": "0.9.80-alpha.1",
93
- "@bastani/pi-ai": "0.9.80-alpha.1",
92
+ "@bastani/atomic-natives": "0.9.81-alpha.1",
93
+ "@bastani/pi-ai": "0.9.81-alpha.1",
94
94
  "@earendil-works/pi-agent-core": "1.5.2",
95
95
  "@earendil-works/pi-codemode": "1.5.2",
96
96
  "@earendil-works/pi-tui": "1.5.2",