diff --git a/README.md b/README.md index e8bdd2c..f337b5c 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,17 @@ Full install. Works with Claude Code, Codex, pi, Copilot CLI, Droid, Oh My Pi, H | `Ctrl+B Ctrl+O` | the agent's newest reply, with no picker | | Ctrl-click a `file://…md` link | that file | +`annotate.terminal` opens the focused pane's recent terminal output (the last 200 lines) for +review in the same way. It has no default key; to use it, bind one yourself, for example: + +```toml +[[keys.command]] +key = "prefix+t" +type = "plugin_action" +command = "annotate.terminal" +description = "review this pane's recent output" +``` + **Send** (or `E`) makes the review the agent's next message. `q` closes. On an agent reply, `S` sends and closes in one key; `E` and `q` are unchanged. diff --git a/docs/windows-full-acceptance.md b/docs/windows-full-acceptance.md index 0f1ccae..8d03a5d 100644 --- a/docs/windows-full-acceptance.md +++ b/docs/windows-full-acceptance.md @@ -34,6 +34,7 @@ requirements, not completed verification. Every box starts unchecked. | `open-link` | Annotate this file | `pane` | | `last` | Annotate: agent's last message | `pane` | | `last-newest` | Annotate: agent's newest message | `pane` | + | `terminal` | Annotate: terminal output | `pane` | - [ ] Require exactly three panes: `editor` (Annotate, popup, 88×24), `manager` (Annotations, popup, 100×30), and one `doc` (Annotate, overlay). The `doc` @@ -41,8 +42,9 @@ requirements, not completed verification. Every box starts unchecked. No shell, PowerShell, command-string interpolation, or fallback launcher may sit between Herdr's pane process and the TUI. - [ ] Keep `open` and `open-link` as direct argv ending in `herdr open`, - `last` as direct argv ending in `herdr last`, and `last-newest` as direct argv - ending in `herdr last --newest`, all using + `last` as direct argv ending in `herdr last`, `last-newest` as direct argv + ending in `herdr last --newest`, and `terminal` as direct argv ending in + `herdr terminal`, all using `./bin/plannotator-tui.exe`. Preserve the `markdown-file` link handler's title, pattern, and `open-link` action. All actions, panes, the handler, and the build must be effective on Windows; no inherited Unix gate may disable them. diff --git a/herdr-plugin.toml b/herdr-plugin.toml index 53b4bcc..a99348f 100644 --- a/herdr-plugin.toml +++ b/herdr-plugin.toml @@ -1,6 +1,6 @@ id = "annotate" name = "Annotate" -version = "0.5.0" +version = "0.6.0" min_herdr_version = "0.8.0" description = "Comment on terminal selections and copy annotations as agent context." platforms = ["linux", "macos", "windows"] @@ -117,6 +117,15 @@ contexts = ["pane"] platforms = ["macos", "linux"] command = ["./bin/plannotator-tui.exe", "herdr", "last", "--newest"] +# No default key; bind one in Herdr's config (see the README). +[[actions]] +id = "terminal" +title = "Annotate: terminal output" +description = "Review the focused pane's recent terminal output in plannotator-tui and send feedback back." +contexts = ["pane"] +platforms = ["macos", "linux"] +command = ["./bin/plannotator-tui.exe", "herdr", "terminal"] + # Ctrl-click on a file:// Markdown link. Anchored on the scheme so web links never match. [[link_handlers]] id = "markdown-file" diff --git a/lite/herdr-plugin.toml b/lite/herdr-plugin.toml index e95ce32..5bdc0dc 100644 --- a/lite/herdr-plugin.toml +++ b/lite/herdr-plugin.toml @@ -8,7 +8,7 @@ id = "annotate" name = "Annotate" -version = "0.5.0" +version = "0.6.0" min_herdr_version = "0.8.0" description = "Comment on terminal selections and copy annotations as agent context." platforms = ["linux", "macos", "windows"] diff --git a/plannotator-tui.version b/plannotator-tui.version index 965065d..a602fc9 100644 --- a/plannotator-tui.version +++ b/plannotator-tui.version @@ -1 +1 @@ -0.9.3 +0.9.4 diff --git a/scripts/smoke.sh b/scripts/smoke.sh index 2c9908a..db241c9 100755 --- a/scripts/smoke.sh +++ b/scripts/smoke.sh @@ -97,7 +97,7 @@ trap restore EXIT echo "== fresh install: full" install "$spec" -check "actions" "$(actions)" "capture,copy-archive,copy-context,last,last-newest,manage,open,open-link" +check "actions" "$(actions)" "capture,copy-archive,copy-context,last,last-newest,manage,open,open-link,terminal" check "action programs" "$(programs)" "./bin/herdr-annotate.exe,./bin/plannotator-tui.exe" check "review binary matches pin" "$(tui_version)" "$(tui_pin)" check "native binary matches pin" "$(native_version)" "$(native_pin)" @@ -134,7 +134,7 @@ check "manager pane" "$(manager_renders)" "ok" echo "== swap: lite -> full" install "$spec" -check "actions" "$(actions)" "capture,copy-archive,copy-context,last,last-newest,manage,open,open-link" +check "actions" "$(actions)" "capture,copy-archive,copy-context,last,last-newest,manage,open,open-link,terminal" check "review binary" "$(tui_version)" "$(tui_pin)" check "native binary" "$(native_version)" "$(native_pin)" diff --git a/scripts/test-fetch-plannotator-tui.ps1 b/scripts/test-fetch-plannotator-tui.ps1 index 4540285..4693822 100644 --- a/scripts/test-fetch-plannotator-tui.ps1 +++ b/scripts/test-fetch-plannotator-tui.ps1 @@ -74,7 +74,7 @@ try { $result = Invoke-Fetcher Assert-True ($result.ExitCode -eq 0) "local override failed: $($result.Output)" Assert-BytesEqual $source $destination "local override bytes differ" - Assert-True ((Get-Content -LiteralPath $stamp -Raw) -ceq "0.9.3") "local stamp differs" + Assert-True ((Get-Content -LiteralPath $stamp -Raw) -ceq "0.9.4") "local stamp differs" $env:PLANNOTATOR_TUI_BIN = $null $env:PLANNOTATOR_TUI_RELEASE_BASE = "http://127.0.0.1:1/must-not-be-requested" @@ -120,7 +120,7 @@ try { Assert-True ($result.ExitCode -eq 0) "download fixture failed: $($result.Output)" Assert-True ($result.Output -match "x86_64-pc-windows-msvc") "x64 target was not selected" Assert-BytesEqual $source $destination "downloaded destination bytes differ" - Assert-True ((Get-Content -LiteralPath $stamp -Raw) -ceq "0.9.3") "download stamp differs" + Assert-True ((Get-Content -LiteralPath $stamp -Raw) -ceq "0.9.4") "download stamp differs" Set-Content -LiteralPath $stamp -NoNewline -Value "preserve-this-stamp" $beforeHash = (Get-FileHash -Algorithm SHA256 -LiteralPath $destination).Hash diff --git a/scripts/test-fetch-plannotator-tui.sh b/scripts/test-fetch-plannotator-tui.sh index 3f6fa01..775c315 100644 --- a/scripts/test-fetch-plannotator-tui.sh +++ b/scripts/test-fetch-plannotator-tui.sh @@ -14,7 +14,7 @@ cp "$repository_root/plannotator-tui.version" "$plugin_root/" source_binary="$source_root/plannotator-tui local" cat > "$source_binary" <<'EOF' #!/usr/bin/env sh -printf 'plannotator-tui 0.9.3\n' +printf 'plannotator-tui 0.9.4\n' EOF chmod +x "$source_binary" printf 'old destination' > "$plugin_root/bin/plannotator-tui.exe" @@ -23,10 +23,10 @@ printf 'old-version' > "$plugin_root/bin/plannotator-tui.version" PLANNOTATOR_TUI_BIN="$source_binary" bash "$plugin_root/scripts/fetch-plannotator-tui.sh" cmp "$source_binary" "$plugin_root/bin/plannotator-tui.exe" -test "$(cat "$plugin_root/bin/plannotator-tui.version")" = 0.9.3 +test "$(cat "$plugin_root/bin/plannotator-tui.version")" = 0.9.4 test ! -e "$plugin_root/bin/plannotator-tui" -test "$("$plugin_root/bin/plannotator-tui.exe" --version)" = "plannotator-tui 0.9.3" -test "$(bash "$plugin_root/scripts/plannotator-tui.sh" --version)" = "plannotator-tui 0.9.3" +test "$("$plugin_root/bin/plannotator-tui.exe" --version)" = "plannotator-tui 0.9.4" +test "$(bash "$plugin_root/scripts/plannotator-tui.sh" --version)" = "plannotator-tui 0.9.4" output="$(bash "$plugin_root/scripts/fetch-plannotator-tui.sh")" case "$output" in diff --git a/scripts/test-herdr-windows-full-plugin.ps1 b/scripts/test-herdr-windows-full-plugin.ps1 index 2d4c8f5..0489029 100644 --- a/scripts/test-herdr-windows-full-plugin.ps1 +++ b/scripts/test-herdr-windows-full-plugin.ps1 @@ -122,7 +122,7 @@ try { # variant installed and the review half silently unreachable, which is the state this # whole variant exists to end. $actionIds = @($plugin.actions | ForEach-Object { $_.id }) - foreach ($id in @("capture", "copy-context", "copy-archive", "manage", "open", "open-link", "last")) { + foreach ($id in @("capture", "copy-context", "copy-archive", "manage", "open", "open-link", "last", "last-newest", "terminal")) { Assert-True ($actionIds -contains $id) "Herdr $version omitted action $id" $action = @($plugin.actions | Where-Object { $_.id -ceq $id }) # @() at the call site: an empty array returned from a function unrolls to $null. @@ -130,7 +130,7 @@ try { Assert-True ($platforms.Count -eq 0 -or $platforms -contains "windows") ` "action $id is not effective on Windows: $($platforms -join ',')" } - Assert-True ($actionIds.Count -eq 8) "Herdr $version listed $($actionIds.Count) actions, expected 7" + Assert-True ($actionIds.Count -eq 9) "Herdr $version listed $($actionIds.Count) actions, expected 9" $paneIds = @($plugin.panes | ForEach-Object { $_.id }) foreach ($id in @("editor", "manager", "doc")) { @@ -155,7 +155,7 @@ try { $handler = @($plugin.link_handlers | Where-Object { $_.id -ceq "markdown-file" }) Assert-True ($handler.Count -eq 1) "Herdr $version omitted the markdown-file link handler" - Write-Output "herdr $version accepts windows-full: 8 actions, 3 panes, direct-argv doc pane" + Write-Output "herdr $version accepts windows-full: 9 actions, 3 panes, direct-argv doc pane" } } finally { foreach ($name in $isolatedNames) { diff --git a/scripts/test-windows-full-manifest.py b/scripts/test-windows-full-manifest.py index 69b5214..f81f9f7 100644 --- a/scripts/test-windows-full-manifest.py +++ b/scripts/test-windows-full-manifest.py @@ -151,8 +151,8 @@ def check_distributed(path: Path, version_path: Path, native_version_path: Path) manifest = load(path) check_top_level_windows(path, manifest) check_native_lite(path, manifest) - if version_path.read_text(encoding="utf-8").strip() != "0.9.3": - fail(version_path, "plannotator-tui.version is not 0.9.3") + if version_path.read_text(encoding="utf-8").strip() != "0.9.4": + fail(version_path, "plannotator-tui.version is not 0.9.4") if native_version_path.read_text(encoding="utf-8").strip() != "0.1.0": fail(native_version_path, "herdr-annotate.version is not 0.1.0") diff --git a/windows-full/herdr-plugin.toml b/windows-full/herdr-plugin.toml index 94e961b..2c1cb01 100644 --- a/windows-full/herdr-plugin.toml +++ b/windows-full/herdr-plugin.toml @@ -21,7 +21,7 @@ id = "annotate" name = "Annotate" -version = "0.5.0" +version = "0.6.0" min_herdr_version = "0.9.0" description = "Comment on terminal selections and copy annotations as agent context." platforms = ["windows"] @@ -119,6 +119,14 @@ description = "Review the focused agent's newest message in plannotator-tui, wit contexts = ["pane"] command = ["./bin/plannotator-tui.exe", "herdr", "last", "--newest"] +# No default key; bind one in Herdr's config (see the README). +[[actions]] +id = "terminal" +title = "Annotate: terminal output" +description = "Review the focused pane's recent terminal output in plannotator-tui and send feedback back." +contexts = ["pane"] +command = ["./bin/plannotator-tui.exe", "herdr", "terminal"] + # Ctrl-click on a file:// Markdown link. Anchored on the scheme so web links never match. [[link_handlers]] id = "markdown-file"