claude-use 9.12.1 → 9.14.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>;
@@ -1608,6 +1608,19 @@ declare const IdentitySchema: z.ZodObject<{
1608
1608
  }>>;
1609
1609
  }, z.core.$strict>>;
1610
1610
  }, z.core.$strict>>;
1611
+ anchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
1612
+ days: z.ZodArray<z.ZodEnum<{
1613
+ mon: "mon";
1614
+ tue: "tue";
1615
+ wed: "wed";
1616
+ thu: "thu";
1617
+ fri: "fri";
1618
+ sat: "sat";
1619
+ sun: "sun";
1620
+ }>>;
1621
+ time: z.ZodString;
1622
+ timeZone: z.ZodOptional<z.ZodString>;
1623
+ }, z.core.$strict>>>;
1611
1624
  }, z.core.$strict>;
1612
1625
  type Identity = z.infer<typeof IdentitySchema>;
1613
1626
  /**
@@ -1711,6 +1724,8 @@ interface LayoutPaths {
1711
1724
  readonly mcpPermissionsFile: string;
1712
1725
  /** The last identity picked from a pool for each directory, so a conversation stays on the account whose prompt cache is warm. */
1713
1726
  readonly usagePicksFile: string;
1727
+ /** The last anchor the front door's window keeper handled for each identity, so a restart neither replays an anchor nor skips one. */
1728
+ readonly usageAnchorsFile: string;
1714
1729
  }
1715
1730
  /**
1716
1731
  * Resolves the state root: `AGENT_SHIM_HOME` when set to a non-empty string (an empty string counts as unset, consistent with how this project treats empty-string environment variables elsewhere, see the ambient-credential guard), otherwise `~/.agent-shim`, or the former `~/.claude-use` when only that exists.
@@ -3859,12 +3874,12 @@ declare const CheckReportJsonSchema: z.ZodObject<{
3859
3874
  identity: z.ZodObject<{
3860
3875
  name: z.ZodNullable<z.ZodString>;
3861
3876
  source: z.ZodEnum<{
3862
- env: "env";
3863
- none: "none";
3864
3877
  "config-dir-escape-hatch": "config-dir-escape-hatch";
3865
3878
  argv: "argv";
3879
+ env: "env";
3866
3880
  "directory-pin": "directory-pin";
3867
3881
  "active-identity-file": "active-identity-file";
3882
+ none: "none";
3868
3883
  }>;
3869
3884
  }, z.core.$strict>;
3870
3885
  pool: z.ZodOptional<z.ZodObject<{
@@ -3942,11 +3957,11 @@ declare const CheckReportJsonSchema: z.ZodObject<{
3942
3957
  "category-default": "category-default";
3943
3958
  }>;
3944
3959
  category: z.ZodNullable<z.ZodEnum<{
3960
+ secret: "secret";
3945
3961
  runtime: "runtime";
3946
3962
  history: "history";
3947
3963
  knowledge: "knowledge";
3948
3964
  settings: "settings";
3949
- secret: "secret";
3950
3965
  }>>;
3951
3966
  rule: z.ZodOptional<z.ZodObject<{
3952
3967
  key: z.ZodString;
@@ -4586,6 +4601,18 @@ type PathShadowStatus = {
4586
4601
  readonly by: string;
4587
4602
  };
4588
4603
 
4604
+ /** One input the headroom allowlist is computed from: the provider definitions on disk, or the front door's direct origin. */
4605
+ type AllowlistDriftInput = "provider-files" | "front-door-origin";
4606
+
4607
+ /** What listing the front-door supervisors found: their pids, or why the process table could not be read. */
4608
+ type FrontDoorSupervisorListing = {
4609
+ readonly ok: true;
4610
+ readonly pids: readonly number[];
4611
+ } | {
4612
+ readonly ok: false;
4613
+ readonly message: string;
4614
+ };
4615
+
4589
4616
  /** The result of a successful discovery. */
