@ictechgy/lterm 0.1.4 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +9 -3
- package/README.md +13 -3
- package/package.json +5 -5
package/README.ko.md
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
`lterm`은 tmux 전체를 대체하려는 도구가 아닙니다. 오래 실행되는 PTY 세션을 유지하고, 클라이언트가 자유롭게 detach/reattach할 수 있게 하며, 터미널 escape sequence는 그대로 통과시키고, terminal-first agent 도구가 자주 사용하는 tmux 명령 일부를 호환 shim으로 제공합니다.
|
|
15
15
|
|
|
16
16
|
> **보안 모델:** `lterm`은 같은 OS 사용자 안에서 쓰는 편의용 데몬이며 샌드박스가 아닙니다. 다른 사용자의 Unix socket 접근은 거부하고 런타임 디렉터리는 소유자 전용 권한으로 만들지만, 같은 OS 사용자 권한으로 실행되는 프로세스는 세션을 제어할 수 있다고 보아야 합니다.
|
|
17
|
+
> 전체 trust boundary와 audit policy는 [SECURITY.md](SECURITY.md)를 참고하세요.
|
|
17
18
|
|
|
18
19
|
## 왜 tmux 대신 lterm인가요?
|
|
19
20
|
|
|
@@ -69,7 +70,7 @@ Homebrew와 npm 모두 `PATH`에 `lterm` 명령을 설치합니다. `lterm --ver
|
|
|
69
70
|
GitHub에서 Cargo로 설치 (Releases 페이지의 최신 태그를 사용하세요):
|
|
70
71
|
|
|
71
72
|
```bash
|
|
72
|
-
cargo install --git https://github.com/ictechgy/light_terminal --tag
|
|
73
|
+
cargo install --git https://github.com/ictechgy/light_terminal --tag v1.0.1
|
|
73
74
|
```
|
|
74
75
|
|
|
75
76
|
저장소를 클론한 뒤 직접 빌드하려면 Rust 1.85 이상이 필요합니다.
|
|
@@ -127,6 +128,7 @@ lterm -a api
|
|
|
127
128
|
| 세션 이름 변경 | `lterm rename api api-renamed` | 없음 |
|
|
128
129
|
| 세션 status theme 설정 | `lterm status-theme api green` | `theme` |
|
|
129
130
|
| 정제된 scrollback 읽기 | `lterm logs api --start=-80 --end=-1` | `capture` |
|
|
131
|
+
| 정제된 scrollback 위에 입력 컴포저 열기 | `lterm compose api` | `mobile` |
|
|
130
132
|
| 세션 출력 또는 종료 대기 | `lterm wait api --contains READY --timeout 30s --json` | 없음 |
|
|
131
133
|
| 세션을 감시하고 완료 시 알림 | `lterm watch api --exit --notify` | 없음 |
|
|
132
134
|
| PTY에 입력 쓰기 | `lterm input api 'echo hello' --enter` | `send` |
|
|
@@ -228,12 +230,16 @@ lterm sessions --children
|
|
|
228
230
|
lterm sessions --all
|
|
229
231
|
lterm processes api --orphans
|
|
230
232
|
lterm logs api --start=-80 --end=-1
|
|
233
|
+
lterm compose api
|
|
231
234
|
lterm wait api --contains READY --timeout 30s --json
|
|
232
235
|
lterm watch api --exit --notify
|
|
233
236
|
lterm input api 'echo hello' --enter
|
|
234
237
|
```
|
|
235
238
|
|
|
236
|
-
위의 일반 alias는 tmux 용어를 몰라도 agent terminal을 일상적으로 다루기 쉽게 하기 위한 표면입니다. `sessions`는 영속 작업을 나열하고, `processes`는 child process tree를 확인하고, `logs`는 정제된 scrollback을 읽고, `wait` / `watch`는 marker 또는 종료 조건을 script와 agent가 관측할 수 있게
|
|
239
|
+
위의 일반 alias는 tmux 용어를 몰라도 agent terminal을 일상적으로 다루기 쉽게 하기 위한 표면입니다. `sessions`는 영속 작업을 나열하고, `processes`는 child process tree를 확인하고, `logs`는 정제된 scrollback을 읽고, `compose`는 정제된 scrollback과 하단 고정 prompt로 텍스트를 commit할 수 있게 하며, `wait` / `watch`는 marker 또는 종료 조건을 script와 agent가 관측할 수 있게 하고, `input`은 대상 PTY에 텍스트를 씁니다. `mobile`은 `compose`의 visible alias입니다. 호환 이름 `list` / `ls`, `ps`, `capture`, `send`는 스크립트와 기존 사용 습관에서도 계속 사용할 수 있습니다.
|
|
240
|
+
|
|
241
|
+
자동화와 테스트에는 `lterm compose api --once --message 'hello'`를 사용하면 한 번의 정제된 capture/send 사이클을 실행합니다. `logs`와 같은 session-or-pane target 모델에서 마지막 `--tail` 정제 라인(기본값: 80)을 capture한 뒤, 기본으로 Enter(`\r`)를 붙여 `lterm input --enter`와 맞추며, `--no-enter`를 추가하면 message byte만 정확히 보냅니다. `compose` / `mobile`은 attach client가 아니며 attached-client 수나 PTY geometry를 바꾸지 않습니다.
|
|
242
|
+
Interactive compose 화면은 `--refresh`(기본값: 500ms), 로컬 입력, 터미널 resize 이벤트마다 갱신됩니다. Enter를 누르면 현재 입력 buffer를 commit하고(빈 buffer도 commit됨), 위 one-shot 규칙처럼 기본으로 `\r`을 덧붙입니다. Ctrl-C, Ctrl-D, Esc는 PTY로 전달하지 않고 로컬 composer를 종료합니다.
|
|
237
243
|
|
|
238
244
|
**세션 종료:**
|
|
239
245
|
|
|
@@ -397,7 +403,7 @@ lterm ssh devbox main -- -p 2222 -i ~/.ssh/id_ed25519
|
|
|
397
403
|
|
|
398
404
|
**터미널 출력은 그대로 전달됩니다.** `lterm resume`(호환 이름: `lterm attach`)은 full-screen 터미널 프로그램과 cmux/OSC 알림이 정상 동작하도록 PTY byte를 그대로 통과시킵니다. 로컬 상태 바는 클라이언트 쪽 표시 요소일 뿐이며, 완전한 raw 모드 터미널이 필요하면 `--no-status`를 사용하세요. 신뢰할 수 없는 child 프로그램은 tmux/screen에서와 마찬가지로 attach된 터미널에 escape sequence를 출력할 수 있습니다. **`lterm`을 escape-sequence sanitizer나 sandbox로 사용하지 마세요.**
|
|
399
405
|
|
|
400
|
-
**Capture 출력은 사람/AI가 읽기 쉽도록 정제됩니다.** `lterm logs`(호환 이름: `lterm capture`)
|
|
406
|
+
**Capture 출력은 사람/AI가 읽기 쉽도록 정제됩니다.** `lterm logs`(호환 이름: `lterm capture`), `lterm compose`(alias: `lterm mobile`), `tmux capture-pane`은 captured scrollback을 출력할 때 일반적인 터미널 제어 시퀀스를 제거합니다. `compose`는 attach가 아닌 view에서 기존 input/send 경로로 텍스트를 commit하며, raw attached PTY stream을 변환하지 않습니다.
|
|
401
407
|
|
|
402
408
|
**프로세스 가시성.** `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는 추측하지 않고 건너뜁니다.
|
|
403
409
|
|
package/README.md
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
`lterm` is intentionally smaller than tmux. It keeps long-running PTY sessions alive, lets clients detach and reattach at will, forwards terminal escape sequences unchanged, and translates the subset of tmux commands commonly used by terminal-first agent tooling.
|
|
15
15
|
|
|
16
16
|
> **Security model:** `lterm` is a same-user convenience daemon, not a sandbox. It rejects cross-user Unix-socket peers and uses owner-only runtime directories, but any process running as your OS user should be considered capable of controlling your sessions.
|
|
17
|
+
> See [SECURITY.md](SECURITY.md) for the full trust-boundary and audit policy details.
|
|
17
18
|
|
|
18
19
|
## Why lterm instead of plain tmux?
|
|
19
20
|
|
|
@@ -67,10 +68,14 @@ Gemini CLI, or another terminal coding agent. It asks the agent to detect your
|
|
|
67
68
|
platform, install `lterm`, verify it with a smoke test, and avoid modifying
|
|
68
69
|
shell startup files without showing you the change.
|
|
69
70
|
|
|
71
|
+
For the 1.0 command/output stability boundary, see the
|
|
72
|
+
[public contract](docs/public-contract.md) and its machine-readable
|
|
73
|
+
[contract manifest](docs/contract-manifest.json).
|
|
74
|
+
|
|
70
75
|
With Cargo from GitHub (use the latest tag from the Releases page):
|
|
71
76
|
|
|
72
77
|
```bash
|
|
73
|
-
cargo install --git https://github.com/ictechgy/light_terminal --tag
|
|
78
|
+
cargo install --git https://github.com/ictechgy/light_terminal --tag v1.0.1
|
|
74
79
|
```
|
|
75
80
|
|
|
76
81
|
From this checkout, use Rust 1.85 or newer:
|
|
@@ -128,6 +133,7 @@ lterm -a api
|
|
|
128
133
|
| Rename a session | `lterm rename api api-renamed` | None |
|
|
129
134
|
| Set a session status theme | `lterm status-theme api green` | `theme` |
|
|
130
135
|
| Read sanitized scrollback | `lterm logs api --start=-80 --end=-1` | `capture` |
|
|
136
|
+
| Open a sanitized scrollback composer for input | `lterm compose api` | `mobile` |
|
|
131
137
|
| Wait for session output or exit | `lterm wait api --contains READY --timeout 30s --json` | None |
|
|
132
138
|
| Watch a session and notify on completion | `lterm watch api --exit --notify` | None |
|
|
133
139
|
| Write input to a PTY | `lterm input api 'echo hello' --enter` | `send` |
|
|
@@ -228,12 +234,16 @@ lterm sessions --children
|
|
|
228
234
|
lterm sessions --all
|
|
229
235
|
lterm processes api --orphans
|
|
230
236
|
lterm logs api --start=-80 --end=-1
|
|
237
|
+
lterm compose api
|
|
231
238
|
lterm wait api --contains READY --timeout 30s --json
|
|
232
239
|
lterm watch api --exit --notify
|
|
233
240
|
lterm input api 'echo hello' --enter
|
|
234
241
|
```
|
|
235
242
|
|
|
236
|
-
The generic aliases above are meant for day-to-day agent-terminal use: `sessions` lists persistent work, `processes` inspects child process trees, `logs` reads sanitized scrollback, `wait` / `watch` make marker-or-exit conditions observable for scripts and agents, and `input` writes text to the target PTY.
|
|
243
|
+
The generic aliases above are meant for day-to-day agent-terminal use: `sessions` lists persistent work, `processes` inspects child process trees, `logs` reads sanitized scrollback, `compose` shows sanitized scrollback with a fixed bottom prompt for committing text, `wait` / `watch` make marker-or-exit conditions observable for scripts and agents, and `input` writes text to the target PTY. `mobile` is a visible alias for `compose`; the compatibility names `list` / `ls`, `ps`, `capture`, and `send` remain available for scripts and muscle memory.
|
|
244
|
+
|
|
245
|
+
For automation and tests, `lterm compose api --once --message 'hello'` performs one sanitized capture/send cycle. It captures the last `--tail` sanitized lines (default: 80) from the same session-or-pane target model as `logs`, then appends Enter (`\r`) by default, matching `lterm input --enter`; add `--no-enter` to send the exact message bytes. `compose` / `mobile` is not an attach client and does not change attached-client counts or PTY geometry.
|
|
246
|
+
In interactive compose, the view refreshes on `--refresh` (default: 500ms) and after local input or resize events. Pressing Enter commits the current input buffer (empty buffers are committed too) and appends `\r` by default, matching the one-shot rule above. Ctrl-C, Ctrl-D, and Esc exit the local composer instead of forwarding to the PTY.
|
|
237
247
|
|
|
238
248
|
**Stop a session:**
|
|
239
249
|
|
|
@@ -393,7 +403,7 @@ the old code until they are stopped.
|
|
|
393
403
|
|
|
394
404
|
**Terminal output is forwarded as-is.** `lterm resume` (compatibility name: `lterm attach`) passes PTY bytes through so full-screen terminal programs and cmux/OSC notifications keep working. The local status bar is purely a client-side decoration; use `--no-status` for a fully raw terminal surface. Untrusted child programs can still emit terminal escape sequences to an attached terminal — exactly as under tmux/screen. **Do not use `lterm` as an escape-sequence sanitizer or sandbox.**
|
|
395
405
|
|
|
396
|
-
**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.
|
|
406
|
+
**Capture output is sanitized for human/AI consumption.** `lterm logs` (compatibility name: `lterm capture`), `lterm compose` (alias: `lterm mobile`), and `tmux capture-pane` strip common terminal control sequences before printing scrollback. `compose` is a non-attached view that commits text through the existing input/send path; it does not transform raw attached PTY streams.
|
|
397
407
|
|
|
398
408
|
**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.
|
|
399
409
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ictechgy/lterm",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "1.0.1",
|
|
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": "1.0.1",
|
|
34
|
+
"lterm-darwin-x64": "1.0.1",
|
|
35
|
+
"lterm-linux-arm64": "1.0.1",
|
|
36
|
+
"lterm-linux-x64": "1.0.1"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=16"
|