@hasna/economy 0.3.8 → 0.3.9

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 (139) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/docs/configuration.md +4 -2
  3. package/package.json +3 -3
  4. package/dist/cli/brains.d.ts +0 -3
  5. package/dist/cli/brains.d.ts.map +0 -1
  6. package/dist/cli/commands/brief.d.ts +0 -11
  7. package/dist/cli/commands/brief.d.ts.map +0 -1
  8. package/dist/cli/commands/completion.d.ts +0 -2
  9. package/dist/cli/commands/completion.d.ts.map +0 -1
  10. package/dist/cli/commands/extras.d.ts +0 -4
  11. package/dist/cli/commands/extras.d.ts.map +0 -1
  12. package/dist/cli/commands/menubar.d.ts +0 -7
  13. package/dist/cli/commands/menubar.d.ts.map +0 -1
  14. package/dist/cli/commands/notification.d.ts +0 -8
  15. package/dist/cli/commands/notification.d.ts.map +0 -1
  16. package/dist/cli/commands/todos.d.ts +0 -29
  17. package/dist/cli/commands/todos.d.ts.map +0 -1
  18. package/dist/cli/commands/tui.d.ts +0 -26
  19. package/dist/cli/commands/tui.d.ts.map +0 -1
  20. package/dist/cli/commands/watch.d.ts +0 -10
  21. package/dist/cli/commands/watch.d.ts.map +0 -1
  22. package/dist/cli/index.d.ts +0 -3
  23. package/dist/cli/index.d.ts.map +0 -1
  24. package/dist/cli/index.js +0 -12411
  25. package/dist/db/cloud.d.ts +0 -27
  26. package/dist/db/cloud.d.ts.map +0 -1
  27. package/dist/db/database.d.ts +0 -150
  28. package/dist/db/database.d.ts.map +0 -1
  29. package/dist/db/dialect.d.ts +0 -13
  30. package/dist/db/dialect.d.ts.map +0 -1
  31. package/dist/db/pg-migrate.d.ts +0 -30
  32. package/dist/db/pg-migrate.d.ts.map +0 -1
  33. package/dist/db/pg-migrations.d.ts +0 -7
  34. package/dist/db/pg-migrations.d.ts.map +0 -1
  35. package/dist/db/pg-sync-worker.d.ts +0 -2
  36. package/dist/db/pg-sync-worker.d.ts.map +0 -1
  37. package/dist/db/sqlite-adapter.d.ts +0 -36
  38. package/dist/db/sqlite-adapter.d.ts.map +0 -1
  39. package/dist/db/sync-pg.d.ts +0 -43
  40. package/dist/db/sync-pg.d.ts.map +0 -1
  41. package/dist/index.d.ts +0 -3
  42. package/dist/index.d.ts.map +0 -1
  43. package/dist/index.js +0 -3802
  44. package/dist/ingest/billing.d.ts +0 -27
  45. package/dist/ingest/billing.d.ts.map +0 -1
  46. package/dist/ingest/claude-quota.d.ts +0 -5
  47. package/dist/ingest/claude-quota.d.ts.map +0 -1
  48. package/dist/ingest/claude.d.ts +0 -18
  49. package/dist/ingest/claude.d.ts.map +0 -1
  50. package/dist/ingest/codex-quota.d.ts +0 -5
  51. package/dist/ingest/codex-quota.d.ts.map +0 -1
  52. package/dist/ingest/codex.d.ts +0 -8
  53. package/dist/ingest/codex.d.ts.map +0 -1
  54. package/dist/ingest/cursor.d.ts +0 -6
  55. package/dist/ingest/cursor.d.ts.map +0 -1
  56. package/dist/ingest/gemini.d.ts +0 -6
  57. package/dist/ingest/gemini.d.ts.map +0 -1
  58. package/dist/ingest/hermes.d.ts +0 -6
  59. package/dist/ingest/hermes.d.ts.map +0 -1
  60. package/dist/ingest/loops.d.ts +0 -6
  61. package/dist/ingest/loops.d.ts.map +0 -1
  62. package/dist/ingest/opencode.d.ts +0 -7
  63. package/dist/ingest/opencode.d.ts.map +0 -1
  64. package/dist/ingest/otel.d.ts +0 -33
  65. package/dist/ingest/otel.d.ts.map +0 -1
  66. package/dist/ingest/pi.d.ts +0 -7
  67. package/dist/ingest/pi.d.ts.map +0 -1
  68. package/dist/ingest/plugin.d.ts +0 -17
  69. package/dist/ingest/plugin.d.ts.map +0 -1
  70. package/dist/lib/accounts.d.ts +0 -11
  71. package/dist/lib/accounts.d.ts.map +0 -1
  72. package/dist/lib/agents.d.ts +0 -11
  73. package/dist/lib/agents.d.ts.map +0 -1
  74. package/dist/lib/analytics.d.ts +0 -68
  75. package/dist/lib/analytics.d.ts.map +0 -1
  76. package/dist/lib/billing-diff.d.ts +0 -22
  77. package/dist/lib/billing-diff.d.ts.map +0 -1
  78. package/dist/lib/brief.d.ts +0 -72
  79. package/dist/lib/brief.d.ts.map +0 -1
  80. package/dist/lib/cloud-storage.d.ts +0 -48
  81. package/dist/lib/cloud-storage.d.ts.map +0 -1
  82. package/dist/lib/config.d.ts +0 -13
  83. package/dist/lib/config.d.ts.map +0 -1
  84. package/dist/lib/contracts-client/index.d.ts +0 -3
  85. package/dist/lib/contracts-client/index.d.ts.map +0 -1
  86. package/dist/lib/contracts-client/mode.d.ts +0 -20
  87. package/dist/lib/contracts-client/mode.d.ts.map +0 -1
  88. package/dist/lib/contracts-client/storage.d.ts +0 -83
  89. package/dist/lib/contracts-client/storage.d.ts.map +0 -1
  90. package/dist/lib/contracts-client/transport.d.ts +0 -148
  91. package/dist/lib/contracts-client/transport.d.ts.map +0 -1
  92. package/dist/lib/gatherer.d.ts +0 -21
  93. package/dist/lib/gatherer.d.ts.map +0 -1
  94. package/dist/lib/model-config.d.ts +0 -8
  95. package/dist/lib/model-config.d.ts.map +0 -1
  96. package/dist/lib/open-projects.d.ts +0 -27
  97. package/dist/lib/open-projects.d.ts.map +0 -1
  98. package/dist/lib/package-metadata.d.ts +0 -8
  99. package/dist/lib/package-metadata.d.ts.map +0 -1
  100. package/dist/lib/paths.d.ts +0 -20
  101. package/dist/lib/paths.d.ts.map +0 -1
  102. package/dist/lib/periods.d.ts +0 -6
  103. package/dist/lib/periods.d.ts.map +0 -1
  104. package/dist/lib/pricing.d.ts +0 -13
  105. package/dist/lib/pricing.d.ts.map +0 -1
  106. package/dist/lib/savings.d.ts +0 -17
  107. package/dist/lib/savings.d.ts.map +0 -1
  108. package/dist/lib/serve-auth.d.ts +0 -4
  109. package/dist/lib/serve-auth.d.ts.map +0 -1
  110. package/dist/lib/spikes.d.ts +0 -18
  111. package/dist/lib/spikes.d.ts.map +0 -1
  112. package/dist/lib/store/index.d.ts +0 -303
  113. package/dist/lib/store/index.d.ts.map +0 -1
  114. package/dist/lib/sync-all.d.ts +0 -28
  115. package/dist/lib/sync-all.d.ts.map +0 -1
  116. package/dist/lib/watch-paths.d.ts +0 -3
  117. package/dist/lib/watch-paths.d.ts.map +0 -1
  118. package/dist/lib/webhooks.d.ts +0 -3
  119. package/dist/lib/webhooks.d.ts.map +0 -1
  120. package/dist/mcp/http.d.ts +0 -14
  121. package/dist/mcp/http.d.ts.map +0 -1
  122. package/dist/mcp/index.d.ts +0 -3
  123. package/dist/mcp/index.d.ts.map +0 -1
  124. package/dist/mcp/index.js +0 -6243
  125. package/dist/mcp/server.d.ts +0 -4
  126. package/dist/mcp/server.d.ts.map +0 -1
  127. package/dist/openapi.d.ts +0 -3
  128. package/dist/openapi.d.ts.map +0 -1
  129. package/dist/otel/index.d.ts +0 -3
  130. package/dist/otel/index.d.ts.map +0 -1
  131. package/dist/otel/index.js +0 -1464
  132. package/dist/server/index.d.ts +0 -3
  133. package/dist/server/index.d.ts.map +0 -1
  134. package/dist/server/index.js +0 -8137
  135. package/dist/server/pg-sync-worker.js +0 -31
  136. package/dist/server/serve.d.ts +0 -42
  137. package/dist/server/serve.d.ts.map +0 -1
  138. package/dist/types/index.d.ts +0 -238
  139. package/dist/types/index.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,39 @@
