claude-use 11.89.1 → 11.90.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.
@@ -299,12 +299,12 @@ declare const LaunchSchema: z.ZodObject<{
299
299
  header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
300
300
  identity: "identity";
301
301
  model: "model";
302
+ route: "route";
302
303
  account: "account";
303
304
  provider: "provider";
304
305
  version: "version";
305
306
  headroom: "headroom";
306
307
  duration: "duration";
307
- route: "route";
308
308
  project: "project";
309
309
  vcs: "vcs";
310
310
  effort: "effort";
@@ -1529,12 +1529,12 @@ declare const ConfigProfileSchema: z.ZodObject<{
1529
1529
  header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1530
1530
  identity: "identity";
1531
1531
  model: "model";
1532
+ route: "route";
1532
1533
  account: "account";
1533
1534
  provider: "provider";
1534
1535
  version: "version";
1535
1536
  headroom: "headroom";
1536
1537
  duration: "duration";
1537
- route: "route";
1538
1538
  project: "project";
1539
1539
  vcs: "vcs";
1540
1540
  effort: "effort";
@@ -2379,12 +2379,12 @@ declare const DirectoryRuleSchema: z.ZodObject<{
2379
2379
  header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2380
2380
  identity: "identity";
2381
2381
  model: "model";
2382
+ route: "route";
2382
2383
  account: "account";
2383
2384
  provider: "provider";
2384
2385
  version: "version";
2385
2386
  headroom: "headroom";
2386
2387
  duration: "duration";
2387
- route: "route";
2388
2388
  project: "project";
2389
2389
  vcs: "vcs";
2390
2390
  effort: "effort";
@@ -3155,12 +3155,12 @@ declare const DirectoryRulesSchema: z.ZodObject<{
3155
3155
  header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3156
3156
  identity: "identity";
3157
3157
  model: "model";
3158
+ route: "route";
3158
3159
  account: "account";
3159
3160
  provider: "provider";
3160
3161
  version: "version";
3161
3162
  headroom: "headroom";
3162
3163
  duration: "duration";
3163
- route: "route";
3164
3164
  project: "project";
3165
3165
  vcs: "vcs";
3166
3166
  effort: "effort";
@@ -3931,12 +3931,12 @@ declare const PortableConfigSchema: z.ZodObject<{
3931
3931
  header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3932
3932
  identity: "identity";
3933
3933
  model: "model";
3934
+ route: "route";
3934
3935
  account: "account";
3935
3936
  provider: "provider";
3936
3937
  version: "version";
3937
3938
  headroom: "headroom";
3938
3939
  duration: "duration";
3939
- route: "route";
3940
3940
  project: "project";
3941
3941
  vcs: "vcs";
3942
3942
  effort: "effort";
@@ -4687,12 +4687,12 @@ declare const GlobalConfigSchema: z.ZodObject<{
4687
4687
  header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
4688
4688
  identity: "identity";
4689
4689
  model: "model";
4690
+ route: "route";
4690
4691
  account: "account";
4691
4692
  provider: "provider";
4692
4693
  version: "version";
4693
4694
  headroom: "headroom";
4694
4695
  duration: "duration";
4695
- route: "route";
4696
4696
  project: "project";
4697
4697
  vcs: "vcs";
4698
4698
  effort: "effort";
@@ -7534,7 +7534,7 @@ interface RcInjectDeps {
7534
7534
  readonly newUuid: () => string;
7535
7535
  }
7536
7536
  /**
7537
- * Injects one user-message prompt into an observed session: the documented client-half write, `POST /v1/code/sessions/{id}/events`, authenticated by the observed bearer and carrying the observed protocol headers. The result is the sequence numbers the real service assigned, or a verbose failure. A dial that cannot reach the API host is reported rather than thrown, so a caller with no exception handling still shows the user exactly what failed.
7537
+ * Injects one user-message prompt into an observed session: the documented client-half write, `POST /v1/code/sessions/{id}/events`, authenticated by the observed bearer and carrying the observed protocol headers, the observed `anthropic-client-platform` included, so the door never names an app it is not. The result is the sequence numbers the real service assigned, or a verbose failure. A dial that cannot reach the API host is reported rather than thrown, so a caller with no exception handling still shows the user exactly what failed.
7538
7538
  */
7539
7539
  declare function injectRcUserMessage(deps: RcInjectDeps, sessionId: string, text: string): Promise<RcEventWriteResult>;
7540
7540
  /** The decision an answer carries: approve or deny, with the message a denial shows the worker (the protocol's allow result has no text field, so an approval carries none). */
@@ -8060,6 +8060,143 @@ interface FrontDoorRcControl {
8060
8060
  /** Builds the control client: every request presents the control token, and a non-2xx answer becomes the verbose message the door sent with it. */
8061
8061
  declare function frontDoorRcControl(transport: RcControlTransport, token: string): FrontDoorRcControl;
8062
8062
 
8063
+ /** What a cache stores for one credential: the token, when it was fetched, the source that produced it (a non-secret descriptor, kept so `check` and the launch log can still say where the token came from), and, in the file store, the owner it was cached for (`identity <id>`, `provider <name>`), which the file store records on every write; the Keychain store files each entry under its owner's account and records none. A file-store entry with no `owner` was written before owners were recorded. */
8064
+ declare const CachedCredentialSchema: z.ZodObject<{
8065
+ token: z.ZodString;
8066
+ fetchedAt: z.ZodNumber;
8067
+ source: z.ZodUnion<readonly [z.ZodObject<{
8068
+ env: z.ZodString;
8069
+ }, z.core.$strict>, z.ZodObject<{
8070
+ file: z.ZodString;
8071
+ }, z.core.$strict>, z.ZodObject<{
8072
+ interactive: z.ZodOptional<z.ZodBoolean>;
8073
+ timeoutMs: z.ZodOptional<z.ZodInt>;
8074
+ command: z.ZodTuple<[z.ZodString], z.ZodString>;
8075
+ }, z.core.$strict>, z.ZodObject<{
8076
+ interactive: z.ZodOptional<z.ZodBoolean>;
8077
+ timeoutMs: z.ZodOptional<z.ZodInt>;
8078
+ op: z.ZodString;
8079
+ }, z.core.$strict>, z.ZodObject<{
8080
+ interactive: z.ZodOptional<z.ZodBoolean>;
8081
+ timeoutMs: z.ZodOptional<z.ZodInt>;
8082
+ keychain: z.ZodObject<{
8083
+ service: z.ZodString;
8084
+ account: z.ZodOptional<z.ZodString>;
8085
+ }, z.core.$strict>;
8086
+ }, z.core.$strict>, z.ZodObject<{
8087
+ literal: z.ZodString;
8088
+ }, z.core.$strict>]>;
8089
+ owner: z.ZodOptional<z.ZodString>;
8090
+ }, z.core.$strict>;
8091
+ type CachedCredential = z.infer<typeof CachedCredentialSchema>;
8092
+ /**
8093
+ * Where cached credentials live, injected so resolution and its tests need neither the Keychain nor a real directory. `owner` names what the credential belongs to (`identity work`, `provider z`) and is the entry's key; `store` picks the backing store. `read` returns undefined for a missing or unreadable entry, since an entry that cannot be used is the same as no entry.
8094
+ */
8095
+ interface CredentialCachePort {
8096
+ readonly read: (store: CredentialCacheStore, owner: string) => CachedCredential | undefined;
8097
+ readonly write: (store: CredentialCacheStore, owner: string, entry: CachedCredential) => void;
8098
+ readonly remove: (store: CredentialCacheStore, owner: string) => void;
8099
+ }
8100
+ /**
8101
+ * What the cache holds for one credential, without the token: whether there is an entry, how old it is, and whether it is still within the block's TTL. `expiresInMs` is absent for a block with no expiry.
8102
+ */
8103
+ type CachedCredentialState = {
8104
+ readonly store: CredentialCacheStore;
8105
+ readonly status: "empty";
8106
+ }
8107
+ /** The store cannot be read here (the keychain store configured on a platform without a Keychain): reported with its reason rather than failing the whole report. */
8108
+ | {
8109
+ readonly store: CredentialCacheStore;
8110
+ readonly status: "unreadable";
8111
+ readonly reason: string;
8112
+ } | {
8113
+ readonly store: CredentialCacheStore;
8114
+ readonly status: "fresh" | "expired";
8115
+ readonly ageMs: number;
8116
+ readonly expiresInMs?: number;
8117
+ };
8118
+
8119
+ /** What reading one `file` source found: nothing at that path, or its contents and permission bits. `mode` is undefined on a platform with no POSIX permission bits (Windows), where the looseness check cannot apply. */
8120
+ type SecretFileRead = {
8121
+ readonly found: false;
8122
+ } | {
8123
+ readonly found: true;
8124
+ readonly content: string;
8125
+ readonly mode: number | undefined;
8126
+ };
8127
+ /** The outcome of one credential command. `stderr` is empty for an interactive run, whose stderr goes to the terminal so a person sees any prompt. */
8128
+ interface CredentialCommandResult {
8129
+ readonly status: number | null;
8130
+ readonly stdout: string;
8131
+ readonly stderr: string;
8132
+ readonly timedOut: boolean;
8133
+ }
8134
+ /**
8135
+ * Everything resolving a credential needs from the outside world, injected so the resolver (and every launcher test) runs without `op`, the Keychain, real secret files or a terminal. `src/realPorts.ts` wires the real one; tests wire a fake.
8136
+ */
8137
+ interface CredentialPort {
8138
+ /** Reads a `file` source's path (absolute or `~`-rooted). */
8139
+ readonly readSecretFile: (filePath: string) => SecretFileRead;
8140
+ /** Runs a command source's argv directly (no shell) under a timeout, capturing stdout. An interactive run inherits the terminal's stdin and stderr so a person can answer a prompt. */
8141
+ readonly runCommand: (argv: readonly [string, ...string[]], options: {
8142
+ readonly timeoutMs: number;
8143
+ readonly interactive: boolean;
8144
+ }) => CredentialCommandResult;
8145
+ /** Whether a person can answer a prompt now: standard input is a terminal, or there is a desktop session to show a dialog in. */
8146
+ readonly personPresent: () => boolean;
8147
+ /** Where cached credentials live, used only for a credential block that asks for caching. Omit to resolve every launch from the sources. */
8148
+ readonly cache?: CredentialCacheEnv;
8149
+ }
8150
+ /** One source as `check`, `doctor` and every `--json` output report it: its kind plus the same non-secret identifying detail `describeSource` prints. */
8151
+ type CredentialSourceSummary = {
8152
+ readonly kind: "env";
8153
+ readonly variable: string;
8154
+ } | {
8155
+ readonly kind: "file";
8156
+ readonly path: string;
8157
+ } | {
8158
+ readonly kind: "command";
8159
+ readonly program: string;
8160
+ } | {
8161
+ readonly kind: "op";
8162
+ readonly reference: string;
8163
+ } | {
8164
+ readonly kind: "keychain";
8165
+ readonly service: string;
8166
+ readonly account?: string;
8167
+ } | {
8168
+ readonly kind: "literal";
8169
+ };
8170
+ /** A credential block as it is reported: its effective target and each source's summary, in order. */
8171
+ interface CredentialSummary {
8172
+ readonly target: CredentialTarget;
8173
+ readonly sources: readonly CredentialSourceSummary[];
8174
+ /** The block's cache setting when it asks for caching: how long a token is kept (absent for no expiry) and where. Carried as the config schema's own type, since the summary passes the parsed block's setting through unchanged. */
8175
+ readonly cache?: CredentialCache;
8176
+ }
8177
+ /** What caching a credential needs beyond the block's own `cache` setting: the port holding entries, the platform that picks the default store, and the clock the TTL is measured on. */
8178
+ interface CredentialCacheEnv {
8179
+ readonly port: CredentialCachePort;
8180
+ readonly platform: NodeJS.Platform;
8181
+ readonly now: () => number;
8182
+ }
8183
+
8184
+ /** The result of a successful discovery. */
8185
+ interface DiscoveredClaudeBinary {
8186
+ /** Full path to the discovered `claude` executable. */
8187
+ path: string;
8188
+ /** Which strategy found it. */
8189
+ source: "versions-dir" | "path-fallback";
8190
+ /** The version string, when discovered via the versions directory. */
8191
+ version?: string;
8192
+ }
8193
+ /** What a launch asks binary discovery for: nothing (the highest installed version) or an exact version. */
8194
+ interface ClaudeBinaryRequest {
8195
+ readonly version?: string;
8196
+ }
8197
+ /** Discovers the real `claude` binary to spawn, for the version a launch asked for. Injected into the launcher so it never reads the filesystem or PATH itself. */
8198
+ type ClaudeBinaryResolver = (request?: Readonly<ClaudeBinaryRequest>) => DiscoveredClaudeBinary;
8199
+
8063
8200
  /** What an `lstat` (which never follows symlinks) reports about one path, narrowed to what authenticating the socket needs. */
8064
8201
  interface SocketPathStat {
8065
8202
  readonly kind: "dir" | "file" | "socket" | "symlink" | "other";
@@ -8093,6 +8230,245 @@ interface AllowlistFileProblem {
8093
8230
  readonly repairable: boolean;
8094
8231
  }
8095
8232
 
8233
+ /** The outcome of one external command, as `RunPort` reports it. */
8234
+ interface ReplayRunResult {
8235
+ readonly status: number | null;
8236
+ readonly stdout: string;
8237
+ readonly stderr: string;
8238
+ }
8239
+ /** Runs an external command without blocking the calling thread. */
8240
+ type AsyncRun = (command: string, args: readonly string[]) => Promise<ReplayRunResult>;
8241
+
8242
+ /** The effects a hold needs, so it runs against fakes in tests. */
8243
+ interface HoldPort {
8244
+ /** Whether a person is watching: standard input and standard output are both terminals. A launch nobody watches is never held. */
8245
+ readonly attended: () => boolean;
8246
+ /** Blocks for `ms` milliseconds. */
8247
+ readonly sleep: (ms: number) => void;
8248
+ /** Blocks until one key is pressed, and says whether it was the interrupt key (Ctrl-C), which a terminal in the mode this reads in delivers as a byte and not as a signal. */
8249
+ readonly waitForKey: () => "key" | "interrupt";
8250
+ }
8251
+ /** What a hold decided: carry on with the launch, or the person cancelled it. */
8252
+ type HoldOutcome = "go" | "cancelled";
8253
+
8254
+ /** What a compaction came to. A failure is thrown. */
8255
+ type CompactionResult = {
8256
+ readonly kind: "compacted";
8257
+ readonly beforeTokens?: number;
8258
+ readonly afterTokens?: number;
8259
+ } | {
8260
+ readonly kind: "unchanged";
8261
+ readonly reason: string;
8262
+ };
8263
+
8264
+ /**
8265
+ * A session's `/goal` as its transcript records it, read with no effect on the session: Claude Code keeps no goal state anywhere a process outside it can ask, so the transcript is the one source a reader has.
8266
+ *
8267
+ * Every goal change is a `goal_status` attachment row (`{"type":"attachment","attachment":{"type":"goal_status",...}}`), as the 2.1.319 CLI writes them and as its own resume restores a goal from them: setting a goal writes `{ met: false, sentinel: true, condition }`; clearing it writes `{ met: true, sentinel: true, condition }`; each evaluation the goal check makes and finds not yet met writes `{ met: false, condition, reason }`; a met goal writes `met: true` and a failed one `failed: true`, both ending it. The rows are read in order, so the last change wins.
8268
+ */
8269
+ /** One goal as the transcript records it: the condition, how many turns the goal check has evaluated it on, and the check's last stated reason when it has given one. */
8270
+ interface TranscriptGoal {
8271
+ readonly condition: string;
8272
+ readonly iterations: number;
8273
+ readonly lastCheck?: string;
8274
+ }
8275
+
8276
+ /** The brand only `rcSelfHostEventDial` puts on a dial: not exported, so no other code can make a value of the type. */
8277
+ declare const SELF_HOST_DIAL: unique symbol;
8278
+ /**
8279
+ * A dial that reaches the door's own self-hosted surface and nothing else: the one dial a command written as a person's app may ride. Unlike the client half's other dials (`lateRcEventDial`), which fall back to the real API host while no target is resolved, this one refuses: a write whose target is not resolved, or resolves to anything but a loopback address, is never sent.
8280
+ */
8281
+ interface RcSelfHostEventDial {
8282
+ readonly [SELF_HOST_DIAL]: true;
8283
+ readonly writeEvents: RcEventDial["writeEvents"];
8284
+ }
8285
+ /** What a person's-app write needs: the client half's credential accessors and id minting, and the self-hosted dial in place of the general one. */
8286
+ type RcPersonWriteDeps = Omit<RcInjectDeps, "dial"> & {
8287
+ readonly dial: RcSelfHostEventDial;
8288
+ };
8289
+ /** Everything the self-hosted route needs, injected so it runs against fakes in unit tests. */
8290
+ interface RcSelfHostCommandDeps {
8291
+ /** What writing a command as a person's app needs, its dial the door's own surface alone. */
8292
+ readonly personWrite: RcPersonWriteDeps;
8293
+ /** Why the door's own surface cannot take a command now (it is not bound, as when the door runs self-hosted without a transparent surface), or undefined when it can. */
8294
+ readonly unavailable: () => string | undefined;
8295
+ /** The client attachment's fan-out, on which the worker's answer arrives. */
8296
+ readonly fanout: RcEventFanout;
8297
+ /** The Claude Code version the session's worker last reported in a `system/init`, or undefined when none has been observed. */
8298
+ readonly versionOf: (sessionId: string) => string | undefined;
8299
+ /** Arms one timer, returning the function that cancels it: `setTimeout` in production, a controllable clock in tests. */
8300
+ readonly setTimer: (action: () => void, ms: number) => () => void;
8301
+ /** How long to wait when the caller names no bound. */
8302
+ readonly defaultWaitMs: number;
8303
+ }
8304
+ /** One command this route runs. */
8305
+ type RcSelfHostCommand = {
8306
+ readonly kind: "goal-get";
8307
+ } | {
8308
+ readonly kind: "goal-set";
8309
+ readonly condition: string;
8310
+ } | {
8311
+ readonly kind: "goal-clear";
8312
+ } | {
8313
+ readonly kind: "compact";
8314
+ readonly instructions: string | undefined;
8315
+ };
8316
+ /** What each command reports. */
8317
+ interface RcSelfHostReports {
8318
+ readonly "goal-get": {
8319
+ readonly goal: {
8320
+ readonly condition: string;
8321
+ readonly iterations: number;
8322
+ readonly lastCheck?: string;
8323
+ } | null;
8324
+ };
8325
+ readonly "goal-set": {
8326
+ readonly condition: string;
8327
+ };
8328
+ readonly "goal-clear": {
8329
+ readonly cleared: string | null;
8330
+ };
8331
+ readonly compact: {
8332
+ readonly trigger: string;
8333
+ readonly preTokens: number;
8334
+ readonly postTokens: number;
8335
+ };
8336
+ }
8337
+ type ReportOf<C extends RcSelfHostCommand> = RcSelfHostReports[C["kind"]];
8338
+ /** One local command's answer as the worker emitted it: its output text and, when the worker stated it, the outcome kind. */
8339
+ interface LocalCommandAnswer {
8340
+ readonly text: string;
8341
+ readonly outcome: string | undefined;
8342
+ }
8343
+ /** The worker's answer to the local command `command` run with exactly `args`, when this stream event is that answer. */
8344
+ declare function rcLocalCommandAnswerOf(event: RcStreamEvent, command: string, args: string): LocalCommandAnswer | undefined;
8345
+ /** The token counts a manual compaction's boundary names, when this stream event is that boundary. */
8346
+ declare function rcManualCompactBoundaryOf(event: RcStreamEvent): ReportOf<{
8347
+ kind: "compact";
8348
+ instructions: undefined;
8349
+ }> | undefined;
8350
+ /** Reads `/goal`'s answer with no argument, or undefined when the text is neither shape the verified versions answer with. */
8351
+ declare function parseRcGoalOutput(output: string): ReportOf<{
8352
+ kind: "goal-get";
8353
+ }> | undefined;
8354
+ /** The Claude Code version each observed session's worker reported, read off its own `system/init` events. */
8355
+ interface RcClaudeCodeVersions {
8356
+ readonly versionOf: (sessionId: string) => string | undefined;
8357
+ /** Drops the sessions `isTracked` no longer holds, so an ended session's version is not kept. */
8358
+ readonly sweep: (isTracked: (sessionId: string) => boolean) => void;
8359
+ }
8360
+ /** Subscribes to every session's stream and files the `claude_code_version` each worker-sourced `system/init` names, the worker's own statement of the version it runs (it emits one at the start of the stream and after every turn); an event a client wrote is never taken for the worker's. In memory: on the self-hosted surface a session lives exactly as long as the door that serves it. */
8361
+ declare function createRcClaudeCodeVersions(fanout: RcEventFanout): RcClaudeCodeVersions;
8362
+
8363
+ /**
8364
+ * Goal and compaction control over a Remote Control session: read, set and clear its `/goal`, and compact its conversation, each returning the outcome the session itself reports. One verb surface over the two routes Claude Code 2.1.319 leaves open, chosen per session:
8365
+ *
8366
+ * - **A supervised session** (one an agent-shim supervisor launched, whatever its account or provider): the door finds the launch through the registry, by the `bridge-session` row Claude Code writes into the session's own transcript, and asks the session's in-process control plugin (`supervise/sessionControlPlugin.ts`), which runs `$.session.compact` or `/goal <condition>` and `/goal clear` through the plugin API. The goal is read from the transcript's `goal_status` rows, with no effect on the session.
8367
+ * - **A session on the door's self-hosted surface** that no supervisor owns: the door is the Remote Control service there, so it writes the slash command into its own conversation as a person's app would and reads the worker's answer off the stream (`rcSelfHostCommands.ts`).
8368
+ *
8369
+ * Any other session is refused with the reason: 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.
8370
+ *
8371
+ * 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.
8372
+ */
8373
+ /** The Claude Code versions both routes were verified on end to end; a session reporting any other version is refused. */
8374
+ declare const RC_SESSION_COMMAND_VERIFIED_VERSIONS: readonly string[];
8375
+ /** 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. */
8376
+ declare const RC_GOAL_CLEAR_WORDS: readonly string[];
8377
+ /** The longest goal condition the 2.1.319 `/goal` command accepts, in characters; it refuses a longer one with its own message, so the set verb refuses it first, unsent. */
8378
+ declare const RC_GOAL_CONDITION_MAX_CHARS = 4000;
8379
+ /**
8380
+ * The longest any verb waits for the session's answer: the largest delay Node's timers accept (a signed 32-bit millisecond count), since a larger one fires after one millisecond instead. Every wait the verbs take is bounded by it, in the schema, the CLI's parser and the timer itself.
8381
+ */
8382
+ declare const RC_SESSION_COMMAND_MAX_WAIT_MS = 2147483647;
8383
+ /** Who answered: the session's supervisor through its in-process plugin, or the door's own self-hosted surface. */
8384
+ type RcSessionCommandRoute = "supervised" | "self-hosted";
8385
+ /** One goal as the session reports it. */
8386
+ type RcGoal = TranscriptGoal;
8387
+ /** What a goal read found: the active goal, or `null` when the session has none. */
8388
+ interface RcGoalReport {
8389
+ readonly route: RcSessionCommandRoute;
8390
+ readonly goal: RcGoal | null;
8391
+ }
8392
+ /** What a goal set did: the condition now set, and the one it replaced, or `null` when none was set. */
8393
+ interface RcGoalSetReport {
8394
+ readonly route: RcSessionCommandRoute;
8395
+ readonly condition: string;
8396
+ readonly superseded: string | null;
8397
+ }
8398
+ /** What a goal clear did: the condition it cleared, or `null` when the session had no goal to clear. */
8399
+ interface RcGoalClearReport {
8400
+ readonly route: RcSessionCommandRoute;
8401
+ readonly cleared: string | null;
8402
+ }
8403
+ /** 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. */
8404
+ interface RcCompactReport {
8405
+ readonly route: RcSessionCommandRoute;
8406
+ readonly trigger: string;
8407
+ readonly preTokens?: number;
8408
+ readonly postTokens?: number;
8409
+ }
8410
+ /** One verb's outcome: the report, or a verbose failure ready to show a user. */
8411
+ type RcSessionCommandResult<T> = {
8412
+ readonly ok: true;
8413
+ readonly report: T;
8414
+ } | {
8415
+ readonly ok: false;
8416
+ readonly message: string;
8417
+ };
8418
+ /** The options every verb takes. */
8419
+ interface RcSessionCommandOptions {
8420
+ /** How long to wait for the session's answer, in milliseconds, at most `RC_SESSION_COMMAND_MAX_WAIT_MS`; the supervisor's own bound on one compaction (`COMPACT_TIMEOUT_MS`) when absent, since a compaction's one summary request is the longest thing a verb waits on and a goal command, which makes no model request, is answered well within it. */
8421
+ readonly waitMs?: number;
8422
+ /** Aborts the wait, as the caller's request ending does. */
8423
+ readonly signal?: AbortSignal;
8424
+ }
8425
+ /** A compaction's options beyond the wait. */
8426
+ interface RcCompactOptions extends RcSessionCommandOptions {
8427
+ /** Custom summarisation instructions. A directive to the session's model, which is why the typed API serves it under its own grant. */
8428
+ readonly instructions?: string;
8429
+ }
8430
+ /** The supervised launch a Remote Control session belongs to, as the door reaches it. */
8431
+ interface RcSupervisedTarget {
8432
+ /** The conversation the plugin acts on: the session's current one, which differs from its launch id after `/clear`. */
8433
+ readonly conversationId: string;
8434
+ /** The session's current transcript, the goal's record; undefined until the session's hooks have named it. */
8435
+ readonly transcriptPath: string | undefined;
8436
+ /** The Claude Code version the plugin reported when it loaded; undefined when it has not loaded. */
8437
+ readonly version: string | undefined;
8438
+ /** Compacts through the plugin; the request is runnable for `waitMs` and no longer. */
8439
+ readonly compact: (signal: AbortSignal, instructions: string | undefined, waitMs: number) => Promise<CompactionResult>;
8440
+ /** Runs `/goal <args>` through the plugin, runnable for `waitMs` and no longer. */
8441
+ readonly runGoal: (args: string, signal: AbortSignal, waitMs: number) => Promise<unknown>;
8442
+ }
8443
+ /** Everything the verbs need, injected so they run against fakes in unit tests. */
8444
+ interface RcSessionCommandDeps {
8445
+ /** The supervised launch a `cse_` session belongs to; undefined when no live supervisor owns it, or when it does but its control plugin is not recorded; a refusal when the door cannot tell which launch it is (two live launches claim it). */
8446
+ readonly supervisedOf: (sessionId: string) => Promise<RcSupervisedTarget | {
8447
+ readonly refused: string;
8448
+ } | undefined>;
8449
+ /** The goal a transcript leaves active, read incrementally without blocking (`transcriptFollower.ts`); undefined when the file does not exist. */
8450
+ readonly goalOf: (path: string) => Promise<RcGoal | null | undefined>;
8451
+ /** The door's own surface, present only when the door serves Remote Control itself: the one place it writes a command as a person's app. */
8452
+ readonly selfHost: RcSelfHostCommandDeps | undefined;
8453
+ /** Whether the door observes the session at all, so a mistyped id is refused as unknown rather than as unsupported. */
8454
+ readonly isObserved: (sessionId: string) => boolean;
8455
+ }
8456
+ /** Creates the verbs over their dependencies. Verbs on one session run one at a time, in the order they were asked, so two commands never interleave on one session and one never reads the other's answer. */
8457
+ declare function createRcSessionCommands(deps: RcSessionCommandDeps): {
8458
+ /** Reads the session's goal: from the transcript for a supervised session, with no effect on it; by running `/goal` on the self-hosted surface otherwise. */
8459
+ goalGet: (sessionId: string, options?: RcSessionCommandOptions) => Promise<RcSessionCommandResult<RcGoalReport>>;
8460
+ /**
8461
+ * Sets the session's goal: the goal check then keeps the session working until the condition holds, and the condition reaches its model as a directive (`docs/rc-slash-commands.md`, the trust boundary). Refused unsent: an empty condition, one `/goal` reads as a clear, and one longer than it accepts. The answer names the goal it replaced.
8462
+ */
8463
+ goalSet: (sessionId: string, condition: string, options?: RcSessionCommandOptions) => Promise<RcSessionCommandResult<RcGoalSetReport>>;
8464
+ /** Clears the session's goal and names the condition it cleared, or `null` when there was none, which is not a failure (clearing is idempotent). */
8465
+ goalClear: (sessionId: string, options?: RcSessionCommandOptions) => Promise<RcSessionCommandResult<RcGoalClearReport>>;
8466
+ /** Compacts the session's conversation, with custom summary instructions when given, and resolves with the outcome: the trigger and token counts, or the session's reason for not compacting. */
8467
+ compact: (sessionId: string, options?: RcCompactOptions) => Promise<RcSessionCommandResult<RcCompactReport>>;
8468
+ };
8469
+ /** The verbs as `createRcSessionCommands` builds them. */
8470
+ type RcSessionCommands = ReturnType<typeof createRcSessionCommands>;
8471
+
8096
8472
  /**
8097
8473
  * A secondary pre-pipeline surface the listener answers under one path prefix: the typed Remote Control API. The listener owns only the dispatch (the prefix and the not-matched 404); the handle itself is whatever the door built, so this file stays independent of the API framework behind it.
8098
8474
  */
@@ -8158,6 +8534,14 @@ interface RcApiDeps {
8158
8534
  readonly mcpOAuthCallbackUrl: (sessionId: string, serverName: string, callbackUrl: string) => Promise<RcEventWriteResult>;
8159
8535
  /** The teleport operation, already wired to the tracker and the door's API-host dial. */
8160
8536
  readonly teleport: (sessionId: string, marker: string) => Promise<RcEventWriteResult>;
8537
+ /** The goal read (`rcSessionCommands.ts`), routed to the session's supervisor or the door's own self-hosted surface. */
8538
+ readonly goalGet: (sessionId: string, options: RcSessionCommandOptions) => Promise<RcSessionCommandResult<RcGoalReport>>;
8539
+ /** The goal set, routed the same way. */
8540
+ readonly goalSet: (sessionId: string, condition: string, options: RcSessionCommandOptions) => Promise<RcSessionCommandResult<RcGoalSetReport>>;
8541
+ /** The goal clear, routed the same way. */
8542
+ readonly goalClear: (sessionId: string, options: RcSessionCommandOptions) => Promise<RcSessionCommandResult<RcGoalClearReport>>;
8543
+ /** The compaction, routed the same way. */
8544
+ readonly compact: (sessionId: string, options: RcCompactOptions) => Promise<RcSessionCommandResult<RcCompactReport>>;
8161
8545
  /** The client attachment's fan-out, whose events the subscription yields. */
8162
8546
  readonly fanout: RcEventFanout;
8163
8547
  }
@@ -8360,6 +8744,72 @@ declare function createRcApiRouter(deps: RcApiDeps): {
8360
8744
  session: zod.ZodString;
8361
8745
  sequenceNums: zod.ZodReadonly<zod.ZodArray<zod.ZodNumber>>;
8362
8746
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
8747
+ goalGet: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
8748
+ session: zod.ZodString;
8749
+ waitMs: zod.ZodOptional<zod.ZodInt>;
8750
+ }, zod_v4_core.$strict>, zod.ZodObject<{
8751
+ goal: zod.ZodNullable<zod.ZodObject<{
8752
+ condition: zod.ZodString;
8753
+ iterations: zod.ZodInt;
8754
+ lastCheck: zod.ZodOptional<zod.ZodString>;
8755
+ }, zod_v4_core.$strict>>;
8756
+ session: zod.ZodString;
8757
+ route: zod.ZodEnum<{
8758
+ supervised: "supervised";
8759
+ "self-hosted": "self-hosted";
8760
+ }>;
8761
+ }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
8762
+ goalSet: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
8763
+ session: zod.ZodString;
8764
+ condition: zod.ZodString;
8765
+ waitMs: zod.ZodOptional<zod.ZodInt>;
8766
+ }, zod_v4_core.$strict>, zod.ZodObject<{
8767
+ condition: zod.ZodString;
8768
+ superseded: zod.ZodNullable<zod.ZodString>;
8769
+ session: zod.ZodString;
8770
+ route: zod.ZodEnum<{
8771
+ supervised: "supervised";
8772
+ "self-hosted": "self-hosted";
8773
+ }>;
8774
+ }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
8775
+ goalClear: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
8776
+ session: zod.ZodString;
8777
+ waitMs: zod.ZodOptional<zod.ZodInt>;
8778
+ }, zod_v4_core.$strict>, zod.ZodObject<{
8779
+ cleared: zod.ZodNullable<zod.ZodString>;
8780
+ session: zod.ZodString;
8781
+ route: zod.ZodEnum<{
8782
+ supervised: "supervised";
8783
+ "self-hosted": "self-hosted";
8784
+ }>;
8785
+ }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
8786
+ compact: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
8787
+ session: zod.ZodString;
8788
+ waitMs: zod.ZodOptional<zod.ZodInt>;
8789
+ }, zod_v4_core.$strict>, zod.ZodObject<{
8790
+ trigger: zod.ZodString;
8791
+ preTokens: zod.ZodOptional<zod.ZodNumber>;
8792
+ postTokens: zod.ZodOptional<zod.ZodNumber>;
8793
+ session: zod.ZodString;
8794
+ route: zod.ZodEnum<{
8795
+ supervised: "supervised";
8796
+ "self-hosted": "self-hosted";
8797
+ }>;
8798
+ }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
8799
+ compactWithInstructions: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
8800
+ session: zod.ZodString;
8801
+ instructions: zod.ZodString;
8802
+ waitMs: zod.ZodOptional<zod.ZodInt>;
8803
+ }, zod_v4_core.$strict>, zod.ZodObject<{
8804
+ trigger: zod.ZodString;
8805
+ preTokens: zod.ZodOptional<zod.ZodNumber>;
8806
+ postTokens: zod.ZodOptional<zod.ZodNumber>;
8807
+ session: zod.ZodString;
8808
+ route: zod.ZodEnum<{
8809
+ supervised: "supervised";
8810
+ "self-hosted": "self-hosted";
8811
+ }>;
8812
+ }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
8363
8813
  subscribe: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
8364
8814
  session: zod.ZodOptional<zod.ZodString>;
8365
8815
  }, zod_v4_core.$strict>, any, MergedErrorMap<$ErrorMap, TErrorMap>>;
@@ -8834,127 +9284,6 @@ declare const CheckReportJsonSchema: z.ZodObject<{
8834
9284
  }, z.core.$strict>;
8835
9285
  type CheckReportJson = z.output<typeof CheckReportJsonSchema>;
8836
9286
 
8837
- /** What a cache stores for one credential: the token, when it was fetched, the source that produced it (a non-secret descriptor, kept so `check` and the launch log can still say where the token came from), and, in the file store, the owner it was cached for (`identity <id>`, `provider <name>`), which the file store records on every write; the Keychain store files each entry under its owner's account and records none. A file-store entry with no `owner` was written before owners were recorded. */
8838
- declare const CachedCredentialSchema: z.ZodObject<{
8839
- token: z.ZodString;
8840
- fetchedAt: z.ZodNumber;
8841
- source: z.ZodUnion<readonly [z.ZodObject<{
8842
- env: z.ZodString;
8843
- }, z.core.$strict>, z.ZodObject<{
8844
- file: z.ZodString;
8845
- }, z.core.$strict>, z.ZodObject<{
8846
- interactive: z.ZodOptional<z.ZodBoolean>;
8847
- timeoutMs: z.ZodOptional<z.ZodInt>;
8848
- command: z.ZodTuple<[z.ZodString], z.ZodString>;
8849
- }, z.core.$strict>, z.ZodObject<{
8850
- interactive: z.ZodOptional<z.ZodBoolean>;
8851
- timeoutMs: z.ZodOptional<z.ZodInt>;
8852
- op: z.ZodString;
8853
- }, z.core.$strict>, z.ZodObject<{
8854
- interactive: z.ZodOptional<z.ZodBoolean>;
8855
- timeoutMs: z.ZodOptional<z.ZodInt>;
8856
- keychain: z.ZodObject<{
8857
- service: z.ZodString;
8858
- account: z.ZodOptional<z.ZodString>;
8859
- }, z.core.$strict>;
8860
- }, z.core.$strict>, z.ZodObject<{
8861
- literal: z.ZodString;
8862
- }, z.core.$strict>]>;
8863
- owner: z.ZodOptional<z.ZodString>;
8864
- }, z.core.$strict>;
8865
- type CachedCredential = z.infer<typeof CachedCredentialSchema>;
8866
- /**
8867
- * Where cached credentials live, injected so resolution and its tests need neither the Keychain nor a real directory. `owner` names what the credential belongs to (`identity work`, `provider z`) and is the entry's key; `store` picks the backing store. `read` returns undefined for a missing or unreadable entry, since an entry that cannot be used is the same as no entry.
8868
- */
8869
- interface CredentialCachePort {
8870
- readonly read: (store: CredentialCacheStore, owner: string) => CachedCredential | undefined;
8871
- readonly write: (store: CredentialCacheStore, owner: string, entry: CachedCredential) => void;
8872
- readonly remove: (store: CredentialCacheStore, owner: string) => void;
8873
- }
8874
- /**
8875
- * What the cache holds for one credential, without the token: whether there is an entry, how old it is, and whether it is still within the block's TTL. `expiresInMs` is absent for a block with no expiry.
8876
- */
8877
- type CachedCredentialState = {
8878
- readonly store: CredentialCacheStore;
8879
- readonly status: "empty";
8880
- }
8881
- /** The store cannot be read here (the keychain store configured on a platform without a Keychain): reported with its reason rather than failing the whole report. */
8882
- | {
8883
- readonly store: CredentialCacheStore;
8884
- readonly status: "unreadable";
8885
- readonly reason: string;
8886
- } | {
8887
- readonly store: CredentialCacheStore;
8888
- readonly status: "fresh" | "expired";
8889
- readonly ageMs: number;
8890
- readonly expiresInMs?: number;
8891
- };
8892
-
8893
- /** What reading one `file` source found: nothing at that path, or its contents and permission bits. `mode` is undefined on a platform with no POSIX permission bits (Windows), where the looseness check cannot apply. */
8894
- type SecretFileRead = {
8895
- readonly found: false;
8896
- } | {
8897
- readonly found: true;
8898
- readonly content: string;
8899
- readonly mode: number | undefined;
8900
- };
8901
- /** The outcome of one credential command. `stderr` is empty for an interactive run, whose stderr goes to the terminal so a person sees any prompt. */
8902
- interface CredentialCommandResult {
8903
- readonly status: number | null;
8904
- readonly stdout: string;
8905
- readonly stderr: string;
8906
- readonly timedOut: boolean;
8907
- }
8908
- /**
8909
- * Everything resolving a credential needs from the outside world, injected so the resolver (and every launcher test) runs without `op`, the Keychain, real secret files or a terminal. `src/realPorts.ts` wires the real one; tests wire a fake.
8910
- */
8911
- interface CredentialPort {
8912
- /** Reads a `file` source's path (absolute or `~`-rooted). */
8913
- readonly readSecretFile: (filePath: string) => SecretFileRead;
8914
- /** Runs a command source's argv directly (no shell) under a timeout, capturing stdout. An interactive run inherits the terminal's stdin and stderr so a person can answer a prompt. */
8915
- readonly runCommand: (argv: readonly [string, ...string[]], options: {
8916
- readonly timeoutMs: number;
8917
- readonly interactive: boolean;
8918
- }) => CredentialCommandResult;
8919
- /** Whether a person can answer a prompt now: standard input is a terminal, or there is a desktop session to show a dialog in. */
8920
- readonly personPresent: () => boolean;
8921
- /** Where cached credentials live, used only for a credential block that asks for caching. Omit to resolve every launch from the sources. */
8922
- readonly cache?: CredentialCacheEnv;
8923
- }
8924
- /** One source as `check`, `doctor` and every `--json` output report it: its kind plus the same non-secret identifying detail `describeSource` prints. */
8925
- type CredentialSourceSummary = {
8926
- readonly kind: "env";
8927
- readonly variable: string;
8928
- } | {
8929
- readonly kind: "file";
8930
- readonly path: string;
8931
- } | {
8932
- readonly kind: "command";
8933
- readonly program: string;
8934
- } | {
8935
- readonly kind: "op";
8936
- readonly reference: string;
8937
- } | {
8938
- readonly kind: "keychain";
8939
- readonly service: string;
8940
- readonly account?: string;
8941
- } | {
8942
- readonly kind: "literal";
8943
- };
8944
- /** A credential block as it is reported: its effective target and each source's summary, in order. */
8945
- interface CredentialSummary {
8946
- readonly target: CredentialTarget;
8947
- readonly sources: readonly CredentialSourceSummary[];
8948
- /** The block's cache setting when it asks for caching: how long a token is kept (absent for no expiry) and where. Carried as the config schema's own type, since the summary passes the parsed block's setting through unchanged. */
8949
- readonly cache?: CredentialCache;
8950
- }
8951
- /** What caching a credential needs beyond the block's own `cache` setting: the port holding entries, the platform that picks the default store, and the clock the TTL is measured on. */
8952
- interface CredentialCacheEnv {
8953
- readonly port: CredentialCachePort;
8954
- readonly platform: NodeJS.Platform;
8955
- readonly now: () => number;
8956
- }
8957
-
8958
9287
  /** Where a pinned Claude Code version came from, strongest first: the launch's own flag, then the environment, then the cascade. */
8959
9288
  declare const CLAUDE_VERSION_SOURCES: readonly ["flag", "environment", "cascade"];
8960
9289
  type ClaudeVersionSource = (typeof CLAUDE_VERSION_SOURCES)[number];
@@ -9830,22 +10159,6 @@ interface RenameJournalListing {
9830
10159
  declare const ProviderAliasesSchema: z.ZodRecord<z.ZodString, z.ZodString>;
9831
10160
  type ProviderAliases = z.infer<typeof ProviderAliasesSchema>;
9832
10161
 
9833
- /** The result of a successful discovery. */
9834
- interface DiscoveredClaudeBinary {
9835
- /** Full path to the discovered `claude` executable. */
9836
- path: string;
9837
- /** Which strategy found it. */
9838
- source: "versions-dir" | "path-fallback";
9839
- /** The version string, when discovered via the versions directory. */
9840
- version?: string;
9841
- }
9842
- /** What a launch asks binary discovery for: nothing (the highest installed version) or an exact version. */
9843
- interface ClaudeBinaryRequest {
9844
- readonly version?: string;
9845
- }
9846
- /** Discovers the real `claude` binary to spawn, for the version a launch asked for. Injected into the launcher so it never reads the filesystem or PATH itself. */
9847
- type ClaudeBinaryResolver = (request?: Readonly<ClaudeBinaryRequest>) => DiscoveredClaudeBinary;
9848
-
9849
10162
  declare const DOCTOR_SEVERITIES: readonly ["pass", "warn", "fail"];
9850
10163
  type DoctorSeverity = (typeof DOCTOR_SEVERITIES)[number];
9851
10164
  declare const DOCTOR_SECTIONS: readonly ["ambient-credential", "binary-discovery", "claude-shim", "path-resolution", "legacy-name", "config-profile", "identity", "sign-in", "pool", "provider", "keychain", "directory-rules", "global-config", "categories-local", "active-identity", "headroom", "frontdoor", "models"];
@@ -10088,15 +10401,6 @@ type CodexApiRouter = ReturnType<typeof createCodexApiRouter>;
10088
10401
  /** The Codex procedures alone as a client sees them. */
10089
10402
  type CodexApiClient = RouterClient<CodexApiRouter>;
10090
10403
 
10091
- /** The outcome of one external command, as `RunPort` reports it. */
10092
- interface ReplayRunResult {
10093
- readonly status: number | null;
10094
- readonly stdout: string;
10095
- readonly stderr: string;
10096
- }
10097
- /** Runs an external command without blocking the calling thread. */
10098
- type AsyncRun = (command: string, args: readonly string[]) => Promise<ReplayRunResult>;
10099
-
10100
10404
  /**
10101
10405
  * 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.
10102
10406
  *
@@ -10482,12 +10786,12 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
10482
10786
  header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
10483
10787
  identity: "identity";
10484
10788
  model: "model";
10789
+ route: "route";
10485
10790
  account: "account";
10486
10791
  provider: "provider";
10487
10792
  version: "version";
10488
10793
  headroom: "headroom";
10489
10794
  duration: "duration";
10490
- route: "route";
10491
10795
  project: "project";
10492
10796
  vcs: "vcs";
10493
10797
  effort: "effort";
@@ -11206,12 +11510,12 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
11206
11510
  header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
11207
11511
  identity: "identity";
11208
11512
  model: "model";
11513
+ route: "route";
11209
11514
  account: "account";
11210
11515
  provider: "provider";
11211
11516
  version: "version";
11212
11517
  headroom: "headroom";
11213
11518
  duration: "duration";
11214
- route: "route";
11215
11519
  project: "project";
11216
11520
  vcs: "vcs";
11217
11521
  effort: "effort";
@@ -12406,12 +12710,12 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
12406
12710
  header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
12407
12711
  identity: "identity";
12408
12712
  model: "model";
12713
+ route: "route";
12409
12714
  account: "account";
12410
12715
  provider: "provider";
12411
12716
  version: "version";
12412
12717
  headroom: "headroom";
12413
12718
  duration: "duration";
12414
- route: "route";
12415
12719
  project: "project";
12416
12720
  vcs: "vcs";
12417
12721
  effort: "effort";
@@ -13187,12 +13491,12 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
13187
13491
  header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
13188
13492
  identity: "identity";
13189
13493
  model: "model";
13494
+ route: "route";
13190
13495
  account: "account";
13191
13496
  provider: "provider";
13192
13497
  version: "version";
13193
13498
  headroom: "headroom";
13194
13499
  duration: "duration";
13195
- route: "route";
13196
13500
  project: "project";
13197
13501
  vcs: "vcs";
13198
13502
  effort: "effort";
@@ -14160,12 +14464,12 @@ declare const StatuslineSchema: z.ZodObject<{
14160
14464
  header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
14161
14465
  identity: "identity";
14162
14466
  model: "model";
14467
+ route: "route";
14163
14468
  account: "account";
14164
14469
  provider: "provider";
14165
14470
  version: "version";
14166
14471
  headroom: "headroom";
14167
14472
  duration: "duration";
14168
- route: "route";
14169
14473
  project: "project";
14170
14474
  vcs: "vcs";
14171
14475
  effort: "effort";
@@ -14730,18 +15034,6 @@ interface SupervisedLaunch {
14730
15034
  readonly settingsFile?: string;
14731
15035
  }
14732
15036
 
14733
- /** The effects a hold needs, so it runs against fakes in tests. */
14734
- interface HoldPort {
14735
- /** Whether a person is watching: standard input and standard output are both terminals. A launch nobody watches is never held. */
14736
- readonly attended: () => boolean;
14737
- /** Blocks for `ms` milliseconds. */
14738
- readonly sleep: (ms: number) => void;
14739
- /** Blocks until one key is pressed, and says whether it was the interrupt key (Ctrl-C), which a terminal in the mode this reads in delivers as a byte and not as a signal. */
14740
- readonly waitForKey: () => "key" | "interrupt";
14741
- }
14742
- /** What a hold decided: carry on with the launch, or the person cancelled it. */
14743
- type HoldOutcome = "go" | "cancelled";
14744
-
14745
15037
  /**
14746
15038
  * Everything the launch-time update check needs from its host, injected so tests run it against scripted answers and no launch ever reaches GitHub by accident. Deliberately narrower than `UpdatePorts`: the launch path never downloads anything (the detached `agent-shim update` does), so only the release check, the cooldown stamp, the clock, the background spawn and the terminal are wired.
14747
15039
  */
@@ -15028,12 +15320,12 @@ declare function createLaunchApiRouter(deps: LaunchApiDeps): {
15028
15320
  header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
15029
15321
  identity: "identity";
15030
15322
  model: "model";
15323
+ route: "route";
15031
15324
  account: "account";
15032
15325
  provider: "provider";
15033
15326
  version: "version";
15034
15327
  headroom: "headroom";
15035
15328
  duration: "duration";
15036
- route: "route";
15037
15329
  project: "project";
15038
15330
  vcs: "vcs";
15039
15331
  effort: "effort";
@@ -16754,12 +17046,12 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
16754
17046
  header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
16755
17047
  identity: "identity";
16756
17048
  model: "model";
17049
+ route: "route";
16757
17050
  account: "account";
16758
17051
  provider: "provider";
16759
17052
  version: "version";
16760
17053
  headroom: "headroom";
16761
17054
  duration: "duration";
16762
- route: "route";
16763
17055
  project: "project";
16764
17056
  vcs: "vcs";
16765
17057
  effort: "effort";
@@ -17725,12 +18017,12 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
17725
18017
  header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
17726
18018
  identity: "identity";
17727
18019
  model: "model";
18020
+ route: "route";
17728
18021
  account: "account";
17729
18022
  provider: "provider";
17730
18023
  version: "version";
17731
18024
  headroom: "headroom";
17732
18025
  duration: "duration";
17733
- route: "route";
17734
18026
  project: "project";
17735
18027
  vcs: "vcs";
17736
18028
  effort: "effort";
@@ -18449,12 +18741,12 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
18449
18741
  header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
18450
18742
  identity: "identity";
18451
18743
  model: "model";
18744
+ route: "route";
18452
18745
  account: "account";
18453
18746
  provider: "provider";
18454
18747
  version: "version";
18455
18748
  headroom: "headroom";
18456
18749
  duration: "duration";
18457
- route: "route";
18458
18750
  project: "project";
18459
18751
  vcs: "vcs";
18460
18752
  effort: "effort";
@@ -19649,12 +19941,12 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
19649
19941
  header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
19650
19942
  identity: "identity";
19651
19943
  model: "model";
19944
+ route: "route";
19652
19945
  account: "account";
19653
19946
  provider: "provider";
19654
19947
  version: "version";
19655
19948
  headroom: "headroom";
19656
19949
  duration: "duration";
19657
- route: "route";
19658
19950
  project: "project";
19659
19951
  vcs: "vcs";
19660
19952
  effort: "effort";
@@ -20430,12 +20722,12 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
20430
20722
  header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
20431
20723
  identity: "identity";
20432
20724
  model: "model";
20725
+ route: "route";
20433
20726
  account: "account";
20434
20727
  provider: "provider";
20435
20728
  version: "version";
20436
20729
  headroom: "headroom";
20437
20730
  duration: "duration";
20438
- route: "route";
20439
20731
  project: "project";
20440
20732
  vcs: "vcs";
20441
20733
  effort: "effort";
@@ -21890,6 +22182,72 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
21890
22182
  session: zod.ZodString;
21891
22183
  sequenceNums: zod.ZodReadonly<zod.ZodArray<zod.ZodNumber>>;
21892
22184
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
22185
+ goalGet: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
22186
+ session: zod.ZodString;
22187
+ waitMs: zod.ZodOptional<zod.ZodInt>;
22188
+ }, zod_v4_core.$strict>, zod.ZodObject<{
22189
+ goal: zod.ZodNullable<zod.ZodObject<{
22190
+ condition: zod.ZodString;
22191
+ iterations: zod.ZodInt;
22192
+ lastCheck: zod.ZodOptional<zod.ZodString>;
22193
+ }, zod_v4_core.$strict>>;
22194
+ session: zod.ZodString;
22195
+ route: zod.ZodEnum<{
22196
+ supervised: "supervised";
22197
+ "self-hosted": "self-hosted";
22198
+ }>;
22199
+ }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
22200
+ goalSet: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
22201
+ session: zod.ZodString;
22202
+ condition: zod.ZodString;
22203
+ waitMs: zod.ZodOptional<zod.ZodInt>;
22204
+ }, zod_v4_core.$strict>, zod.ZodObject<{
22205
+ condition: zod.ZodString;
22206
+ superseded: zod.ZodNullable<zod.ZodString>;
22207
+ session: zod.ZodString;
22208
+ route: zod.ZodEnum<{
22209
+ supervised: "supervised";
22210
+ "self-hosted": "self-hosted";
22211
+ }>;
22212
+ }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
22213
+ goalClear: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
22214
+ session: zod.ZodString;
22215
+ waitMs: zod.ZodOptional<zod.ZodInt>;
22216
+ }, zod_v4_core.$strict>, zod.ZodObject<{
22217
+ cleared: zod.ZodNullable<zod.ZodString>;
22218
+ session: zod.ZodString;
22219
+ route: zod.ZodEnum<{
22220
+ supervised: "supervised";
22221
+ "self-hosted": "self-hosted";
22222
+ }>;
22223
+ }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
22224
+ compact: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
22225
+ session: zod.ZodString;
22226
+ waitMs: zod.ZodOptional<zod.ZodInt>;
22227
+ }, zod_v4_core.$strict>, zod.ZodObject<{
22228
+ trigger: zod.ZodString;
22229
+ preTokens: zod.ZodOptional<zod.ZodNumber>;
22230
+ postTokens: zod.ZodOptional<zod.ZodNumber>;
22231
+ session: zod.ZodString;
22232
+ route: zod.ZodEnum<{
22233
+ supervised: "supervised";
22234
+ "self-hosted": "self-hosted";
22235
+ }>;
22236
+ }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
22237
+ compactWithInstructions: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
22238
+ session: zod.ZodString;
22239
+ instructions: zod.ZodString;
22240
+ waitMs: zod.ZodOptional<zod.ZodInt>;
22241
+ }, zod_v4_core.$strict>, zod.ZodObject<{
22242
+ trigger: zod.ZodString;
22243
+ preTokens: zod.ZodOptional<zod.ZodNumber>;
22244
+ postTokens: zod.ZodOptional<zod.ZodNumber>;
22245
+ session: zod.ZodString;
22246
+ route: zod.ZodEnum<{
22247
+ supervised: "supervised";
22248
+ "self-hosted": "self-hosted";
22249
+ }>;
22250
+ }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
21893
22251
  subscribe: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
