@connexum/ai-governance 1.0.0-beta.31 → 1.0.0-beta.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.
@@ -0,0 +1,23 @@
1
+ /**
2
+ * IDE / coding-assistant allowlist for `ai-governance init --ide <id>`.
3
+ *
4
+ * These ids MUST stay in sync with the canonical registry
5
+ * (packages/integrations-registry, category "ide") — specifically the subset the
6
+ * CLI can ACTUALLY configure: registry-selectable (not roadmap) AND not
7
+ * reportsBack:"query-only". The query-only betas (Continue / Windsurf / Zed) are
8
+ * deliberately excluded: the CLI has no config writer for them yet, so accepting
9
+ * `--ide continue` would silently write nothing — the exact dishonest no-op this
10
+ * allowlist exists to prevent (real-or-nothing; only-working install paths).
11
+ *
12
+ * The root test tests/cli-ides-registry-sync.test.ts fails if they drift — that
13
+ * gate is the binding contract (the CLI is self-contained and does not import the
14
+ * registry package directly). Mirrors src/cli/frameworks.ts.
15
+ */
16
+ /** Valid IDE ids accepted by --ide. Kept in registry order. */
17
+ export declare const IDE_IDS: readonly ["claude-code", "cursor", "claude-desktop", "codex-cli", "vscode", "aider"];
18
+ export type IdeId = (typeof IDE_IDS)[number];
19
+ /** True when id is an IDE the CLI can actually configure from `init`. */
20
+ export declare function isValidIde(id: string): id is IdeId;
21
+ /** Human-readable IDE name for install output. Falls back to the id. */
22
+ export declare function ideDisplayName(id: string): string;
23
+ //# sourceMappingURL=ides.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ides.d.ts","sourceRoot":"","sources":["../../src/cli/ides.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,+DAA+D;AAC/D,eAAO,MAAM,OAAO,sFAOV,CAAC;AAEX,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAI7C,yEAAyE;AACzE,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,KAAK,CAElD;AAED,wEAAwE;AACxE,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAUjD"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ /**
3
+ * IDE / coding-assistant allowlist for `ai-governance init --ide <id>`.
4
+ *
5
+ * These ids MUST stay in sync with the canonical registry
6
+ * (packages/integrations-registry, category "ide") — specifically the subset the
7
+ * CLI can ACTUALLY configure: registry-selectable (not roadmap) AND not
8
+ * reportsBack:"query-only". The query-only betas (Continue / Windsurf / Zed) are
9
+ * deliberately excluded: the CLI has no config writer for them yet, so accepting
10
+ * `--ide continue` would silently write nothing — the exact dishonest no-op this
11
+ * allowlist exists to prevent (real-or-nothing; only-working install paths).
12
+ *
13
+ * The root test tests/cli-ides-registry-sync.test.ts fails if they drift — that
14
+ * gate is the binding contract (the CLI is self-contained and does not import the
15
+ * registry package directly). Mirrors src/cli/frameworks.ts.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.IDE_IDS = void 0;
19
+ exports.isValidIde = isValidIde;
20
+ exports.ideDisplayName = ideDisplayName;
21
+ /** Valid IDE ids accepted by --ide. Kept in registry order. */
22
+ exports.IDE_IDS = [
23
+ "claude-code", // hooks — ~100% fire rate (also auto-detected via .claude)
24
+ "cursor", // mcp — .cursor/mcp.json (advisory)
25
+ "claude-desktop", // mcp — global claude_desktop_config.json (advisory, emitted as guidance)
26
+ "codex-cli", // terminal-cli — .codex/governance.md
27
+ "vscode", // mcp — .vscode/mcp.json (advisory)
28
+ "aider", // terminal-cli — governance file the assistant reads
29
+ ];
30
+ const IDE_SET = new Set(exports.IDE_IDS);
31
+ /** True when id is an IDE the CLI can actually configure from `init`. */
32
+ function isValidIde(id) {
33
+ return IDE_SET.has(id);
34
+ }
35
+ /** Human-readable IDE name for install output. Falls back to the id. */
36
+ function ideDisplayName(id) {
37
+ const names = {
38
+ "claude-code": "Claude Code",
39
+ cursor: "Cursor",
40
+ "claude-desktop": "Claude Desktop",
41
+ "codex-cli": "Codex CLI",
42
+ vscode: "VS Code",
43
+ aider: "Aider",
44
+ };
45
+ return names[id] ?? id;
46
+ }
47
+ //# sourceMappingURL=ides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ides.js","sourceRoot":"","sources":["../../src/cli/ides.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAiBH,gCAEC;AAGD,wCAUC;AA9BD,+DAA+D;AAClD,QAAA,OAAO,GAAG;IACrB,aAAa,EAAK,+DAA+D;IACjF,QAAQ,EAAU,0CAA0C;IAC5D,gBAAgB,EAAE,gFAAgF;IAClG,WAAW,EAAO,sCAAsC;IACxD,QAAQ,EAAU,0CAA0C;IAC5D,OAAO,EAAW,qDAAqD;CAC/D,CAAC;AAIX,MAAM,OAAO,GAAwB,IAAI,GAAG,CAAC,eAAO,CAAC,CAAC;AAEtD,yEAAyE;AACzE,SAAgB,UAAU,CAAC,EAAU;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AACzB,CAAC;AAED,wEAAwE;AACxE,SAAgB,cAAc,CAAC,EAAU;IACvC,MAAM,KAAK,GAA2B;QACpC,aAAa,EAAE,aAAa;QAC5B,MAAM,EAAE,QAAQ;QAChB,gBAAgB,EAAE,gBAAgB;QAClC,WAAW,EAAE,WAAW;QACxB,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,OAAO;KACf,CAAC;IACF,OAAO,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC"}
@@ -325,6 +325,11 @@ export declare function nonInteractiveInit(projectDir: string, opts: {
325
325
  framework?: string;
326
326
  /** IDE override (--ide) for MCP config write when auto-detection can't (VS Code). */
327
327
  ide?: string;
328
+ /** Opt-in (--route-through-proxy): emit forced-routing base-URL redirects so
329
+ * the customer's LLM SDK calls go through the governed wire proxy. */
330
+ routeProxy?: boolean;
331
+ /** Proxy base URL override (--proxy-url); defaults to DEFAULT_PROXY_URL. */
332
+ proxyUrl?: string;
328
333
  }): Promise<void>;
