@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/dist/index.js CHANGED
@@ -28169,7 +28169,7 @@ var SpecCliAdapter = class {
28169
28169
  activeInteractivePrompt: this.activeInteractivePrompt
28170
28170
  };
28171
28171
  }
28172
- if (/busy|generating|working|running|thinking/i.test(lc + " " + state.label)) {
28172
+ if (lc === "busy" || lc === "generating") {
28173
28173
  return { status: "generating", messages: [], activeModal: null, activeInteractivePrompt: this.activeInteractivePrompt };
28174
28174
  }
28175
28175
  return { status: "idle", messages: [], activeModal: null, activeInteractivePrompt: this.activeInteractivePrompt };
@@ -28303,13 +28303,37 @@ var SpecCliAdapter = class {
28303
28303
  return Promise.resolve({ ok: true, effects });
28304
28304
  }
28305
28305
  getDebugSnapshot() {
28306
+ let screen = "";
28307
+ let sections;
28308
+ try {
28309
+ screen = this.driver.snapshot();
28310
+ const lines = screen.split("\n");
28311
+ sections = {};
28312
+ for (const sec of this.spec.layout?.sections ?? []) {
28313
+ const from = sec.from_top;
28314
+ const fromBottom = sec.from_bottom;
28315
+ let start = 0;
28316
+ let end = lines.length;
28317
+ if (typeof from === "number") start = Math.max(0, from);
28318
+ else if (typeof fromBottom === "number") start = Math.max(0, lines.length - fromBottom);
28319
+ const until = sec.until;
28320
+ if (until && typeof until === "object" && typeof until.section === "string") {
28321
+ const ref = (this.spec.layout?.sections ?? []).find((s) => s.id === until.section);
28322
+ if (ref && typeof ref.from_bottom === "number") end = Math.max(start, lines.length - ref.from_bottom);
28323
+ }
28324
+ sections[sec.id] = lines.slice(start, end).join("\n");
28325
+ }
28326
+ } catch {
28327
+ }
28306
28328
  return {
28307
28329
  cliType: this.cliType,
28308
28330
  spec_id: this.spec.id,
28309
28331
  current_state: this.latestState,
28310
28332
  current_modal: this.latestModal,
28311
28333
  activeInteractivePrompt: this.activeInteractivePrompt,
28312
- exited: this.exited
28334
+ exited: this.exited,
28335
+ screen,
28336
+ sections
28313
28337
  };
28314
28338
  }
28315
28339
  getRuntimeMetadata() {