@namzu/cli 4.3.0 → 4.3.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.
@@ -55,4 +55,59 @@ export interface ContextGauge {
55
55
  * repeat, one level down, the error of presenting an inference as a reading.
56
56
  */
57
57
  export declare function buildGauge(context: ContextFill | null | undefined): ContextGauge | null;
58
+ /**
59
+ * A path shortened from the LEFT, keeping the leaf.
60
+ *
61
+ * The end of a path is the informative end: `core` says which package you are
62
+ * in, `/home` says nothing you did not know. Cutting resumes at a separator
63
+ * when one is near the cut, so the result still reads as a path rather than as
64
+ * a word broken in half.
65
+ */
66
+ export declare function shortenPathToFit(path: string, max: number): string;
67
+ /**
68
+ * What fits on the status line, and in what order things yield.
69
+ *
70
+ * The line is one row that truncates from the end, and the hint sits at the
71
+ * end — so anything ahead of it that grows pushes it off the screen. The hint
72
+ * is the only place any key is advertised: the trust gate's `Esc`, the
73
+ * permission prompt's `y`/`n`/`a`, the picker's exits all exist on screen here
74
+ * and nowhere else. Losing it strands the operator on a screen whose exits have
75
+ * become undiscoverable, so it is the one thing never dropped.
76
+ *
77
+ * Everything else is recoverable elsewhere and yields in this order:
78
+ *
79
+ * 1. **usage** — `/cost` prints it exactly, and this is the abbreviation.
80
+ * 2. **the context gauge** — same figure, same command.
81
+ * 3. **provider** — the longest segment and the least distinctive, since the
82
+ * model name already implies it. A credential-qualified provider label runs
83
+ * to about thirty columns and repeats a vendor the model string has already
84
+ * named.
85
+ * 4. **the working directory, shortened** — a shortened path still orients,
86
+ * so it is cut before anything else is given up.
87
+ * 5. **model**, and only then the path entirely. Both are on the banner and in
88
+ * `/model`, but between them these are the two facts worth keeping longest:
89
+ * where you are, and what is answering you.
90
+ *
91
+ * The order was corrected by the tests: dropping the path first discarded a
92
+ * two-character cwd to save five columns while a thirty-column provider label
93
+ * survived, which is the wrong trade in every case it can happen.
94
+ *
95
+ * Measured rather than assumed, and the measurement changed the design: a
96
+ * SHORT path still lost the hint at 100 columns, because a realistic provider
97
+ * and model fill the line between them. Shortening the path alone would have
98
+ * fixed the case that was easiest to picture and left the common one broken.
99
+ */
100
+ export declare function fitStatusLine(input: {
101
+ readonly columns: number;
102
+ readonly cwd: string;
103
+ readonly provider: string | null;
104
+ readonly model: string | null;
105
+ readonly usage: string | null;
106
+ readonly gaugeCells: number;
107
+ readonly stateLabel: string;
108
+ readonly hint?: string | undefined;
109
+ }): {
110
+ readonly meta: string;
111
+ readonly showGauge: boolean;
112
+ };
58
113
  //# sourceMappingURL=StatusBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBar.d.ts","sourceRoot":"","sources":["../../src/tui/StatusBar.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,UAAU,CAAA;IAC7C,QAAQ,CAAC,YAAY,CAAC,EAAE,QAAQ,GAAG,aAAa,GAAG,SAAS,CAAA;CAC5D;AAED,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,qBAAqB,CAAA;IACpE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAChE,uDAAuD;IACvD,QAAQ,CAAC,OAAO,CAAC,EAAE,W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I,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAClC,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CA8DzD"}
@@ -6,22 +6,31 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
6
6
  * when null). A `│` divider separates the metadata cluster from the hint
7
7
  * so the eye can find the help-text without parsing the whole line.
8
8
  */
9
- import { Text } from 'ink';
9
+ import { Text, useStdout } from 'ink';
10
10
  import { theme } from './theme.js';