4590
4617
  interface DiscoveredClaudeBinary {
4591
4618
  /** Full path to the discovered `claude` executable. */
@@ -4604,7 +4631,7 @@ type ClaudeBinaryResolver = (request?: Readonly<ClaudeBinaryRequest>) => Discove
4604
4631
 
4605
4632
  declare const DOCTOR_SEVERITIES: readonly ["pass", "warn", "fail"];
4606
4633
  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"];
4634
+ 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
4635
  type DoctorSection = (typeof DOCTOR_SECTIONS)[number];
4609
4636
  /** 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
4637
  interface DoctorFinding {
@@ -4700,6 +4727,18 @@ interface RunDoctorParams {
4700
4727
  readonly headroom: {
4701
4728
  readonly state: DoctorFileInput;
4702
4729
  readonly isRunning: (pid: number) => boolean;
4730
+ /** 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. */
4731
+ readonly allowlist?: {
4732
+ /** The inputs that could explain the recorded allowlist hash not matching the current allowlist, or undefined when it matches. */
4733
+ readonly driftInputs: readonly AllowlistDriftInput[] | undefined;
4734
+ /** The serving front door's direct origin, or undefined before it has ever served. */
4735
+ readonly frontDoorOrigin: string | undefined;
4736
+ };
4737
+ };
4738
+ /** 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. */
4739
+ readonly frontDoor?: {
4740
+ readonly state: DoctorFileInput;
4741
+ readonly supervisors: FrontDoorSupervisorListing;
4703
4742
  };
4704
4743
  }
4705
4744
  /**
@@ -4888,11 +4927,14 @@ declare const UsageSnapshotSchema: z.ZodObject<{
4888
4927
  }, z.core.$strict>;
4889
4928
  type UsageSnapshot = z.infer<typeof UsageSnapshotSchema>;
4890
4929
 
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. */
4930
+ /**
4931
+ * 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.
4932
+ */
4892
4933
  declare const FrontDoorSessionSchema: z.ZodObject<{
4893
4934
  pid: z.ZodNumber;
4894
4935
  startedAt: z.ZodNumber;
4895
4936
  token: z.ZodString;
4937
+ supervisorPid: z.ZodOptional<z.ZodNumber>;
4896
4938
  }, z.core.$strict>;
4897
4939
  type FrontDoorSession = z.infer<typeof FrontDoorSessionSchema>;
4898
4940
  /**
@@ -4911,7 +4953,7 @@ declare const FrontDoorStateSchema: z.ZodObject<{
4911
4953
  }, z.core.$strict>;
4912
4954
  type FrontDoorState = z.infer<typeof FrontDoorStateSchema>;
4913
4955
  /** 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">;
4956
+ type FrontDoorSessionSummary = Pick<FrontDoorSession, "pid" | "startedAt" | "supervisorPid">;
4915
4957
 
4916
4958
  /** How a sign-out went: whether OpenAI was told, so the person knows the grant is dead on its side too. */
4917
4959
  interface SiwcLogoutResult {
@@ -5056,6 +5098,19 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
5056
5098
  }>>;
5057
5099
  }, zod_v4_core.$strict>>;
5058
5100
  }, zod_v4_core.$strict>>;
5101
+ anchors: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
5102
+ days: zod.ZodArray<zod.ZodEnum<{
5103
+ mon: "mon";
5104
+ tue: "tue";
5105
+ wed: "wed";
5106
+ thu: "thu";
5107
+ fri: "fri";
5108
+ sat: "sat";
5109
+ sun: "sun";
5110
+ }>>;
5111
+ time: zod.ZodString;
5112
+ timeZone: zod.ZodOptional<zod.ZodString>;
5113
+ }, zod_v4_core.$strict>>>;
5059
5114
  }, zod_v4_core.$strict>;
5060
5115
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
5061
5116
  set: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
@@ -5094,6 +5149,19 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
5094
5149
  }>>;
5095
5150
  }, zod_v4_core.$strict>]>>;
5096
5151
  }, zod_v4_core.$strict>]>>;
