agent-shim 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.
- package/dist/cli.cjs +195 -23
- package/dist/index.cjs +176 -20
- package/dist/index.mjs +176 -20
- package/dist/types/index.d.ts +85 -34
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -1332,8 +1332,8 @@ declare const HeadroomGlobalConfigSchema: z.ZodObject<{
|
|
|
1332
1332
|
targetRatio: z.ZodOptional<z.ZodNumber>;
|
|
1333
1333
|
ccr: z.ZodOptional<z.ZodEnum<{
|
|
1334
1334
|
default: "default";
|
|
1335
|
-
none: "none";
|
|
1336
1335
|
lossless: "lossless";
|
|
1336
|
+
none: "none";
|
|
1337
1337
|
}>>;
|
|
1338
1338
|
rolloutChannel: z.ZodOptional<z.ZodEnum<{
|
|
1339
1339
|
beta: "beta";
|
|
@@ -1460,8 +1460,8 @@ declare const GlobalConfigSchema: z.ZodObject<{
|
|
|
1460
1460
|
targetRatio: z.ZodOptional<z.ZodNumber>;
|
|
1461
1461
|
ccr: z.ZodOptional<z.ZodEnum<{
|
|
1462
1462
|
default: "default";
|
|
1463
|
-
none: "none";
|
|
1464
1463
|
lossless: "lossless";
|
|
1464
|
+
none: "none";
|
|
1465
1465
|
}>>;
|
|
1466
1466
|
rolloutChannel: z.ZodOptional<z.ZodEnum<{
|
|
1467
1467
|
beta: "beta";
|
|
@@ -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";
|
|
3862
3864
|
"config-dir-escape-hatch": "config-dir-escape-hatch";
|
|
3863
3865
|
argv: "argv";
|
|
3864
|
-
env: "env";
|
|
3865
3866
|
"directory-pin": "directory-pin";
|
|
3866
3867
|
"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";
|
|
3946
3945
|
runtime: "runtime";
|
|
3947
3946
|
history: "history";
|
|
3948
3947
|
knowledge: "knowledge";
|
|
3949
3948
|
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
|
-
/**
|
|
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 {
|
|
@@ -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<{
|
|
6479
|
+
updated: "updated";
|
|
6443
6480
|
current: "current";
|
|
6444
6481
|
available: "available";
|
|
6445
|
-
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<{
|
|
6728
|
+
env: "env";
|
|
6729
|
+
none: "none";
|
|
6692
6730
|
"config-dir-escape-hatch": "config-dir-escape-hatch";
|
|
6693
6731
|
argv: "argv";
|
|
6694
|
-
env: "env";
|
|
6695
6732
|
"directory-pin": "directory-pin";
|
|
6696
6733
|
"active-identity-file": "active-identity-file";
|
|
6697
|
-
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<{
|
|
7119
|
+
env: "env";
|
|
7120
|
+
none: "none";
|
|
7083
7121
|
"config-dir-escape-hatch": "config-dir-escape-hatch";
|
|
7084
7122
|
argv: "argv";
|
|
7085
|
-
env: "env";
|
|
7086
7123
|
"directory-pin": "directory-pin";
|
|
7087
7124
|
"active-identity-file": "active-identity-file";
|
|
7088
|
-
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<{
|
|
7166
|
-
secret: "secret";
|
|
7167
7202
|
runtime: "runtime";
|
|
7168
7203
|
history: "history";
|
|
7169
7204
|
knowledge: "knowledge";
|
|
7170
7205
|
settings: "settings";
|
|
7206
|
+
secret: "secret";
|
|
7171
7207
|
}>>;
|
|
7172
7208
|
rule: zod.ZodOptional<zod.ZodObject<{
|
|
7173
7209
|
key: zod.ZodString;
|
|
@@ -7386,9 +7422,11 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
7386
7422
|
"global-config": "global-config";
|
|
7387
7423
|
"config-profile": "config-profile";
|
|
7388
7424
|
identity: "identity";
|
|
7425
|
+
keychain: "keychain";
|
|
7389
7426
|
provider: "provider";
|
|
7427
|
+
headroom: "headroom";
|
|
7428
|
+
frontdoor: "frontdoor";
|
|
7390
7429
|
pool: "pool";
|
|
7391
|
-
keychain: "keychain";
|
|
7392
7430
|
"ambient-credential": "ambient-credential";
|
|
7393
7431
|
"binary-discovery": "binary-discovery";
|
|
7394
7432
|
"claude-shim": "claude-shim";
|
|
@@ -7398,7 +7436,6 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
7398
7436
|
"directory-rules": "directory-rules";
|
|
7399
7437
|
"categories-local": "categories-local";
|
|
7400
7438
|
"active-identity": "active-identity";
|
|
7401
|
-
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<{
|
|
7559
|
+
env: "env";
|
|
7560
|
+
none: "none";
|
|
7522
7561
|
"config-dir-escape-hatch": "config-dir-escape-hatch";
|
|
7523
7562
|
argv: "argv";
|
|
7524
|
-
env: "env";
|
|
7525
7563
|
"directory-pin": "directory-pin";
|
|
7526
7564
|
"active-identity-file": "active-identity-file";
|
|
7527
|
-
none: "none";
|
|
7528
7565
|
}>;
|
|
7529
7566
|
pool: zod.ZodOptional<zod.ZodObject<{
|
|
7530
7567
|
name: zod.ZodString;
|
|
@@ -8861,9 +8898,9 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
8861
8898
|
current: zod.ZodString;
|
|
8862
8899
|
latest: zod.ZodString;
|
|
8863
8900
|
action: zod.ZodEnum<{
|
|
8901
|
+
updated: "updated";
|
|
8864
8902
|
current: "current";
|
|
8865
8903
|
available: "available";
|
|
8866
|
-
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<{
|
|
9102
|
+
env: "env";
|
|
9103
|
+
none: "none";
|
|
9065
9104
|
"config-dir-escape-hatch": "config-dir-escape-hatch";
|
|
9066
9105
|
argv: "argv";
|
|
9067
|
-
env: "env";
|
|
9068
9106
|
"directory-pin": "directory-pin";
|
|
9069
9107
|
"active-identity-file": "active-identity-file";
|
|
9070
|
-
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<{
|
|
9148
|
-
secret: "secret";
|
|
9149
9185
|
runtime: "runtime";
|
|
9150
9186
|
history: "history";
|
|
9151
9187
|
knowledge: "knowledge";
|
|
9152
9188
|
settings: "settings";
|
|
9189
|
+
secret: "secret";
|
|
9153
9190
|
}>>;
|
|
9154
9191
|
rule: zod.ZodOptional<zod.ZodObject<{
|
|
9155
9192
|
key: zod.ZodString;
|
|
@@ -9368,9 +9405,11 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9368
9405
|
"global-config": "global-config";
|
|
9369
9406
|
"config-profile": "config-profile";
|
|
9370
9407
|
identity: "identity";
|
|
9408
|
+
keychain: "keychain";
|
|
9371
9409
|
provider: "provider";
|
|
9410
|
+
headroom: "headroom";
|
|
9411
|
+
frontdoor: "frontdoor";
|
|
9372
9412
|
pool: "pool";
|
|
9373
|
-
keychain: "keychain";
|
|
9374
9413
|
"ambient-credential": "ambient-credential";
|
|
9375
9414
|
"binary-discovery": "binary-discovery";
|
|
9376
9415
|
"claude-shim": "claude-shim";
|
|
@@ -9380,7 +9419,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9380
9419
|
"directory-rules": "directory-rules";
|
|
9381
9420
|
"categories-local": "categories-local";
|
|
9382
9421
|
"active-identity": "active-identity";
|
|
9383
|
-
headroom: "headroom";
|
|
9384
9422
|
}>;
|
|
9385
9423
|
subject: zod.ZodOptional<zod.ZodString>;
|
|
9386
9424
|
severity: zod.ZodEnum<{
|
|
@@ -11174,9 +11212,11 @@ declare const DoctorFindingSchema: z.ZodObject<{
|
|
|
11174
11212
|
"global-config": "global-config";
|
|
11175
11213
|
"config-profile": "config-profile";
|
|
11176
11214
|
identity: "identity";
|
|
11215
|
+
keychain: "keychain";
|
|
11177
11216
|
provider: "provider";
|
|
11217
|
+
headroom: "headroom";
|
|
11218
|
+
frontdoor: "frontdoor";
|
|
11178
11219
|
pool: "pool";
|
|
11179
|
-
keychain: "keychain";
|
|
11180
11220
|
"ambient-credential": "ambient-credential";
|
|
11181
11221
|
"binary-discovery": "binary-discovery";
|
|
11182
11222
|
"claude-shim": "claude-shim";
|
|
@@ -11186,7 +11226,6 @@ declare const DoctorFindingSchema: z.ZodObject<{
|
|
|
11186
11226
|
"directory-rules": "directory-rules";
|
|
11187
11227
|
"categories-local": "categories-local";
|
|
11188
11228
|
"active-identity": "active-identity";
|
|
11189
|
-
headroom: "headroom";
|
|
11190
11229
|
}>;
|
|
11191
11230
|
subject: z.ZodOptional<z.ZodString>;
|
|
11192
11231
|
severity: z.ZodEnum<{
|
|
@@ -11204,9 +11243,11 @@ declare const DoctorRunOutputSchema: z.ZodObject<{
|
|
|
11204
11243
|
"global-config": "global-config";
|
|
11205
11244
|
"config-profile": "config-profile";
|
|
11206
11245
|
identity: "identity";
|
|
11246
|
+
keychain: "keychain";
|
|
11207
11247
|
provider: "provider";
|
|
11248
|
+
headroom: "headroom";
|
|
11249
|
+
frontdoor: "frontdoor";
|
|
11208
11250
|
pool: "pool";
|
|
11209
|
-
keychain: "keychain";
|
|
11210
11251
|
"ambient-credential": "ambient-credential";
|
|
11211
11252
|
"binary-discovery": "binary-discovery";
|
|
11212
11253
|
"claude-shim": "claude-shim";
|
|
@@ -11216,7 +11257,6 @@ declare const DoctorRunOutputSchema: z.ZodObject<{
|
|
|
11216
11257
|
"directory-rules": "directory-rules";
|
|
11217
11258
|
"categories-local": "categories-local";
|
|
11218
11259
|
"active-identity": "active-identity";
|
|
11219
|
-
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<{
|
|
11280
|
+
updated: "updated";
|
|
11240
11281
|
current: "current";
|
|
11241
11282
|
available: "available";
|
|
11242
|
-
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<{
|
|
11332
|
+
env: "env";
|
|
11333
|
+
none: "none";
|
|
11292
11334
|
"config-dir-escape-hatch": "config-dir-escape-hatch";
|
|
11293
11335
|
argv: "argv";
|
|
11294
|
-
env: "env";
|
|
11295
11336
|
"directory-pin": "directory-pin";
|
|
11296
11337
|
"active-identity-file": "active-identity-file";
|
|
11297
|
-
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
|
|
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": "agent-shim",
|
|
3
|
-
"version": "9.
|
|
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>",
|