signetai 0.197.13 → 0.197.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 +54 -12
- package/native-manifest.json +13 -13
- package/package.json +6 -6
package/dist/mcp-stdio.js
CHANGED
|
@@ -43345,6 +43345,28 @@ function readEpisodicSource(db, options) {
|
|
|
43345
43345
|
}
|
|
43346
43346
|
return readEpisodicMemory(db, options.agentId, from) ?? readEpisodicArtifact(db, options.agentId, from) ?? readEpisodicTranscript(db, options.agentId, from) ?? readEpisodicSummary(db, options.agentId, from);
|
|
43347
43347
|
}
|
|
43348
|
+
function resolveStrictEpisodicSourceRef(db, params) {
|
|
43349
|
+
if (typeof params.sourceRef !== "string")
|
|
43350
|
+
return { status: "invalid", sourceRef: "" };
|
|
43351
|
+
const sourceRef = params.sourceRef.trim();
|
|
43352
|
+
const separator = sourceRef.indexOf(":");
|
|
43353
|
+
if (separator <= 0 || separator === sourceRef.length - 1)
|
|
43354
|
+
return { status: "invalid", sourceRef };
|
|
43355
|
+
const kind = sourceRef.slice(0, separator);
|
|
43356
|
+
const id = sourceRef.slice(separator + 1).trim();
|
|
43357
|
+
if (!["memory", "artifact", "transcript", "summary"].includes(kind) || !id) {
|
|
43358
|
+
return { status: "invalid", sourceRef };
|
|
43359
|
+
}
|
|
43360
|
+
const canonicalRef = `${kind}:${id}`;
|
|
43361
|
+
const source = readEpisodicSource(db, { agentId: params.agentId, from: canonicalRef });
|
|
43362
|
+
if (source !== null)
|
|
43363
|
+
return { status: "resolved", source };
|
|
43364
|
+
const owners = findEpisodicSourceAgentIds(db, canonicalRef);
|
|
43365
|
+
if (owners.some((agentId) => agentId !== params.agentId)) {
|
|
43366
|
+
return { status: "cross_agent", sourceRef: canonicalRef };
|
|
43367
|
+
}
|
|
43368
|
+
return { status: "not_found", sourceRef: canonicalRef };
|
|
43369
|
+
}
|
|
43348
43370
|
function findEpisodicSourceAgentIds(db, from) {
|
|
43349
43371
|
const trimmed = from.trim();
|
|
43350
43372
|
const colon = trimmed.indexOf(":");
|
|
@@ -45941,6 +45963,26 @@ function readBackInTx(db, id, agentId) {
|
|
|
45941
45963
|
throw new OntologyProposalError("Proposal not found", 404);
|
|
45942
45964
|
return toProposal(row);
|
|
45943
45965
|
}
|
|
45966
|
+
function requireStrictEpisodicSourceRefInTx(db, agentId, sourceRef) {
|
|
45967
|
+
const resolved = resolveStrictEpisodicSourceRef(db, { agentId, sourceRef });
|
|
45968
|
+
if (resolved.status === "resolved")
|
|
45969
|
+
return resolved.source;
|
|
45970
|
+
if (resolved.status === "invalid") {
|
|
45971
|
+
throw new OntologyProposalError("Evidence source_ref must name a canonical episodic source", 409);
|
|
45972
|
+
}
|
|
45973
|
+
if (resolved.status === "cross_agent") {
|
|
45974
|
+
throw new OntologyProposalError("Evidence source_ref crosses the authorized agent scope", 409);
|
|
45975
|
+
}
|
|
45976
|
+
throw new OntologyProposalError(`Evidence source_ref was not found: ${resolved.sourceRef}`, 409);
|
|
45977
|
+
}
|
|
45978
|
+
function validateProposalEvidenceSourcesInTx(db, agentId, evidence) {
|
|
45979
|
+
for (const value of evidence) {
|
|
45980
|
+
const ref3 = readOntologyEvidenceRef(value);
|
|
45981
|
+
if (ref3 === null || !isRecord3(ref3.reference) || !("source_ref" in ref3.reference))
|
|
45982
|
+
continue;
|
|
45983
|
+
requireStrictEpisodicSourceRefInTx(db, agentId, ref3.reference.source_ref);
|
|
45984
|
+
}
|
|
45985
|
+
}
|
|
45944
45986
|
function insertProposalInTx(db, input, ts) {
|
|
45945
45987
|
const id = crypto.randomUUID();
|
|
45946
45988
|
const agentId = requireText(input.agentId, "agentId");
|
|
@@ -45948,6 +45990,7 @@ function insertProposalInTx(db, input, ts) {
|
|
|
45948
45990
|
if (Object.keys(input.payload).length === 0)
|
|
45949
45991
|
throw new OntologyProposalError("payload is required", 400);
|
|
45950
45992
|
const evidence = input.evidence ?? [];
|
|
45993
|
+
validateProposalEvidenceSourcesInTx(db, agentId, evidence);
|
|
45951
45994
|
db.prepare(`INSERT INTO ontology_proposals
|
|
45952
45995
|
(id, agent_id, operation, status, payload, confidence, rationale,
|
|
45953
45996
|
evidence, risk, source_kind, source_id, source_path, source_root,
|
|
@@ -45977,22 +46020,20 @@ function proposalEvidenceRefs(proposal) {
|
|
|
45977
46020
|
function proposalAuditEvidence(proposal) {
|
|
45978
46021
|
return parseJsonArray3(proposal.evidence);
|
|
45979
46022
|
}
|
|
45980
|
-
function
|
|
46023
|
+
function derivedMemorySourcesForProposalInTx(db, proposal) {
|
|
45981
46024
|
const sources = [];
|
|
45982
46025
|
for (const ref3 of proposalEvidenceRefs(toProposal(proposal))) {
|
|
45983
46026
|
if (typeof ref3.reference !== "object" || ref3.reference === null || Array.isArray(ref3.reference))
|
|
45984
46027
|
continue;
|
|
45985
|
-
const
|
|
45986
|
-
if (
|
|
45987
|
-
continue;
|
|
45988
|
-
const separator = sourceRef.indexOf(":");
|
|
45989
|
-
if (separator <= 0 || separator === sourceRef.length - 1)
|
|
46028
|
+
const evidence = ref3.reference;
|
|
46029
|
+
if (!("source_ref" in evidence))
|
|
45990
46030
|
continue;
|
|
45991
|
-
const
|
|
45992
|
-
|
|
45993
|
-
|
|
45994
|
-
|
|
45995
|
-
|
|
46031
|
+
const source = requireStrictEpisodicSourceRefInTx(db, proposal.agent_id, evidence.source_ref);
|
|
46032
|
+
sources.push({
|
|
46033
|
+
sourceKind: source.kind,
|
|
46034
|
+
sourceId: source.id,
|
|
46035
|
+
sourcePath: source.sourcePath
|
|
46036
|
+
});
|
|
45996
46037
|
}
|
|
45997
46038
|
return sources;
|
|
45998
46039
|
}
|
|
@@ -46198,7 +46239,7 @@ function materializeAttributeMemoryInTx(db, input) {
|
|
|
46198
46239
|
linkDerivedMemorySourcesInTx(db, {
|
|
46199
46240
|
derivedMemoryId: input.attributeId,
|
|
46200
46241
|
agentId: input.agentId,
|
|
46201
|
-
sources:
|
|
46242
|
+
sources: derivedMemorySourcesForProposalInTx(db, input.proposal),
|
|
46202
46243
|
createdAt: now()
|
|
46203
46244
|
});
|
|
46204
46245
|
return input.attributeId;
|
|
@@ -47015,6 +47056,7 @@ function applyArchiveEntityAlias(db, agentId, proposal, payload) {
|
|
|
47015
47056
|
}
|
|
47016
47057
|
function applyOperation(db, proposal, actor, writeCaps) {
|
|
47017
47058
|
try {
|
|
47059
|
+
validateProposalEvidenceSourcesInTx(db, proposal.agent_id, proposalAuditEvidence(proposal));
|
|
47018
47060
|
const payload = parseJsonRecord(proposal.payload);
|
|
47019
47061
|
if (proposal.operation === "create_entity")
|
|
47020
47062
|
return applyCreateEntity(db, proposal.agent_id, proposal, payload);
|
package/native-manifest.json
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "0.197.
|
|
3
|
+
"version": "0.197.14",
|
|
4
4
|
"assets": [
|
|
5
5
|
{
|
|
6
6
|
"name": "signet-darwin-arm64",
|
|
7
7
|
"platform": "darwin-arm64",
|
|
8
|
-
"sha256": "
|
|
8
|
+
"sha256": "d869bb6bbbeff3a4c03d3f11abcd81f52bc3918406808e427a4e6f17b26f576e",
|
|
9
9
|
"size": 125102752
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"name": "signet-darwin-x64",
|
|
13
13
|
"platform": "darwin-x64",
|
|
14
|
-
"sha256": "
|
|
15
|
-
"size":
|
|
14
|
+
"sha256": "6fbe48ad837f5c12b9c0027bc8fbe29e9d8b31e4331c7b4b4bf157b072022e9c",
|
|
15
|
+
"size": 130091584
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"name": "signet-linux-arm64",
|
|
19
19
|
"platform": "linux-arm64",
|
|
20
|
-
"sha256": "
|
|
21
|
-
"size":
|
|
20
|
+
"sha256": "93491905ee278494dc43fc3a9c31bc1a4cc4bc53ffc89627fe177c25f074653a",
|
|
21
|
+
"size": 169654957
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "signet-linux-x64",
|
|
25
25
|
"platform": "linux-x64",
|
|
26
|
-
"sha256": "
|
|
27
|
-
"size":
|
|
26
|
+
"sha256": "5a2f294d8d1436fcf0ea14e47dcb8f469b34eaf7d848ff7559e10c4b0c6f861b",
|
|
27
|
+
"size": 172029539
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"name": "signet-win32-x64.exe",
|
|
31
31
|
"platform": "win32-x64",
|
|
32
|
-
"sha256": "
|
|
33
|
-
"size":
|
|
32
|
+
"sha256": "d10d7388fc373a4a50b303878107f14a0c1ffdf978364883e0faa7e5af61d72e",
|
|
33
|
+
"size": 180155904
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
36
|
"components": {
|
|
37
37
|
"connectors": {
|
|
38
|
-
"url": "signet-connectors-0.197.
|
|
39
|
-
"sha256": "
|
|
40
|
-
"size":
|
|
38
|
+
"url": "signet-connectors-0.197.14.tar.gz",
|
|
39
|
+
"sha256": "c92219dfac0862b1ec5997c780bf8e9286cb6aa5c1f923c260b3cdf08d353fd2",
|
|
40
|
+
"size": 21668
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "signetai",
|
|
3
|
-
"version": "0.197.
|
|
3
|
+
"version": "0.197.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.197.
|
|
69
|
-
"signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.197.
|
|
70
|
-
"signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.197.
|
|
71
|
-
"signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.197.
|
|
72
|
-
"signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.197.
|
|
68
|
+
"signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.197.14/signetai-darwin-arm64-0.197.14.tgz",
|
|
69
|
+
"signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.197.14/signetai-darwin-x64-0.197.14.tgz",
|
|
70
|
+
"signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.197.14/signetai-linux-arm64-0.197.14.tgz",
|
|
71
|
+
"signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.197.14/signetai-linux-x64-0.197.14.tgz",
|
|
72
|
+
"signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.197.14/signetai-win32-x64-0.197.14.tgz"
|
|
73
73
|
}
|
|
74
74
|
}
|