@inerrata-corporation/errata 2.0.22-dev.4186 → 2.0.22-dev.4277

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.
@@ -17052,7 +17052,7 @@ function installHistoryAttrSlim(db) {
17052
17052
  }
17053
17053
 
17054
17054
  // ../../packages/local-graph/src/text-index.ts
17055
- var TEXT_INDEX_KEY = "text-index-trigram-1";
17055
+ var TEXT_INDEX_KEY = "text-index-trigram-2";
17056
17056
  var TEXT_INDEX_MIN_TERM = 3;
17057
17057
  function installTextIndex(db) {
17058
17058
  if (db.prepare("SELECT value FROM store_meta WHERE key = ?").get(TEXT_INDEX_KEY)) return;
@@ -17065,17 +17065,23 @@ function installTextIndex(db) {
17065
17065
  db.transaction(() => {
17066
17066
  db.exec(`CREATE VIRTUAL TABLE IF NOT EXISTS nodes_text
17067
17067
  USING fts5(description, content='nodes', content_rowid='rowid', tokenize='trigram')`);
17068
+ db.exec(`DROP TRIGGER IF EXISTS nodes_text_update_out; DROP TRIGGER IF EXISTS nodes_text_update_in;
17069
+ DROP TRIGGER IF EXISTS nodes_text_update`);
17068
17070
  db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_insert AFTER INSERT ON nodes WHEN NEW.valid_to IS NULL
17069
17071
  BEGIN INSERT INTO nodes_text(rowid, description) VALUES (NEW.rowid, NEW.description); END;`);
17070
- db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_update_out AFTER UPDATE OF description, valid_to ON nodes
17071
- WHEN OLD.valid_to IS NULL
17072
- BEGIN INSERT INTO nodes_text(nodes_text, rowid, description) VALUES ('delete', OLD.rowid, OLD.description); END;`);
17073
- db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_update_in AFTER UPDATE OF description, valid_to ON nodes
17074
- WHEN NEW.valid_to IS NULL
17075
- BEGIN INSERT INTO nodes_text(rowid, description) VALUES (NEW.rowid, NEW.description); END;`);
17072
+ db.exec(`CREATE TRIGGER nodes_text_update AFTER UPDATE OF description, valid_to ON nodes
17073
+ WHEN OLD.description IS NOT NEW.description OR OLD.valid_to IS NOT NEW.valid_to
17074
+ BEGIN
17075
+ INSERT INTO nodes_text(nodes_text, rowid, description)
17076
+ SELECT 'delete', OLD.rowid, OLD.description WHERE OLD.valid_to IS NULL;
17077
+ INSERT INTO nodes_text(rowid, description)
17078
+ SELECT NEW.rowid, NEW.description WHERE NEW.valid_to IS NULL;
17079
+ END;`);
17076
17080
  db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_delete AFTER DELETE ON nodes WHEN OLD.valid_to IS NULL
17077
17081
  BEGIN INSERT INTO nodes_text(nodes_text, rowid, description) VALUES ('delete', OLD.rowid, OLD.description); END;`);
17082
+ db.exec(`INSERT INTO nodes_text(nodes_text) VALUES ('delete-all')`);
17078
17083
  db.exec(`INSERT INTO nodes_text(rowid, description) SELECT rowid, description FROM nodes WHERE valid_to IS NULL`);
17084
+ db.prepare("INSERT OR REPLACE INTO store_meta(key,value) VALUES (?,?)").run("text-index-trigram-1", "installed");
17079
17085
  db.prepare("INSERT INTO store_meta(key,value) VALUES (?,?)").run(TEXT_INDEX_KEY, "installed");
17080
17086
  });
17081
17087
  }
