@bastani/atomic 0.9.16-alpha.9 → 0.9.16

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 (191) hide show
  1. package/CHANGELOG.md +120 -0
  2. package/README.md +4 -4
  3. package/dist/builtin/intercom/CHANGELOG.md +42 -0
  4. package/dist/builtin/intercom/README.md +18 -17
  5. package/dist/builtin/intercom/broker/broker.ts +43 -18
  6. package/dist/builtin/intercom/broker/client.ts +138 -7
  7. package/dist/builtin/intercom/broker/group-isolation.ts +3 -3
  8. package/dist/builtin/intercom/broker/group-membership.ts +55 -0
  9. package/dist/builtin/intercom/broker/presence-handler.ts +62 -50
  10. package/dist/builtin/intercom/broker/send-handler.ts +2 -3
  11. package/dist/builtin/intercom/group.ts +40 -0
  12. package/dist/builtin/intercom/index.bundle.mjs +490 -183
  13. package/dist/builtin/intercom/package.json +2 -2
  14. package/dist/builtin/intercom/skills/intercom/SKILL.md +16 -10
  15. package/dist/builtin/intercom/types.ts +24 -2
  16. package/dist/builtin/mcp/index.bundle.mjs +202 -52
  17. package/dist/builtin/mcp/package.json +2 -2
  18. package/dist/builtin/subagents/CHANGELOG.md +51 -0
  19. package/dist/builtin/subagents/README.md +3 -3
  20. package/dist/builtin/subagents/agents/code-simplifier.md +1 -1
  21. package/dist/builtin/subagents/agents/codebase-analyzer.md +1 -1
  22. package/dist/builtin/subagents/agents/codebase-locator.md +1 -1
  23. package/dist/builtin/subagents/agents/codebase-online-researcher.md +1 -1
  24. package/dist/builtin/subagents/agents/codebase-pattern-finder.md +1 -1
  25. package/dist/builtin/subagents/agents/codebase-research-analyzer.md +1 -1
  26. package/dist/builtin/subagents/agents/codebase-research-locator.md +1 -1
  27. package/dist/builtin/subagents/agents/debugger.md +1 -1
  28. package/dist/builtin/subagents/agents/worker.md +1 -1
  29. package/dist/builtin/subagents/package.json +3 -3
  30. package/dist/builtin/subagents/src/extension/index.bundle.mjs +422 -140
  31. package/dist/builtin/web-access/index.bundle.mjs +202 -52
  32. package/dist/builtin/web-access/package.json +2 -2
  33. package/dist/builtin/workflows/CHANGELOG.md +70 -0
  34. package/dist/builtin/workflows/README.md +2 -2
  35. package/dist/builtin/workflows/builtin/{chunk-h5e65g7g.js → chunk-3y1hmzw6.js} +36 -6
  36. package/dist/builtin/workflows/builtin/{chunk-nqr34qp3.js → chunk-6rbajjf5.js} +7 -1
  37. package/dist/builtin/workflows/builtin/{chunk-qe6bfpbd.js → chunk-bz1c9732.js} +15 -3
  38. package/dist/builtin/workflows/builtin/{chunk-8v8wmb7z.js → chunk-dattsgxg.js} +1 -1
  39. package/dist/builtin/workflows/builtin/{chunk-17zk6ffd.js → chunk-gdx0avpx.js} +355 -67
  40. package/dist/builtin/workflows/builtin/{chunk-rbnj9621.js → chunk-w9c7rkrk.js} +1 -1
  41. package/dist/builtin/workflows/builtin/goal.js +3 -3
  42. package/dist/builtin/workflows/builtin/index.js +5 -5
  43. package/dist/builtin/workflows/builtin/open-claude-design.js +2 -2
  44. package/dist/builtin/workflows/builtin/ralph.js +3 -3
  45. package/dist/builtin/workflows/package.json +2 -2
  46. package/dist/builtin/workflows/src/extension/index.bundle.mjs +531 -143
  47. package/dist/builtin/workflows/src/index.js +212 -72
  48. package/dist/cli/args.js +6 -6
  49. package/dist/cli/args.js.map +1 -1
  50. package/dist/cli/config-selector.d.ts.map +1 -1
  51. package/dist/cli/config-selector.js +2 -1
  52. package/dist/cli/config-selector.js.map +1 -1
  53. package/dist/cli/session-picker.d.ts +2 -1
  54. package/dist/cli/session-picker.d.ts.map +1 -1
  55. package/dist/cli/session-picker.js +3 -2
  56. package/dist/cli/session-picker.js.map +1 -1
  57. package/dist/cli/startup-ui.d.ts.map +1 -1
  58. package/dist/cli/startup-ui.js +2 -1
  59. package/dist/cli/startup-ui.js.map +1 -1
  60. package/dist/core/agent-session-methods.d.ts +1 -0
  61. package/dist/core/agent-session-methods.d.ts.map +1 -1
  62. package/dist/core/agent-session-methods.js.map +1 -1
  63. package/dist/core/agent-session-post-tool-compaction.d.ts.map +1 -1
  64. package/dist/core/agent-session-post-tool-compaction.js +3 -6
  65. package/dist/core/agent-session-post-tool-compaction.js.map +1 -1
  66. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  67. package/dist/core/agent-session-prompt.js +3 -1
  68. package/dist/core/agent-session-prompt.js.map +1 -1
  69. package/dist/core/agent-session-services.d.ts.map +1 -1
  70. package/dist/core/agent-session-services.js +6 -3
  71. package/dist/core/agent-session-services.js.map +1 -1
  72. package/dist/core/agent-session-state.d.ts.map +1 -1
  73. package/dist/core/agent-session-state.js +7 -5
  74. package/dist/core/agent-session-state.js.map +1 -1
  75. package/dist/core/agent-session-tool-hooks.d.ts.map +1 -1
  76. package/dist/core/agent-session-tool-hooks.js +37 -23
  77. package/dist/core/agent-session-tool-hooks.js.map +1 -1
  78. package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
  79. package/dist/core/agent-session-tool-registry.js +9 -2
  80. package/dist/core/agent-session-tool-registry.js.map +1 -1
  81. package/dist/core/agent-session.d.ts +2 -0
  82. package/dist/core/agent-session.d.ts.map +1 -1
  83. package/dist/core/agent-session.js +2 -0
  84. package/dist/core/agent-session.js.map +1 -1
  85. package/dist/core/builtin-packages.d.ts +4 -0
  86. package/dist/core/builtin-packages.d.ts.map +1 -1
  87. package/dist/core/builtin-packages.js +22 -1
  88. package/dist/core/builtin-packages.js.map +1 -1
  89. package/dist/core/callback-activity.d.ts.map +1 -1
  90. package/dist/core/callback-activity.js +6 -3
  91. package/dist/core/callback-activity.js.map +1 -1
  92. package/dist/core/extensions/loader-core.d.ts +1 -0
  93. package/dist/core/extensions/loader-core.d.ts.map +1 -1
  94. package/dist/core/extensions/loader-core.js +11 -1
  95. package/dist/core/extensions/loader-core.js.map +1 -1
  96. package/dist/core/extensions/loader.d.ts +1 -1
  97. package/dist/core/extensions/loader.d.ts.map +1 -1
  98. package/dist/core/extensions/loader.js +1 -1
  99. package/dist/core/extensions/loader.js.map +1 -1
  100. package/dist/core/extensions/runner-registries.d.ts.map +1 -1
  101. package/dist/core/extensions/runner-registries.js +9 -4
  102. package/dist/core/extensions/runner-registries.js.map +1 -1
  103. package/dist/core/extensions/runner-shortcuts.d.ts.map +1 -1
  104. package/dist/core/extensions/runner-shortcuts.js +1 -0
  105. package/dist/core/extensions/runner-shortcuts.js.map +1 -1
  106. package/dist/core/keybindings.d.ts +5 -0
  107. package/dist/core/keybindings.d.ts.map +1 -1
  108. package/dist/core/keybindings.js +4 -0
  109. package/dist/core/keybindings.js.map +1 -1
  110. package/dist/core/mandatory-resource-loader.d.ts +6 -0
  111. package/dist/core/mandatory-resource-loader.d.ts.map +1 -0
  112. package/dist/core/mandatory-resource-loader.js +94 -0
  113. package/dist/core/mandatory-resource-loader.js.map +1 -0
  114. package/dist/core/mandatory-runtime-tools.d.ts +10 -0
  115. package/dist/core/mandatory-runtime-tools.d.ts.map +1 -0
  116. package/dist/core/mandatory-runtime-tools.js +31 -0
  117. package/dist/core/mandatory-runtime-tools.js.map +1 -0
  118. package/dist/core/model-resolver-defaults.js +1 -1
  119. package/dist/core/model-resolver-defaults.js.map +1 -1
  120. package/dist/core/resource-loader-reload.d.ts.map +1 -1
  121. package/dist/core/resource-loader-reload.js +24 -13
  122. package/dist/core/resource-loader-reload.js.map +1 -1
  123. package/dist/core/sdk.d.ts.map +1 -1
  124. package/dist/core/sdk.js +2 -0
  125. package/dist/core/sdk.js.map +1 -1
  126. package/dist/core/settings-manager-ui-accessors.d.ts +4 -1
  127. package/dist/core/settings-manager-ui-accessors.d.ts.map +1 -1
  128. package/dist/core/settings-manager-ui-accessors.js +22 -0
  129. package/dist/core/settings-manager-ui-accessors.js.map +1 -1
  130. package/dist/core/settings-types.d.ts +4 -0
  131. package/dist/core/settings-types.d.ts.map +1 -1
  132. package/dist/core/settings-types.js.map +1 -1
  133. package/dist/core/slash-commands.js +1 -1
  134. package/dist/core/slash-commands.js.map +1 -1
  135. package/dist/main-session.d.ts.map +1 -1
  136. package/dist/main-session.js +3 -2
  137. package/dist/main-session.js.map +1 -1
  138. package/dist/main.d.ts.map +1 -1
  139. package/dist/main.js +6 -0
  140. package/dist/main.js.map +1 -1
  141. package/dist/modes/interactive/components/fast-mode-selector.js +2 -2
  142. package/dist/modes/interactive/components/fast-mode-selector.js.map +1 -1
  143. package/dist/modes/interactive/components/settings-selector-handlers.d.ts.map +1 -1
  144. package/dist/modes/interactive/components/settings-selector-handlers.js +3 -0
  145. package/dist/modes/interactive/components/settings-selector-handlers.js.map +1 -1
  146. package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
  147. package/dist/modes/interactive/components/settings-selector-items.js +7 -0
  148. package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
  149. package/dist/modes/interactive/components/settings-selector-types.d.ts +2 -0
  150. package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
  151. package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
  152. package/dist/modes/interactive/interactive-agent-events.js +2 -1
  153. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  154. package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
  155. package/dist/modes/interactive/interactive-deferred-startup.js +1 -0
  156. package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
  157. package/dist/modes/interactive/interactive-input-handling.js +3 -0
  158. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  159. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  160. package/dist/modes/interactive/interactive-mode-base.js +15 -1
  161. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  162. package/dist/modes/interactive/interactive-mode-surface.d.ts +6 -1
  163. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  164. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  165. package/dist/modes/interactive/interactive-selectors.js +6 -1
  166. package/dist/modes/interactive/interactive-selectors.js.map +1 -1
  167. package/dist/modes/interactive/interactive-session-runtime.js +3 -0
  168. package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
  169. package/dist/modes/interactive/interactive-slash-commands.js +7 -12
  170. package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
  171. package/dist/modes/interactive/interactive-tui.d.ts +1 -0
  172. package/dist/modes/interactive/interactive-tui.d.ts.map +1 -1
  173. package/dist/modes/interactive/interactive-tui.js +16 -0
  174. package/dist/modes/interactive/interactive-tui.js.map +1 -1
  175. package/dist/modes/rpc/rpc-session-binding.d.ts.map +1 -1
  176. package/dist/modes/rpc/rpc-session-binding.js +2 -0
  177. package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
  178. package/docs/compaction.md +1 -1
  179. package/docs/environment-variables.md +2 -0
  180. package/docs/extensions.md +1 -1
  181. package/docs/intercom.md +29 -24
  182. package/docs/keybindings.md +5 -2
  183. package/docs/packages.md +1 -1
  184. package/docs/providers.md +2 -2
  185. package/docs/sdk.md +9 -7
  186. package/docs/settings.md +9 -3
  187. package/docs/subagents.md +2 -2
  188. package/docs/usage.md +7 -6
  189. package/docs/workflows.md +11 -7
  190. package/npm-shrinkwrap.json +59 -77
  191. package/package.json +7 -7
