@adhdev/daemon-core 0.9.82-rc.271 → 0.9.82-rc.273

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
@@ -270,10 +270,10 @@ function readInjected(value) {
270
270
  }
271
271
  function getDaemonBuildInfo() {
272
272
  if (cached) return cached;
273
- const commit = readInjected(true ? "7795ee8ff6e1686e68fc7900ee0c6afd57bbd614" : void 0) ?? "unknown";
274
- const commitShort = readInjected(true ? "7795ee8f" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
275
- const version = readInjected(true ? "0.9.82-rc.271" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
276
- const builtAt = readInjected(true ? "2026-06-15T01:59:29.547Z" : void 0);
273
+ const commit = readInjected(true ? "e4a64afbd050fa5167c383b1fc6f9df5f8e48ba2" : void 0) ?? "unknown";
274
+ const commitShort = readInjected(true ? "e4a64afb" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
275
+ const version = readInjected(true ? "0.9.82-rc.273" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
276
+ const builtAt = readInjected(true ? "2026-06-15T05:37:07.054Z" : void 0);
277
277
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
278
278
  return cached;
279
279
  }
@@ -4378,6 +4378,7 @@ __export(mesh_missions_exports, {
4378
4378
  getActiveMeshMissionSummaries: () => getActiveMeshMissionSummaries,
4379
4379
  getMeshMission: () => getMeshMission,
4380
4380
  getMeshMissions: () => getMeshMissions,
4381
+ getMeshStatusMissionSummaries: () => getMeshStatusMissionSummaries,
4381
4382
  summarizeMeshMission: () => summarizeMeshMission,
4382
4383
  summarizeMissionTasks: () => summarizeMissionTasks,
4383
4384
  upsertMeshMission: () => upsertMeshMission
@@ -4444,6 +4445,13 @@ function summarizeMeshMission(meshId, mission) {
4444
4445
  function getActiveMeshMissionSummaries(meshId) {
4445
4446
  return getMeshMissions(meshId, ["active"]).map((mission) => summarizeMeshMission(meshId, mission));
4446
4447
  }
4448
+ function getMeshStatusMissionSummaries(meshId, options) {
4449
+ const historyLimit = Math.max(0, options?.historyLimit ?? 10);
4450
+ const all = getMeshMissions(meshId);
4451
+ const live = all.filter((m) => m.status === "active" || m.status === "paused");
4452
+ const history = all.filter((m) => m.status === "completed" || m.status === "abandoned").sort((a, b) => (b.updatedAt || "").localeCompare(a.updatedAt || "")).slice(0, historyLimit);
4453
+ return [...live, ...history].map((mission) => summarizeMeshMission(meshId, mission));
4454
+ }
4447
4455
  function buildMissionPromptSection(meshId) {
4448
4456
  const summaries = getActiveMeshMissionSummaries(meshId);
4449
4457
  if (summaries.length === 0) return "";
@@ -32303,9 +32311,11 @@ var CliProviderInstance = class _CliProviderInstance {
32303
32311
  if (!this.generatingStartedAt) this.generatingStartedAt = now;
32304
32312
  const modal = adapterStatus.activeModal;
32305
32313
  LOG.info("CLI", `[${this.type}] approval modal: "${modal?.message?.slice(0, 80) ?? "none"}"`);
32314
+ const approvalEntrySeq = typeof adapterStatus?.approvalEntrySeq === "number" ? adapterStatus.approvalEntrySeq : 0;
32306
32315
  const approvalFingerprint = JSON.stringify({
32307
32316
  message: typeof modal?.message === "string" ? modal.message.trim() : "",
32308
- buttons: Array.isArray(modal?.buttons) ? modal.buttons.map((button) => String(button).trim()) : []
32317
+ buttons: Array.isArray(modal?.buttons) ? modal.buttons.map((button) => String(button).trim()) : [],
32318
+ seq: approvalEntrySeq
32309
32319
  });
32310
32320
  if (approvalFingerprint !== this.lastApprovalEventFingerprint) {
32311
32321
  this.lastApprovalEventFingerprint = approvalFingerprint;
@@ -32322,6 +32332,8 @@ var CliProviderInstance = class _CliProviderInstance {
32322
32332
  modalButtons: modal?.buttons
32323
32333
  });
32324
32334
  }
32335
+ } else if (newStatus === "generating" && this.lastStatus === "waiting_approval") {
32336
+ this.lastApprovalEventFingerprint = "";
32325
32337
  } else if (newStatus === "idle" && (this.lastStatus === "generating" || this.lastStatus === "waiting_approval")) {
32326
32338
  const duration = this.generatingStartedAt ? Math.round((now - this.generatingStartedAt) / 1e3) : 0;
32327
32339
  if (!this.generatingStartedAt && !this.generatingDebouncePending) {
@@ -44242,18 +44254,6 @@ ${hintLines.join("\n")}` : "",
44242
44254
  return { success: true };
44243
44255
  }
44244
44256
  case "launch_cli": {
44245
- {
44246
- const launchSettings = args?.settings && typeof args.settings === "object" ? args.settings : void 0;
44247
- const isMeshWorkerLaunch = !!launchSettings && (readStringValue(launchSettings.meshNodeFor) || launchSettings.launchedByCoordinator === true);
44248
- const hasCoordinatorDaemonId = !!launchSettings && !!readStringValue(launchSettings.meshCoordinatorDaemonId);
44249
- if (launchSettings && isMeshWorkerLaunch && !hasCoordinatorDaemonId) {
44250
- try {
44251
- const localDaemonId = readStringValue(loadConfig().machineId);
44252
- if (localDaemonId) launchSettings.meshCoordinatorDaemonId = localDaemonId;
44253
- } catch {
44254
- }
44255
- }
44256
- }
44257
44257
  const launchResult = await this.deps.cliManager.handleCliCommand(cmd, args);
44258
44258
  const meshNodeId = readStringValue(args?.settings?.meshNodeId);
44259
44259
  const meshId = readStringValue(args?.settings?.meshNodeFor);
@@ -46915,6 +46915,8 @@ ${ptyResult.output.slice(-2e3)}`);
46915
46915
  nodes: mesh.nodes || [],
46916
46916
  liveSessionRecords: liveMeshSessions
46917
46917
  });
46918
+ const { getMeshStatusMissionSummaries: getMeshStatusMissionSummaries2 } = await Promise.resolve().then(() => (init_mesh_missions(), mesh_missions_exports));
46919
+ const missions = getMeshStatusMissionSummaries2(meshId);
46918
46920
  const statusResult = {
46919
46921
  success: true,
46920
46922
  meshId: mesh.id,
@@ -46953,6 +46955,7 @@ ${ptyResult.output.slice(-2e3)}`);
46953
46955
  nodes: nodeStatuses,
46954
46956
  queue: { tasks: queue, summary: queueSummary },
46955
46957
  ledger: { entries: ledgerEntries, summary: ledgerSummary },
46958
+ ...missions.length > 0 ? { missions } : {},
46956
46959
  ...asyncRefineJobs.length > 0 ? { asyncRefineJobs } : {},
46957
46960
  ...historicalSessions ? { historicalSessions } : {},
46958
46961
  ...pendingCoordinatorEvents.length > 0 ? { pendingCoordinatorEvents } : {},