@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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/session-host-core",
3
- "version": "0.8.89",
3
+ "version": "0.8.90",
4
4
  "description": "ADHDev local session host core \u2014 session registry, protocol, buffers",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.8.89",
3
+ "version": "0.8.90",
4
4
  "description": "ADHDev daemon core \u2014 CDP, IDE detection, providers, command execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -677,6 +677,7 @@ export class ProviderCliAdapter implements CliAdapter {
677
677
  private looksLikeClaudeGeneratingLine(line: string): boolean {
678
678
  const trimmed = String(line || '').trim();
679
679
  if (!trimmed) return false;
680
+ if (/^⏵⏵\s+accept edits on/i.test(trimmed)) return false;
680
681
  if (/esc to (cancel|interrupt|stop)/i.test(trimmed)) return true;
681
682
  if (/^[✻✶✳✢✽⠂⠐⠒⠓⠦⠴⠶⠷⠿]+\s+\S+.*\b(?:thinking|thought for \d+s?)\b/i.test(trimmed)) return true;
682
683
  if (/^[✻✶✳✢✽⠂⠐⠒⠓⠦⠴⠶⠷⠿]+\s+[A-Z][A-Za-z-]{3,}ing\b.*(?:…|\.{3})/u.test(trimmed)) return true;
@@ -1049,7 +1050,8 @@ export class ProviderCliAdapter implements CliAdapter {
1049
1050
  && this.isWaitingForResponse
1050
1051
  && !modal
1051
1052
  && recentInteractiveActivity
1052
- && !(visibleIdlePrompt && visibleAssistantCandidate);
1053
+ && !(visibleIdlePrompt && visibleAssistantCandidate)
1054
+ && !(parsedTranscript?.status === 'idle' && !!lastParsedAssistant);
1053
1055
 
1054
1056
  if (shouldHoldGenerating) {
1055
1057
  this.clearIdleFinishCandidate('hold_generating_recent_activity');
@@ -1461,14 +1463,19 @@ export class ProviderCliAdapter implements CliAdapter {
1461
1463
  }
1462
1464
  }
1463
1465
 
1466
+ private projectEffectiveStatus(startupModal: { message: string; buttons: string[] } | null = null): CliSessionStatus['status'] {
1467
+ if (this.parseErrorMessage) return 'error';
1468
+ if (startupModal) return 'waiting_approval';
1469
+ if (this.isWaitingForResponse && this.currentTurnScope && this.currentStatus === 'idle') return 'generating';
1470
+ return this.currentStatus;
1471
+ }
1472
+
1464
1473
  // ─── Public API (CliAdapter) ───────────────────
1465
1474
 
1466
1475
  getStatus(): CliSessionStatus {
1467
1476
  const screenText = this.terminalScreen.getText() || '';
1468
1477
  const startupModal = this.startupParseGate ? this.getStartupConfirmationModal(screenText) : null;
1469
- const effectiveStatus = this.parseErrorMessage
1470
- ? 'error'
1471
- : (startupModal ? 'waiting_approval' : this.currentStatus);
1478
+ const effectiveStatus = this.projectEffectiveStatus(startupModal);
1472
1479
  return {
1473
1480
  status: effectiveStatus,
1474
1481
  messages: [...this.committedMessages],
@@ -2201,7 +2208,7 @@ export class ProviderCliAdapter implements CliAdapter {
2201
2208
  }
2202
2209
  this.setStatus('generating', 'approval_resolved');
2203
2210
  this.onStatusChange?.();
2204
- 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 || ''));
2211
+ 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 || ''));
2205
2212
  if (startupTrustModal && buttonIndex in this.approvalKeys) {
2206
2213
  this.ptyProcess.write(`${this.approvalKeys[buttonIndex]}\r`);
2207
2214
  } else if (this.shouldResolveModalWithEnter(modal, buttonIndex)) {
@@ -2228,7 +2235,7 @@ export class ProviderCliAdapter implements CliAdapter {
2228
2235
  getDebugState(): Record<string, any> {
2229
2236
  const screenText = sanitizeTerminalText(this.terminalScreen.getText());
2230
2237
  const startupModal = this.startupParseGate ? this.getStartupConfirmationModal(screenText) : null;
2231
- const effectiveStatus = startupModal ? 'waiting_approval' : this.currentStatus;
2238
+ const effectiveStatus = this.projectEffectiveStatus(startupModal);
2232
2239
  const effectiveReady = this.ready || !!startupModal;
2233
2240
  return {
2234
2241
  type: this.cliType,
@@ -139,10 +139,10 @@ export function buildCliParseInput(options: {
139
139
  runtimeSettings,
140
140
  } = options;
141
141
  const buffer = scope
142
- ? (sliceFromOffset(accumulatedBuffer, scope.bufferStart) || accumulatedBuffer)
142
+ ? sliceFromOffset(accumulatedBuffer, scope.bufferStart)
143
143
  : accumulatedBuffer;
144
144
  const rawBuffer = scope
145
- ? (sliceFromOffset(accumulatedRawBuffer, scope.rawBufferStart) || accumulatedRawBuffer)
145
+ ? sliceFromOffset(accumulatedRawBuffer, scope.rawBufferStart)
146
146
  : accumulatedRawBuffer;
147
147
  const screenText = terminalScreenText;
148
148
  const recentBuffer = buffer.slice(-1000) || recentOutputBuffer;
@@ -189,10 +189,10 @@ export function buildCliTraceParseSnapshot(options: {
189
189
  }): Record<string, any> {
190
190
  const { accumulatedBuffer, accumulatedRawBuffer, responseBuffer, partialResponse, scope } = options;
191
191
  const scopedBuffer = scope
192
- ? (sliceFromOffset(accumulatedBuffer, scope.bufferStart) || accumulatedBuffer)
192
+ ? sliceFromOffset(accumulatedBuffer, scope.bufferStart)
193
193
  : accumulatedBuffer;
194
194
  const scopedRawBuffer = scope
195
- ? (sliceFromOffset(accumulatedRawBuffer, scope.rawBufferStart) || accumulatedRawBuffer)
195
+ ? sliceFromOffset(accumulatedRawBuffer, scope.rawBufferStart)
196
196
  : accumulatedRawBuffer;
197
197
  return {
198
198
  currentTurnScope: scope || null,