5152
+ anchors: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodLiteral<false>, zod.ZodArray<zod.ZodObject<{
5153
+ days: zod.ZodArray<zod.ZodEnum<{
5154
+ mon: "mon";
5155
+ tue: "tue";
5156
+ wed: "wed";
5157
+ thu: "thu";
5158
+ fri: "fri";
5159
+ sat: "sat";
5160
+ sun: "sun";
5161
+ }>>;
5162
+ time: zod.ZodString;
5163
+ timeZone: zod.ZodOptional<zod.ZodString>;
5164
+ }, zod_v4_core.$strict>>]>>;
5097
5165
  }, zod_v4_core.$strict>, zod.ZodObject<{
5098
5166
  action: zod.ZodLiteral<"updated">;
5099
5167
  kind: zod.ZodLiteral<"identity">;
@@ -5135,6 +5203,19 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
5135
5203
  }>>;
5136
5204
  }, zod_v4_core.$strict>>;
5137
5205
  }, zod_v4_core.$strict>>;
5206
+ anchors: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
5207
+ days: zod.ZodArray<zod.ZodEnum<{
5208
+ mon: "mon";
5209
+ tue: "tue";
5210
+ wed: "wed";
5211
+ thu: "thu";
5212
+ fri: "fri";
5213
+ sat: "sat";
5214
+ sun: "sun";
5215
+ }>>;
5216
+ time: zod.ZodString;
5217
+ timeZone: zod.ZodOptional<zod.ZodString>;
5218
+ }, zod_v4_core.$strict>>>;
5138
5219
  }, zod_v4_core.$strict>;
5139
5220
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
5140
5221
  remove: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
@@ -5942,8 +6023,8 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
5942
6023
  key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
5943
6024
  }, zod_v4_core.$strip>], "kind">]>;
5944
6025
  }, zod_v4_core.$strict>]>>>;
5945
- extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
5946
6026
  $schema: zod.ZodOptional<zod.ZodString>;
6027
+ extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
5947
6028
  categories: zod.ZodOptional<zod.ZodPipe<zod.ZodObject<{
5948
6029
  all: zod.ZodOptional<zod.ZodBoolean>;
5949
6030
  runtime: zod.ZodOptional<zod.ZodBoolean>;
@@ -6126,8 +6207,8 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
6126
6207
  key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
6127
6208
  }, zod_v4_core.$strip>], "kind">]>;
6128
6209
  }, zod_v4_core.$strict>]>>>;
6129
- extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
6130
6210
  $schema: zod.ZodOptional<zod.ZodString>;
6211
+ extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
6131
6212
  categories: zod.ZodOptional<zod.ZodPipe<zod.ZodObject<{
6132
6213
  all: zod.ZodOptional<zod.ZodBoolean>;
6133
6214
  runtime: zod.ZodOptional<zod.ZodBoolean>;
@@ -6283,7 +6364,7 @@ declare const LaunchLifecycleEventSchema: z.ZodObject<{
6283
6364
  /** One launch lifecycle event, as the TypeScript the publisher emits and its consumers handle. */
6284
6365
  type LaunchLifecycleEvent = z.output<typeof LaunchLifecycleEventSchema>;
6285
6366
  /**
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.
6367
+ * 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
6368
  */
6288
6369
  declare const DoorHealthEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6289
6370
  kind: z.ZodLiteral<"generation">;
@@ -6310,6 +6391,15 @@ declare const DoorHealthEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6310
6391
  kind: z.ZodLiteral<"idleShutdown">;
6311
6392
  pid: z.ZodNumber;
6312
6393
  observedAt: z.ZodNumber;
6394
+ }, z.core.$strict>, z.ZodObject<{
6395
+ kind: z.ZodLiteral<"superseded">;
6396
+ pid: z.ZodNumber;
6397
+ ownerPid: z.ZodNumber;
6398
+ observedAt: z.ZodNumber;
6399
+ }, z.core.$strict>, z.ZodObject<{
6400
+ kind: z.ZodLiteral<"drained">;
6401
+ pid: z.ZodNumber;
6402
+ observedAt: z.ZodNumber;
6313
6403
  }, z.core.$strict>], "kind">;
6314
6404
  /** One door health event, as the TypeScript the publisher emits and its consumers handle. */
6315
6405
  type DoorHealthEvent = z.output<typeof DoorHealthEventSchema>;
@@ -6440,9 +6530,9 @@ declare function createLifecycleApiRouter(deps: LifecycleApiDeps): {
6440
6530
  current: zod.ZodString;
6441
6531
  latest: zod.ZodString;
6442
6532
  action: zod.ZodEnum<{
6443
- updated: "updated";
6444
6533
  current: "current";
6445
6534
  available: "available";
6535
+ updated: "updated";
6446
6536
  }>;
6447
6537
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
6448
6538
  };
