claude-use 9.17.0 → 9.19.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/README.md +2 -2
- package/dist/cli.cjs +1089 -761
- package/dist/index.cjs +1235 -836
- package/dist/index.mjs +1197 -816
- package/dist/types/index.d.ts +569 -133
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -2650,6 +2650,243 @@ declare function realConnectCertStore(paths: {
|
|
|
2650
2650
|
readonly frontdoorCaKeyFile: string;
|
|
2651
2651
|
}): ConnectCertStore;
|
|
2652
2652
|
|
|
2653
|
+
/**
|
|
2654
|
+
* 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.
|
|
2655
|
+
*/
|
|
2656
|
+
/**
|
|
2657
|
+
* 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.
|
|
2658
|
+
*/
|
|
2659
|
+
declare const AgentMetaSchema: z.ZodObject<{
|
|
2660
|
+
agentType: z.ZodString;
|
|
2661
|
+
isFork: z.ZodOptional<z.ZodBoolean>;
|
|
2662
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2663
|
+
name: z.ZodOptional<z.ZodString>;
|
|
2664
|
+
toolUseId: z.ZodOptional<z.ZodString>;
|
|
2665
|
+
spawnDepth: z.ZodOptional<z.ZodNumber>;
|
|
2666
|
+
parentAgentId: z.ZodOptional<z.ZodString>;
|
|
2667
|
+
model: z.ZodOptional<z.ZodString>;
|
|
2668
|
+
requestShape: z.ZodOptional<z.ZodString>;
|
|
2669
|
+
requestNonInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
2670
|
+
workflowPhase: z.ZodOptional<z.ZodString>;
|
|
2671
|
+
taskKind: z.ZodOptional<z.ZodString>;
|
|
2672
|
+
teamName: z.ZodOptional<z.ZodString>;
|
|
2673
|
+
worktreePath: z.ZodOptional<z.ZodString>;
|
|
2674
|
+
worktreeBranch: z.ZodOptional<z.ZodString>;
|
|
2675
|
+
stoppedByUser: z.ZodOptional<z.ZodBoolean>;
|
|
2676
|
+
}, z.core.$loose>;
|
|
2677
|
+
/** 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. */
|
|
2678
|
+
declare const AgentKindSchema: z.ZodEnum<{
|
|
2679
|
+
subagent: "subagent";
|
|
2680
|
+
fork: "fork";
|
|
2681
|
+
"workflow-agent": "workflow-agent";
|
|
2682
|
+
teammate: "teammate";
|
|
2683
|
+
}>;
|
|
2684
|
+
/** One agent in a session's tree. `children` holds the agents it spawned. */
|
|
2685
|
+
interface AgentNode {
|
|
2686
|
+
/** The stem after `agent-` in its file names, which for an unnamed agent is the `task_id` Remote Control reports for it. */
|
|
2687
|
+
readonly id: string;
|
|
2688
|
+
readonly kind: z.infer<typeof AgentKindSchema>;
|
|
2689
|
+
readonly agentType: string;
|
|
2690
|
+
readonly description?: string;
|
|
2691
|
+
readonly name?: string;
|
|
2692
|
+
/** The `tool_use` block in the parent's transcript that spawned this agent. */
|
|
2693
|
+
readonly toolUseId?: string;
|
|
2694
|
+
readonly spawnDepth?: number;
|
|
2695
|
+
/** 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. */
|
|
2696
|
+
readonly model?: string;
|
|
2697
|
+
readonly background?: boolean;
|
|
2698
|
+
/** The workflow run this agent belongs to, when it was spawned by one. */
|
|
2699
|
+
readonly workflowRunId?: string;
|
|
2700
|
+
readonly workflowPhase?: string;
|
|
2701
|
+
readonly teamName?: string;
|
|
2702
|
+
readonly stoppedByUser?: boolean;
|
|
2703
|
+
/** The agent's transcript, relative to the identity's configuration directory. */
|
|
2704
|
+
readonly transcript: string;
|
|
2705
|
+
readonly children: readonly AgentNode[];
|
|
2706
|
+
}
|
|
2707
|
+
/** The node schema, written out so the recursive `children` field has a lazy reference to itself. */
|
|
2708
|
+
declare const AgentNodeSchema: z.ZodType<AgentNode>;
|
|
2709
|
+
/** 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. */
|
|
2710
|
+
declare const TaskItemSchema: z.ZodObject<{
|
|
2711
|
+
id: z.ZodString;
|
|
2712
|
+
subject: z.ZodString;
|
|
2713
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2714
|
+
status: z.ZodString;
|
|
2715
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
2716
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
2717
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2718
|
+
blocks: z.ZodArray<z.ZodString>;
|
|
2719
|
+
blockedBy: z.ZodArray<z.ZodString>;
|
|
2720
|
+
taskList: z.ZodOptional<z.ZodString>;
|
|
2721
|
+
}, z.core.$strict>;
|
|
2722
|
+
/** One workflow run's record (`workflows/wf_<run-id>.json`), narrowed to what identifies and summarises it. */
|
|
2723
|
+
declare const WorkflowRunSchema: z.ZodObject<{
|
|
2724
|
+
runId: z.ZodString;
|
|
2725
|
+
workflowName: z.ZodOptional<z.ZodString>;
|
|
2726
|
+
status: z.ZodOptional<z.ZodString>;
|
|
2727
|
+
startTime: z.ZodOptional<z.ZodNumber>;
|
|
2728
|
+
phases: z.ZodArray<z.ZodString>;
|
|
2729
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
2730
|
+
}, z.core.$strict>;
|
|
2731
|
+
/** One session in a listing: the cheap facts read from directory listings and one stat, and every identity whose configuration exposes it. */
|
|
2732
|
+
declare const SessionSummarySchema: z.ZodObject<{
|
|
2733
|
+
project: z.ZodString;
|
|
2734
|
+
sessionId: z.ZodString;
|
|
2735
|
+
superseded: z.ZodBoolean;
|
|
2736
|
+
entry: z.ZodString;
|
|
2737
|
+
agentCount: z.ZodNumber;
|
|
2738
|
+
workflowRunCount: z.ZodNumber;
|
|
2739
|
+
updatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
2740
|
+
identities: z.ZodArray<z.ZodString>;
|
|
2741
|
+
}, z.core.$strict>;
|
|
2742
|
+
/** The whole picture of one session's agents, tasks and workflow runs. */
|
|
2743
|
+
declare const SessionAgentTreeSchema: z.ZodObject<{
|
|
2744
|
+
project: z.ZodString;
|
|
2745
|
+
sessionId: z.ZodString;
|
|
2746
|
+
superseded: z.ZodBoolean;
|
|
2747
|
+
agents: z.ZodArray<z.ZodType<AgentNode, unknown, z.core.$ZodTypeInternals<AgentNode, unknown>>>;
|
|
2748
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
2749
|
+
id: z.ZodString;
|
|
2750
|
+
subject: z.ZodString;
|
|
2751
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2752
|
+
status: z.ZodString;
|
|
2753
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
2754
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
2755
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2756
|
+
blocks: z.ZodArray<z.ZodString>;
|
|
2757
|
+
blockedBy: z.ZodArray<z.ZodString>;
|
|
2758
|
+
taskList: z.ZodOptional<z.ZodString>;
|
|
2759
|
+
}, z.core.$strict>>;
|
|
2760
|
+
workflowRuns: z.ZodArray<z.ZodObject<{
|
|
2761
|
+
runId: z.ZodString;
|
|
2762
|
+
workflowName: z.ZodOptional<z.ZodString>;
|
|
2763
|
+
status: z.ZodOptional<z.ZodString>;
|
|
2764
|
+
startTime: z.ZodOptional<z.ZodNumber>;
|
|
2765
|
+
phases: z.ZodArray<z.ZodString>;
|
|
2766
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
2767
|
+
}, z.core.$strict>>;
|
|
2768
|
+
problems: z.ZodArray<z.ZodObject<{
|
|
2769
|
+
path: z.ZodString;
|
|
2770
|
+
reason: z.ZodString;
|
|
2771
|
+
}, z.core.$strict>>;
|
|
2772
|
+
}, z.core.$strict>;
|
|
2773
|
+
type AgentKind = z.output<typeof AgentKindSchema>;
|
|
2774
|
+
type TaskItem = z.output<typeof TaskItemSchema>;
|
|
2775
|
+
type WorkflowRun = z.output<typeof WorkflowRunSchema>;
|
|
2776
|
+
type SessionAgentTree = z.output<typeof SessionAgentTreeSchema>;
|
|
2777
|
+
|
|
2778
|
+
/**
|
|
2779
|
+
* The live half of the agent tree: what a Remote Control session's read stream says about its background tasks and subagents (`task_started`, `task_progress`, `task_updated`, `task_notification`, `background_tasks_changed`), and the merge of that with the tree read from disk. The event shapes are documented in `docs/rc-agent-events.md`. The stream exists only for sessions the door observes and only while they are live, so it is never the sole source: the disk tree is authoritative for every session and for completed content, and the stream supplies state the transcript has not flushed yet.
|
|
2780
|
+
*/
|
|
2781
|
+
/** How many tasks one session's book keeps. Past it the oldest-observed finished task is dropped first, so a long-lived session cannot grow the door's memory without bound; a running task is never dropped for a finished one. */
|
|
2782
|
+
declare const LIVE_TASK_CAP = 512;
|
|
2783
|
+
/** One task or subagent as the stream describes it. `status` is an open string: only `completed` has been observed beyond the running state. */
|
|
2784
|
+
declare const LiveTaskSchema: z.ZodObject<{
|
|
2785
|
+
taskId: z.ZodString;
|
|
2786
|
+
sessionId: z.ZodString;
|
|
2787
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
2788
|
+
toolUseId: z.ZodOptional<z.ZodString>;
|
|
2789
|
+
taskType: z.ZodOptional<z.ZodString>;
|
|
2790
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2791
|
+
subagentType: z.ZodOptional<z.ZodString>;
|
|
2792
|
+
spawnDepth: z.ZodOptional<z.ZodNumber>;
|
|
2793
|
+
parentTaskId: z.ZodOptional<z.ZodString>;
|
|
2794
|
+
backgrounded: z.ZodOptional<z.ZodBoolean>;
|
|
2795
|
+
status: z.ZodString;
|
|
2796
|
+
outputFile: z.ZodOptional<z.ZodString>;
|
|
2797
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
2798
|
+
lastToolName: z.ZodOptional<z.ZodString>;
|
|
2799
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
2800
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
2801
|
+
toolUses: z.ZodOptional<z.ZodNumber>;
|
|
2802
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
2803
|
+
}, z.core.$strict>>;
|
|
2804
|
+
observedAt: z.ZodNumber;
|
|
2805
|
+
}, z.core.$strict>;
|
|
2806
|
+
type LiveTask = z.output<typeof LiveTaskSchema>;
|
|
2807
|
+
/** A session's live tasks by `task_id`. */
|
|
2808
|
+
type LiveTaskBook = ReadonlyMap<string, LiveTask>;
|
|
2809
|
+
/**
|
|
2810
|
+
* Folds one stream payload into a session's book and returns the next book (the same one when the payload is not a task event). `task_started` births a task, `task_progress` and `task_notification` refine it, `task_updated` applies its patch, and `background_tasks_changed` fills in the tasks it lists without inventing a state for ones it omits: the snapshot says what is live, not that an unlisted task finished.
|
|
2811
|
+
*
|
|
2812
|
+
* A payload that does not match is ignored, never an error: the stream belongs to Claude Code and gains fields and subtypes between versions.
|
|
2813
|
+
*/
|
|
2814
|
+
declare function applyAgentTaskEvent(book: LiveTaskBook, sessionId: string, payload: unknown, observedAt: number): LiveTaskBook;
|
|
2815
|
+
/** How a merged node relates to the stream: `disk` was only on disk, `both` was matched by a live task. A task only the stream knows is not a node but a member of `liveOnly`. */
|
|
2816
|
+
declare const MergedProvenanceSchema: z.ZodEnum<{
|
|
2817
|
+
disk: "disk";
|
|
2818
|
+
both: "both";
|
|
2819
|
+
}>;
|
|
2820
|
+
/** An agent node of the merged tree: the disk node as read (it wins for everything the transcript holds), the stream's state beside it when a live task matched. */
|
|
2821
|
+
interface MergedAgentNode extends Omit<AgentNode, "children"> {
|
|
2822
|
+
readonly provenance: z.output<typeof MergedProvenanceSchema>;
|
|
2823
|
+
readonly live?: LiveTask;
|
|
2824
|
+
readonly children: readonly MergedAgentNode[];
|
|
2825
|
+
}
|
|
2826
|
+
/** The merged node schema, recursive through a lazy reference like the disk node's. */
|
|
2827
|
+
declare const MergedAgentNodeSchema: z.ZodType<MergedAgentNode>;
|
|
2828
|
+
/** One session's agent tree with the stream's view merged in. */
|
|
2829
|
+
declare const MergedAgentTreeSchema: z.ZodObject<{
|
|
2830
|
+
agents: z.ZodArray<z.ZodType<MergedAgentNode, unknown, z.core.$ZodTypeInternals<MergedAgentNode, unknown>>>;
|
|
2831
|
+
remoteSessions: z.ZodArray<z.ZodString>;
|
|
2832
|
+
liveOnly: z.ZodArray<z.ZodObject<{
|
|
2833
|
+
taskId: z.ZodString;
|
|
2834
|
+
sessionId: z.ZodString;
|
|
2835
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
2836
|
+
toolUseId: z.ZodOptional<z.ZodString>;
|
|
2837
|
+
taskType: z.ZodOptional<z.ZodString>;
|
|
2838
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2839
|
+
subagentType: z.ZodOptional<z.ZodString>;
|
|
2840
|
+
spawnDepth: z.ZodOptional<z.ZodNumber>;
|
|
2841
|
+
parentTaskId: z.ZodOptional<z.ZodString>;
|
|
2842
|
+
backgrounded: z.ZodOptional<z.ZodBoolean>;
|
|
2843
|
+
status: z.ZodString;
|
|
2844
|
+
outputFile: z.ZodOptional<z.ZodString>;
|
|
2845
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
2846
|
+
lastToolName: z.ZodOptional<z.ZodString>;
|
|
2847
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
2848
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
2849
|
+
toolUses: z.ZodOptional<z.ZodNumber>;
|
|
2850
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
2851
|
+
}, z.core.$strict>>;
|
|
2852
|
+
observedAt: z.ZodNumber;
|
|
2853
|
+
}, z.core.$strict>>;
|
|
2854
|
+
project: z.ZodString;
|
|
2855
|
+
sessionId: z.ZodString;
|
|
2856
|
+
superseded: z.ZodBoolean;
|
|
2857
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
2858
|
+
id: z.ZodString;
|
|
2859
|
+
subject: z.ZodString;
|
|
2860
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2861
|
+
status: z.ZodString;
|
|
2862
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
2863
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
2864
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2865
|
+
blocks: z.ZodArray<z.ZodString>;
|
|
2866
|
+
blockedBy: z.ZodArray<z.ZodString>;
|
|
2867
|
+
taskList: z.ZodOptional<z.ZodString>;
|
|
2868
|
+
}, z.core.$strict>>;
|
|
2869
|
+
workflowRuns: z.ZodArray<z.ZodObject<{
|
|
2870
|
+
runId: z.ZodString;
|
|
2871
|
+
workflowName: z.ZodOptional<z.ZodString>;
|
|
2872
|
+
status: z.ZodOptional<z.ZodString>;
|
|
2873
|
+
startTime: z.ZodOptional<z.ZodNumber>;
|
|
2874
|
+
phases: z.ZodArray<z.ZodString>;
|
|
2875
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
2876
|
+
}, z.core.$strict>>;
|
|
2877
|
+
problems: z.ZodArray<z.ZodObject<{
|
|
2878
|
+
path: z.ZodString;
|
|
2879
|
+
reason: z.ZodString;
|
|
2880
|
+
}, z.core.$strict>>;
|
|
2881
|
+
}, z.core.$strict>;
|
|
2882
|
+
type MergedAgentTree = z.output<typeof MergedAgentTreeSchema>;
|
|
2883
|
+
/**
|
|
2884
|
+
* Merges the live tasks into one session's disk tree.
|
|
2885
|
+
*
|
|
2886
|
+
* A live task belongs to the session when its `task_id` is a disk agent's id, its `tool_use_id` is a disk agent's `toolUseId`, or its `output_file` sits under the session's local id (the only place the stream states it). Matched agents keep every disk field and gain `live`; matched-by-session tasks that name no agent are `liveOnly`. Nothing is dropped from the disk tree and nothing the stream said overrides it.
|
|
2887
|
+
*/
|
|
2888
|
+
declare function mergeLiveTasks(tree: SessionAgentTree, live: readonly LiveTask[]): MergedAgentTree;
|
|
2889
|
+
|
|
2653
2890
|
/**
|
|
2654
2891
|
* The persisted half of the tracker's client credential and of its sequence cursor: the OAuth-kind bearer and protocol headers a Remote Control session's client-half calls were last observed with, and the highest sequence number the door's stream attachment had confirmed when its last attachment boundary passed, written per session id so a later door generation can still attach to a session whose create crossed an earlier one and resume its read stream from where the last generation left off.
|
|
2655
2892
|
*
|
|
@@ -2939,6 +3176,8 @@ interface RcSessionTracker {
|
|
|
2939
3176
|
* Files one client read stream envelope: advances the session's sequence cursor, and treats the payload exactly as an observed event-batch body's would be treated, which is how an approval reaches the pending list from the stream (the live finding behind the client attachment: the CLI routes `control_request`s only toward attached clients, so the stream, not the worker's own writes, is where a `can_use_tool` the door must answer becomes visible). A `control_request` whose envelope names the worker as its source births a pending entry; a `control_response` retires the request it answers, whoever answered it.
|
|
2940
3177
|
*/
|
|
2941
3178
|
readonly fileStreamEvent: (sessionId: string, event: RcStreamEnvelope) => void;
|
|
3179
|
+
/** The live background tasks and subagents the observed events described, for one session or every tracked one, each carrying the session that reported it and when it was last observed. */
|
|
3180
|
+
readonly liveTasksOf: (sessionId?: string) => readonly LiveTask[];
|
|
2942
3181
|
/** Retires one pending control request as answered: what a successful answer write calls, so the request stops being listed the moment it is answered. */
|
|
2943
3182
|
readonly completePending: (sessionId: string, requestId: string) => void;
|
|
2944
3183
|
/** Stops the idle sweep timer. The entries themselves are unreachable the moment the door drops them. */
|
|
@@ -6912,6 +7151,215 @@ declare function createLaunchApiRouter(deps: LaunchApiDeps): {
|
|
|
6912
7151
|
/** The launch router, as the merged mount's and the client's own types are derived from it. */
|
|
6913
7152
|
type LaunchApiRouter = ReturnType<typeof createLaunchApiRouter>;
|
|
6914
7153
|
|
|
7154
|
+
/**
|
|
7155
|
+
* 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`.
|
|
7156
|
+
*/
|
|
7157
|
+
/** The filesystem reads the agent tree reader needs. */
|
|
7158
|
+
type AgentReadFs = Pick<FarmFs, "readFileUtf8" | "readdir" | "lstat">;
|
|
7159
|
+
/** 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. */
|
|
7160
|
+
interface SessionRef {
|
|
7161
|
+
readonly project: string;
|
|
7162
|
+
readonly sessionId: string;
|
|
7163
|
+
readonly superseded: boolean;
|
|
7164
|
+
/** The directory (and transcript stem) name exactly as on disk, which differs from `sessionId` for an archived copy. */
|
|
7165
|
+
readonly entry: string;
|
|
7166
|
+
}
|
|
7167
|
+
/** 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. */
|
|
7168
|
+
declare function listSessions(fs: AgentReadFs, configDir: string): readonly SessionRef[];
|
|
7169
|
+
/** One session in a listing: the cheap facts read from directory listings and one stat, without parsing any agent. */
|
|
7170
|
+
interface SessionSummary extends SessionRef {
|
|
7171
|
+
/** How many agent meta files the session has, across its top-level agents and every workflow run. */
|
|
7172
|
+
readonly agentCount: number;
|
|
7173
|
+
/** How many workflow run records the session has. */
|
|
7174
|
+
readonly workflowRunCount: number;
|
|
7175
|
+
/** When the session's transcript was last written, as an ISO instant; absent when there is no transcript file. */
|
|
7176
|
+
readonly updatedAt?: string;
|
|
7177
|
+
}
|
|
7178
|
+
/** What a caller knows about a session that the disk does not record. */
|
|
7179
|
+
interface ReadSessionOptions {
|
|
7180
|
+
/** 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`. */
|
|
7181
|
+
readonly taskListIds?: readonly string[];
|
|
7182
|
+
}
|
|
7183
|
+
/** Summarises one session without reading any agent file: listings and one stat only, so it is cheap over every session an identity has. */
|
|
7184
|
+
declare function summariseSession(fs: AgentReadFs, configDir: string, ref: Readonly<SessionRef>): SessionSummary;
|
|
7185
|
+
/**
|
|
7186
|
+
* 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.
|
|
7187
|
+
*/
|
|
7188
|
+
declare function readSessionAgentTree(fs: AgentReadFs, configDir: string, ref: SessionRef, options?: Readonly<ReadSessionOptions>): SessionAgentTree;
|
|
7189
|
+
|
|
7190
|
+
/**
|
|
7191
|
+
* 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.
|
|
7192
|
+
*/
|
|
7193
|
+
/** What `agentTrees.list` accepts. */
|
|
7194
|
+
declare const AgentTreesListInputSchema: z.ZodObject<{
|
|
7195
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
7196
|
+
all: z.ZodOptional<z.ZodBoolean>;
|
|
7197
|
+
}, z.core.$strict>;
|
|
7198
|
+
/** What `agentTrees.list` answers. */
|
|
7199
|
+
declare const AgentTreesListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
7200
|
+
project: z.ZodString;
|
|
7201
|
+
sessionId: z.ZodString;
|
|
7202
|
+
superseded: z.ZodBoolean;
|
|
7203
|
+
entry: z.ZodString;
|
|
7204
|
+
agentCount: z.ZodNumber;
|
|
7205
|
+
workflowRunCount: z.ZodNumber;
|
|
7206
|
+
updatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
7207
|
+
identities: z.ZodArray<z.ZodString>;
|
|
7208
|
+
}, z.core.$strict>>;
|
|
7209
|
+
/** What `agentTrees.show` accepts. */
|
|
7210
|
+
declare const AgentTreesShowInputSchema: z.ZodObject<{
|
|
7211
|
+
session: z.ZodString;
|
|
7212
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
7213
|
+
}, z.core.$strict>;
|
|
7214
|
+
/** What `agentTrees.show` answers: the tree read from disk with the live Remote Control tasks merged in, beside the identities that expose it. */
|
|
7215
|
+
declare const AgentTreesShowOutputSchema: z.ZodObject<{
|
|
7216
|
+
agents: z.ZodArray<z.ZodType<MergedAgentNode, unknown, z.core.$ZodTypeInternals<MergedAgentNode, unknown>>>;
|
|
7217
|
+
remoteSessions: z.ZodArray<z.ZodString>;
|
|
7218
|
+
liveOnly: z.ZodArray<z.ZodObject<{
|
|
7219
|
+
taskId: z.ZodString;
|
|
7220
|
+
sessionId: z.ZodString;
|
|
7221
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
7222
|
+
toolUseId: z.ZodOptional<z.ZodString>;
|
|
7223
|
+
taskType: z.ZodOptional<z.ZodString>;
|
|
7224
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7225
|
+
subagentType: z.ZodOptional<z.ZodString>;
|
|
7226
|
+
spawnDepth: z.ZodOptional<z.ZodNumber>;
|
|
7227
|
+
parentTaskId: z.ZodOptional<z.ZodString>;
|
|
7228
|
+
backgrounded: z.ZodOptional<z.ZodBoolean>;
|
|
7229
|
+
status: z.ZodString;
|
|
7230
|
+
outputFile: z.ZodOptional<z.ZodString>;
|
|
7231
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
7232
|
+
lastToolName: z.ZodOptional<z.ZodString>;
|
|
7233
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
7234
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
7235
|
+
toolUses: z.ZodOptional<z.ZodNumber>;
|
|
7236
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
7237
|
+
}, z.core.$strict>>;
|
|
7238
|
+
observedAt: z.ZodNumber;
|
|
7239
|
+
}, z.core.$strict>>;
|
|
7240
|
+
project: z.ZodString;
|
|
7241
|
+
sessionId: z.ZodString;
|
|
7242
|
+
superseded: z.ZodBoolean;
|
|
7243
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
7244
|
+
id: z.ZodString;
|
|
7245
|
+
subject: z.ZodString;
|
|
7246
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7247
|
+
status: z.ZodString;
|
|
7248
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
7249
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
7250
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7251
|
+
blocks: z.ZodArray<z.ZodString>;
|
|
7252
|
+
blockedBy: z.ZodArray<z.ZodString>;
|
|
7253
|
+
taskList: z.ZodOptional<z.ZodString>;
|
|
7254
|
+
}, z.core.$strict>>;
|
|
7255
|
+
workflowRuns: z.ZodArray<z.ZodObject<{
|
|
7256
|
+
runId: z.ZodString;
|
|
7257
|
+
workflowName: z.ZodOptional<z.ZodString>;
|
|
7258
|
+
status: z.ZodOptional<z.ZodString>;
|
|
7259
|
+
startTime: z.ZodOptional<z.ZodNumber>;
|
|
7260
|
+
phases: z.ZodArray<z.ZodString>;
|
|
7261
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
7262
|
+
}, z.core.$strict>>;
|
|
7263
|
+
problems: z.ZodArray<z.ZodObject<{
|
|
7264
|
+
path: z.ZodString;
|
|
7265
|
+
reason: z.ZodString;
|
|
7266
|
+
}, z.core.$strict>>;
|
|
7267
|
+
identities: z.ZodArray<z.ZodString>;
|
|
7268
|
+
}, z.core.$strict>;
|
|
7269
|
+
/** 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. */
|
|
7270
|
+
interface AgentTreesApiDeps {
|
|
7271
|
+
/** This generation's control token: the same value every router on the mount checks. */
|
|
7272
|
+
readonly expectedToken: string;
|
|
7273
|
+
/** Lists sessions, throwing the reader's `CliError` for an identity that does not exist. */
|
|
7274
|
+
readonly sessionList: (filters: z.infer<typeof AgentTreesListInputSchema>) => readonly (SessionSummary & {
|
|
7275
|
+
readonly identities: readonly string[];
|
|
7276
|
+
})[];
|
|
7277
|
+
/** Resolves and reads one session, throwing the reader's `CliError` for an id that matches none or several. */
|
|
7278
|
+
readonly sessionShow: (query: string, identity: string | undefined) => {
|
|
7279
|
+
readonly identities: readonly string[];
|
|
7280
|
+
readonly tree: z.infer<typeof SessionAgentTreeSchema>;
|
|
7281
|
+
};
|
|
7282
|
+
/** The live tasks the door has observed on its Remote Control sessions, which the disk tree is merged with. Empty when no session is live. */
|
|
7283
|
+
readonly liveTasks: () => readonly LiveTask[];
|
|
7284
|
+
}
|
|
7285
|
+
/** Builds the agent trees router: two reads, behind the control-token middleware. */
|
|
7286
|
+
declare function createAgentTreesApiRouter(deps: AgentTreesApiDeps): {
|
|
7287
|
+
agentTrees: {
|
|
7288
|
+
list: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, z.ZodObject<{
|
|
7289
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
7290
|
+
all: z.ZodOptional<z.ZodBoolean>;
|
|
7291
|
+
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
7292
|
+
project: z.ZodString;
|
|
7293
|
+
sessionId: z.ZodString;
|
|
7294
|
+
superseded: z.ZodBoolean;
|
|
7295
|
+
entry: z.ZodString;
|
|
7296
|
+
agentCount: z.ZodNumber;
|
|
7297
|
+
workflowRunCount: z.ZodNumber;
|
|
7298
|
+
updatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
7299
|
+
identities: z.ZodArray<z.ZodString>;
|
|
7300
|
+
}, z.core.$strict>>, MergedErrorMap<$ErrorMap, TErrorMap>>;
|
|
7301
|
+
show: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, z.ZodObject<{
|
|
7302
|
+
session: z.ZodString;
|
|
7303
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
7304
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
7305
|
+
agents: z.ZodArray<z.ZodType<MergedAgentNode, unknown, z.core.$ZodTypeInternals<MergedAgentNode, unknown>>>;
|
|
7306
|
+
remoteSessions: z.ZodArray<z.ZodString>;
|
|
7307
|
+
liveOnly: z.ZodArray<z.ZodObject<{
|
|
7308
|
+
taskId: z.ZodString;
|
|
7309
|
+
sessionId: z.ZodString;
|
|
7310
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
7311
|
+
toolUseId: z.ZodOptional<z.ZodString>;
|
|
7312
|
+
taskType: z.ZodOptional<z.ZodString>;
|
|
7313
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7314
|
+
subagentType: z.ZodOptional<z.ZodString>;
|
|
7315
|
+
spawnDepth: z.ZodOptional<z.ZodNumber>;
|
|
7316
|
+
parentTaskId: z.ZodOptional<z.ZodString>;
|
|
7317
|
+
backgrounded: z.ZodOptional<z.ZodBoolean>;
|
|
7318
|
+
status: z.ZodString;
|
|
7319
|
+
outputFile: z.ZodOptional<z.ZodString>;
|
|
7320
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
7321
|
+
lastToolName: z.ZodOptional<z.ZodString>;
|
|
7322
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
7323
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
7324
|
+
toolUses: z.ZodOptional<z.ZodNumber>;
|
|
7325
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
7326
|
+
}, z.core.$strict>>;
|
|
7327
|
+
observedAt: z.ZodNumber;
|
|
7328
|
+
}, z.core.$strict>>;
|
|
7329
|
+
project: z.ZodString;
|
|
7330
|
+
sessionId: z.ZodString;
|
|
7331
|
+
superseded: z.ZodBoolean;
|
|
7332
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
7333
|
+
id: z.ZodString;
|
|
7334
|
+
subject: z.ZodString;
|
|
7335
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7336
|
+
status: z.ZodString;
|
|
7337
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
7338
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
7339
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7340
|
+
blocks: z.ZodArray<z.ZodString>;
|
|
7341
|
+
blockedBy: z.ZodArray<z.ZodString>;
|
|
7342
|
+
taskList: z.ZodOptional<z.ZodString>;
|
|
7343
|
+
}, z.core.$strict>>;
|
|
7344
|
+
workflowRuns: z.ZodArray<z.ZodObject<{
|
|
7345
|
+
runId: z.ZodString;
|
|
7346
|
+
workflowName: z.ZodOptional<z.ZodString>;
|
|
7347
|
+
status: z.ZodOptional<z.ZodString>;
|
|
7348
|
+
startTime: z.ZodOptional<z.ZodNumber>;
|
|
7349
|
+
phases: z.ZodArray<z.ZodString>;
|
|
7350
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
7351
|
+
}, z.core.$strict>>;
|
|
7352
|
+
problems: z.ZodArray<z.ZodObject<{
|
|
7353
|
+
path: z.ZodString;
|
|
7354
|
+
reason: z.ZodString;
|
|
7355
|
+
}, z.core.$strict>>;
|
|
7356
|
+
identities: z.ZodArray<z.ZodString>;
|
|
7357
|
+
}, z.core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
|
|
7358
|
+
};
|
|
7359
|
+
};
|
|
7360
|
+
/** The agent trees router, as the merged mount's and the client's own types are derived from it. */
|
|
7361
|
+
type AgentTreesApiRouter = ReturnType<typeof createAgentTreesApiRouter>;
|
|
7362
|
+
|
|
6915
7363
|
/**
|
|
6916
7364
|
* 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
7365
|
*/
|
|
@@ -7590,7 +8038,7 @@ type ControlApiRouter = ReturnType<typeof createControlApiRouter>;
|
|
|
7590
8038
|
/** 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
8039
|
type ControlApiClient = RouterClient<ControlApiRouter>;
|
|
7592
8040
|
/** 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 {
|
|
8041
|
+
interface DoorApiDeps extends RcApiDeps, ControlApiDeps, ConfigApiDeps, DoorEventsApiDeps, LifecycleApiDeps, CodexApiDeps, LaunchApiDeps, AgentTreesApiDeps {
|
|
7594
8042
|
}
|
|
7595
8043
|
/** 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
8044
|
declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
@@ -7638,6 +8086,78 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
7638
8086
|
sources: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
7639
8087
|
}, zod_v4_core.$strict>, any, MergedErrorMap<$ErrorMap, TErrorMap>>;
|
|
7640
8088
|
};
|
|
8089
|
+
agentTrees: {
|
|
8090
|
+
list: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
|
|
8091
|
+
identity: zod.ZodOptional<zod.ZodString>;
|
|
8092
|
+
all: zod.ZodOptional<zod.ZodBoolean>;
|
|
8093
|
+
}, zod_v4_core.$strict>, zod.ZodArray<zod.ZodObject<{
|
|
8094
|
+
project: zod.ZodString;
|
|
8095
|
+
sessionId: zod.ZodString;
|
|
8096
|
+
superseded: zod.ZodBoolean;
|
|
8097
|
+
entry: zod.ZodString;
|
|
8098
|
+
agentCount: zod.ZodNumber;
|
|
8099
|
+
workflowRunCount: zod.ZodNumber;
|
|
8100
|
+
updatedAt: zod.ZodOptional<zod.ZodISODateTime>;
|
|
8101
|
+
identities: zod.ZodArray<zod.ZodString>;
|
|
8102
|
+
}, zod_v4_core.$strict>>, MergedErrorMap<$ErrorMap, TErrorMap>>;
|
|
8103
|
+
show: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
|
|
8104
|
+
session: zod.ZodString;
|
|
8105
|
+
identity: zod.ZodOptional<zod.ZodString>;
|
|
8106
|
+
}, zod_v4_core.$strict>, zod.ZodObject<{
|
|
8107
|
+
agents: zod.ZodArray<zod.ZodType<MergedAgentNode, unknown, zod_v4_core.$ZodTypeInternals<MergedAgentNode, unknown>>>;
|
|
8108
|
+
remoteSessions: zod.ZodArray<zod.ZodString>;
|
|
8109
|
+
liveOnly: zod.ZodArray<zod.ZodObject<{
|
|
8110
|
+
taskId: zod.ZodString;
|
|
8111
|
+
sessionId: zod.ZodString;
|
|
8112
|
+
runId: zod.ZodOptional<zod.ZodString>;
|
|
8113
|
+
toolUseId: zod.ZodOptional<zod.ZodString>;
|
|
8114
|
+
taskType: zod.ZodOptional<zod.ZodString>;
|
|
8115
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
8116
|
+
subagentType: zod.ZodOptional<zod.ZodString>;
|
|
8117
|
+
spawnDepth: zod.ZodOptional<zod.ZodNumber>;
|
|
8118
|
+
parentTaskId: zod.ZodOptional<zod.ZodString>;
|
|
8119
|
+
backgrounded: zod.ZodOptional<zod.ZodBoolean>;
|
|
8120
|
+
status: zod.ZodString;
|
|
8121
|
+
outputFile: zod.ZodOptional<zod.ZodString>;
|
|
8122
|
+
summary: zod.ZodOptional<zod.ZodString>;
|
|
8123
|
+
lastToolName: zod.ZodOptional<zod.ZodString>;
|
|
8124
|
+
usage: zod.ZodOptional<zod.ZodObject<{
|
|
8125
|
+
totalTokens: zod.ZodOptional<zod.ZodNumber>;
|
|
8126
|
+
toolUses: zod.ZodOptional<zod.ZodNumber>;
|
|
8127
|
+
durationMs: zod.ZodOptional<zod.ZodNumber>;
|
|
8128
|
+
}, zod_v4_core.$strict>>;
|
|
8129
|
+
observedAt: zod.ZodNumber;
|
|
8130
|
+
}, zod_v4_core.$strict>>;
|
|
8131
|
+
project: zod.ZodString;
|
|
8132
|
+
sessionId: zod.ZodString;
|
|
8133
|
+
superseded: zod.ZodBoolean;
|
|
8134
|
+
tasks: zod.ZodArray<zod.ZodObject<{
|
|
8135
|
+
id: zod.ZodString;
|
|
8136
|
+
subject: zod.ZodString;
|
|
8137
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
8138
|
+
status: zod.ZodString;
|
|
8139
|
+
activeForm: zod.ZodOptional<zod.ZodString>;
|
|
8140
|
+
owner: zod.ZodOptional<zod.ZodString>;
|
|
8141
|
+
metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
|
|
8142
|
+
blocks: zod.ZodArray<zod.ZodString>;
|
|
8143
|
+
blockedBy: zod.ZodArray<zod.ZodString>;
|
|
8144
|
+
taskList: zod.ZodOptional<zod.ZodString>;
|
|
8145
|
+
}, zod_v4_core.$strict>>;
|
|
8146
|
+
workflowRuns: zod.ZodArray<zod.ZodObject<{
|
|
8147
|
+
runId: zod.ZodString;
|
|
8148
|
+
workflowName: zod.ZodOptional<zod.ZodString>;
|
|
8149
|
+
status: zod.ZodOptional<zod.ZodString>;
|
|
8150
|
+
startTime: zod.ZodOptional<zod.ZodNumber>;
|
|
8151
|
+
phases: zod.ZodArray<zod.ZodString>;
|
|
8152
|
+
summary: zod.ZodOptional<zod.ZodString>;
|
|
8153
|
+
}, zod_v4_core.$strict>>;
|
|
8154
|
+
problems: zod.ZodArray<zod.ZodObject<{
|
|
8155
|
+
path: zod.ZodString;
|
|
8156
|
+
reason: zod.ZodString;
|
|
8157
|
+
}, zod_v4_core.$strict>>;
|
|
8158
|
+
identities: zod.ZodArray<zod.ZodString>;
|
|
8159
|
+
}, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
|
|
8160
|
+
};
|
|
7641
8161
|
launch: {
|
|
7642
8162
|
resolve: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
|
|
7643
8163
|
path: zod.ZodString;
|
|
@@ -12113,6 +12633,8 @@ interface Candidate {
|
|
|
12113
12633
|
readonly scoreWindow?: "sevenDay" | "fiveHour";
|
|
12114
12634
|
/** 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
12635
|
readonly feasible: boolean;
|
|
12636
|
+
/** 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. */
|
|
12637
|
+
readonly runsDryAtMs?: number;
|
|
12116
12638
|
/** 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
12639
|
readonly headroom?: number;
|
|
12118
12640
|
/** When an `ineligible` candidate can be used again. */
|
|
@@ -12140,6 +12662,11 @@ interface PoolRanking {
|
|
|
12140
12662
|
readonly identity: string;
|
|
12141
12663
|
readonly atMs: number;
|
|
12142
12664
|
};
|
|
12665
|
+
/** 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. */
|
|
12666
|
+
readonly holdForReturn?: {
|
|
12667
|
+
readonly identity: string;
|
|
12668
|
+
readonly atMs: number;
|
|
12669
|
+
};
|
|
12143
12670
|
/** 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
12671
|
readonly movedOff?: {
|
|
12145
12672
|
readonly identity: string;
|
|
@@ -12182,144 +12709,53 @@ declare function collectPoolPick(params: Readonly<{
|
|
|
12182
12709
|
nowMs: number;
|
|
12183
12710
|
}>): PoolPickReport;
|
|
12184
12711
|
|
|
12185
|
-
/**
|
|
12186
|
-
|
|
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[];
|
|
12712
|
+
/** 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. */
|
|
12713
|
+
interface SessionCommandFs extends AgentReadFs {
|
|
12714
|
+
/** The real path `candidate` resolves to, or undefined when nothing is there. */
|
|
12715
|
+
readonly realpath: (candidate: string) => string | undefined;
|
|
12238
12716
|
}
|
|
12239
|
-
/** The
|
|
12240
|
-
declare const
|
|
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>;
|
|
12717
|
+
/** The real filesystem, for the commands and the door's sessions procedures. */
|
|
12718
|
+
declare const realSessionFs: SessionCommandFs;
|
|
12298
12719
|
|
|
12299
12720
|
/**
|
|
12300
|
-
*
|
|
12721
|
+
* 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
12722
|
*/
|
|
12302
|
-
/**
|
|
12303
|
-
|
|
12304
|
-
|
|
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;
|
|
12723
|
+
/** 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. */
|
|
12724
|
+
interface IdentitySession extends SessionSummary {
|
|
12725
|
+
readonly identities: readonly string[];
|
|
12311
12726
|
}
|
|
12312
|
-
/**
|
|
12313
|
-
declare
|
|
12314
|
-
|
|
12315
|
-
|
|
12316
|
-
|
|
12317
|
-
|
|
12727
|
+
/** Raised when a session id names no session, or more than one. */
|
|
12728
|
+
declare class SessionLookupError extends CliError {
|
|
12729
|
+
constructor(message: string);
|
|
12730
|
+
}
|
|
12731
|
+
/** Filters for `session list`. */
|
|
12732
|
+
interface SessionListFilters {
|
|
12733
|
+
/** Only this identity's sessions. */
|
|
12734
|
+
readonly identity?: string;
|
|
12735
|
+
/** Include sessions that spawned no agent and ran no workflow. */
|
|
12736
|
+
readonly all?: boolean;
|
|
12318
12737
|
}
|
|
12319
12738
|
/**
|
|
12320
|
-
*
|
|
12739
|
+
* 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
12740
|
*/
|
|
12322
|
-
declare function
|
|
12741
|
+
declare function collectSessionList(fs: SessionCommandFs, identitiesDir: string, identities: readonly string[], filters: Readonly<SessionListFilters>): readonly IdentitySession[];
|
|
12742
|
+
/** A resolved session: where it is read from and which identities expose it. */
|
|
12743
|
+
interface LocatedSession {
|
|
12744
|
+
readonly identities: readonly string[];
|
|
12745
|
+
readonly configDir: string;
|
|
12746
|
+
readonly ref: SessionRef;
|
|
12747
|
+
}
|
|
12748
|
+
/**
|
|
12749
|
+
* 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.
|
|
12750
|
+
*/
|
|
12751
|
+
declare function locateSession(fs: SessionCommandFs, identitiesDir: string, identities: readonly string[], query: string, onlyIdentity?: string): LocatedSession;
|
|
12752
|
+
/** One session resolved and read: the tree and every identity that exposes it. */
|
|
12753
|
+
interface SessionView {
|
|
12754
|
+
readonly identities: readonly string[];
|
|
12755
|
+
readonly tree: SessionAgentTree;
|
|
12756
|
+
}
|
|
12757
|
+
/** Resolves a session id or prefix and reads its tree: what `session show` and the door's `sessions.show` both answer. */
|
|
12758
|
+
declare function showSession(fs: SessionCommandFs, identitiesDir: string, identities: readonly string[], query: string, onlyIdentity?: string): SessionView;
|
|
12323
12759
|
|
|
12324
12760
|
/** One quota window's pool-selection facts, in the units a policy reads: fractions of the window, and hours until it resets. */
|
|
12325
12761
|
interface PoolWindowFacts {
|
|
@@ -12959,5 +13395,5 @@ declare const OWN_CLI_FILE_NAME = "cli.cjs";
|
|
|
12959
13395
|
*/
|
|
12960
13396
|
declare function agentShimCliPath(distDir?: string | undefined): string;
|
|
12961
13397
|
|
|
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 };
|
|
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 };
|
|
13399
|
+
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 };
|