Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,19 @@ command = "annotate.terminal"
description = "review this pane's recent output"
```

`annotate.gate` opens the same folder review as `annotate.open`, with an **Approve** button
(`A`). The agent gets `The user approved.` (with any notes as non-blocking guidance), or your
numbered feedback as usual. Use it when an agent should wait for your sign-off. It has no
default key either:

```toml
[[keys.command]]
key = "prefix+ctrl+d"
type = "plugin_action"
command = "annotate.gate"
description = "review documents here, with Approve"
```

#### Ctrl-click Markdown links (opt-in)

Annotate does not capture Ctrl-click on links by default, so `file://…md` links open the way
Expand Down
11 changes: 10 additions & 1 deletion herdr-plugin.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id = "annotate"
name = "Annotate"
version = "0.9.7"
version = "0.9.8"
min_herdr_version = "0.8.0"
description = "Comment on terminal selections and copy annotations as agent context."
platforms = ["linux", "macos", "windows"]
Expand Down Expand Up @@ -108,6 +108,15 @@ contexts = ["workspace", "pane"]
platforms = ["macos", "linux"]
command = ["./bin/plannotator-tui.exe", "herdr", "open"]

# No default key; bind one in Herdr's config (see the README).
[[actions]]
id = "gate"
title = "Annotate: open here for approval"
description = "Review the focused pane's folder in plannotator-tui with an Approve button, and send the decision to its agent."
contexts = ["workspace", "pane"]
platforms = ["macos", "linux"]
command = ["./bin/plannotator-tui.exe", "herdr", "open", "--gate"]

[[actions]]
id = "last"
title = "Annotate: agent's last message"
Expand Down
2 changes: 1 addition & 1 deletion links/herdr-plugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

id = "annotate-links"
name = "Annotate Links"
version = "0.9.7"
version = "0.9.8"
min_herdr_version = "0.8.0"
description = "Open Ctrl-clicked file:// Markdown links in Annotate (needs the Annotate Full plugin)."
platforms = ["linux", "macos", "windows"]
Expand Down
2 changes: 1 addition & 1 deletion lite/herdr-plugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

id = "annotate"
name = "Annotate"
version = "0.9.7"
version = "0.9.8"
min_herdr_version = "0.8.0"
description = "Comment on terminal selections and copy annotations as agent context."
platforms = ["linux", "macos", "windows"]
Expand Down
2 changes: 1 addition & 1 deletion plannotator-tui.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.7
0.9.8
4 changes: 2 additions & 2 deletions scripts/test-fetch-plannotator-tui.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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.7") "local stamp differs"
Assert-True ((Get-Content -LiteralPath $stamp -Raw) -ceq "0.9.8") "local stamp differs"

$env:PLANNOTATOR_TUI_BIN = $null
$env:PLANNOTATOR_TUI_RELEASE_BASE = "http://127.0.0.1:1/must-not-be-requested"
Expand Down Expand Up @@ -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.7") "download stamp differs"
Assert-True ((Get-Content -LiteralPath $stamp -Raw) -ceq "0.9.8") "download stamp differs"

Set-Content -LiteralPath $stamp -NoNewline -Value "preserve-this-stamp"
$beforeHash = (Get-FileHash -Algorithm SHA256 -LiteralPath $destination).Hash
Expand Down
8 changes: 4 additions & 4 deletions scripts/test-fetch-plannotator-tui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.7\n'
printf 'plannotator-tui 0.9.8\n'
EOF
chmod +x "$source_binary"
printf 'old destination' > "$plugin_root/bin/plannotator-tui.exe"
Expand All @@ -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.7
test "$(cat "$plugin_root/bin/plannotator-tui.version")" = 0.9.8
test ! -e "$plugin_root/bin/plannotator-tui"
test "$("$plugin_root/bin/plannotator-tui.exe" --version)" = "plannotator-tui 0.9.7"
test "$(bash "$plugin_root/scripts/plannotator-tui.sh" --version)" = "plannotator-tui 0.9.7"
test "$("$plugin_root/bin/plannotator-tui.exe" --version)" = "plannotator-tui 0.9.8"
test "$(bash "$plugin_root/scripts/plannotator-tui.sh" --version)" = "plannotator-tui 0.9.8"

