claude-use 9.12.1 → 9.13.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.
@@ -864,8 +864,8 @@ declare const DirectoryRuleSchema: z.ZodObject<{
864
864
  key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
865
865
  }, z.core.$strip>], "kind">]>;
866
866
  }, z.core.$strict>]>>>;
867
- extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
868
867
  $schema: z.ZodOptional<z.ZodString>;
868
+ extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
869
869
  categories: z.ZodOptional<z.ZodPipe<z.ZodObject<{
870
870
  all: z.ZodOptional<z.ZodBoolean>;
871
871
  runtime: z.ZodOptional<z.ZodBoolean>;
@@ -1043,8 +1043,8 @@ declare const DirectoryRulesSchema: z.ZodObject<{
1043
1043
  key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
1044
1044
  }, z.core.$strip>], "kind">]>;
1045
1045
  }, z.core.$strict>]>>>;
1046
- extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
1047
1046
  $schema: z.ZodOptional<z.ZodString>;
1047
+ extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
1048
1048
  categories: z.ZodOptional<z.ZodPipe<z.ZodObject<{
1049
1049
  all: z.ZodOptional<z.ZodBoolean>;
1050
1050
  runtime: z.ZodOptional<z.ZodBoolean>;
@@ -1223,8 +1223,8 @@ declare const PortableConfigSchema: z.ZodObject<{
1223
1223
  key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
1224
1224
  }, z.core.$strip>], "kind">]>;
1225
1225
  }, z.core.$strict>]>>>;
1226
- extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
1227
1226
  $schema: z.ZodOptional<z.ZodString>;
