@skrr-ai/cli 0.1.172 → 0.1.174
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/dist/hooks/init.js +9 -0
- package/dist/lib/turn-context.d.ts +20 -0
- package/dist/lib/turn-context.js +158 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/inferenceBrokerHarnesses.d.ts +25 -39
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/inferenceBrokerHarnesses.js +8 -19
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/inferenceBrokerHarnesses.d.ts +25 -39
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/inferenceBrokerHarnesses.js +30 -55
- package/dist/node_modules/@skrr-ai/data-provider/index.js +1193 -1192
- package/dist/node_modules/@skrr-ai/inference-broker/dist/cjs/managed-inference-broker.js +0 -10
- package/dist/node_modules/@skrr-ai/inference-broker/dist/esm/managed-inference-broker.js +10 -15
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
|
@@ -82,13 +82,6 @@ const ALLOWED_PATHS = /* @__PURE__ */ new Set([
|
|
|
82
82
|
"/v1/responses",
|
|
83
83
|
"/responses"
|
|
84
84
|
]);
|
|
85
|
-
const ANTHROPIC_ALLOWED_PATHS = /* @__PURE__ */ new Set([
|
|
86
|
-
"/v1/messages",
|
|
87
|
-
"/messages",
|
|
88
|
-
"/v1/chat/completions",
|
|
89
|
-
"/chat/completions"
|
|
90
|
-
]);
|
|
91
|
-
const OPENAI_COMPATIBLE_CHAT_PATHS = /* @__PURE__ */ new Set(["/v1/chat/completions", "/chat/completions"]);
|
|
92
85
|
const ANTHROPIC_MESSAGES_PATHS = /* @__PURE__ */ new Set(["/v1/messages", "/messages"]);
|
|
93
86
|
const ANTHROPIC_COUNT_TOKENS_PATHS = /* @__PURE__ */ new Set([
|
|
94
87
|
"/v1/messages/count_tokens",
|
|
@@ -565,9 +558,6 @@ function assertApprovedEnvelope(method, path, body, modelScope, legacyModel, pro
|
|
|
565
558
|
}
|
|
566
559
|
const requestedModel = payload.model;
|
|
567
560
|
if (modelScope) {
|
|
568
|
-
if (modelScope.upstreamProvider === "anthropic" && !ANTHROPIC_ALLOWED_PATHS.has(path) || modelScope.upstreamProvider === "bedrock" && !OPENAI_COMPATIBLE_CHAT_PATHS.has(path) || !["anthropic", "bedrock"].includes(modelScope.upstreamProvider) && path.endsWith("/messages")) {
|
|
569
|
-
rejectManagedRequest("managed inference broker denied a route outside the provider dialect");
|
|
570
|
-
}
|
|
571
561
|
const clientModelId = providerLocalModelId(modelScope.harnessModelId);
|
|
572
562
|
const approved = constantTimeStringEqual(requestedModel, modelScope.harnessModelId) || constantTimeStringEqual(requestedModel, modelScope.gatewayModelAlias) || clientModelId !== null && constantTimeStringEqual(requestedModel, clientModelId);
|
|
573
563
|
if (!approved) {
|
|
@@ -101,13 +101,6 @@ const ALLOWED_PATHS = new Set([
|
|
|
101
101
|
'/v1/responses',
|
|
102
102
|
'/responses',
|
|
103
103
|
]);
|
|
104
|
-
const ANTHROPIC_ALLOWED_PATHS = new Set([
|
|
105
|
-
'/v1/messages',
|
|
106
|
-
'/messages',
|
|
107
|
-
'/v1/chat/completions',
|
|
108
|
-
'/chat/completions',
|
|
109
|
-
]);
|
|
110
|
-
const OPENAI_COMPATIBLE_CHAT_PATHS = new Set(['/v1/chat/completions', '/chat/completions']);
|
|
111
104
|
const ANTHROPIC_MESSAGES_PATHS = new Set(['/v1/messages', '/messages']);
|
|
112
105
|
/**
|
|
113
106
|
* Anthropic's token-counting route. Claude Code calls it (`?beta=true`) to size
|
|
@@ -816,14 +809,16 @@ function assertApprovedEnvelope(method, path, body, modelScope, legacyModel, pro
|
|
|
816
809
|
}
|
|
817
810
|
const requestedModel = payload.model;
|
|
818
811
|
if (modelScope) {
|
|
819
|
-
//
|
|
820
|
-
//
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
812
|
+
// WHICH dialect may reach this model is not decided here (OSK-24536). Every
|
|
813
|
+
// approved endpoint (`ALLOWED_PATHS`) is forwarded to the authenticated
|
|
814
|
+
// relay, which asks the one cross-protocol route decision with the
|
|
815
|
+
// reservation's harness, attested version and model, and refuses a
|
|
816
|
+
// translation that is not admitted with a typed 403 the broker passes back
|
|
817
|
+
// unchanged. A copy of the rule here could only disagree with it: the copy
|
|
818
|
+
// this replaced refused every translated route, admitted or not, before the
|
|
819
|
+
// relay could judge it. Every host that hands the broker a model scope
|
|
820
|
+
// (the daemon's routes, the CLI) builds the relay credential, so a scoped
|
|
821
|
+
// request has no path to the gateway that skips that decision.
|
|
827
822
|
// ACP selectors are provider-qualified (`openrouter/anthropic/...` and
|
|
828
823
|
// `amazon-bedrock/us.anthropic...`), while OpenAI-compatible adapters send
|
|
829
824
|
// the exact provider-local suffix in the JSON body. Accept that one
|
package/oclif.manifest.json
CHANGED
|
@@ -150506,5 +150506,5 @@
|
|
|
150506
150506
|
]
|
|
150507
150507
|
}
|
|
150508
150508
|
},
|
|
150509
|
-
"version": "0.1.
|
|
150509
|
+
"version": "0.1.174"
|
|
150510
150510
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skrr-ai/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.174",
|
|
4
4
|
"description": "Command-line interface for skrr",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "skrr",
|
|
@@ -704,5 +704,5 @@
|
|
|
704
704
|
"engines": {
|
|
705
705
|
"node": ">=20.0.0"
|
|
706
706
|
},
|
|
707
|
-
"gitHead": "
|
|
707
|
+
"gitHead": "b9adf4d66314c514a9c19a0f0249ea881dcf8cb8"
|
|
708
708
|
}
|