agent-shim 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.
- package/README.md +1 -0
- package/dist/cli.cjs +1073 -586
- package/dist/index.cjs +284 -82
- package/dist/index.mjs +284 -82
- package/dist/types/index.d.ts +189 -6
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -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.
|
|
@@ -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
|
-
/**
|
|
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<{
|
|
@@ -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>;
|
|
@@ -7387,6 +7477,7 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
7387
7477
|
"config-profile": "config-profile";
|
|
7388
7478
|
identity: "identity";
|
|
7389
7479
|
provider: "provider";
|
|
7480
|
+
frontdoor: "frontdoor";
|
|
7390
7481
|
pool: "pool";
|
|
7391
7482
|
keychain: "keychain";
|
|
7392
7483
|
"ambient-credential": "ambient-credential";
|
|
@@ -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<{
|
|
@@ -9369,6 +9499,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9369
9499
|
"config-profile": "config-profile";
|
|
9370
9500
|
identity: "identity";
|
|
9371
9501
|
provider: "provider";
|
|
9502
|
+
frontdoor: "frontdoor";
|
|
9372
9503
|
pool: "pool";
|
|
9373
9504
|
keychain: "keychain";
|
|
9374
9505
|
"ambient-credential": "ambient-credential";
|
|
@@ -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<{
|
|
@@ -11175,6 +11345,7 @@ declare const DoctorFindingSchema: z.ZodObject<{
|
|
|
11175
11345
|
"config-profile": "config-profile";
|
|
11176
11346
|
identity: "identity";
|
|
11177
11347
|
provider: "provider";
|
|
11348
|
+
frontdoor: "frontdoor";
|
|
11178
11349
|
pool: "pool";
|
|
11179
11350
|
keychain: "keychain";
|
|
11180
11351
|
"ambient-credential": "ambient-credential";
|
|
@@ -11205,6 +11376,7 @@ declare const DoctorRunOutputSchema: z.ZodObject<{
|
|
|
11205
11376
|
"config-profile": "config-profile";
|
|
11206
11377
|
identity: "identity";
|
|
11207
11378
|
provider: "provider";
|
|
11379
|
+
frontdoor: "frontdoor";
|
|
11208
11380
|
pool: "pool";
|
|
11209
11381
|
keychain: "keychain";
|
|
11210
11382
|
"ambient-credential": "ambient-credential";
|
|
@@ -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
|
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-shim",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.14.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>",
|