@bastani/atomic 0.9.35-alpha.5 → 0.9.36

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 (42) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/dist/builtin/intercom/package.json +1 -1
  3. package/dist/builtin/mcp/CHANGELOG.md +6 -0
  4. package/dist/builtin/mcp/package.json +1 -1
  5. package/dist/builtin/subagents/package.json +1 -1
  6. package/dist/builtin/web-access/package.json +1 -1
  7. package/dist/builtin/workflows/CHANGELOG.md +20 -0
  8. package/dist/builtin/workflows/package.json +1 -1
  9. package/dist/core/model-runtime.d.ts +2 -0
  10. package/dist/core/model-runtime.d.ts.map +1 -1
  11. package/dist/core/model-runtime.js +23 -8
  12. package/dist/core/model-runtime.js.map +1 -1
  13. package/dist/core/provider-composer.d.ts.map +1 -1
  14. package/dist/core/provider-composer.js +11 -1
  15. package/dist/core/provider-composer.js.map +1 -1
  16. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  17. package/dist/core/remote-catalog-provider.js +15 -1
  18. package/dist/core/remote-catalog-provider.js.map +1 -1
  19. package/dist/core/runtime-credentials.d.ts +1 -0
  20. package/dist/core/runtime-credentials.d.ts.map +1 -1
  21. package/dist/core/runtime-credentials.js +3 -0
  22. package/dist/core/runtime-credentials.js.map +1 -1
  23. package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
  24. package/dist/modes/interactive/components/chat-session-host-actions.js +23 -21
  25. package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
  26. package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
  27. package/dist/modes/interactive/components/chat-session-host-events.js +1 -3
  28. package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
  29. package/dist/modes/interactive/components/chat-session-host-rendering.js +1 -1
  30. package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
  31. package/dist/modes/interactive/components/chat-session-host-state.d.ts +5 -2
  32. package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
  33. package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
  34. package/dist/modes/interactive/interactive-agent-events.js +1 -1
  35. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  36. package/dist/modes/interactive/interactive-queueing.js +5 -0
  37. package/dist/modes/interactive/interactive-queueing.js.map +1 -1
  38. package/docs/models/reference.md +4 -4
  39. package/docs/providers.md +2 -0
  40. package/docs/usage.md +2 -0
  41. package/npm-shrinkwrap.json +32 -32
  42. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,67 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.36] - 2026-10-13