@@ -6689,12 +6779,12 @@ declare function createLaunchApiRouter(deps: LaunchApiDeps): {
6689
6779
  decision: zod.ZodObject<{
6690
6780
  identity: zod.ZodOptional<zod.ZodString>;
6691
6781
  identitySource: zod.ZodEnum<{
6692
- env: "env";
6693
- none: "none";
6694
6782
  "config-dir-escape-hatch": "config-dir-escape-hatch";
6695
6783
  argv: "argv";
6784
+ env: "env";
6696
6785
  "directory-pin": "directory-pin";
6697
6786
  "active-identity-file": "active-identity-file";
6787
+ none: "none";
6698
6788
  }>;
6699
6789
  pool: zod.ZodOptional<zod.ZodObject<{
6700
6790
  name: zod.ZodString;
@@ -7080,12 +7170,12 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
7080
7170
  identity: zod.ZodObject<{
7081
7171
  name: zod.ZodNullable<zod.ZodString>;
7082
7172
  source: zod.ZodEnum<{
7083
- env: "env";
7084
- none: "none";
7085
7173
  "config-dir-escape-hatch": "config-dir-escape-hatch";
7086
7174
  argv: "argv";
7175
+ env: "env";
7087
7176
  "directory-pin": "directory-pin";
7088
7177
  "active-identity-file": "active-identity-file";
7178
+ none: "none";
7089
7179
  }>;
7090
7180
  }, zod_v4_core.$strict>;
7091
7181
  pool: zod.ZodOptional<zod.ZodObject<{
@@ -7163,11 +7253,11 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
7163
7253
  "category-default": "category-default";
7164
7254
  }>;
7165
7255
  category: zod.ZodNullable<zod.ZodEnum<{
7256
+ secret: "secret";
7166
7257
  runtime: "runtime";
7167
7258
  history: "history";
7168
7259
  knowledge: "knowledge";
7169
7260
  settings: "settings";
7170
- secret: "secret";
7171
7261
  }>>;
7172
7262
  rule: zod.ZodOptional<zod.ZodObject<{
7173
7263
  key: zod.ZodString;
@@ -7385,11 +7475,11 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
7385
7475
  section: zod.ZodEnum<{
7386
7476
  "global-config": "global-config";
7387
7477
  "config-profile": "config-profile";
7388
- keychain: "keychain";
7389
7478
  identity: "identity";
7390
7479
  provider: "provider";
7391
- headroom: "headroom";
7480
+ frontdoor: "frontdoor";
7392
7481
  pool: "pool";
7482
+ keychain: "keychain";
7393
7483
  "ambient-credential": "ambient-credential";
7394
7484
  "binary-discovery": "binary-discovery";
7395
7485
  "claude-shim": "claude-shim";
@@ -7399,6 +7489,7 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
7399
7489
  "directory-rules": "directory-rules";
7400
7490
  "categories-local": "categories-local";
7401
7491
  "active-identity": "active-identity";
7492
+ headroom: "headroom";
7402
7493
  }>;
7403
7494
  subject: zod.ZodOptional<zod.ZodString>;
7404
7495
  severity: zod.ZodEnum<{
@@ -7519,12 +7610,12 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
7519
7610
  decision: zod.ZodObject<{
7520
7611
  identity: zod.ZodOptional<zod.ZodString>;
7521
7612
  identitySource: zod.ZodEnum<{
7522
- env: "env";
7523
- none: "none";
7524
7613
  "config-dir-escape-hatch": "config-dir-escape-hatch";
7525
7614
  argv: "argv";
7615
+ env: "env";
7526
7616
  "directory-pin": "directory-pin";
7527
7617
  "active-identity-file": "active-identity-file";
7618
+ none: "none";
7528
7619
  }>;
7529
7620
  pool: zod.ZodOptional<zod.ZodObject<{
7530
7621
  name: zod.ZodString;
@@ -7676,6 +7767,19 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
7676
7767
  }>>;
7677
7768
  }, zod_v4_core.$strict>>;
7678
7769
  }, zod_v4_core.$strict>>;
7770
+ anchors: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
7771
+ days: zod.ZodArray<zod.ZodEnum<{
7772
+ mon: "mon";
7773
+ tue: "tue";
7774
+ wed: "wed";
7775
+ thu: "thu";
7776
+ fri: "fri";
7777
+ sat: "sat";
7778
+ sun: "sun";
7779
+ }>>;
7780
+ time: zod.ZodString;
7781
+ timeZone: zod.ZodOptional<zod.ZodString>;
7782
+ }, zod_v4_core.$strict>>>;
7679
7783
  }, zod_v4_core.$strict>;
7680
7784
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
7681
7785
  set: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
@@ -7714,6 +7818,19 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
7714
7818
  }>>;
7715
7819
  }, zod_v4_core.$strict>]>>;
