claude-use 14.9.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.
@@ -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 identity name the launch resolved, when it resolved one. */
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 {
@@ -8503,9 +8512,9 @@ declare function createRcClaudeCodeVersions(fanout: RcEventFanout): RcClaudeCode
8503
8512
  * - **A launched session** (one the launcher started with no supervisor, which loads the same control plugin, `supervise/launchControl.ts`): the same plugin, found through the launch's control record by the same `bridge-session` row, in the transcript the plugin itself recorded. Everything the plugin does is the same; what needs the supervisor (resuming on a spent quota, moving to another member) is not there.
8504
8513
  * - **A session on the door's self-hosted surface** that no supervisor owns and no control plugin reaches: the door is the Remote Control service there, so it writes the slash command or the turn into its own conversation as a person's app would and reads the worker's answer off the stream (`rcSelfHostCommands.ts`).
8505
8514
  *
8506
- * Any other session is refused with the reason (one started outside the launcher, with `--native` or `--bare`, or on a version the plugin was not verified on): the door has no in-process channel into it, and on the real service the worker runs a slash command only when a person's app wrote it (it treats every other writer, the door's own `send` among them, as a peer whose message the model reads as text), which the door will not claim to be.
8515
+ * Any other session is refused with the reason (one started outside the launcher, with `--native` or `--bare`, or on a version the gate refuses): the door has no in-process channel into it, and on the real service the worker runs a slash command only when a person's app wrote it (it treats every other writer, the door's own `send` among them, as a peer whose message the model reads as text), which the door will not claim to be.
8507
8516
  *