21894
22252
  session: zod.ZodOptional<zod.ZodString>;
21895
22253
  }, zod_v4_core.$strict>, any, MergedErrorMap<$ErrorMap, TErrorMap>>;
@@ -22335,12 +22693,12 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
22335
22693
  header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
22336
22694
  identity: "identity";
22337
22695
  model: "model";
22696
+ route: "route";
22338
22697
  account: "account";
22339
22698
  provider: "provider";
22340
22699
  version: "version";
22341
22700
  headroom: "headroom";
22342
22701
  duration: "duration";
22343
- route: "route";
22344
22702
  project: "project";
22345
22703
  vcs: "vcs";
22346
22704
  effort: "effort";
@@ -23061,12 +23419,12 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
23061
23419
  header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
23062
23420
  identity: "identity";
23063
23421
  model: "model";
23422
+ route: "route";
23064
23423
  account: "account";
23065
23424
  provider: "provider";
23066
23425
  version: "version";
23067
23426
  headroom: "headroom";
23068
23427
  duration: "duration";
23069
- route: "route";
23070
23428
  project: "project";
23071
23429
  vcs: "vcs";
23072
23430
  effort: "effort";
@@ -24263,12 +24621,12 @@ declare const ConfigRuleAddOutputSchema: z.ZodObject<{
24263
24621
  header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
24264
24622
  identity: "identity";
24265
24623
  model: "model";
24624
+ route: "route";
24266
24625
  account: "account";
24267
24626
  provider: "provider";
24268
24627
  version: "version";
24269
24628
  headroom: "headroom";
24270
24629
  duration: "duration";
24271
- route: "route";
24272
24630
  project: "project";
24273
24631
  vcs: "vcs";
24274
24632
  effort: "effort";
@@ -25046,12 +25404,12 @@ declare const ConfigRuleSetOutputSchema: z.ZodObject<{
25046
25404
  header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
25047
25405
  identity: "identity";
25048
25406
  model: "model";
25407
+ route: "route";
25049
25408
  account: "account";
25050
25409
  provider: "provider";
25051
25410
  version: "version";
25052
25411
  headroom: "headroom";
25053
25412
  duration: "duration";
25054
- route: "route";
25055
25413
  project: "project";
25056
25414
  vcs: "vcs";
25057
25415
  effort: "effort";
@@ -26086,12 +26444,12 @@ declare const LaunchResolveOutputSchema: z.ZodObject<{
26086
26444
  header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
26087
26445
  identity: "identity";
26088
26446
  model: "model";
26447
+ route: "route";
26089
26448
  account: "account";
26090
26449
  provider: "provider";
26091
26450
  version: "version";
26092
26451
  headroom: "headroom";
26093
26452
  duration: "duration";
26094
- route: "route";
26095
26453
  project: "project";
26096
26454
  vcs: "vcs";
26097
26455
  effort: "effort";
@@ -27930,5 +28288,5 @@ declare const OWN_CLI_FILE_NAME = "cli.cjs";
27930
28288
  */
27931
28289
  declare function agentShimCliPath(distDir?: string | undefined): string;
27932
28290
 
27933
- 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_IDLE_EXPIRY_MS, RC_ORPC_PATH_PREFIX, RC_PENDING_DEADLINE_MS, 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_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, createRcControlHandler, createRcCredentialStore, createRcEventFanout, createRcLiveUsage, createRcSelfHostSurface, 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, parseRcStreamEnvelope, planOf, poolIdentities, poolSelectedByLaunch, prepareClaudeLaunch, prepareLaunch, profileExists, providerExists, rankPool, rcEventWriteResultFromAnswer, rcFanoutOnDoorHub, 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, 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 };
27934
- export type { AddDirectoryRuleOptions, AddProviderInput, AgentKind, AgentNode, AgentReadFs, AgentTreesApiDeps, AgentTreesApiRouter, AmbientCredentialDetection, AmbientCredentialGuardResult, AmbientCredentialVar, AnthropicUsageRefresher, BuildEntryFactsParams, CaMaterial, Candidate, CarryOverParams, CarryOverResult, CategoryMap, CheckReport, CheckReportJson, 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, QuotaExpiringEvent, QuotaExpiringPublisher, RankPoolInput, RcAnswerDecision, RcAnswerDeps, RcApiClient, RcApiDeps, RcApiRouter, RcContextUsageDetail, RcControlAnswer, RcControlHandlerDeps, RcControlRequestDeps, RcControlTransport, RcCredentialStore, RcDialAnswer, RcDialTarget, RcEventDial, RcEventFanout, RcEventWriteResult, RcExchangeObserver, RcInjectDeps, RcLiveRateLimit, RcLiveUsage, RcLiveUsageDeps, RcObservedCredential, RcObservedRequest, RcPendingRequestSummary, RcPendingRetireReason, RcPermissionMode, RcPresenceAnswer, RcRateLimitInfo, RcRateLimitWindow, RcReadFileEncoding, RcReadFileOptions, RcRegisteredSession, RcRegistryIdentity, RcSelfHostCredentialRecord, RcSelfHostDeps, RcSelfHostMintResult, RcSelfHostSurface, RcSessionEndReason, RcSessionEvent, RcSessionEventLog, RcSessionEventLogDeps, RcSessionEventsApiDeps, RcSessionEventsApiRouter, RcSessionEventsRead, RcSessionEventsReadInput, RcSessionRegistryDeps, RcSessionRegistryFs, RcSessionStatus, RcSessionSummary, RcSessionTracker, RcSessionTrackerDeps, RcSessionTransition, RcStreamAnswer, RcStreamDial, RcStreamEnvelope, RcStreamEvent, RcStreamHub, RcStreamHubDeps, RcWebFetchDeps, RcWebFetchHop, RcWebFetchOutcome, RcWebFetcher, RcWorkerFact, RcWriteHeaders, ReadSessionOptions, 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 };
28291
+ 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_DEADLINE_MS, 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, 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 };
28292
+ export type { AddDirectoryRuleOptions, AddProviderInput, AgentKind, AgentNode, AgentReadFs, AgentTreesApiDeps, AgentTreesApiRouter, AmbientCredentialDetection, AmbientCredentialGuardResult, AmbientCredentialVar, AnthropicUsageRefresher, BuildEntryFactsParams, CaMaterial, Candidate, CarryOverParams, CarryOverResult, CategoryMap, CheckReport, CheckReportJson, 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, 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, RcPendingRequestSummary, RcPendingRetireReason, RcPermissionMode, RcPresenceAnswer, RcRateLimitInfo, RcRateLimitWindow, RcReadFileEncoding, RcReadFileOptions, RcRegisteredSession, RcRegistryIdentity, RcSelfHostCredentialRecord, RcSelfHostDeps, RcSelfHostMintResult, RcSelfHostSurface, RcSessionCommandDeps, RcSessionCommandOptions, RcSessionCommandResult, RcSessionCommandRoute, RcSessionCommands, RcSessionEndReason, RcSessionEvent, RcSessionEventLog, RcSessionEventLogDeps, RcSessionEventsApiDeps, RcSessionEventsApiRouter, RcSessionEventsRead, RcSessionEventsReadInput, RcSessionRegistryDeps, RcSessionRegistryFs, RcSessionStatus, RcSessionSummary, RcSessionTracker, RcSessionTrackerDeps, RcSessionTransition, RcStreamAnswer, RcStreamDial, RcStreamEnvelope, RcStreamEvent, RcStreamHub, RcStreamHubDeps, RcSupervisedTarget, RcWebFetchDeps, RcWebFetchHop, RcWebFetchOutcome, RcWebFetcher, RcWorkerFact, RcWriteHeaders, ReadSessionOptions, 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 };