agent-shim 12.1.0 → 12.2.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.
@@ -1021,6 +1021,7 @@ declare const ProviderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1021
1021
  kind: z.ZodOptional<z.ZodLiteral<"http">>;
1022
1022
  displayName: z.ZodString;
1023
1023
  baseUrl: z.ZodURL;
1024
+ connectTimeoutMs: z.ZodOptional<z.ZodInt>;
1024
1025
  credential: z.ZodObject<{
1025
1026
  sources: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1026
1027
  env: z.ZodString;
@@ -9358,9 +9359,30 @@ declare const CheckReportJsonSchema: z.ZodObject<{
9358
9359
  highestInstalled: z.ZodOptional<z.ZodString>;
9359
9360
  installed: z.ZodReadonly<z.ZodArray<z.ZodString>>;
9360
9361
  }, z.core.$strict>>;
9362
+ providerReachability: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
9363
+ name: z.ZodString;
9364
+ baseUrl: z.ZodString;
9365
+ ok: z.ZodLiteral<true>;
9366
+ }, z.core.$strict>, z.ZodObject<{
9367
+ name: z.ZodString;
9368
+ baseUrl: z.ZodString;
9369
+ ok: z.ZodLiteral<false>;
9370
+ message: z.ZodString;
9371
+ }, z.core.$strict>]>>;
9361
9372
  }, z.core.$strict>;
9362
9373
  type CheckReportJson = z.output<typeof CheckReportJsonSchema>;
9363
9374
 
9375
+ /** The outcome of authenticating the listener a front-door state file names. */
9376
+ type ListenerVerdict = {
9377
+ readonly ok: true;
9378
+ } | {
9379
+ readonly ok: false;
9380
+ readonly reason: string;
9381
+ };
9382
+
9383
+ /** Opens one TCP connection to `baseUrl`'s host and port within `timeoutMs` and closes it at once, sending nothing. */
9384
+ type BaseUrlProbe = (baseUrl: string, timeoutMs: number) => ListenerVerdict;
9385
+
9364
9386
  /** Where a pinned Claude Code version came from, strongest first: the launch's own flag, then the environment, then the cascade. */
9365
9387
  declare const CLAUDE_VERSION_SOURCES: readonly ["flag", "environment", "cascade"];
9366
9388
  type ClaudeVersionSource = (typeof CLAUDE_VERSION_SOURCES)[number];
@@ -9603,7 +9625,20 @@ interface RunCheckParams {
9603
9625
  readonly installedClaudeVersions?: readonly string[];
9604
9626
  /** Where cached credentials live. Omit to skip reporting a credential cache's age; with it, a block that caches reports whether it holds an entry, how old it is and whether it has expired, never the token. */
9605
9627
  readonly credentialCache?: CredentialCacheEnv;
9628
+ /** Opens one connection to the selected http provider's base URL, bounded by its connect timeout. Omit to leave reachability out of the report. */
9629
+ readonly probeBaseUrl?: BaseUrlProbe;
9606
9630
  }
9631
+ /** Whether the selected http provider's base URL accepted a connection, as `check` reports it. */
9632
+ type ProviderReachabilityReport = {
9633
+ readonly name: string;
9634
+ readonly baseUrl: string;
9635
+ readonly ok: true;
9636
+ } | {
9637
+ readonly name: string;
9638
+ readonly baseUrl: string;
9639
+ readonly ok: false;
9640
+ readonly message: string;
9641
+ };
9607
9642
  /** Everything `agent-shim check` reports about one directory/identity, without touching the farm or spawning anything. */
