@bastani/atomic 0.9.25-alpha.2 → 0.9.25-alpha.3

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 (118) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/builtin/intercom/package.json +2 -2
  3. package/dist/builtin/mcp/CHANGELOG.md +13 -0
  4. package/dist/builtin/mcp/index.bundle.mjs +489 -208
  5. package/dist/builtin/mcp/package.json +2 -2
  6. package/dist/builtin/subagents/package.json +3 -3
  7. package/dist/builtin/web-access/package.json +2 -2
  8. package/dist/builtin/workflows/CHANGELOG.md +12 -0
  9. package/dist/builtin/workflows/builtin/{chunk-e1254zvd.js → chunk-kfsnh3w7.js} +40 -12
  10. package/dist/builtin/workflows/builtin/{chunk-cpw5gtzg.js → chunk-rqmasd3d.js} +1 -1
  11. package/dist/builtin/workflows/builtin/{chunk-qy6g0baf.js → chunk-wz783pvd.js} +1 -1
  12. package/dist/builtin/workflows/builtin/goal.js +2 -2
  13. package/dist/builtin/workflows/builtin/index.js +3 -3
  14. package/dist/builtin/workflows/builtin/ralph.js +2 -2
  15. package/dist/builtin/workflows/package.json +2 -2
  16. package/dist/builtin/workflows/src/extension/index.bundle.mjs +472 -88
  17. package/dist/builtin/workflows/src/index.js +65 -28
  18. package/dist/core/agent-session-accessors.d.ts.map +1 -1
  19. package/dist/core/agent-session-accessors.js +7 -0
  20. package/dist/core/agent-session-accessors.js.map +1 -1
  21. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  22. package/dist/core/agent-session-extension-bindings.js +16 -2
  23. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  24. package/dist/core/agent-session-methods.d.ts +7 -1
  25. package/dist/core/agent-session-methods.d.ts.map +1 -1
  26. package/dist/core/agent-session-methods.js.map +1 -1
  27. package/dist/core/agent-session-state.d.ts.map +1 -1
  28. package/dist/core/agent-session-state.js +3 -2
  29. package/dist/core/agent-session-state.js.map +1 -1
  30. package/dist/core/agent-session-types.d.ts +1 -0
  31. package/dist/core/agent-session-types.d.ts.map +1 -1
  32. package/dist/core/agent-session-types.js.map +1 -1
  33. package/dist/core/agent-session.d.ts +3 -0
  34. package/dist/core/agent-session.d.ts.map +1 -1
  35. package/dist/core/agent-session.js +6 -0
  36. package/dist/core/agent-session.js.map +1 -1
  37. package/dist/core/extensions/api-types.d.ts +3 -0
  38. package/dist/core/extensions/api-types.d.ts.map +1 -1
  39. package/dist/core/extensions/api-types.js.map +1 -1
  40. package/dist/core/extensions/index.d.ts +2 -0
  41. package/dist/core/extensions/index.d.ts.map +1 -1
  42. package/dist/core/extensions/index.js +1 -0
  43. package/dist/core/extensions/index.js.map +1 -1
  44. package/dist/core/extensions/loader-api.d.ts.map +1 -1
  45. package/dist/core/extensions/loader-api.js +11 -0
  46. package/dist/core/extensions/loader-api.js.map +1 -1
  47. package/dist/core/extensions/loader-runtime.d.ts.map +1 -1
  48. package/dist/core/extensions/loader-runtime.js +3 -0
  49. package/dist/core/extensions/loader-runtime.js.map +1 -1
  50. package/dist/core/extensions/mcp-server-registry.d.ts.map +1 -1
  51. package/dist/core/extensions/mcp-server-registry.js +4 -0
  52. package/dist/core/extensions/mcp-server-registry.js.map +1 -1
  53. package/dist/core/extensions/runner.d.ts +3 -0
  54. package/dist/core/extensions/runner.d.ts.map +1 -1
  55. package/dist/core/extensions/runner.js +4 -0
  56. package/dist/core/extensions/runner.js.map +1 -1
  57. package/dist/core/extensions/runtime-types.d.ts +3 -0
  58. package/dist/core/extensions/runtime-types.d.ts.map +1 -1
  59. package/dist/core/extensions/runtime-types.js.map +1 -1
  60. package/dist/core/extensions/tool-types.d.ts +1 -0
  61. package/dist/core/extensions/tool-types.d.ts.map +1 -1
  62. package/dist/core/extensions/tool-types.js.map +1 -1
  63. package/dist/core/extensions/workflow-run-control-hub.d.ts +23 -0
  64. package/dist/core/extensions/workflow-run-control-hub.d.ts.map +1 -0
  65. package/dist/core/extensions/workflow-run-control-hub.js +57 -0
  66. package/dist/core/extensions/workflow-run-control-hub.js.map +1 -0
  67. package/dist/core/extensions/workflow-run-control.d.ts +163 -0
  68. package/dist/core/extensions/workflow-run-control.d.ts.map +1 -0
  69. package/dist/core/extensions/workflow-run-control.js +73 -0
  70. package/dist/core/extensions/workflow-run-control.js.map +1 -0
  71. package/dist/core/mcp-servers.d.ts +4 -1
  72. package/dist/core/mcp-servers.d.ts.map +1 -1
  73. package/dist/core/mcp-servers.js.map +1 -1
  74. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  75. package/dist/core/remote-catalog-provider.js +4 -9
  76. package/dist/core/remote-catalog-provider.js.map +1 -1
  77. package/dist/core/sdk.js +1 -0
  78. package/dist/core/sdk.js.map +1 -1
  79. package/dist/core/tool-loadout.d.ts +1 -0
  80. package/dist/core/tool-loadout.d.ts.map +1 -1
  81. package/dist/core/tool-loadout.js +3 -0
  82. package/dist/core/tool-loadout.js.map +1 -1
  83. package/dist/core/tools/bash.d.ts.map +1 -1
  84. package/dist/core/tools/bash.js +11 -30
  85. package/dist/core/tools/bash.js.map +1 -1
  86. package/dist/extensions/codemode/execute.d.ts.map +1 -1
  87. package/dist/extensions/codemode/execute.js +26 -0
  88. package/dist/extensions/codemode/execute.js.map +1 -1
  89. package/dist/extensions/codemode/renderer.d.ts.map +1 -1
  90. package/dist/extensions/codemode/renderer.js +38 -23
  91. package/dist/extensions/codemode/renderer.js.map +1 -1
  92. package/dist/extensions/codemode/tool.d.ts.map +1 -1
  93. package/dist/extensions/codemode/tool.js +22 -10
  94. package/dist/extensions/codemode/tool.js.map +1 -1
  95. package/dist/extensions/tool-search/tool.d.ts +1 -1
  96. package/dist/extensions/tool-search/tool.d.ts.map +1 -1
  97. package/dist/extensions/tool-search/tool.js +3 -13
  98. package/dist/extensions/tool-search/tool.js.map +1 -1
  99. package/dist/index-extensions.d.ts +2 -1
  100. package/dist/index-extensions.d.ts.map +1 -1
  101. package/dist/index-extensions.js +1 -1
  102. package/dist/index-extensions.js.map +1 -1
  103. package/dist/modes/interactive/components/visual-truncate.d.ts +27 -3
  104. package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
  105. package/dist/modes/interactive/components/visual-truncate.js +39 -6
  106. package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
  107. package/docs/extensions/events.md +2 -0
  108. package/docs/mcp-servers.md +47 -0
  109. package/docs/providers.md +8 -0
  110. package/docs/sdk/reference.md +16 -0
  111. package/docs/sdk.md +67 -1
  112. package/docs/settings.md +2 -0
  113. package/docs/tools.md +6 -0
  114. package/docs/workflows/operations.md +3 -1
  115. package/examples/extensions/built-in-tool-renderer.ts +16 -40
  116. package/examples/extensions/minimal-mode.ts +28 -108
  117. package/npm-shrinkwrap.json +69 -69
  118. package/package.json +8 -8
