@galaxy-stack/blackhole-cli 2.3.0 → 3.0.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.
Files changed (164) hide show
  1. package/README.md +78 -47
  2. package/dist/application.d.ts.map +1 -1
  3. package/dist/application.js +23 -2
  4. package/dist/application.js.map +1 -1
  5. package/dist/authorization.d.ts +22 -0
  6. package/dist/authorization.d.ts.map +1 -0
  7. package/dist/authorization.js +42 -0
  8. package/dist/authorization.js.map +1 -0
  9. package/dist/cli-meta.d.ts +8 -0
  10. package/dist/cli-meta.d.ts.map +1 -1
  11. package/dist/cli-meta.js +11 -0
  12. package/dist/cli-meta.js.map +1 -1
  13. package/dist/cli.js +51 -27
  14. package/dist/cli.js.map +1 -1
  15. package/dist/config-command.d.ts +11 -14
  16. package/dist/config-command.d.ts.map +1 -1
  17. package/dist/config-command.js +41 -118
  18. package/dist/config-command.js.map +1 -1
  19. package/dist/doctor.d.ts +8 -2
  20. package/dist/doctor.d.ts.map +1 -1
  21. package/dist/doctor.js +11 -15
  22. package/dist/doctor.js.map +1 -1
  23. package/dist/file-index.d.ts +50 -0
  24. package/dist/file-index.d.ts.map +1 -1
  25. package/dist/file-index.js +124 -0
  26. package/dist/file-index.js.map +1 -1
  27. package/dist/harness/boot.d.ts +87 -0
  28. package/dist/harness/boot.d.ts.map +1 -0
  29. package/dist/harness/boot.js +111 -0
  30. package/dist/harness/boot.js.map +1 -0
  31. package/dist/harness/catalogs.d.ts +50 -0
  32. package/dist/harness/catalogs.d.ts.map +1 -0
  33. package/dist/harness/catalogs.js +34 -0
  34. package/dist/harness/catalogs.js.map +1 -0
  35. package/dist/harness/chat.d.ts +90 -0
  36. package/dist/harness/chat.d.ts.map +1 -0
  37. package/dist/harness/chat.js +260 -0
  38. package/dist/harness/chat.js.map +1 -0
  39. package/dist/harness/client.d.ts +72 -0
  40. package/dist/harness/client.d.ts.map +1 -0
  41. package/dist/harness/client.js +173 -0
  42. package/dist/harness/client.js.map +1 -0
  43. package/dist/harness/command.d.ts +22 -0
  44. package/dist/harness/command.d.ts.map +1 -0
  45. package/dist/harness/command.js +142 -0
  46. package/dist/harness/command.js.map +1 -0
  47. package/dist/harness/composer.d.ts +46 -0
  48. package/dist/harness/composer.d.ts.map +1 -0
  49. package/dist/harness/composer.js +127 -0
  50. package/dist/harness/composer.js.map +1 -0
  51. package/dist/harness/conversation.d.ts +75 -0
  52. package/dist/harness/conversation.d.ts.map +1 -0
  53. package/dist/harness/conversation.js +196 -0
  54. package/dist/harness/conversation.js.map +1 -0
  55. package/dist/harness/help.d.ts +56 -0
  56. package/dist/harness/help.d.ts.map +1 -0
  57. package/dist/harness/help.js +85 -0
  58. package/dist/harness/help.js.map +1 -0
  59. package/dist/harness/history.d.ts +108 -0
  60. package/dist/harness/history.d.ts.map +1 -0
  61. package/dist/harness/history.js +268 -0
  62. package/dist/harness/history.js.map +1 -0
  63. package/dist/harness/labels.d.ts +164 -0
  64. package/dist/harness/labels.d.ts.map +1 -0
  65. package/dist/harness/labels.js +271 -0
  66. package/dist/harness/labels.js.map +1 -0
  67. package/dist/harness/locate.d.ts +24 -0
  68. package/dist/harness/locate.d.ts.map +1 -0
  69. package/dist/harness/locate.js +69 -0
  70. package/dist/harness/locate.js.map +1 -0
  71. package/dist/harness/menus.d.ts +74 -0
  72. package/dist/harness/menus.d.ts.map +1 -0
  73. package/dist/harness/menus.js +140 -0
  74. package/dist/harness/menus.js.map +1 -0
  75. package/dist/harness/model-name.d.ts +73 -0
  76. package/dist/harness/model-name.d.ts.map +1 -0
  77. package/dist/harness/model-name.js +101 -0
  78. package/dist/harness/model-name.js.map +1 -0
  79. package/dist/harness/parts.d.ts +239 -0
  80. package/dist/harness/parts.d.ts.map +1 -0
  81. package/dist/harness/parts.js +266 -0
  82. package/dist/harness/parts.js.map +1 -0
  83. package/dist/harness/preset.d.ts +124 -0
  84. package/dist/harness/preset.d.ts.map +1 -0
  85. package/dist/harness/preset.js +197 -0
  86. package/dist/harness/preset.js.map +1 -0
  87. package/dist/harness/process.d.ts +55 -0
  88. package/dist/harness/process.d.ts.map +1 -0
  89. package/dist/harness/process.js +119 -0
  90. package/dist/harness/process.js.map +1 -0
  91. package/dist/harness/screen.d.ts +33 -0
  92. package/dist/harness/screen.d.ts.map +1 -0
  93. package/dist/harness/screen.js +1070 -0
  94. package/dist/harness/screen.js.map +1 -0
  95. package/dist/harness/sessions.d.ts +55 -0
  96. package/dist/harness/sessions.d.ts.map +1 -0
  97. package/dist/harness/sessions.js +92 -0
  98. package/dist/harness/sessions.js.map +1 -0
  99. package/dist/harness/skills.d.ts +90 -0
  100. package/dist/harness/skills.d.ts.map +1 -0
  101. package/dist/harness/skills.js +133 -0
  102. package/dist/harness/skills.js.map +1 -0
  103. package/dist/harness/slash-palette.d.ts +32 -0
  104. package/dist/harness/slash-palette.d.ts.map +1 -0
  105. package/dist/harness/slash-palette.js +48 -0
  106. package/dist/harness/slash-palette.js.map +1 -0
  107. package/dist/harness/slash.d.ts +113 -0
  108. package/dist/harness/slash.d.ts.map +1 -0
  109. package/dist/harness/slash.js +187 -0
  110. package/dist/harness/slash.js.map +1 -0
  111. package/dist/harness/trajectory.d.ts +74 -0
  112. package/dist/harness/trajectory.d.ts.map +1 -0
  113. package/dist/harness/trajectory.js +270 -0
  114. package/dist/harness/trajectory.js.map +1 -0
  115. package/dist/harness/tui.d.ts +28 -0
  116. package/dist/harness/tui.d.ts.map +1 -0
  117. package/dist/harness/tui.js +143 -0
  118. package/dist/harness/tui.js.map +1 -0
  119. package/dist/manual-config.d.ts +23 -10
  120. package/dist/manual-config.d.ts.map +1 -1
  121. package/dist/manual-config.js +45 -37
  122. package/dist/manual-config.js.map +1 -1
  123. package/dist/migrate.d.ts +32 -0
  124. package/dist/migrate.d.ts.map +1 -0
  125. package/dist/migrate.js +155 -0
  126. package/dist/migrate.js.map +1 -0
  127. package/dist/options.d.ts +10 -1
  128. package/dist/options.d.ts.map +1 -1
  129. package/dist/options.js +23 -4
  130. package/dist/options.js.map +1 -1
  131. package/dist/setup.d.ts +14 -10
  132. package/dist/setup.d.ts.map +1 -1
  133. package/dist/setup.js +25 -92
  134. package/dist/setup.js.map +1 -1
  135. package/dist/timeline.d.ts.map +1 -1
  136. package/dist/timeline.js +11 -0
  137. package/dist/timeline.js.map +1 -1
  138. package/dist/web/command.d.ts +5 -1
  139. package/dist/web/command.d.ts.map +1 -1
  140. package/dist/web/command.js +22 -6
  141. package/dist/web/command.js.map +1 -1
  142. package/dist/web/credentials.d.ts +7 -5
  143. package/dist/web/credentials.d.ts.map +1 -1
  144. package/dist/web/credentials.js +13 -48
  145. package/dist/web/credentials.js.map +1 -1
  146. package/dist/web/doctor.d.ts +1 -1
  147. package/dist/web/doctor.d.ts.map +1 -1
  148. package/dist/web/doctor.js +42 -64
  149. package/dist/web/doctor.js.map +1 -1
  150. package/dist/web/options.d.ts +26 -2
  151. package/dist/web/options.d.ts.map +1 -1
  152. package/dist/web/options.js +54 -18
  153. package/dist/web/options.js.map +1 -1
  154. package/dist/web/paths.d.ts +1 -1
  155. package/dist/web/paths.d.ts.map +1 -1
  156. package/dist/web/paths.js +2 -2
  157. package/dist/web/paths.js.map +1 -1
  158. package/dist/web/web.d.ts +38 -16
  159. package/dist/web/web.d.ts.map +1 -1
  160. package/dist/web/web.js +166 -168
  161. package/dist/web/web.js.map +1 -1
  162. package/package.json +5 -4
  163. package/web/brand/lib/client.js +4 -4
  164. package/web/patches/gbh-ui.patch.yml +6 -24
