@adhdev/daemon-core 0.9.82-rc.548 → 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 +28 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/commands/med-family/cli-agent.ts +50 -16
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
|
}
|
|
@@ -52432,9 +52432,9 @@ init_state_store();
|
|
|
52432
52432
|
init_recent_activity();
|
|
52433
52433
|
init_mesh_events_utils();
|
|
52434
52434
|
init_logger();
|
|
52435
|
-
function forwardConversationPrefsToCoordinator(ctx, sessionId, patch) {
|
|
52435
|
+
async function forwardConversationPrefsToCoordinator(ctx, sessionId, patch) {
|
|
52436
52436
|
const dispatch = ctx.deps.dispatchMeshCommand;
|
|
52437
|
-
if (!dispatch) return;
|
|
52437
|
+
if (!dispatch) return "skipped";
|
|
52438
52438
|
let settings = {};
|
|
52439
52439
|
try {
|
|
52440
52440
|
const state = ctx.deps.instanceManager.getInstance(sessionId)?.getState?.();
|
|
@@ -52445,7 +52445,7 @@ function forwardConversationPrefsToCoordinator(ctx, sessionId, patch) {
|
|
|
52445
52445
|
}
|
|
52446
52446
|
const coordinatorDaemonId = readNonEmptyString2(settings.meshCoordinatorDaemonId);
|
|
52447
52447
|
const meshId = readNonEmptyString2(settings.meshNodeFor);
|
|
52448
|
-
if (!coordinatorDaemonId || !meshId) return;
|
|
52448
|
+
if (!coordinatorDaemonId || !meshId) return "skipped";
|
|
52449
52449
|
const nodeId = readNonEmptyString2(settings.meshNodeId) || readNonEmptyString2(settings.meshLastNodeId);
|
|
52450
52450
|
const payload = {
|
|
52451
52451
|
event: "session:settings_changed",
|
|
@@ -52454,7 +52454,17 @@ function forwardConversationPrefsToCoordinator(ctx, sessionId, patch) {
|
|
|
52454
52454
|
...nodeId ? { nodeId } : {},
|
|
52455
52455
|
sessionSettings: { ...patch }
|
|
52456
52456
|
};
|
|
52457
|
-
|
|
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";
|
|
52458
52468
|
}
|
|
52459
52469
|
var cliAgentHandlers = {
|
|
52460
52470
|
launch_cli: async (ctx, args) => {
|
|
@@ -52507,8 +52517,16 @@ var cliAgentHandlers = {
|
|
|
52507
52517
|
if (!Object.keys(patch).length) return { success: false, error: "Nothing to update (hidden and/or muted required)" };
|
|
52508
52518
|
inst.updateSettings(patch);
|
|
52509
52519
|
ctx.deps.onStatusChange?.();
|
|
52510
|
-
forwardConversationPrefsToCoordinator(ctx, sessionId, patch);
|
|
52511
|
-
return {
|
|
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
|
+
};
|
|
52512
52530
|
},
|
|
52513
52531
|
agent_command: async (ctx, args) => {
|
|
52514
52532
|
{
|