claude-use 14.3.0 → 14.4.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 +1 -1
- package/dist/cli.cjs +1506 -1293
- package/dist/index.cjs +166 -79
- package/dist/index.mjs +166 -79
- package/dist/types/index.d.ts +68 -43
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -297,10 +297,10 @@ declare const LaunchSchema: z.ZodObject<{
|
|
|
297
297
|
}>>;
|
|
298
298
|
layout: z.ZodOptional<z.ZodObject<{
|
|
299
299
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
300
|
+
account: "account";
|
|
300
301
|
identity: "identity";
|
|
301
302
|
model: "model";
|
|
302
303
|
route: "route";
|
|
303
|
-
account: "account";
|
|
304
304
|
provider: "provider";
|
|
305
305
|
version: "version";
|
|
306
306
|
headroom: "headroom";
|
|
@@ -1535,10 +1535,10 @@ declare const ConfigProfileSchema: z.ZodObject<{
|
|
|
1535
1535
|
}>>;
|
|
1536
1536
|
layout: z.ZodOptional<z.ZodObject<{
|
|
1537
1537
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1538
|
+
account: "account";
|
|
1538
1539
|
identity: "identity";
|
|
1539
1540
|
model: "model";
|
|
1540
1541
|
route: "route";
|
|
1541
|
-
account: "account";
|
|
1542
1542
|
provider: "provider";
|
|
1543
1543
|
version: "version";
|
|
1544
1544
|
headroom: "headroom";
|
|
@@ -2385,10 +2385,10 @@ declare const DirectoryRuleSchema: z.ZodObject<{
|
|
|
2385
2385
|
}>>;
|
|
2386
2386
|
layout: z.ZodOptional<z.ZodObject<{
|
|
2387
2387
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
2388
|
+
account: "account";
|
|
2388
2389
|
identity: "identity";
|
|
2389
2390
|
model: "model";
|
|
2390
2391
|
route: "route";
|
|
2391
|
-
account: "account";
|
|
2392
2392
|
provider: "provider";
|
|
2393
2393
|
version: "version";
|
|
2394
2394
|
headroom: "headroom";
|
|
@@ -3161,10 +3161,10 @@ declare const DirectoryRulesSchema: z.ZodObject<{
|
|
|
3161
3161
|
}>>;
|
|
3162
3162
|
layout: z.ZodOptional<z.ZodObject<{
|
|
3163
3163
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3164
|
+
account: "account";
|
|
3164
3165
|
identity: "identity";
|
|
3165
3166
|
model: "model";
|
|
3166
3167
|
route: "route";
|
|
3167
|
-
account: "account";
|
|
3168
3168
|
provider: "provider";
|
|
3169
3169
|
version: "version";
|
|
3170
3170
|
headroom: "headroom";
|
|
@@ -3937,10 +3937,10 @@ declare const PortableConfigSchema: z.ZodObject<{
|
|
|
3937
3937
|
}>>;
|
|
3938
3938
|
layout: z.ZodOptional<z.ZodObject<{
|
|
3939
3939
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3940
|
+
account: "account";
|
|
3940
3941
|
identity: "identity";
|
|
3941
3942
|
model: "model";
|
|
3942
3943
|
route: "route";
|
|
3943
|
-
account: "account";
|
|
3944
3944
|
provider: "provider";
|
|
3945
3945
|
version: "version";
|
|
3946
3946
|
headroom: "headroom";
|
|
@@ -4693,10 +4693,10 @@ declare const GlobalConfigSchema: z.ZodObject<{
|
|
|
4693
4693
|
}>>;
|
|
4694
4694
|
layout: z.ZodOptional<z.ZodObject<{
|
|
4695
4695
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
4696
|
+
account: "account";
|
|
4696
4697
|
identity: "identity";
|
|
4697
4698
|
model: "model";
|
|
4698
4699
|
route: "route";
|
|
4699
|
-
account: "account";
|
|
4700
4700
|
provider: "provider";
|
|
4701
4701
|
version: "version";
|
|
4702
4702
|
headroom: "headroom";
|
|
@@ -5684,6 +5684,8 @@ interface EntryFact {
|
|
|
5684
5684
|
readonly isDirectory: boolean;
|
|
5685
5685
|
/** True when the entry is itself a symlink (including the relative, tree-escaping symlinks that already exist inside a real `~/.claude`). */
|
|
5686
5686
|
readonly isSymlink: boolean;
|
|
5687
|
+
/** True when the entry is a symlink that reaches nothing once followed to its end, so what it would be is unknown; false for every other entry. */
|
|
5688
|
+
readonly isDanglingSymlink: boolean;
|
|
5687
5689
|
/** The entry's own mtime. */
|
|
5688
5690
|
readonly mtimeMs: number;
|
|
5689
5691
|
/** The most recent mtime anywhere in this entry's subtree — its own mtime for a plain file. A directory-scoped `newerThan` must read this, never the directory's own inode mtime, which does not change when a file three levels down is rewritten. */
|
|
@@ -5754,7 +5756,7 @@ interface EliminatedRule {
|
|
|
5754
5756
|
readonly failed: readonly string[];
|
|
5755
5757
|
}
|
|
5756
5758
|
/** Every diagnostic the resolver can raise. Codes are stable strings so `agent-shim check` and tests can assert on them. */
|
|
5757
|
-
declare const DIAGNOSTIC_CODES: readonly ["EXTENDS_CYCLE", "MISSING_PROFILE", "SECRET_ENTRY_KEY", "SECRET_PATH_NEUTRALISED", "CATEGORY_PREFIX_MISMATCH", "MALFORMED_ENTRY_KEY", "EXACT_ENTRY_OVERRIDDEN_BY_LATER_GLOB", "AMBIGUOUS_PROJECT_ENCODING", "UNROOTED_PROJECT_PATH", "UNCLASSIFIED_ENTRY", "EMPTY_WHEN", "FARM_MANIFEST_MISSING", "RECONCILE_CONFLICT", "RECONCILE_SECRET_BLOCKED", "FARM_SWAP_RECOVERED", "FARM_PREVIOUS_RETAINED"];
|
|
5759
|
+
declare const DIAGNOSTIC_CODES: readonly ["EXTENDS_CYCLE", "MISSING_PROFILE", "SECRET_ENTRY_KEY", "SECRET_PATH_NEUTRALISED", "CATEGORY_PREFIX_MISMATCH", "MALFORMED_ENTRY_KEY", "EXACT_ENTRY_OVERRIDDEN_BY_LATER_GLOB", "AMBIGUOUS_PROJECT_ENCODING", "UNROOTED_PROJECT_PATH", "UNCLASSIFIED_ENTRY", "EMPTY_WHEN", "FARM_MANIFEST_MISSING", "RECONCILE_CONFLICT", "RECONCILE_SECRET_BLOCKED", "FARM_SWAP_RECOVERED", "FARM_PREVIOUS_RETAINED", "SHARED_ENTRY_DANGLING"];
|
|
5758
5760
|
type DiagnosticCode = (typeof DIAGNOSTIC_CODES)[number];
|
|
5759
5761
|
/** Severity of a diagnostic. An `error` means a configuration layer asked for something the tool refused to do. */
|
|
5760
5762
|
declare const DIAGNOSTIC_SEVERITIES: readonly ["error", "warning", "info"];
|
|
@@ -5823,6 +5825,8 @@ interface FarmPlan {
|
|
|
5823
5825
|
readonly rel: string;
|
|
5824
5826
|
readonly target: string;
|
|
5825
5827
|
}[];
|
|
5828
|
+
/** Shared entries left out of the farm because their `~/.claude` path is a symlink that reaches nothing, in plan order. */
|
|
5829
|
+
readonly dangling: readonly string[];
|
|
5826
5830
|
}
|
|
5827
5831
|
|
|
5828
5832
|
/**
|
|
@@ -6089,6 +6093,8 @@ interface PrivateWriteOptions {
|
|
|
6089
6093
|
interface FarmFs {
|
|
6090
6094
|
/** Stats one path without following symlinks, or returns undefined when nothing is there. */
|
|
6091
6095
|
readonly lstat: (path: string) => FarmStat | undefined;
|
|
6096
|
+
/** Whether `path` reaches something once every symlink along it is followed to its end: false when nothing is there, or when a symlink on the way points at nothing. Used to tell a symlink that leads somewhere from one that dangles, which `lstat` alone cannot. */
|
|
6097
|
+
readonly resolves: (path: string) => boolean;
|
|
6092
6098
|
/** Lists one directory's immediate child names, or an empty list when it does not exist. */
|
|
6093
6099
|
readonly readdir: (path: string) => readonly string[];
|
|
6094
6100
|
/** Creates a directory and any missing parents, succeeding silently when it already exists. */
|
|
@@ -6229,6 +6235,13 @@ interface FrontDoorUp {
|
|
|
6229
6235
|
declare const FARM_MANIFEST_FILENAME = ".agent-shim-farm.json";
|
|
6230
6236
|
/** Reads and validates the manifest at a farm root, or undefined when it is missing, unparseable, or does not validate. */
|
|
6231
6237
|
declare function readFarmManifest(fs: FarmFs, farmRoot: string): FarmManifest | undefined;
|
|
6238
|
+
/** A link in an identity's farm that leads nowhere. */
|
|
6239
|
+
interface DanglingFarmLink {
|
|
6240
|
+
/** The link's path relative to the farm root. */
|
|
6241
|
+
readonly rel: string;
|
|
6242
|
+
/** Where the farm's manifest records the link pointing; undefined for a link the manifest does not record. */
|
|
6243
|
+
readonly target?: string;
|
|
6244
|
+
}
|
|
6232
6245
|
/** Everything `buildEntryFacts` needs. Everything except the tree itself is injected, so the fact manifest is reproducible from a fake filesystem, a fake clock, and a fake branch. */
|
|
6233
6246
|
interface BuildEntryFactsParams {
|
|
6234
6247
|
readonly fs: FarmFs;
|
|
@@ -6365,6 +6378,8 @@ interface ResyncFarmResult {
|
|
|
6365
6378
|
readonly noOp: boolean;
|
|
6366
6379
|
/** The manifest the farm now carries — the newly written one, or the existing one on a no-op. */
|
|
6367
6380
|
readonly manifest: FarmManifest;
|
|
6381
|
+
/** The manifest the farm carried before this resync, read under the lock; undefined when the farm had none this release can read. Comparing its links with `manifest`'s says which links this resync removed. */
|
|
6382
|
+
readonly previousManifest?: FarmManifest;
|
|
6368
6383
|
/** The fully resolved state, including the flattened cascade's launch flags, which the launcher goes on to use. */
|
|
6369
6384
|
readonly resolved: ResolvedState;
|
|
6370
6385
|
readonly adopted: readonly string[];
|
|
@@ -7526,16 +7541,7 @@ declare function observingRoutedRoute(route: FrontDoorRoute, tracker: RcSessionT
|
|
|
7526
7541
|
declare function rcObserverAsPassthrough(observer: RcExchangeObserver): PassthroughObserver;
|
|
7527
7542
|
|
|
7528
7543
|
/**
|
|
7529
|
-
*
|
|
7530
|
-
*
|
|
7531
|
-
* Every request-shaped write goes through one envelope builder (`buildRcControlRequestPayload`) so the family cannot drift apart in shape, and one delivery engine (`deliverRcClientPayload`, module-local) so the two credential guards, the dial and the sequence-cursor advance exist exactly once. The fields each subtype carries are the SDK's own (`@anthropic-ai/claude-agent-sdk` `sdk.d.ts`) where it declares the subtype, and the CLI bundle's own request builders where it does not (`mcp_authenticate`, `mcp_oauth_callback_url`), each named in its builder's doc comment.
|
|
7532
|
-
*
|
|
7533
|
-
* A write that carried a `control_request` returns the request id it minted, because the worker's `control_response` echoes exactly that id on the stream the door already fans out: a consumer that wants the answer matches it there, and the id is surfaced by the result since only the door ever knew it.
|
|
7534
|
-
*
|
|
7535
|
-
* Two writes stand outside the events path: the teleport marker, whose channel is the session's teleport-events path (the one write the family addresses elsewhere, and the one the CLI only ever reads), and the read receipt, which is not a payload write at all but the mark_read endpoint's own small body, built here so every surface the door serves it from posts the same shape.
|
|
7536
|
-
*/
|
|
7537
|
-
/**
|
|
7538
|
-
* Builds the user-message payload event for one injected prompt: the Agent SDK stream-json `user` message shape (`type`, `uuid`, `session_id`, `parent_tool_use_id`, `message` with a `user` role), the same envelope a claude.ai client sends as a turn. The content is the plain string form, which is the shape validated end to end against the real API by the third-party client survey that settled this protocol.
|
|
7544
|
+
* Builds the user-message payload event for one injected prompt: the Agent SDK stream-json `user` message shape (`type`, `uuid`, `session_id`, `parent_tool_use_id`, `message` with a `user` role), the envelope a claude.ai client sends as a turn. The envelope alone does not decide how the worker reads it: the service adds the writer's `client_platform`, and that is what makes a client's turn a person's and the door's a peer's (`RC_SEND_DELIVERY_NOTE`). The content is the plain string form, which is the shape validated end to end against the real API by the third-party client survey that settled this protocol.
|
|
7539
7545
|
*/
|
|
7540
7546
|
declare function buildRcUserMessagePayload(uuid: string, sessionId: string, text: string): Record<string, unknown>;
|
|
7541
7547
|
/** Wraps payload event(s) in the write body the endpoint takes: `{"events": [{"payload": {...}}]}`. */
|
|
@@ -7586,7 +7592,7 @@ interface RcInjectDeps {
|
|
|
7586
7592
|
readonly newUuid: () => string;
|
|
7587
7593
|
}
|
|
7588
7594
|
/**
|
|
7589
|
-
* Injects one user-message prompt into an observed session: the documented client-half write, `POST /v1/code/sessions/{id}/events`, authenticated by the observed bearer and carrying the observed protocol headers, the observed `anthropic-client-platform` included, so the door never names an app it is not. The result is the sequence numbers the real service assigned, or a verbose failure. A dial that cannot reach the API host is reported rather than thrown, so a caller with no exception handling still shows the user exactly what failed.
|
|
7595
|
+
* Injects one user-message prompt into an observed session: the documented client-half write, `POST /v1/code/sessions/{id}/events`, authenticated by the observed bearer and carrying the observed protocol headers, the observed `anthropic-client-platform` included, so the door never names an app it is not. The result is the sequence numbers the real service assigned, or a verbose failure: an assigned number confirms the service filed the event, not that the session's model received it, since the worker reads it as a peer message and its own inbound setting decides whether to deliver, hold or drop it (`RC_SEND_DELIVERY_NOTE`). A dial that cannot reach the API host is reported rather than thrown, so a caller with no exception handling still shows the user exactly what failed.
|
|
7590
7596
|
*/
|
|
7591
7597
|
declare function injectRcUserMessage(deps: RcInjectDeps, sessionId: string, text: string): Promise<RcEventWriteResult>;
|
|
7592
7598
|
/** The decision an answer carries: approve or deny, with the message a denial shows the worker (the protocol's allow result has no text field, so an approval carries none), and for a question the options chosen. */
|
|
@@ -9398,6 +9404,7 @@ declare const CheckReportJsonSchema: z.ZodObject<{
|
|
|
9398
9404
|
RECONCILE_SECRET_BLOCKED: "RECONCILE_SECRET_BLOCKED";
|
|
9399
9405
|
FARM_SWAP_RECOVERED: "FARM_SWAP_RECOVERED";
|
|
9400
9406
|
FARM_PREVIOUS_RETAINED: "FARM_PREVIOUS_RETAINED";
|
|
9407
|
+
SHARED_ENTRY_DANGLING: "SHARED_ENTRY_DANGLING";
|
|
9401
9408
|
}>;
|
|
9402
9409
|
severity: z.ZodEnum<{
|
|
9403
9410
|
error: "error";
|
|
@@ -9886,6 +9893,7 @@ declare const DoctorFindingSchema: z.ZodObject<{
|
|
|
9886
9893
|
"path-resolution": "path-resolution";
|
|
9887
9894
|
"legacy-name": "legacy-name";
|
|
9888
9895
|
"sign-in": "sign-in";
|
|
9896
|
+
"farm-links": "farm-links";
|
|
9889
9897
|
"directory-rules": "directory-rules";
|
|
9890
9898
|
"categories-local": "categories-local";
|
|
9891
9899
|
"active-identity": "active-identity";
|
|
@@ -9918,6 +9926,7 @@ declare const DoctorRunOutputSchema: z.ZodObject<{
|
|
|
9918
9926
|
"path-resolution": "path-resolution";
|
|
9919
9927
|
"legacy-name": "legacy-name";
|
|
9920
9928
|
"sign-in": "sign-in";
|
|
9929
|
+
"farm-links": "farm-links";
|
|
9921
9930
|
"directory-rules": "directory-rules";
|
|
9922
9931
|
"categories-local": "categories-local";
|
|
9923
9932
|
"active-identity": "active-identity";
|
|
@@ -10290,6 +10299,7 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
10290
10299
|
kind: zod.ZodLiteral<"profile">;
|
|
10291
10300
|
name: zod.ZodString;
|
|
10292
10301
|
value: zod.ZodObject<{
|
|
10302
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
10293
10303
|
entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
|
|
10294
10304
|
value: zod.ZodBoolean;
|
|
10295
10305
|
when: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -10365,7 +10375,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
10365
10375
|
key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
10366
10376
|
}, zod_v4_core.$strip>], "kind">]>;
|
|
10367
10377
|
}, zod_v4_core.$strict>]>>>;
|
|
10368
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
10369
10378
|
models: zod.ZodOptional<zod.ZodObject<{
|
|
10370
10379
|
pickerLabelSpaces: zod.ZodOptional<zod.ZodBoolean>;
|
|
10371
10380
|
virtual: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -10454,10 +10463,10 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
10454
10463
|
}>>;
|
|
10455
10464
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
10456
10465
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
10466
|
+
account: "account";
|
|
10457
10467
|
identity: "identity";
|
|
10458
10468
|
model: "model";
|
|
10459
10469
|
route: "route";
|
|
10460
|
-
account: "account";
|
|
10461
10470
|
provider: "provider";
|
|
10462
10471
|
version: "version";
|
|
10463
10472
|
headroom: "headroom";
|
|
@@ -11014,6 +11023,7 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
11014
11023
|
kind: zod.ZodLiteral<"profile">;
|
|
11015
11024
|
name: zod.ZodString;
|
|
11016
11025
|
value: zod.ZodObject<{
|
|
11026
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
11017
11027
|
entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
|
|
11018
11028
|
value: zod.ZodBoolean;
|
|
11019
11029
|
when: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -11089,7 +11099,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
11089
11099
|
key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
11090
11100
|
}, zod_v4_core.$strip>], "kind">]>;
|
|
11091
11101
|
}, zod_v4_core.$strict>]>>>;
|
|
11092
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
11093
11102
|
models: zod.ZodOptional<zod.ZodObject<{
|
|
11094
11103
|
pickerLabelSpaces: zod.ZodOptional<zod.ZodBoolean>;
|
|
11095
11104
|
virtual: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -11178,10 +11187,10 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
11178
11187
|
}>>;
|
|
11179
11188
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
11180
11189
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
11190
|
+
account: "account";
|
|
11181
11191
|
identity: "identity";
|
|
11182
11192
|
model: "model";
|
|
11183
11193
|
route: "route";
|
|
11184
|
-
account: "account";
|
|
11185
11194
|
provider: "provider";
|
|
11186
11195
|
version: "version";
|
|
11187
11196
|
headroom: "headroom";
|
|
@@ -12378,10 +12387,10 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
12378
12387
|
}>>;
|
|
12379
12388
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
12380
12389
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
12390
|
+
account: "account";
|
|
12381
12391
|
identity: "identity";
|
|
12382
12392
|
model: "model";
|
|
12383
12393
|
route: "route";
|
|
12384
|
-
account: "account";
|
|
12385
12394
|
provider: "provider";
|
|
12386
12395
|
version: "version";
|
|
12387
12396
|
headroom: "headroom";
|
|
@@ -13159,10 +13168,10 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
13159
13168
|
}>>;
|
|
13160
13169
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
13161
13170
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
13171
|
+
account: "account";
|
|
13162
13172
|
identity: "identity";
|
|
13163
13173
|
model: "model";
|
|
13164
13174
|
route: "route";
|
|
13165
|
-
account: "account";
|
|
13166
13175
|
provider: "provider";
|
|
13167
13176
|
version: "version";
|
|
13168
13177
|
headroom: "headroom";
|
|
@@ -14176,10 +14185,10 @@ declare const StatuslineSchema: z.ZodObject<{
|
|
|
14176
14185
|
}>>;
|
|
14177
14186
|
layout: z.ZodOptional<z.ZodObject<{
|
|
14178
14187
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
14188
|
+
account: "account";
|
|
14179
14189
|
identity: "identity";
|
|
14180
14190
|
model: "model";
|
|
14181
14191
|
route: "route";
|
|
14182
|
-
account: "account";
|
|
14183
14192
|
provider: "provider";
|
|
14184
14193
|
version: "version";
|
|
14185
14194
|
headroom: "headroom";
|
|
@@ -15073,10 +15082,10 @@ declare function createLaunchApiRouter(deps: LaunchApiDeps): {
|
|
|
15073
15082
|
}>>;
|
|
15074
15083
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
15075
15084
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
15085
|
+
account: "account";
|
|
15076
15086
|
identity: "identity";
|
|
15077
15087
|
model: "model";
|
|
15078
15088
|
route: "route";
|
|
15079
|
-
account: "account";
|
|
15080
15089
|
provider: "provider";
|
|
15081
15090
|
version: "version";
|
|
15082
15091
|
headroom: "headroom";
|
|
@@ -16360,6 +16369,7 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
16360
16369
|
RECONCILE_SECRET_BLOCKED: "RECONCILE_SECRET_BLOCKED";
|
|
16361
16370
|
FARM_SWAP_RECOVERED: "FARM_SWAP_RECOVERED";
|
|
16362
16371
|
FARM_PREVIOUS_RETAINED: "FARM_PREVIOUS_RETAINED";
|
|
16372
|
+
SHARED_ENTRY_DANGLING: "SHARED_ENTRY_DANGLING";
|
|
16363
16373
|
}>;
|
|
16364
16374
|
severity: z.ZodEnum<{
|
|
16365
16375
|
error: "error";
|
|
@@ -16561,6 +16571,7 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
16561
16571
|
"path-resolution": "path-resolution";
|
|
16562
16572
|
"legacy-name": "legacy-name";
|
|
16563
16573
|
"sign-in": "sign-in";
|
|
16574
|
+
"farm-links": "farm-links";
|
|
16564
16575
|
"directory-rules": "directory-rules";
|
|
16565
16576
|
"categories-local": "categories-local";
|
|
16566
16577
|
"active-identity": "active-identity";
|
|
@@ -16818,10 +16829,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
16818
16829
|
}>>;
|
|
16819
16830
|
layout: z.ZodOptional<z.ZodObject<{
|
|
16820
16831
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
16832
|
+
account: "account";
|
|
16821
16833
|
identity: "identity";
|
|
16822
16834
|
model: "model";
|
|
16823
16835
|
route: "route";
|
|
16824
|
-
account: "account";
|
|
16825
16836
|
provider: "provider";
|
|
16826
16837
|
version: "version";
|
|
16827
16838
|
headroom: "headroom";
|
|
@@ -17633,6 +17644,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
17633
17644
|
kind: z.ZodLiteral<"profile">;
|
|
17634
17645
|
name: z.ZodString;
|
|
17635
17646
|
value: z.ZodObject<{
|
|
17647
|
+
description: z.ZodOptional<z.ZodString>;
|
|
17636
17648
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
17637
17649
|
value: z.ZodBoolean;
|
|
17638
17650
|
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -17708,7 +17720,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
17708
17720
|
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
17709
17721
|
}, z.core.$strip>], "kind">]>;
|
|
17710
17722
|
}, z.core.$strict>]>>>;
|
|
17711
|
-
description: z.ZodOptional<z.ZodString>;
|
|
17712
17723
|
models: z.ZodOptional<z.ZodObject<{
|
|
17713
17724
|
pickerLabelSpaces: z.ZodOptional<z.ZodBoolean>;
|
|
17714
17725
|
virtual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -17797,10 +17808,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
17797
17808
|
}>>;
|
|
17798
17809
|
layout: z.ZodOptional<z.ZodObject<{
|
|
17799
17810
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
17811
|
+
account: "account";
|
|
17800
17812
|
identity: "identity";
|
|
17801
17813
|
model: "model";
|
|
17802
17814
|
route: "route";
|
|
17803
|
-
account: "account";
|
|
17804
17815
|
provider: "provider";
|
|
17805
17816
|
version: "version";
|
|
17806
17817
|
headroom: "headroom";
|
|
@@ -18357,6 +18368,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
18357
18368
|
kind: z.ZodLiteral<"profile">;
|
|
18358
18369
|
name: z.ZodString;
|
|
18359
18370
|
value: z.ZodObject<{
|
|
18371
|
+
description: z.ZodOptional<z.ZodString>;
|
|
18360
18372
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
18361
18373
|
value: z.ZodBoolean;
|
|
18362
18374
|
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -18432,7 +18444,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
18432
18444
|
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
18433
18445
|
}, z.core.$strip>], "kind">]>;
|
|
18434
18446
|
}, z.core.$strict>]>>>;
|
|
18435
|
-
description: z.ZodOptional<z.ZodString>;
|
|
18436
18447
|
models: z.ZodOptional<z.ZodObject<{
|
|
18437
18448
|
pickerLabelSpaces: z.ZodOptional<z.ZodBoolean>;
|
|
18438
18449
|
virtual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -18521,10 +18532,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
18521
18532
|
}>>;
|
|
18522
18533
|
layout: z.ZodOptional<z.ZodObject<{
|
|
18523
18534
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
18535
|
+
account: "account";
|
|
18524
18536
|
identity: "identity";
|
|
18525
18537
|
model: "model";
|
|
18526
18538
|
route: "route";
|
|
18527
|
-
account: "account";
|
|
18528
18539
|
provider: "provider";
|
|
18529
18540
|
version: "version";
|
|
18530
18541
|
headroom: "headroom";
|
|
@@ -19721,10 +19732,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
19721
19732
|
}>>;
|
|
19722
19733
|
layout: z.ZodOptional<z.ZodObject<{
|
|
19723
19734
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
19735
|
+
account: "account";
|
|
19724
19736
|
identity: "identity";
|
|
19725
19737
|
model: "model";
|
|
19726
19738
|
route: "route";
|
|
19727
|
-
account: "account";
|
|
19728
19739
|
provider: "provider";
|
|
19729
19740
|
version: "version";
|
|
19730
19741
|
headroom: "headroom";
|
|
@@ -20502,10 +20513,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
20502
20513
|
}>>;
|
|
20503
20514
|
layout: z.ZodOptional<z.ZodObject<{
|
|
20504
20515
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
20516
|
+
account: "account";
|
|
20505
20517
|
identity: "identity";
|
|
20506
20518
|
model: "model";
|
|
20507
20519
|
route: "route";
|
|
20508
|
-
account: "account";
|
|
20509
20520
|
provider: "provider";
|
|
20510
20521
|
version: "version";
|
|
20511
20522
|
headroom: "headroom";
|
|
@@ -21456,6 +21467,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
21456
21467
|
RECONCILE_SECRET_BLOCKED: "RECONCILE_SECRET_BLOCKED";
|
|
21457
21468
|
FARM_SWAP_RECOVERED: "FARM_SWAP_RECOVERED";
|
|
21458
21469
|
FARM_PREVIOUS_RETAINED: "FARM_PREVIOUS_RETAINED";
|
|
21470
|
+
SHARED_ENTRY_DANGLING: "SHARED_ENTRY_DANGLING";
|
|
21459
21471
|
}>;
|
|
21460
21472
|
severity: z.ZodEnum<{
|
|
21461
21473
|
error: "error";
|
|
@@ -21657,6 +21669,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
21657
21669
|
"path-resolution": "path-resolution";
|
|
21658
21670
|
"legacy-name": "legacy-name";
|
|
21659
21671
|
"sign-in": "sign-in";
|
|
21672
|
+
"farm-links": "farm-links";
|
|
21660
21673
|
"directory-rules": "directory-rules";
|
|
21661
21674
|
"categories-local": "categories-local";
|
|
21662
21675
|
"active-identity": "active-identity";
|
|
@@ -22360,6 +22373,7 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
|
|
|
22360
22373
|
kind: z.ZodLiteral<"profile">;
|
|
22361
22374
|
name: z.ZodString;
|
|
22362
22375
|
value: z.ZodObject<{
|
|
22376
|
+
description: z.ZodOptional<z.ZodString>;
|
|
22363
22377
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
22364
22378
|
value: z.ZodBoolean;
|
|
22365
22379
|
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -22435,7 +22449,6 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
|
|
|
22435
22449
|
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
22436
22450
|
}, z.core.$strip>], "kind">]>;
|
|
22437
22451
|
}, z.core.$strict>]>>>;
|
|
22438
|
-
description: z.ZodOptional<z.ZodString>;
|
|
22439
22452
|
models: z.ZodOptional<z.ZodObject<{
|
|
22440
22453
|
pickerLabelSpaces: z.ZodOptional<z.ZodBoolean>;
|
|
22441
22454
|
virtual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -22524,10 +22537,10 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
|
|
|
22524
22537
|
}>>;
|
|
22525
22538
|
layout: z.ZodOptional<z.ZodObject<{
|
|
22526
22539
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
22540
|
+
account: "account";
|
|
22527
22541
|
identity: "identity";
|
|
22528
22542
|
model: "model";
|
|
22529
22543
|
route: "route";
|
|
22530
|
-
account: "account";
|
|
22531
22544
|
provider: "provider";
|
|
22532
22545
|
version: "version";
|
|
22533
22546
|
headroom: "headroom";
|
|
@@ -23086,6 +23099,7 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
|
|
|
23086
23099
|
kind: z.ZodLiteral<"profile">;
|
|
23087
23100
|
name: z.ZodString;
|
|
23088
23101
|
value: z.ZodObject<{
|
|
23102
|
+
description: z.ZodOptional<z.ZodString>;
|
|
23089
23103
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
23090
23104
|
value: z.ZodBoolean;
|
|
23091
23105
|
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -23161,7 +23175,6 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
|
|
|
23161
23175
|
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
23162
23176
|
}, z.core.$strip>], "kind">]>;
|
|
23163
23177
|
}, z.core.$strict>]>>>;
|
|
23164
|
-
description: z.ZodOptional<z.ZodString>;
|
|
23165
23178
|
models: z.ZodOptional<z.ZodObject<{
|
|
23166
23179
|
pickerLabelSpaces: z.ZodOptional<z.ZodBoolean>;
|
|
23167
23180
|
virtual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -23250,10 +23263,10 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
|
|
|
23250
23263
|
}>>;
|
|
23251
23264
|
layout: z.ZodOptional<z.ZodObject<{
|
|
23252
23265
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
23266
|
+
account: "account";
|
|
23253
23267
|
identity: "identity";
|
|
23254
23268
|
model: "model";
|
|
23255
23269
|
route: "route";
|
|
23256
|
-
account: "account";
|
|
23257
23270
|
provider: "provider";
|
|
23258
23271
|
version: "version";
|
|
23259
23272
|
headroom: "headroom";
|
|
@@ -24452,10 +24465,10 @@ declare const ConfigRuleAddOutputSchema: z.ZodObject<{
|
|
|
24452
24465
|
}>>;
|
|
24453
24466
|
layout: z.ZodOptional<z.ZodObject<{
|
|
24454
24467
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
24468
|
+
account: "account";
|
|
24455
24469
|
identity: "identity";
|
|
24456
24470
|
model: "model";
|
|
24457
24471
|
route: "route";
|
|
24458
|
-
account: "account";
|
|
24459
24472
|
provider: "provider";
|
|
24460
24473
|
version: "version";
|
|
24461
24474
|
headroom: "headroom";
|
|
@@ -25235,10 +25248,10 @@ declare const ConfigRuleSetOutputSchema: z.ZodObject<{
|
|
|
25235
25248
|
}>>;
|
|
25236
25249
|
layout: z.ZodOptional<z.ZodObject<{
|
|
25237
25250
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
25251
|
+
account: "account";
|
|
25238
25252
|
identity: "identity";
|
|
25239
25253
|
model: "model";
|
|
25240
25254
|
route: "route";
|
|
25241
|
-
account: "account";
|
|
25242
25255
|
provider: "provider";
|
|
25243
25256
|
version: "version";
|
|
25244
25257
|
headroom: "headroom";
|
|
@@ -25922,10 +25935,10 @@ declare const LaunchResolveOutputSchema: z.ZodObject<{
|
|
|
25922
25935
|
}>>;
|
|
25923
25936
|
layout: z.ZodOptional<z.ZodObject<{
|
|
25924
25937
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
25938
|
+
account: "account";
|
|
25925
25939
|
identity: "identity";
|
|
25926
25940
|
model: "model";
|
|
25927
25941
|
route: "route";
|
|
25928
|
-
account: "account";
|
|
25929
25942
|
provider: "provider";
|
|
25930
25943
|
version: "version";
|
|
25931
25944
|
headroom: "headroom";
|
|
@@ -28198,6 +28211,15 @@ interface DisplacedIdentityRecord extends IdentityRecord {
|
|
|
28198
28211
|
readonly directoryPresent: boolean;
|
|
28199
28212
|
}
|
|
28200
28213
|
|
|
28214
|
+
/** One identity's farm as the farm-links section reads it: the links in it that lead nowhere (`danglingFarmLinks`). */
|
|
28215
|
+
interface DoctorFarmLinksInput {
|
|
28216
|
+
/** The identity's name, which the finding is filed under and the remedy names. */
|
|
28217
|
+
readonly name: string;
|
|
28218
|
+
/** Its id, the directory under `identities/` the farm is. */
|
|
28219
|
+
readonly id: string;
|
|
28220
|
+
readonly dangling: readonly DanglingFarmLink[];
|
|
28221
|
+
}
|
|
28222
|
+
|
|
28201
28223
|
/**
|
|
28202
28224
|
* How the allowlist the headroom daemon serves lags the allowlist computed now. The daemon re-reads its allowlist file on every request that follows a change to it, and its supervisor rewrites the file and records the hash in the same tick, so a lag that lasts beyond one tick means the supervisor is not running or cannot write the file. A daemon started by an earlier release reads no file, and is reported as such instead.
|
|
28203
28225
|
*/
|
|
@@ -28282,7 +28304,7 @@ type ProviderAliases = z.infer<typeof ProviderAliasesSchema>;
|
|
|
28282
28304
|
|
|
28283
28305
|
declare const DOCTOR_SEVERITIES: readonly ["pass", "warn", "fail"];
|
|
28284
28306
|
type DoctorSeverity = (typeof DOCTOR_SEVERITIES)[number];
|
|
28285
|
-
declare const DOCTOR_SECTIONS: readonly ["ambient-credential", "binary-discovery", "claude-shim", "path-resolution", "legacy-name", "config-profile", "identity", "sign-in", "pool", "provider", "keychain", "directory-rules", "global-config", "categories-local", "active-identity", "headroom", "frontdoor", "models"];
|
|
28307
|
+
declare const DOCTOR_SECTIONS: readonly ["ambient-credential", "binary-discovery", "claude-shim", "path-resolution", "legacy-name", "config-profile", "identity", "sign-in", "farm-links", "pool", "provider", "keychain", "directory-rules", "global-config", "categories-local", "active-identity", "headroom", "frontdoor", "models"];
|
|
28286
28308
|
type DoctorSection = (typeof DOCTOR_SECTIONS)[number];
|
|
28287
28309
|
/** One line of `agent-shim doctor`'s report. `subject` names the identity/profile/rule the finding is about, when the section has more than one of those. */
|
|
28288
28310
|
interface DoctorFinding {
|
|
@@ -28359,6 +28381,8 @@ interface RunDoctorParams {
|
|
|
28359
28381
|
readonly raw: string | undefined;
|
|
28360
28382
|
};
|
|
28361
28383
|
readonly identities: readonly DoctorIdentityInput[];
|
|
28384
|
+
/** The links in each identity's farm that lead nowhere (`danglingFarmLinks`). Omit to leave the farm-links section out; with it, each such link warns, naming the identity, the entry and what brings the farm up to date. */
|
|
28385
|
+
readonly farmLinks?: readonly DoctorFarmLinksInput[];
|
|
28362
28386
|
/** Each identity's last recorded usage snapshot, by identity name. Omit to skip checking that pools and jobs read only windows their identities receive; an identity missing from it has no readable snapshot, so what it receives is unknown and nothing is reported for it. */
|
|
28363
28387
|
readonly usageSnapshots?: Readonly<Record<string, UsageSnapshot>>;
|
|
28364
28388
|
readonly configProfiles: readonly DoctorConfigProfileInput[];
|
|
@@ -28432,8 +28456,6 @@ interface RunDoctorParams {
|
|
|
28432
28456
|
* Every check aggregates rather than throws: a malformed file becomes one `fail` finding for that file, not an aborted report. This is the one place in the codebase that deliberately breaks the "throw a validation error and let it propagate" convention every other command relies on — `doctor`'s whole purpose is to survive a broken file and keep auditing everything else.
|
|
28433
28457
|
*/
|
|
28434
28458
|
declare function runDoctor(params: RunDoctorParams): DoctorReport;
|
|
28435
|
-
/** Renders a full `DoctorReport` as plain text lines, one section header at a time, in the order `agent-shim doctor` prints them. */
|
|
28436
|
-
declare function formatDoctorReport(report: DoctorReport): string[];
|
|
28437
28459
|
/** What `collectDoctorReport` needs from its caller. */
|
|
28438
28460
|
interface CollectDoctorReportParams {
|
|
28439
28461
|
readonly paths: LayoutPaths;
|
|
@@ -28444,6 +28466,9 @@ interface CollectDoctorReportParams {
|
|
|
28444
28466
|
*/
|
|
28445
28467
|
declare function collectDoctorReport(params: CollectDoctorReportParams): DoctorReport;
|
|
28446
28468
|
|
|
28469
|
+
/** Renders a full `DoctorReport` as plain text lines, one section header at a time, in the order `agent-shim doctor` prints them. */
|
|
28470
|
+
declare function formatDoctorReport(report: DoctorReport): string[];
|
|
28471
|
+
|
|
28447
28472
|
/** Inputs to `spawnClaude`. */
|
|
28448
28473
|
interface SpawnClaudeParams {
|
|
28449
28474
|
/** Full path to the real `claude` binary to run, as discovered by `src/versionDiscovery.ts`. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-use",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.4.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>",
|