package/errata.mjs CHANGED
@@ -19108,17 +19108,23 @@ function installTextIndex(db) {
19108
19108
  db.transaction(() => {
19109
19109
  db.exec(`CREATE VIRTUAL TABLE IF NOT EXISTS nodes_text
19110
19110
  USING fts5(description, content='nodes', content_rowid='rowid', tokenize='trigram')`);
19111
+ db.exec(`DROP TRIGGER IF EXISTS nodes_text_update_out; DROP TRIGGER IF EXISTS nodes_text_update_in;
19112
+ DROP TRIGGER IF EXISTS nodes_text_update`);
19111
19113
  db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_insert AFTER INSERT ON nodes WHEN NEW.valid_to IS NULL
19112
19114
  BEGIN INSERT INTO nodes_text(rowid, description) VALUES (NEW.rowid, NEW.description); END;`);
19113
- db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_update_out AFTER UPDATE OF description, valid_to ON nodes
19114
- WHEN OLD.valid_to IS NULL
19115
- BEGIN INSERT INTO nodes_text(nodes_text, rowid, description) VALUES ('delete', OLD.rowid, OLD.description); END;`);
19116
- db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_update_in AFTER UPDATE OF description, valid_to ON nodes
19117
- WHEN NEW.valid_to IS NULL
19118
- BEGIN INSERT INTO nodes_text(rowid, description) VALUES (NEW.rowid, NEW.description); END;`);
19115
+ db.exec(`CREATE TRIGGER nodes_text_update AFTER UPDATE OF description, valid_to ON nodes
19116
+ WHEN OLD.description IS NOT NEW.description OR OLD.valid_to IS NOT NEW.valid_to
19117
+ BEGIN
19118
+ INSERT INTO nodes_text(nodes_text, rowid, description)
19119
+ SELECT 'delete', OLD.rowid, OLD.description WHERE OLD.valid_to IS NULL;
19120
+ INSERT INTO nodes_text(rowid, description)
19121
+ SELECT NEW.rowid, NEW.description WHERE NEW.valid_to IS NULL;
19122
+ END;`);
19119
19123
  db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_delete AFTER DELETE ON nodes WHEN OLD.valid_to IS NULL
19120
19124
  BEGIN INSERT INTO nodes_text(nodes_text, rowid, description) VALUES ('delete', OLD.rowid, OLD.description); END;`);
19125
+ db.exec(`INSERT INTO nodes_text(nodes_text) VALUES ('delete-all')`);
19121
19126
  db.exec(`INSERT INTO nodes_text(rowid, description) SELECT rowid, description FROM nodes WHERE valid_to IS NULL`);
19127
+ db.prepare("INSERT OR REPLACE INTO store_meta(key,value) VALUES (?,?)").run("text-index-trigram-1", "installed");
19122
19128
  db.prepare("INSERT INTO store_meta(key,value) VALUES (?,?)").run(TEXT_INDEX_KEY, "installed");
19123
19129
  });
19124
19130
  }
@@ -19129,7 +19135,7 @@ var TEXT_INDEX_KEY, TEXT_INDEX_MIN_TERM;
19129
19135
  var init_text_index = __esm({
19130
19136
  "../../packages/local-graph/src/text-index.ts"() {
19131
19137
  "use strict";
19132
- TEXT_INDEX_KEY = "text-index-trigram-1";
19138
+ TEXT_INDEX_KEY = "text-index-trigram-2";
19133
19139
  TEXT_INDEX_MIN_TERM = 3;
19134
19140
  }
19135
19141
  });
