agent-shim 9.1.0 → 9.2.1
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 +391 -327
- package/dist/index.cjs +107 -43
- package/dist/index.mjs +107 -43
- package/dist/types/index.d.ts +19 -3
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -4686,6 +4686,9 @@ declare const UsageSnapshotSchema: z.ZodObject<{
|
|
|
4686
4686
|
representativeClaim: z.ZodOptional<z.ZodString>;
|
|
4687
4687
|
resetAt: z.ZodOptional<z.ZodISODateTime>;
|
|
4688
4688
|
overageStatus: z.ZodOptional<z.ZodString>;
|
|
4689
|
+
overageUtilization: z.ZodOptional<z.ZodNumber>;
|
|
4690
|
+
overageResetsAt: z.ZodOptional<z.ZodISODateTime>;
|
|
4691
|
+
overageDisabledReason: z.ZodOptional<z.ZodString>;
|
|
4689
4692
|
}, z.core.$strict>>;
|
|
4690
4693
|
}, z.core.$strict>>;
|
|
4691
4694
|
lastLimit: z.ZodOptional<z.ZodObject<{
|
|
@@ -5017,6 +5020,9 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
5017
5020
|
representativeClaim: zod.ZodOptional<zod.ZodString>;
|
|
5018
5021
|
resetAt: zod.ZodOptional<zod.ZodISODateTime>;
|
|
5019
5022
|
overageStatus: zod.ZodOptional<zod.ZodString>;
|
|
5023
|
+
overageUtilization: zod.ZodOptional<zod.ZodNumber>;
|
|
5024
|
+
overageResetsAt: zod.ZodOptional<zod.ZodISODateTime>;
|
|
5025
|
+
overageDisabledReason: zod.ZodOptional<zod.ZodString>;
|
|
5020
5026
|
}, zod_v4_core.$strict>>;
|
|
5021
5027
|
}, zod_v4_core.$strict>>;
|
|
5022
5028
|
lastLimit: zod.ZodOptional<zod.ZodObject<{
|
|
@@ -5598,6 +5604,9 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
5598
5604
|
representativeClaim: zod.ZodOptional<zod.ZodString>;
|
|
5599
5605
|
resetAt: zod.ZodOptional<zod.ZodISODateTime>;
|
|
5600
5606
|
overageStatus: zod.ZodOptional<zod.ZodString>;
|
|
5607
|
+
overageUtilization: zod.ZodOptional<zod.ZodNumber>;
|
|
5608
|
+
overageResetsAt: zod.ZodOptional<zod.ZodISODateTime>;
|
|
5609
|
+
overageDisabledReason: zod.ZodOptional<zod.ZodString>;
|
|
5601
5610
|
}, zod_v4_core.$strict>>;
|
|
5602
5611
|
}, zod_v4_core.$strict>>;
|
|
5603
5612
|
lastLimit: zod.ZodOptional<zod.ZodObject<{
|
|
@@ -6394,6 +6403,9 @@ declare const UsageListOutputSchema: z.ZodObject<{
|
|
|
6394
6403
|
representativeClaim: z.ZodOptional<z.ZodString>;
|
|
6395
6404
|
resetAt: z.ZodOptional<z.ZodISODateTime>;
|
|
6396
6405
|
overageStatus: z.ZodOptional<z.ZodString>;
|
|
6406
|
+
overageUtilization: z.ZodOptional<z.ZodNumber>;
|
|
6407
|
+
overageResetsAt: z.ZodOptional<z.ZodISODateTime>;
|
|
6408
|
+
overageDisabledReason: z.ZodOptional<z.ZodString>;
|
|
6397
6409
|
}, z.core.$strict>>;
|
|
6398
6410
|
}, z.core.$strict>>;
|
|
6399
6411
|
lastLimit: z.ZodOptional<z.ZodObject<{
|
|
@@ -7042,7 +7054,7 @@ declare const PlanClassSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
7042
7054
|
}, z.core.$strict>]>;
|
|
7043
7055
|
type PlanClass = z.infer<typeof PlanClassSchema>;
|
|
7044
7056
|
/**
|
|
7045
|
-
* Classifies an account from the rate-limit tier of its stored login (`organizationRateLimitTier`, which decides the organisation's limits, then `userRateLimitTier`). The tier strings are free text on Anthropic's side, so only the shapes seen are read: a trailing `<n>x` is that multiple, a bare `pro` is 1, a `zero` tier is pay-per-use. Anything else is a subscription of unrecognised size, counted as 1 and marked so the ranking can say it guessed.
|
|
7057
|
+
* Classifies an account from the rate-limit tier of its stored login (`organizationRateLimitTier`, which decides the organisation's limits, then `userRateLimitTier`), except that a `zero` user tier decides alone: a seat whose own allowance is zero draws on no plan whatever its organisation's tier says (a usage-based Enterprise seat sits in an organisation tier that reads as a subscription). The tier strings are free text on Anthropic's side, so only the shapes seen are read: a trailing `<n>x` is that multiple, a bare `pro` is 1, a `zero` tier is pay-per-use. Anything else is a subscription of unrecognised size, counted as 1 and marked so the ranking can say it guessed.
|
|
7046
7058
|
*/
|
|
7047
7059
|
declare function planOf(account: AccountMetadata | undefined): PlanClass;
|
|
7048
7060
|
|
|
@@ -7101,6 +7113,8 @@ interface Candidate {
|
|
|
7101
7113
|
readonly score?: number;
|
|
7102
7114
|
/** False when a quota window would run dry, at the observed pace, before it resets (the five-hour at its own or the rescaled shared pace, the seven-day at its own). A `scored` candidate that is not feasible ranks below every feasible one. */
|
|
7103
7115
|
readonly feasible: boolean;
|
|
7116
|
+
/** The fraction of the extra-usage allowance still unspent, for a `pay-per-use` member whose only budget is that allowance (an Enterprise account). A member reporting none ranks as having all of it: no cap is known to bind. */
|
|
7117
|
+
readonly headroom?: number;
|
|
7104
7118
|
/** When an `ineligible` candidate can be used again. */
|
|
7105
7119
|
readonly blockedUntilMs?: number;
|
|
7106
7120
|
readonly plan: PlanClass;
|
|
@@ -7181,11 +7195,12 @@ interface ConditionContext {
|
|
|
7181
7195
|
readonly branchDetached?: boolean;
|
|
7182
7196
|
readonly env: Readonly<Record<string, string | undefined>>;
|
|
7183
7197
|
/**
|
|
7184
|
-
* The pool-selection facts a member entry's policy condition reads. Present only when the condition guards a pool member, so the same reference namespace serves the cascade and the pool: `quota.fiveHour.remaining`, `quota.fiveHour.utilization`, `quota.fiveHour.hoursUntilReset`, the same three under `quota.sevenDay`, `quota.burnPerHour` (the five-hour window's observed utilisation pace, in fractions per hour), `session.resuming` (this launch resumes or continues a conversation) and `session.lastPickHoursAgo` (how long ago this directory last picked this member). Conversation context is deliberately not provided: nothing the door holds knows it, so a condition referencing it is indeterminate, naming the missing fact, rather than guessed.
|
|
7198
|
+
* The pool-selection facts a member entry's policy condition reads. Present only when the condition guards a pool member, so the same reference namespace serves the cascade and the pool: `quota.fiveHour.remaining`, `quota.fiveHour.utilization`, `quota.fiveHour.hoursUntilReset`, the same three under `quota.sevenDay`, and under `quota.extraUsage` for an account metered by extra usage alone (an Enterprise one with no plan windows), `quota.burnPerHour` (the five-hour window's observed utilisation pace, in fractions per hour), `session.resuming` (this launch resumes or continues a conversation) and `session.lastPickHoursAgo` (how long ago this directory last picked this member). Conversation context is deliberately not provided: nothing the door holds knows it, so a condition referencing it is indeterminate, naming the missing fact, rather than guessed.
|
|
7185
7199
|
*/
|
|
7186
7200
|
readonly pool?: {
|
|
7187
7201
|
readonly fiveHour?: PoolWindowFacts;
|
|
7188
7202
|
readonly sevenDay?: PoolWindowFacts;
|
|
7203
|
+
readonly extraUsage?: PoolWindowFacts;
|
|
7189
7204
|
readonly burnPerHour?: number;
|
|
7190
7205
|
readonly resuming?: boolean;
|
|
7191
7206
|
readonly lastPickHoursAgo?: number;
|
|
@@ -7201,10 +7216,11 @@ interface ConditionContext {
|
|
|
7201
7216
|
readonly maxTokens?: number;
|
|
7202
7217
|
readonly isCountTokens?: boolean;
|
|
7203
7218
|
};
|
|
7204
|
-
/** Per-provider quota facts for request routing, keyed by provider name, from the session identity's usage snapshot: a route condition names a target's windows (`provider.<name>.fiveHour.utilization` and kin) to skip one that is exhausted or nearly spent. The windows are the same shape the pool facts read. */
|
|
7219
|
+
/** Per-provider quota facts for request routing, keyed by provider name, from the session identity's usage snapshot: a route condition names a target's windows (`provider.<name>.fiveHour.utilization` and kin, and `provider.<name>.extraUsage.*` for an account metered by extra usage alone) to skip one that is exhausted or nearly spent. The windows are the same shape the pool facts read. */
|
|
7205
7220
|
readonly providerQuota?: Readonly<Record<string, {
|
|
7206
7221
|
readonly fiveHour?: PoolWindowFacts;
|
|
7207
7222
|
readonly sevenDay?: PoolWindowFacts;
|
|
7223
|
+
readonly extraUsage?: PoolWindowFacts;
|
|
7208
7224
|
}>>;
|
|
7209
7225
|
}
|
|
7210
7226
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-shim",
|
|
3
|
-
"version": "9.1
|
|
3
|
+
"version": "9.2.1",
|
|
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>",
|