claude-use 11.60.2 → 11.61.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/dist/cli.cjs +264 -131
- package/dist/index.cjs +28 -4
- package/dist/index.mjs +28 -4
- package/dist/types/index.d.ts +774 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -269,9 +269,17 @@ function resolveStatusline(settings) {
|
|
|
269
269
|
if (forContext.warnAt >= forContext.criticalAt) {
|
|
270
270
|
throw new RangeError(`statusline context.warnAt (${String(forContext.warnAt)}) must be below context.criticalAt (${String(forContext.criticalAt)}), each following bands while it is unset`);
|
|
271
271
|
}
|
|
272
|
+
const merged = new Set(resolved.layout.merge.flat());
|
|
273
|
+
const unmerged = resolved.layout.rightAlign.filter((row) => !merged.has(row));
|
|
274
|
+
if (unmerged.length > 0) {
|
|
275
|
+
throw new RangeError(`statusline layout.rightAlign names ${unmerged.join(", ")}, which no group in layout.merge contains`);
|
|
276
|
+
}
|
|
277
|
+
if (resolved.layout.forceMaxWidth && resolved.layout.maxWidth === 0) {
|
|
278
|
+
throw new RangeError("statusline layout.forceMaxWidth needs layout.maxWidth to be set");
|
|
279
|
+
}
|
|
272
280
|
return resolved;
|
|
273
281
|
}
|
|
274
|
-
var STATUSLINE_HEADER_SEGMENTS, STATUSLINE_ROWS, STATUSLINE_SESSION_TIME_PARTS, PROMPT_CACHE_TTL_SECONDS, STATUSLINE_COLOUR_NAMES, DEFAULT_HEADER_SEGMENTS, DEFAULT_ROWS, STATUSLINE_PATH_LEVELS, STATUSLINE_USAGE_VALUES, STATUSLINE_TIME_FORMATS, STATUSLINE_HOUR_CYCLES, MAX_PERCENT, MAX_STATUSLINE_PALETTE_INDEX, MAX_STATUSLINE_LABEL_COLUMNS, MAX_BAR_CELLS, MAX_ACCOUNT_USER_CHARS, MAX_DISPLAY_TEXT_CHARS, LABEL_RE2, OPTIONAL_LABEL_RE, colourValue, barCharacter, STATUSLINE_CONTEXT_VALUES, STATUSLINE_CONTEXT_ESTIMATES, AUTOCOMPACT_RESERVE_FRACTION, AUTOCOMPACT_RESERVE_RAMP_START, AUTOCOMPACT_RESERVE_RAMP_END, labelText, overrideText, wholePercent, thresholdPercent, SHAPES, UNSET_NOTE, StatuslineSchema, ResolvedStatuslineSchema, STATUSLINE_DEFAULTS, STATUSLINE_ENV;
|
|
282
|
+
var STATUSLINE_HEADER_SEGMENTS, STATUSLINE_ROWS, STATUSLINE_SESSION_TIME_PARTS, PROMPT_CACHE_TTL_SECONDS, STATUSLINE_COLOUR_NAMES, DEFAULT_HEADER_SEGMENTS, DEFAULT_ROWS, STATUSLINE_PATH_LEVELS, STATUSLINE_USAGE_VALUES, STATUSLINE_TIME_FORMATS, STATUSLINE_HOUR_CYCLES, MAX_PERCENT, MAX_STATUSLINE_PALETTE_INDEX, MAX_STATUSLINE_LABEL_COLUMNS, MIN_STATUSLINE_COLUMNS, MAX_STATUSLINE_COLUMNS, MAX_BAR_CELLS, MAX_ACCOUNT_USER_CHARS, MAX_DISPLAY_TEXT_CHARS, LABEL_RE2, OPTIONAL_LABEL_RE, mergeGroups, colourValue, barCharacter, STATUSLINE_CONTEXT_VALUES, STATUSLINE_CONTEXT_ESTIMATES, AUTOCOMPACT_RESERVE_FRACTION, AUTOCOMPACT_RESERVE_RAMP_START, AUTOCOMPACT_RESERVE_RAMP_END, labelText, overrideText, wholePercent, thresholdPercent, SHAPES, UNSET_NOTE, StatuslineSchema, ResolvedStatuslineSchema, STATUSLINE_DEFAULTS, STATUSLINE_ENV;
|
|
275
283
|
var init_statusline = __esm({
|
|
276
284
|
"src/config/statusline.ts"() {
|
|
277
285
|
"use strict";
|
|
@@ -310,11 +318,17 @@ var init_statusline = __esm({
|
|
|
310
318
|
MAX_PERCENT = 100;
|
|
311
319
|
MAX_STATUSLINE_PALETTE_INDEX = 255;
|
|
312
320
|
MAX_STATUSLINE_LABEL_COLUMNS = 12;
|
|
321
|
+
MIN_STATUSLINE_COLUMNS = 20;
|
|
322
|
+
MAX_STATUSLINE_COLUMNS = 1e3;
|
|
313
323
|
MAX_BAR_CELLS = 40;
|
|
314
324
|
MAX_ACCOUNT_USER_CHARS = 254;
|
|
315
325
|
MAX_DISPLAY_TEXT_CHARS = 80;
|
|
316
326
|
LABEL_RE2 = /^[^\p{C}\p{Z}]+(?: [^\p{C}\p{Z}]+)*$/u;
|
|
317
327
|
OPTIONAL_LABEL_RE = /^(?:[^\p{C}\p{Z}]+(?: [^\p{C}\p{Z}]+)*)?$/u;
|
|
328
|
+
mergeGroups = z2.array(distinctList(z2.enum(STATUSLINE_ROWS)).min(2)).refine((groups) => {
|
|
329
|
+
const rows = groups.flat();
|
|
330
|
+
return new Set(rows).size === rows.length;
|
|
331
|
+
}, "must not name a row in more than one group");
|
|
318
332
|
colourValue = z2.union([z2.enum(STATUSLINE_COLOUR_NAMES), z2.number().int().min(0).max(MAX_STATUSLINE_PALETTE_INDEX), z2.string().regex(/^#[0-9a-fA-F]{6}$/, "must be a colour name, a palette index from 0 to 255 or #rrggbb")]);
|
|
319
333
|
barCharacter = z2.string().refine(isSingleVisibleGrapheme, "must be a single visible character that takes one terminal column");
|
|
320
334
|
STATUSLINE_CONTEXT_VALUES = ["both", "percent", "tokens", "remaining"];
|
|
@@ -329,7 +343,14 @@ var init_statusline = __esm({
|
|
|
329
343
|
SHAPES = {
|
|
330
344
|
layout: {
|
|
331
345
|
header: distinctList(z2.enum(STATUSLINE_HEADER_SEGMENTS)).describe("The header segments to draw, in drawing order; a segment left out is hidden, and an empty list hides the header."),
|
|
332
|
-
rows: distinctList(z2.enum(STATUSLINE_ROWS)).describe("The rows to draw below the header, in drawing order; a row left out is hidden, and an empty list hides every row.")
|
|
346
|
+
rows: distinctList(z2.enum(STATUSLINE_ROWS)).describe("The rows to draw below the header, in drawing order; a row left out is hidden, and an empty list hides every row."),
|
|
347
|
+
mode: z2.enum(["expanded", "compact"]).describe("How the statusline is laid out: expanded draws the header and then the rows, each on lines of its own as layout.merge allows, and compact draws the header segments and every row's content on one line, starting a new line only where the line would be wider than the width. layout.mergeBars, layout.merge, layout.rightAlign and layout.rule have no effect in compact."),
|
|
348
|
+
rule: z2.enum(["none", "belowHeader"]).describe(`Whether a rule is drawn across the line between the header and the rows beneath it, as wide as the header's widest line (at least ${String(MIN_STATUSLINE_COLUMNS)} columns, at most the width); it is drawn only when both the header and the rows have something to show, and not in the compact layout.`),
|
|
349
|
+
mergeBars: z2.boolean().describe("Whether bar rows that sit next to each other in layout.rows share a line, and one grid, when they fit (the context and quota bars do by default); when false each bar row is on a line of its own, its bars still aligned to its neighbours'. A row of text is never joined by this setting, whichever form the quota row takes: layout.merge does that."),
|
|
350
|
+
merge: mergeGroups.describe("Groups of rows that share a line when they sit next to each other in layout.rows and fit on one line together, and are drawn on lines of their own when they do not; each group names at least two rows, and no row belongs to two groups. A group may mix bar rows and rows of text, which are joined with the separator when every member is a single line. Bar rows outside a group follow layout.mergeBars. A group in which no row has anything to show draws nothing: one with a row of text in it still ends a run of bars sharing a line, as an empty row of text does, and one of bar rows alone is left out, so the bars either side of it share as if it were not there."),
|
|
351
|
+
rightAlign: distinctList(z2.enum(STATUSLINE_ROWS)).describe("Rows that start the right-aligned part of a merged line: the first of them to appear on a line, and the rows after it, are pushed to the right edge, with the gap padded by spaces. A row named here must belong to a group in layout.merge, and it has no effect when it is the first row of its line."),
|
|
352
|
+
maxWidth: z2.number().int().min(0).max(MAX_STATUSLINE_COLUMNS).refine((columns) => columns === 0 || columns >= MIN_STATUSLINE_COLUMNS, `must be 0, or at least ${String(MIN_STATUSLINE_COLUMNS)} columns`).describe(`The exact width in columns lines are drawn to when the client reports none and the COLUMNS environment variable names none, in place of the default width it would assume for the terminal; unlike a terminal's width, it is not reduced by the columns Claude Code keeps back for itself. It is 0, to leave it unset, or from ${String(MIN_STATUSLINE_COLUMNS)} to ${String(MAX_STATUSLINE_COLUMNS)}; a value outside that is refused, not clamped.`),
|
|
353
|
+
forceMaxWidth: z2.boolean().describe("Whether maxWidth is the exact width lines are drawn to for whatever the client reports, even when the terminal is narrower or wider; it needs maxWidth to be set.")
|
|
333
354
|
},
|
|
334
355
|
model: {
|
|
335
356
|
format: z2.enum(["full", "compact", "short"]).describe("How the model's name is written: full is the name as the client gives it, compact drops a context-window suffix such as (1M context), and short also drops a leading Claude."),
|
|
@@ -475,7 +496,7 @@ var init_statusline = __esm({
|
|
|
475
496
|
jj: z2.strictObject(SHAPES.jj)
|
|
476
497
|
});
|
|
477
498
|
STATUSLINE_DEFAULTS = {
|
|
478
|
-
layout: { header: [...DEFAULT_HEADER_SEGMENTS], rows: [...DEFAULT_ROWS] },
|
|
499
|
+
layout: { header: [...DEFAULT_HEADER_SEGMENTS], rows: [...DEFAULT_ROWS], mode: "expanded", rule: "none", mergeBars: true, merge: [], rightAlign: [], maxWidth: 0, forceMaxWidth: false },
|
|
479
500
|
model: { format: "full", override: "", source: "client" },
|
|
480
501
|
provider: { name: "" },
|
|
481
502
|
account: { parts: ["user", "organisation", "plan"], userLength: 0 },
|
|
@@ -4553,7 +4574,7 @@ var init_package = __esm({
|
|
|
4553
4574
|
"package.json"() {
|
|
4554
4575
|
package_default = {
|
|
4555
4576
|
name: "claude-use",
|
|
4556
|
-
version: "11.
|
|
4577
|
+
version: "11.61.0",
|
|
4557
4578
|
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.",
|
|
4558
4579
|
license: "MIT",
|
|
4559
4580
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -7792,6 +7813,9 @@ function keyOf(path41, declared) {
|
|
|
7792
7813
|
if (leaf instanceof z16.ZodArray && leaf.element instanceof z16.ZodEnum) {
|
|
7793
7814
|
return { ...common, kind: "list", choices: Object.values(leaf.element.enum).map(String) };
|
|
7794
7815
|
}
|
|
7816
|
+
if (leaf instanceof z16.ZodArray && leaf.element instanceof z16.ZodArray && leaf.element.element instanceof z16.ZodEnum) {
|
|
7817
|
+
return { ...common, kind: "groups", choices: Object.values(leaf.element.element.enum).map(String) };
|
|
7818
|
+
}
|
|
7795
7819
|
throw new TypeError(`statusline setting ${path41.join(".")} has a kind the key listing does not describe`);
|
|
7796
7820
|
}
|
|
7797
7821
|
function walk(shape, prefix) {
|