@adhdev/daemon-core 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
@@ -27583,6 +27583,18 @@ var SpecDriver = class {
27583
27583
  getSpecPath() {
27584
27584
  return this.opts.specPath;
27585
27585
  }
27586
+ getScreen() {
27587
+ return this.adapter.snapshot();
27588
+ }
27589
+ getSections() {
27590
+ try {
27591
+ const screen = this.adapter.snapshot();
27592
+ const ev = evaluate(this.spec, screen, void 0);
27593
+ return ev.sections.map((s) => ({ id: s.id, text: s.text }));
27594
+ } catch {
27595
+ return null;
27596
+ }
27597
+ }
27586
27598
  // ────────────────────────────────────────────────────────────────────
27587
27599
  // Loading & adapter wiring
27588
27600
  // ────────────────────────────────────────────────────────────────────
@@ -28357,6 +28369,38 @@ var SpecCliAdapter = class {
28357
28369
  this.interactivePromptTransport = "tui";
28358
28370
  this.statusCallback?.();
28359
28371
  }
28372
+ getDebugState() {
28373
+ const screen = this.driver.getScreen?.() ?? "";
28374
+ const history = this.driver.getStateHistory();
28375
+ const status = this.getStatus();
28376
+ return {
28377
+ type: this.cliType,
28378
+ name: this.cliName,
28379
+ status: status.status,
28380
+ rawStatus: status.status,
28381
+ projectedStatus: status.status,
28382
+ ready: this.spawned,
28383
+ screenText: screen,
28384
+ sections: this.driver.getSections?.() ?? null,
28385
+ stateHistory: history,
28386
+ specPath: this.driver.opts?.specPath ?? null
28387
+ };
28388
+ }
28389
+ getTraceState(limit = 120) {
28390
+ const history = this.driver.getStateHistory();
28391
+ return {
28392
+ status: this.getStatus().status,
28393
+ stateHistory: history.slice(-limit),
28394
+ screenText: this.driver.getScreen?.() ?? ""
28395
+ };
28396
+ }
28397
+ getProviderResolutionMeta() {
28398
+ return {
28399
+ type: this.cliType,
28400
+ providerDir: null,
28401
+ resolvedVersion: null
28402
+ };
28403
+ }
28360
28404
  };
28361
28405
 
28362
28406
  // src/providers/spec/route.ts
@@ -41155,8 +41199,8 @@ var DaemonCommandRouter = class {
41155
41199
  if (!sessionId) return { success: false, error: "targetSessionId required" };
41156
41200
  const target = this.deps.sessionRegistry.get(sessionId);
41157
41201
  if (!target) return { success: false, error: "Session not found", sessionId };
41158
- const adapter = this.deps.cliManager.findAdapter(target.providerType, { instanceKey: sessionId })?.adapter;
41159
- const snapshot = adapter && typeof adapter.getDebugSnapshot === "function" ? adapter.getDebugSnapshot() : null;
41202
+ const adapterObj = this.deps.cliManager.findAdapter(target.providerType, { instanceKey: sessionId })?.adapter;
41203
+ const snapshot = adapterObj ? typeof adapterObj.getDebugSnapshot === "function" ? adapterObj.getDebugSnapshot() : typeof adapterObj.getDebugState === "function" ? adapterObj.getDebugState() : null : null;
41160
41204
  return {
41161
41205
  success: true,
41162
41206
  sessionId,