output="$(bash "$plugin_root/scripts/fetch-plannotator-tui.sh")"
case "$output" in
Expand Down
6 changes: 3 additions & 3 deletions scripts/test-herdr-windows-full-plugin.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ 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", "paste-archive", "send-archive", "manage", "open", "last", "last-newest", "terminal")) {
foreach ($id in @("capture", "copy-context", "copy-archive", "paste-archive", "send-archive", "manage", "open", "gate", "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.
$platforms = @(Get-Platforms -Item $action[0])
Assert-True ($platforms.Count -eq 0 -or $platforms -contains "windows") `
"action $id is not effective on Windows: $($platforms -join ',')"
}
Assert-True ($actionIds.Count -eq 10) "Herdr $version listed $($actionIds.Count) actions, expected 10"
Assert-True ($actionIds.Count -eq 11) "Herdr $version listed $($actionIds.Count) actions, expected 11"

$paneIds = @($plugin.panes | ForEach-Object { $_.id })
foreach ($id in @("editor", "manager", "doc")) {
Expand Down Expand Up @@ -159,7 +159,7 @@ try {
$handlers = @(if ($null -ne $handlerProperty -and $null -ne $handlerProperty.Value) { $handlerProperty.Value })
Assert-True ($handlers.Count -eq 0) "Herdr $version listed $($handlers.Count) link handlers, expected none"

Write-Output "herdr $version accepts windows-full: 10 actions, 3 panes, direct-argv doc pane"
Write-Output "herdr $version accepts windows-full: 11 actions, 3 panes, direct-argv doc pane"
}
} finally {
foreach ($name in $isolatedNames) {
Expand Down
4 changes: 2 additions & 2 deletions scripts/test-windows-full-manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,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.7":
fail(version_path, "plannotator-tui.version is not 0.9.7")
if version_path.read_text(encoding="utf-8").strip() != "0.9.8":
fail(version_path, "plannotator-tui.version is not 0.9.8")
if native_version_path.read_text(encoding="utf-8").strip() != "0.2.3":
fail(native_version_path, "herdr-annotate.version is not 0.2.3")

Expand Down
12 changes: 12 additions & 0 deletions skills/plannotator-tui/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ file is and ask them to review it.

Address every item, then continue.

When you need an explicit sign-off before you act, open it with `--gate`:

```bash
plannotator-tui herdr open docs/plans/auth.md --gate
```

The human can then approve. An approval arrives as `The user approved.`, or as a message
headed `# Approved with Notes` whose notes are guidance, not a request to revise. Numbered
feedback still means revise; no message means they closed it without deciding.

When you list files you want the human to open, you may print them as `file://` hyperlinks
(OSC 8):

Expand All @@ -44,3 +54,5 @@ herdr plugin pane open --plugin annotate --entrypoint doc --placement split \
--direction right --target-pane "$HERDR_PANE_ID" --focus --cwd "$PWD" \
--env PLANNOTATOR_TUI_FILE="$PWD/docs/plans/auth.md" --env PLANNOTATOR_TUI_DELIVER_TO="$HERDR_PANE_ID"
```

For a gated review, add `--env PLANNOTATOR_TUI_GATE=1`.
10 changes: 9 additions & 1 deletion windows-full/herdr-plugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

id = "annotate"
name = "Annotate"
version = "0.9.7"
version = "0.9.8"
min_herdr_version = "0.9.0"
description = "Comment on terminal selections and copy annotations as agent context."
platforms = ["windows"]
Expand Down Expand Up @@ -113,6 +113,14 @@ description = "Review the focused pane's folder in plannotator-tui and send feed
contexts = ["workspace", "pane"]
command = ["./bin/plannotator-tui.exe", "herdr", "open"]

# No default key; bind one in Herdr's config (see the README).
[[actions]]
id = "gate"
title = "Annotate: open here for approval"
description = "Review the focused pane's folder in plannotator-tui with an Approve button, and send the decision to its agent."
contexts = ["workspace", "pane"]
command = ["./bin/plannotator-tui.exe", "herdr", "open", "--gate"]

[[actions]]
id = "last"
title = "Annotate: agent's last message"
Expand Down
Loading