claude-use 11.87.1 → 11.87.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +1207 -628
- package/dist/index.cjs +40 -12
- package/dist/index.mjs +40 -12
- package/dist/types/index.d.ts +5 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1547,11 +1547,27 @@ var init_store = __esm({
|
|
|
1547
1547
|
});
|
|
1548
1548
|
|
|
1549
1549
|
// src/config/classify.ts
|
|
1550
|
-
function
|
|
1551
|
-
|
|
1550
|
+
function literalOf(pattern) {
|
|
1551
|
+
if (!GLOB_METACHARACTERS.test(pattern)) return pattern;
|
|
1552
|
+
let literal = "";
|
|
1553
|
+
for (let index = 0; index < pattern.length; index += 1) {
|
|
1554
|
+
const character = pattern[index];
|
|
1555
|
+
if (character === void 0) continue;
|
|
1556
|
+
const next = pattern[index + 1];
|
|
1557
|
+
if (character === "\\" && next !== void 0 && (next === "\\" || GLOB_METACHARACTERS.test(next))) {
|
|
1558
|
+
literal += next;
|
|
1559
|
+
index += 1;
|
|
1560
|
+
} else if (GLOB_METACHARACTERS.test(character)) {
|
|
1561
|
+
return void 0;
|
|
1562
|
+
} else {
|
|
1563
|
+
literal += character;
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
return literal;
|
|
1552
1567
|
}
|
|
1553
1568
|
function compile(pattern, category, source, ordinal) {
|
|
1554
|
-
const
|
|
1569
|
+
const literal = literalOf(pattern);
|
|
1570
|
+
const isExact = literal !== void 0;
|
|
1555
1571
|
const matcher = (0, import_picomatch.default)(pattern, { dot: true, nocase: false });
|
|
1556
1572
|
return {
|
|
1557
1573
|
pattern,
|
|
@@ -1559,7 +1575,7 @@ function compile(pattern, category, source, ordinal) {
|
|
|
1559
1575
|
source,
|
|
1560
1576
|
isExact,
|
|
1561
1577
|
ordinal,
|
|
1562
|
-
matches: isExact ? (name) => name ===
|
|
1578
|
+
matches: isExact ? (name) => name === literal : (name) => matcher(name)
|
|
1563
1579
|
};
|
|
1564
1580
|
}
|
|
1565
1581
|
function compileClassificationPatterns(defaults, overlay2) {
|
|
@@ -1927,7 +1943,7 @@ var init_projects = __esm({
|
|
|
1927
1943
|
});
|
|
1928
1944
|
|
|
1929
1945
|
// src/resolve/match.ts
|
|
1930
|
-
function
|
|
1946
|
+
function isExactPattern(pattern) {
|
|
1931
1947
|
return !GLOB_METACHARACTERS2.test(pattern);
|
|
1932
1948
|
}
|
|
1933
1949
|
function literalPrefixOf(pattern) {
|
|
@@ -2154,7 +2170,7 @@ function flattenLayers(layers, options) {
|
|
|
2154
2170
|
...unpacked.when === void 0 ? {} : { when: unpacked.when },
|
|
2155
2171
|
layer: layer.id,
|
|
2156
2172
|
ordinal,
|
|
2157
|
-
isExact:
|
|
2173
|
+
isExact: isExactPattern(pattern),
|
|
2158
2174
|
literalPrefix: literalPrefixOf(pattern),
|
|
2159
2175
|
segmentCount: pattern.split("/").filter((segment) => segment !== "").length,
|
|
2160
2176
|
matches: compileMatcher(pattern)
|
|
@@ -5173,7 +5189,7 @@ var init_package = __esm({
|
|
|
5173
5189
|
"package.json"() {
|
|
5174
5190
|
package_default = {
|
|
5175
5191
|
name: "claude-use",
|
|
5176
|
-
version: "11.87.
|
|
5192
|
+
version: "11.87.3",
|
|
5177
5193
|
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.",
|
|
5178
5194
|
license: "MIT",
|
|
5179
5195
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -13351,7 +13367,7 @@ function withSupervision(passthrough, supervised) {
|
|
|
13351
13367
|
if (supervised.conversation === "as-given") {
|
|
13352
13368
|
return passthrough;
|
|
13353
13369
|
}
|
|
13354
|
-
const conversed = withConversation(passthrough, supervised.conversation, supervised.sessionId);
|
|
13370
|
+
const conversed = withConversation(passthrough, supervised.conversation, supervised.conversationId ?? supervised.sessionId);
|
|
13355
13371
|
if (supervised.model === void 0) {
|
|
13356
13372
|
return conversed;
|
|
13357
13373
|
}
|
|
@@ -13376,7 +13392,18 @@ function withLauncherSettings(passthrough, settings) {
|
|
|
13376
13392
|
return passthrough;
|
|
13377
13393
|
}
|
|
13378
13394
|
const end = passthrough.indexOf(TERMINATOR2);
|
|
13379
|
-
|
|
13395
|
+
const head = end === -1 ? passthrough : passthrough.slice(0, end);
|
|
13396
|
+
const tail = end === -1 ? [] : passthrough.slice(end);
|
|
13397
|
+
const kept = [];
|
|
13398
|
+
for (let index = 0; index < head.length; index += 1) {
|
|
13399
|
+
const token = head[index];
|
|
13400
|
+
if (token === "--settings") {
|
|
13401
|
+
index += 1;
|
|
13402
|
+
} else if (token !== void 0 && !token.startsWith("--settings=")) {
|
|
13403
|
+
kept.push(token);
|
|
13404
|
+
}
|
|
13405
|
+
}
|
|
13406
|
+
return [...kept, "--settings", settings, ...tail];
|
|
13380
13407
|
}
|
|
13381
13408
|
function isRecord15(value) {
|
|
13382
13409
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -14142,7 +14169,8 @@ function decideLaunch(params, readOnly, onRecorded) {
|
|
|
14142
14169
|
const flags = loginlessProvider === void 0 ? requestedFlags : { ...requestedFlags, remoteControl: false };
|
|
14143
14170
|
const globalModels = loadConfigFile(paths.globalConfigFile, GlobalConfigSchema, params.fs.readConfigFile)?.config.models;
|
|
14144
14171
|
const models = launchCascade !== void 0 && params.farm !== void 0 ? cascadeModels : globalModels;
|
|
14145
|
-
const
|
|
14172
|
+
const extraFlags = splitExtraFlags(env.CLAUDE_EXTRA_FLAGS);
|
|
14173
|
+
const callerSettings = hasSettingsArgument([...extraFlags, ...parsedArgv.rest]);
|
|
14146
14174
|
const startsSession = !isClaudeSubcommand(parsedArgv.rest);
|
|
14147
14175
|
const argsForSupervisor = (supervisorPid) => {
|
|
14148
14176
|
const door = readFrontDoorState(params.fs, paths.frontdoorStateFile);
|
|
@@ -14176,10 +14204,10 @@ function decideLaunch(params, readOnly, onRecorded) {
|
|
|
14176
14204
|
}
|
|
14177
14205
|
});
|
|
14178
14206
|
const pickerSettings = modelPickerSettingsFromRows(routedModelRows(models ?? {}, listedProviders), selectedProvider !== void 0);
|
|
14179
|
-
const launcherSettings = mergeSettings([params.supervised?.settings, callerSettings ? void 0 : pickerSettings]);
|
|
14207
|
+
const launcherSettings = params.supervised?.settingsFile ?? mergeSettings([params.supervised?.settings, callerSettings ? void 0 : pickerSettings]);
|
|
14180
14208
|
const args2 = startsSession ? buildArgv({
|
|
14181
14209
|
toolFlags: buildFlagArgs(flags),
|
|
14182
|
-
extraFlags
|
|
14210
|
+
extraFlags,
|
|
14183
14211
|
passthrough: withLauncherSettings(params.supervised === void 0 ? parsedArgv.rest : withSupervision(parsedArgv.rest, params.supervised), launcherSettings)
|
|
14184
14212
|
}) : [...parsedArgv.rest];
|
|
14185
14213
|
return { args: args2, pickerSuppressed: startsSession && pickerSettings !== void 0 && callerSettings };
|
package/dist/index.mjs
CHANGED
|
@@ -1526,11 +1526,27 @@ var init_store = __esm({
|
|
|
1526
1526
|
|
|
1527
1527
|
// src/config/classify.ts
|
|
1528
1528
|
import picomatch from "picomatch";
|
|
1529
|
-
function
|
|
1530
|
-
|
|
1529
|
+
function literalOf(pattern) {
|
|
1530
|
+
if (!GLOB_METACHARACTERS.test(pattern)) return pattern;
|
|
1531
|
+
let literal = "";
|
|
1532
|
+
for (let index = 0; index < pattern.length; index += 1) {
|
|
1533
|
+
const character = pattern[index];
|
|
1534
|
+
if (character === void 0) continue;
|
|
1535
|
+
const next = pattern[index + 1];
|
|
1536
|
+
if (character === "\\" && next !== void 0 && (next === "\\" || GLOB_METACHARACTERS.test(next))) {
|
|
1537
|
+
literal += next;
|
|
1538
|
+
index += 1;
|
|
1539
|
+
} else if (GLOB_METACHARACTERS.test(character)) {
|
|
1540
|
+
return void 0;
|
|
1541
|
+
} else {
|
|
1542
|
+
literal += character;
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
return literal;
|
|
1531
1546
|
}
|
|
1532
1547
|
function compile(pattern, category, source, ordinal) {
|
|
1533
|
-
const
|
|
1548
|
+
const literal = literalOf(pattern);
|
|
1549
|
+
const isExact = literal !== void 0;
|
|
1534
1550
|
const matcher = picomatch(pattern, { dot: true, nocase: false });
|
|
1535
1551
|
return {
|
|
1536
1552
|
pattern,
|
|
@@ -1538,7 +1554,7 @@ function compile(pattern, category, source, ordinal) {
|
|
|
1538
1554
|
source,
|
|
1539
1555
|
isExact,
|
|
1540
1556
|
ordinal,
|
|
1541
|
-
matches: isExact ? (name) => name ===
|
|
1557
|
+
matches: isExact ? (name) => name === literal : (name) => matcher(name)
|
|
1542
1558
|
};
|
|
1543
1559
|
}
|
|
1544
1560
|
function compileClassificationPatterns(defaults, overlay2) {
|
|
@@ -1906,7 +1922,7 @@ var init_projects = __esm({
|
|
|
1906
1922
|
|
|
1907
1923
|
// src/resolve/match.ts
|
|
1908
1924
|
import picomatch3 from "picomatch";
|
|
1909
|
-
function
|
|
1925
|
+
function isExactPattern(pattern) {
|
|
1910
1926
|
return !GLOB_METACHARACTERS2.test(pattern);
|
|
1911
1927
|
}
|
|
1912
1928
|
function literalPrefixOf(pattern) {
|
|
@@ -2132,7 +2148,7 @@ function flattenLayers(layers, options) {
|
|
|
2132
2148
|
...unpacked.when === void 0 ? {} : { when: unpacked.when },
|
|
2133
2149
|
layer: layer.id,
|
|
2134
2150
|
ordinal,
|
|
2135
|
-
isExact:
|
|
2151
|
+
isExact: isExactPattern(pattern),
|
|
2136
2152
|
literalPrefix: literalPrefixOf(pattern),
|
|
2137
2153
|
segmentCount: pattern.split("/").filter((segment) => segment !== "").length,
|
|
2138
2154
|
matches: compileMatcher(pattern)
|
|
@@ -5148,7 +5164,7 @@ var init_package = __esm({
|
|
|
5148
5164
|
"package.json"() {
|
|
5149
5165
|
package_default = {
|
|
5150
5166
|
name: "claude-use",
|
|
5151
|
-
version: "11.87.
|
|
5167
|
+
version: "11.87.3",
|
|
5152
5168
|
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.",
|
|
5153
5169
|
license: "MIT",
|
|
5154
5170
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -13320,7 +13336,7 @@ function withSupervision(passthrough, supervised) {
|
|
|
13320
13336
|
if (supervised.conversation === "as-given") {
|
|
13321
13337
|
return passthrough;
|
|
13322
13338
|
}
|
|
13323
|
-
const conversed = withConversation(passthrough, supervised.conversation, supervised.sessionId);
|
|
13339
|
+
const conversed = withConversation(passthrough, supervised.conversation, supervised.conversationId ?? supervised.sessionId);
|
|
13324
13340
|
if (supervised.model === void 0) {
|
|
13325
13341
|
return conversed;
|
|
13326
13342
|
}
|
|
@@ -13345,7 +13361,18 @@ function withLauncherSettings(passthrough, settings) {
|
|
|
13345
13361
|
return passthrough;
|
|
13346
13362
|
}
|
|
13347
13363
|
const end = passthrough.indexOf(TERMINATOR2);
|
|
13348
|
-
|
|
13364
|
+
const head = end === -1 ? passthrough : passthrough.slice(0, end);
|
|
13365
|
+
const tail = end === -1 ? [] : passthrough.slice(end);
|
|
13366
|
+
const kept = [];
|
|
13367
|
+
for (let index = 0; index < head.length; index += 1) {
|
|
13368
|
+
const token = head[index];
|
|
13369
|
+
if (token === "--settings") {
|
|
13370
|
+
index += 1;
|
|
13371
|
+
} else if (token !== void 0 && !token.startsWith("--settings=")) {
|
|
13372
|
+
kept.push(token);
|
|
13373
|
+
}
|
|
13374
|
+
}
|
|
13375
|
+
return [...kept, "--settings", settings, ...tail];
|
|
13349
13376
|
}
|
|
13350
13377
|
function isRecord15(value) {
|
|
13351
13378
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -14115,7 +14142,8 @@ function decideLaunch(params, readOnly, onRecorded) {
|
|
|
14115
14142
|
const flags = loginlessProvider === void 0 ? requestedFlags : { ...requestedFlags, remoteControl: false };
|
|
14116
14143
|
const globalModels = loadConfigFile(paths.globalConfigFile, GlobalConfigSchema, params.fs.readConfigFile)?.config.models;
|
|
14117
14144
|
const models = launchCascade !== void 0 && params.farm !== void 0 ? cascadeModels : globalModels;
|
|
14118
|
-
const
|
|
14145
|
+
const extraFlags = splitExtraFlags(env.CLAUDE_EXTRA_FLAGS);
|
|
14146
|
+
const callerSettings = hasSettingsArgument([...extraFlags, ...parsedArgv.rest]);
|
|
14119
14147
|
const startsSession = !isClaudeSubcommand(parsedArgv.rest);
|
|
14120
14148
|
const argsForSupervisor = (supervisorPid) => {
|
|
14121
14149
|
const door = readFrontDoorState(params.fs, paths.frontdoorStateFile);
|
|
@@ -14149,10 +14177,10 @@ function decideLaunch(params, readOnly, onRecorded) {
|
|
|
14149
14177
|
}
|
|
14150
14178
|
});
|
|
14151
14179
|
const pickerSettings = modelPickerSettingsFromRows(routedModelRows(models ?? {}, listedProviders), selectedProvider !== void 0);
|
|
14152
|
-
const launcherSettings = mergeSettings([params.supervised?.settings, callerSettings ? void 0 : pickerSettings]);
|
|
14180
|
+
const launcherSettings = params.supervised?.settingsFile ?? mergeSettings([params.supervised?.settings, callerSettings ? void 0 : pickerSettings]);
|
|
14153
14181
|
const args2 = startsSession ? buildArgv({
|
|
14154
14182
|
toolFlags: buildFlagArgs(flags),
|
|
14155
|
-
extraFlags
|
|
14183
|
+
extraFlags,
|
|
14156
14184
|
passthrough: withLauncherSettings(params.supervised === void 0 ? parsedArgv.rest : withSupervision(parsedArgv.rest, params.supervised), launcherSettings)
|
|
14157
14185
|
}) : [...parsedArgv.rest];
|
|
14158
14186
|
return { args: args2, pickerSuppressed: startsSession && pickerSettings !== void 0 && callerSettings };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5634,7 +5634,7 @@ interface ClassificationPattern {
|
|
|
5634
5634
|
readonly pattern: string;
|
|
5635
5635
|
readonly category: CategoryName;
|
|
5636
5636
|
readonly source: ClassificationSource;
|
|
5637
|
-
/** True when the pattern contains no glob metacharacter, so it can only ever match one literal name. */
|
|
5637
|
+
/** True when the pattern contains no unescaped glob metacharacter, so it can only ever match one literal name. */
|
|
5638
5638
|
readonly isExact: boolean;
|
|
5639
5639
|
/** Position of the pattern within its own category list, used only as the final deterministic tie-break. */
|
|
5640
5640
|
readonly ordinal: number;
|
|
@@ -14369,6 +14369,8 @@ type ClaudeConversation = "start" | "resume" | "as-given";
|
|
|
14369
14369
|
interface SupervisedLaunch {
|
|
14370
14370
|
/** The id the launch's session carries: the front door's session header, and claude's own conversation id. */
|
|
14371
14371
|
readonly sessionId: string;
|
|
14372
|
+
/** The current Claude conversation when it has changed within the launch. */
|
|
14373
|
+
readonly conversationId?: string;
|
|
14372
14374
|
readonly conversation: ClaudeConversation;
|
|
14373
14375
|
/** The pool member to run as, for a relaunch after the previous member ran out of quota. The pool pick is skipped. */
|
|
14374
14376
|
readonly member?: string;
|
|
@@ -14378,6 +14380,8 @@ interface SupervisedLaunch {
|
|
|
14378
14380
|
readonly model?: string;
|
|
14379
14381
|
/** Claude Code settings, as the JSON `--settings` takes, to add to the launch: the hooks that tell the supervisor when a turn begins and ends. */
|
|
14380
14382
|
readonly settings?: string;
|
|
14383
|
+
/** A private file containing the caller's settings composed with supervisor hooks. */
|
|
14384
|
+
readonly settingsFile?: string;
|
|
14381
14385
|
}
|
|
14382
14386
|
|
|
14383
14387
|
/** The effects a hold needs, so it runs against fakes in tests. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-use",
|
|
3
|
-
"version": "11.87.
|
|
3
|
+
"version": "11.87.3",
|
|
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>",
|