claude-use 11.44.5 → 11.46.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 +1 -2
- package/dist/cli.cjs +44 -54
- package/dist/index.cjs +25 -41
- package/dist/index.mjs +25 -41
- package/dist/types/index.d.ts +0 -30
- 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] [--
|
|
101
|
+
agent-shim profile set <name> [--launch-delay <duration> | --no-launch-delay] [--[no-]launch-pause] [--[no-]launch-explain] [--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]
|
|
@@ -196,7 +196,6 @@ agent-shim run [@<identity>] [launch flags] [claude arguments]
|
|
|
196
196
|
# --claude-version <version> run exactly this installed Claude Code version
|
|
197
197
|
# --delay <duration> wait this long after the launcher's own output before starting claude; --[no-]pause waits for a key press instead
|
|
198
198
|
# --[no-]explain with @pool:<name>, list every member the pick ranked and why, not only the one picked
|
|
199
|
-
# --[no-]route-by-name route provider-qualified model names through the models block to the provider that serves them
|
|
200
199
|
# --native run the real claude with nothing from agent-shim applied; cannot be combined with the flags above
|
|
201
200
|
claude @<identity> ... # the same, once `agent-shim shim enable` has run
|
|
202
201
|
```
|
package/dist/cli.cjs
CHANGED
|
@@ -27036,7 +27036,6 @@ var init_schema = __esm({
|
|
|
27036
27036
|
/** Whether the launcher waits for a key press after its own output before it starts claude. Takes the place of `delay` when both are set. Applies only when a terminal is watching. */
|
|
27037
27037
|
pause: external_exports.boolean().optional(),
|
|
27038
27038
|
/** Whether a provider session routes provider-qualified model names (`z/glm-5.3`, `auto`) through the `models` block to the provider that serves them, instead of sending every request to the launch provider. */
|
|
27039
|
-
routeByName: external_exports.boolean().optional(),
|
|
27040
27039
|
/** Whether the launcher's report, for a launch that picks from a pool, lists every member the pick ranked with why each stands where it does, and not only the member it picked. */
|
|
27041
27040
|
explain: external_exports.boolean().optional()
|
|
27042
27041
|
});
|
|
@@ -27606,7 +27605,7 @@ var init_state = __esm({
|
|
|
27606
27605
|
import_node_path5 = __toESM(require("node:path"), 1);
|
|
27607
27606
|
init_zod();
|
|
27608
27607
|
init_schema();
|
|
27609
|
-
FRONT_DOOR_PROTOCOL =
|
|
27608
|
+
FRONT_DOOR_PROTOCOL = 5;
|
|
27610
27609
|
FrontDoorSessionSchema = external_exports.strictObject({ pid: external_exports.number().int().positive(), startedAt: external_exports.number(), token: external_exports.string().min(1), supervisorPid: external_exports.number().int().positive().optional(), sessionId: external_exports.string().min(1).optional(), models: ModelsConfigSchema.optional() });
|
|
27611
27610
|
FrontDoorStateSchema = external_exports.strictObject({
|
|
27612
27611
|
/**
|
|
@@ -31887,9 +31886,6 @@ function applyProfileChange(paths, name, change) {
|
|
|
31887
31886
|
if (change.launchExplain !== void 0) {
|
|
31888
31887
|
launchPatch.explain = change.launchExplain;
|
|
31889
31888
|
}
|
|
31890
|
-
if (change.launchRouteByName !== void 0) {
|
|
31891
|
-
launchPatch.routeByName = change.launchRouteByName;
|
|
31892
|
-
}
|
|
31893
31889
|
if (Object.keys(launchPatch).length > 0) {
|
|
31894
31890
|
setProfileLaunchFlags(paths, name, launchPatch);
|
|
31895
31891
|
touched = true;
|
|
@@ -32859,9 +32855,6 @@ function flattenLayers(layers, options) {
|
|
|
32859
32855
|
if (layer.launch.explain !== void 0) {
|
|
32860
32856
|
launch.explain = layer.launch.explain;
|
|
32861
32857
|
}
|
|
32862
|
-
if (layer.launch.routeByName !== void 0) {
|
|
32863
|
-
launch.routeByName = layer.launch.routeByName;
|
|
32864
|
-
}
|
|
32865
32858
|
}
|
|
32866
32859
|
if (layer.models !== void 0) {
|
|
32867
32860
|
models = mergeModels(models, layer.models);
|
|
@@ -34701,7 +34694,7 @@ var init_package = __esm({
|
|
|
34701
34694
|
"package.json"() {
|
|
34702
34695
|
package_default = {
|
|
34703
34696
|
name: "claude-use",
|
|
34704
|
-
version: "11.
|
|
34697
|
+
version: "11.46.0",
|
|
34705
34698
|
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.",
|
|
34706
34699
|
license: "MIT",
|
|
34707
34700
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -34966,7 +34959,6 @@ function identifyRequest(headers) {
|
|
|
34966
34959
|
sessionId: internalHeaderValue(headers, SESSION_HEADER),
|
|
34967
34960
|
provider: internalHeaderValue(headers, PROVIDER_HEADER),
|
|
34968
34961
|
headroom: internalHeaderValue(headers, HEADROOM_FLAG_HEADER) === "1",
|
|
34969
|
-
routeByName: internalHeaderValue(headers, ROUTE_BY_NAME_HEADER) === "1",
|
|
34970
34962
|
projectId: internalHeaderValue(headers, PROJECT_ID_HEADER)
|
|
34971
34963
|
},
|
|
34972
34964
|
forwardableHeaders: forwardable
|
|
@@ -34986,7 +34978,7 @@ function parseProviderPath(path65) {
|
|
|
34986
34978
|
}
|
|
34987
34979
|
return { provider: decodeURIComponent(tail.slice(0, slash)), rest: tail.slice(slash) };
|
|
34988
34980
|
}
|
|
34989
|
-
var HEADROOM_SESSION_HEADER, INTERNAL_HEADER_NAMES, IDENTITY_HEADER, SESSION_HEADER, PROVIDER_HEADER, HEADROOM_FLAG_HEADER,
|
|
34981
|
+
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;
|
|
34990
34982
|
var init_route = __esm({
|
|
34991
34983
|
"src/frontdoor/route.ts"() {
|
|
34992
34984
|
"use strict";
|
|
@@ -34995,7 +34987,6 @@ var init_route = __esm({
|
|
|
34995
34987
|
"x-agent-shim-identity",
|
|
34996
34988
|
"x-agent-shim-session",
|
|
34997
34989
|
"x-agent-shim-headroom",
|
|
34998
|
-
"x-agent-shim-route-by-name",
|
|
34999
34990
|
"x-agent-shim-auth",
|
|
35000
34991
|
"x-agent-shim-provider",
|
|
35001
34992
|
"x-agent-shim-hop",
|
|
@@ -35008,7 +34999,6 @@ var init_route = __esm({
|
|
|
35008
34999
|
SESSION_HEADER = "x-agent-shim-session";
|
|
35009
35000
|
PROVIDER_HEADER = "x-agent-shim-provider";
|
|
35010
35001
|
HEADROOM_FLAG_HEADER = "x-agent-shim-headroom";
|
|
35011
|
-
ROUTE_BY_NAME_HEADER = "x-agent-shim-route-by-name";
|
|
35012
35002
|
PROJECT_ID_HEADER = "x-headroom-project-id";
|
|
35013
35003
|
CLIENT_SESSION_HEADER = "x-claude-code-session-id";
|
|
35014
35004
|
HEADROOM_BASE_URL_HEADER = "x-headroom-base-url";
|
|
@@ -63810,8 +63800,7 @@ var init_argv = __esm({
|
|
|
63810
63800
|
{ flag: "--remote-control", key: "remoteControl" },
|
|
63811
63801
|
{ flag: "--wait", key: "wait" },
|
|
63812
63802
|
{ flag: "--pause", key: "pause" },
|
|
63813
|
-
{ flag: "--explain", key: "explain" }
|
|
63814
|
-
{ flag: "--route-by-name", key: "routeByName" }
|
|
63803
|
+
{ flag: "--explain", key: "explain" }
|
|
63815
63804
|
];
|
|
63816
63805
|
LAUNCHER_FLAG_NAMES = [
|
|
63817
63806
|
...VALUED_FLAGS,
|
|
@@ -64001,7 +63990,6 @@ function resolveLaunchFlags(params) {
|
|
|
64001
63990
|
trackUsage: params.flags?.trackUsage ?? parseEnvBool("AGENT_SHIM_TRACK_USAGE", params.env.AGENT_SHIM_TRACK_USAGE) ?? params.cascade?.trackUsage ?? true,
|
|
64002
63991
|
pause: params.flags?.pause ?? parseEnvBool("AGENT_SHIM_PAUSE", params.env.AGENT_SHIM_PAUSE) ?? params.cascade?.pause ?? false,
|
|
64003
63992
|
explain: params.flags?.explain ?? parseEnvBool("AGENT_SHIM_EXPLAIN", params.env.AGENT_SHIM_EXPLAIN) ?? params.cascade?.explain ?? false,
|
|
64004
|
-
routeByName: params.flags?.routeByName ?? parseEnvBool("AGENT_SHIM_ROUTE_BY_NAME", params.env.AGENT_SHIM_ROUTE_BY_NAME) ?? params.cascade?.routeByName ?? false,
|
|
64005
63993
|
delayMs: resolveDelayMs(params)
|
|
64006
63994
|
};
|
|
64007
63995
|
}
|
|
@@ -64050,12 +64038,10 @@ function buildEnv(params) {
|
|
|
64050
64038
|
env[key] = value2;
|
|
64051
64039
|
}
|
|
64052
64040
|
}
|
|
64053
|
-
|
|
64054
|
-
|
|
64055
|
-
|
|
64056
|
-
|
|
64057
|
-
env[`ANTHROPIC_DEFAULT_${tier.toUpperCase()}_MODEL`] = ref;
|
|
64058
|
-
}
|
|
64041
|
+
for (const tier of CLAUDE_TIERS) {
|
|
64042
|
+
const ref = params.tierModels?.[tier];
|
|
64043
|
+
if (ref !== void 0) {
|
|
64044
|
+
env[`ANTHROPIC_DEFAULT_${tier.toUpperCase()}_MODEL`] = ref;
|
|
64059
64045
|
}
|
|
64060
64046
|
}
|
|
64061
64047
|
if (params.provider !== void 0) {
|
|
@@ -64078,7 +64064,6 @@ function buildEnv(params) {
|
|
|
64078
64064
|
{ name: SESSION_HEADER, value: params.sessionId },
|
|
64079
64065
|
{ name: AUTH_HEADER, value: params.frontdoor.sessionToken },
|
|
64080
64066
|
...params.provider === void 0 ? [] : [{ name: PROVIDER_HEADER, value: params.provider.name }],
|
|
64081
|
-
...params.routeByName ? [{ name: ROUTE_BY_NAME_HEADER, value: "1" }] : [],
|
|
64082
64067
|
...params.headroom === void 0 ? [] : [
|
|
64083
64068
|
{ name: HEADROOM_FLAG_HEADER, value: "1" },
|
|
64084
64069
|
{ name: PROJECT_ID_HEADER, value: params.headroom.projectId }
|
|
@@ -65954,7 +65939,7 @@ function routedModelRows(models, providers) {
|
|
|
65954
65939
|
const hidden = new Set(models.hide ?? []);
|
|
65955
65940
|
const shown = models.show === void 0 ? void 0 : new Set(models.show);
|
|
65956
65941
|
const visible = (model) => shown === void 0 ? !hidden.has(model) : shown.has(model);
|
|
65957
|
-
const concrete = providers.flatMap(([name, provider]) => providerModelRows(provider).map((row) => ({ ...row, model: `${name}/${row.model}`, label: `${name} / ${row.label}`, description: `${name}: ${row.description}` })));
|
|
65942
|
+
const concrete = providers.flatMap(([name, provider, catalogue]) => providerModelRows(provider, catalogue).map((row) => ({ ...row, model: `${name}/${row.model}`, label: `${name} / ${row.label}`, description: `${name}: ${row.description}` })));
|
|
65958
65943
|
const concreteByRef = new Map(concrete.map((row) => [row.model, row]));
|
|
65959
65944
|
const families = buildFamilies([...concrete.map((row) => row.model), ...accountRefsOf(models)], models);
|
|
65960
65945
|
const handlingOf = (refs) => refs.map((ref) => concreteByRef.get(ref)?.behavesAs).find((behavesAs) => behavesAs !== void 0) ?? TIER_BEHAVES_AS.sonnet;
|
|
@@ -65978,9 +65963,6 @@ function safeExpand(name, models) {
|
|
|
65978
65963
|
return models.virtual?.[name]?.members ?? [];
|
|
65979
65964
|
}
|
|
65980
65965
|
}
|
|
65981
|
-
function modelPickerSettings(provider, catalogue = []) {
|
|
65982
|
-
return modelPickerSettingsFromRows(providerModelRows(provider, catalogue), true);
|
|
65983
|
-
}
|
|
65984
65966
|
function modelPickerSettingsFromRows(options, replaceBuiltInOptions) {
|
|
65985
65967
|
return options.length === 0 ? void 0 : JSON.stringify({ modelPicker: { options, replaceBuiltInOptions } });
|
|
65986
65968
|
}
|
|
@@ -66442,7 +66424,6 @@ function decideLaunch(params, readOnly) {
|
|
|
66442
66424
|
...parsedArgv.trackUsage === void 0 ? {} : { trackUsage: parsedArgv.trackUsage },
|
|
66443
66425
|
...parsedArgv.pause === void 0 ? {} : { pause: parsedArgv.pause },
|
|
66444
66426
|
...parsedArgv.explain === void 0 ? {} : { explain: parsedArgv.explain },
|
|
66445
|
-
...parsedArgv.routeByName === void 0 ? {} : { routeByName: parsedArgv.routeByName },
|
|
66446
66427
|
...parsedArgv.delay === void 0 ? {} : { delay: parsedArgv.delay }
|
|
66447
66428
|
}
|
|
66448
66429
|
});
|
|
@@ -66452,11 +66433,17 @@ function decideLaunch(params, readOnly) {
|
|
|
66452
66433
|
notes.push(`${loginlessProvider.identity} has no stored login, so Remote Control is off; provider ${loginlessProvider.provider} runs without it`);
|
|
66453
66434
|
}
|
|
66454
66435
|
const flags = loginlessProvider === void 0 ? requestedFlags : { ...requestedFlags, remoteControl: false };
|
|
66455
|
-
const catalogue = selectedProvider === void 0 ? void 0 : parseCatalogueCache(params.fs.readFileUtf8(catalogueCachePath(paths, selectedProvider.name)));
|
|
66456
|
-
const routesByName = flags.routeByName || selectedProvider !== void 0 && isRouterProvider(selectedProvider.definition);
|
|
66457
66436
|
const globalModels = loadConfigFile(paths.globalConfigFile, GlobalConfigSchema, params.fs.readConfigFile)?.config.models;
|
|
66458
66437
|
const models = launchCascade !== void 0 && params.farm !== void 0 ? cascadeModels : globalModels;
|
|
66459
|
-
const
|
|
66438
|
+
const listedProviders = listProviderNames(fs26.readdir, paths.providersDir).flatMap((name) => {
|
|
66439
|
+
try {
|
|
66440
|
+
const definition = loadProvider(paths.providersDir, name, fs26);
|
|
66441
|
+
return definition === void 0 ? [] : [[name, definition, parseCatalogueCache(params.fs.readFileUtf8(catalogueCachePath(paths, name)))?.models ?? []]];
|
|
66442
|
+
} catch {
|
|
66443
|
+
return [];
|
|
66444
|
+
}
|
|
66445
|
+
});
|
|
66446
|
+
const pickerSettings = modelPickerSettingsFromRows(routedModelRows(models ?? {}, listedProviders), selectedProvider !== void 0);
|
|
66460
66447
|
const callerSettings = hasSettingsArgument(parsedArgv.rest);
|
|
66461
66448
|
if (pickerSettings !== void 0 && callerSettings) {
|
|
66462
66449
|
notes.push("--settings was passed, so /model keeps Claude Code's own model names");
|
|
@@ -66560,8 +66547,8 @@ function prepareLaunch(params) {
|
|
|
66560
66547
|
if (decided.pinnedVersion !== void 0) {
|
|
66561
66548
|
rows.push(pinnedVersionRow(decided.pinnedVersion.version, decided.pinnedVersion.source));
|
|
66562
66549
|
}
|
|
66563
|
-
const
|
|
66564
|
-
if (
|
|
66550
|
+
const namesResolved = decided.models !== void 0;
|
|
66551
|
+
if (namesResolved) {
|
|
66565
66552
|
const check2 = resolveRoutedProviderCredentials({ paths, port: params.fs, env, ...params.credentials === void 0 ? {} : { credentials: params.credentials }, models: decided.models, targets: () => targetRefs(paths) });
|
|
66566
66553
|
if (!check2.ok) {
|
|
66567
66554
|
log.error(check2.message);
|
|
@@ -66602,7 +66589,6 @@ function prepareLaunch(params) {
|
|
|
66602
66589
|
...headroom === void 0 ? {} : { headroom },
|
|
66603
66590
|
sessionId,
|
|
66604
66591
|
remoteControl: resolvedFlags.remoteControl,
|
|
66605
|
-
routeByName: routesByName,
|
|
66606
66592
|
...decided.models?.tiers === void 0 ? {} : { tierModels: decided.models.tiers }
|
|
66607
66593
|
});
|
|
66608
66594
|
const releases = [...headroom === void 0 || headroomPort === void 0 ? [] : [headroomPort.release], ...frontDoorRelease === void 0 ? [] : [frontDoorRelease]];
|
|
@@ -66630,8 +66616,7 @@ function resolveLaunch(params) {
|
|
|
66630
66616
|
...frontDoor ? { frontdoor: { port: 0, connectPort: 0, trustBundlePath: "", sessionToken: "" } } : {},
|
|
66631
66617
|
...decided.flags.headroom ? { headroom: { socketPath: "", projectId: "" } } : {},
|
|
66632
66618
|
sessionId: "",
|
|
66633
|
-
remoteControl: decided.flags.remoteControl
|
|
66634
|
-
routeByName: decided.flags.routeByName
|
|
66619
|
+
remoteControl: decided.flags.remoteControl
|
|
66635
66620
|
});
|
|
66636
66621
|
const credentialNames = decided.identityCredentialBlock === void 0 ? [] : Object.keys(credentialVariables(decided.identityCredentialBlock.target ?? "bearer", ""));
|
|
66637
66622
|
const environment = [.../* @__PURE__ */ new Set([...Object.keys(built).filter((name) => built[name] !== env[name]), ...credentialNames])].sort();
|
|
@@ -66643,7 +66628,7 @@ function resolveLaunch(params) {
|
|
|
66643
66628
|
bin: decided.bin,
|
|
66644
66629
|
args: decided.args,
|
|
66645
66630
|
...credential === void 0 ? {} : { credential },
|
|
66646
|
-
routing: { frontDoor, headroom: decided.flags.headroom
|
|
66631
|
+
routing: { frontDoor, headroom: decided.flags.headroom },
|
|
66647
66632
|
environment
|
|
66648
66633
|
};
|
|
66649
66634
|
}
|
|
@@ -113771,7 +113756,7 @@ function registerProfileCommand(program2, deps) {
|
|
|
113771
113756
|
withExamples(
|
|
113772
113757
|
profile.command("set <name>").description(
|
|
113773
113758
|
"Update a configuration profile's categories, entries, extends list, description or launch settings. With no options on a terminal, walks through its categories."
|
|
113774
|
-
).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("--
|
|
113759
|
+
).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) => {
|
|
113775
113760
|
const { json: json2, ...options } = allOptions;
|
|
113776
113761
|
requireProfileExists(paths, name);
|
|
113777
113762
|
if (Object.entries(allOptions).every(([key, value2]) => key === "json" || value2 === void 0)) {
|
|
@@ -129013,8 +128998,7 @@ var ConfigProfileSetInputSchema = external_exports.strictObject({
|
|
|
129013
128998
|
claudeVersion: external_exports.union([external_exports.string().min(1), external_exports.literal(false)]).optional(),
|
|
129014
128999
|
delay: external_exports.union([external_exports.string().regex(DURATION_RE), external_exports.literal(false)]).optional(),
|
|
129015
129000
|
pause: external_exports.boolean().optional(),
|
|
129016
|
-
explain: external_exports.boolean().optional()
|
|
129017
|
-
routeByName: external_exports.boolean().optional()
|
|
129001
|
+
explain: external_exports.boolean().optional()
|
|
129018
129002
|
}).optional()
|
|
129019
129003
|
});
|
|
129020
129004
|
var ConfigProfileSetOutputSchema = storedMutationOutput("profile", "updated", ProfileValueSchema);
|
|
@@ -129226,8 +129210,7 @@ function createConfigApiRouter(deps) {
|
|
|
129226
129210
|
...launch?.claudeVersion === void 0 ? {} : { launchClaudeVersion: launch.claudeVersion },
|
|
129227
129211
|
...launch?.delay === void 0 ? {} : { launchDelay: launch.delay },
|
|
129228
129212
|
...launch?.pause === void 0 ? {} : { launchPause: launch.pause },
|
|
129229
|
-
...launch?.explain === void 0 ? {} : { launchExplain: launch.explain }
|
|
129230
|
-
...launch?.routeByName === void 0 ? {} : { launchRouteByName: launch.routeByName }
|
|
129213
|
+
...launch?.explain === void 0 ? {} : { launchExplain: launch.explain }
|
|
129231
129214
|
});
|
|
129232
129215
|
return { action: "updated", kind: "profile", name: input2.name, value: profileValue(input2.name, paths) };
|
|
129233
129216
|
})
|
|
@@ -129529,7 +129512,6 @@ var LaunchFlagsSchema = external_exports.strictObject({
|
|
|
129529
129512
|
trackUsage: external_exports.boolean(),
|
|
129530
129513
|
pause: external_exports.boolean(),
|
|
129531
129514
|
explain: external_exports.boolean(),
|
|
129532
|
-
routeByName: external_exports.boolean(),
|
|
129533
129515
|
/** How long the launch waits after its own output before it starts claude, in milliseconds. */
|
|
129534
129516
|
delayMs: external_exports.number()
|
|
129535
129517
|
});
|
|
@@ -129543,7 +129525,7 @@ var LaunchResolveOutputSchema = external_exports.strictObject({
|
|
|
129543
129525
|
args: external_exports.readonly(external_exports.array(external_exports.string())),
|
|
129544
129526
|
/** The credential the launch would authenticate with, by target and source kinds. Absent when none applies. */
|
|
129545
129527
|
credential: external_exports.strictObject({ subject: external_exports.enum(["provider", "identity"]), name: external_exports.string(), summary: CredentialSummarySchema }).optional(),
|
|
129546
|
-
routing: external_exports.strictObject({ frontDoor: external_exports.boolean(), headroom: external_exports.boolean()
|
|
129528
|
+
routing: external_exports.strictObject({ frontDoor: external_exports.boolean(), headroom: external_exports.boolean() }),
|
|
129547
129529
|
/** The names of the environment variables the launch would set or unset, sorted. Values are not reported. */
|
|
129548
129530
|
environment: external_exports.readonly(external_exports.array(external_exports.string())),
|
|
129549
129531
|
warnings: external_exports.readonly(external_exports.array(external_exports.string()))
|
|
@@ -131996,13 +131978,16 @@ function resolveRoutedModel(model, providerName, session, deps, memory, rotation
|
|
|
131996
131978
|
if (qualified !== void 0) {
|
|
131997
131979
|
const [provider2, ...rest2] = qualified.split("/");
|
|
131998
131980
|
const named = rest2.join("/");
|
|
131999
|
-
return provider2 === void 0 || named === "" ? void 0 : { provider: provider2, model: withoutContextMarker(named), ref: qualified };
|
|
131981
|
+
return provider2 === void 0 || named === "" || deps.definesProvider !== void 0 && !deps.definesProvider(provider2) ? void 0 : { provider: provider2, model: withoutContextMarker(named), ref: qualified };
|
|
132000
131982
|
}
|
|
132001
131983
|
const isFamily = model.startsWith(FAMILY_PREFIX);
|
|
132002
131984
|
const virtual = isFamily ? void 0 : models?.virtual?.[model];
|
|
132003
131985
|
if (virtual === void 0 && !isFamily) {
|
|
132004
131986
|
return void 0;
|
|
132005
131987
|
}
|
|
131988
|
+
if (providerName !== void 0 && (deps.targets?.() ?? []).some((ref) => ref === `${providerName}/${model}` || withoutContextMarker(ref) === `${providerName}/${withoutContextMarker(model)}`)) {
|
|
131989
|
+
return void 0;
|
|
131990
|
+
}
|
|
132006
131991
|
const declared = isFamily ? [model] : expandMembers(model, models);
|
|
132007
131992
|
const families = isFamily || declared.some((member) => member.startsWith(FAMILY_PREFIX)) || models?.families !== void 0 ? buildFamilies(deps.targets?.() ?? [], models) : [];
|
|
132008
131993
|
const mode = virtual?.mode ?? familyMode(familyNamed(families, model)?.settings ?? {});
|
|
@@ -132048,6 +132033,13 @@ function createProviderRouteResolver(deps) {
|
|
|
132048
132033
|
const oauthRoute = createPassthroughRoute("anthropic", { baseUrl: `https://${CONNECT_INTERCEPT_HOST}:${String(HTTPS_PORT)}`, stripPrefix: void 0, headroomUpstream: void 0 });
|
|
132049
132034
|
const antigravityQuotaSources = /* @__PURE__ */ new Map();
|
|
132050
132035
|
const antigravityRoutingMemory = /* @__PURE__ */ new Map();
|
|
132036
|
+
const definesProvider = (name) => {
|
|
132037
|
+
try {
|
|
132038
|
+
return loadProvider(deps.providersDir, name, deps.fs) !== void 0;
|
|
132039
|
+
} catch {
|
|
132040
|
+
return false;
|
|
132041
|
+
}
|
|
132042
|
+
};
|
|
132051
132043
|
const routingMemory = /* @__PURE__ */ new Map();
|
|
132052
132044
|
const rotations = /* @__PURE__ */ new Map();
|
|
132053
132045
|
const memoryFor = (provider) => {
|
|
@@ -132202,17 +132194,14 @@ function createProviderRouteResolver(deps) {
|
|
|
132202
132194
|
visited.add(providerName);
|
|
132203
132195
|
}
|
|
132204
132196
|
let routes;
|
|
132205
|
-
let isRouter;
|
|
132206
132197
|
try {
|
|
132207
132198
|
const definition = providerName === void 0 ? void 0 : loadProvider(deps.providersDir, providerName, deps.fs);
|
|
132208
132199
|
routes = definition === void 0 || !isHttpProvider(definition) ? void 0 : definition.routes;
|
|
132209
|
-
isRouter = definition !== void 0 && isRouterProvider(definition);
|
|
132210
132200
|
} catch {
|
|
132211
132201
|
routes = void 0;
|
|
132212
|
-
isRouter = false;
|
|
132213
132202
|
}
|
|
132214
|
-
const
|
|
132215
|
-
if (
|
|
132203
|
+
const resolvesNames = !nameResolved && !isRcSelfHostPath(path65);
|
|
132204
|
+
if (resolvesNames) {
|
|
132216
132205
|
const scan2 = await scanRequestHead(current, true);
|
|
132217
132206
|
if (scan2.replayed === void 0) {
|
|
132218
132207
|
const resolution = resolve2(current);
|
|
@@ -132229,8 +132218,11 @@ function createProviderRouteResolver(deps) {
|
|
|
132229
132218
|
message: moved ? `model "${account.model}" runs under identity "${account.identity}"; this session is being moved there and will resume with it` : `model "${account.model}" runs under identity "${account.identity}", which needs a relaunch this session cannot make; start it there with: claude @${account.identity} --resume`
|
|
132230
132219
|
};
|
|
132231
132220
|
}
|
|
132232
|
-
const routed = scan2.model === void 0 ? void 0 : resolveRoutedModel(scan2.model, providerName, current.session, deps, routingMemory, rotations, needsOf(scan2));
|
|
132221
|
+
const routed = scan2.model === void 0 ? void 0 : resolveRoutedModel(scan2.model, providerName, current.session, { ...deps, definesProvider }, routingMemory, rotations, needsOf(scan2));
|
|
132233
132222
|
const requested = scan2.model;
|
|
132223
|
+
if (routed === void 0) {
|
|
132224
|
+
current = scan2.replayed;
|
|
132225
|
+
}
|
|
132234
132226
|
if (routed !== void 0) {
|
|
132235
132227
|
routingMemory.set(current.session.sessionId ?? "", routed.ref);
|
|
132236
132228
|
if (routed.requested !== void 0) {
|
|
@@ -148827,12 +148819,11 @@ Launching:
|
|
|
148827
148819
|
--delay <duration> wait this long (5s, 500ms) after the launcher's own output before starting claude
|
|
148828
148820
|
--[no-]pause wait for a key press after the launcher's own output before starting claude
|
|
148829
148821
|
--[no-]explain with @pool:<name>, list every member the pick ranked and why, not only the one picked
|
|
148830
|
-
--[no-]route-by-name route provider-qualified model names through the models block to the provider that serves them
|
|
148831
148822
|
--native run the real claude with nothing from agent-shim applied (no other launch flag allowed)
|
|
148832
148823
|
|
|
148833
148824
|
Environment:
|
|
148834
148825
|
AGENT_SHIM_IDENTITY, AGENT_SHIM_CONFIG_PROFILE, AGENT_SHIM_SKIP_PERMISSIONS,
|
|
148835
|
-
AGENT_SHIM_REMOTE_CONTROL, AGENT_SHIM_HEADROOM, AGENT_SHIM_TRACK_USAGE, AGENT_SHIM_DELAY, AGENT_SHIM_PAUSE, AGENT_SHIM_EXPLAIN,
|
|
148826
|
+
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,
|
|
148836
148827
|
AGENT_SHIM_CATEGORY_OVERRIDE, AGENT_SHIM_ENTRY_OVERRIDE, AGENT_SHIM_HOME,
|
|
148837
148828
|
AGENT_SHIM_DEBUG (print stack traces), NO_COLOR. Booleans are true, false, 1 or 0.
|
|
148838
148829
|
|
|
@@ -149636,7 +149627,6 @@ function otherLaunchFlags(parsed) {
|
|
|
149636
149627
|
...parsed.delay === void 0 ? [] : ["--delay"],
|
|
149637
149628
|
...parsed.pause === void 0 ? [] : ["--[no-]pause"],
|
|
149638
149629
|
...parsed.explain === void 0 ? [] : ["--[no-]explain"],
|
|
149639
|
-
...parsed.routeByName === void 0 ? [] : ["--[no-]route-by-name"],
|
|
149640
149630
|
...parsed.headroom === void 0 ? [] : ["--[no-]headroom"],
|
|
149641
149631
|
...parsed.trackUsage === void 0 ? [] : ["--[no-]track-usage"],
|
|
149642
149632
|
...parsed.skipPermissions === void 0 ? [] : ["--[no-]skip-permissions"],
|
package/dist/index.cjs
CHANGED
|
@@ -294,7 +294,6 @@ var init_schema = __esm({
|
|
|
294
294
|
/** Whether the launcher waits for a key press after its own output before it starts claude. Takes the place of `delay` when both are set. Applies only when a terminal is watching. */
|
|
295
295
|
pause: import_zod.z.boolean().optional(),
|
|
296
296
|
/** Whether a provider session routes provider-qualified model names (`z/glm-5.3`, `auto`) through the `models` block to the provider that serves them, instead of sending every request to the launch provider. */
|
|
297
|
-
routeByName: import_zod.z.boolean().optional(),
|
|
298
297
|
/** Whether the launcher's report, for a launch that picks from a pool, lists every member the pick ranked with why each stands where it does, and not only the member it picked. */
|
|
299
298
|
explain: import_zod.z.boolean().optional()
|
|
300
299
|
});
|
|
@@ -1473,9 +1472,6 @@ function flattenLayers(layers, options) {
|
|
|
1473
1472
|
if (layer.launch.explain !== void 0) {
|
|
1474
1473
|
launch.explain = layer.launch.explain;
|
|
1475
1474
|
}
|
|
1476
|
-
if (layer.launch.routeByName !== void 0) {
|
|
1477
|
-
launch.routeByName = layer.launch.routeByName;
|
|
1478
|
-
}
|
|
1479
1475
|
}
|
|
1480
1476
|
if (layer.models !== void 0) {
|
|
1481
1477
|
models = mergeModels(models, layer.models);
|
|
@@ -2930,7 +2926,7 @@ var init_capability = __esm({
|
|
|
2930
2926
|
});
|
|
2931
2927
|
|
|
2932
2928
|
// src/frontdoor/route.ts
|
|
2933
|
-
var IDENTITY_HEADER, SESSION_HEADER, PROVIDER_HEADER, HEADROOM_FLAG_HEADER,
|
|
2929
|
+
var IDENTITY_HEADER, SESSION_HEADER, PROVIDER_HEADER, HEADROOM_FLAG_HEADER, PROJECT_ID_HEADER, AUTH_HEADER;
|
|
2934
2930
|
var init_route = __esm({
|
|
2935
2931
|
"src/frontdoor/route.ts"() {
|
|
2936
2932
|
"use strict";
|
|
@@ -2938,7 +2934,6 @@ var init_route = __esm({
|
|
|
2938
2934
|
SESSION_HEADER = "x-agent-shim-session";
|
|
2939
2935
|
PROVIDER_HEADER = "x-agent-shim-provider";
|
|
2940
2936
|
HEADROOM_FLAG_HEADER = "x-agent-shim-headroom";
|
|
2941
|
-
ROUTE_BY_NAME_HEADER = "x-agent-shim-route-by-name";
|
|
2942
2937
|
PROJECT_ID_HEADER = "x-headroom-project-id";
|
|
2943
2938
|
AUTH_HEADER = "x-agent-shim-auth";
|
|
2944
2939
|
}
|
|
@@ -3078,7 +3073,7 @@ var init_state = __esm({
|
|
|
3078
3073
|
import_node_path8 = __toESM(require("node:path"), 1);
|
|
3079
3074
|
import_zod3 = require("zod");
|
|
3080
3075
|
init_schema();
|
|
3081
|
-
FRONT_DOOR_PROTOCOL =
|
|
3076
|
+
FRONT_DOOR_PROTOCOL = 5;
|
|
3082
3077
|
FrontDoorSessionSchema = import_zod3.z.strictObject({ pid: import_zod3.z.number().int().positive(), startedAt: import_zod3.z.number(), token: import_zod3.z.string().min(1), supervisorPid: import_zod3.z.number().int().positive().optional(), sessionId: import_zod3.z.string().min(1).optional(), models: ModelsConfigSchema.optional() });
|
|
3083
3078
|
FrontDoorStateSchema = import_zod3.z.strictObject({
|
|
3084
3079
|
/**
|
|
@@ -3151,7 +3146,7 @@ var init_package = __esm({
|
|
|
3151
3146
|
"package.json"() {
|
|
3152
3147
|
package_default = {
|
|
3153
3148
|
name: "claude-use",
|
|
3154
|
-
version: "11.
|
|
3149
|
+
version: "11.46.0",
|
|
3155
3150
|
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.",
|
|
3156
3151
|
license: "MIT",
|
|
3157
3152
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -6455,9 +6450,6 @@ function applyProfileChange(paths, name, change) {
|
|
|
6455
6450
|
if (change.launchExplain !== void 0) {
|
|
6456
6451
|
launchPatch.explain = change.launchExplain;
|
|
6457
6452
|
}
|
|
6458
|
-
if (change.launchRouteByName !== void 0) {
|
|
6459
|
-
launchPatch.routeByName = change.launchRouteByName;
|
|
6460
|
-
}
|
|
6461
6453
|
if (Object.keys(launchPatch).length > 0) {
|
|
6462
6454
|
setProfileLaunchFlags(paths, name, launchPatch);
|
|
6463
6455
|
touched = true;
|
|
@@ -8166,7 +8158,7 @@ function routedModelRows(models, providers) {
|
|
|
8166
8158
|
const hidden = new Set(models.hide ?? []);
|
|
8167
8159
|
const shown = models.show === void 0 ? void 0 : new Set(models.show);
|
|
8168
8160
|
const visible = (model) => shown === void 0 ? !hidden.has(model) : shown.has(model);
|
|
8169
|
-
const concrete = providers.flatMap(([name, provider]) => providerModelRows(provider).map((row) => ({ ...row, model: `${name}/${row.model}`, label: `${name} / ${row.label}`, description: `${name}: ${row.description}` })));
|
|
8161
|
+
const concrete = providers.flatMap(([name, provider, catalogue]) => providerModelRows(provider, catalogue).map((row) => ({ ...row, model: `${name}/${row.model}`, label: `${name} / ${row.label}`, description: `${name}: ${row.description}` })));
|
|
8170
8162
|
const concreteByRef = new Map(concrete.map((row) => [row.model, row]));
|
|
8171
8163
|
const families = buildFamilies([...concrete.map((row) => row.model), ...accountRefsOf(models)], models);
|
|
8172
8164
|
const handlingOf = (refs) => refs.map((ref) => concreteByRef.get(ref)?.behavesAs).find((behavesAs) => behavesAs !== void 0) ?? TIER_BEHAVES_AS.sonnet;
|
|
@@ -8190,9 +8182,6 @@ function safeExpand(name, models) {
|
|
|
8190
8182
|
return models.virtual?.[name]?.members ?? [];
|
|
8191
8183
|
}
|
|
8192
8184
|
}
|
|
8193
|
-
function modelPickerSettings(provider, catalogue = []) {
|
|
8194
|
-
return modelPickerSettingsFromRows(providerModelRows(provider, catalogue), true);
|
|
8195
|
-
}
|
|
8196
8185
|
function modelPickerSettingsFromRows(options, replaceBuiltInOptions) {
|
|
8197
8186
|
return options.length === 0 ? void 0 : JSON.stringify({ modelPicker: { options, replaceBuiltInOptions } });
|
|
8198
8187
|
}
|
|
@@ -8663,8 +8652,7 @@ var init_argv = __esm({
|
|
|
8663
8652
|
{ flag: "--remote-control", key: "remoteControl" },
|
|
8664
8653
|
{ flag: "--wait", key: "wait" },
|
|
8665
8654
|
{ flag: "--pause", key: "pause" },
|
|
8666
|
-
{ flag: "--explain", key: "explain" }
|
|
8667
|
-
{ flag: "--route-by-name", key: "routeByName" }
|
|
8655
|
+
{ flag: "--explain", key: "explain" }
|
|
8668
8656
|
];
|
|
8669
8657
|
LAUNCHER_FLAG_NAMES = [
|
|
8670
8658
|
...VALUED_FLAGS,
|
|
@@ -8854,7 +8842,6 @@ function resolveLaunchFlags(params) {
|
|
|
8854
8842
|
trackUsage: params.flags?.trackUsage ?? parseEnvBool("AGENT_SHIM_TRACK_USAGE", params.env.AGENT_SHIM_TRACK_USAGE) ?? params.cascade?.trackUsage ?? true,
|
|
8855
8843
|
pause: params.flags?.pause ?? parseEnvBool("AGENT_SHIM_PAUSE", params.env.AGENT_SHIM_PAUSE) ?? params.cascade?.pause ?? false,
|
|
8856
8844
|
explain: params.flags?.explain ?? parseEnvBool("AGENT_SHIM_EXPLAIN", params.env.AGENT_SHIM_EXPLAIN) ?? params.cascade?.explain ?? false,
|
|
8857
|
-
routeByName: params.flags?.routeByName ?? parseEnvBool("AGENT_SHIM_ROUTE_BY_NAME", params.env.AGENT_SHIM_ROUTE_BY_NAME) ?? params.cascade?.routeByName ?? false,
|
|
8858
8845
|
delayMs: resolveDelayMs(params)
|
|
8859
8846
|
};
|
|
8860
8847
|
}
|
|
@@ -8903,12 +8890,10 @@ function buildEnv(params) {
|
|
|
8903
8890
|
env[key] = value;
|
|
8904
8891
|
}
|
|
8905
8892
|
}
|
|
8906
|
-
|
|
8907
|
-
|
|
8908
|
-
|
|
8909
|
-
|
|
8910
|
-
env[`ANTHROPIC_DEFAULT_${tier.toUpperCase()}_MODEL`] = ref;
|
|
8911
|
-
}
|
|
8893
|
+
for (const tier of CLAUDE_TIERS) {
|
|
8894
|
+
const ref = params.tierModels?.[tier];
|
|
8895
|
+
if (ref !== void 0) {
|
|
8896
|
+
env[`ANTHROPIC_DEFAULT_${tier.toUpperCase()}_MODEL`] = ref;
|
|
8912
8897
|
}
|
|
8913
8898
|
}
|
|
8914
8899
|
if (params.provider !== void 0) {
|
|
@@ -8931,7 +8916,6 @@ function buildEnv(params) {
|
|
|
8931
8916
|
{ name: SESSION_HEADER, value: params.sessionId },
|
|
8932
8917
|
{ name: AUTH_HEADER, value: params.frontdoor.sessionToken },
|
|
8933
8918
|
...params.provider === void 0 ? [] : [{ name: PROVIDER_HEADER, value: params.provider.name }],
|
|
8934
|
-
...params.routeByName ? [{ name: ROUTE_BY_NAME_HEADER, value: "1" }] : [],
|
|
8935
8919
|
...params.headroom === void 0 ? [] : [
|
|
8936
8920
|
{ name: HEADROOM_FLAG_HEADER, value: "1" },
|
|
8937
8921
|
{ name: PROJECT_ID_HEADER, value: params.headroom.projectId }
|
|
@@ -9710,7 +9694,6 @@ function decideLaunch(params, readOnly) {
|
|
|
9710
9694
|
...parsedArgv.trackUsage === void 0 ? {} : { trackUsage: parsedArgv.trackUsage },
|
|
9711
9695
|
...parsedArgv.pause === void 0 ? {} : { pause: parsedArgv.pause },
|
|
9712
9696
|
...parsedArgv.explain === void 0 ? {} : { explain: parsedArgv.explain },
|
|
9713
|
-
...parsedArgv.routeByName === void 0 ? {} : { routeByName: parsedArgv.routeByName },
|
|
9714
9697
|
...parsedArgv.delay === void 0 ? {} : { delay: parsedArgv.delay }
|
|
9715
9698
|
}
|
|
9716
9699
|
});
|
|
@@ -9720,11 +9703,17 @@ function decideLaunch(params, readOnly) {
|
|
|
9720
9703
|
notes.push(`${loginlessProvider.identity} has no stored login, so Remote Control is off; provider ${loginlessProvider.provider} runs without it`);
|
|
9721
9704
|
}
|
|
9722
9705
|
const flags = loginlessProvider === void 0 ? requestedFlags : { ...requestedFlags, remoteControl: false };
|
|
9723
|
-
const catalogue = selectedProvider === void 0 ? void 0 : parseCatalogueCache(params.fs.readFileUtf8(catalogueCachePath(paths, selectedProvider.name)));
|
|
9724
|
-
const routesByName = flags.routeByName || selectedProvider !== void 0 && isRouterProvider(selectedProvider.definition);
|
|
9725
9706
|
const globalModels = loadConfigFile(paths.globalConfigFile, GlobalConfigSchema, params.fs.readConfigFile)?.config.models;
|
|
9726
9707
|
const models = launchCascade !== void 0 && params.farm !== void 0 ? cascadeModels : globalModels;
|
|
9727
|
-
const
|
|
9708
|
+
const listedProviders = listProviderNames(fs13.readdir, paths.providersDir).flatMap((name) => {
|
|
9709
|
+
try {
|
|
9710
|
+
const definition = loadProvider(paths.providersDir, name, fs13);
|
|
9711
|
+
return definition === void 0 ? [] : [[name, definition, parseCatalogueCache(params.fs.readFileUtf8(catalogueCachePath(paths, name)))?.models ?? []]];
|
|
9712
|
+
} catch {
|
|
9713
|
+
return [];
|
|
9714
|
+
}
|
|
9715
|
+
});
|
|
9716
|
+
const pickerSettings = modelPickerSettingsFromRows(routedModelRows(models ?? {}, listedProviders), selectedProvider !== void 0);
|
|
9728
9717
|
const callerSettings = hasSettingsArgument(parsedArgv.rest);
|
|
9729
9718
|
if (pickerSettings !== void 0 && callerSettings) {
|
|
9730
9719
|
notes.push("--settings was passed, so /model keeps Claude Code's own model names");
|
|
@@ -9828,8 +9817,8 @@ function prepareLaunch(params) {
|
|
|
9828
9817
|
if (decided.pinnedVersion !== void 0) {
|
|
9829
9818
|
rows.push(pinnedVersionRow(decided.pinnedVersion.version, decided.pinnedVersion.source));
|
|
9830
9819
|
}
|
|
9831
|
-
const
|
|
9832
|
-
if (
|
|
9820
|
+
const namesResolved = decided.models !== void 0;
|
|
9821
|
+
if (namesResolved) {
|
|
9833
9822
|
const check = resolveRoutedProviderCredentials({ paths, port: params.fs, env, ...params.credentials === void 0 ? {} : { credentials: params.credentials }, models: decided.models, targets: () => targetRefs(paths) });
|
|
9834
9823
|
if (!check.ok) {
|
|
9835
9824
|
log.error(check.message);
|
|
@@ -9870,7 +9859,6 @@ function prepareLaunch(params) {
|
|
|
9870
9859
|
...headroom === void 0 ? {} : { headroom },
|
|
9871
9860
|
sessionId,
|
|
9872
9861
|
remoteControl: resolvedFlags.remoteControl,
|
|
9873
|
-
routeByName: routesByName,
|
|
9874
9862
|
...decided.models?.tiers === void 0 ? {} : { tierModels: decided.models.tiers }
|
|
9875
9863
|
});
|
|
9876
9864
|
const releases = [...headroom === void 0 || headroomPort === void 0 ? [] : [headroomPort.release], ...frontDoorRelease === void 0 ? [] : [frontDoorRelease]];
|
|
@@ -9898,8 +9886,7 @@ function resolveLaunch(params) {
|
|
|
9898
9886
|
...frontDoor ? { frontdoor: { port: 0, connectPort: 0, trustBundlePath: "", sessionToken: "" } } : {},
|
|
9899
9887
|
...decided.flags.headroom ? { headroom: { socketPath: "", projectId: "" } } : {},
|
|
9900
9888
|
sessionId: "",
|
|
9901
|
-
remoteControl: decided.flags.remoteControl
|
|
9902
|
-
routeByName: decided.flags.routeByName
|
|
9889
|
+
remoteControl: decided.flags.remoteControl
|
|
9903
9890
|
});
|
|
9904
9891
|
const credentialNames = decided.identityCredentialBlock === void 0 ? [] : Object.keys(credentialVariables(decided.identityCredentialBlock.target ?? "bearer", ""));
|
|
9905
9892
|
const environment = [.../* @__PURE__ */ new Set([...Object.keys(built).filter((name) => built[name] !== env[name]), ...credentialNames])].sort();
|
|
@@ -9911,7 +9898,7 @@ function resolveLaunch(params) {
|
|
|
9911
9898
|
bin: decided.bin,
|
|
9912
9899
|
args: decided.args,
|
|
9913
9900
|
...credential === void 0 ? {} : { credential },
|
|
9914
|
-
routing: { frontDoor, headroom: decided.flags.headroom
|
|
9901
|
+
routing: { frontDoor, headroom: decided.flags.headroom },
|
|
9915
9902
|
environment
|
|
9916
9903
|
};
|
|
9917
9904
|
}
|
|
@@ -16962,8 +16949,7 @@ var ConfigProfileSetInputSchema = import_zod26.z.strictObject({
|
|
|
16962
16949
|
claudeVersion: import_zod26.z.union([import_zod26.z.string().min(1), import_zod26.z.literal(false)]).optional(),
|
|
16963
16950
|
delay: import_zod26.z.union([import_zod26.z.string().regex(DURATION_RE), import_zod26.z.literal(false)]).optional(),
|
|
16964
16951
|
pause: import_zod26.z.boolean().optional(),
|
|
16965
|
-
explain: import_zod26.z.boolean().optional()
|
|
16966
|
-
routeByName: import_zod26.z.boolean().optional()
|
|
16952
|
+
explain: import_zod26.z.boolean().optional()
|
|
16967
16953
|
}).optional()
|
|
16968
16954
|
});
|
|
16969
16955
|
var ConfigProfileSetOutputSchema = storedMutationOutput("profile", "updated", ProfileValueSchema);
|
|
@@ -17175,8 +17161,7 @@ function createConfigApiRouter(deps) {
|
|
|
17175
17161
|
...launch?.claudeVersion === void 0 ? {} : { launchClaudeVersion: launch.claudeVersion },
|
|
17176
17162
|
...launch?.delay === void 0 ? {} : { launchDelay: launch.delay },
|
|
17177
17163
|
...launch?.pause === void 0 ? {} : { launchPause: launch.pause },
|
|
17178
|
-
...launch?.explain === void 0 ? {} : { launchExplain: launch.explain }
|
|
17179
|
-
...launch?.routeByName === void 0 ? {} : { launchRouteByName: launch.routeByName }
|
|
17164
|
+
...launch?.explain === void 0 ? {} : { launchExplain: launch.explain }
|
|
17180
17165
|
});
|
|
17181
17166
|
return { action: "updated", kind: "profile", name: input.name, value: profileValue(input.name, paths) };
|
|
17182
17167
|
})
|
|
@@ -17487,7 +17472,6 @@ var LaunchFlagsSchema = import_zod28.z.strictObject({
|
|
|
17487
17472
|
trackUsage: import_zod28.z.boolean(),
|
|
17488
17473
|
pause: import_zod28.z.boolean(),
|
|
17489
17474
|
explain: import_zod28.z.boolean(),
|
|
17490
|
-
routeByName: import_zod28.z.boolean(),
|
|
17491
17475
|
/** How long the launch waits after its own output before it starts claude, in milliseconds. */
|
|
17492
17476
|
delayMs: import_zod28.z.number()
|
|
17493
17477
|
});
|
|
@@ -17501,7 +17485,7 @@ var LaunchResolveOutputSchema = import_zod28.z.strictObject({
|
|
|
17501
17485
|
args: import_zod28.z.readonly(import_zod28.z.array(import_zod28.z.string())),
|
|
17502
17486
|
/** The credential the launch would authenticate with, by target and source kinds. Absent when none applies. */
|
|
17503
17487
|
credential: import_zod28.z.strictObject({ subject: import_zod28.z.enum(["provider", "identity"]), name: import_zod28.z.string(), summary: CredentialSummarySchema }).optional(),
|
|
17504
|
-
routing: import_zod28.z.strictObject({ frontDoor: import_zod28.z.boolean(), headroom: import_zod28.z.boolean()
|
|
17488
|
+
routing: import_zod28.z.strictObject({ frontDoor: import_zod28.z.boolean(), headroom: import_zod28.z.boolean() }),
|
|
17505
17489
|
/** The names of the environment variables the launch would set or unset, sorted. Values are not reported. */
|
|
17506
17490
|
environment: import_zod28.z.readonly(import_zod28.z.array(import_zod28.z.string())),
|
|
17507
17491
|
warnings: import_zod28.z.readonly(import_zod28.z.array(import_zod28.z.string()))
|
package/dist/index.mjs
CHANGED
|
@@ -272,7 +272,6 @@ var init_schema = __esm({
|
|
|
272
272
|
/** Whether the launcher waits for a key press after its own output before it starts claude. Takes the place of `delay` when both are set. Applies only when a terminal is watching. */
|
|
273
273
|
pause: z.boolean().optional(),
|
|
274
274
|
/** Whether a provider session routes provider-qualified model names (`z/glm-5.3`, `auto`) through the `models` block to the provider that serves them, instead of sending every request to the launch provider. */
|
|
275
|
-
routeByName: z.boolean().optional(),
|
|
276
275
|
/** Whether the launcher's report, for a launch that picks from a pool, lists every member the pick ranked with why each stands where it does, and not only the member it picked. */
|
|
277
276
|
explain: z.boolean().optional()
|
|
278
277
|
});
|
|
@@ -1451,9 +1450,6 @@ function flattenLayers(layers, options) {
|
|
|
1451
1450
|
if (layer.launch.explain !== void 0) {
|
|
1452
1451
|
launch.explain = layer.launch.explain;
|
|
1453
1452
|
}
|
|
1454
|
-
if (layer.launch.routeByName !== void 0) {
|
|
1455
|
-
launch.routeByName = layer.launch.routeByName;
|
|
1456
|
-
}
|
|
1457
1453
|
}
|
|
1458
1454
|
if (layer.models !== void 0) {
|
|
1459
1455
|
models = mergeModels(models, layer.models);
|
|
@@ -2906,7 +2902,7 @@ var init_capability = __esm({
|
|
|
2906
2902
|
});
|
|
2907
2903
|
|
|
2908
2904
|
// src/frontdoor/route.ts
|
|
2909
|
-
var IDENTITY_HEADER, SESSION_HEADER, PROVIDER_HEADER, HEADROOM_FLAG_HEADER,
|
|
2905
|
+
var IDENTITY_HEADER, SESSION_HEADER, PROVIDER_HEADER, HEADROOM_FLAG_HEADER, PROJECT_ID_HEADER, AUTH_HEADER;
|
|
2910
2906
|
var init_route = __esm({
|
|
2911
2907
|
"src/frontdoor/route.ts"() {
|
|
2912
2908
|
"use strict";
|
|
@@ -2914,7 +2910,6 @@ var init_route = __esm({
|
|
|
2914
2910
|
SESSION_HEADER = "x-agent-shim-session";
|
|
2915
2911
|
PROVIDER_HEADER = "x-agent-shim-provider";
|
|
2916
2912
|
HEADROOM_FLAG_HEADER = "x-agent-shim-headroom";
|
|
2917
|
-
ROUTE_BY_NAME_HEADER = "x-agent-shim-route-by-name";
|
|
2918
2913
|
PROJECT_ID_HEADER = "x-headroom-project-id";
|
|
2919
2914
|
AUTH_HEADER = "x-agent-shim-auth";
|
|
2920
2915
|
}
|
|
@@ -3054,7 +3049,7 @@ var init_state = __esm({
|
|
|
3054
3049
|
"src/frontdoor/state.ts"() {
|
|
3055
3050
|
"use strict";
|
|
3056
3051
|
init_schema();
|
|
3057
|
-
FRONT_DOOR_PROTOCOL =
|
|
3052
|
+
FRONT_DOOR_PROTOCOL = 5;
|
|
3058
3053
|
FrontDoorSessionSchema = z3.strictObject({ pid: z3.number().int().positive(), startedAt: z3.number(), token: z3.string().min(1), supervisorPid: z3.number().int().positive().optional(), sessionId: z3.string().min(1).optional(), models: ModelsConfigSchema.optional() });
|
|
3059
3054
|
FrontDoorStateSchema = z3.strictObject({
|
|
3060
3055
|
/**
|
|
@@ -3127,7 +3122,7 @@ var init_package = __esm({
|
|
|
3127
3122
|
"package.json"() {
|
|
3128
3123
|
package_default = {
|
|
3129
3124
|
name: "claude-use",
|
|
3130
|
-
version: "11.
|
|
3125
|
+
version: "11.46.0",
|
|
3131
3126
|
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.",
|
|
3132
3127
|
license: "MIT",
|
|
3133
3128
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -6431,9 +6426,6 @@ function applyProfileChange(paths, name, change) {
|
|
|
6431
6426
|
if (change.launchExplain !== void 0) {
|
|
6432
6427
|
launchPatch.explain = change.launchExplain;
|
|
6433
6428
|
}
|
|
6434
|
-
if (change.launchRouteByName !== void 0) {
|
|
6435
|
-
launchPatch.routeByName = change.launchRouteByName;
|
|
6436
|
-
}
|
|
6437
6429
|
if (Object.keys(launchPatch).length > 0) {
|
|
6438
6430
|
setProfileLaunchFlags(paths, name, launchPatch);
|
|
6439
6431
|
touched = true;
|
|
@@ -8139,7 +8131,7 @@ function routedModelRows(models, providers) {
|
|
|
8139
8131
|
const hidden = new Set(models.hide ?? []);
|
|
8140
8132
|
const shown = models.show === void 0 ? void 0 : new Set(models.show);
|
|
8141
8133
|
const visible = (model) => shown === void 0 ? !hidden.has(model) : shown.has(model);
|
|
8142
|
-
const concrete = providers.flatMap(([name, provider]) => providerModelRows(provider).map((row) => ({ ...row, model: `${name}/${row.model}`, label: `${name} / ${row.label}`, description: `${name}: ${row.description}` })));
|
|
8134
|
+
const concrete = providers.flatMap(([name, provider, catalogue]) => providerModelRows(provider, catalogue).map((row) => ({ ...row, model: `${name}/${row.model}`, label: `${name} / ${row.label}`, description: `${name}: ${row.description}` })));
|
|
8143
8135
|
const concreteByRef = new Map(concrete.map((row) => [row.model, row]));
|
|
8144
8136
|
const families = buildFamilies([...concrete.map((row) => row.model), ...accountRefsOf(models)], models);
|
|
8145
8137
|
const handlingOf = (refs) => refs.map((ref) => concreteByRef.get(ref)?.behavesAs).find((behavesAs) => behavesAs !== void 0) ?? TIER_BEHAVES_AS.sonnet;
|
|
@@ -8163,9 +8155,6 @@ function safeExpand(name, models) {
|
|
|
8163
8155
|
return models.virtual?.[name]?.members ?? [];
|
|
8164
8156
|
}
|
|
8165
8157
|
}
|
|
8166
|
-
function modelPickerSettings(provider, catalogue = []) {
|
|
8167
|
-
return modelPickerSettingsFromRows(providerModelRows(provider, catalogue), true);
|
|
8168
|
-
}
|
|
8169
8158
|
function modelPickerSettingsFromRows(options, replaceBuiltInOptions) {
|
|
8170
8159
|
return options.length === 0 ? void 0 : JSON.stringify({ modelPicker: { options, replaceBuiltInOptions } });
|
|
8171
8160
|
}
|
|
@@ -8636,8 +8625,7 @@ var init_argv = __esm({
|
|
|
8636
8625
|
{ flag: "--remote-control", key: "remoteControl" },
|
|
8637
8626
|
{ flag: "--wait", key: "wait" },
|
|
8638
8627
|
{ flag: "--pause", key: "pause" },
|
|
8639
|
-
{ flag: "--explain", key: "explain" }
|
|
8640
|
-
{ flag: "--route-by-name", key: "routeByName" }
|
|
8628
|
+
{ flag: "--explain", key: "explain" }
|
|
8641
8629
|
];
|
|
8642
8630
|
LAUNCHER_FLAG_NAMES = [
|
|
8643
8631
|
...VALUED_FLAGS,
|
|
@@ -8828,7 +8816,6 @@ function resolveLaunchFlags(params) {
|
|
|
8828
8816
|
trackUsage: params.flags?.trackUsage ?? parseEnvBool("AGENT_SHIM_TRACK_USAGE", params.env.AGENT_SHIM_TRACK_USAGE) ?? params.cascade?.trackUsage ?? true,
|
|
8829
8817
|
pause: params.flags?.pause ?? parseEnvBool("AGENT_SHIM_PAUSE", params.env.AGENT_SHIM_PAUSE) ?? params.cascade?.pause ?? false,
|
|
8830
8818
|
explain: params.flags?.explain ?? parseEnvBool("AGENT_SHIM_EXPLAIN", params.env.AGENT_SHIM_EXPLAIN) ?? params.cascade?.explain ?? false,
|
|
8831
|
-
routeByName: params.flags?.routeByName ?? parseEnvBool("AGENT_SHIM_ROUTE_BY_NAME", params.env.AGENT_SHIM_ROUTE_BY_NAME) ?? params.cascade?.routeByName ?? false,
|
|
8832
8819
|
delayMs: resolveDelayMs(params)
|
|
8833
8820
|
};
|
|
8834
8821
|
}
|
|
@@ -8877,12 +8864,10 @@ function buildEnv(params) {
|
|
|
8877
8864
|
env[key] = value;
|
|
8878
8865
|
}
|
|
8879
8866
|
}
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
-
env[`ANTHROPIC_DEFAULT_${tier.toUpperCase()}_MODEL`] = ref;
|
|
8885
|
-
}
|
|
8867
|
+
for (const tier of CLAUDE_TIERS) {
|
|
8868
|
+
const ref = params.tierModels?.[tier];
|
|
8869
|
+
if (ref !== void 0) {
|
|
8870
|
+
env[`ANTHROPIC_DEFAULT_${tier.toUpperCase()}_MODEL`] = ref;
|
|
8886
8871
|
}
|
|
8887
8872
|
}
|
|
8888
8873
|
if (params.provider !== void 0) {
|
|
@@ -8905,7 +8890,6 @@ function buildEnv(params) {
|
|
|
8905
8890
|
{ name: SESSION_HEADER, value: params.sessionId },
|
|
8906
8891
|
{ name: AUTH_HEADER, value: params.frontdoor.sessionToken },
|
|
8907
8892
|
...params.provider === void 0 ? [] : [{ name: PROVIDER_HEADER, value: params.provider.name }],
|
|
8908
|
-
...params.routeByName ? [{ name: ROUTE_BY_NAME_HEADER, value: "1" }] : [],
|
|
8909
8893
|
...params.headroom === void 0 ? [] : [
|
|
8910
8894
|
{ name: HEADROOM_FLAG_HEADER, value: "1" },
|
|
8911
8895
|
{ name: PROJECT_ID_HEADER, value: params.headroom.projectId }
|
|
@@ -9685,7 +9669,6 @@ function decideLaunch(params, readOnly) {
|
|
|
9685
9669
|
...parsedArgv.trackUsage === void 0 ? {} : { trackUsage: parsedArgv.trackUsage },
|
|
9686
9670
|
...parsedArgv.pause === void 0 ? {} : { pause: parsedArgv.pause },
|
|
9687
9671
|
...parsedArgv.explain === void 0 ? {} : { explain: parsedArgv.explain },
|
|
9688
|
-
...parsedArgv.routeByName === void 0 ? {} : { routeByName: parsedArgv.routeByName },
|
|
9689
9672
|
...parsedArgv.delay === void 0 ? {} : { delay: parsedArgv.delay }
|
|
9690
9673
|
}
|
|
9691
9674
|
});
|
|
@@ -9695,11 +9678,17 @@ function decideLaunch(params, readOnly) {
|
|
|
9695
9678
|
notes.push(`${loginlessProvider.identity} has no stored login, so Remote Control is off; provider ${loginlessProvider.provider} runs without it`);
|
|
9696
9679
|
}
|
|
9697
9680
|
const flags = loginlessProvider === void 0 ? requestedFlags : { ...requestedFlags, remoteControl: false };
|
|
9698
|
-
const catalogue = selectedProvider === void 0 ? void 0 : parseCatalogueCache(params.fs.readFileUtf8(catalogueCachePath(paths, selectedProvider.name)));
|
|
9699
|
-
const routesByName = flags.routeByName || selectedProvider !== void 0 && isRouterProvider(selectedProvider.definition);
|
|
9700
9681
|
const globalModels = loadConfigFile(paths.globalConfigFile, GlobalConfigSchema, params.fs.readConfigFile)?.config.models;
|
|
9701
9682
|
const models = launchCascade !== void 0 && params.farm !== void 0 ? cascadeModels : globalModels;
|
|
9702
|
-
const
|
|
9683
|
+
const listedProviders = listProviderNames(fs13.readdir, paths.providersDir).flatMap((name) => {
|
|
9684
|
+
try {
|
|
9685
|
+
const definition = loadProvider(paths.providersDir, name, fs13);
|
|
9686
|
+
return definition === void 0 ? [] : [[name, definition, parseCatalogueCache(params.fs.readFileUtf8(catalogueCachePath(paths, name)))?.models ?? []]];
|
|
9687
|
+
} catch {
|
|
9688
|
+
return [];
|
|
9689
|
+
}
|
|
9690
|
+
});
|
|
9691
|
+
const pickerSettings = modelPickerSettingsFromRows(routedModelRows(models ?? {}, listedProviders), selectedProvider !== void 0);
|
|
9703
9692
|
const callerSettings = hasSettingsArgument(parsedArgv.rest);
|
|
9704
9693
|
if (pickerSettings !== void 0 && callerSettings) {
|
|
9705
9694
|
notes.push("--settings was passed, so /model keeps Claude Code's own model names");
|
|
@@ -9803,8 +9792,8 @@ function prepareLaunch(params) {
|
|
|
9803
9792
|
if (decided.pinnedVersion !== void 0) {
|
|
9804
9793
|
rows.push(pinnedVersionRow(decided.pinnedVersion.version, decided.pinnedVersion.source));
|
|
9805
9794
|
}
|
|
9806
|
-
const
|
|
9807
|
-
if (
|
|
9795
|
+
const namesResolved = decided.models !== void 0;
|
|
9796
|
+
if (namesResolved) {
|
|
9808
9797
|
const check = resolveRoutedProviderCredentials({ paths, port: params.fs, env, ...params.credentials === void 0 ? {} : { credentials: params.credentials }, models: decided.models, targets: () => targetRefs(paths) });
|
|
9809
9798
|
if (!check.ok) {
|
|
9810
9799
|
log.error(check.message);
|
|
@@ -9845,7 +9834,6 @@ function prepareLaunch(params) {
|
|
|
9845
9834
|
...headroom === void 0 ? {} : { headroom },
|
|
9846
9835
|
sessionId,
|
|
9847
9836
|
remoteControl: resolvedFlags.remoteControl,
|
|
9848
|
-
routeByName: routesByName,
|
|
9849
9837
|
...decided.models?.tiers === void 0 ? {} : { tierModels: decided.models.tiers }
|
|
9850
9838
|
});
|
|
9851
9839
|
const releases = [...headroom === void 0 || headroomPort === void 0 ? [] : [headroomPort.release], ...frontDoorRelease === void 0 ? [] : [frontDoorRelease]];
|
|
@@ -9873,8 +9861,7 @@ function resolveLaunch(params) {
|
|
|
9873
9861
|
...frontDoor ? { frontdoor: { port: 0, connectPort: 0, trustBundlePath: "", sessionToken: "" } } : {},
|
|
9874
9862
|
...decided.flags.headroom ? { headroom: { socketPath: "", projectId: "" } } : {},
|
|
9875
9863
|
sessionId: "",
|
|
9876
|
-
remoteControl: decided.flags.remoteControl
|
|
9877
|
-
routeByName: decided.flags.routeByName
|
|
9864
|
+
remoteControl: decided.flags.remoteControl
|
|
9878
9865
|
});
|
|
9879
9866
|
const credentialNames = decided.identityCredentialBlock === void 0 ? [] : Object.keys(credentialVariables(decided.identityCredentialBlock.target ?? "bearer", ""));
|
|
9880
9867
|
const environment = [.../* @__PURE__ */ new Set([...Object.keys(built).filter((name) => built[name] !== env[name]), ...credentialNames])].sort();
|
|
@@ -9886,7 +9873,7 @@ function resolveLaunch(params) {
|
|
|
9886
9873
|
bin: decided.bin,
|
|
9887
9874
|
args: decided.args,
|
|
9888
9875
|
...credential === void 0 ? {} : { credential },
|
|
9889
|
-
routing: { frontDoor, headroom: decided.flags.headroom
|
|
9876
|
+
routing: { frontDoor, headroom: decided.flags.headroom },
|
|
9890
9877
|
environment
|
|
9891
9878
|
};
|
|
9892
9879
|
}
|
|
@@ -16549,8 +16536,7 @@ var ConfigProfileSetInputSchema = z26.strictObject({
|
|
|
16549
16536
|
claudeVersion: z26.union([z26.string().min(1), z26.literal(false)]).optional(),
|
|
16550
16537
|
delay: z26.union([z26.string().regex(DURATION_RE), z26.literal(false)]).optional(),
|
|
16551
16538
|
pause: z26.boolean().optional(),
|
|
16552
|
-
explain: z26.boolean().optional()
|
|
16553
|
-
routeByName: z26.boolean().optional()
|
|
16539
|
+
explain: z26.boolean().optional()
|
|
16554
16540
|
}).optional()
|
|
16555
16541
|
});
|
|
16556
16542
|
var ConfigProfileSetOutputSchema = storedMutationOutput("profile", "updated", ProfileValueSchema);
|
|
@@ -16762,8 +16748,7 @@ function createConfigApiRouter(deps) {
|
|
|
16762
16748
|
...launch?.claudeVersion === void 0 ? {} : { launchClaudeVersion: launch.claudeVersion },
|
|
16763
16749
|
...launch?.delay === void 0 ? {} : { launchDelay: launch.delay },
|
|
16764
16750
|
...launch?.pause === void 0 ? {} : { launchPause: launch.pause },
|
|
16765
|
-
...launch?.explain === void 0 ? {} : { launchExplain: launch.explain }
|
|
16766
|
-
...launch?.routeByName === void 0 ? {} : { launchRouteByName: launch.routeByName }
|
|
16751
|
+
...launch?.explain === void 0 ? {} : { launchExplain: launch.explain }
|
|
16767
16752
|
});
|
|
16768
16753
|
return { action: "updated", kind: "profile", name: input.name, value: profileValue(input.name, paths) };
|
|
16769
16754
|
})
|
|
@@ -17074,7 +17059,6 @@ var LaunchFlagsSchema = z28.strictObject({
|
|
|
17074
17059
|
trackUsage: z28.boolean(),
|
|
17075
17060
|
pause: z28.boolean(),
|
|
17076
17061
|
explain: z28.boolean(),
|
|
17077
|
-
routeByName: z28.boolean(),
|
|
17078
17062
|
/** How long the launch waits after its own output before it starts claude, in milliseconds. */
|
|
17079
17063
|
delayMs: z28.number()
|
|
17080
17064
|
});
|
|
@@ -17088,7 +17072,7 @@ var LaunchResolveOutputSchema = z28.strictObject({
|
|
|
17088
17072
|
args: z28.readonly(z28.array(z28.string())),
|
|
17089
17073
|
/** The credential the launch would authenticate with, by target and source kinds. Absent when none applies. */
|
|
17090
17074
|
credential: z28.strictObject({ subject: z28.enum(["provider", "identity"]), name: z28.string(), summary: CredentialSummarySchema }).optional(),
|
|
17091
|
-
routing: z28.strictObject({ frontDoor: z28.boolean(), headroom: z28.boolean()
|
|
17075
|
+
routing: z28.strictObject({ frontDoor: z28.boolean(), headroom: z28.boolean() }),
|
|
17092
17076
|
/** The names of the environment variables the launch would set or unset, sorted. Values are not reported. */
|
|
17093
17077
|
environment: z28.readonly(z28.array(z28.string())),
|
|
17094
17078
|
warnings: z28.readonly(z28.array(z28.string()))
|
package/dist/types/index.d.ts
CHANGED
|
@@ -278,7 +278,6 @@ declare const LaunchSchema: z.ZodObject<{
|
|
|
278
278
|
claudeVersion: z.ZodOptional<z.ZodString>;
|
|
279
279
|
delay: z.ZodOptional<z.ZodString>;
|
|
280
280
|
pause: z.ZodOptional<z.ZodBoolean>;
|
|
281
|
-
routeByName: z.ZodOptional<z.ZodBoolean>;
|
|
282
281
|
explain: z.ZodOptional<z.ZodBoolean>;
|
|
283
282
|
}, z.core.$strict>;
|
|
284
283
|
type LaunchFlags = z.infer<typeof LaunchSchema>;
|
|
@@ -960,7 +959,6 @@ declare const ConfigProfileSchema: z.ZodObject<{
|
|
|
960
959
|
claudeVersion: z.ZodOptional<z.ZodString>;
|
|
961
960
|
delay: z.ZodOptional<z.ZodString>;
|
|
962
961
|
pause: z.ZodOptional<z.ZodBoolean>;
|
|
963
|
-
routeByName: z.ZodOptional<z.ZodBoolean>;
|
|
964
962
|
explain: z.ZodOptional<z.ZodBoolean>;
|
|
965
963
|
}, z.core.$strict>>;
|
|
966
964
|
models: z.ZodOptional<z.ZodObject<{
|
|
@@ -1262,7 +1260,6 @@ declare const DirectoryRuleSchema: z.ZodObject<{
|
|
|
1262
1260
|
claudeVersion: z.ZodOptional<z.ZodString>;
|
|
1263
1261
|
delay: z.ZodOptional<z.ZodString>;
|
|
1264
1262
|
pause: z.ZodOptional<z.ZodBoolean>;
|
|
1265
|
-
routeByName: z.ZodOptional<z.ZodBoolean>;
|
|
1266
1263
|
explain: z.ZodOptional<z.ZodBoolean>;
|
|
1267
1264
|
}, z.core.$strict>>;
|
|
1268
1265
|
path: z.ZodString;
|
|
@@ -1491,7 +1488,6 @@ declare const DirectoryRulesSchema: z.ZodObject<{
|
|
|
1491
1488
|
claudeVersion: z.ZodOptional<z.ZodString>;
|
|
1492
1489
|
delay: z.ZodOptional<z.ZodString>;
|
|
1493
1490
|
pause: z.ZodOptional<z.ZodBoolean>;
|
|
1494
|
-
routeByName: z.ZodOptional<z.ZodBoolean>;
|
|
1495
1491
|
explain: z.ZodOptional<z.ZodBoolean>;
|
|
1496
1492
|
}, z.core.$strict>>;
|
|
1497
1493
|
path: z.ZodString;
|
|
@@ -1721,7 +1717,6 @@ declare const PortableConfigSchema: z.ZodObject<{
|
|
|
1721
1717
|
claudeVersion: z.ZodOptional<z.ZodString>;
|
|
1722
1718
|
delay: z.ZodOptional<z.ZodString>;
|
|
1723
1719
|
pause: z.ZodOptional<z.ZodBoolean>;
|
|
1724
|
-
routeByName: z.ZodOptional<z.ZodBoolean>;
|
|
1725
1720
|
explain: z.ZodOptional<z.ZodBoolean>;
|
|
1726
1721
|
}, z.core.$strict>>;
|
|
1727
1722
|
configProfile: z.ZodOptional<z.ZodString>;
|
|
@@ -1930,7 +1925,6 @@ declare const GlobalConfigSchema: z.ZodObject<{
|
|
|
1930
1925
|
claudeVersion: z.ZodOptional<z.ZodString>;
|
|
1931
1926
|
delay: z.ZodOptional<z.ZodString>;
|
|
1932
1927
|
pause: z.ZodOptional<z.ZodBoolean>;
|
|
1933
|
-
routeByName: z.ZodOptional<z.ZodBoolean>;
|
|
1934
1928
|
explain: z.ZodOptional<z.ZodBoolean>;
|
|
1935
1929
|
}, z.core.$strict>>;
|
|
1936
1930
|
headroom: z.ZodOptional<z.ZodObject<{
|
|
@@ -3677,7 +3671,6 @@ interface SessionIdentity {
|
|
|
3677
3671
|
/** Whether this launch resolved headroom on, so its requests must pass through the headroom hop before their route. */
|
|
3678
3672
|
readonly headroom: boolean;
|
|
3679
3673
|
/** Whether this launch routes provider-qualified model names through the models block, whatever provider it selected. */
|
|
3680
|
-
readonly routeByName: boolean;
|
|
3681
3674
|
/** The project identity headroom scopes memory to, re-set on the headroom hop and sent nowhere else. */
|
|
3682
3675
|
readonly projectId: string | undefined;
|
|
3683
3676
|
}
|
|
@@ -6445,7 +6438,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
6445
6438
|
claudeVersion: zod.ZodOptional<zod.ZodString>;
|
|
6446
6439
|
delay: zod.ZodOptional<zod.ZodString>;
|
|
6447
6440
|
pause: zod.ZodOptional<zod.ZodBoolean>;
|
|
6448
|
-
routeByName: zod.ZodOptional<zod.ZodBoolean>;
|
|
6449
6441
|
explain: zod.ZodOptional<zod.ZodBoolean>;
|
|
6450
6442
|
}, zod_v4_core.$strict>>;
|
|
6451
6443
|
}, zod_v4_core.$strict>;
|
|
@@ -6466,7 +6458,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
6466
6458
|
delay: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodLiteral<false>]>>;
|
|
6467
6459
|
pause: zod.ZodOptional<zod.ZodBoolean>;
|
|
6468
6460
|
explain: zod.ZodOptional<zod.ZodBoolean>;
|
|
6469
|
-
routeByName: zod.ZodOptional<zod.ZodBoolean>;
|
|
6470
6461
|
}, zod_v4_core.$strict>>;
|
|
6471
6462
|
}, zod_v4_core.$strict>, zod.ZodObject<{
|
|
6472
6463
|
action: zod.ZodLiteral<"updated">;
|
|
@@ -6618,7 +6609,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
6618
6609
|
claudeVersion: zod.ZodOptional<zod.ZodString>;
|
|
6619
6610
|
delay: zod.ZodOptional<zod.ZodString>;
|
|
6620
6611
|
pause: zod.ZodOptional<zod.ZodBoolean>;
|
|
6621
|
-
routeByName: zod.ZodOptional<zod.ZodBoolean>;
|
|
6622
6612
|
explain: zod.ZodOptional<zod.ZodBoolean>;
|
|
6623
6613
|
}, zod_v4_core.$strict>>;
|
|
6624
6614
|
}, zod_v4_core.$strict>;
|
|
@@ -7271,7 +7261,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
7271
7261
|
claudeVersion: zod.ZodOptional<zod.ZodString>;
|
|
7272
7262
|
delay: zod.ZodOptional<zod.ZodString>;
|
|
7273
7263
|
pause: zod.ZodOptional<zod.ZodBoolean>;
|
|
7274
|
-
routeByName: zod.ZodOptional<zod.ZodBoolean>;
|
|
7275
7264
|
explain: zod.ZodOptional<zod.ZodBoolean>;
|
|
7276
7265
|
}, zod_v4_core.$strict>>;
|
|
7277
7266
|
path: zod.ZodString;
|
|
@@ -7505,7 +7494,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
7505
7494
|
claudeVersion: zod.ZodOptional<zod.ZodString>;
|
|
7506
7495
|
delay: zod.ZodOptional<zod.ZodString>;
|
|
7507
7496
|
pause: zod.ZodOptional<zod.ZodBoolean>;
|
|
7508
|
-
routeByName: zod.ZodOptional<zod.ZodBoolean>;
|
|
7509
7497
|
explain: zod.ZodOptional<zod.ZodBoolean>;
|
|
7510
7498
|
}, zod_v4_core.$strict>>;
|
|
7511
7499
|
path: zod.ZodString;
|
|
@@ -7841,7 +7829,6 @@ interface ResolvedLaunchFlags {
|
|
|
7841
7829
|
/** Whether the launch's report lists every pool member the pick ranked and why, and not only the one picked. */
|
|
7842
7830
|
readonly explain: boolean;
|
|
7843
7831
|
/** Whether a provider session routes provider-qualified model names through the models block to the provider that serves them. */
|
|
7844
|
-
readonly routeByName: boolean;
|
|
7845
7832
|
/** How long the launcher waits after its own output before it starts claude, in milliseconds; zero for no wait. */
|
|
7846
7833
|
readonly delayMs: number;
|
|
7847
7834
|
}
|
|
@@ -8051,7 +8038,6 @@ interface LaunchResolution {
|
|
|
8051
8038
|
readonly routing: {
|
|
8052
8039
|
readonly frontDoor: boolean;
|
|
8053
8040
|
readonly headroom: boolean;
|
|
8054
|
-
readonly routeByName: boolean;
|
|
8055
8041
|
};
|
|
8056
8042
|
/** 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. */
|
|
8057
8043
|
readonly environment: readonly string[];
|
|
@@ -8138,7 +8124,6 @@ declare function createLaunchApiRouter(deps: LaunchApiDeps): {
|
|
|
8138
8124
|
trackUsage: zod.ZodBoolean;
|
|
8139
8125
|
pause: zod.ZodBoolean;
|
|
8140
8126
|
explain: zod.ZodBoolean;
|
|
8141
|
-
routeByName: zod.ZodBoolean;
|
|
8142
8127
|
delayMs: zod.ZodNumber;
|
|
8143
8128
|
}, zod_v4_core.$strict>;
|
|
8144
8129
|
claudeVersion: zod.ZodOptional<zod.ZodObject<{
|
|
@@ -8194,7 +8179,6 @@ declare function createLaunchApiRouter(deps: LaunchApiDeps): {
|
|
|
8194
8179
|
routing: zod.ZodObject<{
|
|
8195
8180
|
frontDoor: zod.ZodBoolean;
|
|
8196
8181
|
headroom: zod.ZodBoolean;
|
|
8197
|
-
routeByName: zod.ZodBoolean;
|
|
8198
8182
|
}, zod_v4_core.$strict>;
|
|
8199
8183
|
environment: zod.ZodReadonly<zod.ZodArray<zod.ZodString>>;
|
|
8200
8184
|
warnings: zod.ZodReadonly<zod.ZodArray<zod.ZodString>>;
|
|
@@ -9260,7 +9244,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9260
9244
|
trackUsage: zod.ZodBoolean;
|
|
9261
9245
|
pause: zod.ZodBoolean;
|
|
9262
9246
|
explain: zod.ZodBoolean;
|
|
9263
|
-
routeByName: zod.ZodBoolean;
|
|
9264
9247
|
delayMs: zod.ZodNumber;
|
|
9265
9248
|
}, zod_v4_core.$strict>;
|
|
9266
9249
|
claudeVersion: zod.ZodOptional<zod.ZodObject<{
|
|
@@ -9316,7 +9299,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9316
9299
|
routing: zod.ZodObject<{
|
|
9317
9300
|
frontDoor: zod.ZodBoolean;
|
|
9318
9301
|
headroom: zod.ZodBoolean;
|
|
9319
|
-
routeByName: zod.ZodBoolean;
|
|
9320
9302
|
}, zod_v4_core.$strict>;
|
|
9321
9303
|
environment: zod.ZodReadonly<zod.ZodArray<zod.ZodString>>;
|
|
9322
9304
|
warnings: zod.ZodReadonly<zod.ZodArray<zod.ZodString>>;
|
|
@@ -9678,7 +9660,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9678
9660
|
claudeVersion: zod.ZodOptional<zod.ZodString>;
|
|
9679
9661
|
delay: zod.ZodOptional<zod.ZodString>;
|
|
9680
9662
|
pause: zod.ZodOptional<zod.ZodBoolean>;
|
|
9681
|
-
routeByName: zod.ZodOptional<zod.ZodBoolean>;
|
|
9682
9663
|
explain: zod.ZodOptional<zod.ZodBoolean>;
|
|
9683
9664
|
}, zod_v4_core.$strict>>;
|
|
9684
9665
|
}, zod_v4_core.$strict>;
|
|
@@ -9699,7 +9680,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9699
9680
|
delay: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodLiteral<false>]>>;
|
|
9700
9681
|
pause: zod.ZodOptional<zod.ZodBoolean>;
|
|
9701
9682
|
explain: zod.ZodOptional<zod.ZodBoolean>;
|
|
9702
|
-
routeByName: zod.ZodOptional<zod.ZodBoolean>;
|
|
9703
9683
|
}, zod_v4_core.$strict>>;
|
|
9704
9684
|
}, zod_v4_core.$strict>, zod.ZodObject<{
|
|
9705
9685
|
action: zod.ZodLiteral<"updated">;
|
|
@@ -9851,7 +9831,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9851
9831
|
claudeVersion: zod.ZodOptional<zod.ZodString>;
|
|
9852
9832
|
delay: zod.ZodOptional<zod.ZodString>;
|
|
9853
9833
|
pause: zod.ZodOptional<zod.ZodBoolean>;
|
|
9854
|
-
routeByName: zod.ZodOptional<zod.ZodBoolean>;
|
|
9855
9834
|
explain: zod.ZodOptional<zod.ZodBoolean>;
|
|
9856
9835
|
}, zod_v4_core.$strict>>;
|
|
9857
9836
|
}, zod_v4_core.$strict>;
|
|
@@ -10504,7 +10483,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
10504
10483
|
claudeVersion: zod.ZodOptional<zod.ZodString>;
|
|
10505
10484
|
delay: zod.ZodOptional<zod.ZodString>;
|
|
10506
10485
|
pause: zod.ZodOptional<zod.ZodBoolean>;
|
|
10507
|
-
routeByName: zod.ZodOptional<zod.ZodBoolean>;
|
|
10508
10486
|
explain: zod.ZodOptional<zod.ZodBoolean>;
|
|
10509
10487
|
}, zod_v4_core.$strict>>;
|
|
10510
10488
|
path: zod.ZodString;
|
|
@@ -10738,7 +10716,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
10738
10716
|
claudeVersion: zod.ZodOptional<zod.ZodString>;
|
|
10739
10717
|
delay: zod.ZodOptional<zod.ZodString>;
|
|
10740
10718
|
pause: zod.ZodOptional<zod.ZodBoolean>;
|
|
10741
|
-
routeByName: zod.ZodOptional<zod.ZodBoolean>;
|
|
10742
10719
|
explain: zod.ZodOptional<zod.ZodBoolean>;
|
|
10743
10720
|
}, zod_v4_core.$strict>>;
|
|
10744
10721
|
path: zod.ZodString;
|
|
@@ -12013,7 +11990,6 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
|
|
|
12013
11990
|
claudeVersion: z.ZodOptional<z.ZodString>;
|
|
12014
11991
|
delay: z.ZodOptional<z.ZodString>;
|
|
12015
11992
|
pause: z.ZodOptional<z.ZodBoolean>;
|
|
12016
|
-
routeByName: z.ZodOptional<z.ZodBoolean>;
|
|
12017
11993
|
explain: z.ZodOptional<z.ZodBoolean>;
|
|
12018
11994
|
}, z.core.$strict>>;
|
|
12019
11995
|
}, z.core.$strict>;
|
|
@@ -12035,7 +12011,6 @@ declare const ConfigProfileSetInputSchema: z.ZodObject<{
|
|
|
12035
12011
|
delay: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
12036
12012
|
pause: z.ZodOptional<z.ZodBoolean>;
|
|
12037
12013
|
explain: z.ZodOptional<z.ZodBoolean>;
|
|
12038
|
-
routeByName: z.ZodOptional<z.ZodBoolean>;
|
|
12039
12014
|
}, z.core.$strict>>;
|
|
12040
12015
|
}, z.core.$strict>;
|
|
12041
12016
|
declare const ConfigProfileSetOutputSchema: z.ZodObject<{
|
|
@@ -12188,7 +12163,6 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
|
|
|
12188
12163
|
claudeVersion: z.ZodOptional<z.ZodString>;
|
|
12189
12164
|
delay: z.ZodOptional<z.ZodString>;
|
|
12190
12165
|
pause: z.ZodOptional<z.ZodBoolean>;
|
|
12191
|
-
routeByName: z.ZodOptional<z.ZodBoolean>;
|
|
12192
12166
|
explain: z.ZodOptional<z.ZodBoolean>;
|
|
12193
12167
|
}, z.core.$strict>>;
|
|
12194
12168
|
}, z.core.$strict>;
|
|
@@ -12843,7 +12817,6 @@ declare const ConfigRuleAddOutputSchema: z.ZodObject<{
|
|
|
12843
12817
|
claudeVersion: z.ZodOptional<z.ZodString>;
|
|
12844
12818
|
delay: z.ZodOptional<z.ZodString>;
|
|
12845
12819
|
pause: z.ZodOptional<z.ZodBoolean>;
|
|
12846
|
-
routeByName: z.ZodOptional<z.ZodBoolean>;
|
|
12847
12820
|
explain: z.ZodOptional<z.ZodBoolean>;
|
|
12848
12821
|
}, z.core.$strict>>;
|
|
12849
12822
|
path: z.ZodString;
|
|
@@ -13079,7 +13052,6 @@ declare const ConfigRuleSetOutputSchema: z.ZodObject<{
|
|
|
13079
13052
|
claudeVersion: z.ZodOptional<z.ZodString>;
|
|
13080
13053
|
delay: z.ZodOptional<z.ZodString>;
|
|
13081
13054
|
pause: z.ZodOptional<z.ZodBoolean>;
|
|
13082
|
-
routeByName: z.ZodOptional<z.ZodBoolean>;
|
|
13083
13055
|
explain: z.ZodOptional<z.ZodBoolean>;
|
|
13084
13056
|
}, z.core.$strict>>;
|
|
13085
13057
|
path: z.ZodString;
|
|
@@ -13571,7 +13543,6 @@ declare const LaunchResolveOutputSchema: z.ZodObject<{
|
|
|
13571
13543
|
trackUsage: z.ZodBoolean;
|
|
13572
13544
|
pause: z.ZodBoolean;
|
|
13573
13545
|
explain: z.ZodBoolean;
|
|
13574
|
-
routeByName: z.ZodBoolean;
|
|
13575
13546
|
delayMs: z.ZodNumber;
|
|
13576
13547
|
}, z.core.$strict>;
|
|
13577
13548
|
claudeVersion: z.ZodOptional<z.ZodObject<{
|
|
@@ -13627,7 +13598,6 @@ declare const LaunchResolveOutputSchema: z.ZodObject<{
|
|
|
13627
13598
|
routing: z.ZodObject<{
|
|
13628
13599
|
frontDoor: z.ZodBoolean;
|
|
13629
13600
|
headroom: z.ZodBoolean;
|
|
13630
|
-
routeByName: z.ZodBoolean;
|
|
13631
13601
|
}, z.core.$strict>;
|
|
13632
13602
|
environment: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
13633
13603
|
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.46.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>",
|