1227
+ extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
1228
1228
  categories: z.ZodOptional<z.ZodPipe<z.ZodObject<{
1229
1229
  all: z.ZodOptional<z.ZodBoolean>;
1230
1230
  runtime: z.ZodOptional<z.ZodBoolean>;
@@ -3859,12 +3859,12 @@ declare const CheckReportJsonSchema: z.ZodObject<{
3859
3859
  identity: z.ZodObject<{
3860
3860
  name: z.ZodNullable<z.ZodString>;
3861
3861
  source: z.ZodEnum<{
3862
- env: "env";
3863
- none: "none";
3864
3862
  "config-dir-escape-hatch": "config-dir-escape-hatch";
3865
3863
  argv: "argv";
3864
+ env: "env";
3866
3865
  "directory-pin": "directory-pin";
3867
3866
  "active-identity-file": "active-identity-file";
3867
+ none: "none";
3868
3868
  }>;
3869
3869
  }, z.core.$strict>;
3870
3870
  pool: z.ZodOptional<z.ZodObject<{
@@ -3942,11 +3942,11 @@ declare const CheckReportJsonSchema: z.ZodObject<{
3942
3942
  "category-default": "category-default";
3943
3943
  }>;
3944
3944
  category: z.ZodNullable<z.ZodEnum<{
3945
+ secret: "secret";
3945
3946
  runtime: "runtime";
3946
3947
  history: "history";
3947
3948
  knowledge: "knowledge";
3948
3949
  settings: "settings";
3949
- secret: "secret";
3950
3950
  }>>;
3951
3951
  rule: z.ZodOptional<z.ZodObject<{
3952
3952
  key: z.ZodString;
@@ -4586,6 +4586,18 @@ type PathShadowStatus = {
4586
4586
  readonly by: string;
4587
4587
  };
4588
4588
 
4589
+ /** One input the headroom allowlist is computed from: the provider definitions on disk, or the front door's direct origin. */
4590
+ type AllowlistDriftInput = "provider-files" | "front-door-origin";
4591
+
4592
+ /** What listing the front-door supervisors found: their pids, or why the process table could not be read. */
4593
+ type FrontDoorSupervisorListing = {
4594
+ readonly ok: true;
4595
+ readonly pids: readonly number[];
4596
+ } | {
4597
+ readonly ok: false;
4598
+ readonly message: string;
4599
+ };
4600
+
4589
4601
  /** The result of a successful discovery. */
4590
4602
  interface DiscoveredClaudeBinary {
4591
4603
  /** Full path to the discovered `claude` executable. */
@@ -4604,7 +4616,7 @@ type ClaudeBinaryResolver = (request?: Readonly<ClaudeBinaryRequest>) => Discove
4604
4616
 
4605
4617
  declare const DOCTOR_SEVERITIES: readonly ["pass", "warn", "fail"];
4606
4618
  type DoctorSeverity = (typeof DOCTOR_SEVERITIES)[number];
4607
- 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"];
4619
+ 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"];
4608
4620
  type DoctorSection = (typeof DOCTOR_SECTIONS)[number];
4609
4621
  /** 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. */
4610
4622
  interface DoctorFinding {
@@ -4700,6 +4712,18 @@ interface RunDoctorParams {
4700
4712
  readonly headroom: {
4701
4713
  readonly state: DoctorFileInput;
4702
4714
  readonly isRunning: (pid: number) => boolean;
4715
+ /** What the daemon's allowlist is measured against. Omit to skip the allowlist check; with it, a daemon whose allowlist may exclude the serving door's direct origin is a failure. */
4716
+ readonly allowlist?: {
4717
+ /** The inputs that could explain the recorded allowlist hash not matching the current allowlist, or undefined when it matches. */
4718
+ readonly driftInputs: readonly AllowlistDriftInput[] | undefined;
4719
+ /** The serving front door's direct origin, or undefined before it has ever served. */
4720
+ readonly frontDoorOrigin: string | undefined;
4721
+ };
4722
+ };
4723
+ /** The front door's state.json and the supervisor processes alive for this user. Omit to skip the front-door checks (the platform cannot list processes); with it, more than one supervisor alive at once is a failure naming each superseded one. */
4724
+ readonly frontDoor?: {
4725
+ readonly state: DoctorFileInput;
4726
+ readonly supervisors: FrontDoorSupervisorListing;
4703
4727
  };
4704
4728
  }
4705
4729
  /**
@@ -4888,11 +4912,14 @@ declare const UsageSnapshotSchema: z.ZodObject<{
4888
4912
  }, z.core.$strict>;
4889
4913
  type UsageSnapshot = z.infer<typeof UsageSnapshotSchema>;
4890
4914
 
4891
- /** The record held in one front-door session-registry file: the launcher's pid plus the per-launch capability token its child presents on every request. */
4915
+ /**
4916
+ * The record held in one front-door session-registry file: the launcher's pid plus the per-launch capability token its child presents on every request, and the supervisor of the door the launch was sent to. `supervisorPid` is absent on a record written before it existed and on a door's own transparent-surface record; such a launch cannot be attributed to a door, so a superseded door treats it as its own.
4917
+ */
4892
4918
  declare const FrontDoorSessionSchema: z.ZodObject<{
4893
4919
  pid: z.ZodNumber;
4894
4920
  startedAt: z.ZodNumber;
4895
4921
  token: z.ZodString;
4922
+ supervisorPid: z.ZodOptional<z.ZodNumber>;
4896
4923
  }, z.core.$strict>;
4897
4924
  type FrontDoorSession = z.infer<typeof FrontDoorSessionSchema>;
4898
4925
  /**
@@ -4911,7 +4938,7 @@ declare const FrontDoorStateSchema: z.ZodObject<{
4911
4938
  }, z.core.$strict>;
4912
4939
  type FrontDoorState = z.infer<typeof FrontDoorStateSchema>;
4913
4940
  /** A registered launch as status and the idle decision see it: the pid and start time, never the token, so nothing that prints or serialises a session can leak the capability. */
4914
- type FrontDoorSessionSummary = Pick<FrontDoorSession, "pid" | "startedAt">;
4941
+ type FrontDoorSessionSummary = Pick<FrontDoorSession, "pid" | "startedAt" | "supervisorPid">;
4915
4942
 
4916
4943
  /** How a sign-out went: whether OpenAI was told, so the person knows the grant is dead on its side too. */
4917
4944
  interface SiwcLogoutResult {
@@ -5942,8 +5969,8 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
5942
5969
  key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
5943
5970
  }, zod_v4_core.$strip>], "kind">]>;
5944
5971
  }, zod_v4_core.$strict>]>>>;
5945
- extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
5946
5972
  $schema: zod.ZodOptional<zod.ZodString>;
5973
+ extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
5947
5974
  categories: zod.ZodOptional<zod.ZodPipe<zod.ZodObject<{
5948
5975
  all: zod.ZodOptional<zod.ZodBoolean>;
5949
5976
  runtime: zod.ZodOptional<zod.ZodBoolean>;
@@ -6126,8 +6153,8 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
6126
6153
  key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
6127
6154
  }, zod_v4_core.$strip>], "kind">]>;
