@agora-build/tcap 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +13 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -84,6 +84,8 @@ tcap --output # output only, no header
84
84
  tcap --command # the command text only
85
85
  tcap --raw # verbatim, ANSI colour intact
86
86
  tcap --json # {command, exit_code, cwd, duration_ms, output, source}
87
+ # plus "approximate": true when the backend cannot vouch
88
+ # that the output belongs to that command
87
89
  tcap --copy # also copy to the clipboard
88
90
  tcap --max-bytes 8000 # elide the middle to fit a smaller context window
89
91
  ```
@@ -96,17 +98,23 @@ unrelated jobs.
96
98
  | Terminal | Last command | Older (`-c 2`) | Needs |
97
99
  |---|---|---|---|
98
100
  | **tmux** | yes | **yes** | nothing |
99
- | **kitty** | yes | no | `allow_remote_control yes` |
101
+ | **kitty** | yes | no | remote control: `yes`, or `socket-only` + `listen_on` |
100
102
  | **iTerm2** | yes | no | Shell Integration + `pip install iterm2` |
101
103
  | **WezTerm** | not yet | no | run inside tmux |
102
104
  | Ghostty, Terminal.app, Alacritty | no | no | run inside tmux |
103
105
 
104
106
  Two things worth knowing up front:
105
107
 
106
- **Only tmux can reach past the most recent command.** kitty exposes a
107
- `last_cmd_output` extent and nothing older; iTerm2 exposes only its latest
108
- prompt. So `tcap -c 2` fails there with a pointer to tmux rather than quietly
109
- returning the wrong block.
108
+ **Only tmux can reach past the most recent command.** kitty exposes only the
109
+ latest output and nothing older; iTerm2 exposes only its latest prompt. So `tcap
110
+ -c 2` fails there with a pointer to tmux rather than quietly returning the wrong
111
+ block.
112
+
113
+ **On kitty, output is the last *non-empty* output**, because kitty counts the
114
+ running `tcap` as the current command. A command that printed nothing therefore
115
+ yields an older output under the current header; it is labelled with a `# note:`
116
+ line and `"approximate": true` in `--json`. Two `tcap` runs in a row are a hard
117
+ error instead, since the mismatch is certain there. tmux has no such ambiguity.
110
118
 
111
119
  **tmux wins whenever it's running.** Inside kitty running tmux, asking kitty for
112
120
  its scrollback returns tmux's rendered viewport rather than the shell's real
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agora-build/tcap",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Capture the last command and its output from your terminal, ready to pipe into an LLM",
5
5
  "bin": {
6
6
  "tcap": "bin/tcap"