@stage-labs/metro 0.1.0-beta.136 → 0.1.0-beta.137

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stage-labs/metro",
3
- "version": "0.1.0-beta.136",
3
+ "version": "0.1.0-beta.137",
4
4
  "description": "The metro command line. Sign in once per machine, then hand your MCP connector list to Claude Code without the credentials touching disk, argv or shell history.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "metro",
3
- "version": "0.1.0-beta.136",
3
+ "version": "0.1.0-beta.137",
4
4
  "description": "Metro for Claude Code, installed by the metro daemon on this machine: every connector the agent holds as its own MCP server relayed through the daemon, the orchestrator-only guard on the main thread, the standing rules loaded at each session start, and a refresh skill for when the daemon could not keep the server list current. No vendor credential ever sits in a config file.",
5
5
  "author": {
6
6
  "name": "Bonustrack",
@@ -1,7 +1,7 @@
1
1
  import { webhookPort } from '../net/tunnel.js';
2
2
  import type { IncomingMessage, ServerResponse } from 'node:http';
3
3
  import { parseId } from '@metro-labs/core/ids';
4
- import { errMsg, log } from '@metro-labs/core/log';
4
+ import { log } from '@metro-labs/core/log';
5
5
  import {
6
6
  apiFailure,
7
7
  apiSession, requireAdmin,
@@ -247,8 +247,8 @@ export function handleAgentApiRequest(
247
247
  return true;
248
248
  }
249
249
  dispatch(req, res, deps, tgt).catch((err: unknown) => {
250
- log.warn({ err: errMsg(err) }, 'agent-api: unhandled error');
251
- if (!res.headersSent) sendJson(req, res, 500, { error: 'agent api failed' });
250
+ if (res.headersSent) return;
251
+ apiFailure(req, res, err, 'agent-api');
252
252
  });
253
253
  return true;
254
254
  }
@@ -1,5 +1,5 @@
1
1
  import type { IncomingMessage, ServerResponse } from 'node:http';
2
- import { errMsg, log } from '@metro-labs/core/log';
2
+ import { log } from '@metro-labs/core/log';
3
3
  import {
4
4
  apiFailure,
5
5
  apiSession,
@@ -302,9 +302,8 @@ export function handleConnectorApiRequest(
302
302
  return true;
303
303
  }
304
304
  dispatch(req, res, deps, tgt).catch((err: unknown) => {
305
- log.warn({ err: errMsg(err) }, 'connector-api: unhandled error');
306
- if (!res.headersSent)
307
- sendJson(req, res, 500, { error: 'connector api failed' });
305
+ if (res.headersSent) return;
306
+ apiFailure(req, res, err, 'connector-api');
308
307
  });
309
308
  return true;
310
309
  }
@@ -29,7 +29,7 @@ export function cors(req: IncomingMessage): Record<string, string> {
29
29
  return {
30
30
  'access-control-allow-origin': req.headers.origin ?? '*',
31
31
  'access-control-allow-methods': 'GET, POST, PUT, DELETE, OPTIONS',
32
- 'access-control-allow-headers': 'Authorization, Content-Type',
32
+ 'access-control-allow-headers': 'Authorization, Content-Type, X-Metro-Wallet',
33
33
  'access-control-allow-private-network': 'true',
34
34
  'access-control-max-age': '86400',
35
35
  vary: 'Origin',
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "0.1.0-beta.136"
2
+ "version": "0.1.0-beta.137"
3
3
  }