@kapybara/zerosub 1.19.0 → 1.19.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/package.json +1 -1
- package/server/codex.ts +1 -1
- package/server/routing.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kapybara/zerosub",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.1",
|
|
4
4
|
"description": "ZeroSub: use several Claude and ChatGPT (Codex) subscriptions side by side in Paseo. Add accounts in-app, pick one per agent, and switch automatically when an account hits its limit.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"paseo",
|
package/server/codex.ts
CHANGED
|
@@ -71,7 +71,7 @@ class AppServer {
|
|
|
71
71
|
try {
|
|
72
72
|
await server.request(
|
|
73
73
|
"initialize",
|
|
74
|
-
{ clientInfo: { name: CLIENT_NAME, title: "Paseo ZeroSub", version: "1.19.
|
|
74
|
+
{ clientInfo: { name: CLIENT_NAME, title: "Paseo ZeroSub", version: "1.19.1" }, capabilities: { experimentalApi: false } },
|
|
75
75
|
60_000,
|
|
76
76
|
);
|
|
77
77
|
server.send({ method: "initialized" });
|
package/server/routing.ts
CHANGED
|
@@ -457,8 +457,9 @@ export function chooseAccount(state: StoredState, input: RouteInput): RouteDecis
|
|
|
457
457
|
// A paid stand-in is only kept while no subscription account could take over from it.
|
|
458
458
|
const keeps = (stand: StoredAccount) =>
|
|
459
459
|
!isLastResort(stand) || !accountsOf(state, input.family).some((other) => other.id !== account!.id && canStandIn(other, input.now, input.model));
|
|
460
|
+
const stays = (stand: StoredAccount) => canStandIn(stand, input.now, input.model) || (isLastResort(stand) && isUsable(stand, input.now, input.model));
|
|
460
461
|
let alternative =
|
|
461
|
-
staying && staying.family === input.family && staying.id !== account.id &&
|
|
462
|
+
staying && staying.family === input.family && staying.id !== account.id && stays(staying) && keeps(staying)
|
|
462
463
|
? staying
|
|
463
464
|
: mostAvailable(state, input.family, input.usageOf, input.now, new Set([account.id]), input.paidFallback, pacing, input.model);
|
|
464
465
|
// Before a paid stand-in, a limited subscription with a usable banked reset: the account itself
|