signetai 0.185.8 → 0.186.0

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/mcp-stdio.js CHANGED
@@ -52327,7 +52327,9 @@ function applySetClaimValue(db, agentId, proposal, payload, writeCaps) {
52327
52327
  memoryId,
52328
52328
  version: version2,
52329
52329
  versionRootId: rootId,
52330
- previousAttributeId: previous?.id ?? null
52330
+ previousAttributeId: previous?.id ?? null,
52331
+ previousWasActive: previous?.status === "active",
52332
+ supersededAttributeIds: active.map((row) => row.id)
52331
52333
  };
52332
52334
  }
52333
52335
  function applySupersedeClaimValue(db, agentId, proposal, payload) {
@@ -52369,6 +52371,7 @@ function applySupersedeClaimValue(db, agentId, proposal, payload) {
52369
52371
  throw new OntologyProposalError("No active claim values matched supersession payload", 400);
52370
52372
  const replacementValue = readString2(payload, "new_value");
52371
52373
  let replacementId = null;
52374
+ let replacementCreated = false;
52372
52375
  if (replacementValue !== null) {
52373
52376
  if (oldValue !== null && canonical(replacementValue) === canonical(oldValue)) {
52374
52377
  throw new OntologyProposalError("payload.new_value must differ from payload.old_value", 400);
@@ -52385,6 +52388,7 @@ function applySupersedeClaimValue(db, agentId, proposal, payload) {
52385
52388
  entity_type: readString2(payload, "entity_type") ?? undefined
52386
52389
  });
52387
52390
  replacementId = typeof replacement.attributeId === "string" ? replacement.attributeId : null;
52391
+ replacementCreated = replacement.deduped !== true && replacementId !== null;
52388
52392
  }
52389
52393
  const requestedReplacementId = readString2(payload, "superseded_by");
52390
52394
  const supersededBy = replacementId ?? requestedReplacementId;
@@ -52407,7 +52411,7 @@ function applySupersedeClaimValue(db, agentId, proposal, payload) {
52407
52411
  supersedeAttributeMemoryInTx(db, { memoryId: row.memory_id, replacementMemoryId, proposal });
52408
52412
  }
52409
52413
  }
52410
- return { supersededAttributeIds: ids, replacementAttributeId: replacementId };
52414
+ return { supersededAttributeIds: ids, replacementAttributeId: replacementId, replacementCreated };
52411
52415
  }
