llm-cli-gateway 2.14.1 → 2.16.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 (41) hide show
  1. package/CHANGELOG.md +61 -1
  2. package/README.md +35 -0
  3. package/dist/acp/process-manager.js +2 -1
  4. package/dist/acp/provider-registry.js +8 -8
  5. package/dist/async-job-manager.d.ts +4 -1
  6. package/dist/async-job-manager.js +15 -6
  7. package/dist/compressor/estimate.d.ts +5 -0
  8. package/dist/compressor/estimate.js +21 -0
  9. package/dist/compressor/index.d.ts +23 -0
  10. package/dist/compressor/index.js +77 -0
  11. package/dist/compressor/router.d.ts +2 -0
  12. package/dist/compressor/router.js +57 -0
  13. package/dist/compressor/transforms/ansi.d.ts +3 -0
  14. package/dist/compressor/transforms/ansi.js +89 -0
  15. package/dist/compressor/transforms/json.d.ts +1 -0
  16. package/dist/compressor/transforms/json.js +156 -0
  17. package/dist/compressor/transforms/log.d.ts +12 -0
  18. package/dist/compressor/transforms/log.js +55 -0
  19. package/dist/compressor/transforms/whitespace.d.ts +8 -0
  20. package/dist/compressor/transforms/whitespace.js +79 -0
  21. package/dist/config.d.ts +16 -0
  22. package/dist/config.js +57 -0
  23. package/dist/executor.d.ts +1 -0
  24. package/dist/executor.js +5 -2
  25. package/dist/flight-recorder.d.ts +9 -0
  26. package/dist/flight-recorder.js +42 -0
  27. package/dist/index.d.ts +18 -2
  28. package/dist/index.js +282 -88
  29. package/dist/job-store.d.ts +4 -0
  30. package/dist/job-store.js +16 -0
  31. package/dist/provider-definitions.d.ts +1 -0
  32. package/dist/provider-definitions.js +28 -10
  33. package/dist/provider-tool-capabilities.js +3 -3
  34. package/dist/request-helpers.js +1 -1
  35. package/dist/skill-loader.d.ts +24 -0
  36. package/dist/skill-loader.js +201 -0
  37. package/dist/spawn-env-isolation.d.ts +10 -0
  38. package/dist/spawn-env-isolation.js +55 -0
  39. package/dist/upstream-contracts.js +47 -27
  40. package/npm-shrinkwrap.json +2 -2
  41. package/package.json +7 -3
@@ -1,6 +1,6 @@
1
1
  import { spawnSync } from "node:child_process";
2
2
  import { createHash } from "node:crypto";
3
- import { getProviderDefinition } from "./provider-definitions.js";
3
+ import { getProviderDefinition, PROVIDER_TARGET_VERSIONS, } from "./provider-definitions.js";
4
4
  import { envWithExtendedPath, getExtendedPath, resolveCommandForSpawn } from "./executor.js";