7716
7820
  }, zod_v4_core.$strict>]>>;
7821
+ anchors: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodLiteral<false>, zod.ZodArray<zod.ZodObject<{
7822
+ days: zod.ZodArray<zod.ZodEnum<{
7823
+ mon: "mon";
7824
+ tue: "tue";
7825
+ wed: "wed";
7826
+ thu: "thu";
7827
+ fri: "fri";
7828
+ sat: "sat";
7829
+ sun: "sun";
7830
+ }>>;
7831
+ time: zod.ZodString;
7832
+ timeZone: zod.ZodOptional<zod.ZodString>;
7833
+ }, zod_v4_core.$strict>>]>>;
7717
7834
  }, zod_v4_core.$strict>, zod.ZodObject<{
7718
7835
  action: zod.ZodLiteral<"updated">;
7719
7836
  kind: zod.ZodLiteral<"identity">;
@@ -7755,6 +7872,19 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
7755
7872
  }>>;
7756
7873
  }, zod_v4_core.$strict>>;
7757
7874
  }, zod_v4_core.$strict>>;
7875
+ anchors: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
7876
+ days: zod.ZodArray<zod.ZodEnum<{
7877
+ mon: "mon";
7878
+ tue: "tue";
7879
+ wed: "wed";
7880
+ thu: "thu";
7881
+ fri: "fri";
7882
+ sat: "sat";
7883
+ sun: "sun";
7884
+ }>>;
7885
+ time: zod.ZodString;
7886
+ timeZone: zod.ZodOptional<zod.ZodString>;
7887
+ }, zod_v4_core.$strict>>>;
7758
7888
  }, zod_v4_core.$strict>;
7759
7889
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
7760
7890
  remove: _orpc_server.DecoratedProcedure<DoorApiContext & object, IntersectPick<TInitialContext, $OutContext>, zod.ZodObject<{
@@ -8562,8 +8692,8 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
8562
8692
  key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
8563
8693
  }, zod_v4_core.$strip>], "kind">]>;
8564
8694
  }, zod_v4_core.$strict>]>>>;
8565
- extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
8566
8695
  $schema: zod.ZodOptional<zod.ZodString>;
8696
+ extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
8567
8697
  categories: zod.ZodOptional<zod.ZodPipe<zod.ZodObject<{
8568
8698
  all: zod.ZodOptional<zod.ZodBoolean>;
8569
8699
  runtime: zod.ZodOptional<zod.ZodBoolean>;
@@ -8746,8 +8876,8 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
8746
8876
  key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
8747
8877
  }, zod_v4_core.$strip>], "kind">]>;
8748
8878
  }, zod_v4_core.$strict>]>>>;
8749
- extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
8750
8879
  $schema: zod.ZodOptional<zod.ZodString>;
8880
+ extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
8751
8881
  categories: zod.ZodOptional<zod.ZodPipe<zod.ZodObject<{
8752
8882
  all: zod.ZodOptional<zod.ZodBoolean>;
8753
8883
  runtime: zod.ZodOptional<zod.ZodBoolean>;
@@ -8861,9 +8991,9 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
8861
8991
  current: zod.ZodString;
8862
8992
  latest: zod.ZodString;
8863
8993
  action: zod.ZodEnum<{
8864
- updated: "updated";
8865
8994
  current: "current";
8866
8995
  available: "available";
8996
+ updated: "updated";
8867
8997
  }>;
8868
8998
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
8869
8999
  };
