@adhdev/daemon-core 0.9.49 → 0.9.50

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
@@ -11156,9 +11156,12 @@ function buildDebugBundleText(bundle) {
11156
11156
  ].join("\n");
11157
11157
  }
11158
11158
  async function handleGetChatDebugBundle(h, args) {
11159
+ const targetSessionId = typeof args?.targetSessionId === "string" ? args.targetSessionId.trim() : "";
11160
+ if (!targetSessionId && !h.currentSession) {
11161
+ return { success: false, error: "No targetSessionId specified \u2014 cannot route command" };
11162
+ }
11159
11163
  const provider = h.getProvider(args?.agentType);
11160
11164
  const transport = getTargetTransport(h, provider);
11161
- const targetSessionId = typeof args?.targetSessionId === "string" ? args.targetSessionId.trim() : "";
11162
11165
  const providerType = provider?.type || getCurrentProviderType(h, args?.agentType || "");
11163
11166
  const adapter = isCliLikeTransport(transport) ? getTargetedCliAdapter(h, args, provider?.type) : null;
11164
11167
  const targetInstance = getTargetInstance(h, args);
@@ -13418,6 +13421,7 @@ var DaemonCommandHandler = class {
13418
13421
  this.logCommandStart(cmd, args);
13419
13422
  const sessionScopedCommands = /* @__PURE__ */ new Set([
13420
13423
  "read_chat",
13424
+ "get_chat_debug_bundle",
13421
13425
  "send_chat",
13422
13426
  "list_chats",
13423
13427
  "new_chat",
@@ -19990,6 +19994,8 @@ var DaemonCommandRouter = class {
19990
19994
  const wantsAll = args?.all === true;
19991
19995
  const offset = wantsAll ? 0 : Math.max(0, Number(args?.offset) || 0);
19992
19996
  const limit = wantsAll ? Number.MAX_SAFE_INTEGER : Math.max(1, Math.min(100, Number(args?.limit) || 30));
19997
+ const requestedWorkspace = typeof args?.workspace === "string" ? args.workspace.trim() : "";
19998
+ const requestedProviderSessionId = typeof args?.providerSessionId === "string" ? args.providerSessionId.trim() : typeof args?.activeProviderSessionId === "string" ? args.activeProviderSessionId.trim() : "";
19993
19999
  const providerMeta = this.deps.providerLoader.resolve?.(providerType) || this.deps.providerLoader.getMeta(providerType);
19994
20000
  const { sessions: historySessions, hasMore, source } = listProviderHistorySessions(providerType, {
19995
20001
  canonicalHistory: providerMeta?.canonicalHistory,
@@ -20009,6 +20015,7 @@ var DaemonCommandRouter = class {
20009
20015
  sessions: historySessions.map((session) => {
20010
20016
  const saved = savedSessionById.get(session.historySessionId);
20011
20017
  const recent = recentSessionById.get(session.historySessionId);
20018
+ const workspace = saved?.workspace || recent?.workspace || session.workspace || (requestedWorkspace && requestedProviderSessionId === session.historySessionId ? requestedWorkspace : void 0);
20012
20019
  return {
20013
20020
  id: session.historySessionId,
20014
20021
  providerSessionId: session.historySessionId,
@@ -20016,13 +20023,13 @@ var DaemonCommandRouter = class {
20016
20023
  providerName: saved?.providerName || recent?.providerName || providerType,
20017
20024
  kind: saved?.kind || recent?.kind || kind,
20018
20025
  title: saved?.title || recent?.title || session.sessionTitle || session.preview || providerType,
20019
- workspace: saved?.workspace || recent?.workspace || session.workspace,
20026
+ workspace,
20020
20027
  summaryMetadata: saved?.summaryMetadata || recent?.summaryMetadata,
20021
20028
  preview: session.preview,
20022
20029
  messageCount: session.messageCount,
20023
20030
  firstMessageAt: session.firstMessageAt,
20024
20031
  lastMessageAt: session.lastMessageAt,
20025
- canResume: !!(saved?.workspace || recent?.workspace || session.workspace) && canResumeById,
20032
+ canResume: !!workspace && canResumeById,
20026
20033
  historySource: session.source,
20027
20034
  sourcePath: session.sourcePath,
20028
20035
  sourceMtimeMs: session.sourceMtimeMs