@stage-labs/metro 0.1.0-beta.103 → 0.1.0-beta.104
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/claude.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { spawn, spawnSync } from 'node:child_process';
|
|
2
|
-
import { markOnboardingDone } from './onboarding.js';
|
|
2
|
+
import { markOnboardingDone, seedChannels } from './onboarding.js';
|
|
3
3
|
import { writeMcpConfig } from './mcp-config.js';
|
|
4
4
|
import { settingsConflicts, settingsFiles } from './claude-settings.js';
|
|
5
5
|
import { localAgents, pickLocalAgent } from './local.js';
|
|
@@ -135,8 +135,11 @@ function gatewayLaunchEnv(key, port) {
|
|
|
135
135
|
process.stderr.write(`metro claude: inference goes through the daemon at http://127.0.0.1:${String(port)}/gateway (the Model page decides where)\n`);
|
|
136
136
|
const routed = gatewayEnv(process.env, key, port);
|
|
137
137
|
const env = credentialEnv(routed, key, claudeSignedIn());
|
|
138
|
-
if (env !== routed)
|
|
138
|
+
if (env !== routed) {
|
|
139
139
|
process.stderr.write("metro claude: Claude Code has no login of its own here, so metro's key stands in as its credential; the Model page must route to Bedrock, OpenRouter or Codex\n");
|
|
140
|
+
if (seedChannels() === 'marked')
|
|
141
|
+
process.stderr.write('metro claude: marked Channels as available for Claude Code, which only asks Anthropic about them for a claude.ai login\n');
|
|
142
|
+
}
|
|
140
143
|
if (markOnboardingDone() === 'marked')
|
|
141
144
|
process.stderr.write("metro claude: skipped Claude Code's first-run setup, since it already has a credential here\n");
|
|
142
145
|
return env;
|
package/dist/onboarding.js
CHANGED
|
@@ -27,3 +27,17 @@ export function markOnboardingDone(path = claudeConfigPath()) {
|
|
|
27
27
|
writeFileSync(path, `${JSON.stringify({ ...config, [FLAG]: true }, null, 2)}\n`, { mode: 0o600 });
|
|
28
28
|
return 'marked';
|
|
29
29
|
}
|
|
30
|
+
const FEATURES = 'cachedGrowthBookFeatures';
|
|
31
|
+
const CHANNELS_FLAG = 'tengu_harbor';
|
|
32
|
+
const isRecord = (v) => typeof v === 'object' && v !== null && !Array.isArray(v);
|
|
33
|
+
export function seedChannels(path = claudeConfigPath()) {
|
|
34
|
+
const config = readConfig(path);
|
|
35
|
+
if (config === null)
|
|
36
|
+
return 'unreadable';
|
|
37
|
+
const features = isRecord(config[FEATURES]) ? config[FEATURES] : {};
|
|
38
|
+
if (features[CHANNELS_FLAG] === true)
|
|
39
|
+
return 'already';
|
|
40
|
+
const next = { ...config, [FEATURES]: { ...features, [CHANNELS_FLAG]: true } };
|
|
41
|
+
writeFileSync(path, `${JSON.stringify(next, null, 2)}\n`, { mode: 0o600 });
|
|
42
|
+
return 'marked';
|
|
43
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stage-labs/metro",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.104",
|
|
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.
|
|
3
|
+
"version": "0.1.0-beta.104",
|
|
4
4
|
"description": "Metro connectors for Claude Code. Runs beside the metro daemon on this machine: each connector the agent holds is one MCP server relayed through the daemon, the daemon keeps that list current on its own, and /reload-plugins picks up a new one without leaving your session. No vendor credential ever sits in a config file.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Bonustrack",
|
package/runtime/runtime.json
CHANGED