@bastani/atomic 0.9.28-alpha.3 → 0.9.28-alpha.4

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 (211) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/builtin/intercom/package.json +2 -2
  3. package/dist/builtin/mcp/package.json +1 -1
  4. package/dist/builtin/subagents/CHANGELOG.md +6 -0
  5. package/dist/builtin/subagents/package.json +3 -3
  6. package/dist/builtin/subagents/skills/agent-browser/SKILL.md +1 -1
  7. package/dist/builtin/subagents/skills/cua-driver/BROWSER.md +60 -39
  8. package/dist/builtin/subagents/skills/cua-driver/EMBEDDING.md +119 -36
  9. package/dist/builtin/subagents/skills/cua-driver/LINUX.md +225 -183
  10. package/dist/builtin/subagents/skills/cua-driver/MACOS.md +120 -89
  11. package/dist/builtin/subagents/skills/cua-driver/README.md +16 -7
  12. package/dist/builtin/subagents/skills/cua-driver/RECORDING.md +85 -115
  13. package/dist/builtin/subagents/skills/cua-driver/RUNTIME.md +113 -0
  14. package/dist/builtin/subagents/skills/cua-driver/SKILL.md +55 -1071
  15. package/dist/builtin/subagents/skills/cua-driver/VISUAL.md +125 -0
  16. package/dist/builtin/subagents/skills/cua-driver/WINDOWS.md +145 -185
  17. package/dist/builtin/subagents/skills/cua-driver/WORKFLOW.md +173 -0
  18. package/dist/builtin/web-access/package.json +2 -2
  19. package/dist/builtin/workflows/CHANGELOG.md +10 -0
  20. package/dist/builtin/workflows/README.md +1 -1
  21. package/dist/builtin/workflows/package.json +2 -2
  22. package/dist/builtin/workflows/skills/impeccable/SKILL.md +8 -2
  23. package/dist/builtin/workflows/skills/impeccable/reference/adapt.md +6 -0
  24. package/dist/builtin/workflows/skills/impeccable/reference/audit.md +2 -1
  25. package/dist/builtin/workflows/skills/impeccable/reference/component-review.md +63 -0
  26. package/dist/builtin/workflows/skills/impeccable/reference/degraded/asset-producer.md +5 -0
  27. package/dist/builtin/workflows/skills/impeccable/reference/degraded/finish-reviewer.md +1 -1
  28. package/dist/builtin/workflows/skills/impeccable/reference/generate.md +101 -0
  29. package/dist/builtin/workflows/skills/impeccable/reference/harden.md +9 -0
  30. package/dist/builtin/workflows/skills/impeccable/reference/hooks.md +3 -1
  31. package/dist/builtin/workflows/skills/impeccable/reference/mode-operate.md +21 -0
  32. package/dist/builtin/workflows/skills/impeccable/reference/mode-persuade.md +19 -0
  33. package/dist/builtin/workflows/skills/impeccable/reference/mode-read.md +21 -0
  34. package/dist/builtin/workflows/skills/impeccable/reference/new-work.md +19 -12
  35. package/dist/builtin/workflows/skills/impeccable/reference/region-map.md +26 -0
  36. package/dist/builtin/workflows/skills/impeccable/reference/routing.md +1 -1
  37. package/dist/builtin/workflows/skills/impeccable/reference/visualize.md +5 -5
  38. package/dist/builtin/workflows/skills/impeccable/scripts/VERSION +1 -1
  39. package/dist/builtin/workflows/skills/impeccable/scripts/command-metadata.json +4 -0
  40. package/dist/builtin/workflows/skills/impeccable/scripts/impeccable.cmd +2 -2
  41. package/dist/builtin/workflows/skills/impeccable/scripts/live-browser-session.js +5 -1
  42. package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +524 -4
  43. package/dist/builtin/workflows/skills/prompt-engineer/SKILL.md +1 -0
  44. package/dist/builtin/workflows/skills/prompt-engineer/references/claude_haiku_5_5.md +81 -0
  45. package/dist/codemode-worker.js +2 -2
  46. package/dist/core/agent-session-compaction.d.ts +3 -3
  47. package/dist/core/agent-session-compaction.d.ts.map +1 -1
  48. package/dist/core/agent-session-compaction.js +5 -1
  49. package/dist/core/agent-session-compaction.js.map +1 -1
  50. package/dist/core/agent-session-events.d.ts.map +1 -1
  51. package/dist/core/agent-session-events.js +1 -0
  52. package/dist/core/agent-session-events.js.map +1 -1
  53. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  54. package/dist/core/agent-session-extension-bindings.js +4 -0
  55. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  56. package/dist/core/agent-session-methods.d.ts +6 -1
  57. package/dist/core/agent-session-methods.d.ts.map +1 -1
  58. package/dist/core/agent-session-methods.js.map +1 -1
  59. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  60. package/dist/core/agent-session-prompt.js +3 -2
  61. package/dist/core/agent-session-prompt.js.map +1 -1
  62. package/dist/core/agent-session-types.d.ts +1 -0
  63. package/dist/core/agent-session-types.d.ts.map +1 -1
  64. package/dist/core/agent-session-types.js.map +1 -1
  65. package/dist/core/agent-session.d.ts +1 -0
  66. package/dist/core/agent-session.d.ts.map +1 -1
  67. package/dist/core/agent-session.js.map +1 -1
  68. package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
  69. package/dist/core/export-html/tool-renderer.js +2 -0
  70. package/dist/core/export-html/tool-renderer.js.map +1 -1
  71. package/dist/core/extensions/agent-events.d.ts +2 -0
  72. package/dist/core/extensions/agent-events.d.ts.map +1 -1
  73. package/dist/core/extensions/agent-events.js.map +1 -1
  74. package/dist/core/extensions/context-types.d.ts +2 -0
  75. package/dist/core/extensions/context-types.d.ts.map +1 -1
  76. package/dist/core/extensions/context-types.js.map +1 -1
  77. package/dist/core/extensions/mcp-server-registry.d.ts +4 -1
  78. package/dist/core/extensions/mcp-server-registry.d.ts.map +1 -1
  79. package/dist/core/extensions/mcp-server-registry.js +7 -4
  80. package/dist/core/extensions/mcp-server-registry.js.map +1 -1
  81. package/dist/core/extensions/runner.d.ts +3 -0
  82. package/dist/core/extensions/runner.d.ts.map +1 -1
  83. package/dist/core/extensions/runner.js +19 -0
  84. package/dist/core/extensions/runner.js.map +1 -1
  85. package/dist/core/extensions/tool-types.d.ts +2 -0
  86. package/dist/core/extensions/tool-types.d.ts.map +1 -1
  87. package/dist/core/extensions/tool-types.js.map +1 -1
  88. package/dist/core/fast-model-variants.d.ts.map +1 -1
  89. package/dist/core/fast-model-variants.js +3 -2
  90. package/dist/core/fast-model-variants.js.map +1 -1
  91. package/dist/core/model-resolver-defaults.d.ts.map +1 -1
  92. package/dist/core/model-resolver-defaults.js +2 -0
  93. package/dist/core/model-resolver-defaults.js.map +1 -1
  94. package/dist/core/nested-tool-calls.d.ts +1 -0
  95. package/dist/core/nested-tool-calls.d.ts.map +1 -1
  96. package/dist/core/nested-tool-calls.js +1 -0
  97. package/dist/core/nested-tool-calls.js.map +1 -1
  98. package/dist/core/settings-types.js.map +1 -1
  99. package/dist/core/tools/bash.d.ts.map +1 -1
  100. package/dist/core/tools/bash.js +7 -3
  101. package/dist/core/tools/bash.js.map +1 -1
  102. package/dist/core/tools/edit.js +1 -1
  103. package/dist/core/tools/edit.js.map +1 -1
  104. package/dist/extensions/codemode/execute.d.ts.map +1 -1
  105. package/dist/extensions/codemode/execute.js +55 -7
  106. package/dist/extensions/codemode/execute.js.map +1 -1
  107. package/dist/extensions/codemode/index.d.ts.map +1 -1
  108. package/dist/extensions/codemode/index.js +7 -0
  109. package/dist/extensions/codemode/index.js.map +1 -1
  110. package/dist/extensions/codemode/tool.d.ts +2 -0
  111. package/dist/extensions/codemode/tool.d.ts.map +1 -1
  112. package/dist/extensions/codemode/tool.js +2 -0
  113. package/dist/extensions/codemode/tool.js.map +1 -1
  114. package/dist/index.d.ts +1 -1
  115. package/dist/index.d.ts.map +1 -1
  116. package/dist/index.js.map +1 -1
  117. package/dist/modes/interactive/components/bash-execution.d.ts +5 -1
  118. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  119. package/dist/modes/interactive/components/bash-execution.js +17 -14
  120. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  121. package/dist/modes/interactive/components/branch-summary-message.d.ts +2 -1
  122. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  123. package/dist/modes/interactive/components/branch-summary-message.js +5 -2
  124. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  125. package/dist/modes/interactive/components/chat-message-renderer.d.ts +1 -0
  126. package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
  127. package/dist/modes/interactive/components/chat-message-renderer.js +19 -8
  128. package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
  129. package/dist/modes/interactive/components/compaction-boundary-message.d.ts +3 -2
  130. package/dist/modes/interactive/components/compaction-boundary-message.d.ts.map +1 -1
  131. package/dist/modes/interactive/components/compaction-boundary-message.js +7 -4
  132. package/dist/modes/interactive/components/compaction-boundary-message.js.map +1 -1
  133. package/dist/modes/interactive/components/custom-entry.d.ts +3 -1
  134. package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
  135. package/dist/modes/interactive/components/custom-entry.js +8 -2
  136. package/dist/modes/interactive/components/custom-entry.js.map +1 -1
  137. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  138. package/dist/modes/interactive/components/custom-message.js +1 -0
  139. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  140. package/dist/modes/interactive/components/settings-selector-items.js +1 -1
  141. package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
  142. package/dist/modes/interactive/components/skill-invocation-message.d.ts +2 -1
  143. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  144. package/dist/modes/interactive/components/skill-invocation-message.js +5 -2
  145. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  146. package/dist/modes/interactive/components/tool-execution.d.ts +4 -0
  147. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  148. package/dist/modes/interactive/components/tool-execution.js +10 -0
  149. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  150. package/dist/modes/interactive/interactive-agent-events.js +3 -1
  151. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  152. package/dist/modes/interactive/interactive-auth-login.js +6 -0
  153. package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
  154. package/dist/modes/interactive/interactive-bash-compact.js +2 -2
  155. package/dist/modes/interactive/interactive-bash-compact.js.map +1 -1
  156. package/dist/modes/interactive/interactive-extension-dialogs.js +11 -2
  157. package/dist/modes/interactive/interactive-extension-dialogs.js.map +1 -1
  158. package/dist/modes/interactive/interactive-mode-base.d.ts +3 -0
  159. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  160. package/dist/modes/interactive/interactive-mode-base.js +6 -0
  161. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  162. package/dist/modes/interactive/interactive-mode-surface.d.ts +2 -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-render-chat.js +7 -5
  166. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  167. package/dist/modes/interactive/interactive-selectors.js +8 -1
  168. package/dist/modes/interactive/interactive-selectors.js.map +1 -1
  169. package/dist/modes/interactive/interactive-session-runtime.js +1 -0
  170. package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
  171. package/dist/modes/interactive/interactive-startup.js +1 -0
  172. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  173. package/dist/modes/interactive/program-status-reporter.d.ts +24 -0
  174. package/dist/modes/interactive/program-status-reporter.d.ts.map +1 -0
  175. package/dist/modes/interactive/program-status-reporter.js +96 -0
  176. package/dist/modes/interactive/program-status-reporter.js.map +1 -0
  177. package/dist/modes/interactive-engine/engine-custom-ui.d.ts.map +1 -1
  178. package/dist/modes/interactive-engine/engine-custom-ui.js +1 -0
  179. package/dist/modes/interactive-engine/engine-custom-ui.js.map +1 -1
  180. package/dist/modes/interactive-engine/engine-render-service.d.ts.map +1 -1
  181. package/dist/modes/interactive-engine/engine-render-service.js +3 -1
  182. package/dist/modes/interactive-engine/engine-render-service.js.map +1 -1
  183. package/dist/modes/interactive-engine/protocol.d.ts +1 -0
  184. package/dist/modes/interactive-engine/protocol.d.ts.map +1 -1
  185. package/dist/modes/interactive-engine/protocol.js +1 -0
  186. package/dist/modes/interactive-engine/protocol.js.map +1 -1
  187. package/dist/modes/interactive-engine/remote-renderer.d.ts +3 -0
  188. package/dist/modes/interactive-engine/remote-renderer.d.ts.map +1 -1
  189. package/dist/modes/interactive-engine/remote-renderer.js +7 -0
  190. package/dist/modes/interactive-engine/remote-renderer.js.map +1 -1
  191. package/docs/codemode.md +10 -6
  192. package/docs/compaction.md +1 -1
  193. package/docs/computer-use.md +9 -9
  194. package/docs/custom-provider/streaming.md +4 -0
  195. package/docs/environment-variables.md +2 -0
  196. package/docs/extensions/api-reference.md +1 -1
  197. package/docs/extensions/authoring.md +2 -0
  198. package/docs/extensions/events.md +5 -1
  199. package/docs/getting-started/first-session.md +1 -1
  200. package/docs/json.md +6 -1
  201. package/docs/models/evals.md +34 -3
  202. package/docs/models.md +1 -1
  203. package/docs/providers.md +8 -0
  204. package/docs/sdk.md +7 -1
  205. package/docs/settings.md +1 -1
  206. package/docs/skills.md +1 -1
  207. package/docs/terminal-setup.md +14 -0
  208. package/docs/workflows/authoring.md +3 -3
  209. package/examples/extensions/sandbox/package-lock.json +3 -3
  210. package/npm-shrinkwrap.json +67 -67
  211. package/package.json +8 -8
