@sigmashake/ssg 0.19.2 → 0.19.4

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.
Files changed (2) hide show
  1. package/bin/ssg.cjs +13 -11
  2. package/package.json +6 -6
package/bin/ssg.cjs CHANGED
@@ -12,19 +12,21 @@ const ext = process.platform === 'win32' ? '.exe' : '';
12
12
  const platformPkg = `@sigmashake/ssg-${process.platform}-${process.arch}`;
13
13
  let binaryPath;
14
14
 
15
- // 1. Check if binary was bundled in the root (via local npm pack or manual build)
16
- const rootBin = path.resolve(__dirname, '..', `ssg${ext}`);
17
- if (fs.existsSync(rootBin)) {
18
- binaryPath = rootBin;
19
- }
15
+ // 1. Try platform-specific optional dependency (canonical npm install path).
16
+ // This is checked first so a freshly-installed platform binary always wins over
17
+ // any stale root-level binary that may have survived from a manual build.
18
+ try {
19
+ const pkgRoot = path.dirname(require.resolve(`${platformPkg}/package.json`));
20
+ const candidate = path.join(pkgRoot, 'bin', `ssg${ext}`);
21
+ if (fs.existsSync(candidate)) binaryPath = candidate;
22
+ } catch {}
20
23
 
21
- // 2. Try platform-specific optional dependency (npm install path)
24
+ // 2. Check if binary was bundled in the root (dev: local npm pack or manual build)
22
25
  if (!binaryPath) {
23
- try {
24
- const pkgRoot = path.dirname(require.resolve(`${platformPkg}/package.json`));
25
- const candidate = path.join(pkgRoot, 'bin', `ssg${ext}`);
26
- if (fs.existsSync(candidate)) binaryPath = candidate;
27
- } catch {}
26
+ const rootBin = path.resolve(__dirname, '..', `ssg${ext}`);
27
+ if (fs.existsSync(rootBin)) {
28
+ binaryPath = rootBin;
29
+ }
28
30
  }
29
31
 
30
32
  // 3. Fall back to local dist/ (dev build / bun build --compile)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sigmashake/ssg",
3
- "version": "0.19.2",
3
+ "version": "0.19.4",
4
4
  "description": "AI Agent Governance CLI — evaluate tool calls against rules, block dangerous operations, and surface blocked commands",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,11 +13,11 @@
13
13
  "README.md"
14
14
  ],
15
15
  "optionalDependencies": {
16
- "@sigmashake/ssg-linux-x64": "0.19.1",
17
- "@sigmashake/ssg-linux-arm64": "0.19.1",
18
- "@sigmashake/ssg-darwin-arm64": "0.19.1",
19
- "@sigmashake/ssg-darwin-x64": "0.19.1",
20
- "@sigmashake/ssg-win32-x64": "0.19.0"
16
+ "@sigmashake/ssg-linux-x64": "0.19.4",
17
+ "@sigmashake/ssg-linux-arm64": "0.19.4",
18
+ "@sigmashake/ssg-darwin-arm64": "0.19.4",
19
+ "@sigmashake/ssg-darwin-x64": "0.19.4",
20
+ "@sigmashake/ssg-win32-x64": "0.19.4"
21
21
  },
22
22
  "scripts": {
23
23
  "postinstall": "node ./bin/cleanup-globals.cjs",