package/docs/workflows.md CHANGED
@@ -1571,7 +1571,7 @@ Pick and document one policy before the run:
1571
1571
 
1572
1572
  Use `block` for risky public contracts, data changes, security behavior, releases, or publication. `warn` is a practical default when a boundary review can replace live steering. Never degrade silently from `block` to `warn` or from guarded execution to `off`.
1573
1573
 
1574
- Intercom capability is tool-gated. A stage with `noTools: "all"`, a `tools` allowlist that omits `intercom`, or `excludedTools: ["intercom"]` cannot use live steering. Use a boundary task or the selected fallback policy for that stage.
1574
+ Ordinary `intercom` is mandatory in every workflow model stage. `noTools: "all"`, restrictive `tools` allowlists, and `excludedTools` continue to restrict every other tool but cannot remove Intercom, so live steering remains available.
1575
1575
 
1576
1576
  ### Lifecycle, topology, and context rules
1577
1577
 
@@ -2425,7 +2425,7 @@ Sets the stage session's [Intercom](/intercom) home group. Every top-level workf
2425
2425
 
2426
2426
  `group` is accepted on `stage`/`task` options, on `ctx.parallel(...)` options, and per parallel step. Explicit values override the workflow invocation group; a step-level value also overrides its parallel-set value. A named string joins that group, including `group: "default"` to opt into the shared default group. Boolean `true` auto-generates one shared UUID group **per `ctx.parallel(...)` set** (minted once for every item in that set), while `true` on a non-parallel stage creates a fresh stage-only group. The trimmed, case-insensitive string sentinels `"true"` and `"auto"` have the same automatic behavior and are reserved.