11
11
  export function StatusBar({ cwd, provider, model, state, hint, usage, context }) {
12
- const segments = [shortenCwd(cwd)];
13
- if (provider)
14
- segments.push(provider);
15
- if (model)
16
- segments.push(model);
17
- if (usage && usage.totalTokens > 0)
18
- segments.push(formatUsage(usage));
19
- const gauge = buildGauge(context);
12
+ const { stdout } = useStdout();
13
+ const gaugeRaw = buildGauge(context);
20
14
  const stateLabel = stateGlyph(state);
15
+ // Decide what fits before rendering, rather than letting the terminal cut
16
+ // the line wherever it runs out. `truncate-end` alone always sacrifices the
17
+ // hint, because the hint is last — see `fitStatusLine`.
18
+ const { meta, showGauge } = fitStatusLine({
19
+ columns: stdout?.columns ?? 80,
20
+ cwd: shortenCwd(cwd),
21
+ provider,
22
+ model,
23
+ usage: usage && usage.totalTokens > 0 ? formatUsage(usage) : null,
24
+ // ` · ctx ` + bar + optional `~` + up to `100%`
25
+ gaugeCells: gaugeRaw ? GAUGE_WIDTH + 12 : 0,
26
+ stateLabel,
27
+ hint,
28
+ });
29
+ const gauge = showGauge ? gaugeRaw : null;
21
30
  // A single Text with `truncate-end` keeps the footer to exactly one line
22
31
  // on narrow terminals (it shrinks with an ellipsis instead of wrapping),
23
32
  // while nested Text spans preserve per-segment color.
24
- return (_jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { color: theme.text.muted, children: segments.join(' · ') }), gauge ? (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.text.muted, children: " \u00B7 ctx " }), _jsxs(Text, { color: gauge.color, children: [gauge.bar, " ", gauge.approximate ? '~' : '', gauge.pct, "%"] })] })) : null, _jsx(Text, { color: theme.text.muted, children: " \u2502 " }), _jsx(Text, { color: colorForState(state), children: stateLabel }), hint ? (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.text.muted, children: " \u2502 " }), _jsx(Text, { color: theme.text.secondary, children: hint })] })) : null] }));
33
+ return (_jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { color: theme.text.muted, children: meta }), gauge ? (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.text.muted, children: " \u00B7 ctx " }), _jsxs(Text, { color: gauge.color, children: [gauge.bar, " ", gauge.approximate ? '~' : '', gauge.pct, "%"] })] })) : null, _jsx(Text, { color: theme.text.muted, children: " \u2502 " }), _jsx(Text, { color: colorForState(state), children: stateLabel }), hint ? (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.text.muted, children: " \u2502 " }), _jsx(Text, { color: theme.text.secondary, children: hint })] })) : null] }));
25
34
  }