8508
- * Both routes are verified for exactly the Claude Code versions `RC_SESSION_COMMAND_VERIFIED_VERSIONS` names, read from the running binary itself (the plugin's `$.session.version()`, or the worker's own `system/init`), and every verb refuses a session on any other version, or one whose version is not known.
8517
+ * Both routes are gated on the Claude Code version read from the running binary itself (the plugin's `$.session.version()`, or the worker's own `system/init`) by `claudeCodeVersionGate`: a version on `RC_SESSION_COMMAND_VERIFIED_VERSIONS` proceeds, a patch release of a verified minor proceeds with the gate's warning in the answer's `warnings` (and in the route read's), and every verb refuses a session on any other version, or one whose version is not known.
8509
8518
  */
8510
8519
  /** The arguments the 2.1.319 `/goal` command reads as a request to clear the goal rather than set one, compared case-insensitively; a condition that is one of these words cannot be set through `/goal`, so the set verb refuses it rather than clear the goal by accident. */
8511
8520
  declare const RC_GOAL_CLEAR_WORDS: readonly string[];
@@ -8519,37 +8528,38 @@ declare const RC_SESSION_COMMAND_MAX_WAIT_MS = 2147483647;
8519
8528
  type RcSessionCommandRoute = "supervised" | "launched" | "self-hosted";
8520
8529
  /** One goal as the session reports it. */
8521
8530
  type RcGoal = TranscriptGoal;
8522
- /** What a goal read found: the active goal, or `null` when the session has none. */
8523
- interface RcGoalReport {
8531
+ /** What every verb's answer carries: the route that served it, and `warnings` when the version gate raised any (a session on an unverified patch release of a verified minor), absent otherwise. */
8532
+ interface RcSessionCommandAnswer {
8524
8533
  readonly route: RcSessionCommandRoute;
8534
+ readonly warnings?: readonly string[];
8535
+ }
8536
+ /** What a goal read found: the active goal, or `null` when the session has none. */
8537
+ interface RcGoalReport extends RcSessionCommandAnswer {
8525
8538
  readonly goal: RcGoal | null;
8526
8539
  }
8527
8540
  /** What a goal set did: the condition now set, and the one it replaced, or `null` when none was set. */
8528
- interface RcGoalSetReport {
8529
- readonly route: RcSessionCommandRoute;
8541
+ interface RcGoalSetReport extends RcSessionCommandAnswer {
8530
8542
  readonly condition: string;
8531
8543
  readonly superseded: string | null;
8532
8544
  }
8533
8545
  /** What a goal clear did: the condition it cleared, or `null` when the session had no goal to clear. */
8534
- interface RcGoalClearReport {
8535
- readonly route: RcSessionCommandRoute;
8546
+ interface RcGoalClearReport extends RcSessionCommandAnswer {
8536
8547
  readonly cleared: string | null;
8537
8548
  }
8538
8549
  /** What a completed compaction reported: what triggered it as the session names it, and the token counts before and after when the session recorded them. */
8539
- interface RcCompactReport {
8540
- readonly route: RcSessionCommandRoute;
8550
+ interface RcCompactReport extends RcSessionCommandAnswer {
8541
8551
  readonly trigger: string;
8542
8552
  readonly preTokens?: number;
8543
8553
  readonly postTokens?: number;
8544
8554
  }
8545
8555
  /** What a delivered turn reports: the uuid of the user entry the session recorded for it (the transcript row on the supervised route, the worker's mirrored entry on the self-hosted one). */
8546
- interface RcTurnReport {
8547
- readonly route: RcSessionCommandRoute;
8556
+ interface RcTurnReport extends RcSessionCommandAnswer {
8548
8557
  readonly uuid: string;
8549
8558
  }
8550
- /** Which route the verbs would take for a session now, or why none would: the read a caller makes before offering a person a reply box. */
8559
+ /** Which route the verbs would take for a session now, with the version gate's `warnings` when it raised any, or why none would: the read a caller makes before offering a person a reply box. */
8551
8560
  type RcSessionRoute = {
8552
8561
  readonly route: RcSessionCommandRoute;
8562
+ readonly warnings?: readonly string[];
8553
8563
  } | {
8554
8564
  readonly route: null;
8555
8565
  readonly refused: string;
@@ -8922,6 +8932,7 @@ declare function createRcApiRouter(deps: RcApiDeps): {
8922
8932
  launched: "launched";
8923
8933
  "self-hosted": "self-hosted";
8924
8934
  }>;
8935
+ warnings: zod.ZodOptional<zod.ZodReadonly<zod.ZodArray<zod.ZodString>>>;
8925
8936
  }, zod_v4_core.$strict>, zod.ZodObject<{
8926
8937
  route: zod.ZodNull;
8927
8938
  refused: zod.ZodString;
@@ -9148,6 +9159,7 @@ declare function createRcApiRouter(deps: RcApiDeps): {
9148
9159
  launched: "launched";
9149
9160
  "self-hosted": "self-hosted";
9150
9161
  }>;
9162
+ warnings: zod.ZodOptional<zod.ZodReadonly<zod.ZodArray<zod.ZodString>>>;
9151
9163
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
9152
9164
  goalSet: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
9153
9165
  session: zod.ZodString;
@@ -9162,6 +9174,7 @@ declare function createRcApiRouter(deps: RcApiDeps): {
9162
9174
  launched: "launched";
9163
9175
  "self-hosted": "self-hosted";
9164
9176
  }>;
9177
+ warnings: zod.ZodOptional<zod.ZodReadonly<zod.ZodArray<zod.ZodString>>>;
9165
9178
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
9166
9179
  goalClear: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
9167
9180
  session: zod.ZodString;
@@ -9174,6 +9187,7 @@ declare function createRcApiRouter(deps: RcApiDeps): {
9174
9187
  launched: "launched";
9175
9188
  "self-hosted": "self-hosted";
9176
9189
  }>;
9190
+ warnings: zod.ZodOptional<zod.ZodReadonly<zod.ZodArray<zod.ZodString>>>;
9177
9191
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
9178
9192
  compact: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
9179
9193
  session: zod.ZodString;
@@ -9188,6 +9202,7 @@ declare function createRcApiRouter(deps: RcApiDeps): {
9188
9202
  launched: "launched";
9189
9203
  "self-hosted": "self-hosted";
9190
9204
  }>;
9205
+ warnings: zod.ZodOptional<zod.ZodReadonly<zod.ZodArray<zod.ZodString>>>;
9191
9206
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
9192
9207
  compactWithInstructions: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
9193
9208
  session: zod.ZodString;
@@ -9203,6 +9218,7 @@ declare function createRcApiRouter(deps: RcApiDeps): {
9203
9218
  launched: "launched";
9204
9219
  "self-hosted": "self-hosted";
9205
9220
  }>;
9221
+ warnings: zod.ZodOptional<zod.ZodReadonly<zod.ZodArray<zod.ZodString>>>;
9206
9222
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
9207
9223
  turn: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
9208
9224
  session: zod.ZodString;
@@ -9216,6 +9232,7 @@ declare function createRcApiRouter(deps: RcApiDeps): {
9216
9232
  launched: "launched";
9217
9233
  "self-hosted": "self-hosted";
9218
9234
  }>;
9235
+ warnings: zod.ZodOptional<zod.ZodReadonly<zod.ZodArray<zod.ZodString>>>;
9219
9236
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
9220
9237
  subscribe: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
9221
9238
  session: zod.ZodOptional<zod.ZodString>;
@@ -9692,6 +9709,19 @@ declare const CheckReportJsonSchema: z.ZodObject<{
9692
9709
  ok: z.ZodLiteral<false>;
9693
9710
  message: z.ZodString;
9694
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>]>>;
9695
9725
  }, z.core.$strict>;
9696
9726
  type CheckReportJson = z.output<typeof CheckReportJsonSchema>;
9697
9727
 
@@ -10005,6 +10035,7 @@ declare const DoctorFindingSchema: z.ZodObject<{
10005
10035
  "active-identity": "active-identity";
10006
10036
  headroom: "headroom";
10007
10037
  models: "models";
10038
+ "route-overrides": "route-overrides";
10008
10039
  }>;
10009
10040
  subject: z.ZodOptional<z.ZodString>;
10010
10041
  severity: z.ZodEnum<{
@@ -10038,6 +10069,7 @@ declare const DoctorRunOutputSchema: z.ZodObject<{
10038
10069
  "active-identity": "active-identity";
10039
10070
  headroom: "headroom";
10040
10071
  models: "models";
10072
+ "route-overrides": "route-overrides";
10041
10073
  }>;
10042
10074
  subject: z.ZodOptional<z.ZodString>;
10043
10075
  severity: z.ZodEnum<{
@@ -10179,7 +10211,7 @@ type CodexApiRouter = ReturnType<typeof createCodexApiRouter>;
10179
10211
  type CodexApiClient = RouterClient<CodexApiRouter>;
10180
10212
 
10181
10213
  /**
10182
- * 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.
10183
10215
  *
10184
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.
10185
10217
  *
@@ -13891,6 +13923,50 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
13891
13923
  name: zod.ZodString;
13892
13924
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
13893
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
+ };
13894
13970
  };
13895
13971
  };
13896
13972
  /** The configuration router, as the merged mount's and the client's own types are derived from it. */
@@ -14863,6 +14939,26 @@ interface SupervisedLaunch {
14863
14939
  readonly settingsFile?: string;
14864
14940
  }
14865
14941
 
14942
+ /** The Claude Code versions the control plugin and the door's goal, compaction and turn routes were verified on end to end (`docs/rc-slash-commands.md`). A version on the list is gated through silently; how every other version is gated is `claudeCodeVersionGate`'s decision. */
14943
+ declare const RC_SESSION_COMMAND_VERIFIED_VERSIONS: readonly string[];
14944
+ /**
14945
+ * How the goal, compaction and turn verbs and an unsupervised launch's control plugin treat one Claude Code version:
14946
+ *
14947
+ * - `verified`: the version is on `RC_SESSION_COMMAND_VERIFIED_VERSIONS`, and everything proceeds with no warning.
14948
+ * - `unverified-patch`: the version is not on the list but shares its major and minor with a version that is (a patch release of a verified minor), and everything proceeds carrying `warning`, which names the version and says it has not been verified.
14949
+ * - `refused`: any other version, one that is not a plain release version, or none known; nothing proceeds.
14950
+ */
14951
+ type ClaudeCodeVersionGate = {
14952
+ readonly kind: "verified";
14953
+ } | {
14954
+ readonly kind: "unverified-patch";
14955
+ readonly warning: string;
14956
+ } | {
14957
+ readonly kind: "refused";
14958
+ };
14959
+ /** The one decision every gate site takes on a running Claude Code version (`ClaudeCodeVersionGate`); `version` is undefined when the running binary has not reported one. */
14960
+ declare function claudeCodeVersionGate(version: string | undefined): ClaudeCodeVersionGate;
14961
+
14866
14962
  /** One staged control plugin as a launch uses it: the arguments that load it, and what removes it and its record. */
14867
14963
  interface StagedLaunchControl {
14868
14964
  readonly args: (args: readonly string[]) => readonly string[];
@@ -14998,7 +15094,7 @@ interface PrepareLaunchParams {
14998
15094
  readonly hasStoredLogin?: (identity: string) => boolean;
14999
15095
  /** Whether Claude Code can authenticate with the login an identity has stored, asked only for an identity that has one (`claudeBin` is the binary the launch would run). Undefined when it cannot be determined, and then the stored login is assumed good. Absent when the caller cannot ask. */
15000
15096
  readonly hasUsableLogin?: (identity: string, claudeBin: string) => boolean | undefined;
15001
- /** Stages the in-process control plugin for an unsupervised launch that loads one (`launchLoadsControlPlugin`) and records where it listens for the front door (`supervise/launchControl.ts`). Absent when the caller cannot stage it, and then no launch loads it. */
15097
+ /** Stages the in-process control plugin for an unsupervised launch that loads one (`launchControlPluginGate`) and records where it listens for the front door (`supervise/launchControl.ts`). Absent when the caller cannot stage it, and then no launch loads it. */
15002
15098
  readonly stageControlPlugin?: () => StagedLaunchControl;
15003
15099
  }
15004
15100
  /** Inputs to `runLauncher`: a launch's inputs plus the port that spawns the child. */
@@ -16665,6 +16761,19 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
16665
16761
  ok: z.ZodLiteral<false>;
16666
16762
  message: z.ZodString;
16667
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>]>>;
16668
16777
  }, z.core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
16669
16778
  };
16670
16779
  doctor: {
@@ -16691,6 +16800,7 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
16691
16800
  "active-identity": "active-identity";
16692
16801
  headroom: "headroom";
16693
16802
  models: "models";
16803
+ "route-overrides": "route-overrides";
16694
16804
  }>;
16695
16805
  subject: z.ZodOptional<z.ZodString>;
16696
16806
  severity: z.ZodEnum<{
@@ -21244,6 +21354,50 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
21244
21354
  name: z.ZodString;
21245
21355
  }, z.core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
21246
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
+ };
21247
21401
  };
21248
21402
  update: {
21249
21403
  check: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, InitialInputSchema, z.ZodObject<{
@@ -21763,6 +21917,19 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
21763
21917
  ok: z.ZodLiteral<false>;
21764
21918
  message: z.ZodString;
21765
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>]>>;
21766
21933
  }, z.core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
21767
21934
  };
21768
21935
  doctor: {
@@ -21789,6 +21956,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
21789
21956
  "active-identity": "active-identity";
21790
21957
  headroom: "headroom";
21791
21958
  models: "models";
21959
+ "route-overrides": "route-overrides";
21792
21960
  }>;
21793
21961
  subject: z.ZodOptional<z.ZodString>;
21794
21962
  severity: z.ZodEnum<{
@@ -21933,6 +22101,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
21933
22101
  launched: "launched";
21934
22102
  "self-hosted": "self-hosted";
21935
22103
  }>;
22104
+ warnings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
21936
22105
  }, z.core.$strict>, z.ZodObject<{
21937
22106
  route: z.ZodNull;
21938
22107
  refused: z.ZodString;
@@ -22159,6 +22328,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
22159
22328
  launched: "launched";
22160
22329
  "self-hosted": "self-hosted";
22161
22330
  }>;
22331
+ warnings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
22162
22332
  }, z.core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
22163
22333
  goalSet: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, z.ZodObject<{
22164
22334
  session: z.ZodString;
@@ -22173,6 +22343,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
22173
22343
  launched: "launched";
22174
22344
  "self-hosted": "self-hosted";
22175
22345
  }>;
22346
+ warnings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
22176
22347
  }, z.core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
