@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.js CHANGED
@@ -37885,21 +37885,22 @@ var DaemonCommandRouter = class {
37885
37885
  const sessionId = typeof args?.targetSessionId === "string" ? args.targetSessionId.trim() : typeof args?.sessionId === "string" ? args.sessionId.trim() : "";
37886
37886
  if (!sessionId) return { success: false, error: "targetSessionId required" };
37887
37887
  const target = this.deps.sessionRegistry.get(sessionId);
37888
- if (!target) return { success: false, error: "Session not found", sessionId };
37889
- const adapter = this.deps.cliManager.findAdapter(target.providerType, { instanceKey: sessionId })?.adapter;
37890
- const runtimeMeta = adapter && typeof adapter.getRuntimeMetadata === "function" ? adapter.getRuntimeMetadata() : void 0;
37891
37888
  const coord = getCoordinatorForSession(sessionId);
37892
- const providerMetaForSession = this.deps.providerLoader.resolve?.(target.providerType) || this.deps.providerLoader.getMeta(target.providerType);
37889
+ if (!target && !coord) return { success: false, error: "Session not found", sessionId };
37890
+ const adapter = target ? this.deps.cliManager.findAdapter(target.providerType, { instanceKey: sessionId })?.adapter : void 0;
37891
+ const runtimeMeta = adapter && typeof adapter.getRuntimeMetadata === "function" ? adapter.getRuntimeMetadata() : void 0;
37892
+ const providerType = target?.providerType || coord?.cliType || "";
37893
+ const providerMetaForSession = providerType ? this.deps.providerLoader.resolve?.(providerType) || this.deps.providerLoader.getMeta(providerType) : void 0;
37893
37894
  return {
37894
37895
  success: true,
37895
37896
  session: {
37896
37897
  sessionId,
37897
- providerType: target.providerType,
37898
+ providerType,
37898
37899
  providerName: providerMetaForSession?.name,
37899
- transport: target.transport,
37900
- workspace: target.workspace,
37901
- spawnedAtMs: target.spawnedAtMs,
37902
- providerSessionId: target.providerSessionId,
37900
+ transport: target?.transport,
37901
+ workspace: target?.workspace || coord?.workspace,
37902
+ spawnedAtMs: target?.spawnedAtMs || coord?.startedAt,
37903
+ providerSessionId: target?.providerSessionId,
37903
37904
  runtimeMetadata: runtimeMeta
37904
37905
  },
37905
37906
  coordinator: coord ? {