agent-shim 11.70.1 → 11.71.1

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 CHANGED
@@ -25715,7 +25715,7 @@ var init_statusline = __esm({
25715
25715
  usage: {
25716
25716
  value: external_exports.enum(STATUSLINE_USAGE_VALUES).describe("Whether a quota window's figure is the share of it used or the share left; the bar and the colour always follow the share used."),
25717
25717
  bar: external_exports.boolean().describe("Whether each quota window is drawn as a bar, or as text alone."),
25718
- compact: external_exports.boolean().describe("Whether the quota windows are drawn as one short line of text (`5h: 25.0% (1h 30m)`) in place of bars; it takes precedence over usage.bar."),
25718
+ compact: external_exports.boolean().describe("Whether the quota windows are drawn as one short line of text (`5h: 25% (1h 30m)`) in place of bars; it takes precedence over usage.bar."),
25719
25719
  resetLabel: external_exports.boolean().describe("Whether a window's reset time is introduced with `resets in` (`resets` for a wall-clock time), as in `(resets in 1h 30m)`, rather than the bare `(1h 30m)`."),
25720
25720
  modelScoped: external_exports.boolean().describe("Whether the per-model weekly windows the client reports (rate_limits.model_scoped) are drawn after the five-hour and weekly windows (one reported with a null, missing or non-numeric figure is drawn as two hyphens beside its reset); they describe the signed-in account, so a session that selected a provider never shows them, nor does a Bedrock session, whose subscription windows do not apply."),
25721
25721
  timeFormat: external_exports.enum(STATUSLINE_TIME_FORMATS).describe("How a window's reset is shown: the time left (`1h 30m`), the wall-clock time (`at 14:30`), both, the share of the window already gone (`53% elapsed`), or that share and the wall-clock time. A window whose length is not known shows no share."),
@@ -37387,7 +37387,7 @@ var init_package = __esm({
37387
37387
  "package.json"() {
37388
37388
  package_default = {
37389
37389
  name: "agent-shim",
37390
- version: "11.70.1",
37390
+ version: "11.71.1",
37391
37391
  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.",
37392
37392
  license: "MIT",
37393
37393
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -68781,6 +68781,7 @@ function messagesToGeminiContents(messages, names, toolIdToName) {
68781
68781
  const signature = toolCallSignatureOf(block2.id);
68782
68782
  ensureRole("model").push({
68783
68783
  functionCall: {
68784
+ id: block2.id,
68784
68785
  name: sanitizedName,
68785
68786
  args: isRecord8(block2.input) ? block2.input : {}
68786
68787
  },
@@ -68791,6 +68792,7 @@ function messagesToGeminiContents(messages, names, toolIdToName) {
68791
68792
  const toolName = toolIdToName.get(block2.tool_use_id) ?? "unknown_tool";
68792
68793
  ensureRole("user").push({
68793
68794
  functionResponse: {
68795
+ id: block2.tool_use_id,
68794
68796
  name: toolName,
68795
68797
  response: { output: flattenToolResult(block2.content) }
68796
68798
  }
@@ -142739,6 +142741,13 @@ function contextFrameOf(input2) {
142739
142741
  return drawn;
142740
142742
  }
142741
142743
 
142744
+ // src/statusline/percent.ts
142745
+ var WRITTEN_PERCENT_DECIMALS = 1;
142746
+ function writtenPercent(percent2) {
142747
+ const rounded = Number(percent2.toFixed(WRITTEN_PERCENT_DECIMALS));
142748
+ return Number.isInteger(rounded) ? String(rounded) : rounded.toFixed(WRITTEN_PERCENT_DECIMALS);
142749
+ }
142750
+
142742
142751
  // src/statusline/elements/context.ts
142743
142752
  function barStyleOf({ settings: settings2, palette }, okRole) {
142744
142753
  return { bands: settings2.bands, palette, okRole, gradient: settings2.bar.gradient, filled: settings2.bar.filled, empty: settings2.bar.empty };
@@ -142764,10 +142773,6 @@ function windowTokensOf({ settings: settings2, view }) {
142764
142773
  return settings2.context.autoCompactWindow ?? view.contextWindowTokens;
142765
142774
  }
142766
142775
  var ROUNDING_HALF_POINT = 0.5;
142767
- var WINDOW_PERCENT_DECIMALS = 1;
142768
- function writtenWindowPercent(percent2) {
142769
- return percent2.toFixed(WINDOW_PERCENT_DECIMALS);
142770
- }
142771
142776
  function bufferedPercent(tokens, windowTokens) {
142772
142777
  const held = tokens / windowTokens;
142773
142778
  const ramp = Math.max(0, Math.min(1, (held - AUTOCOMPACT_RESERVE_RAMP_START) / (AUTOCOMPACT_RESERVE_RAMP_END - AUTOCOMPACT_RESERVE_RAMP_START)));
@@ -142799,7 +142804,7 @@ function breakdownText(frame, t10) {
142799
142804
  function drawnContextFrameOf(context) {
142800
142805
  const { payload } = context;
142801
142806
  const percent2 = usedPercentOf(context);
142802
- const drawsPercent = percent2 !== void 0 && Number(writtenWindowPercent(percent2)) > 0;
142807
+ const drawsPercent = percent2 !== void 0 && Number(writtenPercent(percent2)) > 0;
142803
142808
  return contextFrameOf({ ports: context.ports, transcriptPath: payload.transcript_path, frame: payload.context_window, drawsPercent, nowMs: context.nowMs, compaction: () => context.transcript()?.session.lastCompaction });
142804
142809
  }
142805
142810
  function drawnContextOf(input2) {
@@ -142822,7 +142827,7 @@ function contextRow(input2) {
142822
142827
  const windowTokens = windowTokensOf(context);
142823
142828
  const tokens = view.contextTotalTokens;
142824
142829
  const heldAgainstWindow = tokens === void 0 || windowTokens === void 0 ? void 0 : `${formatTokens(tokens)}/${formatTokens(windowTokens)}`;
142825
- const percentText = withColor(color, `${writtenWindowPercent(percent2)}%`);
142830
+ const percentText = withColor(color, `${writtenPercent(percent2)}%`);
142826
142831
  const beforeBar = [];
142827
142832
  const afterBar = [];
142828
142833
  switch (settings2.context.value) {
@@ -142843,7 +142848,7 @@ function contextRow(input2) {
142843
142848
  break;
142844
142849
  }
142845
142850
  case "remaining":
142846
- afterBar.push(withColor(color, `${writtenWindowPercent(Math.max(0, FULL_PERCENT3 - percent2))}%`));
142851
+ afterBar.push(withColor(color, `${writtenPercent(Math.max(0, FULL_PERCENT3 - percent2))}%`));
142847
142852
  break;
142848
142853
  default:
142849
142854
  return settings2.context.value;
@@ -143079,7 +143084,7 @@ function memoryRow(context) {
143079
143084
  if (use2 !== void 0 && use2.totalBytes > 0) {
143080
143085
  const style = barStyleOf(context, "usage");
143081
143086
  const fraction = Math.max(0, Math.min(1, use2.usedBytes / use2.totalBytes));
143082
- const percent2 = withColor(statusColor(fraction, true, style), `${(fraction * FULL_PERCENT3).toFixed(1)}%`);
143087
+ const percent2 = withColor(statusColor(fraction, true, style), `${writtenPercent(fraction * FULL_PERCENT3)}%`);
143083
143088
  cells.push(barCell(context.palette.paint("label", `${context.t("memory.label")} `), ` ${percent2} (${formatBytes(use2.usedBytes)} / ${formatBytes(use2.totalBytes)})`, fraction, style));
143084
143089
  }
143085
143090
  return { kind: "bars", cells };
@@ -143243,7 +143248,7 @@ function figuresOf(window, context, style) {
143243
143248
  const clamped = Math.max(0, Math.min(1, window.fraction));
143244
143249
  const used = window.fraction * FULL_PERCENT3;
143245
143250
  const shown = settings2.usage.value === "remaining" ? Math.max(0, FULL_PERCENT3 - used) : used;
143246
- return { value: withColor(statusColor(clamped, true, style), `${shown.toFixed(1)}%`), reset, plainReset };
143251
+ return { value: withColor(statusColor(clamped, true, style), `${writtenPercent(shown)}%`), reset, plainReset };
143247
143252
  }
143248
143253
  function parenthesised(reset) {
143249
143254
  return reset === "" ? "" : `(${reset})`;
package/dist/index.cjs CHANGED
@@ -492,7 +492,7 @@ var init_statusline = __esm({
492
492
  usage: {
493
493
  value: import_zod2.z.enum(STATUSLINE_USAGE_VALUES).describe("Whether a quota window's figure is the share of it used or the share left; the bar and the colour always follow the share used."),
494
494
  bar: import_zod2.z.boolean().describe("Whether each quota window is drawn as a bar, or as text alone."),
495
- compact: import_zod2.z.boolean().describe("Whether the quota windows are drawn as one short line of text (`5h: 25.0% (1h 30m)`) in place of bars; it takes precedence over usage.bar."),
495
+ compact: import_zod2.z.boolean().describe("Whether the quota windows are drawn as one short line of text (`5h: 25% (1h 30m)`) in place of bars; it takes precedence over usage.bar."),
496
496
  resetLabel: import_zod2.z.boolean().describe("Whether a window's reset time is introduced with `resets in` (`resets` for a wall-clock time), as in `(resets in 1h 30m)`, rather than the bare `(1h 30m)`."),
497
497
  modelScoped: import_zod2.z.boolean().describe("Whether the per-model weekly windows the client reports (rate_limits.model_scoped) are drawn after the five-hour and weekly windows (one reported with a null, missing or non-numeric figure is drawn as two hyphens beside its reset); they describe the signed-in account, so a session that selected a provider never shows them, nor does a Bedrock session, whose subscription windows do not apply."),
498
498
  timeFormat: import_zod2.z.enum(STATUSLINE_TIME_FORMATS).describe("How a window's reset is shown: the time left (`1h 30m`), the wall-clock time (`at 14:30`), both, the share of the window already gone (`53% elapsed`), or that share and the wall-clock time. A window whose length is not known shows no share."),
@@ -4762,7 +4762,7 @@ var init_package = __esm({
4762
4762
  "package.json"() {
4763
4763
  package_default = {
4764
4764
  name: "agent-shim",
4765
- version: "11.70.1",
4765
+ version: "11.71.1",
4766
4766
  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.",
4767
4767
  license: "MIT",
4768
4768
  author: "Joseph Mearman <joseph@mearman.co.uk>",
package/dist/index.mjs CHANGED
@@ -470,7 +470,7 @@ var init_statusline = __esm({
470
470
  usage: {
471
471
  value: z2.enum(STATUSLINE_USAGE_VALUES).describe("Whether a quota window's figure is the share of it used or the share left; the bar and the colour always follow the share used."),
472
472
  bar: z2.boolean().describe("Whether each quota window is drawn as a bar, or as text alone."),
473
- compact: z2.boolean().describe("Whether the quota windows are drawn as one short line of text (`5h: 25.0% (1h 30m)`) in place of bars; it takes precedence over usage.bar."),
473
+ compact: z2.boolean().describe("Whether the quota windows are drawn as one short line of text (`5h: 25% (1h 30m)`) in place of bars; it takes precedence over usage.bar."),
474
474
  resetLabel: z2.boolean().describe("Whether a window's reset time is introduced with `resets in` (`resets` for a wall-clock time), as in `(resets in 1h 30m)`, rather than the bare `(1h 30m)`."),
475
475
  modelScoped: z2.boolean().describe("Whether the per-model weekly windows the client reports (rate_limits.model_scoped) are drawn after the five-hour and weekly windows (one reported with a null, missing or non-numeric figure is drawn as two hyphens beside its reset); they describe the signed-in account, so a session that selected a provider never shows them, nor does a Bedrock session, whose subscription windows do not apply."),
476
476
  timeFormat: z2.enum(STATUSLINE_TIME_FORMATS).describe("How a window's reset is shown: the time left (`1h 30m`), the wall-clock time (`at 14:30`), both, the share of the window already gone (`53% elapsed`), or that share and the wall-clock time. A window whose length is not known shows no share."),
@@ -4738,7 +4738,7 @@ var init_package = __esm({
4738
4738
  "package.json"() {
4739
4739
  package_default = {
4740
4740
  name: "agent-shim",
4741
- version: "11.70.1",
4741
+ version: "11.71.1",
4742
4742
  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.",
4743
4743
  license: "MIT",
4744
4744
  author: "Joseph Mearman <joseph@mearman.co.uk>",