@adhdev/daemon-standalone 0.9.82-rc.200 → 0.9.82-rc.201

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
@@ -62241,6 +62241,18 @@ ${formatManifestValidationIssues2(validation.issues)}`,
62241
62241
  getSpecPath() {
62242
62242
  return this.opts.specPath;
62243
62243
  }
62244
+ getScreen() {
62245
+ return this.adapter.snapshot();
62246
+ }
62247
+ getSections() {
62248
+ try {
62249
+ const screen = this.adapter.snapshot();
62250
+ const ev = evaluate(this.spec, screen, void 0);
62251
+ return ev.sections.map((s) => ({ id: s.id, text: s.text }));
62252
+ } catch {
62253
+ return null;
62254
+ }
62255
+ }
62244
62256
  // ────────────────────────────────────────────────────────────────────
62245
62257
  // Loading & adapter wiring
62246
62258
  // ────────────────────────────────────────────────────────────────────
@@ -63013,6 +63025,38 @@ ${formatManifestValidationIssues2(validation.issues)}`,
63013
63025
  this.interactivePromptTransport = "tui";
63014
63026
  this.statusCallback?.();
63015
63027
  }
63028
+ getDebugState() {
63029
+ const screen = this.driver.getScreen?.() ?? "";
63030
+ const history = this.driver.getStateHistory();
63031
+ const status = this.getStatus();
63032
+ return {
63033
+ type: this.cliType,
63034
+ name: this.cliName,
63035
+ status: status.status,
63036
+ rawStatus: status.status,
63037
+ projectedStatus: status.status,
63038
+ ready: this.spawned,
63039
+ screenText: screen,
63040
+ sections: this.driver.getSections?.() ?? null,
63041
+ stateHistory: history,
63042
+ specPath: this.driver.opts?.specPath ?? null
63043
+ };
63044
+ }
63045
+ getTraceState(limit = 120) {
63046
+ const history = this.driver.getStateHistory();
63047
+ return {
63048
+ status: this.getStatus().status,
63049
+ stateHistory: history.slice(-limit),
63050
+ screenText: this.driver.getScreen?.() ?? ""
63051
+ };
63052
+ }
63053
+ getProviderResolutionMeta() {
63054
+ return {
63055
+ type: this.cliType,
63056
+ providerDir: null,
63057
+ resolvedVersion: null
63058
+ };
63059
+ }
63016
63060
  };
63017
63061
  init_logger();
63018
63062
  function createCliAdapter(provider, workingDir, cliArgs, extraEnv, transportFactory) {
@@ -75753,8 +75797,8 @@ ${e?.stderr || ""}`
75753
75797
  if (!sessionId) return { success: false, error: "targetSessionId required" };
75754
75798
  const target = this.deps.sessionRegistry.get(sessionId);
75755
75799
  if (!target) return { success: false, error: "Session not found", sessionId };
75756
- const adapter = this.deps.cliManager.findAdapter(target.providerType, { instanceKey: sessionId })?.adapter;
75757
- const snapshot = adapter && typeof adapter.getDebugSnapshot === "function" ? adapter.getDebugSnapshot() : null;
75800
+ const adapterObj = this.deps.cliManager.findAdapter(target.providerType, { instanceKey: sessionId })?.adapter;
75801
+ const snapshot = adapterObj ? typeof adapterObj.getDebugSnapshot === "function" ? adapterObj.getDebugSnapshot() : typeof adapterObj.getDebugState === "function" ? adapterObj.getDebugState() : null : null;
75758
75802
  return {
75759
75803
  success: true,
75760
75804
  sessionId,