node9-ai 1.11.13 → 1.12.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.
package/README.md CHANGED
@@ -25,7 +25,7 @@ Node9 sits between your AI agent and your system. Every shell command, file writ
25
25
 
26
26
  ---
27
27
 
28
- ## Try it in 10 seconds — no install, no account
28
+ ## Try it in 10 seconds — no install
29
29
 
30
30
  ```bash
31
31
  npx node9-ai scan
package/bin/node9.js CHANGED
@@ -1,15 +1,31 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawnSync } from 'child_process';
3
- import path from 'path';
4
3
  import { fileURLToPath } from 'url';
4
+ import path from 'path';
5
5
  import fs from 'fs';
6
6
 
7
- // Locate @node9/proxy's bin via node_modules lookup
7
+ // Locate @node9/proxy's cli.js by walking candidate paths.
8
+ // createRequire('@node9/proxy/dist/cli.js') would be cleaner but
9
+ // @node9/proxy's package.json has a strict exports map that blocks
10
+ // every subpath except '.' — so we resolve by filesystem.
11
+ //
12
+ // npm v7+ hoists @node9/proxy alongside node9-ai in the same
13
+ // node_modules; older setups and pnpm may nest it. Both covered.
8
14
  const here = fileURLToPath(new URL('.', import.meta.url));
9
- const proxyBin = path.resolve(here, '../node_modules/@node9/proxy/dist/cli.js');
15
+ const candidates = [
16
+ // hoisted: node_modules/@node9/proxy/... (npm default)
17
+ path.resolve(here, '..', '..', '@node9', 'proxy', 'dist', 'cli.js'),
18
+ // nested: node_modules/node9-ai/node_modules/@node9/proxy/...
19
+ path.resolve(here, '..', 'node_modules', '@node9', 'proxy', 'dist', 'cli.js'),
20
+ ];
21
+ const proxyBin = candidates.find((p) => fs.existsSync(p));
10
22
 
11
- if (!fs.existsSync(proxyBin)) {
12
- process.stderr.write(`node9: could not find @node9/proxy at ${proxyBin}\n`);
23
+ if (!proxyBin) {
24
+ process.stderr.write(
25
+ 'node9: could not locate @node9/proxy. Searched:\n' +
26
+ candidates.map((c) => ' ' + c).join('\n') +
27
+ '\nTry `npm install -g node9-ai` again, or file an issue at https://github.com/node9-ai/node9-proxy\n'
28
+ );
13
29
  process.exit(1);
14
30
  }
15
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node9-ai",
3
- "version": "1.11.13",
3
+ "version": "1.12.0",
4
4
  "description": "Security layer for AI coding agents — intercepts dangerous tool calls before they execute",
5
5
  "keywords": [
6
6
  "ai",