@adhdev/daemon-core 0.9.82-rc.425 → 0.9.82-rc.427
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 +54 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +54 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/commands/med-family/mesh-crud.ts +58 -0
package/dist/index.mjs
CHANGED
|
@@ -384,10 +384,10 @@ function readInjected(value) {
|
|
|
384
384
|
}
|
|
385
385
|
function getDaemonBuildInfo() {
|
|
386
386
|
if (cached) return cached;
|
|
387
|
-
const commit = readInjected(true ? "
|
|
388
|
-
const commitShort = readInjected(true ? "
|
|
389
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
390
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
387
|
+
const commit = readInjected(true ? "f6031f58c991b88f76d192e43af6a99b4b0bd1cc" : void 0) ?? "unknown";
|
|
388
|
+
const commitShort = readInjected(true ? "f6031f58" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
389
|
+
const version = readInjected(true ? "0.9.82-rc.427" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
390
|
+
const builtAt = readInjected(true ? "2026-06-29T16:38:06.259Z" : void 0);
|
|
391
391
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
392
392
|
return cached;
|
|
393
393
|
}
|
|
@@ -48967,6 +48967,56 @@ var meshCrudHandlers = {
|
|
|
48967
48967
|
return { success: false, error: e.message };
|
|
48968
48968
|
}
|
|
48969
48969
|
},
|
|
48970
|
+
// ─── MAGI panels (machine-local config, sibling to meshes) ───────────────
|
|
48971
|
+
// Panels live in ~/.adhdev/meshes.json `magiPanels` and are pure local config
|
|
48972
|
+
// (no mesh ownership). These three handlers mirror list_meshes/create_mesh/
|
|
48973
|
+
// update_mesh: dynamic-import the already-exported mesh-config accessors and
|
|
48974
|
+
// surface normalizeMagiPanel's structured error codes (invalid_magi_panel,
|
|
48975
|
+
// magi_panel_exists) verbatim so the dashboard can render them.
|
|
48976
|
+
//
|
|
48977
|
+
// Permission: magi_panel_set / magi_panel_remove are WRITE commands. They are
|
|
48978
|
+
// intentionally NOT listed in canPeerUsePrivilegedShareCommand (daemon-cloud
|
|
48979
|
+
// data-channel-router), so a peer holding ANY share permission hits its
|
|
48980
|
+
// `default → false` branch — identical owner-only gating to create_mesh /
|
|
48981
|
+
// update_mesh / list_meshes (none of which are listed there either). A trusted
|
|
48982
|
+
// peer (no permission = the owner) passes the top `!permission → true` guard.
|
|
48983
|
+
// Mirror, don't invent: do not add a new policy tier here.
|
|
48984
|
+
//
|
|
48985
|
+
// Resolvability (coupling / stale / available) is deliberately NOT computed
|
|
48986
|
+
// here: buildMagiFanoutPlan lives in mcp-server, unreachable from daemon-core.
|
|
48987
|
+
// magi_panel_list returns the raw definitions only; the dashboard derives
|
|
48988
|
+
// member resolvability client-side (web-core MagiPanelManager, reusing the
|
|
48989
|
+
// MagiGroupRow coupling logic) against live mesh_status.
|
|
48990
|
+
magi_panel_list: async (_ctx, _args) => {
|
|
48991
|
+
try {
|
|
48992
|
+
const { listMagiPanels: listMagiPanels2 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
|
|
48993
|
+
return { success: true, panels: listMagiPanels2() };
|
|
48994
|
+
} catch (e) {
|
|
48995
|
+
return { success: false, error: e.message };
|
|
48996
|
+
}
|
|
48997
|
+
},
|
|
48998
|
+
magi_panel_set: async (_ctx, args) => {
|
|
48999
|
+
const name = typeof args?.name === "string" ? args.name.trim() : "";
|
|
49000
|
+
if (!name) return { success: false, error: "invalid_magi_panel: panel name is required" };
|
|
49001
|
+
try {
|
|
49002
|
+
const { upsertMagiPanel: upsertMagiPanel2 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
|
|
49003
|
+
const panel = upsertMagiPanel2(name, args?.panel, { overwrite: args?.overwrite === true });
|
|
49004
|
+
return { success: true, name, panel };
|
|
49005
|
+
} catch (e) {
|
|
49006
|
+
return { success: false, error: e.message };
|
|
49007
|
+
}
|
|
49008
|
+
},
|
|
49009
|
+
magi_panel_remove: async (_ctx, args) => {
|
|
49010
|
+
const name = typeof args?.name === "string" ? args.name.trim() : "";
|
|
49011
|
+
if (!name) return { success: false, error: "invalid_magi_panel: panel name is required" };
|
|
49012
|
+
try {
|
|
49013
|
+
const { removeMagiPanel: removeMagiPanel2 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
|
|
49014
|
+
const removed = removeMagiPanel2(name);
|
|
49015
|
+
return { success: true, removed };
|
|
49016
|
+
} catch (e) {
|
|
49017
|
+
return { success: false, error: e.message };
|
|
49018
|
+
}
|
|
49019
|
+
},
|
|
48970
49020
|
add_mesh_node: async (ctx, args) => {
|
|
48971
49021
|
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
48972
49022
|
const workspace = typeof args?.workspace === "string" ? args.workspace.trim() : "";
|