@adhdev/daemon-core 1.0.7-rc.1 → 1.0.8-rc.1
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 +69 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +69 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/commands/low-family/mesh-ledger.ts +72 -0
package/dist/index.js
CHANGED
|
@@ -428,10 +428,10 @@ function readInjected(value) {
|
|
|
428
428
|
}
|
|
429
429
|
function getDaemonBuildInfo() {
|
|
430
430
|
if (cached) return cached;
|
|
431
|
-
const commit = readInjected(true ? "
|
|
432
|
-
const commitShort = readInjected(true ? "
|
|
433
|
-
const version = readInjected(true ? "1.0.
|
|
434
|
-
const builtAt = readInjected(true ? "2026-07-
|
|
431
|
+
const commit = readInjected(true ? "7e3de677e090bef8eb349972151805e667bc5762" : void 0) ?? "unknown";
|
|
432
|
+
const commitShort = readInjected(true ? "7e3de677" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
433
|
+
const version = readInjected(true ? "1.0.8-rc.1" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
434
|
+
const builtAt = readInjected(true ? "2026-07-20T06:24:10.681Z" : void 0);
|
|
435
435
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
436
436
|
return cached;
|
|
437
437
|
}
|
|
@@ -43274,6 +43274,71 @@ var meshLedgerHandlers = {
|
|
|
43274
43274
|
return { success: false, error: e.message };
|
|
43275
43275
|
}
|
|
43276
43276
|
},
|
|
43277
|
+
// Coordinator operating-note CRUD, exposed over P2P so the dashboard mesh
|
|
43278
|
+
// graph dialog can list / record / forget notes (previously stdio-MCP only).
|
|
43279
|
+
list_mesh_notes: async (_ctx, args) => {
|
|
43280
|
+
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
43281
|
+
if (!meshId) return { success: false, error: "meshId required" };
|
|
43282
|
+
try {
|
|
43283
|
+
const { readOperatingNotes: readOperatingNotes2 } = await Promise.resolve().then(() => (init_mesh_ledger(), mesh_ledger_exports));
|
|
43284
|
+
const tail = typeof args?.tail === "number" ? args.tail : 100;
|
|
43285
|
+
const entries = readOperatingNotes2(meshId, { tail });
|
|
43286
|
+
const notes = entries.map((e) => {
|
|
43287
|
+
const p = e.payload || {};
|
|
43288
|
+
return {
|
|
43289
|
+
id: e.id,
|
|
43290
|
+
text: typeof p.text === "string" ? p.text : "",
|
|
43291
|
+
category: typeof p.category === "string" ? p.category : void 0,
|
|
43292
|
+
createdAt: typeof p.createdAt === "string" ? p.createdAt : e.timestamp,
|
|
43293
|
+
sourceCoordinator: typeof p.sourceCoordinator === "string" ? p.sourceCoordinator : void 0
|
|
43294
|
+
};
|
|
43295
|
+
});
|
|
43296
|
+
return { success: true, notes };
|
|
43297
|
+
} catch (e) {
|
|
43298
|
+
return { success: false, error: e.message };
|
|
43299
|
+
}
|
|
43300
|
+
},
|
|
43301
|
+
record_mesh_note: async (_ctx, args) => {
|
|
43302
|
+
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
43303
|
+
if (!meshId) return { success: false, error: "meshId required" };
|
|
43304
|
+
const text = typeof args?.text === "string" ? args.text.trim() : "";
|
|
43305
|
+
if (!text) return { success: false, error: "text required" };
|
|
43306
|
+
try {
|
|
43307
|
+
const { appendLedgerEntry: appendLedgerEntry2 } = await Promise.resolve().then(() => (init_mesh_ledger(), mesh_ledger_exports));
|
|
43308
|
+
const category = typeof args?.category === "string" ? args.category : void 0;
|
|
43309
|
+
const entry = appendLedgerEntry2(meshId, {
|
|
43310
|
+
kind: "coordinator_operating_note",
|
|
43311
|
+
payload: {
|
|
43312
|
+
text,
|
|
43313
|
+
...category ? { category } : {},
|
|
43314
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
43315
|
+
sourceCoordinator: "dashboard"
|
|
43316
|
+
}
|
|
43317
|
+
});
|
|
43318
|
+
return { success: true, id: entry.id };
|
|
43319
|
+
} catch (e) {
|
|
43320
|
+
return { success: false, error: e.message };
|
|
43321
|
+
}
|
|
43322
|
+
},
|
|
43323
|
+
forget_mesh_note: async (_ctx, args) => {
|
|
43324
|
+
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
43325
|
+
if (!meshId) return { success: false, error: "meshId required" };
|
|
43326
|
+
const noteId = typeof args?.noteId === "string" ? args.noteId.trim() : "";
|
|
43327
|
+
const text = typeof args?.text === "string" ? args.text.trim() : "";
|
|
43328
|
+
if (!noteId && !text) return { success: false, error: "noteId or text required" };
|
|
43329
|
+
try {
|
|
43330
|
+
const { tombstoneOperatingNote: tombstoneOperatingNote2 } = await Promise.resolve().then(() => (init_mesh_ledger(), mesh_ledger_exports));
|
|
43331
|
+
const reason = typeof args?.reason === "string" && args.reason.trim() ? args.reason.trim() : "dashboard_manual";
|
|
43332
|
+
const result = tombstoneOperatingNote2(meshId, {
|
|
43333
|
+
...noteId ? { noteId } : {},
|
|
43334
|
+
...text ? { text } : {},
|
|
43335
|
+
reason
|
|
43336
|
+
});
|
|
43337
|
+
return { success: true, matched: result.matched };
|
|
43338
|
+
} catch (e) {
|
|
43339
|
+
return { success: false, error: e.message };
|
|
43340
|
+
}
|
|
43341
|
+
},
|
|
43277
43342
|
import_mesh_ledger_slice: async (_ctx, args) => {
|
|
43278
43343
|
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
43279
43344
|
if (!meshId) return { success: false, error: "meshId required" };
|