@adhdev/daemon-core 0.9.82-rc.203 → 0.9.82-rc.204

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.203",
3
+ "version": "0.9.82-rc.204",
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",
@@ -324,21 +324,11 @@ export class SpecCliAdapter implements CliAdapter {
324
324
  let sections: Record<string, string> | undefined;
325
325
  try {
326
326
  screen = this.driver.snapshot();
327
- const lines = screen.split('\n');
328
- sections = {};
329
- for (const sec of this.spec.layout?.sections ?? []) {
330
- const from = (sec as any).from_top;
331
- const fromBottom = (sec as any).from_bottom;
332
- let start = 0;
333
- let end = lines.length;
334
- if (typeof from === 'number') start = Math.max(0, from);
335
- else if (typeof fromBottom === 'number') start = Math.max(0, lines.length - fromBottom);
336
- const until = (sec as any).until;
337
- if (until && typeof until === 'object' && typeof until.section === 'string') {
338
- const ref = (this.spec.layout?.sections ?? []).find((s: any) => s.id === until.section) as any;
339
- if (ref && typeof ref.from_bottom === 'number') end = Math.max(start, lines.length - ref.from_bottom);
340
- }
341
- sections[(sec as any).id] = lines.slice(start, end).join('\n');
327
+ const driverSections = this.driver.getSections?.();
328
+ if (driverSections) {
329
+ sections = Object.fromEntries(driverSections.map(s => [s.id, s.text]));
330
+ } else {
331
+ sections = this.readCurrentScreenSections(screen);
342
332
  }
343
333
  } catch { /* best-effort */ }
344
334
  // Read native transcript messages for the debug snapshot