@adhdev/daemon-standalone 1.0.18-rc.6 → 1.0.18-rc.8
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 +3919 -3444
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/vendor/mcp-server/index.js +40 -3
- package/vendor/mcp-server/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adhdev/daemon-standalone",
|
|
3
|
-
"version": "1.0.18-rc.
|
|
3
|
+
"version": "1.0.18-rc.8",
|
|
4
4
|
"description": "ADHDev standalone daemon — embedded HTTP/WS server for local dashboard",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"license": "AGPL-3.0-or-later",
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@adhdev/ghostty-vt-node": "*",
|
|
40
|
-
"@adhdev/session-host-core": "1.0.18-rc.
|
|
40
|
+
"@adhdev/session-host-core": "1.0.18-rc.8",
|
|
41
41
|
"@xterm/addon-serialize": "^0.14.0",
|
|
42
42
|
"@xterm/xterm": "^6.0.0",
|
|
43
43
|
"chalk": "^5.3.0",
|
|
@@ -1171,7 +1171,23 @@ var MESH_RECORD_NOTE_TOOL = {
|
|
|
1171
1171
|
category: {
|
|
1172
1172
|
type: "string",
|
|
1173
1173
|
enum: ["provider_quirk", "pattern_to_avoid", "recovery_lesson"],
|
|
1174
|
-
description: "Optional classification: provider_quirk (a provider/runtime behaves unexpectedly), pattern_to_avoid (an approach that caused problems), recovery_lesson (how a failure was recovered)."
|
|
1174
|
+
description: "Optional classification: provider_quirk (a provider/runtime behaves unexpectedly), pattern_to_avoid (an approach that caused problems), recovery_lesson (how a failure was recovered). Category also governs default read-side retention: recovery_lesson ages out of the injected prompt after ~14 days, pattern_to_avoid after ~30, provider_quirk and uncategorized are durable (never age out). The ledger entry is always kept for audit regardless."
|
|
1175
|
+
},
|
|
1176
|
+
pinned: {
|
|
1177
|
+
type: "boolean",
|
|
1178
|
+
description: "Pin this note so it ALWAYS rides into every coordinator prompt: never dropped by TTL expiry and kept ahead of unpinned notes when the injection cap is hit. Use for durable, high-value operating knowledge you never want to lose from the prompt."
|
|
1179
|
+
},
|
|
1180
|
+
ttl_days: {
|
|
1181
|
+
type: "number",
|
|
1182
|
+
description: "Optional explicit read-side lifespan in days. Resolved to an absolute expiry at record time; after it passes an UNPINNED note is hidden from the injected prompt (but retained in the ledger for audit). Overrides the category default TTL. Ignored when pinned is true."
|
|
1183
|
+
},
|
|
1184
|
+
supersedes: {
|
|
1185
|
+
type: "string",
|
|
1186
|
+
description: "Optional version-supersede: the note_id of an earlier note this one replaces, OR a subject_key shared with earlier notes. At injection any earlier LIVE note matching this id/subject is hidden from the prompt (its ledger entry is retained for audit). Use when you record an updated lesson that makes a prior one obsolete. Pinned notes are never hidden by supersede."
|
|
1187
|
+
},
|
|
1188
|
+
subject_key: {
|
|
1189
|
+
type: "string",
|
|
1190
|
+
description: "Optional stable subject key grouping notes about the same subject. Drives version-supersede targeting and read-side same-class folding (multiple live notes with the same category AND subject_key collapse to one injected entry, newest kept, older ids listed). When omitted, folding falls back to a leading [tag] bracket in the text."
|
|
1175
1191
|
}
|
|
1176
1192
|
},
|
|
1177
1193
|
required: ["text"]
|
|
@@ -4353,6 +4369,15 @@ async function meshRecordNote(ctx, args) {
|
|
|
4353
4369
|
}
|
|
4354
4370
|
const category = args.category === "provider_quirk" || args.category === "pattern_to_avoid" || args.category === "recovery_lesson" ? args.category : void 0;
|
|
4355
4371
|
const createdAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
4372
|
+
const pinned = args.pinned === true ? true : void 0;
|
|
4373
|
+
let expiresAt;
|
|
4374
|
+
if (typeof args.expiresAt === "string" && !Number.isNaN(new Date(args.expiresAt).getTime())) {
|
|
4375
|
+
expiresAt = new Date(args.expiresAt).toISOString();
|
|
4376
|
+
} else if (typeof args.ttl_days === "number" && Number.isFinite(args.ttl_days) && args.ttl_days > 0) {
|
|
4377
|
+
expiresAt = new Date(new Date(createdAt).getTime() + args.ttl_days * 24 * 60 * 60 * 1e3).toISOString();
|
|
4378
|
+
}
|
|
4379
|
+
const supersedes = typeof args.supersedes === "string" && args.supersedes.trim() ? args.supersedes.trim() : void 0;
|
|
4380
|
+
const subjectKey = typeof args.subject_key === "string" && args.subject_key.trim() ? args.subject_key.trim() : void 0;
|
|
4356
4381
|
const sourceCoordinator = ctx.coordinatorSessionId || ctx.localDaemonId || ctx.coordinatorHostname || void 0;
|
|
4357
4382
|
const entry = (0, import_daemon_core4.appendLedgerEntry)(mesh.id, {
|
|
4358
4383
|
kind: "coordinator_operating_note",
|
|
@@ -4361,14 +4386,26 @@ async function meshRecordNote(ctx, args) {
|
|
|
4361
4386
|
text,
|
|
4362
4387
|
...category ? { category } : {},
|
|
4363
4388
|
createdAt,
|
|
4364
|
-
...sourceCoordinator ? { sourceCoordinator } : {}
|
|
4389
|
+
...sourceCoordinator ? { sourceCoordinator } : {},
|
|
4390
|
+
...pinned ? { pinned } : {},
|
|
4391
|
+
...expiresAt ? { expiresAt } : {},
|
|
4392
|
+
...supersedes ? { supersedes } : {},
|
|
4393
|
+
...subjectKey ? { subjectKey } : {}
|
|
4365
4394
|
}
|
|
4366
4395
|
});
|
|
4367
4396
|
return JSON.stringify({
|
|
4368
4397
|
success: true,
|
|
4369
4398
|
meshId: mesh.id,
|
|
4370
4399
|
noteId: entry.id,
|
|
4371
|
-
recorded: {
|
|
4400
|
+
recorded: {
|
|
4401
|
+
text,
|
|
4402
|
+
category: category ?? null,
|
|
4403
|
+
createdAt,
|
|
4404
|
+
pinned: pinned ?? false,
|
|
4405
|
+
expiresAt: expiresAt ?? null,
|
|
4406
|
+
supersedes: supersedes ?? null,
|
|
4407
|
+
subjectKey: subjectKey ?? null
|
|
4408
|
+
},
|
|
4372
4409
|
note: 'Recorded to the mesh ledger. Future coordinators on this mesh will see it under "## Operating Notes" at launch.'
|
|
4373
4410
|
}, null, 2);
|
|
4374
4411
|
}
|