opencode-usage 0.2.6 → 0.3.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.
Files changed (39) hide show
  1. package/dist/__tests__/aggregator.test.d.ts +1 -0
  2. package/dist/__tests__/cli.test.d.ts +1 -0
  3. package/dist/__tests__/codex-client.test.d.ts +1 -0
  4. package/dist/__tests__/dashboard-integration.test.d.ts +1 -0
  5. package/dist/__tests__/loader.perf.test.d.ts +1 -0
  6. package/dist/__tests__/loader.test.d.ts +1 -0
  7. package/dist/__tests__/pricing.test.d.ts +1 -0
  8. package/dist/__tests__/quota-loader.test.d.ts +1 -0
  9. package/dist/__tests__/quota-panel.test.d.ts +1 -0
  10. package/dist/__tests__/renderer.test.d.ts +1 -0
  11. package/dist/__tests__/status-bar.test.d.ts +1 -0
  12. package/dist/__tests__/usage-table.test.d.ts +1 -0
  13. package/dist/cli.d.ts +4 -0
  14. package/dist/codex-client.d.ts +6 -0
  15. package/dist/config-commands.d.ts +5 -0
  16. package/dist/config.d.ts +9 -0
  17. package/dist/dashboard/quota-panel.d.ts +5 -0
  18. package/dist/dashboard/status-bar.d.ts +9 -0
  19. package/dist/dashboard/usage-table.d.ts +7 -0
  20. package/dist/dashboard-solid.d.ts +8 -0
  21. package/dist/dashboard.d.ts +10 -0
  22. package/dist/highlights-eq9cgrbb.scm +604 -0
  23. package/dist/highlights-ghv9g403.scm +205 -0
  24. package/dist/highlights-hk7bwhj4.scm +284 -0
  25. package/dist/highlights-r812a2qc.scm +150 -0
  26. package/dist/highlights-x6tmsnaa.scm +115 -0
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.js +28746 -49
  29. package/dist/index.js.map +17 -7
  30. package/dist/injections-73j83es3.scm +27 -0
  31. package/dist/loader.d.ts +14 -1
  32. package/dist/quota-loader.d.ts +12 -0
  33. package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
  34. package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
  35. package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
  36. package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
  37. package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
  38. package/dist/types.d.ts +78 -0
  39. package/package.json +9 -3
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/dist/cli.d.ts CHANGED
@@ -9,5 +9,9 @@ export type CliArgs = {
9
9
  json?: boolean;
10
10
  monthly?: boolean;
11
11
  watch?: boolean;
12
+ dashboard?: boolean;
13
+ codexToken?: string;
14
+ config?: "set-codex-token" | "show";
15
+ configToken?: string;
12
16
  };
13
17
  export declare function parseArgs(): CliArgs;
@@ -0,0 +1,6 @@
1
+ import type { QuotaSnapshot } from "./types.js";
2
+ /**
3
+ * Fetch Codex usage quota from ChatGPT API
4
+ * Requires a valid session token passed via --codex-token
5
+ */
6
+ export declare function loadCodexQuota(token?: string): Promise<QuotaSnapshot[]>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Config management commands
3
+ */
4
+ export declare function setCodexToken(token: string): Promise<void>;
5
+ export declare function showConfig(): Promise<void>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Configuration file loader for opencode-usage
3
+ */
4
+ export type Config = {
5
+ codexToken?: string;
6
+ };
7
+ export declare function getConfigPath(): string;
8
+ export declare function loadConfig(): Promise<Config>;
9
+ export declare function saveConfig(config: Config): Promise<void>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Quota panel renderer for dashboard
3
+ */
4
+ import type { QuotaSnapshot } from "../types.js";
5
+ export declare function renderQuotaPanel(quotas: QuotaSnapshot[], _width?: number): string;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Status bar renderer for dashboard
3
+ */
4
+ export type StatusInfo = {
5
+ lastUpdate: number;
6
+ refreshInterval: number;
7
+ daysFilter?: number;
8
+ };
9
+ export declare function renderStatusBar(info: StatusInfo, width?: number): string;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Usage table renderer for dashboard (compact version)
3
+ */
4
+ import type { DailyStats } from "../types.js";
5
+ export type TableWidthTier = "narrow" | "medium" | "wide";
6
+ export declare function getTableWidthTier(width: number): TableWidthTier;
7
+ export declare function renderUsageTable(dailyStats: Map<string, DailyStats>, width?: number): string;
@@ -0,0 +1,8 @@
1
+ type DashboardProps = {
2
+ codexToken?: string;
3
+ providerFilter?: string;
4
+ initialDays?: number;
5
+ refreshInterval?: number;
6
+ };
7
+ export declare function runSolidDashboard(options: DashboardProps): Promise<void>;
8
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Dashboard orchestrator - unified multi-source usage view
3
+ */
4
+ export type DashboardOptions = {
5
+ codexToken?: string;
6
+ refreshInterval?: number;
7
+ providerFilter?: string;
8
+ daysFilter?: number;
9
+ };
10
+ export declare function runDashboard(options: DashboardOptions): Promise<void>;