@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.
@@ -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
- // The currently published binary may use compatible chat while the target
820
- // binary uses native Messages. Neither dialect authorizes Responses.
821
- if ((modelScope.upstreamProvider === 'anthropic' && !ANTHROPIC_ALLOWED_PATHS.has(path)) ||
822
- (modelScope.upstreamProvider === 'bedrock' && !OPENAI_COMPATIBLE_CHAT_PATHS.has(path)) ||
823
- (!['anthropic', 'bedrock'].includes(modelScope.upstreamProvider) &&
824
- path.endsWith('/messages'))) {
825
- rejectManagedRequest('managed inference broker denied a route outside the provider dialect');
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
@@ -150506,5 +150506,5 @@
150506
150506
  ]
150507
150507
  }
150508
150508
  },
150509
- "version": "0.1.172"
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.172",
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": "ff7ca4531c100fcb14920abcb956d4b855bdc974"
707
+ "gitHead": "b9adf4d66314c514a9c19a0f0249ea881dcf8cb8"
708
708
  }