signetai 0.199.17 → 0.199.32

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/bin/launch.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { spawn } from "node:child_process";
4
- import { existsSync } from "node:fs";
4
+ import { existsSync, readFileSync } from "node:fs";
5
5
  import { createRequire } from "node:module";
6
6
  import { dirname, join } from "node:path";
7
7
  import { fileURLToPath } from "node:url";
@@ -12,6 +12,8 @@ const packageDir = dirname(dirname(fileURLToPath(import.meta.url)));
12
12
  const require = createRequire(import.meta.url);
13
13
  const binaryName = process.platform === "win32" ? "signet.exe" : "signet";
14
14
  const binaryPath = join(packageDir, "native", binaryName);
15
+ const connectorAssetsPath = join(packageDir, "runtime", "connectors");
16
+ const connectorMarkerPath = join(connectorAssetsPath, ".signet-connectors-version");
15
17
 
16
18
  function resolveNativePackageBinaryPath() {
17
19
  const platform = detectNativePlatform();
@@ -33,6 +35,55 @@ function resolveBinaryPath() {
33
35
  return null;
34
36
  }
35
37
 
38
+ function loadNativeManifest() {
39
+ try {
40
+ const manifest = JSON.parse(readFileSync(join(packageDir, "native-manifest.json"), "utf8"));
41
+ if (typeof manifest !== "object" || manifest === null) return null;
42
+ return manifest;
43
+ } catch {
44
+ return null;
45
+ }
46
+ }
47
+
48
+ function connectorComponent(manifest) {
49
+ if (typeof manifest.components !== "object" || manifest.components === null) return null;
50
+ const component = manifest.components.connectors;
51
+ if (typeof component !== "object" || component === null) return null;
52
+ if (typeof manifest.version !== "string" || typeof component.sha256 !== "string") return null;
53
+ return component;
54
+ }
55
+
56
+ function hasConnectorAssets(manifest) {
57
+ const component = connectorComponent(manifest);
58
+ if (!existsSync(connectorAssetsPath) || !existsSync(connectorMarkerPath)) return false;
59
+
60
+ try {
61
+ const marker = JSON.parse(readFileSync(connectorMarkerPath, "utf8"));
62
+ return marker.version === manifest.version && marker.sha256.toLowerCase() === component.sha256.toLowerCase();
63
+ } catch {
64
+ return false;
65
+ }
66
+ }
67
+
68
+ function warnIfInstallAssetsMissing(resolvedBinaryPath) {
69
+ const missing = [];
70
+ if (resolvedBinaryPath !== binaryPath) missing.push("native/");
71
+ const manifest = loadNativeManifest();
72
+ if (manifest !== null && connectorComponent(manifest) !== null && !hasConnectorAssets(manifest)) {
73
+ missing.push("runtime/connectors/");
74
+ }
75
+ if (missing.length === 0) return;
76
+
77
+ console.error(`Signet install assets are incomplete: missing ${missing.join(" and ")}.`);
78
+ if (resolvedBinaryPath !== binaryPath) {
79
+ console.error("The platform native package is installed, but Signet's postinstall did not finish linking the wrapper assets.");
80
+ } else {
81
+ console.error("Signet's postinstall did not finish installing all required wrapper assets.");
82
+ }
83
+ console.error("If Bun blocked the lifecycle script, run `bun pm -g untrusted`, trust Signet's postinstall, then reinstall with `bun add -g signetai`.");
84
+ console.error("If the postinstall failed, reinstall with npm or use the official installer from https://signetai.sh/install.sh.");
85
+ }
86
+
36
87
  export function launchSignet() {
37
88
  const resolvedBinaryPath = resolveBinaryPath();
38
89
  if (!resolvedBinaryPath) {
@@ -42,6 +93,8 @@ export function launchSignet() {
42
93
  process.exit(1);
43
94
  }
44
95
 
96
+ warnIfInstallAssetsMissing(resolvedBinaryPath);
97
+
45
98
  // Point the binary at the wrapper's installed runtime tree so the
46
99
  // connector's `getPluginSourceDir()` `SIGNET_DIR/runtime/connectors/...`
47
100
  // fallback can find per-harness plugin assets that the native binary
package/dist/mcp-stdio.js CHANGED
@@ -43160,6 +43160,7 @@ if (isBun) {
43160
43160
  } else {
43161
43161
  Database = require2("better-sqlite3");
43162
43162
  }
43163
+ var MAX_ZERO_FREE_SPACE_PROBE_BYTES = 1024 * 1024;
43163
43164
  var migrationBackupDeps = {
43164
43165
  copyFileSync,
43165
43166
  readdirSync: readdirSync2,
@@ -43664,6 +43665,7 @@ var ZERO_ACTIVE_ATTRIBUTE_ENTITIES_SQL = `
43664
43665
  LIMIT ?`;
43665
43666
 
43666
43667
  // ../../platform/daemon/src/telemetry.ts
43668
+ var TELEMETRY_LOG_MAX_BYTES = 10 * 1024 * 1024;
43667
43669
  var TELEMETRY_CLAIM_TIMEOUT_MS = 10 * 60 * 1000;
43668
43670
  var DELIVERY_HEALTH_WINDOW_MS = 24 * 60 * 60 * 1000;
43669
43671
  // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/system/hashing/hash.mjs
@@ -50626,6 +50628,8 @@ var GRAPHIQ_COMPAT_ALIASES = new Map([
50626
50628
  ["code_briefing", "signet_code_briefing"]
50627
50629
  ]);
50628
50630
  var MARKETPLACE_PROXY_REFRESH_TIMEOUT_MS = 5000;
50631
+ var MARKETPLACE_PROXY_REFRESH_TTL_MS = 30000;
50632
+ var marketplaceRefreshes = new Map;
50629
50633
  function readDaemonAuthToken() {
50630
50634
  const apiKey = process.env.SIGNET_API_KEY?.trim();
50631
50635
  if (apiKey)
@@ -50880,6 +50884,32 @@ async function fetchMarketplacePolicy(baseUrl, authorizationHeader) {
50880
50884
  }
50881
50885
  return result.data.policy;
50882
50886
  }
50887
+ function marketplaceRefreshKey(baseUrl, context, authorizationHeader) {
50888
+ return JSON.stringify({ baseUrl, context, authorizationHeader });
50889
+ }
50890
+ async function fetchMarketplaceRefreshSnapshot(state) {
50891
+ const key = marketplaceRefreshKey(state.baseUrl, state.context, state.authorizationHeader);
50892
+ const now2 = Date.now();
50893
+ const cached2 = marketplaceRefreshes.get(key);
50894
+ if (cached2 && cached2.expiresAt > now2)
50895
+ return cached2.promise;
50896
+ const promise3 = (async () => {
50897
+ const policy = await fetchMarketplacePolicy(state.baseUrl, state.authorizationHeader);
50898
+ const routed = await daemonFetch(state.baseUrl, appendMarketplaceContext("/api/marketplace/mcp/tools?refresh=1", state.context), {
50899
+ timeout: MARKETPLACE_PROXY_REFRESH_TIMEOUT_MS,
50900
+ authorizationHeader: state.authorizationHeader
50901
+ });
50902
+ return { policy, routed };
50903
+ })();
50904
+ marketplaceRefreshes.set(key, { expiresAt: now2 + MARKETPLACE_PROXY_REFRESH_TTL_MS, promise: promise3 });
50905
+ try {
50906
+ return await promise3;
50907
+ } catch (error51) {
50908
+ if (marketplaceRefreshes.get(key)?.promise === promise3)
50909
+ marketplaceRefreshes.delete(key);
50910
+ throw error51;
50911
+ }
50912
+ }
50883
50913
  async function refreshMarketplaceProxyTools(server, options) {
50884
50914
  const state = marketplaceProxyState.get(server);
50885
50915
  if (!state || !state.enabled) {
@@ -50887,14 +50917,10 @@ async function refreshMarketplaceProxyTools(server, options) {
50887
50917
  }
50888
50918
  const notify = options?.notify ?? true;
50889
50919
  const registeredTools = getRegisteredToolsMap(server);
50890
- const policy = await fetchMarketplacePolicy(state.baseUrl, state.authorizationHeader);
50891
- if (policy) {
50892
- state.policy = policy;
50893
- }
50894
- const routed = await daemonFetch(state.baseUrl, appendMarketplaceContext("/api/marketplace/mcp/tools?refresh=1", state.context), {
50895
- timeout: MARKETPLACE_PROXY_REFRESH_TIMEOUT_MS,
50896
- authorizationHeader: state.authorizationHeader
50897
- });
50920
+ const snapshot = await fetchMarketplaceRefreshSnapshot(state);
50921
+ if (snapshot.policy)
50922
+ state.policy = snapshot.policy;
50923
+ const routed = snapshot.routed;
50898
50924
  if (!routed.ok) {
50899
50925
  return { changed: false, count: state.names.size, error: routed.error };
50900
50926
  }
@@ -1,43 +1,43 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "0.199.17",
3
+ "version": "0.199.32",
4
4
  "assets": [
5
5
  {
6
6
  "name": "signet-darwin-arm64",
7
7
  "platform": "darwin-arm64",
8
- "sha256": "ae967e97c2259b426ca6390c8cca835091708f9758dfd1edb709a9061d05bd21",
9
- "size": 125267872
8
+ "sha256": "0705d6ba71840d1ba81259bde0f9e9fa017686aa55fae6d1f1945a6e60da9ddb",
9
+ "size": 125284384
10
10
  },
11
11
  {
12
12
  "name": "signet-darwin-x64",
13
13
  "platform": "darwin-x64",
14
- "sha256": "5ad9e56b136448b08acd90149e93907af5330aebf714d041153e080acd864e5f",
15
- "size": 130239040
14
+ "sha256": "3efa9d73b0c961acb2214a4457eb27b5f26d920949e6b32ee832e99fe4134ddf",
15
+ "size": 130271808
16
16
  },
17
17
  {
18
18
  "name": "signet-linux-arm64",
19
19
  "platform": "linux-arm64",
20
- "sha256": "d7e9af1306d0f25540f5017911646c34863521abeb54a1a32557736a3460ac4f",
21
- "size": 169809705
20
+ "sha256": "11765339a3cf6e9b5c7c8127ce38988ba21ea4ab2be55ee858dc2df7d653d4a5",
21
+ "size": 169837242
22
22
  },
23
23
  {
24
24
  "name": "signet-linux-x64",
25
25
  "platform": "linux-x64",
26
- "sha256": "9254dcae9dba07b0889dd4c56bfc99e376c724ec63490d123403754bc0bbbc2d",
27
- "size": 172184287
26
+ "sha256": "48842e1d324c9ba3be9c5bdd7fac44290fa35f3284577b4a0f918f64b18afe54",
27
+ "size": 172211824
28
28
  },
29
29
  {
30
30
  "name": "signet-win32-x64.exe",
31
31
  "platform": "win32-x64",
32
- "sha256": "07bf79fb594fa06554590d2df7d99b08f14587008a467cf09af58a96bde6959b",
33
- "size": 180310528
32
+ "sha256": "c584ed02737f0f3e339bff60c50562513510fc5f6ef14bd9e808f90848151440",
33
+ "size": 180338176
34
34
  }
35
35
  ],
36
36
  "components": {
37
37
  "connectors": {
38
- "url": "signet-connectors-0.199.17.tar.gz",
39
- "sha256": "50894b56fbb1700a23159f0d94fe90bd080a663029e88365f51b52c67531e0e0",
40
- "size": 21669
38
+ "url": "signet-connectors-0.199.32.tar.gz",
39
+ "sha256": "e1202b6b6b0d11eddde2e413130583501dab16647364cd017bf0a1823972be1c",
40
+ "size": 21672
41
41
  }
42
42
  }
43
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signetai",
3
- "version": "0.199.17",
3
+ "version": "0.199.32",
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.199.17/signetai-darwin-arm64-0.199.17.tgz",
69
- "signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.17/signetai-darwin-x64-0.199.17.tgz",
70
- "signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.17/signetai-linux-arm64-0.199.17.tgz",
71
- "signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.17/signetai-linux-x64-0.199.17.tgz",
72
- "signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.17/signetai-win32-x64-0.199.17.tgz"
68
+ "signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.32/signetai-darwin-arm64-0.199.32.tgz",
69
+ "signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.32/signetai-darwin-x64-0.199.32.tgz",
70
+ "signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.32/signetai-linux-arm64-0.199.32.tgz",
71
+ "signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.32/signetai-linux-x64-0.199.32.tgz",
72
+ "signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.32/signetai-win32-x64-0.199.32.tgz"
73
73
  }
74
74
  }
@@ -164,6 +164,9 @@ async function main() {
164
164
  await chmod(destination, 0o755);
165
165
  }
166
166
  console.log(`Linked Signet native binary for ${platform}`);
167
+ if (process.platform === "darwin") {
168
+ console.log("macOS Gatekeeper tip: browser-downloaded unsigned binaries may require right-click Open or Open Anyway. Only bypass Gatekeeper for a trusted official Signet binary. See https://docs.signetai.sh/getting-started/install/");
169
+ }
167
170
  } catch (err) {
168
171
  rmSync(destination, { force: true });
169
172
  throw err;
@@ -205,6 +208,16 @@ function verifySha256(path, expected) {
205
208
  }
206
209
  }
207
210
 
211
+ function isConnectorMarker(value) {
212
+ if (typeof value !== "object" || value === null) return false;
213
+ return (
214
+ typeof value.version === "string" &&
215
+ value.version.length > 0 &&
216
+ typeof value.sha256 === "string" &&
217
+ /^[a-f0-9]{64}$/i.test(value.sha256)
218
+ );
219
+ }
220
+
208
221
  function nativePackageVersion() {
209
222
  try {
210
223
  return JSON.parse(readFileSync(join(packageDir, "package.json"), "utf8")).version;
@@ -235,9 +248,17 @@ async function installConnectorAssets() {
235
248
 
236
249
  const targetDir = join(packageDir, "runtime", "connectors");
237
250
  const targetMarker = join(targetDir, ".signet-connectors-version");
251
+ let installedMarker = null;
252
+ try {
253
+ installedMarker = JSON.parse(readFileSync(targetMarker, "utf8"));
254
+ } catch {
255
+ // Reinstall legacy or malformed markers instead of trusting stale assets.
256
+ }
238
257
  if (
239
258
  existsSync(targetMarker) &&
240
- readFileSync(targetMarker, "utf8").trim() === manifest.version
259
+ isConnectorMarker(installedMarker) &&
260
+ installedMarker.version === manifest.version &&
261
+ installedMarker.sha256.toLowerCase() === component.sha256.toLowerCase()
241
262
  ) {
242
263
  // Already extracted for this version. Skip to keep postinstall fast
243
264
  // and to avoid clobbering user-tweaked assets.
@@ -270,7 +291,10 @@ async function installConnectorAssets() {
270
291
  if (result.status !== 0) {
271
292
  throw new Error(`tar extraction failed with status ${result.status ?? "unknown"}`);
272
293
  }
273
- writeFileSync(targetMarker, `${manifest.version}\n`);
294
+ writeFileSync(
295
+ targetMarker,
296
+ `${JSON.stringify({ version: manifest.version, sha256: component.sha256 })}\n`,
297
+ );
274
298
  console.log(`Installed connector assets to ${targetDir}`);
275
299
  } finally {
276
300
  rmSync(tempPath, { force: true });