agent-shim 9.19.1 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +1628 -1029
- package/dist/index.cjs +855 -306
- package/dist/index.mjs +839 -291
- package/dist/types/index.d.ts +215 -147
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -1332,8 +1332,8 @@ declare const HeadroomGlobalConfigSchema: z.ZodObject<{
|
|
|
1332
1332
|
targetRatio: z.ZodOptional<z.ZodNumber>;
|
|
1333
1333
|
ccr: z.ZodOptional<z.ZodEnum<{
|
|
1334
1334
|
default: "default";
|
|
1335
|
-
lossless: "lossless";
|
|
1336
1335
|
none: "none";
|
|
1336
|
+
lossless: "lossless";
|
|
1337
1337
|
}>>;
|
|
1338
1338
|
rolloutChannel: z.ZodOptional<z.ZodEnum<{
|
|
1339
1339
|
beta: "beta";
|
|
@@ -1460,8 +1460,8 @@ declare const GlobalConfigSchema: z.ZodObject<{
|
|
|
1460
1460
|
targetRatio: z.ZodOptional<z.ZodNumber>;
|
|
1461
1461
|
ccr: z.ZodOptional<z.ZodEnum<{
|
|
1462
1462
|
default: "default";
|
|
1463
|
-
lossless: "lossless";
|
|
1464
1463
|
none: "none";
|
|
1464
|
+
lossless: "lossless";
|
|
1465
1465
|
}>>;
|
|
1466
1466
|
rolloutChannel: z.ZodOptional<z.ZodEnum<{
|
|
1467
1467
|
beta: "beta";
|
|
@@ -1703,12 +1703,14 @@ interface LayoutPaths {
|
|
|
1703
1703
|
readonly categoriesLocalFile: string;
|
|
1704
1704
|
/** Path to the claude-shim.json marker recording where `agent-shim shim enable` last placed a `claude`-named copy of this executable, and how. */
|
|
1705
1705
|
readonly claudeShimFile: string;
|
|
1706
|
-
/** Directory holding the headroom daemon's coordination state: the state file, the start lock, the session registry, and the socket directory. */
|
|
1706
|
+
/** Directory holding the headroom daemon's coordination state: the state file, the start lock, the session registry, and the owner-only socket directory, which also holds the allowlist file. */
|
|
1707
1707
|
readonly headroomDir: string;
|
|
1708
|
-
/** Path to the headroom supervisor's state file: pids, socket path, version, allowlist
|
|
1708
|
+
/** Path to the headroom supervisor's state file: pids, socket path, version, the hash of the allowlist the daemon serves, last error. One unversioned name every release shares, arbitrated by the ownership rules in `headroom/state.ts` rather than by a version in the file name. */
|
|
1709
1709
|
readonly headroomStateFile: string;
|
|
1710
1710
|
/** The previous release's versioned name for the state file, read only while a supervisor from that release is still alive and removed once its generation has drained (see `migrateHeadroomState`). */
|
|
1711
1711
|
readonly headroomLegacyStateFile: string;
|
|
1712
|
+
/** Path to the file the headroom daemon reads its upstream allowlist from (`--allowed-base-urls-file`): the direct origin of every live front door, one per line. It lives in the owner-only socket directory because headroom refuses an allowlist file whose directory another user could write to, and that directory is the one this tool already creates mode 0700 (narrowing it if it existed wider) and checks before every daemon start. The supervisor replaces the file owner-only and atomically whenever a door's origin changes, and the daemon re-reads it on its next request, so a moved or retired front door never needs a restart. */
|
|
1713
|
+
readonly headroomAllowlistFile: string;
|
|
1712
1714
|
/** Directory, mode 0700, holding the headroom daemon's unix socket: one `<supervisor-pid>.sock` per supervisor generation. Only its owner can enter it, which is what authenticates the door's hop to the daemon. */
|
|
1713
1715
|
readonly headroomSocketDir: string;
|
|
1714
1716
|
/** Path to the exclusive-create marker guarding "who spawns the supervisor" so concurrent launches start at most one. */
|
|
@@ -1741,6 +1743,8 @@ interface LayoutPaths {
|
|
|
1741
1743
|
readonly frontdoorControlTokenFile: string;
|
|
1742
1744
|
/** Directory holding one `<launcher-pid>.json` session-registry entry per live launch routed through the front door. */
|
|
1743
1745
|
readonly frontdoorSessionsDir: string;
|
|
1746
|
+
/** Directory holding one `<supervisor-pid>.json` per live front door, recording that door's own direct port: every door still serving sessions forwards its headroom traffic back to its own direct origin, so headroom must admit each of them, not only the one `state.json` names. */
|
|
1747
|
+
readonly frontdoorDirectRecordsDir: string;
|
|
1744
1748
|
/**
|
|
1745
1749
|
* Directory holding one `<cse-session-id>.json` Remote Control client credential per observed session, mode 0700 with 0600 files: the OAuth-kind bearer and protocol headers the door replays as the session's attached client, persisted so a door generation that starts after a session's create can still attach. The same secret the identity's own store holds, at the same owner-only protection.
|
|
1746
1750
|
*/
|
|
@@ -2204,7 +2208,7 @@ interface HeadroomUp {
|
|
|
2204
2208
|
/**
|
|
2205
2209
|
* Everything the launcher needs from the headroom daemon, injected so its daemon-supervision side effects stay behind a port and the launcher's own logic stays pure over it (`src/realPorts.ts` wires the real one; tests wire fakes).
|
|
2206
2210
|
*
|
|
2207
|
-
* `ensure` brings the daemon up (spawning the detached supervisor when nothing healthy is running) and registers this launch in its session registry; `release` removes that registration when the spawned `claude` exits. `routesProvider` says the launch sends a provider's traffic through the daemon, which needs the daemon to
|
|
2211
|
+
* `ensure` brings the daemon up (spawning the detached supervisor when nothing healthy is running) and registers this launch in its session registry; `release` removes that registration when the spawned `claude` exits. `routesProvider` says the launch sends a provider's traffic through the daemon, which needs the daemon to be serving an allowlist holding the front door's current direct origin: `ensure` then waits until the supervisor has written it to the daemon's allowlist file and recorded it, instead of registering against a daemon that would reject every request.
|
|
2208
2212
|
*/
|
|
2209
2213
|
interface HeadroomPort {
|
|
2210
2214
|
readonly ensure: (options: Readonly<{
|
|
@@ -3697,7 +3701,7 @@ type HeadroomFs = Pick<FarmFs, "mkdirp" | "mkdirPrivate" | "readFileUtf8" | "wri
|
|
|
3697
3701
|
|
|
3698
3702
|
/** What an `lstat` (which never follows symlinks) reports about one path, narrowed to what authenticating the socket needs. */
|
|
3699
3703
|
interface SocketPathStat {
|
|
3700
|
-
readonly kind: "dir" | "socket" | "symlink" | "other";
|
|
3704
|
+
readonly kind: "dir" | "file" | "socket" | "symlink" | "other";
|
|
3701
3705
|
/** The owning user id. */
|
|
3702
3706
|
readonly uid: number;
|
|
3703
3707
|
/** The permission bits, without the file type bits. */
|
|
@@ -3711,6 +3715,8 @@ interface HeadroomSocketTrustPorts {
|
|
|
3711
3715
|
readonly currentUid: () => number;
|
|
3712
3716
|
/** Stats one path without following symlinks, or returns undefined when nothing is there. */
|
|
3713
3717
|
readonly lstat: (target: string) => SocketPathStat | undefined;
|
|
3718
|
+
/** The target a symlink holds, as written: how the allowlist file's path is resolved through a symlinked ancestor. */
|
|
3719
|
+
readonly readlink: (target: string) => string;
|
|
3714
3720
|
}
|
|
3715
3721
|
/** Either a socket path the hop may dial, or the reason it must not: the two never appear together. */
|
|
3716
3722
|
type HeadroomSocketTarget = {
|
|
@@ -3720,6 +3726,11 @@ type HeadroomSocketTarget = {
|
|
|
3720
3726
|
readonly refused: string;
|
|
3721
3727
|
readonly socketPath?: never;
|
|
3722
3728
|
};
|
|
3729
|
+
/** How the allowlist file fails the rules it is held to: what is wrong, and whether the supervisor can repair it (only what lies in agent-shim's own directories can be). */
|
|
3730
|
+
interface AllowlistFileProblem {
|
|
3731
|
+
readonly message: string;
|
|
3732
|
+
readonly repairable: boolean;
|
|
3733
|
+
}
|
|
3723
3734
|
|
|
3724
3735
|
/**
|
|
3725
3736
|
* 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.
|
|
@@ -4150,12 +4161,12 @@ declare const CheckReportJsonSchema: z.ZodObject<{
|
|
|
4150
4161
|
identity: z.ZodObject<{
|
|
4151
4162
|
name: z.ZodNullable<z.ZodString>;
|
|
4152
4163
|
source: z.ZodEnum<{
|
|
4153
|
-
env: "env";
|
|
4154
|
-
none: "none";
|
|
4155
4164
|
"config-dir-escape-hatch": "config-dir-escape-hatch";
|
|
4156
4165
|
argv: "argv";
|
|
4166
|
+
env: "env";
|
|
4157
4167
|
"directory-pin": "directory-pin";
|
|
4158
4168
|
"active-identity-file": "active-identity-file";
|
|
4169
|
+
none: "none";
|
|
4159
4170
|
}>;
|
|
4160
4171
|
}, z.core.$strict>;
|
|
4161
4172
|
pool: z.ZodOptional<z.ZodObject<{
|
|
@@ -4233,11 +4244,11 @@ declare const CheckReportJsonSchema: z.ZodObject<{
|
|
|
4233
4244
|
"category-default": "category-default";
|
|
4234
4245
|
}>;
|
|
4235
4246
|
category: z.ZodNullable<z.ZodEnum<{
|
|
4247
|
+
secret: "secret";
|
|
4236
4248
|
runtime: "runtime";
|
|
4237
4249
|
history: "history";
|
|
4238
4250
|
knowledge: "knowledge";
|
|
4239
4251
|
settings: "settings";
|
|
4240
|
-
secret: "secret";
|
|
4241
4252
|
}>>;
|
|
4242
4253
|
rule: z.ZodOptional<z.ZodObject<{
|
|
4243
4254
|
key: z.ZodString;
|
|
@@ -4877,8 +4888,161 @@ type PathShadowStatus = {
|
|
|
4877
4888
|
readonly by: string;
|
|
4878
4889
|
};
|
|
4879
4890
|
|
|
4880
|
-
/**
|
|
4881
|
-
|
|
4891
|
+
/**
|
|
4892
|
+
* How the allowlist the headroom daemon serves lags the allowlist computed now. The daemon re-reads its allowlist file on every request that follows a change to it, and its supervisor rewrites the file and records the hash in the same tick, so a lag that lasts beyond one tick means the supervisor is not running or cannot write the file. A daemon started by an earlier release reads no file, and is reported as such instead.
|
|
4893
|
+
*/
|
|
4894
|
+
type AllowlistDrift = FileAllowlistDrift | EarlierReleaseAllowlistDrift;
|
|
4895
|
+
/** A daemon started by an earlier release whose fixed allowlist, by its recorded hash, does not admit the serving door. */
|
|
4896
|
+
interface EarlierReleaseAllowlistDrift {
|
|
4897
|
+
readonly startedByEarlierRelease: true;
|
|
4898
|
+
readonly missingFromFile?: never;
|
|
4899
|
+
readonly staleInFile?: never;
|
|
4900
|
+
readonly hashLags?: never;
|
|
4901
|
+
}
|
|
4902
|
+
/** A daemon reading the allowlist file, whose file or recorded hash lags the computed allowlist. */
|
|
4903
|
+
interface FileAllowlistDrift {
|
|
4904
|
+
readonly startedByEarlierRelease?: never;
|
|
4905
|
+
/** Computed entries the file does not list: the daemon refuses every request to these upstreams. A missing file lists nothing, so every entry is here. */
|
|
4906
|
+
readonly missingFromFile: readonly string[];
|
|
4907
|
+
/** Entries the file lists that the computed allowlist no longer holds: origins of doors that are gone, which the daemon still admits although nothing routes to them. */
|
|
4908
|
+
readonly staleInFile: readonly string[];
|
|
4909
|
+
/** Whether the recorded hash is not the hash of the entries the file lists: the supervisor has not recorded the file as served, and a provider launch's gate waits until it has. */
|
|
4910
|
+
readonly hashLags: boolean;
|
|
4911
|
+
}
|
|
4912
|
+
|
|
4913
|
+
/**
|
|
4914
|
+
* The record held in one front-door session-registry file: the launcher's pid plus the per-launch capability token its child presents on every request, and the supervisor of the door the launch was sent to. `supervisorPid` is absent on a record written before it existed and on a door's own transparent-surface record; such a launch cannot be attributed to a door, so a superseded door treats it as its own.
|
|
4915
|
+
*/
|
|
4916
|
+
declare const FrontDoorSessionSchema: z.ZodObject<{
|
|
4917
|
+
pid: z.ZodNumber;
|
|
4918
|
+
startedAt: z.ZodNumber;
|
|
4919
|
+
token: z.ZodString;
|
|
4920
|
+
supervisorPid: z.ZodOptional<z.ZodNumber>;
|
|
4921
|
+
}, z.core.$strict>;
|
|
4922
|
+
type FrontDoorSession = z.infer<typeof FrontDoorSessionSchema>;
|
|
4923
|
+
/**
|
|
4924
|
+
* The front-door supervisor's state.json under `<home>/frontdoor/`. Every field is optional because the file exists in stages, exactly like headroom's and the old codex daemon's: a fresh supervisor writes its own pid before the listener is up, and a shut-down front door leaves only the sticky `lastPort` and any `lastError` worth surfacing.
|
|
4925
|
+
*/
|
|
4926
|
+
declare const FrontDoorStateSchema: z.ZodObject<{
|
|
4927
|
+
protocol: z.ZodOptional<z.ZodNumber>;
|
|
4928
|
+
supervisorPid: z.ZodOptional<z.ZodNumber>;
|
|
4929
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
4930
|
+
lastPort: z.ZodOptional<z.ZodNumber>;
|
|
4931
|
+
connectPort: z.ZodOptional<z.ZodNumber>;
|
|
4932
|
+
lastConnectPort: z.ZodOptional<z.ZodNumber>;
|
|
4933
|
+
directPort: z.ZodOptional<z.ZodNumber>;
|
|
4934
|
+
lastDirectPort: z.ZodOptional<z.ZodNumber>;
|
|
4935
|
+
lastError: z.ZodOptional<z.ZodString>;
|
|
4936
|
+
}, z.core.$strict>;
|
|
4937
|
+
type FrontDoorState = z.infer<typeof FrontDoorStateSchema>;
|
|
4938
|
+
/**
|
|
4939
|
+
* Which recorded doors are still running as front-door supervisors, as reads of the process table answer it: `doors` holds the pids the table shows running (not zombies) with the front-door supervisor's command line; `unknown` holds the pids no read could answer for, each with why (ps failed to run, was killed, timed out or reported an error). Every other pid asked about is known not to be a door: gone, a zombie, or a process that reused a crashed door's pid.
|
|
4940
|
+
*/
|
|
4941
|
+
interface FrontDoorLiveness {
|
|
4942
|
+
readonly doors: ReadonlySet<number>;
|
|
4943
|
+
readonly unknown: ReadonlyMap<number, string>;
|
|
4944
|
+
}
|
|
4945
|
+
/** A registered launch as status and the idle decision see it: the pid and start time, never the token, so nothing that prints or serialises a session can leak the capability. */
|
|
4946
|
+
type FrontDoorSessionSummary = Pick<FrontDoorSession, "pid" | "startedAt" | "supervisorPid">;
|
|
4947
|
+
|
|
4948
|
+
/** The token-saving settings of the `headroom` config block, without its install and lifecycle fields (`source`, `idleShutdownMinutes`). */
|
|
4949
|
+
type HeadroomSettings = Pick<HeadroomGlobalConfig, "mode" | "targetRatio" | "ccr" | "rolloutChannel" | "interceptToolResults" | "readMaturation">;
|
|
4950
|
+
|
|
4951
|
+
/** Everything the supervisor needs to run the daemon, resolved from the global config and the filesystem before it starts. */
|
|
4952
|
+
interface HeadroomSupervisorConfig {
|
|
4953
|
+
/** The install spec as configured (`headroom.source`), already defaulted. */
|
|
4954
|
+
readonly source: string;
|
|
4955
|
+
/** `headroom.idleShutdownMinutes`, already defaulted. */
|
|
4956
|
+
readonly idleShutdownMinutes: number;
|
|
4957
|
+
/** The token-saving settings (`mode`, `targetRatio`, `ccr`, the rollout channel and its opt-ins), as configured; unset fields leave headroom on its own defaults. */
|
|
4958
|
+
readonly settings: HeadroomSettings;
|
|
4959
|
+
}
|
|
4960
|
+
/** How the supervisor resolves the configured source against its defaults. */
|
|
4961
|
+
declare function resolveSupervisorConfig(configured: Readonly<HeadroomGlobalConfig>): HeadroomSupervisorConfig;
|
|
4962
|
+
/**
|
|
4963
|
+
* Every effect the supervisor performs, injected so the whole lifecycle is testable against fakes: no real process, port, clock, or HTTP call ever happens in a unit test.
|
|
4964
|
+
*/
|
|
4965
|
+
interface SupervisorPorts {
|
|
4966
|
+
readonly fs: HeadroomFs;
|
|
4967
|
+
readonly paths: LayoutPaths;
|
|
4968
|
+
readonly ownPid: number;
|
|
4969
|
+
readonly now: () => number;
|
|
4970
|
+
/**
|
|
4971
|
+
* Waits `ms`, yielding to the event loop while it does. Deliberately NOT a synchronous Atomics.wait-style sleep: the real supervisor learns of its child's death through the ChildProcess exit event, and a blocking sleep would stop the event loop from ever delivering it (the exact failure that left an unreaped zombie answering liveness checks as alive).
|
|
4972
|
+
*/
|
|
4973
|
+
readonly sleep: (ms: number) => Promise<void>;
|
|
4974
|
+
/**
|
|
4975
|
+
* Zombie-aware liveness, and for a daemon this supervisor spawned, exit-event-backed: the implementation keeps the spawned ChildProcess handle, consumes its exit event (which is also what reaps it), and reports the pid as not running from that moment. A bare signal-0 check is not enough, because a defunct process still answers it.
|
|
4976
|
+
*/
|
|
4977
|
+
readonly isRunning: (pid: number) => boolean;
|
|
4978
|
+
/** Which of the recorded doors' pids are running front-door supervisors, from one read of the process table per call (see `FrontDoorLiveness`): a door's direct record outlives a crash, and the pid it names can be reused by an unrelated process, whose record must not keep the dead door's origin admitted. The supervisor calls it once per tick. */
|
|
4979
|
+
readonly frontDoorLiveness: (pids: readonly number[]) => FrontDoorLiveness;
|
|
4980
|
+
/** The daemon log's size in bytes (0 before it exists): where the next start attempt's own output will begin. */
|
|
4981
|
+
readonly daemonLogSize: () => number;
|
|
4982
|
+
/** The daemon log from byte `fromByte` to its end, at most its last `maxBytes`, read without loading the whole file (nothing rotates the log). */
|
|
4983
|
+
readonly readDaemonLogTail: (fromByte: number, maxBytes: number) => string;
|
|
4984
|
+
/** The command line of a running process as `ps` reports it, or undefined when it cannot be read: how a recorded orphan daemon is confirmed to be one before it is signalled (see `daemonIdentity`). */
|
|
4985
|
+
readonly daemonCommandLine: (pid: number) => string | undefined;
|
|
4986
|
+
/** The platform facts and owner-only checks the daemon's socket directory is prepared and verified with (see `prepareHeadroomSocket`). */
|
|
4987
|
+
readonly socketTrust: HeadroomSocketTrustPorts;
|
|
4988
|
+
/**
|
|
4989
|
+
* Starts `headroom proxy` serving on the unix socket `socketPath` (and on no TCP port), reading its upstream allowlist from `allowlistFile`, which it re-reads on the next request after the file is replaced, returning its pid. Output goes to the daemon log. The implementation must keep the ChildProcess handle and attach an exit listener (detaching the process is fine; unref'ing a child you still need events from is not, since without the listener nothing reaps it and it lingers as a zombie).
|
|
4990
|
+
*/
|
|
4991
|
+
readonly spawnHeadroom: (socketPath: string, allowlistFile: string, settings: Readonly<HeadroomSettings>) => number;
|
|
4992
|
+
/** Reads the headroom config block as it stands on disk now. The supervisor calls it every tick, so a changed `source` or setting is noticed while the daemon runs and applied by a restart once no session is registered against this supervisor. */
|
|
4993
|
+
readonly readConfig: () => HeadroomSupervisorConfig;
|
|
4994
|
+
/** Stops a process the supervisor owns, escalating SIGTERM to SIGKILL on a bounded timeout (see `stopSupervisedProcess`). */
|
|
4995
|
+
readonly stopProcess: (pid: number) => void;
|
|
4996
|
+
/** True once `GET /readyz` over the unix socket succeeds. */
|
|
4997
|
+
readonly ready: (socketPath: string) => Promise<boolean>;
|
|
4998
|
+
/** Runs `uv tool install <spec>`, logging output to the daemon log. Returns ok=false with the error when `uv` is absent or the install fails. */
|
|
4999
|
+
readonly install: (spec: string) => {
|
|
5000
|
+
readonly ok: boolean;
|
|
5001
|
+
readonly error?: string;
|
|
5002
|
+
};
|
|
5003
|
+
/** The installed `headroom --version` output, or undefined when the binary is not on PATH. */
|
|
5004
|
+
readonly headroomVersion: () => string | undefined;
|
|
5005
|
+
/** The commit the installed headroom was built from, as the install itself records it (`direct_url.json`), or undefined when it was not installed from a git source. */
|
|
5006
|
+
readonly installedCommit: () => string | undefined;
|
|
5007
|
+
readonly log: (line: string) => void;
|
|
5008
|
+
}
|
|
5009
|
+
/** Options for `runSupervisor`. */
|
|
5010
|
+
interface RunSupervisorOptions {
|
|
5011
|
+
/**
|
|
5012
|
+
* Bounds the supervisor loop's iterations. The real supervisor runs until it exits on its own (idle shutdown or fatal error); a bounded run is how tests observe steady-state behaviour (drift deferral, restart-on-crash, pruning) without an infinite loop, and such a run returns `HEADROOM_SUPERVISOR_STILL_RUNNING` instead of an exit code.
|
|
5013
|
+
*/
|
|
5014
|
+
readonly tickLimit?: number;
|
|
5015
|
+
}
|
|
5016
|
+
/**
|
|
5017
|
+
* Runs the headroom supervisor loop: install the daemon, start it, keep it alive (for crash or drift), and stop it after the configured idle period with an empty session registry. Returns the process exit code (0 for an idle shutdown, 1 for a fatal setup failure).
|
|
5018
|
+
*
|
|
5019
|
+
* Every effect flows through `ports`, so the whole loop is unit-testable with a fake clock, filesystem, and processes. The loop awaits its sleeps, which in the real implementation run on a timer: between ticks the event loop turns, the spawned child's exit event is delivered (and the child thereby reaped), and the next tick's liveness check reads the truth.
|
|
5020
|
+
*/
|
|
5021
|
+
declare function runSupervisor(initialConfig: HeadroomSupervisorConfig, ports: SupervisorPorts, options?: RunSupervisorOptions): Promise<number>;
|
|
5022
|
+
/** A recorded front door no read of the process table could answer for, kept on the allowlist until one can: its pid, its direct origin, and why the read failed. */
|
|
5023
|
+
interface UndeterminedFrontDoor {
|
|
5024
|
+
readonly pid: number;
|
|
5025
|
+
readonly origin: string;
|
|
5026
|
+
readonly reason: string;
|
|
5027
|
+
}
|
|
5028
|
+
/**
|
|
5029
|
+
* The upstreams the headroom daemon must admit for one launch that routes a provider through it: the direct origin of the front door `state.json` names, the door the launch is sent to, whose hop names that origin as headroom's upstream for every provider request. Empty before any door has served, when there is nothing to wait for. What `ensureHeadroom`'s `requiredUpstreams` takes.
|
|
5030
|
+
*/
|
|
5031
|
+
declare function launchRequiredUpstreams(fs: HeadroomFs, paths: LayoutPaths): readonly string[];
|
|
5032
|
+
|
|
5033
|
+
/** How the running headroom daemon's allowlist file and recorded hash compare with the allowlist computed now, as `doctor` audits it. A file lacking a live door's origin, a recorded hash that lags the file, or an earlier release's fixed allowlist that lags fails (requests through that door are refused or provider launches wait at their gate); a file still listing a gone door's origin warns. */
|
|
5034
|
+
interface DoctorHeadroomAllowlist {
|
|
5035
|
+
/** The drift `diagnoseAllowlistDrift` found, or undefined when the file and the recorded hash are current. */
|
|
5036
|
+
readonly drift: AllowlistDrift | undefined;
|
|
5037
|
+
/** The allowlist file the daemon reads. */
|
|
5038
|
+
readonly file: string;
|
|
5039
|
+
/** The log the supervisor reports a failed write of that file to. */
|
|
5040
|
+
readonly logPath: string;
|
|
5041
|
+
/** The recorded front doors the process table could not answer for (see `undeterminedFrontDoors`): each is a warning, since its origin stays admitted until a read can tell. */
|
|
5042
|
+
readonly undeterminedFrontDoors: readonly UndeterminedFrontDoor[];
|
|
5043
|
+
/** How the allowlist file fails the rules it is held to (see `reportableAllowlistFileProblem`), or undefined when it keeps them or an earlier release's daemon, which reads no file, serves: a failure, whether or not a daemon is up, when headroom refuses it over a directory agent-shim cannot repair, and a warning while a daemon is up otherwise. */
|
|
5044
|
+
readonly fileProblem: AllowlistFileProblem | undefined;
|
|
5045
|
+
}
|
|
4882
5046
|
|
|
4883
5047
|
/** What listing the front-door supervisors found: their pids, or why the process table could not be read. */
|
|
4884
5048
|
type FrontDoorSupervisorListing = {
|
|
@@ -5003,18 +5167,15 @@ interface RunDoctorParams {
|
|
|
5003
5167
|
readonly headroom: {
|
|
5004
5168
|
readonly state: DoctorFileInput;
|
|
5005
5169
|
readonly isRunning: (pid: number) => boolean;
|
|
5006
|
-
/**
|
|
5007
|
-
readonly allowlist?:
|
|
5008
|
-
/** The inputs that could explain the recorded allowlist hash not matching the current allowlist, or undefined when it matches. */
|
|
5009
|
-
readonly driftInputs: readonly AllowlistDriftInput[] | undefined;
|
|
5010
|
-
/** The serving front door's direct origin, or undefined before it has ever served. */
|
|
5011
|
-
readonly frontDoorOrigin: string | undefined;
|
|
5012
|
-
};
|
|
5170
|
+
/** How the running daemon's allowlist file and recorded hash compare with the allowlist computed now. Omit to skip the allowlist check; with it, a file lacking an upstream the computed allowlist holds, or a recorded hash that lags it, fails (requests to that upstream are refused and provider launches wait at their gate), and a file still listing an upstream nothing routes to warns. */
|
|
5171
|
+
readonly allowlist?: DoctorHeadroomAllowlist;
|
|
5013
5172
|
};
|
|
5014
5173
|
/** The front door's state.json and the supervisor processes alive for this user. Omit to skip the front-door checks (the platform cannot list processes); with it, more than one supervisor alive at once is a failure naming each superseded one. */
|
|
5015
5174
|
readonly frontDoor?: {
|
|
5016
5175
|
readonly state: DoctorFileInput;
|
|
5017
5176
|
readonly supervisors: FrontDoorSupervisorListing;
|
|
5177
|
+
/** The launches registered with the front door whose launcher is still running, each naming the door it was sent to: what tells a superseded door still serving its launches from one serving nothing. */
|
|
5178
|
+
readonly liveSessions: readonly FrontDoorSessionSummary[];
|
|
5018
5179
|
};
|
|
5019
5180
|
}
|
|
5020
5181
|
/**
|
|
@@ -5203,34 +5364,6 @@ declare const UsageSnapshotSchema: z.ZodObject<{
|
|
|
5203
5364
|
}, z.core.$strict>;
|
|
5204
5365
|
type UsageSnapshot = z.infer<typeof UsageSnapshotSchema>;
|
|
5205
5366
|
|
|
5206
|
-
/**
|
|
5207
|
-
* The record held in one front-door session-registry file: the launcher's pid plus the per-launch capability token its child presents on every request, and the supervisor of the door the launch was sent to. `supervisorPid` is absent on a record written before it existed and on a door's own transparent-surface record; such a launch cannot be attributed to a door, so a superseded door treats it as its own.
|
|
5208
|
-
*/
|
|
5209
|
-
declare const FrontDoorSessionSchema: z.ZodObject<{
|
|
5210
|
-
pid: z.ZodNumber;
|
|
5211
|
-
startedAt: z.ZodNumber;
|
|
5212
|
-
token: z.ZodString;
|
|
5213
|
-
supervisorPid: z.ZodOptional<z.ZodNumber>;
|
|
5214
|
-
}, z.core.$strict>;
|
|
5215
|
-
type FrontDoorSession = z.infer<typeof FrontDoorSessionSchema>;
|
|
5216
|
-
/**
|
|
5217
|
-
* The front-door supervisor's state.json under `<home>/frontdoor/`. Every field is optional because the file exists in stages, exactly like headroom's and the old codex daemon's: a fresh supervisor writes its own pid before the listener is up, and a shut-down front door leaves only the sticky `lastPort` and any `lastError` worth surfacing.
|
|
5218
|
-
*/
|
|
5219
|
-
declare const FrontDoorStateSchema: z.ZodObject<{
|
|
5220
|
-
protocol: z.ZodOptional<z.ZodNumber>;
|
|
5221
|
-
supervisorPid: z.ZodOptional<z.ZodNumber>;
|
|
5222
|
-
port: z.ZodOptional<z.ZodNumber>;
|
|
5223
|
-
lastPort: z.ZodOptional<z.ZodNumber>;
|
|
5224
|
-
connectPort: z.ZodOptional<z.ZodNumber>;
|
|
5225
|
-
lastConnectPort: z.ZodOptional<z.ZodNumber>;
|
|
5226
|
-
directPort: z.ZodOptional<z.ZodNumber>;
|
|
5227
|
-
lastDirectPort: z.ZodOptional<z.ZodNumber>;
|
|
5228
|
-
lastError: z.ZodOptional<z.ZodString>;
|
|
5229
|
-
}, z.core.$strict>;
|
|
5230
|
-
type FrontDoorState = z.infer<typeof FrontDoorStateSchema>;
|
|
5231
|
-
/** A registered launch as status and the idle decision see it: the pid and start time, never the token, so nothing that prints or serialises a session can leak the capability. */
|
|
5232
|
-
type FrontDoorSessionSummary = Pick<FrontDoorSession, "pid" | "startedAt" | "supervisorPid">;
|
|
5233
|
-
|
|
5234
5367
|
/** How a sign-out went: whether OpenAI was told, so the person knows the grant is dead on its side too. */
|
|
5235
5368
|
interface SiwcLogoutResult {
|
|
5236
5369
|
readonly hadGrant: boolean;
|
|
@@ -5520,7 +5653,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
5520
5653
|
kind: zod.ZodLiteral<"profile">;
|
|
5521
5654
|
name: zod.ZodString;
|
|
5522
5655
|
value: zod.ZodObject<{
|
|
5523
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
5524
5656
|
entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
|
|
5525
5657
|
value: zod.ZodBoolean;
|
|
5526
5658
|
when: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -5596,6 +5728,7 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
5596
5728
|
key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
5597
5729
|
}, zod_v4_core.$strip>], "kind">]>;
|
|
5598
5730
|
}, zod_v4_core.$strict>]>>>;
|
|
5731
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
5599
5732
|
extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
5600
5733
|
categories: zod.ZodOptional<zod.ZodPipe<zod.ZodObject<{
|
|
5601
5734
|
all: zod.ZodOptional<zod.ZodBoolean>;
|
|
@@ -5639,7 +5772,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
5639
5772
|
kind: zod.ZodLiteral<"profile">;
|
|
5640
5773
|
name: zod.ZodString;
|
|
5641
5774
|
value: zod.ZodObject<{
|
|
5642
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
5643
5775
|
entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
|
|
5644
5776
|
value: zod.ZodBoolean;
|
|
5645
5777
|
when: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -5715,6 +5847,7 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
5715
5847
|
key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
5716
5848
|
}, zod_v4_core.$strip>], "kind">]>;
|
|
5717
5849
|
}, zod_v4_core.$strict>]>>>;
|
|
5850
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
5718
5851
|
extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
5719
5852
|
categories: zod.ZodOptional<zod.ZodPipe<zod.ZodObject<{
|
|
5720
5853
|
all: zod.ZodOptional<zod.ZodBoolean>;
|
|
@@ -6806,9 +6939,9 @@ declare function createLifecycleApiRouter(deps: LifecycleApiDeps): {
|
|
|
6806
6939
|
current: zod.ZodString;
|
|
6807
6940
|
latest: zod.ZodString;
|
|
6808
6941
|
action: zod.ZodEnum<{
|
|
6809
|
-
updated: "updated";
|
|
6810
6942
|
current: "current";
|
|
6811
6943
|
available: "available";
|
|
6944
|
+
updated: "updated";
|
|
6812
6945
|
}>;
|
|
6813
6946
|
}, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
|
|
6814
6947
|
};
|
|
@@ -7055,12 +7188,12 @@ declare function createLaunchApiRouter(deps: LaunchApiDeps): {
|
|
|
7055
7188
|
decision: zod.ZodObject<{
|
|
7056
7189
|
identity: zod.ZodOptional<zod.ZodString>;
|
|
7057
7190
|
identitySource: zod.ZodEnum<{
|
|
7058
|
-
env: "env";
|
|
7059
|
-
none: "none";
|
|
7060
7191
|
"config-dir-escape-hatch": "config-dir-escape-hatch";
|
|
7061
7192
|
argv: "argv";
|
|
7193
|
+
env: "env";
|
|
7062
7194
|
"directory-pin": "directory-pin";
|
|
7063
7195
|
"active-identity-file": "active-identity-file";
|
|
7196
|
+
none: "none";
|
|
7064
7197
|
}>;
|
|
7065
7198
|
pool: zod.ZodOptional<zod.ZodObject<{
|
|
7066
7199
|
name: zod.ZodString;
|
|
@@ -7655,12 +7788,12 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
7655
7788
|
identity: zod.ZodObject<{
|
|
7656
7789
|
name: zod.ZodNullable<zod.ZodString>;
|
|
7657
7790
|
source: zod.ZodEnum<{
|
|
7658
|
-
env: "env";
|
|
7659
|
-
none: "none";
|
|
7660
7791
|
"config-dir-escape-hatch": "config-dir-escape-hatch";
|
|
7661
7792
|
argv: "argv";
|
|
7793
|
+
env: "env";
|
|
7662
7794
|
"directory-pin": "directory-pin";
|
|
7663
7795
|
"active-identity-file": "active-identity-file";
|
|
7796
|
+
none: "none";
|
|
7664
7797
|
}>;
|
|
7665
7798
|
}, zod_v4_core.$strict>;
|
|
7666
7799
|
pool: zod.ZodOptional<zod.ZodObject<{
|
|
@@ -7738,11 +7871,11 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
7738
7871
|
"category-default": "category-default";
|
|
7739
7872
|
}>;
|
|
7740
7873
|
category: zod.ZodNullable<zod.ZodEnum<{
|
|
7874
|
+
secret: "secret";
|
|
7741
7875
|
runtime: "runtime";
|
|
7742
7876
|
history: "history";
|
|
7743
7877
|
knowledge: "knowledge";
|
|
7744
7878
|
settings: "settings";
|
|
7745
|
-
secret: "secret";
|
|
7746
7879
|
}>>;
|
|
7747
7880
|
rule: zod.ZodOptional<zod.ZodObject<{
|
|
7748
7881
|
key: zod.ZodString;
|
|
@@ -7961,11 +8094,10 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
7961
8094
|
"global-config": "global-config";
|
|
7962
8095
|
"config-profile": "config-profile";
|
|
7963
8096
|
identity: "identity";
|
|
7964
|
-
keychain: "keychain";
|
|
7965
8097
|
provider: "provider";
|
|
7966
|
-
headroom: "headroom";
|
|
7967
8098
|
frontdoor: "frontdoor";
|
|
7968
8099
|
pool: "pool";
|
|
8100
|
+
keychain: "keychain";
|
|
7969
8101
|
"ambient-credential": "ambient-credential";
|
|
7970
8102
|
"binary-discovery": "binary-discovery";
|
|
7971
8103
|
"claude-shim": "claude-shim";
|
|
@@ -7975,6 +8107,7 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
7975
8107
|
"directory-rules": "directory-rules";
|
|
7976
8108
|
"categories-local": "categories-local";
|
|
7977
8109
|
"active-identity": "active-identity";
|
|
8110
|
+
headroom: "headroom";
|
|
7978
8111
|
}>;
|
|
7979
8112
|
subject: zod.ZodOptional<zod.ZodString>;
|
|
7980
8113
|
severity: zod.ZodEnum<{
|
|
@@ -8167,12 +8300,12 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
8167
8300
|
decision: zod.ZodObject<{
|
|
8168
8301
|
identity: zod.ZodOptional<zod.ZodString>;
|
|
8169
8302
|
identitySource: zod.ZodEnum<{
|
|
8170
|
-
env: "env";
|
|
8171
|
-
none: "none";
|
|
8172
8303
|
"config-dir-escape-hatch": "config-dir-escape-hatch";
|
|
8173
8304
|
argv: "argv";
|
|
8305
|
+
env: "env";
|
|
8174
8306
|
"directory-pin": "directory-pin";
|
|
8175
8307
|
"active-identity-file": "active-identity-file";
|
|
8308
|
+
none: "none";
|
|
8176
8309
|
}>;
|
|
8177
8310
|
pool: zod.ZodOptional<zod.ZodObject<{
|
|
8178
8311
|
name: zod.ZodString;
|
|
@@ -8470,7 +8603,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
8470
8603
|
kind: zod.ZodLiteral<"profile">;
|
|
8471
8604
|
name: zod.ZodString;
|
|
8472
8605
|
value: zod.ZodObject<{
|
|
8473
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
8474
8606
|
entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
|
|
8475
8607
|
value: zod.ZodBoolean;
|
|
8476
8608
|
when: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -8546,6 +8678,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
8546
8678
|
key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
8547
8679
|
}, zod_v4_core.$strip>], "kind">]>;
|
|
8548
8680
|
}, zod_v4_core.$strict>]>>>;
|
|
8681
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
8549
8682
|
extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
8550
8683
|
categories: zod.ZodOptional<zod.ZodPipe<zod.ZodObject<{
|
|
8551
8684
|
all: zod.ZodOptional<zod.ZodBoolean>;
|
|
@@ -8589,7 +8722,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
8589
8722
|
kind: zod.ZodLiteral<"profile">;
|
|
8590
8723
|
name: zod.ZodString;
|
|
8591
8724
|
value: zod.ZodObject<{
|
|
8592
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
8593
8725
|
entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
|
|
8594
8726
|
value: zod.ZodBoolean;
|
|
8595
8727
|
when: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -8665,6 +8797,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
8665
8797
|
key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
8666
8798
|
}, zod_v4_core.$strip>], "kind">]>;
|
|
8667
8799
|
}, zod_v4_core.$strict>]>>>;
|
|
8800
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
8668
8801
|
extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
8669
8802
|
categories: zod.ZodOptional<zod.ZodPipe<zod.ZodObject<{
|
|
8670
8803
|
all: zod.ZodOptional<zod.ZodBoolean>;
|
|
@@ -9548,9 +9681,9 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9548
9681
|
current: zod.ZodString;
|
|
9549
9682
|
latest: zod.ZodString;
|
|
9550
9683
|
action: zod.ZodEnum<{
|
|
9551
|
-
updated: "updated";
|
|
9552
9684
|
current: "current";
|
|
9553
9685
|
available: "available";
|
|
9686
|
+
updated: "updated";
|
|
9554
9687
|
}>;
|
|
9555
9688
|
}, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
|
|
9556
9689
|
};
|
|
@@ -9749,12 +9882,12 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9749
9882
|
identity: zod.ZodObject<{
|
|
9750
9883
|
name: zod.ZodNullable<zod.ZodString>;
|
|
9751
9884
|
source: zod.ZodEnum<{
|
|
9752
|
-
env: "env";
|
|
9753
|
-
none: "none";
|
|
9754
9885
|
"config-dir-escape-hatch": "config-dir-escape-hatch";
|
|
9755
9886
|
argv: "argv";
|
|
9887
|
+
env: "env";
|
|
9756
9888
|
"directory-pin": "directory-pin";
|
|
9757
9889
|
"active-identity-file": "active-identity-file";
|
|
9890
|
+
none: "none";
|
|
9758
9891
|
}>;
|
|
9759
9892
|
}, zod_v4_core.$strict>;
|
|
9760
9893
|
pool: zod.ZodOptional<zod.ZodObject<{
|
|
@@ -9832,11 +9965,11 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9832
9965
|
"category-default": "category-default";
|
|
9833
9966
|
}>;
|
|
9834
9967
|
category: zod.ZodNullable<zod.ZodEnum<{
|
|
9968
|
+
secret: "secret";
|
|
9835
9969
|
runtime: "runtime";
|
|
9836
9970
|
history: "history";
|
|
9837
9971
|
knowledge: "knowledge";
|
|
9838
9972
|
settings: "settings";
|
|
9839
|
-
secret: "secret";
|
|
9840
9973
|
}>>;
|
|
9841
9974
|
rule: zod.ZodOptional<zod.ZodObject<{
|
|
9842
9975
|
key: zod.ZodString;
|
|
@@ -10055,11 +10188,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
10055
10188
|
"global-config": "global-config";
|
|
10056
10189
|
"config-profile": "config-profile";
|
|
10057
10190
|
identity: "identity";
|
|
10058
|
-
keychain: "keychain";
|
|
10059
10191
|
provider: "provider";
|
|
10060
|
-
headroom: "headroom";
|
|
10061
10192
|
frontdoor: "frontdoor";
|
|
10062
10193
|
pool: "pool";
|
|
10194
|
+
keychain: "keychain";
|
|
10063
10195
|
"ambient-credential": "ambient-credential";
|
|
10064
10196
|
"binary-discovery": "binary-discovery";
|
|
10065
10197
|
"claude-shim": "claude-shim";
|
|
@@ -10069,6 +10201,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
10069
10201
|
"directory-rules": "directory-rules";
|
|
10070
10202
|
"categories-local": "categories-local";
|
|
10071
10203
|
"active-identity": "active-identity";
|
|
10204
|
+
headroom: "headroom";
|
|
10072
10205
|
}>;
|
|
10073
10206
|
subject: zod.ZodOptional<zod.ZodString>;
|
|
10074
10207
|
severity: zod.ZodEnum<{
|
|
@@ -10578,7 +10711,6 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
|
|
|
10578
10711
|
kind: z.ZodLiteral<"profile">;
|
|
10579
10712
|
name: z.ZodString;
|
|
10580
10713
|
value: z.ZodObject<{
|
|
10581
|
-
description: z.ZodOptional<z.ZodString>;
|
|
10582
10714
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
10583
10715
|
value: z.ZodBoolean;
|
|
10584
10716
|
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -10654,6 +10786,7 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
|
|
|
10654
10786
|
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
10655
10787
|
}, z.core.$strip>], "kind">]>;
|
|
10656
10788
|
}, z.core.$strict>]>>>;
|
|
10789
|
+
description: z.ZodOptional<z.ZodString>;
|
|
10657
10790
|
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10658
10791
|
categories: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
10659
10792
|
all: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -10699,7 +10832,6 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
|
|
|
10699
10832
|
kind: z.ZodLiteral<"profile">;
|
|
10700
10833
|
name: z.ZodString;
|
|
10701
10834
|
value: z.ZodObject<{
|
|
10702
|
-
description: z.ZodOptional<z.ZodString>;
|
|
10703
10835
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
10704
10836
|
value: z.ZodBoolean;
|
|
10705
10837
|
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -10775,6 +10907,7 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
|
|
|
10775
10907
|
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
10776
10908
|
}, z.core.$strip>], "kind">]>;
|
|
10777
10909
|
}, z.core.$strict>]>>>;
|
|
10910
|
+
description: z.ZodOptional<z.ZodString>;
|
|
10778
10911
|
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10779
10912
|
categories: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
10780
10913
|
all: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -11901,11 +12034,10 @@ declare const DoctorFindingSchema: z.ZodObject<{
|
|
|
11901
12034
|
"global-config": "global-config";
|
|
11902
12035
|
"config-profile": "config-profile";
|
|
11903
12036
|
identity: "identity";
|
|
11904
|
-
keychain: "keychain";
|
|
11905
12037
|
provider: "provider";
|
|
11906
|
-
headroom: "headroom";
|
|
11907
12038
|
frontdoor: "frontdoor";
|
|
11908
12039
|
pool: "pool";
|
|
12040
|
+
keychain: "keychain";
|
|
11909
12041
|
"ambient-credential": "ambient-credential";
|
|
11910
12042
|
"binary-discovery": "binary-discovery";
|
|
11911
12043
|
"claude-shim": "claude-shim";
|
|
@@ -11915,6 +12047,7 @@ declare const DoctorFindingSchema: z.ZodObject<{
|
|
|
11915
12047
|
"directory-rules": "directory-rules";
|
|
11916
12048
|
"categories-local": "categories-local";
|
|
11917
12049
|
"active-identity": "active-identity";
|
|
12050
|
+
headroom: "headroom";
|
|
11918
12051
|
}>;
|
|
11919
12052
|
subject: z.ZodOptional<z.ZodString>;
|
|
11920
12053
|
severity: z.ZodEnum<{
|
|
@@ -11932,11 +12065,10 @@ declare const DoctorRunOutputSchema: z.ZodObject<{
|
|
|
11932
12065
|
"global-config": "global-config";
|
|
11933
12066
|
"config-profile": "config-profile";
|
|
11934
12067
|
identity: "identity";
|
|
11935
|
-
keychain: "keychain";
|
|
11936
12068
|
provider: "provider";
|
|
11937
|
-
headroom: "headroom";
|
|
11938
12069
|
frontdoor: "frontdoor";
|
|
11939
12070
|
pool: "pool";
|
|
12071
|
+
keychain: "keychain";
|
|
11940
12072
|
"ambient-credential": "ambient-credential";
|
|
11941
12073
|
"binary-discovery": "binary-discovery";
|
|
11942
12074
|
"claude-shim": "claude-shim";
|
|
@@ -11946,6 +12078,7 @@ declare const DoctorRunOutputSchema: z.ZodObject<{
|
|
|
11946
12078
|
"directory-rules": "directory-rules";
|
|
11947
12079
|
"categories-local": "categories-local";
|
|
11948
12080
|
"active-identity": "active-identity";
|
|
12081
|
+
headroom: "headroom";
|
|
11949
12082
|
}>;
|
|
11950
12083
|
subject: z.ZodOptional<z.ZodString>;
|
|
11951
12084
|
severity: z.ZodEnum<{
|
|
@@ -11966,9 +12099,9 @@ declare const UpdateCheckOutputSchema: z.ZodObject<{
|
|
|
11966
12099
|
current: z.ZodString;
|
|
11967
12100
|
latest: z.ZodString;
|
|
11968
12101
|
action: z.ZodEnum<{
|
|
11969
|
-
updated: "updated";
|
|
11970
12102
|
current: "current";
|
|
11971
12103
|
available: "available";
|
|
12104
|
+
updated: "updated";
|
|
11972
12105
|
}>;
|
|
11973
12106
|
}, z.core.$strict>;
|
|
11974
12107
|
/** The Sign in with ChatGPT login's state as `codex status` reports it: no sign-in yet, signed in (with who, whether the plan scope was granted, and when the access token lapses), or a file that cannot be read. */
|
|
@@ -12018,12 +12151,12 @@ declare const LaunchResolveOutputSchema: z.ZodObject<{
|
|
|
12018
12151
|
decision: z.ZodObject<{
|
|
12019
12152
|
identity: z.ZodOptional<z.ZodString>;
|
|
12020
12153
|
identitySource: z.ZodEnum<{
|
|
12021
|
-
env: "env";
|
|
12022
|
-
none: "none";
|
|
12023
12154
|
"config-dir-escape-hatch": "config-dir-escape-hatch";
|
|
12024
12155
|
argv: "argv";
|
|
12156
|
+
env: "env";
|
|
12025
12157
|
"directory-pin": "directory-pin";
|
|
12026
12158
|
"active-identity-file": "active-identity-file";
|
|
12159
|
+
none: "none";
|
|
12027
12160
|
}>;
|
|
12028
12161
|
pool: z.ZodOptional<z.ZodObject<{
|
|
12029
12162
|
name: z.ZodString;
|
|
@@ -12842,95 +12975,30 @@ interface EnsureHeadroomPorts {
|
|
|
12842
12975
|
readonly isRunning: (pid: number) => boolean;
|
|
12843
12976
|
readonly now: () => number;
|
|
12844
12977
|
readonly sleep: (ms: number) => void;
|
|
12978
|
+
/** The command line of a running process as `ps` reports it, or undefined when it cannot be read: how a daemon started by an earlier release, which reads no allowlist file, is told apart. */
|
|
12979
|
+
readonly daemonCommandLine: (pid: number) => string | undefined;
|
|
12845
12980
|
/** Spawns the detached supervisor process that owns the headroom daemon, returning its pid. */
|
|
12846
12981
|
readonly spawnSupervisor: (paths: LayoutPaths) => number;
|
|
12847
12982
|
}
|
|
12848
12983
|
/**
|
|
12849
|
-
* Brings the headroom daemon up for this launch, or finds it already running, and registers this launcher pid in its session registry (the fact that keeps the daemon alive and defers
|
|
12984
|
+
* Brings the headroom daemon up for this launch, or finds it already running, and registers this launcher pid in its session registry (the fact that keeps the daemon alive and defers a restart for a changed install source or setting until this launch is done). A launch that routes a provider waits, within the same bound, until the supervisor records that the daemon serves an allowlist admitting it.
|
|
12850
12985
|
*
|
|
12851
12986
|
* The exclusive-create start lock decides which of several concurrent launches spawns the one supervisor: its holder spawns and keeps waiting like everyone else, everyone else waits on the state file, and a lock whose holder has died is removed and retried. Readiness is "state names a live supervisor, a live headroom pid, and a socket path", which the supervisor only writes after its own `/readyz` probe over that socket has passed, so polling state alone never mistakes a bound-but-not-ready socket for a usable daemon.
|
|
12852
12987
|
*
|
|
12853
|
-
* Throws `HeadroomStartError` (naming the daemon log path and any recorded `lastError
|
|
12988
|
+
* Throws `HeadroomStartError` (naming the daemon log path and any recorded `lastError`, or the allowlist file when that is what the launch waited on) when the daemon is not up, or not serving the allowlist the launch needs, within `HEADROOM_START_TIMEOUT_MS`, or when a live supervisor has recorded a fatal error (a platform without unix sockets and a socket directory that fails the owner-only check are recorded this way, so the launch fails with the reason).
|
|
12854
12989
|
*/
|
|
12855
12990
|
declare function ensureHeadroom(params: {
|
|
12856
12991
|
readonly paths: LayoutPaths;
|
|
12857
12992
|
readonly launcherPid: number;
|
|
12858
12993
|
readonly ports: EnsureHeadroomPorts;
|
|
12859
12994
|
/**
|
|
12860
|
-
* The
|
|
12995
|
+
* The upstreams the daemon must admit for this launch to work, read fresh on every poll because the front door's address among them can change while the launch waits. Given for a launch that routes a provider through headroom, whose requests come back to the front door's direct origin and are refused by a daemon whose allowlist lacks it; absent for a launch that only needs Claude Code's own API, which every daemon admits. `launchRequiredUpstreams` computes them for a provider launch: the serving door's direct origin. The daemon may admit more (a superseded door still serving its own sessions keeps its origin admitted), so the check is that these are among what it serves, not that the lists are equal.
|
|
12861
12996
|
*/
|
|
12862
|
-
readonly
|
|
12997
|
+
readonly requiredUpstreams?: () => readonly string[];
|
|
12863
12998
|
}): {
|
|
12864
12999
|
readonly socketPath: string;
|
|
12865
13000
|
};
|
|
12866
13001
|
|
|
12867
|
-
/** The token-saving settings of the `headroom` config block, without its install and lifecycle fields (`source`, `idleShutdownMinutes`). */
|
|
12868
|
-
type HeadroomSettings = Pick<HeadroomGlobalConfig, "mode" | "targetRatio" | "ccr" | "rolloutChannel" | "interceptToolResults" | "readMaturation">;
|
|
12869
|
-
|
|
12870
|
-
/** Everything the supervisor needs to run the daemon, resolved from the global config and the filesystem before it starts. */
|
|
12871
|
-
interface HeadroomSupervisorConfig {
|
|
12872
|
-
/** The install spec as configured (`headroom.source`), already defaulted. */
|
|
12873
|
-
readonly source: string;
|
|
12874
|
-
/** `headroom.idleShutdownMinutes`, already defaulted. */
|
|
12875
|
-
readonly idleShutdownMinutes: number;
|
|
12876
|
-
/** The token-saving settings (`mode`, `targetRatio`, `ccr`, the rollout channel and its opt-ins), as configured; unset fields leave headroom on its own defaults. */
|
|
12877
|
-
readonly settings: HeadroomSettings;
|
|
12878
|
-
}
|
|
12879
|
-
/** How the supervisor resolves the configured source against its defaults. */
|
|
12880
|
-
declare function resolveSupervisorConfig(configured: Readonly<HeadroomGlobalConfig>): HeadroomSupervisorConfig;
|
|
12881
|
-
/**
|
|
12882
|
-
* Every effect the supervisor performs, injected so the whole lifecycle is testable against fakes: no real process, port, clock, or HTTP call ever happens in a unit test.
|
|
12883
|
-
*/
|
|
12884
|
-
interface SupervisorPorts {
|
|
12885
|
-
readonly fs: HeadroomFs;
|
|
12886
|
-
readonly paths: LayoutPaths;
|
|
12887
|
-
readonly ownPid: number;
|
|
12888
|
-
readonly now: () => number;
|
|
12889
|
-
/**
|
|
12890
|
-
* Waits `ms`, yielding to the event loop while it does. Deliberately NOT a synchronous Atomics.wait-style sleep: the real supervisor learns of its child's death through the ChildProcess exit event, and a blocking sleep would stop the event loop from ever delivering it (the exact failure that left an unreaped zombie answering liveness checks as alive).
|
|
12891
|
-
*/
|
|
12892
|
-
readonly sleep: (ms: number) => Promise<void>;
|
|
12893
|
-
/**
|
|
12894
|
-
* Zombie-aware liveness, and for a daemon this supervisor spawned, exit-event-backed: the implementation keeps the spawned ChildProcess handle, consumes its exit event (which is also what reaps it), and reports the pid as not running from that moment. A bare signal-0 check is not enough, because a defunct process still answers it.
|
|
12895
|
-
*/
|
|
12896
|
-
readonly isRunning: (pid: number) => boolean;
|
|
12897
|
-
/** The platform facts and owner-only checks the daemon's socket directory is prepared and verified with (see `prepareHeadroomSocket`). */
|
|
12898
|
-
readonly socketTrust: HeadroomSocketTrustPorts;
|
|
12899
|
-
/**
|
|
12900
|
-
* Starts `headroom proxy` serving on the unix socket `socketPath` (and on no TCP port) with the given allowlist, returning its pid. Output goes to the daemon log. The implementation must keep the ChildProcess handle and attach an exit listener (detaching the process is fine; unref'ing a child you still need events from is not, since without the listener nothing reaps it and it lingers as a zombie).
|
|
12901
|
-
*/
|
|
12902
|
-
readonly spawnHeadroom: (socketPath: string, allowlist: readonly string[], settings: Readonly<HeadroomSettings>) => number;
|
|
12903
|
-
/** Reads the headroom config block as it stands on disk now. The supervisor calls it every tick, so a changed `source` or setting is noticed while the daemon runs and applied by the same quiet-registry restart an allowlist change gets. */
|
|
12904
|
-
readonly readConfig: () => HeadroomSupervisorConfig;
|
|
12905
|
-
/** Stops a process the supervisor owns, escalating SIGTERM to SIGKILL on a bounded timeout (see `stopSupervisedProcess`). */
|
|
12906
|
-
readonly stopProcess: (pid: number) => void;
|
|
12907
|
-
/** True once `GET /readyz` over the unix socket succeeds. */
|
|
12908
|
-
readonly ready: (socketPath: string) => Promise<boolean>;
|
|
12909
|
-
/** Runs `uv tool install <spec>`, logging output to the daemon log. Returns ok=false with the error when `uv` is absent or the install fails. */
|
|
12910
|
-
readonly install: (spec: string) => {
|
|
12911
|
-
readonly ok: boolean;
|
|
12912
|
-
readonly error?: string;
|
|
12913
|
-
};
|
|
12914
|
-
/** The installed `headroom --version` output, or undefined when the binary is not on PATH. */
|
|
12915
|
-
readonly headroomVersion: () => string | undefined;
|
|
12916
|
-
/** The commit the installed headroom was built from, as the install itself records it (`direct_url.json`), or undefined when it was not installed from a git source. */
|
|
12917
|
-
readonly installedCommit: () => string | undefined;
|
|
12918
|
-
readonly log: (line: string) => void;
|
|
12919
|
-
}
|
|
12920
|
-
/** Options for `runSupervisor`. */
|
|
12921
|
-
interface RunSupervisorOptions {
|
|
12922
|
-
/**
|
|
12923
|
-
* Bounds the supervisor loop's iterations. The real supervisor runs until it exits on its own (idle shutdown or fatal error); a bounded run is how tests observe steady-state behaviour (drift deferral, restart-on-crash, pruning) without an infinite loop, and such a run returns `HEADROOM_SUPERVISOR_STILL_RUNNING` instead of an exit code.
|
|
12924
|
-
*/
|
|
12925
|
-
readonly tickLimit?: number;
|
|
12926
|
-
}
|
|
12927
|
-
/**
|
|
12928
|
-
* Runs the headroom supervisor loop: install the daemon, start it, keep it alive (for crash or drift), and stop it after the configured idle period with an empty session registry. Returns the process exit code (0 for an idle shutdown, 1 for a fatal setup failure).
|
|
12929
|
-
*
|
|
12930
|
-
* Every effect flows through `ports`, so the whole loop is unit-testable with a fake clock, filesystem, and processes. The loop awaits its sleeps, which in the real implementation run on a timer: between ticks the event loop turns, the spawned child's exit event is delivered (and the child thereby reaped), and the next tick's liveness check reads the truth.
|
|
12931
|
-
*/
|
|
12932
|
-
declare function runSupervisor(initialConfig: HeadroomSupervisorConfig, ports: SupervisorPorts, options?: RunSupervisorOptions): Promise<number>;
|
|
12933
|
-
|
|
12934
13002
|
/** Raised by any operation that requires an identity to already exist, when it does not. */
|
|
12935
13003
|
declare class IdentityNotFoundError extends CliError {
|
|
12936
13004
|
readonly name: string;
|
|
@@ -13395,5 +13463,5 @@ declare const OWN_CLI_FILE_NAME = "cli.cjs";
|
|
|
13395
13463
|
*/
|
|
13396
13464
|
declare function agentShimCliPath(distDir?: string | undefined): string;
|
|
13397
13465
|
|
|
13398
|
-
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, checkReportHasWarnings, checkReportToJson, collectCheckReport, collectDoctorReport, collectFrontDoorStatus, collectPoolPick, collectResets, collectSessionList, createAgentTreesApiRouter, createCodexApiRouter, createConfigApiRouter, createControlApiRouter, createDoorApiNodeHandler, createDoorApiRouter, createDoorEventHub, createDoorHealthPublisher, createEventsApiRouter, createLaunchApiRouter, createLaunchEventPublisher, createLeafCache, createLifecycleApiRouter, 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, 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, setPool, setProfileCategories, setProfileEntries, setProfileLaunchFlags, setProfileMetadata, setRcSessionModel, setRcSessionPermissionMode, showSession, snapshotPath, spawnClaude, startConnectServer, submitRcSessionMcpOAuthCallbackUrl, suggestRcSessionFiles, summariseSession, teleportRcSession, topLevelNames, updateDirectoryRule, updateProvider, useIdentity, watchedInstallEntry, writeDirectoryRules };
|
|
13466
|
+
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, checkReportHasWarnings, checkReportToJson, collectCheckReport, collectDoctorReport, collectFrontDoorStatus, collectPoolPick, collectResets, collectSessionList, createAgentTreesApiRouter, createCodexApiRouter, createConfigApiRouter, createControlApiRouter, createDoorApiNodeHandler, createDoorApiRouter, createDoorEventHub, createDoorHealthPublisher, createEventsApiRouter, createLaunchApiRouter, createLaunchEventPublisher, createLeafCache, createLifecycleApiRouter, 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, setPool, setProfileCategories, setProfileEntries, setProfileLaunchFlags, setProfileMetadata, setRcSessionModel, setRcSessionPermissionMode, showSession, snapshotPath, spawnClaude, startConnectServer, submitRcSessionMcpOAuthCallbackUrl, suggestRcSessionFiles, summariseSession, teleportRcSession, topLevelNames, updateDirectoryRule, updateProvider, useIdentity, watchedInstallEntry, writeDirectoryRules };
|
|
13399
13467
|
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, LiveTask, LiveTaskBook, LocatedSession, MergedAgentNode, MergedAgentTree, NestedContribution, OwnExecutableStat, PlanClass, Pool, PoolMember, PoolPickReport, 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 };
|