@stage-labs/metro 0.1.0-beta.49 → 0.1.0-beta.50

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/dist/serve.js CHANGED
@@ -2,6 +2,7 @@ import { spawnSync } from 'node:child_process';
2
2
  import { existsSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
4
  import { agentsDir } from './local.js';
5
+ import { currentVersion } from './version.js';
5
6
  import { serveLockedBy, serveStateDir } from './control.js';
6
7
  import { findBun, localPort, runtimeDir, SERVER_ENTRY, spawnPlan, } from './runtime.js';
7
8
  const SCRUBBED = new Set(['METRO_RUN_TOKEN', 'METRO_AGENT', 'DATABASE_URL']);
@@ -83,6 +84,7 @@ export function servePlan(opts) {
83
84
  env: {
84
85
  ...env,
85
86
  METRO_MODE: 'local',
87
+ METRO_VERSION: currentVersion(),
86
88
  METRO_WEBHOOK_PORT: String(opts.port),
87
89
  METRO_HTTP_HOST: process.env.METRO_HTTP_HOST ?? '127.0.0.1',
88
90
  METRO_TRAINS_DIR: join(opts.dir, 'trains'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stage-labs/metro",
3
- "version": "0.1.0-beta.49",
3
+ "version": "0.1.0-beta.50",
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": {
@@ -6,6 +6,7 @@ import { setTrainCallBackend } from './train-call.js';
6
6
  import { errMsg, log, logFatalSync } from './log.js';
7
7
  import { acquireLock, isLocalMode, STATE_DIR, trainsDir } from './paths.js';
8
8
  import { installCrashGuard, markDaemonReady } from './crash-guard.js';
9
+ import { METRO_VERSION } from './version.js';
9
10
  import { quickTunnelWanted, Tunnel, webhookPort } from './tunnel.js';
10
11
  import {
11
12
  localConnectHint,
@@ -282,6 +283,7 @@ const hostedMode = (): ModeInfo => ({
282
283
  mode: linkedSource === null ? 'hosted' : 'linked',
283
284
  owner: null,
284
285
  project: null,
286
+ version: METRO_VERSION,
285
287
  });
286
288
 
287
289
  function sessionApis(): SessionApis {
@@ -9,6 +9,7 @@ import type { SessionApis } from './session-apis.js';
9
9
  import type { ModeInfo } from './mode-api.js';
10
10
  import type { ImportApiDeps } from './import-api.js';
11
11
  import { loadedAgentOf, type AgentBundle, type BundleApiDeps } from './bundle-api.js';
12
+ import { METRO_VERSION } from './version.js';
12
13
  import { fetchAgentWithCode } from './agent-import.js';
13
14
  import type { ConnectorApiDeps } from './connector-api.js';
14
15
  import { allowLocalConnectors } from './connector-url.js';
@@ -211,7 +212,7 @@ function importApi(deps: LocalModeDeps): ImportApiDeps {
211
212
  }
212
213
 
213
214
  function localModeInfo(): ModeInfo {
214
- return { mode: 'local', owner: localOwner(), project: LOCAL_PROJECT_ID };
215
+ return { mode: 'local', owner: localOwner(), project: LOCAL_PROJECT_ID, version: METRO_VERSION };
215
216
  }
216
217
 
217
218
  export function localSessionApis(deps: LocalModeDeps): SessionApis {
@@ -9,6 +9,7 @@ export interface ModeInfo {
9
9
  mode: DaemonMode;
10
10
  owner: string | null;
11
11
  project: string | null;
12
+ version: string;
12
13
  }
13
14
 
14
15
  export function handleModeRequest(
@@ -1 +1,2 @@
1
- export const METRO_VERSION = process.env.npm_package_version ?? '0.1.0-beta.15';
1
+ export const METRO_VERSION =
2
+ process.env.METRO_VERSION ?? process.env.npm_package_version ?? 'dev';
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "0.1.0-beta.49"
2
+ "version": "0.1.0-beta.50"
3
3
  }