@adhdev/daemon-standalone 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
@@ -62830,7 +62830,7 @@ ${formatManifestValidationIssues2(validation.issues)}`,
62830
62830
  activeInteractivePrompt: this.activeInteractivePrompt
62831
62831
  };
62832
62832
  }
62833
- if (/busy|generating|working|running|thinking/i.test(lc + " " + state.label)) {
62833
+ if (lc === "busy" || lc === "generating") {
62834
62834
  return { status: "generating", messages: [], activeModal: null, activeInteractivePrompt: this.activeInteractivePrompt };
62835
62835
  }
62836
62836
  return { status: "idle", messages: [], activeModal: null, activeInteractivePrompt: this.activeInteractivePrompt };
@@ -62964,13 +62964,37 @@ ${formatManifestValidationIssues2(validation.issues)}`,
62964
62964
  return Promise.resolve({ ok: true, effects });
62965
62965
  }
62966
62966
  getDebugSnapshot() {
62967
+ let screen = "";
62968
+ let sections;
62969
+ try {
62970
+ screen = this.driver.snapshot();
62971
+ const lines = screen.split("\n");
62972
+ sections = {};
62973
+ for (const sec of this.spec.layout?.sections ?? []) {
62974
+ const from = sec.from_top;
62975
+ const fromBottom = sec.from_bottom;
62976
+ let start = 0;
62977
+ let end = lines.length;
62978
+ if (typeof from === "number") start = Math.max(0, from);
62979
+ else if (typeof fromBottom === "number") start = Math.max(0, lines.length - fromBottom);
62980
+ const until = sec.until;
62981
+ if (until && typeof until === "object" && typeof until.section === "string") {
62982
+ const ref = (this.spec.layout?.sections ?? []).find((s) => s.id === until.section);
62983
+ if (ref && typeof ref.from_bottom === "number") end = Math.max(start, lines.length - ref.from_bottom);
62984
+ }
62985
+ sections[sec.id] = lines.slice(start, end).join("\n");
62986
+ }
62987
+ } catch {
62988
+ }
62967
62989
  return {
62968
62990
  cliType: this.cliType,
62969
62991
  spec_id: this.spec.id,
62970
62992
  current_state: this.latestState,
62971
62993
  current_modal: this.latestModal,
62972
62994
  activeInteractivePrompt: this.activeInteractivePrompt,
62973
- exited: this.exited
62995
+ exited: this.exited,
62996
+ screen,
62997
+ sections
62974
62998
  };
62975
62999
  }
62976
63000
  getRuntimeMetadata() {