@@ -9062,12 +9192,12 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
9062
9192
  identity: zod.ZodObject<{
9063
9193
  name: zod.ZodNullable<zod.ZodString>;
9064
9194
  source: zod.ZodEnum<{
9065
- env: "env";
9066
- none: "none";
9067
9195
  "config-dir-escape-hatch": "config-dir-escape-hatch";
9068
9196
  argv: "argv";
9197
+ env: "env";
9069
9198
  "directory-pin": "directory-pin";
9070
9199
  "active-identity-file": "active-identity-file";
9200
+ none: "none";
9071
9201
  }>;
9072
9202
  }, zod_v4_core.$strict>;
9073
9203
  pool: zod.ZodOptional<zod.ZodObject<{
@@ -9145,11 +9275,11 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
9145
9275
  "category-default": "category-default";
9146
9276
  }>;
9147
9277
  category: zod.ZodNullable<zod.ZodEnum<{
9278
+ secret: "secret";
9148
9279
  runtime: "runtime";
9149
9280
  history: "history";
9150
9281
  knowledge: "knowledge";
9151
9282
  settings: "settings";
9152
- secret: "secret";
9153
9283
  }>>;
9154
9284
  rule: zod.ZodOptional<zod.ZodObject<{
9155
9285
  key: zod.ZodString;
@@ -9367,11 +9497,11 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
9367
9497
  section: zod.ZodEnum<{
9368
9498
  "global-config": "global-config";
9369
9499
  "config-profile": "config-profile";
9370
- keychain: "keychain";
9371
9500
  identity: "identity";
9372
9501
  provider: "provider";
9373
- headroom: "headroom";
9502
+ frontdoor: "frontdoor";
9374
9503
  pool: "pool";
9504
+ keychain: "keychain";
9375
9505
  "ambient-credential": "ambient-credential";
9376
9506
  "binary-discovery": "binary-discovery";
9377
9507
  "claude-shim": "claude-shim";
@@ -9381,6 +9511,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
9381
9511
  "directory-rules": "directory-rules";
9382
9512
  "categories-local": "categories-local";
9383
9513
  "active-identity": "active-identity";
9514
+ headroom: "headroom";
9384
9515
  }>;
9385
9516
  subject: zod.ZodOptional<zod.ZodString>;
9386
9517
  severity: zod.ZodEnum<{
@@ -9744,6 +9875,19 @@ declare const ConfigIdentityAddOutputSchema: z.ZodObject<{
9744
9875
  }>>;
9745
9876
  }, z.core.$strict>>;
9746
9877
  }, z.core.$strict>>;
9878
+ anchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
9879
+ days: z.ZodArray<z.ZodEnum<{
9880
+ mon: "mon";
9881
+ tue: "tue";
9882
+ wed: "wed";
9883
+ thu: "thu";
9884
+ fri: "fri";
9885
+ sat: "sat";
9886
+ sun: "sun";
9887
+ }>>;
9888
+ time: z.ZodString;
9889
+ timeZone: z.ZodOptional<z.ZodString>;
9890
+ }, z.core.$strict>>>;
9747
9891
  }, z.core.$strict>;
9748
9892
  }, z.core.$strict>;
9749
9893
  /** `defaultConfigProfile: false` clears it; `credential: false` removes the credential block, returning the identity to its stored login. At least one field must be present. */
@@ -9783,6 +9927,19 @@ declare const ConfigIdentitySetInputSchema: z.ZodObject<{
9783
9927
  }>>;
9784
9928
  }, z.core.$strict>]>>;
9785
9929
  }, z.core.$strict>]>>;
9930
+ anchors: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodArray<z.ZodObject<{
9931
+ days: z.ZodArray<z.ZodEnum<{
9932
+ mon: "mon";
9933
+ tue: "tue";
9934
+ wed: "wed";
9935
+ thu: "thu";
9936
+ fri: "fri";
9937
+ sat: "sat";
9938
+ sun: "sun";
9939
+ }>>;
9940
+ time: z.ZodString;
9941
+ timeZone: z.ZodOptional<z.ZodString>;
9942
+ }, z.core.$strict>>]>>;
9786
9943
  }, z.core.$strict>;