package/CHANGELOG.md CHANGED
@@ -2,6 +2,33 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.25-alpha.3] - 2026-09-30
6
+
7
+ ### Added
8
+
9
+ - SDK hosts can now manage the workflow runs their session owns through `session.workflows`: `listRuns()`, `getRun()`, `getStages()`, `pause()`, `quit()` and `resume()` return the workflow tool's structured results, and failures reject with typed `WorkflowRunControlError` subclasses (`WorkflowRunNotFoundError`, `WorkflowRunOwnershipError`, `WorkflowRunNotResumableError`, `WorkflowRunDatabaseError`, `WorkflowStageNotFoundError`, `WorkflowStageAmbiguousError`, `WorkflowStageResumeUnsupportedError`) instead of strings. A batch `pause({ all: true })` or `quit({ all: true })` returns a `partial` outcome whose `failedRuns` names the runs still active only when that call stopped at least one run, and rejects with `WorkflowRunControlError` carrying `failedRuns` when active runs could not be stopped and the call stopped none, even if other runs were already paused. Already-paused and already-ended runs are not failures. A database outage while checking who owns a run rejects `pause()` and `quit()` with `WorkflowRunDatabaseError`. It uses the same ownership and durable-resume rules as the `workflow` tool, so runs owned by another session or live process stay read-only ([#3377](https://github.com/bastani-inc/atomic/issues/3377)).
10
+ - Codemode scripts can retrieve namespace summaries, instructions, and callable tool names with `describeNamespace(name)`. Tool search indexes namespace instructions without including them in inline tool listings, and codemode listings no longer include tool counts ([#10212](https://github.com/earendil-works/pi/issues/10212)).
11
+ - `/reload` enables tools newly added to `defaultTools`, while preserving session-disabled tools, tools removed from the setting, and explicit CLI tool restrictions ([#10245](https://github.com/earendil-works/pi/issues/10245)).
12
+ - Added Anthropic workload identity federation from the `ANTHROPIC_FEDERATION_RULE_ID`, `ANTHROPIC_ORGANIZATION_ID`, and `ANTHROPIC_IDENTITY_TOKEN_FILE` environment variables, with optional `ANTHROPIC_SERVICE_ACCOUNT_ID` and `ANTHROPIC_WORKSPACE_ID`. See [Providers](docs/providers.md#anthropic-workload-identity-federation) ([#10177](https://github.com/earendil-works/pi/issues/10177), [#10242](https://github.com/earendil-works/pi/pull/10242) by [@philfreo](https://github.com/philfreo)).
13
+ - MCP servers can set `oauth.clientName` for dynamic OAuth registration, or use `"auth": { "provider": "<provider>" }` to send the current provider login token. Provider-token authentication is restricted to global configuration and extension registrations, with HTTPS required except on loopback hosts. See [MCP authentication](docs/mcp-servers.md#authentication) ([#10226](https://github.com/earendil-works/pi/issues/10226)).
14
+ - `/login anthropic` now offers **Copy code login (headless)** when the browser is on another machine and cannot reach Atomic's local callback ([#10194](https://github.com/earendil-works/pi/pull/10194) by [@lucasmeijer](https://github.com/lucasmeijer)).
15
+
16
+ ### Fixed
17
+
18
+ - On a heavily loaded machine, a workflow run could fail with a bare `Query read timeout` while Atomic verified its managed PostgreSQL connection, even though the database was healthy. Health queries now get more time (3 s) on every path, and both the check of a borrowed connection and Atomic's periodic background health check repeat once after a timeout. If the timeout persists, the run fails with a resumable database-unavailable error instead of `Query read timeout`, and other running workflows' database connections are not closed and PostgreSQL is not restarted. A refused or terminated connection, a server shutdown, or a changed database identity is still treated as an outage.
19
+ - Renderer examples now retain the built-in tools' prompt guidance and execution behavior when customizing their display ([#10072](https://github.com/earendil-works/pi/issues/10072)).
20
+ - Reduced model lookup overhead when merging large remote provider catalogs.
21
+ - Invalid extension commands now fail registration with a clear error instead of crashing slash-command completion ([#10054](https://github.com/earendil-works/pi/issues/10054)).
22
+ - Codemode and tool-search descriptions now remain unchanged when deferred tools register, preserving prompt stability while discovery continues to find those tools ([#10212](https://github.com/earendil-works/pi/issues/10212)).
23
+ - Collapsed codemode scripts and results now limit wrapped screen lines, so long single-line JSON no longer fills the transcript. Bash previews use the same cached visual-line component.
24
+ - In `codemode.mode: "only"`, the system prompt's tool list no longer advertises tools whose direct declarations are hidden ([#10192](https://github.com/earendil-works/pi/issues/10192)).
25
+ - Fixed context overflow detection for Z.AI CN endpoint `Prompt exceeds max length` errors ([#10208](https://github.com/earendil-works/pi/issues/10208)).
26
+ - Anthropic tools with strict-schema constraints the provider rejects now fall back to non-strict mode when strict sampling is preferred ([#9953](https://github.com/earendil-works/pi/issues/9953)).
27
+ - Provider retries now use exponential backoff when `Retry-After` contains an unparseable date ([#9571](https://github.com/earendil-works/pi/issues/9571)).
28
+ - MCP sign-in URLs remain clickable when they wrap, including inside the `/mcp` panel ([#10186](https://github.com/earendil-works/pi/issues/10186)).
29
+ - MCP tool names now use JavaScript-safe identifiers with deterministic suffixes for collisions and long names, consistently across direct tools, gateway discovery, and codemode ([#10239](https://github.com/earendil-works/pi/issues/10239)).
30
+ - Codemode `image()` now rejects malformed base64 and unsupported image types before saving a tool result, and detects the MIME type from the image data instead of trusting the supplied type ([#10215](https://github.com/earendil-works/pi/issues/10215)).
31
+
5
32
  ## [0.9.25-alpha.2] - 2026-09-30
6
33
 
7
34
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/intercom",
3
- "version": "0.9.25-alpha.2",
3
+ "version": "0.9.25-alpha.3",
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": [
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@bastani/atomic": "*",
47
- "@earendil-works/pi-tui": "^0.99.1",
47
+ "@earendil-works/pi-tui": "^0.99.2",
48
48
  "typebox": "*"
49
49
  },
50
50
  "peerDependenciesMeta": {
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.9.25-alpha.3] - 2026-09-30
11
+
12
+ ### Added
13
+
14
+ - Set `oauth.clientName` to choose the client name sent during dynamic OAuth registration. The default is `atomic` ([#10226](https://github.com/earendil-works/pi/issues/10226)).
15
+ - HTTP MCP servers can set `"auth": { "provider": "<provider>" }` to send the current `/login` token of a provider as the bearer token instead of using MCP OAuth. The token is read for every request and is never stored by MCP. It is accepted only from the global `mcp.json` and extension registrations, requires `https` except on `localhost`, `127.0.0.1`, and `[::1]`, and is sent only to the server's origin.
16
+
17
+ ### Fixed
18
+
19
+ - MCP sign-in now displays a clickable terminal hyperlink and a Cmd/Ctrl+click hint, including when the authorization URL wraps across lines ([#10186](https://github.com/earendil-works/pi/issues/10186)).
20
+ - MCP tool names now use JavaScript-safe identifiers. Tools whose names sanitize to the same identifier all receive deterministic hash suffixes, preventing codemode calls from reaching the wrong tool. Server names that differ only in `-` and `_` conflict ([#10239](https://github.com/earendil-works/pi/issues/10239)).
21
+ - Cached MCP tools now reconnect after `/login <provider>` when a provider-authenticated server needs sign-in, without requiring `/mcp reconnect`.
22
+
10
23
  ## [0.9.25-alpha.1] - 2026-09-29
11
24
 
12
25
  ### Changed