@hasna/economy 0.2.27 → 0.2.29
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/LICENSE +2 -1
- package/README.md +16 -1
- package/dist/cli/index.js +417 -189
- package/dist/db/database.d.ts +10 -5
- package/dist/db/database.d.ts.map +1 -1
- package/dist/index.js +268 -162
- package/dist/lib/accounts.d.ts.map +1 -1
- package/dist/mcp/http.d.ts +13 -0
- package/dist/mcp/http.d.ts.map +1 -0
- package/dist/mcp/index.js +846 -670
- package/dist/mcp/server.d.ts +4 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/otel/index.js +35 -43
- package/dist/server/index.js +284 -170
- package/dist/server/serve.d.ts.map +1 -1
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
Apache License
|
|
2
3
|
Version 2.0, January 2004
|
|
3
4
|
http://www.apache.org/licenses/
|
|
@@ -175,7 +176,7 @@
|
|
|
175
176
|
|
|
176
177
|
END OF TERMS AND CONDITIONS
|
|
177
178
|
|
|
178
|
-
Copyright 2026
|
|
179
|
+
Copyright 2026 Hasna, Inc.
|
|
179
180
|
|
|
180
181
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
182
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -104,12 +104,14 @@ economy sync --backfill-machine
|
|
|
104
104
|
|
|
105
105
|
Full sync also imports active project metadata from `@hasna/projects` when the registry is available.
|
|
106
106
|
|
|
107
|
-
Account attribution is automatic when `@hasna/accounts` has a matching active, applied, or env-dir profile for the agent. You can also force attribution for a process with `ECONOMY_ACCOUNT=tool:name` or agent-specific overrides such as `ECONOMY_CODEX_ACCOUNT=codex:work`.
|
|
107
|
+
Account attribution is automatic when `@hasna/accounts` has a matching active, applied, or env-dir profile for the agent. Account identity is the email address plus coding agent, so `work@example.com` under Codex and Claude is reported as two accounts. You can also force attribution for a process with `ECONOMY_ACCOUNT=tool:name` or agent-specific overrides such as `ECONOMY_CODEX_ACCOUNT=codex:work`.
|
|
108
108
|
|
|
109
109
|
Session drilldown can be scoped to an account key, account name, or email:
|
|
110
110
|
|
|
111
111
|
```bash
|
|
112
112
|
economy sessions --account work@example.com
|
|
113
|
+
economy accounts month
|
|
114
|
+
economy breakdown --by account
|
|
113
115
|
```
|
|
114
116
|
|
|
115
117
|
Account breakdowns report `api_equivalent_usd` for the API list-price value of the usage, plus `billable_usd`/`metered_api_usd` for known direct API spend and `subscription_included_usd` for usage covered by a subscription.
|
|
@@ -261,6 +263,19 @@ cd dashboard && bun run lint
|
|
|
261
263
|
cd menubar && swift build -c release
|
|
262
264
|
```
|
|
263
265
|
|
|
266
|
+
## HTTP mode
|
|
267
|
+
|
|
268
|
+
Shared Streamable HTTP transport for multi-agent sessions (stdio remains the default):
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
economy-mcp --http # http://127.0.0.1:8815/mcp
|
|
272
|
+
MCP_HTTP=1 economy-mcp # same
|
|
273
|
+
economy-mcp --http --port 8815 # explicit port
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
- Health: `GET http://127.0.0.1:8815/health` → `{"status":"ok","name":"economy"}`
|
|
277
|
+
- Override port with `MCP_HTTP_PORT` or `--port`
|
|
278
|
+
|
|
264
279
|
## License
|
|
265
280
|
|
|
266
281
|
Apache-2.0 -- see [LICENSE](LICENSE)
|