2427
2427
 
2428
- The full precedence is: explicit stage/task/parallel group > workflow invocation group > `ATOMIC_INTERCOM_GROUP` (or legacy `PI_INTERCOM_GROUP`) > Intercom config > `"default"`. Group assignment is **capability-gated**: a stage with `noTools: "all"`, a `tools` allowlist that omits `intercom`, or `excludedTools` containing `intercom` receives no group. `noTools: "builtin"` still keeps extension tools such as Intercom, so those stages inherit the workflow group unless they exclude Intercom. Subagents inherit their launching stage's resolved group by default (see [subagents.md](/subagents)). The subagent-only `contact_supervisor` channel keeps its broker-authorized cross-group route; ordinary client sends remain group-bound.
2428
+ The full precedence is: explicit stage/task/parallel group > workflow invocation group > `ATOMIC_INTERCOM_GROUP` (or legacy `PI_INTERCOM_GROUP`) > Intercom config > `"default"`. Every workflow model stage receives its workflow invocation group because ordinary Intercom is mandatory. Tool restrictions do not suppress that group; explicit `group` values retain their existing precedence. Subagents inherit their launching stage's resolved group by default (see [subagents.md](/subagents)). The subagent-only `contact_supervisor` channel keeps its broker-authorized cross-group route; ordinary client sends remain group-bound.
2429
2429
 
2430
2430
  Authors do not need to generate or pass a group through ordinary stages, tasks, parallel steps, nested workflows, or delegated subagents. Use an explicit named group or `group: true` only to create an intentional subgroup, such as isolating one reviewer level from another.
2431
2431
 
@@ -2489,7 +2489,7 @@ readonly noTools?: "all" | "builtin";
2489
2489
  readonly excludedTools?: readonly string[];
