tokenmaxxing 1.94.0 → 1.96.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tokenmaxxing",
3
- "version": "1.94.0",
3
+ "version": "1.96.0",
4
4
  "description": "Automatic Claude Code account switching: pool multiple accounts, start each session on its own account, and resume a session on a fresher account when quota fills.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -19,7 +19,7 @@
19
19
  "DESIGN.md"
20
20
  ],
21
21
  "engines": {
22
- "bun": ">=1.3.7"
22
+ "bun": ">=1.4.0"
23
23
  },
24
24
  "os": [
25
25
  "darwin",
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
  import { http, safeErrorDetail } from "./http.ts";
3
3
  import { errorMessage } from "./log.ts";
4
4
  import { env } from "./paths.ts";
5
- import { JsonTextSchema, type CodexAuthJson, type CodexUsage, type Window } from "./types.ts";
5
+ import { EpochSecondsSchema, JsonTextSchema, type CodexAuthJson, type CodexUsage, type Window } from "./types.ts";
6
6
  import { codexIdentityOf } from "./codexauth.ts";
7
7
  import { familyTokens } from "./usage.ts";
8
8
 
@@ -19,7 +19,7 @@ export class CodexUsageReadError extends Error {
19
19
  const WireWindowSchema = z.looseObject({
20
20
  used_percent: z.number(),
21
21
  limit_window_seconds: z.number().nullish(),
22
- reset_at: z.number().nullish(),
22
+ reset_at: EpochSecondsSchema.nullish(),
23
23
  });
24
24
 
25
25
  const WireRateLimitSchema = z.looseObject({
@@ -44,7 +44,7 @@ function toWindows(rateLimit: z.infer<typeof WireRateLimitSchema> | null | undef
44
44
  out.push({
45
45
  name,
46
46
  usedPercentage: wire.used_percent,
47
- resetsAt: wire.reset_at != null ? wire.reset_at * 1000 : null,
47
+ resetsAt: wire.reset_at ?? null,
48
48
  windowSeconds: wire.limit_window_seconds ?? null,
49
49
  sampledAt: at,
50
50
  });