signetai 0.163.13 → 0.163.14

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
@@ -36642,6 +36642,50 @@ function readEpisodicSource(db, options) {
36642
36642
  }
36643
36643
  return readEpisodicMemory(db, options.agentId, from) ?? readEpisodicArtifact(db, options.agentId, from) ?? readEpisodicTranscript(db, options.agentId, from) ?? readEpisodicSummary(db, options.agentId, from);
36644
36644
  }
36645
+ function findEpisodicSourceAgentIds(db, from) {
36646
+ const trimmed = from.trim();
36647
+ const colon = trimmed.indexOf(":");
36648
+ if (colon <= 0)
36649
+ return [];
36650
+ const kind = trimmed.slice(0, colon);
36651
+ const sourceId = trimmed.slice(colon + 1);
36652
+ const ids = sourceIdCandidates(sourceId);
36653
+ const placeholders = ids.map(() => "?").join(", ");
36654
+ let rows;
36655
+ if (kind === "memory") {
36656
+ rows = db.prepare(`SELECT DISTINCT agent_id
36657
+ FROM memories
36658
+ WHERE memory_kind = 'episodic'
36659
+ AND COALESCE(is_deleted, 0) = 0
36660
+ AND visibility != 'archived'
36661
+ AND scope IS NULL
36662
+ AND id IN (${placeholders})`).all(...ids);
36663
+ } else if (kind === "artifact" || kind === "source") {
36664
+ rows = db.prepare(`SELECT DISTINCT agent_id
36665
+ FROM memory_artifacts
36666
+ WHERE COALESCE(is_deleted, 0) = 0
36667
+ AND (
36668
+ source_path = ?
36669
+ OR source_node_id IN (${placeholders})
36670
+ OR session_id IN (${placeholders})
36671
+ OR session_key IN (${placeholders})
36672
+ OR session_token IN (${placeholders})
36673
+ )`).all(sourceId, ...ids, ...ids, ...ids, ...ids);
36674
+ } else if (kind === "transcript" || kind === "session") {
36675
+ rows = db.prepare(`SELECT DISTINCT agent_id
36676
+ FROM session_transcripts
36677
+ WHERE session_key IN (${placeholders})`).all(...ids);
36678
+ } else if (kind === "summary") {
36679
+ rows = db.prepare(`SELECT DISTINCT agent_id
36680
+ FROM session_summaries
36681
+ WHERE depth = 0
36682
+ AND COALESCE(source_type, 'summary') IN ('summary', 'compaction', 'checkpoint')
36683
+ AND (id IN (${placeholders}) OR source_ref IN (${placeholders}))`).all(...ids, ...ids);
36684
+ } else {
36685
+ return [];
36686
+ }
36687
+ return [...new Set(rows.map((row) => row.agent_id).filter((agentId) => Boolean(agentId)))].sort();
36688
+ }
36645
36689
  function searchEpisodicSources(db, params) {
36646
36690
  const query = params.query.trim();
36647
36691
  const limit = Math.max(1, Math.min(Math.floor(params.limit ?? 20), 50));
@@ -52392,12 +52436,17 @@ function citationRecord(value) {
52392
52436
  function citeEvidence(accessor, agentId, citation) {
52393
52437
  const requested = citationRecord(citation);
52394
52438
  if (requested === null)
52395
- return null;
52396
- const evidence = accessor.withReadDb((db) => {
52439
+ return { evidence: null, sourceAgentIds: [] };
52440
+ const result = accessor.withReadDb((db) => {
52397
52441
  const source = readEpisodicSource(db, { agentId, from: requested.sourceRef });
52398
- return source === null ? [] : createDreamingAgentEvidence([source]);
52442
+ if (source !== null)
52443
+ return { evidence: createDreamingAgentEvidence([source]), sourceAgentIds: [] };
52444
+ return { evidence: [], sourceAgentIds: findEpisodicSourceAgentIds(db, requested.sourceRef) };
52399
52445
  });
52400
- return evidence.find((record5) => record5.sourceRef === requested.sourceRef && record5.sourceKind === requested.sourceKind && record5.sourceId === requested.sourceId && (requested.sourcePath === null || record5.sourcePath === requested.sourcePath) && record5.content.includes(requested.quote)) ?? null;
52446
+ return {
52447
+ evidence: result.evidence.find((record5) => record5.sourceRef === requested.sourceRef && record5.sourceKind === requested.sourceKind && record5.sourceId === requested.sourceId && (requested.sourcePath === null || record5.sourcePath === requested.sourcePath) && record5.content.includes(requested.quote)) ?? null,
52448
+ sourceAgentIds: result.sourceAgentIds
52449
+ };
52401
52450
  }
52402
52451
  function semanticDuplicateIds(accessor, agentId, canonicalName) {
52403
52452
  const placeholders = SOURCE_NATIVE_TOPOLOGY_ENTITY_TYPES.map(() => "?").join(", ");
@@ -52502,23 +52551,34 @@ function attentionProvenance(accessor, agentId, operation2, mintedById) {
52502
52551
  function provenanceForEvidence(accessor, agentId, operation2) {
52503
52552
  const citations = operation2.evidence ?? [];
52504
52553
  if (citations.length === 0)
52505
- return null;
52554
+ return { provenance: null, scopeMismatch: null };
52506
52555
  const matched = [];
52507
52556
  for (const citation of citations) {
52508
- const record5 = citeEvidence(accessor, agentId, citation);
52509
- if (record5 === null)
52510
- return null;
52511
- matched.push(record5);
52557
+ const resolution = citeEvidence(accessor, agentId, citation);
52558
+ if (resolution.evidence === null) {
52559
+ if (resolution.sourceAgentIds.length > 0) {
52560
+ const scopes = resolution.sourceAgentIds.map((sourceAgentId) => `'${sourceAgentId}'`).join(", ");
52561
+ return {
52562
+ provenance: null,
52563
+ scopeMismatch: `Cited evidence belongs to scope${resolution.sourceAgentIds.length === 1 ? "" : "s"} ${scopes} but this operation targets '${agentId}'. Search evidence in the target scope before applying the operation.`
52564
+ };
52565
+ }
52566
+ return { provenance: null, scopeMismatch: null };
52567
+ }
52568
+ matched.push(resolution.evidence);
52512
52569
  }
52513
52570
  const provenance = matched.find((source) => source.sourceEntryId !== null) ?? matched[0];
52514
52571
  if (!provenance)
52515
- return null;
52572
+ return { provenance: null, scopeMismatch: null };
52516
52573
  return {
52517
- evidence: citations,
52518
- sourceKind: provenance.sourceKind,
52519
- sourceId: provenance.sourceEntryId ?? provenance.sourceId,
52520
- sourcePath: provenance.sourcePath,
52521
- sourceRoot: "dreaming"
52574
+ provenance: {
52575
+ evidence: citations,
52576
+ sourceKind: provenance.sourceKind,
52577
+ sourceId: provenance.sourceEntryId ?? provenance.sourceId,
52578
+ sourcePath: provenance.sourcePath,
52579
+ sourceRoot: "dreaming"
52580
+ },
52581
+ scopeMismatch: null
52522
52582
  };
52523
52583
  }
52524
52584
  function lookupString(db, sql, ...params) {
@@ -52683,12 +52743,13 @@ function applyDreamingOperations(params) {
52683
52743
  };
52684
52744
  }
52685
52745
  } else {
52686
- provenance = provenanceForEvidence(params.accessor, params.agentId, operation2);
52746
+ const evidenceResult = provenanceForEvidence(params.accessor, params.agentId, operation2);
52747
+ provenance = evidenceResult.provenance;
52687
52748
  if (provenance === null) {
52688
52749
  return {
52689
52750
  ok: false,
52690
52751
  items: [],
52691
- error: "Every operation must cite an exact quote from scoped episodic evidence"
52752
+ error: evidenceResult.scopeMismatch ?? "Every operation must cite an exact quote from scoped episodic evidence"
52692
52753
  };
52693
52754
  }
52694
52755
  }
@@ -1,43 +1,43 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "0.163.13",
3
+ "version": "0.163.14",
4
4
  "assets": [
5
5
  {
6
6
  "name": "signet-darwin-arm64",
7
7
  "platform": "darwin-arm64",
8
- "sha256": "778de67899e3870d4740d8567c39ba9fa510b9ab256c67cf21b95aa6837b6bcf",
8
+ "sha256": "525dfcb5086cfa03eaaae9146928bdbcb5a56efc06c7f1878ed5be9767608c09",
9
9
  "size": 116896288
10
10
  },
11
11
  {
12
12
  "name": "signet-darwin-x64",
13
13
  "platform": "darwin-x64",
14
- "sha256": "867257734b46af748202248b0b051536fd5dcac0809eae65a8939c2213292aeb",
14
+ "sha256": "34dd51960bc934a9b32b69d21e6bd5c48b2352595a8e9649c4635d1617c1cbb6",
15
15
  "size": 121522752
16
16
  },
17
17
  {
18
18
  "name": "signet-linux-arm64",
19
19
  "platform": "linux-arm64",
20
- "sha256": "0914e05635a21dac3a07bb1a92d266b43adfd1de8bf31cb7a2e4a04edb9c8f66",
21
- "size": 154132338
20
+ "sha256": "3643a760f4ccd54ec43212dbf3c48ce27f59951749d4c79325501cc3c93b1ff0",
21
+ "size": 154135577
22
22
  },
23
23
  {
24
24
  "name": "signet-linux-x64",
25
25
  "platform": "linux-x64",
26
- "sha256": "eebf7246bb44ca6db1c99a51ef5555b7ce9519d83f8768af39af6bf96ed85bc5",
27
- "size": 154691323
26
+ "sha256": "29ae482bea3cf3432e9669433c0895fad3813b6926f48418227f79c6e969f46c",
27
+ "size": 154694562
28
28
  },
29
29
  {
30
30
  "name": "signet-win32-x64.exe",
31
31
  "platform": "win32-x64",
32
- "sha256": "abaa8ea925847f58896e2acdd979c121fc7f3c8f90b0b6169a302051234d4157",
33
- "size": 170824704
32
+ "sha256": "b618e4f5970a07066cfc19f2b098f2810106ef473ae89ff37b45688a5f91b2cf",
33
+ "size": 170827776
34
34
  }
35
35
  ],
36
36
  "components": {
37
37
  "connectors": {
38
- "url": "signet-connectors-0.163.13.tar.gz",
39
- "sha256": "5b947c9c41ad26215f25f62bff26a5c5aa808310397ff06b8e2f0193c1a334e4",
40
- "size": 16163
38
+ "url": "signet-connectors-0.163.14.tar.gz",
39
+ "sha256": "3df9a4068d1cf0dfdbaf16c67cf89ef589fc6df43542c1739b924a81f7416d5d",
40
+ "size": 16162
41
41
  }
42
42
  }
43
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signetai",
3
- "version": "0.163.13",
3
+ "version": "0.163.14",
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.163.13/signetai-darwin-arm64-0.163.13.tgz",
69
- "signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.163.13/signetai-darwin-x64-0.163.13.tgz",
70
- "signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.163.13/signetai-linux-arm64-0.163.13.tgz",
71
- "signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.163.13/signetai-linux-x64-0.163.13.tgz",
72
- "signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.163.13/signetai-win32-x64-0.163.13.tgz"
68
+ "signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.163.14/signetai-darwin-arm64-0.163.14.tgz",
69
+ "signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.163.14/signetai-darwin-x64-0.163.14.tgz",
70
+ "signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.163.14/signetai-linux-arm64-0.163.14.tgz",
71
+ "signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.163.14/signetai-linux-x64-0.163.14.tgz",
72
+ "signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.163.14/signetai-win32-x64-0.163.14.tgz"
73
73
  }
74
74
  }