22177
22348
  goalClear: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, z.ZodObject<{
22178
22349
  session: z.ZodString;
@@ -22185,6 +22356,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
22185
22356
  launched: "launched";
22186
22357
  "self-hosted": "self-hosted";
22187
22358
  }>;
22359
+ warnings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
22188
22360
  }, z.core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
22189
22361
  compact: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, z.ZodObject<{
22190
22362
  session: z.ZodString;
@@ -22199,6 +22371,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
22199
22371
  launched: "launched";
22200
22372
  "self-hosted": "self-hosted";
22201
22373
  }>;
22374
+ warnings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
22202
22375
  }, z.core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
22203
22376
  compactWithInstructions: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, z.ZodObject<{
22204
22377
  session: z.ZodString;
@@ -22214,6 +22387,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
22214
22387
  launched: "launched";
22215
22388
  "self-hosted": "self-hosted";
22216
22389
  }>;
22390
+ warnings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
22217
22391
  }, z.core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
22218
22392
  turn: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, z.ZodObject<{
22219
22393
  session: z.ZodString;
@@ -22227,6 +22401,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
22227
22401
  launched: "launched";
22228
22402
  "self-hosted": "self-hosted";
22229
22403
  }>;
22404
+ warnings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
22230
22405
  }, z.core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
