claude-use 11.26.0 → 11.27.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 -1
- package/dist/cli.cjs +161 -95
- package/dist/index.cjs +101 -24
- package/dist/index.mjs +101 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ Every top-level entry in `~/.claude` is classified into one of five categories,
|
|
|
64
64
|
| Category | Default shared? | Example entries |
|
|
65
65
|
|---|---|---|
|
|
66
66
|
| `secret` | **Never** — hardcoded, cannot be overridden by any configuration layer | `.credentials.json`, `backups`, `settings.json.bak*` |
|
|
67
|
-
| `runtime` | No | `daemon*`, `.git*`, `.DS_Store`, `mcp-needs-auth-cache.json`, `codex-quota.json`, `file-transfers`, `shell-snapshots`, `statsig`, `telemetry`, `stats-cache.json`, `usage-data`, `ide`, `cache`, `scheduled_tasks.lock` |
|
|
67
|
+
| `runtime` | No | `daemon*`, `.git*`, `.DS_Store`, `mcp-needs-auth-cache.json`, `codex-quota.json`, `file-transfers`, `shell-snapshots`, `statsig`, `telemetry`, `stats-cache.json`, `usage-data`, `ide`, `cache`, `scheduled_tasks.lock`, `policy-limits.json*`, `remote-settings.json*`, `state` |
|
|
68
68
|
| `history` | Yes | `projects`, `sessions`, `session-env`, `teams`, `tasks`, `todos`, `history.jsonl`, `transcripts`, `paste-cache`, `file-history`, `plans`, `workflows`, `jobs`, `debug`, `downloads`, `chrome` |
|
|
69
69
|
| `knowledge` | Yes | `skills`, `agents`, `rules`, `memory`, `commands`, `plugins`, `hooks`, `AGENTS.md`, `CLAUDE.md`, `README.md` |
|
|
70
70
|
| `settings` | Yes | `settings.json`, `settings.local.json` |
|
package/dist/cli.cjs
CHANGED
|
@@ -28683,6 +28683,40 @@ var init_supervisor = __esm({
|
|
|
28683
28683
|
}
|
|
28684
28684
|
});
|
|
28685
28685
|
|
|
28686
|
+
// src/logStyle.ts
|
|
28687
|
+
function styledDiagnostic(style, colour, line) {
|
|
28688
|
+
const lead = DIAGNOSTIC_LEAD.exec(line);
|
|
28689
|
+
if (lead === null) {
|
|
28690
|
+
return style([colour], line);
|
|
28691
|
+
}
|
|
28692
|
+
const [whole, prefix = "", code = "", separator = ""] = lead;
|
|
28693
|
+
return `${style([colour], prefix)}${style([colour, "bold"], code)}${style([colour], `${separator}${line.slice(whole.length)}`)}`;
|
|
28694
|
+
}
|
|
28695
|
+
function createLogPort(sinks, styleFor) {
|
|
28696
|
+
return {
|
|
28697
|
+
info: (message) => {
|
|
28698
|
+
sinks.out(styleFor.out(["dim"], message));
|
|
28699
|
+
},
|
|
28700
|
+
warn: (message) => {
|
|
28701
|
+
sinks.warn(styledDiagnostic(styleFor.err, "yellow", message));
|
|
28702
|
+
},
|
|
28703
|
+
error: (message) => {
|
|
28704
|
+
sinks.err(styledDiagnostic(styleFor.err, "red", message));
|
|
28705
|
+
}
|
|
28706
|
+
};
|
|
28707
|
+
}
|
|
28708
|
+
function styleTextFor(stream) {
|
|
28709
|
+
return (formats, text2) => (0, import_node_util3.styleText)([...formats], text2, { stream });
|
|
28710
|
+
}
|
|
28711
|
+
var import_node_util3, DIAGNOSTIC_LEAD;
|
|
28712
|
+
var init_logStyle = __esm({
|
|
28713
|
+
"src/logStyle.ts"() {
|
|
28714
|
+
"use strict";
|
|
28715
|
+
import_node_util3 = require("node:util");
|
|
28716
|
+
DIAGNOSTIC_LEAD = /^(agent-shim: )([A-Z][A-Z0-9_]*)(: )/;
|
|
28717
|
+
}
|
|
28718
|
+
});
|
|
28719
|
+
|
|
28686
28720
|
// src/realPorts.ts
|
|
28687
28721
|
function isEnoent2(error63) {
|
|
28688
28722
|
return typeof error63 === "object" && error63 !== null && "code" in error63 && error63.code === "ENOENT";
|
|
@@ -28993,6 +29027,7 @@ var init_realPorts = __esm({
|
|
|
28993
29027
|
init_ensure();
|
|
28994
29028
|
init_supervisor();
|
|
28995
29029
|
init_state2();
|
|
29030
|
+
init_logStyle();
|
|
28996
29031
|
realFsPort = {
|
|
28997
29032
|
readFileUtf8(filePath) {
|
|
28998
29033
|
try {
|
|
@@ -29201,17 +29236,16 @@ var init_realPorts = __esm({
|
|
|
29201
29236
|
argv: process.argv.slice(2),
|
|
29202
29237
|
exit: (code) => process.exit(code)
|
|
29203
29238
|
};
|
|
29204
|
-
realLogPort =
|
|
29205
|
-
|
|
29206
|
-
console.log(
|
|
29207
|
-
},
|
|
29208
|
-
|
|
29209
|
-
|
|
29210
|
-
|
|
29211
|
-
|
|
29212
|
-
|
|
29213
|
-
|
|
29214
|
-
};
|
|
29239
|
+
realLogPort = createLogPort(
|
|
29240
|
+
{ out: (line) => {
|
|
29241
|
+
console.log(line);
|
|
29242
|
+
}, warn: (line) => {
|
|
29243
|
+
console.warn(line);
|
|
29244
|
+
}, err: (line) => {
|
|
29245
|
+
console.error(line);
|
|
29246
|
+
} },
|
|
29247
|
+
{ out: styleTextFor(process.stdout), err: styleTextFor(process.stderr) }
|
|
29248
|
+
);
|
|
29215
29249
|
EXECUTE_BITS_MASK = 73;
|
|
29216
29250
|
WINDOWS_DEFAULT_PATHEXT = ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PS1";
|
|
29217
29251
|
}
|
|
@@ -31331,7 +31365,10 @@ var init_categories_default = __esm({
|
|
|
31331
31365
|
"usage-data",
|
|
31332
31366
|
"ide",
|
|
31333
31367
|
"cache",
|
|
31334
|
-
"scheduled_tasks.lock"
|
|
31368
|
+
"scheduled_tasks.lock",
|
|
31369
|
+
"policy-limits.json*",
|
|
31370
|
+
"remote-settings.json*",
|
|
31371
|
+
"state"
|
|
31335
31372
|
],
|
|
31336
31373
|
history: [
|
|
31337
31374
|
"projects",
|
|
@@ -32563,6 +32600,12 @@ var init_flatten = __esm({
|
|
|
32563
32600
|
});
|
|
32564
32601
|
|
|
32565
32602
|
// src/resolve/decide.ts
|
|
32603
|
+
function unclassifiedEntryMessage(names) {
|
|
32604
|
+
const quoted = names.map((name) => `"${name}"`).join(", ");
|
|
32605
|
+
const subject = names.length === 1 ? `${quoted} is not` : `${String(names.length)} entries are not`;
|
|
32606
|
+
const excluded = names.length === 1 ? "it is excluded" : `they are excluded: ${quoted}`;
|
|
32607
|
+
return `${subject} in the category map, so ${excluded}. Run \`agent-shim configure\` to classify ${names.length === 1 ? "it" : "them"}, which records the answer in the local overlay without touching the shipped default map.`;
|
|
32608
|
+
}
|
|
32566
32609
|
function selectRule(relPath, flattened, context) {
|
|
32567
32610
|
const eliminated = [];
|
|
32568
32611
|
for (const rule of matchingRules(flattened, relPath)) {
|
|
@@ -32600,7 +32643,7 @@ function resolveEntry(relPath, params) {
|
|
|
32600
32643
|
diagnostics.push({
|
|
32601
32644
|
code: "UNCLASSIFIED_ENTRY",
|
|
32602
32645
|
severity: "warning",
|
|
32603
|
-
message:
|
|
32646
|
+
message: unclassifiedEntryMessage([head]),
|
|
32604
32647
|
subject: head
|
|
32605
32648
|
});
|
|
32606
32649
|
return { decision: { relPath, shared: false, via: "unclassified", category }, diagnostics };
|
|
@@ -34202,7 +34245,7 @@ var init_package = __esm({
|
|
|
34202
34245
|
"package.json"() {
|
|
34203
34246
|
package_default = {
|
|
34204
34247
|
name: "claude-use",
|
|
34205
|
-
version: "11.
|
|
34248
|
+
version: "11.27.0",
|
|
34206
34249
|
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.",
|
|
34207
34250
|
license: "MIT",
|
|
34208
34251
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -63483,6 +63526,42 @@ var init_claudeSession = __esm({
|
|
|
63483
63526
|
}
|
|
63484
63527
|
});
|
|
63485
63528
|
|
|
63529
|
+
// src/launcher/diagnostics.ts
|
|
63530
|
+
function diagnosticLines(diagnostics) {
|
|
63531
|
+
const unclassified = [...new Set(diagnostics.filter((diagnostic) => diagnostic.code === "UNCLASSIFIED_ENTRY").map((diagnostic) => diagnostic.subject))];
|
|
63532
|
+
const lines = [];
|
|
63533
|
+
let unclassifiedReported = false;
|
|
63534
|
+
for (const diagnostic of diagnostics) {
|
|
63535
|
+
if (diagnostic.severity === "info") {
|
|
63536
|
+
continue;
|
|
63537
|
+
}
|
|
63538
|
+
if (diagnostic.code === "UNCLASSIFIED_ENTRY") {
|
|
63539
|
+
if (!unclassifiedReported) {
|
|
63540
|
+
unclassifiedReported = true;
|
|
63541
|
+
lines.push({ severity: diagnostic.severity, text: `agent-shim: ${diagnostic.code}: ${unclassifiedEntryMessage(unclassified.filter((name) => name !== void 0))}` });
|
|
63542
|
+
}
|
|
63543
|
+
continue;
|
|
63544
|
+
}
|
|
63545
|
+
lines.push({ severity: diagnostic.severity, text: `agent-shim: ${diagnostic.code}: ${diagnostic.message}` });
|
|
63546
|
+
}
|
|
63547
|
+
return lines;
|
|
63548
|
+
}
|
|
63549
|
+
function reportDiagnostics(log, diagnostics, options) {
|
|
63550
|
+
for (const line of diagnosticLines(diagnostics)) {
|
|
63551
|
+
if (line.severity === "error" && !options.errorsAsWarnings) {
|
|
63552
|
+
log.error(line.text);
|
|
63553
|
+
} else {
|
|
63554
|
+
log.warn(line.text);
|
|
63555
|
+
}
|
|
63556
|
+
}
|
|
63557
|
+
}
|
|
63558
|
+
var init_diagnostics = __esm({
|
|
63559
|
+
"src/launcher/diagnostics.ts"() {
|
|
63560
|
+
"use strict";
|
|
63561
|
+
init_decide();
|
|
63562
|
+
}
|
|
63563
|
+
});
|
|
63564
|
+
|
|
63486
63565
|
// src/antigravity/cloudUpstream.ts
|
|
63487
63566
|
function isCcpaEndpoint(endpoint) {
|
|
63488
63567
|
return endpoint.includes("cloudcode-pa.googleapis.com");
|
|
@@ -65058,17 +65137,7 @@ function decideLaunch(params, readOnly) {
|
|
|
65058
65137
|
const flattened = flattenLayers(assembled.layers, { home: params.farm.home });
|
|
65059
65138
|
cascadeLaunch = flattened.launch;
|
|
65060
65139
|
if (readOnly || farmContext === void 0) {
|
|
65061
|
-
|
|
65062
|
-
if (diagnostic.severity === "info") {
|
|
65063
|
-
continue;
|
|
65064
|
-
}
|
|
65065
|
-
const message = `agent-shim: ${diagnostic.code}: ${diagnostic.message}`;
|
|
65066
|
-
if (diagnostic.severity === "error" && !readOnly) {
|
|
65067
|
-
log.error(message);
|
|
65068
|
-
} else {
|
|
65069
|
-
log.warn(message);
|
|
65070
|
-
}
|
|
65071
|
-
}
|
|
65140
|
+
reportDiagnostics(log, [...assembled.diagnostics, ...flattened.diagnostics], { errorsAsWarnings: readOnly });
|
|
65072
65141
|
}
|
|
65073
65142
|
}
|
|
65074
65143
|
const pinnedVersion = resolveClaudeVersion({ env, ...parsedArgv.claudeVersion === void 0 ? {} : { flag: parsedArgv.claudeVersion }, ...cascadeLaunch?.claudeVersion === void 0 ? {} : { cascade: cascadeLaunch.claudeVersion } });
|
|
@@ -65173,16 +65242,12 @@ function prepareLaunch(params) {
|
|
|
65173
65242
|
}
|
|
65174
65243
|
throw error63;
|
|
65175
65244
|
}
|
|
65176
|
-
|
|
65177
|
-
|
|
65178
|
-
|
|
65179
|
-
|
|
65180
|
-
|
|
65181
|
-
}
|
|
65245
|
+
reportDiagnostics(log, result.diagnostics, { errorsAsWarnings: false });
|
|
65246
|
+
if (!result.noOp) {
|
|
65247
|
+
log.info(
|
|
65248
|
+
`agent-shim: farm at ${result.farmRoot} resynced (${String(result.manifest.links.length)} link(s), ${String(result.manifest.materialised.length)} built director(ies)${result.adopted.length === 0 ? "" : `, ${String(result.adopted.length)} adopted into ${resyncFarmRuntime.claudeHome}`})`
|
|
65249
|
+
);
|
|
65182
65250
|
}
|
|
65183
|
-
log.info(
|
|
65184
|
-
result.noOp ? `agent-shim: farm at ${result.farmRoot} already matches the resolved cascade` : `agent-shim: farm at ${result.farmRoot} resynced (${String(result.manifest.links.length)} link(s), ${String(result.manifest.materialised.length)} built director(ies)${result.adopted.length === 0 ? "" : `, ${String(result.adopted.length)} adopted into ${resyncFarmRuntime.claudeHome}`})`
|
|
65185
|
-
);
|
|
65186
65251
|
}
|
|
65187
65252
|
if (decided.pinnedVersion !== void 0) {
|
|
65188
65253
|
log.info(`agent-shim: Claude Code ${decided.pinnedVersion.version} (pinned by ${decided.pinnedVersion.source})`);
|
|
@@ -65291,6 +65356,7 @@ var init_launcher = __esm({
|
|
|
65291
65356
|
init_flags();
|
|
65292
65357
|
init_extraFlags();
|
|
65293
65358
|
init_claudeSession();
|
|
65359
|
+
init_diagnostics();
|
|
65294
65360
|
init_modelPicker();
|
|
65295
65361
|
init_providerCatalogue();
|
|
65296
65362
|
init_pool();
|
|
@@ -109940,7 +110006,7 @@ var import_node_os4 = __toESM(require("node:os"), 1);
|
|
|
109940
110006
|
var import_node_path21 = __toESM(require("node:path"), 1);
|
|
109941
110007
|
|
|
109942
110008
|
// node_modules/.pnpm/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs
|
|
109943
|
-
var
|
|
110009
|
+
var import_node_util4 = require("node:util");
|
|
109944
110010
|
var import_node_process2 = require("node:process");
|
|
109945
110011
|
var import_node_readline = __toESM(require("node:readline"), 1);
|
|
109946
110012
|
|
|
@@ -110652,7 +110718,7 @@ var n2 = class extends y {
|
|
|
110652
110718
|
if (this.cursor >= t10.length)
|
|
110653
110719
|
return `${this.userInput}\u2588`;
|
|
110654
110720
|
const r10 = t10.slice(0, this.cursor), s = t10.slice(this.cursor, this.cursor + 1), e14 = t10.slice(this.cursor + 1);
|
|
110655
|
-
return `${r10}${(0,
|
|
110721
|
+
return `${r10}${(0, import_node_util4.styleText)("inverse", s)}${e14}`;
|
|
110656
110722
|
}
|
|
110657
110723
|
get cursor() {
|
|
110658
110724
|
return this._cursor;
|
|
@@ -110670,7 +110736,7 @@ var n2 = class extends y {
|
|
|
110670
110736
|
};
|
|
110671
110737
|
|
|
110672
110738
|
// node_modules/.pnpm/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs
|
|
110673
|
-
var
|
|
110739
|
+
var import_node_util5 = require("node:util");
|
|
110674
110740
|
var import_node_process3 = __toESM(require("node:process"), 1);
|
|
110675
110741
|
var import_sisteransi2 = __toESM(require_src(), 1);
|
|
110676
110742
|
function isUnicodeSupported() {
|
|
@@ -110710,33 +110776,33 @@ var symbol2 = (o) => {
|
|
|
110710
110776
|
switch (o) {
|
|
110711
110777
|
case "initial":
|
|
110712
110778
|
case "active":
|
|
110713
|
-
return (0,
|
|
110779
|
+
return (0, import_node_util5.styleText)("cyan", S_STEP_ACTIVE);
|
|
110714
110780
|
case "cancel":
|
|
110715
|
-
return (0,
|
|
110781
|
+
return (0, import_node_util5.styleText)("red", S_STEP_CANCEL);
|
|
110716
110782
|
case "error":
|
|
110717
|
-
return (0,
|
|
110783
|
+
return (0, import_node_util5.styleText)("yellow", S_STEP_ERROR);
|
|
110718
110784
|
case "submit":
|
|
110719
|
-
return (0,
|
|
110785
|
+
return (0, import_node_util5.styleText)("green", S_STEP_SUBMIT);
|
|
110720
110786
|
case "validating":
|
|
110721
|
-
return (0,
|
|
110787
|
+
return (0, import_node_util5.styleText)("dim", S_STEP_ACTIVE);
|
|
110722
110788
|
}
|
|
110723
110789
|
};
|
|
110724
110790
|
var symbolBar = (o) => {
|
|
110725
110791
|
switch (o) {
|
|
110726
110792
|
case "initial":
|
|
110727
110793
|
case "active":
|
|
110728
|
-
return (0,
|
|
110794
|
+
return (0, import_node_util5.styleText)("cyan", S_BAR);
|
|
110729
110795
|
case "cancel":
|
|
110730
|
-
return (0,
|
|
110796
|
+
return (0, import_node_util5.styleText)("red", S_BAR);
|
|
110731
110797
|
case "error":
|
|
110732
|
-
return (0,
|
|
110798
|
+
return (0, import_node_util5.styleText)("yellow", S_BAR);
|
|
110733
110799
|
case "submit":
|
|
110734
|
-
return (0,
|
|
110800
|
+
return (0, import_node_util5.styleText)("green", S_BAR);
|
|
110735
110801
|
}
|
|
110736
110802
|
};
|
|
110737
110803
|
function formatInstructionFooter(o, e14) {
|
|
110738
|
-
const r10 = [`${e14 ? `${(0,
|
|
110739
|
-
return e14 && r10.push((0,
|
|
110804
|
+
const r10 = [`${e14 ? `${(0, import_node_util5.styleText)("cyan", S_BAR)} ` : ""}${o.join(" \u2022 ")}`];
|
|
110805
|
+
return e14 && r10.push((0, import_node_util5.styleText)("cyan", S_BAR_END)), r10;
|
|
110740
110806
|
}
|
|
110741
110807
|
var I = (l, e14, w, p, b, C = false) => {
|
|
110742
110808
|
let r10 = e14, O = 0;
|
|
@@ -110761,7 +110827,7 @@ var limitOptions = ({
|
|
|
110761
110827
|
columnPadding: C = 0,
|
|
110762
110828
|
rowPadding: r10 = 4
|
|
110763
110829
|
}) => {
|
|
110764
|
-
const i10 = getColumns(p) - C, m10 = getRows(p), M = (0,
|
|
110830
|
+
const i10 = getColumns(p) - C, m10 = getRows(p), M = (0, import_node_util5.styleText)("dim", "..."), v = Math.max(m10 - r10, 0), a10 = Math.max(Math.min(b, v), 5);
|
|
110765
110831
|
let f = 0;
|
|
110766
110832
|
l >= a10 - 3 && (f = Math.max(
|
|
110767
110833
|
Math.min(l - a10 + 3, e14.length - a10),
|
|
@@ -110805,9 +110871,9 @@ var limitOptions = ({
|
|
|
110805
110871
|
return c10 && x.push(M), x;
|
|
110806
110872
|
};
|
|
110807
110873
|
var MULTISELECT_INSTRUCTIONS = [
|
|
110808
|
-
`${(0,
|
|
110809
|
-
`${(0,
|
|
110810
|
-
`${(0,
|
|
110874
|
+
`${(0, import_node_util5.styleText)("dim", "\u2191/\u2193")} to navigate`,
|
|
110875
|
+
`${(0, import_node_util5.styleText)("dim", "Space:")} select`,
|
|
110876
|
+
`${(0, import_node_util5.styleText)("dim", "Enter:")} confirm`
|
|
110811
110877
|
];
|
|
110812
110878
|
var m = (i10, u10) => i10.split(`
|
|
110813
110879
|
`).map((d) => u10(d)).join(`
|
|
@@ -110815,7 +110881,7 @@ var m = (i10, u10) => i10.split(`
|
|
|
110815
110881
|
var multiselect = (i10) => {
|
|
110816
110882
|
const u10 = (t10, a10) => {
|
|
110817
110883
|
const r10 = t10.label ?? String(t10.value);
|
|
110818
|
-
return a10 === "disabled" ? `${(0,
|
|
110884
|
+
return a10 === "disabled" ? `${(0, import_node_util5.styleText)("gray", S_CHECKBOX_INACTIVE)} ${m(r10, (o) => (0, import_node_util5.styleText)(["strikethrough", "gray"], o))}${t10.hint ? ` ${(0, import_node_util5.styleText)("dim", `(${t10.hint ?? "disabled"})`)}` : ""}` : a10 === "active" ? `${(0, import_node_util5.styleText)("cyan", S_CHECKBOX_ACTIVE)} ${r10}${t10.hint ? ` ${(0, import_node_util5.styleText)("dim", `(${t10.hint})`)}` : ""}` : a10 === "selected" ? `${(0, import_node_util5.styleText)("green", S_CHECKBOX_SELECTED)} ${m(r10, (o) => (0, import_node_util5.styleText)("dim", o))}${t10.hint ? ` ${(0, import_node_util5.styleText)("dim", `(${t10.hint})`)}` : ""}` : a10 === "cancelled" ? `${m(r10, (o) => (0, import_node_util5.styleText)(["strikethrough", "dim"], o))}` : a10 === "active-selected" ? `${(0, import_node_util5.styleText)("green", S_CHECKBOX_SELECTED)} ${r10}${t10.hint ? ` ${(0, import_node_util5.styleText)("dim", `(${t10.hint})`)}` : ""}` : a10 === "submitted" ? `${m(r10, (o) => (0, import_node_util5.styleText)("dim", o))}` : `${(0, import_node_util5.styleText)("dim", S_CHECKBOX_INACTIVE)} ${m(r10, (o) => (0, import_node_util5.styleText)("dim", o))}`;
|
|
110819
110885
|
}, d = i10.required ?? true, x = i10.showInstructions ?? true;
|
|
110820
110886
|
return new a({
|
|
110821
110887
|
options: i10.options,
|
|
@@ -110828,13 +110894,13 @@ var multiselect = (i10) => {
|
|
|
110828
110894
|
validate(t10) {
|
|
110829
110895
|
if (d && (t10 === void 0 || t10.length === 0))
|
|
110830
110896
|
return `Please select at least one option.
|
|
110831
|
-
${(0,
|
|
110897
|
+
${(0, import_node_util5.styleText)(
|
|
110832
110898
|
"reset",
|
|
110833
|
-
(0,
|
|
110899
|
+
(0, import_node_util5.styleText)(
|
|
110834
110900
|
"dim",
|
|
110835
|
-
`Press ${(0,
|
|
110901
|
+
`Press ${(0, import_node_util5.styleText)(["gray", "bgWhite", "inverse"], " space ")} to select, ${(0, import_node_util5.styleText)(
|
|
110836
110902
|
"gray",
|
|
110837
|
-
(0,
|
|
110903
|
+
(0, import_node_util5.styleText)("bgWhite", (0, import_node_util5.styleText)("inverse", " enter "))
|
|
110838
110904
|
)} to submit`
|
|
110839
110905
|
)
|
|
110840
110906
|
)}`;
|
|
@@ -110845,7 +110911,7 @@ ${(0, import_node_util4.styleText)(
|
|
|
110845
110911
|
i10.message,
|
|
110846
110912
|
t10 ? `${symbolBar(this.state)} ` : "",
|
|
110847
110913
|
`${symbol2(this.state)} `
|
|
110848
|
-
), r10 = `${t10 ? `${(0,
|
|
110914
|
+
), r10 = `${t10 ? `${(0, import_node_util5.styleText)("gray", S_BAR)}
|
|
110849
110915
|
` : ""}${a10}
|
|
110850
110916
|
`, o = this.value ?? [], g = (n10, l) => {
|
|
110851
110917
|
if (n10.disabled)
|
|
@@ -110855,29 +110921,29 @@ ${(0, import_node_util4.styleText)(
|
|
|
110855
110921
|
};
|
|
110856
110922
|
switch (this.state) {
|
|
110857
110923
|
case "submit": {
|
|
110858
|
-
const n10 = this.options.filter(({ value: s }) => o.includes(s)).map((s) => u10(s, "submitted")).join((0,
|
|
110924
|
+
const n10 = this.options.filter(({ value: s }) => o.includes(s)).map((s) => u10(s, "submitted")).join((0, import_node_util5.styleText)("dim", ", ")) || (0, import_node_util5.styleText)("dim", "none"), l = wrapTextWithPrefix(
|
|
110859
110925
|
i10.output,
|
|
110860
110926
|
n10,
|
|
110861
|
-
t10 ? `${(0,
|
|
110927
|
+
t10 ? `${(0, import_node_util5.styleText)("gray", S_BAR)} ` : ""
|
|
110862
110928
|
);
|
|
110863
110929
|
return `${r10}${l}`;
|
|
110864
110930
|
}
|
|
110865
110931
|
case "cancel": {
|
|
110866
|
-
const n10 = this.options.filter(({ value: s }) => o.includes(s)).map((s) => u10(s, "cancelled")).join((0,
|
|
110932
|
+
const n10 = this.options.filter(({ value: s }) => o.includes(s)).map((s) => u10(s, "cancelled")).join((0, import_node_util5.styleText)("dim", ", "));
|
|
110867
110933
|
if (n10.trim() === "")
|
|
110868
|
-
return `${r10}${(0,
|
|
110934
|
+
return `${r10}${(0, import_node_util5.styleText)("gray", S_BAR)}`;
|
|
110869
110935
|
const l = wrapTextWithPrefix(
|
|
110870
110936
|
i10.output,
|
|
110871
110937
|
n10,
|
|
110872
|
-
t10 ? `${(0,
|
|
110938
|
+
t10 ? `${(0, import_node_util5.styleText)("gray", S_BAR)} ` : ""
|
|
110873
110939
|
);
|
|
110874
110940
|
return `${r10}${l}${t10 ? `
|
|
110875
|
-
${(0,
|
|
110941
|
+
${(0, import_node_util5.styleText)("gray", S_BAR)}` : ""}`;
|
|
110876
110942
|
}
|
|
110877
110943
|
case "error": {
|
|
110878
|
-
const n10 = t10 ? `${(0,
|
|
110944
|
+
const n10 = t10 ? `${(0, import_node_util5.styleText)("yellow", S_BAR)} ` : "", l = this.error.split(`
|
|
110879
110945
|
`).map(
|
|
110880
|
-
($, v) => v === 0 ? `${t10 ? `${(0,
|
|
110946
|
+
($, v) => v === 0 ? `${t10 ? `${(0, import_node_util5.styleText)("yellow", S_BAR_END)} ` : ""}${(0, import_node_util5.styleText)("yellow", $)}` : ` ${$}`
|
|
110881
110947
|
).join(`
|
|
110882
110948
|
`), s = r10.split(`
|
|
110883
110949
|
`).length, h10 = l.split(`
|
|
@@ -110896,8 +110962,8 @@ ${l}
|
|
|
110896
110962
|
`;
|
|
110897
110963
|
}
|
|
110898
110964
|
default: {
|
|
110899
|
-
const n10 = t10 ? `${(0,
|
|
110900
|
-
`).length, s = x ? formatInstructionFooter(MULTISELECT_INSTRUCTIONS, t10) : t10 ? [(0,
|
|
110965
|
+
const n10 = t10 ? `${(0, import_node_util5.styleText)("cyan", S_BAR)} ` : "", l = r10.split(`
|
|
110966
|
+
`).length, s = x ? formatInstructionFooter(MULTISELECT_INSTRUCTIONS, t10) : t10 ? [(0, import_node_util5.styleText)("cyan", S_BAR_END)] : [], h10 = s.join(`
|
|
110901
110967
|
`), $ = s.length + 1;
|
|
110902
110968
|
return `${r10}${n10}${limitOptions({
|
|
110903
110969
|
output: i10.output,
|
|
@@ -110917,19 +110983,19 @@ ${h10}
|
|
|
110917
110983
|
}).prompt();
|
|
110918
110984
|
};
|
|
110919
110985
|
var cancel = (o = "", t10) => {
|
|
110920
|
-
const i10 = t10?.output ?? process.stdout, e14 = t10?.withGuide ?? settings.withGuide ? `${(0,
|
|
110921
|
-
i10.write(`${e14}${(0,
|
|
110986
|
+
const i10 = t10?.output ?? process.stdout, e14 = t10?.withGuide ?? settings.withGuide ? `${(0, import_node_util5.styleText)("gray", S_BAR_END)} ` : "";
|
|
110987
|
+
i10.write(`${e14}${(0, import_node_util5.styleText)("red", o)}
|
|
110922
110988
|
|
|
110923
110989
|
`);
|
|
110924
110990
|
};
|
|
110925
110991
|
var intro = (o = "", t10) => {
|
|
110926
|
-
const i10 = t10?.output ?? process.stdout, e14 = t10?.withGuide ?? settings.withGuide ? `${(0,
|
|
110992
|
+
const i10 = t10?.output ?? process.stdout, e14 = t10?.withGuide ?? settings.withGuide ? `${(0, import_node_util5.styleText)("gray", S_BAR_START)} ` : "";
|
|
110927
110993
|
i10.write(`${e14}${o}
|
|
110928
110994
|
`);
|
|
110929
110995
|
};
|
|
110930
110996
|
var outro = (o = "", t10) => {
|
|
110931
|
-
const i10 = t10?.output ?? process.stdout, e14 = t10?.withGuide ?? settings.withGuide ? `${(0,
|
|
110932
|
-
${(0,
|
|
110997
|
+
const i10 = t10?.output ?? process.stdout, e14 = t10?.withGuide ?? settings.withGuide ? `${(0, import_node_util5.styleText)("gray", S_BAR)}
|
|
110998
|
+
${(0, import_node_util5.styleText)("gray", S_BAR_END)} ` : "";
|
|
110933
110999
|
i10.write(`${e14}${o}
|
|
110934
111000
|
|
|
110935
111001
|
`);
|
|
@@ -110940,8 +111006,8 @@ var u2 = {
|
|
|
110940
111006
|
block: unicodeOr("\u2588", "#")
|
|
110941
111007
|
};
|
|
110942
111008
|
var SELECT_INSTRUCTIONS = [
|
|
110943
|
-
`${(0,
|
|
110944
|
-
`${(0,
|
|
111009
|
+
`${(0, import_node_util5.styleText)("dim", "\u2191/\u2193")} to navigate`,
|
|
111010
|
+
`${(0, import_node_util5.styleText)("dim", "Enter:")} confirm`
|
|
110945
111011
|
];
|
|
110946
111012
|
var c = (t10, o) => t10.includes(`
|
|
110947
111013
|
`) ? t10.split(`
|
|
@@ -110954,15 +111020,15 @@ var select = (t10) => {
|
|
|
110954
111020
|
const s = n10.label ?? String(n10.value);
|
|
110955
111021
|
switch (m10) {
|
|
110956
111022
|
case "disabled":
|
|
110957
|
-
return `${(0,
|
|
111023
|
+
return `${(0, import_node_util5.styleText)("gray", S_RADIO_INACTIVE)} ${c(s, (i10) => (0, import_node_util5.styleText)("gray", i10))}${n10.hint ? ` ${(0, import_node_util5.styleText)("dim", `(${n10.hint ?? "disabled"})`)}` : ""}`;
|
|
110958
111024
|
case "selected":
|
|
110959
|
-
return `${c(s, (i10) => (0,
|
|
111025
|
+
return `${c(s, (i10) => (0, import_node_util5.styleText)("dim", i10))}`;
|
|
110960
111026
|
case "active":
|
|
110961
|
-
return `${(0,
|
|
111027
|
+
return `${(0, import_node_util5.styleText)("green", S_RADIO_ACTIVE)} ${s}${n10.hint ? ` ${(0, import_node_util5.styleText)("dim", `(${n10.hint})`)}` : ""}`;
|
|
110962
111028
|
case "cancelled":
|
|
110963
|
-
return `${c(s, (i10) => (0,
|
|
111029
|
+
return `${c(s, (i10) => (0, import_node_util5.styleText)(["strikethrough", "dim"], i10))}`;
|
|
110964
111030
|
default:
|
|
110965
|
-
return `${(0,
|
|
111031
|
+
return `${(0, import_node_util5.styleText)("dim", S_RADIO_INACTIVE)} ${c(s, (i10) => (0, import_node_util5.styleText)("dim", i10))}`;
|
|
110966
111032
|
}
|
|
110967
111033
|
}, d = t10.showInstructions ?? true;
|
|
110968
111034
|
return new n$1({
|
|
@@ -110977,12 +111043,12 @@ var select = (t10) => {
|
|
|
110977
111043
|
t10.message,
|
|
110978
111044
|
s,
|
|
110979
111045
|
m10
|
|
110980
|
-
), u10 = `${n10 ? `${(0,
|
|
111046
|
+
), u10 = `${n10 ? `${(0, import_node_util5.styleText)("gray", S_BAR)}
|
|
110981
111047
|
` : ""}${i10}
|
|
110982
111048
|
`;
|
|
110983
111049
|
switch (this.state) {
|
|
110984
111050
|
case "submit": {
|
|
110985
|
-
const r10 = n10 ? `${(0,
|
|
111051
|
+
const r10 = n10 ? `${(0, import_node_util5.styleText)("gray", S_BAR)} ` : "", a10 = wrapTextWithPrefix(
|
|
110986
111052
|
t10.output,
|
|
110987
111053
|
o(this.options[this.cursor], "selected"),
|
|
110988
111054
|
r10
|
|
@@ -110990,17 +111056,17 @@ var select = (t10) => {
|
|
|
110990
111056
|
return `${u10}${a10}`;
|
|
110991
111057
|
}
|
|
110992
111058
|
case "cancel": {
|
|
110993
|
-
const r10 = n10 ? `${(0,
|
|
111059
|
+
const r10 = n10 ? `${(0, import_node_util5.styleText)("gray", S_BAR)} ` : "", a10 = wrapTextWithPrefix(
|
|
110994
111060
|
t10.output,
|
|
110995
111061
|
o(this.options[this.cursor], "cancelled"),
|
|
110996
111062
|
r10
|
|
110997
111063
|
);
|
|
110998
111064
|
return `${u10}${a10}${n10 ? `
|
|
110999
|
-
${(0,
|
|
111065
|
+
${(0, import_node_util5.styleText)("gray", S_BAR)}` : ""}`;
|
|
111000
111066
|
}
|
|
111001
111067
|
default: {
|
|
111002
|
-
const r10 = n10 ? `${(0,
|
|
111003
|
-
`).length, p = d ? formatInstructionFooter(SELECT_INSTRUCTIONS, n10) : n10 ? [(0,
|
|
111068
|
+
const r10 = n10 ? `${(0, import_node_util5.styleText)("cyan", S_BAR)} ` : "", a10 = u10.split(`
|
|
111069
|
+
`).length, p = d ? formatInstructionFooter(SELECT_INSTRUCTIONS, n10) : n10 ? [(0, import_node_util5.styleText)("cyan", S_BAR_END)] : [], f = p.join(`
|
|
111004
111070
|
`), b = p.length + 1;
|
|
111005
111071
|
return `${u10}${r10}${limitOptions({
|
|
111006
111072
|
output: t10.output,
|
|
@@ -111019,7 +111085,7 @@ ${f}
|
|
|
111019
111085
|
}
|
|
111020
111086
|
}).prompt();
|
|
111021
111087
|
};
|
|
111022
|
-
var i = `${(0,
|
|
111088
|
+
var i = `${(0, import_node_util5.styleText)("gray", S_BAR)} `;
|
|
111023
111089
|
var text = (t10) => new n2({
|
|
111024
111090
|
validate: t10.validate,
|
|
111025
111091
|
placeholder: t10.placeholder,
|
|
@@ -111029,37 +111095,37 @@ var text = (t10) => new n2({
|
|
|
111029
111095
|
signal: t10.signal,
|
|
111030
111096
|
input: t10.input,
|
|
111031
111097
|
render() {
|
|
111032
|
-
const r10 = t10?.withGuide ?? settings.withGuide, l = `${`${r10 ? `${(0,
|
|
111098
|
+
const r10 = t10?.withGuide ?? settings.withGuide, l = `${`${r10 ? `${(0, import_node_util5.styleText)("gray", S_BAR)}
|
|
111033
111099
|
` : ""}${symbol2(this.state)} `}${t10.message}
|
|
111034
111100
|
`, d = t10.placeholder && t10.placeholder.length > 0 ? (
|
|
111035
111101
|
// biome-ignore lint/style/noNonNullAssertion: guarded by placeholder.length > 0
|
|
111036
|
-
(0,
|
|
111037
|
-
) : (0,
|
|
111102
|
+
(0, import_node_util5.styleText)("inverse", t10.placeholder[0]) + (0, import_node_util5.styleText)("dim", t10.placeholder.slice(1))
|
|
111103
|
+
) : (0, import_node_util5.styleText)(["inverse", "hidden"], "_"), o = this.userInput ? this.userInputWithCursor : d, s = this.value ?? "";
|
|
111038
111104
|
switch (this.state) {
|
|
111039
111105
|
case "validating": {
|
|
111040
|
-
const n10 = r10 ? `${(0,
|
|
111106
|
+
const n10 = r10 ? `${(0, import_node_util5.styleText)("cyan", S_BAR)} ` : "", i10 = r10 ? (0, import_node_util5.styleText)("cyan", S_BAR_END) : "", c10 = (0, import_node_util5.styleText)("dim", o), $ = (0, import_node_util5.styleText)("dim", "Validating...");
|
|
111041
111107
|
return `${l}${n10}${c10}
|
|
111042
111108
|
${i10} ${$}
|
|
111043
111109
|
`;
|
|
111044
111110
|
}
|
|
111045
111111
|
case "error": {
|
|
111046
|
-
const n10 = this.error ? ` ${(0,
|
|
111112
|
+
const n10 = this.error ? ` ${(0, import_node_util5.styleText)("yellow", this.error)}` : "", i10 = r10 ? `${(0, import_node_util5.styleText)("yellow", S_BAR)} ` : "", c10 = r10 ? (0, import_node_util5.styleText)("yellow", S_BAR_END) : "";
|
|
111047
111113
|
return `${l.trim()}
|
|
111048
111114
|
${i10}${o}
|
|
111049
111115
|
${c10}${n10}
|
|
111050
111116
|
`;
|
|
111051
111117
|
}
|
|
111052
111118
|
case "submit": {
|
|
111053
|
-
const n10 = s ? `${r10 ? " " : ""}${(0,
|
|
111119
|
+
const n10 = s ? `${r10 ? " " : ""}${(0, import_node_util5.styleText)("dim", s)}` : "", i10 = r10 ? (0, import_node_util5.styleText)("gray", S_BAR) : "";
|
|
111054
111120
|
return `${l}${i10}${n10}`;
|
|
111055
111121
|
}
|
|
111056
111122
|
case "cancel": {
|
|
111057
|
-
const n10 = s ? ` ${(0,
|
|
111123
|
+
const n10 = s ? ` ${(0, import_node_util5.styleText)(["strikethrough", "dim"], s)}` : "", i10 = r10 ? (0, import_node_util5.styleText)("gray", S_BAR) : "";
|
|
111058
111124
|
return `${l}${i10}${n10}${s.trim() ? `
|
|
111059
111125
|
${i10}` : ""}`;
|
|
111060
111126
|
}
|
|
111061
111127
|
default: {
|
|
111062
|
-
const n10 = r10 ? `${(0,
|
|
111128
|
+
const n10 = r10 ? `${(0, import_node_util5.styleText)("cyan", S_BAR)} ` : "", i10 = r10 ? (0, import_node_util5.styleText)("cyan", S_BAR_END) : "";
|
|
111063
111129
|
return `${l}${n10}${o}
|
|
111064
111130
|
${i10}
|
|
111065
111131
|
`;
|
package/dist/index.cjs
CHANGED
|
@@ -56,7 +56,10 @@ var init_categories_default = __esm({
|
|
|
56
56
|
"usage-data",
|
|
57
57
|
"ide",
|
|
58
58
|
"cache",
|
|
59
|
-
"scheduled_tasks.lock"
|
|
59
|
+
"scheduled_tasks.lock",
|
|
60
|
+
"policy-limits.json*",
|
|
61
|
+
"remote-settings.json*",
|
|
62
|
+
"state"
|
|
60
63
|
],
|
|
61
64
|
history: [
|
|
62
65
|
"projects",
|
|
@@ -1483,6 +1486,12 @@ var init_flatten = __esm({
|
|
|
1483
1486
|
});
|
|
1484
1487
|
|
|
1485
1488
|
// src/resolve/decide.ts
|
|
1489
|
+
function unclassifiedEntryMessage(names) {
|
|
1490
|
+
const quoted = names.map((name) => `"${name}"`).join(", ");
|
|
1491
|
+
const subject = names.length === 1 ? `${quoted} is not` : `${String(names.length)} entries are not`;
|
|
1492
|
+
const excluded = names.length === 1 ? "it is excluded" : `they are excluded: ${quoted}`;
|
|
1493
|
+
return `${subject} in the category map, so ${excluded}. Run \`agent-shim configure\` to classify ${names.length === 1 ? "it" : "them"}, which records the answer in the local overlay without touching the shipped default map.`;
|
|
1494
|
+
}
|
|
1486
1495
|
function selectRule(relPath, flattened, context) {
|
|
1487
1496
|
const eliminated = [];
|
|
1488
1497
|
for (const rule of matchingRules(flattened, relPath)) {
|
|
@@ -1520,7 +1529,7 @@ function resolveEntry(relPath, params) {
|
|
|
1520
1529
|
diagnostics.push({
|
|
1521
1530
|
code: "UNCLASSIFIED_ENTRY",
|
|
1522
1531
|
severity: "warning",
|
|
1523
|
-
message:
|
|
1532
|
+
message: unclassifiedEntryMessage([head]),
|
|
1524
1533
|
subject: head
|
|
1525
1534
|
});
|
|
1526
1535
|
return { decision: { relPath, shared: false, via: "unclassified", category }, diagnostics };
|
|
@@ -2955,7 +2964,7 @@ var init_package = __esm({
|
|
|
2955
2964
|
"package.json"() {
|
|
2956
2965
|
package_default = {
|
|
2957
2966
|
name: "claude-use",
|
|
2958
|
-
version: "11.
|
|
2967
|
+
version: "11.27.0",
|
|
2959
2968
|
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.",
|
|
2960
2969
|
license: "MIT",
|
|
2961
2970
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -4121,6 +4130,40 @@ var init_supervisor = __esm({
|
|
|
4121
4130
|
}
|
|
4122
4131
|
});
|
|
4123
4132
|
|
|
4133
|
+
// src/logStyle.ts
|
|
4134
|
+
function styledDiagnostic(style, colour, line) {
|
|
4135
|
+
const lead = DIAGNOSTIC_LEAD.exec(line);
|
|
4136
|
+
if (lead === null) {
|
|
4137
|
+
return style([colour], line);
|
|
4138
|
+
}
|
|
4139
|
+
const [whole, prefix = "", code = "", separator = ""] = lead;
|
|
4140
|
+
return `${style([colour], prefix)}${style([colour, "bold"], code)}${style([colour], `${separator}${line.slice(whole.length)}`)}`;
|
|
4141
|
+
}
|
|
4142
|
+
function createLogPort(sinks, styleFor) {
|
|
4143
|
+
return {
|
|
4144
|
+
info: (message) => {
|
|
4145
|
+
sinks.out(styleFor.out(["dim"], message));
|
|
4146
|
+
},
|
|
4147
|
+
warn: (message) => {
|
|
4148
|
+
sinks.warn(styledDiagnostic(styleFor.err, "yellow", message));
|
|
4149
|
+
},
|
|
4150
|
+
error: (message) => {
|
|
4151
|
+
sinks.err(styledDiagnostic(styleFor.err, "red", message));
|
|
4152
|
+
}
|
|
4153
|
+
};
|
|
4154
|
+
}
|
|
4155
|
+
function styleTextFor(stream) {
|
|
4156
|
+
return (formats, text) => (0, import_node_util.styleText)([...formats], text, { stream });
|
|
4157
|
+
}
|
|
4158
|
+
var import_node_util, DIAGNOSTIC_LEAD;
|
|
4159
|
+
var init_logStyle = __esm({
|
|
4160
|
+
"src/logStyle.ts"() {
|
|
4161
|
+
"use strict";
|
|
4162
|
+
import_node_util = require("node:util");
|
|
4163
|
+
DIAGNOSTIC_LEAD = /^(agent-shim: )([A-Z][A-Z0-9_]*)(: )/;
|
|
4164
|
+
}
|
|
4165
|
+
});
|
|
4166
|
+
|
|
4124
4167
|
// src/realPorts.ts
|
|
4125
4168
|
function isEnoent3(error) {
|
|
4126
4169
|
return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
|
|
@@ -4359,7 +4402,7 @@ function realResolveClaudeBinary(isOwnBinary) {
|
|
|
4359
4402
|
function realInstalledClaudeVersions() {
|
|
4360
4403
|
return installedVersions(listVersionsDir(defaultVersionsDir()));
|
|
4361
4404
|
}
|
|
4362
|
-
var import_node_child_process2, import_node_crypto8, import_node_fs2, import_node_os2, import_node_path14, import_node_sea, realFsPort, OWNER_ONLY_DIR_MODE, OWNER_ONLY_FILE_MODE, PERMISSION_BITS, realFarmFs, INT32_BYTE_LENGTH, PS_TIMEOUT_MS, realRunPort, MACOS_GUI_SESSION_MANAGER, realCredentialPort, SOCKET_PERMISSION_BITS, realHeadroomSocketTrust, realSpawnPort, realProcPort, EXECUTE_BITS_MASK, WINDOWS_DEFAULT_PATHEXT;
|
|
4405
|
+
var import_node_child_process2, import_node_crypto8, import_node_fs2, import_node_os2, import_node_path14, import_node_sea, realFsPort, OWNER_ONLY_DIR_MODE, OWNER_ONLY_FILE_MODE, PERMISSION_BITS, realFarmFs, INT32_BYTE_LENGTH, PS_TIMEOUT_MS, realRunPort, MACOS_GUI_SESSION_MANAGER, realCredentialPort, SOCKET_PERMISSION_BITS, realHeadroomSocketTrust, realSpawnPort, realProcPort, realLogPort, EXECUTE_BITS_MASK, WINDOWS_DEFAULT_PATHEXT;
|
|
4363
4406
|
var init_realPorts = __esm({
|
|
4364
4407
|
"src/realPorts.ts"() {
|
|
4365
4408
|
"use strict";
|
|
@@ -4376,6 +4419,7 @@ var init_realPorts = __esm({
|
|
|
4376
4419
|
init_ensure();
|
|
4377
4420
|
init_supervisor();
|
|
4378
4421
|
init_state2();
|
|
4422
|
+
init_logStyle();
|
|
4379
4423
|
realFsPort = {
|
|
4380
4424
|
readFileUtf8(filePath) {
|
|
4381
4425
|
try {
|
|
@@ -4581,6 +4625,16 @@ var init_realPorts = __esm({
|
|
|
4581
4625
|
argv: process.argv.slice(2),
|
|
4582
4626
|
exit: (code) => process.exit(code)
|
|
4583
4627
|
};
|
|
4628
|
+
realLogPort = createLogPort(
|
|
4629
|
+
{ out: (line) => {
|
|
4630
|
+
console.log(line);
|
|
4631
|
+
}, warn: (line) => {
|
|
4632
|
+
console.warn(line);
|
|
4633
|
+
}, err: (line) => {
|
|
4634
|
+
console.error(line);
|
|
4635
|
+
} },
|
|
4636
|
+
{ out: styleTextFor(process.stdout), err: styleTextFor(process.stderr) }
|
|
4637
|
+
);
|
|
4584
4638
|
EXECUTE_BITS_MASK = 73;
|
|
4585
4639
|
WINDOWS_DEFAULT_PATHEXT = ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PS1";
|
|
4586
4640
|
}
|
|
@@ -7891,6 +7945,42 @@ var init_claudeSession = __esm({
|
|
|
7891
7945
|
}
|
|
7892
7946
|
});
|
|
7893
7947
|
|
|
7948
|
+
// src/launcher/diagnostics.ts
|
|
7949
|
+
function diagnosticLines(diagnostics) {
|
|
7950
|
+
const unclassified = [...new Set(diagnostics.filter((diagnostic) => diagnostic.code === "UNCLASSIFIED_ENTRY").map((diagnostic) => diagnostic.subject))];
|
|
7951
|
+
const lines = [];
|
|
7952
|
+
let unclassifiedReported = false;
|
|
7953
|
+
for (const diagnostic of diagnostics) {
|
|
7954
|
+
if (diagnostic.severity === "info") {
|
|
7955
|
+
continue;
|
|
7956
|
+
}
|
|
7957
|
+
if (diagnostic.code === "UNCLASSIFIED_ENTRY") {
|
|
7958
|
+
if (!unclassifiedReported) {
|
|
7959
|
+
unclassifiedReported = true;
|
|
7960
|
+
lines.push({ severity: diagnostic.severity, text: `agent-shim: ${diagnostic.code}: ${unclassifiedEntryMessage(unclassified.filter((name) => name !== void 0))}` });
|
|
7961
|
+
}
|
|
7962
|
+
continue;
|
|
7963
|
+
}
|
|
7964
|
+
lines.push({ severity: diagnostic.severity, text: `agent-shim: ${diagnostic.code}: ${diagnostic.message}` });
|
|
7965
|
+
}
|
|
7966
|
+
return lines;
|
|
7967
|
+
}
|
|
7968
|
+
function reportDiagnostics(log, diagnostics, options) {
|
|
7969
|
+
for (const line of diagnosticLines(diagnostics)) {
|
|
7970
|
+
if (line.severity === "error" && !options.errorsAsWarnings) {
|
|
7971
|
+
log.error(line.text);
|
|
7972
|
+
} else {
|
|
7973
|
+
log.warn(line.text);
|
|
7974
|
+
}
|
|
7975
|
+
}
|
|
7976
|
+
}
|
|
7977
|
+
var init_diagnostics = __esm({
|
|
7978
|
+
"src/launcher/diagnostics.ts"() {
|
|
7979
|
+
"use strict";
|
|
7980
|
+
init_decide();
|
|
7981
|
+
}
|
|
7982
|
+
});
|
|
7983
|
+
|
|
7894
7984
|
// src/antigravity/cloudUpstream.ts
|
|
7895
7985
|
var init_cloudUpstream = __esm({
|
|
7896
7986
|
"src/antigravity/cloudUpstream.ts"() {
|
|
@@ -8597,17 +8687,7 @@ function decideLaunch(params, readOnly) {
|
|
|
8597
8687
|
const flattened = flattenLayers(assembled.layers, { home: params.farm.home });
|
|
8598
8688
|
cascadeLaunch = flattened.launch;
|
|
8599
8689
|
if (readOnly || farmContext === void 0) {
|
|
8600
|
-
|
|
8601
|
-
if (diagnostic.severity === "info") {
|
|
8602
|
-
continue;
|
|
8603
|
-
}
|
|
8604
|
-
const message = `agent-shim: ${diagnostic.code}: ${diagnostic.message}`;
|
|
8605
|
-
if (diagnostic.severity === "error" && !readOnly) {
|
|
8606
|
-
log.error(message);
|
|
8607
|
-
} else {
|
|
8608
|
-
log.warn(message);
|
|
8609
|
-
}
|
|
8610
|
-
}
|
|
8690
|
+
reportDiagnostics(log, [...assembled.diagnostics, ...flattened.diagnostics], { errorsAsWarnings: readOnly });
|
|
8611
8691
|
}
|
|
8612
8692
|
}
|
|
8613
8693
|
const pinnedVersion = resolveClaudeVersion({ env, ...parsedArgv.claudeVersion === void 0 ? {} : { flag: parsedArgv.claudeVersion }, ...cascadeLaunch?.claudeVersion === void 0 ? {} : { cascade: cascadeLaunch.claudeVersion } });
|
|
@@ -8712,16 +8792,12 @@ function prepareLaunch(params) {
|
|
|
8712
8792
|
}
|
|
8713
8793
|
throw error;
|
|
8714
8794
|
}
|
|
8715
|
-
|
|
8716
|
-
|
|
8717
|
-
|
|
8718
|
-
|
|
8719
|
-
|
|
8720
|
-
}
|
|
8795
|
+
reportDiagnostics(log, result.diagnostics, { errorsAsWarnings: false });
|
|
8796
|
+
if (!result.noOp) {
|
|
8797
|
+
log.info(
|
|
8798
|
+
`agent-shim: farm at ${result.farmRoot} resynced (${String(result.manifest.links.length)} link(s), ${String(result.manifest.materialised.length)} built director(ies)${result.adopted.length === 0 ? "" : `, ${String(result.adopted.length)} adopted into ${resyncFarmRuntime.claudeHome}`})`
|
|
8799
|
+
);
|
|
8721
8800
|
}
|
|
8722
|
-
log.info(
|
|
8723
|
-
result.noOp ? `agent-shim: farm at ${result.farmRoot} already matches the resolved cascade` : `agent-shim: farm at ${result.farmRoot} resynced (${String(result.manifest.links.length)} link(s), ${String(result.manifest.materialised.length)} built director(ies)${result.adopted.length === 0 ? "" : `, ${String(result.adopted.length)} adopted into ${resyncFarmRuntime.claudeHome}`})`
|
|
8724
|
-
);
|
|
8725
8801
|
}
|
|
8726
8802
|
if (decided.pinnedVersion !== void 0) {
|
|
8727
8803
|
log.info(`agent-shim: Claude Code ${decided.pinnedVersion.version} (pinned by ${decided.pinnedVersion.source})`);
|
|
@@ -8830,6 +8906,7 @@ var init_launcher = __esm({
|
|
|
8830
8906
|
init_flags();
|
|
8831
8907
|
init_extraFlags();
|
|
8832
8908
|
init_claudeSession();
|
|
8909
|
+
init_diagnostics();
|
|
8833
8910
|
init_modelPicker();
|
|
8834
8911
|
init_providerCatalogue();
|
|
8835
8912
|
init_pool();
|
package/dist/index.mjs
CHANGED
|
@@ -34,7 +34,10 @@ var init_categories_default = __esm({
|
|
|
34
34
|
"usage-data",
|
|
35
35
|
"ide",
|
|
36
36
|
"cache",
|
|
37
|
-
"scheduled_tasks.lock"
|
|
37
|
+
"scheduled_tasks.lock",
|
|
38
|
+
"policy-limits.json*",
|
|
39
|
+
"remote-settings.json*",
|
|
40
|
+
"state"
|
|
38
41
|
],
|
|
39
42
|
history: [
|
|
40
43
|
"projects",
|
|
@@ -1461,6 +1464,12 @@ var init_flatten = __esm({
|
|
|
1461
1464
|
});
|
|
1462
1465
|
|
|
1463
1466
|
// src/resolve/decide.ts
|
|
1467
|
+
function unclassifiedEntryMessage(names) {
|
|
1468
|
+
const quoted = names.map((name) => `"${name}"`).join(", ");
|
|
1469
|
+
const subject = names.length === 1 ? `${quoted} is not` : `${String(names.length)} entries are not`;
|
|
1470
|
+
const excluded = names.length === 1 ? "it is excluded" : `they are excluded: ${quoted}`;
|
|
1471
|
+
return `${subject} in the category map, so ${excluded}. Run \`agent-shim configure\` to classify ${names.length === 1 ? "it" : "them"}, which records the answer in the local overlay without touching the shipped default map.`;
|
|
1472
|
+
}
|
|
1464
1473
|
function selectRule(relPath, flattened, context) {
|
|
1465
1474
|
const eliminated = [];
|
|
1466
1475
|
for (const rule of matchingRules(flattened, relPath)) {
|
|
@@ -1498,7 +1507,7 @@ function resolveEntry(relPath, params) {
|
|
|
1498
1507
|
diagnostics.push({
|
|
1499
1508
|
code: "UNCLASSIFIED_ENTRY",
|
|
1500
1509
|
severity: "warning",
|
|
1501
|
-
message:
|
|
1510
|
+
message: unclassifiedEntryMessage([head]),
|
|
1502
1511
|
subject: head
|
|
1503
1512
|
});
|
|
1504
1513
|
return { decision: { relPath, shared: false, via: "unclassified", category }, diagnostics };
|
|
@@ -2931,7 +2940,7 @@ var init_package = __esm({
|
|
|
2931
2940
|
"package.json"() {
|
|
2932
2941
|
package_default = {
|
|
2933
2942
|
name: "claude-use",
|
|
2934
|
-
version: "11.
|
|
2943
|
+
version: "11.27.0",
|
|
2935
2944
|
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.",
|
|
2936
2945
|
license: "MIT",
|
|
2937
2946
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -4096,6 +4105,40 @@ var init_supervisor = __esm({
|
|
|
4096
4105
|
}
|
|
4097
4106
|
});
|
|
4098
4107
|
|
|
4108
|
+
// src/logStyle.ts
|
|
4109
|
+
import { styleText } from "node:util";
|
|
4110
|
+
function styledDiagnostic(style, colour, line) {
|
|
4111
|
+
const lead = DIAGNOSTIC_LEAD.exec(line);
|
|
4112
|
+
if (lead === null) {
|
|
4113
|
+
return style([colour], line);
|
|
4114
|
+
}
|
|
4115
|
+
const [whole, prefix = "", code = "", separator = ""] = lead;
|
|
4116
|
+
return `${style([colour], prefix)}${style([colour, "bold"], code)}${style([colour], `${separator}${line.slice(whole.length)}`)}`;
|
|
4117
|
+
}
|
|
4118
|
+
function createLogPort(sinks, styleFor) {
|
|
4119
|
+
return {
|
|
4120
|
+
info: (message) => {
|
|
4121
|
+
sinks.out(styleFor.out(["dim"], message));
|
|
4122
|
+
},
|
|
4123
|
+
warn: (message) => {
|
|
4124
|
+
sinks.warn(styledDiagnostic(styleFor.err, "yellow", message));
|
|
4125
|
+
},
|
|
4126
|
+
error: (message) => {
|
|
4127
|
+
sinks.err(styledDiagnostic(styleFor.err, "red", message));
|
|
4128
|
+
}
|
|
4129
|
+
};
|
|
4130
|
+
}
|
|
4131
|
+
function styleTextFor(stream) {
|
|
4132
|
+
return (formats, text) => styleText([...formats], text, { stream });
|
|
4133
|
+
}
|
|
4134
|
+
var DIAGNOSTIC_LEAD;
|
|
4135
|
+
var init_logStyle = __esm({
|
|
4136
|
+
"src/logStyle.ts"() {
|
|
4137
|
+
"use strict";
|
|
4138
|
+
DIAGNOSTIC_LEAD = /^(agent-shim: )([A-Z][A-Z0-9_]*)(: )/;
|
|
4139
|
+
}
|
|
4140
|
+
});
|
|
4141
|
+
|
|
4099
4142
|
// src/realPorts.ts
|
|
4100
4143
|
import { spawn as spawn2, spawnSync } from "node:child_process";
|
|
4101
4144
|
import { createHash as createHash5 } from "node:crypto";
|
|
@@ -4340,7 +4383,7 @@ function realResolveClaudeBinary(isOwnBinary) {
|
|
|
4340
4383
|
function realInstalledClaudeVersions() {
|
|
4341
4384
|
return installedVersions(listVersionsDir(defaultVersionsDir()));
|
|
4342
4385
|
}
|
|
4343
|
-
var realFsPort, OWNER_ONLY_DIR_MODE, OWNER_ONLY_FILE_MODE, PERMISSION_BITS, realFarmFs, INT32_BYTE_LENGTH, PS_TIMEOUT_MS, realRunPort, MACOS_GUI_SESSION_MANAGER, realCredentialPort, SOCKET_PERMISSION_BITS, realHeadroomSocketTrust, realSpawnPort, realProcPort, EXECUTE_BITS_MASK, WINDOWS_DEFAULT_PATHEXT;
|
|
4386
|
+
var realFsPort, OWNER_ONLY_DIR_MODE, OWNER_ONLY_FILE_MODE, PERMISSION_BITS, realFarmFs, INT32_BYTE_LENGTH, PS_TIMEOUT_MS, realRunPort, MACOS_GUI_SESSION_MANAGER, realCredentialPort, SOCKET_PERMISSION_BITS, realHeadroomSocketTrust, realSpawnPort, realProcPort, realLogPort, EXECUTE_BITS_MASK, WINDOWS_DEFAULT_PATHEXT;
|
|
4344
4387
|
var init_realPorts = __esm({
|
|
4345
4388
|
"src/realPorts.ts"() {
|
|
4346
4389
|
"use strict";
|
|
@@ -4351,6 +4394,7 @@ var init_realPorts = __esm({
|
|
|
4351
4394
|
init_ensure();
|
|
4352
4395
|
init_supervisor();
|
|
4353
4396
|
init_state2();
|
|
4397
|
+
init_logStyle();
|
|
4354
4398
|
realFsPort = {
|
|
4355
4399
|
readFileUtf8(filePath) {
|
|
4356
4400
|
try {
|
|
@@ -4556,6 +4600,16 @@ var init_realPorts = __esm({
|
|
|
4556
4600
|
argv: process.argv.slice(2),
|
|
4557
4601
|
exit: (code) => process.exit(code)
|
|
4558
4602
|
};
|
|
4603
|
+
realLogPort = createLogPort(
|
|
4604
|
+
{ out: (line) => {
|
|
4605
|
+
console.log(line);
|
|
4606
|
+
}, warn: (line) => {
|
|
4607
|
+
console.warn(line);
|
|
4608
|
+
}, err: (line) => {
|
|
4609
|
+
console.error(line);
|
|
4610
|
+
} },
|
|
4611
|
+
{ out: styleTextFor(process.stdout), err: styleTextFor(process.stderr) }
|
|
4612
|
+
);
|
|
4559
4613
|
EXECUTE_BITS_MASK = 73;
|
|
4560
4614
|
WINDOWS_DEFAULT_PATHEXT = ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PS1";
|
|
4561
4615
|
}
|
|
@@ -7863,6 +7917,42 @@ var init_claudeSession = __esm({
|
|
|
7863
7917
|
}
|
|
7864
7918
|
});
|
|
7865
7919
|
|
|
7920
|
+
// src/launcher/diagnostics.ts
|
|
7921
|
+
function diagnosticLines(diagnostics) {
|
|
7922
|
+
const unclassified = [...new Set(diagnostics.filter((diagnostic) => diagnostic.code === "UNCLASSIFIED_ENTRY").map((diagnostic) => diagnostic.subject))];
|
|
7923
|
+
const lines = [];
|
|
7924
|
+
let unclassifiedReported = false;
|
|
7925
|
+
for (const diagnostic of diagnostics) {
|
|
7926
|
+
if (diagnostic.severity === "info") {
|
|
7927
|
+
continue;
|
|
7928
|
+
}
|
|
7929
|
+
if (diagnostic.code === "UNCLASSIFIED_ENTRY") {
|
|
7930
|
+
if (!unclassifiedReported) {
|
|
7931
|
+
unclassifiedReported = true;
|
|
7932
|
+
lines.push({ severity: diagnostic.severity, text: `agent-shim: ${diagnostic.code}: ${unclassifiedEntryMessage(unclassified.filter((name) => name !== void 0))}` });
|
|
7933
|
+
}
|
|
7934
|
+
continue;
|
|
7935
|
+
}
|
|
7936
|
+
lines.push({ severity: diagnostic.severity, text: `agent-shim: ${diagnostic.code}: ${diagnostic.message}` });
|
|
7937
|
+
}
|
|
7938
|
+
return lines;
|
|
7939
|
+
}
|
|
7940
|
+
function reportDiagnostics(log, diagnostics, options) {
|
|
7941
|
+
for (const line of diagnosticLines(diagnostics)) {
|
|
7942
|
+
if (line.severity === "error" && !options.errorsAsWarnings) {
|
|
7943
|
+
log.error(line.text);
|
|
7944
|
+
} else {
|
|
7945
|
+
log.warn(line.text);
|
|
7946
|
+
}
|
|
7947
|
+
}
|
|
7948
|
+
}
|
|
7949
|
+
var init_diagnostics = __esm({
|
|
7950
|
+
"src/launcher/diagnostics.ts"() {
|
|
7951
|
+
"use strict";
|
|
7952
|
+
init_decide();
|
|
7953
|
+
}
|
|
7954
|
+
});
|
|
7955
|
+
|
|
7866
7956
|
// src/antigravity/cloudUpstream.ts
|
|
7867
7957
|
var init_cloudUpstream = __esm({
|
|
7868
7958
|
"src/antigravity/cloudUpstream.ts"() {
|
|
@@ -8571,17 +8661,7 @@ function decideLaunch(params, readOnly) {
|
|
|
8571
8661
|
const flattened = flattenLayers(assembled.layers, { home: params.farm.home });
|
|
8572
8662
|
cascadeLaunch = flattened.launch;
|
|
8573
8663
|
if (readOnly || farmContext === void 0) {
|
|
8574
|
-
|
|
8575
|
-
if (diagnostic.severity === "info") {
|
|
8576
|
-
continue;
|
|
8577
|
-
}
|
|
8578
|
-
const message = `agent-shim: ${diagnostic.code}: ${diagnostic.message}`;
|
|
8579
|
-
if (diagnostic.severity === "error" && !readOnly) {
|
|
8580
|
-
log.error(message);
|
|
8581
|
-
} else {
|
|
8582
|
-
log.warn(message);
|
|
8583
|
-
}
|
|
8584
|
-
}
|
|
8664
|
+
reportDiagnostics(log, [...assembled.diagnostics, ...flattened.diagnostics], { errorsAsWarnings: readOnly });
|
|
8585
8665
|
}
|
|
8586
8666
|
}
|
|
8587
8667
|
const pinnedVersion = resolveClaudeVersion({ env, ...parsedArgv.claudeVersion === void 0 ? {} : { flag: parsedArgv.claudeVersion }, ...cascadeLaunch?.claudeVersion === void 0 ? {} : { cascade: cascadeLaunch.claudeVersion } });
|
|
@@ -8686,16 +8766,12 @@ function prepareLaunch(params) {
|
|
|
8686
8766
|
}
|
|
8687
8767
|
throw error;
|
|
8688
8768
|
}
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
}
|
|
8769
|
+
reportDiagnostics(log, result.diagnostics, { errorsAsWarnings: false });
|
|
8770
|
+
if (!result.noOp) {
|
|
8771
|
+
log.info(
|
|
8772
|
+
`agent-shim: farm at ${result.farmRoot} resynced (${String(result.manifest.links.length)} link(s), ${String(result.manifest.materialised.length)} built director(ies)${result.adopted.length === 0 ? "" : `, ${String(result.adopted.length)} adopted into ${resyncFarmRuntime.claudeHome}`})`
|
|
8773
|
+
);
|
|
8695
8774
|
}
|
|
8696
|
-
log.info(
|
|
8697
|
-
result.noOp ? `agent-shim: farm at ${result.farmRoot} already matches the resolved cascade` : `agent-shim: farm at ${result.farmRoot} resynced (${String(result.manifest.links.length)} link(s), ${String(result.manifest.materialised.length)} built director(ies)${result.adopted.length === 0 ? "" : `, ${String(result.adopted.length)} adopted into ${resyncFarmRuntime.claudeHome}`})`
|
|
8698
|
-
);
|
|
8699
8775
|
}
|
|
8700
8776
|
if (decided.pinnedVersion !== void 0) {
|
|
8701
8777
|
log.info(`agent-shim: Claude Code ${decided.pinnedVersion.version} (pinned by ${decided.pinnedVersion.source})`);
|
|
@@ -8801,6 +8877,7 @@ var init_launcher = __esm({
|
|
|
8801
8877
|
init_flags();
|
|
8802
8878
|
init_extraFlags();
|
|
8803
8879
|
init_claudeSession();
|
|
8880
|
+
init_diagnostics();
|
|
8804
8881
|
init_modelPicker();
|
|
8805
8882
|
init_providerCatalogue();
|
|
8806
8883
|
init_pool();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-use",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.27.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>",
|