@adhdev/daemon-core 0.9.82-rc.272 → 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.js +20 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -17
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/mesh-missions.d.ts +10 -0
- package/dist/repo-mesh-types.d.ts +8 -0
- package/package.json +2 -2
- package/src/commands/router.ts +14 -21
- package/src/mesh/mesh-missions.ts +21 -0
- package/src/providers/cli-provider-instance.ts +23 -0
- package/src/repo-mesh-types.ts +8 -0
package/dist/index.js
CHANGED
|
@@ -275,10 +275,10 @@ function readInjected(value) {
|
|
|
275
275
|
}
|
|
276
276
|
function getDaemonBuildInfo() {
|
|
277
277
|
if (cached) return cached;
|
|
278
|
-
const commit = readInjected(true ? "
|
|
279
|
-
const commitShort = readInjected(true ? "
|
|
280
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
281
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
278
|
+
const commit = readInjected(true ? "e4a64afbd050fa5167c383b1fc6f9df5f8e48ba2" : void 0) ?? "unknown";
|
|
279
|
+
const commitShort = readInjected(true ? "e4a64afb" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
280
|
+
const version = readInjected(true ? "0.9.82-rc.273" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
281
|
+
const builtAt = readInjected(true ? "2026-06-15T05:37:07.054Z" : void 0);
|
|
282
282
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
283
283
|
return cached;
|
|
284
284
|
}
|
|
@@ -4384,6 +4384,7 @@ __export(mesh_missions_exports, {
|
|
|
4384
4384
|
getActiveMeshMissionSummaries: () => getActiveMeshMissionSummaries,
|
|
4385
4385
|
getMeshMission: () => getMeshMission,
|
|
4386
4386
|
getMeshMissions: () => getMeshMissions,
|
|
4387
|
+
getMeshStatusMissionSummaries: () => getMeshStatusMissionSummaries,
|
|
4387
4388
|
summarizeMeshMission: () => summarizeMeshMission,
|
|
4388
4389
|
summarizeMissionTasks: () => summarizeMissionTasks,
|
|
4389
4390
|
upsertMeshMission: () => upsertMeshMission
|
|
@@ -4449,6 +4450,13 @@ function summarizeMeshMission(meshId, mission) {
|
|
|
4449
4450
|
function getActiveMeshMissionSummaries(meshId) {
|
|
4450
4451
|
return getMeshMissions(meshId, ["active"]).map((mission) => summarizeMeshMission(meshId, mission));
|
|
4451
4452
|
}
|
|
4453
|
+
function getMeshStatusMissionSummaries(meshId, options) {
|
|
4454
|
+
const historyLimit = Math.max(0, options?.historyLimit ?? 10);
|
|
4455
|
+
const all = getMeshMissions(meshId);
|
|
4456
|
+
const live = all.filter((m) => m.status === "active" || m.status === "paused");
|
|
4457
|
+
const history = all.filter((m) => m.status === "completed" || m.status === "abandoned").sort((a, b) => (b.updatedAt || "").localeCompare(a.updatedAt || "")).slice(0, historyLimit);
|
|
4458
|
+
return [...live, ...history].map((mission) => summarizeMeshMission(meshId, mission));
|
|
4459
|
+
}
|
|
4452
4460
|
function buildMissionPromptSection(meshId) {
|
|
4453
4461
|
const summaries = getActiveMeshMissionSummaries(meshId);
|
|
4454
4462
|
if (summaries.length === 0) return "";
|
|
@@ -32644,9 +32652,11 @@ var CliProviderInstance = class _CliProviderInstance {
|
|
|
32644
32652
|
if (!this.generatingStartedAt) this.generatingStartedAt = now;
|
|
32645
32653
|
const modal = adapterStatus.activeModal;
|
|
32646
32654
|
LOG.info("CLI", `[${this.type}] approval modal: "${modal?.message?.slice(0, 80) ?? "none"}"`);
|
|
32655
|
+
const approvalEntrySeq = typeof adapterStatus?.approvalEntrySeq === "number" ? adapterStatus.approvalEntrySeq : 0;
|
|
32647
32656
|
const approvalFingerprint = JSON.stringify({
|
|
32648
32657
|
message: typeof modal?.message === "string" ? modal.message.trim() : "",
|
|
32649
|
-
buttons: Array.isArray(modal?.buttons) ? modal.buttons.map((button) => String(button).trim()) : []
|
|
32658
|
+
buttons: Array.isArray(modal?.buttons) ? modal.buttons.map((button) => String(button).trim()) : [],
|
|
32659
|
+
seq: approvalEntrySeq
|
|
32650
32660
|
});
|
|
32651
32661
|
if (approvalFingerprint !== this.lastApprovalEventFingerprint) {
|
|
32652
32662
|
this.lastApprovalEventFingerprint = approvalFingerprint;
|
|
@@ -32663,6 +32673,8 @@ var CliProviderInstance = class _CliProviderInstance {
|
|
|
32663
32673
|
modalButtons: modal?.buttons
|
|
32664
32674
|
});
|
|
32665
32675
|
}
|
|
32676
|
+
} else if (newStatus === "generating" && this.lastStatus === "waiting_approval") {
|
|
32677
|
+
this.lastApprovalEventFingerprint = "";
|
|
32666
32678
|
} else if (newStatus === "idle" && (this.lastStatus === "generating" || this.lastStatus === "waiting_approval")) {
|
|
32667
32679
|
const duration = this.generatingStartedAt ? Math.round((now - this.generatingStartedAt) / 1e3) : 0;
|
|
32668
32680
|
if (!this.generatingStartedAt && !this.generatingDebouncePending) {
|
|
@@ -44578,18 +44590,6 @@ ${hintLines.join("\n")}` : "",
|
|
|
44578
44590
|
return { success: true };
|
|
44579
44591
|
}
|
|
44580
44592
|
case "launch_cli": {
|
|
44581
|
-
{
|
|
44582
|
-
const launchSettings = args?.settings && typeof args.settings === "object" ? args.settings : void 0;
|
|
44583
|
-
const isMeshWorkerLaunch = !!launchSettings && (readStringValue(launchSettings.meshNodeFor) || launchSettings.launchedByCoordinator === true);
|
|
44584
|
-
const hasCoordinatorDaemonId = !!launchSettings && !!readStringValue(launchSettings.meshCoordinatorDaemonId);
|
|
44585
|
-
if (launchSettings && isMeshWorkerLaunch && !hasCoordinatorDaemonId) {
|
|
44586
|
-
try {
|
|
44587
|
-
const localDaemonId = readStringValue(loadConfig().machineId);
|
|
44588
|
-
if (localDaemonId) launchSettings.meshCoordinatorDaemonId = localDaemonId;
|
|
44589
|
-
} catch {
|
|
44590
|
-
}
|
|
44591
|
-
}
|
|
44592
|
-
}
|
|
44593
44593
|
const launchResult = await this.deps.cliManager.handleCliCommand(cmd, args);
|
|
44594
44594
|
const meshNodeId = readStringValue(args?.settings?.meshNodeId);
|
|
44595
44595
|
const meshId = readStringValue(args?.settings?.meshNodeFor);
|
|
@@ -47251,6 +47251,8 @@ ${ptyResult.output.slice(-2e3)}`);
|
|
|
47251
47251
|
nodes: mesh.nodes || [],
|
|
47252
47252
|
liveSessionRecords: liveMeshSessions
|
|
47253
47253
|
});
|
|
47254
|
+
const { getMeshStatusMissionSummaries: getMeshStatusMissionSummaries2 } = await Promise.resolve().then(() => (init_mesh_missions(), mesh_missions_exports));
|
|
47255
|
+
const missions = getMeshStatusMissionSummaries2(meshId);
|
|
47254
47256
|
const statusResult = {
|
|
47255
47257
|
success: true,
|
|
47256
47258
|
meshId: mesh.id,
|
|
@@ -47289,6 +47291,7 @@ ${ptyResult.output.slice(-2e3)}`);
|
|
|
47289
47291
|
nodes: nodeStatuses,
|
|
47290
47292
|
queue: { tasks: queue, summary: queueSummary },
|
|
47291
47293
|
ledger: { entries: ledgerEntries, summary: ledgerSummary },
|
|
47294
|
+
...missions.length > 0 ? { missions } : {},
|
|
47292
47295
|
...asyncRefineJobs.length > 0 ? { asyncRefineJobs } : {},
|
|
47293
47296
|
...historicalSessions ? { historicalSessions } : {},
|
|
47294
47297
|
...pendingCoordinatorEvents.length > 0 ? { pendingCoordinatorEvents } : {},
|