@stage-labs/metro 0.1.0-beta.167 → 0.1.0-beta.169
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 +1 -1
- package/runtime/marketplace/plugin/.claude-plugin/plugin.json +1 -1
- package/runtime/node_modules/@metro-labs/daemon/src/gateway/effort.ts +7 -0
- package/runtime/node_modules/@metro-labs/daemon/src/gateway/gateway.ts +2 -2
- package/runtime/node_modules/@metro-labs/daemon/src/gateway/provider-models.ts +2 -1
- package/runtime/runtime.json +1 -1
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.169",
|
|
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.169",
|
|
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, and the standing rules loaded at each session start. No vendor credential ever sits in a config file.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Bonustrack",
|
|
@@ -63,6 +63,13 @@ export function effortToApply(body: Body): string | null {
|
|
|
63
63
|
|
|
64
64
|
export const cappedEffort = (effort: string): string => (ABOVE_HIGH.has(effort) ? 'high' : effort);
|
|
65
65
|
|
|
66
|
+
const THINKING_ALWAYS_ON = /claude-(fable|mythos)-5|claude-opus-5-5/;
|
|
67
|
+
|
|
68
|
+
export function withThinkingFor(body: Body, model: string): Body {
|
|
69
|
+
if (!THINKING_ALWAYS_ON.test(model) || record(body.thinking).type !== 'disabled') return body;
|
|
70
|
+
return Object.fromEntries(Object.entries(body).filter(([key]) => key !== 'thinking'));
|
|
71
|
+
}
|
|
72
|
+
|
|
66
73
|
export function withBlockBinding(body: Body): Body {
|
|
67
74
|
const thinking = body.thinking;
|
|
68
75
|
if (!isRecord(thinking) || thinking.block_binding !== undefined) return body;
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
type Adaptations,
|
|
11
11
|
} from './bedrock.js';
|
|
12
12
|
import { addBeta, anthropicHeaders, forwardedHeaders, GatewayError, parseJson, pipeResponse, readBody, sendError, watchUpstream } from './forward.js';
|
|
13
|
-
import { BINDING_BETA, cappedEffort, effortToApply, plannedEffort, withBlockBinding, withEffort } from './effort.js';
|
|
13
|
+
import { BINDING_BETA, cappedEffort, effortToApply, plannedEffort, withBlockBinding, withEffort, withThinkingFor } from './effort.js';
|
|
14
14
|
import { notReady, readModelConfig, resolveRoute, routeLabel, setCodexAuth, setGeminiAuth, writeModelConfig, type Connection, type ModelConfig, type Route } from './model-config.js';
|
|
15
15
|
import { codexCount, codexMessages, freshCodexState } from './codex.js';
|
|
16
16
|
import { freshGeminiState, geminiCount, geminiMessages } from './gemini.js';
|
|
@@ -99,7 +99,7 @@ interface Payloads {
|
|
|
99
99
|
function anthropicPayloads(raw: Buffer, sent: Record<string, unknown>, shaped: Record<string, unknown>, model: string): Payloads {
|
|
100
100
|
const rewrite = typeof sent.model === 'string' && sent.model !== model;
|
|
101
101
|
const asSent = rewrite ? Buffer.from(JSON.stringify({ ...sent, model })) : raw;
|
|
102
|
-
const bound = withBlockBinding(shaped);
|
|
102
|
+
const bound = withBlockBinding(withThinkingFor(shaped, model));
|
|
103
103
|
if (bound === sent) return { metro: asSent, asSent: null, bound: false };
|
|
104
104
|
return { metro: Buffer.from(JSON.stringify(rewrite ? { ...bound, model } : bound)), asSent, bound: bound !== shaped };
|
|
105
105
|
}
|
|
@@ -13,9 +13,10 @@ export interface ProviderModel {
|
|
|
13
13
|
|
|
14
14
|
export const KNOWN_CLAUDE: ProviderModel[] = [
|
|
15
15
|
{ id: 'claude-fable-5-1', name: 'Claude Fable 5.1' },
|
|
16
|
+
{ id: 'claude-opus-5-5', name: 'Claude Opus 5.5' },
|
|
16
17
|
{ id: 'claude-opus-5', name: 'Claude Opus 5' },
|
|
17
18
|
{ id: 'claude-sonnet-5', name: 'Claude Sonnet 5' },
|
|
18
|
-
{ id: 'claude-haiku-4-5
|
|
19
|
+
{ id: 'claude-haiku-4-5', name: 'Claude Haiku 4.5' },
|
|
19
20
|
];
|
|
20
21
|
|
|
21
22
|
const str = (value: unknown): string => (typeof value === 'string' ? value : '');
|
package/runtime/runtime.json
CHANGED