9787
9944
  declare const ConfigIdentitySetOutputSchema: z.ZodObject<{
9788
9945
  action: z.ZodLiteral<"updated">;
@@ -9825,6 +9982,19 @@ declare const ConfigIdentitySetOutputSchema: z.ZodObject<{
9825
9982
  }>>;
9826
9983
  }, z.core.$strict>>;
9827
9984
  }, z.core.$strict>>;
9985
+ anchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
9986
+ days: z.ZodArray<z.ZodEnum<{
9987
+ mon: "mon";
9988
+ tue: "tue";
9989
+ wed: "wed";
9990
+ thu: "thu";
9991
+ fri: "fri";
9992
+ sat: "sat";
9993
+ sun: "sun";
9994
+ }>>;
9995
+ time: z.ZodString;
9996
+ timeZone: z.ZodOptional<z.ZodString>;
9997
+ }, z.core.$strict>>>;
9828
9998
  }, z.core.$strict>;
9829
9999
  }, z.core.$strict>;
9830
10000
  declare const ConfigIdentityRemoveInputSchema: z.ZodObject<{
@@ -10634,8 +10804,8 @@ declare const ConfigRuleAddOutputSchema: z.ZodObject<{
10634
10804
  key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
10635
10805
  }, z.core.$strip>], "kind">]>;
10636
10806
  }, z.core.$strict>]>>>;
10637
- extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
10638
10807
  $schema: z.ZodOptional<z.ZodString>;
10808
+ extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
10639
10809
  categories: z.ZodOptional<z.ZodPipe<z.ZodObject<{
10640
10810
  all: z.ZodOptional<z.ZodBoolean>;
10641
10811
  runtime: z.ZodOptional<z.ZodBoolean>;
@@ -10820,8 +10990,8 @@ declare const ConfigRuleSetOutputSchema: z.ZodObject<{
10820
10990
  key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
10821
10991
  }, z.core.$strip>], "kind">]>;
10822
10992
  }, z.core.$strict>]>>>;
10823
- extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
10824
10993
  $schema: z.ZodOptional<z.ZodString>;
