@stage-labs/metro 0.1.0-beta.111 → 0.1.0-beta.112
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/runtime-install.js
CHANGED
|
@@ -41,18 +41,24 @@ function readOrNull(path) {
|
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
+
function copyMarketplace(sources, store) {
|
|
45
|
+
const staged = join(sources, MARKETPLACE);
|
|
46
|
+
if (!existsSync(staged))
|
|
47
|
+
return false;
|
|
48
|
+
cpSync(staged, join(store, MARKETPLACE), { recursive: true });
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
44
51
|
function syncSources(sources, store) {
|
|
45
52
|
const shim = join(sources, STORE_ENTRY);
|
|
46
53
|
if (existsSync(shim))
|
|
47
54
|
copyFileSync(shim, join(store, STORE_ENTRY));
|
|
48
55
|
const stamp = readOrNull(join(sources, 'runtime.json'));
|
|
49
56
|
if (stamp !== null && readOrNull(join(store, 'runtime.json')) === stamp)
|
|
50
|
-
return false;
|
|
57
|
+
return existsSync(join(store, MARKETPLACE)) ? false : copyMarketplace(sources, store);
|
|
51
58
|
rmSync(join(store, METRO_SOURCES), { recursive: true, force: true });
|
|
52
59
|
cpSync(join(sources, METRO_SOURCES), join(store, METRO_SOURCES), { recursive: true });
|
|
53
60
|
rmSync(join(store, MARKETPLACE), { recursive: true, force: true });
|
|
54
|
-
|
|
55
|
-
cpSync(join(sources, MARKETPLACE), join(store, MARKETPLACE), { recursive: true });
|
|
61
|
+
copyMarketplace(sources, store);
|
|
56
62
|
if (stamp !== null)
|
|
57
63
|
writeFileSync(join(store, 'runtime.json'), stamp);
|
|
58
64
|
return true;
|
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.112",
|
|
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.112",
|
|
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",
|
|
@@ -115,9 +115,21 @@ async function ensureInstalled(run: Run, wanted: string | null): Promise<PluginO
|
|
|
115
115
|
return (await step(run, ['plugin', 'update', PLUGIN, '-y'])) ? 'updated' : 'failed';
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
function explainMissingMarketplace(env: NodeJS.ProcessEnv = process.env): void {
|
|
119
|
+
const store = env.METRO_RUNTIME_STORE?.trim() ?? '';
|
|
120
|
+
if (store === '') return;
|
|
121
|
+
log.warn(
|
|
122
|
+
{ store },
|
|
123
|
+
'plugin: the runtime store holds no plugin marketplace, so metro cannot install its Claude Code plugin; a `metro serve` started before beta.97 never copied it, restart the service once',
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
118
127
|
export async function ensureMetroPlugin(deps?: Partial<PluginInstallDeps>): Promise<PluginOutcome> {
|
|
119
128
|
const dir = deps?.marketplaceDir === undefined ? stagedMarketplaceDir() : deps.marketplaceDir;
|
|
120
|
-
if (dir === null)
|
|
129
|
+
if (dir === null) {
|
|
130
|
+
if (deps?.marketplaceDir === undefined) explainMissingMarketplace();
|
|
131
|
+
return 'skipped';
|
|
132
|
+
}
|
|
121
133
|
const run = deps?.run === undefined ? await findClaude() : deps.run;
|
|
122
134
|
if (run === null) {
|
|
123
135
|
log.info('plugin: claude is not on this machine, so metro leaves its Claude Code plugin alone');
|
package/runtime/runtime.json
CHANGED