agent-shim 14.10.0 → 14.11.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.
- package/README.md +7 -3
- package/dist/cli.cjs +18150 -15734
- package/dist/index.cjs +2970 -1507
- package/dist/index.mjs +2942 -1480
- package/dist/types/index.d.ts +273 -34
- package/package.json +3 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -932,6 +932,9 @@ declare const CredentialSchema: z.ZodObject<{
|
|
|
932
932
|
type Credential = z.infer<typeof CredentialSchema>;
|
|
933
933
|
/** The kinds of provider: `http` is an Anthropic Messages endpoint at a fixed `baseUrl` (the default when `kind` is absent), and `codex` is ChatGPT's Codex backend reached through agent-shim's own supervised translation daemon. */
|
|
934
934
|
declare const PROVIDER_KINDS: readonly ["http", "codex", "antigravity", "router"];
|
|
935
|
+
/** The Claude model tiers a provider maps onto its own models, highest first. */
|
|
936
|
+
declare const CLAUDE_TIERS: readonly ["fable", "opus", "sonnet", "haiku"];
|
|
937
|
+
type ClaudeTier = (typeof CLAUDE_TIERS)[number];
|
|
935
938
|
/**
|
|
936
939
|
* How an Antigravity provider translates Claude Code's requests and connects to its backend.
|
|
937
940
|
*/
|
|
@@ -5541,6 +5544,8 @@ interface LayoutPaths {
|
|
|
5541
5544
|
readonly headroomStateFile: string;
|
|
5542
5545
|
/** The live routing setting `agent-shim headroom enable|disable` writes and the front door re-reads per request: which sessions go through headroom, whatever their launch asked for. */
|
|
5543
5546
|
readonly headroomRoutingFile: string;
|
|
5547
|
+
/** The runtime route overrides `agent-shim route set|remove` writes and the front door re-reads on change: per scope (session, identity, provider, global), the name a request asking for a Claude name or class is routed by instead. At the root, beside `provider-aliases.json`, since it is the door's routing and not headroom's. */
|
|
5548
|
+
readonly routeOverridesFile: string;
|
|
5544
5549
|
/** The previous release's versioned name for the state file, read only while a supervisor from that release is still alive and removed once its generation has drained (see `migrateHeadroomState`). */
|
|
5545
5550
|
readonly headroomLegacyStateFile: string;
|
|
5546
5551
|
/** Path to the file the headroom daemon reads its upstream allowlist from (`--allowed-base-urls-file`): the direct origin of every live front door, one per line. It lives in the owner-only socket directory because headroom refuses an allowlist file whose directory another user could write to, and that directory is the one this tool already creates mode 0700 (narrowing it if it existed wider) and checks before every daemon start. The supervisor replaces the file owner-only and atomically whenever a door's origin changes, and the daemon re-reads it on its next request, so a moved or retired front door never needs a restart. */
|
|
@@ -7344,7 +7349,7 @@ type RcLiveRateLimit = z.output<typeof RcLiveRateLimitSchema>;
|
|
|
7344
7349
|
|
|
7345
7350
|
/** What the identity step learned about one request from the launcher-injected headers. */
|
|
7346
7351
|
interface SessionIdentity {
|
|
7347
|
-
/** The
|
|
7352
|
+
/** The directory id of the identity the launch resolved, when it resolved one: the key the usage store files under; a lookup by name (a pool member, an override's identity scope) maps it to the identity's current name first. */
|
|
7348
7353
|
readonly identity: string | undefined;
|
|
7349
7354
|
/** The per-launch session id, when the launcher injected one. */
|
|
7350
7355
|
readonly sessionId: string | undefined;
|
|
@@ -7371,6 +7376,8 @@ interface RoutedRequest {
|
|
|
7371
7376
|
/** Aborted the moment the client goes away; a route aborts its own upstream work with it. */
|
|
7372
7377
|
readonly signal: AbortSignal;
|
|
7373
7378
|
readonly session: SessionIdentity;
|
|
7379
|
+
/** Set when the door itself put the request on a provider path (a helper the main loop's route context placed, `followingMainLoop`'s `toProvider`): that path is the door's choice, not the client's, so the request is treated as one the session sent on its own bare path. */
|
|
7380
|
+
readonly doorScoped?: true;
|
|
7374
7381
|
}
|
|
7375
7382
|
/** The response half a route writes through, so the pipeline can run response middleware at the head and apply backpressure uniformly. */
|
|
7376
7383
|
interface RoutedResponse {
|
|
@@ -7520,6 +7527,8 @@ interface RcSessionTrackerDeps {
|
|
|
7520
7527
|
readonly onTransition?: (transition: RcSessionTransition) => void;
|
|
7521
7528
|
/** Told when the tracker closes, so whatever its transitions feed stops waiting for more: the door's session event log ends its followers here. */
|
|
7522
7529
|
readonly onClose?: () => void;
|
|
7530
|
+
/** Where a failed sweep of idle sessions is logged; absent, the sweep's failure is dropped and the next sweep still runs. */
|
|
7531
|
+
readonly log?: (line: string) => void;
|
|
7523
7532
|
}
|
|
7524
7533
|
/** The live record of observed Remote Control sessions. */
|
|
7525
7534
|
interface RcSessionTracker {
|
|
@@ -9445,10 +9454,10 @@ declare const CheckReportJsonSchema: z.ZodObject<{
|
|
|
9445
9454
|
configProfile: z.ZodObject<{
|
|
9446
9455
|
name: z.ZodNullable<z.ZodString>;
|
|
9447
9456
|
source: z.ZodEnum<{
|
|
9457
|
+
"directory-rule": "directory-rule";
|
|
9448
9458
|
env: "env";
|
|
9449
9459
|
none: "none";
|
|
9450
9460
|
"cli-flag": "cli-flag";
|
|
9451
|
-
"directory-rule": "directory-rule";
|
|
9452
9461
|
"identity-default": "identity-default";
|
|
9453
9462
|
"global-default": "global-default";
|
|
9454
9463
|
}>;
|
|
@@ -9456,9 +9465,9 @@ declare const CheckReportJsonSchema: z.ZodObject<{
|
|
|
9456
9465
|
layers: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
9457
9466
|
id: z.ZodInt;
|
|
9458
9467
|
kind: z.ZodEnum<{
|
|
9459
|
-
"directory-rule": "directory-rule";
|
|
9460
9468
|
"global-config": "global-config";
|
|
9461
9469
|
"config-profile": "config-profile";
|
|
9470
|
+
"directory-rule": "directory-rule";
|
|
9462
9471
|
portable: "portable";
|
|
9463
9472
|
"portable-local": "portable-local";
|
|
9464
9473
|
"cli-override": "cli-override";
|
|
@@ -9700,6 +9709,19 @@ declare const CheckReportJsonSchema: z.ZodObject<{
|
|
|
9700
9709
|
ok: z.ZodLiteral<false>;
|
|
9701
9710
|
message: z.ZodString;
|
|
9702
9711
|
}, z.core.$strict>]>>;
|
|
9712
|
+
routeOverrides: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
9713
|
+
applying: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
9714
|
+
model: z.ZodString;
|
|
9715
|
+
target: z.ZodString;
|
|
9716
|
+
scope: z.ZodString;
|
|
9717
|
+
outranks: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
9718
|
+
scope: z.ZodString;
|
|
9719
|
+
target: z.ZodString;
|
|
9720
|
+
}, z.core.$strict>>>;
|
|
9721
|
+
}, z.core.$strict>>>;
|
|
9722
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
9723
|
+
fault: z.ZodString;
|
|
9724
|
+
}, z.core.$strict>]>>;
|
|
9703
9725
|
}, z.core.$strict>;
|
|
9704
9726
|
type CheckReportJson = z.output<typeof CheckReportJsonSchema>;
|
|
9705
9727
|
|
|
@@ -9994,12 +10016,12 @@ declare const CheckRunInputSchema: z.ZodObject<{
|
|
|
9994
10016
|
/** One line of the doctor report: the section it belongs to, its severity, its message, and the identity/profile/rule it is about when there is one. */
|
|
9995
10017
|
declare const DoctorFindingSchema: z.ZodObject<{
|
|
9996
10018
|
section: z.ZodEnum<{
|
|
10019
|
+
"global-config": "global-config";
|
|
10020
|
+
"config-profile": "config-profile";
|
|
9997
10021
|
identity: "identity";
|
|
9998
10022
|
provider: "provider";
|
|
9999
10023
|
frontdoor: "frontdoor";
|
|
10000
10024
|
pool: "pool";
|
|
10001
|
-
"global-config": "global-config";
|
|
10002
|
-
"config-profile": "config-profile";
|
|
10003
10025
|
keychain: "keychain";
|
|
10004
10026
|
"ambient-credential": "ambient-credential";
|
|
10005
10027
|
"binary-discovery": "binary-discovery";
|
|
@@ -10013,6 +10035,7 @@ declare const DoctorFindingSchema: z.ZodObject<{
|
|
|
10013
10035
|
"active-identity": "active-identity";
|
|
10014
10036
|
headroom: "headroom";
|
|
10015
10037
|
models: "models";
|
|
10038
|
+
"route-overrides": "route-overrides";
|
|
10016
10039
|
}>;
|
|
10017
10040
|
subject: z.ZodOptional<z.ZodString>;
|
|
10018
10041
|
severity: z.ZodEnum<{
|
|
@@ -10027,12 +10050,12 @@ declare const DoctorRunOutputSchema: z.ZodObject<{
|
|
|
10027
10050
|
ok: z.ZodBoolean;
|
|
10028
10051
|
findings: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
10029
10052
|
section: z.ZodEnum<{
|
|
10053
|
+
"global-config": "global-config";
|
|
10054
|
+
"config-profile": "config-profile";
|
|
10030
10055
|
identity: "identity";
|
|
10031
10056
|
provider: "provider";
|
|
10032
10057
|
frontdoor: "frontdoor";
|
|
10033
10058
|
pool: "pool";
|
|
10034
|
-
"global-config": "global-config";
|
|
10035
|
-
"config-profile": "config-profile";
|
|
10036
10059
|
keychain: "keychain";
|
|
10037
10060
|
"ambient-credential": "ambient-credential";
|
|
10038
10061
|
"binary-discovery": "binary-discovery";
|
|
@@ -10046,6 +10069,7 @@ declare const DoctorRunOutputSchema: z.ZodObject<{
|
|
|
10046
10069
|
"active-identity": "active-identity";
|
|
10047
10070
|
headroom: "headroom";
|
|
10048
10071
|
models: "models";
|
|
10072
|
+
"route-overrides": "route-overrides";
|
|
10049
10073
|
}>;
|
|
10050
10074
|
subject: z.ZodOptional<z.ZodString>;
|
|
10051
10075
|
severity: z.ZodEnum<{
|
|
@@ -10187,7 +10211,7 @@ type CodexApiRouter = ReturnType<typeof createCodexApiRouter>;
|
|
|
10187
10211
|
type CodexApiClient = RouterClient<CodexApiRouter>;
|
|
10188
10212
|
|
|
10189
10213
|
/**
|
|
10190
|
-
* The door's configuration management as a typed oRPC API: the writes the CLI's `identity`, `profile`, `pool`, `provider` and `rule` verbs make, as `config.<noun>.<verb>` procedures, every one behind the same per-generation control token as the rest of the mount.
|
|
10214
|
+
* The door's configuration management as a typed oRPC API: the writes the CLI's `identity`, `profile`, `pool`, `provider` and `rule` verbs make, (and `route set|remove`) as `config.<noun>.<verb>` procedures, every one behind the same per-generation control token as the rest of the mount.
|
|
10191
10215
|
*
|
|
10192
10216
|
* Each procedure makes the checks its verb makes and calls the store function it calls (and the shared rules extracted beside them), so a write through the API and a write through the CLI are the same write: the same validation, the same atomic store write, the same refusals. The one check that reaches outside the stores is `config.identity.add`'s question to the macOS Keychain, asked through the asynchronous runner in `deps.keychain` so the door's event loop is never held, by the function the CLI asks it with. A refusal is the CLI's own message carried as an oRPC error (`NOT_FOUND` for a name that does not exist, `CONFLICT` for one that already does or for a Keychain login in the way, `BAD_REQUEST` for anything else the store refuses, and the retryable `SERVICE_UNAVAILABLE` for a Keychain that could not be asked), and every outcome is the `--json` object the verb prints.
|
|
10193
10217
|
*
|
|
@@ -13899,6 +13923,50 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
13899
13923
|
name: zod.ZodString;
|
|
13900
13924
|
}, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
|
|
13901
13925
|
};
|
|
13926
|
+
route: {
|
|
13927
|
+
set: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
|
|
13928
|
+
scope: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
13929
|
+
kind: zod.ZodLiteral<"global">;
|
|
13930
|
+
}, zod_v4_core.$strict>, zod.ZodObject<{
|
|
13931
|
+
kind: zod.ZodEnum<{
|
|
13932
|
+
session: "session";
|
|
13933
|
+
identity: "identity";
|
|
13934
|
+
provider: "provider";
|
|
13935
|
+
}>;
|
|
13936
|
+
name: zod.ZodString;
|
|
13937
|
+
}, zod_v4_core.$strict>]>;
|
|
13938
|
+
model: zod.ZodString;
|
|
13939
|
+
target: zod.ZodString;
|
|
13940
|
+
}, zod_v4_core.$strict>, zod.ZodObject<{
|
|
13941
|
+
action: zod.ZodLiteral<"updated">;
|
|
13942
|
+
kind: zod.ZodLiteral<"route">;
|
|
13943
|
+
name: zod.ZodString;
|
|
13944
|
+
value: zod.ZodObject<{
|
|
13945
|
+
scope: zod.ZodString;
|
|
13946
|
+
model: zod.ZodString;
|
|
13947
|
+
target: zod.ZodString;
|
|
13948
|
+
}, zod_v4_core.$strict>;
|
|
13949
|
+
}, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
|
|
13950
|
+
remove: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
|
|
13951
|
+
scope: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
13952
|
+
kind: zod.ZodLiteral<"global">;
|
|
13953
|
+
}, zod_v4_core.$strict>, zod.ZodObject<{
|
|
13954
|
+
kind: zod.ZodEnum<{
|
|
13955
|
+
session: "session";
|
|
13956
|
+
identity: "identity";
|
|
13957
|
+
provider: "provider";
|
|
13958
|
+
}>;
|
|
13959
|
+
name: zod.ZodString;
|
|
13960
|
+
}, zod_v4_core.$strict>]>;
|
|
13961
|
+
model: zod.ZodString;
|
|
13962
|
+
confirm: zod.ZodBoolean;
|
|
13963
|
+
}, zod_v4_core.$strict>, zod.ZodObject<{
|
|
13964
|
+
action: zod.ZodLiteral<"removed">;
|
|
13965
|
+
kind: zod.ZodLiteral<"route">;
|
|
13966
|
+
name: zod.ZodString;
|
|
13967
|
+
removed: zod.ZodArray<zod.ZodString>;
|
|
13968
|
+
}, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
|
|
13969
|
+
};
|
|
13902
13970
|
};
|
|
13903
13971
|
};
|
|
13904
13972
|
/** The configuration router, as the merged mount's and the client's own types are derived from it. */
|
|
@@ -15190,10 +15258,10 @@ declare function createLaunchApiRouter(deps: LaunchApiDeps): {
|
|
|
15190
15258
|
configDir: zod.ZodOptional<zod.ZodString>;
|
|
15191
15259
|
configProfile: zod.ZodOptional<zod.ZodString>;
|
|
15192
15260
|
configProfileSource: zod.ZodEnum<{
|
|
15261
|
+
"directory-rule": "directory-rule";
|
|
15193
15262
|
env: "env";
|
|
15194
15263
|
none: "none";
|
|
15195
15264
|
"cli-flag": "cli-flag";
|
|
15196
|
-
"directory-rule": "directory-rule";
|
|
15197
15265
|
"identity-default": "identity-default";
|
|
15198
15266
|
"global-default": "global-default";
|
|
15199
15267
|
}>;
|
|
@@ -16438,10 +16506,10 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
16438
16506
|
configProfile: z.ZodObject<{
|
|
16439
16507
|
name: z.ZodNullable<z.ZodString>;
|
|
16440
16508
|
source: z.ZodEnum<{
|
|
16509
|
+
"directory-rule": "directory-rule";
|
|
16441
16510
|
env: "env";
|
|
16442
16511
|
none: "none";
|
|
16443
16512
|
"cli-flag": "cli-flag";
|
|
16444
|
-
"directory-rule": "directory-rule";
|
|
16445
16513
|
"identity-default": "identity-default";
|
|
16446
16514
|
"global-default": "global-default";
|
|
16447
16515
|
}>;
|
|
@@ -16449,9 +16517,9 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
16449
16517
|
layers: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
16450
16518
|
id: z.ZodInt;
|
|
16451
16519
|
kind: z.ZodEnum<{
|
|
16452
|
-
"directory-rule": "directory-rule";
|
|
16453
16520
|
"global-config": "global-config";
|
|
16454
16521
|
"config-profile": "config-profile";
|
|
16522
|
+
"directory-rule": "directory-rule";
|
|
16455
16523
|
portable: "portable";
|
|
16456
16524
|
"portable-local": "portable-local";
|
|
16457
16525
|
"cli-override": "cli-override";
|
|
@@ -16693,6 +16761,19 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
16693
16761
|
ok: z.ZodLiteral<false>;
|
|
16694
16762
|
message: z.ZodString;
|
|
16695
16763
|
}, z.core.$strict>]>>;
|
|
16764
|
+
routeOverrides: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
16765
|
+
applying: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
16766
|
+
model: z.ZodString;
|
|
16767
|
+
target: z.ZodString;
|
|
16768
|
+
scope: z.ZodString;
|
|
16769
|
+
outranks: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
16770
|
+
scope: z.ZodString;
|
|
16771
|
+
target: z.ZodString;
|
|
16772
|
+
}, z.core.$strict>>>;
|
|
16773
|
+
}, z.core.$strict>>>;
|
|
16774
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
16775
|
+
fault: z.ZodString;
|
|
16776
|
+
}, z.core.$strict>]>>;
|
|
16696
16777
|
}, z.core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
|
|
16697
16778
|
};
|
|
16698
16779
|
doctor: {
|
|
@@ -16700,12 +16781,12 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
16700
16781
|
ok: z.ZodBoolean;
|
|
16701
16782
|
findings: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
16702
16783
|
section: z.ZodEnum<{
|
|
16784
|
+
"global-config": "global-config";
|
|
16785
|
+
"config-profile": "config-profile";
|
|
16703
16786
|
identity: "identity";
|
|
16704
16787
|
provider: "provider";
|
|
16705
16788
|
frontdoor: "frontdoor";
|
|
16706
16789
|
pool: "pool";
|
|
16707
|
-
"global-config": "global-config";
|
|
16708
|
-
"config-profile": "config-profile";
|
|
16709
16790
|
keychain: "keychain";
|
|
16710
16791
|
"ambient-credential": "ambient-credential";
|
|
16711
16792
|
"binary-discovery": "binary-discovery";
|
|
@@ -16719,6 +16800,7 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
16719
16800
|
"active-identity": "active-identity";
|
|
16720
16801
|
headroom: "headroom";
|
|
16721
16802
|
models: "models";
|
|
16803
|
+
"route-overrides": "route-overrides";
|
|
16722
16804
|
}>;
|
|
16723
16805
|
subject: z.ZodOptional<z.ZodString>;
|
|
16724
16806
|
severity: z.ZodEnum<{
|
|
@@ -16937,10 +17019,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
16937
17019
|
configDir: z.ZodOptional<z.ZodString>;
|
|
16938
17020
|
configProfile: z.ZodOptional<z.ZodString>;
|
|
16939
17021
|
configProfileSource: z.ZodEnum<{
|
|
17022
|
+
"directory-rule": "directory-rule";
|
|
16940
17023
|
env: "env";
|
|
16941
17024
|
none: "none";
|
|
16942
17025
|
"cli-flag": "cli-flag";
|
|
16943
|
-
"directory-rule": "directory-rule";
|
|
16944
17026
|
"identity-default": "identity-default";
|
|
16945
17027
|
"global-default": "global-default";
|
|
16946
17028
|
}>;
|
|
@@ -21272,6 +21354,50 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
21272
21354
|
name: z.ZodString;
|
|
21273
21355
|
}, z.core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
|
|
21274
21356
|
};
|
|
21357
|
+
route: {
|
|
21358
|
+
set: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, z.ZodObject<{
|
|
21359
|
+
scope: z.ZodUnion<readonly [z.ZodObject<{
|
|
21360
|
+
kind: z.ZodLiteral<"global">;
|
|
21361
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
21362
|
+
kind: z.ZodEnum<{
|
|
21363
|
+
session: "session";
|
|
21364
|
+
identity: "identity";
|
|
21365
|
+
provider: "provider";
|
|
21366
|
+
}>;
|
|
21367
|
+
name: z.ZodString;
|
|
21368
|
+
}, z.core.$strict>]>;
|
|
21369
|
+
model: z.ZodString;
|
|
21370
|
+
target: z.ZodString;
|
|
21371
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
21372
|
+
action: z.ZodLiteral<"updated">;
|
|
21373
|
+
kind: z.ZodLiteral<"route">;
|
|
21374
|
+
name: z.ZodString;
|
|
21375
|
+
value: z.ZodObject<{
|
|
21376
|
+
scope: z.ZodString;
|
|
21377
|
+
model: z.ZodString;
|
|
21378
|
+
target: z.ZodString;
|
|
21379
|
+
}, z.core.$strict>;
|
|
21380
|
+
}, z.core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
|
|
21381
|
+
remove: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, z.ZodObject<{
|
|
21382
|
+
scope: z.ZodUnion<readonly [z.ZodObject<{
|
|
21383
|
+
kind: z.ZodLiteral<"global">;
|
|
21384
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
21385
|
+
kind: z.ZodEnum<{
|
|
21386
|
+
session: "session";
|
|
21387
|
+
identity: "identity";
|
|
21388
|
+
provider: "provider";
|
|
21389
|
+
}>;
|
|
21390
|
+
name: z.ZodString;
|
|
21391
|
+
}, z.core.$strict>]>;
|
|
21392
|
+
model: z.ZodString;
|
|
21393
|
+
confirm: z.ZodBoolean;
|
|
21394
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
21395
|
+
action: z.ZodLiteral<"removed">;
|
|
21396
|
+
kind: z.ZodLiteral<"route">;
|
|
21397
|
+
name: z.ZodString;
|
|
21398
|
+
removed: z.ZodArray<z.ZodString>;
|
|
21399
|
+
}, z.core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
|
|
21400
|
+
};
|
|
21275
21401
|
};
|
|
21276
21402
|
update: {
|
|
21277
21403
|
check: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, InitialInputSchema, z.ZodObject<{
|
|
@@ -21536,10 +21662,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
21536
21662
|
configProfile: z.ZodObject<{
|
|
21537
21663
|
name: z.ZodNullable<z.ZodString>;
|
|
21538
21664
|
source: z.ZodEnum<{
|
|
21665
|
+
"directory-rule": "directory-rule";
|
|
21539
21666
|
env: "env";
|
|
21540
21667
|
none: "none";
|
|
21541
21668
|
"cli-flag": "cli-flag";
|
|
21542
|
-
"directory-rule": "directory-rule";
|
|
21543
21669
|
"identity-default": "identity-default";
|
|
21544
21670
|
"global-default": "global-default";
|
|
21545
21671
|
}>;
|
|
@@ -21547,9 +21673,9 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
21547
21673
|
layers: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
21548
21674
|
id: z.ZodInt;
|
|
21549
21675
|
kind: z.ZodEnum<{
|
|
21550
|
-
"directory-rule": "directory-rule";
|
|
21551
21676
|
"global-config": "global-config";
|
|
21552
21677
|
"config-profile": "config-profile";
|
|
21678
|
+
"directory-rule": "directory-rule";
|
|
21553
21679
|
portable: "portable";
|
|
21554
21680
|
"portable-local": "portable-local";
|
|
21555
21681
|
"cli-override": "cli-override";
|
|
@@ -21791,6 +21917,19 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
21791
21917
|
ok: z.ZodLiteral<false>;
|
|
21792
21918
|
message: z.ZodString;
|
|
21793
21919
|
}, z.core.$strict>]>>;
|
|
21920
|
+
routeOverrides: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
21921
|
+
applying: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
21922
|
+
model: z.ZodString;
|
|
21923
|
+
target: z.ZodString;
|
|
21924
|
+
scope: z.ZodString;
|
|
21925
|
+
outranks: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
21926
|
+
scope: z.ZodString;
|
|
21927
|
+
target: z.ZodString;
|
|
21928
|
+
}, z.core.$strict>>>;
|
|
21929
|
+
}, z.core.$strict>>>;
|
|
21930
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
21931
|
+
fault: z.ZodString;
|
|
21932
|
+
}, z.core.$strict>]>>;
|
|
21794
21933
|
}, z.core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
|
|
21795
21934
|
};
|
|
21796
21935
|
doctor: {
|
|
@@ -21798,12 +21937,12 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
21798
21937
|
ok: z.ZodBoolean;
|
|
21799
21938
|
findings: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
21800
21939
|
section: z.ZodEnum<{
|
|
21940
|
+
"global-config": "global-config";
|
|
21941
|
+
"config-profile": "config-profile";
|
|
21801
21942
|
identity: "identity";
|
|
21802
21943
|
provider: "provider";
|
|
21803
21944
|
frontdoor: "frontdoor";
|
|
21804
21945
|
pool: "pool";
|
|
21805
|
-
"global-config": "global-config";
|
|
21806
|
-
"config-profile": "config-profile";
|
|
21807
21946
|
keychain: "keychain";
|
|
21808
21947
|
"ambient-credential": "ambient-credential";
|
|
21809
21948
|
"binary-discovery": "binary-discovery";
|
|
@@ -21817,6 +21956,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
21817
21956
|
"active-identity": "active-identity";
|
|
21818
21957
|
headroom: "headroom";
|
|
21819
21958
|
models: "models";
|
|
21959
|
+
"route-overrides": "route-overrides";
|
|
21820
21960
|
}>;
|
|
21821
21961
|
subject: z.ZodOptional<z.ZodString>;
|
|
21822
21962
|
severity: z.ZodEnum<{
|
|
@@ -26078,10 +26218,10 @@ declare const LaunchResolveOutputSchema: z.ZodObject<{
|
|
|
26078
26218
|
configDir: z.ZodOptional<z.ZodString>;
|
|
26079
26219
|
configProfile: z.ZodOptional<z.ZodString>;
|
|
26080
26220
|
configProfileSource: z.ZodEnum<{
|
|
26221
|
+
"directory-rule": "directory-rule";
|
|
26081
26222
|
env: "env";
|
|
26082
26223
|
none: "none";
|
|
26083
26224
|
"cli-flag": "cli-flag";
|
|
26084
|
-
"directory-rule": "directory-rule";
|
|
26085
26225
|
"identity-default": "identity-default";
|
|
26086
26226
|
"global-default": "global-default";
|
|
26087
26227
|
}>;
|
|
@@ -27456,6 +27596,8 @@ interface RealMemberProviderParams {
|
|
|
27456
27596
|
readonly cliFlagConfigProfile?: string;
|
|
27457
27597
|
/** The cascade of `cwd`, when the caller has already loaded it. */
|
|
27458
27598
|
readonly loaded?: LoadedCascade;
|
|
27599
|
+
/** The home directory the cascade walk stops at and reads committed files up to; absent, the process's own. */
|
|
27600
|
+
readonly home?: string;
|
|
27459
27601
|
}
|
|
27460
27602
|
/**
|
|
27461
27603
|
* `memberProviderResolver` over this machine's real files: the cascade of `params.cwd` is read once for its directory selections and again, per configuration profile, as a launch reads it for the identity it runs as. Used by every read-only report of what a pool launch would pick, so each ranks the pool on the quota the launch itself would spend.
|
|
@@ -27710,7 +27852,7 @@ interface RunSupervisorOptions {
|
|
|
27710
27852
|
*
|
|
27711
27853
|
* Every effect flows through `ports`, so the whole loop is unit-testable with a fake clock, filesystem, and processes. The loop awaits its sleeps, which in the real implementation run on a timer: between ticks the event loop turns, the spawned child's exit event is delivered (and the child thereby reaped), and the next tick's liveness check reads the truth.
|
|
27712
27854
|
*/
|
|
27713
|
-
declare function runSupervisor(initialConfig: HeadroomSupervisorConfig,
|
|
27855
|
+
declare function runSupervisor(initialConfig: HeadroomSupervisorConfig, givenPorts: SupervisorPorts, options?: RunSupervisorOptions): Promise<number>;
|
|
27714
27856
|
/** A recorded front door no read of the process table could answer for, kept on the allowlist until one can: its pid, its direct origin, and why the read failed. */
|
|
27715
27857
|
interface UndeterminedFrontDoor {
|
|
27716
27858
|
readonly pid: number;
|
|
@@ -28026,7 +28168,7 @@ interface ProviderListEntry {
|
|
|
28026
28168
|
readonly name: string;
|
|
28027
28169
|
readonly provider: Provider;
|
|
28028
28170
|
}
|
|
28029
|
-
/** Lists every provider under `providersDir` that has a valid `<name>.json`. A file that fails validation
|
|
28171
|
+
/** Lists every provider under `providersDir` that has a valid `<name>.json`. A file that fails validation, is not JSON or has a read fault of its own (`fileFaultCodeOf`) is skipped here and reported through `onInvalid` (standard error by default); `provider list` is the place a broken definition gets surfaced, not a launch. A read of a file or of the directory that failed for the moment (`isTransientReadError`) is thrown, so a caller retries rather than taking the provider for broken or absent; a long-lived caller's loop catches it (`keepTicking`). */
|
|
28030
28172
|
declare function listProviders(paths: LayoutPaths, onInvalid?: (name: string, message: string) => void): readonly ProviderListEntry[];
|
|
28031
28173
|
/** The credential targets a provider may use. */
|
|
28032
28174
|
type ProviderCredentialTarget = (typeof PROVIDER_CREDENTIAL_TARGETS)[number];
|
|
@@ -28170,6 +28312,33 @@ declare function updateDirectoryRule(paths: LayoutPaths, rulePath: string, optio
|
|
|
28170
28312
|
/** Removes the directory rule for `rulePath`. Throws `DirectoryRuleNotFoundError` when no rule matches that exact path. */
|
|
28171
28313
|
declare function removeDirectoryRule(paths: LayoutPaths, rulePath: string): void;
|
|
28172
28314
|
|
|
28315
|
+
declare const RouteOverridesSchema: z.ZodObject<{
|
|
28316
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
28317
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
28318
|
+
global: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
28319
|
+
providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
28320
|
+
identities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
28321
|
+
sessions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
28322
|
+
}, z.core.$strict>;
|
|
28323
|
+
type RouteOverrides = z.infer<typeof RouteOverridesSchema>;
|
|
28324
|
+
|
|
28325
|
+
/** What one read of the overrides found: the table, or why it cannot be used (a class, a code or a validation summary, never the file's path or contents). */
|
|
28326
|
+
type RouteOverridesRead = {
|
|
28327
|
+
readonly table: RouteOverrides;
|
|
28328
|
+
} | {
|
|
28329
|
+
readonly fault: string;
|
|
28330
|
+
};
|
|
28331
|
+
/** One model name or class some covering scope overrides, as `check` and `model explain` report it: the entry that wins and the entries it outranks, each with its scope. */
|
|
28332
|
+
interface ApplyingOverride {
|
|
28333
|
+
readonly model: string;
|
|
28334
|
+
readonly target: string;
|
|
28335
|
+
readonly scope: string;
|
|
28336
|
+
readonly outranks: readonly {
|
|
28337
|
+
readonly scope: string;
|
|
28338
|
+
readonly target: string;
|
|
28339
|
+
}[];
|
|
28340
|
+
}
|
|
28341
|
+
|
|
28173
28342
|
type CodexCredentialGuardResult = {
|
|
28174
28343
|
readonly ok: true;
|
|
28175
28344
|
} | {
|
|
@@ -28287,6 +28456,8 @@ interface RunCheckParams {
|
|
|
28287
28456
|
readonly credentialCache?: CredentialCacheEnv;
|
|
28288
28457
|
/** Opens one connection to the selected http provider's base URL, bounded by its connect timeout. Omit to leave reachability out of the report. */
|
|
28289
28458
|
readonly probeBaseUrl?: BaseUrlProbe;
|
|
28459
|
+
/** The route overrides as the door would read them. Omit to leave them out of the report; with them, the report lists the entries that apply to a launch here (its identity's, its provider's and the global ones). */
|
|
28460
|
+
readonly routeOverrides?: RouteOverridesRead;
|
|
28290
28461
|
}
|
|
28291
28462
|
/** Whether the selected http provider's base URL accepted a connection, as `check` reports it. */
|
|
28292
28463
|
type ProviderReachabilityReport = {
|
|
@@ -28317,6 +28488,12 @@ interface CheckReport {
|
|
|
28317
28488
|
readonly claudeVersion?: ClaudeVersionReport;
|
|
28318
28489
|
/** Whether the selected provider's base URL accepts a connection, when an http provider is selected and a probe was given. */
|
|
28319
28490
|
readonly providerReachability?: ProviderReachabilityReport;
|
|
28491
|
+
/** The route overrides that apply to a launch here, or why the file cannot be used, when the overrides were given. */
|
|
28492
|
+
readonly routeOverrides?: {
|
|
28493
|
+
readonly applying: readonly ApplyingOverride[];
|
|
28494
|
+
} | {
|
|
28495
|
+
readonly fault: string;
|
|
28496
|
+
};
|
|
28320
28497
|
}
|
|
28321
28498
|
/** 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. */
|
|
28322
28499
|
interface ClaudeVersionReport {
|
|
@@ -28339,7 +28516,7 @@ declare function formatCheckReport(report: CheckReport): string[];
|
|
|
28339
28516
|
*/
|
|
28340
28517
|
declare function checkReportToJson(report: CheckReport): CheckReportJson;
|
|
28341
28518
|
/**
|
|
28342
|
-
* 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,
|
|
28519
|
+
* 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, one whose base URL accepts no connection, or a route overrides file the door cannot use. Informational diagnostics and the settings-exposure advisory (names and counts only, for a person to review) never fail it.
|
|
28343
28520
|
*/
|
|
28344
28521
|
declare function checkReportHasWarnings(report: CheckReport): boolean;
|
|
28345
28522
|
/** What `collectCheckReport` needs from its caller. */
|
|
@@ -28421,6 +28598,62 @@ interface DoctorFarmLinksInput {
|
|
|
28421
28598
|
readonly dangling: readonly DanglingFarmLink[];
|
|
28422
28599
|
}
|
|
28423
28600
|
|
|
28601
|
+
/** What follows the selector: nothing, a Claude tier, or an exact model. */
|
|
28602
|
+
type SelectorTarget = {
|
|
28603
|
+
readonly kind: "none";
|
|
28604
|
+
} | {
|
|
28605
|
+
readonly kind: "class";
|
|
28606
|
+
readonly tier: ClaudeTier;
|
|
28607
|
+
} | {
|
|
28608
|
+
readonly kind: "model";
|
|
28609
|
+
readonly model: string;
|
|
28610
|
+
};
|
|
28611
|
+
/** Why a name could not be routed: the request is answered with this text (a 400). */
|
|
28612
|
+
interface SelectorRefusal {
|
|
28613
|
+
readonly refusal: string;
|
|
28614
|
+
}
|
|
28615
|
+
/** What a lookup of one name in one namespace found: nothing, a usable entry, or an entry that exists and cannot be used (its reason names it). */
|
|
28616
|
+
type SelectorLookup<T> = {
|
|
28617
|
+
readonly kind: "absent";
|
|
28618
|
+
} | {
|
|
28619
|
+
readonly kind: "found";
|
|
28620
|
+
readonly value: T;
|
|
28621
|
+
} | {
|
|
28622
|
+
readonly kind: "invalid";
|
|
28623
|
+
readonly reason: string;
|
|
28624
|
+
};
|
|
28625
|
+
/** The live state a selector is expanded against, read at the moment of the request. */
|
|
28626
|
+
interface SelectorPorts {
|
|
28627
|
+
/** A configuration profile by name, with the provider its `launch` names (through its `extends` chain), if any. */
|
|
28628
|
+
readonly profile: (name: string) => SelectorLookup<{
|
|
28629
|
+
readonly provider: string | undefined;
|
|
28630
|
+
}>;
|
|
28631
|
+
/** An identity by name, with the provider its own file declares, if any. */
|
|
28632
|
+
readonly identity: (name: string) => SelectorLookup<{
|
|
28633
|
+
readonly provider: string | undefined;
|
|
28634
|
+
}>;
|
|
28635
|
+
/** Whether a pool of this name is defined. */
|
|
28636
|
+
readonly pool: (name: string) => SelectorLookup<undefined>;
|
|
28637
|
+
/** The member a pool's ranking picks right now, or why it picks none: asked only once the selector is known to be that pool, since ranking reads every member's usage. */
|
|
28638
|
+
readonly poolPick: (name: string) => {
|
|
28639
|
+
readonly identity: string;
|
|
28640
|
+
} | SelectorRefusal;
|
|
28641
|
+
/** Whether a provider of this name is defined (exactly, as the providers directory lists it). */
|
|
28642
|
+
readonly provider: (name: string) => SelectorLookup<undefined>;
|
|
28643
|
+
/** The name a provider serves a target under: its default model for none, its own tier mapping for a class (a router's tier pointer, which is a ref of its own), the model itself for an exact model. */
|
|
28644
|
+
readonly providerTarget: (provider: string, target: SelectorTarget) => {
|
|
28645
|
+
readonly name: string;
|
|
28646
|
+
} | SelectorRefusal;
|
|
28647
|
+
/** Whether a model family of this canonical key is offered. */
|
|
28648
|
+
readonly family: (key: string) => boolean;
|
|
28649
|
+
/** Whether the identity named `identity` holds the login the session runs on: it is the identity stored under `sessionIdentityId` (a directory id, never a name), or another holding the same account in the same organisation; or why that cannot be told. */
|
|
28650
|
+
readonly sameLogin: (identity: string, sessionIdentityId: string) => boolean | SelectorRefusal;
|
|
28651
|
+
/** The Claude model id the session last sent for a tier, as its own Claude Code resolved the tier: what a class is sent as on the Anthropic route. Undefined until the session has sent one. */
|
|
28652
|
+
readonly claudeNameOf: (tier: ClaudeTier) => string | undefined;
|
|
28653
|
+
/** The provider of the route the session itself chose (the door reads it with `sessionRouteProvider`: its launch's own, else the one its own request put the main loop on, else, while an override has moved it, the one it had chosen before), or undefined on the Anthropic route: where a class alone (`auto/<class>`) goes. */
|
|
28654
|
+
readonly routeProvider: () => string | undefined;
|
|
28655
|
+
}
|
|
28656
|
+
|
|
28424
28657
|
/**
|
|
28425
28658
|
* How the allowlist the headroom daemon serves lags the allowlist computed now. The daemon re-reads its allowlist file on every request that follows a change to it, and its supervisor rewrites the file and records the hash in the same tick, so a lag that lasts beyond one tick means the supervisor is not running or cannot write the file. A daemon started by an earlier release reads no file, and is reported as such instead.
|
|
28426
28659
|
*/
|
|
@@ -28495,17 +28728,9 @@ interface RenameJournalListing {
|
|
|
28495
28728
|
readonly unreadable: readonly UnreadableRenameJournal[];
|
|
28496
28729
|
}
|
|
28497
28730
|
|
|
28498
|
-
/**
|
|
28499
|
-
* The former names of renamed providers, by the old name: `{ "z": "zai" }` means a request or a launch that names `z` is served by the provider now called `zai`.
|
|
28500
|
-
*
|
|
28501
|
-
* A running session has its provider's name fixed at launch, and the front door resolves that name against the providers directory on every request, so renaming a provider file alone strands every session launched before the rename. An alias is what keeps those sessions served until they end. Targets are always current provider names: renaming a provider repoints every alias that targeted it, so a lookup is one step and never a chain.
|
|
28502
|
-
*/
|
|
28503
|
-
declare const ProviderAliasesSchema: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
28504
|
-
type ProviderAliases = z.infer<typeof ProviderAliasesSchema>;
|
|
28505
|
-
|
|
28506
28731
|
declare const DOCTOR_SEVERITIES: readonly ["pass", "warn", "fail"];
|
|
28507
28732
|
type DoctorSeverity = (typeof DOCTOR_SEVERITIES)[number];
|
|
28508
|
-
declare const DOCTOR_SECTIONS: readonly ["ambient-credential", "binary-discovery", "claude-shim", "path-resolution", "legacy-name", "config-profile", "identity", "sign-in", "farm-links", "pool", "provider", "keychain", "directory-rules", "global-config", "categories-local", "active-identity", "headroom", "frontdoor", "models"];
|
|
28733
|
+
declare const DOCTOR_SECTIONS: readonly ["ambient-credential", "binary-discovery", "claude-shim", "path-resolution", "legacy-name", "config-profile", "identity", "sign-in", "farm-links", "pool", "provider", "keychain", "directory-rules", "global-config", "categories-local", "active-identity", "headroom", "frontdoor", "models", "route-overrides"];
|
|
28509
28734
|
type DoctorSection = (typeof DOCTOR_SECTIONS)[number];
|
|
28510
28735
|
/** One line of `agent-shim doctor`'s report. `subject` names the identity/profile/rule the finding is about, when the section has more than one of those. */
|
|
28511
28736
|
interface DoctorFinding {
|
|
@@ -28527,6 +28752,8 @@ interface DoctorIdentityInput {
|
|
|
28527
28752
|
readonly id: string;
|
|
28528
28753
|
readonly path: string;
|
|
28529
28754
|
readonly raw: string | undefined;
|
|
28755
|
+
/** Set when the file exists and cannot be read (a directory in its place, no permission): the read failure's code. `raw` is then undefined, and the file is reported as unreadable, never as missing. */
|
|
28756
|
+
readonly unreadable?: string;
|
|
28530
28757
|
/** The identity's own farm root (`identitiesDir/<id>`): the account name the Keychain lookup uses. */
|
|
28531
28758
|
readonly farmRoot: string;
|
|
28532
28759
|
/** Whether the identity's `.credentials.json` exists, pre-resolved by the wiring layer since it is a file-existence check. */
|
|
@@ -28539,17 +28766,23 @@ interface DoctorConfigProfileInput {
|
|
|
28539
28766
|
readonly name: string;
|
|
28540
28767
|
readonly path: string;
|
|
28541
28768
|
readonly raw: string | undefined;
|
|
28769
|
+
/** Set when the file exists and cannot be read (a directory in its place, no permission): the read failure's code. `raw` is then undefined, and the file is reported as unreadable, never as missing. */
|
|
28770
|
+
readonly unreadable?: string;
|
|
28542
28771
|
}
|
|
28543
28772
|
/** One provider's raw `<name>.json`, unparsed. */
|
|
28544
28773
|
interface DoctorProviderInput {
|
|
28545
28774
|
readonly name: string;
|
|
28546
28775
|
readonly path: string;
|
|
28547
28776
|
readonly raw: string | undefined;
|
|
28777
|
+
/** Set when the file exists and cannot be read (a directory in its place, no permission): the read failure's code. `raw` is then undefined, and the file is reported as unreadable, never as missing. */
|
|
28778
|
+
readonly unreadable?: string;
|
|
28548
28779
|
}
|
|
28549
28780
|
/** A single optional top-level file `runDoctor` validates against a schema when present — absent is a legitimate, unconfigured state, not a failure. */
|
|
28550
28781
|
interface DoctorFileInput {
|
|
28551
28782
|
readonly path: string;
|
|
28552
28783
|
readonly raw: string | undefined;
|
|
28784
|
+
/** Set when the file exists and cannot be read (a directory in its place, no permission): the read failure's code. `raw` is then undefined, and the file is reported as unreadable, never as missing. */
|
|
28785
|
+
readonly unreadable?: string;
|
|
28553
28786
|
}
|
|
28554
28787
|
/** The outcome of resolving the real Claude Code binary, pre-resolved by the wiring layer since `discoverClaudeBinary` is not itself a parse-shaped pure operation and already has its own dedicated test coverage. */
|
|
28555
28788
|
type DoctorBinaryDiscovery = {
|
|
@@ -28580,6 +28813,7 @@ interface RunDoctorParams {
|
|
|
28580
28813
|
readonly chatgptSignIn?: {
|
|
28581
28814
|
readonly path: string;
|
|
28582
28815
|
readonly raw: string | undefined;
|
|
28816
|
+
readonly unreadable?: string;
|
|
28583
28817
|
};
|
|
28584
28818
|
readonly identities: readonly DoctorIdentityInput[];
|
|
28585
28819
|
/** The links in each identity's farm that lead nowhere (`danglingFarmLinks`). Omit to leave the farm-links section out; with it, each such link warns, naming the identity, the entry and what brings the farm up to date. */
|
|
@@ -28588,8 +28822,8 @@ interface RunDoctorParams {
|
|
|
28588
28822
|
readonly usageSnapshots?: Readonly<Record<string, UsageSnapshot>>;
|
|
28589
28823
|
readonly configProfiles: readonly DoctorConfigProfileInput[];
|
|
28590
28824
|
readonly providers: readonly DoctorProviderInput[];
|
|
28591
|
-
/**
|
|
28592
|
-
readonly providerAliases?:
|
|
28825
|
+
/** `provider-aliases.json`, the recorded former names of renamed providers: absent when no provider was ever renamed. Omit to leave them out of the findings. */
|
|
28826
|
+
readonly providerAliases?: DoctorFileInput;
|
|
28593
28827
|
/** Probes the base URLs of every valid http provider, up to `MAX_CONCURRENT_PROBES` distinct targets together and any more in rounds of that many, one connection each, each bounded by its 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. */
|
|
28594
28828
|
readonly probeBaseUrls?: BaseUrlBatchProbe;
|
|
28595
28829
|
/** The providers whose last catalogue refresh, as the serving front door recorded it, failed on a redirect it does not follow, each with the reason it recorded. Omit to leave the finding out. */
|
|
@@ -28614,13 +28848,18 @@ interface RunDoctorParams {
|
|
|
28614
28848
|
readonly models?: ModelsConfig;
|
|
28615
28849
|
/** Every target the defined providers offer as `<provider>/<model>` refs, for checking a `family:` member against the families they form. Omit to skip that check. */
|
|
28616
28850
|
readonly modelTargets?: readonly string[];
|
|
28851
|
+
/** The route overrides file. Omit to skip the route override checks; a missing file is a pass (nothing is overridden). */
|
|
28852
|
+
readonly routeOverrides?: DoctorFileInput;
|
|
28853
|
+
/** The configuration's selector ports a target is checked with, for a session on a provider or none, as `route set` checks it. Omit to check by the defined names alone. */
|
|
28854
|
+
readonly routeOverrideTargetPorts?: (routeProvider: string | undefined) => SelectorPorts;
|
|
28617
28855
|
readonly categoriesLocal: DoctorFileInput;
|
|
28618
28856
|
readonly activeIdentity: DoctorFileInput;
|
|
28619
28857
|
readonly binaryDiscovery: DoctorBinaryDiscovery;
|
|
28620
28858
|
/** Whether `agent-shim shim enable` has been run, and whether its recorded target still exists on disk — pre-resolved by the wiring layer, since checking a file's existence is real I/O, not a parse-shaped pure operation. */
|
|
28621
28859
|
readonly claudeShim: {
|
|
28622
28860
|
readonly state: ClaudeShimState | undefined;
|
|
28623
|
-
readonly targetExists: boolean;
|
|
28861
|
+
readonly targetExists: boolean; /** Why the shim record cannot be used, when it exists and cannot be read or parsed. */
|
|
28862
|
+
readonly problem?: string;
|
|
28624
28863
|
};
|
|
28625
28864
|
/** Which executables a bare `agent-shim` (and, when the shim is enabled, a bare `claude`) would actually run — pre-resolved by the wiring layer, since scanning PATH is real I/O. */
|
|
28626
28865
|
readonly pathResolution: DoctorPathResolution;
|