52412
52416
  function applyRenameEntity(db, agentId, proposal, payload) {
52413
52417
  const selector = readPayloadSelector(payload, "selector", "entity", "entity_id", "name");
@@ -52598,14 +52602,16 @@ function mergeEntityAspects(db, agentId, sourceId, targetId) {
52598
52602
  return aspects.length;
52599
52603
  }
52600
52604
  function mergeEntityEdges(db, agentId, sourceId, targetId) {
52601
- db.prepare("UPDATE entity_dependencies SET source_entity_id = ? WHERE source_entity_id = ? AND agent_id = ?").run(targetId, sourceId, agentId);
52602
- db.prepare("UPDATE entity_dependencies SET target_entity_id = ? WHERE target_entity_id = ? AND agent_id = ?").run(targetId, sourceId, agentId);
52603
- db.prepare("DELETE FROM entity_dependencies WHERE source_entity_id = target_entity_id AND agent_id = ?").run(agentId);
52604
- db.prepare("UPDATE relations SET source_entity_id = ? WHERE source_entity_id = ?").run(targetId, sourceId);
52605
- db.prepare("UPDATE relations SET target_entity_id = ? WHERE target_entity_id = ?").run(targetId, sourceId);
52606
- db.prepare("DELETE FROM relations WHERE source_entity_id = target_entity_id").run();
52605
+ let relationshipChanges = 0;
52606
+ relationshipChanges += db.prepare("UPDATE entity_dependencies SET source_entity_id = ? WHERE source_entity_id = ? AND agent_id = ?").run(targetId, sourceId, agentId).changes;
52607
+ relationshipChanges += db.prepare("UPDATE entity_dependencies SET target_entity_id = ? WHERE target_entity_id = ? AND agent_id = ?").run(targetId, sourceId, agentId).changes;
52608
+ relationshipChanges += db.prepare("DELETE FROM entity_dependencies WHERE source_entity_id = target_entity_id AND agent_id = ?").run(agentId).changes;
52609
+ relationshipChanges += db.prepare("UPDATE relations SET source_entity_id = ? WHERE source_entity_id = ?").run(targetId, sourceId).changes;
52610
+ relationshipChanges += db.prepare("UPDATE relations SET target_entity_id = ? WHERE target_entity_id = ?").run(targetId, sourceId).changes;
52611
+ relationshipChanges += db.prepare("DELETE FROM relations WHERE source_entity_id = target_entity_id").run().changes;
52607
52612
  db.prepare("INSERT OR IGNORE INTO memory_entity_mentions (memory_id, entity_id) SELECT memory_id, ? FROM memory_entity_mentions WHERE entity_id = ?").run(targetId, sourceId);
52608
52613
  db.prepare("DELETE FROM memory_entity_mentions WHERE entity_id = ?").run(sourceId);
52614
+ return relationshipChanges;
52609
52615
  }
52610
52616
  function applyMergeEntities(db, agentId, payload) {
52611
52617
  const sources = sourceMergeSpecs(payload);
@@ -52620,9 +52626,10 @@ function applyMergeEntities(db, agentId, payload) {
52620
52626
  if (plan.blocked)
52621
52627
  throw new OntologyProposalError(`Merge blocked: ${plan.warnings.join("; ")}`, 409);
52622
52628
  const merged = [];
52629
+ let relationshipChanges = 0;
52623
52630
  for (const source of plan.sources) {
52624
52631
  const movedAspects = mergeEntityAspects(db, agentId, source.id, plan.target.id);
52625
- mergeEntityEdges(db, agentId, source.id, plan.target.id);
52632
+ relationshipChanges += mergeEntityEdges(db, agentId, source.id, plan.target.id);
52626
52633
  db.prepare(`UPDATE entities
52627
52634
  SET mentions = COALESCE(mentions, 0) + COALESCE((SELECT mentions FROM entities WHERE id = ?), 0),
52628
52635
  updated_at = datetime('now')
@@ -52636,7 +52643,8 @@ function applyMergeEntities(db, agentId, payload) {
52636
52643
  targetEntityId: plan.target.id,
52637
52644
  targetEntityName: plan.target.name,
52638
52645
  mergedEntities: merged,
52639
- warnings: plan.warnings
52646
+ warnings: plan.warnings,
52647
+ relationshipsChanged: relationshipChanges
52640
52648
  };
52641
52649
  }
52642
52650
  function applyMergeAspects(db, agentId, proposal, payload) {
@@ -54418,6 +54426,7 @@ function createDreamingCapabilities(params) {
54418
54426
  agentId: exports_external.string().min(1),
54419
54427
  operations: exports_external.array(DREAMING_ONTOLOGY_OPERATION_SCHEMA).min(1).max(100)
54420
54428
  }), async ({ agentId: scopeId, operations }) => {
54429
+ params.onOperationsAboutToApply?.(operations, scopeId);
54421
54430
  const result = applyDreamingOperations({
54422
54431
  accessor,
54423
54432
  agentId: scopeId,
@@ -54426,7 +54435,7 @@ function createDreamingCapabilities(params) {
54426
54435
  passId: params.passId,
54427
54436
  writeCaps: params.writeCaps
54428
54437
  });
54429
- params.onOperationsApplied?.(result, operations);
54438
+ params.onOperationsApplied?.(result, operations, scopeId);
54430
54439
  return { ok: result.ok, ...result.error ? { error: result.error } : {}, items: result.items };
54431
54440
  })
54432
54441
  ];
@@ -1,43 +1,43 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "0.185.8",
3
+ "version": "0.186.0",
4
4
  "assets": [
5
5
  {
6
6
  "name": "signet-darwin-arm64",
7
7
  "platform": "darwin-arm64",
8
- "sha256": "43c656192d2c0b5570e251ecdc91510d308ffad624956579175c8f3da59be654",
8
+ "sha256": "ab7701832045a5bd9027a218ec5aa2763e894fccde85bb90d5b9ac86b2038007",
9
9
  "size": 117655840
10
10
  },
11
11
  {
12
12
  "name": "signet-darwin-x64",
13
13
  "platform": "darwin-x64",
14
- "sha256": "c1e98a8535b41f0a9d558765096108befd54f7276a8fefea3767167f4ffedb39",
14
+ "sha256": "5c913cd9f7d433ba8b6dde6a6daf2bc2b93a147e2057b07fa4497b4a60970496",
15
15
  "size": 122276416
16
16
  },
17
17
  {
18
18
  "name": "signet-linux-arm64",
19
19
  "platform": "linux-arm64",
20
- "sha256": "a348c118c6e915deef062a1e04cb3d6e37f9457e25e0a645e17103034ad949fa",
21
- "size": 154881963
20
+ "sha256": "4142ceb57fd31f7ea8b518d4cc19ec9a5fe0508d77984d0b00624de1b3d4860b",
21
+ "size": 154898234
22
22
  },
23
23
  {
24
24
  "name": "signet-linux-x64",
25
25
  "platform": "linux-x64",
26
- "sha256": "ae46996ae0772cbf4185dbf9e2373222f681f2b003dbd9a52442a569e0c4d50c",
27
- "size": 155440948
26
+ "sha256": "d1430dd8767211add8da1405642c2b50d784952f61f12fe44a7a3d392662c3d6",
27
+ "size": 155457219
28
28
  },
29
29
  {
30
30
  "name": "signet-win32-x64.exe",
31
31
  "platform": "win32-x64",
32
- "sha256": "4b13a230694a1743b0aff896cab4e4d5846b13591470c8c0498bd987cd4adfa1",
33
- "size": 171573248
32
+ "sha256": "af0d6d572b62d2856f8471c97e50f303be75a0bcc34b5c0c26c5d30a63c984ee",
33
+ "size": 171589632
34
34
  }
35
35
  ],
36
36
  "components": {
37
37
  "connectors": {
38
- "url": "signet-connectors-0.185.8.tar.gz",
39
- "sha256": "85e75328ad7b23a6bccdb445e8aa4dac432a52d80ef8ee3865ddfb33b21f1a5c",
40
- "size": 16888
38
+ "url": "signet-connectors-0.186.0.tar.gz",
39
+ "sha256": "7f355bb31a1070c7d0a0b4775dcd1daedd123b1a74f459e723953e6dd33372ab",
40
+ "size": 16887
41
41
  }
42
42
  }
43
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signetai",
3
- "version": "0.185.8",
3
+ "version": "0.186.0",
4
4
  "description": "Signet native CLI installer wrapper",
5
5
  "type": "module",
6
6
  "bin": {
@@ -65,10 +65,10 @@
65
65
  "access": "public"
66
66
  },
67
67
  "optionalDependencies": {
68
- "signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.185.8/signetai-darwin-arm64-0.185.8.tgz",
69
- "signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.185.8/signetai-darwin-x64-0.185.8.tgz",
70
- "signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.185.8/signetai-linux-arm64-0.185.8.tgz",
71
- "signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.185.8/signetai-linux-x64-0.185.8.tgz",
72
- "signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.185.8/signetai-win32-x64-0.185.8.tgz"
68
+ "signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.186.0/signetai-darwin-arm64-0.186.0.tgz",
69
+ "signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.186.0/signetai-darwin-x64-0.186.0.tgz",
70
+ "signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.186.0/signetai-linux-arm64-0.186.0.tgz",
71
+ "signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.186.0/signetai-linux-x64-0.186.0.tgz",
72
+ "signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.186.0/signetai-win32-x64-0.186.0.tgz"
73
73
  }
74
74
  }