signetai 0.171.0 → 0.172.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
@@ -52747,22 +52747,24 @@ function attentionProvenance(accessor, agentId, operation2, mintedById) {
52747
52747
  return null;
52748
52748
  let expectedTarget = false;
52749
52749
  if (operation2.operation === "archive_entity") {
52750
- expectedTarget = typeof payload2.target === "string" && payload2.target === attention.details.entityId && attention.subjectRef === `entity:${payload2.target}`;
52750
+ expectedTarget = pinnedTarget(payload2, attention, "entity:", "entityId");
52751
52751
  } else if (operation2.operation === "archive_aspect") {
52752
- expectedTarget = typeof payload2.target === "string" && payload2.target === attention.details.aspectId && attention.subjectRef === `aspect:${payload2.target}`;
52752
+ expectedTarget = pinnedTarget(payload2, attention, "aspect:", "aspectId");
52753
52753
  } else if (operation2.operation === "archive_claim_value") {
52754
- expectedTarget = typeof payload2.target === "string" && payload2.target === attention.details.attributeId && attention.subjectRef === `attribute:${payload2.target}`;
52754
+ expectedTarget = pinnedTarget(payload2, attention, "attribute:", "attributeId");
52755
52755
  } else if (operation2.operation === "archive_link") {
52756
- expectedTarget = typeof payload2.target === "string" && payload2.target === attention.details.linkId && attention.subjectRef === `link:${payload2.target}`;
52756
+ expectedTarget = pinnedTarget(payload2, attention, "link:", "linkId");
52757
52757
  } else if (operation2.operation === "merge_entities") {
52758
52758
  const targets = Array.isArray(payload2.targets) ? payload2.targets.filter((value) => typeof value === "string") : [];
52759
52759
  const survivor = typeof payload2.survivor === "string" ? payload2.survivor : "";
52760
- const groupIds = semanticDuplicateIds(accessor, agentId, attention.details.canonicalName ?? "");
52761
- expectedTarget = attention.subjectRef === `duplicate:${attention.details.canonicalName}` && groupIds.size > 1 && groupIds.has(survivor) && targets.length >= 2 && targets.every((id) => groupIds.has(id)) && targets.includes(survivor) && targets.some((id) => id !== survivor);
52760
+ const canonicalName = attention.details.canonicalName ?? pinnedBySubjectRef(attention.subjectRef, "duplicate:") ?? "";
52761
+ const groupIds = semanticDuplicateIds(accessor, agentId, canonicalName);
52762
+ expectedTarget = canonicalName.length > 0 && attention.subjectRef === `duplicate:${canonicalName}` && groupIds.size > 1 && groupIds.has(survivor) && targets.length >= 2 && targets.every((id) => groupIds.has(id)) && targets.includes(survivor) && targets.some((id) => id !== survivor);
52762
52763
  } else if (operation2.operation === "merge_aspects") {
52763
52764
  const sources = Array.isArray(payload2.sources) ? payload2.sources.filter((value) => typeof value === "string") : [];
52764
- const flaggedAspect = attention.details.aspectId ?? attention.subjectRef.replace(/^aspect:/, "");
52765
- expectedTarget = attention.subjectRef.startsWith("aspect:") && typeof payload2.target === "string" && sources.length >= 1 && sources.includes(flaggedAspect);
52765
+ const pinnedAspect = pinnedBySubjectRef(attention.subjectRef, "aspect:");
52766
+ const detailAgrees = pinnedAspect !== null && (attention.details.aspectId === undefined || attention.details.aspectId === pinnedAspect);
52767
+ expectedTarget = detailAgrees && typeof payload2.target === "string" && sources.length >= 1 && pinnedAspect !== null && sources.includes(pinnedAspect);
52766
52768
  }
52767
52769
  if (!expectedTarget)
52768
52770
  return null;
@@ -52785,6 +52787,20 @@ function attentionProvenance(accessor, agentId, operation2, mintedById) {
52785
52787
  attentionId: attention.id
52786
52788
  };
52787
52789
  }
