@bastani/atomic 0.9.69 → 0.9.70

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 +28 -0
  2. package/dist/builtin/intercom/package.json +1 -1
  3. package/dist/builtin/mcp/package.json +1 -1
  4. package/dist/builtin/subagents/package.json +1 -1
  5. package/dist/builtin/web-access/package.json +1 -1
  6. package/dist/builtin/workflows/package.json +1 -1
  7. package/dist/core/tools/resource-selectors.d.ts.map +1 -1
  8. package/dist/core/tools/resource-selectors.js +3 -1
  9. package/dist/core/tools/resource-selectors.js.map +1 -1
  10. package/dist/core/tools/shell-plain-words.d.ts +3 -1
  11. package/dist/core/tools/shell-plain-words.d.ts.map +1 -1
  12. package/dist/core/tools/shell-plain-words.js +57 -20
  13. package/dist/core/tools/shell-plain-words.js.map +1 -1
  14. package/dist/modes/interactive/interactive-input-handling.js +3 -1
  15. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  16. package/dist/modes/interactive/interactive-mode-surface.d.ts +4 -4
  17. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  18. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  19. package/dist/modes/interactive/interactive-pause.d.ts.map +1 -1
  20. package/dist/modes/interactive/interactive-pause.js +9 -4
  21. package/dist/modes/interactive/interactive-pause.js.map +1 -1
  22. package/dist/modes/interactive/interactive-process-lifecycle.js +10 -5
  23. package/dist/modes/interactive/interactive-process-lifecycle.js.map +1 -1
  24. package/dist/modes/interactive/interactive-queueing.d.ts +5 -3
  25. package/dist/modes/interactive/interactive-queueing.d.ts.map +1 -1
  26. package/dist/modes/interactive/interactive-queueing.js +42 -17
  27. package/dist/modes/interactive/interactive-queueing.js.map +1 -1
  28. package/dist/modes/interactive/interactive-session-routing.js +4 -1
  29. package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
  30. package/dist/modes/interactive-engine/extension-ui-bridge.d.ts +9 -0
  31. package/dist/modes/interactive-engine/extension-ui-bridge.d.ts.map +1 -1
  32. package/dist/modes/interactive-engine/extension-ui-bridge.js +8 -0
  33. package/dist/modes/interactive-engine/extension-ui-bridge.js.map +1 -1
  34. package/dist/modes/interactive-engine/isolated-runtime.d.ts +14 -0
  35. package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
  36. package/dist/modes/interactive-engine/isolated-runtime.js +43 -21
  37. package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
  38. package/docs/rpc/protocol.md +2 -0
  39. package/docs/tools.md +1 -1
  40. package/docs/usage.md +1 -1
  41. package/npm-shrinkwrap.json +39 -54
  42. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -2,6 +2,34 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.70] - 2026-11-03
