signetai 0.170.0 → 0.171.1
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 +36 -8
- package/native-manifest.json +11 -11
- package/package.json +6 -6
- package/scripts/install-native.js +63 -4
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 =
|
|
52750
|
+
expectedTarget = pinnedTarget(payload2, attention, "entity:", "entityId");
|
|
52751
52751
|
} else if (operation2.operation === "archive_aspect") {
|
|
52752
|
-
expectedTarget =
|
|
52752
|
+
expectedTarget = pinnedTarget(payload2, attention, "aspect:", "aspectId");
|
|
52753
52753
|
} else if (operation2.operation === "archive_claim_value") {
|
|
52754
|
-
expectedTarget =
|
|
52754
|
+
expectedTarget = pinnedTarget(payload2, attention, "attribute:", "attributeId");
|
|
52755
52755
|
} else if (operation2.operation === "archive_link") {
|
|
52756
|
-
expectedTarget =
|
|
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
|
|
52761
|
-
|
|
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
|
|
52765
|
-
|
|
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 {
|
package/native-manifest.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.171.1",
|
|
4
4
|
"assets": [
|
|
5
5
|
{
|
|
6
6
|
"name": "signet-darwin-arm64",
|
|
7
7
|
"platform": "darwin-arm64",
|
|
8
|
-
"sha256": "
|
|
8
|
+
"sha256": "24d44da0599a7023b660cc5f1e1c2aa27817a2d3f362f40467ccc629440c0a47",
|
|
9
9
|
"size": 117028384
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"name": "signet-darwin-x64",
|
|
13
13
|
"platform": "darwin-x64",
|
|
14
|
-
"sha256": "
|
|
14
|
+
"sha256": "9ef2d02d007fd264433bd61e763a33de5101661447084966625d0ab4477992e9",
|
|
15
15
|
"size": 121653824
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"name": "signet-linux-arm64",
|
|
19
19
|
"platform": "linux-arm64",
|
|
20
|
-
"sha256": "
|
|
21
|
-
"size":
|
|
20
|
+
"sha256": "57d6441a1afd104d68cf905c3fb12cdefd586ef15c84b0ad386150eed263e2b8",
|
|
21
|
+
"size": 154264549
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "signet-linux-x64",
|
|
25
25
|
"platform": "linux-x64",
|
|
26
|
-
"sha256": "
|
|
27
|
-
"size":
|
|
26
|
+
"sha256": "b0602da8d038064c2e3eed3296c9f42fc22147fd4ce07569b8529dfb23cb7e78",
|
|
27
|
+
"size": 154823534
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"name": "signet-win32-x64.exe",
|
|
31
31
|
"platform": "win32-x64",
|
|
32
|
-
"sha256": "
|
|
33
|
-
"size":
|
|
32
|
+
"sha256": "7407e6ef14209ad88af8a4eb40ff21bf18438a6fc4d0d7658c7d4761ac948c99",
|
|
33
|
+
"size": 170956800
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
36
|
"components": {
|
|
37
37
|
"connectors": {
|
|
38
|
-
"url": "signet-connectors-0.
|
|
39
|
-
"sha256": "
|
|
38
|
+
"url": "signet-connectors-0.171.1.tar.gz",
|
|
39
|
+
"sha256": "e51982dc91fe8a3d3c354d50935663c08e2920a38f68e3619af4a7290a588413",
|
|
40
40
|
"size": 16248
|
|
41
41
|
}
|
|
42
42
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "signetai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.171.1",
|
|
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.
|
|
69
|
-
"signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.
|
|
70
|
-
"signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.
|
|
71
|
-
"signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.
|
|
72
|
-
"signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.
|
|
68
|
+
"signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.171.1/signetai-darwin-arm64-0.171.1.tgz",
|
|
69
|
+
"signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.171.1/signetai-darwin-x64-0.171.1.tgz",
|
|
70
|
+
"signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.171.1/signetai-linux-arm64-0.171.1.tgz",
|
|
71
|
+
"signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.171.1/signetai-linux-x64-0.171.1.tgz",
|
|
72
|
+
"signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.171.1/signetai-win32-x64-0.171.1.tgz"
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -24,6 +24,54 @@ const require = createRequire(import.meta.url);
|
|
|
24
24
|
|
|
25
25
|
const CONNECTOR_COMPONENT = "connectors";
|
|
26
26
|
|
|
27
|
+
// Phase-1 telemetry (issue #1026): a single anonymous install counter sent to
|
|
28
|
+
// the Signet PostHog project. Payload is version+platform only — no
|
|
29
|
+
// identifier, no IP logging. Each install generates a fresh anonymous id, so
|
|
30
|
+
// every ping counts as one distinct install without persisting anything.
|
|
31
|
+
// Opt-out via SIGNET_TELEMETRY_OPTOUT=1 (Homebrew-style). Never blocks the
|
|
32
|
+
// install and never fails it: the request is time-bounded and errors are
|
|
33
|
+
// swallowed, so a telemetry outage cannot break postinstall.
|
|
34
|
+
const TELEMETRY_HOST = "https://us.i.posthog.com";
|
|
35
|
+
const TELEMETRY_API_KEY = "phc_mLsvJmbmp6e9UarrX9Cq5QtTjVNiiphM9mvi5Xnddd8Q"; // public ingest key
|
|
36
|
+
const TELEMETRY_TIMEOUT_MS = 2000;
|
|
37
|
+
const pendingPings = [];
|
|
38
|
+
|
|
39
|
+
function telemetryEnabled() {
|
|
40
|
+
if (process.env.SIGNET_TELEMETRY_OPTOUT === "1" || process.env.SIGNET_TELEMETRY_OPTOUT === "true") {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
if (process.env.SIGNET_SKIP_NATIVE_POSTINSTALL === "1" || isWorkspacePackage()) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function fireInstallPing(platform) {
|
|
50
|
+
if (!telemetryEnabled()) return;
|
|
51
|
+
const body = JSON.stringify({
|
|
52
|
+
api_key: TELEMETRY_API_KEY,
|
|
53
|
+
batch: [
|
|
54
|
+
{
|
|
55
|
+
event: "install.ping",
|
|
56
|
+
distinct_id: require("node:crypto").randomUUID(),
|
|
57
|
+
timestamp: new Date().toISOString(),
|
|
58
|
+
properties: {
|
|
59
|
+
version: nativePackageVersion(),
|
|
60
|
+
platform,
|
|
61
|
+
$lib: "signet-install",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
});
|
|
66
|
+
const promise = fetch(`${TELEMETRY_HOST}/batch/`, {
|
|
67
|
+
method: "POST",
|
|
68
|
+
headers: { "Content-Type": "application/json" },
|
|
69
|
+
body,
|
|
70
|
+
signal: AbortSignal.timeout(TELEMETRY_TIMEOUT_MS),
|
|
71
|
+
}).catch(() => {});
|
|
72
|
+
pendingPings.push(promise);
|
|
73
|
+
}
|
|
74
|
+
|
|
27
75
|
function isWorkspacePackage() {
|
|
28
76
|
const workspaceRoot = dirname(dirname(packageDir));
|
|
29
77
|
if (basename(dirname(packageDir)) !== "dist") return false;
|
|
@@ -66,6 +114,8 @@ async function main() {
|
|
|
66
114
|
}
|
|
67
115
|
|
|
68
116
|
const platform = detectNativePlatform();
|
|
117
|
+
// Anonymous install counter (issue #1026): one ping per real install.
|
|
118
|
+
fireInstallPing(platform);
|
|
69
119
|
const nativePackage = nativePlatforms[platform];
|
|
70
120
|
let source;
|
|
71
121
|
try {
|
|
@@ -208,7 +258,16 @@ async function installConnectorAssets() {
|
|
|
208
258
|
}
|
|
209
259
|
}
|
|
210
260
|
|
|
211
|
-
main()
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
261
|
+
main()
|
|
262
|
+
.catch((err) => {
|
|
263
|
+
console.error(`Signet native install failed: ${err.message}`);
|
|
264
|
+
process.exit(1);
|
|
265
|
+
})
|
|
266
|
+
.finally(async () => {
|
|
267
|
+
// Give the fire-and-forget telemetry ping a bounded chance to flush.
|
|
268
|
+
// Each request self-times-out, so this never delays the install by
|
|
269
|
+
// more than TELEMETRY_TIMEOUT_MS even if the endpoint hangs.
|
|
270
|
+
if (pendingPings.length > 0) {
|
|
271
|
+
await Promise.allSettled(pendingPings);
|
|
272
|
+
}
|
|
273
|
+
});
|