@adhdev/daemon-core 0.9.82-rc.547 → 0.9.82-rc.549
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 +49 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/commands/med-family/cli-agent.ts +90 -2
package/dist/index.js
CHANGED
|
@@ -419,10 +419,10 @@ function readInjected(value) {
|
|
|
419
419
|
}
|
|
420
420
|
function getDaemonBuildInfo() {
|
|
421
421
|
if (cached) return cached;
|
|
422
|
-
const commit = readInjected(true ? "
|
|
423
|
-
const commitShort = readInjected(true ? "
|
|
424
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
425
|
-
const builtAt = readInjected(true ? "2026-07-
|
|
422
|
+
const commit = readInjected(true ? "e81df3dc3549e10359549fba60907e0755fc5ea3" : void 0) ?? "unknown";
|
|
423
|
+
const commitShort = readInjected(true ? "e81df3dc" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
424
|
+
const version = readInjected(true ? "0.9.82-rc.549" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
425
|
+
const builtAt = readInjected(true ? "2026-07-16T16:52:53.112Z" : void 0);
|
|
426
426
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
427
427
|
return cached;
|
|
428
428
|
}
|
|
@@ -52431,6 +52431,41 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
52431
52431
|
init_state_store();
|
|
52432
52432
|
init_recent_activity();
|
|
52433
52433
|
init_mesh_events_utils();
|
|
52434
|
+
init_logger();
|
|
52435
|
+
async function forwardConversationPrefsToCoordinator(ctx, sessionId, patch) {
|
|
52436
|
+
const dispatch = ctx.deps.dispatchMeshCommand;
|
|
52437
|
+
if (!dispatch) return "skipped";
|
|
52438
|
+
let settings = {};
|
|
52439
|
+
try {
|
|
52440
|
+
const state = ctx.deps.instanceManager.getInstance(sessionId)?.getState?.();
|
|
52441
|
+
if (state?.settings && typeof state.settings === "object") {
|
|
52442
|
+
settings = state.settings;
|
|
52443
|
+
}
|
|
52444
|
+
} catch {
|
|
52445
|
+
}
|
|
52446
|
+
const coordinatorDaemonId = readNonEmptyString2(settings.meshCoordinatorDaemonId);
|
|
52447
|
+
const meshId = readNonEmptyString2(settings.meshNodeFor);
|
|
52448
|
+
if (!coordinatorDaemonId || !meshId) return "skipped";
|
|
52449
|
+
const nodeId = readNonEmptyString2(settings.meshNodeId) || readNonEmptyString2(settings.meshLastNodeId);
|
|
52450
|
+
const payload = {
|
|
52451
|
+
event: "session:settings_changed",
|
|
52452
|
+
meshId,
|
|
52453
|
+
targetSessionId: sessionId,
|
|
52454
|
+
...nodeId ? { nodeId } : {},
|
|
52455
|
+
sessionSettings: { ...patch }
|
|
52456
|
+
};
|
|
52457
|
+
for (let attempt = 0; attempt < 2; attempt++) {
|
|
52458
|
+
try {
|
|
52459
|
+
await dispatch(coordinatorDaemonId, "mesh_forward_event", payload);
|
|
52460
|
+
return "refreshed";
|
|
52461
|
+
} catch (e) {
|
|
52462
|
+
if (attempt === 0) continue;
|
|
52463
|
+
LOG.warn("Mesh", `[Mesh] set_conversation_prefs mirror forward to coordinator ${coordinatorDaemonId.slice(0, 12)} failed after retry: ${e?.message || e}`);
|
|
52464
|
+
return "failed";
|
|
52465
|
+
}
|
|
52466
|
+
}
|
|
52467
|
+
return "failed";
|
|
52468
|
+
}
|
|
52434
52469
|
var cliAgentHandlers = {
|
|
52435
52470
|
launch_cli: async (ctx, args) => {
|
|
52436
52471
|
const launchResult = await ctx.deps.cliManager.handleCliCommand("launch_cli", args);
|
|
@@ -52482,7 +52517,16 @@ var cliAgentHandlers = {
|
|
|
52482
52517
|
if (!Object.keys(patch).length) return { success: false, error: "Nothing to update (hidden and/or muted required)" };
|
|
52483
52518
|
inst.updateSettings(patch);
|
|
52484
52519
|
ctx.deps.onStatusChange?.();
|
|
52485
|
-
|
|
52520
|
+
const mirror = await forwardConversationPrefsToCoordinator(ctx, sessionId, patch);
|
|
52521
|
+
return {
|
|
52522
|
+
success: true,
|
|
52523
|
+
sessionId,
|
|
52524
|
+
...patch,
|
|
52525
|
+
// Only surface the mirror status for a genuine mesh worker session (refreshed/failed);
|
|
52526
|
+
// a non-mesh session ('skipped') carries no mirror field, so nothing changes for it.
|
|
52527
|
+
...mirror === "failed" ? { mirrorStale: true } : {},
|
|
52528
|
+
...mirror === "refreshed" ? { mirrorRefreshed: true } : {}
|
|
52529
|
+
};
|
|
52486
52530
|
},
|
|
52487
52531
|
agent_command: async (ctx, args) => {
|
|
52488
52532
|
{
|