agent-shim 11.81.0 → 11.83.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.
@@ -2117,7 +2117,7 @@ type PoolPreference = z.infer<typeof PoolPreferenceSchema>;
2117
2117
  *
2118
2118
  * A member entry may name another pool (`pool:<name>`), which is ranked with its own preference and contributes its pick at the entry's position; see `PoolMemberSchema`. The graph must stay acyclic, which `pool add`/`pool set` enforce and `doctor` re-checks.
2119
2119
  *
2120
- * `compactBeforeLimit` makes the supervised sessions compact their context while their member can still afford it, at `compactAtUtilisation` percent of a window or, when that is absent, when compacting every session on the member would cost more than its five-hour window has left.
2120
+ * `compactBeforeLimit` makes the supervised sessions compact their context while their member can still afford it, at `compactAtUtilisation` percent of a window or, when that is absent, when compacting every session on the member would cost more than the window it has the smallest share left of (the seven-day one for an account with no five-hour window) has left.
2121
2121
  *
2122
2122
  * `resumeOnLimit` makes an interactive launch from the pool supervised: when its identity runs out of quota, the launcher stops the session and resumes the same conversation under the next ranked member, on the same terminal. Absent means false.
2123
2123
  *
@@ -5588,6 +5588,10 @@ interface LayoutPaths {
5588
5588
  readonly usageJobsFile: string;
5589
5589
  /** Directory of one append-only `<job>.log` per job: the result of each unattended run. */
5590
5590
  readonly jobLogsDir: string;
5591
+ /** Directory holding one journal per unfinished `identity rename`, written before its first step and removed when it ends: the trace a rename that was killed leaves, which a re-run resumes from and `doctor` reports. Runtime state, never configuration. */
5592
+ readonly identityRenamesDir: string;
5593
+ /** Directory holding one `<launcher-pid>.<identity>.json` record per launch in progress, written before the identity's farm is resynced and removed once the child has exited. Runtime state, never configuration: it is what lets an identity rename see a launch that has resynced but not yet started its child. */
5594
+ readonly launchesDir: string;
5591
5595
  /** Directory of the supervised sessions' shared state, one subdirectory per pool: the live sessions each launcher registers, so sessions on one account see each other, and the lock that serialises their moves. Runtime state, never configuration. */
5592
5596
  readonly superviseDir: string;
5593
5597
  /** Directory of the model-move requests the front door writes for supervised sessions that picked a model served under another identity: one `<sessionId>.json` per pending request, claimed and removed by the session's supervisor. Runtime state, never configuration. */
@@ -6041,6 +6045,11 @@ interface FarmStat {
6041
6045
  readonly mtimeMs: number;
6042
6046
  readonly sizeBytes: number;
6043
6047
  }
6048
+ /** How a private write is made safe against a crash. */
6049
+ interface PrivateWriteOptions {
6050
+ /** Flush the new contents to disk before they replace the old, and the directory after, so that once the call returns the file survives a power cut as far as the filesystem honours a flush. A record that is written ahead of an action, to say the action may have begun, needs this; an ordinary write does not and is not made slower by it. */
6051
+ readonly durable?: boolean;
6052
+ }
6044
6053
  /**
6045
6054
  * Every filesystem operation the farm resync performs, injected so the whole of `src/launcher/farm.ts` — symlink creation, materialisation, adoption copies, and the atomic swap itself — runs against an in-memory fake in tests and never against a real `~/.claude` or `~/.agent-shim`.
6046
6055
  *
@@ -6067,8 +6076,8 @@ interface FarmFs {
6067
6076
  readonly writeFileUtf8: (path: string, contents: string) => void;
6068
6077
  /** Creates a directory (and any missing parents) readable only by its owner: mode 0700, enforced on the leaf even when it already existed with a wider mode. For a directory holding capabilities another local account must never read. */
6069
6078
  readonly mkdirPrivate: (path: string) => void;
6070
- /** Writes a file's full contents as UTF-8 text readable only by its owner (mode 0600), atomically: a temporary sibling is written at that mode and renamed into place, so no reader ever sees a partial file or a wider mode. */
6071
- readonly writeFilePrivate: (path: string, contents: string) => void;
6079
+ /** Writes a file's full contents as UTF-8 text readable only by its owner (mode 0600), atomically: a temporary sibling is written at that mode and renamed into place, so no reader ever sees a partial file or a wider mode. With `options.durable` the contents are also flushed to disk, the file before the rename and the directory after it. */
6080
+ readonly writeFilePrivate: (path: string, contents: string, options?: PrivateWriteOptions) => void;
6072
6081
  /** Appends UTF-8 text to a file readable only by its owner (mode 0600), creating it at that mode when it is missing and narrowing an existing wider mode. The file is opened in append mode, so the text always lands at the end however the file grew; a reader running at the same moment can still see a trailing partial write. It is the primitive an append-only log with one writer per file is built on. */
6073
6082
  readonly appendFilePrivate: (path: string, contents: string) => void;
6074
6083
  /** Creates a file only if it does not already exist, returning false when it does. This is the exclusive-create the identity lock depends on for its mutual exclusion — a read-then-write pair would race. */
@@ -6100,7 +6109,8 @@ interface RunResult {
6100
6109
  }
6101
6110
  /** Runs an external command and captures its output, injected so no test ever shells out for real. Not used by this phase's own modules yet — declared here so every later module (branch-conditioned `when` evaluation, `check.ts`'s Keychain lookup) shares one injectable shape rather than each inventing its own. */
6102
6111
  interface RunPort {
6103
- readonly run: (command: string, args: readonly string[]) => RunResult;
6112
+ /** `input`, when given, is written to the child's standard input and then closed: the way to hand a command a secret without putting it in the argument list, which any local process can read from the process table. */
6113
+ readonly run: (command: string, args: readonly string[], input?: string) => RunResult;
6104
6114
  }
6105
6115
  /**
6106
6116
  * The running process itself: its environment, its logical argv, and the ability to terminate with an exit code.
@@ -6293,6 +6303,10 @@ interface ResyncFarmParams {
6293
6303
  readonly now: () => number;
6294
6304
  /** Distinguishes this resync's scratch and superseded directory names from any other process's. `${pid}.${uuid}` in real use; a fixed string in tests. */
6295
6305
  readonly uniqueSuffix: string;
6306
+ /**
6307
+ * Whether the identity still exists, asked once the lock is held and any interrupted swap recovered. A launch that waited for the lock while the identity was renamed or removed must not rebuild its directory, so a caller that can answer passes it and `resyncFarm` throws `IdentityGoneError` on `false`. Absent means the caller has no way to tell.
6308
+ */
6309
+ readonly identityExists?: () => boolean;
6296
6310
  readonly lock: {
6297
6311
  readonly pid: number;
6298
6312
  readonly isRunning: (pid: number) => boolean;
@@ -8595,7 +8609,7 @@ interface InjectedCredential {
8595
8609
  /**
8596
8610
  * Detects whether any of `AMBIENT_CREDENTIAL_VARS` is set to a non-empty value in `env`, returning the first one found in declared order, or undefined when none are set.
8597
8611
  *
8598
- * An empty string counts as unset, not set — confirmed load-bearing: one of Joe's real wrapper scripts (`o`, running Claude Code against OpenRouter) does `export ANTHROPIC_API_KEY=""` specifically to *clear* it so `ANTHROPIC_AUTH_TOKEN` takes effect instead, and this must never trip the guard.
8612
+ * An empty string counts as unset, not set, confirmed load-bearing: one real wrapper script (`o`, running Claude Code against OpenRouter) does `export ANTHROPIC_API_KEY=""` specifically to *clear* it so `ANTHROPIC_AUTH_TOKEN` takes effect instead, and this must never trip the guard.
8599
8613
  *
8600
8614
  * `injected`, when given, is the credential this launch exports for its own identity. Its variable holding exactly that value is not ambient: it is what a agent-shim launch of the same identity left in the environment of the session this one starts from (a `claude @work` run inside a `claude @work` session). The same variable holding any other value still counts.
8601
8615
  */
@@ -8877,6 +8891,94 @@ type PathShadowStatus = {
8877
8891
  readonly by: string;
8878
8892
  };
8879
8893
 
8894
+ /** Raised by any operation that requires an identity to already exist, when it does not. */
8895
+ declare class IdentityNotFoundError extends CliError {
8896
+ readonly name: string;
8897
+ constructor(name: string);
8898
+ }
8899
+ /** Raised by `addIdentity` when an identity with the given name already has an `identity.json`. */
8900
+ declare class IdentityAlreadyExistsError extends CliError {
8901
+ readonly identityName: string;
8902
+ constructor(identityName: string);
8903
+ }
8904
+ /** Raised by `addIdentity` when `name` fails `IdentitySchema`'s own naming rule — it must start with a letter or number and may then contain letters, numbers, dots, hyphens, underscores, and at signs, so an email address names an identity directly while a *leading* `@` stays invalid (it would collide with the `@name` selector syntax's first-`@` split). */
8905
+ declare class InvalidIdentityNameError extends CliError {
8906
+ readonly attemptedName: string;
8907
+ constructor(attemptedName: string);
8908
+ }
8909
+ declare function identityExists(paths: LayoutPaths, name: string): boolean;
8910
+ /** Reads and validates one identity's `identity.json`, or undefined when it does not exist. */
8911
+ declare function readIdentity(paths: LayoutPaths, name: string): Identity | undefined;
8912
+ /**
8913
+ * Creates a new identity: validates `name` against `IdentitySchema`'s own naming rule and writes a fresh `identity.json` with `allowAmbientCredential: false` and no `defaultConfigProfile`.
8914
+ *
8915
+ * Throws a `CliError` naming the command that finishes the rename when an unfinished rename names `name` (see `requireNoUnfinishedRenameNaming`), `IdentityAlreadyExistsError` if an identity with this name already has an `identity.json`, since `add` never silently overwrites an existing identity. Throws `InvalidIdentityNameError` when `name` fails `IdentitySchema`'s naming rule, rather than letting the underlying `ZodError` escape as an unhandled crash.
8916
+ */
8917
+ declare function addIdentity(paths: LayoutPaths, name: string): Identity;
8918
+ /**
8919
+ * Persists `name` as the active identity, written atomically as plain text (not JSON — this file is read by `decideIdentity` in `src/launcher/identity.ts` via a simple UTF-8 read-and-trim, matching the README's documented `~/.agent-shim/active-identity` file).
8920
+ *
8921
+ * `name` may be a `pool:<name>` selector, which makes launches pick a member of that pool. Throws `IdentityNotFoundError` when no identity with this name exists yet, and `PoolNotFoundError` for a pool that is not defined: selecting either would silently persist a name nothing else can ever load.
8922
+ */
8923
+ declare function useIdentity(paths: LayoutPaths, name: string): void;
8924
+ /** Reads the persisted active-identity file, or undefined when none is set. */
8925
+ declare function readActiveIdentity(paths: LayoutPaths): string | undefined;
8926
+ /**
8927
+ * Whether a directory name directly under `identitiesDir` names an actual identity, rather than one of agent-shim's own farm directories.
8928
+ *
8929
+ * `IdentitySchema` requires an identity name to start with a letter or digit, so a leading `.` can only be a resync's own bookkeeping: a `.<identity>.scratch.<suffix>` tree still being built, or a `.<identity>.previous.<suffix>` superseded farm retained for `agent-shim identity resolve-conflicts`. Neither is an identity, and neither should be reported as a broken one for lacking an `identity.json` a resync never put there.
8930
+ */
8931
+ declare function isIdentityDirectoryName(name: string): boolean;
8932
+ /** An entry directly under `identitiesDir` that cannot be reached, and why: `code` is the error the filesystem gave. */
8933
+ interface UnreachableIdentityEntry {
8934
+ readonly name: string;
8935
+ readonly code: string;
8936
+ }
8937
+ /** One identity as reported by `listIdentities`, whose `identity.json` parsed and validated cleanly. */
8938
+ interface IdentityListEntry {
8939
+ readonly name: string;
8940
+ readonly identity: Identity;
8941
+ readonly isActive: boolean;
8942
+ readonly problem?: never;
8943
+ }
8944
+ /** One identity whose `identity.json` is present but unreadable — malformed JSON, or valid JSON this version's `IdentitySchema` rejects. `problem` carries the reason, already flattened onto a single line. */
8945
+ interface UnreadableIdentityListEntry {
8946
+ readonly name: string;
8947
+ readonly identity?: never;
8948
+ readonly isActive: boolean;
8949
+ readonly problem: string;
8950
+ }
8951
+ /** Either shape `listIdentities` can report, discriminated by which of `identity`/`problem` is present rather than by a tag field — the two are never simultaneously satisfiable. */
8952
+ type IdentityListing = IdentityListEntry | UnreadableIdentityListEntry;
8953
+ /**
8954
+ * Lists every identity under `identitiesDir`, marking which one (if any) is currently active.
8955
+ *
8956
+ * One identity whose `identity.json` cannot be read is reported as its own `UnreadableIdentityListEntry` rather than aborting the whole listing. A single bad file blocking `identity list` outright is exactly the failure mode that hides every *other* identity from view at the moment the user most needs to see them — and the file need not even be corrupt to land here, since a name written by a newer agent-shim whose naming rule has since widened is rejected outright by an older binary's own copy of `IdentitySchema`.
8957
+ */
8958
+ declare function listIdentities(paths: LayoutPaths): readonly IdentityListing[];
8959
+ /**
8960
+ * Sets `identity`'s `defaultConfigProfile` field, or clears it when `profileName` is undefined. Throws `IdentityNotFoundError` when the identity does not exist. Whether the profile exists is the caller's concern: `identity set --default-profile` checks it first.
8961
+ */
8962
+ declare function setDefaultConfigProfile(paths: LayoutPaths, identityName: string, profileName: string | undefined): Identity;
8963
+ /**
8964
+ * Patches `identity`'s `allowAmbientCredential` field. Throws `IdentityNotFoundError` when the identity does not exist.
8965
+ */
8966
+ declare function setAllowAmbientCredential(paths: LayoutPaths, identityName: string, allow: boolean): Identity;
8967
+ /** The change `setIdentityCredential` makes: new sources and/or a new target for the credential block, or `false` to remove the block and return the identity to its stored login. */
8968
+ type IdentityCredentialChange = {
8969
+ readonly sources?: readonly CredentialSource[];
8970
+ readonly target?: CredentialTarget;
8971
+ readonly cache?: CredentialCache | false;
8972
+ } | false;
8973
+ /**
8974
+ * Sets, changes or removes `identityName`'s credential block. New `sources` replace the whole ordered list (the order is the meaning); a `target` alone keeps the existing sources, and so needs a credential block to exist already. Throws `IdentityNotFoundError` when the identity does not exist, and `UsageError` when only a target is given for an identity with no credential yet.
8975
+ */
8976
+ declare function setIdentityCredential(paths: LayoutPaths, identityName: string, change: IdentityCredentialChange): Identity;
8977
+ /**
8978
+ * Deletes identity `name` entirely: its directory under `identitiesDir` (the farm, its `identity.json`, and whatever that farm holds unshared, credentials included), its resync lock, any scratch or superseded farm a resync left behind, and the active-identity selection when it names this identity. Data shared into `~/.claude` stays there, since the farm only ever symlinks to it. Throws a `CliError` naming the command that finishes the rename when an unfinished rename names `name`, and `IdentityNotFoundError` when the identity does not exist.
8979
+ */
8980
+ declare function removeIdentity(paths: LayoutPaths, name: string): void;
8981
+
8880
8982
  /** One routed request, appended to the usage log when its response has finished. */
8881
8983
  declare const UsageRecordSchema: z.ZodObject<{
8882
8984
  schemaVersion: z.ZodLiteral<1>;
@@ -9211,6 +9313,35 @@ type FrontDoorSupervisorListing = {
9211
9313
  readonly message: string;
9212
9314
  };
9213
9315
 
9316
+ /**
9317
+ * What a rename writes before its first step and keeps current until its last: the pair of names and each step with whether it was begun and whether it is done. A rename that is killed, or whose rollback fails, leaves its journal behind, and that is the only trace it leaves of being unfinished: a re-run of the same pair finds it and carries on, `doctor` reports it, and a rename of anything else that names either identity refuses until it is dealt with.
9318
+ *
9319
+ * The marks say how far a rename got, for a person and for `doctor`; they are not what a re-run trusts. A re-run plans from what is on disk, so a step that was applied is simply no longer in its plan, and one that was applied but not marked is not applied twice. A step is marked as begun before it runs and as done after, so a record shows every step that may have taken effect, which is what discarding a record on the strength of it needs.
9320
+ */
9321
+ declare const RenameJournalSchema: z.ZodObject<{
9322
+ version: z.ZodLiteral<1>;
9323
+ from: z.ZodString;
9324
+ to: z.ZodString;
9325
+ startedAt: z.ZodISODateTime;
9326
+ pid: z.ZodNumber;
9327
+ steps: z.ZodArray<z.ZodObject<{
9328
+ description: z.ZodString;
9329
+ done: z.ZodBoolean;
9330
+ started: z.ZodBoolean;
9331
+ }, z.core.$strict>>;
9332
+ }, z.core.$strict>;
9333
+ type RenameJournal = z.infer<typeof RenameJournalSchema>;
9334
+ /** A file in the journals directory that is not a journal this release can read, and why. */
9335
+ interface UnreadableRenameJournal {
9336
+ readonly file: string;
9337
+ readonly detail: string;
9338
+ }
9339
+ /** What is in the journals directory: the unfinished renames, and the files that are not journals. */
9340
+ interface RenameJournalListing {
9341
+ readonly journals: readonly RenameJournal[];
9342
+ readonly unreadable: readonly UnreadableRenameJournal[];
9343
+ }
9344
+
9214
9345
  /**
9215
9346
  * 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`.
9216
9347
  *
@@ -9311,10 +9442,16 @@ interface RunDoctorParams {
9311
9442
  readonly raw: string | undefined;
9312
9443
  };
9313
9444
  readonly identities: readonly DoctorIdentityInput[];
9445
+ /** Each identity's last recorded usage snapshot, by identity name. Omit to skip checking that pools and jobs read only windows their identities receive; an identity missing from it has no readable snapshot, so what it receives is unknown and nothing is reported for it. */
9446
+ readonly usageSnapshots?: Readonly<Record<string, UsageSnapshot>>;
9314
9447
  readonly configProfiles: readonly DoctorConfigProfileInput[];
9315
9448
  readonly providers: readonly DoctorProviderInput[];
9316
9449
  /** The recorded former names of renamed providers. Omit to leave them out of the findings. */
9317
9450
  readonly providerAliases?: ProviderAliases;
9451
+ /** The journals of identity renames that were left unfinished, and the files in their directory that are not journals. Omit to leave renames out of the findings. */
9452
+ readonly renameJournals?: RenameJournalListing;
9453
+ /** The entries of the identities directory that cannot be reached (a symlink the filesystem would not follow, or a directory nobody can enter), which are not counted as identities. Omit to leave them out of the findings. */
9454
+ readonly unreachableIdentities?: readonly UnreachableIdentityEntry[];
9318
9455
  readonly directoryRules: DoctorFileInput;
9319
9456
  readonly globalConfig: DoctorFileInput;
9320
9457
  /** The parsed `models` block of the global config, when one is defined. Omit to skip the models checks. */
@@ -9451,10 +9588,19 @@ type CodexApiRouter = ReturnType<typeof createCodexApiRouter>;
9451
9588
  /** The Codex procedures alone as a client sees them. */
9452
9589
  type CodexApiClient = RouterClient<CodexApiRouter>;
9453
9590
 
9591
+ /** The outcome of one external command, as `RunPort` reports it. */
9592
+ interface ReplayRunResult {
9593
+ readonly status: number | null;
9594
+ readonly stdout: string;
9595
+ readonly stderr: string;
9596
+ }
9597
+ /** Runs an external command without blocking the calling thread. */
9598
+ type AsyncRun = (command: string, args: readonly string[]) => Promise<ReplayRunResult>;
9599
+
9454
9600
  /**
9455
9601
  * 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.
9456
9602
  *
9457
- * Each procedure calls the store function its verb 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. 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, `BAD_REQUEST` for anything else the store refuses), and every outcome is the `--json` object the verb prints.
9603
+ * 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.
9458
9604
  *
9459
9605
  * What the API deliberately does not accept: a credential source of the `command` kind, a provider's `env` block and a statusline patch setting the `extra` group, all of which would let a holder of the control token run a program of their choosing at the next launch; the interactive wizards and `configure`, which need a terminal; a removal without `confirm: true`, and a change of an existing provider's `baseUrl` that does not restate its credential block. Those stay on the CLI.
9460
9606
  */
@@ -9464,6 +9610,11 @@ interface ConfigApiDeps {
9464
9610
  readonly expectedToken: string;
9465
9611
  /** The configuration tree the stores operate on. */
9466
9612
  readonly paths: LayoutPaths;
9613
+ /** How the door asks the macOS Keychain whether a login is already filed for a directory an identity is about to be created in: `security` run without blocking the event loop, and the platform, since only macOS has a Keychain. The door builds it with `doorKeychainProbe`. */
9614
+ readonly keychain: {
9615
+ readonly runAsync: AsyncRun;
9616
+ readonly platform: NodeJS.Platform;
9617
+ };
9467
9618
  }
9468
9619
  /** Builds the configuration router: one procedure per write, every one behind the control-token middleware. */
9469
9620
  declare function createConfigApiRouter(deps: ConfigApiDeps): {
@@ -9471,6 +9622,7 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
9471
9622
  identity: {
9472
9623
  add: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
9473
9624
  name: zod.ZodString;
9625
+ keepKeychainLogin: zod.ZodOptional<zod.ZodBoolean>;
9474
9626
  }, zod_v4_core.$strict>, zod.ZodObject<{
9475
9627
  action: zod.ZodLiteral<"created">;
9476
9628
  kind: zod.ZodLiteral<"identity">;
@@ -14125,13 +14277,9 @@ interface LaunchPlan {
14125
14277
  readonly hold: () => HoldOutcome;
14126
14278
  }
14127
14279
  /**
14128
- * Prepares one `claude` launch, in order:
14280
+ * Decides one launch and brings everything its child depends on into place; see `prepareRegisteredLaunch` for the steps.
14129
14281
  *
14130
- * `CLAUDE_CONFIG_DIR` escape-hatch check, then the identity/config-profile decision, the provider decision, the identity's own credential, the ambient-credential guard, the config-gated launch-time update check (fired after the decision line and never awaited; see `runLaunchUpdateCheck`), farm resync, version discovery, flag resolution (and, when headroom resolved on, daemon bring-up), the extra-flags split, and the final argument list and environment, returned as a `LaunchPlan` for the caller to spawn. It refuses through `params.proc.exit`, so a caller that is not a command line process passes a `proc` whose `exit` throws.
14131
- *
14132
- * A launch that resolves an identity with no `identity.json`, or a configuration profile with no file, is refused with exit 1 naming the missing name and how it was selected: silently proceeding would create a brand-new login for a mistyped `@name`, or launch with a whole cascade layer missing. On a terminal, `src/runClaude.ts` offers to create either before this runs.
14133
- *
14134
- * The farm resync is skipped when `CLAUDE_CONFIG_DIR` was already set (the escape hatch means the user has named a configuration directory explicitly, and agent-shim manages neither its contents nor its lifetime) and when no identity resolved at all (a bare launch against plain `~/.claude`, matching the legacy tool's own behaviour). In both cases there is no agent-shim-managed farm for a resync to act on.
14282
+ * When the launch resyncs an identity's farm it records itself first (see `registerLaunch`), and the record stays until the returned plan is released. A launch that fails after recording removes the record before the failure propagates, so a library host that outlives the failure does not leave an identity that can never be renamed.
14135
14283
  */
14136
14284
  declare function prepareLaunch(params: PrepareLaunchParams): LaunchPlan;
14137
14285
  /**
@@ -16546,6 +16694,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
16546
16694
  identity: {
16547
16695
  add: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
16548
16696
  name: zod.ZodString;
16697
+ keepKeychainLogin: zod.ZodOptional<zod.ZodBoolean>;
16549
16698
  }, zod_v4_core.$strict>, zod.ZodObject<{
16550
16699
  action: zod.ZodLiteral<"created">;
16551
16700
  kind: zod.ZodLiteral<"identity">;
@@ -21075,6 +21224,11 @@ declare const CredentialSummarySchema: z.ZodObject<{
21075
21224
  declare const ConfigNameInputSchema: z.ZodObject<{
21076
21225
  name: z.ZodString;
21077
21226
  }, z.core.$strict>;
21227
+ /** The input of `config.identity.add`: the name, and `keepKeychainLogin`, the API's form of `identity add --keep-keychain-login`: the caller's statement that a login the macOS Keychain holds for the identity's directory is wanted, which is otherwise refused because the new identity would start signed in as that account. */
21228
+ declare const ConfigIdentityAddInputSchema: z.ZodObject<{
21229
+ name: z.ZodString;
21230
+ keepKeychainLogin: z.ZodOptional<z.ZodBoolean>;
21231
+ }, z.core.$strict>;
21078
21232
  declare const ConfigIdentityAddOutputSchema: z.ZodObject<{
21079
21233
  action: z.ZodLiteral<"created">;
21080
21234
  kind: z.ZodLiteral<"identity">;
@@ -26524,7 +26678,7 @@ interface ConditionContext {
26524
26678
  readonly branchDetached?: boolean;
26525
26679
  readonly env: Readonly<Record<string, string | undefined>>;
26526
26680
  /**
26527
- * The pool-selection facts a member entry's policy condition reads. Present only when the condition guards a pool member, so the same reference namespace serves the cascade and the pool: `quota.fiveHour.remaining`, `quota.fiveHour.utilization`, `quota.fiveHour.hoursUntilReset`, the same three under `quota.sevenDay`, and under `quota.extraUsage` for an account metered by extra usage alone (an Enterprise one with no plan windows), `quota.burnPerHour` (the five-hour window's observed utilisation pace, in fractions per hour), `session.resuming` (this launch resumes or continues a conversation) and `session.lastPickHoursAgo` (how long ago this directory last picked this member). Conversation context is deliberately not provided: nothing the door holds knows it, so a condition referencing it is indeterminate, naming the missing fact, rather than guessed.
26681
+ * The pool-selection facts a member entry's policy condition reads. Present only when the condition guards a pool member, so the same reference namespace serves the cascade and the pool: `quota.fiveHour.remaining`, `quota.fiveHour.utilization`, `quota.fiveHour.hoursUntilReset`, the same three under `quota.sevenDay`, and under `quota.extraUsage` for an account metered by extra usage alone (an Enterprise one with no plan windows), `quota.burnPerHour` (the five-hour window's observed utilisation pace, in fractions per hour, so absent for an account without that window), `session.resuming` (this launch resumes or continues a conversation) and `session.lastPickHoursAgo` (how long ago this directory last picked this member). Conversation context is deliberately not provided: nothing the door holds knows it, so a condition referencing it is indeterminate, naming the missing fact, rather than guessed. A window the account does not have is absent in the same way, never a guessed zero: a verified Ultra account reports no five-hour window, so a condition reading `quota.fiveHour.*` or `quota.burnPerHour` is indeterminate for it on every evaluation, which `doctor` reports.
26528
26682
  */
26529
26683
  readonly pool?: {
26530
26684
  readonly fiveHour?: PoolWindowFacts;
@@ -26613,89 +26767,6 @@ declare function ensureHeadroom(params: {
26613
26767
  readonly socketPath: string;
26614
26768
  };
26615
26769
 
26616
- /** Raised by any operation that requires an identity to already exist, when it does not. */
26617
- declare class IdentityNotFoundError extends CliError {
26618
- readonly name: string;
26619
- constructor(name: string);
26620
- }
26621
- /** Raised by `addIdentity` when an identity with the given name already has an `identity.json`. */
26622
- declare class IdentityAlreadyExistsError extends CliError {
26623
- readonly identityName: string;
26624
- constructor(identityName: string);
26625
- }
26626
- /** Raised by `addIdentity` when `name` fails `IdentitySchema`'s own naming rule — it must start with a letter or number and may then contain letters, numbers, dots, hyphens, underscores, and at signs, so an email address names an identity directly while a *leading* `@` stays invalid (it would collide with the `@name` selector syntax's first-`@` split). */
26627
- declare class InvalidIdentityNameError extends CliError {
26628
- readonly attemptedName: string;
26629
- constructor(attemptedName: string);
26630
- }
26631
- declare function identityExists(paths: LayoutPaths, name: string): boolean;
26632
- /** Reads and validates one identity's `identity.json`, or undefined when it does not exist. */
26633
- declare function readIdentity(paths: LayoutPaths, name: string): Identity | undefined;
26634
- /**
26635
- * Creates a new identity: validates `name` against `IdentitySchema`'s own naming rule and writes a fresh `identity.json` with `allowAmbientCredential: false` and no `defaultConfigProfile`.
26636
- *
26637
- * Throws `IdentityAlreadyExistsError` if an identity with this name already has an `identity.json` — `add` never silently overwrites an existing identity. Throws `InvalidIdentityNameError` when `name` fails `IdentitySchema`'s naming rule, rather than letting the underlying `ZodError` escape as an unhandled crash.
26638
- */
26639
- declare function addIdentity(paths: LayoutPaths, name: string): Identity;
26640
- /**
26641
- * Persists `name` as the active identity, written atomically as plain text (not JSON — this file is read by `decideIdentity` in `src/launcher/identity.ts` via a simple UTF-8 read-and-trim, matching the README's documented `~/.agent-shim/active-identity` file).
26642
- *
26643
- * `name` may be a `pool:<name>` selector, which makes launches pick a member of that pool. Throws `IdentityNotFoundError` when no identity with this name exists yet, and `PoolNotFoundError` for a pool that is not defined: selecting either would silently persist a name nothing else can ever load.
26644
- */
26645
- declare function useIdentity(paths: LayoutPaths, name: string): void;
26646
- /** Reads the persisted active-identity file, or undefined when none is set. */
26647
- declare function readActiveIdentity(paths: LayoutPaths): string | undefined;
26648
- /**
26649
- * Whether a directory name directly under `identitiesDir` names an actual identity, rather than one of agent-shim's own farm directories.
26650
- *
26651
- * `IdentitySchema` requires an identity name to start with a letter or digit, so a leading `.` can only be a resync's own bookkeeping: a `.<identity>.scratch.<suffix>` tree still being built, or a `.<identity>.previous.<suffix>` superseded farm retained for `agent-shim identity resolve-conflicts`. Neither is an identity, and neither should be reported as a broken one for lacking an `identity.json` a resync never put there.
26652
- */
26653
- declare function isIdentityDirectoryName(name: string): boolean;
26654
- /** One identity as reported by `listIdentities`, whose `identity.json` parsed and validated cleanly. */
26655
- interface IdentityListEntry {
26656
- readonly name: string;
26657
- readonly identity: Identity;
26658
- readonly isActive: boolean;
26659
- readonly problem?: never;
26660
- }
26661
- /** One identity whose `identity.json` is present but unreadable — malformed JSON, or valid JSON this version's `IdentitySchema` rejects. `problem` carries the reason, already flattened onto a single line. */
26662
- interface UnreadableIdentityListEntry {
26663
- readonly name: string;
26664
- readonly identity?: never;
26665
- readonly isActive: boolean;
26666
- readonly problem: string;
26667
- }
26668
- /** Either shape `listIdentities` can report, discriminated by which of `identity`/`problem` is present rather than by a tag field — the two are never simultaneously satisfiable. */
26669
- type IdentityListing = IdentityListEntry | UnreadableIdentityListEntry;
26670
- /**
26671
- * Lists every identity under `identitiesDir`, marking which one (if any) is currently active.
26672
- *
26673
- * One identity whose `identity.json` cannot be read is reported as its own `UnreadableIdentityListEntry` rather than aborting the whole listing. A single bad file blocking `identity list` outright is exactly the failure mode that hides every *other* identity from view at the moment the user most needs to see them — and the file need not even be corrupt to land here, since a name written by a newer agent-shim whose naming rule has since widened is rejected outright by an older binary's own copy of `IdentitySchema`.
26674
- */
26675
- declare function listIdentities(paths: LayoutPaths): readonly IdentityListing[];
26676
- /**
26677
- * Sets `identity`'s `defaultConfigProfile` field, or clears it when `profileName` is undefined. Throws `IdentityNotFoundError` when the identity does not exist. Whether the profile exists is the caller's concern: `identity set --default-profile` checks it first.
26678
- */
26679
- declare function setDefaultConfigProfile(paths: LayoutPaths, identityName: string, profileName: string | undefined): Identity;
26680
- /**
26681
- * Patches `identity`'s `allowAmbientCredential` field. Throws `IdentityNotFoundError` when the identity does not exist.
26682
- */
26683
- declare function setAllowAmbientCredential(paths: LayoutPaths, identityName: string, allow: boolean): Identity;
26684
- /** The change `setIdentityCredential` makes: new sources and/or a new target for the credential block, or `false` to remove the block and return the identity to its stored login. */
26685
- type IdentityCredentialChange = {
26686
- readonly sources?: readonly CredentialSource[];
26687
- readonly target?: CredentialTarget;
26688
- readonly cache?: CredentialCache | false;
26689
- } | false;
26690
- /**
26691
- * Sets, changes or removes `identityName`'s credential block. New `sources` replace the whole ordered list (the order is the meaning); a `target` alone keeps the existing sources, and so needs a credential block to exist already. Throws `IdentityNotFoundError` when the identity does not exist, and `UsageError` when only a target is given for an identity with no credential yet.
26692
- */
26693
- declare function setIdentityCredential(paths: LayoutPaths, identityName: string, change: IdentityCredentialChange): Identity;
26694
- /**
26695
- * Deletes identity `name` entirely: its directory under `identitiesDir` (the farm, its `identity.json`, and whatever that farm holds unshared, credentials included), its resync lock, any scratch or superseded farm a resync left behind, and the active-identity selection when it names this identity. Data shared into `~/.claude` stays there, since the farm only ever symlinks to it. Throws `IdentityNotFoundError` when the identity does not exist.
26696
- */
26697
- declare function removeIdentity(paths: LayoutPaths, name: string): void;
26698
-
26699
26770
  /** Raised by any operation that requires a configuration profile to already exist, when it does not. */
26700
26771
  declare class ProfileNotFoundError extends CliError {
26701
26772
  readonly profileName: string;
@@ -26790,14 +26861,14 @@ declare class LegacyProviderFileError extends CliError {
26790
26861
  readonly conversion: LegacyProviderConversion;
26791
26862
  constructor(filePath: string, conversion: LegacyProviderConversion);
26792
26863
  }
26793
- /** Reads and validates one provider definition, or undefined when it does not exist. */
26864
+ /** Reads and validates one provider definition, or undefined when it does not exist. Throws `ConfigFileNotJsonError` for a file that is not JSON, and what `parseProviderFile` throws for one that is not a valid definition. */
26794
26865
  declare function readProvider(paths: LayoutPaths, name: string): Provider | undefined;
26795
26866
  /** One provider definition as reported by `listProviders`. */
26796
26867
  interface ProviderListEntry {
26797
26868
  readonly name: string;
26798
26869
  readonly provider: Provider;
26799
26870
  }
26800
- /** Lists every provider under `providersDir` that has a valid `<name>.json`. A file that fails validation is skipped here and reported through `onInvalid` (standard error by default); `provider list` is the place a broken definition gets surfaced, not a launch. */
26871
+ /** 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. */
26801
26872
  declare function listProviders(paths: LayoutPaths, onInvalid?: (name: string, message: string) => void): readonly ProviderListEntry[];
26802
26873
  /** The credential targets a provider may use. */
26803
26874
  type ProviderCredentialTarget = (typeof PROVIDER_CREDENTIAL_TARGETS)[number];
@@ -27111,5 +27182,5 @@ declare const OWN_CLI_FILE_NAME = "cli.cjs";
27111
27182
  */
27112
27183
  declare function agentShimCliPath(distDir?: string | undefined): string;
27113
27184
 
27114
- 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, 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, 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_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_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, RcStreamEnvelopeSchema, RcStreamEventSchema, ResetRowSchema, ResetScheduleSchema, SessionAgentTreeSchema, SessionLookupError, SessionSummarySchema, TaskItemSchema, USAGE_EVENT_SOURCE, UpdateCheckOutputSchema, 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, createRcSessionTracker, createRcStreamHub, createSseParser, describeProviderEndpoint, detectAmbientCredential, doorApiAuth, doorApiNodeHandlerOf, effectiveWindow, endRcSession, ensureCa, ensureFrontDoor, ensureHeadroom, evaluateAmbientCredentialGuard, evaluateWhen, fetchThroughWebProxy, formatAmbientCredentialGuardMessage, formatCheckReport, formatDoctorReport, formatFrontDoorStatus, forwardableHeaders, frontDoorApiClient, frontDoorApiFromState, frontDoorApiLink, frontDoorRcApiClient, frontDoorRcControl, generateCa, getRcSessionContextUsage, getRcSessionMcpStatus, getRcSessionUsage, headroomSocketTarget, identityExists, 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, rcWebFetchAllowsPrivateFromEnv, readActiveIdentity, readCodexAccount, readCodexRateLimits, readDirectoryRules, readFarmManifest, readFrontDoorControlMaterial, readGlobalConfig, readIdentity, 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, writeDirectoryRules };
27185
+ 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, 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_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_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, RcStreamEnvelopeSchema, RcStreamEventSchema, ResetRowSchema, ResetScheduleSchema, SessionAgentTreeSchema, SessionLookupError, SessionSummarySchema, TaskItemSchema, USAGE_EVENT_SOURCE, UpdateCheckOutputSchema, 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, createRcSessionTracker, createRcStreamHub, createSseParser, describeProviderEndpoint, detectAmbientCredential, doorApiAuth, doorApiNodeHandlerOf, effectiveWindow, endRcSession, ensureCa, ensureFrontDoor, ensureHeadroom, evaluateAmbientCredentialGuard, evaluateWhen, fetchThroughWebProxy, formatAmbientCredentialGuardMessage, formatCheckReport, formatDoctorReport, formatFrontDoorStatus, forwardableHeaders, frontDoorApiClient, frontDoorApiFromState, frontDoorApiLink, frontDoorRcApiClient, frontDoorRcControl, generateCa, getRcSessionContextUsage, getRcSessionMcpStatus, getRcSessionUsage, headroomSocketTarget, identityExists, 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, rcWebFetchAllowsPrivateFromEnv, readActiveIdentity, readCodexAccount, readCodexRateLimits, readDirectoryRules, readFarmManifest, readFrontDoorControlMaterial, readGlobalConfig, readIdentity, 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, writeDirectoryRules };
27115
27186
  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, 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, RcPermissionMode, RcPresenceAnswer, RcRateLimitInfo, RcRateLimitWindow, RcReadFileEncoding, RcReadFileOptions, RcSelfHostCredentialRecord, RcSelfHostDeps, RcSelfHostMintResult, RcSelfHostSurface, RcSessionStatus, RcSessionSummary, RcSessionTracker, RcSessionTrackerDeps, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-shim",
3
- "version": "11.81.0",
3
+ "version": "11.83.0",
4
4
  "description": "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
5
5
  "license": "MIT",
6
6
  "author": "Joseph Mearman <joseph@mearman.co.uk>",