26
35
  function stateGlyph(state) {
27
36
  switch (state) {
@@ -94,4 +103,123 @@ function shortenCwd(cwd) {
94
103
  }
95
104
  return cwd;
96
105
  }
106
+ /**
107
+ * A path shortened from the LEFT, keeping the leaf.
108
+ *
109
+ * The end of a path is the informative end: `core` says which package you are
110
+ * in, `/home` says nothing you did not know. Cutting resumes at a separator
111
+ * when one is near the cut, so the result still reads as a path rather than as
112
+ * a word broken in half.
113
+ */
114
+ export function shortenPathToFit(path, max) {
115
+ if (max <= 0)
116
+ return '';
117
+ if (path.length <= max)
118
+ return path;
119
+ if (max === 1)
120
+ return '…';
121
+ const tail = path.slice(-(max - 1));
122
+ const slash = tail.indexOf('/');
123
+ // Only snap to a separator if one is close, or a long leading segment would
124
+ // cost more than it explains.
125
+ const snapped = slash >= 0 && slash <= 12 ? tail.slice(slash) : tail;
126
+ return `…${snapped}`;
127
+ }
128
+ /**
129
+ * What fits on the status line, and in what order things yield.
130
+ *
131
+ * The line is one row that truncates from the end, and the hint sits at the
132
+ * end — so anything ahead of it that grows pushes it off the screen. The hint
133
+ * is the only place any key is advertised: the trust gate's `Esc`, the
134
+ * permission prompt's `y`/`n`/`a`, the picker's exits all exist on screen here
135
+ * and nowhere else. Losing it strands the operator on a screen whose exits have
136
+ * become undiscoverable, so it is the one thing never dropped.
137
+ *
138
+ * Everything else is recoverable elsewhere and yields in this order:
139
+ *
140
+ * 1. **usage** — `/cost` prints it exactly, and this is the abbreviation.
141
+ * 2. **the context gauge** — same figure, same command.
142
+ * 3. **provider** — the longest segment and the least distinctive, since the
143
+ * model name already implies it. A credential-qualified provider label runs
144
+ * to about thirty columns and repeats a vendor the model string has already
145
+ * named.
146
+ * 4. **the working directory, shortened** — a shortened path still orients,
147
+ * so it is cut before anything else is given up.
148
+ * 5. **model**, and only then the path entirely. Both are on the banner and in
149
+ * `/model`, but between them these are the two facts worth keeping longest:
150
+ * where you are, and what is answering you.
151
+ *
152
+ * The order was corrected by the tests: dropping the path first discarded a
153
+ * two-character cwd to save five columns while a thirty-column provider label
154
+ * survived, which is the wrong trade in every case it can happen.
155
+ *
156
+ * Measured rather than assumed, and the measurement changed the design: a
157
+ * SHORT path still lost the hint at 100 columns, because a realistic provider
158
+ * and model fill the line between them. Shortening the path alone would have
159
+ * fixed the case that was easiest to picture and left the common one broken.
160
+ */
161
+ export function fitStatusLine(input) {
162
+ const { columns, cwd, provider, model, usage, gaugeCells, stateLabel, hint } = input;
163
+ // Reserved, in order of what cannot move: the hint and its divider, then the
164
+ // state and its divider.
165
+ const reserved = (hint ? 3 + hint.length : 0) + 3 + stateLabel.length;
166
+ let budget = Math.max(0, columns - reserved);
167
+ let showGauge = gaugeCells > 0;
168
+ let withUsage = usage !== null;
169
+ let withCwd = true;
170
+ let withModel = model !== null;
171
+ let withProvider = provider !== null;
172
+ const build = (cwdText) => {
173
+ const parts = [];
174
+ if (withCwd && cwdText.length > 0)
175
+ parts.push(cwdText);
176
+ if (withProvider && provider)
177
+ parts.push(provider);
178
+ if (withModel && model)
179
+ parts.push(model);
180
+ if (withUsage && usage)
181
+ parts.push(usage);
182
+ return parts.join(' · ');
183
+ };
184
+ const width = (cwdText) => build(cwdText).length + (showGauge ? gaugeCells : 0);
185
+ // Everything fits as-is.
186
+ if (width(cwd) <= budget)
187
+ return { meta: build(cwd), showGauge };
188
+ // Drop the two figures `/cost` reprints exactly.
189
+ if (withUsage) {
190
+ withUsage = false;
191
+ if (width(cwd) <= budget)
192
+ return { meta: build(cwd), showGauge };
193
+ }
194
+ if (showGauge) {
195
+ showGauge = false;
196
+ if (width(cwd) <= budget)
197
+ return { meta: build(cwd), showGauge };
198
+ }
199
+ // Then the provider label, which the model name already implies.
200
+ if (withProvider) {
201
+ withProvider = false;
202
+ if (width(cwd) <= budget)
203
+ return { meta: build(cwd), showGauge };
204
+ }
205
+ // Then shorten the path into whatever room is left, before giving it up.
206
+ const withoutCwd = build('').length;
207
+ const roomForCwd = budget - withoutCwd - (withoutCwd > 0 ? 3 : 0);
208
+ if (roomForCwd >= 8) {
209
+ const short = shortenPathToFit(cwd, roomForCwd);
210
+ if (width(short) <= budget)
211
+ return { meta: build(short), showGauge };
212
+ }
213
+ // Then the model, and only then the path entirely.
214
+ withModel = false;
215
+ if (width(cwd) <= budget)
216
+ return { meta: build(cwd), showGauge };
217
+ if (roomForCwd >= 8) {
218
+ const short = shortenPathToFit(cwd, Math.max(0, budget));
219
+ if (width(short) <= budget)
220
+ return { meta: build(short), showGauge };
221
+ }
222
+ withCwd = false;
223
+ return { meta: build(''), showGauge };
224
+ }
97
225
  //# sourceMappingURL=StatusBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBar.js","sourceRoot":"","sources":["../../src/tui/StatusBar.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,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ACzE,MAAM,UAAU,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,MAAM,CAAA;IACnC,MAAM,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACjE,IAAI,UAAU,IAAI,CAAC,EAAE,CAAC;QACrB,MAAM,KAAK,GAAG,gBAAgB,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,MAAM;YAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,CAAA;IACrE,CAAC;IAED,mDAAmD;IACnD,SAAS,GAAG,KAAK,CAAA;IACjB,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,MAAM;QAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,CAAA;IAChE,IAAI,UAAU,IAAI,CAAC,EAAE,CAAC;QACrB,MAAM,KAAK,GAAG,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA;QACxD,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,MAAM;YAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,CAAA;IACrE,CAAC;IAED,OAAO,GAAG,KAAK,CAAA;IACf,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAA;AACtC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@namzu/cli",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "description": "Operator CLI for the Namzu agent platform — namzu doctor + future commands. Dual-purpose: standalone bin (`namzu doctor`) and library (`import { runDoctor } from '@namzu/cli'`).",
5
5
  "keywords": [
6
6
  "namzu",
@@ -46,8 +46,8 @@
46
46
  "yaml": "^2.9.0",
47
47
  "@namzu/anthropic": "3.1.1",
48
48
  "@namzu/ollama": "2.0.1",
49
- "@namzu/openrouter": "2.0.1",
50
49
  "@namzu/openai": "1.1.1",
50
+ "@namzu/openrouter": "2.0.1",
51
51
  "@namzu/sdk": "^18.0.0"
52
52
  },
53
53
  "devDependencies": {