6128
6155
  }, zod_v4_core.$strict>]>>>;
6129
- extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
6130
6156
  $schema: zod.ZodOptional<zod.ZodString>;
6157
+ extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
6131
6158
  categories: zod.ZodOptional<zod.ZodPipe<zod.ZodObject<{
6132
6159
  all: zod.ZodOptional<zod.ZodBoolean>;
6133
6160
  runtime: zod.ZodOptional<zod.ZodBoolean>;
@@ -6283,7 +6310,7 @@ declare const LaunchLifecycleEventSchema: z.ZodObject<{
6283
6310
  /** One launch lifecycle event, as the TypeScript the publisher emits and its consumers handle. */
6284
6311
  type LaunchLifecycleEvent = z.output<typeof LaunchLifecycleEventSchema>;
6285
6312
  /**
6286
- * One door health event: the supervisor's own state transitions, observed at the moment they happened in this process. `generation` is the door fully serving (every listener bound and the state file naming it); `listenerFailed` is a start failure that ends the generation, naming which listener and why; `binaryTurnover` is the door retiring because the installed binary changed and no session is live, so the next launch serves from the new one; `idleShutdown` is the door closing itself with an empty session registry.
6313
+ * One door health event: the supervisor's own state transitions, observed at the moment they happened in this process. `generation` is the door fully serving (every listener bound and the state file naming it); `listenerFailed` is a start failure that ends the generation, naming which listener and why; `binaryTurnover` is the door retiring because the installed binary changed and no session is live, so the next launch serves from the new one; `idleShutdown` is the door closing itself with an empty session registry; `superseded` is the state file coming to name another live supervisor, `ownerPid`, after which this door takes no new sessions; `drained` is a superseded door closing itself because every session it served has ended.
6287
6314
  */
6288
6315
  declare const DoorHealthEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6289
6316
  kind: z.ZodLiteral<"generation">;
@@ -6310,6 +6337,15 @@ declare const DoorHealthEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6310
6337
  kind: z.ZodLiteral<"idleShutdown">;
6311
6338
  pid: z.ZodNumber;
6312
6339
  observedAt: z.ZodNumber;
6340
+ }, z.core.$strict>, z.ZodObject<{
6341
+ kind: z.ZodLiteral<"superseded">;
6342
+ pid: z.ZodNumber;
6343
+ ownerPid: z.ZodNumber;
6344
+ observedAt: z.ZodNumber;
6345
+ }, z.core.$strict>, z.ZodObject<{
6346
+ kind: z.ZodLiteral<"drained">;
6347
+ pid: z.ZodNumber;
6348
+ observedAt: z.ZodNumber;
6313
6349
  }, z.core.$strict>], "kind">;
6314
6350
  /** One door health event, as the TypeScript the publisher emits and its consumers handle. */
6315
6351
  type DoorHealthEvent = z.output<typeof DoorHealthEventSchema>;
@@ -6440,9 +6476,9 @@ declare function createLifecycleApiRouter(deps: LifecycleApiDeps): {
6440
6476
  current: zod.ZodString;
6441
6477
  latest: zod.ZodString;
6442
6478
  action: zod.ZodEnum<{
6443
- updated: "updated";
6444
6479
  current: "current";
6445
6480
  available: "available";
6481
+ updated: "updated";
6446
6482
  }>;
6447
6483
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
6448
6484
  };
