@adhdev/daemon-standalone 1.0.18-rc.7 → 1.0.18-rc.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-standalone",
3
- "version": "1.0.18-rc.7",
3
+ "version": "1.0.18-rc.9",
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.7",
40
+ "@adhdev/session-host-core": "1.0.18-rc.9",
41
41
  "@xterm/addon-serialize": "^0.14.0",
42
42
  "@xterm/xterm": "^6.0.0",
43
43
  "chalk": "^5.3.0",
@@ -1180,6 +1180,14 @@ var MESH_RECORD_NOTE_TOOL = {
1180
1180
  ttl_days: {
1181
1181
  type: "number",
1182
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."
1183
1191
  }
1184
1192
  },
1185
1193
  required: ["text"]
@@ -4368,6 +4376,8 @@ async function meshRecordNote(ctx, args) {
4368
4376
  } else if (typeof args.ttl_days === "number" && Number.isFinite(args.ttl_days) && args.ttl_days > 0) {
4369
4377
  expiresAt = new Date(new Date(createdAt).getTime() + args.ttl_days * 24 * 60 * 60 * 1e3).toISOString();
4370
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;
4371
4381
  const sourceCoordinator = ctx.coordinatorSessionId || ctx.localDaemonId || ctx.coordinatorHostname || void 0;
4372
4382
  const entry = (0, import_daemon_core4.appendLedgerEntry)(mesh.id, {
4373
4383
  kind: "coordinator_operating_note",
@@ -4378,14 +4388,24 @@ async function meshRecordNote(ctx, args) {
4378
4388
  createdAt,
4379
4389
  ...sourceCoordinator ? { sourceCoordinator } : {},
4380
4390
  ...pinned ? { pinned } : {},
4381
- ...expiresAt ? { expiresAt } : {}
4391
+ ...expiresAt ? { expiresAt } : {},
4392
+ ...supersedes ? { supersedes } : {},
4393
+ ...subjectKey ? { subjectKey } : {}
4382
4394
  }
4383
4395
  });
4384
4396
  return JSON.stringify({
4385
4397
  success: true,
4386
4398
  meshId: mesh.id,
4387
4399
  noteId: entry.id,
4388
- recorded: { text, category: category ?? null, createdAt, pinned: pinned ?? false, expiresAt: expiresAt ?? null },
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
+ },
4389
4409
  note: 'Recorded to the mesh ledger. Future coordinators on this mesh will see it under "## Operating Notes" at launch.'
4390
4410
  }, null, 2);
4391
4411
  }