@adhdev/daemon-core 0.9.82-rc.177 → 0.9.82-rc.178

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.9.82-rc.177",
3
+ "version": "0.9.82-rc.178",
4
4
  "description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -151,7 +151,7 @@ export class SpecCliAdapter implements CliAdapter {
151
151
  activeInteractivePrompt: this.activeInteractivePrompt,
152
152
  };
153
153
  }
154
- if (/busy|generating|working|running|thinking/i.test(lc + ' ' + state.label)) {
154
+ if (lc === 'busy' || lc === 'generating') {
155
155
  return { status: 'generating', messages: [], activeModal: null, activeInteractivePrompt: this.activeInteractivePrompt };
156
156
  }
157
157
  return { status: 'idle', messages: [], activeModal: null, activeInteractivePrompt: this.activeInteractivePrompt };
@@ -301,6 +301,27 @@ export class SpecCliAdapter implements CliAdapter {
301
301
  return Promise.resolve({ ok: true, effects });
302
302
  }
303
303
  getDebugSnapshot(): unknown {
304
+ let screen = '';
305
+ let sections: Record<string, string> | undefined;
306
+ try {
307
+ screen = this.driver.snapshot();
308
+ const lines = screen.split('\n');
309
+ sections = {};
310
+ for (const sec of this.spec.layout?.sections ?? []) {
311
+ const from = (sec as any).from_top;
312
+ const fromBottom = (sec as any).from_bottom;
313
+ let start = 0;
314
+ let end = lines.length;
315
+ if (typeof from === 'number') start = Math.max(0, from);
316
+ else if (typeof fromBottom === 'number') start = Math.max(0, lines.length - fromBottom);
317
+ const until = (sec as any).until;
318
+ if (until && typeof until === 'object' && typeof until.section === 'string') {
319
+ const ref = (this.spec.layout?.sections ?? []).find((s: any) => s.id === until.section) as any;
320
+ if (ref && typeof ref.from_bottom === 'number') end = Math.max(start, lines.length - ref.from_bottom);
321
+ }
322
+ sections[(sec as any).id] = lines.slice(start, end).join('\n');
323
+ }
324
+ } catch { /* best-effort */ }
304
325
  return {
305
326
  cliType: this.cliType,
306
327
  spec_id: this.spec.id,
@@ -308,6 +329,8 @@ export class SpecCliAdapter implements CliAdapter {
308
329
  current_modal: this.latestModal,
309
330
  activeInteractivePrompt: this.activeInteractivePrompt,
310
331
  exited: this.exited,
332
+ screen,
333
+ sections,
311
334
  };
312
335
  }
313
336
  getRuntimeMetadata(): unknown {