@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.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
|
}
|
|
@@ -52004,6 +52004,41 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
52004
52004
|
init_state_store();
|
|
52005
52005
|
init_recent_activity();
|
|
52006
52006
|
init_mesh_events_utils();
|
|
52007
|
+
init_logger();
|
|
52008
|
+
async function forwardConversationPrefsToCoordinator(ctx, sessionId, patch) {
|
|
52009
|
+
const dispatch = ctx.deps.dispatchMeshCommand;
|
|
52010
|
+
if (!dispatch) return "skipped";
|
|
52011
|
+
let settings = {};
|
|
52012
|
+
try {
|
|
52013
|
+
const state = ctx.deps.instanceManager.getInstance(sessionId)?.getState?.();
|
|
52014
|
+
if (state?.settings && typeof state.settings === "object") {
|
|
52015
|
+
settings = state.settings;
|
|
52016
|
+
}
|
|
52017
|
+
} catch {
|
|
52018
|
+
}
|
|
52019
|
+
const coordinatorDaemonId = readNonEmptyString2(settings.meshCoordinatorDaemonId);
|
|
52020
|
+
const meshId = readNonEmptyString2(settings.meshNodeFor);
|
|
52021
|
+
if (!coordinatorDaemonId || !meshId) return "skipped";
|
|
52022
|
+
const nodeId = readNonEmptyString2(settings.meshNodeId) || readNonEmptyString2(settings.meshLastNodeId);
|
|
52023
|
+
const payload = {
|
|
52024
|
+
event: "session:settings_changed",
|
|
52025
|
+
meshId,
|
|
52026
|
+
targetSessionId: sessionId,
|
|
52027
|
+
...nodeId ? { nodeId } : {},
|
|
52028
|
+
sessionSettings: { ...patch }
|
|
52029
|
+
};
|
|
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";
|
|
52041
|
+
}
|
|
52007
52042
|
var cliAgentHandlers = {
|
|
52008
52043
|
launch_cli: async (ctx, args) => {
|
|
52009
52044
|
const launchResult = await ctx.deps.cliManager.handleCliCommand("launch_cli", args);
|
|
@@ -52055,7 +52090,16 @@ var cliAgentHandlers = {
|
|
|
52055
52090
|
if (!Object.keys(patch).length) return { success: false, error: "Nothing to update (hidden and/or muted required)" };
|
|
52056
52091
|
inst.updateSettings(patch);
|
|
52057
52092
|
ctx.deps.onStatusChange?.();
|
|
52058
|
-
|
|
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
|
+
};
|
|
52059
52103
|
},
|
|
52060
52104
|
agent_command: async (ctx, args) => {
|
|
52061
52105
|
{
|