@agentclientprotocol/claude-agent-acp 0.93.1-preview.2 → 0.93.1-preview.3

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.
@@ -23,8 +23,10 @@ export declare function buildModelConfigOption(models: SessionModelState, modelI
23
23
  * Whether managed `deniedModels` blocks a model id, following the CLI's rules
24
24
  * closely enough for the picker: a family alias blocks the whole family, and a
25
25
  * model id blocks that version in every spelling plus the later minor versions
26
- * it prefixes (`claude-opus-5` also blocks `claude-opus-5-5`). The CLI stays
27
- * the enforcer; this only keeps the picker from offering a refused row.
26
+ * it prefixes (`claude-opus-5` also blocks `claude-opus-5-5`). Entries share
27
+ * `normalizeModelId`, so `claude-opus-4.5` or `anthropic/claude-opus-4.5` also
28
+ * blocks `claude-opus-4-5`, which the CLI may still allow. The CLI stays the
29
+ * enforcer; this only keeps the picker from offering a refused row.
28
30
  */
29
31
  export declare function isDeniedModel(modelId: string, deniedModels: readonly string[]): boolean;
30
32
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"session-model.d.ts","sourceRoot":"","sources":["../src/session-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAIjF,eAAO,MAAM,eAAe,UAAU,CAAC;AAEvC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,eAAe,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChF,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,CAAC,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G,OAAO,CASvF;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,SAAS,EAAE,EACtB,SAAS,EAAE,MAAM,EAAE,EACnB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/C,YAAY,GAAE,SAAS,MAAM,EAAO,GACnC,SAAS,EAAE,CA6Db;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,EAAE,EACnB,cAAc,EAAE,SAAS,MAAM,EAAE,EACjC,YAAY,CAAC,EAAE,MAAM,GACpB,SAAS,EAAE,CAiBb;AAWD,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,SAAS,EAAE,EACnB,SAAS,EAAE,SAAS,EAAE,EACtB,eAAe,EAAE,mBAAmB,EACpC,MAAM,EAAE,WAAW,EACnB,gBAAgB,EAAE,OAAO,EACzB,SAAS,EAAE,MAAM,EACjB,gBAAgB,CAAC,EAAE,MAAM,EACzB,iBAAiB,UAAQ,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAoJ5B"}
@@ -220,25 +220,38 @@ function resolveSettingsModel(models, settingsModel, logger) {
220
220
  }
221
221
  const MODEL_FAMILY_ALIASES = new Set(["opus", "sonnet", "haiku", "fable"]);
222
222
  /** A model id without the spellings that name the same model: provider
223
- * prefixes, dates, version suffixes, `-fast` and context hints. `deniedModels`
224
- * and gateway listings both match on it. */
223
+ * prefixes, dates, version suffixes, `:variant` suffixes, dotted versions,
224
+ * `-fast` and context hints. `deniedModels` and gateway listings both match on
225
+ * it. OpenRouter lists `anthropic/claude-opus-5.5:batch[1m]`, which normalizes
226
+ * to `claude-opus-5-5`; `anthropic/openai/gpt-5` keeps its `openai/` prefix and
227
+ * matches no Claude id. */
225
228
  function normalizeModelId(value) {
226
229
  let id = stripContextHints(value.trim().toLowerCase());
227
230
  const providerPrefix = id.lastIndexOf("anthropic.");
228
231
  if (providerPrefix !== -1)
229
232
  id = id.slice(providerPrefix + "anthropic.".length);
230
- return id
233
+ return (id
234
+ // Only a leading `anthropic/`: OpenRouter's `anthropic/openai/gpt-5` must
235
+ // keep `openai/`, which `lastIndexOf` would strip along with it.
236
+ .replace(/^anthropic\//, "")
237
+ // `:batch`, `:free`. A letter must follow the colon, so Bedrock's `-v1:0`
238
+ // is left for the `-vN:M` step below.
239
+ .replace(/:[a-z][a-z0-9-]*$/, "")
240
+ // `claude-opus-5.5` -> `claude-opus-5-5`; only dots between two digits.
241
+ .replace(/(?<=\d)\.(?=\d)/g, "-")
231
242
  .replace(/@.*$/, "")
232
243
  .replace(/-v\d+(?::\d+)?$/, "")
233
244
  .replace(/-fast$/, "")
234
- .replace(/-\d{8}$/, "");
245
+ .replace(/-\d{8}$/, ""));
235
246
  }
236
247
  /**
237
248
  * Whether managed `deniedModels` blocks a model id, following the CLI's rules
238
249
  * closely enough for the picker: a family alias blocks the whole family, and a
239
250
  * model id blocks that version in every spelling plus the later minor versions
240
- * it prefixes (`claude-opus-5` also blocks `claude-opus-5-5`). The CLI stays
241
- * the enforcer; this only keeps the picker from offering a refused row.
251
+ * it prefixes (`claude-opus-5` also blocks `claude-opus-5-5`). Entries share
252
+ * `normalizeModelId`, so `claude-opus-4.5` or `anthropic/claude-opus-4.5` also
253
+ * blocks `claude-opus-4-5`, which the CLI may still allow. The CLI stays the
254
+ * enforcer; this only keeps the picker from offering a refused row.
242
255
  */
243
256
  export function isDeniedModel(modelId, deniedModels) {
244
257
  const id = normalizeModelId(modelId);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.93.1-preview.2",
6
+ "version": "0.93.1-preview.3",
7
7
  "description": "An ACP-compatible coding agent powered by the Claude Agent SDK (TypeScript)",
8
8
  "main": "dist/lib.js",
9
9
  "types": "dist/lib.d.ts",