@code-yeongyu/senpi 2026.8.22 → 2026.8.23
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 +35 -0
- package/dist/bun-runtime.d.ts +58 -0
- package/dist/bun-runtime.d.ts.map +1 -0
- package/dist/bun-runtime.js +163 -0
- package/dist/bun-runtime.js.map +1 -0
- package/dist/cli.js +45 -2
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-session.d.ts +7 -2
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +81 -26
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/agent-settled-delivery.d.ts +13 -1
- package/dist/core/agent-settled-delivery.d.ts.map +1 -1
- package/dist/core/agent-settled-delivery.js +33 -2
- package/dist/core/agent-settled-delivery.js.map +1 -1
- package/dist/core/extensions/builtin/goal/cache-warm-renderer.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/cache-warm-renderer.js +2 -3
- package/dist/core/extensions/builtin/goal/cache-warm-renderer.js.map +1 -1
- package/dist/core/extensions/builtin/goal/cache-warm.d.ts +6 -0
- package/dist/core/extensions/builtin/goal/cache-warm.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/cache-warm.js +43 -0
- package/dist/core/extensions/builtin/goal/cache-warm.js.map +1 -1
- package/dist/core/model-config-schema.d.ts +12 -12
- package/dist/core/model-config-schema.js +2 -2
- package/dist/core/model-config-schema.js.map +1 -1
- package/dist/core/model-resolver.js +2 -2
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/session-work-barrier.d.ts.map +1 -1
- package/dist/core/session-work-barrier.js +38 -1
- package/dist/core/session-work-barrier.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +3 -0
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +7 -1
- 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 +39 -7
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/senpi +45 -2
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +32 -0
- package/node_modules/@code-yeongyu/senpi-codemode/README.md +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/extension/eval-notifier.ts +16 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/extension/runtime-factory.ts +4 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/extension/runtime-info.ts +41 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +9 -3
- package/node_modules/@code-yeongyu/senpi-codemode/src/interpreters/detect.ts +17 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/interpreters/resolve-command.ts +68 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/timeouts/idle-timeout.ts +33 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-runtime.ts +5 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool-options.ts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool.ts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/render.ts +60 -3
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/runtime-label.ts +49 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/types.ts +13 -0
- package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts +5 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js +13 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/composer-prompt.d.ts +27 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/composer-prompt.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/composer-prompt.js +54 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/composer-prompt.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.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/tool-call-middleware/protocols/kimi-xtml/markers.d.ts +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/kimi-xtml/markers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/kimi-xtml/markers.js +14 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/kimi-xtml/markers.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/kimi-xtml/recovery-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/kimi-xtml/recovery-stream.js +65 -35
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/kimi-xtml/recovery-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/kimi-xtml/thinking-recovery.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/kimi-xtml/thinking-recovery.js +40 -12
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/kimi-xtml/thinking-recovery.js.map +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/package.json +1 -1
- package/package.json +7 -7
|
@@ -497,6 +497,7 @@ export class InteractiveMode {
|
|
|
497
497
|
this.autocompleteProviderWrappers = [];
|
|
498
498
|
this.isInitialized = false;
|
|
499
499
|
this.pendingUserInputs = [];
|
|
500
|
+
this.agentIdle = false;
|
|
500
501
|
/**
|
|
501
502
|
* Clipboard images pasted into the composer, keyed by their visible
|
|
502
503
|
* `[Image #N]` marker number. The editor stores marker ids only, so these
|
|
@@ -1192,14 +1193,11 @@ export class InteractiveMode {
|
|
|
1192
1193
|
while (true) {
|
|
1193
1194
|
const userInput = await this.getUserInput();
|
|
1194
1195
|
try {
|
|
1195
|
-
await this.session.prompt(userInput.text,
|
|
1196
|
-
streamingBehavior: "steer",
|
|
1197
|
-
...(userInput.images ? { images: userInput.images } : {}),
|
|
1198
|
-
...this.optimisticUserEchoes.promptOptions(userInput.pendingEchoId),
|
|
1199
|
-
});
|
|
1196
|
+
await this.session.prompt(userInput.text, this.buildMainLoopPromptOptions(userInput));
|
|
1200
1197
|
}
|
|
1201
1198
|
catch (error) {
|
|
1202
1199
|
this.optimisticUserEchoes.reject(userInput.pendingEchoId);
|
|
1200
|
+
this.clearStatusIndicator("working");
|
|
1203
1201
|
const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
|
|
1204
1202
|
this.showError(errorMessage);
|
|
1205
1203
|
}
|
|
@@ -2299,13 +2297,17 @@ export class InteractiveMode {
|
|
|
2299
2297
|
}
|
|
2300
2298
|
const hadActiveStatusIndicator = this.activeStatusIndicator !== undefined;
|
|
2301
2299
|
const isClearingWorking = this.activeStatusIndicator?.kind === "working";
|
|
2300
|
+
const shouldReserveHeight = hadActiveStatusIndicator && this.options.tuiMode === "regular" && this.ui.getClearOnShrink();
|
|
2301
|
+
const renderedHeight = shouldReserveHeight ? this.statusContainer.render(this.ui.terminal.columns).length : 0;
|
|
2302
2302
|
this.activeStatusIndicator?.dispose();
|
|
2303
2303
|
this.activeStatusIndicator = undefined;
|
|
2304
2304
|
if (isClearingWorking) {
|
|
2305
2305
|
this.workingStartedAt = undefined;
|
|
2306
2306
|
}
|
|
2307
2307
|
this.statusContainer.clear();
|
|
2308
|
-
if (
|
|
2308
|
+
if (shouldReserveHeight) {
|
|
2309
|
+
const idleHeight = Math.min(this.ui.terminal.rows, Math.max(1, renderedHeight || 2));
|
|
2310
|
+
this.idleStatus.setHeight(idleHeight);
|
|
2309
2311
|
this.statusContainer.addChild(this.idleStatus);
|
|
2310
2312
|
}
|
|
2311
2313
|
}
|
|
@@ -3417,6 +3419,7 @@ export class InteractiveMode {
|
|
|
3417
3419
|
this.footer.invalidate();
|
|
3418
3420
|
switch (event.type) {
|
|
3419
3421
|
case "agent_start":
|
|
3422
|
+
this.agentIdle = false;
|
|
3420
3423
|
this.clearPendingTools();
|
|
3421
3424
|
this.clearActiveToolExecutionStatus();
|
|
3422
3425
|
this.clearToolHookStatuses();
|
|
@@ -3627,7 +3630,6 @@ export class InteractiveMode {
|
|
|
3627
3630
|
if (this.settingsManager.getShowTerminalProgress()) {
|
|
3628
3631
|
this.ui.terminal.setProgress(false);
|
|
3629
3632
|
}
|
|
3630
|
-
this.clearStatusIndicator("working");
|
|
3631
3633
|
this.clearActiveToolExecutionStatus();
|
|
3632
3634
|
this.clearToolHookStatuses();
|
|
3633
3635
|
this.streamingReveal.stop();
|
|
@@ -3644,6 +3646,13 @@ export class InteractiveMode {
|
|
|
3644
3646
|
case "agent_settled":
|
|
3645
3647
|
await this.checkShutdownRequested();
|
|
3646
3648
|
break;
|
|
3649
|
+
case "agent_idle":
|
|
3650
|
+
this.agentIdle = true;
|
|
3651
|
+
if (this.pendingUserInputs.length === 0) {
|
|
3652
|
+
this.clearStatusIndicator("working");
|
|
3653
|
+
}
|
|
3654
|
+
this.ui.requestRender();
|
|
3655
|
+
break;
|
|
3647
3656
|
case "continuation_error":
|
|
3648
3657
|
this.showError(sanitizeTerminalLabel(event.errorMessage));
|
|
3649
3658
|
break;
|
|
@@ -4375,6 +4384,29 @@ export class InteractiveMode {
|
|
|
4375
4384
|
};
|
|
4376
4385
|
});
|
|
4377
4386
|
}
|
|
4387
|
+
// Build the session.prompt options for a main-loop submission. The optimistic echo
|
|
4388
|
+
// keeps only a prompt that actually started; a buffered prompt consumed by an input
|
|
4389
|
+
// extension with action "handled" clears the retained working dock, but only once
|
|
4390
|
+
// agent_idle has fired (the agentIdle latch) so a settlement-deferred continuation
|
|
4391
|
+
// still in admission keeps its dock.
|
|
4392
|
+
buildMainLoopPromptOptions(userInput) {
|
|
4393
|
+
const echoOptions = this.optimisticUserEchoes.promptOptions(userInput.pendingEchoId);
|
|
4394
|
+
return {
|
|
4395
|
+
streamingBehavior: "steer",
|
|
4396
|
+
...(userInput.images ? { images: userInput.images } : {}),
|
|
4397
|
+
preflightResult: echoOptions.preflightResult,
|
|
4398
|
+
promptDisposition: (disposition) => {
|
|
4399
|
+
echoOptions.promptDisposition(disposition);
|
|
4400
|
+
// Clear the retained dock on a handled prompt only when it was the last
|
|
4401
|
+
// buffered input; a still-queued follow-up remounts it on agent_start, so
|
|
4402
|
+
// clearing here would bounce the editor/footer.
|
|
4403
|
+
if (disposition === "handled" && this.agentIdle && this.pendingUserInputs.length === 0) {
|
|
4404
|
+
this.clearStatusIndicator("working");
|
|
4405
|
+
this.ui.requestRender();
|
|
4406
|
+
}
|
|
4407
|
+
},
|
|
4408
|
+
};
|
|
4409
|
+
}
|
|
4378
4410
|
rebuildChatFromMessages() {
|
|
4379
4411
|
this.chatContainer.clear();
|
|
4380
4412
|
this.renderSessionEntries(this.sessionManager.buildContextEntries());
|