claude-use 11.34.0 → 11.35.0
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/README.md +2 -1
- package/dist/cli.cjs +43 -15
- package/dist/index.cjs +25 -9
- package/dist/index.mjs +25 -9
- package/dist/types/index.d.ts +21 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ agent-shim profile set <name> [--category <category>=<bool>]... [--entry <catego
|
|
|
98
98
|
agent-shim profile set <name> [--extends <profile>]... [--no-extends] [--description <text> | --no-description] [--json]
|
|
99
99
|
agent-shim profile set <name> [--[no-]launch-skip-permissions] [--[no-]launch-remote-control] [--[no-]launch-headroom] [--[no-]launch-track-usage]
|
|
100
100
|
agent-shim profile set <name> [--launch-claude-version <version> | --no-launch-claude-version] [--json] [--json]
|
|
101
|
-
agent-shim profile set <name> [--launch-delay <duration> | --no-launch-delay] [--[no-]launch-pause] [--[no-]launch-explain] [--json]
|
|
101
|
+
agent-shim profile set <name> [--launch-delay <duration> | --no-launch-delay] [--[no-]launch-pause] [--[no-]launch-explain] [--[no-]launch-route-by-name] [--json]
|
|
102
102
|
agent-shim profile set <name> [--launch-provider <provider> | --no-launch-provider] [--json]
|
|
103
103
|
agent-shim profile list [--json]
|
|
104
104
|
agent-shim profile show <name> [--json]
|
|
@@ -191,6 +191,7 @@ agent-shim run [@<identity>] [launch flags] [claude arguments]
|
|
|
191
191
|
# --claude-version <version> run exactly this installed Claude Code version
|
|
192
192
|
# --delay <duration> wait this long after the launcher's own output before starting claude; --[no-]pause waits for a key press instead
|
|
193
193
|
# --[no-]explain with @pool:<name>, list every member the pick ranked and why, not only the one picked
|
|
194
|
+
# --[no-]route-by-name route provider-qualified model names through the models block to the provider that serves them
|
|
194
195
|
# --native run the real claude with nothing from agent-shim applied; cannot be combined with the flags above
|
|
195
196
|
claude @<identity> ... # the same, once `agent-shim shim enable` has run
|
|
196
197
|
```
|
package/dist/cli.cjs
CHANGED
|
@@ -32631,6 +32631,9 @@ function flattenLayers(layers, options) {
|
|
|
32631
32631
|
if (layer.launch.explain !== void 0) {
|
|
32632
32632
|
launch.explain = layer.launch.explain;
|
|
32633
32633
|
}
|
|
32634
|
+
if (layer.launch.routeByName !== void 0) {
|
|
32635
|
+
launch.routeByName = layer.launch.routeByName;
|
|
32636
|
+
}
|
|
32634
32637
|
}
|
|
32635
32638
|
if (layer.models !== void 0) {
|
|
32636
32639
|
models = mergeModels(models, layer.models);
|
|
@@ -34442,7 +34445,7 @@ var init_package = __esm({
|
|
|
34442
34445
|
"package.json"() {
|
|
34443
34446
|
package_default = {
|
|
34444
34447
|
name: "claude-use",
|
|
34445
|
-
version: "11.
|
|
34448
|
+
version: "11.35.0",
|
|
34446
34449
|
description: "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
|
|
34447
34450
|
license: "MIT",
|
|
34448
34451
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -34707,6 +34710,7 @@ function identifyRequest(headers) {
|
|
|
34707
34710
|
sessionId: internalHeaderValue(headers, SESSION_HEADER),
|
|
34708
34711
|
provider: internalHeaderValue(headers, PROVIDER_HEADER),
|
|
34709
34712
|
headroom: internalHeaderValue(headers, HEADROOM_FLAG_HEADER) === "1",
|
|
34713
|
+
routeByName: internalHeaderValue(headers, ROUTE_BY_NAME_HEADER) === "1",
|
|
34710
34714
|
projectId: internalHeaderValue(headers, PROJECT_ID_HEADER)
|
|
34711
34715
|
},
|
|
34712
34716
|
forwardableHeaders: forwardable
|
|
@@ -34726,7 +34730,7 @@ function parseProviderPath(path65) {
|
|
|
34726
34730
|
}
|
|
34727
34731
|
return { provider: decodeURIComponent(tail.slice(0, slash)), rest: tail.slice(slash) };
|
|
34728
34732
|
}
|
|
34729
|
-
var HEADROOM_SESSION_HEADER, INTERNAL_HEADER_NAMES, IDENTITY_HEADER, SESSION_HEADER, PROVIDER_HEADER, HEADROOM_FLAG_HEADER, PROJECT_ID_HEADER, CLIENT_SESSION_HEADER, HEADROOM_BASE_URL_HEADER, AUTH_HEADER, HOP_SECRET_HEADER, HOP_ID_HEADER, PROVIDER_PATH_PREFIX;
|
|
34733
|
+
var HEADROOM_SESSION_HEADER, INTERNAL_HEADER_NAMES, IDENTITY_HEADER, SESSION_HEADER, PROVIDER_HEADER, HEADROOM_FLAG_HEADER, ROUTE_BY_NAME_HEADER, PROJECT_ID_HEADER, CLIENT_SESSION_HEADER, HEADROOM_BASE_URL_HEADER, AUTH_HEADER, HOP_SECRET_HEADER, HOP_ID_HEADER, PROVIDER_PATH_PREFIX;
|
|
34730
34734
|
var init_route = __esm({
|
|
34731
34735
|
"src/frontdoor/route.ts"() {
|
|
34732
34736
|
"use strict";
|
|
@@ -34735,6 +34739,7 @@ var init_route = __esm({
|
|
|
34735
34739
|
"x-agent-shim-identity",
|
|
34736
34740
|
"x-agent-shim-session",
|
|
34737
34741
|
"x-agent-shim-headroom",
|
|
34742
|
+
"x-agent-shim-route-by-name",
|
|
34738
34743
|
"x-agent-shim-auth",
|
|
34739
34744
|
"x-agent-shim-provider",
|
|
34740
34745
|
"x-agent-shim-hop",
|
|
@@ -34747,6 +34752,7 @@ var init_route = __esm({
|
|
|
34747
34752
|
SESSION_HEADER = "x-agent-shim-session";
|
|
34748
34753
|
PROVIDER_HEADER = "x-agent-shim-provider";
|
|
34749
34754
|
HEADROOM_FLAG_HEADER = "x-agent-shim-headroom";
|
|
34755
|
+
ROUTE_BY_NAME_HEADER = "x-agent-shim-route-by-name";
|
|
34750
34756
|
PROJECT_ID_HEADER = "x-headroom-project-id";
|
|
34751
34757
|
CLIENT_SESSION_HEADER = "x-claude-code-session-id";
|
|
34752
34758
|
HEADROOM_BASE_URL_HEADER = "x-headroom-base-url";
|
|
@@ -63266,7 +63272,8 @@ var init_argv = __esm({
|
|
|
63266
63272
|
{ flag: "--remote-control", key: "remoteControl" },
|
|
63267
63273
|
{ flag: "--wait", key: "wait" },
|
|
63268
63274
|
{ flag: "--pause", key: "pause" },
|
|
63269
|
-
{ flag: "--explain", key: "explain" }
|
|
63275
|
+
{ flag: "--explain", key: "explain" },
|
|
63276
|
+
{ flag: "--route-by-name", key: "routeByName" }
|
|
63270
63277
|
];
|
|
63271
63278
|
LAUNCHER_FLAG_NAMES = [
|
|
63272
63279
|
...VALUED_FLAGS,
|
|
@@ -63456,6 +63463,7 @@ function resolveLaunchFlags(params) {
|
|
|
63456
63463
|
trackUsage: params.flags?.trackUsage ?? parseEnvBool("AGENT_SHIM_TRACK_USAGE", params.env.AGENT_SHIM_TRACK_USAGE) ?? params.cascade?.trackUsage ?? true,
|
|
63457
63464
|
pause: params.flags?.pause ?? parseEnvBool("AGENT_SHIM_PAUSE", params.env.AGENT_SHIM_PAUSE) ?? params.cascade?.pause ?? false,
|
|
63458
63465
|
explain: params.flags?.explain ?? parseEnvBool("AGENT_SHIM_EXPLAIN", params.env.AGENT_SHIM_EXPLAIN) ?? params.cascade?.explain ?? false,
|
|
63466
|
+
routeByName: params.flags?.routeByName ?? parseEnvBool("AGENT_SHIM_ROUTE_BY_NAME", params.env.AGENT_SHIM_ROUTE_BY_NAME) ?? params.cascade?.routeByName ?? false,
|
|
63459
63467
|
delayMs: resolveDelayMs(params)
|
|
63460
63468
|
};
|
|
63461
63469
|
}
|
|
@@ -63524,6 +63532,7 @@ function buildEnv(params) {
|
|
|
63524
63532
|
{ name: SESSION_HEADER, value: params.sessionId },
|
|
63525
63533
|
{ name: AUTH_HEADER, value: params.frontdoor.sessionToken },
|
|
63526
63534
|
...params.provider === void 0 ? [] : [{ name: PROVIDER_HEADER, value: params.provider.name }],
|
|
63535
|
+
...params.routeByName ? [{ name: ROUTE_BY_NAME_HEADER, value: "1" }] : [],
|
|
63527
63536
|
...params.headroom === void 0 ? [] : [
|
|
63528
63537
|
{ name: HEADROOM_FLAG_HEADER, value: "1" },
|
|
63529
63538
|
{ name: PROJECT_ID_HEADER, value: params.headroom.projectId }
|
|
@@ -65645,6 +65654,7 @@ function decideLaunch(params, readOnly) {
|
|
|
65645
65654
|
...parsedArgv.trackUsage === void 0 ? {} : { trackUsage: parsedArgv.trackUsage },
|
|
65646
65655
|
...parsedArgv.pause === void 0 ? {} : { pause: parsedArgv.pause },
|
|
65647
65656
|
...parsedArgv.explain === void 0 ? {} : { explain: parsedArgv.explain },
|
|
65657
|
+
...parsedArgv.routeByName === void 0 ? {} : { routeByName: parsedArgv.routeByName },
|
|
65648
65658
|
...parsedArgv.delay === void 0 ? {} : { delay: parsedArgv.delay }
|
|
65649
65659
|
}
|
|
65650
65660
|
});
|
|
@@ -65788,7 +65798,8 @@ function prepareLaunch(params) {
|
|
|
65788
65798
|
...frontDoor === void 0 ? {} : { frontdoor: frontDoor },
|
|
65789
65799
|
...headroom === void 0 ? {} : { headroom },
|
|
65790
65800
|
sessionId,
|
|
65791
|
-
remoteControl: resolvedFlags.remoteControl
|
|
65801
|
+
remoteControl: resolvedFlags.remoteControl,
|
|
65802
|
+
routeByName: resolvedFlags.routeByName || resolvedProvider !== void 0 && isRouterProvider(resolvedProvider.definition)
|
|
65792
65803
|
});
|
|
65793
65804
|
const releases = [...headroom === void 0 || headroomPort === void 0 ? [] : [headroomPort.release], ...frontDoorRelease === void 0 ? [] : [frontDoorRelease]];
|
|
65794
65805
|
const release = () => {
|
|
@@ -65815,7 +65826,8 @@ function resolveLaunch(params) {
|
|
|
65815
65826
|
...frontDoor ? { frontdoor: { port: 0, connectPort: 0, trustBundlePath: "", sessionToken: "" } } : {},
|
|
65816
65827
|
...decided.flags.headroom ? { headroom: { socketPath: "", projectId: "" } } : {},
|
|
65817
65828
|
sessionId: "",
|
|
65818
|
-
remoteControl: decided.flags.remoteControl
|
|
65829
|
+
remoteControl: decided.flags.remoteControl,
|
|
65830
|
+
routeByName: decided.flags.routeByName
|
|
65819
65831
|
});
|
|
65820
65832
|
const credentialNames = decided.identityCredentialBlock === void 0 ? [] : Object.keys(credentialVariables(decided.identityCredentialBlock.target ?? "bearer", ""));
|
|
65821
65833
|
const environment = [.../* @__PURE__ */ new Set([...Object.keys(built).filter((name) => built[name] !== env[name]), ...credentialNames])].sort();
|
|
@@ -65827,7 +65839,7 @@ function resolveLaunch(params) {
|
|
|
65827
65839
|
bin: decided.bin,
|
|
65828
65840
|
args: decided.args,
|
|
65829
65841
|
...credential === void 0 ? {} : { credential },
|
|
65830
|
-
routing: { frontDoor, headroom: decided.flags.headroom },
|
|
65842
|
+
routing: { frontDoor, headroom: decided.flags.headroom, routeByName: decided.flags.routeByName },
|
|
65831
65843
|
environment
|
|
65832
65844
|
};
|
|
65833
65845
|
}
|
|
@@ -111842,6 +111854,9 @@ function applyProfileChange(paths, name, change) {
|
|
|
111842
111854
|
if (change.launchExplain !== void 0) {
|
|
111843
111855
|
launchPatch.explain = change.launchExplain;
|
|
111844
111856
|
}
|
|
111857
|
+
if (change.launchRouteByName !== void 0) {
|
|
111858
|
+
launchPatch.routeByName = change.launchRouteByName;
|
|
111859
|
+
}
|
|
111845
111860
|
if (Object.keys(launchPatch).length > 0) {
|
|
111846
111861
|
setProfileLaunchFlags(paths, name, launchPatch);
|
|
111847
111862
|
touched = true;
|
|
@@ -113128,7 +113143,7 @@ function registerProfileCommand(program2, deps) {
|
|
|
113128
113143
|
withExamples(
|
|
113129
113144
|
profile.command("set <name>").description(
|
|
113130
113145
|
"Update a configuration profile's categories, entries, extends list, description or launch settings. With no options on a terminal, walks through its categories."
|
|
113131
|
-
).option("--category <category=bool>", "Share (true) or hide (false) a whole category (repeatable).", collectBoolPair).option("--entry <path=bool>", "Share (true) or hide (false) one <category>/<path> entry (repeatable).", collectBoolPair).option("--extends <profile>", "Replace the extends list with these profiles (repeatable, in order).", collectRepeated).option("--no-extends", "Clear the extends list.").option("--description <text>", "Replace the description.").option("--no-description", "Clear the description.").option("--launch-skip-permissions", "Launches under this profile skip permission prompts.").option("--no-launch-skip-permissions", "Launches under this profile keep permission prompts.").option("--launch-remote-control", "Launches under this profile enable Remote Control.").option("--no-launch-remote-control", "Launches under this profile leave Remote Control off.").option("--launch-headroom", "Launches under this profile route through headroom.").option("--no-launch-headroom", "Launches under this profile route direct.").option("--launch-track-usage", "Launches under this profile route through the front door so their requests and quota are recorded, with no headroom needed.").option("--no-launch-track-usage", "Launches under this profile are not recorded unless a provider or headroom routes them anyway.").option("--launch-provider <provider>", "Launches under this profile route through this provider.").option("--no-launch-provider", "Clear this profile's provider selection.").option("--launch-claude-version <version>", "Launches under this profile run exactly this installed Claude Code version (such as 2.1.220); a version that is not installed fails the launch.").option("--no-launch-claude-version", "Clear this profile's Claude Code version pin.").option("--launch-delay <duration>", "Launches under this profile wait this long (such as 5s) after the launcher's own output before starting claude, so the output can be read.", parseDurationLiteral).option("--no-launch-delay", "Clear this profile's launch delay.").option("--launch-pause", "Launches under this profile wait for a key press after the launcher's own output before starting claude.").option("--no-launch-pause", "Launches under this profile start claude without waiting for a key press.").option("--launch-explain", "Launches under this profile that pick from a pool list every member the pick ranked and why, in the launcher's report.").option("--no-launch-explain", "Launches under this profile name only the member a pool pick chose.").option("--json", "Print the result as JSON.").action(async (name, allOptions) => {
|
|
113146
|
+
).option("--category <category=bool>", "Share (true) or hide (false) a whole category (repeatable).", collectBoolPair).option("--entry <path=bool>", "Share (true) or hide (false) one <category>/<path> entry (repeatable).", collectBoolPair).option("--extends <profile>", "Replace the extends list with these profiles (repeatable, in order).", collectRepeated).option("--no-extends", "Clear the extends list.").option("--description <text>", "Replace the description.").option("--no-description", "Clear the description.").option("--launch-skip-permissions", "Launches under this profile skip permission prompts.").option("--no-launch-skip-permissions", "Launches under this profile keep permission prompts.").option("--launch-remote-control", "Launches under this profile enable Remote Control.").option("--no-launch-remote-control", "Launches under this profile leave Remote Control off.").option("--launch-headroom", "Launches under this profile route through headroom.").option("--no-launch-headroom", "Launches under this profile route direct.").option("--launch-track-usage", "Launches under this profile route through the front door so their requests and quota are recorded, with no headroom needed.").option("--no-launch-track-usage", "Launches under this profile are not recorded unless a provider or headroom routes them anyway.").option("--launch-provider <provider>", "Launches under this profile route through this provider.").option("--no-launch-provider", "Clear this profile's provider selection.").option("--launch-claude-version <version>", "Launches under this profile run exactly this installed Claude Code version (such as 2.1.220); a version that is not installed fails the launch.").option("--no-launch-claude-version", "Clear this profile's Claude Code version pin.").option("--launch-delay <duration>", "Launches under this profile wait this long (such as 5s) after the launcher's own output before starting claude, so the output can be read.", parseDurationLiteral).option("--no-launch-delay", "Clear this profile's launch delay.").option("--launch-pause", "Launches under this profile wait for a key press after the launcher's own output before starting claude.").option("--no-launch-pause", "Launches under this profile start claude without waiting for a key press.").option("--launch-explain", "Launches under this profile that pick from a pool list every member the pick ranked and why, in the launcher's report.").option("--no-launch-explain", "Launches under this profile name only the member a pool pick chose.").option("--launch-route-by-name", "Launches under this profile route provider-qualified model names through the models block to the provider that serves them.").option("--no-launch-route-by-name", "Launches under this profile send every request to the launch provider.").option("--json", "Print the result as JSON.").action(async (name, allOptions) => {
|
|
113132
113147
|
const { json: json2, ...options } = allOptions;
|
|
113133
113148
|
requireProfileExists(paths, name);
|
|
113134
113149
|
if (Object.entries(allOptions).every(([key, value2]) => key === "json" || value2 === void 0)) {
|
|
@@ -128207,7 +128222,8 @@ var ConfigProfileSetInputSchema = external_exports.strictObject({
|
|
|
128207
128222
|
claudeVersion: external_exports.union([external_exports.string().min(1), external_exports.literal(false)]).optional(),
|
|
128208
128223
|
delay: external_exports.union([external_exports.string().regex(DURATION_RE), external_exports.literal(false)]).optional(),
|
|
128209
128224
|
pause: external_exports.boolean().optional(),
|
|
128210
|
-
explain: external_exports.boolean().optional()
|
|
128225
|
+
explain: external_exports.boolean().optional(),
|
|
128226
|
+
routeByName: external_exports.boolean().optional()
|
|
128211
128227
|
}).optional()
|
|
128212
128228
|
});
|
|
128213
128229
|
var ConfigProfileSetOutputSchema = storedMutationOutput("profile", "updated", ProfileValueSchema);
|
|
@@ -128419,7 +128435,8 @@ function createConfigApiRouter(deps) {
|
|
|
128419
128435
|
...launch?.claudeVersion === void 0 ? {} : { launchClaudeVersion: launch.claudeVersion },
|
|
128420
128436
|
...launch?.delay === void 0 ? {} : { launchDelay: launch.delay },
|
|
128421
128437
|
...launch?.pause === void 0 ? {} : { launchPause: launch.pause },
|
|
128422
|
-
...launch?.explain === void 0 ? {} : { launchExplain: launch.explain }
|
|
128438
|
+
...launch?.explain === void 0 ? {} : { launchExplain: launch.explain },
|
|
128439
|
+
...launch?.routeByName === void 0 ? {} : { launchRouteByName: launch.routeByName }
|
|
128423
128440
|
});
|
|
128424
128441
|
return { action: "updated", kind: "profile", name: input2.name, value: profileValue(input2.name, paths) };
|
|
128425
128442
|
})
|
|
@@ -128721,6 +128738,7 @@ var LaunchFlagsSchema = external_exports.strictObject({
|
|
|
128721
128738
|
trackUsage: external_exports.boolean(),
|
|
128722
128739
|
pause: external_exports.boolean(),
|
|
128723
128740
|
explain: external_exports.boolean(),
|
|
128741
|
+
routeByName: external_exports.boolean(),
|
|
128724
128742
|
/** How long the launch waits after its own output before it starts claude, in milliseconds. */
|
|
128725
128743
|
delayMs: external_exports.number()
|
|
128726
128744
|
});
|
|
@@ -128734,7 +128752,7 @@ var LaunchResolveOutputSchema = external_exports.strictObject({
|
|
|
128734
128752
|
args: external_exports.readonly(external_exports.array(external_exports.string())),
|
|
128735
128753
|
/** The credential the launch would authenticate with, by target and source kinds. Absent when none applies. */
|
|
128736
128754
|
credential: external_exports.strictObject({ subject: external_exports.enum(["provider", "identity"]), name: external_exports.string(), summary: CredentialSummarySchema }).optional(),
|
|
128737
|
-
routing: external_exports.strictObject({ frontDoor: external_exports.boolean(), headroom: external_exports.boolean() }),
|
|
128755
|
+
routing: external_exports.strictObject({ frontDoor: external_exports.boolean(), headroom: external_exports.boolean(), routeByName: external_exports.boolean() }),
|
|
128738
128756
|
/** The names of the environment variables the launch would set or unset, sorted. Values are not reported. */
|
|
128739
128757
|
environment: external_exports.readonly(external_exports.array(external_exports.string())),
|
|
128740
128758
|
warnings: external_exports.readonly(external_exports.array(external_exports.string()))
|
|
@@ -131108,19 +131126,22 @@ function scopeSessionProviderPath(request7) {
|
|
|
131108
131126
|
}
|
|
131109
131127
|
return { ...request7, url: `${PROVIDER_PATH_PREFIX}${encodeURIComponent(request7.session.provider)}${request7.url}` };
|
|
131110
131128
|
}
|
|
131111
|
-
function resolveModelTarget(model, models) {
|
|
131129
|
+
function resolveModelTarget(model, models, includeUnqualified) {
|
|
131112
131130
|
if (models === void 0) {
|
|
131113
131131
|
return model.includes("/") && !model.startsWith("acct:") ? model.split("/")[0] : void 0;
|
|
131114
131132
|
}
|
|
131115
131133
|
if (model.includes("/") && !model.startsWith("acct:")) {
|
|
131116
131134
|
return model.split("/")[0];
|
|
131117
131135
|
}
|
|
131136
|
+
if (!includeUnqualified) {
|
|
131137
|
+
return void 0;
|
|
131138
|
+
}
|
|
131118
131139
|
const virtual = models.virtual?.[model];
|
|
131119
131140
|
const first = virtual?.members.find((member) => !member.startsWith("acct:") && !member.startsWith("family:"));
|
|
131120
131141
|
if (first === void 0) {
|
|
131121
131142
|
return void 0;
|
|
131122
131143
|
}
|
|
131123
|
-
return first.includes("/") ? first.split("/")[0] : resolveModelTarget(first, models);
|
|
131144
|
+
return first.includes("/") ? first.split("/")[0] : resolveModelTarget(first, models, true);
|
|
131124
131145
|
}
|
|
131125
131146
|
function createProviderRouteResolver(deps) {
|
|
131126
131147
|
const oauthRoute = createPassthroughRoute("anthropic", { baseUrl: `https://${CONNECT_INTERCEPT_HOST}:${String(HTTPS_PORT)}`, stripPrefix: void 0, headroomUpstream: void 0 });
|
|
@@ -131285,12 +131306,17 @@ function createProviderRouteResolver(deps) {
|
|
|
131285
131306
|
routes = void 0;
|
|
131286
131307
|
isRouter = false;
|
|
131287
131308
|
}
|
|
131288
|
-
|
|
131309
|
+
const routesByName = isRouter || current.session.routeByName && providerName !== void 0;
|
|
131310
|
+
if (routesByName) {
|
|
131289
131311
|
const scan2 = await scanRequestHead(current, false);
|
|
131290
131312
|
if (scan2.replayed !== void 0) {
|
|
131291
131313
|
replay = scan2.replayed;
|
|
131292
131314
|
}
|
|
131293
|
-
const target = scan2.model === void 0 ? void 0 : resolveModelTarget(scan2.model, deps.models?.());
|
|
131315
|
+
const target = scan2.model === void 0 || providerName === void 0 ? void 0 : resolveModelTarget(scan2.model, deps.models?.(), isRouter || current.session.routeByName);
|
|
131316
|
+
if (target === providerName) {
|
|
131317
|
+
const resolution = resolve2(current);
|
|
131318
|
+
return resolution.ok && replay !== void 0 ? { ok: true, route: servingRewritten(resolution.route, { ...replay, url: current.url }), request: { ...replay, url: current.url } } : resolution.ok ? serveScoped(resolution) : resolution;
|
|
131319
|
+
}
|
|
131294
131320
|
if (target !== void 0) {
|
|
131295
131321
|
const rest2 = path65.slice(`${PROVIDER_PATH_PREFIX}${encodeURIComponent(providerName ?? "")}`.length);
|
|
131296
131322
|
const query2 = current.url.includes("?") ? current.url.slice(current.url.indexOf("?")) : "";
|
|
@@ -147936,11 +147962,12 @@ Launching:
|
|
|
147936
147962
|
--delay <duration> wait this long (5s, 500ms) after the launcher's own output before starting claude
|
|
147937
147963
|
--[no-]pause wait for a key press after the launcher's own output before starting claude
|
|
147938
147964
|
--[no-]explain with @pool:<name>, list every member the pick ranked and why, not only the one picked
|
|
147965
|
+
--[no-]route-by-name route provider-qualified model names through the models block to the provider that serves them
|
|
147939
147966
|
--native run the real claude with nothing from agent-shim applied (no other launch flag allowed)
|
|
147940
147967
|
|
|
147941
147968
|
Environment:
|
|
147942
147969
|
AGENT_SHIM_IDENTITY, AGENT_SHIM_CONFIG_PROFILE, AGENT_SHIM_SKIP_PERMISSIONS,
|
|
147943
|
-
AGENT_SHIM_REMOTE_CONTROL, AGENT_SHIM_HEADROOM, AGENT_SHIM_TRACK_USAGE, AGENT_SHIM_DELAY, AGENT_SHIM_PAUSE, AGENT_SHIM_EXPLAIN, AGENT_SHIM_ALLOW_AMBIENT_CREDENTIAL,
|
|
147970
|
+
AGENT_SHIM_REMOTE_CONTROL, AGENT_SHIM_HEADROOM, AGENT_SHIM_TRACK_USAGE, AGENT_SHIM_DELAY, AGENT_SHIM_PAUSE, AGENT_SHIM_EXPLAIN, AGENT_SHIM_ROUTE_BY_NAME, AGENT_SHIM_ALLOW_AMBIENT_CREDENTIAL,
|
|
147944
147971
|
AGENT_SHIM_CATEGORY_OVERRIDE, AGENT_SHIM_ENTRY_OVERRIDE, AGENT_SHIM_HOME,
|
|
147945
147972
|
AGENT_SHIM_DEBUG (print stack traces), NO_COLOR. Booleans are true, false, 1 or 0.
|
|
147946
147973
|
|
|
@@ -148664,6 +148691,7 @@ function otherLaunchFlags(parsed) {
|
|
|
148664
148691
|
...parsed.delay === void 0 ? [] : ["--delay"],
|
|
148665
148692
|
...parsed.pause === void 0 ? [] : ["--[no-]pause"],
|
|
148666
148693
|
...parsed.explain === void 0 ? [] : ["--[no-]explain"],
|
|
148694
|
+
...parsed.routeByName === void 0 ? [] : ["--[no-]route-by-name"],
|
|
148667
148695
|
...parsed.headroom === void 0 ? [] : ["--[no-]headroom"],
|
|
148668
148696
|
...parsed.trackUsage === void 0 ? [] : ["--[no-]track-usage"],
|
|
148669
148697
|
...parsed.skipPermissions === void 0 ? [] : ["--[no-]skip-permissions"],
|
package/dist/index.cjs
CHANGED
|
@@ -1456,6 +1456,9 @@ function flattenLayers(layers, options) {
|
|
|
1456
1456
|
if (layer.launch.explain !== void 0) {
|
|
1457
1457
|
launch.explain = layer.launch.explain;
|
|
1458
1458
|
}
|
|
1459
|
+
if (layer.launch.routeByName !== void 0) {
|
|
1460
|
+
launch.routeByName = layer.launch.routeByName;
|
|
1461
|
+
}
|
|
1459
1462
|
}
|
|
1460
1463
|
if (layer.models !== void 0) {
|
|
1461
1464
|
models = mergeModels(models, layer.models);
|
|
@@ -2886,7 +2889,7 @@ var init_capability = __esm({
|
|
|
2886
2889
|
});
|
|
2887
2890
|
|
|
2888
2891
|
// src/frontdoor/route.ts
|
|
2889
|
-
var IDENTITY_HEADER, SESSION_HEADER, PROVIDER_HEADER, HEADROOM_FLAG_HEADER, PROJECT_ID_HEADER, AUTH_HEADER;
|
|
2892
|
+
var IDENTITY_HEADER, SESSION_HEADER, PROVIDER_HEADER, HEADROOM_FLAG_HEADER, ROUTE_BY_NAME_HEADER, PROJECT_ID_HEADER, AUTH_HEADER;
|
|
2890
2893
|
var init_route = __esm({
|
|
2891
2894
|
"src/frontdoor/route.ts"() {
|
|
2892
2895
|
"use strict";
|
|
@@ -2894,6 +2897,7 @@ var init_route = __esm({
|
|
|
2894
2897
|
SESSION_HEADER = "x-agent-shim-session";
|
|
2895
2898
|
PROVIDER_HEADER = "x-agent-shim-provider";
|
|
2896
2899
|
HEADROOM_FLAG_HEADER = "x-agent-shim-headroom";
|
|
2900
|
+
ROUTE_BY_NAME_HEADER = "x-agent-shim-route-by-name";
|
|
2897
2901
|
PROJECT_ID_HEADER = "x-headroom-project-id";
|
|
2898
2902
|
AUTH_HEADER = "x-agent-shim-auth";
|
|
2899
2903
|
}
|
|
@@ -3102,7 +3106,7 @@ var init_package = __esm({
|
|
|
3102
3106
|
"package.json"() {
|
|
3103
3107
|
package_default = {
|
|
3104
3108
|
name: "claude-use",
|
|
3105
|
-
version: "11.
|
|
3109
|
+
version: "11.35.0",
|
|
3106
3110
|
description: "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
|
|
3107
3111
|
license: "MIT",
|
|
3108
3112
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -7719,7 +7723,8 @@ var init_argv = __esm({
|
|
|
7719
7723
|
{ flag: "--remote-control", key: "remoteControl" },
|
|
7720
7724
|
{ flag: "--wait", key: "wait" },
|
|
7721
7725
|
{ flag: "--pause", key: "pause" },
|
|
7722
|
-
{ flag: "--explain", key: "explain" }
|
|
7726
|
+
{ flag: "--explain", key: "explain" },
|
|
7727
|
+
{ flag: "--route-by-name", key: "routeByName" }
|
|
7723
7728
|
];
|
|
7724
7729
|
LAUNCHER_FLAG_NAMES = [
|
|
7725
7730
|
...VALUED_FLAGS,
|
|
@@ -7909,6 +7914,7 @@ function resolveLaunchFlags(params) {
|
|
|
7909
7914
|
trackUsage: params.flags?.trackUsage ?? parseEnvBool("AGENT_SHIM_TRACK_USAGE", params.env.AGENT_SHIM_TRACK_USAGE) ?? params.cascade?.trackUsage ?? true,
|
|
7910
7915
|
pause: params.flags?.pause ?? parseEnvBool("AGENT_SHIM_PAUSE", params.env.AGENT_SHIM_PAUSE) ?? params.cascade?.pause ?? false,
|
|
7911
7916
|
explain: params.flags?.explain ?? parseEnvBool("AGENT_SHIM_EXPLAIN", params.env.AGENT_SHIM_EXPLAIN) ?? params.cascade?.explain ?? false,
|
|
7917
|
+
routeByName: params.flags?.routeByName ?? parseEnvBool("AGENT_SHIM_ROUTE_BY_NAME", params.env.AGENT_SHIM_ROUTE_BY_NAME) ?? params.cascade?.routeByName ?? false,
|
|
7912
7918
|
delayMs: resolveDelayMs(params)
|
|
7913
7919
|
};
|
|
7914
7920
|
}
|
|
@@ -7977,6 +7983,7 @@ function buildEnv(params) {
|
|
|
7977
7983
|
{ name: SESSION_HEADER, value: params.sessionId },
|
|
7978
7984
|
{ name: AUTH_HEADER, value: params.frontdoor.sessionToken },
|
|
7979
7985
|
...params.provider === void 0 ? [] : [{ name: PROVIDER_HEADER, value: params.provider.name }],
|
|
7986
|
+
...params.routeByName ? [{ name: ROUTE_BY_NAME_HEADER, value: "1" }] : [],
|
|
7980
7987
|
...params.headroom === void 0 ? [] : [
|
|
7981
7988
|
{ name: HEADROOM_FLAG_HEADER, value: "1" },
|
|
7982
7989
|
{ name: PROJECT_ID_HEADER, value: params.headroom.projectId }
|
|
@@ -9057,6 +9064,7 @@ function decideLaunch(params, readOnly) {
|
|
|
9057
9064
|
...parsedArgv.trackUsage === void 0 ? {} : { trackUsage: parsedArgv.trackUsage },
|
|
9058
9065
|
...parsedArgv.pause === void 0 ? {} : { pause: parsedArgv.pause },
|
|
9059
9066
|
...parsedArgv.explain === void 0 ? {} : { explain: parsedArgv.explain },
|
|
9067
|
+
...parsedArgv.routeByName === void 0 ? {} : { routeByName: parsedArgv.routeByName },
|
|
9060
9068
|
...parsedArgv.delay === void 0 ? {} : { delay: parsedArgv.delay }
|
|
9061
9069
|
}
|
|
9062
9070
|
});
|
|
@@ -9200,7 +9208,8 @@ function prepareLaunch(params) {
|
|
|
9200
9208
|
...frontDoor === void 0 ? {} : { frontdoor: frontDoor },
|
|
9201
9209
|
...headroom === void 0 ? {} : { headroom },
|
|
9202
9210
|
sessionId,
|
|
9203
|
-
remoteControl: resolvedFlags.remoteControl
|
|
9211
|
+
remoteControl: resolvedFlags.remoteControl,
|
|
9212
|
+
routeByName: resolvedFlags.routeByName || resolvedProvider !== void 0 && isRouterProvider(resolvedProvider.definition)
|
|
9204
9213
|
});
|
|
9205
9214
|
const releases = [...headroom === void 0 || headroomPort === void 0 ? [] : [headroomPort.release], ...frontDoorRelease === void 0 ? [] : [frontDoorRelease]];
|
|
9206
9215
|
const release = () => {
|
|
@@ -9227,7 +9236,8 @@ function resolveLaunch(params) {
|
|
|
9227
9236
|
...frontDoor ? { frontdoor: { port: 0, connectPort: 0, trustBundlePath: "", sessionToken: "" } } : {},
|
|
9228
9237
|
...decided.flags.headroom ? { headroom: { socketPath: "", projectId: "" } } : {},
|
|
9229
9238
|
sessionId: "",
|
|
9230
|
-
remoteControl: decided.flags.remoteControl
|
|
9239
|
+
remoteControl: decided.flags.remoteControl,
|
|
9240
|
+
routeByName: decided.flags.routeByName
|
|
9231
9241
|
});
|
|
9232
9242
|
const credentialNames = decided.identityCredentialBlock === void 0 ? [] : Object.keys(credentialVariables(decided.identityCredentialBlock.target ?? "bearer", ""));
|
|
9233
9243
|
const environment = [.../* @__PURE__ */ new Set([...Object.keys(built).filter((name) => built[name] !== env[name]), ...credentialNames])].sort();
|
|
@@ -9239,7 +9249,7 @@ function resolveLaunch(params) {
|
|
|
9239
9249
|
bin: decided.bin,
|
|
9240
9250
|
args: decided.args,
|
|
9241
9251
|
...credential === void 0 ? {} : { credential },
|
|
9242
|
-
routing: { frontDoor, headroom: decided.flags.headroom },
|
|
9252
|
+
routing: { frontDoor, headroom: decided.flags.headroom, routeByName: decided.flags.routeByName },
|
|
9243
9253
|
environment
|
|
9244
9254
|
};
|
|
9245
9255
|
}
|
|
@@ -14133,6 +14143,9 @@ function applyProfileChange(paths, name, change) {
|
|
|
14133
14143
|
if (change.launchExplain !== void 0) {
|
|
14134
14144
|
launchPatch.explain = change.launchExplain;
|
|
14135
14145
|
}
|
|
14146
|
+
if (change.launchRouteByName !== void 0) {
|
|
14147
|
+
launchPatch.routeByName = change.launchRouteByName;
|
|
14148
|
+
}
|
|
14136
14149
|
if (Object.keys(launchPatch).length > 0) {
|
|
14137
14150
|
setProfileLaunchFlags(paths, name, launchPatch);
|
|
14138
14151
|
touched = true;
|
|
@@ -16472,7 +16485,8 @@ var ConfigProfileSetInputSchema = import_zod24.z.strictObject({
|
|
|
16472
16485
|
claudeVersion: import_zod24.z.union([import_zod24.z.string().min(1), import_zod24.z.literal(false)]).optional(),
|
|
16473
16486
|
delay: import_zod24.z.union([import_zod24.z.string().regex(DURATION_RE), import_zod24.z.literal(false)]).optional(),
|
|
16474
16487
|
pause: import_zod24.z.boolean().optional(),
|
|
16475
|
-
explain: import_zod24.z.boolean().optional()
|
|
16488
|
+
explain: import_zod24.z.boolean().optional(),
|
|
16489
|
+
routeByName: import_zod24.z.boolean().optional()
|
|
16476
16490
|
}).optional()
|
|
16477
16491
|
});
|
|
16478
16492
|
var ConfigProfileSetOutputSchema = storedMutationOutput("profile", "updated", ProfileValueSchema);
|
|
@@ -16684,7 +16698,8 @@ function createConfigApiRouter(deps) {
|
|
|
16684
16698
|
...launch?.claudeVersion === void 0 ? {} : { launchClaudeVersion: launch.claudeVersion },
|
|
16685
16699
|
...launch?.delay === void 0 ? {} : { launchDelay: launch.delay },
|
|
16686
16700
|
...launch?.pause === void 0 ? {} : { launchPause: launch.pause },
|
|
16687
|
-
...launch?.explain === void 0 ? {} : { launchExplain: launch.explain }
|
|
16701
|
+
...launch?.explain === void 0 ? {} : { launchExplain: launch.explain },
|
|
16702
|
+
...launch?.routeByName === void 0 ? {} : { launchRouteByName: launch.routeByName }
|
|
16688
16703
|
});
|
|
16689
16704
|
return { action: "updated", kind: "profile", name: input.name, value: profileValue(input.name, paths) };
|
|
16690
16705
|
})
|
|
@@ -16995,6 +17010,7 @@ var LaunchFlagsSchema = import_zod26.z.strictObject({
|
|
|
16995
17010
|
trackUsage: import_zod26.z.boolean(),
|
|
16996
17011
|
pause: import_zod26.z.boolean(),
|
|
16997
17012
|
explain: import_zod26.z.boolean(),
|
|
17013
|
+
routeByName: import_zod26.z.boolean(),
|
|
16998
17014
|
/** How long the launch waits after its own output before it starts claude, in milliseconds. */
|
|
16999
17015
|
delayMs: import_zod26.z.number()
|
|
17000
17016
|
});
|
|
@@ -17008,7 +17024,7 @@ var LaunchResolveOutputSchema = import_zod26.z.strictObject({
|
|
|
17008
17024
|
args: import_zod26.z.readonly(import_zod26.z.array(import_zod26.z.string())),
|
|
17009
17025
|
/** The credential the launch would authenticate with, by target and source kinds. Absent when none applies. */
|
|
17010
17026
|
credential: import_zod26.z.strictObject({ subject: import_zod26.z.enum(["provider", "identity"]), name: import_zod26.z.string(), summary: CredentialSummarySchema }).optional(),
|
|
17011
|
-
routing: import_zod26.z.strictObject({ frontDoor: import_zod26.z.boolean(), headroom: import_zod26.z.boolean() }),
|
|
17027
|
+
routing: import_zod26.z.strictObject({ frontDoor: import_zod26.z.boolean(), headroom: import_zod26.z.boolean(), routeByName: import_zod26.z.boolean() }),
|
|
17012
17028
|
/** The names of the environment variables the launch would set or unset, sorted. Values are not reported. */
|
|
17013
17029
|
environment: import_zod26.z.readonly(import_zod26.z.array(import_zod26.z.string())),
|
|
17014
17030
|
warnings: import_zod26.z.readonly(import_zod26.z.array(import_zod26.z.string()))
|
package/dist/index.mjs
CHANGED
|
@@ -1434,6 +1434,9 @@ function flattenLayers(layers, options) {
|
|
|
1434
1434
|
if (layer.launch.explain !== void 0) {
|
|
1435
1435
|
launch.explain = layer.launch.explain;
|
|
1436
1436
|
}
|
|
1437
|
+
if (layer.launch.routeByName !== void 0) {
|
|
1438
|
+
launch.routeByName = layer.launch.routeByName;
|
|
1439
|
+
}
|
|
1437
1440
|
}
|
|
1438
1441
|
if (layer.models !== void 0) {
|
|
1439
1442
|
models = mergeModels(models, layer.models);
|
|
@@ -2862,7 +2865,7 @@ var init_capability = __esm({
|
|
|
2862
2865
|
});
|
|
2863
2866
|
|
|
2864
2867
|
// src/frontdoor/route.ts
|
|
2865
|
-
var IDENTITY_HEADER, SESSION_HEADER, PROVIDER_HEADER, HEADROOM_FLAG_HEADER, PROJECT_ID_HEADER, AUTH_HEADER;
|
|
2868
|
+
var IDENTITY_HEADER, SESSION_HEADER, PROVIDER_HEADER, HEADROOM_FLAG_HEADER, ROUTE_BY_NAME_HEADER, PROJECT_ID_HEADER, AUTH_HEADER;
|
|
2866
2869
|
var init_route = __esm({
|
|
2867
2870
|
"src/frontdoor/route.ts"() {
|
|
2868
2871
|
"use strict";
|
|
@@ -2870,6 +2873,7 @@ var init_route = __esm({
|
|
|
2870
2873
|
SESSION_HEADER = "x-agent-shim-session";
|
|
2871
2874
|
PROVIDER_HEADER = "x-agent-shim-provider";
|
|
2872
2875
|
HEADROOM_FLAG_HEADER = "x-agent-shim-headroom";
|
|
2876
|
+
ROUTE_BY_NAME_HEADER = "x-agent-shim-route-by-name";
|
|
2873
2877
|
PROJECT_ID_HEADER = "x-headroom-project-id";
|
|
2874
2878
|
AUTH_HEADER = "x-agent-shim-auth";
|
|
2875
2879
|
}
|
|
@@ -3078,7 +3082,7 @@ var init_package = __esm({
|
|
|
3078
3082
|
"package.json"() {
|
|
3079
3083
|
package_default = {
|
|
3080
3084
|
name: "claude-use",
|
|
3081
|
-
version: "11.
|
|
3085
|
+
version: "11.35.0",
|
|
3082
3086
|
description: "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
|
|
3083
3087
|
license: "MIT",
|
|
3084
3088
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -7692,7 +7696,8 @@ var init_argv = __esm({
|
|
|
7692
7696
|
{ flag: "--remote-control", key: "remoteControl" },
|
|
7693
7697
|
{ flag: "--wait", key: "wait" },
|
|
7694
7698
|
{ flag: "--pause", key: "pause" },
|
|
7695
|
-
{ flag: "--explain", key: "explain" }
|
|
7699
|
+
{ flag: "--explain", key: "explain" },
|
|
7700
|
+
{ flag: "--route-by-name", key: "routeByName" }
|
|
7696
7701
|
];
|
|
7697
7702
|
LAUNCHER_FLAG_NAMES = [
|
|
7698
7703
|
...VALUED_FLAGS,
|
|
@@ -7883,6 +7888,7 @@ function resolveLaunchFlags(params) {
|
|
|
7883
7888
|
trackUsage: params.flags?.trackUsage ?? parseEnvBool("AGENT_SHIM_TRACK_USAGE", params.env.AGENT_SHIM_TRACK_USAGE) ?? params.cascade?.trackUsage ?? true,
|
|
7884
7889
|
pause: params.flags?.pause ?? parseEnvBool("AGENT_SHIM_PAUSE", params.env.AGENT_SHIM_PAUSE) ?? params.cascade?.pause ?? false,
|
|
7885
7890
|
explain: params.flags?.explain ?? parseEnvBool("AGENT_SHIM_EXPLAIN", params.env.AGENT_SHIM_EXPLAIN) ?? params.cascade?.explain ?? false,
|
|
7891
|
+
routeByName: params.flags?.routeByName ?? parseEnvBool("AGENT_SHIM_ROUTE_BY_NAME", params.env.AGENT_SHIM_ROUTE_BY_NAME) ?? params.cascade?.routeByName ?? false,
|
|
7886
7892
|
delayMs: resolveDelayMs(params)
|
|
7887
7893
|
};
|
|
7888
7894
|
}
|
|
@@ -7951,6 +7957,7 @@ function buildEnv(params) {
|
|
|
7951
7957
|
{ name: SESSION_HEADER, value: params.sessionId },
|
|
7952
7958
|
{ name: AUTH_HEADER, value: params.frontdoor.sessionToken },
|
|
7953
7959
|
...params.provider === void 0 ? [] : [{ name: PROVIDER_HEADER, value: params.provider.name }],
|
|
7960
|
+
...params.routeByName ? [{ name: ROUTE_BY_NAME_HEADER, value: "1" }] : [],
|
|
7954
7961
|
...params.headroom === void 0 ? [] : [
|
|
7955
7962
|
{ name: HEADROOM_FLAG_HEADER, value: "1" },
|
|
7956
7963
|
{ name: PROJECT_ID_HEADER, value: params.headroom.projectId }
|
|
@@ -9031,6 +9038,7 @@ function decideLaunch(params, readOnly) {
|
|
|
9031
9038
|
...parsedArgv.trackUsage === void 0 ? {} : { trackUsage: parsedArgv.trackUsage },
|
|
9032
9039
|
...parsedArgv.pause === void 0 ? {} : { pause: parsedArgv.pause },
|
|
9033
9040
|
...parsedArgv.explain === void 0 ? {} : { explain: parsedArgv.explain },
|
|
9041
|
+
...parsedArgv.routeByName === void 0 ? {} : { routeByName: parsedArgv.routeByName },
|
|
9034
9042
|
...parsedArgv.delay === void 0 ? {} : { delay: parsedArgv.delay }
|
|
9035
9043
|
}
|
|
9036
9044
|
});
|
|
@@ -9174,7 +9182,8 @@ function prepareLaunch(params) {
|
|
|
9174
9182
|
...frontDoor === void 0 ? {} : { frontdoor: frontDoor },
|
|
9175
9183
|
...headroom === void 0 ? {} : { headroom },
|
|
9176
9184
|
sessionId,
|
|
9177
|
-
remoteControl: resolvedFlags.remoteControl
|
|
9185
|
+
remoteControl: resolvedFlags.remoteControl,
|
|
9186
|
+
routeByName: resolvedFlags.routeByName || resolvedProvider !== void 0 && isRouterProvider(resolvedProvider.definition)
|
|
9178
9187
|
});
|
|
9179
9188
|
const releases = [...headroom === void 0 || headroomPort === void 0 ? [] : [headroomPort.release], ...frontDoorRelease === void 0 ? [] : [frontDoorRelease]];
|
|
9180
9189
|
const release = () => {
|
|
@@ -9201,7 +9210,8 @@ function resolveLaunch(params) {
|
|
|
9201
9210
|
...frontDoor ? { frontdoor: { port: 0, connectPort: 0, trustBundlePath: "", sessionToken: "" } } : {},
|
|
9202
9211
|
...decided.flags.headroom ? { headroom: { socketPath: "", projectId: "" } } : {},
|
|
9203
9212
|
sessionId: "",
|
|
9204
|
-
remoteControl: decided.flags.remoteControl
|
|
9213
|
+
remoteControl: decided.flags.remoteControl,
|
|
9214
|
+
routeByName: decided.flags.routeByName
|
|
9205
9215
|
});
|
|
9206
9216
|
const credentialNames = decided.identityCredentialBlock === void 0 ? [] : Object.keys(credentialVariables(decided.identityCredentialBlock.target ?? "bearer", ""));
|
|
9207
9217
|
const environment = [.../* @__PURE__ */ new Set([...Object.keys(built).filter((name) => built[name] !== env[name]), ...credentialNames])].sort();
|
|
@@ -9213,7 +9223,7 @@ function resolveLaunch(params) {
|
|
|
9213
9223
|
bin: decided.bin,
|
|
9214
9224
|
args: decided.args,
|
|
9215
9225
|
...credential === void 0 ? {} : { credential },
|
|
9216
|
-
routing: { frontDoor, headroom: decided.flags.headroom },
|
|
9226
|
+
routing: { frontDoor, headroom: decided.flags.headroom, routeByName: decided.flags.routeByName },
|
|
9217
9227
|
environment
|
|
9218
9228
|
};
|
|
9219
9229
|
}
|
|
@@ -13720,6 +13730,9 @@ function applyProfileChange(paths, name, change) {
|
|
|
13720
13730
|
if (change.launchExplain !== void 0) {
|
|
13721
13731
|
launchPatch.explain = change.launchExplain;
|
|
13722
13732
|
}
|
|
13733
|
+
if (change.launchRouteByName !== void 0) {
|
|
13734
|
+
launchPatch.routeByName = change.launchRouteByName;
|
|
13735
|
+
}
|
|
13723
13736
|
if (Object.keys(launchPatch).length > 0) {
|
|
13724
13737
|
setProfileLaunchFlags(paths, name, launchPatch);
|
|
13725
13738
|
touched = true;
|
|
@@ -16059,7 +16072,8 @@ var ConfigProfileSetInputSchema = z24.strictObject({
|
|
|
16059
16072
|
claudeVersion: z24.union([z24.string().min(1), z24.literal(false)]).optional(),
|
|
16060
16073
|
delay: z24.union([z24.string().regex(DURATION_RE), z24.literal(false)]).optional(),
|
|
16061
16074
|
pause: z24.boolean().optional(),
|
|
16062
|
-
explain: z24.boolean().optional()
|
|
16075
|
+
explain: z24.boolean().optional(),
|
|
16076
|
+
routeByName: z24.boolean().optional()
|
|
16063
16077
|
}).optional()
|
|
16064
16078
|
});
|
|
16065
16079
|
var ConfigProfileSetOutputSchema = storedMutationOutput("profile", "updated", ProfileValueSchema);
|
|
@@ -16271,7 +16285,8 @@ function createConfigApiRouter(deps) {
|
|
|
16271
16285
|
...launch?.claudeVersion === void 0 ? {} : { launchClaudeVersion: launch.claudeVersion },
|
|
16272
16286
|
...launch?.delay === void 0 ? {} : { launchDelay: launch.delay },
|
|
16273
16287
|
...launch?.pause === void 0 ? {} : { launchPause: launch.pause },
|
|
16274
|
-
...launch?.explain === void 0 ? {} : { launchExplain: launch.explain }
|
|
16288
|
+
...launch?.explain === void 0 ? {} : { launchExplain: launch.explain },
|
|
16289
|
+
...launch?.routeByName === void 0 ? {} : { launchRouteByName: launch.routeByName }
|
|
16275
16290
|
});
|
|
16276
16291
|
return { action: "updated", kind: "profile", name: input.name, value: profileValue(input.name, paths) };
|
|
16277
16292
|
})
|
|
@@ -16582,6 +16597,7 @@ var LaunchFlagsSchema = z26.strictObject({
|
|
|
16582
16597
|
trackUsage: z26.boolean(),
|
|
16583
16598
|
pause: z26.boolean(),
|
|
16584
16599
|
explain: z26.boolean(),
|
|
16600
|
+
routeByName: z26.boolean(),
|
|
16585
16601
|
/** How long the launch waits after its own output before it starts claude, in milliseconds. */
|
|
16586
16602
|
delayMs: z26.number()
|
|
16587
16603
|
});
|
|
@@ -16595,7 +16611,7 @@ var LaunchResolveOutputSchema = z26.strictObject({
|
|
|
16595
16611
|
args: z26.readonly(z26.array(z26.string())),
|
|
16596
16612
|
/** The credential the launch would authenticate with, by target and source kinds. Absent when none applies. */
|
|
16597
16613
|
credential: z26.strictObject({ subject: z26.enum(["provider", "identity"]), name: z26.string(), summary: CredentialSummarySchema }).optional(),
|
|
16598
|
-
routing: z26.strictObject({ frontDoor: z26.boolean(), headroom: z26.boolean() }),
|
|
16614
|
+
routing: z26.strictObject({ frontDoor: z26.boolean(), headroom: z26.boolean(), routeByName: z26.boolean() }),
|
|
16599
16615
|
/** The names of the environment variables the launch would set or unset, sorted. Values are not reported. */
|
|
16600
16616
|
environment: z26.readonly(z26.array(z26.string())),
|
|
16601
16617
|
warnings: z26.readonly(z26.array(z26.string()))
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3451,6 +3451,8 @@ interface SessionIdentity {
|
|
|
3451
3451
|
readonly provider: string | undefined;
|
|
3452
3452
|
/** Whether this launch resolved headroom on, so its requests must pass through the headroom hop before their route. */
|
|
3453
3453
|
readonly headroom: boolean;
|
|
3454
|
+
/** Whether this launch routes provider-qualified model names through the models block, whatever provider it selected. */
|
|
3455
|
+
readonly routeByName: boolean;
|
|
3454
3456
|
/** The project identity headroom scopes memory to, re-set on the headroom hop and sent nowhere else. */
|
|
3455
3457
|
readonly projectId: string | undefined;
|
|
3456
3458
|
}
|
|
@@ -6098,6 +6100,7 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
6098
6100
|
kind: zod.ZodLiteral<"profile">;
|
|
6099
6101
|
name: zod.ZodString;
|
|
6100
6102
|
value: zod.ZodObject<{
|
|
6103
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
6101
6104
|
entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
|
|
6102
6105
|
value: zod.ZodBoolean;
|
|
6103
6106
|
when: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -6173,7 +6176,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
6173
6176
|
key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
6174
6177
|
}, zod_v4_core.$strip>], "kind">]>;
|
|
6175
6178
|
}, zod_v4_core.$strict>]>>>;
|
|
6176
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
6177
6179
|
models: zod.ZodOptional<zod.ZodObject<{
|
|
6178
6180
|
virtual: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
|
|
6179
6181
|
mode: zod.ZodEnum<{
|
|
@@ -6245,12 +6247,14 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
6245
6247
|
delay: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodLiteral<false>]>>;
|
|
6246
6248
|
pause: zod.ZodOptional<zod.ZodBoolean>;
|
|
6247
6249
|
explain: zod.ZodOptional<zod.ZodBoolean>;
|
|
6250
|
+
routeByName: zod.ZodOptional<zod.ZodBoolean>;
|
|
6248
6251
|
}, zod_v4_core.$strict>>;
|
|
6249
6252
|
}, zod_v4_core.$strict>, zod.ZodObject<{
|
|
6250
6253
|
action: zod.ZodLiteral<"updated">;
|
|
6251
6254
|
kind: zod.ZodLiteral<"profile">;
|
|
6252
6255
|
name: zod.ZodString;
|
|
6253
6256
|
value: zod.ZodObject<{
|
|
6257
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
6254
6258
|
entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
|
|
6255
6259
|
value: zod.ZodBoolean;
|
|
6256
6260
|
when: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -6326,7 +6330,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
6326
6330
|
key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
6327
6331
|
}, zod_v4_core.$strip>], "kind">]>;
|
|
6328
6332
|
}, zod_v4_core.$strict>]>>>;
|
|
6329
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
6330
6333
|
models: zod.ZodOptional<zod.ZodObject<{
|
|
6331
6334
|
virtual: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
|
|
6332
6335
|
mode: zod.ZodEnum<{
|
|
@@ -7561,6 +7564,8 @@ interface ResolvedLaunchFlags {
|
|
|
7561
7564
|
readonly pause: boolean;
|
|
7562
7565
|
/** Whether the launch's report lists every pool member the pick ranked and why, and not only the one picked. */
|
|
7563
7566
|
readonly explain: boolean;
|
|
7567
|
+
/** Whether a provider session routes provider-qualified model names through the models block to the provider that serves them. */
|
|
7568
|
+
readonly routeByName: boolean;
|
|
7564
7569
|
/** How long the launcher waits after its own output before it starts claude, in milliseconds; zero for no wait. */
|
|
7565
7570
|
readonly delayMs: number;
|
|
7566
7571
|
}
|
|
@@ -7764,10 +7769,11 @@ interface LaunchResolution {
|
|
|
7764
7769
|
readonly name: string;
|
|
7765
7770
|
readonly summary: CredentialSummary;
|
|
7766
7771
|
};
|
|
7767
|
-
/** Which daemons the launch would route through. */
|
|
7772
|
+
/** Which daemons the launch would route through, and whether it routes provider-qualified model names through the models block. */
|
|
7768
7773
|
readonly routing: {
|
|
7769
7774
|
readonly frontDoor: boolean;
|
|
7770
7775
|
readonly headroom: boolean;
|
|
7776
|
+
readonly routeByName: boolean;
|
|
7771
7777
|
};
|
|
7772
7778
|
/** The names of the environment variables the launch would set or unset, sorted. Values are never reported: the launcher's environment carries tokens and per-launch capabilities that mean nothing outside it. */
|
|
7773
7779
|
readonly environment: readonly string[];
|
|
@@ -7854,6 +7860,7 @@ declare function createLaunchApiRouter(deps: LaunchApiDeps): {
|
|
|
7854
7860
|
trackUsage: zod.ZodBoolean;
|
|
7855
7861
|
pause: zod.ZodBoolean;
|
|
7856
7862
|
explain: zod.ZodBoolean;
|
|
7863
|
+
routeByName: zod.ZodBoolean;
|
|
7857
7864
|
delayMs: zod.ZodNumber;
|
|
7858
7865
|
}, zod_v4_core.$strict>;
|
|
7859
7866
|
claudeVersion: zod.ZodOptional<zod.ZodObject<{
|
|
@@ -7909,6 +7916,7 @@ declare function createLaunchApiRouter(deps: LaunchApiDeps): {
|
|
|
7909
7916
|
routing: zod.ZodObject<{
|
|
7910
7917
|
frontDoor: zod.ZodBoolean;
|
|
7911
7918
|
headroom: zod.ZodBoolean;
|
|
7919
|
+
routeByName: zod.ZodBoolean;
|
|
7912
7920
|
}, zod_v4_core.$strict>;
|
|
7913
7921
|
environment: zod.ZodReadonly<zod.ZodArray<zod.ZodString>>;
|
|
7914
7922
|
warnings: zod.ZodReadonly<zod.ZodArray<zod.ZodString>>;
|
|
@@ -8974,6 +8982,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
8974
8982
|
trackUsage: zod.ZodBoolean;
|
|
8975
8983
|
pause: zod.ZodBoolean;
|
|
8976
8984
|
explain: zod.ZodBoolean;
|
|
8985
|
+
routeByName: zod.ZodBoolean;
|
|
8977
8986
|
delayMs: zod.ZodNumber;
|
|
8978
8987
|
}, zod_v4_core.$strict>;
|
|
8979
8988
|
claudeVersion: zod.ZodOptional<zod.ZodObject<{
|
|
@@ -9029,6 +9038,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9029
9038
|
routing: zod.ZodObject<{
|
|
9030
9039
|
frontDoor: zod.ZodBoolean;
|
|
9031
9040
|
headroom: zod.ZodBoolean;
|
|
9041
|
+
routeByName: zod.ZodBoolean;
|
|
9032
9042
|
}, zod_v4_core.$strict>;
|
|
9033
9043
|
environment: zod.ZodReadonly<zod.ZodArray<zod.ZodString>>;
|
|
9034
9044
|
warnings: zod.ZodReadonly<zod.ZodArray<zod.ZodString>>;
|
|
@@ -9245,6 +9255,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9245
9255
|
kind: zod.ZodLiteral<"profile">;
|
|
9246
9256
|
name: zod.ZodString;
|
|
9247
9257
|
value: zod.ZodObject<{
|
|
9258
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
9248
9259
|
entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
|
|
9249
9260
|
value: zod.ZodBoolean;
|
|
9250
9261
|
when: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -9320,7 +9331,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9320
9331
|
key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
9321
9332
|
}, zod_v4_core.$strip>], "kind">]>;
|
|
9322
9333
|
}, zod_v4_core.$strict>]>>>;
|
|
9323
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
9324
9334
|
models: zod.ZodOptional<zod.ZodObject<{
|
|
9325
9335
|
virtual: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
|
|
9326
9336
|
mode: zod.ZodEnum<{
|
|
@@ -9392,12 +9402,14 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9392
9402
|
delay: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodLiteral<false>]>>;
|
|
9393
9403
|
pause: zod.ZodOptional<zod.ZodBoolean>;
|
|
9394
9404
|
explain: zod.ZodOptional<zod.ZodBoolean>;
|
|
9405
|
+
routeByName: zod.ZodOptional<zod.ZodBoolean>;
|
|
9395
9406
|
}, zod_v4_core.$strict>>;
|
|
9396
9407
|
}, zod_v4_core.$strict>, zod.ZodObject<{
|
|
9397
9408
|
action: zod.ZodLiteral<"updated">;
|
|
9398
9409
|
kind: zod.ZodLiteral<"profile">;
|
|
9399
9410
|
name: zod.ZodString;
|
|
9400
9411
|
value: zod.ZodObject<{
|
|
9412
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
9401
9413
|
entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
|
|
9402
9414
|
value: zod.ZodBoolean;
|
|
9403
9415
|
when: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -9473,7 +9485,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9473
9485
|
key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
9474
9486
|
}, zod_v4_core.$strip>], "kind">]>;
|
|
9475
9487
|
}, zod_v4_core.$strict>]>>>;
|
|
9476
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
9477
9488
|
models: zod.ZodOptional<zod.ZodObject<{
|
|
9478
9489
|
virtual: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
|
|
9479
9490
|
mode: zod.ZodEnum<{
|
|
@@ -11503,6 +11514,7 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
|
|
|
11503
11514
|
kind: z.ZodLiteral<"profile">;
|
|
11504
11515
|
name: z.ZodString;
|
|
11505
11516
|
value: z.ZodObject<{
|
|
11517
|
+
description: z.ZodOptional<z.ZodString>;
|
|
11506
11518
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
11507
11519
|
value: z.ZodBoolean;
|
|
11508
11520
|
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -11578,7 +11590,6 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
|
|
|
11578
11590
|
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
11579
11591
|
}, z.core.$strip>], "kind">]>;
|
|
11580
11592
|
}, z.core.$strict>]>>>;
|
|
11581
|
-
description: z.ZodOptional<z.ZodString>;
|
|
11582
11593
|
models: z.ZodOptional<z.ZodObject<{
|
|
11583
11594
|
virtual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
11584
11595
|
mode: z.ZodEnum<{
|
|
@@ -11651,6 +11662,7 @@ declare const ConfigProfileSetInputSchema: z.ZodObject<{
|
|
|
11651
11662
|
delay: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
11652
11663
|
pause: z.ZodOptional<z.ZodBoolean>;
|
|
11653
11664
|
explain: z.ZodOptional<z.ZodBoolean>;
|
|
11665
|
+
routeByName: z.ZodOptional<z.ZodBoolean>;
|
|
11654
11666
|
}, z.core.$strict>>;
|
|
11655
11667
|
}, z.core.$strict>;
|
|
11656
11668
|
declare const ConfigProfileSetOutputSchema: z.ZodObject<{
|
|
@@ -11658,6 +11670,7 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
|
|
|
11658
11670
|
kind: z.ZodLiteral<"profile">;
|
|
11659
11671
|
name: z.ZodString;
|
|
11660
11672
|
value: z.ZodObject<{
|
|
11673
|
+
description: z.ZodOptional<z.ZodString>;
|
|
11661
11674
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
11662
11675
|
value: z.ZodBoolean;
|
|
11663
11676
|
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -11733,7 +11746,6 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
|
|
|
11733
11746
|
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
11734
11747
|
}, z.core.$strip>], "kind">]>;
|
|
11735
11748
|
}, z.core.$strict>]>>>;
|
|
11736
|
-
description: z.ZodOptional<z.ZodString>;
|
|
11737
11749
|
models: z.ZodOptional<z.ZodObject<{
|
|
11738
11750
|
virtual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
11739
11751
|
mode: z.ZodEnum<{
|
|
@@ -13129,6 +13141,7 @@ declare const LaunchResolveOutputSchema: z.ZodObject<{
|
|
|
13129
13141
|
trackUsage: z.ZodBoolean;
|
|
13130
13142
|
pause: z.ZodBoolean;
|
|
13131
13143
|
explain: z.ZodBoolean;
|
|
13144
|
+
routeByName: z.ZodBoolean;
|
|
13132
13145
|
delayMs: z.ZodNumber;
|
|
13133
13146
|
}, z.core.$strict>;
|
|
13134
13147
|
claudeVersion: z.ZodOptional<z.ZodObject<{
|
|
@@ -13184,6 +13197,7 @@ declare const LaunchResolveOutputSchema: z.ZodObject<{
|
|
|
13184
13197
|
routing: z.ZodObject<{
|
|
13185
13198
|
frontDoor: z.ZodBoolean;
|
|
13186
13199
|
headroom: z.ZodBoolean;
|
|
13200
|
+
routeByName: z.ZodBoolean;
|
|
13187
13201
|
}, z.core.$strict>;
|
|
13188
13202
|
environment: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
13189
13203
|
warnings: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-use",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.35.0",
|
|
4
4
|
"description": "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Joseph Mearman <joseph@mearman.co.uk>",
|