claude-use 9.16.0 → 9.18.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.
@@ -6912,6 +6912,292 @@ declare function createLaunchApiRouter(deps: LaunchApiDeps): {
6912
6912
  /** The launch router, as the merged mount's and the client's own types are derived from it. */
6913
6913
  type LaunchApiRouter = ReturnType<typeof createLaunchApiRouter>;
6914
6914
 
6915
+ /**
6916
+ * The agent tree of one session as the reader returns it, and the shape of the meta file it reads. One definition each, so the type, the validator and the published JSON Schema (`schema/AgentTree.schema.json`) cannot drift. The on-disk layout is documented in `docs/agent-transcripts.md`; it belongs to Claude Code and has changed across versions, which is why the meta file is read leniently and the tree this module returns is strict.
6917
+ */
6918
+ /**
6919
+ * One subagent's `.meta.json`. `agentType` is the one field every version writes; the rest appear only for the kinds and versions that write them, and a version this schema has never seen may add more, so unknown keys are kept rather than rejected.
6920
+ */
6921
+ declare const AgentMetaSchema: z.ZodObject<{
6922
+ agentType: z.ZodString;
6923
+ isFork: z.ZodOptional<z.ZodBoolean>;
6924
+ description: z.ZodOptional<z.ZodString>;
6925
+ name: z.ZodOptional<z.ZodString>;
6926
+ toolUseId: z.ZodOptional<z.ZodString>;
6927
+ spawnDepth: z.ZodOptional<z.ZodNumber>;
6928
+ parentAgentId: z.ZodOptional<z.ZodString>;
6929
+ model: z.ZodOptional<z.ZodString>;
6930
+ requestShape: z.ZodOptional<z.ZodString>;
6931
+ requestNonInteractive: z.ZodOptional<z.ZodBoolean>;
6932
+ workflowPhase: z.ZodOptional<z.ZodString>;
6933
+ taskKind: z.ZodOptional<z.ZodString>;
6934
+ teamName: z.ZodOptional<z.ZodString>;
6935
+ worktreePath: z.ZodOptional<z.ZodString>;
6936
+ worktreeBranch: z.ZodOptional<z.ZodString>;
6937
+ stoppedByUser: z.ZodOptional<z.ZodBoolean>;
6938
+ }, z.core.$loose>;
6939
+ /** What kind of agent a node is, derived from its meta file: a fork inherits its parent's context, a workflow agent was spawned by a workflow run, a teammate belongs to a team. */
6940
+ declare const AgentKindSchema: z.ZodEnum<{
6941
+ subagent: "subagent";
6942
+ fork: "fork";
6943
+ "workflow-agent": "workflow-agent";
6944
+ teammate: "teammate";
6945
+ }>;
6946
+ /** One agent in a session's tree. `children` holds the agents it spawned. */
6947
+ interface AgentNode {
6948
+ /** The stem after `agent-` in its file names, which for an unnamed agent is the `task_id` Remote Control reports for it. */
6949
+ readonly id: string;
6950
+ readonly kind: z.infer<typeof AgentKindSchema>;
6951
+ readonly agentType: string;
6952
+ readonly description?: string;
6953
+ readonly name?: string;
6954
+ /** The `tool_use` block in the parent's transcript that spawned this agent. */
6955
+ readonly toolUseId?: string;
6956
+ readonly spawnDepth?: number;
6957
+ /** The model the spawn recorded: an alias or `inherit` as often as a concrete id, and not necessarily the model that served the agent's requests. */
6958
+ readonly model?: string;
6959
+ readonly background?: boolean;
6960
+ /** The workflow run this agent belongs to, when it was spawned by one. */
6961
+ readonly workflowRunId?: string;
6962
+ readonly workflowPhase?: string;
6963
+ readonly teamName?: string;
6964
+ readonly stoppedByUser?: boolean;
6965
+ /** The agent's transcript, relative to the identity's configuration directory. */
6966
+ readonly transcript: string;
6967
+ readonly children: readonly AgentNode[];
6968
+ }
6969
+ /** The node schema, written out so the recursive `children` field has a lazy reference to itself. */
6970
+ declare const AgentNodeSchema: z.ZodType<AgentNode>;
6971
+ /** One entry of a task list: the session's own (`tasks/<session-id>/<n>.json`, or `tasks/session-<first-eight-characters>/<n>.json` in current versions) or a shared one (`tasks/<list-id>/<n>.json`), a team's or one named by `CLAUDE_CODE_TASK_LIST_ID`. `status` is an open string: non-standard values occur. */
6972
+ declare const TaskItemSchema: z.ZodObject<{
6973
+ id: z.ZodString;
6974
+ subject: z.ZodString;
6975
+ description: z.ZodOptional<z.ZodString>;
6976
+ status: z.ZodString;
6977
+ activeForm: z.ZodOptional<z.ZodString>;
6978
+ owner: z.ZodOptional<z.ZodString>;
6979
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
6980
+ blocks: z.ZodArray<z.ZodString>;
6981
+ blockedBy: z.ZodArray<z.ZodString>;
6982
+ taskList: z.ZodOptional<z.ZodString>;
6983
+ }, z.core.$strict>;
6984
+ /** One workflow run's record (`workflows/wf_<run-id>.json`), narrowed to what identifies and summarises it. */
6985
+ declare const WorkflowRunSchema: z.ZodObject<{
6986
+ runId: z.ZodString;
6987
+ workflowName: z.ZodOptional<z.ZodString>;
6988
+ status: z.ZodOptional<z.ZodString>;
6989
+ startTime: z.ZodOptional<z.ZodNumber>;
6990
+ phases: z.ZodArray<z.ZodString>;
6991
+ summary: z.ZodOptional<z.ZodString>;
6992
+ }, z.core.$strict>;
6993
+ /** One session in a listing: the cheap facts read from directory listings and one stat, and every identity whose configuration exposes it. */
6994
+ declare const SessionSummarySchema: z.ZodObject<{
6995
+ project: z.ZodString;
6996
+ sessionId: z.ZodString;
6997
+ superseded: z.ZodBoolean;
6998
+ entry: z.ZodString;
6999
+ agentCount: z.ZodNumber;
7000
+ workflowRunCount: z.ZodNumber;
7001
+ updatedAt: z.ZodOptional<z.ZodISODateTime>;
7002
+ identities: z.ZodArray<z.ZodString>;
7003
+ }, z.core.$strict>;
7004
+ /** The whole picture of one session's agents, tasks and workflow runs. */
7005
+ declare const SessionAgentTreeSchema: z.ZodObject<{
7006
+ project: z.ZodString;
7007
+ sessionId: z.ZodString;
7008
+ superseded: z.ZodBoolean;
7009
+ agents: z.ZodArray<z.ZodType<AgentNode, unknown, z.core.$ZodTypeInternals<AgentNode, unknown>>>;
7010
+ tasks: z.ZodArray<z.ZodObject<{
7011
+ id: z.ZodString;
7012
+ subject: z.ZodString;
7013
+ description: z.ZodOptional<z.ZodString>;
7014
+ status: z.ZodString;
7015
+ activeForm: z.ZodOptional<z.ZodString>;
7016
+ owner: z.ZodOptional<z.ZodString>;
7017
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7018
+ blocks: z.ZodArray<z.ZodString>;
7019
+ blockedBy: z.ZodArray<z.ZodString>;
7020
+ taskList: z.ZodOptional<z.ZodString>;
7021
+ }, z.core.$strict>>;
7022
+ workflowRuns: z.ZodArray<z.ZodObject<{
7023
+ runId: z.ZodString;
7024
+ workflowName: z.ZodOptional<z.ZodString>;
7025
+ status: z.ZodOptional<z.ZodString>;
7026
+ startTime: z.ZodOptional<z.ZodNumber>;
7027
+ phases: z.ZodArray<z.ZodString>;
7028
+ summary: z.ZodOptional<z.ZodString>;
7029
+ }, z.core.$strict>>;
7030
+ problems: z.ZodArray<z.ZodObject<{
7031
+ path: z.ZodString;
7032
+ reason: z.ZodString;
7033
+ }, z.core.$strict>>;
7034
+ }, z.core.$strict>;
7035
+ type AgentKind = z.output<typeof AgentKindSchema>;
7036
+ type TaskItem = z.output<typeof TaskItemSchema>;
7037
+ type WorkflowRun = z.output<typeof WorkflowRunSchema>;
7038
+ type SessionAgentTree = z.output<typeof SessionAgentTreeSchema>;
7039
+
7040
+ /**
7041
+ * The agent tree reader: pure over an injected filesystem, so the CLI, the library surface and tests read the same way, and nothing here writes. The layout it reads is documented in `docs/agent-transcripts.md`.
7042
+ */
7043
+ /** The filesystem reads the agent tree reader needs. */
7044
+ type AgentReadFs = Pick<FarmFs, "readFileUtf8" | "readdir" | "lstat">;
7045
+ /** One session found under a project: its directory name split into the session id and whether the entry is an archived copy (superseded by a resume, or orphaned) rather than the live session. */
7046
+ interface SessionRef {
7047
+ readonly project: string;
7048
+ readonly sessionId: string;
7049
+ readonly superseded: boolean;
7050
+ /** The directory (and transcript stem) name exactly as on disk, which differs from `sessionId` for an archived copy. */
7051
+ readonly entry: string;
7052
+ }
7053
+ /** Lists every session under every project: a transcript file, or a directory holding agents or workflow runs. Sorted by project then entry so output is stable. */
7054
+ declare function listSessions(fs: AgentReadFs, configDir: string): readonly SessionRef[];
7055
+ /** One session in a listing: the cheap facts read from directory listings and one stat, without parsing any agent. */
7056
+ interface SessionSummary extends SessionRef {
7057
+ /** How many agent meta files the session has, across its top-level agents and every workflow run. */
7058
+ readonly agentCount: number;
7059
+ /** How many workflow run records the session has. */
7060
+ readonly workflowRunCount: number;
7061
+ /** When the session's transcript was last written, as an ISO instant; absent when there is no transcript file. */
7062
+ readonly updatedAt?: string;
7063
+ }
7064
+ /** What a caller knows about a session that the disk does not record. */
7065
+ interface ReadSessionOptions {
7066
+ /** Task lists the session was pointed at with `CLAUDE_CODE_TASK_LIST_ID`, which is a property of the process environment and is written nowhere in the session's files. Each is read from `tasks/<id>` and its tasks carry the id as `taskList`. */
7067
+ readonly taskListIds?: readonly string[];
7068
+ }
7069
+ /** Summarises one session without reading any agent file: listings and one stat only, so it is cheap over every session an identity has. */
7070
+ declare function summariseSession(fs: AgentReadFs, configDir: string, ref: Readonly<SessionRef>): SessionSummary;
7071
+ /**
7072
+ * Reads one session's agents, task list and workflow runs. Every file that cannot be used is listed in `problems` with the reason; a missing directory is simply an empty section, because a session that never spawned an agent has none.
7073
+ */
7074
+ declare function readSessionAgentTree(fs: AgentReadFs, configDir: string, ref: SessionRef, options?: Readonly<ReadSessionOptions>): SessionAgentTree;
7075
+
7076
+ /**
7077
+ * A session's agents as a typed oRPC API: the sessions that spawned agents or ran workflows, and one session's agent tree, task list and workflow runs, read from the transcripts on disk. The same data `agent-shim session list` and `session show` print, so a consumer that is not the CLI (an MCP client, the library) asks the door for it.
7078
+ */
7079
+ /** What `agentTrees.list` accepts. */
7080
+ declare const AgentTreesListInputSchema: z.ZodObject<{
7081
+ identity: z.ZodOptional<z.ZodString>;
7082
+ all: z.ZodOptional<z.ZodBoolean>;
7083
+ }, z.core.$strict>;
7084
+ /** What `agentTrees.list` answers. */
7085
+ declare const AgentTreesListOutputSchema: z.ZodArray<z.ZodObject<{
7086
+ project: z.ZodString;
7087
+ sessionId: z.ZodString;
7088
+ superseded: z.ZodBoolean;
7089
+ entry: z.ZodString;
7090
+ agentCount: z.ZodNumber;
7091
+ workflowRunCount: z.ZodNumber;
7092
+ updatedAt: z.ZodOptional<z.ZodISODateTime>;
7093
+ identities: z.ZodArray<z.ZodString>;
7094
+ }, z.core.$strict>>;
7095
+ /** What `agentTrees.show` accepts. */
7096
+ declare const AgentTreesShowInputSchema: z.ZodObject<{
7097
+ session: z.ZodString;
7098
+ identity: z.ZodOptional<z.ZodString>;
7099
+ }, z.core.$strict>;
7100
+ /** What `agentTrees.show` answers: the tree beside the identities that expose it. */
7101
+ declare const AgentTreesShowOutputSchema: z.ZodObject<{
7102
+ project: z.ZodString;
7103
+ sessionId: z.ZodString;
7104
+ superseded: z.ZodBoolean;
7105
+ agents: z.ZodArray<z.ZodType<AgentNode, unknown, z.core.$ZodTypeInternals<AgentNode, unknown>>>;
7106
+ tasks: z.ZodArray<z.ZodObject<{
7107
+ id: z.ZodString;
7108
+ subject: z.ZodString;
7109
+ description: z.ZodOptional<z.ZodString>;
7110
+ status: z.ZodString;
7111
+ activeForm: z.ZodOptional<z.ZodString>;
7112
+ owner: z.ZodOptional<z.ZodString>;
7113
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7114
+ blocks: z.ZodArray<z.ZodString>;
7115
+ blockedBy: z.ZodArray<z.ZodString>;
7116
+ taskList: z.ZodOptional<z.ZodString>;
7117
+ }, z.core.$strict>>;
7118
+ workflowRuns: z.ZodArray<z.ZodObject<{
7119
+ runId: z.ZodString;
7120
+ workflowName: z.ZodOptional<z.ZodString>;
7121
+ status: z.ZodOptional<z.ZodString>;
7122
+ startTime: z.ZodOptional<z.ZodNumber>;
7123
+ phases: z.ZodArray<z.ZodString>;
7124
+ summary: z.ZodOptional<z.ZodString>;
7125
+ }, z.core.$strict>>;
7126
+ problems: z.ZodArray<z.ZodObject<{
7127
+ path: z.ZodString;
7128
+ reason: z.ZodString;
7129
+ }, z.core.$strict>>;
7130
+ identities: z.ZodArray<z.ZodString>;
7131
+ }, z.core.$strict>;
7132
+ /** Everything the agent trees procedures need, injected so they serve against fakes in tests exactly as the door's real wiring serves against this machine. */
7133
+ interface AgentTreesApiDeps {
7134
+ /** This generation's control token: the same value every router on the mount checks. */
7135
+ readonly expectedToken: string;
7136
+ /** Lists sessions, throwing the reader's `CliError` for an identity that does not exist. */
7137
+ readonly sessionList: (filters: z.infer<typeof AgentTreesListInputSchema>) => readonly (SessionSummary & {
7138
+ readonly identities: readonly string[];
7139
+ })[];
7140
+ /** Resolves and reads one session, throwing the reader's `CliError` for an id that matches none or several. */
7141
+ readonly sessionShow: (query: string, identity: string | undefined) => {
7142
+ readonly identities: readonly string[];
7143
+ readonly tree: z.infer<typeof SessionAgentTreeSchema>;
7144
+ };
7145
+ }
7146
+ /** Builds the agent trees router: two reads, behind the control-token middleware. */
7147
+ declare function createAgentTreesApiRouter(deps: AgentTreesApiDeps): {
7148
+ agentTrees: {
7149
+ list: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, z.ZodObject<{
7150
+ identity: z.ZodOptional<z.ZodString>;
7151
+ all: z.ZodOptional<z.ZodBoolean>;
7152
+ }, z.core.$strict>, z.ZodArray<z.ZodObject<{
7153
+ project: z.ZodString;
7154
+ sessionId: z.ZodString;
7155
+ superseded: z.ZodBoolean;
7156
+ entry: z.ZodString;
7157
+ agentCount: z.ZodNumber;
7158
+ workflowRunCount: z.ZodNumber;
7159
+ updatedAt: z.ZodOptional<z.ZodISODateTime>;
7160
+ identities: z.ZodArray<z.ZodString>;
7161
+ }, z.core.$strict>>, MergedErrorMap<$ErrorMap, TErrorMap>>;
7162
+ show: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, z.ZodObject<{
7163
+ session: z.ZodString;
7164
+ identity: z.ZodOptional<z.ZodString>;
7165
+ }, z.core.$strict>, z.ZodObject<{
7166
+ project: z.ZodString;
7167
+ sessionId: z.ZodString;
7168
+ superseded: z.ZodBoolean;
7169
+ agents: z.ZodArray<z.ZodType<AgentNode, unknown, z.core.$ZodTypeInternals<AgentNode, unknown>>>;
7170
+ tasks: z.ZodArray<z.ZodObject<{
7171
+ id: z.ZodString;
7172
+ subject: z.ZodString;
7173
+ description: z.ZodOptional<z.ZodString>;
7174
+ status: z.ZodString;
7175
+ activeForm: z.ZodOptional<z.ZodString>;
7176
+ owner: z.ZodOptional<z.ZodString>;
7177
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7178
+ blocks: z.ZodArray<z.ZodString>;
7179
+ blockedBy: z.ZodArray<z.ZodString>;
7180
+ taskList: z.ZodOptional<z.ZodString>;
7181
+ }, z.core.$strict>>;
7182
+ workflowRuns: z.ZodArray<z.ZodObject<{
7183
+ runId: z.ZodString;
7184
+ workflowName: z.ZodOptional<z.ZodString>;
7185
+ status: z.ZodOptional<z.ZodString>;
7186
+ startTime: z.ZodOptional<z.ZodNumber>;
7187
+ phases: z.ZodArray<z.ZodString>;
7188
+ summary: z.ZodOptional<z.ZodString>;
7189
+ }, z.core.$strict>>;
7190
+ problems: z.ZodArray<z.ZodObject<{
7191
+ path: z.ZodString;
7192
+ reason: z.ZodString;
7193
+ }, z.core.$strict>>;
7194
+ identities: z.ZodArray<z.ZodString>;
7195
+ }, z.core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
7196
+ };
7197
+ };
7198
+ /** The agent trees router, as the merged mount's and the client's own types are derived from it. */
7199
+ type AgentTreesApiRouter = ReturnType<typeof createAgentTreesApiRouter>;
7200
+
6915
7201
  /**
6916
7202
  * The front door's read-only status: the data `agent-shim frontdoor status` prints and the door's own typed `frontdoor.status` procedure returns, collected without starting or stopping anything. Kept here, beside the state file and session registry it reads, so both the command layer and the typed API's schema layer share one shape and one collector with no dependency on the CLI's command wiring.
6917
7203
  */
@@ -7590,7 +7876,7 @@ type ControlApiRouter = ReturnType<typeof createControlApiRouter>;
7590
7876
  /** The control plane alone as a client sees it: every call presents the control token, over TLS trusting only the CA file the door's own state names. */
7591
7877
  type ControlApiClient = RouterClient<ControlApiRouter>;
7592
7878
  /** Everything the door's whole typed API needs: the Remote Control operations, the control-plane reads, the configuration writes and the door-wide event stream, one deps object because one mount serves them under one token. */
7593
- interface DoorApiDeps extends RcApiDeps, ControlApiDeps, ConfigApiDeps, DoorEventsApiDeps, LifecycleApiDeps, CodexApiDeps, LaunchApiDeps {
7879
+ interface DoorApiDeps extends RcApiDeps, ControlApiDeps, ConfigApiDeps, DoorEventsApiDeps, LifecycleApiDeps, CodexApiDeps, LaunchApiDeps, AgentTreesApiDeps {
7594
7880
  }
7595
7881
  /** Builds the door's whole typed API: the Remote Control router, the control-plane routers, the configuration router and the events router beside them, one object for the one handler the provider listener mounts. */
7596
7882
  declare function createDoorApiRouter(deps: DoorApiDeps): {
@@ -7638,6 +7924,55 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
7638
7924
  sources: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
7639
7925
  }, zod_v4_core.$strict>, any, MergedErrorMap<$ErrorMap, TErrorMap>>;
7640
7926
  };
7927
+ agentTrees: {
7928
+ list: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
7929
+ identity: zod.ZodOptional<zod.ZodString>;
7930
+ all: zod.ZodOptional<zod.ZodBoolean>;
7931
+ }, zod_v4_core.$strict>, zod.ZodArray<zod.ZodObject<{
7932
+ project: zod.ZodString;
7933
+ sessionId: zod.ZodString;
7934
+ superseded: zod.ZodBoolean;
7935
+ entry: zod.ZodString;
7936
+ agentCount: zod.ZodNumber;
7937
+ workflowRunCount: zod.ZodNumber;
7938
+ updatedAt: zod.ZodOptional<zod.ZodISODateTime>;
7939
+ identities: zod.ZodArray<zod.ZodString>;
7940
+ }, zod_v4_core.$strict>>, MergedErrorMap<$ErrorMap, TErrorMap>>;
7941
+ show: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
7942
+ session: zod.ZodString;
7943
+ identity: zod.ZodOptional<zod.ZodString>;
7944
+ }, zod_v4_core.$strict>, zod.ZodObject<{
7945
+ project: zod.ZodString;
7946
+ sessionId: zod.ZodString;
7947
+ superseded: zod.ZodBoolean;
7948
+ agents: zod.ZodArray<zod.ZodType<AgentNode, unknown, zod_v4_core.$ZodTypeInternals<AgentNode, unknown>>>;
7949
+ tasks: zod.ZodArray<zod.ZodObject<{
7950
+ id: zod.ZodString;
7951
+ subject: zod.ZodString;
7952
+ description: zod.ZodOptional<zod.ZodString>;
7953
+ status: zod.ZodString;
7954
+ activeForm: zod.ZodOptional<zod.ZodString>;
7955
+ owner: zod.ZodOptional<zod.ZodString>;
7956
+ metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
7957
+ blocks: zod.ZodArray<zod.ZodString>;
7958
+ blockedBy: zod.ZodArray<zod.ZodString>;
7959
+ taskList: zod.ZodOptional<zod.ZodString>;
7960
+ }, zod_v4_core.$strict>>;
7961
+ workflowRuns: zod.ZodArray<zod.ZodObject<{
7962
+ runId: zod.ZodString;
7963
+ workflowName: zod.ZodOptional<zod.ZodString>;
7964
+ status: zod.ZodOptional<zod.ZodString>;
7965
+ startTime: zod.ZodOptional<zod.ZodNumber>;
7966
+ phases: zod.ZodArray<zod.ZodString>;
7967
+ summary: zod.ZodOptional<zod.ZodString>;
7968
+ }, zod_v4_core.$strict>>;
7969
+ problems: zod.ZodArray<zod.ZodObject<{
7970
+ path: zod.ZodString;
7971
+ reason: zod.ZodString;
7972
+ }, zod_v4_core.$strict>>;
7973
+ identities: zod.ZodArray<zod.ZodString>;
7974
+ }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
7975
+ };
7641
7976
  launch: {
7642
7977
  resolve: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
7643
7978
  path: zod.ZodString;
@@ -12113,6 +12448,8 @@ interface Candidate {
12113
12448
  readonly scoreWindow?: "sevenDay" | "fiveHour";
12114
12449
  /** False when a quota window would run dry, at the observed pace, before it resets (the five-hour at its own or the rescaled shared pace, the seven-day at its own). A `scored` candidate that is not feasible ranks below every feasible one. */
12115
12450
  readonly feasible: boolean;
12451
+ /** When the soonest window projected to run dry is projected to, for a `scored` candidate that is not feasible: the instant its quota is gone at the observed pace, which is what a launch weighs a returning member against. Absent for a feasible candidate. */
12452
+ readonly runsDryAtMs?: number;
12116
12453
  /** The fraction of the extra-usage allowance still unspent, for a `pay-per-use` member whose only budget is that allowance (an Enterprise account). A member reporting none ranks as having all of it: no cap is known to bind. */
12117
12454
  readonly headroom?: number;
12118
12455
  /** When an `ineligible` candidate can be used again. */
@@ -12140,6 +12477,11 @@ interface PoolRanking {
12140
12477
  readonly identity: string;
12141
12478
  readonly atMs: number;
12142
12479
  };
12480
+ /** When the pick would run dry before its window resets and a refused member returns before that happens, the earliest such member and when it returns: what a launch that would rather have a full window than start one that dies partway holds for. Absent when the pick is projected to last, nothing is refused, or every refused member returns after the pick would run dry. */
12481
+ readonly holdForReturn?: {
12482
+ readonly identity: string;
12483
+ readonly atMs: number;
12484
+ };
12143
12485
  /** The member a resumed or continued conversation started on but moved off, and why, when a launch that resumes could not keep it. One sentence for the launch decision line and `check`. */
12144
12486
  readonly movedOff?: {
12145
12487
  readonly identity: string;
@@ -12182,144 +12524,53 @@ declare function collectPoolPick(params: Readonly<{
12182
12524
  nowMs: number;
12183
12525
  }>): PoolPickReport;
12184
12526
 
12185
- /**
12186
- * The agent tree of one session as the reader returns it, and the shape of the meta file it reads. One definition each, so the type, the validator and the published JSON Schema (`schema/AgentTree.schema.json`) cannot drift. The on-disk layout is documented in `docs/agent-transcripts.md`; it belongs to Claude Code and has changed across versions, which is why the meta file is read leniently and the tree this module returns is strict.
12187
- */
12188
- /**
12189
- * One subagent's `.meta.json`. `agentType` is the one field every version writes; the rest appear only for the kinds and versions that write them, and a version this schema has never seen may add more, so unknown keys are kept rather than rejected.
12190
- */
12191
- declare const AgentMetaSchema: z.ZodObject<{
12192
- agentType: z.ZodString;
12193
- isFork: z.ZodOptional<z.ZodBoolean>;
12194
- description: z.ZodOptional<z.ZodString>;
12195
- name: z.ZodOptional<z.ZodString>;
12196
- toolUseId: z.ZodOptional<z.ZodString>;
12197
- spawnDepth: z.ZodOptional<z.ZodNumber>;
12198
- parentAgentId: z.ZodOptional<z.ZodString>;
12199
- model: z.ZodOptional<z.ZodString>;
12200
- requestShape: z.ZodOptional<z.ZodString>;
12201
- requestNonInteractive: z.ZodOptional<z.ZodBoolean>;
12202
- workflowPhase: z.ZodOptional<z.ZodString>;
12203
- taskKind: z.ZodOptional<z.ZodString>;
12204
- teamName: z.ZodOptional<z.ZodString>;
12205
- worktreePath: z.ZodOptional<z.ZodString>;
12206
- worktreeBranch: z.ZodOptional<z.ZodString>;
12207
- stoppedByUser: z.ZodOptional<z.ZodBoolean>;
12208
- }, z.core.$loose>;
12209
- /** What kind of agent a node is, derived from its meta file: a fork inherits its parent's context, a workflow agent was spawned by a workflow run, a teammate belongs to a team. */
12210
- declare const AgentKindSchema: z.ZodEnum<{
12211
- subagent: "subagent";
12212
- fork: "fork";
12213
- "workflow-agent": "workflow-agent";
12214
- teammate: "teammate";
12215
- }>;
12216
- /** One agent in a session's tree. `children` holds the agents it spawned. */
12217
- interface AgentNode {
12218
- /** The stem after `agent-` in its file names, which for an unnamed agent is the `task_id` Remote Control reports for it. */
12219
- readonly id: string;
12220
- readonly kind: z.infer<typeof AgentKindSchema>;
12221
- readonly agentType: string;
12222
- readonly description?: string;
12223
- readonly name?: string;
12224
- /** The `tool_use` block in the parent's transcript that spawned this agent. */
12225
- readonly toolUseId?: string;
12226
- readonly spawnDepth?: number;
12227
- /** The model the spawn recorded: an alias or `inherit` as often as a concrete id, and not necessarily the model that served the agent's requests. */
12228
- readonly model?: string;
12229
- readonly background?: boolean;
12230
- /** The workflow run this agent belongs to, when it was spawned by one. */
12231
- readonly workflowRunId?: string;
12232
- readonly workflowPhase?: string;
12233
- readonly teamName?: string;
12234
- readonly stoppedByUser?: boolean;
12235
- /** The agent's transcript, relative to the identity's configuration directory. */
12236
- readonly transcript: string;
12237
- readonly children: readonly AgentNode[];
12527
+ /** The reads the session commands and procedures make: the reader's own, plus resolving a path to the real location it points at, which is how identities sharing one history store are told from identities with their own. */
12528
+ interface SessionCommandFs extends AgentReadFs {
12529
+ /** The real path `candidate` resolves to, or undefined when nothing is there. */
12530
+ readonly realpath: (candidate: string) => string | undefined;
12238
12531
  }
12239
- /** The node schema, written out so the recursive `children` field has a lazy reference to itself. */
12240
- declare const AgentNodeSchema: z.ZodType<AgentNode>;
12241
- /** One entry of a task list: the session's own (`tasks/<session-id>/<n>.json`, or `tasks/session-<first-eight-characters>/<n>.json` in current versions) or a shared one (`tasks/<list-id>/<n>.json`), a team's or one named by `CLAUDE_CODE_TASK_LIST_ID`. `status` is an open string: non-standard values occur. */
12242
- declare const TaskItemSchema: z.ZodObject<{
12243
- id: z.ZodString;
12244
- subject: z.ZodString;
12245
- description: z.ZodOptional<z.ZodString>;
12246
- status: z.ZodString;
12247
- activeForm: z.ZodOptional<z.ZodString>;
12248
- owner: z.ZodOptional<z.ZodString>;
12249
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
12250
- blocks: z.ZodArray<z.ZodString>;
12251
- blockedBy: z.ZodArray<z.ZodString>;
12252
- taskList: z.ZodOptional<z.ZodString>;
12253
- }, z.core.$strict>;
12254
- /** One workflow run's record (`workflows/wf_<run-id>.json`), narrowed to what identifies and summarises it. */
12255
- declare const WorkflowRunSchema: z.ZodObject<{
12256
- runId: z.ZodString;
12257
- workflowName: z.ZodOptional<z.ZodString>;
12258
- status: z.ZodOptional<z.ZodString>;
12259
- startTime: z.ZodOptional<z.ZodNumber>;
12260
- phases: z.ZodArray<z.ZodString>;
12261
- summary: z.ZodOptional<z.ZodString>;
12262
- }, z.core.$strict>;
12263
- /** The whole picture of one session's agents, tasks and workflow runs. */
12264
- declare const SessionAgentTreeSchema: z.ZodObject<{
12265
- project: z.ZodString;
12266
- sessionId: z.ZodString;
12267
- superseded: z.ZodBoolean;
12268
- agents: z.ZodArray<z.ZodType<AgentNode, unknown, z.core.$ZodTypeInternals<AgentNode, unknown>>>;
12269
- tasks: z.ZodArray<z.ZodObject<{
12270
- id: z.ZodString;
12271
- subject: z.ZodString;
12272
- description: z.ZodOptional<z.ZodString>;
12273
- status: z.ZodString;
12274
- activeForm: z.ZodOptional<z.ZodString>;
12275
- owner: z.ZodOptional<z.ZodString>;
12276
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
12277
- blocks: z.ZodArray<z.ZodString>;
12278
- blockedBy: z.ZodArray<z.ZodString>;
12279
- taskList: z.ZodOptional<z.ZodString>;
12280
- }, z.core.$strict>>;
12281
- workflowRuns: z.ZodArray<z.ZodObject<{
12282
- runId: z.ZodString;
12283
- workflowName: z.ZodOptional<z.ZodString>;
12284
- status: z.ZodOptional<z.ZodString>;
12285
- startTime: z.ZodOptional<z.ZodNumber>;
12286
- phases: z.ZodArray<z.ZodString>;
12287
- summary: z.ZodOptional<z.ZodString>;
12288
- }, z.core.$strict>>;
12289
- problems: z.ZodArray<z.ZodObject<{
12290
- path: z.ZodString;
12291
- reason: z.ZodString;
12292
- }, z.core.$strict>>;
12293
- }, z.core.$strict>;
12294
- type AgentKind = z.output<typeof AgentKindSchema>;
12295
- type TaskItem = z.output<typeof TaskItemSchema>;
12296
- type WorkflowRun = z.output<typeof WorkflowRunSchema>;
12297
- type SessionAgentTree = z.output<typeof SessionAgentTreeSchema>;
12532
+ /** The real filesystem, for the commands and the door's sessions procedures. */
12533
+ declare const realSessionFs: SessionCommandFs;
12298
12534
 
12299
12535
  /**
12300
- * The agent tree reader: pure over an injected filesystem, so the CLI, the library surface and tests read the same way, and nothing here writes. The layout it reads is documented in `docs/agent-transcripts.md`.
12536
+ * Finding and reading sessions across identities, pure over an injected filesystem: the logic the \`session\` commands and the door's \`sessions\` procedures share, free of command-line dependencies so the library surface can export it.
12301
12537
  */
12302
- /** The filesystem reads the agent tree reader needs. */
12303
- type AgentReadFs = Pick<FarmFs, "readFileUtf8" | "readdir">;
12304
- /** One session found under a project: its directory name split into the session id and whether the entry is an archived copy (superseded by a resume, or orphaned) rather than the live session. */
12305
- interface SessionRef {
12306
- readonly project: string;
12307
- readonly sessionId: string;
12308
- readonly superseded: boolean;
12309
- /** The directory (and transcript stem) name exactly as on disk, which differs from `sessionId` for an archived copy. */
12310
- readonly entry: string;
12538
+ /** A session as `session list` reports it. `identities` names every identity whose configuration exposes it: history is shared between identities by default, so one session is usually visible to several. */
12539
+ interface IdentitySession extends SessionSummary {
12540
+ readonly identities: readonly string[];
12311
12541
  }
12312
- /** Lists every session under every project: a transcript file, or a directory holding agents or workflow runs. Sorted by project then entry so output is stable. */
12313
- declare function listSessions(fs: AgentReadFs, configDir: string): readonly SessionRef[];
12314
- /** What a caller knows about a session that the disk does not record. */
12315
- interface ReadSessionOptions {
12316
- /** Task lists the session was pointed at with `CLAUDE_CODE_TASK_LIST_ID`, which is a property of the process environment and is written nowhere in the session's files. Each is read from `tasks/<id>` and its tasks carry the id as `taskList`. */
12317
- readonly taskListIds?: readonly string[];
12542
+ /** Raised when a session id names no session, or more than one. */
12543
+ declare class SessionLookupError extends CliError {
12544
+ constructor(message: string);
12545
+ }
12546
+ /** Filters for `session list`. */
12547
+ interface SessionListFilters {
12548
+ /** Only this identity's sessions. */
12549
+ readonly identity?: string;
12550
+ /** Include sessions that spawned no agent and ran no workflow. */
12551
+ readonly all?: boolean;
12318
12552
  }
12319
12553
  /**
12320
- * Reads one session's agents, task list and workflow runs. Every file that cannot be used is listed in `problems` with the reason; a missing directory is simply an empty section, because a session that never spawned an agent has none.
12554
+ * Collects `session list`, read-only: every session of the given identities with its agent and workflow-run counts, newest transcript first. Sessions with nothing to inspect are left out unless `all` is set, because most sessions never spawn an agent and listing them would bury the ones that did.
12321
12555
  */
12322
- declare function readSessionAgentTree(fs: AgentReadFs, configDir: string, ref: SessionRef, options?: Readonly<ReadSessionOptions>): SessionAgentTree;
12556
+ declare function collectSessionList(fs: SessionCommandFs, identitiesDir: string, identities: readonly string[], filters: Readonly<SessionListFilters>): readonly IdentitySession[];
12557
+ /** A resolved session: where it is read from and which identities expose it. */
12558
+ interface LocatedSession {
12559
+ readonly identities: readonly string[];
12560
+ readonly configDir: string;
12561
+ readonly ref: SessionRef;
12562
+ }
12563
+ /**
12564
+ * Resolves a session id, or an unambiguous prefix of one, across the given identities. Fails with every candidate named when the prefix matches several, so the caller can say which it meant.
12565
+ */
12566
+ declare function locateSession(fs: SessionCommandFs, identitiesDir: string, identities: readonly string[], query: string, onlyIdentity?: string): LocatedSession;
12567
+ /** One session resolved and read: the tree and every identity that exposes it. */
12568
+ interface SessionView {
12569
+ readonly identities: readonly string[];
12570
+ readonly tree: SessionAgentTree;
12571
+ }
12572
+ /** Resolves a session id or prefix and reads its tree: what `session show` and the door's `sessions.show` both answer. */
12573
+ declare function showSession(fs: SessionCommandFs, identitiesDir: string, identities: readonly string[], query: string, onlyIdentity?: string): SessionView;
12323
12574
 
12324
12575
  /** One quota window's pool-selection facts, in the units a policy reads: fractions of the window, and hours until it resets. */
12325
12576
  interface PoolWindowFacts {
@@ -12959,5 +13210,5 @@ declare const OWN_CLI_FILE_NAME = "cli.cjs";
12959
13210
  */
12960
13211
  declare function agentShimCliPath(distDir?: string | undefined): string;
12961
13212
 
12962
- export { AMBIENT_CREDENTIAL_VARS, AgentKindSchema, AgentMetaSchema, AgentNodeSchema, 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, LaunchLifecycleEventSchema, LaunchRefusedError, LaunchResolveInputSchema, LaunchResolveOutputSchema, LegacyProviderFileError, 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, TaskItemSchema, USAGE_EVENT_SOURCE, UpdateCheckOutputSchema, UsageError, UsageListOutputSchema, UsageLiveOutputSchema, UsageSnapshotError, UsageSnapshotSchema, UsageWindowsInputSchema, UsageWindowsOutputSchema, WhenSchema, WorkflowRunSchema, addDirectoryRule, addIdentity, addPool, addProvider, agentShimCliPath, answerRcControlRequest, 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, 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, matchBranch, 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, 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, snapshotPath, spawnClaude, startConnectServer, submitRcSessionMcpOAuthCallbackUrl, suggestRcSessionFiles, teleportRcSession, topLevelNames, updateDirectoryRule, updateProvider, useIdentity, watchedInstallEntry, writeDirectoryRules };
12963
- export type { AddDirectoryRuleOptions, AddProviderInput, AgentKind, AgentNode, AgentReadFs, 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, InjectedCredential, LaunchApiDeps, LaunchApiRouter, LaunchDecision, LaunchEventPublisher, LaunchLifecycleEvent, LaunchPlan, LaunchPoolDecision, LaunchResolution, LaunchSelection, Layer, LayerId, LayoutPaths, LeafCert, LifecycleApiClient, LifecycleApiDeps, LifecycleApiRouter, 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, SessionRef, SpawnClaudeParams, SseParsedEvent, StickyPick, SupervisorPorts, TaskItem, UnreadableIdentityListEntry, UpdateDirectoryRuleOptions, UpdateProviderInput, UsageChangeEvent, UsageReadFs, UsageSnapshot, WhenCondition, WhenEvaluation, WorkflowRun };
13213
+ 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, LaunchLifecycleEventSchema, LaunchRefusedError, LaunchResolveInputSchema, LaunchResolveOutputSchema, LegacyProviderFileError, 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, 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, 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 };
13214
+ 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, LocatedSession, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-use",
3
- "version": "9.16.0",
3
+ "version": "9.18.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>",