opencode-usage 0.4.2 → 0.4.5

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.
@@ -1,9 +1,10 @@
1
- import type { QuotaSnapshot } from "./types.js";
1
+ import type { QuotaSnapshot, MultiAccountThresholds } from "./types.js";
2
2
  /**
3
3
  * Load quota from anthropic-multi-account state file
4
4
  * Path: ~/.local/share/opencode/multi-account-state.json
5
5
  */
6
6
  export declare function loadMultiAccountQuota(): Promise<QuotaSnapshot[]>;
7
+ export declare function loadMultiAccountThresholds(): Promise<MultiAccountThresholds | null>;
7
8
  /**
8
9
  * Load quota from antigravity accounts file
9
10
  * Path: ~/.config/opencode/antigravity-accounts.json
package/dist/types.d.ts CHANGED
@@ -70,6 +70,13 @@ export type CursorState = {
70
70
  export type MultiAccountState = {
71
71
  currentAccount?: string;
72
72
  requestCount?: number;
73
+ config?: {
74
+ threshold?: number | {
75
+ session5h?: number;
76
+ weekly7d?: number;
77
+ weekly7dSonnet?: number;
78
+ };
79
+ };
73
80
  usage?: Record<string, {
74
81
  session5h?: {
75
82
  utilization: number;
@@ -89,6 +96,15 @@ export type MultiAccountState = {
89
96
  timestamp?: string;
90
97
  }>;
91
98
  };
99
+ export type MultiAccountThresholds = {
100
+ session5h: number;
101
+ weekly7d: number;
102
+ weekly7dSonnet: number;
103
+ };
104
+ export type CodexThresholds = {
105
+ fiveHour: number;
106
+ weekly: number;
107
+ };
92
108
  /** Antigravity quota group */
93
109
  export type AntigravityQuotaGroup = {
94
110
  remainingFraction: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-usage",
3
- "version": "0.4.2",
3
+ "version": "0.4.5",
4
4
  "description": "CLI tool for tracking OpenCode AI coding assistant usage and costs",
5
5
  "keywords": [
6
6
  "ai",