@sigmashake/ssg 0.29.110 → 0.29.111

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.
@@ -13,7 +13,9 @@ const crypto = require("node:crypto");
13
13
  const isGlobal =
14
14
  process.env.npm_config_global === "true" ||
15
15
  __dirname.includes("/lib/node_modules/") ||
16
- __dirname.includes("\\npm\\node_modules\\");
16
+ __dirname.includes("\\npm\\node_modules\\") ||
17
+ __dirname.includes("/pnpm/") ||
18
+ __dirname.includes("\\pnpm\\");
17
19
 
18
20
  if (!isGlobal) {
19
21
  process.exit(0);
@@ -25,6 +27,15 @@ const targets = [
25
27
  path.join(homedir, ".local", "bin", "libssg_eval.so"),
26
28
  path.join(homedir, ".bun", "bin", "ssg"),
27
29
  ];
30
+ if (process.platform === "win32") {
31
+ // Windows standalone-install + bun-global locations the POSIX paths miss.
32
+ const localAppData =
33
+ process.env.LOCALAPPDATA || path.join(homedir, "AppData", "Local");
34
+ targets.push(
35
+ path.join(localAppData, "Programs", "ssg", "ssg.exe"),
36
+ path.join(homedir, ".bun", "bin", "ssg.exe"),
37
+ );
38
+ }
28
39
 
29
40
  let cleaned = false;
30
41
 
@@ -78,6 +89,17 @@ if (cleaned) {
78
89
  if (process.platform === "linux") {
79
90
  const p = "/etc/machine-id";
80
91
  if (fs.existsSync(p)) machineId = fs.readFileSync(p, "utf8").trim();
92
+ } else if (process.platform === "win32") {
93
+ // Windows has no /etc/machine-id — the registry MachineGuid is the
94
+ // stable per-machine ID. Without this the fingerprint collapsed to
95
+ // hostname+homedir and collided across machines.
96
+ const reg = require("node:child_process").execFileSync(
97
+ "reg",
98
+ ["query", "HKLM\\SOFTWARE\\Microsoft\\Cryptography", "/v", "MachineGuid"],
99
+ { encoding: "utf8", timeout: 5000, windowsHide: true },
100
+ );
101
+ const m = reg.match(/MachineGuid\s+REG_SZ\s+(\S+)/);
102
+ if (m) machineId = m[1];
81
103
  }
82
104
  } catch {
83
105
  /* ignore */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sigmashake/ssg",
3
- "version": "0.29.110",
3
+ "version": "0.29.111",
4
4
  "description": "AI Agent Governance CLI — evaluate tool calls against rules, block dangerous operations, and surface blocked commands",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
@@ -15,11 +15,11 @@
15
15
  "sbom.cdx.json"
16
16
  ],
17
17
  "optionalDependencies": {
18
- "@sigmashake/ssg-linux-x64": "0.29.110",
19
- "@sigmashake/ssg-linux-arm64": "0.29.110",
20
- "@sigmashake/ssg-darwin-arm64": "0.29.110",
21
- "@sigmashake/ssg-darwin-x64": "0.29.110",
22
- "@sigmashake/ssg-win32-x64": "0.29.110"
18
+ "@sigmashake/ssg-linux-x64": "0.29.111",
19
+ "@sigmashake/ssg-linux-arm64": "0.29.111",
20
+ "@sigmashake/ssg-darwin-arm64": "0.29.111",
21
+ "@sigmashake/ssg-darwin-x64": "0.29.111",
22
+ "@sigmashake/ssg-win32-x64": "0.29.111"
23
23
  },
24
24
  "scripts": {
25
25
  "postinstall": "node ./bin/cleanup-globals.cjs",