@openeryc/pi-coding-agent 0.75.53 → 0.75.55
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 +24 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-session.d.ts +4 -2
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +30 -30
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/mcp/client.d.ts +16 -7
- package/dist/core/mcp/client.d.ts.map +1 -1
- package/dist/core/mcp/client.js +135 -107
- package/dist/core/mcp/client.js.map +1 -1
- package/dist/core/mcp/manager.d.ts +12 -1
- package/dist/core/mcp/manager.d.ts.map +1 -1
- package/dist/core/mcp/manager.js +88 -34
- package/dist/core/mcp/manager.js.map +1 -1
- package/dist/core/mcp/types.d.ts +0 -13
- package/dist/core/mcp/types.d.ts.map +1 -1
- package/dist/core/mcp/types.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +3 -1
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +1 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +18 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +360 -427
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +5 -1
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/utils/sleep.d.ts.map +1 -1
- package/dist/utils/sleep.js +7 -3
- package/dist/utils/sleep.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js.map +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.75.55] - 2026-05-31
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- MCP tool calls no longer hang for 120s when server disconnects mid-call — pending promises are now rejected immediately on disconnect.
|
|
7
|
+
- RPC client requests no longer hang forever when the subprocess disconnects.
|
|
8
|
+
- `sleep()` no longer leaks AbortSignal listeners on normal completion.
|
|
9
|
+
- Proxy and codex-responses AbortSignal listeners now use `{ once: true }` to prevent leaks.
|
|
10
|
+
- Startup checks (`checkForNewPiVersion`, `checkForPackageUpdates`, `checkTmuxKeyboardSetup`) now have `.catch()` to prevent unhandled rejections.
|
|
11
|
+
- Added global `unhandledRejection` handler to prevent silent crashes.
|
|
12
|
+
- MCP connect handshake timeout increased from 30s to 120s to accommodate npx cold starts.
|
|
13
|
+
- `/mcp <name>` toggle now immediately reflects in selector without needing Esc+reopen.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- MCP server `initialize` handshake timeout raised to 120s (was 30s) for npx cold start compatibility.
|
|
17
|
+
- `handleEvent` switch (337 lines) split into 15 named `_handleXxx()` methods.
|
|
18
|
+
- Slash command dispatch (170-line if-else chain) replaced with `Map`-based dispatch.
|
|
19
|
+
- MCP tool grouping for system prompt moved from `_rebuildSystemPrompt` to `MCPManager.getMcpToolDescriptions()`.
|
|
20
|
+
|
|
21
|
+
## [0.75.54] - 2026-05-31
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
- MCP server startup now connects all servers in parallel (`Promise.allSettled`) instead of sequentially, dramatically reducing startup time when multiple servers are configured.
|
|
25
|
+
- Toggling a server via `/mcp` now only stops/starts that single server instead of restarting all servers.
|
|
26
|
+
|
|
3
27
|
## [0.75.53] - 2026-05-31
|
|
4
28
|
|
|
5
29
|
### Fixed
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"","sourcesContent":["#!/usr/bin/env node\n/**\n * CLI entry point for the refactored coding agent.\n * Uses main.ts with AgentSession and new mode modules.\n *\n * Test with: npx tsx src/cli-new.ts [args...]\n */\nimport { APP_NAME } from \"./config.ts\";\nimport { configureHttpDispatcher } from \"./core/http-dispatcher.ts\";\nimport { main } from \"./main.ts\";\n\nprocess.title = APP_NAME;\nprocess.env.PI_CODING_AGENT = \"true\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\n// Configure undici's global dispatcher before provider SDKs issue requests.\n// Runtime settings are applied once SettingsManager has loaded global/project settings.\nconfigureHttpDispatcher();\n\nmain(process.argv.slice(2));\n"]}
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"","sourcesContent":["#!/usr/bin/env node\n/**\n * CLI entry point for the refactored coding agent.\n * Uses main.ts with AgentSession and new mode modules.\n *\n * Test with: npx tsx src/cli-new.ts [args...]\n */\nimport { APP_NAME } from \"./config.ts\";\nimport { configureHttpDispatcher } from \"./core/http-dispatcher.ts\";\nimport { main } from \"./main.ts\";\n\nprocess.title = APP_NAME;\nprocess.env.PI_CODING_AGENT = \"true\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\n// Catch unhandled promise rejections so they don't crash the process silently\nprocess.on(\"unhandledRejection\", (reason) => {\n\tconsole.error(\"[Unhandled Promise Rejection]\", reason instanceof Error ? reason.message : String(reason));\n});\n\n// Configure undici's global dispatcher before provider SDKs issue requests.\n// Runtime settings are applied once SettingsManager has loaded global/project settings.\nconfigureHttpDispatcher();\n\nmain(process.argv.slice(2));\n"]}
|
package/dist/cli.js
CHANGED
|
@@ -11,6 +11,10 @@ import { main } from "./main.js";
|
|
|
11
11
|
process.title = APP_NAME;
|
|
12
12
|
process.env.PI_CODING_AGENT = "true";
|
|
13
13
|
process.emitWarning = (() => { });
|
|
14
|
+
// Catch unhandled promise rejections so they don't crash the process silently
|
|
15
|
+
process.on("unhandledRejection", (reason) => {
|
|
16
|
+
console.error("[Unhandled Promise Rejection]", reason instanceof Error ? reason.message : String(reason));
|
|
17
|
+
});
|
|
14
18
|
// Configure undici's global dispatcher before provider SDKs issue requests.
|
|
15
19
|
// Runtime settings are applied once SettingsManager has loaded global/project settings.
|
|
16
20
|
configureHttpDispatcher();
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC;AACzB,OAAO,CAAC,GAAG,CAAC,eAAe,GAAG,MAAM,CAAC;AACrC,OAAO,CAAC,WAAW,GAAG,CAAC,GAAG,EAAE,CAAC,EAAC,CAAC,CAA+B,CAAC;AAE/D,4EAA4E;AAC5E,wFAAwF;AACxF,uBAAuB,EAAE,CAAC;AAE1B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n/**\n * CLI entry point for the refactored coding agent.\n * Uses main.ts with AgentSession and new mode modules.\n *\n * Test with: npx tsx src/cli-new.ts [args...]\n */\nimport { APP_NAME } from \"./config.ts\";\nimport { configureHttpDispatcher } from \"./core/http-dispatcher.ts\";\nimport { main } from \"./main.ts\";\n\nprocess.title = APP_NAME;\nprocess.env.PI_CODING_AGENT = \"true\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\n// Configure undici's global dispatcher before provider SDKs issue requests.\n// Runtime settings are applied once SettingsManager has loaded global/project settings.\nconfigureHttpDispatcher();\n\nmain(process.argv.slice(2));\n"]}
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC;AACzB,OAAO,CAAC,GAAG,CAAC,eAAe,GAAG,MAAM,CAAC;AACrC,OAAO,CAAC,WAAW,GAAG,CAAC,GAAG,EAAE,CAAC,EAAC,CAAC,CAA+B,CAAC;AAE/D,8EAA8E;AAC9E,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;IAC5C,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,MAAM,YAAY,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;AAAA,CAC1G,CAAC,CAAC;AAEH,4EAA4E;AAC5E,wFAAwF;AACxF,uBAAuB,EAAE,CAAC;AAE1B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n/**\n * CLI entry point for the refactored coding agent.\n * Uses main.ts with AgentSession and new mode modules.\n *\n * Test with: npx tsx src/cli-new.ts [args...]\n */\nimport { APP_NAME } from \"./config.ts\";\nimport { configureHttpDispatcher } from \"./core/http-dispatcher.ts\";\nimport { main } from \"./main.ts\";\n\nprocess.title = APP_NAME;\nprocess.env.PI_CODING_AGENT = \"true\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\n// Catch unhandled promise rejections so they don't crash the process silently\nprocess.on(\"unhandledRejection\", (reason) => {\n\tconsole.error(\"[Unhandled Promise Rejection]\", reason instanceof Error ? reason.message : String(reason));\n});\n\n// Configure undici's global dispatcher before provider SDKs issue requests.\n// Runtime settings are applied once SettingsManager has loaded global/project settings.\nconfigureHttpDispatcher();\n\nmain(process.argv.slice(2));\n"]}
|
|
@@ -475,8 +475,10 @@ export declare class AgentSession {
|
|
|
475
475
|
bindExtensions(bindings: ExtensionBindings): Promise<void>;
|
|
476
476
|
private _initMcp;
|
|
477
477
|
private _refreshMcpTools;
|
|
478
|
-
/** Reload MCP servers after config changes (e.g. toggle enabled).
|
|
479
|
-
|
|
478
|
+
/** Reload MCP servers after config changes (e.g. toggle enabled).
|
|
479
|
+
* If changedServer is provided, only that server is started/stopped
|
|
480
|
+
* instead of restarting all servers. */
|
|
481
|
+
reloadMcp(changedServer?: string): Promise<void>;
|
|
480
482
|
/** Get MCP connection statuses (for UI display) */
|
|
481
483
|
getMcpStatuses(): Array<{
|
|
482
484
|
serverName: string;
|