@@ -6689,12 +6725,12 @@ declare function createLaunchApiRouter(deps: LaunchApiDeps): {
6689
6725
  decision: zod.ZodObject<{
6690
6726
  identity: zod.ZodOptional<zod.ZodString>;
6691
6727
  identitySource: zod.ZodEnum<{
6692
- env: "env";
6693
- none: "none";
6694
6728
  "config-dir-escape-hatch": "config-dir-escape-hatch";
6695
6729
  argv: "argv";
6730
+ env: "env";
6696
6731
  "directory-pin": "directory-pin";
6697
6732
  "active-identity-file": "active-identity-file";
6733
+ none: "none";
6698
6734
  }>;
6699
6735
  pool: zod.ZodOptional<zod.ZodObject<{
6700
6736
  name: zod.ZodString;
@@ -7080,12 +7116,12 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
7080
7116
  identity: zod.ZodObject<{
7081
7117
  name: zod.ZodNullable<zod.ZodString>;
7082
7118
  source: zod.ZodEnum<{
7083
- env: "env";
7084
- none: "none";
7085
7119
  "config-dir-escape-hatch": "config-dir-escape-hatch";
7086
7120
  argv: "argv";
7121
+ env: "env";
7087
7122
  "directory-pin": "directory-pin";
7088
7123
  "active-identity-file": "active-identity-file";
7124
+ none: "none";
7089
7125
  }>;
7090
7126
  }, zod_v4_core.$strict>;
7091
7127
  pool: zod.ZodOptional<zod.ZodObject<{
@@ -7163,11 +7199,11 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
7163
7199
  "category-default": "category-default";
7164
7200
  }>;
7165
7201
  category: zod.ZodNullable<zod.ZodEnum<{
7202
+ secret: "secret";
7166
7203
  runtime: "runtime";
7167
7204
  history: "history";
7168
7205
  knowledge: "knowledge";
7169
7206
  settings: "settings";
7170
- secret: "secret";
7171
7207
  }>>;
7172
7208
  rule: zod.ZodOptional<zod.ZodObject<{
7173
7209
  key: zod.ZodString;
@@ -7385,11 +7421,11 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
7385
7421
  section: zod.ZodEnum<{
7386
7422
  "global-config": "global-config";
7387
7423
  "config-profile": "config-profile";
7388
- keychain: "keychain";
7389
7424
  identity: "identity";
7390
7425
  provider: "provider";
7391
- headroom: "headroom";
7426
+ frontdoor: "frontdoor";
7392
7427
  pool: "pool";
7428
+ keychain: "keychain";
7393
7429
  "ambient-credential": "ambient-credential";
7394
7430
  "binary-discovery": "binary-discovery";
7395
7431
  "claude-shim": "claude-shim";
@@ -7399,6 +7435,7 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
7399
7435
  "directory-rules": "directory-rules";
7400
7436
  "categories-local": "categories-local";
7401
7437
  "active-identity": "active-identity";
7438
+ headroom: "headroom";
7402
7439
  }>;
7403
7440
  subject: zod.ZodOptional<zod.ZodString>;
7404
7441
  severity: zod.ZodEnum<{
@@ -7519,12 +7556,12 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
7519
7556
  decision: zod.ZodObject<{
7520
7557
  identity: zod.ZodOptional<zod.ZodString>;
7521
7558
  identitySource: zod.ZodEnum<{
7522
- env: "env";
7523
- none: "none";
7524
7559
  "config-dir-escape-hatch": "config-dir-escape-hatch";
7525
7560
  argv: "argv";
7561
+ env: "env";
7526
7562
  "directory-pin": "directory-pin";
7527
7563
  "active-identity-file": "active-identity-file";
7564
+ none: "none";
7528
7565
  }>;
7529
7566
  pool: zod.ZodOptional<zod.ZodObject<{
7530
7567
  name: zod.ZodString;
@@ -8562,8 +8599,8 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
8562
8599
  key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
8563
8600
  }, zod_v4_core.$strip>], "kind">]>;
8564
8601
  }, zod_v4_core.$strict>]>>>;
8565
- extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
8566
8602
  $schema: zod.ZodOptional<zod.ZodString>;
8603
+ extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
8567
8604
  categories: zod.ZodOptional<zod.ZodPipe<zod.ZodObject<{
8568
8605
  all: zod.ZodOptional<zod.ZodBoolean>;
8569
8606
  runtime: zod.ZodOptional<zod.ZodBoolean>;
@@ -8746,8 +8783,8 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
8746
8783
  key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
8747
8784
  }, zod_v4_core.$strip>], "kind">]>;
8748
8785
  }, zod_v4_core.$strict>]>>>;
8749
- extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
8750
8786
  $schema: zod.ZodOptional<zod.ZodString>;
