@adhdev/daemon-standalone 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
@@ -72503,21 +72503,22 @@ ${e?.stderr || ""}`
72503
72503
  const sessionId = typeof args?.targetSessionId === "string" ? args.targetSessionId.trim() : typeof args?.sessionId === "string" ? args.sessionId.trim() : "";
72504
72504
  if (!sessionId) return { success: false, error: "targetSessionId required" };
72505
72505
  const target = this.deps.sessionRegistry.get(sessionId);
72506
- if (!target) return { success: false, error: "Session not found", sessionId };
72507
- const adapter = this.deps.cliManager.findAdapter(target.providerType, { instanceKey: sessionId })?.adapter;
72508
- const runtimeMeta = adapter && typeof adapter.getRuntimeMetadata === "function" ? adapter.getRuntimeMetadata() : void 0;
72509
72506
  const coord = getCoordinatorForSession(sessionId);
72510
- const providerMetaForSession = this.deps.providerLoader.resolve?.(target.providerType) || this.deps.providerLoader.getMeta(target.providerType);
72507
+ if (!target && !coord) return { success: false, error: "Session not found", sessionId };
72508
+ const adapter = target ? this.deps.cliManager.findAdapter(target.providerType, { instanceKey: sessionId })?.adapter : void 0;
72509
+ const runtimeMeta = adapter && typeof adapter.getRuntimeMetadata === "function" ? adapter.getRuntimeMetadata() : void 0;
72510
+ const providerType = target?.providerType || coord?.cliType || "";
72511
+ const providerMetaForSession = providerType ? this.deps.providerLoader.resolve?.(providerType) || this.deps.providerLoader.getMeta(providerType) : void 0;
72511
72512
  return {
72512
72513
  success: true,
72513
72514
  session: {
72514
72515
  sessionId,
72515
- providerType: target.providerType,
72516
+ providerType,
72516
72517
  providerName: providerMetaForSession?.name,
72517
- transport: target.transport,
72518
- workspace: target.workspace,
72519
- spawnedAtMs: target.spawnedAtMs,
72520
- providerSessionId: target.providerSessionId,
72518
+ transport: target?.transport,
72519
+ workspace: target?.workspace || coord?.workspace,
72520
+ spawnedAtMs: target?.spawnedAtMs || coord?.startedAt,
72521
+ providerSessionId: target?.providerSessionId,
72521
72522
  runtimeMetadata: runtimeMeta
72522
72523
  },
72523
72524
  coordinator: coord ? {