claude-use 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 +284 -45
- package/package.json +3 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -297,10 +297,10 @@ declare const LaunchSchema: z.ZodObject<{
|
|
|
297
297
|
}>>;
|
|
298
298
|
layout: z.ZodOptional<z.ZodObject<{
|
|
299
299
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
300
|
-
account: "account";
|
|
301
300
|
identity: "identity";
|
|
302
301
|
model: "model";
|
|
303
302
|
route: "route";
|
|
303
|
+
account: "account";
|
|
304
304
|
provider: "provider";
|
|
305
305
|
version: "version";
|
|
306
306
|
headroom: "headroom";
|
|
@@ -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
|
*/
|
|
@@ -1535,10 +1538,10 @@ declare const ConfigProfileSchema: z.ZodObject<{
|
|
|
1535
1538
|
}>>;
|
|
1536
1539
|
layout: z.ZodOptional<z.ZodObject<{
|
|
1537
1540
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1538
|
-
account: "account";
|
|
1539
1541
|
identity: "identity";
|
|
1540
1542
|
model: "model";
|
|
1541
1543
|
route: "route";
|
|
1544
|
+
account: "account";
|
|
1542
1545
|
provider: "provider";
|
|
1543
1546
|
version: "version";
|
|
1544
1547
|
headroom: "headroom";
|
|
@@ -2385,10 +2388,10 @@ declare const DirectoryRuleSchema: z.ZodObject<{
|
|
|
2385
2388
|
}>>;
|
|
2386
2389
|
layout: z.ZodOptional<z.ZodObject<{
|
|
2387
2390
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
2388
|
-
account: "account";
|
|
2389
2391
|
identity: "identity";
|
|
2390
2392
|
model: "model";
|
|
2391
2393
|
route: "route";
|
|
2394
|
+
account: "account";
|
|
2392
2395
|
provider: "provider";
|
|
2393
2396
|
version: "version";
|
|
2394
2397
|
headroom: "headroom";
|
|
@@ -3161,10 +3164,10 @@ declare const DirectoryRulesSchema: z.ZodObject<{
|
|
|
3161
3164
|
}>>;
|
|
3162
3165
|
layout: z.ZodOptional<z.ZodObject<{
|
|
3163
3166
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3164
|
-
account: "account";
|
|
3165
3167
|
identity: "identity";
|
|
3166
3168
|
model: "model";
|
|
3167
3169
|
route: "route";
|
|
3170
|
+
account: "account";
|
|
3168
3171
|
provider: "provider";
|
|
3169
3172
|
version: "version";
|
|
3170
3173
|
headroom: "headroom";
|
|
@@ -3937,10 +3940,10 @@ declare const PortableConfigSchema: z.ZodObject<{
|
|
|
3937
3940
|
}>>;
|
|
3938
3941
|
layout: z.ZodOptional<z.ZodObject<{
|
|
3939
3942
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3940
|
-
account: "account";
|
|
3941
3943
|
identity: "identity";
|
|
3942
3944
|
model: "model";
|
|
3943
3945
|
route: "route";
|
|
3946
|
+
account: "account";
|
|
3944
3947
|
provider: "provider";
|
|
3945
3948
|
version: "version";
|
|
3946
3949
|
headroom: "headroom";
|
|
@@ -4693,10 +4696,10 @@ declare const GlobalConfigSchema: z.ZodObject<{
|
|
|
4693
4696
|
}>>;
|
|
4694
4697
|
layout: z.ZodOptional<z.ZodObject<{
|
|
4695
4698
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
4696
|
-
account: "account";
|
|
4697
4699
|
identity: "identity";
|
|
4698
4700
|
model: "model";
|
|
4699
4701
|
route: "route";
|
|
4702
|
+
account: "account";
|
|
4700
4703
|
provider: "provider";
|
|
4701
4704
|
version: "version";
|
|
4702
4705
|
headroom: "headroom";
|
|
@@ -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 {
|
|
@@ -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
|
|
|
@@ -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<{
|
|
@@ -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
|
*
|
|
@@ -10413,7 +10437,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
10413
10437
|
kind: zod.ZodLiteral<"profile">;
|
|
10414
10438
|
name: zod.ZodString;
|
|
10415
10439
|
value: zod.ZodObject<{
|
|
10416
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
10417
10440
|
entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
|
|
10418
10441
|
value: zod.ZodBoolean;
|
|
10419
10442
|
when: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -10489,6 +10512,7 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
10489
10512
|
key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
10490
10513
|
}, zod_v4_core.$strip>], "kind">]>;
|
|
10491
10514
|
}, zod_v4_core.$strict>]>>>;
|
|
10515
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
10492
10516
|
models: zod.ZodOptional<zod.ZodObject<{
|
|
10493
10517
|
pickerLabelSpaces: zod.ZodOptional<zod.ZodBoolean>;
|
|
10494
10518
|
virtual: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -10577,10 +10601,10 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
10577
10601
|
}>>;
|
|
10578
10602
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
10579
10603
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
10580
|
-
account: "account";
|
|
10581
10604
|
identity: "identity";
|
|
10582
10605
|
model: "model";
|
|
10583
10606
|
route: "route";
|
|
10607
|
+
account: "account";
|
|
10584
10608
|
provider: "provider";
|
|
10585
10609
|
version: "version";
|
|
10586
10610
|
headroom: "headroom";
|
|
@@ -11137,7 +11161,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
11137
11161
|
kind: zod.ZodLiteral<"profile">;
|
|
11138
11162
|
name: zod.ZodString;
|
|
11139
11163
|
value: zod.ZodObject<{
|
|
11140
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
11141
11164
|
entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
|
|
11142
11165
|
value: zod.ZodBoolean;
|
|
11143
11166
|
when: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -11213,6 +11236,7 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
11213
11236
|
key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
11214
11237
|
}, zod_v4_core.$strip>], "kind">]>;
|
|
11215
11238
|
}, zod_v4_core.$strict>]>>>;
|
|
11239
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
11216
11240
|
models: zod.ZodOptional<zod.ZodObject<{
|
|
11217
11241
|
pickerLabelSpaces: zod.ZodOptional<zod.ZodBoolean>;
|
|
11218
11242
|
virtual: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -11301,10 +11325,10 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
11301
11325
|
}>>;
|
|
11302
11326
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
11303
11327
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
11304
|
-
account: "account";
|
|
11305
11328
|
identity: "identity";
|
|
11306
11329
|
model: "model";
|
|
11307
11330
|
route: "route";
|
|
11331
|
+
account: "account";
|
|
11308
11332
|
provider: "provider";
|
|
11309
11333
|
version: "version";
|
|
11310
11334
|
headroom: "headroom";
|
|
@@ -12501,10 +12525,10 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
12501
12525
|
}>>;
|
|
12502
12526
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
12503
12527
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
12504
|
-
account: "account";
|
|
12505
12528
|
identity: "identity";
|
|
12506
12529
|
model: "model";
|
|
12507
12530
|
route: "route";
|
|
12531
|
+
account: "account";
|
|
12508
12532
|
provider: "provider";
|
|
12509
12533
|
version: "version";
|
|
12510
12534
|
headroom: "headroom";
|
|
@@ -13282,10 +13306,10 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
13282
13306
|
}>>;
|
|
13283
13307
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
13284
13308
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
13285
|
-
account: "account";
|
|
13286
13309
|
identity: "identity";
|
|
13287
13310
|
model: "model";
|
|
13288
13311
|
route: "route";
|
|
13312
|
+
account: "account";
|
|
13289
13313
|
provider: "provider";
|
|
13290
13314
|
version: "version";
|
|
13291
13315
|
headroom: "headroom";
|
|
@@ -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. */
|
|
@@ -14299,10 +14367,10 @@ declare const StatuslineSchema: z.ZodObject<{
|
|
|
14299
14367
|
}>>;
|
|
14300
14368
|
layout: z.ZodOptional<z.ZodObject<{
|
|
14301
14369
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
14302
|
-
account: "account";
|
|
14303
14370
|
identity: "identity";
|
|
14304
14371
|
model: "model";
|
|
14305
14372
|
route: "route";
|
|
14373
|
+
account: "account";
|
|
14306
14374
|
provider: "provider";
|
|
14307
14375
|
version: "version";
|
|
14308
14376
|
headroom: "headroom";
|
|
@@ -15224,10 +15292,10 @@ declare function createLaunchApiRouter(deps: LaunchApiDeps): {
|
|
|
15224
15292
|
}>>;
|
|
15225
15293
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
15226
15294
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
15227
|
-
account: "account";
|
|
15228
15295
|
identity: "identity";
|
|
15229
15296
|
model: "model";
|
|
15230
15297
|
route: "route";
|
|
15298
|
+
account: "account";
|
|
15231
15299
|
provider: "provider";
|
|
15232
15300
|
version: "version";
|
|
15233
15301
|
headroom: "headroom";
|
|
@@ -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: {
|
|
@@ -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<{
|
|
@@ -16971,10 +17053,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
16971
17053
|
}>>;
|
|
16972
17054
|
layout: z.ZodOptional<z.ZodObject<{
|
|
16973
17055
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
16974
|
-
account: "account";
|
|
16975
17056
|
identity: "identity";
|
|
16976
17057
|
model: "model";
|
|
16977
17058
|
route: "route";
|
|
17059
|
+
account: "account";
|
|
16978
17060
|
provider: "provider";
|
|
16979
17061
|
version: "version";
|
|
16980
17062
|
headroom: "headroom";
|
|
@@ -17786,7 +17868,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
17786
17868
|
kind: z.ZodLiteral<"profile">;
|
|
17787
17869
|
name: z.ZodString;
|
|
17788
17870
|
value: z.ZodObject<{
|
|
17789
|
-
description: z.ZodOptional<z.ZodString>;
|
|
17790
17871
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
17791
17872
|
value: z.ZodBoolean;
|
|
17792
17873
|
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -17862,6 +17943,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
17862
17943
|
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
17863
17944
|
}, z.core.$strip>], "kind">]>;
|
|
17864
17945
|
}, z.core.$strict>]>>>;
|
|
17946
|
+
description: z.ZodOptional<z.ZodString>;
|
|
17865
17947
|
models: z.ZodOptional<z.ZodObject<{
|
|
17866
17948
|
pickerLabelSpaces: z.ZodOptional<z.ZodBoolean>;
|
|
17867
17949
|
virtual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -17950,10 +18032,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
17950
18032
|
}>>;
|
|
17951
18033
|
layout: z.ZodOptional<z.ZodObject<{
|
|
17952
18034
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
17953
|
-
account: "account";
|
|
17954
18035
|
identity: "identity";
|
|
17955
18036
|
model: "model";
|
|
17956
18037
|
route: "route";
|
|
18038
|
+
account: "account";
|
|
17957
18039
|
provider: "provider";
|
|
17958
18040
|
version: "version";
|
|
17959
18041
|
headroom: "headroom";
|
|
@@ -18510,7 +18592,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
18510
18592
|
kind: z.ZodLiteral<"profile">;
|
|
18511
18593
|
name: z.ZodString;
|
|
18512
18594
|
value: z.ZodObject<{
|
|
18513
|
-
description: z.ZodOptional<z.ZodString>;
|
|
18514
18595
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
18515
18596
|
value: z.ZodBoolean;
|
|
18516
18597
|
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -18586,6 +18667,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
18586
18667
|
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
18587
18668
|
}, z.core.$strip>], "kind">]>;
|
|
18588
18669
|
}, z.core.$strict>]>>>;
|
|
18670
|
+
description: z.ZodOptional<z.ZodString>;
|
|
18589
18671
|
models: z.ZodOptional<z.ZodObject<{
|
|
18590
18672
|
pickerLabelSpaces: z.ZodOptional<z.ZodBoolean>;
|
|
18591
18673
|
virtual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -18674,10 +18756,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
18674
18756
|
}>>;
|
|
18675
18757
|
layout: z.ZodOptional<z.ZodObject<{
|
|
18676
18758
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
18677
|
-
account: "account";
|
|
18678
18759
|
identity: "identity";
|
|
18679
18760
|
model: "model";
|
|
18680
18761
|
route: "route";
|
|
18762
|
+
account: "account";
|
|
18681
18763
|
provider: "provider";
|
|
18682
18764
|
version: "version";
|
|
18683
18765
|
headroom: "headroom";
|
|
@@ -19874,10 +19956,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
19874
19956
|
}>>;
|
|
19875
19957
|
layout: z.ZodOptional<z.ZodObject<{
|
|
19876
19958
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
19877
|
-
account: "account";
|
|
19878
19959
|
identity: "identity";
|
|
19879
19960
|
model: "model";
|
|
19880
19961
|
route: "route";
|
|
19962
|
+
account: "account";
|
|
19881
19963
|
provider: "provider";
|
|
19882
19964
|
version: "version";
|
|
19883
19965
|
headroom: "headroom";
|
|
@@ -20655,10 +20737,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
20655
20737
|
}>>;
|
|
20656
20738
|
layout: z.ZodOptional<z.ZodObject<{
|
|
20657
20739
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
20658
|
-
account: "account";
|
|
20659
20740
|
identity: "identity";
|
|
20660
20741
|
model: "model";
|
|
20661
20742
|
route: "route";
|
|
20743
|
+
account: "account";
|
|
20662
20744
|
provider: "provider";
|
|
20663
20745
|
version: "version";
|
|
20664
20746
|
headroom: "headroom";
|
|
@@ -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<{
|
|
@@ -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: {
|
|
@@ -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<{
|
|
@@ -22550,7 +22690,6 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
|
|
|
22550
22690
|
kind: z.ZodLiteral<"profile">;
|
|
22551
22691
|
name: z.ZodString;
|
|
22552
22692
|
value: z.ZodObject<{
|
|
22553
|
-
description: z.ZodOptional<z.ZodString>;
|
|
22554
22693
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
22555
22694
|
value: z.ZodBoolean;
|
|
22556
22695
|
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -22626,6 +22765,7 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
|
|
|
22626
22765
|
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
22627
22766
|
}, z.core.$strip>], "kind">]>;
|
|
22628
22767
|
}, z.core.$strict>]>>>;
|
|
22768
|
+
description: z.ZodOptional<z.ZodString>;
|
|
22629
22769
|
models: z.ZodOptional<z.ZodObject<{
|
|
22630
22770
|
pickerLabelSpaces: z.ZodOptional<z.ZodBoolean>;
|
|
22631
22771
|
virtual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -22714,10 +22854,10 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
|
|
|
22714
22854
|
}>>;
|
|
22715
22855
|
layout: z.ZodOptional<z.ZodObject<{
|
|
22716
22856
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
22717
|
-
account: "account";
|
|
22718
22857
|
identity: "identity";
|
|
22719
22858
|
model: "model";
|
|
22720
22859
|
route: "route";
|
|
22860
|
+
account: "account";
|
|
22721
22861
|
provider: "provider";
|
|
22722
22862
|
version: "version";
|
|
22723
22863
|
headroom: "headroom";
|
|
@@ -23276,7 +23416,6 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
|
|
|
23276
23416
|
kind: z.ZodLiteral<"profile">;
|
|
23277
23417
|
name: z.ZodString;
|
|
23278
23418
|
value: z.ZodObject<{
|
|
23279
|
-
description: z.ZodOptional<z.ZodString>;
|
|
23280
23419
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
23281
23420
|
value: z.ZodBoolean;
|
|
23282
23421
|
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -23352,6 +23491,7 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
|
|
|
23352
23491
|
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
23353
23492
|
}, z.core.$strip>], "kind">]>;
|
|
23354
23493
|
}, z.core.$strict>]>>>;
|
|
23494
|
+
description: z.ZodOptional<z.ZodString>;
|
|
23355
23495
|
models: z.ZodOptional<z.ZodObject<{
|
|
23356
23496
|
pickerLabelSpaces: z.ZodOptional<z.ZodBoolean>;
|
|
23357
23497
|
virtual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -23440,10 +23580,10 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
|
|
|
23440
23580
|
}>>;
|
|
23441
23581
|
layout: z.ZodOptional<z.ZodObject<{
|
|
23442
23582
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
23443
|
-
account: "account";
|
|
23444
23583
|
identity: "identity";
|
|
23445
23584
|
model: "model";
|
|
23446
23585
|
route: "route";
|
|
23586
|
+
account: "account";
|
|
23447
23587
|
provider: "provider";
|
|
23448
23588
|
version: "version";
|
|
23449
23589
|
headroom: "headroom";
|
|
@@ -24642,10 +24782,10 @@ declare const ConfigRuleAddOutputSchema: z.ZodObject<{
|
|
|
24642
24782
|
}>>;
|
|
24643
24783
|
layout: z.ZodOptional<z.ZodObject<{
|
|
24644
24784
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
24645
|
-
account: "account";
|
|
24646
24785
|
identity: "identity";
|
|
24647
24786
|
model: "model";
|
|
24648
24787
|
route: "route";
|
|
24788
|
+
account: "account";
|
|
24649
24789
|
provider: "provider";
|
|
24650
24790
|
version: "version";
|
|
24651
24791
|
headroom: "headroom";
|
|
@@ -25425,10 +25565,10 @@ declare const ConfigRuleSetOutputSchema: z.ZodObject<{
|
|
|
25425
25565
|
}>>;
|
|
25426
25566
|
layout: z.ZodOptional<z.ZodObject<{
|
|
25427
25567
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
25428
|
-
account: "account";
|
|
25429
25568
|
identity: "identity";
|
|
25430
25569
|
model: "model";
|
|
25431
25570
|
route: "route";
|
|
25571
|
+
account: "account";
|
|
25432
25572
|
provider: "provider";
|
|
25433
25573
|
version: "version";
|
|
25434
25574
|
headroom: "headroom";
|
|
@@ -26112,10 +26252,10 @@ declare const LaunchResolveOutputSchema: z.ZodObject<{
|
|
|
26112
26252
|
}>>;
|
|
26113
26253
|
layout: z.ZodOptional<z.ZodObject<{
|
|
26114
26254
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
26115
|
-
account: "account";
|
|
26116
26255
|
identity: "identity";
|
|
26117
26256
|
model: "model";
|
|
26118
26257
|
route: "route";
|
|
26258
|
+
account: "account";
|
|
26119
26259
|
provider: "provider";
|
|
26120
26260
|
version: "version";
|
|
26121
26261
|
headroom: "headroom";
|
|
@@ -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;
|