8787
+ extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
8751
8788
  categories: zod.ZodOptional<zod.ZodPipe<zod.ZodObject<{
8752
8789
  all: zod.ZodOptional<zod.ZodBoolean>;
8753
8790
  runtime: zod.ZodOptional<zod.ZodBoolean>;
@@ -8861,9 +8898,9 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
8861
8898
  current: zod.ZodString;
8862
8899
  latest: zod.ZodString;
8863
8900
  action: zod.ZodEnum<{
8864
- updated: "updated";
8865
8901
  current: "current";
8866
8902
  available: "available";
8903
+ updated: "updated";
8867
8904
  }>;
8868
8905
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
8869
8906
  };
@@ -9062,12 +9099,12 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
9062
9099
  identity: zod.ZodObject<{
9063
9100
  name: zod.ZodNullable<zod.ZodString>;
9064
9101
  source: zod.ZodEnum<{
9065
- env: "env";
9066
- none: "none";
9067
9102
  "config-dir-escape-hatch": "config-dir-escape-hatch";
9068
9103
  argv: "argv";
9104
+ env: "env";
9069
9105
  "directory-pin": "directory-pin";
9070
9106
  "active-identity-file": "active-identity-file";
9107
+ none: "none";
9071
9108
  }>;
9072
9109
  }, zod_v4_core.$strict>;
9073
9110
  pool: zod.ZodOptional<zod.ZodObject<{
@@ -9145,11 +9182,11 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
9145
9182
  "category-default": "category-default";
9146
9183
  }>;
9147
9184
  category: zod.ZodNullable<zod.ZodEnum<{
9185
+ secret: "secret";
9148
9186
  runtime: "runtime";
9149
9187
  history: "history";
9150
9188
  knowledge: "knowledge";
9151
9189
  settings: "settings";
9152
- secret: "secret";
9153
9190
  }>>;
9154
9191
  rule: zod.ZodOptional<zod.ZodObject<{
9155
9192
  key: zod.ZodString;
@@ -9367,11 +9404,11 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
9367
9404
  section: zod.ZodEnum<{
9368
9405
  "global-config": "global-config";
9369
9406
  "config-profile": "config-profile";
9370
- keychain: "keychain";
9371
9407
  identity: "identity";
9372
9408
  provider: "provider";
9373
- headroom: "headroom";
9409
+ frontdoor: "frontdoor";
9374
9410
  pool: "pool";
9411
+ keychain: "keychain";
9375
9412
  "ambient-credential": "ambient-credential";
9376
9413
  "binary-discovery": "binary-discovery";
9377
9414
  "claude-shim": "claude-shim";
@@ -9381,6 +9418,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
9381
9418
  "directory-rules": "directory-rules";
9382
9419
  "categories-local": "categories-local";
9383
9420
  "active-identity": "active-identity";
9421
+ headroom: "headroom";
9384
9422
  }>;
9385
9423
  subject: zod.ZodOptional<zod.ZodString>;
9386
9424
  severity: zod.ZodEnum<{
@@ -10634,8 +10672,8 @@ declare const ConfigRuleAddOutputSchema: z.ZodObject<{
10634
10672
  key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
10635
10673
  }, z.core.$strip>], "kind">]>;
10636
10674
  }, z.core.$strict>]>>>;
10637
- extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
10638
10675
  $schema: z.ZodOptional<z.ZodString>;
10676
+ extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
10639
10677
  categories: z.ZodOptional<z.ZodPipe<z.ZodObject<{
10640
10678
  all: z.ZodOptional<z.ZodBoolean>;
10641
10679
  runtime: z.ZodOptional<z.ZodBoolean>;
@@ -10820,8 +10858,8 @@ declare const ConfigRuleSetOutputSchema: z.ZodObject<{
10820
10858
  key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
10821
10859
  }, z.core.$strip>], "kind">]>;
10822
10860
  }, z.core.$strict>]>>>;
10823
- extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
10824
10861
  $schema: z.ZodOptional<z.ZodString>;