10994
+ extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
10825
10995
  categories: z.ZodOptional<z.ZodPipe<z.ZodObject<{
10826
10996
  all: z.ZodOptional<z.ZodBoolean>;
10827
10997
  runtime: z.ZodOptional<z.ZodBoolean>;
@@ -11173,11 +11343,11 @@ declare const DoctorFindingSchema: z.ZodObject<{
11173
11343
  section: z.ZodEnum<{
11174
11344
  "global-config": "global-config";
11175
11345
  "config-profile": "config-profile";
11176
- keychain: "keychain";
11177
11346
  identity: "identity";
11178
11347
  provider: "provider";
11179
- headroom: "headroom";
11348
+ frontdoor: "frontdoor";
11180
11349
  pool: "pool";
11350
+ keychain: "keychain";
11181
11351
  "ambient-credential": "ambient-credential";
11182
11352
  "binary-discovery": "binary-discovery";
11183
11353
  "claude-shim": "claude-shim";
@@ -11187,6 +11357,7 @@ declare const DoctorFindingSchema: z.ZodObject<{
11187
11357
  "directory-rules": "directory-rules";
11188
11358
  "categories-local": "categories-local";
11189
11359
  "active-identity": "active-identity";
11360
+ headroom: "headroom";
11190
11361
  }>;
11191
11362
  subject: z.ZodOptional<z.ZodString>;
11192
11363
  severity: z.ZodEnum<{
@@ -11203,11 +11374,11 @@ declare const DoctorRunOutputSchema: z.ZodObject<{
11203
11374
  section: z.ZodEnum<{
11204
11375
  "global-config": "global-config";
11205
11376
  "config-profile": "config-profile";
11206
- keychain: "keychain";
11207
11377
  identity: "identity";
11208
11378
  provider: "provider";
11209
- headroom: "headroom";
11379
+ frontdoor: "frontdoor";
11210
11380
  pool: "pool";
11381
+ keychain: "keychain";
11211
11382
  "ambient-credential": "ambient-credential";
11212
11383
  "binary-discovery": "binary-discovery";
11213
11384
  "claude-shim": "claude-shim";
@@ -11217,6 +11388,7 @@ declare const DoctorRunOutputSchema: z.ZodObject<{
11217
11388
  "directory-rules": "directory-rules";
11218
11389
  "categories-local": "categories-local";
11219
11390
  "active-identity": "active-identity";
11391
+ headroom: "headroom";
11220
11392
  }>;
11221
11393
  subject: z.ZodOptional<z.ZodString>;
11222
11394
  severity: z.ZodEnum<{
@@ -11237,9 +11409,9 @@ declare const UpdateCheckOutputSchema: z.ZodObject<{
11237
11409
  current: z.ZodString;
11238
11410
  latest: z.ZodString;
11239
11411
  action: z.ZodEnum<{
11240
- updated: "updated";
11241
11412
  current: "current";
11242
11413
  available: "available";
11414
+ updated: "updated";
11243
11415
  }>;
11244
11416
  }, z.core.$strict>;
11245
11417
  /** 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 +11461,12 @@ declare const LaunchResolveOutputSchema: z.ZodObject<{
11289
11461
  decision: z.ZodObject<{
11290
11462
  identity: z.ZodOptional<z.ZodString>;
11291
11463
  identitySource: z.ZodEnum<{
11292
- env: "env";
11293
- none: "none";
11294
11464
  "config-dir-escape-hatch": "config-dir-escape-hatch";
11295
11465
  argv: "argv";
11466
+ env: "env";
11296
11467
  "directory-pin": "directory-pin";
11297
11468
  "active-identity-file": "active-identity-file";
11469
+ none: "none";
11298
11470
  }>;
11299
11471
  pool: z.ZodOptional<z.ZodObject<{
11300
11472
  name: z.ZodString;
@@ -11397,7 +11569,7 @@ interface LaunchEventPublisher {
11397
11569
  declare function createLaunchEventPublisher(hub: DoorEventHub, now: () => number): LaunchEventPublisher;
11398
11570
 
11399
11571
  /**
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.
11572
+ * 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
11573
  */
11402
11574
  /** Everything the door health publisher needs: the backbone it publishes on and the clock its events are observed at. */
11403
11575
  interface DoorHealthPublisher {
@@ -11413,6 +11585,10 @@ interface DoorHealthPublisher {
11413
11585
  readonly binaryTurnover: () => void;
11414
11586
  /** Publishes the idle shutdown: the door closing itself with an empty session registry. */
11415
11587
  readonly idleShutdown: () => void;
11588
+ /** 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. */
11589
+ readonly superseded: (ownerPid: number) => void;
11590
+ /** Publishes the drained exit: a superseded door closing itself because every session it served has ended. */
11591
+ readonly drained: () => void;
11416
11592
  }
11417
11593
  /** Creates the door health publisher. One per door process, fed by the supervisor. */
11418
11594
  declare function createDoorHealthPublisher(hub: DoorEventHub, now: () => number, pid: number): DoorHealthPublisher;
@@ -11753,7 +11929,7 @@ interface RunFrontDoorSupervisorOptions {
11753
11929
  readonly tickLimit?: number;
11754
11930
  }
11755
11931
  /**
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.
11932
+ * 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
11933
  *
11758
11934
  * 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
11935
  */
@@ -11904,6 +12080,8 @@ interface Candidate {
11904
12080
  readonly headroom?: number;
11905
12081
  /** When an `ineligible` candidate can be used again. */
11906
12082
  readonly blockedUntilMs?: number;
12083
+ /** 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. */
12084
+ readonly planReturnsAtMs?: number;
11907
12085
  readonly plan: PlanClass;
11908
12086
  /** 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
12087
  readonly policyDemoted?: boolean;
@@ -11920,6 +12098,11 @@ interface PoolRanking {
11920
12098
  readonly identity: string;
11921
12099
  readonly atMs: number;
11922
12100
  };
12101
+ /** 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. */
12102
+ readonly planReturn?: {
12103
+ readonly identity: string;
12104
+ readonly atMs: number;
12105
+ };
11923
12106
  /** 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
12107
  readonly movedOff?: {
11925
12108
  readonly identity: string;