@@ -24,6 +24,10 @@ Per-vendor provider configurations (base URLs, auth, model catalogs) live under
24
24
 
25
25
  All providers follow the same pattern:
26
26
 
27
+ Return a stream from `createAssistantMessageEventStream()` or construct `AssistantMessageEventStream` directly. A plain `EventStream` subclass does not satisfy the response stream type.
28
+
29
+ The stream sets optional `durationMs` on the final assistant message using a monotonic clock. Set `timestamp` when the request starts. Existing durations are preserved; messages whose timestamps predate the stream, such as fetched deferred results, remain untimed.
30
+
27
31
  ```typescript
28
32
  import {
29
33
  type AssistantMessage,
@@ -21,6 +21,8 @@ Atomic accepts environment variables for configuration, provider credentials, an
21
21
 
22
22
  The renderer also owns `PI_HYPERLINKS`, `PI_IMAGE_PROTOCOL`, and `PI_TRUE_COLOR`. `PI_HYPERLINKS=1|0|auto` and `PI_TRUE_COLOR=1|0|auto` override or preserve detection; `PI_IMAGE_PROTOCOL=kitty|iterm2|none|auto` selects, disables, or preserves image-protocol detection. Explicit JSON values under `terminal.hyperlinks`, `terminal.images`, and `terminal.trueColor` take precedence. These renderer-owned names intentionally have no `ATOMIC_*` aliases.
23
23
 
24
+ `PI_PROGRAM_STATUS=1` forces OSC 7501 program-status reports; `0` disables them. Otherwise Atomic reports only after the terminal confirms support. This renderer-owned variable has no `ATOMIC_*` alias. See [Program status](/terminal-setup#program-status).
25
+
24
26
  ## Prompt-cache retention
25
27
 
26
28
  Atomic defaults to **long** prompt-cache retention in main chat, workflow stages, and subagents wherever the provider/model supports it. `PI_CACHE_RETENTION` intentionally has no `ATOMIC_*` alias. Set it before launching Atomic to choose `short`, `none`, or `long`:
@@ -185,7 +185,7 @@ if (usage && usage.tokens > 100_000) {
185
185
 
186
186
  ### ctx.compact()
187
187
 
188
- Trigger Atomic's verbatim line compactor without awaiting completion. The planner emits numbered deleted-line ranges only; Atomic validates them and reconstructs retained text mechanically. Use `compression_ratio` (fraction of compactable lines to keep), client-side `preserve_recent` (an exact context-visible message count), and `query` to tune the run, and `onComplete`/`onError` for follow-up actions.
188
+ Trigger Atomic's verbatim line compactor without awaiting completion. The planner emits numbered deleted-line ranges only; Atomic validates them and reconstructs retained text mechanically. Use `compression_ratio` (fraction of compactable lines to keep), client-side `preserve_recent` (an exact context-visible message count), and `query` to tune the run, `compactionModel` to pick an exact compaction model for this run without changing settings, and `onComplete`/`onError` for follow-up actions.
189
189
 
190
190
  ```typescript