10862
+ extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
10825
10863
  categories: z.ZodOptional<z.ZodPipe<z.ZodObject<{
10826
10864
  all: z.ZodOptional<z.ZodBoolean>;
10827
10865
  runtime: z.ZodOptional<z.ZodBoolean>;
@@ -11173,11 +11211,11 @@ declare const DoctorFindingSchema: z.ZodObject<{
11173
11211
  section: z.ZodEnum<{
11174
11212
  "global-config": "global-config";
11175
11213
  "config-profile": "config-profile";
11176
- keychain: "keychain";
11177
11214
  identity: "identity";
11178
11215
  provider: "provider";
11179
- headroom: "headroom";
11216
+ frontdoor: "frontdoor";
11180
11217
  pool: "pool";
11218
+ keychain: "keychain";
11181
11219
  "ambient-credential": "ambient-credential";
11182
11220
  "binary-discovery": "binary-discovery";
11183
11221
  "claude-shim": "claude-shim";
@@ -11187,6 +11225,7 @@ declare const DoctorFindingSchema: z.ZodObject<{
11187
11225
  "directory-rules": "directory-rules";
11188
11226
  "categories-local": "categories-local";
11189
11227
  "active-identity": "active-identity";
11228
+ headroom: "headroom";
11190
11229
  }>;
11191
11230
  subject: z.ZodOptional<z.ZodString>;
11192
11231
  severity: z.ZodEnum<{
@@ -11203,11 +11242,11 @@ declare const DoctorRunOutputSchema: z.ZodObject<{
11203
11242
  section: z.ZodEnum<{
11204
11243
  "global-config": "global-config";
11205
11244
  "config-profile": "config-profile";
11206
- keychain: "keychain";
11207
11245
  identity: "identity";
11208
11246
  provider: "provider";
11209
- headroom: "headroom";
11247
+ frontdoor: "frontdoor";
11210
11248
  pool: "pool";
11249
+ keychain: "keychain";
11211
11250
  "ambient-credential": "ambient-credential";
11212
11251
  "binary-discovery": "binary-discovery";
11213
11252
  "claude-shim": "claude-shim";
@@ -11217,6 +11256,7 @@ declare const DoctorRunOutputSchema: z.ZodObject<{
11217
11256
  "directory-rules": "directory-rules";
11218
11257
  "categories-local": "categories-local";
11219
11258
  "active-identity": "active-identity";
11259
+ headroom: "headroom";
11220
11260
  }>;
11221
11261
  subject: z.ZodOptional<z.ZodString>;
11222
11262
  severity: z.ZodEnum<{
@@ -11237,9 +11277,9 @@ declare const UpdateCheckOutputSchema: z.ZodObject<{
11237
11277
  current: z.ZodString;
11238
11278
  latest: z.ZodString;
11239
11279
  action: z.ZodEnum<{
11240
- updated: "updated";
11241
11280
  current: "current";
11242
11281
  available: "available";
11282
+ updated: "updated";
11243
11283
  }>;
11244
11284
  }, z.core.$strict>;
11245
11285
  /** The Sign in with ChatGPT login's state as `codex status` reports it: no sign-in yet, signed in (with who, whether the plan scope was granted, and when the access token lapses), or a file that cannot be read. */
@@ -11289,12 +11329,12 @@ declare const LaunchResolveOutputSchema: z.ZodObject<{
11289
11329
  decision: z.ZodObject<{
11290
11330
  identity: z.ZodOptional<z.ZodString>;
11291
11331
  identitySource: z.ZodEnum<{
11292
- env: "env";
11293
- none: "none";
11294
11332
  "config-dir-escape-hatch": "config-dir-escape-hatch";
11295
11333
  argv: "argv";
11334
+ env: "env";
11296
11335
  "directory-pin": "directory-pin";
11297
11336
  "active-identity-file": "active-identity-file";
11337
+ none: "none";
11298
11338
  }>;
11299
11339
  pool: z.ZodOptional<z.ZodObject<{
11300
11340
  name: z.ZodString;
@@ -11397,7 +11437,7 @@ interface LaunchEventPublisher {
11397
11437
  declare function createLaunchEventPublisher(hub: DoorEventHub, now: () => number): LaunchEventPublisher;
11398
11438
 
11399
11439
  /**
11400
- * The door health publisher: the supervisor's own state transitions as backbone events, so a consumer of the door learns the door itself changed and not only its sessions. The publisher emits nothing of its own: the supervisor tells it the moments it already lives through (every listener bound, a start failure that ends the generation, the binary turnover, the idle shutdown), each published the moment it happens rather than at a tick, because these are process facts, not registry facts diffed between observations.
11440
+ * The door health publisher: the supervisor's own state transitions as backbone events, so a consumer of the door learns the door itself changed and not only its sessions. The publisher emits nothing of its own: the supervisor tells it the moments it already lives through (every listener bound, a start failure that ends the generation, the binary turnover, the idle shutdown, the supersession and the drained exit that follows it), each published the moment it happens rather than at a tick, because these are process facts, not registry facts diffed between observations.
11401
11441
  */
11402
11442
  /** Everything the door health publisher needs: the backbone it publishes on and the clock its events are observed at. */
11403
11443
  interface DoorHealthPublisher {
@@ -11413,6 +11453,10 @@ interface DoorHealthPublisher {
11413
11453
  readonly binaryTurnover: () => void;
11414
11454
  /** Publishes the idle shutdown: the door closing itself with an empty session registry. */
11415
11455
  readonly idleShutdown: () => void;
11456
+ /** Publishes the supersession: the state file naming another live supervisor, `ownerPid`, so this door takes no new sessions and serves only those it already had. */
11457
+ readonly superseded: (ownerPid: number) => void;
11458
+ /** Publishes the drained exit: a superseded door closing itself because every session it served has ended. */
11459
+ readonly drained: () => void;
11416
11460
  }
11417
11461
  /** Creates the door health publisher. One per door process, fed by the supervisor. */
11418
11462
  declare function createDoorHealthPublisher(hub: DoorEventHub, now: () => number, pid: number): DoorHealthPublisher;
@@ -11753,7 +11797,7 @@ interface RunFrontDoorSupervisorOptions {
11753
11797
  readonly tickLimit?: number;
11754
11798
  }
11755
11799
  /**
11756
- * Runs the front-door supervisor: binds all three listeners (the HTTPS provider listener, the CONNECT surface and the plain-HTTP direct listener, each on its sticky port), records the serving state, and shuts down with an empty session registry, either at the first such tick after the executable it serves as has been replaced on disk (so an applied update reaches the door without waiting out the idle window) or after `idleShutdownMinutes` of it. Returns the exit code: 0 for either retirement, 1 for a fatal start failure.
11800
+ * Runs the front-door supervisor: binds all three listeners (the HTTPS provider listener, the CONNECT surface and the plain-HTTP direct listener, each on its sticky port), records the serving state, and shuts down with an empty session registry, either at the first such tick after the executable it serves as has been replaced on disk (so an applied update reaches the door without waiting out the idle window) or after `idleShutdownMinutes` of it. A door whose state file comes to name another live supervisor is superseded: from then on it takes no new sessions, never writes the state file again, and exits as soon as the sessions it was serving have ended. Returns the exit code: 0 for any of these retirements, 1 for a fatal start failure.
11757
11801
  *
11758
11802
  * The listeners live in this process, so there is no child to keep alive: a crash of this process is a crash of every routed session's door at once, and recovery is the next launch's ensure spawning a replacement on the same sticky ports, which is exactly the failure model the issue asks to settle with tests. Keeping the headroom daemon alive is the headroom supervisor's job, not this one's; the two daemons idle out independently.
11759
11803
  */
@@ -11904,6 +11948,8 @@ interface Candidate {
11904
11948
  readonly headroom?: number;
11905
11949
  /** When an `ineligible` candidate can be used again. */
11906
11950
  readonly blockedUntilMs?: number;
11951
+ /** When the exhausted plan window of a `pay-per-use` candidate that is only on extra usage because its plan ran out resets, so a launch can hold for it rather than spend. Absent for a candidate that bills by use with no plan allowance. */
11952
+ readonly planReturnsAtMs?: number;
11907
11953
  readonly plan: PlanClass;
11908
11954
  /** True when the member's policy condition could not be decided and it is ranked last within its class, naming the missing fact in its reasons. */
11909
11955
  readonly policyDemoted?: boolean;
@@ -11920,6 +11966,11 @@ interface PoolRanking {
11920
11966
  readonly identity: string;
11921
11967
  readonly atMs: number;
11922
11968
  };
11969
+ /** When the pick continues on extra usage only because its plan ran out, the identity and the instant its plan window resets: what a launch that would rather wait than spend sleeps until. Absent when the pick is on plan quota, bills by use with no plan, or no member can be picked. */
11970
+ readonly planReturn?: {
11971
+ readonly identity: string;
11972
+ readonly atMs: number;
11973
+ };
11923
11974
  /** 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`. */
11924
11975
  readonly movedOff?: {
11925
11976
  readonly identity: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-use",
3
- "version": "9.12.1",
3
+ "version": "9.13.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>",