@adhdev/daemon-core 0.9.82-rc.425 → 0.9.82-rc.426
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.js
CHANGED
|
@@ -389,10 +389,10 @@ function readInjected(value) {
|
|
|
389
389
|
}
|
|
390
390
|
function getDaemonBuildInfo() {
|
|
391
391
|
if (cached) return cached;
|
|
392
|
-
const commit = readInjected(true ? "
|
|
393
|
-
const commitShort = readInjected(true ? "
|
|
394
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
395
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
392
|
+
const commit = readInjected(true ? "d14dd8f4fe899ec4ff249b089869a2c330699ab2" : void 0) ?? "unknown";
|
|
393
|
+
const commitShort = readInjected(true ? "d14dd8f4" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
394
|
+
const version = readInjected(true ? "0.9.82-rc.426" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
395
|
+
const builtAt = readInjected(true ? "2026-06-29T15:33:39.213Z" : void 0);
|
|
396
396
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
397
397
|
return cached;
|
|
398
398
|
}
|
|
@@ -49358,6 +49358,56 @@ var meshCrudHandlers = {
|
|
|
49358
49358
|
return { success: false, error: e.message };
|
|
49359
49359
|
}
|
|
49360
49360
|
},
|
|
49361
|
+
// ─── MAGI panels (machine-local config, sibling to meshes) ───────────────
|
|
49362
|
+
// Panels live in ~/.adhdev/meshes.json `magiPanels` and are pure local config
|
|
49363
|
+
// (no mesh ownership). These three handlers mirror list_meshes/create_mesh/
|
|
49364
|
+
// update_mesh: dynamic-import the already-exported mesh-config accessors and
|
|
49365
|
+
// surface normalizeMagiPanel's structured error codes (invalid_magi_panel,
|
|
49366
|
+
// magi_panel_exists) verbatim so the dashboard can render them.
|
|
49367
|
+
//
|
|
49368
|
+
// Permission: magi_panel_set / magi_panel_remove are WRITE commands. They are
|
|
49369
|
+
// intentionally NOT listed in canPeerUsePrivilegedShareCommand (daemon-cloud
|
|
49370
|
+
// data-channel-router), so a peer holding ANY share permission hits its
|
|
49371
|
+
// `default → false` branch — identical owner-only gating to create_mesh /
|
|
49372
|
+
// update_mesh / list_meshes (none of which are listed there either). A trusted
|
|
49373
|
+
// peer (no permission = the owner) passes the top `!permission → true` guard.
|
|
49374
|
+
// Mirror, don't invent: do not add a new policy tier here.
|
|
49375
|
+
//
|
|
49376
|
+
// Resolvability (coupling / stale / available) is deliberately NOT computed
|
|
49377
|
+
// here: buildMagiFanoutPlan lives in mcp-server, unreachable from daemon-core.
|
|
49378
|
+
// magi_panel_list returns the raw definitions only; the dashboard derives
|
|
49379
|
+
// member resolvability client-side (web-core MagiPanelManager, reusing the
|
|
49380
|
+
// MagiGroupRow coupling logic) against live mesh_status.
|
|
49381
|
+
magi_panel_list: async (_ctx, _args) => {
|
|
49382
|
+
try {
|
|
49383
|
+
const { listMagiPanels: listMagiPanels2 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
|
|
49384
|
+
return { success: true, panels: listMagiPanels2() };
|
|
49385
|
+
} catch (e) {
|
|
49386
|
+
return { success: false, error: e.message };
|
|
49387
|
+
}
|
|
49388
|
+
},
|
|
49389
|
+
magi_panel_set: async (_ctx, args) => {
|
|
49390
|
+
const name = typeof args?.name === "string" ? args.name.trim() : "";
|
|
49391
|
+
if (!name) return { success: false, error: "invalid_magi_panel: panel name is required" };
|
|
49392
|
+
try {
|
|
49393
|
+
const { upsertMagiPanel: upsertMagiPanel2 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
|
|
49394
|
+
const panel = upsertMagiPanel2(name, args?.panel, { overwrite: args?.overwrite === true });
|
|
49395
|
+
return { success: true, name, panel };
|
|
49396
|
+
} catch (e) {
|
|
49397
|
+
return { success: false, error: e.message };
|
|
49398
|
+
}
|
|
49399
|
+
},
|
|
49400
|
+
magi_panel_remove: async (_ctx, args) => {
|
|
49401
|
+
const name = typeof args?.name === "string" ? args.name.trim() : "";
|
|
49402
|
+
if (!name) return { success: false, error: "invalid_magi_panel: panel name is required" };
|
|
49403
|
+
try {
|
|
49404
|
+
const { removeMagiPanel: removeMagiPanel2 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
|
|
49405
|
+
const removed = removeMagiPanel2(name);
|
|
49406
|
+
return { success: true, removed };
|
|
49407
|
+
} catch (e) {
|
|
49408
|
+
return { success: false, error: e.message };
|
|
49409
|
+
}
|
|
49410
|
+
},
|
|
49361
49411
|
add_mesh_node: async (ctx, args) => {
|
|
49362
49412
|
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
49363
49413
|
const workspace = typeof args?.workspace === "string" ? args.workspace.trim() : "";
|