@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.mjs
CHANGED
|
@@ -423,10 +423,10 @@ function readInjected(value) {
|
|
|
423
423
|
}
|
|
424
424
|
function getDaemonBuildInfo() {
|
|
425
425
|
if (cached) return cached;
|
|
426
|
-
const commit = readInjected(true ? "
|
|
427
|
-
const commitShort = readInjected(true ? "
|
|
428
|
-
const version = readInjected(true ? "1.0.
|
|
429
|
-
const builtAt = readInjected(true ? "2026-07-
|
|
426
|
+
const commit = readInjected(true ? "7e3de677e090bef8eb349972151805e667bc5762" : void 0) ?? "unknown";
|
|
427
|
+
const commitShort = readInjected(true ? "7e3de677" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
428
|
+
const version = readInjected(true ? "1.0.8-rc.1" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
429
|
+
const builtAt = readInjected(true ? "2026-07-20T06:24:10.681Z" : void 0);
|
|
430
430
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
431
431
|
return cached;
|
|
432
432
|
}
|
|
@@ -42841,6 +42841,71 @@ var meshLedgerHandlers = {
|
|
|
42841
42841
|
return { success: false, error: e.message };
|
|
42842
42842
|
}
|
|
42843
42843
|
},
|
|
42844
|
+
// Coordinator operating-note CRUD, exposed over P2P so the dashboard mesh
|
|
42845
|
+
// graph dialog can list / record / forget notes (previously stdio-MCP only).
|
|
42846
|
+
list_mesh_notes: async (_ctx, args) => {
|
|
42847
|
+
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
42848
|
+
if (!meshId) return { success: false, error: "meshId required" };
|
|
42849
|
+
try {
|
|
42850
|
+
const { readOperatingNotes: readOperatingNotes2 } = await Promise.resolve().then(() => (init_mesh_ledger(), mesh_ledger_exports));
|
|
42851
|
+
const tail = typeof args?.tail === "number" ? args.tail : 100;
|
|
42852
|
+
const entries = readOperatingNotes2(meshId, { tail });
|
|
42853
|
+
const notes = entries.map((e) => {
|
|
42854
|
+
const p = e.payload || {};
|
|
42855
|
+
return {
|
|
42856
|
+
id: e.id,
|
|
42857
|
+
text: typeof p.text === "string" ? p.text : "",
|
|
42858
|
+
category: typeof p.category === "string" ? p.category : void 0,
|
|
42859
|
+
createdAt: typeof p.createdAt === "string" ? p.createdAt : e.timestamp,
|
|
42860
|
+
sourceCoordinator: typeof p.sourceCoordinator === "string" ? p.sourceCoordinator : void 0
|
|
42861
|
+
};
|
|
42862
|
+
});
|
|
42863
|
+
return { success: true, notes };
|
|
42864
|
+
} catch (e) {
|
|
42865
|
+
return { success: false, error: e.message };
|
|
42866
|
+
}
|
|
42867
|
+
},
|
|
42868
|
+
record_mesh_note: async (_ctx, args) => {
|
|
42869
|
+
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
42870
|
+
if (!meshId) return { success: false, error: "meshId required" };
|
|
42871
|
+
const text = typeof args?.text === "string" ? args.text.trim() : "";
|
|
42872
|
+
if (!text) return { success: false, error: "text required" };
|
|
42873
|
+
try {
|
|
42874
|
+
const { appendLedgerEntry: appendLedgerEntry2 } = await Promise.resolve().then(() => (init_mesh_ledger(), mesh_ledger_exports));
|
|
42875
|
+
const category = typeof args?.category === "string" ? args.category : void 0;
|
|
42876
|
+
const entry = appendLedgerEntry2(meshId, {
|
|
42877
|
+
kind: "coordinator_operating_note",
|
|
42878
|
+
payload: {
|
|
42879
|
+
text,
|
|
42880
|
+
...category ? { category } : {},
|
|
42881
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
42882
|
+
sourceCoordinator: "dashboard"
|
|
42883
|
+
}
|
|
42884
|
+
});
|
|
42885
|
+
return { success: true, id: entry.id };
|
|
42886
|
+
} catch (e) {
|
|
42887
|
+
return { success: false, error: e.message };
|
|
42888
|
+
}
|
|
42889
|
+
},
|
|
42890
|
+
forget_mesh_note: async (_ctx, args) => {
|
|
42891
|
+
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
42892
|
+
if (!meshId) return { success: false, error: "meshId required" };
|
|
42893
|
+
const noteId = typeof args?.noteId === "string" ? args.noteId.trim() : "";
|
|
42894
|
+
const text = typeof args?.text === "string" ? args.text.trim() : "";
|
|
42895
|
+
if (!noteId && !text) return { success: false, error: "noteId or text required" };
|
|
42896
|
+
try {
|
|
42897
|
+
const { tombstoneOperatingNote: tombstoneOperatingNote2 } = await Promise.resolve().then(() => (init_mesh_ledger(), mesh_ledger_exports));
|
|
42898
|
+
const reason = typeof args?.reason === "string" && args.reason.trim() ? args.reason.trim() : "dashboard_manual";
|
|
42899
|
+
const result = tombstoneOperatingNote2(meshId, {
|
|
42900
|
+
...noteId ? { noteId } : {},
|
|
42901
|
+
...text ? { text } : {},
|
|
42902
|
+
reason
|
|
42903
|
+
});
|
|
42904
|
+
return { success: true, matched: result.matched };
|
|
42905
|
+
} catch (e) {
|
|
42906
|
+
return { success: false, error: e.message };
|
|
42907
|
+
}
|
|
42908
|
+
},
|
|
42844
42909
|
import_mesh_ledger_slice: async (_ctx, args) => {
|
|
42845
42910
|
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
42846
42911
|
if (!meshId) return { success: false, error: "meshId required" };
|