9608
9643
  interface CheckReport {
9609
9644
  readonly identityName?: string;
@@ -9620,6 +9655,8 @@ interface CheckReport {
9620
9655
  readonly credential: CredentialReport;
9621
9656
  /** The Claude Code version a launch here would run, when the installed versions were given. */
9622
9657
  readonly claudeVersion?: ClaudeVersionReport;
9658
+ /** Whether the selected provider's base URL accepts a connection, when an http provider is selected and a probe was given. */
9659
+ readonly providerReachability?: ProviderReachabilityReport;
9623
9660
  }
9624
9661
  /** Which Claude Code version a launch would run: the pin and where it comes from, with whether it is installed, or the highest installed version when nothing pins one. */
9625
9662
  interface ClaudeVersionReport {
@@ -9642,7 +9679,7 @@ declare function formatCheckReport(report: CheckReport): string[];
9642
9679
  */
9643
9680
  declare function checkReportToJson(report: CheckReport): CheckReportJson;
9644
9681
  /**
9645
- * Whether a report carries anything `check --strict` fails on: a resolver diagnostic of warning or error severity, an ambiguous `history/projects/` encoding, an ambient credential a launch would refuse, or a selected provider a launch could not use. Informational diagnostics and the settings-exposure advisory (names and counts only, for a person to review) never fail it.
9682
+ * Whether a report carries anything `check --strict` fails on: a resolver diagnostic of warning or error severity, an ambiguous `history/projects/` encoding, an ambient credential a launch would refuse, a selected provider a launch could not use, or one whose base URL accepts no connection. Informational diagnostics and the settings-exposure advisory (names and counts only, for a person to review) never fail it.
9646
9683
  */
9647
9684
  declare function checkReportHasWarnings(report: CheckReport): boolean;
9648
9685
  /** What `collectCheckReport` needs from its caller. */
@@ -10171,14 +10208,6 @@ interface DoctorHeadroomAllowlist {
10171
10208
  readonly fileProblem: AllowlistFileProblem | undefined;
10172
10209
  }
10173
10210
 
10174
- /** The outcome of authenticating the listener a front-door state file names. */
10175
- type ListenerVerdict = {
10176
- readonly ok: true;
10177
- } | {
10178
- readonly ok: false;
10179
- readonly reason: string;
10180
- };
10181
-
10182
10211
  /** One listener of the front door as `doctor` and `frontdoor status` read it: whether it accepted within the probe's bound, and how long the answer took on this machine now. */
10183
10212
  interface FrontDoorListenerReading {
10184
10213
  /** Which listener, and so which sessions it cuts off when it does not accept: `provider` carries provider sessions, `connect` carries every plain OAuth session. */
@@ -10322,6 +10351,8 @@ interface RunDoctorParams {
10322
10351
  readonly providers: readonly DoctorProviderInput[];
10323
10352
  /** The recorded former names of renamed providers. Omit to leave them out of the findings. */
10324
10353
  readonly providerAliases?: ProviderAliases;
10354
+ /** Opens one connection to an http provider's base URL, bounded by the provider's connect timeout. Omit to leave reachability out of the findings; with it, a valid http provider whose base URL accepts no connection fails, naming the URL. */
10355
+ readonly probeBaseUrl?: BaseUrlProbe;
10325
10356
  /** The journals of identity renames that were left unfinished, and the files in their directory that are not journals. Omit to leave renames out of the findings. */
10326
10357
  readonly renameJournals?: RenameJournalListing;
10327
10358
  /** The entries of the identities directory that cannot be reached (a symlink the filesystem would not follow, or a directory nobody can enter), which are not counted as identities. Omit to leave them out of the findings. */
@@ -15191,6 +15222,8 @@ interface PrepareLaunchParams {
15191
15222
  readonly frontdoor?: FrontDoorPort;
15192
15223
  /** Resolves credential blocks (a provider's, or the launching identity's own). Omitted by a caller that cannot read secret files or run commands; a launch that needs a credential is then refused rather than started without it. */
15193
15224
  readonly credentials?: CredentialPort;
15225
+ /** Opens one connection to an http provider's base URL, bounded by the provider's connect timeout. With it, a launch on an http provider whose base URL accepts no connection is refused with the line naming the URL, instead of starting a session no request of which can be answered; a caller that cannot open connections omits it and launches without asking. */
15226
+ readonly probeBaseUrl?: BaseUrlProbe;
15194
15227
  /** True when the user was asked on a terminal whether to create the selected configuration profile and chose to launch without it. Without that explicit choice, a selected profile with no file is refused rather than silently skipped. */
15195
15228
  readonly allowMissingConfigProfile?: boolean;
15196
15229
  /** The user-global `update.mode`, resolved from the same global config the launcher already loads. Absent means `off`, and `off` runs no launch-time update check at all. */
@@ -16854,6 +16887,16 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
16854
16887
  highestInstalled: zod.ZodOptional<zod.ZodString>;
16855
16888
  installed: zod.ZodReadonly<zod.ZodArray<zod.ZodString>>;
16856
16889
  }, zod_v4_core.$strict>>;
16890
+ providerReachability: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodObject<{
16891
+ name: zod.ZodString;
16892
+ baseUrl: zod.ZodString;
16893
+ ok: zod.ZodLiteral<true>;
16894
+ }, zod_v4_core.$strict>, zod.ZodObject<{
16895
+ name: zod.ZodString;
16896
+ baseUrl: zod.ZodString;
16897
+ ok: zod.ZodLiteral<false>;
16898
+ message: zod.ZodString;
16899
+ }, zod_v4_core.$strict>]>>;
16857
16900
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
16858
16901
  };
16859
16902
  doctor: {
@@ -21932,6 +21975,16 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
21932
21975
  highestInstalled: zod.ZodOptional<zod.ZodString>;
21933
21976
  installed: zod.ZodReadonly<zod.ZodArray<zod.ZodString>>;
21934
21977
  }, zod_v4_core.$strict>>;
21978
+ providerReachability: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodObject<{
21979
+ name: zod.ZodString;
21980
+ baseUrl: zod.ZodString;
21981
+ ok: zod.ZodLiteral<true>;
21982
+ }, zod_v4_core.$strict>, zod.ZodObject<{
21983
+ name: zod.ZodString;
21984
+ baseUrl: zod.ZodString;
21985
+ ok: zod.ZodLiteral<false>;
21986
+ message: zod.ZodString;
21987
+ }, zod_v4_core.$strict>]>>;
21935
21988
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
21936
21989
  };
21937
21990
  doctor: {
@@ -28154,6 +28207,8 @@ interface AddProviderInput {
28154
28207
  readonly pickerModels?: readonly PickerModel[];
28155
28208
  /** Opt an http provider into listing its own model catalogue in `/model`. */
28156
28209
  readonly catalogue?: ProviderCatalogue;
28210
+ /** An http provider's bound on opening a connection to its base URL, in milliseconds; absent keeps the derived default. */
28211
+ readonly connectTimeoutMs?: number;
28157
28212
  readonly codex?: CodexProviderConfig;
28158
28213
  readonly antigravity?: AntigravityProviderConfig;
28159
28214
  }
@@ -28183,6 +28238,8 @@ interface UpdateProviderInput {
28183
28238
  readonly unsetPickerModels?: readonly string[];
28184
28239
  /** The provider's whole new catalogue setting, or false to remove it; undefined leaves the existing one. Applies only to an http provider. */
28185
28240
  readonly catalogue?: ProviderCatalogue | false;
28241
+ /** A new connect timeout in milliseconds, or false to go back to the derived default; undefined leaves the existing one. Applies only to an http provider. */
28242
+ readonly connectTimeoutMs?: number | false;
28186
28243
  /** Merged over a codex provider's existing settings: a field given here replaces that field, and `models` entries merge per tier. */
28187
28244
  readonly codex?: CodexProviderConfig;
28188
28245
  /** 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": "12.1.0",
3
+ "version": "12.2.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>",