aicodeman 1.20.0 → 1.21.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 +12 -8
- package/README.zh-CN.md +1 -15
- package/dist/cli-style.d.ts +115 -0
- package/dist/cli-style.d.ts.map +1 -0
- package/dist/cli-style.js +245 -0
- package/dist/cli-style.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +237 -186
- package/dist/cli.js.map +1 -1
- package/dist/config/instance.d.ts +9 -0
- package/dist/config/instance.d.ts.map +1 -1
- package/dist/config/instance.js +14 -0
- package/dist/config/instance.js.map +1 -1
- package/dist/config/terminal-history.d.ts +2 -1
- package/dist/config/terminal-history.d.ts.map +1 -1
- package/dist/config/terminal-history.js +2 -1
- package/dist/config/terminal-history.js.map +1 -1
- package/dist/mux-interface.d.ts +3 -3
- package/dist/mux-interface.d.ts.map +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +1 -1
- package/dist/session.js.map +1 -1
- package/dist/tmux-manager.d.ts +6 -3
- package/dist/tmux-manager.d.ts.map +1 -1
- package/dist/tmux-manager.js +49 -32
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tui/tui-ansi.d.ts +71 -0
- package/dist/tui/tui-ansi.d.ts.map +1 -0
- package/dist/tui/tui-ansi.js +576 -0
- package/dist/tui/tui-ansi.js.map +1 -0
- package/dist/tui/tui-app.d.ts +424 -0
- package/dist/tui/tui-app.d.ts.map +1 -0
- package/dist/tui/tui-app.js +2423 -0
- package/dist/tui/tui-app.js.map +1 -0
- package/dist/tui/tui-approvals.d.ts +71 -0
- package/dist/tui/tui-approvals.d.ts.map +1 -0
- package/dist/tui/tui-approvals.js +114 -0
- package/dist/tui/tui-approvals.js.map +1 -0
- package/dist/tui/tui-client.d.ts +581 -0
- package/dist/tui/tui-client.d.ts.map +1 -0
- package/dist/tui/tui-client.js +1359 -0
- package/dist/tui/tui-client.js.map +1 -0
- package/dist/tui/tui-composer.d.ts +83 -0
- package/dist/tui/tui-composer.d.ts.map +1 -0
- package/dist/tui/tui-composer.js +174 -0
- package/dist/tui/tui-composer.js.map +1 -0
- package/dist/tui/tui-digest.d.ts +27 -0
- package/dist/tui/tui-digest.d.ts.map +1 -0
- package/dist/tui/tui-digest.js +79 -0
- package/dist/tui/tui-digest.js.map +1 -0
- package/dist/tui/tui-keys.d.ts +57 -0
- package/dist/tui/tui-keys.d.ts.map +1 -0
- package/dist/tui/tui-keys.js +204 -0
- package/dist/tui/tui-keys.js.map +1 -0
- package/dist/tui/tui-layout.d.ts +70 -0
- package/dist/tui/tui-layout.d.ts.map +1 -0
- package/dist/tui/tui-layout.js +87 -0
- package/dist/tui/tui-layout.js.map +1 -0
- package/dist/tui/tui-model.d.ts +178 -0
- package/dist/tui/tui-model.d.ts.map +1 -0
- package/dist/tui/tui-model.js +502 -0
- package/dist/tui/tui-model.js.map +1 -0
- package/dist/tui/tui-render.d.ts +150 -0
- package/dist/tui/tui-render.d.ts.map +1 -0
- package/dist/tui/tui-render.js +784 -0
- package/dist/tui/tui-render.js.map +1 -0
- package/dist/tui/tui-sse.d.ts +79 -0
- package/dist/tui/tui-sse.d.ts.map +1 -0
- package/dist/tui/tui-sse.js +200 -0
- package/dist/tui/tui-sse.js.map +1 -0
- package/dist/tui/tui-types.d.ts +190 -0
- package/dist/tui/tui-types.d.ts.map +1 -0
- package/dist/tui/tui-types.js +16 -0
- package/dist/tui/tui-types.js.map +1 -0
- package/dist/utils/dependency-report.d.ts +21 -3
- package/dist/utils/dependency-report.d.ts.map +1 -1
- package/dist/utils/dependency-report.js +29 -10
- package/dist/utils/dependency-report.js.map +1 -1
- package/dist/web/public/admin-ui.js.gz +0 -0
- package/dist/web/public/api-client.c9b1cddc.js.gz +0 -0
- package/dist/web/public/{app.56c520ff.js → app.202140a2.js} +23 -23
- package/dist/web/public/app.202140a2.js.br +0 -0
- package/dist/web/public/app.202140a2.js.gz +0 -0
- package/dist/web/public/approvals-ui.js.gz +0 -0
- package/dist/web/public/constants.5abbd823.js.gz +0 -0
- package/dist/web/public/cron-ui.js.gz +0 -0
- package/dist/web/public/entrance-animations.js.gz +0 -0
- package/dist/web/public/home-sessions.js.gz +0 -0
- package/dist/web/public/i18n.196a992e.js.gz +0 -0
- package/dist/web/public/image-input.ee16ad88.js.gz +0 -0
- package/dist/web/public/index.html +4 -4
- package/dist/web/public/index.html.br +0 -0
- package/dist/web/public/index.html.gz +0 -0
- package/dist/web/public/input-cjk.87f14251.js +1 -0
- package/dist/web/public/input-cjk.87f14251.js.br +0 -0
- package/dist/web/public/input-cjk.87f14251.js.gz +0 -0
- package/dist/web/public/keyboard-accessory.0454a3e9.js.gz +0 -0
- package/dist/web/public/mobile-handlers.0f83a608.js.gz +0 -0
- package/dist/web/public/mobile-overview.js.gz +0 -0
- package/dist/web/public/mobile.49aeb17e.css.gz +0 -0
- package/dist/web/public/notification-manager.5d229063.js.gz +0 -0
- package/dist/web/public/orchestrator-panel.js.gz +0 -0
- package/dist/web/public/panels-ui.5e97a36e.js.gz +0 -0
- package/dist/web/public/ralph-panel.6de2d0f8.js.gz +0 -0
- package/dist/web/public/ralph-wizard.13a1831e.js.gz +0 -0
- package/dist/web/public/readmymind-ui.js.gz +0 -0
- package/dist/web/public/respawn-ui.ff0dae4c.js.gz +0 -0
- package/dist/web/public/sanitize-html.bc7078d6.js.gz +0 -0
- package/dist/web/public/session-lineage.js.gz +0 -0
- package/dist/web/public/session-ui.71a0ce9a.js.gz +0 -0
- package/dist/web/public/settings-ui.1a62e935.js.gz +0 -0
- package/dist/web/public/styles.68f9e118.css.gz +0 -0
- package/dist/web/public/subagent-windows.e6ca799f.js.gz +0 -0
- package/dist/web/public/sw.js.gz +0 -0
- package/dist/web/public/terminal-ui.f70d681f.js +2 -0
- package/dist/web/public/terminal-ui.f70d681f.js.br +0 -0
- package/dist/web/public/terminal-ui.f70d681f.js.gz +0 -0
- package/dist/web/public/ultracode-panel.js.gz +0 -0
- package/dist/web/public/ultracode-windows.js.gz +0 -0
- package/dist/web/public/upload.html.gz +0 -0
- package/dist/web/public/vendor/dompurify.min.js.gz +0 -0
- package/dist/web/public/vendor/marked.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-fit.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-serialize.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-unicode11.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-webgl.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-predictive-echo.bd6882b8.js.gz +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.6fee72f2.js.gz +0 -0
- package/dist/web/public/vendor/xterm.css.gz +0 -0
- package/dist/web/public/vendor/xterm.min.js.gz +0 -0
- package/dist/web/public/voice-input.4ec670b0.js.gz +0 -0
- package/dist/web/public/voice-pcm-worklet.js.gz +0 -0
- package/dist/web/public/webview-tabs.js.gz +0 -0
- package/dist/web/routes/session-routes.d.ts.map +1 -1
- package/dist/web/routes/session-routes.js +14 -8
- package/dist/web/routes/session-routes.js.map +1 -1
- package/dist/web/routes/system-routes.d.ts.map +1 -1
- package/dist/web/routes/system-routes.js +2 -1
- package/dist/web/routes/system-routes.js.map +1 -1
- package/dist/web/schemas.d.ts +1 -1
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +16 -11
- package/dist/web/server.js.map +1 -1
- package/package.json +1 -1
- package/dist/web/public/app.56c520ff.js.br +0 -0
- package/dist/web/public/app.56c520ff.js.gz +0 -0
- package/dist/web/public/input-cjk.63794d0b.js +0 -1
- package/dist/web/public/input-cjk.63794d0b.js.br +0 -0
- package/dist/web/public/input-cjk.63794d0b.js.gz +0 -0
- package/dist/web/public/terminal-ui.5f4158b7.js +0 -2
- package/dist/web/public/terminal-ui.5f4158b7.js.br +0 -0
- package/dist/web/public/terminal-ui.5f4158b7.js.gz +0 -0
package/README.md
CHANGED
|
@@ -285,7 +285,7 @@ Hit start — Codeman spawns the CLI via a real PTY and streams it to your brows
|
|
|
285
285
|
|
|
286
286
|
- **Phone/tablet** — the UI is fully touch-optimized; scan the desktop **QR code** to log in without typing a password.
|
|
287
287
|
- **Outside your network** — `./scripts/tunnel.sh start` opens a Cloudflare tunnel (set `CODEMAN_PASSWORD` first).
|
|
288
|
-
- **SSH** —
|
|
288
|
+
- **SSH** — `codeman tui` is a full-screen dashboard in the terminal (`codeman tui --list` to list, `codeman tui 2` to attach straight to one).
|
|
289
289
|
|
|
290
290
|
### 7. Operate & maintain
|
|
291
291
|
|
|
@@ -658,17 +658,19 @@ These run for **every** request — before auth, even on the default no-password
|
|
|
658
658
|
|
|
659
659
|
---
|
|
660
660
|
|
|
661
|
-
##
|
|
661
|
+
## Terminal UI (`codeman tui`)
|
|
662
662
|
|
|
663
|
-
|
|
663
|
+
A full-screen dashboard for your sessions, in the terminal. Same states as the web UI, because it is a client of the same server:
|
|
664
664
|
|
|
665
665
|
```bash
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
666
|
+
codeman tui # the dashboard
|
|
667
|
+
codeman tui --list # numbered session list, then exit (scriptable)
|
|
668
|
+
codeman tui 2 # attach straight to session 2 of that list
|
|
669
669
|
```
|
|
670
670
|
|
|
671
|
-
|
|
671
|
+
Sessions are grouped **NEEDS YOU → WORKING → IDLE → RECENT**, longest-waiting first. `↑↓`/`j`/`k` select, `1`-`9` and `[`/`]` switch between sessions, `Enter` attaches into the tmux pane (**`F1`** to come back). Inside a pane the bar across the top keeps the session strip visible and `Alt+1`-`Alt+9` switch without leaving. `y`/`n`/digit answer a pending permission dialog right from the list, `p` sends a one-line prompt, `n` starts a session and opens straight into it, `x` kills one (`y` confirms), `/` searches, `g` shows the away digest, `?` is help, `q` quits. Below 72 columns it drops the preview pane and becomes a single-column list, so it stays usable in Termius on a phone. With no server running it still starts in attach-only degraded mode.
|
|
672
|
+
|
|
673
|
+
The web UI remains the primary surface; see **[docs/tui.md](docs/tui.md)** for the full guide.
|
|
672
674
|
|
|
673
675
|
---
|
|
674
676
|
|
|
@@ -893,7 +895,9 @@ codeman session start -d /path/to/repo # (s) start a session
|
|
|
893
895
|
codeman session list # list sessions
|
|
894
896
|
codeman session logs <id> # tail output
|
|
895
897
|
codeman task add "fix the failing test" # (t) queue a task
|
|
896
|
-
codeman attach <path>
|
|
898
|
+
codeman attach <path> # show an attachment card for a local file
|
|
899
|
+
codeman tui --list # numbered session list (plain text when piped)
|
|
900
|
+
codeman tui 3 # attach to session 3 of that list
|
|
897
901
|
```
|
|
898
902
|
|
|
899
903
|
### Hooks (events flowing _back_ to Codeman)
|
package/README.zh-CN.md
CHANGED
|
@@ -253,7 +253,7 @@ codeman web -H 0.0.0.0 # 绑定局域网 —— 必须设置 CODEMAN_
|
|
|
253
253
|
|
|
254
254
|
- **手机/平板** —— UI 完全触控优化;扫描桌面上的**二维码**即可免密码登录。
|
|
255
255
|
- **网络之外** —— `./scripts/tunnel.sh start` 打开一条 Cloudflare 隧道(先设置 `CODEMAN_PASSWORD`)。
|
|
256
|
-
- **SSH** —— `
|
|
256
|
+
- **SSH** —— `codeman tui` 是终端里的全屏会话面板(`codeman tui --list` 列出,`codeman tui 2` 直接附着到某个会话)。
|
|
257
257
|
|
|
258
258
|
### 7. 运维与维护
|
|
259
259
|
|
|
@@ -615,20 +615,6 @@ Codeman 默认用 `--dangerously-skip-permissions` 启动会话,因此 Web UI
|
|
|
615
615
|
|
|
616
616
|
---
|
|
617
617
|
|
|
618
|
-
## SSH 替代方案(`sc`)
|
|
619
|
-
|
|
620
|
-
如果你更喜欢 SSH(Termius、Blink 等),`sc` 命令是一个便于拇指操作的会话选择器:
|
|
621
|
-
|
|
622
|
-
```bash
|
|
623
|
-
sc # 交互式选择器
|
|
624
|
-
sc 2 # 快速附着到会话 2
|
|
625
|
-
sc -l # 列出会话
|
|
626
|
-
```
|
|
627
|
-
|
|
628
|
-
单数字选择(1–9)、颜色编码的状态、token 计数、自动刷新。用 `Ctrl+A D` 分离。
|
|
629
|
-
|
|
630
|
-
---
|
|
631
|
-
|
|
632
618
|
## 键盘快捷键
|
|
633
619
|
|
|
634
620
|
> Ctrl 绑定在 macOS 上也接受 Cmd。
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview One style vocabulary for everything the `codeman` CLI prints:
|
|
3
|
+
* palette, glyphs, the small block helpers (heading/rule/kv), width-aware table
|
|
4
|
+
* layout, a stderr spinner and a y/N confirm.
|
|
5
|
+
*
|
|
6
|
+
* Color detection is chalk's alone. It already honors NO_COLOR, FORCE_COLOR,
|
|
7
|
+
* TERM=dumb and TTY-ness, and a second detector here would disagree with it on
|
|
8
|
+
* some terminal with no way to tell which one was right.
|
|
9
|
+
*
|
|
10
|
+
* The layout math is pure and exported separately from anything that touches a
|
|
11
|
+
* terminal, which is what lets it be unit-tested with no TTY and reused by
|
|
12
|
+
* `utils/dependency-report.ts` while that file stays color-free.
|
|
13
|
+
*
|
|
14
|
+
* @module cli-style
|
|
15
|
+
*/
|
|
16
|
+
import { type ChalkInstance } from 'chalk';
|
|
17
|
+
/** Semantic roles, mirroring the web UI's status language (green fine, yellow waiting, red blocked). */
|
|
18
|
+
export declare const palette: {
|
|
19
|
+
readonly ok: ChalkInstance;
|
|
20
|
+
readonly warn: ChalkInstance;
|
|
21
|
+
readonly err: ChalkInstance;
|
|
22
|
+
readonly info: ChalkInstance;
|
|
23
|
+
readonly muted: ChalkInstance;
|
|
24
|
+
readonly emph: ChalkInstance;
|
|
25
|
+
readonly accent: ChalkInstance;
|
|
26
|
+
};
|
|
27
|
+
/** The glyph vocabulary the CLI already used, in one place. */
|
|
28
|
+
export declare const GLYPH: {
|
|
29
|
+
readonly ok: "✓";
|
|
30
|
+
readonly fail: "✗";
|
|
31
|
+
readonly warn: "⚠";
|
|
32
|
+
readonly idle: "○";
|
|
33
|
+
readonly dot: "●";
|
|
34
|
+
readonly arrow: "→";
|
|
35
|
+
};
|
|
36
|
+
/** Spinner frames (braille, one cell wide in every terminal we support). */
|
|
37
|
+
export declare const SPINNER_FRAMES: readonly ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
|
|
38
|
+
/** What a line is reporting, independent of how it is painted. */
|
|
39
|
+
export type Tone = 'ok' | 'warn' | 'err' | 'idle' | 'info';
|
|
40
|
+
/** Glyph for a tone. Pure, so the mapping is testable without a terminal. */
|
|
41
|
+
export declare function glyphFor(tone: Tone): string;
|
|
42
|
+
/** Paint text in a tone's color. */
|
|
43
|
+
export declare function tint(tone: Tone, text: string): string;
|
|
44
|
+
/** Section heading. The blank line above it is part of the existing block idiom. */
|
|
45
|
+
export declare function heading(text: string): string;
|
|
46
|
+
/** Horizontal rule under a title. */
|
|
47
|
+
export declare function rule(width?: number): string;
|
|
48
|
+
/**
|
|
49
|
+
* Indented `Label: value` line. `pad` aligns the values of a block by padding
|
|
50
|
+
* the label column (including its colon), for blocks whose labels differ in
|
|
51
|
+
* length.
|
|
52
|
+
*/
|
|
53
|
+
export declare function kv(label: string, value: string, pad?: number): string;
|
|
54
|
+
/** Printed width of a cell: ANSI sequences take no columns. */
|
|
55
|
+
export declare function displayWidth(text: string): number;
|
|
56
|
+
export type CellAlign = 'left' | 'right';
|
|
57
|
+
/** Pad to `width` columns, measuring by display width so colored cells still align. */
|
|
58
|
+
export declare function padCell(text: string, width: number, align?: CellAlign): string;
|
|
59
|
+
/**
|
|
60
|
+
* Pad AFTER the paint, so the fill stays outside the color run and a trailing
|
|
61
|
+
* empty column can be trimmed away instead of ending in a reset sequence with
|
|
62
|
+
* invisible spaces before it.
|
|
63
|
+
*/
|
|
64
|
+
export declare function padStyled(text: string, width: number, paint: (t: string) => string): string;
|
|
65
|
+
/** Widest cell per column. Short rows count as empty cells, never as narrower columns. */
|
|
66
|
+
export declare function columnWidths(rows: readonly (readonly string[])[]): number[];
|
|
67
|
+
export interface TableOptions {
|
|
68
|
+
/** Per-column alignment; missing entries are left-aligned. */
|
|
69
|
+
align?: readonly CellAlign[];
|
|
70
|
+
/** Spaces between columns. */
|
|
71
|
+
gap?: number;
|
|
72
|
+
/** Prefix for every row. */
|
|
73
|
+
indent?: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Lay rows out in columns sized to their widest cell. The last cell of a row is
|
|
77
|
+
* never padded, so no line carries trailing whitespace.
|
|
78
|
+
*/
|
|
79
|
+
export declare function layoutTable(rows: readonly (readonly string[])[], options?: TableOptions): string[];
|
|
80
|
+
/** `layoutTable()` as one printable block. */
|
|
81
|
+
export declare function table(rows: readonly (readonly string[])[], options?: TableOptions): string;
|
|
82
|
+
/** The slice of a stream a spinner needs; `process.stderr` satisfies it. */
|
|
83
|
+
export interface SpinnerStream {
|
|
84
|
+
isTTY?: boolean;
|
|
85
|
+
write(chunk: string): unknown;
|
|
86
|
+
}
|
|
87
|
+
export interface Spinner {
|
|
88
|
+
start(): Spinner;
|
|
89
|
+
/** Change the text mid-flight. Silent on a non-TTY, which prints once and stops. */
|
|
90
|
+
setText(text: string): void;
|
|
91
|
+
/** Clear the line, restore the cursor and optionally print a final line. */
|
|
92
|
+
stop(finalLine?: string): void;
|
|
93
|
+
}
|
|
94
|
+
export interface SpinnerOptions {
|
|
95
|
+
stream?: SpinnerStream;
|
|
96
|
+
intervalMs?: number;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* In-place progress line on stderr, for the calls that block for tens of seconds
|
|
100
|
+
* (daemon start, service install). Only a TTY gets the animation: piped output
|
|
101
|
+
* and journald get the text once, so a log file never fills with `\r` frames.
|
|
102
|
+
*/
|
|
103
|
+
export declare function spinner(text: string, options?: SpinnerOptions): Spinner;
|
|
104
|
+
/** Run `work` with a spinner up, stopping it however `work` ends. */
|
|
105
|
+
export declare function withSpinner<T>(text: string, work: () => Promise<T>, options?: SpinnerOptions): Promise<T>;
|
|
106
|
+
/** Is there a human on the other end of both halves of the terminal? */
|
|
107
|
+
export declare function isInteractive(): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* y/N prompt. Answers `false` immediately when stdin is not a TTY (a script
|
|
110
|
+
* piping into the CLI must never hang on an invisible question), so callers
|
|
111
|
+
* that support a `--force` flag can branch on `isInteractive()` to keep printing
|
|
112
|
+
* their "pass --force" hint instead.
|
|
113
|
+
*/
|
|
114
|
+
export declare function confirm(question: string): Promise<boolean>;
|
|
115
|
+
//# sourceMappingURL=cli-style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-style.d.ts","sourceRoot":"","sources":["../src/cli-style.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAc,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAUlD,wGAAwG;AACxG,eAAO,MAAM,OAAO;;;;;;;;CAQ8B,CAAC;AAEnD,+DAA+D;AAC/D,eAAO,MAAM,KAAK;;;;;;;CAOR,CAAC;AAEX,4EAA4E;AAC5E,eAAO,MAAM,cAAc,6DAA8D,CAAC;AAE1F,kEAAkE;AAClE,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAkB3D,6EAA6E;AAC7E,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAE3C;AAED,oCAAoC;AACpC,wBAAgB,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAErD;AAMD,oFAAoF;AACpF,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,qCAAqC;AACrC,wBAAgB,IAAI,CAAC,KAAK,SAAK,GAAG,MAAM,CAEvC;AAED;;;;GAIG;AACH,wBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,SAAI,GAAG,MAAM,CAGhE;AAMD,+DAA+D;AAC/D,wBAAgB,YAAY,CAAC,IAAI,EAA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,4EAA4E;IAC5E,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAyD3E;AAED,qEAAqE;AACrE,wBAAsB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC,CAO/G;AAMD,wEAAwE;AACxE,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED;;;;;GAKG;AACH,wBAAsB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAchE"}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview One style vocabulary for everything the `codeman` CLI prints:
|
|
3
|
+
* palette, glyphs, the small block helpers (heading/rule/kv), width-aware table
|
|
4
|
+
* layout, a stderr spinner and a y/N confirm.
|
|
5
|
+
*
|
|
6
|
+
* Color detection is chalk's alone. It already honors NO_COLOR, FORCE_COLOR,
|
|
7
|
+
* TERM=dumb and TTY-ness, and a second detector here would disagree with it on
|
|
8
|
+
* some terminal with no way to tell which one was right.
|
|
9
|
+
*
|
|
10
|
+
* The layout math is pure and exported separately from anything that touches a
|
|
11
|
+
* terminal, which is what lets it be unit-tested with no TTY and reused by
|
|
12
|
+
* `utils/dependency-report.ts` while that file stays color-free.
|
|
13
|
+
*
|
|
14
|
+
* @module cli-style
|
|
15
|
+
*/
|
|
16
|
+
import chalk from 'chalk';
|
|
17
|
+
import { createInterface } from 'node:readline';
|
|
18
|
+
// Direct import, not the `utils` barrel: the barrel pulls in node-pty and every
|
|
19
|
+
// CLI resolver, which a style module has no business loading.
|
|
20
|
+
import { stripAnsi } from './utils/regex-patterns.js';
|
|
21
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
22
|
+
// Palette and glyphs
|
|
23
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
24
|
+
/** Semantic roles, mirroring the web UI's status language (green fine, yellow waiting, red blocked). */
|
|
25
|
+
export const palette = {
|
|
26
|
+
ok: chalk.green,
|
|
27
|
+
warn: chalk.yellow,
|
|
28
|
+
err: chalk.red,
|
|
29
|
+
info: chalk.cyan,
|
|
30
|
+
muted: chalk.gray,
|
|
31
|
+
emph: chalk.bold,
|
|
32
|
+
accent: chalk.magenta,
|
|
33
|
+
};
|
|
34
|
+
/** The glyph vocabulary the CLI already used, in one place. */
|
|
35
|
+
export const GLYPH = {
|
|
36
|
+
ok: '✓',
|
|
37
|
+
fail: '✗',
|
|
38
|
+
warn: '⚠',
|
|
39
|
+
idle: '○',
|
|
40
|
+
dot: '●',
|
|
41
|
+
arrow: '→',
|
|
42
|
+
};
|
|
43
|
+
/** Spinner frames (braille, one cell wide in every terminal we support). */
|
|
44
|
+
export const SPINNER_FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
45
|
+
const TONE_GLYPH = {
|
|
46
|
+
ok: GLYPH.ok,
|
|
47
|
+
warn: GLYPH.warn,
|
|
48
|
+
err: GLYPH.fail,
|
|
49
|
+
idle: GLYPH.idle,
|
|
50
|
+
info: GLYPH.dot,
|
|
51
|
+
};
|
|
52
|
+
const TONE_STYLE = {
|
|
53
|
+
ok: palette.ok,
|
|
54
|
+
warn: palette.warn,
|
|
55
|
+
err: palette.err,
|
|
56
|
+
idle: palette.muted,
|
|
57
|
+
info: palette.info,
|
|
58
|
+
};
|
|
59
|
+
/** Glyph for a tone. Pure, so the mapping is testable without a terminal. */
|
|
60
|
+
export function glyphFor(tone) {
|
|
61
|
+
return TONE_GLYPH[tone];
|
|
62
|
+
}
|
|
63
|
+
/** Paint text in a tone's color. */
|
|
64
|
+
export function tint(tone, text) {
|
|
65
|
+
return TONE_STYLE[tone](text);
|
|
66
|
+
}
|
|
67
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
68
|
+
// Blocks
|
|
69
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
70
|
+
/** Section heading. The blank line above it is part of the existing block idiom. */
|
|
71
|
+
export function heading(text) {
|
|
72
|
+
return `\n${palette.emph(text)}`;
|
|
73
|
+
}
|
|
74
|
+
/** Horizontal rule under a title. */
|
|
75
|
+
export function rule(width = 40) {
|
|
76
|
+
return palette.muted('─'.repeat(Math.max(0, width)));
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Indented `Label: value` line. `pad` aligns the values of a block by padding
|
|
80
|
+
* the label column (including its colon), for blocks whose labels differ in
|
|
81
|
+
* length.
|
|
82
|
+
*/
|
|
83
|
+
export function kv(label, value, pad = 0) {
|
|
84
|
+
const key = pad > 0 ? padCell(`${label}:`, pad) : `${label}:`;
|
|
85
|
+
return ` ${key} ${value}`;
|
|
86
|
+
}
|
|
87
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
88
|
+
// Width-aware layout (pure)
|
|
89
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
90
|
+
/** Printed width of a cell: ANSI sequences take no columns. */
|
|
91
|
+
export function displayWidth(text) {
|
|
92
|
+
return stripAnsi(text).length;
|
|
93
|
+
}
|
|
94
|
+
/** Pad to `width` columns, measuring by display width so colored cells still align. */
|
|
95
|
+
export function padCell(text, width, align = 'left') {
|
|
96
|
+
const fill = ' '.repeat(Math.max(0, width - displayWidth(text)));
|
|
97
|
+
return align === 'right' ? `${fill}${text}` : `${text}${fill}`;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Pad AFTER the paint, so the fill stays outside the color run and a trailing
|
|
101
|
+
* empty column can be trimmed away instead of ending in a reset sequence with
|
|
102
|
+
* invisible spaces before it.
|
|
103
|
+
*/
|
|
104
|
+
export function padStyled(text, width, paint) {
|
|
105
|
+
return `${paint(text)}${' '.repeat(Math.max(0, width - displayWidth(text)))}`;
|
|
106
|
+
}
|
|
107
|
+
/** Widest cell per column. Short rows count as empty cells, never as narrower columns. */
|
|
108
|
+
export function columnWidths(rows) {
|
|
109
|
+
const widths = [];
|
|
110
|
+
for (const row of rows) {
|
|
111
|
+
for (let i = 0; i < row.length; i++) {
|
|
112
|
+
widths[i] = Math.max(widths[i] ?? 0, displayWidth(row[i] ?? ''));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return widths;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Lay rows out in columns sized to their widest cell. The last cell of a row is
|
|
119
|
+
* never padded, so no line carries trailing whitespace.
|
|
120
|
+
*/
|
|
121
|
+
export function layoutTable(rows, options = {}) {
|
|
122
|
+
const { align = [], gap = 1, indent = '' } = options;
|
|
123
|
+
const widths = columnWidths(rows);
|
|
124
|
+
const separator = ' '.repeat(Math.max(0, gap));
|
|
125
|
+
return rows.map((row) => {
|
|
126
|
+
const cells = row.map((cell, i) => (i === row.length - 1 ? cell : padCell(cell, widths[i], align[i] ?? 'left')));
|
|
127
|
+
return `${indent}${cells.join(separator)}`;
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/** `layoutTable()` as one printable block. */
|
|
131
|
+
export function table(rows, options = {}) {
|
|
132
|
+
return layoutTable(rows, options).join('\n');
|
|
133
|
+
}
|
|
134
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
135
|
+
// Spinner
|
|
136
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
137
|
+
const HIDE_CURSOR = '\x1b[?25l';
|
|
138
|
+
const SHOW_CURSOR = '\x1b[?25h';
|
|
139
|
+
const CLEAR_LINE = '\x1b[K';
|
|
140
|
+
/**
|
|
141
|
+
* In-place progress line on stderr, for the calls that block for tens of seconds
|
|
142
|
+
* (daemon start, service install). Only a TTY gets the animation: piped output
|
|
143
|
+
* and journald get the text once, so a log file never fills with `\r` frames.
|
|
144
|
+
*/
|
|
145
|
+
export function spinner(text, options = {}) {
|
|
146
|
+
const stream = options.stream ?? process.stderr;
|
|
147
|
+
const intervalMs = options.intervalMs ?? 90;
|
|
148
|
+
const animated = Boolean(stream.isTTY);
|
|
149
|
+
let label = text;
|
|
150
|
+
let frame = 0;
|
|
151
|
+
let timer = null;
|
|
152
|
+
let started = false;
|
|
153
|
+
let stopped = false;
|
|
154
|
+
const restoreCursor = () => {
|
|
155
|
+
if (animated)
|
|
156
|
+
stream.write(SHOW_CURSOR);
|
|
157
|
+
};
|
|
158
|
+
const render = () => {
|
|
159
|
+
stream.write(`\r${palette.info(SPINNER_FRAMES[frame % SPINNER_FRAMES.length])} ${label}${CLEAR_LINE}`);
|
|
160
|
+
frame++;
|
|
161
|
+
};
|
|
162
|
+
const handle = {
|
|
163
|
+
start() {
|
|
164
|
+
if (started || stopped)
|
|
165
|
+
return handle;
|
|
166
|
+
started = true;
|
|
167
|
+
if (!animated) {
|
|
168
|
+
stream.write(`${label}\n`);
|
|
169
|
+
return handle;
|
|
170
|
+
}
|
|
171
|
+
stream.write(HIDE_CURSOR);
|
|
172
|
+
// A hidden cursor left behind by a Ctrl+C outlives the process, so the
|
|
173
|
+
// exit hook is not optional.
|
|
174
|
+
process.once('exit', restoreCursor);
|
|
175
|
+
render();
|
|
176
|
+
// Unref'd: a spinner must never be the reason the process stays alive.
|
|
177
|
+
timer = setInterval(render, intervalMs);
|
|
178
|
+
timer.unref();
|
|
179
|
+
return handle;
|
|
180
|
+
},
|
|
181
|
+
setText(next) {
|
|
182
|
+
label = next;
|
|
183
|
+
if (animated && started && !stopped)
|
|
184
|
+
render();
|
|
185
|
+
},
|
|
186
|
+
stop(finalLine) {
|
|
187
|
+
if (stopped)
|
|
188
|
+
return;
|
|
189
|
+
stopped = true;
|
|
190
|
+
if (timer) {
|
|
191
|
+
clearInterval(timer);
|
|
192
|
+
timer = null;
|
|
193
|
+
}
|
|
194
|
+
if (animated && started) {
|
|
195
|
+
stream.write(`\r${CLEAR_LINE}`);
|
|
196
|
+
restoreCursor();
|
|
197
|
+
process.off('exit', restoreCursor);
|
|
198
|
+
}
|
|
199
|
+
if (finalLine && animated)
|
|
200
|
+
stream.write(`${finalLine}\n`);
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
return handle;
|
|
204
|
+
}
|
|
205
|
+
/** Run `work` with a spinner up, stopping it however `work` ends. */
|
|
206
|
+
export async function withSpinner(text, work, options) {
|
|
207
|
+
const handle = spinner(text, options).start();
|
|
208
|
+
try {
|
|
209
|
+
return await work();
|
|
210
|
+
}
|
|
211
|
+
finally {
|
|
212
|
+
handle.stop();
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
216
|
+
// Confirm
|
|
217
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
218
|
+
/** Is there a human on the other end of both halves of the terminal? */
|
|
219
|
+
export function isInteractive() {
|
|
220
|
+
return Boolean(process.stdin.isTTY && process.stdout.isTTY);
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* y/N prompt. Answers `false` immediately when stdin is not a TTY (a script
|
|
224
|
+
* piping into the CLI must never hang on an invisible question), so callers
|
|
225
|
+
* that support a `--force` flag can branch on `isInteractive()` to keep printing
|
|
226
|
+
* their "pass --force" hint instead.
|
|
227
|
+
*/
|
|
228
|
+
export async function confirm(question) {
|
|
229
|
+
if (!isInteractive())
|
|
230
|
+
return false;
|
|
231
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
232
|
+
try {
|
|
233
|
+
const answer = await new Promise((resolve) => {
|
|
234
|
+
rl.once('SIGINT', () => resolve(''));
|
|
235
|
+
rl.question(`${question} ${palette.muted('[y/N]')} `, resolve);
|
|
236
|
+
});
|
|
237
|
+
return /^y(es)?$/i.test(answer.trim());
|
|
238
|
+
}
|
|
239
|
+
finally {
|
|
240
|
+
rl.close();
|
|
241
|
+
// readline resumes stdin; a still-flowing stdin keeps the process alive.
|
|
242
|
+
process.stdin.pause();
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
//# sourceMappingURL=cli-style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-style.js","sourceRoot":"","sources":["../src/cli-style.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,gFAAgF;AAChF,8DAA8D;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,gFAAgF;AAChF,qBAAqB;AACrB,gFAAgF;AAEhF,wGAAwG;AACxG,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,EAAE,EAAE,KAAK,CAAC,KAAK;IACf,IAAI,EAAE,KAAK,CAAC,MAAM;IAClB,GAAG,EAAE,KAAK,CAAC,GAAG;IACd,IAAI,EAAE,KAAK,CAAC,IAAI;IAChB,KAAK,EAAE,KAAK,CAAC,IAAI;IACjB,IAAI,EAAE,KAAK,CAAC,IAAI;IAChB,MAAM,EAAE,KAAK,CAAC,OAAO;CAC2B,CAAC;AAEnD,+DAA+D;AAC/D,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,GAAG;IACT,GAAG,EAAE,GAAG;IACR,KAAK,EAAE,GAAG;CACF,CAAC;AAEX,4EAA4E;AAC5E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU,CAAC;AAK1F,MAAM,U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OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,QAAgB;IAC5C,IAAI,CAAC,aAAa,EAAE;QAAE,OAAO,KAAK,CAAC;IACnC,MAAM,EAAE,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7E,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,EAAE;YACnD,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;YACrC,EAAE,CAAC,QAAQ,CAAC,GAAG,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;QACH,OAAO,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IACzC,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,KAAK,EAAE,CAAC;QACX,yEAAyE;QACzE,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;AACH,CAAC"}
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyBpC,QAAA,MAAM,OAAO,SAAgB,CAAC;AAgG9B;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CASvD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG;IAAE,MAAM,CAAC,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAO5F;AAklCD,OAAO,EAAE,OAAO,EAAE,CAAC"}
|