llm-cli-gateway 2.6.3 → 2.7.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/CHANGELOG.md +46 -0
- package/README.md +50 -8
- package/dist/doctor.d.ts +22 -0
- package/dist/doctor.js +45 -0
- package/dist/index.js +60 -0
- package/dist/provider-tool-capabilities.d.ts +97 -0
- package/dist/provider-tool-capabilities.js +1138 -0
- package/dist/resources.js +51 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/setup/status.schema.json +67 -6
- package/socket.yml +25 -2
package/dist/resources.js
CHANGED
|
@@ -2,6 +2,7 @@ import { CLI_TYPES, PROVIDER_TYPES } from "./session-manager.js";
|
|
|
2
2
|
import { getAvailableCliInfo } from "./model-registry.js";
|
|
3
3
|
import { computeGlobalCacheStats, computePrefixCacheStats, computeSessionCacheStats, computeTtlRemaining, } from "./cache-stats.js";
|
|
4
4
|
import { buildProviderSubcommandsCompactCatalog, getCliSubcommandContract, serializeCliSubcommandContract, } from "./upstream-contracts.js";
|
|
5
|
+
import { getOneProviderToolCapabilities, getProviderToolCapabilities, providerCapabilityIds, } from "./provider-tool-capabilities.js";
|
|
5
6
|
export class ResourceProvider {
|
|
6
7
|
sessionManager;
|
|
7
8
|
performanceMetrics;
|
|
@@ -176,6 +177,28 @@ export class ResourceProvider {
|
|
|
176
177
|
priority: 0.7,
|
|
177
178
|
},
|
|
178
179
|
},
|
|
180
|
+
{
|
|
181
|
+
uri: "provider-tools://catalog",
|
|
182
|
+
name: "Provider Tool Capabilities Catalog",
|
|
183
|
+
title: "Provider Tool Capabilities Catalog",
|
|
184
|
+
description: "Read-only catalog of gateway tool controls and discovered provider skills",
|
|
185
|
+
mimeType: "application/json",
|
|
186
|
+
annotations: {
|
|
187
|
+
audience: ["user", "assistant"],
|
|
188
|
+
priority: 0.8,
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
...providerCapabilityIds().map(cli => ({
|
|
192
|
+
uri: `provider-tools://${cli}`,
|
|
193
|
+
name: `${cli} Tool Capabilities`,
|
|
194
|
+
title: `${cli} Tool Capabilities`,
|
|
195
|
+
description: `Gateway tool controls and discovered local skills for ${cli}`,
|
|
196
|
+
mimeType: "application/json",
|
|
197
|
+
annotations: {
|
|
198
|
+
audience: ["user", "assistant"],
|
|
199
|
+
priority: 0.8,
|
|
200
|
+
},
|
|
201
|
+
})),
|
|
179
202
|
];
|
|
180
203
|
}
|
|
181
204
|
async readResource(uri) {
|
|
@@ -320,6 +343,21 @@ export class ResourceProvider {
|
|
|
320
343
|
text: JSON.stringify(buildProviderSubcommandsCompactCatalog()),
|
|
321
344
|
};
|
|
322
345
|
}
|
|
346
|
+
if (uri === "provider-tools://catalog" || uri === "provider_tools://catalog") {
|
|
347
|
+
return {
|
|
348
|
+
uri,
|
|
349
|
+
mimeType: "application/json",
|
|
350
|
+
text: JSON.stringify(getProviderToolCapabilities(), null, 2),
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
const providerToolsResource = parseProviderToolsUri(uri);
|
|
354
|
+
if (providerToolsResource) {
|
|
355
|
+
return {
|
|
356
|
+
uri,
|
|
357
|
+
mimeType: "application/json",
|
|
358
|
+
text: JSON.stringify(getOneProviderToolCapabilities(providerToolsResource.provider), null, 2),
|
|
359
|
+
};
|
|
360
|
+
}
|
|
323
361
|
const subcommandResource = parseProviderSubcommandUri(uri);
|
|
324
362
|
if (subcommandResource) {
|
|
325
363
|
const contract = getCliSubcommandContract(subcommandResource.provider, subcommandResource.commandPath);
|
|
@@ -354,3 +392,16 @@ function parseProviderSubcommandUri(uri) {
|
|
|
354
392
|
commandPath: pathParts.map(part => decodeURIComponent(part)).filter(Boolean),
|
|
355
393
|
};
|
|
356
394
|
}
|
|
395
|
+
function parseProviderToolsUri(uri) {
|
|
396
|
+
const prefix = uri.startsWith("provider-tools://")
|
|
397
|
+
? "provider-tools://"
|
|
398
|
+
: uri.startsWith("provider_tools://")
|
|
399
|
+
? "provider_tools://"
|
|
400
|
+
: null;
|
|
401
|
+
if (!prefix || uri === `${prefix}catalog`)
|
|
402
|
+
return null;
|
|
403
|
+
const provider = uri.slice(prefix.length);
|
|
404
|
+
if (!providerCapabilityIds().includes(provider))
|
|
405
|
+
return null;
|
|
406
|
+
return { provider: provider };
|
|
407
|
+
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "llm-cli-gateway",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "llm-cli-gateway",
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.7.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "llm-cli-gateway",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"mcpName": "io.github.verivus-oss/llm-cli-gateway",
|
|
5
5
|
"description": "MCP server providing unified access to Claude Code, Codex, Gemini, Grok, and Mistral Vibe CLIs with session management, retry logic, async job orchestration, durable job results, and cross-LLM validation.",
|
|
6
6
|
"license": "MIT",
|
package/setup/status.schema.json
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"endpoint_exposure",
|
|
17
17
|
"client_config",
|
|
18
18
|
"cache_awareness",
|
|
19
|
+
"provider_capabilities",
|
|
19
20
|
"upstream",
|
|
20
21
|
"next_actions"
|
|
21
22
|
],
|
|
@@ -289,12 +290,7 @@
|
|
|
289
290
|
},
|
|
290
291
|
"vibe_session_logging": {
|
|
291
292
|
"type": "object",
|
|
292
|
-
"required": [
|
|
293
|
-
"config_path",
|
|
294
|
-
"config_present",
|
|
295
|
-
"session_logging_enabled",
|
|
296
|
-
"note"
|
|
297
|
-
],
|
|
293
|
+
"required": ["config_path", "config_present", "session_logging_enabled", "note"],
|
|
298
294
|
"properties": {
|
|
299
295
|
"config_path": { "type": "string" },
|
|
300
296
|
"config_present": { "type": "boolean" },
|
|
@@ -344,6 +340,71 @@
|
|
|
344
340
|
},
|
|
345
341
|
"additionalProperties": false
|
|
346
342
|
},
|
|
343
|
+
"provider_capabilities": {
|
|
344
|
+
"type": "object",
|
|
345
|
+
"required": ["schema_version", "tool", "resources", "cache_ttl_ms", "providers"],
|
|
346
|
+
"properties": {
|
|
347
|
+
"schema_version": { "const": "provider-tool-capabilities.v2" },
|
|
348
|
+
"tool": { "const": "provider_tool_capabilities" },
|
|
349
|
+
"resources": {
|
|
350
|
+
"type": "object",
|
|
351
|
+
"required": ["catalog", "providers"],
|
|
352
|
+
"properties": {
|
|
353
|
+
"catalog": { "const": "provider-tools://catalog" },
|
|
354
|
+
"providers": {
|
|
355
|
+
"type": "object",
|
|
356
|
+
"required": ["claude", "codex", "gemini", "grok", "grok_api", "mistral"],
|
|
357
|
+
"additionalProperties": { "type": "string" }
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
"additionalProperties": false
|
|
361
|
+
},
|
|
362
|
+
"cache_ttl_ms": { "type": "integer", "minimum": 0 },
|
|
363
|
+
"providers": {
|
|
364
|
+
"type": "object",
|
|
365
|
+
"required": ["claude", "codex", "gemini", "grok", "grok_api", "mistral"],
|
|
366
|
+
"additionalProperties": {
|
|
367
|
+
"type": "object",
|
|
368
|
+
"required": [
|
|
369
|
+
"provider_kind",
|
|
370
|
+
"cli_available",
|
|
371
|
+
"gateway_request_tools",
|
|
372
|
+
"supported_features",
|
|
373
|
+
"unsupported_inputs",
|
|
374
|
+
"config_surface_count",
|
|
375
|
+
"discovered_skill_count",
|
|
376
|
+
"discovered_provider_tool_count",
|
|
377
|
+
"warnings"
|
|
378
|
+
],
|
|
379
|
+
"properties": {
|
|
380
|
+
"provider_kind": { "enum": ["cli", "api"] },
|
|
381
|
+
"cli_available": { "type": "boolean" },
|
|
382
|
+
"gateway_request_tools": {
|
|
383
|
+
"type": "array",
|
|
384
|
+
"items": { "type": "string" }
|
|
385
|
+
},
|
|
386
|
+
"supported_features": {
|
|
387
|
+
"type": "array",
|
|
388
|
+
"items": { "type": "string" }
|
|
389
|
+
},
|
|
390
|
+
"unsupported_inputs": {
|
|
391
|
+
"type": "array",
|
|
392
|
+
"items": { "type": "string" }
|
|
393
|
+
},
|
|
394
|
+
"config_surface_count": { "type": "integer", "minimum": 0 },
|
|
395
|
+
"discovered_skill_count": { "type": "integer", "minimum": 0 },
|
|
396
|
+
"discovered_provider_tool_count": { "type": "integer", "minimum": 0 },
|
|
397
|
+
"warnings": {
|
|
398
|
+
"type": "array",
|
|
399
|
+
"items": { "type": "string" }
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"additionalProperties": false
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"additionalProperties": false
|
|
407
|
+
},
|
|
347
408
|
"upstream": {
|
|
348
409
|
"type": "object",
|
|
349
410
|
"required": [
|
package/socket.yml
CHANGED
|
@@ -35,6 +35,28 @@ version: 2
|
|
|
35
35
|
# release security audit now hard-fails if any of those packages re-enter
|
|
36
36
|
# the prod graph (and still blocks the flagged tar-stream 2.x versions).
|
|
37
37
|
#
|
|
38
|
+
# shrinkwrap
|
|
39
|
+
# The published npm package intentionally includes npm-shrinkwrap.json. It
|
|
40
|
+
# is not an install-script bypass or a hidden dependency surface; it is a
|
|
41
|
+
# prod-only projection generated from package-lock.json by
|
|
42
|
+
# scripts/make-prod-shrinkwrap.mjs so registry consumers resolve the same
|
|
43
|
+
# audited tree we release. scripts/release-security-audit.sh regenerates
|
|
44
|
+
# that projection and hard-fails on mismatch, and
|
|
45
|
+
# scripts/verify-registry-install.sh publishes to a temporary registry and
|
|
46
|
+
# verifies a fresh consumer install has no better-sqlite3, prebuild-install,
|
|
47
|
+
# tar-fs, or tar-stream production chain.
|
|
48
|
+
#
|
|
49
|
+
# This is the npm-documented narrow use case for shrinkwrap: applications,
|
|
50
|
+
# daemons, and command-line tools published through the registry for global
|
|
51
|
+
# installs or devDependency use. llm-cli-gateway is a CLI/MCP appliance, not
|
|
52
|
+
# a library whose users need unpinned transitive dependency control.
|
|
53
|
+
#
|
|
54
|
+
# Historical note: releases that previously reported healthy public Socket
|
|
55
|
+
# scores, including 2.3.0, 2.4.0, and 2.5.0, also shipped
|
|
56
|
+
# npm-shrinkwrap.json. The same socket.yml shellAccess policy was present
|
|
57
|
+
# there too. A public package-page alert on 2.6.x therefore reflects Socket
|
|
58
|
+
# scoring/rescan behavior, not a newly introduced shrinkwrap or shell path.
|
|
59
|
+
#
|
|
38
60
|
# shellAccess
|
|
39
61
|
# This alert fires on every module that imports node:child_process, and
|
|
40
62
|
# because spawning provider CLIs and git is the entire purpose of the package
|
|
@@ -93,8 +115,9 @@ issueRules:
|
|
|
93
115
|
didYouMean: true
|
|
94
116
|
installScripts: true
|
|
95
117
|
telemetry: true
|
|
96
|
-
hasNativeCode: true
|
|
97
|
-
|
|
118
|
+
hasNativeCode: true # devDependency-only as of 2.0.0 (better-sqlite3); prod artifact has no native code
|
|
119
|
+
shrinkwrap: false # reviewed published CLI lockfile; see rationale above
|
|
120
|
+
shellAccess: false # reviewed gateway capability; see rationale above
|
|
98
121
|
shellScriptOverride: true
|
|
99
122
|
gitDependency: true
|
|
100
123
|
httpDependency: true
|