@@ -0,0 +1,266 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * The pieces of the desktop-shaped terminal, one component per region.
4
+ *
5
+ * These are presentational: the sidebar draws whatever item list the screen
6
+ * derived from `session/list`, the status bar draws whatever numbers the
7
+ * conversation reported, and the menus draw a catalog the harness answered.
8
+ * Keeping them here leaves `screen.tsx` about state and key routing.
9
+ */
10
+ import { useEffect, useState } from "react";
11
+ import { Box, Text } from "ink";
12
+ import stringWidth from "string-width";
13
+ import { formatAgo, formatDuration, formatTokens, UI } from "./labels.js";
14
+ import { TRAJECTORY_KIND_LABEL } from "./trajectory.js";
15
+ /** Cut a styled string down to a column budget without letting a wide glyph overflow. */
16
+ function fit(text, width) {
17
+ if (width <= 0)
18
+ return "";
19
+ if (stringWidth(text) <= width)
20
+ return text;
21
+ let out = "";
22
+ for (const character of text) {
23
+ if (stringWidth(out + character) + 1 > width)
24
+ break;
25
+ out += character;
26
+ }
27
+ return out + "…";
28
+ }
29
+ /** The one-line spinner the transcript footer shows while a turn streams. */
30
+ export function Activity(props) {
31
+ const [frame, setFrame] = useState(0);
32
+ useEffect(() => { const timer = setInterval(() => setFrame(value => value + 1), 120); return () => clearInterval(timer); }, []);
33
+ const glyphs = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
34
+ return _jsx(Text, { color: props.color ?? "cyan", wrap: "truncate-end", children: glyphs[frame % glyphs.length] + " " + props.label });
35
+ }
36
+ /**
37
+ * The left column: brand, "Phiên mới", the workspace groups and their sessions.
38
+ * @param props.items - rows derived by the screen, in display order.
39
+ * @param props.width - fixed column width, divider included.
40
+ * @param props.height - available rows.
41
+ * @param props.selectedKey - the row arrows are on ("new" or a session id).
42
+ * @param props.activeSessionId - the conversation currently open.
43
+ * @param props.focused - whether the sidebar owns the arrow keys.
44
+ */
45
+ export function Sidebar(props) {
46
+ const now = props.now;
47
+ const inner = Math.max(8, props.width - 3);
48
+ return _jsxs(Box, { width: props.width, height: props.height, flexShrink: 0, flexDirection: "column", borderStyle: "single", borderTop: false, borderBottom: false, borderLeft: false, borderRight: true, paddingX: 1, overflow: "hidden", children: [_jsx(Box, { height: 2, flexShrink: 0, flexDirection: "column", children: _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { color: "cyan", bold: true, children: "◉ " }), _jsx(Text, { bold: true, children: UI.brand })] }) }), props.items.map(item => {
49
+ if (item.kind === "new") {
50
+ const selected = props.selectedKey === "new";
51
+ return _jsx(Box, { width: "100%", flexShrink: 0, marginBottom: 1, borderStyle: "round", borderColor: selected ? "cyan" : "gray", paddingX: 1, overflow: "hidden", children: _jsx(Text, { color: selected ? "cyan" : "gray", bold: selected, wrap: "truncate-end", children: fit("+ " + UI.newSession, inner - 2) }) }, "new");
52
+ }
53
+ if (item.kind === "section") {
54
+ return _jsx(Box, { flexShrink: 0, marginTop: 1, overflow: "hidden", children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: fit(item.label, inner) }) }, "s:" + item.label);
55
+ }
56
+ if (item.kind === "empty") {
57
+ return _jsx(Box, { flexShrink: 0, overflow: "hidden", children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: " " + UI.noSessions }) }, "empty");
58
+ }
59
+ if (item.kind === "workspace") {
60
+ return _jsx(Box, { flexShrink: 0, marginTop: 1, overflow: "hidden", children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: fit("▣ " + item.label, inner) }) }, "w:" + item.cwd);
61
+ }
62
+ if (item.kind === "more") {
63
+ return _jsx(Box, { flexShrink: 0, overflow: "hidden", children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: " " + fit("Hiện thêm " + String(item.count) + " phiên", inner - 2) }) }, "more");
64
+ }
65
+ const row = item.row;
66
+ const selected = props.selectedKey === row.sessionId;
67
+ const active = props.activeSessionId === row.sessionId;
68
+ const glyph = active ? "●" : row.running ? "◐" : " ";
69
+ const ago = formatAgo(row.updatedAt, now);
70
+ const titleWidth = Math.max(4, inner - 2 - stringWidth(ago) - (ago.length > 0 ? 1 : 0));
71
+ return _jsxs(Box, { flexShrink: 0, overflow: "hidden", ...(selected ? { backgroundColor: "gray" } : {}), children: [_jsx(Text, { ...(active ? { color: "cyan" } : row.running ? { color: "yellow" } : {}), bold: selected, children: glyph + " " }), _jsx(Box, { flexGrow: 1, overflow: "hidden", children: _jsx(Text, { wrap: "truncate-end", bold: active, children: fit(row.title, titleWidth) }) }), ago.length > 0 && _jsx(Text, { dimColor: true, children: " " + ago })] }, row.sessionId);
72
+ }), _jsx(Box, { flexGrow: 1 }), _jsx(Box, { flexShrink: 0, overflow: "hidden", children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: props.focused ? "↑/↓ chọn · Enter mở" : UI.sidebarHint }) })] });
73
+ }
74
+ /**
75
+ * The main column's title rows: where the conversation lives, and its two views.
76
+ */
77
+ export function ConversationHeader(props) {
78
+ return _jsxs(Box, { flexDirection: "column", flexShrink: 0, paddingX: 1, overflow: "hidden", children: [_jsxs(Box, { height: 1, overflow: "hidden", children: [_jsxs(Box, { flexGrow: 1, overflow: "hidden", children: [_jsx(Text, { dimColor: true, children: "▣ " }), _jsx(Text, { dimColor: true, wrap: "truncate-end", children: props.workspace + " › " }), _jsx(Text, { bold: true, wrap: "truncate-end", children: fit(props.title, Math.max(4, props.width - 52)) })] }), _jsx(Text, { color: "cyan", wrap: "truncate-end", children: "◈ " + props.preset }), _jsx(Text, { dimColor: true, children: " " + (props.turn > 0 ? UI.turn + " " + String(props.turn) : UI.ready) })] }), _jsxs(Box, { height: 1, overflow: "hidden", children: [_jsx(Text, { color: props.tab === "chat" ? "cyan" : "gray", bold: props.tab === "chat", children: " " + UI.conversation + " " }), _jsx(Text, { color: props.tab === "trajectory" ? "cyan" : "gray", bold: props.tab === "trajectory", children: " " + UI.trajectory + " " }), _jsx(Box, { flexGrow: 1 }), _jsx(Text, { color: props.running ? "yellow" : "gray", children: props.running ? UI.running : UI.idle }), _jsx(Text, { children: " " })] })] });
79
+ }
80
+ /**
81
+ * The first screen of a conversation: the app's hero, centered in the column.
82
+ * @param props.width - usable width, so the hint never wraps into the composer.
83
+ */
84
+ export function EmptyConversation(props) {
85
+ const width = Math.max(12, props.width);
86
+ const centered = (text) => " ".repeat(Math.max(0, Math.floor((width - stringWidth(text)) / 2))) + text;
87
+ const hero = fit((props.title ?? UI.emptyHero) + " " + UI.preview, width - 2);
88
+ return _jsxs(Box, { flexGrow: 1, flexDirection: "column", justifyContent: "center", overflow: "hidden", children: [_jsx(Text, { color: "cyan", bold: true, children: centered("◉") }), _jsx(Text, { bold: true, wrap: "truncate-end", children: centered(hero) }), _jsx(Text, { dimColor: true, wrap: "truncate-end", children: centered(fit(UI.emptyBody, width - 2)) }), _jsx(Box, { height: 1 }), _jsx(Text, { dimColor: true, wrap: "truncate-end", children: centered(fit(UI.emptyHint, width - 2)) })] });
89
+ }
90
+ /** The colour of one ledger kind: tools warm, prose neutral, system muted. */
91
+ const TRAJECTORY_TONE = Object.freeze({
92
+ system: "gray",
93
+ user: "cyan",
94
+ assistant: "white",
95
+ tool: "yellow",
96
+ });
97
+ /** The trailing column of one row: tokens, duration and a tool's outcome, in that order. */
98
+ function trajectoryMeta(row) {
99
+ const parts = [];
100
+ if (row.tokens !== undefined)
101
+ parts.push(formatTokens(row.tokens) + " " + UI.tokens);
102
+ if (row.durationMs !== undefined)
103
+ parts.push(formatDuration(row.durationMs));
104
+ if (row.kind === "tool")
105
+ parts.push(row.ok === undefined ? "…" : row.ok ? "✓" : "✗");
106
+ return parts.join(" · ");
107
+ }
108
+ /**
109
+ * "Luồng chạy": the session ledger the harness logged, one row per durable event.
110
+ *
111
+ * Same table the web app draws from the same events: a row number, the kind (Hệ
112
+ * thống / Người dùng / Trợ lý / Công cụ), the content shortened to one line, and what
113
+ * the step cost in tokens or wall time. The window follows `scroll`, measured from the
114
+ * newest row, the same way the transcript scrolls.
115
+ * @param props.rows - ledger rows, oldest first.
116
+ * @param props.width - main column width.
117
+ * @param props.height - rows the pane can draw.
118
+ * @param props.scroll - rows to walk back from the newest one.
119
+ * @param props.loading - true while the snapshot is in flight.
120
+ * @param props.error - the host's failure, when the read failed.
121
+ * @param props.hasMore - true when the host holds older history than these rows.
122
+ */
123
+ export function Trajectory(props) {
124
+ if (props.loading && props.rows.length === 0) {
125
+ return _jsx(Box, { flexGrow: 1, paddingX: 1, children: _jsx(Activity, { label: UI.loadingTrajectory }) });
126
+ }
127
+ if (props.rows.length === 0) {
128
+ return _jsx(Box, { flexGrow: 1, paddingX: 1, overflow: "hidden", children: props.error === undefined
129
+ ? _jsx(Text, { dimColor: true, children: UI.noMessages })
130
+ : _jsx(Text, { color: "red", wrap: "truncate-end", children: UI.trajectoryFailed + ": " + props.error }) });
131
+ }
132
+ const kindWidth = 11;
133
+ const metaWidth = 20;
134
+ const textWidth = Math.max(8, props.width - 4 - 2 - kindWidth - metaWidth);
135
+ const visible = Math.max(1, props.height - 4);
136
+ const maxTop = Math.max(0, props.rows.length - visible);
137
+ const top = Math.max(0, Math.min(maxTop, maxTop - props.scroll));
138
+ const shown = props.rows.slice(top, top + visible);
139
+ const turns = props.rows.filter(row => row.kind === "system" && row.text.startsWith("Lượt ") && row.text.endsWith("bắt đầu")).length;
140
+ return _jsxs(Box, { flexDirection: "column", flexGrow: 1, paddingX: 1, overflow: "hidden", children: [_jsxs(Box, { height: 1, overflow: "hidden", children: [_jsx(Text, { bold: true, color: "cyan", children: UI.trajectory }), _jsx(Text, { dimColor: true, children: " " + String(props.rows.length) + " sự kiện" + (turns === 0 ? "" : " · " + String(turns) + " lượt") + (props.hasMore ? " · còn lịch sử cũ hơn" : "") }), _jsx(Box, { flexGrow: 1 }), _jsx(Text, { dimColor: true, children: String(top + 1) + "–" + String(top + shown.length) + "/" + String(props.rows.length) })] }), _jsx(Box, { height: 1, marginTop: 1, overflow: "hidden", children: _jsx(Text, { dimColor: true, children: "#".padStart(3) + " " + "Loại".padEnd(kindWidth) + "Nội dung".padEnd(textWidth) + "Thời lượng" }) }), shown.map((row, index) => {
141
+ const body = fit(row.text, textWidth);
142
+ const meta = fit(trajectoryMeta(row), metaWidth);
143
+ return _jsxs(Box, { height: 1, overflow: "hidden", children: [_jsx(Text, { dimColor: true, children: String(top + index + 1).padStart(3) + " " }), _jsx(Text, { color: TRAJECTORY_TONE[row.kind], children: (TRAJECTORY_KIND_LABEL[row.kind] + " ".repeat(kindWidth)).slice(0, kindWidth) }), _jsx(Text, { wrap: "truncate-end", children: body + " ".repeat(Math.max(0, textWidth - stringWidth(body))) }), _jsx(Text, { dimColor: true, children: meta })] }, row.seq + ":" + String(top + index));
144
+ }), _jsx(Box, { flexGrow: 1 }), _jsx(Text, { dimColor: true, wrap: "truncate-end", children: "Mỗi dòng là một sự kiện của phiên: loại, nội dung rút gọn, token hoặc thời lượng · ↑/↓ · PgUp/PgDn cuộn" })] });
145
+ }
146
+ /**
147
+ * The status row under the composer: the harness link, the session's own counters —
148
+ * steps, tokens and wall time — and, at the right edge, the CLI version this terminal
149
+ * is running.
150
+ *
151
+ * The right edge used to print the host URL. A version answers the question a person
152
+ * actually asks there ("which build is this?"), so it owns the corner and the URL only
153
+ * appears when the row still has room; both stay dim so the counters keep the eye.
154
+ */
155
+ export function StatusBar(props) {
156
+ const color = props.connection.state === "disconnected" ? "red" : props.connection.state === "running" ? "yellow" : "green";
157
+ const label = props.connection.state === "disconnected" ? UI.disconnected : props.connection.state === "running" ? UI.running : UI.connected;
158
+ const facts = [
159
+ String(props.steps) + " " + UI.steps,
160
+ props.tokens === undefined ? undefined : formatTokens(props.tokens) + " " + UI.tokens,
161
+ props.durationMs === undefined ? undefined : formatDuration(props.durationMs),
162
+ ].filter((fact) => fact !== undefined);
163
+ const host = props.connection.base.replace(/^https?:\/\//u, "");
164
+ const budget = Math.max(20, Math.floor(props.width / 3));
165
+ const version = "v" + props.version + " · gbh harness";
166
+ const right = budget >= stringWidth(version) + 3 + stringWidth(host) ? version + " · " + host : version;
167
+ return _jsxs(Box, { height: 1, flexShrink: 0, paddingX: 1, overflow: "hidden", children: [_jsx(Text, { color: color, children: "● " }), _jsx(Text, { color: color, wrap: "truncate-end", children: label }), _jsx(Text, { dimColor: true, children: " · " + facts.join(" · ") }), props.model === undefined ? null : _jsx(Text, { dimColor: true, children: " · " + props.model }), _jsx(Box, { flexGrow: 1 }), _jsx(Text, { dimColor: true, wrap: "truncate-end", children: fit(right, budget) })] });
168
+ }
169
+ /**
170
+ * A menu anchored over the composer, like the app's access and model dropdowns.
171
+ * @param props.options - labels and optional second lines.
172
+ * @param props.selected - highlighted index.
173
+ * @param props.title - the menu's own heading.
174
+ * @param props.current - value already applied, marked with a check.
175
+ * @param props.width - main column width.
176
+ */
177
+ export function MenuPanel(props) {
178
+ const visible = Math.max(1, props.height - 4);
179
+ const top = Math.max(0, Math.min(props.selected, Math.max(0, props.options.length - visible)));
180
+ const highlighted = props.options[props.selected];
181
+ return _jsxs(Box, { flexDirection: "column", width: props.width, borderStyle: "round", borderColor: "cyan", paddingX: 1, height: props.height, overflow: "hidden", children: [_jsxs(Box, { height: 1, flexShrink: 0, justifyContent: "space-between", overflow: "hidden", children: [_jsx(Text, { bold: true, color: "cyan", children: props.title }), _jsx(Text, { dimColor: true, children: UI.menuHint })] }), _jsx(Box, { height: 1, flexShrink: 0, overflow: "hidden", children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: fit(highlighted?.description ?? "", Math.max(8, props.width - 4)) }) }), props.options.slice(top, top + visible).map((option, index) => {
182
+ const position = top + index;
183
+ const active = position === props.selected;
184
+ const checked = option.value === props.current;
185
+ return _jsxs(Box, { height: 1, flexShrink: 0, overflow: "hidden", children: [_jsx(Text, { ...(active ? { color: "cyan" } : {}), bold: active, children: active ? "❯ " : " " }), _jsx(Text, { ...(checked ? { color: "green" } : {}), children: checked ? "✔ " : " " }), _jsx(Text, { bold: active, wrap: "truncate-end", children: fit(option.label, Math.max(8, props.width - (option.hint === undefined ? 12 : 28))) }), option.hint === undefined ? null : _jsx(Text, { dimColor: true, children: " " + fit(option.hint, 16) })] }, option.value);
186
+ }), props.options.length === 0 && _jsx(Text, { dimColor: true, children: UI.noMatches })] });
187
+ }
188
+ /**
189
+ * A one-column picker anchored over the composer: the @ file list, the workspace list.
190
+ * Rows are windowed around the cursor so a 2000-file workspace stays one panel.
191
+ * @param props.title - the panel heading.
192
+ * @param props.rows - every candidate row, best first.
193
+ * @param props.selected - highlighted index into rows.
194
+ * @param props.width - main column width.
195
+ * @param props.height - panel height, footer included.
196
+ * @param props.empty - what to say when nothing matched.
197
+ */
198
+ export function ListPicker(props) {
199
+ const visible = Math.max(1, props.height - 3);
200
+ const top = Math.max(0, Math.min(props.selected - Math.floor(visible / 2), Math.max(0, props.rows.length - visible)));
201
+ return _jsxs(Box, { flexDirection: "column", width: props.width, borderStyle: "round", borderColor: "cyan", paddingX: 1, height: props.height, overflow: "hidden", children: [_jsxs(Box, { height: 1, flexShrink: 0, justifyContent: "space-between", overflow: "hidden", children: [_jsx(Text, { bold: true, color: "cyan", children: props.title }), _jsx(Text, { dimColor: true, children: String(props.rows.length) + " · " + UI.pickerHint })] }), props.rows.length === 0
202
+ ? _jsx(Box, { height: 1, flexShrink: 0, overflow: "hidden", children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: props.empty }) })
203
+ : props.rows.slice(top, top + visible).map((row, index) => {
204
+ const position = top + index;
205
+ const active = position === props.selected;
206
+ return _jsxs(Box, { height: 1, flexShrink: 0, overflow: "hidden", children: [_jsx(Text, { ...(active ? { color: "cyan" } : {}), bold: active, children: active ? "❯ " : " " }), _jsx(Text, { ...(active ? { color: "cyan" } : {}), wrap: "truncate-end", children: fit(row.label, Math.max(8, props.width - (row.hint === undefined ? 6 : 24))) }), row.hint === undefined ? null : _jsx(Text, { dimColor: true, children: " " + fit(row.hint, 16) })] }, row.value);
207
+ })] });
208
+ }
209
+ /**
210
+ * The `/` palette above the composer: the commands the terminal answers itself, then
211
+ * the skills the session's preset mounts. Commands come first because they cost no
212
+ * turn; a skill row is marked so the two sources never look the same. The heading
213
+ * carries the count (rows · commands · skills) so a long catalogue still adds up on
214
+ * a short terminal, where the list itself is windowed around the cursor.
215
+ * @param props.rows - ranked rows from `slashMatches`.
216
+ * @param props.selected - highlighted index into rows.
217
+ * @param props.width - main column width.
218
+ * @param props.height - panel height, heading and footer included.
219
+ */
220
+ export function SlashPanel(props) {
221
+ // Two border rows, the heading and the hint: the rest is the list itself.
222
+ const visible = Math.max(1, props.height - 4);
223
+ const top = Math.max(0, Math.min(props.selected - Math.floor(visible / 2), Math.max(0, props.rows.length - visible)));
224
+ const commands = props.rows.filter(row => row.kind === "command").length;
225
+ const skills = props.rows.length - commands;
226
+ const labelWidth = Math.min(22, Math.max(10, props.width - 40));
227
+ return _jsxs(Box, { flexDirection: "column", width: props.width, borderStyle: "round", borderColor: "cyan", paddingX: 1, height: props.height, overflow: "hidden", children: [_jsxs(Box, { height: 1, flexShrink: 0, justifyContent: "space-between", overflow: "hidden", children: [_jsx(Text, { bold: true, color: "cyan", children: UI.commandMenu }), _jsx(Text, { dimColor: true, children: String(props.rows.length) + " · " + String(commands) + " lệnh · " + String(skills) + " skill" })] }), props.rows.length === 0
228
+ ? _jsx(Box, { height: 1, flexShrink: 0, overflow: "hidden", children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: UI.noMatches }) })
229
+ : props.rows.slice(top, top + visible).map((row, index) => {
230
+ const position = top + index;
231
+ const active = position === props.selected;
232
+ return _jsxs(Box, { height: 1, flexShrink: 0, overflow: "hidden", children: [_jsx(Text, { ...(active ? { color: "cyan" } : {}), bold: active, children: active ? "❯ " : " " }), _jsx(Text, { ...(active ? { color: "cyan" } : {}), wrap: "truncate-end", children: fit(row.label, labelWidth) }), _jsx(Text, { dimColor: true, wrap: "truncate-end", children: " " + fit(row.description, Math.max(8, props.width - labelWidth - 8)) })] }, row.kind + ":" + row.value);
233
+ }), _jsx(Box, { flexGrow: 1 }), _jsx(Box, { height: 1, flexShrink: 0, overflow: "hidden", children: _jsx(Text, { dimColor: true, children: UI.pickerHint }) })] });
234
+ }
235
+ /** A plain panel for help and session facts, replacing the transcript while open. */
236
+ export function InfoPanel(props) {
237
+ return _jsxs(Box, { flexDirection: "column", flexGrow: 1, paddingX: 1, overflow: "hidden", children: [_jsxs(Box, { height: 1, overflow: "hidden", children: [_jsx(Text, { bold: true, color: "cyan", children: props.title }), _jsx(Text, { dimColor: true, children: " · " + UI.close + " (esc)" })] }), props.lines.map((line, index) => _jsx(Box, { height: 1, overflow: "hidden", children: _jsx(Text, { wrap: "truncate-end", children: fit(line, props.width) }) }, index))] });
238
+ }
239
+ /**
240
+ * The /help overlay as a two-column table: a titled group, a fixed key column, and
241
+ * one sentence per chord. The columns are the point — a wall of prose is what this
242
+ * replaced — so the key column is one width for every group and a thin rule marks
243
+ * each heading. A document reads from its first line, so `scroll` counts the lines
244
+ * already walked past from the top; a short terminal pages down to the last command.
245
+ * @param props.lines - the laid-out table, from `helpLines`.
246
+ * @param props.keyWidth - the fixed key column, from `HELP_KEY_WIDTH`.
247
+ * @param props.width - usable text width inside the pane.
248
+ * @param props.height - rows the pane can draw.
249
+ * @param props.scroll - lines already walked past from the first one.
250
+ */
251
+ export function HelpPanel(props) {
252
+ const visible = Math.max(1, props.height - 2);
253
+ const maxTop = Math.max(0, props.lines.length - visible);
254
+ const top = Math.max(0, Math.min(maxTop, props.scroll));
255
+ const shown = props.lines.slice(top, top + visible);
256
+ return _jsxs(Box, { flexDirection: "column", flexGrow: 1, paddingX: 1, overflow: "hidden", children: [_jsxs(Box, { height: 1, overflow: "hidden", children: [_jsx(Text, { bold: true, color: "cyan", children: UI.help }), _jsx(Text, { dimColor: true, children: " · " + UI.close + " (esc)" }), _jsx(Box, { flexGrow: 1 }), props.lines.length > visible && _jsx(Text, { dimColor: true, children: "↑/↓ · PgUp/PgDn · " + String(top + 1) + "–" + String(top + shown.length) + "/" + String(props.lines.length) })] }), shown.map((line, index) => {
257
+ if (line.kind === "blank")
258
+ return _jsx(Box, { height: 1 }, index);
259
+ if (line.kind === "title") {
260
+ const rule = Math.max(0, props.width - stringWidth(line.text) - 3);
261
+ return _jsxs(Box, { height: 1, overflow: "hidden", children: [_jsx(Text, { bold: true, color: "cyan", children: line.text }), _jsx(Text, { dimColor: true, children: " " + "─".repeat(rule) })] }, index);
262
+ }
263
+ return _jsxs(Box, { height: 1, overflow: "hidden", children: [_jsx(Text, { color: "cyan", children: " " + line.keys }), _jsx(Text, { wrap: "truncate-end", children: " " + fit(line.description, Math.max(8, props.width - props.keyWidth - 4)) })] }, index);
264
+ })] });
265
+ }
266
+ //# sourceMappingURL=parts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parts.js","sourceRoot":"","sources":["../../src/harness/parts.tsx"],"names":[],"mappings":";AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAqB,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAG1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAwCxD,yFAAyF;AACzF,SAAS,GAAG,CAAC,IAAY,EAAE,KAAa;IACtC,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IAC1B,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,KAAK;QAAE,OAAO,IAAI,CAAC;IAC5C,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,KAAK,MAAM,SAAS,IAAI,IAAI,EAAE,CAAC;QAC7B,IAAI,WAAW,CAAC,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK;YAAE,MAAM;QACpD,GAAG,IAAI,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,GAAG,GAAG,GAAG,CAAC;AACnB,CAAC;AASD,6EAA6E;AAC7E,MAAM,UAAU,QAAQ,CAAC,KAA0D;IACjF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtC,SAAS,CAAC,GAAG,EAAE,GAAG,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC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AAQ,EAC5C,KAAC,IAAI,IAAC,IAAI,EAAC,cAAc,YAAE,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,GAAQ,KAF/F,KAAK,CAGhB,CAAC;YACT,CAAC,CAAC,IACE,CAAC;AACT,CAAC"}
@@ -0,0 +1,124 @@
1
+ /**
2
+ * The mode picker's book: the agent presets this harness can run.
3
+ *
4
+ * A session is born on one preset. The host takes `agentPreset` in
5
+ * `session.create` (and `agentPresets/select` while the session is still blank),
6
+ * records it in the session header and folds it back through the `agentPreset`
7
+ * projection — so the header line, the sidebar row and the Agent's own plugin
8
+ * tree all read one fact. The host publishes ids only (a shipped preset owns no
9
+ * `name`), so the four shipped modes carry their Vietnamese copy here, word for
10
+ * word from the desktop app's dictionary
11
+ * (`blackhole-tauri/packages/client/ui-agent-preset/src/locales-vi.ts`).
12
+ *
13
+ * The one behaviour the terminal must never lose: a preset that is only recorded
14
+ * on the host is a preset the user never chose. Every new session is created
15
+ * through {@link sessionCreateRequest}, which carries the mode the composer shows.
16
+ */
17
+ import { type HarnessClient } from "./client.js";
18
+ /** One preset as the host's `agentPresets.list` reports it. */
19
+ export interface AgentPresetRow {
20
+ /** Wire id the session header records: `standard`, `ptc`, `minimal`, `cordis`. */
21
+ readonly id: string;
22
+ /** Name, present only for a preset the user authored in the profile. */
23
+ readonly name?: string;
24
+ /** Description, present only for a preset the user authored in the profile. */
25
+ readonly description?: string;
26
+ /** Roster position the host sorts by. */
27
+ readonly order?: number;
28
+ /** True for the preset a new session lands on when nothing is named. */
29
+ readonly isDefault?: boolean;
30
+ /** Why the preset cannot mount, when the host reported a broken definition. */
31
+ readonly broken?: string;
32
+ }
33
+ /** One row the mode menu draws, and the name the header prints. */
34
+ export interface AgentPresetOption {
35
+ /** Wire value `session.create`, `agentPresets/select` and the header speak. */
36
+ readonly value: string;
37
+ /** The mode's own name, worded as the desktop app words it ("Chế độ PTC"). */
38
+ readonly label: string;
39
+ /** One sentence: what this mode gives the Agent. */
40
+ readonly description: string;
41
+ /** True for the host's default, marked in the menu. */
42
+ readonly isDefault?: boolean;
43
+ /** "đang dùng" on the row that is in force. */
44
+ readonly hint?: string;
45
+ /** Why this mode cannot run, when the host said so; the row stays visible. */
46
+ readonly broken?: string;
47
+ }
48
+ /** The heading the mode menu and the `/mode` notice share. */
49
+ export declare const MODE_MENU_TITLE = "Ch\u1EBF \u0111\u1ED9";
50
+ /**
51
+ * The four modes this harness ships, in roster order, with the app's own copy.
52
+ * Used as the roster before `agentPresets/list` answers, and for the copy of a
53
+ * row the host publishes without a name of its own.
54
+ */
55
+ export declare const BUILT_IN_PRESETS: readonly AgentPresetOption[];
56
+ /**
57
+ * The bare name of a mode, without the "Chế độ " prefix the chips and menus print.
58
+ * @param value - wire id the session records.
59
+ * @returns "Standard", "PTC", "Creator", a user-authored name, or the id itself.
60
+ */
61
+ export declare function presetName(value: string): string;
62
+ /**
63
+ * The full name of a mode, as the composer chip prints it ("Chế độ PTC").
64
+ * @param value - wire id the session records.
65
+ * @returns the label the app uses for that mode.
66
+ */
67
+ export declare function presetLabel(value: string): string;
68
+ /**
69
+ * Turn the host's roster into menu rows, filling in the shipped copy.
70
+ * @param rows - `agentPresets.list` presets; undefined or empty before the answer.
71
+ * @returns frozen rows in roster order; the shipped four when the host is silent.
72
+ */
73
+ export declare function presetOptions(rows: readonly AgentPresetRow[] | undefined): readonly AgentPresetOption[];
74
+ /**
75
+ * Mark the row in force, so the menu shows what the session already runs.
76
+ * @param options - rows from {@link presetOptions}.
77
+ * @param current - preset the session records, when it records one.
78
+ * @returns the same rows, with "đang dùng" on the one in force.
79
+ */
80
+ export declare function presetMenuRows(options: readonly AgentPresetOption[], current: string | undefined): readonly AgentPresetOption[];
81
+ /** The `session.create` body: a workspace, and the mode the composer shows. */
82
+ export interface SessionCreateArgs {
83
+ readonly request: {
84
+ readonly cwd: string;
85
+ /** Mode the new session runs; omitted only when the caller has none. */
86
+ readonly agentPreset?: string;
87
+ };
88
+ }
89
+ /**
90
+ * The body every new session is created with.
91
+ * @param cwd - workspace the session owns.
92
+ * @param preset - mode the composer shows; omitted means "the host's default".
93
+ * @returns the `request` object `session.create` expects, preset included.
94
+ */
95
+ export declare function sessionCreateRequest(cwd: string, preset?: string): SessionCreateArgs;
96
+ /**
97
+ * Read the roster the host publishes.
98
+ * @param client - the authenticated harness connection.
99
+ * @param signal - caller cancellation.
100
+ * @returns every preset the host knows; empty when the deployment composes none.
101
+ */
102
+ export declare function loadPresets(client: HarnessClient, signal?: AbortSignal): Promise<readonly AgentPresetRow[]>;
103
+ /**
104
+ * Point a still-blank session at another mode.
105
+ *
106
+ * The host locks the mode once the first turn starts (`agent-preset/locked`), so
107
+ * this is the in-place switch for a draft; a started conversation gets a new
108
+ * session through {@link sessionCreateRequest} instead.
109
+ * @param client - the authenticated harness connection.
110
+ * @param sessionId - the blank session to re-point.
111
+ * @param preset - mode it should run from now on.
112
+ * @param signal - caller cancellation.
113
+ * @returns the mode the host recorded.
114
+ */
115
+ export declare function selectPreset(client: HarnessClient, sessionId: string, preset: string, signal?: AbortSignal): Promise<string>;
116
+ /** The mode a session lands on when nothing names one: the profile's own default. */
117
+ export declare function defaultPresetId(rows: readonly AgentPresetRow[]): string;
118
+ /**
119
+ * The sentence a failed mode change shows.
120
+ * @param error - whatever the RPC threw.
121
+ * @returns one Vietnamese sentence the composer can print as a notice.
122
+ */
123
+ export declare function presetFailure(error: unknown): string;
124
+ //# sourceMappingURL=preset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/harness/preset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAElE,+DAA+D;AAC/D,MAAM,WAAW,cAAc;IAC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