Skip to content

chore: sync upstream herdrdev/herdr (…d2cbcd41) into fork master - #63

Merged
jerryfane merged 146 commits into
masterfrom
sync/upstream-20260817
Aug 17, 2026
Merged

jerryfane merged 146 commits into
masterfrom
sync/upstream-20260817

Conversation

@jerryfane

Copy link
Copy Markdown
Owner

What

Sync 144 upstream commits from the canonical upstream (herdrdev/herdr @ d2cbcd41, byte-identical to ogulcancelik/herdr) into our fork master (dde98842), diverged since b4112743 (Jul 31). Follows the fork's prior sync pattern (PR #27). A single staged merge — not a rebase (fork master is published). Lands on master only; deploying the synced daemon to the fleet is a separate decision.

Conflicts (27) — resolved as the union of every fork feature with upstream's improvements + restructure

  • pty/actor.rs (Windows): unioned the fork's acknowledged-write path with upstream's dedicated-writer-thread + response_order model (routed via a PtyWrite enum); ported the fork's Windows tests.
  • pty/actor/unix.rs: kept both write_user_input_acknowledged (fork) and write_terminal_response (upstream).
  • pane.rs: unioned the fork's event publishers, ack/response writes, output-stream attach/detach + content_seq, and the alt-screen accessors; dropped upstream's now-unused unguarded send_bytes_after (superseded by the fork's guarded variant).
  • app/actions.rs: unioned PaneStateUpdate fields + adopted upstream's 4-arg apply_pane_state_change.
  • remote restructure: upstream split remote.rs → remote/attach.rs + remote/host_unix.rs; re-applied the fork's herdr api-bridge into host_unix.rs (+ its tests).
  • input/model.rs: restored the fork's is_text_commit as a method on upstream's refactored TerminalKey.
  • claude.toml: took upstream's detection improvements, kept the fork's min_engine_version=4 (composer/input rules).
  • .github/workflows/issue-gate.yml: accepted upstream's deletion; took upstream's pr-gate.yml; unioned 9 localized docs.
  • cancel_inactive_streams: removed as superseded — upstream replaced explicit cancellation with a stream_is_running / stream_active atomic-flag lifecycle (same effect).

Fork features preserved (verified present post-merge)

alt-screen fix (#61), pane.stream, pane.set_pty_size, gram channel + files, push/APNs + live-activity, input_pending, api-bridge, composer/is_text_commit.

Local validation (Linux)

cargo build clean · cargo fmt --check clean · cargo clippy --all-targets -- -D warnings 0 errors · cargo nextest run --no-fail-fast → 3645 passed, 0 failed, 1 skipped.

Note: an initial run showed 13 codex detection failures — these were NOT the merge but a stale debris file (~/.config/herdr-dev/agent-detection/codex.toml, dated Aug 1) shadowing the bundled manifest in non-hermetic tests. Proven by: upstream's manifest.rs change being one line (a qwen manifest), and an isolated-config run passing all 27 with the engine untouched. Debris removed; not a code issue.

CI: ubuntu/macos/windows must pass. Deploy deferred.

ogulcancelik and others added 30 commits July 31, 2026 15:40
* feat: support bottom tab bar placement

* fix: preserve mouse cleanup under bottom mode bar

refs herdrdev#2117
…ev#1963)

* fix: report a clear cli error when no herdr server is running

socket cli commands surfaced a raw io::Error debug string
(`Error: Os { code: 2, ... }`) when nothing was listening on the
api socket, which read like a bad --cwd path. map dead-socket
connect failures to a `server_not_running` json error carrying the
resolved socket path, printed once at the edge that surfaces the
error; recovering callers (plugin offline registry fallback, agent
start polling) recognize the marker and keep their existing
behavior.

refs herdrdev#1941

* fix: map dead-socket errors on the unchecked cli request path

refs herdrdev#1941

* fix: make server-not-running guidance session-aware

refs herdrdev#1941
…ev#2145)

point_is_final_atom compared an atom's terminating column against a
word-motion target's starting column. The two are equal for narrow
cells but never for wide ones, so the read window stopped expanding
and copy-mode `e` halted at the soft-wrap boundary on CJK text.

Co-authored-by: Can Celik <[email protected]>
* feat: add antigravity_cli integration harness

Register the `antigravity_cli` target, resolve its configuration
directory to `~/.gemini/antigravity-cli/`, wire target actions,
and add lifecycle hook scripts for Unix and Windows.

* feat: support session resume for antigravity-cli

* fix: correct antigravity-cli hook config path, shape, and agent label

Antigravity CLI reads global customizations from ~/.gemini/config, keys
hooks.json by hook name, and only accepts the matcher/hooks wrapper for
the tool events. The previous install wrote event arrays at the top level
of ~/.gemini/antigravity-cli/hooks.json, which agy never reads and would
reject anyway, so no Herdr hook ever ran.

Session reports were dropped for a third reason: the hooks reported the
agent as antigravity-cli, but the server normalizes that to the canonical
label agy before matching, so is_official_agent_source never matched and
agy --conversation resume was unreachable.

- Resolve the config dir to ~/.gemini/config
- Nest Herdr entries under a Herdr-owned "herdr" block that install
  rewrites and uninstall removes, leaving other named hooks untouched
- Emit grouped entries for PreToolUse/PostToolUse and flat handler lists
  for PreInvocation/PostInvocation/Stop
- Report the canonical agy label from both hook assets and match it in
  agent_resume
- Compile-gate the hook asset constants and stop shadowing $args in the
  PowerShell hook
- Document the real directory, that it must already exist, and the
  named-block behavior

refs herdrdev#1011
refs herdrdev#1571

* fix: make antigravity-cli integration session-only

antigravity cli cannot express lifecycle safely: there is no blocked
event, postinvocation is skipped on interruption, and stop fires at the
end of a turn rather than on process exit, which left stale state and
released authority at the wrong time.

report only the conversation on preinvocation and let screen detection
own agent state. resume via `agy --conversation <id>` is unchanged.

* fix: update antigravity session after conversation switch

---------

Co-authored-by: Can Celik <[email protected]>
…rdev#2165)

* fix(input): decode 0x1f as Ctrl+_ not Ctrl+- per ASCII standard

refs herdrdev#2164

* fix(input): update control-byte matrix test for 0x1f -> Ctrl+_
)

* fix(cli): report non-UTF-8 arguments instead of panicking

* fix(cli): avoid echoing malformed arguments

---------

Co-authored-by: Ogulcan Celik <[email protected]>
…ev#2191)

* fix: page keys scroll pane scrollback at zsh and REPL prompts

PageUp/PageDown were forwarded to the pane whenever DECCKM (application
cursor) was on, assuming only primary-screen pagers enable it, but zsh's
line editor also enables DECCKM, as do REPLs such as python3. The result
was PageUp scrolling shell history instead of Herdr scrollback.

Bracketed paste discriminates the two: it means the app accepts typed or
pasted text at a prompt, so line editors enable it and pagers do not.

* test: update page key state fixture

---------

Co-authored-by: Can Celik <[email protected]>
akbash-bot and others added 26 commits August 12, 2026 22:56
* fix: source title activity glyphs from manifests

refs herdrdev#2707

* fix: simplify manifest-driven title stripping

refs herdrdev#2707

* fix: reconcile handoff title policies

refs herdrdev#2707

* fix: strip claude title spinner frames

refs herdrdev#2707

* fix: keep claude detection manifest unchanged

---------

Co-authored-by: akbash-bot <[email protected]>
Co-authored-by: Ogulcan Celik <[email protected]>
* fix(agent): focus Copilot before prompting

refs herdrdev#1698

Co-authored-by: Copilot <[email protected]>

* test(agent): cover stale focus-reporting state

refs herdrdev#1698

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
…ag (herdrdev#2736)

* fix: keep tab and sidebar clicks when the terminal reports a stray drag

This works around a Ghostty bug that causes herdr tabs to be unclickable
in fullscreen mode.

Ghostty on macOS in native fullscreen emits one motion report after a
fresh press in the strip where the menu bar reveals, with the row
shifted to near the bottom of the grid. The cause is upstream: macOS
delivers one mouse event whose y is nearly a window height away from the
real pointer, and Ghostty reports it as it arrives (iTerm2 and
Terminal.app report the same clicks correctly).

Herdr treated the stray report as a real drag and lost the click two
ways: it opened a tab reorder with no drop target, making the release a
no-op, and it handed the release to the pane under the bogus
coordinates.

Now, a press on the tab bar or sidebar owns the gesture until release,
and a tab drag only starts once the pointer is over a real drop target.

refs herdrdev#796

* fix: scope chrome mouse gestures to their input source

* fix: preserve chrome drag input source

* fix: preserve concurrent chrome presses

---------

Co-authored-by: Ogulcan Celik <[email protected]>
* fix: wait for new pane shell readiness

refs herdrdev#2773

* refactor: share agent startup bounds

refs herdrdev#2773

* fix: reconcile agent names after startup timeout

refs herdrdev#2773

* fix: cover agent cleanup scheduling skew

refs herdrdev#2773

* fix: bound pane shell readiness retries

refs herdrdev#2773

---------

Co-authored-by: akbash-bot <[email protected]>
Co-authored-by: Ogulcan Celik <[email protected]>
* fix: reject prompts to blocked agents

refs herdrdev#2788

* docs: clarify agent prompt timing

refs herdrdev#2788

---------

Co-authored-by: akbash-bot <[email protected]>
Sync 144 upstream commits into jerryfane/herdr, resolving 27 conflicts as
the union of every fork feature with upstream's improvements and restructure.

Rust conflict resolutions:
- pty/actor.rs (Windows): unioned the fork's acknowledged-write path with
  upstream's single dedicated-writer-thread + response_order model, routing
  acks through a PtyWrite command enum; ported the fork's Windows tests.
- pty/actor/unix.rs: kept both write_user_input_acknowledged (fork) and
  write_terminal_response (upstream); added response_order to a test handle;
  adapted a pending_writes assertion to the fork's PendingWrite wrapper.
- pane.rs: unioned publish_input_state_changed_event/publish_agent_process_
  detected_event, write_bytes_acknowledged + write_terminal_response,
  attach/detach_output_stream + content_seq, and the alt-screen accessors;
  dropped upstream's now-unused unguarded send_bytes_after (superseded by the
  fork's guarded variant).
- app/actions.rs: unioned PaneStateUpdate fields (turn/completed_turn +
  suppress_completion) and update_terminal_state bindings; adopted upstream's
  4-arg apply_pane_state_change; dropped orphaned pane-graphics test helpers.
- pane/terminal.rs, terminal/runtime.rs, terminal/mod.rs, terminal/state.rs,
  ui/panes.rs, config.rs, api/server.rs, app/api/agents.rs,
  app/input/navigate.rs, cli/spec.rs: unioned fork accessors/fields/imports
  with upstream renames and signature changes.
- remote: re-applied the fork's `herdr api-bridge` into upstream's new
  host_unix.rs split (upstream restructured remote.rs -> remote/attach.rs +
  remote/host_unix.rs).
- input/model.rs: restored the fork's is_text_commit as a method on upstream's
  refactored TerminalKey (upstream had removed the as_text_commit call sites).

Non-Rust:
- Accepted upstream's deletion of .github/workflows/issue-gate.yml.
- Took upstream's pr-gate.yml (its herdrdev/herdr gate satisfies the fork
  intent of not running owner-automation on the fork).
- Unioned 9 localized docs (fork feature docs + upstream rewrites).
- claude.toml: took upstream's detection improvements, kept the fork's
  min_engine_version=4 (composer/input_rules); codex.toml was upstream-only.

Superseded by upstream restructure (removed, not restored): the fork's
pane-graphics cancel_inactive_streams (upstream replaced it with
RetainedGraphicsOutcome/runtime-active lifecycle; all call sites gone).

Validation: cargo build clean; cargo fmt --check clean; cargo clippy
--all-targets -D warnings clean; cargo nextest 3645 passed / 1 skipped when
run with a hermetic config+state dir. (On this shared box a leftover test
override at ~/.config/herdr-dev/agent-detection/codex.toml pollutes the
non-hermetic manifest tests; not merge-related.)

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Two Windows-only issues the unix/macos CI matrix could not see (both in
#[cfg(windows)] code the merge produced):

1. src/remote.rs: the fork's PlatformCapabilities carried a redundant
   remote_attach field (same value as direct_terminal_attach, both cfg!(unix)).
   The upstream sync adopted upstream's PlatformCapabilities, which has only
   direct_terminal_attach, so the #[cfg(windows)] run_api_client_bridge stub's
   debug_assert referenced a dropped field (E0609). 1:1 rename to the equivalent
   upstream field; Windows semantics unchanged (both false on Windows).

2. src/pty/actor.rs: the merged Windows writer thread binds 'let mut writer'
   but only moves it into run_writer_loop (which owns its own mut writer param),
   so the outer mut is dead — unused_mut, denied under -D warnings. Dropped it.
@jerryfane
jerryfane force-pushed the sync/upstream-20260817 branch from 60c920d to 5f8f3c5 Compare August 17, 2026 19:34
@jerryfane
jerryfane merged commit 80682ba into master Aug 17, 2026
12 of 13 checks passed
@jerryfane
jerryfane deleted the sync/upstream-20260817 branch October 22, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.