191
191
  ctx.compact({
@@ -628,6 +628,8 @@ pi.registerTool({
628
628
  - `lastComponent` - the previously returned component for that slot, if any
629
629
  - `invalidate()` - request a rerender of this tool row
630
630
  - `toolCallId`, `cwd`, `executionStarted`, `argsComplete`, `isPartial`, `expanded`, `showImages`, `isError`
631
+ - `durationMs` - recorded execution time of the final result; `undefined` while running, when the tool did not run, or for older saved results
632
+ - `outputPad` - configured horizontal padding; renderers with `renderShell: "self"` apply it themselves
631
633
 
632
634
  Use `context.state` for cross-slot shared state. Keep slot-local caches on the returned component instance when you want to reuse and mutate the same component across renders.
633
635
 
@@ -312,6 +312,8 @@ Inside `before_agent_start`, `event.systemPrompt` and `ctx.getSystemPrompt()` bo
312
312
 
313
313
  `agent_start` begins a low-level run. `agent_end` fires when that run ends, but Atomic may still retry, compact and retry, or deliver queued follow-ups. `agent_before_settle` is the final actionable boundary: it can append session entries and request one continuation. `agent_settled` is final and notification-only; use it when a status integration needs to know Atomic has no automatic continuation left, including a chain of repeated output-cap continuations. Silence during a provider request or between these runs is not settlement.
314
314
 
315
+ `agent_settled` includes `aborted: true` when the prompt was cancelled, including cancellation during `agent_before_settle`. Otherwise it is `false`. Use this field to distinguish cancellation from normal completion; an aborted prompt still emits the final settlement notification.
316
+
315
317
  ```typescript
316
318
  pi.on("agent_start", async (_event, ctx) => {});
317
319
  pi.on("agent_end", async (event, ctx) => {
@@ -459,10 +461,12 @@ pi.on("tool_execution_update", async (event, ctx) => {
459
461
  });
460
462
 
461
463
  pi.on("tool_execution_end", async (event, ctx) => {
462
- // event.toolCallId, event.toolName, event.result, event.isError
464
+ // event.toolCallId, event.toolName, event.result, event.isError, event.durationMs
463
465
  });
464
466
  ```
465
467
 
468
+ `durationMs` is the time spent in the tool's `execute()`, measured with a monotonic clock. It is absent when the tool did not run.
469
+
466
470
  #### context
467
471
 
468
472
  Fired before each LLM call. Modify messages non-destructively. See [Session Format](/session-format) for message types. When tool output crosses the buffered compaction threshold, the post-tool compaction preflight finishes before this hook runs for the follow-up call, so `event.messages` contains the rebuilt compacted context.
@@ -120,7 +120,7 @@ Skills are reusable expert instructions. Trigger one with `/skill:<name>` follow
120
120
  | `liteparse` | Pull text, tables, or values out of PDF, DOCX, PPTX, XLSX, and image files locally. | `/skill:liteparse` |
121
121
  | `show-me` | Explain a topic visually with concise diagrams, code-shape sketches, or focused HTML artifacts. HumanLayer, MIT licensed. | `/skill:show-me` |
122
122
 
123
- Impeccable 4.3.1 runs its commands (`context`, `live`, `detect`, hooks, and the rest) through a self-contained engine binary instead of Node scripts. The bundled launcher, `scripts/impeccable` (`impeccable.cmd` on Windows), looks for a binary next to itself, then in `~/.impeccable/bin/`, and otherwise downloads the pinned engine release for your platform into `~/.impeccable/bin/<version>/` and verifies it against its published SHA-256 before running it, so the first use needs network access. Point `IMPECCABLE_BIN` at a preinstalled engine or set `IMPECCABLE_HOME` to a writable cache when that is not possible. Atomic's launcher keeps the engine's anonymous concept-roll ping and its `npx impeccable update` check switched off, since the skill ships with each Atomic release. Live sessions resolve to the selected app root and support SvelteKit, Nuxt, TanStack Start, Astro, Next.js, Vite, and static HTML injection. The image fallback runs only with `OPENAI_API_KEY`, sends prompts and optional reference images to OpenAI, and spends that account's API credit. Generated image prompts are embedded in the image or a sidecar, so do not include secrets.
123
+ Impeccable 4.5.0 runs its commands (`context`, `live`, `detect`, hooks, and the rest) through a self-contained engine binary instead of Node scripts. The bundled launcher, `scripts/impeccable` (`impeccable.cmd` on Windows), looks for a binary next to itself, then in `~/.impeccable/bin/`, and otherwise downloads the pinned engine release for your platform into `~/.impeccable/bin/<version>/` and verifies it against its published SHA-256 before running it, so the first use needs network access. Point `IMPECCABLE_BIN` at a preinstalled engine or set `IMPECCABLE_HOME` to a writable cache when that is not possible. Atomic's launcher keeps the engine's anonymous concept-roll ping and its `npx impeccable update` check switched off, since the skill ships with each Atomic release. Live sessions resolve to the selected app root and support SvelteKit, Nuxt, TanStack Start, Astro, Next.js, Vite, and static HTML injection. The image fallback runs only with `OPENAI_API_KEY`, sends prompts and optional reference images to OpenAI, and spends that account's API credit. Generated image prompts are embedded in the image or a sidecar, so do not include secrets.
124
124
 
125
125
  Use `/skill:research-codebase` for a focused subsystem or question. For repository-wide research, use `fan-out-and-synthesize` with distinct repository partitions and an artifact synthesis barrier. Use Goal for ledger-backed bounded orchestration and Ralph for research-first delegated implementation with iterative review; task size alone does not select either workflow.
126
126
 
package/docs/json.md CHANGED
@@ -32,6 +32,7 @@ Events are defined in [`AgentSessionEvent`](https://github.com/bastani-inc/atomi
32
32
  ```typescript
33
33
  type AgentSessionEvent =
34
34
  | AgentEvent
35
+ | { type: "agent_settled"; aborted: boolean }
35
36
  | { type: "queue_update"; steering: readonly string[]; followUp: readonly string[] }
36
37
  | { type: "compaction_start"; reason: "manual" | "threshold" | "overflow" }
37
38
  | { type: "session_info_changed"; name: string | undefined }
@@ -48,6 +49,8 @@ type AgentSessionEvent =
48
49
 
49
50
  `queue_update` emits the full pending steering and follow-up queues whenever they change. `session_info_changed`, `model_changed`, and `thinking_level_changed` report interactive session metadata changes. `compaction_start` and `compaction_end` cover manual and automatic verbatim line compaction: the model emits deleted ranges and Atomic mechanically reconstructs retained text.
50
51
 
52
+ `agent_end` closes one low-level agent run; retries, compaction recovery, or queued work may still continue. `agent_settled` means no automatic work remains for the session-level run. Its `aborted` field is `true` when the run was cancelled.
53
+
51
54
  For automatic compaction, `compaction_end.willRetry === true` means the interrupted turn will retry; `AgentSession.prompt()` waits for that continuation. This includes overflow and retry-worthy threshold recovery, such as output-token truncation or OpenAI Responses output-budget underflow. Generic `invalid_request_body` failures still use `willRetry: false` when threshold compaction is warranted.
52
55
 
53
56
  If same-model compact-and-retry recovery is exhausted, `unresolvedOverflow: true` and `errorMessage` let integrations choose another model rather than treating the prompt as successful.
@@ -73,9 +76,11 @@ type AgentEvent =
73
76
  // Tool execution
74
77
  | { type: "tool_execution_start"; toolCallId: string; toolName: string; args: any }
75
78
  | { type: "tool_execution_update"; toolCallId: string; toolName: string; args: any; partialResult: any }
76
- | { type: "tool_execution_end"; toolCallId: string; toolName: string; result: any; isError: boolean };
79
+ | { type: "tool_execution_end"; toolCallId: string; toolName: string; result: any; isError: boolean; durationMs?: number };
77
80
  ```
78
81
 
82
+ Final assistant and tool-result messages include optional `durationMs` timing. On `tool_execution_end`, it records how long the tool's `execute()` took using a monotonic clock; it is absent when the tool did not run.
83
+
79
84
  On the wire, each `message_update` record carries:
80
85
 
81
86
  - The streaming delta in `assistantMessageEvent`, with its cumulative `partial` field stripped.
@@ -5,7 +5,7 @@ description: "Primary-source benchmark facts used by Atomic automatic model rout
5
5
 
6
6
  # Evals
7
7
 
8
- Last Accessed: 2026-09-25.
8
+ Last Accessed: 2026-10-07 (Claude Haiku 5.5 additions; earlier rows retain their snapshot dates below).
9
9
 
10
10
  Key:
11
11
 
@@ -46,12 +46,19 @@ Key:
46
46
 
47
47
  ## Artificial Analysis Intelligence Index v4.3.2
48
48
 
49
- Table: the 673 models on the Artificial Analysis leaderboard as of 2026-09-25, including models with no published scores, plus 5 Claude Sonnet 5.5 rows accessed 2026-09-28 and 5 GPT-6.1 Sol rows accessed 2026-09-29.
49
+ Table: the 673 models on the Artificial Analysis leaderboard as of 2026-09-25, including models with no published scores, plus 5 Claude Sonnet 5.5 rows accessed 2026-09-28, 5 GPT-6.1 Sol rows accessed 2026-09-29, and 5 Claude Haiku 5.5 rows accessed 2026-10-07.
50
50
 
51
51
  GPT-6.1 Sol's five effort rows were accessed 2026-09-29 from the [leaderboard](https://artificialanalysis.ai/leaderboards/models) and [model page](https://artificialanalysis.ai/models/gpt-6-1-sol). The release date is not an evaluation run date; run dates are unpublished. AA's [methodology](https://artificialanalysis.ai/methodology/intelligence-benchmarking) uses mini-swe-agent for TB4, all 66 tasks, pass@1 averaged over three repeats, a 500-step cap and no context compaction.
52
52
 
53
+ Claude Haiku 5.5 rows were accessed 2026-10-07 from the [leaderboard](https://artificialanalysis.ai/leaderboards/models) and the [max](https://artificialanalysis.ai/models/claude-haiku-5-5), [xhigh](https://artificialanalysis.ai/models/claude-haiku-5-5-xhigh), [high](https://artificialanalysis.ai/models/claude-haiku-5-5-high), [medium](https://artificialanalysis.ai/models/claude-haiku-5-5-medium), and [low](https://artificialanalysis.ai/models/claude-haiku-5-5-low) model pages. AA labels these configurations "with fallback". All five pages publish non-estimated indices and twelve component measurements in their public structured data, although their text rendering says "Not publicly available". Evaluation run dates are unpublished; the release date is not an evaluation run date. These are AA measurements, not Anthropic's launch-table results. Missing `ONH` remains unknown; the published hallucination rate is a different metric.
54
+
53
55
  | slug | Model | Release date | idx | Brief | Gn | Auto | TB4 | Sci | HLE | PDF | Crit | OA | ONH | LCR | Omni | GPQA | TB21 | TBh | IF | MMMU | tau2 | tauB | Analyst | ITB | Apex | AIME | LCB | Harvey | MLCR | Open | Ent |
54
56
  | --- | --- | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
57
+ | claude-haiku-5-5 | Claude Haiku 5.5 (Adaptive Reasoning, Max Effort, With Fallback) | 2026-10-07 | 43.4 | 53.9 | 56.0 | 35.4 | 32.8 | 55.0 | 44.4 | 20.8 | 18.9 | 36.4 | ∅ | 82.7 | 10.7 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | 89.9 | ∅ | ∅ | ∅ |
58
+ | claude-haiku-5-5-xhigh | Claude Haiku 5.5 (Adaptive Reasoning, Xhigh Effort, With Fallback) | 2026-10-07 | 41.2 | 51.6 | 50.5 | 36.0 | 29.3 | 51.7 | 42.7 | 18.2 | 22.6 | 35.0 | ∅ | 78.3 | 6.1 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | 89.9 | ∅ | ∅ | ∅ |
59
+ | claude-haiku-5-5-high | Claude Haiku 5.5 (Adaptive Reasoning, High Effort, With Fallback) | 2026-10-07 | 37.8 | 47.1 | 46.0 | 33.7 | 21.7 | 48.7 | 37.3 | 17.2 | 18.6 | 34.8 | ∅ | 77.3 | 5.8 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | 89.5 | ∅ | ∅ | ∅ |
60
+ | claude-haiku-5-5-medium | Claude Haiku 5.5 (Adaptive Reasoning, Medium Effort, With Fallback) | 2026-10-07 | 34.5 | 43.6 | 38.8 | 28.6 | 15.2 | 49.0 | 33.8 | 15.2 | 12.9 | 34.0 | ∅ | 77.3 | 4.5 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | 89.2 | ∅ | ∅ | ∅ |
61
+ | claude-haiku-5-5-low | Claude Haiku 5.5 (Adaptive Reasoning, Low Effort, With Fallback) | 2026-10-07 | 29.4 | 30.6 | 31.2 | 22.9 | 12.6 | 49.2 | 27.0 | 11.2 | 9.1 | 33.3 | ∅ | 72.0 | 3.3 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | 87.9 | ∅ | ∅ | ∅ |
55
62
  | gpt-6-1-sol | GPT-6.1 Sol (max) | 2026-09-29 | 51.8 | 53.2 | 53.8 | 64.9 | 56.1 | 54.2 | 52.9 | 31 | 31.7 | 62.1 | 45.7 | 83 | 41.5 | ∅ | ∅ | ∅ | ∅ | 86 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | 33.9 | ∅ | ∅ |
56
63
  | gpt-6-1-sol-xhigh | GPT-6.1 Sol (xhigh) | 2026-09-29 | 51 | 50.3 | 50.5 | 66.6 | 54 | 55.7 | 52.6 | 31.8 | 31.7 | 60.8 | 49.1 | 79.7 | 40.9 | ∅ | ∅ | ∅ | ∅ | 85.1 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ |
57
64
  | gpt-6-1-sol-high | GPT-6.1 Sol (high) | 2026-09-29 | 50.2 | 48.6 | 49.3 | 64.5 | 51.5 | 55.8 | 51.4 | 32 | 30 | 60.8 | 50.6 | 82.3 | 41.5 | ∅ | ∅ | ∅ | ∅ | 84.9 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ |
@@ -780,6 +787,8 @@ Source: [FrontierCode leaderboard](https://cognition.com/frontiercode) by Cognit
780
787
 
781
788
  GPT-6.1 Sol was added 2026-09-29 and accessed that day in the [primary JSON](https://cognition.com/data/frontiercode-leaderboard/data.json). Its best score on both sets is medium effort under the `codex` harness. The Codex revision and run date are unpublished. Main averages 11,365 output tokens and 14.42 minutes per rollout.
782
789
 
790
+ Claude Haiku 5.5 was added and accessed 2026-10-07 in the [primary JSON](https://cognition.com/data/frontiercode-leaderboard/data.json). Its best score on both sets is max effort under the Claude Code harness; the run date is unpublished. No unfair-internet-use flag rate is recorded here. Mean cost per Main rollout is $1.33.
791
+
783
792
  Key:
784
793
 
785
794
  - FrontierCode: mergeability of agent-written pull requests on tasks built by open-source maintainers, graded by rubrics, unit tests and other verifiers for correctness, test quality, scope discipline, style and codebase conventions. Runs that consult solution-bearing sources such as the original pull request score zero.
@@ -802,6 +811,7 @@ Key:
802
811
  | grok-4-7 | Grok 4.7 | high | 47.6 | 53.1 | 59.4 | 65.2 | 1.3 | $6.65 |
803
812
  | gpt-5-6-sol | GPT-5.6 Sol | max | 47.5 | 52.9 | 60.6 | 66.6 | 0.0 | $5.19 |
804
813
  | claude-opus-4-8 | Opus 4.8 | max | 46.5 | 51.6 | 59.6 | 65.5 | 0.6 | $9.62 |
814
+ | claude-haiku-5-5 | Haiku 5.5 | max | 46.4 | 51.7 | 58.4 | 64.7 | ∅ | $1.33 |
805
815
  | kimi-k3 | Kimi K3 | ∅ | 44.2 | 48.9 | 58.2 | 63.6 | 0.2 | $3.82 |
806
816
  | gemini-3-7-flash | Gemini 3.7 Flash | medium | 43.6 | 48.9 | 56.3 | 62.3 | 0.0 | $1.82 |
807
817
  | gpt-5-5 | GPT-5.5 | xhigh | 43.0 | 48.2 | 56.7 | 62.8 | 0.4 | $4.03 |
@@ -834,7 +844,7 @@ Key:
834
844
 
835
845
  ## Published benchmark results
836
846
 
837
- Scores published by model vendors and benchmark owners for recent frontier models, accessed 2026-09-25; Claude Sonnet 5.5 rows accessed 2026-09-28. Values are percent. Each row names its source; the same benchmark can appear once per source because vendors run different harnesses, grading and effort levels. Internal vendor evaluations are excluded.
847
+ Scores published by model vendors and benchmark owners for recent frontier models, accessed 2026-09-25; Claude Sonnet 5.5 rows accessed 2026-09-28 and Claude Haiku 5.5 rows accessed 2026-10-07. Values are percent unless the setting names another unit. Each row names its source; the same benchmark can appear once per source because vendors run different harnesses, grading and effort levels. Internal vendor evaluations are excluded.
838
848
 
839
849
  Sources: OpenAI = [GPT-6 Astra announcement](https://openai.com/index/gpt-6-astra/); Anthropic = [Claude Fable 5.1 announcement](https://www.anthropic.com/claude-fable-and-mythos-5-1), [Claude Sonnet 5.5 announcement](https://www.anthropic.com/claude-sonnet-5-5) and [system card](https://www.anthropic.com/claude-sonnet-5-5-system-card); Google = [Gemini 3.8 Flash model card](https://deepmind.google/models/model-cards/gemini-3-8-flash/); ARC Prize = [arcprize.org results](https://arcprize.org/results/google-gemini-3-8-flash); TB-Science leaderboard = [terminal-bench-science.ai](https://www.terminal-bench-science.ai/); Zapier = [AutomationBench leaderboard](https://zapier.com/benchmarks).
840
850
 
@@ -842,10 +852,18 @@ GPT-6.1 Sol rows were accessed 2026-09-29. OpenAI = [Sol 6.1 announcement](https
842
852
 
843
853
  No matching Sol 6.1 row was retrieved from the DeepSWE, TB-Science, Zapier, Surge GDP.pdf, OSWorld or ARC Prize owner leaderboards on that date. These gaps are unknown, not zero. No `minimal` effort is measured here, and no Fast or Ultrafast tier has a separate benchmark or latency measurement for any model. Atomic's derived `-fast` and `-ultrafast` routes use explicit base-model metadata to reuse capability evidence, not a separately measured tier score or latency result.
844
854
 
855
+ Claude Haiku 5.5: Anthropic = [launch announcement](https://www.anthropic.com/claude-haiku-5-5), published and accessed 2026-10-07. These launch-table results are vendor-reported; effort, harness revisions, and evaluation run dates are not stated unless shown in the setting. GDPval-AA and AA-Briefcase are raw Elo, not the normalized AA columns above. No Haiku 5.5 result was published on the checked [DeepSWE leaderboard](https://deepswe.datacurve.ai/) on 2026-10-07; no row is added to that table.
856
+
857
+ Artificial Analysis independently measures Haiku 5.5 Terminal-Bench-Science in its **with-fallback** configuration. Sources accessed 2026-10-07: effort-specific model pages for [max](https://artificialanalysis.ai/models/claude-haiku-5-5), [xhigh](https://artificialanalysis.ai/models/claude-haiku-5-5-xhigh), [high](https://artificialanalysis.ai/models/claude-haiku-5-5-high), [medium](https://artificialanalysis.ai/models/claude-haiku-5-5-medium), and [low](https://artificialanalysis.ai/models/claude-haiku-5-5-low), the [evaluation page](https://artificialanalysis.ai/evaluations/terminal-bench-science), and [AA's general methodology](https://artificialanalysis.ai/methodology/intelligence-benchmarking). That methodology specifies version 0.1.0, 70 tasks, mini-swe-agent, pass@1 averaged over three repeats, and a 1,000-step cap. These are AA's general settings, not a separately documented Haiku-specific harness revision. Evaluation run dates are unpublished; these are not Anthropic launch-table results.
858
+
845
859
  Key:
846
860
 
847
861
  - `DSWE`: DeepSWE v1.1, vendor-reported software-engineering results; distinct from Datacurve's independent table above.
848
862
  - `GDPpdf`: GDP.pdf All-pass, satisfying every criterion on professional-document tasks.
863
+ - `GDPElo`, `BriefElo`: GDPval-AA v2.1 and AA-Briefcase v1.1, raw Elo ratings.
864
+ - `OSW21`: OSWorld 2.1, computer-use workflows; the Haiku result covers the offline subset.
865
+ - `FC11`: FrontierCode 1.1 Main, weighted rubric score; distinct from all-blocking-criteria pass rate.
866
+ - `Chart`: Chartography, chart understanding without tools.
849
867
 
850
868
  - `ALE`: [Agents' Last Exam](https://agents-last-exam.org/), long-horizon professional tasks in real software, from financial modeling to engineering and media production.
851
869
  - `OSW2`, `OSW2s`: [OSWorld 2.0](https://osworld-v2.xlang.ai/), long-horizon computer-use workflows operating desktop applications through the screen; partial credit and strict all-pass scoring.
@@ -864,6 +882,19 @@ Key:
864
882
 
865
883
  | slug | Model | Benchmark | Score | Setting | Source |
866
884
  | --- | --- | --- | ---: | --- | --- |
885
+ | claude-haiku-5-5 | Claude Haiku 5.5 | GDPElo | 1620 | v2.1; raw Elo; effort not stated | Anthropic |
886
+ | claude-haiku-5-5 | Claude Haiku 5.5 | BriefElo | 1578 | v1.1; raw Elo; effort not stated | Anthropic |
887
+ | claude-haiku-5-5 | Claude Haiku 5.5 | OSW21 | 72.4 | v2.1, offline subset; effort not stated | Anthropic |
888
+ | claude-haiku-5-5 | Claude Haiku 5.5 | HLE | 45.9 | no tools; effort not stated | Anthropic |
889
+ | claude-haiku-5-5 | Claude Haiku 5.5 | HLEt | 57.4 | with tools; effort not stated | Anthropic |
890
+ | claude-haiku-5-5 | Claude Haiku 5.5 | TB4 | 39.2 | v4.0; effort not stated | Anthropic |
891
+ | claude-haiku-5-5 | Claude Haiku 5.5 | FC11 | 46.4 | v1.1 Main; effort not stated in launch table | Anthropic |
892
+ | claude-haiku-5-5 | Claude Haiku 5.5 | Chart | 46.4 | no tools; effort not stated | Anthropic |
893
+ | claude-haiku-5-5 | Claude Haiku 5.5 | TBSci | 20.0 | max effort; with-fallback; AA general settings above | Artificial Analysis |
894
+ | claude-haiku-5-5-xhigh | Claude Haiku 5.5 | TBSci | 18.1 | xhigh effort; with-fallback; AA general settings above | Artificial Analysis |
895
+ | claude-haiku-5-5-high | Claude Haiku 5.5 | TBSci | 10.0 | high effort; with-fallback; AA general settings above | Artificial Analysis |
896
+ | claude-haiku-5-5-medium | Claude Haiku 5.5 | TBSci | 7.1 | medium effort; with-fallback; AA general settings above | Artificial Analysis |
897
+ | claude-haiku-5-5-low | Claude Haiku 5.5 | TBSci | 1.9 | low effort; with-fallback; AA general settings above | Artificial Analysis |
867
898
  | gpt-6-1-sol | GPT-6.1 Sol | TBSci | 58.1 | max effort; v0.1.0, 70 tasks, mini-swe-agent, pass@1 over 3 repeats, 1000-step cap | Artificial Analysis |
868
899
  | gpt-6-1-sol-low | GPT-6.1 Sol | DSWE | 64.4 | low effort; v1.1; OpenAI-reported, harness not stated | OpenAI |
869
900
  | gpt-6-1-sol-medium | GPT-6.1 Sol | DSWE | 73 | medium effort; v1.1; OpenAI-reported, harness not stated | OpenAI |
package/docs/models.md CHANGED
@@ -25,7 +25,7 @@ For choosing which model to use rather than how to declare one, see [Model selec
25
25
 
26
26
  Classifier models answer typed questions about JSON state instead of chatting. They do not appear in `/model`. Enable [codemode](/tools#codemode), list them with `models.getAvailableOfType("classifier")`, and call `models.classify(model, { state, questions })`. See [Codemode](/codemode#classify) for question and answer shapes.
27
27
 
28
- OpenAI's `gpt-6-luna` classifier uses the [Decisions API](https://developers.openai.com/api/docs/guides/decisions) and requires `OPENAI_API_KEY`. Sign in with ChatGPT credentials do not work with it. While `openai` uses `/login` credentials, the classifier is not listed as available, even if the environment key is set. Log out of `openai` to use the API key.
28
+ OpenAI's GPT-6 Luna Decisions classifier is `openai-decisions/gpt-6-luna`. It uses the [Decisions API](https://developers.openai.com/api/docs/guides/decisions) and needs an API key, either from `OPENAI_API_KEY` or saved with `/login openai-decisions`. ChatGPT sign-in does not work with it. The provider has its own credential, so you can sign in with ChatGPT on `openai` and still use the classifier. `openai/gpt-6-luna` always means the chat model.
29
29
 
30
30
  GPT-6 Luna accepts up to 128 image blocks through `images`, alongside the JSON state. Other classifiers reject images unless their catalog input and API support them. Refused answers produce an error result. The endpoint rejects inputs above 922K tokens; very large inputs, currently above roughly 600K tokens, can hit its gateway time limit. These 504 responses are not retried, so reduce the input before trying again.
31
31
 
package/docs/providers.md CHANGED
@@ -67,6 +67,12 @@ Complete the browser callback, or paste the full callback URL into the login dia
67
67
 
68
68
  Apps using `@bastani/pi-ai` directly can pass `{ agentName: "my-app" }` as the fourth argument to `models.login()` to set the OpenAI ChatGPT name hint or Codex browser-login originator. ChatGPT sign-in keeps `Atomic` as its default name.
69
69
 
70
+ ### Subscription and API key at the same time
71
+
72
+ `openai` and `anthropic` hold one credential each, so a subscription login there replaces the API key. To keep both, use the API-key-only providers `openai-api` and `anthropic-api`. They list the same chat models, send requests to the same endpoints, and read `OPENAI_API_KEY` or `ANTHROPIC_API_KEY` unless you save a key with `/login openai-api` or `/login anthropic-api`. They never offer subscription sign-in, and `anthropic-api` ignores `ANTHROPIC_OAUTH_TOKEN` and `ANTHROPIC_AUTH_TOKEN`.
73
+
74
+ For example, sign in with ChatGPT under `openai` and select `openai/gpt-6-sol` for subscription chat, while a workflow stage pinned to `openai-api/gpt-6-sol` bills the API key.
75
+
70
76
  ### OpenAI Codex
71
77
 
72
78
  - Requires ChatGPT Plus or Pro subscription
@@ -218,9 +224,11 @@ Catalog failures preserve the last usable models for each provider. See [catalog
218
224
  | Provider | Environment Variable | `auth.json` key |
219
225
  | ---------------------------------- | ------------------------------------------------------------------------- | ---------------------------- |
220
226
  | Anthropic | `ANTHROPIC_API_KEY` or bearer-only `ANTHROPIC_AUTH_TOKEN` | `anthropic` |
227
+ | Anthropic (API key only) | `ANTHROPIC_API_KEY` | `anthropic-api` |
221
228
  | Ant Ling | `ANT_LING_API_KEY` | `ant-ling` |
222
229
  | Azure | `AZURE_OPENAI_API_KEY` | `azure` |
223
230
  | OpenAI | `OPENAI_API_KEY` | `openai` |
231
+ | OpenAI (API key only) | `OPENAI_API_KEY` | `openai-api` |
224
232
  | DeepSeek | `DEEPSEEK_API_KEY` | `deepseek` |
225
233
  | NVIDIA NIM | `NVIDIA_API_KEY` | `nvidia` |
226
234
  | Google Gemini | `GEMINI_API_KEY` | `google` |
package/docs/sdk.md CHANGED
@@ -420,7 +420,7 @@ interface AgentSession {
420
420
  navigateTree(targetId: string, options?: { summarize?: boolean; customInstructions?: string; replaceInstructions?: boolean; label?: string }): Promise<{ editorText?: string; cancelled: boolean; aborted?: boolean; summaryEntry?: BranchSummaryEntry }>;
421
421
 
422
422
  // Verbatim line compaction
423
- compact(options?: Partial<VerbatimCompactionParameters>): Promise<VerbatimCompactionResult>;
423
+ compact(options?: SessionCompactOptions): Promise<VerbatimCompactionResult>; // Partial<VerbatimCompactionParameters> & { compactionModel?: string }
424
424
  abortCompaction(): void;
425
425
 
426
426
  // Abort current operation
@@ -493,6 +493,12 @@ Caller-supplied `executeBash()` IDs remain correlation IDs, not unique operation
493
493
 
494
494
  `compact()` removes selected older transcript lines without asking the model to rewrite retained text. It appends a durable `compaction` entry with `details.strategy: "verbatim-lines"` and respects the configured recent-message count. See [Compaction](/compaction) for controls and [Session format](/session-format#compactionentry) for persisted fields.
495
495
 
496
+ Pass `compactionModel` to choose the compaction model for one call without changing settings. It accepts the same exact `provider/model` IDs as the [`compactionModel` setting](/compaction#compaction-model): a chat model, a registered classifier, or `morph/morph-compactor`. An unknown ID rejects before the active run is interrupted. A call made while another manual compaction is running joins that run and uses its model.
497
+
498
+ ```typescript
499
+ await session.compact({ compactionModel: "typesafe/jev-latest", query: "keep the auth decisions" });
500
+ ```
501
+
496
502
  `session.navigateTree()` rejects during streaming, compaction, or branch summarization rather than queueing the navigation. The active branch stays unchanged. Wait for the operation to finish before retrying.
497
503
 
498
504
  Session replacement APIs such as new-session, resume, fork, and import live on `AgentSessionRuntime`, not on `AgentSession`.
package/docs/settings.md CHANGED
@@ -201,7 +201,7 @@ See [Providers](/providers#fast-models) for which providers publish fast variant
201
201
  | `doubleEscapeAction` | string | `"tree"` | Action for double-escape: `"tree"`, `"fork"`, or `"none"` |
202
202
  | `treeFilterMode` | string | `"default"` | Default filter for `/tree`: `"default"`, `"no-tools"`, `"user-only"`, `"labeled-only"`, `"all"` |
203
203
  | `editorPaddingX` | number | `0` | Horizontal padding for input editor (0-3) |
204
- | `outputPad` | number | `1` | Horizontal padding for chat message output (user messages, assistant messages, thinking blocks). `0` or `1` |
204
+ | `outputPad` | number | `1` | Horizontal transcript padding for messages, tool output, `!` command output, and summary blocks. `0` or `1` |
205
205
  | `externalEditor` | string | - | Command for the Ctrl+G external editor; takes precedence over `$VISUAL`/`$EDITOR`. Defaults to Notepad on Windows and `nano` elsewhere |
206
206
  | `autocompleteMaxVisible` | number | `5` | Max visible items in the default editor and custom editors installed through `ctx.ui.setEditorComponent()` (3-20) |
207
207
  | `showHardwareCursor` | boolean | `false` | Show the terminal cursor while TUI positions it for IME support |
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 screenshot-driven CUA. For everything else, including native desktop apps, native iOS apps in the Simulator, Android emulators, OS dialogs, and desktop Safari or other non-Chromium browsers, load `/skill:cua-driver` and drive the exact window with one-shot `cua-driver call <tool>` commands; when a custom workflow's TypeScript owns the scenario, use the `@trycua/cua-driver` SDK inside `ctx.tool` instead. See [what agent-browser covers](/computer-use#what-agent-browser-covers) for the full split, and [Computer use](/computer-use#desktop-automation-with-cua-driver) for installing the Cua Driver executable, turning telemetry off, readiness, and permissions. 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 [Cua Driver skill](https://github.com/trycua/cua/tree/cua-driver-rs-v0.28.2/libs/cua-driver/rust/Skills/cua-driver) is upstream's `libs/cua-driver/rust/Skills/cua-driver` at tag `cua-driver-rs-v0.28.2`, vendored verbatim with all three platform guides (`MACOS.md`, `WINDOWS.md`, `LINUX.md`) plus `BROWSER.md`, `RECORDING.md`, and `EMBEDDING.md`; only the `SKILL.md` frontmatter is Atomic-owned. MIT licensed, © 2025 Cua AI, Inc. It teaches the snapshot → act → fresh snapshot → verify loop for the `cua-driver` CLI; it does not install the `cua-driver` executable, grant permissions, or turn telemetry off, and Atomic never runs `cua-driver skills install`. Chromium browsers, Mobile Safari, and CDP-exposing apps stay with `agent-browser` even though the vendored `BROWSER.md` describes upstream's browser route; that route applies only to browsers agent-browser cannot reach, such as desktop Safari or Firefox.
120
+ The bundled [Cua Driver skill](https://github.com/trycua/cua/tree/cua-driver-rs-v0.34.0/libs/cua-driver/rust/Skills/cua-driver) is upstream's `libs/cua-driver/rust/Skills/cua-driver` at tag `cua-driver-rs-v0.34.0`, vendored verbatim with all three platform guides (`MACOS.md`, `WINDOWS.md`, `LINUX.md`) plus `WORKFLOW.md`, `RUNTIME.md`, `VISUAL.md`, `BROWSER.md`, `RECORDING.md`, and `EMBEDDING.md`; only the `SKILL.md` frontmatter is Atomic-owned. MIT licensed, © 2025 Cua AI, Inc. Its core guide routes to focused references for authorization, exact targets, observation, and outcome verification. It does not install the `cua-driver` executable, grant permissions, or turn telemetry off, and Atomic never runs `cua-driver skills install`. Chromium browsers, Mobile Safari, and CDP-exposing apps stay with `agent-browser` even though the vendored `BROWSER.md` describes upstream's browser route; that route applies only to browsers agent-browser cannot reach, such as desktop Safari or Firefox.
121
121
 
122
122
  The bundled [Herdr skill](https://github.com/herdrdev/herdr/blob/v0.9.0/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
 
@@ -182,3 +182,17 @@ The built-in terminal has limited escape sequence support. SHIFT+Enter cannot be
182
182
  If you want the hardware cursor visible, set `ATOMIC_HARDWARE_CURSOR=1` before running Atomic. The legacy `PI_HARDWARE_CURSOR=1` alias also works; the hardware cursor is disabled by default for compatibility.
183
183
 
184
184
  Consider using a dedicated terminal emulator for the best experience.
185
+
186
+ ## Program status
187
+
188
+ Atomic reports its state with the [Program Status Protocol (OSC 7501)](https://www.superlogical.com/rex/docs/build/program-status), so supporting terminals and dashboards can show whether it is working, waiting for you, done, or failed:
189
+
190
+ | State | When |
191
+ |---|---|
192
+ | `working` | An agent run or compaction is in progress. The message is the session name, or `Compacting context`. |
193
+ | `blocked` | An extension dialog or login waits for you. The message is the dialog title. |
194
+ | `done` | A run finished. The message is the session name. |
195
+ | `error` | A run ended with an error that is not retried. The message is the first line of the error. |
196
+ | `idle` | Atomic started, or you cancelled the run. |
197
+
198
+ Reports never contain prompts or model output. Atomic sends them only after the terminal answers the protocol's support query; tmux and screen do not forward them. Set `PI_PROGRAM_STATUS=1` to send reports without asking, or `PI_PROGRAM_STATUS=0` to disable reports.
@@ -529,11 +529,11 @@ Prerequisites and setup, each as one bounded attempt:
529
529
 
530
530
  - `node` (preferred) or `bun` on the host. If neither is present, install one in a bounded attempt (Node via [fnm](https://github.com/Schniz/fnm) with `fnm install --lts` or the host's package manager, Bun via `curl -fsSL https://bun.sh/install | bash`) and report what the installer did; if the install is refused or fails, report that as the limitation rather than retrying.
531
531
  - The `cua-driver` executable (`cua-driver --version`), installed with upstream's one-line installer if missing, followed by `cua-driver telemetry disable` once.
532
- - The SDK installed at the exact driver version into a scratch directory outside the user's repository, for example `npm install @trycua/cua-driver@0.28.2 --prefix ~/.cache/atomic-cua`. The package ships per-platform native optional dependencies. Daemon-backed clients verify contract, tool-schema, capability, and protocol versions before each action and refuse on mismatch, so the pin must match `cua-driver --version`.
532
+ - The SDK installed at the exact driver version into a scratch directory outside the user's repository, for example `npm install @trycua/cua-driver@0.34.0 --prefix ~/.cache/atomic-cua`. The package ships per-platform native optional dependencies. Daemon-backed clients verify contract, tool-schema, capability, and protocol versions before each action and refuse on mismatch, so the pin must match `cua-driver --version`.
533
533
 
534
534
  The executable installer does not install an agent skill. Atomic bundles the skill, so skip upstream's optional `cua-driver skills install`, `cua-driver skills update`, and `clawhub install @cua/driver` steps; leave existing user-level skills alone.
535
535
 
536
- The scenario itself is a small script in that scratch directory. It acquires the driver with `CuaDriver.connect()` when a daemon is running, so it reuses the daemon's permission identity (on macOS, `CuaDriver.app`'s Accessibility and Screen Recording grants) and the persisted telemetry-off preference; upstream describes `connect()` as a compatibility and app-hosting path, which is exactly the role it plays here. Only when no daemon is reachable does it fall back to `CuaDriver.create()`, which loads the runtime into the node process. On macOS that in-process fallback attributes permissions to the node host, normally the terminal app, as a **separate grant** from the app's; `checkPermissions` is then read-only, and the host must fully quit and relaunch after granting. Save it as `~/.cache/atomic-cua/verify-counter.mjs`:
536
+ The scenario itself is a small script in that scratch directory. It acquires the driver with `CuaDriver.connect(undefined)` when a daemon is running, so it reuses the daemon's permission identity (on macOS, `CuaDriver.app`'s Accessibility and Screen Recording grants) and the persisted telemetry-off preference; upstream describes `connect()` as a compatibility and app-hosting path, which is exactly the role it plays here. Only when no daemon is reachable does it fall back to `CuaDriver.create(undefined)`, which loads the runtime into the node process. On macOS that in-process fallback attributes permissions to the node host, normally the terminal app, as a **separate grant** from the app's; `checkPermissions` is then read-only, and the host must fully quit and relaunch after granting. Save it as `~/.cache/atomic-cua/verify-counter.mjs`:
537
537
 
538
538
  ```js
539
539
  // Reads {"daemon":true|false,"artifactsDir":"..."} from argv[2]; prints one JSON result line.
@@ -558,7 +558,7 @@ const finish = (result, detail) => {
558
558
 
559
559
  // The wrapper already set CUA_DRIVER_RS_TELEMETRY_ENABLED=false in this process's environment
560
560
  // before the driver was constructed; the SDK is one of the faces that reports telemetry by default.
561
- const driver = daemon ? await CuaDriver.connect() : CuaDriver.create(undefined);
561
+ const driver = daemon ? CuaDriver.connect(undefined) : CuaDriver.create(undefined);
562
562
  try {
563
563
  const apps = await driver.listApps(ListAppsInput.new({}));
564
564
  const app = unique(apps.apps.filter((a) => a.name === "Window Demo" && a.running), "app");
@@ -68,9 +68,9 @@
68
68
  "license": "MIT"
69
69
  },
70
70
  "node_modules/shell-quote": {
71
- "version": "1.10.0",
72
- "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.10.0.tgz",
73
- "integrity": "sha512-w1aiOKwKuRgtwAReIIj89puqg+I7GvX4IbLrvmhXbzQsj1+Zwi4VO3+fa6ZF91TWSjIxoEkKnMeHcLEODK5ZXA==",
71
+ "version": "1.12.0",
72
+ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.12.0.tgz",
73
+ "integrity": "sha512-PcByqNyT/38F2kDNi006HAMRJaULuBzq/FOsw3qdZvX/GA9W/jamDaRskgHjubHiftXK5sIFxLNkvrXUwcof6Q==",
74
74
  "license": "MIT",
75
75
  "engines": {
76
76
  "node": ">= 0.4"