@dyyz1993/pi-coding-agent 0.74.45 → 0.74.47
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/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +13 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/extensions/auto-memory/__tests__/extract-result.test.ts +42 -0
- package/dist/extensions/auto-memory/__tests__/prefetch-history.test.ts +136 -0
- package/dist/extensions/auto-memory/__tests__/prompts.test.ts +29 -0
- package/dist/extensions/auto-memory/__tests__/skip-rules.test.ts +366 -0
- package/dist/extensions/auto-memory/contract.d.ts +16 -0
- package/dist/extensions/auto-memory/contract.d.ts.map +1 -1
- package/dist/extensions/auto-memory/contract.js.map +1 -1
- package/dist/extensions/auto-memory/contract.ts +16 -0
- package/dist/extensions/auto-memory/index.ts +134 -13
- package/dist/extensions/auto-memory/prompts.ts +10 -0
- package/dist/extensions/auto-memory/skip-rules.ts +2 -0
- package/dist/extensions/bash-ext/index.ts +855 -845
- package/dist/extensions/claude-hooks-compat/index.ts +12 -7
- package/dist/extensions/coordinator/handler.test.ts +388 -123
- package/dist/extensions/coordinator/handler.ts +78 -12
- package/dist/extensions/coordinator/index.ts +267 -198
- package/dist/extensions/coordinator/types.d.ts +16 -0
- package/dist/extensions/coordinator/types.d.ts.map +1 -1
- package/dist/extensions/coordinator/types.js.map +1 -1
- package/dist/extensions/coordinator/types.ts +57 -49
- package/dist/extensions/lsp/lsp/index.ts +15 -9
- package/dist/extensions/lsp/lsp/lsp-clangd-e2e.test.ts +229 -0
- package/dist/extensions/message-bridge/index.ts +14 -11
- package/dist/extensions/session-supervisor/index.ts +14 -8
- package/dist/extensions/subagent-v2/index.ts +58 -42
- package/dist/extensions/todo-ext/index.ts +7 -3
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +9 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/package.json +1 -1
|
@@ -2164,11 +2164,24 @@ export class AgentSession {
|
|
|
2164
2164
|
await this.settingsManager.reload();
|
|
2165
2165
|
resetApiProviders();
|
|
2166
2166
|
await this._resourceLoader.reload();
|
|
2167
|
+
// Capture the old runner before _buildRuntime replaces it, so we can
|
|
2168
|
+
// invalidate it after the new runner is active. This ensures any
|
|
2169
|
+
// ExtensionContext captured from the old runner will throw on access
|
|
2170
|
+
// instead of silently returning stale data.
|
|
2171
|
+
const oldRunner = this._extensionRunner;
|
|
2167
2172
|
this._buildRuntime({
|
|
2168
2173
|
activeToolNames: this.getActiveToolNames(),
|
|
2169
2174
|
flagValues: previousFlagValues,
|
|
2170
2175
|
includeAllExtensionTools: true,
|
|
2171
2176
|
});
|
|
2177
|
+
oldRunner.invalidate("This extension ctx is stale after reload. Do not use the old ctx after await ctx.reload().");
|
|
2178
|
+
// Flush pending channel registrations on the new runner so that extensions
|
|
2179
|
+
// (e.g. coordinator) can communicate immediately after reload without
|
|
2180
|
+
// requiring an explicit rebindSession() call from the host mode.
|
|
2181
|
+
if (this._registerChannel) {
|
|
2182
|
+
this._extensionRunner.flushPendingChannels(this._registerChannel);
|
|
2183
|
+
this._extensionRunner.updateRegisterChannel(this._registerChannel);
|
|
2184
|
+
}
|
|
2172
2185
|
const hasBindings = this._extensionUIContext ||
|
|
2173
2186
|
this._extensionCommandContextActions ||
|
|
2174
2187
|
this._extensionShutdownHandler ||
|