@intentic/sandbox-contract 1.403.1 → 1.405.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/contracts/agent.contract.d.ts +8 -0
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.d.ts +40 -0
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.d.ts +246 -246
- package/dist/contracts/seal.contract.d.ts +10 -0
- package/dist/contracts/seal.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.d.ts +30 -18
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/translator.contract.d.ts +16 -0
- package/dist/contracts/translator.contract.d.ts.map +1 -1
- package/dist/events/system-events.d.ts +8 -0
- package/dist/events/system-events.d.ts.map +1 -1
- package/dist/models/plan-pools.d.ts +5 -34
- package/dist/models/plan-pools.d.ts.map +1 -1
- package/dist/models/plan-pools.js +4 -95
- package/dist/models/plan-pools.js.map +1 -1
- package/dist/models/verdict/pool-gates.d.ts +17 -0
- package/dist/models/verdict/pool-gates.d.ts.map +1 -0
- package/dist/models/verdict/pool-gates.js +41 -0
- package/dist/models/verdict/pool-gates.js.map +1 -0
- package/dist/models/verdict/refusal-verdict.d.ts +21 -0
- package/dist/models/verdict/refusal-verdict.d.ts.map +1 -0
- package/dist/models/verdict/refusal-verdict.js +68 -0
- package/dist/models/verdict/refusal-verdict.js.map +1 -0
- package/dist/protocol/raw/raw-json-routes.d.ts +196 -0
- package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-json-routes.js +5 -0
- package/dist/protocol/raw/raw-json-routes.js.map +1 -1
- package/dist/protocol/raw/raw-routes.d.ts +31 -0
- package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-routes.js +7 -0
- package/dist/protocol/raw/raw-routes.js.map +1 -1
- package/dist/schemas/agent-next.d.ts +1 -0
- package/dist/schemas/agent-next.d.ts.map +1 -1
- package/dist/schemas/agent-next.js +4 -0
- package/dist/schemas/agent-next.js.map +1 -1
- package/dist/schemas/agent.d.ts +126 -0
- package/dist/schemas/agent.d.ts.map +1 -1
- package/dist/schemas/agent.js +15 -4
- package/dist/schemas/agent.js.map +1 -1
- package/dist/schemas/agents-list.d.ts +4 -0
- package/dist/schemas/agents-list.d.ts.map +1 -1
- package/dist/schemas/agents.d.ts +6 -0
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/diagnostics.d.ts +248 -0
- package/dist/schemas/diagnostics.d.ts.map +1 -0
- package/dist/schemas/diagnostics.js +114 -0
- package/dist/schemas/diagnostics.js.map +1 -0
- package/dist/schemas/links.d.ts +6 -0
- package/dist/schemas/links.d.ts.map +1 -1
- package/dist/schemas/links.js +6 -0
- package/dist/schemas/links.js.map +1 -1
- package/dist/schemas/providers/plan-limits.d.ts +22 -1
- package/dist/schemas/providers/plan-limits.d.ts.map +1 -1
- package/dist/schemas/providers/plan-limits.js +10 -1
- package/dist/schemas/providers/plan-limits.js.map +1 -1
- package/dist/schemas/providers/refusals.d.ts +5 -0
- package/dist/schemas/providers/refusals.d.ts.map +1 -1
- package/dist/schemas/providers/refusals.js +4 -0
- package/dist/schemas/providers/refusals.js.map +1 -1
- package/package.json +5 -5
- package/src/models/plan-pools.test.ts +96 -5
- package/src/models/plan-pools.ts +22 -212
- package/src/models/verdict/pool-gates.ts +94 -0
- package/src/models/verdict/refusal-verdict.ts +148 -0
- package/src/protocol/raw/raw-json-routes.ts +7 -0
- package/src/protocol/raw/raw-routes.ts +17 -0
- package/src/schemas/agent-next.ts +6 -0
- package/src/schemas/agent.ts +50 -29
- package/src/schemas/diagnostics.ts +166 -0
- package/src/schemas/links.ts +9 -0
- package/src/schemas/providers/plan-limits.ts +16 -1
- package/src/schemas/providers/refusals.ts +12 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-limits.js","sourceRoot":"","sources":["../../../src/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;AAIP,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IACzE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,2FAA2F,CAAC;IAChI,KAAK,EAAE,CAAC;SACH,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CACL,4NAA4N,CAC/N;IACL,OAAO,EAAE,iBAAiB,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC1C,+MAA+M,CAClN;IACD,GAAG,EAAE,CAAC;SACD,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CACL,qMAAqM,CACxM;CACR,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,GAAG,EAAE,CAAC;SACD,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,uHAAuH,CAAC;CACzI,CAAC,CAAC"}
|
|
@@ -15,6 +15,11 @@ export declare const ProviderRefusalSchema: z.ZodObject<{
|
|
|
15
15
|
byHand: z.ZodOptional<z.ZodLiteral<true>>;
|
|
16
16
|
}, z.core.$strip>;
|
|
17
17
|
export type ProviderRefusal = z.infer<typeof ProviderRefusalSchema>;
|
|
18
|
+
export declare const ModelCooldownSchema: z.ZodObject<{
|
|
19
|
+
model: z.ZodString;
|
|
20
|
+
until: z.ZodNumber;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export type ModelCooldown = z.infer<typeof ModelCooldownSchema>;
|
|
18
23
|
export declare const ProviderRefusalsSchema: z.ZodObject<{
|
|
19
24
|
refusals: z.ZodRecord<z.ZodString, z.ZodCodec<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
20
25
|
at: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refusals.d.ts","sourceRoot":"","sources":["../../../src/schemas/providers/refusals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"refusals.d.ts","sourceRoot":"","sources":["../../../src/schemas/providers/refusals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;iBAwChC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAGpE,eAAO,MAAM,mBAAmB;;;iBAG9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAOhE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -21,6 +21,10 @@ export const ProviderRefusalSchema = z.object({
|
|
|
21
21
|
.optional()
|
|
22
22
|
.describe("Set by a person rather than by a refused turn, for a plan nothing can read: believed for a day, or until unmarked or a turn on it is answered."),
|
|
23
23
|
});
|
|
24
|
+
export const ModelCooldownSchema = z.object({
|
|
25
|
+
model: z.string().describe("The model the provider refused this account on, as the translator names it."),
|
|
26
|
+
until: z.number().describe("When the provider said to try again, in epoch seconds."),
|
|
27
|
+
});
|
|
24
28
|
const RefusalsOnFileSchema = z.codec(z.union([z.array(ProviderRefusalSchema), ProviderRefusalSchema]), z.array(ProviderRefusalSchema), {
|
|
25
29
|
decode: (filed) => (Array.isArray(filed) ? filed : [filed]),
|
|
26
30
|
encode: (list) => list,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refusals.js","sourceRoot":"","sources":["../../../src/schemas/providers/refusals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"refusals.js","sourceRoot":"","sources":["../../../src/schemas/providers/refusals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAE1C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAE5D,IAAI,EAAE,CAAC;SACF,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;SACtC,QAAQ,CACL,mWAAmW,CACtW;IACL,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8FAA8F,CAAC;IAG5H,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iDAAiD,CAAC;IAG1F,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2DAA2D,CAAC;IAGlG,QAAQ,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACL,+KAA+K,CAClL;IAEL,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6FAA6F,CAAC;IAG3I,SAAS,EAAE,CAAC;SACP,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,EAAE;SACV,QAAQ,CACL,oMAAoM,CACvM;IACL,MAAM,EAAE,CAAC;SACJ,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,EAAE;SACV,QAAQ,CACL,gJAAgJ,CACnJ;CACR,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6EAA6E,CAAC;IACzG,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;CACvF,CAAC,CAAC;AAIH,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAAE,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAAE;IACnI,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC3D,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI;CACzB,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,QAAQ,EAAE,CAAC;SACN,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,oBAAoB,CAAC;SACxC,QAAQ,CACL,ySAAyS,CAC5S;CACR,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/sandbox-contract",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.405.0",
|
|
4
4
|
"description": "oRPC wire contract for the intentic sandbox daemon, shared by the daemon and its browser client",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -373,10 +373,10 @@
|
|
|
373
373
|
}
|
|
374
374
|
},
|
|
375
375
|
"dependencies": {
|
|
376
|
-
"@intentic/base": "1.
|
|
377
|
-
"@intentic/constants": "1.
|
|
378
|
-
"@intentic/extension-manifest": "1.
|
|
379
|
-
"@intentic/registry": "1.
|
|
376
|
+
"@intentic/base": "1.405.0",
|
|
377
|
+
"@intentic/constants": "1.405.0",
|
|
378
|
+
"@intentic/extension-manifest": "1.405.0",
|
|
379
|
+
"@intentic/registry": "1.405.0",
|
|
380
380
|
"@orpc/contract": "1.16.1",
|
|
381
381
|
"zod": "4.6.7"
|
|
382
382
|
},
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
windowPeriod,
|
|
20
20
|
} from "./plan-pools.js";
|
|
21
21
|
import type { AccountState, AccountUsage, ProviderRefusal, UsageWindow } from "../schemas/providers/plan-limits.js";
|
|
22
|
+
import type { ServiceFacts } from "./plan-pools.js";
|
|
22
23
|
|
|
23
24
|
// One rule for which pool blocks a given model, shared by the daemon and the browser: a plan can meter models
|
|
24
25
|
// separately, so the account's fullest pool need not be the model's own.
|
|
@@ -254,8 +255,14 @@ test("a refusal stands until a later reading contradicts it, and never past its
|
|
|
254
255
|
expect(refusalVerdict(refusal({ kind: "limit", account: "a" }), [{ account: "a", usage: before }])).toBe("standing");
|
|
255
256
|
// Another account's room proves nothing about the one refused.
|
|
256
257
|
expect(refusalVerdict(refusal({ kind: "limit", account: "a" }), [{ account: "a", usage: before }, { account: "b", usage: room }])).toBe("standing");
|
|
257
|
-
// A refusal naming no account is answered by
|
|
258
|
-
|
|
258
|
+
// A refusal naming no account is answered on each account by that account's own reading: b's room frees b, not a.
|
|
259
|
+
const nameless = refusal({ kind: "limit" });
|
|
260
|
+
expect(refusalVerdict(nameless, [{ account: "a", usage: before }, { account: "b", usage: room }])).toBe("standing");
|
|
261
|
+
expect(Object.fromEntries(serviceStates([{ account: "a", usage: before }, { account: "b", usage: room }], [nameless]))).toEqual({
|
|
262
|
+
a: { kind: "spent" },
|
|
263
|
+
b: { kind: "ready", room: 60 },
|
|
264
|
+
});
|
|
265
|
+
expect(refusalVerdict(nameless, [{ account: "a", usage: room }, { account: "b", usage: room }])).toBe("answered");
|
|
259
266
|
expect(refusalVerdict(refusal({ kind: "auth", account: "a" }), [{ account: "a", usage: full }])).toBe("answered");
|
|
260
267
|
expect(refusalVerdict(refusal({ kind: "auth", account: "a" }), [{ account: "a", usage: full, needsReauth: true }])).toBe("standing");
|
|
261
268
|
expect(refusalVerdict(refusal({ kind: "entitlement", account: "a" }), [{ account: "a", usage: room }])).toBe("standing");
|
|
@@ -275,7 +282,7 @@ test("an allowance no reading measures stands against its own account's reading,
|
|
|
275
282
|
|
|
276
283
|
// 2026-10-19: one routed refusal ("try again at 1:53 PM", filed a day out, as an admin's credit) named no account and
|
|
277
284
|
// held all three Codex accounts spent for that day, two free ones reading 0% of their month used among them.
|
|
278
|
-
test("a nameless refusal over several accounts is answered by
|
|
285
|
+
test("a nameless refusal over several accounts is answered on each by its own reading of room since, whatever it named", () => {
|
|
279
286
|
const filed = Date.parse("2026-10-19T13:53:35Z");
|
|
280
287
|
const now = Date.parse("2026-10-20T09:22:10Z");
|
|
281
288
|
const monthly = at(Date.parse("2026-10-20T09:22:03Z"), window({ kind: "monthly", label: "Monthly · all models", utilization: 0 }));
|
|
@@ -292,9 +299,15 @@ test("a nameless refusal over several accounts is answered by any of them readin
|
|
|
292
299
|
"free-2": { kind: "ready", room: 100 },
|
|
293
300
|
team: { kind: "ready", room: 100 },
|
|
294
301
|
});
|
|
295
|
-
// Until
|
|
302
|
+
// Until each is read with room after it, it stands over that one: the team account read first frees only itself.
|
|
296
303
|
const before = accounts.map((entry) => ({ ...entry, usage: { ...entry.usage, measuredAt: filed - 1 } }));
|
|
297
304
|
expect(refusalVerdict(codex, before, now)).toBe("standing");
|
|
305
|
+
const teamRead = before.map((entry) => (entry.account === "team" ? accounts[2]! : entry));
|
|
306
|
+
expect(Object.fromEntries(serviceStates(teamRead, [codex], undefined, now))).toEqual({
|
|
307
|
+
"free-1": { kind: "spent", reopensAt: Date.parse("2026-10-20T13:53:00Z") / 1000 },
|
|
308
|
+
"free-2": { kind: "spent", reopensAt: Date.parse("2026-10-20T13:53:00Z") / 1000 },
|
|
309
|
+
team: { kind: "ready", room: 100 },
|
|
310
|
+
});
|
|
298
311
|
// And never past the instant the provider named.
|
|
299
312
|
expect(refusalVerdict(codex, before, Date.parse("2026-10-20T13:53:00Z"))).toBe("answered");
|
|
300
313
|
});
|
|
@@ -309,8 +322,10 @@ test("a spent allowance with the provider's own reset stands until that instant,
|
|
|
309
322
|
expect(refusalVerdict(refusal({ ...until, account: "a" }), [{ account: "a", usage: room }], 10_000)).toBe("answered");
|
|
310
323
|
// A routed refusal names no account, but with one account there is no doubt whose it was.
|
|
311
324
|
expect(refusalVerdict(refusal(until), [{ account: "a", usage: room }], 9_999)).toBe("standing");
|
|
312
|
-
// Over several,
|
|
325
|
+
// Over several, nothing says which one refused, so on each it is that account's own reading of room since that answers it.
|
|
313
326
|
expect(refusalVerdict(refusal(until), [{ account: "a", usage: room }, { account: "b", usage: room }], 9_999)).toBe("answered");
|
|
327
|
+
const stale = at(500, window({ kind: "five_hour", utilization: 0 }));
|
|
328
|
+
expect(refusalVerdict(refusal(until), [{ account: "a", usage: room }, { account: "b", usage: stale }], 9_999)).toBe("standing");
|
|
314
329
|
// Spent until the instant the provider named, not the pool's own reset.
|
|
315
330
|
expect(serviceStates([{ account: "a", usage: room }], [refusal({ ...until, account: "a" })], undefined, 9_999).get("a")).toEqual({ kind: "spent", reopensAt: 10 });
|
|
316
331
|
});
|
|
@@ -426,6 +441,82 @@ test("each account answers to the newest refusal on file that still stands over
|
|
|
426
441
|
expect(serviceStates(accounts, [own, revoked], undefined, 9_999).get("a")).toEqual({ kind: "blocked", fix: "reconnect", reason: "no." });
|
|
427
442
|
});
|
|
428
443
|
|
|
444
|
+
test("a reading answers a spent allowance only in the pool the refused model spends", () => {
|
|
445
|
+
const pools = (claude: number, gemini: number): AccountUsage =>
|
|
446
|
+
at(
|
|
447
|
+
2_000,
|
|
448
|
+
window({ kind: "google:3p-weekly", label: "Claude and GPT models", utilization: claude, gates: { models: ["claude", "gpt"] } }),
|
|
449
|
+
window({ kind: "google:models:gemini", label: "Gemini models", utilization: gemini, gates: { models: ["gemini"] } }),
|
|
450
|
+
);
|
|
451
|
+
const flash = refusal({ kind: "limit", account: "a", model: "gemini-3.8-flash-high" });
|
|
452
|
+
// Claude spent, Gemini open: room where Flash spends answers it, the full Claude pool notwithstanding.
|
|
453
|
+
expect(refusalVerdict(flash, [{ account: "a", usage: pools(100, 40) }])).toBe("answered");
|
|
454
|
+
// Claude open, Gemini full: room in a pool Flash never spends answers nothing.
|
|
455
|
+
expect(refusalVerdict(flash, [{ account: "a", usage: pools(0, 100) }])).toBe("standing");
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
// 2026-11-08 (ci-fix-intentic-42395805126-attempt2): the translator tried five of 31 Google accounts per send, all
|
|
459
|
+
// spent, and never the one with room. Each refusal, filed under no account, pinned every account full until the re-read
|
|
460
|
+
// it forced landed seconds later, and that one account's reading then answered it for all 31: Opus and Flash each read
|
|
461
|
+
// 0% and then 100% again while every turn on them was refused, and both were never spent at once.
|
|
462
|
+
test("refusals naming their accounts hold a 31-account Google fleet steady across the re-read they force", () => {
|
|
463
|
+
const refusedAt = Date.parse("2026-11-08T11:11:45Z");
|
|
464
|
+
const reread = refusedAt + 5_000;
|
|
465
|
+
const opusBack = Date.parse("2026-11-14T12:04:18Z") / 1000;
|
|
466
|
+
const flashBack = Date.parse("2026-11-14T20:05:20Z") / 1000;
|
|
467
|
+
const pools = (measuredAt: number, claude: number, gemini: number): AccountUsage =>
|
|
468
|
+
at(
|
|
469
|
+
measuredAt,
|
|
470
|
+
window({ kind: "google:3p-weekly", label: "Claude and GPT models", utilization: claude, resetsAt: opusBack, gates: { models: ["claude", "gpt"] } }),
|
|
471
|
+
window({ kind: "google:models:gemini", label: "Gemini models", utilization: gemini, resetsAt: flashBack, gates: { models: ["gemini"] } }),
|
|
472
|
+
);
|
|
473
|
+
const tried = Array.from({ length: 10 }, (_, index) => `tried-${index}`);
|
|
474
|
+
const untried = Array.from({ length: 19 }, (_, index) => `untried-${index}`);
|
|
475
|
+
const fleet = (measuredAt: number): ServiceFacts[] => [
|
|
476
|
+
...[...tried, ...untried].map((account) => ({ account, usage: pools(measuredAt, 100, 100) })),
|
|
477
|
+
{ account: "radarsuspam6", usage: pools(measuredAt, 100, 99.61) },
|
|
478
|
+
{ account: "svichita09", usage: pools(measuredAt, 0, 19.42) },
|
|
479
|
+
];
|
|
480
|
+
const refused = tried.flatMap((account) => [
|
|
481
|
+
refusal({ kind: "limit", account, at: refusedAt, model: "claude-opus-4-6-thinking", resetsAt: opusBack }),
|
|
482
|
+
refusal({ kind: "limit", account, at: refusedAt, model: "gemini-3.8-flash-high", resetsAt: flashBack }),
|
|
483
|
+
]);
|
|
484
|
+
const opus = { id: "claude-opus-4-6-thinking" };
|
|
485
|
+
const flash = { id: "gemini-3.8-flash-high" };
|
|
486
|
+
for (const accounts of [fleet(refusedAt - 30_000), fleet(reread)]) {
|
|
487
|
+
expect(fleetCapacity(accounts, refused, opus, reread)).toMatchObject({ kind: "serving", serving: 1, accounts: 31 });
|
|
488
|
+
expect(fleetCapacity(accounts, refused, flash, reread)).toMatchObject({ kind: "serving", serving: 2, accounts: 31 });
|
|
489
|
+
const states = serviceStates(accounts, refused, opus, reread);
|
|
490
|
+
expect(states.get("tried-0")).toEqual({ kind: "spent", reopensAt: opusBack, pool: "Claude and GPT models" });
|
|
491
|
+
expect(states.get("svichita09")).toEqual({ kind: "ready", room: 100 });
|
|
492
|
+
}
|
|
493
|
+
// The same refusal filed under no account is answered on each account by its own reading alone: the account with
|
|
494
|
+
// room frees itself, never one whose reading since says nothing.
|
|
495
|
+
const nameless = refusal({ kind: "limit", at: refusedAt, model: "claude-opus-4-6-thinking", resetsAt: opusBack });
|
|
496
|
+
const onlyOneRead = fleet(refusedAt - 30_000).map((facts) => (facts.account === "svichita09" ? { ...facts, usage: pools(reread, 0, 19.42) } : facts));
|
|
497
|
+
const states = serviceStates([...onlyOneRead, { account: "unread" }], [nameless], opus, reread);
|
|
498
|
+
expect(states.get("svichita09")).toEqual({ kind: "ready", room: 100 });
|
|
499
|
+
expect(states.get("unread")).toMatchObject({ kind: "spent", reopensAt: opusBack });
|
|
500
|
+
});
|
|
501
|
+
|
|
502
|
+
// The translator's per-model benches are the provider's refusals of each account it tried, with the provider's instant:
|
|
503
|
+
// read as such, the same fleet holds without a refusal on file, and a bench on one model leaves the account's others.
|
|
504
|
+
test("a translator's per-model bench holds its account spent on that model alone, until the provider's instant", () => {
|
|
505
|
+
const opusBack = Date.parse("2026-11-14T12:03:41Z") / 1000;
|
|
506
|
+
const now = Date.parse("2026-11-08T11:12:00Z");
|
|
507
|
+
const room = at(now - 1_000, window({ kind: "google:3p-weekly", label: "Claude and GPT models", utilization: 0, gates: { models: ["claude", "gpt"] } }), window({ kind: "google:models:gemini", label: "Gemini models", utilization: 20, gates: { models: ["gemini"] } }));
|
|
508
|
+
const benched: ServiceFacts = { account: "a", usage: room, cooldowns: [{ model: "claude-opus-4-6-thinking", until: opusBack }] };
|
|
509
|
+
const accounts = [benched, { account: "b", usage: room }];
|
|
510
|
+
// A reading with room taken after the bench answers nothing: the provider named when.
|
|
511
|
+
expect(serviceStates(accounts, [], { id: "claude-opus-4-6-thinking" }, now).get("a")).toEqual({ kind: "spent", reopensAt: opusBack, pool: "Claude and GPT models" });
|
|
512
|
+
expect(serviceStates(accounts, [], { id: "gemini-3.8-flash-high" }, now).get("a")).toEqual({ kind: "ready", room: 80 });
|
|
513
|
+
expect(fleetCapacity(accounts, [], { id: "claude-opus-4-6-thinking" }, now)).toMatchObject({ kind: "serving", serving: 1, accounts: 2 });
|
|
514
|
+
// Past the instant it is over, and the reading speaks alone.
|
|
515
|
+
expect(serviceStates(accounts, [], { id: "claude-opus-4-6-thinking" }, opusBack * 1000).get("a")).toEqual({ kind: "ready", room: 100 });
|
|
516
|
+
// A revoked sign-in filed since is the account's newer word.
|
|
517
|
+
expect(serviceStates(accounts, [refusal({ kind: "auth", account: "a", at: now })], { id: "claude-opus-4-6-thinking" }, now).get("a")).toMatchObject({ kind: "blocked", fix: "reconnect" });
|
|
518
|
+
});
|
|
519
|
+
|
|
429
520
|
test("an unnamed turn takes the most room, then an unmeasured account, then a spent one, and a blocked one only when that is all", () => {
|
|
430
521
|
const entry = (id: string, state: AccountState) => ({ id, state });
|
|
431
522
|
const blocked: AccountState = { kind: "blocked", fix: "admin", reason: "no seat" };
|
package/src/models/plan-pools.ts
CHANGED
|
@@ -1,98 +1,26 @@
|
|
|
1
|
-
import type { AccountState, AccountUsage, ProviderRefusal, UsageWindow
|
|
1
|
+
import type { AccountState, AccountUsage, ProviderRefusal, UsageWindow } from "../schemas/providers/plan-limits.js";
|
|
2
2
|
import { humanizeModelId } from "./model-label.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
//
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export interface ModelRef {
|
|
25
|
-
// Wire model id.
|
|
26
|
-
readonly id: string;
|
|
27
|
-
// Display name, when available; matched too, since the tier word may be in either id or label.
|
|
28
|
-
readonly label?: string | undefined;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Splits into lowercase alnum words for whole-word matching: a substring test would match "opus" inside a word that
|
|
32
|
-
// merely contains it.
|
|
33
|
-
export const wordsOf = (text: string): readonly string[] =>
|
|
34
|
-
text
|
|
35
|
-
.toLowerCase()
|
|
36
|
-
.split(/[^a-z0-9]+/)
|
|
37
|
-
.filter(Boolean);
|
|
38
|
-
|
|
39
|
-
// Whether `needle` appears as a contiguous run of whole words within `words`.
|
|
40
|
-
export const runOfWords = (words: readonly string[], needle: readonly string[]): boolean =>
|
|
41
|
-
needle.length > 0 && words.some((_, at) => needle.every((word, index) => words[at + index] === word));
|
|
42
|
-
|
|
43
|
-
const nameMatches = (name: string, model: ModelRef): boolean => {
|
|
44
|
-
const needle = wordsOf(name);
|
|
45
|
-
return runOfWords(wordsOf(model.id), needle) || (model.label !== undefined && runOfWords(wordsOf(model.label), needle));
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export const gatesModel = (gates: WindowGates, model: ModelRef): boolean =>
|
|
49
|
-
gates === "all" ? true : gates === "none" ? false : gates.models.some((name) => nameMatches(name, model));
|
|
50
|
-
|
|
51
|
-
// Served models no pool in `windows` gates: what a reading cannot say anything about. A pool gated `none` covers
|
|
52
|
-
// nothing, and one gated `all` covers every model.
|
|
53
|
-
export const uncoveredModels = (windows: readonly UsageWindow[], served: readonly ModelRef[]): string[] =>
|
|
54
|
-
served.filter((model) => !windows.some((window) => gatesModel(window.gates, model))).map((model) => model.id);
|
|
55
|
-
|
|
56
|
-
// Pools that gate this model, or, with no model given, every pool that gates anything.
|
|
57
|
-
export const gatingWindows = (usage: AccountUsage | undefined, model?: ModelRef): readonly UsageWindow[] =>
|
|
58
|
-
(usage?.windows ?? []).filter((window) => (model === undefined ? window.gates !== "none" : gatesModel(window.gates, model)));
|
|
59
|
-
|
|
60
|
-
const fullest = (windows: readonly UsageWindow[]): UsageWindow | undefined =>
|
|
61
|
-
windows.reduce<UsageWindow | undefined>((worst, window) => (worst === undefined || window.utilization > worst.utilization ? window : worst), undefined);
|
|
62
|
-
|
|
63
|
-
// The pool that gates the next turn: the fullest of the windows this model spends. Undefined means nothing gates it (or
|
|
64
|
-
// nothing was measured) — distinct from a measured 0%.
|
|
65
|
-
export const bindingWindow = (usage: AccountUsage | undefined, model?: ModelRef): UsageWindow | undefined => fullest(gatingWindows(usage, model));
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Whether a turn answered on `served` proves `other` had room on this account too: every pool `other` spends gates
|
|
69
|
-
* `served` as well, so the answer went through each of them. False where nothing is read, and where `other` spends a pool
|
|
70
|
-
* of its own (Claude's Opus slice, a model the plan has no entitlement to), which another model's answer says nothing
|
|
71
|
-
* about. Codex meters every model from one allowance, so a Luna turn going through proves Sol's allowance open as well.
|
|
72
|
-
*/
|
|
73
|
-
export const answerCovers = (usage: AccountUsage | undefined, served: ModelRef, other: ModelRef): boolean => {
|
|
74
|
-
const pools = gatingWindows(usage, other);
|
|
75
|
-
return pools.length > 0 && pools.every((window) => gatesModel(window.gates, served));
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
// The model's own metered pool, by most specific name match; distinct from bindingWindow, which may answer with an
|
|
79
|
-
// all-models pool. Two matches tied in specificity return undefined rather than guess.
|
|
80
|
-
export const scopedWindow = (usage: AccountUsage | undefined, model: ModelRef): UsageWindow | undefined => {
|
|
81
|
-
const matched = (usage?.windows ?? [])
|
|
82
|
-
.flatMap((window) => {
|
|
83
|
-
if (window.gates === "all" || window.gates === "none") {
|
|
84
|
-
return [];
|
|
85
|
-
}
|
|
86
|
-
const specificity = Math.max(0, ...window.gates.models.filter((name) => nameMatches(name, model)).map((name) => wordsOf(name).length));
|
|
87
|
-
return specificity === 0 ? [] : [{ window, specificity }];
|
|
88
|
-
})
|
|
89
|
-
.toSorted((left, right) => right.specificity - left.specificity);
|
|
90
|
-
const best = matched[0];
|
|
91
|
-
if (best === undefined || matched[1]?.specificity === best.specificity) {
|
|
92
|
-
return undefined;
|
|
93
|
-
}
|
|
94
|
-
return best.window;
|
|
95
|
-
};
|
|
3
|
+
import { bindingWindow, gatesModel, gatingWindows, type ModelRef, pinnedFull, provenFull, SPENT_UTILIZATION } from "./verdict/pool-gates.js";
|
|
4
|
+
import { type RefusalsOnFile, type ServiceFacts, standingOver } from "./verdict/refusal-verdict.js";
|
|
5
|
+
|
|
6
|
+
// Which pool gates a model (verdict/pool-gates.ts) and how each refusal on file stands over each account
|
|
7
|
+
// (verdict/refusal-verdict.ts), kept beside this module and served from it, so every caller reads the one rule through
|
|
8
|
+
// one door.
|
|
9
|
+
export {
|
|
10
|
+
answerCovers,
|
|
11
|
+
bindingWindow,
|
|
12
|
+
gatesModel,
|
|
13
|
+
gatingWindows,
|
|
14
|
+
type ModelRef,
|
|
15
|
+
pinnedFull,
|
|
16
|
+
provenFull,
|
|
17
|
+
runOfWords,
|
|
18
|
+
scopedWindow,
|
|
19
|
+
SPENT_UTILIZATION,
|
|
20
|
+
uncoveredModels,
|
|
21
|
+
wordsOf,
|
|
22
|
+
} from "./verdict/pool-gates.js";
|
|
23
|
+
export { refusalVerdict, refusedPoolReset, type RefusalsOnFile, type ServiceFacts, standingOver } from "./verdict/refusal-verdict.js";
|
|
96
24
|
|
|
97
25
|
// How long a pool's window runs, read off the provider's own key and whatever name it published. One implementation,
|
|
98
26
|
// because two things need it and must agree: a narrow column names the window by `short`, and a reading with no
|
|
@@ -196,124 +124,6 @@ export const currentWindows = (usage: AccountUsage, now: number): UsageWindow[]
|
|
|
196
124
|
// gate, listing and surface reads. The daemon and the editor run it on the same facts (the account rows and every
|
|
197
125
|
// refusal on file); neither keeps a judged copy, so the two cannot disagree.
|
|
198
126
|
|
|
199
|
-
/** Everything the serviceability rule reads of one account, as the account rows already carry it. */
|
|
200
|
-
export interface ServiceFacts {
|
|
201
|
-
// The daemon's key: a native account's id, a routed credential's auth-file name.
|
|
202
|
-
readonly account: string;
|
|
203
|
-
readonly needsReauth?: boolean | undefined;
|
|
204
|
-
// Why the sign-in needs renewing, where the provider said.
|
|
205
|
-
readonly detail?: string | undefined;
|
|
206
|
-
readonly seatRefusal?: string | undefined;
|
|
207
|
-
readonly cooling?: { readonly until?: number | undefined; readonly reason?: string | undefined; readonly verify?: string | undefined } | undefined;
|
|
208
|
-
readonly usage?: AccountUsage | undefined;
|
|
209
|
-
// How the account is named to a person (its label, a routed credential's address); a surface that quotes a figure
|
|
210
|
-
// says whose it is.
|
|
211
|
-
readonly label?: string | undefined;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/** Every refusal on file for one provider: what its accounts are judged against, each standing until something answers it. */
|
|
215
|
-
export type RefusalsOnFile = readonly ProviderRefusal[];
|
|
216
|
-
|
|
217
|
-
// A spent allowance is over once a reading with room lands after it; a refused credential once any reading does (the
|
|
218
|
-
// token worked). Nothing a reading says answers an entitlement refusal: a seatless account authenticates and reads fine.
|
|
219
|
-
// Nor does the refused account's own reading answer an allowance it does not measure (`unmetered`: an admin's credit).
|
|
220
|
-
// `measured` says whether this reading can speak to the allowance at all: false for that account's own, true for any
|
|
221
|
-
// account's where nothing says which one refused (refusalVerdict).
|
|
222
|
-
const answers = (refusal: ProviderRefusal, facts: ServiceFacts, measured: boolean = refusal.unmetered !== true): boolean => {
|
|
223
|
-
const measuredAt = facts.usage?.measuredAt;
|
|
224
|
-
if (refusal.kind === "entitlement" || !measured || measuredAt === undefined || measuredAt <= refusal.at) {
|
|
225
|
-
return false;
|
|
226
|
-
}
|
|
227
|
-
if (refusal.kind === "auth") {
|
|
228
|
-
return facts.needsReauth !== true;
|
|
229
|
-
}
|
|
230
|
-
const binding = bindingWindow(facts.usage);
|
|
231
|
-
return binding !== undefined && binding.utilization < SPENT_UTILIZATION;
|
|
232
|
-
};
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* When the pool a spent allowance that named no instant was refused in reopens, in epoch seconds: the soonest reset of
|
|
236
|
-
* the binding pool for the model it named (the pool judgedReading pins full) on the accounts it may have refused, its own
|
|
237
|
-
* where it named one, any where it named none, as any account's room answers a nameless one. The daemon's ledger stamps
|
|
238
|
-
* it on the refusal as it files it (`poolResetsAt`), while the readings still show that pool open: once it reopens the
|
|
239
|
-
* reading lapses it to an empty pool and a different one binds, so it cannot be read back off the reading later.
|
|
240
|
-
* Undefined for a refusal that named its instant, one no reading measures (`unmetered`), a person's mark (lifted by a
|
|
241
|
-
* person or a turn, not a window), and where no reading publishes a reset still ahead of the refusal.
|
|
242
|
-
*/
|
|
243
|
-
export const refusedPoolReset = (refusal: ProviderRefusal, accounts: readonly ServiceFacts[]): number | undefined => {
|
|
244
|
-
if (refusal.kind !== "limit" || refusal.resetsAt !== undefined || refusal.unmetered === true || refusal.byHand === true) {
|
|
245
|
-
return undefined;
|
|
246
|
-
}
|
|
247
|
-
const model = refusal.model === undefined ? undefined : { id: refusal.model };
|
|
248
|
-
const resets = accounts
|
|
249
|
-
.filter((facts) => refusal.account === undefined || facts.account === refusal.account)
|
|
250
|
-
.flatMap((facts) => {
|
|
251
|
-
const reset = bindingWindow(facts.usage, model)?.resetsAt;
|
|
252
|
-
return reset !== undefined && reset * 1000 > refusal.at ? [reset] : [];
|
|
253
|
-
});
|
|
254
|
-
return resets.length === 0 ? undefined : Math.min(...resets);
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* How a refusal on file stands against everything read since, over every account the provider holds: `gone` once the
|
|
259
|
-
* account it named is disconnected, `answered` once the instant it named has passed (or, where it named none, the
|
|
260
|
-
* reset of the pool it was refused in, stamped as it was filed: refusedPoolReset) or once that account (or, for a refusal
|
|
261
|
-
* naming none, any account) has a later reading that contradicts it, else `standing`. An empty list is one not loaded
|
|
262
|
-
* yet, so the refusal stands. Judged by the daemon and every open window at the same instant from what the refusal
|
|
263
|
-
* carries: nothing waits for a fresh reading or a ledger write to flip it. 2026-10-20: a refusal naming no instant stood
|
|
264
|
-
* past its pool's reset until the next reading landed, up to the 15-minute idle sweep, while the picker already said
|
|
265
|
-
* "back at" that reset. A stamp is this sandbox's guess, not the provider's word, so a reading taken after it outranks
|
|
266
|
-
* it: 2026-10-21, a weekly pool read at a rounded 100 once the five-hour one it was stamped with reopened, and the
|
|
267
|
-
* account read ready with no room, so every turn let through was refused again.
|
|
268
|
-
*/
|
|
269
|
-
export const refusalVerdict = (
|
|
270
|
-
refusal: ProviderRefusal,
|
|
271
|
-
accounts: readonly ServiceFacts[],
|
|
272
|
-
now: number = Date.now(),
|
|
273
|
-
): "standing" | "answered" | "gone" => {
|
|
274
|
-
const named = accounts.filter((facts) => facts.account === refusal.account);
|
|
275
|
-
if (refusal.account !== undefined && named.length === 0) {
|
|
276
|
-
return accounts.length === 0 ? "standing" : "gone";
|
|
277
|
-
}
|
|
278
|
-
const whose = refusal.account === undefined ? accounts : named;
|
|
279
|
-
// The provider's own "try again at" is over at that instant, whichever account it refused; so, where it named none,
|
|
280
|
-
// is the refused pool's reset the ledger stamped, unless a reading since says otherwise (read below).
|
|
281
|
-
const over = refusal.resetsAt ?? refusal.poolResetsAt;
|
|
282
|
-
const readSince = (instant: number): boolean => whose.some((facts) => (facts.usage?.measuredAt ?? 0) > instant * 1000);
|
|
283
|
-
if (refusal.kind === "limit" && over !== undefined && over * 1000 <= now && (refusal.resetsAt !== undefined || !readSince(over))) {
|
|
284
|
-
return "answered";
|
|
285
|
-
}
|
|
286
|
-
// Where it is known which account it refused (it named one, or there is only one), the provider's own instant
|
|
287
|
-
// outranks a usage endpoint that kept showing room while it refused: over at that instant, and not before.
|
|
288
|
-
const known = refusal.account !== undefined || accounts.length <= 1;
|
|
289
|
-
if (refusal.kind === "limit" && refusal.resetsAt !== undefined && known) {
|
|
290
|
-
return "standing";
|
|
291
|
-
}
|
|
292
|
-
if (known) {
|
|
293
|
-
return whose.some((facts) => answers(refusal, facts)) ? "answered" : "standing";
|
|
294
|
-
}
|
|
295
|
-
/* A nameless refusal over several accounts is one of them saying no, and nothing says which: the translator benches
|
|
296
|
-
the one it refused and routes on, so any of them reading room since answers it, whatever kind of allowance it was
|
|
297
|
-
and whatever instant it named. Held to its instant, or to an allowance no reading measures, one team account's
|
|
298
|
-
refusal held every Codex account spent for a day, the two free ones reading 0% used included (2026-10-19). */
|
|
299
|
-
return accounts.some((facts) => answers(refusal, facts, true)) ? "answered" : "standing";
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
// A stamp a reading has outlived (refusalVerdict) says nothing of when the pool now holding the refusal reopens: that
|
|
303
|
-
// pool's own reset does.
|
|
304
|
-
const unstampedPast = (refusal: ProviderRefusal, now: number): ProviderRefusal => {
|
|
305
|
-
if (refusal.poolResetsAt === undefined || refusal.poolResetsAt * 1000 > now) {
|
|
306
|
-
return refusal;
|
|
307
|
-
}
|
|
308
|
-
const { poolResetsAt: _outlived, ...standing } = refusal;
|
|
309
|
-
return standing;
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
/** The refusals still standing over each of a provider's accounts: those naming it, and those naming none. */
|
|
313
|
-
export const standingOver = (accounts: readonly ServiceFacts[], refusals: RefusalsOnFile, now: number = Date.now()): ((account: string) => RefusalsOnFile) => {
|
|
314
|
-
const standing = refusals.filter((refusal) => refusalVerdict(refusal, accounts, now) === "standing").map((refusal) => unstampedPast(refusal, now));
|
|
315
|
-
return (account) => standing.filter((refusal) => (refusal.account ?? account) === account);
|
|
316
|
-
};
|
|
317
127
|
|
|
318
128
|
// The account reopens for this question when the pools holding it shut do: all of them for a model's own question (or
|
|
319
129
|
// the pools gating every model), the first to reopen when only per-model slices are full. Unknown if any is unpublished.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { AccountUsage, UsageWindow, WindowGates } from "../../schemas/providers/plan-limits.js";
|
|
2
|
+
|
|
3
|
+
// Single reading of which account pool gates a given model (or, with none named, the account's tightest pool), shared
|
|
4
|
+
// by the daemon's picker/refusal logic and the browser's rings and rail. A pool gated `none` is excluded from the
|
|
5
|
+
// no-model case: visible to the account, never a gate on a turn.
|
|
6
|
+
|
|
7
|
+
// 100 = exhaustion (the call will be refused). The one spent line: the daemon's pickers and every surface read it, and
|
|
8
|
+
// anything short of it still has room.
|
|
9
|
+
export const SPENT_UTILIZATION = 100;
|
|
10
|
+
|
|
11
|
+
// Whether a reading proves its pool empty. A pool read at the line by a provider that rounds to whole percents
|
|
12
|
+
// (`rounded`) does not: Anthropic reports 99.5% as 100 and keeps serving turns on it, so treating that as spent strands
|
|
13
|
+
// the last of an allowance (and turns a plain send into one scheduled for the reset). Such a pool is at the line, with
|
|
14
|
+
// no room to rank by; only the provider's refusal (pinnedFull) proves it empty.
|
|
15
|
+
export const provenFull = (window: UsageWindow): boolean => window.utilization >= SPENT_UTILIZATION && window.rounded !== true;
|
|
16
|
+
|
|
17
|
+
// A pool a standing limit refusal shows full: at the line, and proven so whatever the provider's rounding.
|
|
18
|
+
export const pinnedFull = (window: UsageWindow): UsageWindow => {
|
|
19
|
+
const { rounded: _rounded, ...pool } = window;
|
|
20
|
+
return { ...pool, utilization: Math.max(window.utilization, SPENT_UTILIZATION) };
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export interface ModelRef {
|
|
24
|
+
// Wire model id.
|
|
25
|
+
readonly id: string;
|
|
26
|
+
// Display name, when available; matched too, since the tier word may be in either id or label.
|
|
27
|
+
readonly label?: string | undefined;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Splits into lowercase alnum words for whole-word matching: a substring test would match "opus" inside a word that
|
|
31
|
+
// merely contains it.
|
|
32
|
+
export const wordsOf = (text: string): readonly string[] =>
|
|
33
|
+
text
|
|
34
|
+
.toLowerCase()
|
|
35
|
+
.split(/[^a-z0-9]+/)
|
|
36
|
+
.filter(Boolean);
|
|
37
|
+
|
|
38
|
+
// Whether `needle` appears as a contiguous run of whole words within `words`.
|
|
39
|
+
export const runOfWords = (words: readonly string[], needle: readonly string[]): boolean =>
|
|
40
|
+
needle.length > 0 && words.some((_, at) => needle.every((word, index) => words[at + index] === word));
|
|
41
|
+
|
|
42
|
+
const nameMatches = (name: string, model: ModelRef): boolean => {
|
|
43
|
+
const needle = wordsOf(name);
|
|
44
|
+
return runOfWords(wordsOf(model.id), needle) || (model.label !== undefined && runOfWords(wordsOf(model.label), needle));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const gatesModel = (gates: WindowGates, model: ModelRef): boolean =>
|
|
48
|
+
gates === "all" ? true : gates === "none" ? false : gates.models.some((name) => nameMatches(name, model));
|
|
49
|
+
|
|
50
|
+
// Served models no pool in `windows` gates: what a reading cannot say anything about. A pool gated `none` covers
|
|
51
|
+
// nothing, and one gated `all` covers every model.
|
|
52
|
+
export const uncoveredModels = (windows: readonly UsageWindow[], served: readonly ModelRef[]): string[] =>
|
|
53
|
+
served.filter((model) => !windows.some((window) => gatesModel(window.gates, model))).map((model) => model.id);
|
|
54
|
+
|
|
55
|
+
// Pools that gate this model, or, with no model given, every pool that gates anything.
|
|
56
|
+
export const gatingWindows = (usage: AccountUsage | undefined, model?: ModelRef): readonly UsageWindow[] =>
|
|
57
|
+
(usage?.windows ?? []).filter((window) => (model === undefined ? window.gates !== "none" : gatesModel(window.gates, model)));
|
|
58
|
+
|
|
59
|
+
const fullest = (windows: readonly UsageWindow[]): UsageWindow | undefined =>
|
|
60
|
+
windows.reduce<UsageWindow | undefined>((worst, window) => (worst === undefined || window.utilization > worst.utilization ? window : worst), undefined);
|
|
61
|
+
|
|
62
|
+
// The pool that gates the next turn: the fullest of the windows this model spends. Undefined means nothing gates it (or
|
|
63
|
+
// nothing was measured) — distinct from a measured 0%.
|
|
64
|
+
export const bindingWindow = (usage: AccountUsage | undefined, model?: ModelRef): UsageWindow | undefined => fullest(gatingWindows(usage, model));
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Whether a turn answered on `served` proves `other` had room on this account too: every pool `other` spends gates
|
|
68
|
+
* `served` as well, so the answer went through each of them. False where nothing is read, and where `other` spends a pool
|
|
69
|
+
* of its own (Claude's Opus slice, a model the plan has no entitlement to), which another model's answer says nothing
|
|
70
|
+
* about. Codex meters every model from one allowance, so a Luna turn going through proves Sol's allowance open as well.
|
|
71
|
+
*/
|
|
72
|
+
export const answerCovers = (usage: AccountUsage | undefined, served: ModelRef, other: ModelRef): boolean => {
|
|
73
|
+
const pools = gatingWindows(usage, other);
|
|
74
|
+
return pools.length > 0 && pools.every((window) => gatesModel(window.gates, served));
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
// The model's own metered pool, by most specific name match; distinct from bindingWindow, which may answer with an
|
|
78
|
+
// all-models pool. Two matches tied in specificity return undefined rather than guess.
|
|
79
|
+
export const scopedWindow = (usage: AccountUsage | undefined, model: ModelRef): UsageWindow | undefined => {
|
|
80
|
+
const matched = (usage?.windows ?? [])
|
|
81
|
+
.flatMap((window) => {
|
|
82
|
+
if (window.gates === "all" || window.gates === "none") {
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
const specificity = Math.max(0, ...window.gates.models.filter((name) => nameMatches(name, model)).map((name) => wordsOf(name).length));
|
|
86
|
+
return specificity === 0 ? [] : [{ window, specificity }];
|
|
87
|
+
})
|
|
88
|
+
.toSorted((left, right) => right.specificity - left.specificity);
|
|
89
|
+
const best = matched[0];
|
|
90
|
+
if (best === undefined || matched[1]?.specificity === best.specificity) {
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
return best.window;
|
|
94
|
+
};
|