6
+
7
+ Alt+Up no longer loses or duplicates a queued message in the default interactive mode, and internal URL expansion in `bash` and `powershell` is now conservative about where it replaces a URL with a path.
8
+
9
+ - **Alt+Up restores what the engine removed:** a message queued less than one engine round trip before the key press is no longer lost, and a message the engine already took into its turn no longer comes back to the editor ([#4259](https://github.com/bastani-inc/atomic/pull/4259))
10
+ - **Safer internal URL expansion:** `bash` and `powershell` replace an internal URL such as `local://` with its quoted path only in a plain shell word. In arithmetic, array subscripts, comments, PowerShell typographic quotes and similar positions, the command now runs unchanged ([#4260](https://github.com/bastani-inc/atomic/pull/4260))
11
+ - **minimatch 11.0.4:** fixes a glob pattern amplification advisory. Atomic's own patterns were not exposed ([#4260](https://github.com/bastani-inc/atomic/pull/4260))
12
+
13
+ ### Fixed
14
+
15
+ - Alt+Up no longer loses or duplicates a queued message in the default interactive mode, where the session runs in an engine process. A message the engine queued less than one round trip before the key press, such as a steering or follow-up message or one an extension command sends, was restored from the host's older copy of the queue while the engine cleared its own, so it ended up in neither the editor nor the queue. A message the engine had already taken into its turn could also come back to the editor and run as well. The host now restores exactly what the engine removed, followed by the messages only the editor holds, in the order they were typed. If the engine cannot be reached, nothing is removed and an error is shown. The RPC `clear_queue` response already listed the removed messages, so RPC clients are unaffected ([#4257](https://github.com/bastani-inc/atomic/issues/4257))
16
+ - `bash` and `powershell` now expand an internal URL such as `local://` or `artifact://` only where the shell reads the quoted path that replaces it as one literal word. A URL in arithmetic (`((…))`, `$[…]`), an array subscript or compound array assignment, a comment, or directly after a character such as `$` or `[`, and in PowerShell inside typographic quotes (`‘…’`, `“…”`), a block comment (`<#…#>`) or after the stop-parsing token `--%`, now runs unchanged. In those positions the shell could read characters of the resolved path, such as a project directory name containing shell syntax, as code. Pass the filesystem path there instead ([#4260](https://github.com/bastani-inc/atomic/pull/4260))
17
+ - Updated the bundled `minimatch` dependency to 11.0.4, which fixes a pattern amplification that could stall a process compiling a crafted glob at `optimizationLevel` 2 ([GHSA-g3hv-75wg-m249](https://github.com/advisories/GHSA-g3hv-75wg-m249)). Atomic's model scope and resource filter patterns use the default optimization level, so they were not exposed, and they match the same paths and models as before ([#4260](https://github.com/bastani-inc/atomic/pull/4260))
18
+
19
+ ## [0.9.70-alpha.1] - 2026-11-03
20
+
21
+ Alt+Up no longer loses or duplicates a queued message in the default interactive mode, and internal URL expansion in `bash` and `powershell` is now conservative about where it replaces a URL with a path.
22
+
23
+ - **Alt+Up restores what the engine removed:** a message queued less than one engine round trip before the key press is no longer lost, and a message the engine already took into its turn no longer comes back to the editor ([#4259](https://github.com/bastani-inc/atomic/pull/4259))
24
+ - **Safer internal URL expansion:** `bash` and `powershell` replace an internal URL such as `local://` with its quoted path only in a plain shell word. In arithmetic, array subscripts, comments, PowerShell typographic quotes and similar positions, the command now runs unchanged ([#4260](https://github.com/bastani-inc/atomic/pull/4260))
25
+ - **minimatch 11.0.4:** fixes a glob pattern amplification advisory. Atomic's own patterns were not exposed ([#4260](https://github.com/bastani-inc/atomic/pull/4260))
26
+
27
+ ### Fixed
28
+
29
+ - Alt+Up no longer loses or duplicates a queued message in the default interactive mode, where the session runs in an engine process. A message the engine queued less than one round trip before the key press, such as a steering or follow-up message or one an extension command sends, was restored from the host's older copy of the queue while the engine cleared its own, so it ended up in neither the editor nor the queue. A message the engine had already taken into its turn could also come back to the editor and run as well. The host now restores exactly what the engine removed, followed by the messages only the editor holds, in the order they were typed. If the engine cannot be reached, nothing is removed and an error is shown. The RPC `clear_queue` response already listed the removed messages, so RPC clients are unaffected ([#4257](https://github.com/bastani-inc/atomic/issues/4257))
30
+ - `bash` and `powershell` now expand an internal URL such as `local://` or `artifact://` only where the shell reads the quoted path that replaces it as one literal word. A URL in arithmetic (`((…))`, `$[…]`), an array subscript or compound array assignment, a comment, or directly after a character such as `$` or `[`, and in PowerShell inside typographic quotes (`‘…’`, `“…”`), a block comment (`<#…#>`) or after the stop-parsing token `--%`, now runs unchanged. In those positions the shell could read characters of the resolved path, such as a project directory name containing shell syntax, as code. Pass the filesystem path there instead ([#4260](https://github.com/bastani-inc/atomic/pull/4260))
31
+ - Updated the bundled `minimatch` dependency to 11.0.4, which fixes a pattern amplification that could stall a process compiling a crafted glob at `optimizationLevel` 2 ([GHSA-g3hv-75wg-m249](https://github.com/advisories/GHSA-g3hv-75wg-m249)). Atomic's model scope and resource filter patterns use the default optimization level, so they were not exposed, and they match the same paths and models as before ([#4260](https://github.com/bastani-inc/atomic/pull/4260))
32
+
5
33
  ## [0.9.69] - 2026-11-03
6
34
 
7
35
  A fresh session can now look up your earlier sessions and workflow runs through `history://`. UI commands such as `/workflow connect` and `/settings` no longer wait for compaction, and a message that cannot be saved now stops the run with an error instead of failing silently.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/intercom",
3
- "version": "0.9.69",
3
+ "version": "0.9.70",
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": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/mcp",
3
- "version": "0.9.69",
3
+ "version": "0.9.70",
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.69",
3
+ "version": "0.9.70",
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.69",
3
+ "version": "0.9.70",
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": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/workflows",
3
- "version": "0.9.69",
3
+ "version": "0.9.70",
4
4
  "private": true,
5
5
  "description": "Atomic extension for multi-stage workflow authoring and execution.",
6
6
  "contributors": [
@@ -1 +1 @@
1
- {"version":3,"file":"resource-selectors.d.ts","sourceRoot":"","sources":["../../../src/core/tools/resource-selectors.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,eAAe;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACnB;AACD,MAAM,WAAW,cAAc;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,yGAAyG;AACzG,MAAM,WAAW,qBAAqB;IACrC,OAAO,EAAE,MAAM,CAAC;IA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Ac,EACxB,OAAO,EAAE,MAAM,EACf,UAAU,UAAQ,EAClB,aAAa,SAAI,EACjB,YAAY,SAAI,GACd,MAAM,CAgDR"}
1
+ {"version":3,"file":"resource-selectors.d.ts","sourceRoot":"","sources":["../../../src/core/tools/resource-selectors.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,eAAe;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACnB;AACD,MAAM,WAAW,cAAc;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,yGAAyG;AACzG,MAAM,WAAW,qBAAqB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACrB;AACD,MAAM,WAAW,sBAAsB;IACtC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3F,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,GAAG,OAAO,CA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AE,MAAM,EACf,OAAO,CAAC,EAAE,uBAAuB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAYf;AACD,wBAAsB,sBAAsB,CAC3C,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,UAAU,UAAQ,EAClB,OAAO,UAAQ,EACf,OAAO,CAAC,EAAE,uBAAuB,EACjC,aAAa,SAAI,EACjB,YAAY,SAAI,GACd,OAAO,CAAC,MAAM,CAAC,CAkBjB;AAWD;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC5C,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,uBAAuB,EACjC,KAAK,UAAQ,EACb,OAAO,GAAE,OAAO,GAAG,YAAsB,GACvC,OAAO,CAAC,MAAM,CAAC,CAsBjB;AAmND,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CAuCnE;AAqED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CA2DrF;AACD,wBAAgB,oBAAoB,CACnC,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,MAAM,EACf,UAAU,UAAQ,EAClB,aAAa,SAAI,EACjB,YAAY,SAAI,GACd,MAAM,CAgDR"}
@@ -671,7 +671,9 @@ function shellQuote(value, dialect) {
671
671
  : `'${value.replace(/'/g, `'\\''`)}'`;
672
672
  }
673
673
  const SHELL_INTERNAL_URL = /(?<![a-z0-9+.-])[a-z][a-z0-9+.-]*:\/\/[^\s'"`$)]+/gi;
674
- const PLAIN_SHELL_INTERNAL_URL = /(?<![a-z0-9+.-])[a-z][a-z0-9+.-]*:\/\/[^\s'"`$();&|<>]+/gi;
674
+ // In shell code a URL must start a word. Glued to `$`, `[`, `@`, a quote or a `#`, the shell may read the
675
+ // replacement as something other than a quoted word, so such a URL stays unexpanded.
676
+ const PLAIN_SHELL_INTERNAL_URL = /(?<=^|[\s;&|(<>=])[a-z][a-z0-9+.-]*:\/\/[^\s'"`$();&|<>]+/gi;
675
677
  /**
676
678
  * Replaces internal URLs with the paths they resolve to. With `quote` the text is shell code: only URLs that sit
677
679
  * wholly in plain shell words are replaced, and each path is shell-quoted. Quoted strings, heredoc bodies, comments,