@hasna/economy 0.2.29 → 0.2.30
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/README.md +2 -2
- package/dist/mcp/http.d.ts +1 -0
- package/dist/mcp/http.d.ts.map +1 -1
- package/dist/mcp/index.js +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -268,12 +268,12 @@ cd menubar && swift build -c release
|
|
|
268
268
|
Shared Streamable HTTP transport for multi-agent sessions (stdio remains the default):
|
|
269
269
|
|
|
270
270
|
```bash
|
|
271
|
-
economy-mcp --http # http://127.0.0.1:
|
|
271
|
+
economy-mcp --http # http://127.0.0.1:8860/mcp
|
|
272
272
|
MCP_HTTP=1 economy-mcp # same
|
|
273
273
|
economy-mcp --http --port 8815 # explicit port
|
|
274
274
|
```
|
|
275
275
|
|
|
276
|
-
- Health: `GET http://127.0.0.1:
|
|
276
|
+
- Health: `GET http://127.0.0.1:8860/health` -> `{"status":"ok","name":"economy"}`
|
|
277
277
|
- Override port with `MCP_HTTP_PORT` or `--port`
|
|
278
278
|
|
|
279
279
|
## License
|
package/dist/mcp/http.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_MCP_HTTP_PORT, MCP_NAME } from './server.js';
|
|
2
2
|
export { DEFAULT_MCP_HTTP_PORT, MCP_NAME };
|
|
3
|
+
export declare const MCP_HTTP_IDLE_TIMEOUT_SECONDS = 0;
|
|
3
4
|
export declare function isHttpMode(argv?: string[]): boolean;
|
|
4
5
|
export declare function isStdioMode(argv?: string[]): boolean;
|
|
5
6
|
export declare function resolveHttpPort(argv?: string[]): number;
|
package/dist/mcp/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/mcp/http.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,qBAAqB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE1E,OA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AA;IACjB,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAChC;AAED,wBAAgB,eAAe,CAAC,OAAO,GAAE,sBAA2B,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,CAelG"}
|
package/dist/mcp/index.js
CHANGED
|
@@ -4018,6 +4018,7 @@ current machine: ${getMachineId()}`);
|
|
|
4018
4018
|
|
|
4019
4019
|
// src/mcp/http.ts
|
|
4020
4020
|
import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
|
|
4021
|
+
var MCP_HTTP_IDLE_TIMEOUT_SECONDS = 0;
|
|
4021
4022
|
function isHttpMode(argv = process.argv.slice(2)) {
|
|
4022
4023
|
return argv.includes("--http") || process.env["MCP_HTTP"] === "1";
|
|
4023
4024
|
}
|
|
@@ -4068,6 +4069,7 @@ function startHttpServer(options = {}) {
|
|
|
4068
4069
|
const server = Bun.serve({
|
|
4069
4070
|
port,
|
|
4070
4071
|
hostname: hostname2,
|
|
4072
|
+
idleTimeout: MCP_HTTP_IDLE_TIMEOUT_SECONDS,
|
|
4071
4073
|
fetch: handleMcpHttpRequest
|
|
4072
4074
|
});
|
|
4073
4075
|
const address = `http://${hostname2}:${server.port}`;
|
|
@@ -4083,13 +4085,13 @@ Runs the ${packageMetadata.name} MCP server (stdio by default).
|
|
|
4083
4085
|
|
|
4084
4086
|
Options:
|
|
4085
4087
|
--http Serve MCP over Streamable HTTP on 127.0.0.1
|
|
4086
|
-
-p, --port <port> HTTP port (default: MCP_HTTP_PORT or
|
|
4088
|
+
-p, --port <port> HTTP port (default: MCP_HTTP_PORT or 8860)
|
|
4087
4089
|
-V, --version output the version number
|
|
4088
4090
|
-h, --help display help for command
|
|
4089
4091
|
|
|
4090
4092
|
Environment:
|
|
4091
4093
|
MCP_HTTP=1 Enable HTTP mode
|
|
4092
|
-
MCP_HTTP_PORT Override default HTTP port (
|
|
4094
|
+
MCP_HTTP_PORT Override default HTTP port (8860)`);
|
|
4093
4095
|
}
|
|
4094
4096
|
var args = process.argv.slice(2);
|
|
4095
4097
|
if (args.includes("--help") || args.includes("-h")) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/economy",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.30",
|
|
4
4
|
"description": "AI coding cost tracker — CLI + MCP server + REST API + web dashboard for Claude Code, Codex, Gemini, OpenCode, Cursor, Pi, and Hermes",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|