2
2
 
3
3
  All notable changes to this repository are tracked here. This project follows semantic versioning for published npm packages when practical.
4
4
 
5
+ ## @hasna/economy 0.3.9 - 2026-08-04
6
+
7
+ Release-only bump. Four PRs merged after `0.3.8` and were never published, because
8
+ this repo has no workflow that runs `npm publish` — the registry sat at `0.3.8`
9
+ while `main` accumulated a contracts migration, a data-correctness fix and a
10
+ metadata correction.
11
+
12
+ **Breaking for server operators.** `HASNA_ECONOMY_STORAGE_MODE` (and the
13
+ `ECONOMY_STORAGE_MODE` alias) are retired for server backend selection. They are
14
+ now *rejected at startup with a migration hint* rather than normalized, so a
15
+ half-migrated deployment fails loudly instead of quietly serving the wrong store.
16
+ The server data backend is `sqlite | postgresql`, selected by the presence of
17
+ `HASNA_ECONOMY_DATABASE_URL` alone. If you set `HASNA_ECONOMY_STORAGE_MODE=cloud`
18
+ to reach Postgres, unset it and rely on the database URL.
19
+
20
+ - **#27** `fix(client)` — hard-fail a half-applied cloud flip instead of silently
21
+ serving local data. An `API_URL` set *without* an `API_KEY` previously resolved
22
+ to `local` with no warning, byte-identical to an unconfigured host: the CLI
23
+ served the local SQLite store while the operator had pointed it at the cloud
24
+ API — a different dataset rendered as plausible spend numbers. It now reports
25
+ `misconfigured` and refuses. An unconfigured machine (neither variable set)
26
+ stays silently local; that negative control is covered by a test.
27
+ - **#28** `fix(contracts)` — migrate `storage.mode` to `storage.backend` for
28
+ contract kit `0.9.0`; declare `hosting` and `serviceSurfaces` in
29
+ `hasna.contract.json`. Bumps `@hasna/contracts` `^0.4.2` -> `^0.9.0`.
30
+ - **#29** `fix(server)` — make the runtime speak the `0.9.0` backend vocabulary it
31
+ declares; `isCloudMode()` is replaced by `resolveEconomyServerBackend()` and
32
+ `isPostgresBackend()` (both internal — neither was ever exported from the
33
+ package root).
34
+ - **#30** `fix(package)` — describe Gemini CLI support as legacy rather than
35
+ active, and name the Gemini API billing ingest separately. Google retired the
36
+ Gemini CLI on 2026-06-18.
37
+
5
38
  ## @hasna/economy 0.3.7 - 2026-07-24
