@adhdev/daemon-core 0.9.82-rc.162 → 0.9.82-rc.164

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.mjs CHANGED
@@ -37593,21 +37593,22 @@ var DaemonCommandRouter = class {
37593
37593
  const sessionId = typeof args?.targetSessionId === "string" ? args.targetSessionId.trim() : typeof args?.sessionId === "string" ? args.sessionId.trim() : "";
37594
37594
  if (!sessionId) return { success: false, error: "targetSessionId required" };
37595
37595
  const target = this.deps.sessionRegistry.get(sessionId);
37596
- if (!target) return { success: false, error: "Session not found", sessionId };
37597
- const adapter = this.deps.cliManager.findAdapter(target.providerType, { instanceKey: sessionId })?.adapter;
37598
- const runtimeMeta = adapter && typeof adapter.getRuntimeMetadata === "function" ? adapter.getRuntimeMetadata() : void 0;
37599
37596
  const coord = getCoordinatorForSession(sessionId);
37600
- const providerMetaForSession = this.deps.providerLoader.resolve?.(target.providerType) || this.deps.providerLoader.getMeta(target.providerType);
37597
+ if (!target && !coord) return { success: false, error: "Session not found", sessionId };
37598
+ const adapter = target ? this.deps.cliManager.findAdapter(target.providerType, { instanceKey: sessionId })?.adapter : void 0;
37599
+ const runtimeMeta = adapter && typeof adapter.getRuntimeMetadata === "function" ? adapter.getRuntimeMetadata() : void 0;
37600
+ const providerType = target?.providerType || coord?.cliType || "";
37601
+ const providerMetaForSession = providerType ? this.deps.providerLoader.resolve?.(providerType) || this.deps.providerLoader.getMeta(providerType) : void 0;
37601
37602
  return {
37602
37603
  success: true,
37603
37604
  session: {
37604
37605
  sessionId,
37605
- providerType: target.providerType,
37606
+ providerType,
37606
37607
  providerName: providerMetaForSession?.name,
37607
- transport: target.transport,
37608
- workspace: target.workspace,
37609
- spawnedAtMs: target.spawnedAtMs,
37610
- providerSessionId: target.providerSessionId,
37608
+ transport: target?.transport,
37609
+ workspace: target?.workspace || coord?.workspace,
37610
+ spawnedAtMs: target?.spawnedAtMs || coord?.startedAt,
37611
+ providerSessionId: target?.providerSessionId,
37611
37612
  runtimeMetadata: runtimeMeta
37612
37613
  },
37613
37614
  coordinator: coord ? {