agent-shim 11.25.0 → 11.26.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.
@@ -449,6 +449,21 @@ declare const PickerModelSchema: z.ZodObject<{
449
449
  description: z.ZodOptional<z.ZodString>;
450
450
  }, z.core.$strict>;
451
451
  type PickerModel = z.infer<typeof PickerModelSchema>;
452
+ /**
453
+ * Opt-in listing of the models an `http` provider's own catalogue endpoint reports in `/model`. The door refreshes the catalogue in the background and a launch lists what it last fetched. `tier` is the Claude tier whose handling every listed model borrows, since the catalogue says nothing about it. `include` and `exclude` are glob patterns over model ids (`exclude` wins), because a large catalogue would bury the picker. `url` replaces the endpoint, which otherwise is the provider's `/v1/models` under its base URL, then under its host.
454
+ */
455
+ declare const ProviderCatalogueSchema: z.ZodObject<{
456
+ tier: z.ZodEnum<{
457
+ fable: "fable";
458
+ opus: "opus";
459
+ sonnet: "sonnet";
460
+ haiku: "haiku";
461
+ }>;
462
+ include: z.ZodOptional<z.ZodArray<z.ZodString>>;
463
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
464
+ url: z.ZodOptional<z.ZodURL>;
465
+ }, z.core.$strict>;
466
+ type ProviderCatalogue = z.infer<typeof ProviderCatalogueSchema>;
452
467
  /** All kinds of provider; see `HttpProviderSchema` for the shared fields. */
453
468
  declare const ProviderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
454
469
  $schema: z.ZodOptional<z.ZodString>;
@@ -502,6 +517,17 @@ declare const ProviderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
502
517
  label: z.ZodOptional<z.ZodString>;
503
518
  description: z.ZodOptional<z.ZodString>;
504
519
  }, z.core.$strict>>>;
520
+ catalogue: z.ZodOptional<z.ZodObject<{
521
+ tier: z.ZodEnum<{
522
+ fable: "fable";
523
+ opus: "opus";
524
+ sonnet: "sonnet";
525
+ haiku: "haiku";
526
+ }>;
527
+ include: z.ZodOptional<z.ZodArray<z.ZodString>>;
528
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
529
+ url: z.ZodOptional<z.ZodURL>;
530
+ }, z.core.$strict>>;
505
531
  routes: z.ZodOptional<z.ZodArray<z.ZodObject<{
506
532
  when: z.ZodUnion<readonly [z.ZodObject<{
507
533
  newerThan: z.ZodOptional<z.ZodString>;
@@ -1913,6 +1939,8 @@ interface LayoutPaths {
1913
1939
  readonly usageLogDir: string;
1914
1940
  /** Directory of the latest-state snapshots, one `<identity>.json` per identity: the stable file other tools read. */
1915
1941
  readonly usageSnapshotsDir: string;
1942
+ /** One file per provider holding the model catalogue the door last fetched from it. */
1943
+ readonly catalogueDir: string;
1916
1944
  /** Path to the file recording what the person has allowed the MCP server's agents to do (`agent-shim mcp permissions`), mode 0600 and written only by that command: the running server re-reads it on every request, so a change needs no restart. */
1917
1945
  readonly mcpPermissionsFile: string;
1918
1946
  /** The last identity picked from a pool for each directory, so a conversation stays on the account whose prompt cache is warm. */
@@ -13448,8 +13476,8 @@ interface ProviderListEntry {
13448
13476
  readonly name: string;
13449
13477
  readonly provider: Provider;
13450
13478
  }
13451
- /** Lists every provider under `providersDir` that has a valid `<name>.json`. A file that fails validation is skipped here; `provider list` is the place a broken definition gets surfaced, not a launch. */
13452
- declare function listProviders(paths: LayoutPaths): readonly ProviderListEntry[];
13479
+ /** Lists every provider under `providersDir` that has a valid `<name>.json`. A file that fails validation is skipped here and reported through `onInvalid` (standard error by default); `provider list` is the place a broken definition gets surfaced, not a launch. */
13480
+ declare function listProviders(paths: LayoutPaths, onInvalid?: (name: string, message: string) => void): readonly ProviderListEntry[];
13453
13481
  /** The credential targets a provider may use. */
13454
13482
  type ProviderCredentialTarget = (typeof PROVIDER_CREDENTIAL_TARGETS)[number];
13455
13483
  /** The kinds of provider. */
@@ -13466,6 +13494,8 @@ interface AddProviderInput {
13466
13494
  readonly env?: Readonly<Record<string, string>>;
13467
13495
  /** Extra models `/model` lists beside the ones the tier settings name; applies to every provider kind. */
13468
13496
  readonly pickerModels?: readonly PickerModel[];
13497
+ /** Opt an http provider into listing its own model catalogue in `/model`. */
13498
+ readonly catalogue?: ProviderCatalogue;
13469
13499
  readonly codex?: CodexProviderConfig;
13470
13500
  readonly antigravity?: AntigravityProviderConfig;
13471
13501
  }
@@ -13493,6 +13523,8 @@ interface UpdateProviderInput {
13493
13523
  readonly pickerModels?: readonly PickerModel[];
13494
13524
  /** Models whose picker entries are removed. */
13495
13525
  readonly unsetPickerModels?: readonly string[];
13526
+ /** The provider's whole new catalogue setting, or false to remove it; undefined leaves the existing one. Applies only to an http provider. */
13527
+ readonly catalogue?: ProviderCatalogue | false;
13496
13528
  /** Merged over a codex provider's existing settings: a field given here replaces that field, and `models` entries merge per tier. */
13497
13529
  readonly codex?: CodexProviderConfig;
13498
13530
  /** Merged over an antigravity provider's existing settings: a field given here replaces that field, and `models` entries merge per tier. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-shim",
3
- "version": "11.25.0",
3
+ "version": "11.26.0",
4
4
  "description": "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
5
5
  "license": "MIT",
6
6
  "author": "Joseph Mearman <joseph@mearman.co.uk>",