6
+
7
+ ### Fixed
8
+
9
+ - Fixed Ultrafast choices disappearing when a newer remote model catalog omitted the bundled service-tier metadata.
10
+ - Fixed GPT-6.1 Sol subscription sign-in through `openai` and account aliases retaining the API's 272,000-token context. Subscription selections now use 500,000 tokens with no long-context price tier on Standard, Fast, and Ultrafast; API-key selections keep their API limits and pricing. Codex subscription limits also survive remote catalog refreshes.
11
+ - Fixed messages queued during compaction being overtaken by later messages of the same type. Held messages now join their steering or follow-up queue as soon as compaction ends, including mid-turn compaction.
12
+
13
+ ## [0.9.36-alpha.1] - 2026-10-13
14
+
15
+ ### Fixed
16
+
17
+ - Fixed Ultrafast choices disappearing when a newer remote model catalog omitted the bundled service-tier metadata.
18
+ - Fixed GPT-6.1 Sol subscription sign-in through `openai` and account aliases retaining the API's 272,000-token context. Subscription selections now use 500,000 tokens with no long-context price tier on Standard, Fast, and Ultrafast; API-key selections keep their API limits and pricing. Codex subscription limits also survive remote catalog refreshes.
19
+ - Fixed messages queued during compaction being overtaken by later messages of the same type. Held messages now join their steering or follow-up queue as soon as compaction ends, including mid-turn compaction.
20
+
21
+ ## [0.9.35] - 2026-10-13
22
+
23
+ ### Breaking Changes
24
+
25
+ - Removed the experimental `@bastani/atomic/client` entrypoint and the `@earendil-works/pi-client` and `@earendil-works/pi-protocol` dependencies, which upstream Pi no longer publishes. SDK code that imported `@bastani/atomic/client` should use `createAgentSession()` from `@bastani/atomic` in-process or RPC mode (`--mode rpc` / `@bastani/atomic/rpc-entry`), or pin the previous release. The CLI, RPC mode, extensions and workflows are unaffected.
26
+
27
+ ### Added
28
+
29
+ - `session.workflows.resume(runId)` now adopts a paused run that was launched through the model-facing `workflow` tool once its owning session has been disposed, in the same process or after the owning process exits. Disposing a session quits its in-flight runs at their last checkpoint and durably records that it released its checkpointed paused runs; the adopting session becomes the owner and the run continues under the same UUID. Runs whose owner is still open, runs whose owner crashed without disposing, and finished runs are still refused ([#3566](https://github.com/bastani-inc/atomic/issues/3566)).
30
+ - Switching sessions with `/new`, `/fork`, or `/resume` now releases the previous session's paused workflow runs, the same way disposing a session does. The model in the new session can inspect them with the `workflow` tool's `status` and `stages` actions and resume them, and `session.workflows.resume(runId)` can adopt them; adoption, including the `/workflow resume <id>` slash command, transfers ownership to the resuming session. The new session lists the released runs with their `/workflow resume <id>` commands, and, in the process that released it, a run another session already adopted now reports that it is owned by another session. `/reload` still keeps runs executing and releases nothing ([#3569](https://github.com/bastani-inc/atomic/issues/3569)).
31
+ - SDK and RPC clients can read stored session summaries with their summarized-through message IDs, and list or inspect workflow history with saved summaries and run identities. SDK sessions expose `sessionSummary`; RPC adds `get_session_summary`, `list_sessions`, `list_workflow_runs`, and `get_workflow_run_summary`.
32
+ - Added `ATOMIC_CLIPBOARD_OSC52=1`, with legacy alias `PI_CLIPBOARD_OSC52=1`, to send copied text through OSC 52 after the local clipboard write. Use it when a multiplexer or remote IDE session leaves no SSH markers for Atomic to detect.
33
+ - Added elapsed time while a codemode script runs and total time when it finishes. Bash commands continued in the background keep their "Observed for" timing label.
34
+ - Codemode declarations now include input constraints such as integer bounds and defaults that TypeScript types alone cannot express.
35
+ - Added per-key OpenRouter model lists with the key's context limits, output limits and prices. Configured regional endpoints are respected, and the personalized list is saved for offline use.
36
+ - Added `workflows.durability.poolSize` to configure maximum connections per workflow database pool for managed and remote PostgreSQL (default 10, minimum 2).
37
+
38
+ ### Changed
39
+
40
+ - Changed `serializeConversation()` (branch summaries, resume-picker session summaries, and the policy-refusal summary fallback) to omit thinking blocks; replayed thinking is often not in the live context, so including it could make a summarization request larger than the context it summarizes and fail. Verbatim line compaction still serializes thinking lines.
41
+ - Changed `openai-codex/gpt-6.1-sol` to a 500,000-token context window (up from 272,000) with no long-context price tier on Standard, Fast, or Ultrafast. OpenAI raised GPT-6.1 Sol's default context to 500k in Codex & Work for ChatGPT subscriptions and does not charge long-context fees when usage draws from the subscription. `openai/gpt-6.1-sol` and the other Codex models are unchanged.
42
+ - MCP tools now describe their content blocks and nested structured-content fields directly in codemode declarations, including schemas with local references.
43
+ - `showHardwareCursor` now uses only the terminal cursor at the focused input position instead of also drawing a reverse-video cursor cell. Custom TUI components can use `renderFakeCursor()` with `CURSOR_MARKER` to follow this setting.
44
+
45
+ ### Fixed
46
+
47
+ - Fixed the code mode tool description claiming every failed tool call throws; a tool that declares an output schema resolves with its value on failure too (for example `bash` with a non-zero exit), so scripts should check its fields.
48
+ - Fixed `read` reporting success when it refuses a selected range as too large. The refusal is now an error result, so models see a failed read with guidance to read a smaller range, and code mode's `tools.read(...)` throws instead of resolving with the refusal text as if it were the file's contents ([#3574](https://github.com/bastani-inc/atomic/issues/3574)).
49
+ - Fixed `/resume` and `atomic -r` hiding session summaries after newer messages. The latest summary now stays visible until a branch summary retires it, and opening or resuming an interactive session refreshes missing or stale summaries in the background.
50
+ - Fixed tree navigation moving the active branch while a user prompt is waiting for `before_agent_start` handlers to finish.
51
+ - Fixed print mode returning success for responses truncated by the model output limit. Partial text remains on stdout, with a warning on stderr and exit code 1.
52
+ - Fixed home-directory (`~`) expansion in resource include and exclude patterns, including Windows environments where `HOME` differs from `USERPROFILE`.
53
+ - Fixed MCP tool calls rejecting array, null, or primitive structured content.
54
+ - Fixed cancelled MCP requests being retried after a shared authorization refresh.
55
+ - Fixed slow MCP resource listings delaying tools on connection. Resources and templates are now listed only on demand.
56
+ - Fixed code mode taking excessive time to join large numbers of text output items.
57
+ - Fixed transient Windows permission errors when acquiring the authentication lock, while keeping persistent permission failures bounded.
58
+ - Fixed runs started by `pi.sendMessage(..., { triggerTurn: true })`, including protected workflow task completions, skipping `before_agent_start` and losing handler-added system prompt sections after tool calls. The event now distinguishes user and custom messages with `messageType`; handlers reading `prompt` or `images` must first narrow to `"user"`.
59
+ - Fixed interrupt messages dropping an earlier custom message while its `before_agent_start` handler was still running.
60
+ - Fixed misplaced `// @options:` lines silently being ignored. They now fail the codemode call before the script runs; options must be on the first line.
61
+ - Fixed Kitty image detection inside Herdr terminals and delayed terminal-reply bytes leaking into keyboard input.
62
+ - Fixed shifted-symbol keybindings such as `+` using the physical key name instead of the produced symbol.
63
+ - Fixed OpenRouter account model refresh being blocked by an unavailable or invalid optional pi.dev catalog.
64
+ - Fixed running codemode and bash rows continuing to update elapsed-time displays after removal.
65
+
5
66
  ## [0.9.35-alpha.5] - 2026-10-12
6
67
 
7
68
  ### Added
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/intercom",
3
- "version": "0.9.35-alpha.5",
3
+ "version": "0.9.36",
4
4
  "private": true,
5
5
  "description": "Atomic extension providing a private coordination channel between parent and child agent sessions. Fork of: https://github.com/nicobailon/pi-intercom",
6
6
  "contributors": [
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.9.35] - 2026-10-13
11
+
12
+ ### Fixed
13
+
14
+ - Fixed OAuth exchanging an authorization code whose `iss` parameter could not be checked because no authorization server metadata was discovered. It now throws `OAuthIssuerMismatchError`, whose `expected` is `undefined` in that case (RFC 9207). Reported by [@AizenvoltPrime](https://github.com/AizenvoltPrime).
15
+
10
16
  ## [0.9.35-alpha.1] - 2026-10-12
11
17
 
12
18
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/mcp",
3
- "version": "0.9.35-alpha.5",
3
+ "version": "0.9.36",
4
4
  "private": true,
5
5
  "description": "Atomic's pi-compatible MCP integration for server connections, OAuth, tools, resources, and terminal management.",
6
6
  "contributors": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/subagents",
3
- "version": "0.9.35-alpha.5",
3
+ "version": "0.9.36",
4
4
  "private": true,
5
5
  "description": "Atomic extension for delegating tasks to subagents with parallel execution. Fork of: https://github.com/nicobailon/pi-subagents",
6
6
  "contributors": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/web-access",
3
- "version": "0.9.35-alpha.5",
3
+ "version": "0.9.36",
4
4
  "private": true,
5
5
  "description": "Atomic extension for web search, URL fetching, GitHub repo cloning, PDF/video extraction. Fork of: https://github.com/nicobailon/pi-web-access",
6
6
  "contributors": [
@@ -6,6 +6,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.9.35] - 2026-10-13
10
+
11
+ ### Added
12
+
13
+ - `session.workflows.resume(runId)` now adopts a paused run that was launched through the model-facing `workflow` tool once its owning session has been disposed, in the same process or after the owning process exits. Disposing a session quits its in-flight runs at their last checkpoint and durably records that it released its checkpointed paused runs; the adopting session becomes the owner and the run continues under the same UUID. Runs whose owner is still open, runs whose owner crashed without disposing, and finished runs are still refused ([#3566](https://github.com/bastani-inc/atomic/issues/3566)).
14
+ - Switching sessions with `/new`, `/fork`, or `/resume` now releases the previous session's paused workflow runs, the same way disposing a session does. The model in the new session can inspect them with the `workflow` tool's `status` and `stages` actions and resume them, and `session.workflows.resume(runId)` can adopt them; adoption, including the `/workflow resume <id>` slash command, transfers ownership to the resuming session. The new session lists the released runs with their `/workflow resume <id>` commands, and, in the process that released it, a run another session already adopted now reports that it is owned by another session. `/reload` still keeps runs executing and releases nothing ([#3569](https://github.com/bastani-inc/atomic/issues/3569)).
15
+ - Resuming a workflow from another project with `/workflow resume <id>` now offers to fork its saved progress into the current directory under a new run ID, leaving the source run unchanged. SDK, tool, and headless resume requests return an actionable error instead of running in a different project.
16
+ - Workflow resume history now shows descriptive run identities and saved generated progress summaries, and supplies saved summaries to the main chat when resuming.
17
+ - SDK workflow lists and details expose run labels, identities, saved summaries and summarized-through timestamps. `listRuns({ includeDurable: true })` includes stored resumable and completed history; RPC clients can access the same history.
18
+ - Added `durability.poolSize` to SDK workflow runs (default 10, minimum 2), applying the connection maximum to DBOS SQL pools, ownership-fence pools, and their replacement connections for managed or remote PostgreSQL. Later requests for a different size reject once the process is configured.
19
+
20
+ ### Fixed
21
+
22
+ - Fixed an SDK session started after another session in the same process was disposed falling back to non-durable workflows with `Managed Postgres health observer is stopped.`. Releasing the last session now discards the stopped workflow database configuration, so the next session starts a fresh managed Postgres and launches durably ([#3565](https://github.com/bastani-inc/atomic/issues/3565)).
23
+ - Fixed durable workflows failing with `atomicWorkflowHandle is not a registered DBOS workflow function` when a new SDK session uses a different working directory after the last session is disposed. Final session disposal now releases workflow registrations so the next session recreates them in its own SDK ([#3577](https://github.com/bastani-inc/atomic/issues/3577)).
24
+ - Workflow SDK and RPC history now excludes stored runs from other projects. Resuming through either API respects disabled session summaries, and killing a blocked run requests a new final summary.
25
+ - Concurrent workflow metadata writes and legacy recovery now queue instead of exhausting a small ownership-fence connection pool.
26
+ - Fixed completed durable workflows leaving their root DBOS record `PENDING` when run metadata was written before DBOS recorded the root's result. Admission, including same-ID retries and admission recovery, now waits for the root's own result to be saved, without holding its lock or database connection, before writing metadata, so the root completes as `SUCCESS` and DBOS cleanup can remove it.
27
+ - Retrying or recovering an unfinished durable registration now fails within the admission deadline without starting workflow code or saving resume metadata if its original root cannot finish. Restoring the database does not guarantee that an abandoned registration can be resumed.
28
+
9
29
  ## [0.9.35-alpha.5] - 2026-10-12
10
30
 
11
31
  ### Added
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/workflows",
3
- "version": "0.9.35-alpha.5",
3
+ "version": "0.9.36",
4
4
  "private": true,
5
5
  "description": "Atomic extension for multi-stage workflow authoring and execution.",
6
6
  "contributors": [
@@ -87,8 +87,10 @@ export declare class ModelRuntime implements Models {
87
87
  * (several exist under `vercel-ai-gateway`) still restores.
88
88
  */
89
89
  canRestoreUnknownModel(providerId: string, modelId?: string): boolean;
90
+ private resolveModelMetadata;
90
91
  getModels(providerId?: string): readonly Model<Api>[];
91
92
  getModel(providerId: string, modelId: string): Model<Api> | undefined;
93
+ private resolveCatalogMetadata;
92
94
  getModelsOfType<TType extends ModelType>(type: TType, providerId?: string): readonly ModelTypeMap[TType][];
93
95
  getModelOfType<TType extends ModelType>(type: TType, providerId: string, modelId: string): ModelTypeMap[TType] | undefined;
94
96
  getAllModels(providerId?: string): readonly AnyModel[];
@@ -1 +1 @@
1
- {"version":3,"file":"model-runtime.d.ts","sourceRoot":"","sources":["../../src/core/model-runtime.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,KAAK,QAAQ,EACb,KAAK,GAAG,EACR,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,2BAA2B,EAChC,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,cAAc,EAEnB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EAExB,KAAK,SAAS,EACd,KAAK,YAAY,EAIjB,KAAK,QAA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AM,CAAM,GAAG,4BAA4B,CAuF3G;IAED,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAa/C;IAED,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG,IAAI,CA2BtE;IAED,OAAO,CAAC,2BAA2B;IAoBnC,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAO3C;CACD"}
@@ -1,7 +1,7 @@
1
1
  import { createHash } from "node:crypto";
2
2
  import { readFileSync } from "node:fs";
3
3
  import { dirname, join } from "node:path";
4
- import { createModels, normalizeProvider, normalizeProviderId, } from "@bastani/pi-ai";
4
+ import { createModels, isModelType, normalizeProvider, normalizeProviderId, } from "@bastani/pi-ai";
5
5
  import * as builtinProviderCatalog from "@bastani/pi-ai/providers/all";
6
6
  import { personalizeOpenRouterCatalog } from "@bastani/pi-ai/providers/openrouter";
7
7
  import { getAgentDir } from "../config.js";
@@ -273,10 +273,11 @@ export class ModelRuntime {
273
273
  this.credentials.list({ signal }),
274
274
  ]);
275
275
  if (seq !== this.availabilityRefreshSeq || inputsGeneration !== this.catalogInputsGeneration)
276
- return;
276
+ return false;
277
277
  this.snapshot = createModelRuntimeSnapshot([...this.models.getModels()], [...available], checks, credentials);
278
278
  if (errorSeq === this.availabilityErrorSeq)
279
279
  this.availabilityError = undefined;
280
+ return true;
280
281
  }
281
282
  queueAvailabilityRefresh(signal) {
282
283
  const seq = ++this.availabilityRefreshSeq;
@@ -380,20 +381,33 @@ export class ModelRuntime {
380
381
  }
381
382
  return canRestoreUnknownModelProvider(providerId, this.defaultBuiltins.get(providerId), this.config.getProvider(providerId), this.extensionProviders.get(providerId), this.nativeExtensionProviders.get(providerId));
382
383
  }
384
+ resolveModelMetadata(model) {
385
+ const credential = this.credentials.peek(model.provider);
386
+ if (credential !== undefined || this.credentials.hasCredentialSnapshot()) {
387
+ const provider = this.models.getProvider(model.provider);
388
+ return provider?.filterModels?.([model], credential).find((candidate) => candidate.id === model.id) ?? model;
389
+ }
390
+ return (this.snapshot.available.find((candidate) => candidate.provider === model.provider && candidate.id === model.id) ?? model);
391
+ }
383
392
  getModels(providerId) {
384
- return this.models.getModels(providerId);
393
+ return this.models.getModels(providerId).map((model) => this.resolveModelMetadata(model));
385
394
  }
386
395
  getModel(providerId, modelId) {
387
- return this.models.getModel(normalizeProviderId(providerId), modelId);
396
+ const model = this.models.getModel(normalizeProviderId(providerId), modelId);
397
+ return model ? this.resolveModelMetadata(model) : undefined;
398
+ }
399
+ resolveCatalogMetadata(model) {
400
+ return isModelType(model, "chat") ? { ...model, ...this.resolveModelMetadata(model) } : model;
388
401
  }
389
402
  getModelsOfType(type, providerId) {
390
- return this.models.getModelsOfType(type, providerId);
403
+ return this.models.getModelsOfType(type, providerId).map((model) => this.resolveCatalogMetadata(model));
391
404
  }
392
405
  getModelOfType(type, providerId, modelId) {
393
- return this.models.getModelOfType(type, providerId, modelId);
406
+ const model = this.models.getModelOfType(type, normalizeProviderId(providerId), modelId);
407
+ return model ? this.resolveCatalogMetadata(model) : undefined;
394
408
  }
395
409
  getAllModels(providerId) {
396
- return this.models.getAllModels(providerId);
410
+ return this.models.getAllModels(providerId).map((model) => this.resolveCatalogMetadata(model));
397
411
  }
398
412
  getAvailableOfType(type, providerId, options) {
399
413
  return this.models.getAvailableOfType(type, providerId, options);
@@ -419,7 +433,8 @@ export class ModelRuntime {
419
433
  throw error;
420
434
  }
421
435
  }
422
- await this.queueAvailabilityRefresh(options?.signal);
436
+ for (let attempt = 0; attempt < 3 && !(await this.queueAvailabilityRefresh(options?.signal)); attempt++)
437
+ ;
423
438
  return this.snapshot.available;
424
439
  }
425
440
  getAvailableSnapshot() {