@code-yeongyu/senpi 2026.9.26 → 2026.9.27-2
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 +43 -0
- package/dist/bun-runtime.d.ts +18 -2
- package/dist/bun-runtime.d.ts.map +1 -1
- package/dist/bun-runtime.js +60 -8
- package/dist/bun-runtime.js.map +1 -1
- package/dist/bundle/chunks/{app-server-command-ZRCKWY2X.js → app-server-command-ATWHNOOO.js} +1 -1
- package/dist/bundle/chunks/bun-extension-importer-R4HXF3GD.js +14 -0
- package/dist/bundle/chunks/chunk-2L26KPZ6.js +8 -0
- package/dist/bundle/chunks/{chunk-3WBSBDBX.js → chunk-3CC5ZOBV.js} +1 -1
- package/dist/bundle/chunks/{chunk-OZCB6BP3.js → chunk-67BC7VZV.js} +4 -4
- package/dist/bundle/chunks/{chunk-QGC46CGK.js → chunk-6SLQ5HFO.js} +46 -43
- package/dist/bundle/chunks/{chunk-MKAM7IRH.js → chunk-6W2DB2GC.js} +1 -1
- package/dist/bundle/chunks/{chunk-BSOJHK4W.js → chunk-7FXXRPB3.js} +2 -1
- package/dist/bundle/chunks/{chunk-Y54V65MS.js → chunk-HPY47AVX.js} +1 -1
- package/dist/bundle/chunks/{chunk-CLZVNQW3.js → chunk-LPFZGWG2.js} +1 -1
- package/dist/bundle/chunks/chunk-W3D3ZYDS.js +2 -0
- package/dist/bundle/chunks/{chunk-UBPMXBOJ.js → chunk-XKLR7C5B.js} +1 -1
- package/dist/bundle/chunks/{cli-main-H6JAXAXV.js → cli-main-HOM6UH3H.js} +1 -1
- package/dist/bundle/chunks/{help-fast-path-ZGKPSDFO.js → help-fast-path-YGYHMV2W.js} +1 -1
- package/dist/bundle/chunks/{host-command-BMHJ4YUD.js → host-command-XXSAFWBW.js} +1 -1
- package/dist/bundle/chunks/{host-lifecycle-2GZAGSGW.js → host-lifecycle-GOMGJ25O.js} +1 -1
- package/dist/bundle/chunks/{interactive-host-runtime-YI75GFD5.js → interactive-host-runtime-IYCZWJGX.js} +1 -1
- package/dist/bundle/chunks/{interactive-mode-HM7UQYRC.js → interactive-mode-ZMO7YVYU.js} +1 -1
- package/dist/bundle/chunks/{multi-session-host-7YX2I7UK.js → multi-session-host-CE3W6COI.js} +1 -1
- package/dist/bundle/chunks/{package-manager-cli-3ISYTEL2.js → package-manager-cli-2PHRL2SX.js} +1 -1
- package/dist/bundle/chunks/{rpc-mode-6PY4TN5F.js → rpc-mode-WCETTMFV.js} +1 -1
- package/dist/bundle/chunks/session-worker.js +133 -129
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +4 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/cross-project-session.d.ts +22 -0
- package/dist/cli/cross-project-session.d.ts.map +1 -0
- package/dist/cli/cross-project-session.js +38 -0
- package/dist/cli/cross-project-session.js.map +1 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +19 -5
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/builtin/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/index.js +2 -0
- package/dist/core/extensions/builtin/index.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/index.js +5 -2
- package/dist/core/extensions/builtin/permission-system/index.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/parsers.d.ts +5 -0
- package/dist/core/extensions/builtin/permission-system/parsers.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/parsers.js +13 -0
- package/dist/core/extensions/builtin/permission-system/parsers.js.map +1 -1
- package/dist/core/extensions/builtin/repository-identity.d.ts +6 -0
- package/dist/core/extensions/builtin/repository-identity.d.ts.map +1 -0
- package/dist/core/extensions/builtin/repository-identity.js +33 -0
- package/dist/core/extensions/builtin/repository-identity.js.map +1 -0
- package/dist/core/extensions/bun-extension-importer.d.ts.map +1 -1
- package/dist/core/extensions/bun-extension-importer.js +10 -4
- package/dist/core/extensions/bun-extension-importer.js.map +1 -1
- package/dist/core/extensions/bun-extension-registry.js +6 -5
- package/dist/core/extensions/bun-extension-registry.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/kernel-prelude.d.ts +13 -0
- package/dist/core/extensions/kernel-prelude.d.ts.map +1 -0
- package/dist/core/extensions/kernel-prelude.js +38 -0
- package/dist/core/extensions/kernel-prelude.js.map +1 -0
- package/dist/core/extensions/types.d.ts +44 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +4 -2
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/provider-rejected-images.d.ts +18 -0
- package/dist/core/provider-rejected-images.d.ts.map +1 -0
- package/dist/core/provider-rejected-images.js +107 -0
- package/dist/core/provider-rejected-images.js.map +1 -0
- package/dist/core/repository-identity.d.ts +18 -0
- package/dist/core/repository-identity.d.ts.map +1 -0
- package/dist/core/repository-identity.js +75 -0
- package/dist/core/repository-identity.js.map +1 -0
- package/dist/core/session-rebind.d.ts +17 -0
- package/dist/core/session-rebind.d.ts.map +1 -0
- package/dist/core/session-rebind.js +111 -0
- package/dist/core/session-rebind.js.map +1 -0
- package/dist/core/session-title-generator.d.ts.map +1 -1
- package/dist/core/session-title-generator.js +21 -3
- package/dist/core/session-title-generator.js.map +1 -1
- package/dist/core/session-title-reasoning.d.ts +14 -0
- package/dist/core/session-title-reasoning.d.ts.map +1 -0
- package/dist/core/session-title-reasoning.js +31 -0
- package/dist/core/session-title-reasoning.js.map +1 -0
- package/dist/core/tools/path-utils.d.ts.map +1 -1
- package/dist/core/tools/path-utils.js +13 -0
- package/dist/core/tools/path-utils.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +6 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +100 -19
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +2 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/runtime-notice-presenter.d.ts +8 -0
- package/dist/modes/interactive/runtime-notice-presenter.d.ts.map +1 -0
- package/dist/modes/interactive/runtime-notice-presenter.js +69 -0
- package/dist/modes/interactive/runtime-notice-presenter.js.map +1 -0
- package/dist/modes/interactive/runtime-notice.d.ts +50 -0
- package/dist/modes/interactive/runtime-notice.d.ts.map +1 -0
- package/dist/modes/interactive/runtime-notice.js +104 -0
- package/dist/modes/interactive/runtime-notice.js.map +1 -0
- package/docs/environment-variables.md +2 -0
- package/docs/extensions.md +27 -1
- package/docs/quickstart.md +7 -1
- package/docs/sessions.md +9 -0
- package/docs/usage.md +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +26 -0
- package/node_modules/@code-yeongyu/senpi-codemode/README.md +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/bridge/protocol.ts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/bridges/schema-bridge.ts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/extension/kernel-preludes.ts +30 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +15 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/context-manager.ts +1 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/local-module-loader.ts +16 -2
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/kernel.ts +6 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/prelude.py +15 -2
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/transport.ts +7 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/shared/kernel-prelude-plan.ts +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/prompt/eval-prompt-template.ts +2 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/prompt/eval-prompt.ts +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool-options.ts +11 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool.ts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/run-eval-cell.ts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/types.ts +3 -1
- 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/fireworks.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/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/package.json +2 -2
- package/node_modules/@earendil-works/pi-pty/native/prebuilds/darwin-arm64/senpi_pty.darwin-arm64.node +0 -0
- 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/package.json +1 -1
- package/package.json +7 -7
- package/dist/bundle/chunks/bun-extension-importer-H4IJCWWQ.js +0 -14
- package/dist/bundle/chunks/chunk-34HMVB33.js +0 -2
- package/dist/bundle/chunks/chunk-T3JBT2IK.js +0 -8
|
@@ -60,6 +60,7 @@ import { CODEX_RESPONSES_API } from "./extensions/builtin/service-tier.js";
|
|
|
60
60
|
import { deriveExtensionRegistrationId } from "./extensions/builtin/tool-search/engine/marker.js";
|
|
61
61
|
import { getToolSearchService } from "./extensions/builtin/tool-search/service.js";
|
|
62
62
|
import { ExecuteToolError, ExtensionRunner, wrapRegisteredTools, } from "./extensions/index.js";
|
|
63
|
+
import { projectKernelPrelude } from "./extensions/kernel-prelude.js";
|
|
63
64
|
import { emitSessionShutdownEvent } from "./extensions/runner.js";
|
|
64
65
|
import { normalizeToolExposure, RUNTIME_EXTENSION_PATH } from "./extensions/types.js";
|
|
65
66
|
import { shouldWarnHighReasoning } from "./high-reasoning-warning.js";
|
|
@@ -70,6 +71,7 @@ import { getModelNarrowingPatterns, resolveModelScope } from "./model-resolver.j
|
|
|
70
71
|
import { PROMPT_CACHE_SAFE_WAIT_ENV, resolvePromptCacheSafeWaitSeconds } from "./prompt-cache-budget.js";
|
|
71
72
|
import { PromptCachePrefixBuilds } from "./prompt-cache-prefix-request.js";
|
|
72
73
|
import { expandPromptTemplateWithMetadata } from "./prompt-templates.js";
|
|
74
|
+
import { rejectedImageSources } from "./provider-rejected-images.js";
|
|
73
75
|
import { createProviderTimeoutRetryPlan, runBoundedRetryContinuation } from "./provider-timeout-retry.js";
|
|
74
76
|
import { isBillingErrorMessage } from "./retry-fallback/billing.js";
|
|
75
77
|
import { formatSelector } from "./retry-fallback/chains.js";
|
|
@@ -1677,6 +1679,12 @@ export class AgentSession {
|
|
|
1677
1679
|
if (retryOutcome === "not-handled" && cursorQuotaRe && msg.errorMessage) {
|
|
1678
1680
|
msg.errorMessage = `${msg.errorMessage} (likely provider usage/quota exhaustion: conversation is well below the model context window)`;
|
|
1679
1681
|
}
|
|
1682
|
+
if (retryOutcome === "not-handled" && msg.stopReason === "error" && msg.errorMessage) {
|
|
1683
|
+
const rejectedImages = rejectedImageSources(this.agent.state.messages, msg);
|
|
1684
|
+
if (rejectedImages.length > 0) {
|
|
1685
|
+
msg.errorMessage = `${msg.errorMessage} (the rejected image from ${rejectedImages.join(", ")} is left out of later requests; send your next message to continue)`;
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1680
1688
|
if (retryOutcome === "not-handled" && this._retryAttempt > 0 && msg.errorMessage) {
|
|
1681
1689
|
const attempt = this._retryAttempt;
|
|
1682
1690
|
this._retryAttempt = 0;
|
|
@@ -2227,6 +2235,8 @@ export class AgentSession {
|
|
|
2227
2235
|
description: definition.description,
|
|
2228
2236
|
parameters: definition.parameters,
|
|
2229
2237
|
promptGuidelines: definition.promptGuidelines,
|
|
2238
|
+
kernelPrelude: projectKernelPrelude(definition.name, definition.kernelPrelude),
|
|
2239
|
+
permissionParser: definition.permissionParser,
|
|
2230
2240
|
sourceInfo,
|
|
2231
2241
|
...normalizeToolExposure(definition),
|
|
2232
2242
|
}));
|
|
@@ -2439,6 +2449,7 @@ export class AgentSession {
|
|
|
2439
2449
|
}
|
|
2440
2450
|
const activeToolNamesChanged = validToolNames.length !== this.agent.state.tools.length ||
|
|
2441
2451
|
validToolNames.some((name, index) => name !== this.agent.state.tools[index]?.name);
|
|
2452
|
+
const previousToolNames = new Set(this.agent.state.tools.map((tool) => tool.name));
|
|
2442
2453
|
this.agent.state.tools = tools;
|
|
2443
2454
|
for (const name of validToolNames) {
|
|
2444
2455
|
if (!this._declaredToolNames.includes(name))
|
|
@@ -2456,6 +2467,11 @@ export class AgentSession {
|
|
|
2456
2467
|
this._incrementMessageRevision();
|
|
2457
2468
|
}
|
|
2458
2469
|
}
|
|
2470
|
+
// senpi#2128: notification-only; the runner reports handler failures, so nothing awaits it.
|
|
2471
|
+
const activatedToolNames = validToolNames.filter((name) => !previousToolNames.has(name));
|
|
2472
|
+
if (activatedToolNames.length > 0 && this._extensionRunner?.hasHandlers("tool_activated")) {
|
|
2473
|
+
void this._extensionRunner.emit({ type: "tool_activated", toolNames: activatedToolNames });
|
|
2474
|
+
}
|
|
2459
2475
|
}
|
|
2460
2476
|
/**
|
|
2461
2477
|
* senpi#2095: a model that accepts `allowed_tools` is declared every tool this session has
|
|
@@ -3322,11 +3338,9 @@ export class AgentSession {
|
|
|
3322
3338
|
if (abortController.signal.aborted) {
|
|
3323
3339
|
return;
|
|
3324
3340
|
}
|
|
3325
|
-
|
|
3326
|
-
this.
|
|
3327
|
-
|
|
3328
|
-
event: "session_title_generation",
|
|
3329
|
-
error: message,
|
|
3341
|
+
// A missing title is cosmetic, so the failure stays out of the runtime-error surface.
|
|
3342
|
+
this._sessionLogger.debug("session_title_failed", {
|
|
3343
|
+
error: error instanceof Error ? error.message : String(error),
|
|
3330
3344
|
});
|
|
3331
3345
|
}
|
|
3332
3346
|
finally {
|