329
334
  /**
330
335
  * `ai-governance verify-chain <logDir> [--json]`
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG;AAMH,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAMrC,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA4D7E,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,MAAM,EAClB,gBAAgB,SAA6B,GAC5C,OAAO,CAAC,wBAAwB,CAAC,CAwEnC;AAWD;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE;IACJ,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,EAAE,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACtB,GACL,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAA;CAAE,GAAG,IAAI,CAAC,CA2EhF;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,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,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,cAAc,CAAA;KAAE,CAAC,CAAC;IACzG,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ,GAAG,oBAAoB,CA0DvB;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,GAAG,IAAI,CA6QrE;AA6JD;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,aAAa,EAAE,EAC/B,UAAU,EAAE,MAAM,GACjB,IAAI,CA0GN"}
package/dist/cli/index.js CHANGED
@@ -81,6 +81,8 @@ const https = __importStar(require("https"));
81
81
  const index_1 = require("../license/index");
82
82
  const governed_agent_1 = require("../governed-agent");
83
83
  const frameworks_1 = require("./frameworks");
84
+ const ides_1 = require("./ides");
85
+ const proxy_routing_1 = require("./proxy-routing");
84
86
  const mcp_config_1 = require("./mcp-config");
85
87
  const agent_dir_scanner_1 = require("./agent-dir-scanner");
86
88
  const normalize_agent_dir_1 = require("./normalize-agent-dir");
@@ -2033,6 +2035,16 @@ async function nonInteractiveInit(projectDir, opts) {
2033
2035
  }
2034
2036
  framework = opts.framework;
2035
2037
  }
2038
+ // Validate --ide against the registry-synced allowlist (only IDEs the CLI can
2039
+ // actually configure). Fail loudly on an unknown / roadmap / query-only id
2040
+ // rather than writing nothing and exiting 0 — the silent no-op the
2041
+ // only-working-install-paths gate exists to prevent.
2042
+ if (opts.ide) {
2043
+ if (!(0, ides_1.isValidIde)(opts.ide)) {
2044
+ process.stderr.write(`Unknown or unsupported IDE '${opts.ide}'. Valid: ${ides_1.IDE_IDS.join(', ')}.\n`);
2045
+ process.exit(1);
2046
+ }
2047
+ }
2036
2048
  const packs = opts.packs ? opts.packs.split(',') : ['soc2'];
2037
2049
  const validPacks = packs.filter(p => AVAILABLE_PACKS.some(ap => ap.id === p));
2038
2050
  if (validPacks.length > license.maxPacks) {
@@ -2100,6 +2112,51 @@ async function nonInteractiveInit(projectDir, opts) {
2100
2112
  ' so the assistant can authenticate.\n');
2101
2113
  }
2102
2114
  }
2115
+ // Claude Desktop's MCP config is a MACHINE-GLOBAL file, not per-project, so we
2116
+ // never mutate it from a project init (it may already hold the user's other MCP
2117
+ // servers). Instead we EMIT the governance_check config block + the OS path to
2118
+ // merge it into. Same advisory wiring as Cursor once placed. Opted into via
2119
+ // `--ide claude-desktop` (no safe filesystem auto-marker for a global app).
2120
+ if (opts.ide === 'claude-desktop') {
2121
+ const mcpUrl = process.env['CONNEXUM_MCP_URL'] ?? 'https://mcp.my-cc.io';
2122
+ const g = (0, mcp_config_1.buildClaudeDesktopConfig)({ mcpServerUrl: mcpUrl });
2123
+ process.stdout.write('\nClaude Desktop governance (machine-global config — merge, do not overwrite):\n' +
2124
+ ` Add this to your claude_desktop_config.json:\n` +
2125
+ ` macOS: ${g.paths.macOS}\n` +
2126
+ ` Windows: ${g.paths.windows}\n` +
2127
+ ` Linux: ${g.paths.linux}\n\n` +
2128
+ g.content.replace(/^/gm, ' ') +
2129
+ `\n Then set ${g.tokenEnvVar} in your environment and restart Claude Desktop.\n` +
2130
+ ' It evaluates each action against your bound packs and reports to your dashboard.\n');
2131
+ }
2132
+ // Forced routing (--route-through-proxy): emit the base-URL redirects that send
2133
+ // the customer's LLM SDK calls through the governed wire proxy. This is the
2134
+ // last mile of Runtime-2 coverage — once the base URL points at the proxy, ANY
2135
+ // tool using that provider SDK is governed (the proxy pre-flight-checks each
2136
+ // request against the bound packs and DENYs a violation before it reaches the
2137
+ // LLM). Opt-in: it changes where the customer's LLM traffic goes. No secret is
2138
+ // written — the provider API key stays in the customer's env.
2139
+ if (opts.routeProxy) {
2140
+ const proxyUrl = opts.proxyUrl ?? DEFAULT_PROXY_URL;
2141
+ // Emit redirects for all routable providers — setting a base URL for an SDK
2142
+ // the customer does not use is a harmless no-op, and it means whichever
2143
+ // provider their tools reach is governed without them having to declare it.
2144
+ const routing = (0, proxy_routing_1.buildProxyRoutingConfig)(proxyUrl);
2145
+ if (routing.lines.length > 0) {
2146
+ const dest = path.join(projectDir, '.governance', 'proxy-routing.env');
2147
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
2148
+ fs.writeFileSync(dest, routing.envFile);
2149
+ process.stdout.write(`\nGoverned-LLM routing written to .governance/proxy-routing.env (${routing.lines.length} provider${routing.lines.length === 1 ? '' : 's'}).\n` +
2150
+ ` Source it so your LLM calls run through the compliance proxy (${proxyUrl}):\n` +
2151
+ ' source .governance/proxy-routing.env\n' +
2152
+ ' Each call is checked against your bound packs before it reaches the model.\n' +
2153
+ ' Your provider API key stays in your own environment (never sent to us to store).\n');
2154
+ }
2155
+ if (routing.unsupported.length > 0) {
2156
+ process.stdout.write(` Note: forced routing not yet available for: ${routing.unsupported.join(', ')} ` +
2157
+ '(no verified SDK base-URL redirect yet — use the hook/MCP path for those).\n');
2158
+ }
2159
+ }
2103
2160
  // PR6: AI cursor activation — write IDE-native integration artifacts.
2104
2161
  // Every writer is called directly here (no-isolation check: all are wired).
2105
2162
  const slashCommands = writeClaudeSlashCommands(projectDir);
@@ -3563,6 +3620,8 @@ if (isDirectRun) {
3563
3620
  agentDir: agentDirArg,
3564
3621
  framework: frameworkIdx >= 0 ? args[frameworkIdx + 1] : undefined,
3565
3622
  ide: ideIdx >= 0 ? args[ideIdx + 1] : undefined,
3623
+ routeProxy: args.includes('--route-through-proxy'),
3624
+ proxyUrl: args.indexOf('--proxy-url') >= 0 ? args[args.indexOf('--proxy-url') + 1] : undefined,
3566
3625
  });
3567
3626
  // TS-010 KEY-TRUST: pin the org public key from the server into
3568
3627
  // .governance.json immediately after init writes the config file.