@@ -37458,6 +37464,7 @@ function isQuotaError(err2) {
37458
37464
  async function dualAugment(opts) {
37459
37465
  const { store, cloud, localHits, seedNode, queryText, limit, generalizeSoft } = opts;
37460
37466
  const cloudHits = [];
37467
+ let completeResponse = true;
37461
37468
  let seedUsageCount;
37462
37469
  let seedProvenance = "local";
37463
37470
  const calls = [];
@@ -37484,6 +37491,7 @@ async function dualAugment(opts) {
37484
37491
  if (cloudSeeds.length > 0 || softQ) {
37485
37492
  calls.push(
37486
37493
  cloud.search({ stack: [], domains: [], kinds: [], seed: cloudSeeds, ...softQ ? { q: softQ } : {}, limit, community: true, via: true }).then((res) => {
37494
+ if (res.seeds?.some((seed) => seed.status === "error")) completeResponse = false;
37487
37495
  cloudHits.push(...searchResultToCloudHits(res));
37488
37496
  })
37489
37497
  );
@@ -37505,18 +37513,29 @@ async function dualAugment(opts) {
37505
37513
  }
37506
37514
  if (cloudHits.length === 0) return { status: "empty" };
37507
37515
  const deduped = dedupCloudHits(cloudHits);
37516
+ const merged = mergeDualBurst(localHits, deduped, {
37517
+ // A hit's `via` parent is resolved too, so an edge from a folded twin
37518
+ // can be re-pointed at the entity it folded into.
37519
+ twins: storeTwinIndex(store, deduped.flatMap((c) => {
37520
+ const parent = c.via?.parentId;
37521
+ return parent ? [c.id, parent] : [c.id];
37522
+ })),
37523
+ ...seedNode ? { seedId: seedNode.id } : {},
37524
+ ...opts.fuse ? { fuse: opts.fuse } : {}
37525
+ });
37526
+ if (completeResponse) {
37527
+ const candidates = new Set(deduped.filter((hit) => !isCodeLabel(hit.label)).map((hit) => hit.id));
37528
+ const localIds = /* @__PURE__ */ new Set([...localHits.map((hit) => hit.id), ...seedNode ? [seedNode.id] : []]);
37529
+ const emitted = [];
37530
+ for (const node2 of merged.nodes) {
37531
+ const ids = [...node2.provenance === "collective" ? [node2.id] : [], ...node2.twins ?? []];
37532
+ for (const id of ids) if (candidates.has(id) && !localIds.has(id)) emitted.push(id);
37533
+ }
37534
+ rememberCollectiveIds(cloud, emitted);
37535
+ }
37508
37536
  return {
37509
37537
  status: "merged",
37510
- merged: mergeDualBurst(localHits, deduped, {
37511
- // A hit's `via` parent is resolved too, so an edge from a folded twin
37512
- // can be re-pointed at the entity it folded into.
37513
- twins: storeTwinIndex(store, deduped.flatMap((c) => {
37514
- const parent = c.via?.parentId;
37515
- return parent ? [c.id, parent] : [c.id];
37516
- })),
37517
- ...seedNode ? { seedId: seedNode.id } : {},
37518
- ...opts.fuse ? { fuse: opts.fuse } : {}
37519
- }),
37538
+ merged,
37520
37539
  seedProvenance,
37521
37540
  seedUsageCount
37522
37541
  };
@@ -37534,6 +37553,38 @@ function federationHint(status) {
37534
37553
  function hasCloudNodeShape(id) {
37535
37554
  return CANONICAL_KNOWLEDGE_ID.test(id) || UUID_ID.test(id) || id.startsWith("pkg:");
37536
37555
  }
37556
+ function safeCollectiveId(id) {
37557
+ if (typeof id !== "string") return false;
37558
+ const separator = id.indexOf("_");
37559
+ return id.length > 0 && id.trim() === id && !/[\u0000-\u001f\u007f,]/.test(id) && !(separator > 0 && isCodeLabel(id.slice(0, separator)));
37560
+ }
37561
+ function rememberCollectiveIds(cloud, ids) {
37562
+ const now = Date.now();
37563
+ let remembered = returnedCollectiveIds.get(cloud);
37564
+ if (!remembered) {
37565
+ remembered = /* @__PURE__ */ new Map();
37566
+ returnedCollectiveIds.set(cloud, remembered);
37567
+ }
37568
+ for (const [id, expiresAt] of remembered) if (expiresAt <= now) remembered.delete(id);
37569
+ for (const id of ids) {
37570
+ if (!safeCollectiveId(id) || id.length > 160) continue;
37571
+ remembered.delete(id);
37572
+ remembered.set(id, now + COLLECTIVE_ID_TTL_MS);
37573
+ if (remembered.size > COLLECTIVE_ID_LIMIT) remembered.delete(remembered.keys().next().value);
37574
+ }
37575
+ }
37576
+ function canFollowCollectiveId(cloud, id) {
37577
+ if (!safeCollectiveId(id)) return false;
37578
+ if (hasCloudNodeShape(id)) return true;
37579
+ const remembered = returnedCollectiveIds.get(cloud);
37580
+ const expiresAt = remembered?.get(id);
37581
+ if (expiresAt === void 0) return false;
37582
+ if (expiresAt <= Date.now()) {
37583
+ remembered.delete(id);
37584
+ return false;
37585
+ }
37586
+ return true;
37587
+ }
37537
37588
  function attrsCommunity(attrs) {
37538
37589
  const id = attrs?.["community"];
37539
37590
  if (typeof id !== "number") return void 0;
@@ -37573,7 +37624,7 @@ async function collectiveDrilldown(cloud, seedId, limit, opts = {}) {
37573
37624
  if (resolution === "unresolved") return { status: "no-twin" };
37574
37625
  if (resolution === "error") return { status: "seed-error" };
37575
37626
  if (res.nodes.length === 0 && resolution !== "resolved") return { status: "no-twin" };
37576
- return {
37627
+ const resolved = {
37577
37628
  status: "resolved",
37578
37629
  neighborhood: {
37579
37630
  seed: seedId,
@@ -37600,6 +37651,10 @@ async function collectiveDrilldown(cloud, seedId, limit, opts = {}) {
37600
37651
  ...seedEntry?.bridges ? { bridges: seedEntry.bridges } : {}
37601
37652
  }
37602
37653
  };
37654
+ if (!res.seeds?.some((seed) => seed.status === "error")) {
37655
+ rememberCollectiveIds(cloud, resolved.neighborhood.nodes.filter((node2) => node2.id !== seedId && !isCodeLabel(node2.label)).map((node2) => node2.id));
37656
+ }
37657
+ return resolved;
37603
37658
  }
37604
37659
  async function collectiveNodeDetail(cloud, id) {
37605
37660
  const read2 = async (nodeId) => {
@@ -37676,7 +37731,7 @@ function formatDualNodes(merged) {
37676
37731
  ...n.uploaded ? { uploaded: true } : {}
37677
37732
  }));
37678
37733
  }
37679
- var BRIDGE_LABELS, CANONICAL_KNOWLEDGE_ID, UUID_ID;
37734
+ var BRIDGE_LABELS, CANONICAL_KNOWLEDGE_ID, UUID_ID, COLLECTIVE_ID_LIMIT, COLLECTIVE_ID_TTL_MS, returnedCollectiveIds;
37680
37735
  var init_dual_augment = __esm({
37681
37736
  "src/dual-augment.ts"() {
37682
37737
  "use strict";
@@ -37687,6 +37742,9 @@ var init_dual_augment = __esm({
37687
37742
  BRIDGE_LABELS = new Set(SEMANTIC_NODE_LABELS);
37688
37743
  CANONICAL_KNOWLEDGE_ID = /^[a-z][a-z0-9]*_[0-9a-f]{8,}$/;
37689
37744
  UUID_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
37745
+ COLLECTIVE_ID_LIMIT = 512;
37746
+ COLLECTIVE_ID_TTL_MS = 15 * 6e4;
37747
+ returnedCollectiveIds = /* @__PURE__ */ new WeakMap();
37690
37748
  }
37691
37749
  });
37692
37750
 
@@ -47083,7 +47141,7 @@ function cosine3(a, b) {
47083
47141
  }
47084
47142
  async function collectiveSeedFallback(args2, ctx, defaultLimit, opts = {}) {
47085
47143
  const seedId = typeof args2["nodeId"] === "string" ? args2["nodeId"] : null;
47086
- if (!seedId || !ctx.cloud || !hasCloudNodeShape(seedId)) return null;
47144
+ if (!seedId || !ctx.cloud || !canFollowCollectiveId(ctx.cloud, seedId)) return null;
47087
47145
  const limit = Math.max(1, Math.min(100, Number(args2["limit"] ?? defaultLimit)));
47088
47146
  const scope = args2["scope"];
47089
47147
  return collectiveDrilldown(ctx.cloud, seedId, limit, {
@@ -48177,7 +48235,7 @@ var init_mcp = __esm({
48177
48235
  const id = resolveSymbol2(store, args2);
48178
48236
  if (!id) {
48179
48237
  const seedId = typeof args2["nodeId"] === "string" ? args2["nodeId"] : null;
48180
- if (!seedId || !ctx.cloud || !hasCloudNodeShape(seedId)) return unresolved(args2);
48238
+ if (!seedId || !ctx.cloud || !canFollowCollectiveId(ctx.cloud, seedId)) return unresolved(args2);
48181
48239
  const shown = await collectiveNodeDetail(ctx.cloud, seedId);
48182
48240
  if (shown.status !== "found") return collectiveSeedMiss(args2, shown);
48183
48241
  return {
@@ -86169,7 +86227,7 @@ function createWatchBreaker(deps) {
86169
86227
  }
86170
86228
 
86171
86229
  // src/engine.ts
86172
- var DAEMON_VERSION = true ? "2.0.22-dev.4186" : "2.0.0-alpha.0";
86230
+ var DAEMON_VERSION = true ? "2.0.22-dev.4277" : "2.0.0-alpha.0";
86173
86231
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
86174
86232
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
86175
86233
  var GIT_OP_MUTE_MS = 4e3;
@@ -15630,7 +15630,7 @@ function installHistoryAttrSlim(db) {
15630
15630
  }
15631
15631
 
15632
15632
  // ../../packages/local-graph/src/text-index.ts
15633
- var TEXT_INDEX_KEY = "text-index-trigram-1";
15633
+ var TEXT_INDEX_KEY = "text-index-trigram-2";
15634
15634
  var TEXT_INDEX_MIN_TERM = 3;
15635
15635
  function installTextIndex(db) {
15636
15636
  if (db.prepare("SELECT value FROM store_meta WHERE key = ?").get(TEXT_INDEX_KEY)) return;
@@ -15643,17 +15643,23 @@ function installTextIndex(db) {
15643
15643
  db.transaction(() => {
15644
15644
  db.exec(`CREATE VIRTUAL TABLE IF NOT EXISTS nodes_text
15645
15645
  USING fts5(description, content='nodes', content_rowid='rowid', tokenize='trigram')`);
15646
+ db.exec(`DROP TRIGGER IF EXISTS nodes_text_update_out; DROP TRIGGER IF EXISTS nodes_text_update_in;
15647
+ DROP TRIGGER IF EXISTS nodes_text_update`);
15646
15648
  db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_insert AFTER INSERT ON nodes WHEN NEW.valid_to IS NULL
15647
15649
  BEGIN INSERT INTO nodes_text(rowid, description) VALUES (NEW.rowid, NEW.description); END;`);
15648
- db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_update_out AFTER UPDATE OF description, valid_to ON nodes
15649
- WHEN OLD.valid_to IS NULL
15650
- BEGIN INSERT INTO nodes_text(nodes_text, rowid, description) VALUES ('delete', OLD.rowid, OLD.description); END;`);
15651
- db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_update_in AFTER UPDATE OF description, valid_to ON nodes
15652
- WHEN NEW.valid_to IS NULL
15653
- BEGIN INSERT INTO nodes_text(rowid, description) VALUES (NEW.rowid, NEW.description); END;`);
15650
+ db.exec(`CREATE TRIGGER nodes_text_update AFTER UPDATE OF description, valid_to ON nodes
15651
+ WHEN OLD.description IS NOT NEW.description OR OLD.valid_to IS NOT NEW.valid_to
15652
+ BEGIN
15653
+ INSERT INTO nodes_text(nodes_text, rowid, description)
15654
+ SELECT 'delete', OLD.rowid, OLD.description WHERE OLD.valid_to IS NULL;
15655
+ INSERT INTO nodes_text(rowid, description)
15656
+ SELECT NEW.rowid, NEW.description WHERE NEW.valid_to IS NULL;
15657
+ END;`);
15654
15658
  db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_delete AFTER DELETE ON nodes WHEN OLD.valid_to IS NULL
15655
15659
  BEGIN INSERT INTO nodes_text(nodes_text, rowid, description) VALUES ('delete', OLD.rowid, OLD.description); END;`);
15660
+ db.exec(`INSERT INTO nodes_text(nodes_text) VALUES ('delete-all')`);
15656
15661
  db.exec(`INSERT INTO nodes_text(rowid, description) SELECT rowid, description FROM nodes WHERE valid_to IS NULL`);
15662
+ db.prepare("INSERT OR REPLACE INTO store_meta(key,value) VALUES (?,?)").run("text-index-trigram-1", "installed");
15657
15663
  db.prepare("INSERT INTO store_meta(key,value) VALUES (?,?)").run(TEXT_INDEX_KEY, "installed");
15658
15664
  });
15659
15665
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.22-dev.4186",
3
+ "version": "2.0.22-dev.4277",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
package/pass-worker.mjs CHANGED
@@ -26062,7 +26062,7 @@ function installHistoryAttrSlim(db) {
26062
26062
  }
26063
26063
 
26064
26064
  // ../../packages/local-graph/src/text-index.ts
26065
- var TEXT_INDEX_KEY = "text-index-trigram-1";
26065
+ var TEXT_INDEX_KEY = "text-index-trigram-2";
26066
26066
  var TEXT_INDEX_MIN_TERM = 3;
26067
26067
  function installTextIndex(db) {
26068
26068
  if (db.prepare("SELECT value FROM store_meta WHERE key = ?").get(TEXT_INDEX_KEY)) return;
@@ -26075,17 +26075,23 @@ function installTextIndex(db) {
26075
26075
  db.transaction(() => {
26076
26076
  db.exec(`CREATE VIRTUAL TABLE IF NOT EXISTS nodes_text
26077
26077
  USING fts5(description, content='nodes', content_rowid='rowid', tokenize='trigram')`);
26078
+ db.exec(`DROP TRIGGER IF EXISTS nodes_text_update_out; DROP TRIGGER IF EXISTS nodes_text_update_in;
26079
+ DROP TRIGGER IF EXISTS nodes_text_update`);
26078
26080
  db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_insert AFTER INSERT ON nodes WHEN NEW.valid_to IS NULL
26079
26081
  BEGIN INSERT INTO nodes_text(rowid, description) VALUES (NEW.rowid, NEW.description); END;`);
26080
- db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_update_out AFTER UPDATE OF description, valid_to ON nodes
26081
- WHEN OLD.valid_to IS NULL
26082
- BEGIN INSERT INTO nodes_text(nodes_text, rowid, description) VALUES ('delete', OLD.rowid, OLD.description); END;`);
26083
- db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_update_in AFTER UPDATE OF description, valid_to ON nodes
26084
- WHEN NEW.valid_to IS NULL
26085
- BEGIN INSERT INTO nodes_text(rowid, description) VALUES (NEW.rowid, NEW.description); END;`);
26082
+ db.exec(`CREATE TRIGGER nodes_text_update AFTER UPDATE OF description, valid_to ON nodes
26083
+ WHEN OLD.description IS NOT NEW.description OR OLD.valid_to IS NOT NEW.valid_to
26084
+ BEGIN
26085
+ INSERT INTO nodes_text(nodes_text, rowid, description)
26086
+ SELECT 'delete', OLD.rowid, OLD.description WHERE OLD.valid_to IS NULL;
26087
+ INSERT INTO nodes_text(rowid, description)
26088
+ SELECT NEW.rowid, NEW.description WHERE NEW.valid_to IS NULL;
26089
+ END;`);
26086
26090
  db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_delete AFTER DELETE ON nodes WHEN OLD.valid_to IS NULL
26087
26091
  BEGIN INSERT INTO nodes_text(nodes_text, rowid, description) VALUES ('delete', OLD.rowid, OLD.description); END;`);
26092
+ db.exec(`INSERT INTO nodes_text(nodes_text) VALUES ('delete-all')`);
26088
26093
  db.exec(`INSERT INTO nodes_text(rowid, description) SELECT rowid, description FROM nodes WHERE valid_to IS NULL`);
26094
+ db.prepare("INSERT OR REPLACE INTO store_meta(key,value) VALUES (?,?)").run("text-index-trigram-1", "installed");
26089
26095
  db.prepare("INSERT INTO store_meta(key,value) VALUES (?,?)").run(TEXT_INDEX_KEY, "installed");
26090
26096
  });
26091
26097
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "errata-context",
3
- "version": "2.0.22-dev.4186",
3
+ "version": "2.0.22-dev.4277",
4
4
  "description": "A minimal 3D view of loaded Errata priors and recent graph bursts.",
5
5
  "author": {
6
6
  "name": "inErrata"
@@ -1,4 +1,4 @@
1
- 0c3dd7adb669771f96dc8641fcdb302bb1d5441252d072f8b4cd9e3c947ab6c8 .codex-plugin/plugin.json
1
+ aab4192882dd94674f8df9d0515c99855cf4eb522269d0d7c79e4f6e8063561e .codex-plugin/plugin.json
2
2
  a7bebae9fb01c838d6c75fc784129e28be571233fa66ff5ee8039b574f35ccf7 assets/icon.png
3
3
  fc38b64e4df1e0b72c35764bef6c4c05430d97c9009ad0ecc8a9e75b4deab232 configure-local.mjs
4
4
  73dc6028b3b070257c7c31f252d11e55a9e096f4aed0f187f10cb21716e1e6d7 dist/client.js