5
5
  export const ACP_ENTRYPOINT_CONTRACTS = {
6
6
  mistral: {
@@ -9,7 +9,7 @@ export const ACP_ENTRYPOINT_CONTRACTS = {
9
9
  status: "native",
10
10
  executable: "vibe-acp",
11
11
  entrypointArgs: [],
12
- targetVersion: "vibe 2.18.3",
12
+ targetVersion: PROVIDER_TARGET_VERSIONS.mistral,
13
13
  probeArgs: [["--version"], ["--help"]],
14
14
  evidence: "Native ACP executable vibe-acp; manual initialize + session/new smoke passed. First runtime pilot.",
15
15
  docsRef: "docs/plans/first-class-acp-gateway-extension.dag.toml#provider_matrix.mistral",
@@ -20,9 +20,9 @@ export const ACP_ENTRYPOINT_CONTRACTS = {
20
20
  status: "native",
21
21
  executable: "grok",
22
22
  entrypointArgs: ["agent", "stdio"],
23
- targetVersion: "grok 0.2.77 (44e77bec3a)",
23
+ targetVersion: PROVIDER_TARGET_VERSIONS.grok,
24
24
  probeArgs: [["agent", "stdio", "--help"]],
25
- evidence: "Native ACP via `grok agent stdio`; initialize + session/new smoke passed with isolated leader socket. Second runtime pilot. Entrypoint re-probed clean at 0.2.77.",
25
+ evidence: `Native ACP via \`grok agent stdio\`; initialize + session/new smoke passed with isolated leader socket. Second runtime pilot. Entrypoint re-probed clean at ${PROVIDER_TARGET_VERSIONS.grok}.`,
26
26
  docsRef: "docs/plans/first-class-acp-gateway-extension.dag.toml#provider_matrix.grok",
27
27
  },
28
28
  codex: {
@@ -31,10 +31,10 @@ export const ACP_ENTRYPOINT_CONTRACTS = {
31
31
  status: "adapter_mediated_deferred",
32
32
  executable: "codex",
33
33
  entrypointArgs: [],
34
- targetVersion: "codex-cli 0.142.4",
34
+ targetVersion: PROVIDER_TARGET_VERSIONS.codex,
35
35
  probeArgs: [],
36
36
  adapterCandidates: ["zed-industries/codex-acp", "agentclientprotocol/codex-acp"],
37
- evidence: "No native ACP entrypoint at codex-cli 0.142.4. Adapter evidence tracked as documentation only; not native gateway ACP support.",
37
+ evidence: `No native ACP entrypoint at ${PROVIDER_TARGET_VERSIONS.codex}. Adapter evidence tracked as documentation only; not native gateway ACP support.`,
38
38
  docsRef: "docs/plans/first-class-acp-gateway-extension.dag.toml#provider_matrix.codex",
39
39
  },
40
40
  claude: {
@@ -43,10 +43,10 @@ export const ACP_ENTRYPOINT_CONTRACTS = {
43
43
  status: "adapter_mediated_deferred",
44
44
  executable: "claude",
45
45
  entrypointArgs: [],
46
- targetVersion: "claude 2.1.198",
46
+ targetVersion: PROVIDER_TARGET_VERSIONS.claude,
47
47
  probeArgs: [],
48
48
  adapterCandidates: ["Claude Agent SDK ACP adapter"],
49
- evidence: "No native Claude Code CLI ACP entrypoint at claude 2.1.198. Adapter ownership/permission bridging unresolved; deferred.",
49
+ evidence: `No native Claude Code CLI ACP entrypoint at ${PROVIDER_TARGET_VERSIONS.claude}. Adapter ownership/permission bridging unresolved; deferred.`,
50
50
  docsRef: "docs/plans/first-class-acp-gateway-extension.dag.toml#provider_matrix.claude",
51
51
  },
52
52
  gemini: {
@@ -55,9 +55,9 @@ export const ACP_ENTRYPOINT_CONTRACTS = {
55
55
  status: "absent_watchlist",
56
56
  executable: "agy",
57
57
  entrypointArgs: [],
58
- targetVersion: "agy 1.0.14",
58
+ targetVersion: PROVIDER_TARGET_VERSIONS.gemini,
59
59
  probeArgs: [],
60
- evidence: "agy 1.0.14 has no ACP flag or subcommand. Legacy Gemini CLI ACP evidence does not transfer. Watchlist item.",
60
+ evidence: `${PROVIDER_TARGET_VERSIONS.gemini} has no ACP flag or subcommand. Legacy Gemini CLI ACP evidence does not transfer. Watchlist item.`,
61
61
  docsRef: "docs/plans/first-class-acp-gateway-extension.dag.toml#provider_matrix.gemini",
62
62
  },
63
63
  devin: {
@@ -66,7 +66,7 @@ export const ACP_ENTRYPOINT_CONTRACTS = {
66
66
  status: "native",
67
67
  executable: "devin",
68
68
  entrypointArgs: ["acp"],
69
- targetVersion: "devin 2026.8.18 (16737566)",
69
+ targetVersion: PROVIDER_TARGET_VERSIONS.devin,
70
70
  probeArgs: [["--version"]],
71
71
  evidence: 'Native ACP entrypoint `devin acp` (stdio JSON-RPC). Slice D1 manual initialize + session/new smoke passed (protocolVersion 1, agent "Affogato", session created). Third native runtime pilot; routing stays config-gated.',
72
72
  docsRef: "docs/plans/first-class-acp-gateway-extension.dag.toml#provider_matrix.devin",
@@ -77,7 +77,7 @@ export const ACP_ENTRYPOINT_CONTRACTS = {
77
77
  status: "native",
78
78
  executable: "cursor-agent",
79
79
  entrypointArgs: ["acp"],
80
- targetVersion: "cursor-agent 2026.06.29-2ad2186",
80
+ targetVersion: PROVIDER_TARGET_VERSIONS.cursor,
81
81
  probeArgs: [["acp", "--help"]],
82
82
  evidence: "Native hidden ACP entrypoint `cursor-agent acp` (stdio JSON-RPC). `cursor-agent acp --help` was verified locally; manual initialize + session/new smoke passed locally (protocolVersion 1, session created; no agentInfo returned). Runtime routing stays config-gated.",
83
83
  docsRef: "docs/plans/first-class-acp-gateway-extension.dag.toml#provider_matrix.cursor",
@@ -326,10 +326,12 @@ export const UPSTREAM_CLI_CONTRACTS = {
326
326
  "--system-prompt-file": {
327
327
  arity: "one",
328
328
  description: "Replacement system prompt read from a file path",
329
+ hiddenFromHelp: true,
329
330
  },
330
331
  "--append-system-prompt-file": {
331
332
  arity: "one",
332
333
  description: "Appended system prompt read from a file path",
334
+ hiddenFromHelp: true,
333
335
  },
334
336
  "--name": { arity: "one", description: "Session name label" },
335
337
  "--plugin-dir": {
@@ -494,7 +496,7 @@ export const UPSTREAM_CLI_CONTRACTS = {
494
496
  },
495
497
  {
496
498
  id: "claude-background-acknowledged-not-emitted",
497
- description: "Claude 2.1.198 advertises --bg/--background (background agent), but the gateway acknowledges them without emitting; caller argv is rejected",
499
+ description: "Claude 2.1.204 advertises --bg/--background (background agent), but the gateway acknowledges them without emitting; caller argv is rejected",
498
500
  args: ["-p", "hello", "--background"],
499
501
  expect: "fail",
500
502
  },
@@ -658,8 +660,11 @@ export const UPSTREAM_CLI_CONTRACTS = {
658
660
  "--disable",
659
661
  "--enable",
660
662
  "--include-managed-config",
661
- "--permissions-profile",
663
+ "--permission-profile",
662
664
  "--profile",
665
+ "--sandbox-state-disable-network",
666
+ "--sandbox-state-json",
667
+ "--sandbox-state-readable-root",
663
668
  ], { exposure: "not_exposed" }),
664
669
  debug: subcommand(["debug"], "Run Codex debugging utilities.", "read_only", ["--config", "--disable", "--enable"], { tier: "diagnostic" }),
665
670
  apply: subcommand(["apply"], "Apply a Codex patch to the workspace.", "destructive", ["--config", "--disable", "--enable"], { exposure: "not_exposed" }),
@@ -1028,7 +1033,7 @@ export const UPSTREAM_CLI_CONTRACTS = {
1028
1033
  description: "Print-mode wait timeout as a Go duration string (e.g. 5m0s)",
1029
1034
  },
1030
1035
  },
1031
- acknowledgedUpstreamFlags: ["--log-file", "--prompt-interactive"],
1036
+ acknowledgedUpstreamFlags: ["--log-file", "--mode", "--prompt-interactive"],
1032
1037
  env: {},
1033
1038
  conformanceFixtures: [
1034
1039
  {
@@ -1109,6 +1114,7 @@ export const UPSTREAM_CLI_CONTRACTS = {
1109
1114
  "--leader-socket",
1110
1115
  "--model",
1111
1116
  "--no-leader",
1117
+ "--plugin-dir",
1112
1118
  "--reasoning-effort",
1113
1119
  "--reauth",
1114
1120
  "--xai-api-base-url",
@@ -1189,11 +1195,11 @@ export const UPSTREAM_CLI_CONTRACTS = {
1189
1195
  "--deny",
1190
1196
  "--disable-web-search",
1191
1197
  "--disallowed-tools",
1192
- "--effort",
1193
1198
  "--experimental-memory",
1194
1199
  "--fork-session",
1195
1200
  "--json-schema",
1196
1201
  "--max-turns",
1202
+ "--minimal",
1197
1203
  "--model",
1198
1204
  "--no-alt-screen",
1199
1205
  "--no-memory",
@@ -1233,7 +1239,7 @@ export const UPSTREAM_CLI_CONTRACTS = {
1233
1239
  worktree: subcommand(["worktree"], "Manage Grok worktree sessions.", "writes_local_config", ["--leader-socket"]),
1234
1240
  }, GROK_DEBUG_HELP_FLAGS),
1235
1241
  maxPositionals: 0,
1236
- acknowledgedUpstreamFlags: [...GROK_DEBUG_HELP_FLAGS, "--session-id"],
1242
+ acknowledgedUpstreamFlags: [...GROK_DEBUG_HELP_FLAGS, "--minimal", "--session-id"],
1237
1243
  mcpTools: ["grok_request", "grok_request_async"],
1238
1244
  mcpParameters: [
1239
1245
  "prompt",
@@ -1675,7 +1681,13 @@ export const UPSTREAM_CLI_CONTRACTS = {
1675
1681
  description: "Additional writable workspace directory (Phase 4 slice ζ; repeat once per directory)",
1676
1682
  },
1677
1683
  },
1678
- acknowledgedUpstreamFlags: ["--auto-approve", "--check-upgrade", "--yolo"],
1684
+ acknowledgedUpstreamFlags: [
1685
+ "--auto-approve",
1686
+ "--check-upgrade",
1687
+ "--disabled-tools",
1688
+ "--worktree",
1689
+ "--yolo",
1690
+ ],
1679
1691
  env: {
1680
1692
  VIBE_ACTIVE_MODEL: {
1681
1693
  arity: "one",
@@ -1774,25 +1786,39 @@ export const UPSTREAM_CLI_CONTRACTS = {
1774
1786
  },
1775
1787
  {
1776
1788
  id: "mistral-current-help-surface",
1777
- description: "Vibe 2.18.3 request-time help surface: --prompt, -v, --version, --setup accepted",
1789
+ description: "Vibe 2.19.1 request-time help surface: --prompt, -v, --version, --setup accepted",
1778
1790
  args: ["--prompt", "hello", "--agent", "auto-approve", "-v", "--version", "--setup"],
1779
1791
  env: { VIBE_ACTIVE_MODEL: "mistral-medium-3.5" },
1780
1792
  expect: "pass",
1781
1793
  },
1782
1794
  {
1783
1795
  id: "mistral-yolo-shortcut-rejected",
1784
- description: "Vibe 2.18.3 advertises --yolo as a shortcut, but the gateway keeps using explicit --agent auto-approve",
1796
+ description: "Vibe 2.19.0 advertises --yolo as a shortcut, but the gateway keeps using explicit --agent auto-approve",
1785
1797
  args: ["-p", "hello", "--yolo"],
1786
1798
  env: { VIBE_ACTIVE_MODEL: "mistral-medium-3.5" },
1787
1799
  expect: "fail",
1788
1800
  },
1789
1801
  {
1790
1802
  id: "mistral-check-upgrade-rejected",
1791
- description: "Vibe 2.18.3 advertises --check-upgrade, but gateway request validation rejects update-prompt flags",
1803
+ description: "Vibe 2.19.0 advertises --check-upgrade, but gateway request validation rejects update-prompt flags",
1792
1804
  args: ["--check-upgrade"],
1793
1805
  env: { VIBE_ACTIVE_MODEL: "mistral-medium-3.5" },
1794
1806
  expect: "fail",
1795
1807
  },
1808
+ {
1809
+ id: "mistral-worktree-rejected",
1810
+ description: "Vibe 2.19.0 advertises --worktree (native worktree); the gateway uses slice-λ worktree (spawns with cwd) and rejects raw --worktree as caller argv",
1811
+ args: ["-p", "hello", "--worktree", "feature"],
1812
+ env: { VIBE_ACTIVE_MODEL: "mistral-medium-3.5" },
1813
+ expect: "fail",
1814
+ },
1815
+ {
1816
+ id: "mistral-disabled-tools-rejected",
1817
+ description: "Vibe 2.19.1 adds --disabled-tools (denylist counterpart to --enabled-tools); the gateway does not emit it (disallowedTools is accepted but ignored) and rejects raw --disabled-tools as caller argv",
1818
+ args: ["-p", "hello", "--disabled-tools", "shell"],
1819
+ env: { VIBE_ACTIVE_MODEL: "mistral-medium-3.5" },
1820
+ expect: "fail",
1821
+ },
1796
1822
  {
1797
1823
  id: "mistral-resume-bare",
1798
1824
  description: "Vibe --resume without session ID is accepted (optional arity)",
@@ -2031,22 +2057,16 @@ export const UPSTREAM_CLI_CONTRACTS = {
2031
2057
  acknowledgedUpstreamFlags: [
2032
2058
  "--api-key",
2033
2059
  "--header",
2034
- "-H",
2035
- "-p",
2036
2060
  "--plan",
2037
2061
  "--yolo",
2038
2062
  "--approve-mcps",
2039
2063
  "--plugin-dir",
2040
2064
  "--worktree",
2041
- "-w",
2042
2065
  "--worktree-base",
2043
2066
  "--skip-worktree-setup",
2044
2067
  "--stream-partial-output",
2045
2068
  "--list-models",
2046
2069
  "--version",
2047
- "-v",
2048
- "--help",
2049
- "-h",
2050
2070
  ],
2051
2071
  env: {
2052
2072
  CURSOR_API_KEY: {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "llm-cli-gateway",
3
- "version": "2.14.1",
3
+ "version": "2.16.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "llm-cli-gateway",
9
- "version": "2.14.1",
9
+ "version": "2.16.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@modelcontextprotocol/sdk": "^1.29.0",
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "llm-cli-gateway",
3
- "version": "2.14.1",
3
+ "version": "2.16.0",
4
4
  "mcpName": "io.github.verivus-oss/llm-cli-gateway",
5
- "description": "Local-first MCP gateway for cross-model review across native coding-agent CLIs and API-token LLMs with sessions, durable jobs, and validation receipts.",
5
+ "description": "Secure local control plane for AI coding agents across supported MCP clients, with workspace-scoped remote access, approval gates, durable jobs, sessions, and audit receipts.",
6
6
  "license": "MIT",
7
7
  "author": "VerivusAI Labs (https://github.com/verivus-oss)",
8
8
  "repository": {
@@ -20,6 +20,7 @@
20
20
  "codex",
21
21
  "gemini",
22
22
  "orchestration",
23
+ "control-plane",
23
24
  "model-context-protocol",
24
25
  "ai",
25
26
  "cli-gateway"
@@ -84,6 +85,9 @@
84
85
  "upstream:contracts": "node scripts/upstream-scan.mjs --contracts-check",
85
86
  "upstream:scan": "node scripts/upstream-scan.mjs",
86
87
  "provider:surfaces:check": "node scripts/provider-surfaces-check.mjs",
88
+ "site:generate": "node scripts/generate-site-discovery.mjs",
89
+ "site:generate:check": "node scripts/generate-site-discovery.mjs --check",
90
+ "site:validate": "node scripts/validate-site-discovery.mjs",
87
91
  "lint": "eslint src/**/*.ts",
88
92
  "lint:fix": "eslint src/**/*.ts --fix",
89
93
  "format": "prettier --write 'src/**/*.ts'",
@@ -93,7 +97,7 @@
93
97
  "search:google:submit:dry-run": "node scripts/submit-google-search-console.mjs --dry-run",
94
98
  "search:submit": "node scripts/submit-indexnow.mjs",
95
99
  "search:submit:dry-run": "node scripts/submit-indexnow.mjs --dry-run",
96
- "check": "npm run build && npm run lint && npm run format:check && npm run provider:surfaces:check && npm test && npm run security:audit",
100
+ "check": "npm run build && npm run lint && npm run format:check && npm run provider:surfaces:check && npm run site:generate:check && npm run site:validate && npm test && npm run security:audit",
97
101
  "release:build": "bash installer/build-release.sh",
98
102
  "release:checksums": "cd installer/dist && sha256sum --check SHA256SUMS",
99
103
  "release:docker": "docker compose -f docker/personal.compose.yml build"