@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.mjs
CHANGED
|
@@ -414,10 +414,10 @@ function readInjected(value) {
|
|
|
414
414
|
}
|
|
415
415
|
function getDaemonBuildInfo() {
|
|
416
416
|
if (cached) return cached;
|
|
417
|
-
const commit = readInjected(true ? "
|
|
418
|
-
const commitShort = readInjected(true ? "
|
|
419
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
420
|
-
const builtAt = readInjected(true ? "2026-07-
|
|
417
|
+
const commit = readInjected(true ? "e81df3dc3549e10359549fba60907e0755fc5ea3" : void 0) ?? "unknown";
|
|
418
|
+
const commitShort = readInjected(true ? "e81df3dc" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
419
|
+
const version = readInjected(true ? "0.9.82-rc.549" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
420
|
+
const builtAt = readInjected(true ? "2026-07-16T16:52:53.112Z" : void 0);
|
|
421
421
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
422
422
|
return cached;
|
|
423
423
|
}
|
|
@@ -52005,9 +52005,9 @@ init_state_store();
|
|
|
52005
52005
|
init_recent_activity();
|
|
52006
52006
|
init_mesh_events_utils();
|
|
52007
52007
|
init_logger();
|
|
52008
|
-
function forwardConversationPrefsToCoordinator(ctx, sessionId, patch) {
|
|
52008
|
+
async function forwardConversationPrefsToCoordinator(ctx, sessionId, patch) {
|
|
52009
52009
|
const dispatch = ctx.deps.dispatchMeshCommand;
|
|
52010
|
-
if (!dispatch) return;
|
|
52010
|
+
if (!dispatch) return "skipped";
|
|
52011
52011
|
let settings = {};
|
|
52012
52012
|
try {
|
|
52013
52013
|
const state = ctx.deps.instanceManager.getInstance(sessionId)?.getState?.();
|
|
@@ -52018,7 +52018,7 @@ function forwardConversationPrefsToCoordinator(ctx, sessionId, patch) {
|
|
|
52018
52018
|
}
|
|
52019
52019
|
const coordinatorDaemonId = readNonEmptyString2(settings.meshCoordinatorDaemonId);
|
|
52020
52020
|
const meshId = readNonEmptyString2(settings.meshNodeFor);
|
|
52021
|
-
if (!coordinatorDaemonId || !meshId) return;
|
|
52021
|
+
if (!coordinatorDaemonId || !meshId) return "skipped";
|
|
52022
52022
|
const nodeId = readNonEmptyString2(settings.meshNodeId) || readNonEmptyString2(settings.meshLastNodeId);
|
|
52023
52023
|
const payload = {
|
|
52024
52024
|
event: "session:settings_changed",
|
|
@@ -52027,7 +52027,17 @@ function forwardConversationPrefsToCoordinator(ctx, sessionId, patch) {
|
|
|
52027
52027
|
...nodeId ? { nodeId } : {},
|
|
52028
52028
|
sessionSettings: { ...patch }
|
|
52029
52029
|
};
|
|
52030
|
-
|
|
52030
|
+
for (let attempt = 0; attempt < 2; attempt++) {
|
|
52031
|
+
try {
|
|
52032
|
+
await dispatch(coordinatorDaemonId, "mesh_forward_event", payload);
|
|
52033
|
+
return "refreshed";
|
|
52034
|
+
} catch (e) {
|
|
52035
|
+
if (attempt === 0) continue;
|
|
52036
|
+
LOG.warn("Mesh", `[Mesh] set_conversation_prefs mirror forward to coordinator ${coordinatorDaemonId.slice(0, 12)} failed after retry: ${e?.message || e}`);
|
|
52037
|
+
return "failed";
|
|
52038
|
+
}
|
|
52039
|
+
}
|
|
52040
|
+
return "failed";
|
|
52031
52041
|
}
|
|
52032
52042
|
var cliAgentHandlers = {
|
|
52033
52043
|
launch_cli: async (ctx, args) => {
|
|
@@ -52080,8 +52090,16 @@ var cliAgentHandlers = {
|
|
|
52080
52090
|
if (!Object.keys(patch).length) return { success: false, error: "Nothing to update (hidden and/or muted required)" };
|
|
52081
52091
|
inst.updateSettings(patch);
|
|
52082
52092
|
ctx.deps.onStatusChange?.();
|
|
52083
|
-
forwardConversationPrefsToCoordinator(ctx, sessionId, patch);
|
|
52084
|
-
return {
|
|
52093
|
+
const mirror = await forwardConversationPrefsToCoordinator(ctx, sessionId, patch);
|
|
52094
|
+
return {
|
|
52095
|
+
success: true,
|
|
52096
|
+
sessionId,
|
|
52097
|
+
...patch,
|
|
52098
|
+
// Only surface the mirror status for a genuine mesh worker session (refreshed/failed);
|
|
52099
|
+
// a non-mesh session ('skipped') carries no mirror field, so nothing changes for it.
|
|
52100
|
+
...mirror === "failed" ? { mirrorStale: true } : {},
|
|
52101
|
+
...mirror === "refreshed" ? { mirrorRefreshed: true } : {}
|
|
52102
|
+
};
|
|
52085
52103
|
},
|
|
52086
52104
|
agent_command: async (ctx, args) => {
|
|
52087
52105
|
{
|