@adhdev/daemon-core 0.8.89 → 0.8.90
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/cli-adapters/provider-cli-adapter.d.ts +1 -0
- package/dist/index.js +15 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -8
- package/dist/index.mjs.map +1 -1
- package/node_modules/@adhdev/session-host-core/package.json +1 -1
- package/package.json +1 -1
- package/src/cli-adapters/provider-cli-adapter.ts +13 -6
- package/src/cli-adapters/provider-cli-parse.ts +4 -4
|
@@ -146,6 +146,7 @@ export declare class ProviderCliAdapter implements CliAdapter {
|
|
|
146
146
|
private commitCurrentTranscript;
|
|
147
147
|
private runDetectStatus;
|
|
148
148
|
private runParseApproval;
|
|
149
|
+
private projectEffectiveStatus;
|
|
149
150
|
getStatus(): CliSessionStatus;
|
|
150
151
|
seedCommittedMessages(messages: SeedCliChatMessage[]): void;
|
|
151
152
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1664,8 +1664,8 @@ function buildCliParseInput(options) {
|
|
|
1664
1664
|
scope,
|
|
1665
1665
|
runtimeSettings
|
|
1666
1666
|
} = options;
|
|
1667
|
-
const buffer = scope ? sliceFromOffset(accumulatedBuffer, scope.bufferStart)
|
|
1668
|
-
const rawBuffer = scope ? sliceFromOffset(accumulatedRawBuffer, scope.rawBufferStart)
|
|
1667
|
+
const buffer = scope ? sliceFromOffset(accumulatedBuffer, scope.bufferStart) : accumulatedBuffer;
|
|
1668
|
+
const rawBuffer = scope ? sliceFromOffset(accumulatedRawBuffer, scope.rawBufferStart) : accumulatedRawBuffer;
|
|
1669
1669
|
const screenText = terminalScreenText;
|
|
1670
1670
|
const recentBuffer = buffer.slice(-1e3) || recentOutputBuffer;
|
|
1671
1671
|
return {
|
|
@@ -1697,8 +1697,8 @@ function summarizeCliTraceMessages(messages, limit = 3) {
|
|
|
1697
1697
|
}
|
|
1698
1698
|
function buildCliTraceParseSnapshot(options) {
|
|
1699
1699
|
const { accumulatedBuffer, accumulatedRawBuffer, responseBuffer, partialResponse, scope } = options;
|
|
1700
|
-
const scopedBuffer = scope ? sliceFromOffset(accumulatedBuffer, scope.bufferStart)
|
|
1701
|
-
const scopedRawBuffer = scope ? sliceFromOffset(accumulatedRawBuffer, scope.rawBufferStart)
|
|
1700
|
+
const scopedBuffer = scope ? sliceFromOffset(accumulatedBuffer, scope.bufferStart) : accumulatedBuffer;
|
|
1701
|
+
const scopedRawBuffer = scope ? sliceFromOffset(accumulatedRawBuffer, scope.rawBufferStart) : accumulatedRawBuffer;
|
|
1702
1702
|
return {
|
|
1703
1703
|
currentTurnScope: scope || null,
|
|
1704
1704
|
responseBuffer: summarizeCliTraceText(responseBuffer, 1200),
|
|
@@ -2362,6 +2362,7 @@ var init_provider_cli_adapter = __esm({
|
|
|
2362
2362
|
looksLikeClaudeGeneratingLine(line) {
|
|
2363
2363
|
const trimmed = String(line || "").trim();
|
|
2364
2364
|
if (!trimmed) return false;
|
|
2365
|
+
if (/^⏵⏵\s+accept edits on/i.test(trimmed)) return false;
|
|
2365
2366
|
if (/esc to (cancel|interrupt|stop)/i.test(trimmed)) return true;
|
|
2366
2367
|
if (/^[✻✶✳✢✽⠂⠐⠒⠓⠦⠴⠶⠷⠿]+\s+\S+.*\b(?:thinking|thought for \d+s?)\b/i.test(trimmed)) return true;
|
|
2367
2368
|
if (/^[✻✶✳✢✽⠂⠐⠒⠓⠦⠴⠶⠷⠿]+\s+[A-Z][A-Za-z-]{3,}ing\b.*(?:…|\.{3})/u.test(trimmed)) return true;
|
|
@@ -2674,7 +2675,7 @@ var init_provider_cli_adapter = __esm({
|
|
|
2674
2675
|
`[${this.cliType}] settled diagnostics prompt=${JSON.stringify(this.currentTurnScope.prompt).slice(0, 140)} scriptStatus=${String(scriptStatus || "")} parsedStatus=${String(parsedTranscript?.status || "")} parsedMsgCount=${parsedMessages.length} lastParsedAssistant=${JSON.stringify(summarizeCliTraceText(lastParsedAssistant?.content || "", 120)).slice(0, 160)} visibleIdlePrompt=${String(visibleIdlePrompt)} visibleAssistantCandidate=${String(visibleAssistantCandidate)} responseBuffer=${JSON.stringify(summarizeCliTraceText(this.responseBuffer, 160)).slice(0, 220)} screen=${JSON.stringify(summarizeCliTraceText(screenText, 160)).slice(0, 220)}`
|
|
2675
2676
|
);
|
|
2676
2677
|
}
|
|
2677
|
-
const shouldHoldGenerating = scriptStatus === "idle" && this.isWaitingForResponse && !modal && recentInteractiveActivity && !(visibleIdlePrompt && visibleAssistantCandidate);
|
|
2678
|
+
const shouldHoldGenerating = scriptStatus === "idle" && this.isWaitingForResponse && !modal && recentInteractiveActivity && !(visibleIdlePrompt && visibleAssistantCandidate) && !(parsedTranscript?.status === "idle" && !!lastParsedAssistant);
|
|
2678
2679
|
if (shouldHoldGenerating) {
|
|
2679
2680
|
this.clearIdleFinishCandidate("hold_generating_recent_activity");
|
|
2680
2681
|
this.setStatus("generating", "recent_activity_hold");
|
|
@@ -3076,11 +3077,17 @@ var init_provider_cli_adapter = __esm({
|
|
|
3076
3077
|
return null;
|
|
3077
3078
|
}
|
|
3078
3079
|
}
|
|
3080
|
+
projectEffectiveStatus(startupModal = null) {
|
|
3081
|
+
if (this.parseErrorMessage) return "error";
|
|
3082
|
+
if (startupModal) return "waiting_approval";
|
|
3083
|
+
if (this.isWaitingForResponse && this.currentTurnScope && this.currentStatus === "idle") return "generating";
|
|
3084
|
+
return this.currentStatus;
|
|
3085
|
+
}
|
|
3079
3086
|
// ─── Public API (CliAdapter) ───────────────────
|
|
3080
3087
|
getStatus() {
|
|
3081
3088
|
const screenText = this.terminalScreen.getText() || "";
|
|
3082
3089
|
const startupModal = this.startupParseGate ? this.getStartupConfirmationModal(screenText) : null;
|
|
3083
|
-
const effectiveStatus = this.
|
|
3090
|
+
const effectiveStatus = this.projectEffectiveStatus(startupModal);
|
|
3084
3091
|
return {
|
|
3085
3092
|
status: effectiveStatus,
|
|
3086
3093
|
messages: [...this.committedMessages],
|
|
@@ -3787,7 +3794,7 @@ ${data.message || ""}`.trim();
|
|
|
3787
3794
|
}
|
|
3788
3795
|
this.setStatus("generating", "approval_resolved");
|
|
3789
3796
|
this.onStatusChange?.();
|
|
3790
|
-
const startupTrustModal = /Quick safety check|project trust|trust (?:this project|the contents of this directory|the files in this folder)/i.test(String(modal?.message || ""));
|
|
3797
|
+
const startupTrustModal = /Quick safety check|project trust|Confirm Claude Code project trust|trust (?:this project|the contents of this directory|the files in this folder)/i.test(String(modal?.message || ""));
|
|
3791
3798
|
if (startupTrustModal && buttonIndex in this.approvalKeys) {
|
|
3792
3799
|
this.ptyProcess.write(`${this.approvalKeys[buttonIndex]}\r`);
|
|
3793
3800
|
} else if (this.shouldResolveModalWithEnter(modal, buttonIndex)) {
|
|
@@ -3813,7 +3820,7 @@ ${data.message || ""}`.trim();
|
|
|
3813
3820
|
getDebugState() {
|
|
3814
3821
|
const screenText = sanitizeTerminalText(this.terminalScreen.getText());
|
|
3815
3822
|
const startupModal = this.startupParseGate ? this.getStartupConfirmationModal(screenText) : null;
|
|
3816
|
-
const effectiveStatus =
|
|
3823
|
+
const effectiveStatus = this.projectEffectiveStatus(startupModal);
|
|
3817
3824
|
const effectiveReady = this.ready || !!startupModal;
|
|
3818
3825
|
return {
|
|
3819
3826
|
type: this.cliType,
|