22231
22406
  subscribe: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, z.ZodObject<{
22232
22407
  session: z.ZodOptional<z.ZodString>;
@@ -26718,9 +26893,6 @@ declare function createQuotaExpiringPublisher(hub: DoorEventHub, deps: {
26718
26893
  readonly nameOf: (id: string) => string | undefined;
26719
26894
  }): QuotaExpiringPublisher;
26720
26895
 
26721
- /** The Claude Code versions the control plugin and the door's goal, compaction and turn routes were verified on end to end (`docs/rc-slash-commands.md`): an unsupervised launch of any other version loads no control plugin, and the door refuses a session reporting any other version. */
26722
- declare const RC_SESSION_COMMAND_VERIFIED_VERSIONS: readonly string[];
26723
-
26724
26896
  /**
26725
26897
  * The rate-limit facts one client read stream event carries, or undefined when the event is not a `rate_limit_event` this module can read: a payload of another type, a payload without the family's own one required field, or one whose `rate_limit_info` does not parse. An envelope the door cannot read is one it knows nothing about, never a failure, exactly as the stream's own parser treats an envelope it cannot read. Exported because the renderers (`frontdoor rc watch`, the web client's twin) narrow the same payload through the same one definition.
26726
26898
  */
@@ -27424,6 +27596,8 @@ interface RealMemberProviderParams {
27424
27596
  readonly cliFlagConfigProfile?: string;
27425
27597
  /** The cascade of `cwd`, when the caller has already loaded it. */
27426
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;
27427
27601
  }
27428
27602
  /**
27429
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.
@@ -27678,7 +27852,7 @@ interface RunSupervisorOptions {
27678
27852
  *
27679
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.
27680
27854
  */
27681
- declare function runSupervisor(initialConfig: HeadroomSupervisorConfig, ports: SupervisorPorts, options?: RunSupervisorOptions): Promise<number>;
27855
+ declare function runSupervisor(initialConfig: HeadroomSupervisorConfig, givenPorts: SupervisorPorts, options?: RunSupervisorOptions): Promise<number>;
27682
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. */
27683
27857
  interface UndeterminedFrontDoor {
27684
27858
  readonly pid: number;
@@ -27994,7 +28168,7 @@ interface ProviderListEntry {
27994
28168
  readonly name: string;
27995
28169
  readonly provider: Provider;
27996
28170
  }
27997
- /** Lists every provider under `providersDir` that has a valid `<name>.json`. A file that fails validation or is not JSON is skipped here and reported through `onInvalid` (standard error by default); `provider list` is the place a broken definition gets surfaced, not a launch. */
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`). */
27998
28172
  declare function listProviders(paths: LayoutPaths, onInvalid?: (name: string, message: string) => void): readonly ProviderListEntry[];
27999
28173
  /** The credential targets a provider may use. */
28000
28174
  type ProviderCredentialTarget = (typeof PROVIDER_CREDENTIAL_TARGETS)[number];
@@ -28138,6 +28312,33 @@ declare function updateDirectoryRule(paths: LayoutPaths, rulePath: string, optio
28138
28312
  /** Removes the directory rule for `rulePath`. Throws `DirectoryRuleNotFoundError` when no rule matches that exact path. */
28139
28313
  declare function removeDirectoryRule(paths: LayoutPaths, rulePath: string): void;
28140
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
+
28141
28342
  type CodexCredentialGuardResult = {
28142
28343
  readonly ok: true;
28143
28344
  } | {
@@ -28255,6 +28456,8 @@ interface RunCheckParams {
28255
28456
  readonly credentialCache?: CredentialCacheEnv;
28256
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. */
28257
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;
28258
28461
  }
28259
28462
  /** Whether the selected http provider's base URL accepted a connection, as `check` reports it. */
28260
28463
  type ProviderReachabilityReport = {
@@ -28285,6 +28488,12 @@ interface CheckReport {
28285
28488
  readonly claudeVersion?: ClaudeVersionReport;
28286
28489
  /** Whether the selected provider's base URL accepts a connection, when an http provider is selected and a probe was given. */
28287
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
+ };
28288
28497
  }
28289
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. */
28290
28499
  interface ClaudeVersionReport {
@@ -28307,7 +28516,7 @@ declare function formatCheckReport(report: CheckReport): string[];
28307
28516
  */
28308
28517
  declare function checkReportToJson(report: CheckReport): CheckReportJson;
28309
28518
  /**
28310
- * Whether a report carries anything `check --strict` fails on: a resolver diagnostic of warning or error severity, an ambiguous `history/projects/` encoding, an ambient credential a launch would refuse, a selected provider a launch could not use, or one whose base URL accepts no connection. Informational diagnostics and the settings-exposure advisory (names and counts only, for a person to review) never fail it.
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.
28311
28520
  */
28312
28521
  declare function checkReportHasWarnings(report: CheckReport): boolean;
28313
28522
  /** What `collectCheckReport` needs from its caller. */
@@ -28389,6 +28598,62 @@ interface DoctorFarmLinksInput {
28389
28598
  readonly dangling: readonly DanglingFarmLink[];
28390
28599
  }
28391
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
+
28392
28657
  /**
28393
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.
28394
28659
  */
@@ -28463,17 +28728,9 @@ interface RenameJournalListing {
28463
28728
  readonly unreadable: readonly UnreadableRenameJournal[];
28464
28729
  }
28465
28730
 
28466
- /**
28467
- * 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`.
28468
- *
28469
- * 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.
28470
- */
28471
- declare const ProviderAliasesSchema: z.ZodRecord<z.ZodString, z.ZodString>;
28472
- type ProviderAliases = z.infer<typeof ProviderAliasesSchema>;
28473
-
28474
28731
  declare const DOCTOR_SEVERITIES: readonly ["pass", "warn", "fail"];
28475
28732
  type DoctorSeverity = (typeof DOCTOR_SEVERITIES)[number];
28476
- 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"];
28477
28734
  type DoctorSection = (typeof DOCTOR_SECTIONS)[number];
28478
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. */
28479
28736
  interface DoctorFinding {
@@ -28495,6 +28752,8 @@ interface DoctorIdentityInput {
28495
28752
  readonly id: string;
28496
28753
  readonly path: string;
28497
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;
28498
28757
  /** The identity's own farm root (`identitiesDir/<id>`): the account name the Keychain lookup uses. */
28499
28758
  readonly farmRoot: string;
28500
28759
  /** Whether the identity's `.credentials.json` exists, pre-resolved by the wiring layer since it is a file-existence check. */
@@ -28507,17 +28766,23 @@ interface DoctorConfigProfileInput {
28507
28766
  readonly name: string;
28508
28767
  readonly path: string;
28509
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;
28510
28771
  }
28511
28772
  /** One provider's raw `<name>.json`, unparsed. */
28512
28773
  interface DoctorProviderInput {
28513
28774
  readonly name: string;
28514
28775
  readonly path: string;
28515
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;
28516
28779
  }
28517
28780
  /** A single optional top-level file `runDoctor` validates against a schema when present — absent is a legitimate, unconfigured state, not a failure. */
28518
28781
  interface DoctorFileInput {
28519
28782
  readonly path: string;
28520
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;
28521
28786
  }
28522
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. */
28523
28788
  type DoctorBinaryDiscovery = {
@@ -28548,6 +28813,7 @@ interface RunDoctorParams {
28548
28813
  readonly chatgptSignIn?: {
28549
28814
  readonly path: string;
28550
28815
  readonly raw: string | undefined;
28816
+ readonly unreadable?: string;
28551
28817
  };
28552
28818
  readonly identities: readonly DoctorIdentityInput[];
28553
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. */
@@ -28556,8 +28822,8 @@ interface RunDoctorParams {
28556
28822
  readonly usageSnapshots?: Readonly<Record<string, UsageSnapshot>>;
28557
28823
  readonly configProfiles: readonly DoctorConfigProfileInput[];
28558
28824
  readonly providers: readonly DoctorProviderInput[];
28559
- /** The recorded former names of renamed providers. Omit to leave them out of the findings. */
28560
- readonly providerAliases?: 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;
28561
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. */
28562
28828
  readonly probeBaseUrls?: BaseUrlBatchProbe;
28563
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. */
@@ -28582,13 +28848,18 @@ interface RunDoctorParams {
28582
28848
  readonly models?: ModelsConfig;
28583
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. */
28584
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;
28585
28855
  readonly categoriesLocal: DoctorFileInput;
28586
28856
  readonly activeIdentity: DoctorFileInput;
28587
28857
  readonly binaryDiscovery: DoctorBinaryDiscovery;
28588
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. */
28589
28859
  readonly claudeShim: {
28590
28860
  readonly state: ClaudeShimState | undefined;
28591
- 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;
28592
28863
  };
28593
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. */
28594
28865
  readonly pathResolution: DoctorPathResolution;
@@ -28795,5 +29066,5 @@ declare const OWN_CLI_FILE_NAME = "cli.cjs";
28795
29066
  */
28796
29067
  declare function agentShimCliPath(distDir?: string | undefined): string;
28797
29068
 
28798
- export { AMBIENT_CREDENTIAL_VARS, AgentKindSchema, AgentMetaSchema, AgentNodeSchema, AgentTreesListInputSchema, AgentTreesListOutputSchema, AgentTreesShowInputSchema, AgentTreesShowOutputSchema, CHECK_CREDENTIAL_APPLIES, CODEX_APP_SERVER_GENERATED_AGAINST, CODEX_APP_SERVER_TIMEOUT_MS, CONNECT_INTERCEPT_HOST, CONNECT_INTERCEPT_HOSTS, CONNECT_LIMITS, CONTROL_PATH_PREFIX, CategoryClassificationOverlaySchema, CategoryClassificationSchema, CategoryMapSchema, CheckReportJsonSchema, CheckRunInputSchema, CliError, CodexAccountReadSchema, CodexAppServerProtocolError, CodexAppServerRequestError, CodexAppServerUnavailableError, CodexLogoutOutputSchema, CodexRateLimitsReadSchema, CodexSignInSchema, CodexStatusOutputSchema, ConfigIdentityAddInputSchema, ConfigIdentityAddOutputSchema, ConfigIdentityRemoveInputSchema, ConfigIdentityRemoveOutputSchema, ConfigIdentitySetInputSchema, ConfigIdentitySetOutputSchema, ConfigIdentityUseOutputSchema, ConfigNameInputSchema, ConfigPoolAddInputSchema, ConfigPoolAddOutputSchema, ConfigPoolRemoveInputSchema, ConfigPoolRemoveOutputSchema, ConfigPoolSetInputSchema, ConfigPoolSetOutputSchema, ConfigPoolUseOutputSchema, ConfigProfileAddInputSchema, ConfigProfileAddOutputSchema, ConfigProfileRemoveInputSchema, ConfigProfileRemoveOutputSchema, ConfigProfileSchema, ConfigProfileSetInputSchema, ConfigProfileSetOutputSchema, ConfigProfileUseOutputSchema, ConfigProviderAddInputSchema, ConfigProviderAddOutputSchema, ConfigProviderRemoveInputSchema, ConfigProviderRemoveOutputSchema, ConfigProviderSetInputSchema, ConfigProviderSetOutputSchema, ConfigRuleAddInputSchema, ConfigRuleAddOutputSchema, ConfigRuleRemoveInputSchema, ConfigRuleRemoveOutputSchema, ConfigRuleSetInputSchema, ConfigRuleSetOutputSchema, CredentialCacheSchema, CredentialSchema, CredentialSourceSchema, CredentialSummarySchema, DOOR_EVENT_BUFFER_EVENTS, DOOR_EVENT_SOURCE_RC, DOOR_HEALTH_EVENT_SOURCE, DirectoryRuleAlreadyExistsError, DirectoryRuleMissingTargetError, DirectoryRuleNotFoundError, DirectoryRuleSchema, DirectoryRulesSchema, DoctorFindingSchema, DoctorRunOutputSchema, DoorEventSchema, DoorEventSourceQuerySchema, DoorHealthEventSchema, DuplicateIdentityNameError, EXIT_FAILURE, EXIT_USAGE, EffectiveWindowSchema, EntryValueSchema, FARM_MANIFEST_FILENAME, FrontDoorControlMaterialError, FrontDoorNotServingError, FrontDoorRestartOutputSchema, FrontDoorSessionStatusSchema, FrontDoorSessionsOutputSchema, FrontDoorStartError, FrontDoorStateSchema, FrontDoorStatusOutputSchema, GlobalConfigSchema, HeadroomSocketTargetSchema, HeadroomStartError, IdentityAlreadyExistsError, IdentityNotFoundError, IdentitySchema, InvalidCategoryNameError, InvalidIdentityNameError, InvalidProviderNameError, LAUNCH_EVENT_SOURCE, LIVE_TASK_CAP, LaunchLifecycleEventSchema, LaunchRefusedError, LaunchResolveInputSchema, LaunchResolveOutputSchema, LegacyProviderFileError, LiveTaskSchema, MergedAgentNodeSchema, MergedAgentTreeSchema, OWN_CLI_FILE_NAME, PROMPT_CACHE_TTL_MS, PlanClassSchema, PoolGraphError, PoolNameSchema, PoolNotFoundError, PoolPickReportSchema, PoolSchema, PortableConfigSchema, ProfileAlreadyExistsError, ProfileNotFoundError, ProviderAlreadyExistsError, ProviderKindMismatchError, ProviderNotFoundError, ProviderSchema, QUOTA_EXPIRING_EVENT_SOURCE, QuotaExpiringEventSchema, RC_CONTEXT_USAGE_DETAILS, RC_GOAL_CLEAR_WORDS, RC_GOAL_CONDITION_MAX_CHARS, RC_IDLE_EXPIRY_MS, RC_ORPC_PATH_PREFIX, RC_PENDING_RETIRE_REASONS, RC_PERMISSION_MODES, RC_READ_FILE_ENCODINGS, RC_REQUEST_PARSE_CAP_BYTES, RC_SELF_HOST_ENV, RC_SELF_HOST_KEEPALIVE_MS, RC_SELF_HOST_RECORD_DIR, RC_SELF_HOST_RECORD_FILE, RC_SELF_HOST_RETENTION_MS, RC_SELF_HOST_SCOPE_LIST, RC_SELF_HOST_WORKER_JWT_TTL_SECONDS, RC_SESSIONS_PATH_PREFIX, RC_SESSION_COMMAND_MAX_WAIT_MS, RC_SESSION_COMMAND_VERIFIED_VERSIONS, RC_SESSION_END_REASONS, RC_SESSION_EVENT_LOG_CAPACITY, RC_STREAM_BACKOFF_MS, RC_WEB_FETCH_ALLOW_PRIVATE_ENV, RC_WEB_FETCH_DEADLINE_MS, RC_WEB_FETCH_MAX_BYTES, RC_WEB_FETCH_MAX_REDIRECTS, ROUTED_PATH_PREFIX, RcLiveRateLimitSchema, RcPermissionModeSchema, RcRateLimitInfoSchema, RcRateLimitWindowSchema, RcSessionEventCursorExpiredError, RcSessionEventSchema, RcSessionEventsPageInputSchema, RcSessionEventsReadInputSchema, RcSessionEventsReadOutputSchema, RcSessionEventsStreamInputSchema, RcSessionTransitionSchema, RcStreamEnvelopeSchema, RcStreamEventSchema, ResetRowSchema, ResetScheduleSchema, SessionAgentTreeSchema, SessionLookupError, SessionSummarySchema, TaskItemSchema, USAGE_EVENT_SOURCE, UpdateCheckOutputSchema, UsageChangeEventSchema, UsageError, UsageListOutputSchema, UsageLiveOutputSchema, UsageSnapshotError, UsageSnapshotSchema, UsageWindowsInputSchema, UsageWindowsOutputSchema, WhenSchema, WorkflowRunSchema, addDirectoryRule, addIdentity, addPool, addProvider, agentShimCliPath, answerRcControlRequest, applyAgentTaskEvent, authenticateRcSessionMcpServer, buildEntryFacts, buildLayoutPaths, buildRcControlRequestPayload, buildRcControlResponsePayload, buildRcEndSessionPayload, buildRcEventWriteBody, buildRcFileSuggestionsPayload, buildRcGetContextUsagePayload, buildRcGetUsagePayload, buildRcInterruptPayload, buildRcKeepAlivePayload, buildRcMarkReadBody, buildRcMcpAuthenticatePayload, buildRcMcpOAuthCallbackUrlPayload, buildRcMcpReconnectPayload, buildRcMcpStatusPayload, buildRcReadFilePayload, buildRcSetModelPayload, buildRcSetPermissionModePayload, buildRcUserMessagePayload, carryOver, changePool, checkReportHasWarnings, checkReportToJson, collectCheckReport, collectDoctorReport, collectFrontDoorStatus, collectPoolPick, collectResets, collectSessionList, createAgentTreesApiRouter, createCodexApiRouter, createConfigApiRouter, createControlApiRouter, createDoorApiNodeHandler, createDoorApiRouter, createDoorEventHub, createDoorHealthPublisher, createEventsApiRouter, createLaunchApiRouter, createLaunchEventPublisher, createLeafCache, createLifecycleApiRouter, createLiveSessionRegistry, createProfile, createQuotaExpiringPublisher, createRcApiNodeHandler, createRcApiRouter, createRcClaudeCodeVersions, createRcControlHandler, createRcCredentialStore, createRcEventFanout, createRcLiveUsage, createRcSelfHostSurface, createRcSessionCommands, createRcSessionEventLog, createRcSessionEventsApiRouter, createRcSessionRegistryReader, createRcSessionTracker, createRcStreamHub, createSseParser, describeProviderEndpoint, detectAmbientCredential, doorApiAuth, doorApiNodeHandlerOf, effectiveWindow, endRcSession, ensureCa, ensureFrontDoor, ensureHeadroom, evaluateAmbientCredentialGuard, evaluateWhen, fetchThroughWebProxy, followRcSessionEvents, formatAmbientCredentialGuardMessage, formatCheckReport, formatDoctorReport, formatFrontDoorStatus, forwardableHeaders, frontDoorApiClient, frontDoorApiFromState, frontDoorApiLink, frontDoorRcApiClient, frontDoorRcControl, generateCa, getRcSessionContextUsage, getRcSessionMcpStatus, getRcSessionUsage, headroomSocketTarget, identityExists, identityIdOf, identityNameOf, identityRecords, injectRcUserMessage, interruptRcSession, isIdentityDirectoryName, isInterceptedHost, isPrivateAddress, isRcContextUsageDetail, isRcPermissionMode, isRcReadFileEncoding, lateRcEventDial, lateRcStreamDial, launchRequiredUpstreams, listDirectoryRules, listIdentities, listProfiles, listProviders, listSessions, listUsageSnapshots, locateSession, matchBranch, mergeLiveTasks, mintLeaf, mintRcSelfHostCredential, observingRoutedRoute, parseConnectTarget, parseRcGoalOutput, parseRcStreamEnvelope, planOf, poolIdentities, poolSelectedByLaunch, prepareClaudeLaunch, prepareLaunch, profileExists, providerExists, rankPool, rcEventWriteResultFromAnswer, rcFanoutOnDoorHub, rcLocalCommandAnswerOf, rcManualCompactBoundaryOf, rcObserverAsPassthrough, rcRateLimitInfoOf, rcSelfHostFromEnv, rcStatusWithRegistry, rcWebFetchAllowsPrivateFromEnv, readActiveIdentity, readCodexAccount, readCodexRateLimits, readDirectoryRules, readFarmManifest, readFrontDoorControlMaterial, readGlobalConfig, readIdentity, readIdentityById, readIdentityRecords, readPools, readProfile, readProvider, readRcSelfHostRecord, readRcSessionFile, readSessionAgentTree, readUsageSnapshot, realCodexAppServerPort, realConnectCertStore, realConnectEffects, realMemberProviderResolver, realRcControlTransport, realRcEventDial, realRcStreamDial, realRcWebFetch, realSessionFs, reconnectRcSessionMcpServer, recoverFarm, recoveryDiagnostics, refreshLaunchPoolUsage, refreshPoolUsage, refreshStalePoolMembers, removeDirectoryRule, removeIdentity, removePool, removeProfile, removeProvider, requirePool, resolveAgentShimHome, resolveClaudeHome, resolveClaudeLaunch, resolveDecisions, resolveLaunch, resolveLaunchSelection, resolveLayoutPaths, resolveSupervisorConfig, resyncFarm, runCheck, runClaudeLaunch, runDoctor, runFrontDoorSupervisor, runLaunchPlan, runLauncher, runSupervisor, sendRcKeepAlive, servedByPipeline, setAllowAmbientCredential, setDefaultConfigProfile, setGlobalDefaultProfile, setIdentityCredential, setProfileCategories, setProfileEntries, setProfileLaunchFlags, setProfileMetadata, setRcSessionModel, setRcSessionPermissionMode, showSession, snapshotPath, spawnClaude, startConnectServer, submitRcSessionMcpOAuthCallbackUrl, suggestRcSessionFiles, summariseSession, teleportRcSession, topLevelNames, updateDirectoryRule, updateProvider, useIdentity, watchedInstallEntry, withRegisteredSessionFacts, writeDirectoryRules };
28799
- export type { AddDirectoryRuleOptions, AddProviderInput, AgentKind, AgentNode, AgentReadFs, AgentTreesApiDeps, AgentTreesApiRouter, AmbientCredentialDetection, AmbientCredentialGuardResult, AmbientCredentialVar, AnthropicUsageRefresher, BuildEntryFactsParams, CaMaterial, Candidate, CarryOverParams, CarryOverResult, CategoryMap, CheckReport, CheckReportJson, ClaudeLaunchPlan, ClaudeLaunchResolution, CodexAccountRead, CodexApiClient, CodexApiDeps, CodexApiRouter, CodexAppServerConnection, CodexAppServerPort, CodexAppServerReadOptions, CodexRateLimitsRead, CollectCheckReportParams, CollectDoctorReportParams, CompiledRule, ConditionContext, ConfigApiDeps, ConfigApiRouter, ConfigProfile, ConnectCertStore, ConnectEffects, ConnectLimits, ConnectLocalSurface, ConnectServerConfig, ConnectServerHandle, ConnectTarget, ControlApiClient, ControlApiDeps, ControlApiRouter, Credential, CredentialSource, Decision, Diagnostic, DirectoryRule, DirectoryRules, DoctorReport, DoorApiClient, DoorApiContext, DoorApiDeps, DoorApiRouter, DoorEvent, DoorEventHub, DoorEventPublisher, DoorEventStream, DoorEventsApiDeps, DoorHealthEvent, DoorHealthPublisher, EffectiveWindow, EliminatedRule, EnsureFrontDoorPorts, EnsureHeadroomPorts, EntryFact, EntryFacts, EntryValue, EvaluateAmbientCredentialGuardParams, FlattenedCascade, FrontDoorControlMaterial, FrontDoorRcControl, FrontDoorSessionStatus, FrontDoorStatus, FrontDoorSupervisorPorts, GlobalConfig, HeadroomSupervisorConfig, Identity, IdentityCredentialChange, IdentityListEntry, IdentityListing, IdentityNameRead, IdentityRecord, IdentityRecordsPort, IdentitySession, InjectedCredential, LaunchApiDeps, LaunchApiRouter, LaunchDecision, LaunchEventPublisher, LaunchLifecycleEvent, LaunchPlan, LaunchPoolDecision, LaunchResolution, LaunchSelection, Layer, LayerId, LayoutPaths, LeafCert, LifecycleApiClient, LifecycleApiDeps, LifecycleApiRouter, LiveSessionRegistry, LiveSessionRegistryPorts, LiveTask, LiveTaskBook, LocatedSession, MergedAgentNode, MergedAgentTree, NestedContribution, OwnExecutableStat, PlanClass, Pool, PoolChange, PoolMember, PoolPickReport, PoolPolicy, PoolRanking, PortableConfig, PrepareClaudeLaunchOptions, PrepareLaunchParams, ProfileListEntry, Provider, ProviderListEntry, ProviderOf, QuotaExpiringEvent, QuotaExpiringPublisher, RankPoolInput, RcAnswerDecision, RcAnswerDeps, RcApiClient, RcApiDeps, RcApiRouter, RcClaudeCodeVersions, RcCompactOptions, RcCompactReport, RcContextUsageDetail, RcControlAnswer, RcControlHandlerDeps, RcControlRequestDeps, RcControlTransport, RcCredentialStore, RcDialAnswer, RcDialTarget, RcEventDial, RcEventFanout, RcEventWriteResult, RcExchangeObserver, RcGoal, RcGoalClearReport, RcGoalReport, RcGoalSetReport, RcInjectDeps, RcLiveRateLimit, RcLiveUsage, RcLiveUsageDeps, RcObservedCredential, RcObservedRequest, RcPendingQuestion, RcPendingRequestSummary, RcPendingRetireReason, RcPermissionMode, RcPresenceAnswer, RcQuestionOption, RcQuestionSelection, RcRateLimitInfo, RcRateLimitWindow, RcReadFileEncoding, RcReadFileOptions, RcRefusalKind, RcRegisteredSession, RcRegistryIdentity, RcSelfHostCredentialRecord, RcSelfHostDeps, RcSelfHostMintResult, RcSelfHostSurface, RcSessionCommandDeps, RcSessionCommandOptions, RcSessionCommandResult, RcSessionCommandRoute, RcSessionCommands, RcSessionEndReason, RcSessionEvent, RcSessionEventLog, RcSessionEventLogDeps, RcSessionEventsApiDeps, RcSessionEventsApiRouter, RcSessionEventsRead, RcSessionEventsReadInput, RcSessionRegistryDeps, RcSessionRegistryFs, RcSessionRoute, RcSessionStatus, RcSessionSummary, RcSessionTracker, RcSessionTrackerDeps, RcSessionTransition, RcStreamAnswer, RcStreamDial, RcStreamEnvelope, RcStreamEvent, RcStreamHub, RcStreamHubDeps, RcSupervisedTarget, RcTurnReport, RcWebFetchDeps, RcWebFetchHop, RcWebFetchOutcome, RcWebFetcher, RcWorkerFact, RcWriteHeaders, ReadSessionOptions, RealMemberProviderParams, RecoverFarmParams, RecoveryResult, RefreshLaunchPoolUsageOptions, RefreshPoolUsageParams, RefreshStalePoolMembersParams, ResetRow, ResetSchedule, ResolveClaudeLaunchOptions, ResolveDecisionsInput, ResolveLaunchSelectionParams, ResolvedState, ResyncFarmParams, ResyncFarmResult, RunCheckParams, RunClaudeLaunchOptions, RunDoctorParams, RunFrontDoorSupervisorOptions, RunLauncherParams, RunSupervisorOptions, SessionAgentTree, SessionCommandFs, SessionListFilters, SessionRef, SessionSummary, SessionView, SpawnClaudeParams, SseParsedEvent, StickyPick, SupervisorPorts, TaskItem, UnreadableIdentityListEntry, UpdateDirectoryRuleOptions, UpdateProviderInput, UsageChangeEvent, UsageReadFs, UsageSnapshot, WhenCondition, WhenEvaluation, WorkflowRun };
29069
+ export { AMBIENT_CREDENTIAL_VARS, AgentKindSchema, AgentMetaSchema, AgentNodeSchema, AgentTreesListInputSchema, AgentTreesListOutputSchema, AgentTreesShowInputSchema, AgentTreesShowOutputSchema, CHECK_CREDENTIAL_APPLIES, CODEX_APP_SERVER_GENERATED_AGAINST, CODEX_APP_SERVER_TIMEOUT_MS, CONNECT_INTERCEPT_HOST, CONNECT_INTERCEPT_HOSTS, CONNECT_LIMITS, CONTROL_PATH_PREFIX, CategoryClassificationOverlaySchema, CategoryClassificationSchema, CategoryMapSchema, CheckReportJsonSchema, CheckRunInputSchema, CliError, CodexAccountReadSchema, CodexAppServerProtocolError, CodexAppServerRequestError, CodexAppServerUnavailableError, CodexLogoutOutputSchema, CodexRateLimitsReadSchema, CodexSignInSchema, CodexStatusOutputSchema, ConfigIdentityAddInputSchema, ConfigIdentityAddOutputSchema, ConfigIdentityRemoveInputSchema, ConfigIdentityRemoveOutputSchema, ConfigIdentitySetInputSchema, ConfigIdentitySetOutputSchema, ConfigIdentityUseOutputSchema, ConfigNameInputSchema, ConfigPoolAddInputSchema, ConfigPoolAddOutputSchema, ConfigPoolRemoveInputSchema, ConfigPoolRemoveOutputSchema, ConfigPoolSetInputSchema, ConfigPoolSetOutputSchema, ConfigPoolUseOutputSchema, ConfigProfileAddInputSchema, ConfigProfileAddOutputSchema, ConfigProfileRemoveInputSchema, ConfigProfileRemoveOutputSchema, ConfigProfileSchema, ConfigProfileSetInputSchema, ConfigProfileSetOutputSchema, ConfigProfileUseOutputSchema, ConfigProviderAddInputSchema, ConfigProviderAddOutputSchema, ConfigProviderRemoveInputSchema, ConfigProviderRemoveOutputSchema, ConfigProviderSetInputSchema, ConfigProviderSetOutputSchema, ConfigRuleAddInputSchema, ConfigRuleAddOutputSchema, ConfigRuleRemoveInputSchema, ConfigRuleRemoveOutputSchema, ConfigRuleSetInputSchema, ConfigRuleSetOutputSchema, CredentialCacheSchema, CredentialSchema, CredentialSourceSchema, CredentialSummarySchema, DOOR_EVENT_BUFFER_EVENTS, DOOR_EVENT_SOURCE_RC, DOOR_HEALTH_EVENT_SOURCE, DirectoryRuleAlreadyExistsError, DirectoryRuleMissingTargetError, DirectoryRuleNotFoundError, DirectoryRuleSchema, DirectoryRulesSchema, DoctorFindingSchema, DoctorRunOutputSchema, DoorEventSchema, DoorEventSourceQuerySchema, DoorHealthEventSchema, DuplicateIdentityNameError, EXIT_FAILURE, EXIT_USAGE, EffectiveWindowSchema, EntryValueSchema, FARM_MANIFEST_FILENAME, FrontDoorControlMaterialError, FrontDoorNotServingError, FrontDoorRestartOutputSchema, FrontDoorSessionStatusSchema, FrontDoorSessionsOutputSchema, FrontDoorStartError, FrontDoorStateSchema, FrontDoorStatusOutputSchema, GlobalConfigSchema, HeadroomSocketTargetSchema, HeadroomStartError, IdentityAlreadyExistsError, IdentityNotFoundError, IdentitySchema, InvalidCategoryNameError, InvalidIdentityNameError, InvalidProviderNameError, LAUNCH_EVENT_SOURCE, LIVE_TASK_CAP, LaunchLifecycleEventSchema, LaunchRefusedError, LaunchResolveInputSchema, LaunchResolveOutputSchema, LegacyProviderFileError, LiveTaskSchema, MergedAgentNodeSchema, MergedAgentTreeSchema, OWN_CLI_FILE_NAME, PROMPT_CACHE_TTL_MS, PlanClassSchema, PoolGraphError, PoolNameSchema, PoolNotFoundError, PoolPickReportSchema, PoolSchema, PortableConfigSchema, ProfileAlreadyExistsError, ProfileNotFoundError, ProviderAlreadyExistsError, ProviderKindMismatchError, ProviderNotFoundError, ProviderSchema, QUOTA_EXPIRING_EVENT_SOURCE, QuotaExpiringEventSchema, RC_CONTEXT_USAGE_DETAILS, RC_GOAL_CLEAR_WORDS, RC_GOAL_CONDITION_MAX_CHARS, RC_IDLE_EXPIRY_MS, RC_ORPC_PATH_PREFIX, RC_PENDING_RETIRE_REASONS, RC_PERMISSION_MODES, RC_READ_FILE_ENCODINGS, RC_REQUEST_PARSE_CAP_BYTES, RC_SELF_HOST_ENV, RC_SELF_HOST_KEEPALIVE_MS, RC_SELF_HOST_RECORD_DIR, RC_SELF_HOST_RECORD_FILE, RC_SELF_HOST_RETENTION_MS, RC_SELF_HOST_SCOPE_LIST, RC_SELF_HOST_WORKER_JWT_TTL_SECONDS, RC_SESSIONS_PATH_PREFIX, RC_SESSION_COMMAND_MAX_WAIT_MS, RC_SESSION_COMMAND_VERIFIED_VERSIONS, RC_SESSION_END_REASONS, RC_SESSION_EVENT_LOG_CAPACITY, RC_STREAM_BACKOFF_MS, RC_WEB_FETCH_ALLOW_PRIVATE_ENV, RC_WEB_FETCH_DEADLINE_MS, RC_WEB_FETCH_MAX_BYTES, RC_WEB_FETCH_MAX_REDIRECTS, ROUTED_PATH_PREFIX, RcLiveRateLimitSchema, RcPermissionModeSchema, RcRateLimitInfoSchema, RcRateLimitWindowSchema, RcSessionEventCursorExpiredError, RcSessionEventSchema, RcSessionEventsPageInputSchema, RcSessionEventsReadInputSchema, RcSessionEventsReadOutputSchema, RcSessionEventsStreamInputSchema, RcSessionTransitionSchema, RcStreamEnvelopeSchema, RcStreamEventSchema, ResetRowSchema, ResetScheduleSchema, SessionAgentTreeSchema, SessionLookupError, SessionSummarySchema, TaskItemSchema, USAGE_EVENT_SOURCE, UpdateCheckOutputSchema, UsageChangeEventSchema, UsageError, UsageListOutputSchema, UsageLiveOutputSchema, UsageSnapshotError, UsageSnapshotSchema, UsageWindowsInputSchema, UsageWindowsOutputSchema, WhenSchema, WorkflowRunSchema, addDirectoryRule, addIdentity, addPool, addProvider, agentShimCliPath, answerRcControlRequest, applyAgentTaskEvent, authenticateRcSessionMcpServer, buildEntryFacts, buildLayoutPaths, buildRcControlRequestPayload, buildRcControlResponsePayload, buildRcEndSessionPayload, buildRcEventWriteBody, buildRcFileSuggestionsPayload, buildRcGetContextUsagePayload, buildRcGetUsagePayload, buildRcInterruptPayload, buildRcKeepAlivePayload, buildRcMarkReadBody, buildRcMcpAuthenticatePayload, buildRcMcpOAuthCallbackUrlPayload, buildRcMcpReconnectPayload, buildRcMcpStatusPayload, buildRcReadFilePayload, buildRcSetModelPayload, buildRcSetPermissionModePayload, buildRcUserMessagePayload, carryOver, changePool, checkReportHasWarnings, checkReportToJson, claudeCodeVersionGate, collectCheckReport, collectDoctorReport, collectFrontDoorStatus, collectPoolPick, collectResets, collectSessionList, createAgentTreesApiRouter, createCodexApiRouter, createConfigApiRouter, createControlApiRouter, createDoorApiNodeHandler, createDoorApiRouter, createDoorEventHub, createDoorHealthPublisher, createEventsApiRouter, createLaunchApiRouter, createLaunchEventPublisher, createLeafCache, createLifecycleApiRouter, createLiveSessionRegistry, createProfile, createQuotaExpiringPublisher, createRcApiNodeHandler, createRcApiRouter, createRcClaudeCodeVersions, createRcControlHandler, createRcCredentialStore, createRcEventFanout, createRcLiveUsage, createRcSelfHostSurface, createRcSessionCommands, createRcSessionEventLog, createRcSessionEventsApiRouter, createRcSessionRegistryReader, createRcSessionTracker, createRcStreamHub, createSseParser, describeProviderEndpoint, detectAmbientCredential, doorApiAuth, doorApiNodeHandlerOf, effectiveWindow, endRcSession, ensureCa, ensureFrontDoor, ensureHeadroom, evaluateAmbientCredentialGuard, evaluateWhen, fetchThroughWebProxy, followRcSessionEvents, formatAmbientCredentialGuardMessage, formatCheckReport, formatDoctorReport, formatFrontDoorStatus, forwardableHeaders, frontDoorApiClient, frontDoorApiFromState, frontDoorApiLink, frontDoorRcApiClient, frontDoorRcControl, generateCa, getRcSessionContextUsage, getRcSessionMcpStatus, getRcSessionUsage, headroomSocketTarget, identityExists, identityIdOf, identityNameOf, identityRecords, injectRcUserMessage, interruptRcSession, isIdentityDirectoryName, isInterceptedHost, isPrivateAddress, isRcContextUsageDetail, isRcPermissionMode, isRcReadFileEncoding, lateRcEventDial, lateRcStreamDial, launchRequiredUpstreams, listDirectoryRules, listIdentities, listProfiles, listProviders, listSessions, listUsageSnapshots, locateSession, matchBranch, mergeLiveTasks, mintLeaf, mintRcSelfHostCredential, observingRoutedRoute, parseConnectTarget, parseRcGoalOutput, parseRcStreamEnvelope, planOf, poolIdentities, poolSelectedByLaunch, prepareClaudeLaunch, prepareLaunch, profileExists, providerExists, rankPool, rcEventWriteResultFromAnswer, rcFanoutOnDoorHub, rcLocalCommandAnswerOf, rcManualCompactBoundaryOf, rcObserverAsPassthrough, rcRateLimitInfoOf, rcSelfHostFromEnv, rcStatusWithRegistry, rcWebFetchAllowsPrivateFromEnv, readActiveIdentity, readCodexAccount, readCodexRateLimits, readDirectoryRules, readFarmManifest, readFrontDoorControlMaterial, readGlobalConfig, readIdentity, readIdentityById, readIdentityRecords, readPools, readProfile, readProvider, readRcSelfHostRecord, readRcSessionFile, readSessionAgentTree, readUsageSnapshot, realCodexAppServerPort, realConnectCertStore, realConnectEffects, realMemberProviderResolver, realRcControlTransport, realRcEventDial, realRcStreamDial, realRcWebFetch, realSessionFs, reconnectRcSessionMcpServer, recoverFarm, recoveryDiagnostics, refreshLaunchPoolUsage, refreshPoolUsage, refreshStalePoolMembers, removeDirectoryRule, removeIdentity, removePool, removeProfile, removeProvider, requirePool, resolveAgentShimHome, resolveClaudeHome, resolveClaudeLaunch, resolveDecisions, resolveLaunch, resolveLaunchSelection, resolveLayoutPaths, resolveSupervisorConfig, resyncFarm, runCheck, runClaudeLaunch, runDoctor, runFrontDoorSupervisor, runLaunchPlan, runLauncher, runSupervisor, sendRcKeepAlive, servedByPipeline, setAllowAmbientCredential, setDefaultConfigProfile, setGlobalDefaultProfile, setIdentityCredential, setProfileCategories, setProfileEntries, setProfileLaunchFlags, setProfileMetadata, setRcSessionModel, setRcSessionPermissionMode, showSession, snapshotPath, spawnClaude, startConnectServer, submitRcSessionMcpOAuthCallbackUrl, suggestRcSessionFiles, summariseSession, teleportRcSession, topLevelNames, updateDirectoryRule, updateProvider, useIdentity, watchedInstallEntry, withRegisteredSessionFacts, writeDirectoryRules };
29070
+ export type { AddDirectoryRuleOptions, AddProviderInput, AgentKind, AgentNode, AgentReadFs, AgentTreesApiDeps, AgentTreesApiRouter, AmbientCredentialDetection, AmbientCredentialGuardResult, AmbientCredentialVar, AnthropicUsageRefresher, BuildEntryFactsParams, CaMaterial, Candidate, CarryOverParams, CarryOverResult, CategoryMap, CheckReport, CheckReportJson, ClaudeCodeVersionGate, ClaudeLaunchPlan, ClaudeLaunchResolution, CodexAccountRead, CodexApiClient, CodexApiDeps, CodexApiRouter, CodexAppServerConnection, CodexAppServerPort, CodexAppServerReadOptions, CodexRateLimitsRead, CollectCheckReportParams, CollectDoctorReportParams, CompiledRule, ConditionContext, ConfigApiDeps, ConfigApiRouter, ConfigProfile, ConnectCertStore, ConnectEffects, ConnectLimits, ConnectLocalSurface, ConnectServerConfig, ConnectServerHandle, ConnectTarget, ControlApiClient, ControlApiDeps, ControlApiRouter, Credential, CredentialSource, Decision, Diagnostic, DirectoryRule, DirectoryRules, DoctorReport, DoorApiClient, DoorApiContext, DoorApiDeps, DoorApiRouter, DoorEvent, DoorEventHub, DoorEventPublisher, DoorEventStream, DoorEventsApiDeps, DoorHealthEvent, DoorHealthPublisher, EffectiveWindow, EliminatedRule, EnsureFrontDoorPorts, EnsureHeadroomPorts, EntryFact, EntryFacts, EntryValue, EvaluateAmbientCredentialGuardParams, FlattenedCascade, FrontDoorControlMaterial, FrontDoorRcControl, FrontDoorSessionStatus, FrontDoorStatus, FrontDoorSupervisorPorts, GlobalConfig, HeadroomSupervisorConfig, Identity, IdentityCredentialChange, IdentityListEntry, IdentityListing, IdentityNameRead, IdentityRecord, IdentityRecordsPort, IdentitySession, InjectedCredential, LaunchApiDeps, LaunchApiRouter, LaunchDecision, LaunchEventPublisher, LaunchLifecycleEvent, LaunchPlan, LaunchPoolDecision, LaunchResolution, LaunchSelection, Layer, LayerId, LayoutPaths, LeafCert, LifecycleApiClient, LifecycleApiDeps, LifecycleApiRouter, LiveSessionRegistry, LiveSessionRegistryPorts, LiveTask, LiveTaskBook, LocatedSession, MergedAgentNode, MergedAgentTree, NestedContribution, OwnExecutableStat, PlanClass, Pool, PoolChange, PoolMember, PoolPickReport, PoolPolicy, PoolRanking, PortableConfig, PrepareClaudeLaunchOptions, PrepareLaunchParams, ProfileListEntry, Provider, ProviderListEntry, ProviderOf, QuotaExpiringEvent, QuotaExpiringPublisher, RankPoolInput, RcAnswerDecision, RcAnswerDeps, RcApiClient, RcApiDeps, RcApiRouter, RcClaudeCodeVersions, RcCompactOptions, RcCompactReport, RcContextUsageDetail, RcControlAnswer, RcControlHandlerDeps, RcControlRequestDeps, RcControlTransport, RcCredentialStore, RcDialAnswer, RcDialTarget, RcEventDial, RcEventFanout, RcEventWriteResult, RcExchangeObserver, RcGoal, RcGoalClearReport, RcGoalReport, RcGoalSetReport, RcInjectDeps, RcLiveRateLimit, RcLiveUsage, RcLiveUsageDeps, RcObservedCredential, RcObservedRequest, RcPendingQuestion, RcPendingRequestSummary, RcPendingRetireReason, RcPermissionMode, RcPresenceAnswer, RcQuestionOption, RcQuestionSelection, RcRateLimitInfo, RcRateLimitWindow, RcReadFileEncoding, RcReadFileOptions, RcRefusalKind, RcRegisteredSession, RcRegistryIdentity, RcSelfHostCredentialRecord, RcSelfHostDeps, RcSelfHostMintResult, RcSelfHostSurface, RcSessionCommandDeps, RcSessionCommandOptions, RcSessionCommandResult, RcSessionCommandRoute, RcSessionCommands, RcSessionEndReason, RcSessionEvent, RcSessionEventLog, RcSessionEventLogDeps, RcSessionEventsApiDeps, RcSessionEventsApiRouter, RcSessionEventsRead, RcSessionEventsReadInput, RcSessionRegistryDeps, RcSessionRegistryFs, RcSessionRoute, RcSessionStatus, RcSessionSummary, RcSessionTracker, RcSessionTrackerDeps, RcSessionTransition, RcStreamAnswer, RcStreamDial, RcStreamEnvelope, RcStreamEvent, RcStreamHub, RcStreamHubDeps, RcSupervisedTarget, RcTurnReport, RcWebFetchDeps, RcWebFetchHop, RcWebFetchOutcome, RcWebFetcher, RcWorkerFact, RcWriteHeaders, ReadSessionOptions, RealMemberProviderParams, RecoverFarmParams, RecoveryResult, RefreshLaunchPoolUsageOptions, RefreshPoolUsageParams, RefreshStalePoolMembersParams, ResetRow, ResetSchedule, ResolveClaudeLaunchOptions, ResolveDecisionsInput, ResolveLaunchSelectionParams, ResolvedState, ResyncFarmParams, ResyncFarmResult, RunCheckParams, RunClaudeLaunchOptions, RunDoctorParams, RunFrontDoorSupervisorOptions, RunLauncherParams, RunSupervisorOptions, SessionAgentTree, SessionCommandFs, SessionListFilters, SessionRef, SessionSummary, SessionView, SpawnClaudeParams, SseParsedEvent, StickyPick, SupervisorPorts, TaskItem, UnreadableIdentityListEntry, UpdateDirectoryRuleOptions, UpdateProviderInput, UsageChangeEvent, UsageReadFs, UsageSnapshot, WhenCondition, WhenEvaluation, WorkflowRun };