@adhdev/daemon-core 0.9.82-rc.192 → 0.9.82-rc.193
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/package.json
CHANGED
|
@@ -534,7 +534,7 @@ export class CliStateEngine {
|
|
|
534
534
|
const recentInteractiveActivity = this.hasRecentInteractiveActivity(snap, now);
|
|
535
535
|
LOG.debug(
|
|
536
536
|
'CLI',
|
|
537
|
-
`[${this.provider.type}] settled diagnostics prompt=${JSON.stringify(this.currentTurnScope?.prompt || '').slice(0, 140)} status=${String(status || '')} parsedStatus=${String(parsedStatus || '')} parsedMsgCount=${parsedMessages.length} lastParsedAssistant=${JSON.stringify((lastParsedAssistant?.content || '').slice(0, 120)).slice(0, 160)} responseBuffer=${JSON.stringify((snap.responseBuffer || '').slice(0, 160)).slice(0, 220)}`
|
|
537
|
+
`[${this.provider.type}] settled diagnostics prompt=${JSON.stringify(this.currentTurnScope?.prompt || '').slice(0, 140)} status=${String(status || '')} parsedStatus=${String(parsedStatus || '')} parsedMsgCount=${parsedMessages.length} lastParsedAssistant=${JSON.stringify((lastParsedAssistant?.content || '').slice(0, 120)).slice(0, 160)} responseBuffer=${JSON.stringify((snap.responseBuffer || '').slice(0, 160)).slice(0, 220)} recentActivity=${recentInteractiveActivity}`
|
|
538
538
|
);
|
|
539
539
|
|
|
540
540
|
// recent_activity_hold protects an in-flight user turn from a false
|
|
@@ -544,11 +544,21 @@ export class CliStateEngine {
|
|
|
544
544
|
// produced the startup status flip the user reported
|
|
545
545
|
// (generating → idle → generating → idle within the first few seconds
|
|
546
546
|
// of claude-cli launch).
|
|
547
|
+
//
|
|
548
|
+
// When isWaitingForResponse=true and a currentTurnScope is alive, a
|
|
549
|
+
// PTY quiet period (>statusActivityHold ms without output) does NOT
|
|
550
|
+
// mean the response is done — claude-cli regularly pauses 2s+ between
|
|
551
|
+
// chunks during parsing/generation. recentInteractiveActivity going
|
|
552
|
+
// false during such a pause was the root cause of false-idle
|
|
553
|
+
// regressions. We hold generating whenever an active response turn is
|
|
554
|
+
// in flight (unconditionally, not just when there was recent output).
|
|
555
|
+
// The real completion gate is applyIdle's idleFinishCandidate +
|
|
556
|
+
// idleFinish timeout, which requires stable quiet AND a parsed
|
|
557
|
+
// assistant message.
|
|
547
558
|
const shouldHoldGenerating = status === 'idle'
|
|
548
559
|
&& this.isWaitingForResponse
|
|
549
560
|
&& !!this.currentTurnScope
|
|
550
561
|
&& !modal
|
|
551
|
-
&& recentInteractiveActivity
|
|
552
562
|
&& !(parsedStatus === 'idle' && !!lastParsedAssistant);
|
|
553
563
|
|
|
554
564
|
if (shouldHoldGenerating) { this.applyHoldGenerating(ctx); return; }
|
|
@@ -602,6 +602,16 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
602
602
|
if (externalNativeFinal && isCliGeneratingLikeStatus(visibleStatus)) {
|
|
603
603
|
visibleStatus = 'idle';
|
|
604
604
|
}
|
|
605
|
+
// Adapter raw status can lag behind parsed/native evidence: if the spec driver
|
|
606
|
+
// has not yet emitted a state_changed(idle) event but the parsed transcript
|
|
607
|
+
// already shows a final assistant turn, treat the session as idle so that
|
|
608
|
+
// getState() agrees with what detectStatusTransition already recorded via
|
|
609
|
+
// lastStatus. Without this guard, getState() returns 'generating' even after
|
|
610
|
+
// the instance's lastStatus has flipped to 'idle', causing the dashboard to
|
|
611
|
+
// show a perpetual generating spinner.
|
|
612
|
+
if (isCliGeneratingLikeStatus(visibleStatus) && this.lastStatus === 'idle') {
|
|
613
|
+
visibleStatus = 'idle';
|
|
614
|
+
}
|
|
605
615
|
const runtime = this.adapter.getRuntimeMetadata();
|
|
606
616
|
this.maybeAppendRuntimeRecoveryMessage(runtime);
|
|
607
617
|
let parsedMessages = Array.isArray(parsedStatus?.messages)
|
|
@@ -1263,6 +1273,9 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
1263
1273
|
LOG.info('CLI', `[${this.type}] external transcript probe: msgCount=${probe.msgCount} lastRole=${probe.lastRole || 'none'} lastKind=${probe.lastKind || 'none'} contentLen=${probe.contentLen} sourceMtime=${probe.sourceMtimeMs ?? 'unknown'} mtimeAge=${probe.mtimeAgeMs ?? 'unknown'}ms`);
|
|
1264
1274
|
pending.loggedTranscriptProbe = true;
|
|
1265
1275
|
}
|
|
1276
|
+
if (this.type === 'antigravity-cli') {
|
|
1277
|
+
return null;
|
|
1278
|
+
}
|
|
1266
1279
|
return { reason: 'missing_final_assistant', terminal: true, allowTimeout: allowMissingAssistantTimeout };
|
|
1267
1280
|
}
|
|
1268
1281
|
// SpecCliAdapter never populates parsed.messages — chat history flows
|