@ictechgy/lterm 0.1.1 → 0.1.2
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.ko.md +16 -6
- package/README.md +12 -6
- package/package.json +5 -5
package/README.ko.md
CHANGED
|
@@ -44,7 +44,7 @@ Homebrew와 npm 모두 `PATH`에 `lterm` 명령을 설치합니다. `lterm --ver
|
|
|
44
44
|
GitHub에서 Cargo로 설치 (Releases 페이지의 최신 태그를 사용하세요):
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
|
-
cargo install --git https://github.com/ictechgy/light_terminal --tag v0.1.
|
|
47
|
+
cargo install --git https://github.com/ictechgy/light_terminal --tag v0.1.2
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
저장소를 클론한 뒤 직접 빌드하려면 Rust 1.85 이상이 필요합니다.
|
|
@@ -98,11 +98,12 @@ lterm -a api
|
|
|
98
98
|
| 세션 열기 또는 생성 | `lterm open main` | `attach-or-new` |
|
|
99
99
|
| 기존 세션 재개 | `lterm resume api` | `attach`, `a`, `-a` |
|
|
100
100
|
| 세션 목록 보기 | `lterm sessions` | `list`, `ls` |
|
|
101
|
-
| 프로세스 트리 확인 | `lterm processes api --json` | `ps` |
|
|
101
|
+
| 프로세스 트리 확인 | `lterm processes api --json --orphans` | `ps` |
|
|
102
102
|
| 세션 이름 변경 | `lterm rename api api-renamed` | 없음 |
|
|
103
|
-
| 정제된 scrollback 읽기 | `lterm logs api --start=-80` | `capture` |
|
|
103
|
+
| 정제된 scrollback 읽기 | `lterm logs api --start=-80 --end=-1` | `capture` |
|
|
104
104
|
| PTY에 입력 쓰기 | `lterm input api 'echo hello' --enter` | `send` |
|
|
105
105
|
| 세션 종료 | `lterm close api` | `kill` |
|
|
106
|
+
| 데몬과 shim 상태 진단 | `lterm doctor --json` | `status` |
|
|
106
107
|
| 백그라운드 데몬 명시 실행 | `lterm daemon` | 없음 |
|
|
107
108
|
| 데몬과 모든 세션 종료 | `lterm shutdown` | 없음 |
|
|
108
109
|
|
|
@@ -140,6 +141,10 @@ escape 처리가 여기에 포함됩니다. 직접 `ssh`하듯 신뢰할 수 있
|
|
|
140
141
|
|
|
141
142
|
`lterm rename <target> <new-name>`은 실행 중인 세션의 프로세스를 재시작하지 않고 이름만 바꿉니다. 현재 이름과 동일한 이름으로 바꾸면 no-op success이고, 다른 세션이 이미 쓰는 이름으로 바꾸면 conflict error로 실패합니다. `<target>`은 세션 이름, session id, pane id(`%0`), 또는 bare pane 번호(`0`)를 받으며, `<new-name>`은 `--name`과 같은 이름 규칙을 따릅니다.
|
|
142
143
|
|
|
144
|
+
`lterm doctor`(호환 이름: `lterm status`)는 client/daemon version, protocol 호환성, runtime/data/socket/shim path, shim directory가 `PATH`에 있는지 등을 보고합니다. 이 명령은 daemon을 시작하지 않습니다. 현재 socket에서 호환 daemon이 응답하지 않으면 `daemon_reachable=no` / `false`로 표시됩니다. 일반 client 동작 중 접근 가능한 daemon이 다른 lterm 또는 protocol version을 보고하면 stderr에 경고를 출력하며, 보통 binary upgrade 뒤 예전 daemon이 살아 있는 상황을 뜻합니다.
|
|
145
|
+
|
|
146
|
+
`lterm logs <target>`은 `--start` / `-S`와 `--end` / `-E` line offset을 받습니다. 0 이상의 값은 absolute scrollback line index이고, 음수 값은 현재 scrollback line count에서 뒤로 셉니다. `--end`는 inclusive라 `lterm logs api -S0 -E0`은 첫 번째 줄만 capture합니다. Capture 출력은 계속 정제된 text이며, attach된 PTY stream은 raw 그대로 유지됩니다.
|
|
147
|
+
|
|
143
148
|
`LTERM_STATUS_STYLE=full` 또는 `LTERM_STATUS_STYLE=minimal` 로 시각 스타일을 선택할 수 있습니다. `full`(로컬 터미널 기본값)은 검정 글자 + bright-blue 배경, `minimal`은 SGR 색을 모두 생략한 plain text로 동작합니다. SSH 세션(`SSH_CONNECTION` / `SSH_CLIENT` / `SSH_TTY` 감지)에서는 자동으로 `minimal`이 적용되어 Termius 같은 모바일 SSH 클라이언트의 색 충돌을 줄입니다.
|
|
144
149
|
|
|
145
150
|
attach된 PTY가 alternate screen buffer로 진입하면(예: `vim`, `less`, `htop`이 `\x1b[?1049h` 사용) lterm은 status bar를 일시 중단해 alt-screen 앱의 UI와 충돌을 피합니다. 앱이 alt-screen을 종료하는 즉시 status bar가 다시 그려집니다.
|
|
@@ -158,8 +163,8 @@ child 애플리케이션이 `CSI u` enhancement sequence로 Kitty keyboard proto
|
|
|
158
163
|
lterm sessions
|
|
159
164
|
lterm sessions --children
|
|
160
165
|
lterm sessions --all
|
|
161
|
-
lterm processes api
|
|
162
|
-
lterm logs api --start=-80
|
|
166
|
+
lterm processes api --orphans
|
|
167
|
+
lterm logs api --start=-80 --end=-1
|
|
163
168
|
lterm input api 'echo hello' --enter
|
|
164
169
|
```
|
|
165
170
|
|
|
@@ -270,6 +275,11 @@ lterm run -- codex exec "저장소를 요약해줘"
|
|
|
270
275
|
호환성 참고: lterm은 각 root session을 하나의 pseudo-window로 모델링합니다
|
|
271
276
|
(`window_index=0`, `window_panes=1`). lterm은 client별 process/TTY metadata를
|
|
272
277
|
노출하지 않기 때문에 `client_pid`와 `client_tty`는 빈 문자열로 확장됩니다.
|
|
278
|
+
`lterm tmux-compat list-commands --verbose`는 `command`, alias, support tier,
|
|
279
|
+
usage를 tab-separated로 출력하고, `--json`은 machine-readable row를 출력합니다.
|
|
280
|
+
Support tier는 lterm compatibility boundary 안에서 `full`, `partial`, `noop`
|
|
281
|
+
중 하나입니다. `LTERM_DEBUG_TMUX=1`을 설정하면 지원하지 않는 tmux command가
|
|
282
|
+
shim에 도달했을 때 opt-in stderr diagnostic row를 출력합니다.
|
|
273
283
|
tmux `-f` filter는 조용히 무시하지 않고 의도적으로 거부합니다.
|
|
274
284
|
|
|
275
285
|
## cmux 동작
|
|
@@ -322,7 +332,7 @@ lterm ssh devbox main -- -p 2222 -i ~/.ssh/id_ed25519
|
|
|
322
332
|
|
|
323
333
|
**Capture 출력은 사람/AI가 읽기 쉽도록 정제됩니다.** `lterm logs`(호환 이름: `lterm capture`)와 `tmux capture-pane`은 captured scrollback을 출력할 때 일반적인 터미널 제어 시퀀스를 제거합니다.
|
|
324
334
|
|
|
325
|
-
**프로세스 가시성.** `lterm processes [session]`(호환 이름: `lterm ps [session]`)은 각 세션 child 아래의 process tree를 보여 줍니다. Codex/OMX/MCP subprocess가 누적되어 메모리 누수처럼 커지기 전에
|
|
335
|
+
**프로세스 가시성.** `lterm processes [session]`(호환 이름: `lterm ps [session]`)은 process-group id와 함께 각 세션 child 아래의 process tree를 보여 줍니다. `--orphans`를 추가하면 기록된 session root의 descendant가 아니지만 같은 process group에 남아 있는 row도 함께 보여 주므로, Codex/OMX/MCP subprocess가 누적되어 메모리 누수처럼 커지기 전에 확인할 수 있습니다. 시스템 `ps`는 절대 경로로 호출하며, 형식이 잘못된 process row는 추측하지 않고 건너뜁니다.
|
|
326
336
|
|
|
327
337
|
**Socket 위치.** 커스텀 `LTERM_SOCKET` 경로는 소유자 전용 디렉터리 안에 있어야 합니다. 격리된 socket 위치가 필요할 때는 `LTERM_RUNTIME_DIR`를 우선 사용하세요.
|
|
328
338
|
|
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ Homebrew and npm both install the `lterm` command on your `PATH`; verify with `l
|
|
|
44
44
|
With Cargo from GitHub (use the latest tag from the Releases page):
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
|
-
cargo install --git https://github.com/ictechgy/light_terminal --tag v0.1.
|
|
47
|
+
cargo install --git https://github.com/ictechgy/light_terminal --tag v0.1.2
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
From this checkout, use Rust 1.85 or newer:
|
|
@@ -98,11 +98,12 @@ lterm -a api
|
|
|
98
98
|
| Open or create a session | `lterm open main` | `attach-or-new` |
|
|
99
99
|
| Resume an existing session | `lterm resume api` | `attach`, `a`, `-a` |
|
|
100
100
|
| List sessions | `lterm sessions` | `list`, `ls` |
|
|
101
|
-
| Inspect process trees | `lterm processes api --json` | `ps` |
|
|
101
|
+
| Inspect process trees | `lterm processes api --json --orphans` | `ps` |
|
|
102
102
|
| Rename a session | `lterm rename api api-renamed` | None |
|
|
103
|
-
| Read sanitized scrollback | `lterm logs api --start=-80` | `capture` |
|
|
103
|
+
| Read sanitized scrollback | `lterm logs api --start=-80 --end=-1` | `capture` |
|
|
104
104
|
| Write input to a PTY | `lterm input api 'echo hello' --enter` | `send` |
|
|
105
105
|
| Stop a session | `lterm close api` | `kill` |
|
|
106
|
+
| Diagnose daemon and shim state | `lterm doctor --json` | `status` |
|
|
106
107
|
| Run the background daemon explicitly | `lterm daemon` | None |
|
|
107
108
|
| Stop the daemon and all sessions | `lterm shutdown` | None |
|
|
108
109
|
|
|
@@ -139,6 +140,10 @@ This table is the product CLI surface for humans and agents. `lterm tmux-compat
|
|
|
139
140
|
|
|
140
141
|
`lterm rename <target> <new-name>` renames a running session without restarting its process. Renaming a session to its current name is a no-op success, while renaming over a different in-use name fails with a conflict error. `<target>` accepts a session name, session id, pane id (`%0`), or bare pane number (`0`); `<new-name>` follows the same syntax rules as `--name`.
|
|
141
142
|
|
|
143
|
+
`lterm doctor` (compatibility name: `lterm status`) reports client/daemon versions, protocol compatibility, runtime/data/socket/shim paths, and whether the shim directory is on `PATH`. It does not start the daemon; `daemon_reachable=no` / `false` means no compatible daemon answered on the current socket. Normal client operations warn on stderr when a reachable daemon reports a different lterm or protocol version, which usually means an old daemon survived a binary upgrade.
|
|
144
|
+
|
|
145
|
+
`lterm logs <target>` accepts `--start` / `-S` and `--end` / `-E` line offsets. Non-negative values are absolute scrollback line indexes; negative values count back from the current scrollback line count. `--end` is inclusive, so `lterm logs api -S0 -E0` captures only the first line. Capture output remains sanitized text; attached PTY streams remain raw.
|
|
146
|
+
|
|
142
147
|
Set `LTERM_STATUS_STYLE=full` or `LTERM_STATUS_STYLE=minimal` to choose the visual style. `full` (default for local terminals) shows black text on a bright-blue background; `minimal` drops all SGR colors in favor of plain text. SSH sessions (detected via `SSH_CONNECTION`, `SSH_CLIENT`, or `SSH_TTY`) default to `minimal` to avoid color-mapping issues on mobile SSH clients like Termius.
|
|
143
148
|
|
|
144
149
|
When the attached PTY enters the alternate screen buffer (e.g. `vim`, `less`, `htop` via `\x1b[?1049h`), lterm suspends its status bar to avoid conflicting with the application's UI. The status bar is redrawn immediately when the application exits alt-screen.
|
|
@@ -157,8 +162,8 @@ When a child application enables the Kitty keyboard protocol through `CSI u` enh
|
|
|
157
162
|
lterm sessions
|
|
158
163
|
lterm sessions --children
|
|
159
164
|
lterm sessions --all
|
|
160
|
-
lterm processes api
|
|
161
|
-
lterm logs api --start=-80
|
|
165
|
+
lterm processes api --orphans
|
|
166
|
+
lterm logs api --start=-80 --end=-1
|
|
162
167
|
lterm input api 'echo hello' --enter
|
|
163
168
|
```
|
|
164
169
|
|
|
@@ -270,6 +275,7 @@ Compatibility notes: lterm models each root session as one pseudo-window
|
|
|
270
275
|
(`window_index=0`, `window_panes=1`). `client_pid` and `client_tty` expand to
|
|
271
276
|
empty strings because lterm does not expose per-client process or TTY metadata.
|
|
272
277
|
tmux `-f` filters are intentionally rejected instead of being silently ignored.
|
|
278
|
+
Use `lterm tmux-compat list-commands --verbose` for tab-separated `command`, alias, support tier, and usage fields, or `--json` for machine-readable rows. Support tiers are `full`, `partial`, and `noop` within lterm's compatibility boundary. Set `LTERM_DEBUG_TMUX=1` to emit an opt-in stderr diagnostic row when an unsupported tmux command reaches the shim.
|
|
273
279
|
|
|
274
280
|
## cmux behavior
|
|
275
281
|
|
|
@@ -321,7 +327,7 @@ the old code until they are stopped.
|
|
|
321
327
|
|
|
322
328
|
**Capture output is sanitized for human/AI consumption.** `lterm logs` (compatibility name: `lterm capture`) and `tmux capture-pane` strip common terminal control sequences before printing scrollback.
|
|
323
329
|
|
|
324
|
-
**Process visibility.** `lterm processes [session]` (or compatibility name `lterm ps [session]`) shows the process tree rooted at each session child, so long-running Codex/OMX/MCP subprocess buildup stays visible before it becomes a memory-leak surprise. The system `ps` is invoked by absolute path, and malformed process rows are skipped rather than guessed at.
|
|
330
|
+
**Process visibility.** `lterm processes [session]` (or compatibility name `lterm ps [session]`) shows the process tree rooted at each session child, including process-group ids. Add `--orphans` to also include same-process-group rows that are no longer descendants of the recorded session root, so long-running Codex/OMX/MCP subprocess buildup stays visible before it becomes a memory-leak surprise. The system `ps` is invoked by absolute path, and malformed process rows are skipped rather than guessed at.
|
|
325
331
|
|
|
326
332
|
**Socket location.** Custom `LTERM_SOCKET` paths must live in an owner-only directory. Prefer `LTERM_RUNTIME_DIR` when you need an isolated socket location.
|
|
327
333
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ictechgy/lterm",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Lightweight tmux-compatible terminal session daemon with cmux-friendly notifications.",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/ictechgy/light_terminal#readme",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"LICENSE-MIT"
|
|
31
31
|
],
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"lterm-darwin-arm64": "0.1.
|
|
34
|
-
"lterm-darwin-x64": "0.1.
|
|
35
|
-
"lterm-linux-arm64": "0.1.
|
|
36
|
-
"lterm-linux-x64": "0.1.
|
|
33
|
+
"lterm-darwin-arm64": "0.1.2",
|
|
34
|
+
"lterm-darwin-x64": "0.1.2",
|
|
35
|
+
"lterm-linux-arm64": "0.1.2",
|
|
36
|
+
"lterm-linux-x64": "0.1.2"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=16"
|