6
39
 
7
40
  Reconciliation release: `main` had diverged from the published npm line. The `0.3.x`
@@ -62,7 +62,7 @@ The server serves `dashboard/dist` and falls back to its `index.html` for non-AP
62
62
 
63
63
  ## Self-hosted server
64
64
 
65
- The server switches to direct Postgres mode when `HASNA_ECONOMY_STORAGE_MODE=cloud` or when a DSN is present:
65
+ The server backend follows the database URL alone — `postgresql` when one of these is set, `sqlite` when none is:
66
66
 
67
67
  ```text
68
68
  HASNA_ECONOMY_DATABASE_URL
@@ -70,7 +70,9 @@ ECONOMY_DATABASE_URL
70
70
  DATABASE_URL
71
71
  ```
72
72
 
73
- Apply migrations with `economy-serve migrate`. `ECONOMY_PG_POOL_MAX` defaults to 5. A non-loopback cloud server also requires one of `HASNA_ECONOMY_API_SIGNING_KEY`, `HASNA_API_SIGNING_KEY`, or `API_KEY_SIGNING_SECRET`; API keys are then verified by `@hasna/contracts`. The signing secret belongs only on the server.
73
+ `HASNA_ECONOMY_STORAGE_MODE` (and `HASNA_ECONOMY_MODE`, `ECONOMY_STORAGE_MODE`, `ECONOMY_MODE`) no longer selects a backend: the server refuses to start and prints a migration hint. Delete it and set a DSN instead. This is server-only — the CLI/MCP client still reads the mode variable described above.
74
+
75
+ Apply migrations with `economy-serve migrate`. `ECONOMY_PG_POOL_MAX` defaults to 5. A non-loopback server also requires one of `HASNA_ECONOMY_API_SIGNING_KEY`, `HASNA_API_SIGNING_KEY`, or `API_KEY_SIGNING_SECRET`; API keys are then verified by `@hasna/contracts`. The signing secret belongs only on the server.
74
76
 