52790
+ function pinnedBySubjectRef(subjectRef, prefix) {
52791
+ if (!subjectRef.startsWith(prefix))
52792
+ return null;
52793
+ const id = subjectRef.slice(prefix.length);
52794
+ return id.length > 0 ? id : null;
52795
+ }
52796
+ function pinnedTarget(payload2, attention, prefix, detailKey) {
52797
+ const target2 = typeof payload2.target === "string" ? payload2.target : null;
52798
+ const pinned = target2 !== null ? pinnedBySubjectRef(attention.subjectRef, prefix) : null;
52799
+ if (pinned === null || target2 !== pinned)
52800
+ return false;
52801
+ const detail = attention.details[detailKey];
52802
+ return detail === undefined || detail === target2;
52803
+ }
52788
52804
  function provenanceForEvidence(accessor, agentId, operation2) {
52789
52805
  const citations = operation2.evidence ?? [];
52790
52806
  if (citations.length === 0)
@@ -53033,6 +53049,18 @@ function applyDreamingOperations(params) {
53033
53049
  items.push({ index, ok: true, result: { attentionId: entry.attentionId } });
53034
53050
  continue;
53035
53051
  }
53052
+ if (entry.attentionId !== null) {
53053
+ const pending = db.prepare(`SELECT 1 FROM dreaming_attention
53054
+ WHERE id = ? AND agent_id = ? AND resolved_at IS NULL`).get(entry.attentionId, params.agentId);
53055
+ if (pending == null) {
53056
+ items.push({
53057
+ index,
53058
+ ok: false,
53059
+ error: "Attention already consumed by an earlier operation in this batch"
53060
+ });
53061
+ continue;
53062
+ }
53063
+ }
53036
53064
  const savepoint = `signet_dream_op_${index}`;
53037
53065
  db.exec(`SAVEPOINT ${savepoint}`);
53038
53066
  try {
@@ -1,43 +1,43 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "0.171.0",
3
+ "version": "0.172.0",
4
4
  "assets": [
5
5
  {
6
6
  "name": "signet-darwin-arm64",
7
7
  "platform": "darwin-arm64",
8
- "sha256": "d9a9f6bbf507325f5e99545fac91c17f109eb9578bbc02dcdba69cd954e12774",
8
+ "sha256": "01eb268bc03ceb775ec5a97b0f5e3ddca60da9f9b991281823dbf971c948e62e",
9
9
  "size": 117028384
10
10
  },
11
11
  {
12
12
  "name": "signet-darwin-x64",
13
13
  "platform": "darwin-x64",
14
- "sha256": "547ae0cea8586971d25b85ad69b93a60ffdcdf891aa0e620d200a0f51ec0db36",
14
+ "sha256": "6fa7c3d014299bcbc3ebcce3b4c49e0c8b12bd99bd01dcb1a4b0cf88b0e755db",
15
15
  "size": 121653824
16
16
  },
17
17
  {
18
18
  "name": "signet-linux-arm64",
19
19
  "platform": "linux-arm64",
20
- "sha256": "146a24621e2ae52363a22d62fca30a47f964f5ed89c2850359a416a8fce9b525",
21
- "size": 154263445
20
+ "sha256": "1e137528d7b661e18d21204e05ac1fc6b3c06892d5d52eeb0b9ef3ca2cbf90e3",
21
+ "size": 154265469
22
22
  },
23
23
  {
24
24
  "name": "signet-linux-x64",
25
25
  "platform": "linux-x64",
26
- "sha256": "c6c7691736e1f13b37b0551d6a3c855e3d858dfa95262639a426d753eacfe7b6",
27
- "size": 154822430
26
+ "sha256": "a6306bccbb4f9e5907e85b94cd0111655a9a1b042f7b896b98aa947365b53777",
27
+ "size": 154824454
28
28
  },
29
29
  {
30
30
  "name": "signet-win32-x64.exe",
31
31
  "platform": "win32-x64",
32
- "sha256": "513b24743e548c2aafbefd493e1930b96ab24b7c551b4129d5eb6d3ba2a77e61",
33
- "size": 170955776
32
+ "sha256": "65c3c2758ffd000fb731a44997dbe47d1f11adcaab474b040a3e9c062628523e",
33
+ "size": 170957312
34
34
  }
35
35
  ],
36
36
  "components": {
37
37
  "connectors": {
38
- "url": "signet-connectors-0.171.0.tar.gz",
39
- "sha256": "757ced8e001d76c600178dea22708921daaaf4d0e5854d80bd2473d9bb061b5c",
40
- "size": 16249
38
+ "url": "signet-connectors-0.172.0.tar.gz",
39
+ "sha256": "17ddcbfa8522754f6cf48311d585f9fd6cb6efdc5bc9c1b45197f91082fd62a2",
40
+ "size": 16246
41
41
  }
42
42
  }
43
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signetai",
3
- "version": "0.171.0",
3
+ "version": "0.172.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.171.0/signetai-darwin-arm64-0.171.0.tgz",
69
- "signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.171.0/signetai-darwin-x64-0.171.0.tgz",
70
- "signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.171.0/signetai-linux-arm64-0.171.0.tgz",
71
- "signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.171.0/signetai-linux-x64-0.171.0.tgz",
72
- "signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.171.0/signetai-win32-x64-0.171.0.tgz"
68
+ "signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.172.0/signetai-darwin-arm64-0.172.0.tgz",
69
+ "signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.172.0/signetai-darwin-x64-0.172.0.tgz",
70
+ "signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.172.0/signetai-linux-arm64-0.172.0.tgz",
71
+ "signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.172.0/signetai-linux-x64-0.172.0.tgz",
72
+ "signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.172.0/signetai-win32-x64-0.172.0.tgz"
73
73
  }
74
74
  }