@bastani/atomic 0.9.4-alpha.3 → 0.9.4-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.
- package/CHANGELOG.md +6 -0
- package/dist/builtin/cursor/CHANGELOG.md +6 -0
- package/dist/builtin/cursor/package.json +2 -2
- package/dist/builtin/intercom/CHANGELOG.md +6 -0
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/CHANGELOG.md +6 -0
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +6 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/web-access/CHANGELOG.md +6 -0
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +6 -0
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/core/http-dispatcher.d.ts +2 -0
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js +11 -5
- package/dist/core/http-dispatcher.js.map +1 -1
- package/npm-shrinkwrap.json +23 -23
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.9.4-alpha.4] - 2026-06-30
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Disabled Undici's default 10-second connect timeout in Atomic's global proxy-aware HTTP dispatcher so headless or sandboxed runs behind policy proxies can wait for slow provider CONNECT establishment instead of surfacing spurious `Connection error.` failures.
|
|
10
|
+
|
|
5
11
|
## [0.9.4-alpha.3] - 2026-06-30
|
|
6
12
|
|
|
7
13
|
### Fixed
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.9.4-alpha.4] - 2026-06-30
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Published a synchronized Atomic 0.9.4-alpha.4 prerelease for the Cursor provider package; no functional Cursor provider changes were made after 0.9.4-alpha.1.
|
|
10
|
+
|
|
5
11
|
## [0.9.4-alpha.3] - 2026-06-30
|
|
6
12
|
|
|
7
13
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/cursor",
|
|
3
|
-
"version": "0.9.4-alpha.
|
|
3
|
+
"version": "0.9.4-alpha.4",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Experimental first-party Atomic extension for Cursor OAuth, model discovery, and streaming provider registration.",
|
|
6
6
|
"contributors": [
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@bastani/atomic-natives": "0.9.4-alpha.
|
|
43
|
+
"@bastani/atomic-natives": "0.9.4-alpha.4",
|
|
44
44
|
"@bufbuild/protobuf": "^2.0.0",
|
|
45
45
|
"@earendil-works/pi-ai": "^0.80.2"
|
|
46
46
|
}
|
|
@@ -4,6 +4,12 @@ All notable changes to the `pi-intercom` extension will be documented in this fi
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.9.4-alpha.4] - 2026-06-30
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Published a synchronized Atomic 0.9.4-alpha.4 prerelease for the intercom extension; no intercom extension changes were made after 0.9.4-alpha.1.
|
|
12
|
+
|
|
7
13
|
## [0.9.4-alpha.3] - 2026-06-30
|
|
8
14
|
|
|
9
15
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/intercom",
|
|
3
|
-
"version": "0.9.4-alpha.
|
|
3
|
+
"version": "0.9.4-alpha.4",
|
|
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.4-alpha.4] - 2026-06-30
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Published a synchronized Atomic 0.9.4-alpha.4 prerelease for the MCP extension; no MCP extension changes were made after 0.9.4-alpha.1.
|
|
15
|
+
|
|
10
16
|
## [0.9.4-alpha.3] - 2026-06-30
|
|
11
17
|
|
|
12
18
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/mcp",
|
|
3
|
-
"version": "0.9.4-alpha.
|
|
3
|
+
"version": "0.9.4-alpha.4",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension that adapts MCP (Model Context Protocol) servers into the coding agent. Fork of: https://github.com/nicobailon/pi-mcp-adapter",
|
|
6
6
|
"contributors": [
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.9.4-alpha.4] - 2026-06-30
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Published a synchronized Atomic 0.9.4-alpha.4 prerelease for the subagents extension; no subagents extension changes were made after 0.9.4-alpha.1.
|
|
10
|
+
|
|
5
11
|
## [0.9.4-alpha.3] - 2026-06-30
|
|
6
12
|
|
|
7
13
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/subagents",
|
|
3
|
-
"version": "0.9.4-alpha.
|
|
3
|
+
"version": "0.9.4-alpha.4",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for delegating tasks to subagents with chains, parallel execution, and TUI clarification. Fork of: https://github.com/nicobailon/pi-subagents",
|
|
6
6
|
"contributors": [
|
|
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.9.4-alpha.4] - 2026-06-30
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Published a synchronized Atomic 0.9.4-alpha.4 prerelease for the web-access extension; no web-access extension changes were made after 0.9.4-alpha.1.
|
|
12
|
+
|
|
7
13
|
## [0.9.4-alpha.3] - 2026-06-30
|
|
8
14
|
|
|
9
15
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/web-access",
|
|
3
|
-
"version": "0.9.4-alpha.
|
|
3
|
+
"version": "0.9.4-alpha.4",
|
|
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,12 @@ 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.4-alpha.4] - 2026-06-30
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Published a synchronized Atomic 0.9.4-alpha.4 prerelease for the workflows extension; no workflow changes were made after 0.9.4-alpha.3.
|
|
14
|
+
|
|
9
15
|
## [0.9.4-alpha.3] - 2026-06-30
|
|
10
16
|
|
|
11
17
|
### Fixed
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as undici from "undici";
|
|
1
2
|
export declare const DEFAULT_HTTP_IDLE_TIMEOUT_MS = 600000;
|
|
2
3
|
export declare const HTTP_IDLE_TIMEOUT_CHOICES: readonly [{
|
|
3
4
|
readonly label: "30 sec";
|
|
@@ -20,6 +21,7 @@ export declare const HTTP_IDLE_TIMEOUT_CHOICES: readonly [{
|
|
|
20
21
|
}];
|
|
21
22
|
export declare function parseHttpIdleTimeoutMs(value: unknown): number | undefined;
|
|
22
23
|
export declare function formatHttpIdleTimeoutMs(timeoutMs: number): string;
|
|
24
|
+
export declare function createHttpDispatcherOptions(timeoutMs: number): ConstructorParameters<typeof undici.EnvHttpProxyAgent>[0];
|
|
23
25
|
/**
|
|
24
26
|
* Configure the global undici dispatcher used by fetch and SDK HTTP clients.
|
|
25
27
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-dispatcher.d.ts","sourceRoot":"","sources":["../../src/core/http-dispatcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"http-dispatcher.d.ts","sourceRoot":"","sources":["../../src/core/http-dispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAGjC,eAAO,MAAM,4BAA4B,SAAU,CAAC;AAKpD,eAAO,MAAM,yBAAyB;aACnC,KAAK,EAAE,QAAQ;aAAE,SAAS,EAAE,KAAM;;aAClC,KAAK,EAAE,OAAO;aAAE,SAAS,EAAE,KAAM;;aACjC,KAAK,EAAE,OAAO;aAAE,SAAS,EAAE,MAAO;;aAClC,KAAK,EAAE,QAAQ;aAAE,SAAS,EAAE,MAAO;;aACnC,KAAK,EAAE,QAAQ;aAAE,SAAS,EAAE,OAAS;;aACrC,KAAK,EAAE,UAAU;aAAE,SAAS,EAAE,CAAC;EACxB,CAAC;AAEX,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAKzE;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAMjE;AAED,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,qBAAqB,CAAC,OAAO,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CASxH;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,GAAE,MAAqC,GAAG,IAAI,CA2B9F","sourcesContent":["import * as undici from \"undici\";\nimport { installCopilotGeminiReasoningInterceptor } from \"./copilot-gemini-reasoning.ts\";\n\nexport const DEFAULT_HTTP_IDLE_TIMEOUT_MS = 600_000;\n\nconst originalGlobalFetch = globalThis.fetch;\nlet installedGlobalFetch: typeof globalThis.fetch | undefined;\n\nexport const HTTP_IDLE_TIMEOUT_CHOICES = [\n\t{ label: \"30 sec\", timeoutMs: 30_000 },\n\t{ label: \"1 min\", timeoutMs: 60_000 },\n\t{ label: \"5 min\", timeoutMs: 300_000 },\n\t{ label: \"10 min\", timeoutMs: 600_000 },\n\t{ label: \"30 min\", timeoutMs: 1_800_000 },\n\t{ label: \"Disabled\", timeoutMs: 0 },\n] as const;\n\nexport function parseHttpIdleTimeoutMs(value: unknown): number | undefined {\n\tif (typeof value !== \"number\" || !Number.isFinite(value) || value < 0) {\n\t\treturn undefined;\n\t}\n\treturn Math.floor(value);\n}\n\nexport function formatHttpIdleTimeoutMs(timeoutMs: number): string {\n\tconst choice = HTTP_IDLE_TIMEOUT_CHOICES.find((item) => item.timeoutMs === timeoutMs);\n\tif (choice) {\n\t\treturn choice.label;\n\t}\n\treturn `${timeoutMs / 1000} sec`;\n}\n\nexport function createHttpDispatcherOptions(timeoutMs: number): ConstructorParameters<typeof undici.EnvHttpProxyAgent>[0] {\n\treturn {\n\t\tallowH2: false,\n\t\t// Undici defaults to a 10s connect timeout; disable it so slow\n\t\t// policy/proxy CONNECT establishment follows provider retry handling.\n\t\tconnectTimeout: 0,\n\t\tbodyTimeout: timeoutMs,\n\t\theadersTimeout: timeoutMs,\n\t};\n}\n\n/**\n * Configure the global undici dispatcher used by fetch and SDK HTTP clients.\n *\n * Keep HTTP/2 disabled for now because some Node/undici combinations have\n * produced stream-reset crashes, and use a configurable idle timeout so stale\n * connections are eventually reclaimed while long-running requests remain\n * supported. Do not install a fixed connect-phase timeout here: under Pier and\n * other policy/proxy layers, CONNECT establishment can be slower than normal\n * internet egress and should surface through the provider/agent retry path.\n */\nexport function configureHttpDispatcher(timeoutMs: number = DEFAULT_HTTP_IDLE_TIMEOUT_MS): void {\n\tconst normalizedTimeoutMs = parseHttpIdleTimeoutMs(timeoutMs);\n\tif (normalizedTimeoutMs === undefined) {\n\t\tthrow new Error(`Invalid HTTP idle timeout: ${String(timeoutMs)}`);\n\t}\n\n\tundici.setGlobalDispatcher(\n\t\tnew undici.EnvHttpProxyAgent(createHttpDispatcherOptions(normalizedTimeoutMs)),\n\t);\n\n\t// Keep fetch and the dispatcher on the same undici implementation. Some Node\n\t// releases use a bundled fetch that can ignore the npm undici dispatcher or\n\t// otherwise behave differently from the configured dispatcher used by SDKs.\n\t// If a caller replaced fetch after module load, preserve that deliberate\n\t// override.\n\tconst shouldInstallGlobals = installedGlobalFetch === undefined\n\t\t? globalThis.fetch === originalGlobalFetch\n\t\t: globalThis.fetch === installedGlobalFetch;\n\tif (shouldInstallGlobals) {\n\t\tundici.install?.();\n\t\tinstalledGlobalFetch = globalThis.fetch;\n\t}\n\n\t// Bridge CAPI Gemini thought signatures (`reasoning_opaque`) on the inbound\n\t// SSE stream so multi-turn Copilot Gemini tool use does not stall on empty\n\t// completions. Idempotent and scoped to `*.githubcopilot.com` event streams.\n\tinstallCopilotGeminiReasoningInterceptor();\n}\n"]}
|
|
@@ -24,6 +24,16 @@ export function formatHttpIdleTimeoutMs(timeoutMs) {
|
|
|
24
24
|
}
|
|
25
25
|
return `${timeoutMs / 1000} sec`;
|
|
26
26
|
}
|
|
27
|
+
export function createHttpDispatcherOptions(timeoutMs) {
|
|
28
|
+
return {
|
|
29
|
+
allowH2: false,
|
|
30
|
+
// Undici defaults to a 10s connect timeout; disable it so slow
|
|
31
|
+
// policy/proxy CONNECT establishment follows provider retry handling.
|
|
32
|
+
connectTimeout: 0,
|
|
33
|
+
bodyTimeout: timeoutMs,
|
|
34
|
+
headersTimeout: timeoutMs,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
27
37
|
/**
|
|
28
38
|
* Configure the global undici dispatcher used by fetch and SDK HTTP clients.
|
|
29
39
|
*
|
|
@@ -39,11 +49,7 @@ export function configureHttpDispatcher(timeoutMs = DEFAULT_HTTP_IDLE_TIMEOUT_MS
|
|
|
39
49
|
if (normalizedTimeoutMs === undefined) {
|
|
40
50
|
throw new Error(`Invalid HTTP idle timeout: ${String(timeoutMs)}`);
|
|
41
51
|
}
|
|
42
|
-
undici.setGlobalDispatcher(new undici.EnvHttpProxyAgent(
|
|
43
|
-
allowH2: false,
|
|
44
|
-
bodyTimeout: normalizedTimeoutMs,
|
|
45
|
-
headersTimeout: normalizedTimeoutMs,
|
|
46
|
-
}));
|
|
52
|
+
undici.setGlobalDispatcher(new undici.EnvHttpProxyAgent(createHttpDispatcherOptions(normalizedTimeoutMs)));
|
|
47
53
|
// Keep fetch and the dispatcher on the same undici implementation. Some Node
|
|
48
54
|
// releases use a bundled fetch that can ignore the npm undici dispatcher or
|
|
49
55
|
// otherwise behave differently from the configured dispatcher used by SDKs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-dispatcher.js","sourceRoot":"","sources":["../../src/core/http-dispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,wCAAwC,EAAE,MAAM,+BAA+B,CAAC;AAEzF,MAAM,CAAC,MAAM,4BAA4B,GAAG,OAAO,CAAC;AAEpD,MAAM,mBAAmB,GAAG,UAAU,CAAC,KAAK,CAAC;AAC7C,IAAI,oBAAyD,CAAC;AAE9D,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE;IACtC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE;IACrC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE;IACtC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,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AC;QACjB,WAAW,EAAE,SAAS;QACtB,cAAc,EAAE,SAAS;KACzB,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,uBAAuB,CAAC,SAAS,GAAW,4BAA4B;IACvF,MAAM,mBAAmB,GAAG,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAC9D,IAAI,mBAAmB,KAAK,SAAS,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CAAC,8BAA8B,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,CAAC,mBAAmB,CACzB,IAAI,MAAM,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,mBAAmB,CAAC,CAAC,CAC9E,CAAC;IAEF,6EAA6E;IAC7E,4EAA4E;IAC5E,4EAA4E;IAC5E,yEAAyE;IACzE,YAAY;IACZ,MAAM,oBAAoB,GAAG,oBAAoB,KAAK,SAAS;QAC9D,CAAC,CAAC,UAAU,CAAC,KAAK,KAAK,mBAAmB;QAC1C,CAAC,CAAC,UAAU,CAAC,KAAK,KAAK,oBAAoB,CAAC;IAC7C,IAAI,oBAAoB,EAAE,CAAC;QAC1B,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;QACnB,oBAAoB,GAAG,UAAU,CAAC,KAAK,CAAC;IACzC,CAAC;IAED,4EAA4E;IAC5E,2EAA2E;IAC3E,6EAA6E;IAC7E,wCAAwC,EAAE,CAAC;AAC5C,CAAC","sourcesContent":["import * as undici from \"undici\";\nimport { installCopilotGeminiReasoningInterceptor } from \"./copilot-gemini-reasoning.ts\";\n\nexport const DEFAULT_HTTP_IDLE_TIMEOUT_MS = 600_000;\n\nconst originalGlobalFetch = globalThis.fetch;\nlet installedGlobalFetch: typeof globalThis.fetch | undefined;\n\nexport const HTTP_IDLE_TIMEOUT_CHOICES = [\n\t{ label: \"30 sec\", timeoutMs: 30_000 },\n\t{ label: \"1 min\", timeoutMs: 60_000 },\n\t{ label: \"5 min\", timeoutMs: 300_000 },\n\t{ label: \"10 min\", timeoutMs: 600_000 },\n\t{ label: \"30 min\", timeoutMs: 1_800_000 },\n\t{ label: \"Disabled\", timeoutMs: 0 },\n] as const;\n\nexport function parseHttpIdleTimeoutMs(value: unknown): number | undefined {\n\tif (typeof value !== \"number\" || !Number.isFinite(value) || value < 0) {\n\t\treturn undefined;\n\t}\n\treturn Math.floor(value);\n}\n\nexport function formatHttpIdleTimeoutMs(timeoutMs: number): string {\n\tconst choice = HTTP_IDLE_TIMEOUT_CHOICES.find((item) => item.timeoutMs === timeoutMs);\n\tif (choice) {\n\t\treturn choice.label;\n\t}\n\treturn `${timeoutMs / 1000} sec`;\n}\n\nexport function createHttpDispatcherOptions(timeoutMs: number): ConstructorParameters<typeof undici.EnvHttpProxyAgent>[0] {\n\treturn {\n\t\tallowH2: false,\n\t\t// Undici defaults to a 10s connect timeout; disable it so slow\n\t\t// policy/proxy CONNECT establishment follows provider retry handling.\n\t\tconnectTimeout: 0,\n\t\tbodyTimeout: timeoutMs,\n\t\theadersTimeout: timeoutMs,\n\t};\n}\n\n/**\n * Configure the global undici dispatcher used by fetch and SDK HTTP clients.\n *\n * Keep HTTP/2 disabled for now because some Node/undici combinations have\n * produced stream-reset crashes, and use a configurable idle timeout so stale\n * connections are eventually reclaimed while long-running requests remain\n * supported. Do not install a fixed connect-phase timeout here: under Pier and\n * other policy/proxy layers, CONNECT establishment can be slower than normal\n * internet egress and should surface through the provider/agent retry path.\n */\nexport function configureHttpDispatcher(timeoutMs: number = DEFAULT_HTTP_IDLE_TIMEOUT_MS): void {\n\tconst normalizedTimeoutMs = parseHttpIdleTimeoutMs(timeoutMs);\n\tif (normalizedTimeoutMs === undefined) {\n\t\tthrow new Error(`Invalid HTTP idle timeout: ${String(timeoutMs)}`);\n\t}\n\n\tundici.setGlobalDispatcher(\n\t\tnew undici.EnvHttpProxyAgent(createHttpDispatcherOptions(normalizedTimeoutMs)),\n\t);\n\n\t// Keep fetch and the dispatcher on the same undici implementation. Some Node\n\t// releases use a bundled fetch that can ignore the npm undici dispatcher or\n\t// otherwise behave differently from the configured dispatcher used by SDKs.\n\t// If a caller replaced fetch after module load, preserve that deliberate\n\t// override.\n\tconst shouldInstallGlobals = installedGlobalFetch === undefined\n\t\t? globalThis.fetch === originalGlobalFetch\n\t\t: globalThis.fetch === installedGlobalFetch;\n\tif (shouldInstallGlobals) {\n\t\tundici.install?.();\n\t\tinstalledGlobalFetch = globalThis.fetch;\n\t}\n\n\t// Bridge CAPI Gemini thought signatures (`reasoning_opaque`) on the inbound\n\t// SSE stream so multi-turn Copilot Gemini tool use does not stall on empty\n\t// completions. Idempotent and scoped to `*.githubcopilot.com` event streams.\n\tinstallCopilotGeminiReasoningInterceptor();\n}\n"]}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/atomic",
|
|
3
|
-
"version": "0.9.4-alpha.
|
|
3
|
+
"version": "0.9.4-alpha.4",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@bastani/atomic",
|
|
9
|
-
"version": "0.9.4-alpha.
|
|
9
|
+
"version": "0.9.4-alpha.4",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@bastani/atomic-natives": "0.9.4-alpha.
|
|
12
|
+
"@bastani/atomic-natives": "0.9.4-alpha.4",
|
|
13
13
|
"@bufbuild/protobuf": "^2.0.0",
|
|
14
14
|
"@earendil-works/pi-agent-core": "^0.80.2",
|
|
15
15
|
"@earendil-works/pi-ai": "^0.80.2",
|
|
@@ -516,16 +516,16 @@
|
|
|
516
516
|
}
|
|
517
517
|
},
|
|
518
518
|
"node_modules/@bastani/atomic-natives": {
|
|
519
|
-
"version": "0.9.4-alpha.
|
|
520
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.9.4-alpha.
|
|
519
|
+
"version": "0.9.4-alpha.4",
|
|
520
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.9.4-alpha.4.tgz",
|
|
521
521
|
"license": "MIT",
|
|
522
522
|
"optionalDependencies": {
|
|
523
|
-
"@bastani/atomic-natives-darwin-arm64": "0.9.4-alpha.
|
|
524
|
-
"@bastani/atomic-natives-darwin-x64": "0.9.4-alpha.
|
|
525
|
-
"@bastani/atomic-natives-linux-arm64-gnu": "0.9.4-alpha.
|
|
526
|
-
"@bastani/atomic-natives-linux-x64-gnu": "0.9.4-alpha.
|
|
527
|
-
"@bastani/atomic-natives-win32-arm64-msvc": "0.9.4-alpha.
|
|
528
|
-
"@bastani/atomic-natives-win32-x64-msvc": "0.9.4-alpha.
|
|
523
|
+
"@bastani/atomic-natives-darwin-arm64": "0.9.4-alpha.4",
|
|
524
|
+
"@bastani/atomic-natives-darwin-x64": "0.9.4-alpha.4",
|
|
525
|
+
"@bastani/atomic-natives-linux-arm64-gnu": "0.9.4-alpha.4",
|
|
526
|
+
"@bastani/atomic-natives-linux-x64-gnu": "0.9.4-alpha.4",
|
|
527
|
+
"@bastani/atomic-natives-win32-arm64-msvc": "0.9.4-alpha.4",
|
|
528
|
+
"@bastani/atomic-natives-win32-x64-msvc": "0.9.4-alpha.4"
|
|
529
529
|
},
|
|
530
530
|
"engines": {
|
|
531
531
|
"bun": ">=1.3.14",
|
|
@@ -533,8 +533,8 @@
|
|
|
533
533
|
}
|
|
534
534
|
},
|
|
535
535
|
"node_modules/@bastani/atomic-natives-darwin-arm64": {
|
|
536
|
-
"version": "0.9.4-alpha.
|
|
537
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.9.4-alpha.
|
|
536
|
+
"version": "0.9.4-alpha.4",
|
|
537
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.9.4-alpha.4.tgz",
|
|
538
538
|
"license": "MIT",
|
|
539
539
|
"os": [
|
|
540
540
|
"darwin"
|
|
@@ -545,8 +545,8 @@
|
|
|
545
545
|
"optional": true
|
|
546
546
|
},
|
|
547
547
|
"node_modules/@bastani/atomic-natives-darwin-x64": {
|
|
548
|
-
"version": "0.9.4-alpha.
|
|
549
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.9.4-alpha.
|
|
548
|
+
"version": "0.9.4-alpha.4",
|
|
549
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.9.4-alpha.4.tgz",
|
|
550
550
|
"license": "MIT",
|
|
551
551
|
"os": [
|
|
552
552
|
"darwin"
|
|
@@ -557,8 +557,8 @@
|
|
|
557
557
|
"optional": true
|
|
558
558
|
},
|
|
559
559
|
"node_modules/@bastani/atomic-natives-linux-arm64-gnu": {
|
|
560
|
-
"version": "0.9.4-alpha.
|
|
561
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.9.4-alpha.
|
|
560
|
+
"version": "0.9.4-alpha.4",
|
|
561
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.9.4-alpha.4.tgz",
|
|
562
562
|
"license": "MIT",
|
|
563
563
|
"os": [
|
|
564
564
|
"linux"
|
|
@@ -572,8 +572,8 @@
|
|
|
572
572
|
"optional": true
|
|
573
573
|
},
|
|
574
574
|
"node_modules/@bastani/atomic-natives-linux-x64-gnu": {
|
|
575
|
-
"version": "0.9.4-alpha.
|
|
576
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.9.4-alpha.
|
|
575
|
+
"version": "0.9.4-alpha.4",
|
|
576
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.9.4-alpha.4.tgz",
|
|
577
577
|
"license": "MIT",
|
|
578
578
|
"os": [
|
|
579
579
|
"linux"
|
|
@@ -587,8 +587,8 @@
|
|
|
587
587
|
"optional": true
|
|
588
588
|
},
|
|
589
589
|
"node_modules/@bastani/atomic-natives-win32-arm64-msvc": {
|
|
590
|
-
"version": "0.9.4-alpha.
|
|
591
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.9.4-alpha.
|
|
590
|
+
"version": "0.9.4-alpha.4",
|
|
591
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.9.4-alpha.4.tgz",
|
|
592
592
|
"license": "MIT",
|
|
593
593
|
"os": [
|
|
594
594
|
"win32"
|
|
@@ -599,8 +599,8 @@
|
|
|
599
599
|
"optional": true
|
|
600
600
|
},
|
|
601
601
|
"node_modules/@bastani/atomic-natives-win32-x64-msvc": {
|
|
602
|
-
"version": "0.9.4-alpha.
|
|
603
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.9.4-alpha.
|
|
602
|
+
"version": "0.9.4-alpha.4",
|
|
603
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.9.4-alpha.4.tgz",
|
|
604
604
|
"license": "MIT",
|
|
605
605
|
"os": [
|
|
606
606
|
"win32"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/atomic",
|
|
3
|
-
"version": "0.9.4-alpha.
|
|
3
|
+
"version": "0.9.4-alpha.4",
|
|
4
4
|
"description": "Atomic coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"atomicConfig": {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"prepublishOnly": "bun run clean && bun run build && bun run shrinkwrap"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@bastani/atomic-natives": "0.9.4-alpha.
|
|
73
|
+
"@bastani/atomic-natives": "0.9.4-alpha.4",
|
|
74
74
|
"@bufbuild/protobuf": "^2.0.0",
|
|
75
75
|
"@earendil-works/pi-agent-core": "^0.80.2",
|
|
76
76
|
"@earendil-works/pi-ai": "^0.80.2",
|