@code-yeongyu/senpi 2026.9.19-2 → 2026.9.20
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 +53 -0
- package/dist/bundle/chunks/{app-server-command-QBJ4GPN7.js → app-server-command-B35FQUTE.js} +1 -1
- package/dist/bundle/chunks/{bun-extension-importer-JQZRPNJH.js → bun-extension-importer-HHH4TV4B.js} +3 -3
- package/dist/bundle/chunks/{chunk-YRN3PCTM.js → chunk-DQZB4GVV.js} +4 -4
- package/dist/bundle/chunks/{chunk-EHSDTQ6I.js → chunk-E5R67F7G.js} +37 -37
- package/dist/bundle/chunks/{chunk-5E5TLB76.js → chunk-TWGC3TBR.js} +2 -2
- package/dist/bundle/chunks/{chunk-RLRLQRI2.js → chunk-V2ZB62DG.js} +1 -1
- package/dist/bundle/chunks/{chunk-3FRTRCR6.js → chunk-YXQG2SUX.js} +2 -2
- package/dist/bundle/chunks/{chunk-PLZK7ABD.js → chunk-Z4LHCTJ6.js} +1 -1
- package/dist/bundle/chunks/{chunk-3Q4WGKFA.js → chunk-ZMFHNH6U.js} +1 -1
- package/dist/bundle/chunks/{cli-main-MLJ2H637.js → cli-main-USVT7JMN.js} +1 -1
- package/dist/bundle/chunks/{interactive-host-runtime-AITXUDCT.js → interactive-host-runtime-ELBAZ4LN.js} +1 -1
- package/dist/bundle/chunks/{interactive-mode-7C75IXNF.js → interactive-mode-R6225BKI.js} +1 -1
- package/dist/bundle/chunks/{list-tips-KTDNGQUK.js → list-tips-Z7T2ACVU.js} +1 -1
- package/dist/bundle/chunks/{multi-session-host-2YCJKQOL.js → multi-session-host-QNEBJW2P.js} +3 -3
- package/dist/bundle/chunks/{package-manager-cli-4ANSELYT.js → package-manager-cli-4MVJ3JSE.js} +1 -1
- package/dist/bundle/chunks/{rpc-mode-OPFQIWFP.js → rpc-mode-CXVDRIBU.js} +1 -1
- package/dist/bundle/chunks/{session-picker-DXCITGLS.js → session-picker-6N666KQZ.js} +1 -1
- package/dist/bundle/chunks/session-worker.js +66 -66
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +14 -1
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +45 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +233 -11
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/builtin/ask-user/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ask-user/extension.js +16 -5
- package/dist/core/extensions/builtin/ask-user/extension.js.map +1 -1
- package/dist/core/extensions/builtin/ask-user/format.d.ts +5 -0
- package/dist/core/extensions/builtin/ask-user/format.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ask-user/format.js +4 -0
- package/dist/core/extensions/builtin/ask-user/format.js.map +1 -1
- package/dist/core/extensions/builtin/ask-user/notify.d.ts +2 -0
- package/dist/core/extensions/builtin/ask-user/notify.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ask-user/notify.js +2 -0
- package/dist/core/extensions/builtin/ask-user/notify.js.map +1 -1
- package/dist/core/extensions/builtin/ask-user/registry.d.ts +15 -2
- package/dist/core/extensions/builtin/ask-user/registry.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ask-user/registry.js +13 -0
- package/dist/core/extensions/builtin/ask-user/registry.js.map +1 -1
- package/dist/core/extensions/builtin/ask-user/render.d.ts +6 -0
- package/dist/core/extensions/builtin/ask-user/render.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ask-user/render.js +9 -0
- package/dist/core/extensions/builtin/ask-user/render.js.map +1 -1
- package/dist/core/extensions/builtin/ask-user/resume.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ask-user/resume.js +59 -24
- package/dist/core/extensions/builtin/ask-user/resume.js.map +1 -1
- package/dist/core/extensions/builtin/ask-user/tool.d.ts +1 -1
- package/dist/core/extensions/builtin/ask-user/tool.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ask-user/tool.js +98 -17
- package/dist/core/extensions/builtin/ask-user/tool.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/model-usability-budget.d.ts +18 -0
- package/dist/core/extensions/builtin/compaction/model-usability-budget.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/model-usability-budget.js +16 -8
- package/dist/core/extensions/builtin/compaction/model-usability-budget.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/switch-admission.d.ts +23 -0
- package/dist/core/extensions/builtin/compaction/switch-admission.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/switch-admission.js +19 -0
- package/dist/core/extensions/builtin/compaction/switch-admission.js.map +1 -0
- package/dist/core/extensions/builtin/goal/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/index.js +10 -0
- package/dist/core/extensions/builtin/goal/index.js.map +1 -1
- package/dist/core/extensions/bun-extension-commonjs.d.ts +1 -1
- package/dist/core/extensions/bun-extension-commonjs.d.ts.map +1 -1
- package/dist/core/extensions/bun-extension-commonjs.js +3 -3
- package/dist/core/extensions/bun-extension-commonjs.js.map +1 -1
- package/dist/core/extensions/bun-extension-importer.d.ts.map +1 -1
- package/dist/core/extensions/bun-extension-importer.js +4 -1
- package/dist/core/extensions/bun-extension-importer.js.map +1 -1
- package/dist/core/extensions/bun-extension-registry.d.ts.map +1 -1
- package/dist/core/extensions/bun-extension-registry.js +5 -9
- package/dist/core/extensions/bun-extension-registry.js.map +1 -1
- package/dist/core/resolved-paths-memo.d.ts +31 -0
- package/dist/core/resolved-paths-memo.d.ts.map +1 -0
- package/dist/core/resolved-paths-memo.js +57 -0
- package/dist/core/resolved-paths-memo.js.map +1 -0
- package/dist/core/resource-loader.d.ts +4 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +25 -12
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/retry-fallback/settings.d.ts +10 -2
- package/dist/core/retry-fallback/settings.d.ts.map +1 -1
- package/dist/core/retry-fallback/settings.js +28 -6
- package/dist/core/retry-fallback/settings.js.map +1 -1
- package/dist/core/skill-discovery.d.ts.map +1 -1
- package/dist/core/skill-discovery.js +11 -1
- package/dist/core/skill-discovery.js.map +1 -1
- package/dist/main.d.ts +10 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +19 -2
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/ask-user-answer-chip.d.ts +2 -5
- package/dist/modes/interactive/components/ask-user-answer-chip.d.ts.map +1 -1
- package/dist/modes/interactive/components/ask-user-answer-chip.js +1 -4
- package/dist/modes/interactive/components/ask-user-answer-chip.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +2 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +8 -0
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/assistant-render-descriptors.d.ts +1 -0
- package/dist/modes/interactive/components/assistant-render-descriptors.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-render-descriptors.js +4 -0
- package/dist/modes/interactive/components/assistant-render-descriptors.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +3 -1
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +15 -2
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +2 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +81 -6
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/provider-error-presentation.d.ts +18 -0
- package/dist/modes/interactive/provider-error-presentation.d.ts.map +1 -0
- package/dist/modes/interactive/provider-error-presentation.js +100 -0
- package/dist/modes/interactive/provider-error-presentation.js.map +1 -0
- package/dist/modes/rpc/rpc-types.d.ts +18 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/modes/rpc/session-command-router.d.ts.map +1 -1
- package/dist/modes/rpc/session-command-router.js +14 -0
- package/dist/modes/rpc/session-command-router.js.map +1 -1
- package/dist/modes/rpc/session-event-writer.d.ts +9 -1
- package/dist/modes/rpc/session-event-writer.d.ts.map +1 -1
- package/dist/modes/rpc/session-event-writer.js +21 -0
- package/dist/modes/rpc/session-event-writer.js.map +1 -1
- package/dist/modes/rpc/session-registry.d.ts.map +1 -1
- package/dist/modes/rpc/session-registry.js +9 -2
- package/dist/modes/rpc/session-registry.js.map +1 -1
- package/dist/modes/rpc/session-worker-requests.d.ts +10 -1
- package/dist/modes/rpc/session-worker-requests.d.ts.map +1 -1
- package/dist/modes/rpc/session-worker-requests.js +8 -2
- package/dist/modes/rpc/session-worker-requests.js.map +1 -1
- package/dist/modes/rpc/session-worker-requests.test.d.ts +2 -0
- package/dist/modes/rpc/session-worker-requests.test.d.ts.map +1 -0
- package/dist/modes/rpc/session-worker-requests.test.js +44 -0
- package/dist/modes/rpc/session-worker-requests.test.js.map +1 -0
- package/docs/rpc.md +7 -0
- package/docs/settings.md +1 -1
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
- package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opengateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +2 -2
- package/node_modules/@earendil-works/pi-pty/package.json +1 -1
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-module-path.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-module-path.js +26 -3
- package/node_modules/@earendil-works/pi-tui/dist/native-module-path.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +13 -6
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js +11 -3
- package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +15 -2
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +45 -2
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/package.json +8 -8
|
@@ -16,6 +16,7 @@ import { findGitPaths } from "./footer-data-provider.js";
|
|
|
16
16
|
import { dedupePathsByPackageIdentity, findNearestPackageIdentity } from "./package-identity.js";
|
|
17
17
|
import { DefaultPackageManager } from "./package-manager.js";
|
|
18
18
|
import { loadPromptTemplates } from "./prompt-templates.js";
|
|
19
|
+
import { memoizeResolvedPaths, resolvedPathsMemoKey } from "./resolved-paths-memo.js";
|
|
19
20
|
import { SettingsManager } from "./settings-manager.js";
|
|
20
21
|
import { loadSkills } from "./skills.js";
|
|
21
22
|
import { createSourceInfo } from "./source-info.js";
|
|
@@ -340,22 +341,26 @@ export class DefaultResourceLoader {
|
|
|
340
341
|
this.loadedHookSources = this.buildLoadedHookSources(runtimeHookSourcePaths);
|
|
341
342
|
}
|
|
342
343
|
}
|
|
343
|
-
async loadProjectTrustExtensions() {
|
|
344
|
+
async loadProjectTrustExtensions(options = {}) {
|
|
344
345
|
// Force untrusted project settings for the bootstrap pass. This keeps project-local
|
|
345
346
|
// extensions/packages out while still loading user/global and temporary CLI extensions.
|
|
346
347
|
this.settingsManager.setProjectTrusted(false);
|
|
347
348
|
await this.settingsManager.reload();
|
|
348
|
-
return this.loadCurrentExtensionSet({ includeInlineFactories: true });
|
|
349
|
+
return this.loadCurrentExtensionSet({ includeInlineFactories: true, ...options });
|
|
349
350
|
}
|
|
350
351
|
async reload(options) {
|
|
351
352
|
resetTimings("extensions");
|
|
352
|
-
|
|
353
|
+
// A re-load of this loader is the signal that disk may have changed - it
|
|
354
|
+
// discards the extension cache, and it must not read package resolution
|
|
355
|
+
// through the host memo either (a package's own manifest is not in the key).
|
|
356
|
+
const refresh = this.loaded;
|
|
357
|
+
if (refresh) {
|
|
353
358
|
clearExtensionCache();
|
|
354
359
|
}
|
|
355
360
|
this.ensureGlobalDefaultExtensions();
|
|
356
361
|
let preTrustExtensions;
|
|
357
362
|
if (options?.resolveProjectTrust) {
|
|
358
|
-
preTrustExtensions = await this.loadProjectTrustExtensions();
|
|
363
|
+
preTrustExtensions = await this.loadProjectTrustExtensions({ refresh });
|
|
359
364
|
const projectTrusted = await options.resolveProjectTrust({ extensionsResult: preTrustExtensions });
|
|
360
365
|
this.settingsManager.setProjectTrusted(projectTrusted);
|
|
361
366
|
}
|
|
@@ -364,10 +369,7 @@ export class DefaultResourceLoader {
|
|
|
364
369
|
if (!settingsAreFresh) {
|
|
365
370
|
await this.settingsManager.reload();
|
|
366
371
|
}
|
|
367
|
-
const resolvedPaths = await this.
|
|
368
|
-
const cliExtensionPaths = await this.packageManager.resolveExtensionSources(this.additionalExtensionPaths, {
|
|
369
|
-
temporary: true,
|
|
370
|
-
});
|
|
372
|
+
const { resolvedPaths, cliExtensionPaths } = await this.resolvePackagePaths({ refresh });
|
|
371
373
|
time("packageResolve", "extensions");
|
|
372
374
|
// Keep package metadata available for later extendResources() passes.
|
|
373
375
|
this.resourceMetadataByPath = new Map();
|
|
@@ -530,6 +532,20 @@ export class DefaultResourceLoader {
|
|
|
530
532
|
writeFileSync(targetPath, shim, "utf-8");
|
|
531
533
|
}
|
|
532
534
|
}
|
|
535
|
+
resolvePackagePaths(options = {}) {
|
|
536
|
+
return memoizeResolvedPaths(resolvedPathsMemoKey({
|
|
537
|
+
agentDir: this.agentDir,
|
|
538
|
+
cwd: this.cwd,
|
|
539
|
+
globalSettings: this.settingsManager.getGlobalSettings(),
|
|
540
|
+
projectSettings: this.settingsManager.getProjectSettings(),
|
|
541
|
+
additionalExtensionPaths: this.additionalExtensionPaths,
|
|
542
|
+
}), async () => ({
|
|
543
|
+
resolvedPaths: await this.packageManager.resolve(),
|
|
544
|
+
cliExtensionPaths: await this.packageManager.resolveExtensionSources(this.additionalExtensionPaths, {
|
|
545
|
+
temporary: true,
|
|
546
|
+
}),
|
|
547
|
+
}), options);
|
|
548
|
+
}
|
|
533
549
|
buildGlobalDefaultExtensionLoadOptions() {
|
|
534
550
|
return {
|
|
535
551
|
factoryResolver: (_extensionPath, resolvedPath) => resolveGeneratedGlobalDefaultExtensionFactory(resolvedPath, this.agentDir),
|
|
@@ -537,10 +553,7 @@ export class DefaultResourceLoader {
|
|
|
537
553
|
};
|
|
538
554
|
}
|
|
539
555
|
async loadCurrentExtensionSet(options) {
|
|
540
|
-
const resolvedPaths = await this.
|
|
541
|
-
const cliExtensionPaths = await this.packageManager.resolveExtensionSources(this.additionalExtensionPaths, {
|
|
542
|
-
temporary: true,
|
|
543
|
-
});
|
|
556
|
+
const { resolvedPaths, cliExtensionPaths } = await this.resolvePackagePaths({ refresh: options.refresh });
|
|
544
557
|
const enabledExtensions = resolvedPaths.extensions.filter((r) => r.enabled).map((r) => r.path);
|
|
545
558
|
const cliEnabledExtensions = cliExtensionPaths.extensions.filter((r) => r.enabled).map((r) => r.path);
|
|
546
559
|
const extensionPaths = this.noExtensions
|