@adhdev/daemon-core 0.9.38 → 0.9.39
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/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -3
- 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 +11 -0
- package/src/providers/cli-provider-instance.ts +6 -3
package/package.json
CHANGED
|
@@ -1053,6 +1053,17 @@ export class ProviderCliAdapter implements CliAdapter {
|
|
|
1053
1053
|
this.resolveStartupState('settled');
|
|
1054
1054
|
if (this.startupParseGate) return;
|
|
1055
1055
|
|
|
1056
|
+
if (!this.isWaitingForResponse && !this.currentTurnScope && !this.activeModal && !this.parseErrorMessage) {
|
|
1057
|
+
const tail = this.settledBuffer || this.recentOutputBuffer;
|
|
1058
|
+
const modal = this.runParseApproval(tail);
|
|
1059
|
+
const lightweightStatus = this.cliScripts?.detectStatus
|
|
1060
|
+
? this.runDetectStatus(tail)
|
|
1061
|
+
: null;
|
|
1062
|
+
if (!modal && lightweightStatus === 'idle' && this.currentStatus === 'idle') {
|
|
1063
|
+
return;
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1056
1067
|
const session = this.runParseSession();
|
|
1057
1068
|
if (!session) return;
|
|
1058
1069
|
|
|
@@ -599,8 +599,11 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
599
599
|
|
|
600
600
|
private detectStatusTransition(): void {
|
|
601
601
|
const now = Date.now();
|
|
602
|
-
|
|
603
|
-
|
|
602
|
+
// Status-change handling is a hot path: PTY output can fire it many times
|
|
603
|
+
// during long-running CLI sessions. Keep this path on adapter-owned light
|
|
604
|
+
// state only; rich provider parsing is reserved for getState/read_chat.
|
|
605
|
+
const adapterStatus = this.adapter.getStatus({ allowParse: false });
|
|
606
|
+
const parsedStatus = null;
|
|
604
607
|
const rawStatus = adapterStatus.status;
|
|
605
608
|
const autoApproveActive = rawStatus === 'waiting_approval' && this.shouldAutoApprove();
|
|
606
609
|
// Guard re-entry: onStatusChange can fire multiple times while the modal
|
|
@@ -696,7 +699,7 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
696
699
|
this.completedDebouncePending = { chatTitle, duration, timestamp: now };
|
|
697
700
|
this.completedDebounceTimer = setTimeout(() => {
|
|
698
701
|
if (this.completedDebouncePending) {
|
|
699
|
-
const latestStatus = this.adapter.getStatus();
|
|
702
|
+
const latestStatus = this.adapter.getStatus({ allowParse: false });
|
|
700
703
|
const latestAutoApproveActive = latestStatus.status === 'waiting_approval' && this.shouldAutoApprove();
|
|
701
704
|
const latestVisibleStatus = latestAutoApproveActive ? 'generating' : latestStatus.status;
|
|
702
705
|
if (latestVisibleStatus !== 'idle') {
|