@sigmashake/ssg 0.21.1 → 0.22.0

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 +6 -4
  2. package/package.json +6 -6
package/bin/ssg.cjs CHANGED
@@ -15,10 +15,13 @@ let binaryPath;
15
15
  // 1. Try platform-specific optional dependency (canonical npm install path).
16
16
  // This is checked first so a freshly-installed platform binary always wins over
17
17
  // any stale root-level binary that may have survived from a manual build.
18
+ let hookBinPath;
18
19
  try {
19
20
  const pkgRoot = path.dirname(require.resolve(`${platformPkg}/package.json`));
20
21
  const candidate = path.join(pkgRoot, 'bin', `ssg${ext}`);
21
22
  if (fs.existsSync(candidate)) binaryPath = candidate;
23
+ const hookCandidate = path.join(pkgRoot, 'bin', `ssg-hook-fast${ext}`);
24
+ if (fs.existsSync(hookCandidate)) hookBinPath = hookCandidate;
22
25
  } catch {}
23
26
 
24
27
  // 2. Check if binary was bundled in the root (dev: local npm pack or manual build)
@@ -40,10 +43,9 @@ if (!binaryPath) {
40
43
 
41
44
  // 3. Run binary if found
42
45
  if (binaryPath) {
43
- const result = spawnSync(binaryPath, process.argv.slice(2), {
44
- stdio: 'inherit',
45
- env: { ...process.env, SSG_PUBLIC_DIR: path.resolve(__dirname, '..', 'public') },
46
- });
46
+ const env = { ...process.env, SSG_PUBLIC_DIR: path.resolve(__dirname, '..', 'public') };
47
+ if (hookBinPath) env['SSG_HOOK_FAST_BIN'] = hookBinPath;
48
+ const result = spawnSync(binaryPath, process.argv.slice(2), {stdio: 'inherit', env});
47
49
  process.exit(result.status ?? 1);
48
50
  }
49
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sigmashake/ssg",
3
- "version": "0.21.1",
3
+ "version": "0.22.0",
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.21.1",
17
- "@sigmashake/ssg-linux-arm64": "0.21.1",
18
- "@sigmashake/ssg-darwin-arm64": "0.21.1",
19
- "@sigmashake/ssg-darwin-x64": "0.21.1",
20
- "@sigmashake/ssg-win32-x64": "0.21.1"
16
+ "@sigmashake/ssg-linux-x64": "0.22.0",
17
+ "@sigmashake/ssg-linux-arm64": "0.22.0",
18
+ "@sigmashake/ssg-darwin-arm64": "0.22.0",
19
+ "@sigmashake/ssg-darwin-x64": "0.22.0",
20
+ "@sigmashake/ssg-win32-x64": "0.22.0"
21
21
  },
22
22
  "scripts": {
23
23
  "postinstall": "node ./bin/cleanup-globals.cjs",