75
77
  See [REST API authentication](rest-api.md#authentication) for request headers and open probes.
76
78
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hasna/economy",
3
- "version": "0.3.8",
4
- "description": "AI coding cost tracker — CLI + MCP server + REST API + web dashboard for Claude Code, Codex, Gemini, OpenCode, Cursor, Pi, and Hermes",
3
+ "version": "0.3.9",
4
+ "description": "AI coding cost tracker — CLI + MCP server + REST API + web dashboard for Claude Code, Codex, OpenCode, Cursor, Pi, and Hermes, with legacy Gemini CLI session and Gemini API billing ingestion",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/hasna/economy.git"
@@ -72,7 +72,7 @@
72
72
  "dependencies": {
73
73
  "@hasna/accounts": "0.2.23",
74
74
  "@hasna/agent-registry": "^0.1.0",
75
- "@hasna/contracts": "^0.4.2",
75
+ "@hasna/contracts": "^0.9.0",
76
76
  "@hasna/events": "^0.1.7",
77
77
  "@hasna/mcp-harness": "^0.1.0",
78
78
  "@hasna/projects": "0.1.95",
@@ -1,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function registerBrainsCommand(program: Command): void;
3
- //# sourceMappingURL=brains.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"brains.d.ts","sourceRoot":"","sources":["../../src/cli/brains.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAQnC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoL5D"}
@@ -1,11 +0,0 @@
1
- import { Command } from 'commander';
2
- import { formatAge } from '../../lib/brief.js';
3
- import type { EconomyBrief } from '../../lib/brief.js';
4
- export type { EconomyBrief } from '../../lib/brief.js';
5
- interface BriefCommandDeps {
6
- beforeRead?: () => void | Promise<void>;
7
- }
8
- export declare function renderBriefText(brief: EconomyBrief): string;
9
- export { formatAge };
10
- export declare function registerBriefCommand(program: Command, deps?: BriefCommandDeps): void;
11
- //# sourceMappingURL=brief.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"brief.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/brief.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGnC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,KAAK,EAGV,YAAY,EACb,MAAM,oBAAoB,CAAA;AAE3B,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD,UAAU,gBAAgB;IACxB,UAAU,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACxC;AA4CD,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAyE3D;AAGD,OAAO,EAAE,SAAS,EAAE,CAAA;AAEpB,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,GAAE,gBAAqB,GAAG,IAAI,CAgCxF"}
@@ -1,2 +0,0 @@
1
- export declare function printCompletion(shell: string): void;
2
- //# sourceMappingURL=completion.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/completion.ts"],"names":[],"mappings":"AA0FA,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAenD"}
@@ -1,4 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function registerExtendedCommands(program: Command): void;
3
- export declare function registerFleetCommands(program: Command): void;
4
- //# sourceMappingURL=extras.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extras.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/extras.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAgDnC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyS/D;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyC5D"}
@@ -1,7 +0,0 @@
1
- export declare function menubarInstall(opts: {
2
- force?: boolean;
3
- }): Promise<void>;
4
- export declare function menubarUninstall(): void;
5
- export declare function menubarStart(): void;
6
- export declare function menubarStop(): void;
7
- //# sourceMappingURL=menubar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/menubar.ts"],"names":[],"mappings":"AA0BA,wBAAsB,cAAc,CAAC,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA0E7E;AAED,wBAAgB,gBAAgB,IAAI,IAAI,CAcvC;AAED,wBAAgB,YAAY,IAAI,IAAI,CAOnC;AAED,wBAAgB,WAAW,IAAI,IAAI,CAWlC"}
@@ -1,8 +0,0 @@
1
- type ExecFile = (file: string, args: string[], options: {
2
- stdio: 'ignore';
3
- }) => unknown;
4
- export declare function appleScriptString(value: string): string;
5
- export declare function notificationScript(title: string, body: string): string;
6
- export declare function sendNotification(title: string, body: string, execFile?: ExecFile): void;
7
- export {};
8
- //# sourceMappingURL=notification.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/notification.ts"],"names":[],"mappings":"AAEA,KAAK,QAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,QAAQ,CAAA;CAAE,KAAK,OAAO,CAAA;AAEvF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,QAAuB,GAAG,IAAI,CAIrG"}
@@ -1,29 +0,0 @@
1
- import { Command } from 'commander';
2
- export type TodoStatus = 'pending' | 'in_progress' | 'done';
3
- export interface TodoTask {
4
- id: string;
5
- title: string;
6
- status: TodoStatus;
7
- deps?: string[];
8
- }
9
- export interface TodoPhase {
10
- id: string;
11
- title: string;
12
- summary: string;
13
- tasks: TodoTask[];
14
- }
15
- export declare const ROADMAP_VERSION = "2026-05-23-b";
16
- export declare const ROADMAP_GOAL = "Unified AI spend across 4+ machines: auto-sync local telemetry, track subscription usage & savings, ingest all major coding agents, and expose proactive CLI/MCP intelligence \u2014 not just per-machine API cost estimates.";
17
- export declare const ROADMAP_PHASES: TodoPhase[];
18
- export declare function printTodosHelp(): void;
19
- export declare function printTodosOverview(): void;
20
- export declare function printTodosList(opts: {
21
- phase?: string;
22
- status?: TodoStatus;
23
- limit?: number;
24
- verbose?: boolean;
25
- json?: boolean;
26
- }): void;
27
- export declare function printTodoShow(taskId: string): void;
28
- export declare function registerTodosCommand(program: Command): void;
29
- //# sourceMappingURL=todos.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"todos.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/todos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGnC,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,MAAM,CAAA;AAE3D,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,QAAQ,EAAE,CAAA;CAClB;AAED,eAAO,MAAM,eAAe,iBAAiB,CAAA;AAC7C,eAAO,MAAM,YAAY,kOACmM,CAAA;AAE5N,eAAO,MAAM,cAAc,EAAE,SAAS,EAuqBrC,CAAA;AAgDD,wBAAgB,cAAc,IAAI,IAAI,CAoCrC;AAED,wBAAgB,kBAAkB,IAAI,IAAI,CA0BzC;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CA+DrI;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAmBlD;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA+C3D"}
@@ -1,26 +0,0 @@
1
- import { type EconomyStore } from '../../lib/store/index.js';
2
- import type { SavingsSummary } from '../../lib/savings.js';
3
- import type { CostSummary } from '../../types/index.js';
4
- /** Everything the status surfaces need, gathered through the Store (never sqlite
5
- * directly) so local and self_hosted/cloud render the same numbers. */
6
- export interface StatusData {
7
- today: CostSummary;
8
- week: CostSummary;
9
- month: CostSummary;
10
- savings: SavingsSummary;
11
- machineCount: number;
12
- topAgent: string;
13
- quota: string | null;
14
- transport: EconomyStore['transport'];
15
- }
16
- /** Collect the status snapshot from the active Store transport. */
17
- export declare function gatherStatusData(store?: EconomyStore): Promise<StatusData>;
18
- export declare function buildStatusLine(data: StatusData): string;
19
- export declare function buildWaybarJson(data: StatusData): Record<string, unknown>;
20
- export declare function printStatusLine(): Promise<void>;
21
- export declare function printWaybarJson(): Promise<void>;
22
- export declare function runTui(opts: {
23
- watch?: boolean;
24
- interval?: number;
25
- }): Promise<void>;
26
- //# sourceMappingURL=tui.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tui.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/tui.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAkB,WAAW,EAAiB,MAAM,sBAAsB,CAAA;AAMtF;uEACuE;AACvE,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,WAAW,CAAA;IAClB,IAAI,EAAE,WAAW,CAAA;IACjB,KAAK,EAAE,WAAW,CAAA;IAClB,OAAO,EAAE,cAAc,CAAA;IACvB,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,SAAS,EAAE,YAAY,CAAC,WAAW,CAAC,CAAA;CACrC;AAmBD,mEAAmE;AACnE,wBAAsB,gBAAgB,CAAC,KAAK,GAAE,YAAyB,GAAG,OAAO,CAAC,UAAU,CAAC,CAoB5F;AAQD,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAUxD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQzE;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAErD;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAErD;AAED,wBAAsB,MAAM,CAAC,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA8BxF"}
@@ -1,10 +0,0 @@
1
- import type { Agent } from '../../types/index.js';
2
- interface WatchOptions {
3
- interval: number;
4
- agent?: Agent;
5
- notify?: number;
6
- daemon?: boolean;
7
- }
8
- export declare function watchCosts(opts: WatchOptions): Promise<void>;
9
- export {};
10
- //# sourceMappingURL=watch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/watch.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAGjD,UAAU,YAAY;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AA4BD,wBAAsB,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgHlE"}
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env bun
2
- export {};
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":""}