2490
2490
  ```
2491
2491
 
2492
- `tools` is an allowlist across built-in and bundled extension tools; list every tool the stage should see. `excludedTools` and `noTools: "all"` still win.
2492
+ `tools` is an allowlist across built-in and bundled extension tools. `excludedTools` and `noTools: "all"` still win for every tool except mandatory ordinary `intercom`, which remains registered and active.
2493
2493
 
2494
2494
  The bundled `subagent` tool is available by default on the same terms as main chat. A workflow stage is a top-level session, so it may delegate once; the children it launches may not delegate or control another child. Delegation is exactly one level deep and nothing configures it — there is no config option, agent frontmatter field, or tool parameter for the level. The in-process admission door carries each child's issued depth in its typed child policy, the executor refuses any launch or `interrupt` from a session that was itself admitted as a child, and the Rust `SubagentControl` admission door refuses a child deeper than the single permitted level. That depth is never carried through process environment. Bundled subagent definitions from `@bastani/subagents` are available to that tool. Explicitly list tools such as `subagent`, `web_search`, `fetch_content`, or `intercom` when using an allowlist; in-process child sessions load the bundled resources while suppressing the workflow extension lifecycle.
2495
2495
 
@@ -3341,6 +3341,8 @@ If embedded provisioning fails without leaving retained-process cleanup pending,
3341
3341
 
3342
3342
  **Multiple concurrent Atomic sessions.** Every Atomic process launches DBOS with a unique executor id, and running root workflows carry owner/heartbeat metadata. Once an active model stage has a session path, Atomic records that identity after the stage-start record and awaits the checkpoint before the first model use, then runs serialized, unref'd liveness checkpoints on a bounded 30-second cadence for the root and nested scoped workflows. Each accepted checkpoint refreshes root metadata; timers stop on every stage exit and cannot keep Atomic alive. A persistent checkpoint fault fails the active stage instead of disappearing in a detached timer. A stage that is shutting down drains the checkpoint still in flight rather than abandoning it, so a failure that lands after the model turn finished is reported instead of discarded, and a stage whose final durability checkpoint fails is recorded as `failed` rather than `completed` — its caller receives the error and its concurrency slot is released either way. **Running workflows are never resume targets**: a running row with a fresh heartbeat is hidden from every session's picker and refused by direct `/workflow resume <id>` — resuming a workflow that is executing elsewhere would double-dispatch it. Once the heartbeat goes stale (about two minutes after a crash), an exact inspection or the resume picker reports the workflow as `crashed`.
3343
3343
 
3344
+ Within one Atomic process, DBOS writes stay ordered per durable root workflow. A slow or stalled write for one root does not block an independent top-level workflow from persisting its registration, reaching startup admission, or recording later checkpoints. Nested workflows share their durable root's write order. Process shutdown and explicit lifecycle drains still wait for every root.
3345
+
3344
3346
  When two sessions race to resume the same paused workflow, a durable first-writer-wins claim decides exactly one winner; the loser reconciles to the authoritative state and reports that the workflow changed while resume was pending.
3345
3347
 
3346
3348
  ### How it works
@@ -3567,6 +3569,8 @@ Reload builds a complete replacement registry before publishing it. Concurrent r
3567
3569
 
3568
3570
  The top-level `/reload` command replaces the extension generation as well as rediscovering resources. Within the same Atomic process, the replacement workflows extension adopts the current session's run store and control registries before installing its UI, then remounts the below-editor panel from the adopted snapshot. In-process subagent children keep bundled workflow definitions as resources but do not load the workflows extension or expose its tool, so a child cannot rebind the parent's store. If an older extension generation already displaced a live run into an auxiliary session scope, `/reload` reclaims that live store together with its stage, job, cancellation, tool-control, and prompt owners; retained terminal history from the parent scope is merged before the panel remounts. Newly created session scopes never inherit another session's state. Installed builds can evaluate the extension and host SDK through separate jiti module copies; Atomic canonicalizes each generation's `pi.events` facade through a process-shared session-bus map so both copies adopt the same owners. In-flight `ctx.tool` callbacks and their durable node controls remain owned by that live run and may settle normally after reload; completed siblings remain checkpointed. A run or active tool node can also arrive after the UI is installed through durability hydration, which invalidates the store and mounts or updates the panel immediately. This same-process handoff differs from a process crash: after a real process exit there is no live callback to preserve, so explicit `/workflow resume` replays checkpoints and re-executes only unfinished tool work.
3569
3571
 
3572
+ After `/reload` invalidates the predecessor extension API, in-flight runs keep executing on that generation's module graph. Transcript appends from the captured persistence port are advisory: a stale-extension-context error is ignored so the run can complete, and any other persistence error still fails the run.
3573
+
3570
3574
  The `/workflow` argument-completion popup reads that same live registry. Project, user, package-provided, and built-in workflow names therefore appear immediately after reload both after `/workflow ` and after `/workflow inputs `; restarting Atomic is not required.
3571
3575
 
3572
3576
  A successful rescan may still contain per-resource diagnostics. Both reload surfaces show `CONFIG_INVALID`, `IMPORT_FAILED`, `INVALID_DEFINITION`, `PATH_NOT_FOUND`, and duplicate-name diagnostics instead of reporting bare success while silently skipping a resource. Valid sibling workflows remain available. Fix the reported source/path and reload again; no process restart is required.
@@ -3739,9 +3743,9 @@ Workflow stage sessions inherit the same package and temporary `-e` resource dis
3739
3743
 
3740
3744
  ## Programmatic usage
3741
3745
 
3742
- `@bastani/atomic/workflows` is Atomic's published workflow SDK. Import `workflow` from that specifier, import `Type` from `typebox`, and export the definition returned by `workflow({...})`. Keep runtime helpers such as widget factories and shared utilities in a subdirectory outside the top-level discovery scan, such as `.atomic/workflows/lib/`; see [Workflow Locations](#workflow-locations).
3746
+ `@bastani/atomic/workflows` is Atomic's published workflow SDK. Import `workflow` from that specifier, import `Type` from `typebox`, and export the definition returned by `workflow({...})`. Workflow helpers may also import the host TypeBox runtime subpaths `typebox/compile` and `typebox/value`; the legacy `@sinclair/typebox` root and matching subpaths remain supported. Keep runtime helpers such as widget factories and shared utilities in a subdirectory outside the top-level discovery scan, such as `.atomic/workflows/lib/`; see [Workflow Locations](#workflow-locations).
3743
3747
 
3744
- Package authors list both `@bastani/atomic` and `typebox` in `peerDependencies`. The `@bastani/atomic` package publishes compiled JavaScript and declarations for `@bastani/atomic/workflows`, `@bastani/atomic/workflows/builtin`, and each `@bastani/atomic/workflows/builtin/*` module. TypeScript resolves those exports directly under `moduleResolution: NodeNext`. When Atomic executes a workflow file, its runtime loader resolves the same published specifiers to Atomic's in-memory SDK.
3748
+ Package authors list both `@bastani/atomic` and `typebox` in `peerDependencies`. The `@bastani/atomic` package publishes compiled JavaScript and declarations for `@bastani/atomic/workflows`, `@bastani/atomic/workflows/builtin`, and each `@bastani/atomic/workflows/builtin/*` module. TypeScript resolves those exports directly under `moduleResolution: NodeNext`. When Atomic executes a workflow file or an imported helper, its runtime loader resolves the workflow SDK and supported TypeBox aliases to the same in-memory host modules. It intentionally does not expose extension-only host modules such as the agent core, UI, provider transport, or lockfile implementation.
3745
3749
 
3746
3750
  ```ts
3747
3751
  import { workflow } from "@bastani/atomic/workflows";
@@ -4046,11 +4050,11 @@ Workflow stages can use faster inference on supported OpenAI and GitHub Copilot
4046
4050
 
4047
4051
  ### Fast mode
4048
4052
 
4049
- Use `/fast` to manage fast mode separately for normal chat and workflow-stage sessions. The settings are `codexFastMode.chat` and `codexFastMode.workflow`; workflow stages use the workflow scope, not the chat scope. A stage inside a nested `ctx.workflow(...)` call keeps that workflow scope, and subagents launched by the stage inherit it.
4053
+ Use `/fast` to manage fast mode separately for normal chat and workflow-stage sessions. The settings are `codexFastMode.chat` and `codexFastMode.workflow`; main-chat subagents use the chat scope, while workflow stages use the workflow scope. A stage inside a nested `ctx.workflow(...)` call keeps that workflow scope, and subagents launched by the stage inherit it.
4050
4054
 
4051
4055
  Fast mode is eligible for supported `openai/*` and `openai-codex/*` providers, provider aliases that use the shared `openai-codex-responses` transport, and GitHub Copilot models whose OAuth account catalog advertises a fast variant. OpenAI requests use the priority service tier. GitHub Copilot requests use the account-supported fast variant without adding the OpenAI service-tier field. Azure OpenAI, OpenRouter, and generic OpenAI-compatible providers are not eligible.
4052
4056
 
4053
- Atomic resolves eligibility for the effective model on every fallback attempt. A supported fallback can use fast mode even when the primary failed, while an unsupported fallback keeps its normal request behavior. Workflow stage model labels and stage-launched subagent result labels keep the raw model ID and append a separate `fast` marker; graph node cards keep their dependency metadata focused on topology and do not repeat that marker.
4057
+ Atomic resolves eligibility for the effective model on every fallback attempt. A supported fallback can use fast mode even when the primary failed, while an unsupported fallback keeps its normal request behavior. Workflow stage model labels and all subagent result labels keep the raw model ID and append a separate `fast` marker; for an entitled Copilot child, the marker appears exactly when the request uses the account-advertised `<model-id>-fast` variant. Graph node cards keep their dependency metadata focused on topology and do not repeat that marker.
4054
4058
 
4055
4059
  Enable workflow fast mode deliberately for broad workflows. Parallel fan-out and fallback attempts can multiply fast provider requests and usage.
4056
4060
 
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.9.16-alpha.9",
3
+ "version": "0.9.16",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bastani/atomic",
9
- "version": "0.9.16-alpha.9",
9
+ "version": "0.9.16",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@bastani/atomic-natives": "0.9.16-alpha.9",
12
+ "@bastani/atomic-natives": "0.9.16",
13
+ "@bastani/pi-ai": "0.9.16",
13
14
  "@dbos-inc/dbos-sdk": "4.25.14",
14
- "@earendil-works/pi-agent-core": "^0.84.3",
15
- "@bastani/pi-ai": "0.9.16-alpha.9",
16
- "@earendil-works/pi-client": "^0.84.3",
17
- "@earendil-works/pi-protocol": "^0.84.3",
18
- "@earendil-works/pi-tui": "^0.84.3",
15
+ "@earendil-works/pi-agent-core": "^0.84.4",
16
+ "@earendil-works/pi-client": "^0.84.4",
17
+ "@earendil-works/pi-protocol": "^0.84.4",
18
+ "@earendil-works/pi-tui": "^0.84.4",
19
19
  "@modelcontextprotocol/ext-apps": "^1.7.5",
20
20
  "@modelcontextprotocol/sdk": "^1.30.0",
21
21
  "@mozilla/readability": "^0.6.0",
@@ -517,18 +517,18 @@
517
517
  }
518
518
  },
519
519
  "node_modules/@bastani/atomic-natives": {
520
- "version": "0.9.16-alpha.9",
521
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.9.16-alpha.9.tgz",
520
+ "version": "0.9.16",
521
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.9.16.tgz",
522
522
  "license": "MIT",
523
523
  "optionalDependencies": {
524
- "@bastani/atomic-natives-darwin-arm64": "0.9.16-alpha.9",
525
- "@bastani/atomic-natives-darwin-x64": "0.9.16-alpha.9",
526
- "@bastani/atomic-natives-linux-arm64-gnu": "0.9.16-alpha.9",
527
- "@bastani/atomic-natives-linux-arm64-musl": "0.9.16-alpha.9",
528
- "@bastani/atomic-natives-linux-x64-gnu": "0.9.16-alpha.9",
529
- "@bastani/atomic-natives-linux-x64-musl": "0.9.16-alpha.9",
530
- "@bastani/atomic-natives-win32-arm64-msvc": "0.9.16-alpha.9",
531
- "@bastani/atomic-natives-win32-x64-msvc": "0.9.16-alpha.9"
524
+ "@bastani/atomic-natives-darwin-arm64": "0.9.16",
525
+ "@bastani/atomic-natives-darwin-x64": "0.9.16",
526
+ "@bastani/atomic-natives-linux-arm64-gnu": "0.9.16",
527
+ "@bastani/atomic-natives-linux-arm64-musl": "0.9.16",
528
+ "@bastani/atomic-natives-linux-x64-gnu": "0.9.16",
529
+ "@bastani/atomic-natives-linux-x64-musl": "0.9.16",
530
+ "@bastani/atomic-natives-win32-arm64-msvc": "0.9.16",
531
+ "@bastani/atomic-natives-win32-x64-msvc": "0.9.16"
532
532
  },
533
533
  "engines": {
534
534
  "bun": ">=1.4.0",
@@ -536,8 +536,8 @@
536
536
  }
537
537
  },
538
538
  "node_modules/@bastani/atomic-natives-darwin-arm64": {
539
- "version": "0.9.16-alpha.9",
540
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.9.16-alpha.9.tgz",
539
+ "version": "0.9.16",
540
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.9.16.tgz",
541
541
  "license": "MIT",
542
542
  "os": [
543
543
  "darwin"
@@ -548,8 +548,8 @@
548
548
  "optional": true
549
549
  },
550
550
  "node_modules/@bastani/atomic-natives-darwin-x64": {
551
- "version": "0.9.16-alpha.9",
552
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.9.16-alpha.9.tgz",
551
+ "version": "0.9.16",
552
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.9.16.tgz",
553
553
  "license": "MIT",
554
554
  "os": [
555
555
  "darwin"
@@ -560,8 +560,8 @@
560
560
  "optional": true
561
561
  },
562
562
  "node_modules/@bastani/atomic-natives-linux-arm64-gnu": {
563
- "version": "0.9.16-alpha.9",
564
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.9.16-alpha.9.tgz",
563
+ "version": "0.9.16",
564
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.9.16.tgz",
565
565
  "license": "MIT",
566
566
  "os": [
567
567
  "linux"
@@ -575,8 +575,8 @@
575
575
  "optional": true
576
576
  },
577
577
  "node_modules/@bastani/atomic-natives-linux-arm64-musl": {
578
- "version": "0.9.16-alpha.9",
579
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-musl/-/atomic-natives-linux-arm64-musl-0.9.16-alpha.9.tgz",
578
+ "version": "0.9.16",
579
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-musl/-/atomic-natives-linux-arm64-musl-0.9.16.tgz",
580
580
  "license": "MIT",
581
581
  "os": [
582
582
  "linux"
@@ -590,8 +590,8 @@
590
590
  "optional": true
591
591
  },
592
592
  "node_modules/@bastani/atomic-natives-linux-x64-gnu": {
593
- "version": "0.9.16-alpha.9",
594
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.9.16-alpha.9.tgz",
593
+ "version": "0.9.16",
594
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.9.16.tgz",
595
595
  "license": "MIT",
596
596
  "os": [
597
597
  "linux"
@@ -605,8 +605,8 @@
605
605
  "optional": true
606
606
  },
607
607
  "node_modules/@bastani/atomic-natives-linux-x64-musl": {
608
- "version": "0.9.16-alpha.9",
609
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-musl/-/atomic-natives-linux-x64-musl-0.9.16-alpha.9.tgz",
608
+ "version": "0.9.16",
609
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-musl/-/atomic-natives-linux-x64-musl-0.9.16.tgz",
610
610
  "license": "MIT",
611
611
  "os": [
612
612
  "linux"
@@ -620,8 +620,8 @@
620
620
  "optional": true
621
621
  },
622
622
  "node_modules/@bastani/atomic-natives-win32-arm64-msvc": {
623
- "version": "0.9.16-alpha.9",
624
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.9.16-alpha.9.tgz",
623
+ "version": "0.9.16",
624
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.9.16.tgz",
625
625
  "license": "MIT",
626
626
  "os": [
627
627
  "win32"
@@ -632,8 +632,8 @@
632
632
  "optional": true
633
633
  },
634
634
  "node_modules/@bastani/atomic-natives-win32-x64-msvc": {
635
- "version": "0.9.16-alpha.9",
636
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.9.16-alpha.9.tgz",
635
+ "version": "0.9.16",
636
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.9.16.tgz",
637
637
  "license": "MIT",
638
638
  "os": [
639
639
  "win32"
@@ -644,13 +644,13 @@
644
644
  "optional": true
645
645
  },
646
646
  "node_modules/@bastani/pi-ai": {
647
- "version": "0.9.16-alpha.9",
648
- "resolved": "https://registry.npmjs.org/@bastani/pi-ai/-/pi-ai-0.9.16-alpha.9.tgz",
647
+ "version": "0.9.16",
648
+ "resolved": "https://registry.npmjs.org/@bastani/pi-ai/-/pi-ai-0.9.16.tgz",
649
649
  "license": "MIT",
650
650
  "dependencies": {
651
651
  "@anthropic-ai/sdk": "0.91.1",
652
652
  "@aws-sdk/client-bedrock-runtime": "3.1048.0",
653
- "@earendil-works/pi-telemetry": "0.84.2",
653
+ "@earendil-works/pi-telemetry": "0.84.4",
654
654
  "@google/genai": "1.52.0",
655
655
  "@smithy/node-http-handler": "4.7.3",
656
656
  "http-proxy-agent": "7.0.2",
@@ -701,13 +701,13 @@
701
701
  ]
702
702
  },
703
703
  "node_modules/@earendil-works/pi-agent-core": {
704
- "version": "0.84.3",
705
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-agent-core/-/pi-agent-core-0.84.3.tgz",
706
- "integrity": "sha512-VURr+xBRl3RxYcw3kT9Pn3yfi6LbRoCJgHF7h1mAblMjtLNV/MfG/RyF0uJizBAM886AEakSiw3j9c/aSngppg==",
704
+ "version": "0.84.4",
705
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-agent-core/-/pi-agent-core-0.84.4.tgz",
706
+ "integrity": "sha512-HyUnjaOXj6oN/6SNcr8A1J/ElRQA50FtIE0XUTSKAQVqmdlb9qdojOyUQwF/jULE5+yOEtGuVgi/N1RnBiNG+g==",
707
707
  "license": "MIT",
708
708
  "dependencies": {
709
- "@earendil-works/pi-ai": "^0.84.3",
710
- "@earendil-works/pi-telemetry": "^0.84.3",
709
+ "@earendil-works/pi-ai": "^0.84.4",
710
+ "@earendil-works/pi-telemetry": "^0.84.4",
711
711
  "diff": "8.0.4",
712
712
  "ignore": "7.0.5",
713
713
  "typebox": "1.3.7",
@@ -717,24 +717,15 @@
717
717
  "node": ">=22.19.0"
718
718
  }
719
719
  },
720
- "node_modules/@earendil-works/pi-agent-core/node_modules/@earendil-works/pi-telemetry": {
721
- "version": "0.84.3",
722
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-telemetry/-/pi-telemetry-0.84.3.tgz",
723
- "integrity": "sha512-sgEkWoKrvSGaKn+YfLLFZmn+/A7B/w62eLwTD57nI+C9to8ITlFFVbgC2OtwvPnT3NFGHdCd53qhBEMIlptD1g==",
724
- "license": "MIT",
725
- "engines": {
726
- "node": ">=22.19.0"
727
- }
728
- },
729
720
  "node_modules/@earendil-works/pi-ai": {
730
- "version": "0.84.3",
731
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-0.84.3.tgz",
732
- "integrity": "sha512-M0YUV8vNO3y2WwWSyY8ijKJV5W4gkSUixuvk+Z00ZBjsyMfsdXfITsHEwP1UIf09YRWXT6oGn0GlCamt+P32XQ==",
721
+ "version": "0.84.4",
722
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-0.84.4.tgz",
723
+ "integrity": "sha512-AClAZxf5+c4RRu44NJPS6wyQy+Nmq+Mzyyrdvm4ZVMNuixelO02RZX4G4Aq1F145Yzp43wnM5S+hLlSI7ypfVw==",
733
724
  "license": "MIT",
734
725
  "dependencies": {
735
726
  "@anthropic-ai/sdk": "0.91.1",
736
727
  "@aws-sdk/client-bedrock-runtime": "3.1048.0",
737
- "@earendil-works/pi-telemetry": "^0.84.3",
728
+ "@earendil-works/pi-telemetry": "^0.84.4",
738
729
  "@google/genai": "1.52.0",
739
730
  "@smithy/node-http-handler": "4.7.3",
740
731
  "http-proxy-agent": "7.0.2",
@@ -750,31 +741,22 @@
750
741
  "node": ">=22.19.0"
751
742
  }
752
743
  },
753
- "node_modules/@earendil-works/pi-ai/node_modules/@earendil-works/pi-telemetry": {
754
- "version": "0.84.3",
755
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-telemetry/-/pi-telemetry-0.84.3.tgz",
756
- "integrity": "sha512-sgEkWoKrvSGaKn+YfLLFZmn+/A7B/w62eLwTD57nI+C9to8ITlFFVbgC2OtwvPnT3NFGHdCd53qhBEMIlptD1g==",
757
- "license": "MIT",
758
- "engines": {
759
- "node": ">=22.19.0"
760
- }
761
- },
762
744
  "node_modules/@earendil-works/pi-client": {
763
- "version": "0.84.3",
764
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-client/-/pi-client-0.84.3.tgz",
765
- "integrity": "sha512-zfErYane+390W0xpBJ/FWCp6aktPpkpcIcXUeZiAziWLoxE80ZNQALRyOSa/gGS5V+1OkNnMYxRxbzN0zUvnOA==",
745
+ "version": "0.84.4",
746
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-client/-/pi-client-0.84.4.tgz",
747
+ "integrity": "sha512-q398WY/3ZQHTizk7IKxApzqFV0xt4yM9LkSkwyqeLK5Bj5RwRjOWxESt26z4LgNp4O+8hqhqFPf/8fj4H5rE4A==",
766
748
  "license": "MIT",
767
749
  "dependencies": {
768
- "@earendil-works/pi-protocol": "^0.84.3"
750
+ "@earendil-works/pi-protocol": "^0.84.4"
769
751
  },
770
752
  "engines": {
771
753
  "node": ">=22.19.0"
772
754
  }
773
755
  },
774
756
  "node_modules/@earendil-works/pi-protocol": {
775
- "version": "0.84.3",
776
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-protocol/-/pi-protocol-0.84.3.tgz",
777
- "integrity": "sha512-9a4g6WhLOvRqvsIOFaWxg/2gdrbY4Thclwj5ipLUPAWChfsDJ/8XdPc2sRhSOkD6EsxpEFJz3xppcfwI6EcZDg==",
757
+ "version": "0.84.4",
758
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-protocol/-/pi-protocol-0.84.4.tgz",
759
+ "integrity": "sha512-acyE9ozxkMiWiz/xyWpU0O9vwnYv0hyG889Vniv6Sg9c9zfsX+8MePnDNphBacY2Fvm1rxdsGmiVDSZl9yuDFA==",
778
760
  "license": "MIT",
779
761
  "dependencies": {
780
762
  "typebox": "1.3.7"
@@ -784,18 +766,18 @@
784
766
  }
785
767
  },
786
768
  "node_modules/@earendil-works/pi-telemetry": {
787
- "version": "0.84.2",
788
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-telemetry/-/pi-telemetry-0.84.2.tgz",
789
- "integrity": "sha512-wg5caea7uIv1BHRBm2Y116RvFG4oSAiP5qk9tA2463PDGIr4K8M1Ceyyg5DOpF/shUUl0gk826yQJAeAcHYB9g==",
769
+ "version": "0.84.4",
770
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-telemetry/-/pi-telemetry-0.84.4.tgz",
771
+ "integrity": "sha512-8e2CuxM+ht+hedQXTZmi5JVl6/xDK9RpSDL2+MbITevKYQhMZ/z6lJOTFgox3HQyGxO8mOZEtYGVeQNaD4OzqA==",
790
772
  "license": "MIT",
791
773
  "engines": {
792
774
  "node": ">=22.19.0"
793
775
  }
794
776
  },
795
777
  "node_modules/@earendil-works/pi-tui": {
796
- "version": "0.84.3",
797
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-tui/-/pi-tui-0.84.3.tgz",
798
- "integrity": "sha512-fS6OEQKEEALnKa6Uw8LcgZZ+9CWck7f3MQSCETQp6leUgIFwMEDtKmOUnL9nsYm+RIPmy7OmplVxYRbV6hiaFg==",
778
+ "version": "0.84.4",
779
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-tui/-/pi-tui-0.84.4.tgz",
780
+ "integrity": "sha512-nPUnwDkLtupPXnZQYrCwPFcuTydCDqTY6ZbFqhsL4S4kVq0AT418kPa/6uXwtaCD+MjBNBltb7ScTYX65yeE1w==",
799
781
  "license": "MIT",
800
782
  "dependencies": {
801
783
  "get-east-asian-width": "1.6.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.9.16-alpha.9",
3
+ "version": "0.9.16",
4
4
  "description": "Atomic coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "atomicConfig": {
@@ -79,13 +79,13 @@
79
79
  "prepublishOnly": "bun run clean && bun run build && bun run shrinkwrap"
80
80
  },
81
81
  "dependencies": {
82
- "@bastani/atomic-natives": "0.9.16-alpha.9",
82
+ "@bastani/atomic-natives": "0.9.16",
83
+ "@bastani/pi-ai": "0.9.16",
83
84
  "@dbos-inc/dbos-sdk": "4.25.14",
84
- "@earendil-works/pi-agent-core": "^0.84.3",
85
- "@bastani/pi-ai": "0.9.16-alpha.9",
86
- "@earendil-works/pi-client": "^0.84.3",
87
- "@earendil-works/pi-protocol": "^0.84.3",
88
- "@earendil-works/pi-tui": "^0.84.3",
85
+ "@earendil-works/pi-agent-core": "^0.84.4",
86
+ "@earendil-works/pi-client": "^0.84.4",
87
+ "@earendil-works/pi-protocol": "^0.84.4",
88
+ "@earendil-works/pi-tui": "^0.84.4",
89
89
  "@modelcontextprotocol/ext-apps": "^1.7.5",
90
90
  "@modelcontextprotocol/sdk": "^1.30.0",
91
91
  "@mozilla/readability": "^0.6.0",