diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-10 23:46:07 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-10 23:46:07 +0300 |
| commit | 0b49448e1230f5727614ec36ad56921629f9d348 (patch) | |
| tree | 9ceb4314b1198ac89963fd47828b2bc8223cf0b7 /website/src | |
| parent | f4d04fab26d8b8733868b8e394439b69ed83df75 (diff) | |
docs: finalize release docs and add runtime blog
Diffstat (limited to 'website/src')
| -rw-r--r-- | website/src/content/blog/coding-agents-are-becoming-runtimes.md | 174 | ||||
| -rw-r--r-- | website/src/content/docs/agents.mdx | 88 | ||||
| -rw-r--r-- | website/src/content/docs/cli-reference.mdx | 44 | ||||
| -rw-r--r-- | website/src/content/docs/concepts.mdx | 2 | ||||
| -rw-r--r-- | website/src/content/docs/configuration.mdx | 28 | ||||
| -rw-r--r-- | website/src/content/docs/index.mdx | 9 | ||||
| -rw-r--r-- | website/src/content/docs/install.mdx | 32 | ||||
| -rw-r--r-- | website/src/content/docs/integrations.mdx | 103 | ||||
| -rw-r--r-- | website/src/content/docs/persistence-remote.mdx | 4 | ||||
| -rw-r--r-- | website/src/content/docs/quick-start.mdx | 2 | ||||
| -rw-r--r-- | website/src/content/docs/session-state.mdx | 10 | ||||
| -rw-r--r-- | website/src/content/docs/socket-api.mdx | 130 | ||||
| -rw-r--r-- | website/src/content/docs/windows-beta.mdx | 97 |
13 files changed, 648 insertions, 75 deletions
diff --git a/website/src/content/blog/coding-agents-are-becoming-runtimes.md b/website/src/content/blog/coding-agents-are-becoming-runtimes.md new file mode 100644 index 00000000..ae2fb0a2 --- /dev/null +++ b/website/src/content/blog/coding-agents-are-becoming-runtimes.md @@ -0,0 +1,174 @@ +--- +title: Coding agents are becoming runtimes +description: Coding agent CLIs are becoming developer infrastructure. Project instructions, lifecycle state, hooks, and terminal runtimes need shared contracts. +date: 2026-06-10 +draft: false +--- + +Coding agents have crossed an important line. + +They started as chat interfaces that could edit code. Now they live inside repositories, terminals, editors, CI jobs, remote machines, mobile shells, multiplexers, and custom harnesses. They read project instructions. They run commands. They ask for permission. They spawn subagents. They pause, resume, compact, fail, recover, and keep working while the developer does something else. + +That shape is familiar. + +**This is runtime behavior.** + +The model can be proprietary. The hosted API can be proprietary. The subscription can be priced however the lab needs to price it. That part belongs to the companies building the models. + +But the CLI that runs inside a developer's terminal is part of the developer environment. It sits next to shells, language servers, package managers, test runners, terminals, editors, and multiplexers. Developers will compose it with the rest of their tools whether vendors plan for that or not. + +**That is where the industry needs to be more careful.** + +## We have seen this drift before + +Software already has too many places where the same idea fractured into incompatible files and conventions. + +JavaScript has `package.json`, then layers of package-manager lockfiles and workspace formats. Rust has `Cargo.toml`, which is refreshingly predictable. Python has lived through `requirements.txt`, `setup.py`, `setup.cfg`, `Pipfile`, `poetry.lock`, `pyproject.toml`, and tool-specific sections inside the same TOML file. Editors have their own settings. CI systems have their own YAML. Formatters and linters each add another little contract. + +Some of that is natural. Tools have different jobs. + +But the cost is real. Every repository becomes a map of overlapping conventions. Every new tool needs to learn which file matters, which one wins, and which one is legacy but still active. + +Agent CLIs are young enough that we can avoid repeating the worst version of that. + +Project instructions are the clearest example. [AGENTS.md](https://agents.md/) is trying to give coding agents one predictable place to read repository guidance. It describes itself as "a simple, open format for guiding coding agents" and says it is used by more than 60,000 open-source projects. + +The shape is simple: + +```text +one repository +one shared instruction file +many coding agents +``` + +Claude Code still stays on [`CLAUDE.md`, not `AGENTS.md`](https://docs.anthropic.com/en/docs/claude-code/memory#agents-md). The official workaround is to create a `CLAUDE.md` that imports `AGENTS.md`, or to symlink one file to the other. + +That workaround works, and it is how standards drift begins. + +First there is one extra file. Then every agent has a native file. Then every repository grows a compatibility layer. Then teams spend time keeping duplicated intent in sync. + +Nobody loses a production database because a repo has two instruction files. The cost is smaller and more constant: duplicated intent, stale guidance, and another convention every tool has to learn. + +## The terminal is the shared surface + +There is another debate happening around access and harnesses. + +Coding agents made per-token pricing feel very different. A chat session can be expensive. A coding agent can run tools, read files, loop, spawn work, and burn through a lot more context. So the labs started selling subscriptions with usage limits: some explicit, some soft, some hourly, some weekly, some hard to reason about from the outside. + +Then developers started doing what developers always do. They put the model behind the harness they preferred. + +That is where the Claude ecosystem became a useful case study. People used Claude subscriptions through third-party harnesses such as OpenClaw and OpenCode. Anthropic pushed back. Today Anthropic documents that [Claude Code can use Pro and Max subscriptions](https://support.claude.com/en/articles/11145838-use-claude-code-with-your-pro-or-max-plan), while [Claude paid plans and API access are separate products](https://support.claude.com/en/articles/9876003-i-have-a-paid-claude-subscription-pro-max-team-or-enterprise-plans-why-do-i-have-to-pay-separately-to-use-the-claude-api-and-console). Anthropic also introduced a separate [Agent SDK credit](https://support.claude.com/en/articles/15036540-use-the-claude-agent-sdk-with-your-claude-plan) for programmatic and third-party Agent SDK usage. Zed summarized the practical effect well: first-party Claude usage and third-party agent or SDK usage now draw from different pools. + +Anthropic can make that decision. They own the API. They own the subscription terms. Compute is expensive, and a first-party interactive CLI has different economics from arbitrary programmatic harnesses running through an SDK or protocol adapter. + +The developer-tooling question remains. + +> What does a developer actually own: the subscription, the API spend, the model access, or the runtime where the agent works? + +When an agent runs in a terminal, it is no longer only a hosted product experience. It is a process in a developer environment. Developers will put that process in Herdr, Zed, tmux, SSH sessions, CI jobs, containers, and scripts. They will supervise it. They will route it. They will build workflows around it. + +**The terminal is where ownership gets shared.** + +That does not mean vendors lose the right to build first-party experiences. It means the CLI surface needs stable contracts because it has become infrastructure other tools depend on. + +## Hooks are a symptom + +Hooks show the same tension. + +Most serious agent CLIs have hooks, plugins, or extensions now. That is good. The problem is that "hooks" can mean almost anything. + +Some hooks are policy gates. Some are notifications. Some modify tool calls. Some inject context. Some observe messages. Some run at session boundaries. Some run around tools but miss interruptions, permission resolutions, or the exact state an external supervisor needs. + +This matters because agent work is no longer a single request and response. A coding agent has a lifecycle. + +For external tools, the minimum lifecycle is small: + +```text +working -> actively doing work +blocked -> needs permission, input, recovery, or attention +idle -> ready for the next instruction +``` + +The concrete shape could be small: + +```json +{ + "session_id": "abc123", + "state": "blocked", + "reason": "permission_request", + "source": "agent" +} +``` + +Permission prompts, failed tools, interrupted generations, automated reviews, subagent handoffs, and waiting for the user all need to land somewhere coherent. + +Claude Code has a serious hook system, and Codex has its own shape too. The problem is not that these tools do nothing. The problem is that each agent defines its own boundary. A hook surface can be powerful and still fail to provide a portable lifecycle contract. + +OpenCode is closer to the shape orchestration tools need. Its [plugin documentation](https://opencode.ai/docs/plugins/) exposes session-level events such as `session.idle`, `session.status`, `session.error`, `permission.asked`, and `permission.replied`. + +pi, meanwhile, treats extensibility as a broader system. Its [extension documentation](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/extensions.md) describes TypeScript extensions that can subscribe to lifecycle events, register tools, add commands, intercept behavior, render UI, persist state, and hot-reload from local extension directories. + +Those designs are worth praising because they treat the agent as something other tools can understand. + +## What Herdr sees from below + +**Herdr sits below the agent.** + +It owns terminal panes. It keeps processes alive. It lets developers switch between agents, inspect them, recover sessions, and operate multiple agent processes as one workspace. + +From that layer, runtime drift becomes very visible. + +Herdr's first useful agent detection path was screen reading. If an agent drew "working", "waiting for approval", or "done" in the terminal, Herdr could read the terminal state and classify the pane. + +That matched what humans saw, which made it useful. It also broke when agent UIs changed. If the fix lived inside the Herdr binary, users needed a full Herdr update just to recognize a new prompt or status line. + +Another tempting signal was terminal activity. + +```text +screen changing -> probably working +screen still -> maybe idle or blocked +``` + +Real agents break that quickly. A spinner can redraw while the meaningful state is blocked. A permission prompt can sit still while it is the most important thing in the pane. A subagent can produce activity while the parent session is waiting. + +Terminal activity is evidence. Lifecycle is stronger. + +Herdr now uses better signals where agents expose them, keeps screen evidence as a fallback, and ships hot-reloadable detection manifests so compatibility fixes do not always require a new Herdr binary. That is the practical bridge for today's ecosystem. The durable contract should come from agents themselves. + +## Runtime support should be visible + +Herdr can support agents in two broad ways. + +Some agents expose reliable lifecycle signals. Those can have verified lifecycle support. + +Other agents require observed detection through terminal output, screen evidence, manifests, and heuristics. That can work well, but it depends on UI behavior staying recognizable. + +Herdr will publish this as a per-agent support matrix: which agents expose verified lifecycle signals, and which agents require observed detection. + +**This distinction should be public because it helps everyone.** + +Users get honest expectations. Agent authors get a target. Tool builders get a vocabulary. The ecosystem rewards agents that expose their runtime state cleanly. + +The goal is not to force every agent to use the same plugin system. The goal is to standardize the parts that should never have been product differentiation. + +## The ask + +**Standardize the boring parts.** + +Use one predictable project instruction format. Expose a small lifecycle contract. Make permission state observable. Make interruption state observable. Tie state to the session that is actually running. Document what external tools can rely on. + +Keep competing on models, UX, planning, context management, speed, pricing, safety, and taste. + +Do not compete on whether a repository needs five instruction files. + +Do not compete on whether an external tool can tell if an agent is blocked. + +Do not make every terminal runtime reverse-engineer every other terminal runtime. + +Coding agents are becoming infrastructure. The companies building them still own their products, but developers own their environments. + +Herdr is built from that position. The terminal is where these agents actually run. The runtime surface belongs to the developer workflow, and vendors share that space whether they design for it or not. + +The better future is simple: agents should make their basic contracts visible, durable, and boring. + +Then the rest of us can build. diff --git a/website/src/content/docs/agents.mdx b/website/src/content/docs/agents.mdx index d224e37b..49f64881 100644 --- a/website/src/content/docs/agents.mdx +++ b/website/src/content/docs/agents.mdx @@ -7,39 +7,71 @@ Herdr is built for running more than one coding agent at a time. Each agent stay ## Supported agents -Automatic detection works out of the box for common coding agents. +Automatic detection works out of the box for common coding agents. The important difference is not whether Herdr can see an agent. It is which signal is allowed to author `idle`, `working`, and `blocked`. -| Agent | Idle / done | Working | Blocked | -| --- | --- | --- | --- | -| Pi | yes | yes | partial | -| Claude Code | yes | yes | yes | -| Codex | yes | yes | yes | -| Droid | yes | yes | yes | -| Amp | yes | yes | yes | -| OpenCode | yes | yes | yes | -| Grok CLI | yes | yes | yes | -| Hermes Agent | yes | yes | yes | -| Kilo Code CLI | yes | yes | yes | -| Cursor Agent | yes | yes | yes | -| Antigravity CLI | yes | yes | yes | -| Kimi Code CLI | yes | yes | yes | -| Kiro CLI | yes | yes | no | -| GitHub Copilot CLI | yes | yes | yes | -| Qoder CLI | yes | yes | yes | +| Agent | State authority | Integration role | +| --- | --- | --- | +| Pi | lifecycle hooks when installed; otherwise screen manifest | state and session | +| OMP | lifecycle hooks when installed | state | +| GitHub Copilot CLI | screen manifest | session | +| Kimi Code CLI | lifecycle hooks when installed; otherwise screen manifest | state and session | +| Hermes Agent | lifecycle hooks when installed; otherwise screen manifest | state and session | +| Qoder CLI | screen manifest | session | +| Droid | screen manifest | session | +| OpenCode | lifecycle plugin when installed; otherwise screen manifest | state and session | +| Kilo Code CLI | lifecycle plugin when installed; otherwise screen manifest | state and session | +| Claude Code | screen manifest | session | +| Codex | screen manifest | session | +| Cursor Agent CLI | screen manifest | session | +| Amp | screen manifest | none | +| Grok CLI | screen manifest | none | +| Antigravity CLI | screen manifest | none | +| Kiro CLI | screen manifest | none | -Detected but less thoroughly tested: Gemini CLI and Cline. +Detected but less thoroughly tested: Gemini CLI and Cline. Unsupported agents still run normally as terminal processes. They just may not get rich state unless you add an integration or report state over the socket API. -Unsupported agents still run normally as terminal processes. They just may not get rich state unless you add an integration or report state over the socket API. +## Status authority -## How detection works +Herdr first detects the foreground process in each pane. After that, each pane has one status authority. -Herdr combines three signals: +For agents with complete lifecycle hooks, the integration is authoritative when it is installed and actively reporting for the running pane. Herdr uses those hook reports for `idle`, `working`, `blocked`, and session identity. It does not also run screen manifest fallback for that same lifecycle authority. This avoids two competing sources of truth. -1. foreground process detection -2. terminal output heuristics -3. integration session identity or state reports +For agents without complete lifecycle hooks, Herdr identifies the foreground process and reads the live bottom-buffer screen snapshot. It evaluates TOML manifests against that snapshot to classify `idle`, `working`, and `blocked`. For agents that emit them, manifests can also match terminal title and progress (OSC) sequences as detection evidence; when that evidence is absent, screen rules carry detection on their own. -Process detection tells Herdr which pane owns an agent. Heuristics infer native agent state from terminal screen snapshots. Claude Code, Codex, and OpenCode integrations provide session identity for restore; Pi, OMP, GitHub Copilot CLI, Hermes Agent, Qoder CLI, and custom socket integrations can report state when they define state outside the native terminal UI. +The screen snapshot comes from the recent bottom of the pane buffer, not the scrolled viewport. If you scroll back in Herdr, detection still follows the live agent UI at the bottom. + +Claude Code, Codex, GitHub Copilot CLI, Droid, Qoder CLI, and Cursor Agent CLI integrations are intentionally not lifecycle authorities. They provide native session identity for restore, but their hooks do not cover the whole lifecycle. They can miss permission approval results, escape interrupts, or other transitions. For those agents, Herdr still uses screen manifest detection. + +## Blocked state + +Blocked detection is deliberately strict for screen-manifest agents. Herdr only marks `blocked` when the live bottom-buffer snapshot matches known visible approval, question, or permission UI. If no manifest rule matches for a known agent, Herdr falls back to `idle` and labels that fallback as `default_known_agent_idle_fallback` in explain output. + +This means unusual new agent prompts may initially show as `idle` instead of `blocked` until Herdr learns that screen shape. Those interactions should not make Herdr send input or take destructive action; they only affect the visible status and waits. + +## Detection manifests + +Bundled manifests live inside Herdr. Herdr also checks herdr.dev for remote manifest updates and applies valid per-agent rule updates automatically without requiring a Herdr restart. Remote manifests are stored in Herdr's state directory. + +Local overrides can replace a remote or bundled manifest from the platform config directory: + +```text +~/.config/herdr/agent-detection/<agent>.toml +``` + +Local overrides always win. Without a local override, Herdr uses the newer compatible manifest between the cached remote manifest and the bundled manifest in the running binary. On debug builds, the same config helper may use a development directory such as `herdr-dev`. Invalid override files are ignored with a warning and Herdr falls back to the cached remote or bundled manifest for that agent. + +Remote manifests patch detection rules for agents Herdr already knows how to identify. Adding a completely new agent still requires a Herdr binary update for process detection, labels, and integration behavior. + +The running server loads active manifests into memory on startup. Automatic remote manifest updates reload that in-memory cache after new rules are written. Run `herdr server update-agent-manifests` to fetch remote manifest updates immediately and reload the running server. After editing a local override manually, restart Herdr or run `herdr server reload-agent-manifests` to apply the file to the running server. + +Use `herdr agent explain` when a pane shows the wrong state: + +```bash +herdr agent explain <target> +herdr agent explain --file screen.txt --agent codex --json +``` + +Live explain is evaluated by the running server, so it reflects the active manifest cache. The explain output shows the agent, final state, whether screen detection was skipped by a full lifecycle authority, manifest source and version, cached remote version, local override shadowing, remote update status, matched rule, visible evidence flags, matcher and region evidence for evaluated rules, skipped-update reason for transcript viewers, and the idle fallback reason when no rule matched. Herdr can run inside tmux as the outer terminal environment. Agent detection does not inspect tmux sessions launched inside a Herdr pane. If a shell framework auto-enters tmux inside Herdr, Herdr sees `tmux` as the pane process instead of the agent behind it. @@ -61,7 +93,11 @@ herdr integration install omp herdr integration install claude herdr integration install codex herdr integration install copilot +herdr integration install cursor +herdr integration install droid +herdr integration install kimi herdr integration install opencode +herdr integration install kilo herdr integration install hermes herdr integration install qodercli ``` diff --git a/website/src/content/docs/cli-reference.mdx b/website/src/content/docs/cli-reference.mdx index dd68c0e5..32baa746 100644 --- a/website/src/content/docs/cli-reference.mdx +++ b/website/src/content/docs/cli-reference.mdx @@ -1,6 +1,6 @@ --- title: CLI reference -description: Herdr commands for sessions, workspaces, tabs, panes, agents, waits, integrations, and status. +description: Herdr commands for sessions, workspaces, tabs, panes, notifications, agents, waits, integrations, and status. --- Herdr’s CLI talks to the running server over the same local socket API used by integrations and agents. @@ -21,7 +21,7 @@ herdr update # download and install from the configured channel herdr update --handoff # opt into live handoff for supported running servers herdr channel show # print stable or preview herdr channel set preview # opt into preview builds -herdr channel set stable # return to stable releases +herdr channel set stable # return Linux/macOS direct installs to stable herdr --version # print version ``` @@ -39,9 +39,20 @@ herdr status client herdr server herdr server stop herdr server reload-config +herdr server agent-manifests [--json] +herdr server update-agent-manifests [--json] +herdr server reload-agent-manifests ``` -`herdr server` runs the headless server explicitly. Use it for supervised or service-style setups. `reload-config` applies reloadable settings without restarting panes. +`herdr server` runs the headless server explicitly. Use it for supervised or service-style setups. `reload-config` applies reloadable settings without restarting panes. `agent-manifests` shows the active agent detection manifest sources, cached remote versions, and last remote update results. `update-agent-manifests` fetches remote manifest updates immediately, reloads them into the running server, and prints the updated manifest status; pass `--json` for the raw status response. `reload-agent-manifests` reloads agent detection manifests into the running server after local override edits. + +## Notifications + +```bash +herdr notification show <title> [--body TEXT] [--position top-left|top-right|bottom-left|bottom-right] [--sound none|done|request] +``` + +`notification show` uses the configured `[ui.toast]` delivery. `--position` only affects in-app Herdr toasts. `--sound` defaults to `none`; `done` and `request` play the existing finished and needs-attention sounds only when the notification is shown. ## Sessions @@ -100,15 +111,23 @@ herdr tab close <tab_id> ```bash herdr pane list [--workspace <workspace_id>] herdr pane get <pane_id> +herdr pane layout [--pane ID|--current] +herdr pane neighbor --direction left|right|up|down [--pane ID|--current] +herdr pane edges [--pane ID|--current] +herdr pane focus --direction left|right|up|down [--pane ID|--current] +herdr pane resize --direction left|right|up|down [--amount FLOAT] [--pane ID|--current] +herdr pane zoom [<pane_id>|--pane ID|--current] [--toggle|--on|--off] herdr pane rename <pane_id> <label>|--clear -herdr pane split <pane_id> --direction right|down [--cwd PATH] [--focus] [--no-focus] +herdr pane split [<pane_id>|--pane ID|--current] --direction right|down [--ratio FLOAT] [--cwd PATH] [--focus] [--no-focus] +herdr pane swap --direction left|right|up|down [--pane ID|--current] +herdr pane swap --source-pane ID --target-pane ID herdr pane close <pane_id> ``` Read output: ```bash -herdr pane read <pane_id> [--source visible|recent|recent-unwrapped] [--lines N] +herdr pane read <pane_id> [--source visible|recent|recent-unwrapped|detection] [--lines N] herdr pane read <pane_id> --source visible --ansi herdr pane read <pane_id> --source recent-unwrapped --lines 120 ``` @@ -164,19 +183,23 @@ herdr pane report-metadata <pane_id> \ ```bash herdr agent list herdr agent get <target> -herdr agent read <target> [--source visible|recent|recent-unwrapped] [--lines N] [--format text|ansi] [--ansi] +herdr agent read <target> [--source visible|recent|recent-unwrapped|detection] [--lines N] [--format text|ansi] [--ansi] herdr agent send <target> <text> herdr agent rename <target> <name>|--clear herdr agent focus <target> herdr agent wait <target> --status <idle|working|blocked|unknown> [--timeout MS] herdr agent attach <target> [--takeover] herdr agent start <name> [--cwd PATH] [--workspace ID] [--tab ID] [--split right|down] [--focus|--no-focus] -- <argv...> +herdr agent explain <target> [--json|--verbose] +herdr agent explain --file PATH --agent LABEL [--json|--verbose] ``` Agent targets can be terminal IDs, unique agent names, detected or reported agent labels, or legacy pane IDs. Names and labels are agent identities. Terminal IDs and legacy pane IDs are low-level escape hatches. `agent read` reads the resolved terminal stream. `agent send` writes literal text to that stream. `agent get`, `agent focus`, `agent wait`, and `agent attach` require the resolved terminal to have agent identity. `agent rename` can assign that identity. +`agent explain` asks the running server to classify the same bottom-buffer detection snapshot used by screen detection, so live output reflects the server's active manifest cache. Because this uses the `agent.explain` socket method, restart or hand off to an updated server after upgrading Herdr before using live explain. Use `--file PATH --agent LABEL` to explain a saved fixture locally instead. The default output shows the agent, final state, manifest source and version, matched rule with its region evidence, and any fallback, skip, or warning reasons. Add `--verbose` for visible evidence flags, cached remote version, local override shadowing, remote update status, and the full evaluated-rules list with matcher and region evidence. Add `--json` for issue reports or tests. + Use `pane send-text`, `pane send-keys`, `pane run`, and `terminal attach` for ordinary terminals, servers, tests, shells, or low-level terminal control. Use `pane run` when you want to submit a command with Enter. ## Direct terminal attach @@ -211,17 +234,25 @@ herdr integration install omp herdr integration install claude herdr integration install codex herdr integration install copilot +herdr integration install droid +herdr integration install kimi herdr integration install opencode +herdr integration install kilo herdr integration install hermes herdr integration install qodercli +herdr integration install cursor herdr integration uninstall pi herdr integration uninstall omp herdr integration uninstall claude herdr integration uninstall codex herdr integration uninstall copilot +herdr integration uninstall droid +herdr integration uninstall kimi herdr integration uninstall opencode +herdr integration uninstall kilo herdr integration uninstall hermes herdr integration uninstall qodercli +herdr integration uninstall cursor herdr integration status [--outdated-only] ``` @@ -232,6 +263,7 @@ herdr integration status [--outdated-only] | `visible` | Current rendered screen. Best for UI feedback loops. | | `recent` | Recent scrollback with terminal wrapping. | | `recent-unwrapped` | Recent scrollback without soft wrapping. Best for logs. | +| `detection` | Bottom-buffer snapshot used by agent screen detection. | ## Environment variables diff --git a/website/src/content/docs/concepts.mdx b/website/src/content/docs/concepts.mdx index b1a7908f..3c3d7849 100644 --- a/website/src/content/docs/concepts.mdx +++ b/website/src/content/docs/concepts.mdx @@ -25,7 +25,7 @@ Panes can be split right or down. They can be renamed manually, read from the CL ## Agent -An agent is a process Herdr recognizes inside a pane. Herdr detects agents from foreground processes, screen heuristics, and optional integrations. +An agent is a process Herdr recognizes inside a pane. Herdr detects agents from foreground processes, screen manifests, and optional integrations. Agent states are: diff --git a/website/src/content/docs/configuration.mdx b/website/src/content/docs/configuration.mdx index b174cb42..e9fa2d02 100644 --- a/website/src/content/docs/configuration.mdx +++ b/website/src/content/docs/configuration.mdx @@ -35,7 +35,7 @@ onboarding = false ## Update channel -Direct installs use the stable update channel by default. +Linux and macOS direct installs use the stable update channel by default. Windows beta installs default to preview and cannot switch to stable until stable Windows releases are available. ```toml [update] @@ -83,7 +83,7 @@ Set the working directory policy for new panes, tabs, and workspaces: new_cwd = "follow" ``` -`new_cwd = "follow"` keeps the default behavior and inherits the source pane or workspace. Use `"home"` to always start in `$HOME`, `"current"` to use Herdr's process directory, or a fixed path such as `"~/Projects"`. Explicit `--cwd` values from the CLI or socket API still take precedence. +`new_cwd = "follow"` keeps the default behavior and inherits the source pane or workspace. When there is no source workspace, Herdr starts in `$HOME`. Use `"home"` to always start in `$HOME`, `"current"` to use Herdr's process directory, or a fixed path such as `"~/Projects"`. Explicit `--cwd` values from the CLI or socket API still take precedence. ## Worktrees @@ -160,6 +160,10 @@ focus_pane_left = "prefix+h" focus_pane_down = "prefix+j" focus_pane_up = "prefix+k" focus_pane_right = "prefix+l" +swap_pane_left = "prefix+shift+h" +swap_pane_down = "prefix+shift+j" +swap_pane_up = "prefix+shift+k" +swap_pane_right = "prefix+shift+l" cycle_pane_next = "prefix+tab" cycle_pane_previous = "prefix+shift+tab" last_pane = "" @@ -288,7 +292,7 @@ Set `right_click_passthrough_modifier = "ctrl"` if you want Ctrl-right-click, ho Set `redraw_on_focus_gained = false` to avoid the visible full-screen refresh when switching back to Herdr. The default is `true` because a full redraw recovers from rare stale or dirty host terminal surfaces. -Set `mouse_scroll_lines` to change how many pane scrollback lines each mouse wheel notch scrolls. The default is 3. Pane apps that request mouse reporting still receive wheel events directly. +Set `mouse_scroll_lines` to change how many pane scrollback lines each mouse wheel notch scrolls. The default is 3. Pane apps that request mouse reporting still receive wheel events directly. Alternate-screen apps have no scrollback to scroll; see [Scrollback](#scrollback). Set `show_agent_labels_on_pane_borders = true` if you want detected agent labels in split pane borders when no manual pane label is set. @@ -299,11 +303,19 @@ Herdr can show popup notifications when agents finish or need input. ```toml [ui.toast] delivery = "off" +delay_seconds = 1 + +[ui.toast.herdr] +position = "bottom-right" + +[ui.toast.clipboard] +enabled = true +position = "bottom-center" ``` `delivery = "off"` disables popup notifications. This is the default. -`delivery = "herdr"` shows a top-right toast inside the Herdr UI. Click the toast, or bind `keys.open_notification_target`, to focus the target workspace, tab, and pane. +`delivery = "herdr"` shows a toast inside the Herdr UI. Click the toast, or bind `keys.open_notification_target`, to focus the target workspace, tab, and pane. Set `ui.toast.herdr.position` to `top-left`, `top-right`, `bottom-left`, or `bottom-right`; desktop positions are relative to the full Herdr frame. `delivery = "terminal"` asks the outer terminal to show a desktop notification. Herdr sends terminal notification escape sequences for Ghostty, iTerm2, Kitty, and WezTerm. This is useful over SSH because the local terminal owns the notification. @@ -311,6 +323,10 @@ delivery = "off" Popup notifications are for background attention. Herdr suppresses popups for the active tab. +`delay_seconds` waits before sending finished or needs-input agent notifications. Herdr notifies only if the pane is still in the same state when the delay expires. Set it to `0` for instant notifications. Valid values are `0` through `3600`. + +Clipboard feedback is configured separately because it confirms a foreground copy action and is never sent through terminal or system delivery. Set `ui.toast.clipboard.enabled = false` to hide the copied-to-clipboard popup. Clipboard positions are `top-left`, `top-center`, `top-right`, `bottom-left`, `bottom-center`, and `bottom-right`. + ## Sound Sound notifications are enabled by default and are played by the local Herdr client. @@ -354,6 +370,8 @@ scrollback_limit_bytes = 10485760 Existing panes keep their current buffer until they are recreated. +Panes only show a scrollbar when the app writes to the primary screen. Full-screen apps that switch to the alternate screen (vim, htop, Claude Code with `CLAUDE_CODE_NO_FLICKER=1`) produce no scrollback, so no scrollbar appears and wheel events are routed to the app instead. Scroll with the app's own keys or UI. + ## Pane screen history By default, full session restart restores workspaces, tabs, panes, cwd, layout, and focus without saving pane contents. @@ -402,7 +420,7 @@ Herdr can restart supported agent panes in their native conversation sessions af resume_agents_on_restore = true ``` -This is enabled by default. Herdr only resumes panes that reported a native session reference through an official Herdr integration. Supported resume targets are Claude Code, Codex, GitHub Copilot CLI, Pi, Hermes Agent, and OpenCode. Unsupported, missing, invalid, duplicated, or stale session references restore as a normal shell in the saved pane directory. +This is enabled by default. Herdr only resumes panes that reported a native session reference through an official Herdr integration. Supported resume targets are Claude Code, Codex, Cursor Agent CLI, GitHub Copilot CLI, Droid, Kimi Code CLI, Qoder CLI, Pi, Hermes Agent, OpenCode, and Kilo Code CLI. Unsupported, missing, invalid, duplicated, or stale session references restore as a normal shell in the saved pane directory. Session references are stored in the local Herdr session snapshot. They are not shown in normal pane, agent, status, or event output. diff --git a/website/src/content/docs/index.mdx b/website/src/content/docs/index.mdx index f21ec902..eadb3920 100644 --- a/website/src/content/docs/index.mdx +++ b/website/src/content/docs/index.mdx @@ -23,11 +23,18 @@ curl -fsSL https://herdr.dev/install.sh | sh herdr ``` +On Windows preview beta: + +```powershell +powershell -ExecutionPolicy Bypass -c "irm https://herdr.dev/install.ps1 | iex" +herdr +``` + ## Start here <CardGrid> <Card title="Install"> - Install Herdr on Linux or macOS, update it later, and verify the binary. + Install stable Herdr on Linux/macOS or the Windows preview beta, update it later, and verify the binary. [Install Herdr →](/docs/install/) </Card> diff --git a/website/src/content/docs/install.mdx b/website/src/content/docs/install.mdx index c23ffee8..e64e9c7d 100644 --- a/website/src/content/docs/install.mdx +++ b/website/src/content/docs/install.mdx @@ -1,19 +1,25 @@ --- title: Install Herdr -description: Install, update, and verify Herdr on Linux and macOS. +description: Install, update, and verify Herdr on Linux, macOS, and Windows beta. --- -Herdr ships as a single binary for Linux and macOS. +Herdr ships stable binaries for Linux and macOS. Native Windows support is preview-only beta. ## Install -Run the installer: +On Linux or macOS, run: ```bash curl -fsSL https://herdr.dev/install.sh | sh ``` -The installer downloads the right release binary for your platform and places it on your PATH. +On Windows preview beta, install the preview channel: + +```powershell +powershell -ExecutionPolicy Bypass -c "irm https://herdr.dev/install.ps1 | iex" +``` + +The installer downloads the right release binary for your platform and places it on your PATH. The Windows installer defaults to preview, writes that channel to Herdr's config, uses versioned install folders, and updates a `current` junction, so updates do not need to overwrite a running `herdr.exe`. ## Install with Homebrew @@ -53,13 +59,13 @@ herdr update `herdr update` is for installs managed by Herdr's own installer. Homebrew, mise, and Nix installs are updated through those package managers instead. -Herdr uses the stable update channel by default. To opt into preview builds from `master`, set the channel: +On Linux and macOS, Herdr uses the stable update channel by default. To opt into preview builds from `master`, set the channel: ```bash herdr channel set preview ``` -Switch back to stable the same way: +Switch Linux and macOS direct installs back to stable the same way: ```bash herdr channel set stable @@ -69,6 +75,8 @@ For direct installs, changing channels also checks that channel and installs its Preview builds are GitHub prereleases published from the current development branch. They are useful when you want fixes before the next stable release, but they can regress. Homebrew, mise, and Nix installs do not use the preview channel. +Windows beta builds are preview-only for now. `herdr channel set stable` is rejected on Windows until stable Windows releases are available. + By default, `herdr update` installs the new binary and leaves compatible running sessions alone. If an update changes Herdr's client/server protocol, Herdr asks whether to stop the old server after installing. Stop the old server to use the new version. Stopping exits pane processes. For the default session, run `herdr server stop`, then run `herdr` again. For a named session, run `herdr session stop <name>`, then run `herdr session attach <name>` again. To opt into experimental live server handoff for supported running sessions, run: @@ -123,13 +131,21 @@ Choose the asset that matches your system: | macOS Intel | `herdr-macos-x86_64` | | macOS Apple silicon | `herdr-macos-aarch64` | -Make it executable and move it somewhere on your PATH. +On Linux or macOS, make it executable and move it somewhere on your PATH. ```bash chmod +x herdr-linux-x86_64 mv herdr-linux-x86_64 ~/.local/bin/herdr ``` +### Windows beta downloads + +Windows binaries are published only on preview releases while native Windows support is in beta. Use the preview installer above for normal testing, or download the Windows asset from a preview GitHub prerelease: + +| System | Asset | +| --- | --- | +| Windows x86_64 beta | `herdr-windows-x86_64.exe` | + ## Requirements -Stable Herdr releases support Linux and macOS. Native Windows builds are preview-only beta releases; stable users on Windows should use Herdr inside WSL for now. +Stable Herdr releases support Linux and macOS. Native Windows builds are preview-only beta releases; see [Windows beta](/docs/windows-beta/) for supported workflows and known limitations. diff --git a/website/src/content/docs/integrations.mdx b/website/src/content/docs/integrations.mdx index 9ef4a53b..d4181e35 100644 --- a/website/src/content/docs/integrations.mdx +++ b/website/src/content/docs/integrations.mdx @@ -1,11 +1,11 @@ --- title: Integrations -description: Install Herdr integrations for Pi, OMP, Claude Code, Codex, GitHub Copilot CLI, OpenCode, Hermes Agent, and Qoder CLI. +description: Install Herdr integrations for Pi, OMP, Claude Code, Codex, GitHub Copilot CLI, Droid, Kimi Code CLI, OpenCode, Kilo Code CLI, Hermes Agent, Qoder CLI, and Cursor Agent CLI. --- -Herdr detects supported agents automatically. Official integrations can add native session identity for restore, semantic state reports, or both. Claude Code, Codex, and OpenCode state comes from screen detection even when their session identity integrations are installed. +Herdr detects supported agents automatically. Official integrations can add native session identity for restore, lifecycle state reports, or both. -Use integrations when you want native agent session restore, direct state reports from Pi/OMP/Copilot/Hermes/Qoder-style hooks or plugins, or both. +Use integrations when you want native agent session restore, direct lifecycle reports from Pi/OMP/Copilot/OpenCode/Kilo/Hermes-style hooks or plugins, or both. See [Agents](/docs/agents/) for the full status authority model. ## Install integrations @@ -17,9 +17,13 @@ herdr integration install omp herdr integration install claude herdr integration install codex herdr integration install copilot +herdr integration install droid +herdr integration install kimi herdr integration install opencode +herdr integration install kilo herdr integration install hermes herdr integration install qodercli +herdr integration install cursor ``` ## Uninstall integrations @@ -30,26 +34,29 @@ herdr integration uninstall omp herdr integration uninstall claude herdr integration uninstall codex herdr integration uninstall copilot +herdr integration uninstall droid +herdr integration uninstall kimi herdr integration uninstall opencode +herdr integration uninstall kilo herdr integration uninstall hermes herdr integration uninstall qodercli +herdr integration uninstall cursor ``` ## How Herdr uses integrations -Herdr combines three signals: +Herdr uses integrations in two different ways: -| Signal | Purpose | -| --- | --- | -| Process detection | Identifies which pane owns which running process. | -| Screen heuristics | Infers visible native agent state such as `working` or `blocked`. | -| Integration events | Reports native session identity, semantic state, or both depending on the integration. | +| Integration type | Agents | Effect | +| --- | --- | --- | +| Lifecycle authority | Pi, OMP, Kimi Code CLI, OpenCode, Kilo Code CLI, Hermes Agent | When installed and actively reporting for the pane, hook or plugin events author `idle`, `working`, and `blocked`. Herdr does not also use screen manifest fallback for that same lifecycle authority. | +| Session identity | Claude Code, Codex, GitHub Copilot CLI, Droid, Qoder CLI, Cursor Agent CLI | The integration reports native session references for restore. State still comes from Herdr's screen manifest detection. | -Claude Code, Codex, and OpenCode state detection is screen-read first. Their Herdr-owned integrations do not author `idle`, `working`, or `blocked` state. Pi, GitHub Copilot CLI, and Hermes Agent report semantic state and session identity. OMP and Qoder CLI report semantic state but do not provide native session restore. Custom socket integrations can report state when they define state that is not visible in the native terminal UI. +Custom socket integrations can also report state when they define state that is not visible in the native terminal UI. -Some integrations report native agent session references. Herdr uses official session references to resume Claude Code, Codex, GitHub Copilot CLI, Pi, Hermes Agent, and OpenCode panes after a Herdr server restart unless `[session] resume_agents_on_restore = false` disables it. +Some integrations report native agent session references. Herdr uses official session references to resume Claude Code, Codex, Droid, Kimi Code CLI, Qoder CLI, Cursor Agent CLI, GitHub Copilot CLI, Pi, Hermes Agent, OpenCode, and Kilo Code CLI panes after a Herdr server restart unless `[session] resume_agents_on_restore = false` disables it. -Native session restore requires current Herdr integrations: Pi integration version `2`, Claude Code version `5`, Codex version `5`, GitHub Copilot CLI version `1`, OpenCode version `4`, or Hermes Agent version `2`. OMP integration version `2` and Qoder CLI integration version `1` report agent state only. Check installed versions with `herdr integration status`. +Native session restore requires current Herdr integrations: Pi integration version `2`, Claude Code version `5`, Codex version `5`, GitHub Copilot CLI version `2`, Droid version `2`, Kimi Code CLI version `3`, Qoder CLI version `2`, Cursor Agent CLI version `1`, OpenCode version `5`, Kilo Code CLI version `1`, or Hermes Agent version `2`. OMP integration version `2` reports agent state only. Check installed versions with `herdr integration status`. ## Pi @@ -93,7 +100,7 @@ Install the Claude Code hook: herdr integration install claude ``` -The hook reports Claude Code session identity to the local Herdr socket on session start. Claude Code state comes from Herdr's screen detection. +The hook reports Claude Code session identity to the local Herdr socket on session start. Claude Code state comes from Herdr's screen manifest detection. Herdr uses `~/.claude` by default, or `CLAUDE_CONFIG_DIR` when set. The Claude config directory must already exist. Install writes `hooks/herdr-agent-state.sh` and updates `settings.json` with Herdr hook entries. Uninstall removes the matching hook entries and deletes the hook script. @@ -105,7 +112,7 @@ Install the Codex hook: herdr integration install codex ``` -The Codex hook reports session identity through the same local socket API used by other integrations. Codex state comes from Herdr's screen detection. +The Codex hook reports session identity through the same local socket API used by other integrations. Codex state comes from Herdr's screen manifest detection. Herdr uses `~/.codex` by default, or `CODEX_HOME` when set. The Codex config directory must already exist. Install writes `herdr-agent-state.sh`, updates `hooks.json`, and ensures `[features] hooks = true` in `config.toml`. It also removes the deprecated top-level `codex_hooks` flag when present. Uninstall removes Herdr entries from `hooks.json` and deletes the hook script, but leaves `config.toml` unchanged. @@ -117,12 +124,40 @@ Install the GitHub Copilot CLI hook: herdr integration install copilot ``` -Copilot state is reported through the same local socket API used by other integrations. +The Copilot hook reports session identity through the same local socket API used by other integrations. Copilot state comes from Herdr's screen manifest detection. -Herdr uses `~/.copilot` by default, or `COPILOT_HOME` when set. The Copilot config directory must already exist. Install writes `hooks/herdr-agent-state.sh` and updates `settings.json` with Herdr hook entries. The hook maps prompt submission, tool use, post-tool progress after approvals, `ask_user` prompts, `exit_plan_mode` plan review prompts, permission notifications, agent idle notifications, turn stops, and session exits into Herdr state. Uninstall removes Herdr entries from `settings.json` and deletes the hook script. +Herdr uses `~/.copilot` by default, or `COPILOT_HOME` when set. The Copilot config directory must already exist. Install writes `hooks/herdr-agent-state.sh` and updates `settings.json` with a `SessionStart` hook entry. Uninstall removes Herdr entries from `settings.json` and deletes the hook script. After Copilot emits a session-bearing event, Herdr can use the reported session id to resume the pane with `copilot --resume=<id>`. +## Kimi Code CLI + +Install the Kimi Code CLI hook: + +```bash +herdr integration install kimi +``` + +The hook reports Kimi session identity and lifecycle state to Herdr for native restore and authoritative `idle`, `working`, and `blocked` status. It requires Kimi Code CLI `0.14.0` or newer. + +Herdr uses `~/.kimi-code` by default, or `KIMI_CODE_HOME` when set. The Kimi Code config directory must already exist. Install writes `hooks/herdr-agent-state.sh` and appends Herdr-managed `[[hooks]]` entries to `config.toml`. Uninstall removes the Herdr-managed config block and deletes the hook script. + +Herdr resumes stored Kimi sessions with `kimi --session <id>`. + +## Droid + +Install the Droid hook: + +```bash +herdr integration install droid +``` + +The Droid hook reports session identity through the same local socket API used by other integrations. Lifecycle state still comes from Herdr's screen manifest detection because Droid hooks do not cover every lifecycle transition. + +Herdr uses `~/.factory` for Droid hooks. The Factory config directory must already exist. Install writes `hooks/herdr-agent-state.sh`, updates `settings.json` with a Herdr `SessionStart` hook entry, and removes older Herdr Droid hook entries from `hooks.json` if present. Uninstall removes Herdr entries from both config files and deletes the hook script. + +After Droid emits a session start event, Herdr can use the reported session id to resume the pane with `droid --resume <id>`. + ## OpenCode Install the OpenCode plugin: @@ -133,7 +168,19 @@ herdr integration install opencode Herdr writes the plugin to `~/.config/opencode/plugins/herdr-agent-state.js`. The OpenCode config directory must already exist. Uninstall removes only that plugin file. -The plugin reports session identity while OpenCode runs inside a Herdr pane. After OpenCode emits a session-bearing event, Herdr can use the reported session id to resume the pane with `opencode --session <id>`. OpenCode state comes from Herdr's screen detection. +The plugin reports lifecycle state and session identity while OpenCode runs inside a Herdr pane. After OpenCode emits a session-bearing event, Herdr can use the reported session id to resume the pane with `opencode --session <id>`. Native screen manifest detection remains available when the plugin is not installed. + +## Kilo Code CLI + +Install the Kilo Code CLI plugin: + +```bash +herdr integration install kilo +``` + +Herdr writes the plugin to `~/.config/kilo/plugin/herdr-agent-state.js`. The Kilo config directory must already exist. Uninstall removes only that plugin file. + +The plugin reports lifecycle state and session identity while Kilo runs inside a Herdr pane. After Kilo emits a session-bearing event, Herdr can use the reported session id to resume the pane with `kilo --session <id>`. Native screen manifest detection remains available when the plugin is not installed. ## Hermes Agent @@ -145,7 +192,7 @@ herdr integration install hermes Herdr writes `~/.hermes/plugins/herdr-agent-state/` and enables `herdr-agent-state` in `~/.hermes/config.yaml`. The Hermes config directory must already exist. Restart Hermes after installing so the plugin loads. Uninstall removes the plugin directory and removes `herdr-agent-state` from `plugins.enabled`. -The plugin reports lifecycle, tool, approval state, and session id while Hermes runs inside a Herdr pane. Herdr can use the reported session id to resume the pane with `hermes --resume <id>`. Native screen heuristics remain available when the plugin is not installed. +The plugin reports lifecycle, tool, approval state, and session id while Hermes runs inside a Herdr pane. Herdr can use the reported session id to resume the pane with `hermes --resume <id>`. Native screen manifest detection remains available when the plugin is not installed. ## Qoder CLI @@ -155,11 +202,27 @@ Install the Qoder CLI hook: herdr integration install qodercli ``` -The hook reports semantic state to Herdr when Qoder CLI emits lifecycle events. +The hook reports Qoder CLI session identity to Herdr for native restore. Lifecycle state still comes from Herdr's screen manifest detection because Qoder hooks do not cover every lifecycle transition. Herdr uses `~/.qoder` by default, or `QODER_CONFIG_DIR` when set. The Qoder config directory must already exist. Install writes `hooks/herdr-agent-state.sh` and updates `settings.json` with Herdr hook entries. Uninstall removes the matching hook entries and deletes the hook script. -Native screen heuristics remain available when the hook is not installed. +Herdr resumes stored Qoder CLI sessions with `qodercli --resume <id>`. + +Native screen manifest detection remains available when the hook is not installed. + +## Cursor Agent CLI + +Install the Cursor Agent CLI hook: + +```bash +herdr integration install cursor +``` + +The hook reports session identity through Cursor's `sessionStart` hook while Cursor Agent CLI runs inside a Herdr pane. Cursor state comes from Herdr's screen manifest detection. + +Herdr uses `~/.cursor` by default, or `CURSOR_CONFIG_DIR` when set. The Cursor config directory must already exist. Install writes `herdr-agent-state.sh` and adds a Herdr `sessionStart` entry to `hooks.json`. Uninstall removes the matching hook entry and deletes the hook script. + +After Cursor emits a session start event, Herdr can use the reported session id to resume the pane with `cursor-agent --resume <id>`. The `cursor-agent` command must be on `PATH` when Herdr restores the pane; Herdr does not launch the generic `agent` command. ## Custom status labels diff --git a/website/src/content/docs/persistence-remote.mdx b/website/src/content/docs/persistence-remote.mdx index 3e25dd69..1f60f964 100644 --- a/website/src/content/docs/persistence-remote.mdx +++ b/website/src/content/docs/persistence-remote.mdx @@ -92,6 +92,8 @@ herdr --remote workbox Remote attach supports Linux and macOS hosts on x86_64 and aarch64. Herdr checks the remote platform, prefers a matching `herdr` already on the remote `PATH`, then checks `~/.local/bin/herdr`. If no matching binary exists, interactive runs prompt to install one to `~/.local/bin/herdr`; non-interactive runs fail instead of modifying the host. If `~/.local/bin` is not on the remote `PATH`, Herdr warns after install. +Native Windows `herdr --remote` is not part of the Windows beta. From Windows, SSH into the server and run `herdr` there. + By default, `herdr --remote` runs the bridge through a temporary SSH config that includes your SSH config first, then adds fallback keepalive settings. Existing user keepalive settings win. Set `[remote].manage_ssh_config = false` to use plain `ssh` without Herdr's generated bridge config. By default, remote attach uses the normal restart/stop flow if it needs to replace or restart a running remote server. To opt into experimental live handoff for a supported running remote server, pass `--handoff`: @@ -122,6 +124,8 @@ herdr --remote workbox --session agents Full Herdr attach opens the whole workspace UI. Direct attach opens one server-owned terminal in your current terminal. +Direct terminal attach is Unix-only in the Windows beta. + Attach by agent target: ```bash diff --git a/website/src/content/docs/quick-start.mdx b/website/src/content/docs/quick-start.mdx index 80563260..b6869add 100644 --- a/website/src/content/docs/quick-start.mdx +++ b/website/src/content/docs/quick-start.mdx @@ -15,7 +15,7 @@ For the local, SSH, and `herdr --remote` workflows, see [How to work with Herdr] ## Create a workspace -Press `prefix+shift+n` to create a workspace. A workspace is a project-level container for tabs, panes, and agents. +When a session has no workspaces, Herdr opens one automatically. A workspace is a project-level container for tabs, panes, and agents. Press `prefix+shift+n` to create another workspace. Give each active project its own workspace. This keeps agent state readable in the sidebar. diff --git a/website/src/content/docs/session-state.mdx b/website/src/content/docs/session-state.mdx index c7301730..e317caad 100644 --- a/website/src/content/docs/session-state.mdx +++ b/website/src/content/docs/session-state.mdx @@ -58,12 +58,16 @@ Native session restore requires these Herdr integration versions or newer: | Pi | `2` | `pi --session <path-or-id>` | | Claude Code | `5` | `claude --resume <id>` | | Codex | `5` | `codex resume <id>` | -| GitHub Copilot CLI | `1` | `copilot --resume=<id>` | -| OpenCode | `4` | `opencode --session <id>` | +| Cursor Agent CLI | `1` | `cursor-agent --resume <id>` | +| GitHub Copilot CLI | `2` | `copilot --resume=<id>` | +| Droid | `2` | `droid --resume <id>` | +| Kimi Code CLI | `3` | `kimi --session <id>` | +| Qoder CLI | `2` | `qodercli --resume <id>` | +| OpenCode | `5` | `opencode --session <id>` | +| Kilo Code CLI | `1` | `kilo --session <id>` | | Hermes Agent | `2` | `hermes --resume <id>` | OMP integration version `2` reports agent state, but does not report native session references for restore. -Qoder CLI integration version `1` reports agent state, but does not report native session references for restore. Run `herdr integration status` to check installed integration versions. Reinstall outdated integrations with `herdr integration install <agent>`. diff --git a/website/src/content/docs/socket-api.mdx b/website/src/content/docs/socket-api.mdx index 9d9791e7..a6b91461 100644 --- a/website/src/content/docs/socket-api.mdx +++ b/website/src/content/docs/socket-api.mdx @@ -23,7 +23,7 @@ The socket API can: - create, list, focus, rename, and close workspaces - create, list, focus, rename, and close tabs -- list, inspect, split, rename, read, close, and send input to panes +- list, inspect, split, swap, focus, resize, rename, read, close, and send input to panes - list, inspect, read, send to, rename, focus, start, and attach agents through CLI helpers - report custom agent state from hooks and plugins - subscribe to events and wait for output or state changes @@ -51,6 +51,17 @@ herdr pane split 1-1 --direction right herdr pane run 1-2 "npm test" ``` +Inspect and rearrange panes: + +```bash +herdr pane layout --current +herdr pane neighbor --direction right --current +herdr pane resize --direction right --amount 0.1 --current +herdr pane swap --direction right --current +herdr pane zoom --on --current +herdr pane split 1-1 --direction right --ratio 0.333 +``` + Wait for an agent: ```bash @@ -69,17 +80,86 @@ Raw socket method names use dot notation: | Area | Methods | | --- | --- | -| Server | `ping`, `server.stop`, `server.reload_config` | +| Server | `ping`, `server.stop`, `server.reload_config`, `server.agent_manifests`, `server.reload_agent_manifests` | +| Notification | `notification.show` | | Workspace | `workspace.create`, `workspace.list`, `workspace.get`, `workspace.focus`, `workspace.rename`, `workspace.close` | | Worktree | `worktree.list`, `worktree.create`, `worktree.open`, `worktree.remove` | | Tab | `tab.create`, `tab.list`, `tab.get`, `tab.focus`, `tab.rename`, `tab.close` | -| Pane | `pane.split`, `pane.list`, `pane.get`, `pane.rename`, `pane.send_text`, `pane.send_keys`, `pane.send_input`, `pane.read`, `pane.report_agent`, `pane.report_agent_session`, `pane.report_metadata`, `pane.clear_agent_authority`, `pane.release_agent`, `pane.close`, `pane.wait_for_output` | -| Agent | `agent.list`, `agent.get`, `agent.read`, `agent.send`, `agent.rename`, `agent.focus`, `agent.start` | +| Pane | `pane.split`, `pane.swap`, `pane.zoom`, `pane.layout`, `pane.neighbor`, `pane.edges`, `pane.focus_direction`, `pane.resize`, `pane.list`, `pane.get`, `pane.rename`, `pane.send_text`, `pane.send_keys`, `pane.send_input`, `pane.read`, `pane.report_agent`, `pane.report_agent_session`, `pane.report_metadata`, `pane.clear_agent_authority`, `pane.release_agent`, `pane.close`, `pane.wait_for_output` | +| Agent | `agent.list`, `agent.get`, `agent.read`, `agent.explain`, `agent.send`, `agent.rename`, `agent.focus`, `agent.start` | | Events | `events.subscribe`, `events.wait` | | Integrations | `integration.install`, `integration.uninstall` | Some CLI commands are conveniences around these methods. For example, `herdr agent wait` resolves an agent target and then subscribes to pane agent state events. +Pane control methods use public pane ids such as `1-1`. Omit `pane_id` to use +the server's active focused pane. + +```json +{"id":"req_layout","method":"pane.layout","params":{"pane_id":"1-1"}} +{"id":"req_neighbor","method":"pane.neighbor","params":{"pane_id":"1-1","direction":"right"}} +{"id":"req_edges","method":"pane.edges","params":{"pane_id":"1-1"}} +{"id":"req_focus","method":"pane.focus_direction","params":{"direction":"right"}} +{"id":"req_resize","method":"pane.resize","params":{"pane_id":"1-1","direction":"right","amount":0.1}} +{"id":"req_zoom","method":"pane.zoom","params":{"pane_id":"1-1","mode":"toggle"}} +{"id":"req_split","method":"pane.split","params":{"direction":"right","ratio":0.333}} +``` + +`pane.layout` returns the tab layout snapshot with `workspace_id`, `tab_id`, +`zoomed`, outer `area`, `focused_pane_id`, pane rects, and split rects/ratios. +`pane.neighbor` and `pane.edges` include that same layout snapshot so clients +can make the next decision without private layout state. + +`pane.swap` supports directional and explicit forms: + +```json +{"id":"req_swap_dir","method":"pane.swap","params":{"pane_id":"1-1","direction":"right"}} +{"id":"req_swap_explicit","method":"pane.swap","params":{"source_pane_id":"1-1","target_pane_id":"1-2"}} +``` + +Swap is same-tab only. It preserves split shape, split ratios, pane ids, and +running processes. The response is `type: "pane_swap"` with `changed`, optional +`reason`, `source_pane_id`, optional `target_pane_id`, `focused_pane_id`, and +`layout`. Reason values are `no_neighbor`, `same_pane`, `not_found`, and +`cross_tab`. When a tab is zoomed, swap keeps zoom active and mutates the hidden +full-tab layout. + +`pane.zoom` toggles, enables, or disables zoom for the target pane's tab: + +```json +{"id":"req_zoom_toggle","method":"pane.zoom","params":{"pane_id":"1-1"}} +{"id":"req_zoom_on","method":"pane.zoom","params":{"pane_id":"1-1","mode":"on"}} +{"id":"req_zoom_off","method":"pane.zoom","params":{"pane_id":"1-1","mode":"off"}} +``` + +Omitting `pane_id` targets the server's active focused pane. The response is +`type: "pane_zoom"` with `changed`, `zoom_changed`, `focus_changed`, optional +`reason`, `pane_id`, `focused_pane_id`, `zoomed`, and `layout`. `changed` is +true when either zoom state or focus changed. Reason values are `single_pane`, +`already_zoomed`, and `already_unzoomed`. + +The CLI wrapper for `notification.show` is: + +```bash +herdr notification show "build failed" --body "api workspace" --position top-left --sound request +``` + +Show a user notification through the configured toast delivery: + +```json +{"id":"req_notify","method":"notification.show","params":{"title":"build failed","body":"api workspace","position":"top-left","sound":"request"}} +``` + +`title` is required and must contain visible text after control characters and repeated whitespace are removed. `body` is optional. Herdr collapses newlines, tabs, carriage returns, and repeated whitespace into spaces, then trims notification text to 80 characters for `title` and 240 characters for `body`. An empty sanitized `title` returns `invalid_params`. `position` is optional and applies only when `ui.toast.delivery = "herdr"`; desktop positions are relative to the full Herdr frame, and omitted positions use `ui.toast.herdr.position`. Terminal, system, and off delivery ignore `position`. `sound` is optional and can be `none`, `done`, or `request`; it defaults to `none` and plays only when the notification is shown. + +The response reports whether anything was shown: + +```json +{"id":"req_notify","result":{"type":"notification_show","shown":true,"reason":"shown"}} +``` + +Possible reasons are `shown`, `disabled`, `rate_limited`, `no_foreground_client`, and `busy`. `disabled` means `ui.toast.delivery = "off"`. `busy` means an existing in-app toast was not replaced. Terminal and system delivery are best-effort through the current foreground attached Herdr client. + Worktree methods manage Git checkouts as Herdr workspaces. `worktree.create` creates a checkout and returns the new `workspace`, `tab`, `root_pane`, and `worktree` records. `worktree.open` opens an existing checkout or returns the already-open workspace. `worktree.remove` runs `git worktree remove` against a linked child workspace and never deletes the branch. Create a worktree from a source workspace: @@ -250,9 +330,11 @@ Use `pane.read` through the CLI unless you are writing a protocol client. herdr pane read 1-1 --source visible --lines 80 herdr pane read 1-1 --source recent --lines 120 herdr pane read 1-1 --source recent-unwrapped --lines 120 +herdr pane read 1-1 --source detection ``` `recent-unwrapped` is useful for logs because it ignores soft wrapping. +`detection` returns the bottom-buffer snapshot used by agent screen detection. ## Waiting for state @@ -287,6 +369,46 @@ Successful responses look like this: } ``` +`server.agent_manifests` returns the active agent detection manifest sources and remote update diagnostics without reloading rules: + +```json +{ + "id": "req_1", + "result": { + "type": "agent_manifest_status", + "last_check_unix": 1781043522, + "last_result": "checked", + "manifests": [ + { + "agent": "cursor", + "source": "/home/me/.config/herdr/agent-detection/cursor.toml", + "source_kind": "local override", + "active_version": "2026.06.10.1", + "cached_remote_version": "2026.06.10.1", + "local_override_shadowing_remote": true, + "remote_update_result": "current" + } + ] + } +} +``` + +Fields such as `last_check_unix`, `last_result`, `active_version`, `cached_remote_version`, `remote_update_result`, `remote_update_error`, `remote_last_checked_unix`, and `warning` are omitted when not available. `server.reload_agent_manifests` returns `agent_manifest_reload` with the same `manifests` item shape after reloading the in-memory rule cache. + +`agent.explain` evaluates the target pane's detection snapshot in the running server using the server's active manifest cache: + +```json +{ + "id": "req_2", + "method": "agent.explain", + "params": { "target": "1-1" } +} +``` + +The response contains the same explain object printed by `herdr agent explain --json`, including the final state, manifest source and version, matched rule, evaluated rule evidence, skip-state reason, idle fallback reason, and `screen_detection_skip_reason` when a full lifecycle hook authority makes screen rules non-authoritative. + +Clients need a running server that supports `agent.explain`; after upgrading Herdr, restart or live-handoff the server before relying on this method. + Errors look like this: ```json diff --git a/website/src/content/docs/windows-beta.mdx b/website/src/content/docs/windows-beta.mdx new file mode 100644 index 00000000..762da9ef --- /dev/null +++ b/website/src/content/docs/windows-beta.mdx @@ -0,0 +1,97 @@ +--- +title: Windows beta +description: Native Windows support status, supported workflows, and known limitations. +--- + +Native Windows support is experimental beta. + +Herdr on Windows uses ConPTY and Windows process/runtime behavior instead of the Unix PTY model Herdr was originally built around. Some Herdr features map cleanly to Windows, and some do not. This preview is not a commitment that every Linux/macOS feature will become fully supported on Windows. + +The goal of the beta is to learn from real use: install success, pane reliability, agent workflows, bug volume, missing features, and whether Windows users are getting enough value from Herdr. Based on that feedback, Windows support may graduate to stable, stay preview-only while it matures, or be reduced if the maintenance cost is not justified. + +Install native Windows beta builds with PowerShell: + +```powershell +powershell -ExecutionPolicy Bypass -c "irm https://herdr.dev/install.ps1 | iex" +``` + +Windows beta builds ship only through the preview channel. The Windows installer defaults to preview, writes `channel = "preview"` to Herdr's config, stores releases under `%USERPROFILE%\.herdr\packages\standalone\releases`, points `%LOCALAPPDATA%\Programs\Herdr\bin` at the current release, and keeps a small number of older releases so running processes do not block updates. + +For internal beta testing, `HERDR_MANIFEST_URL` can point the installer at a custom manifest instead of Herdr's stable or preview manifest. + +## Supported in beta + +| Capability | Status | +| --- | --- | +| Local persistent sessions | beta | +| Native panes through ConPTY | beta | +| Windows Terminal / PowerShell app attach | beta | +| `cmd.exe` panes | beta | +| Startup cwd and workspace labels | beta | +| Pane launch cwd | beta | +| Agent command discovery | beta | +| Agent self-report integrations | beta | +| Agent process-tree detection | beta | +| Git/worktree detection from known cwd | beta | +| Pane screen history | beta | +| Nested launch override | beta | + +Windows agent process detection scans descendants of the pane shell and recognizes direct agents plus common command wrappers. It is useful for Codex, Claude, and similar agents, but it is not the same as Unix foreground process-group detection. + +## Partial support + +| Capability | Status | +| --- | --- | +| Live cwd after shell `cd` | partial | +| Live cwd via shell integration/OSC7 | beta | +| Clipboard image paste to agents | unverified | +| CJK hidden-cursor reveal | beta | +| Kitty graphics rendering | unverified | + +Herdr can launch panes in the right directory and can create the initial workspace from the directory where you started Herdr. PowerShell directory changes after startup are different: the process field Herdr can inspect does not reliably track later logical `cd` changes. Use Herdr integrations or prompt shell integration for live cwd reporting. + +Windows Terminal may support image paste paths for specific agents, but Herdr's own clipboard-image reader is not wired on Windows yet. Treat `alt+v` image paste as unverified until the Windows clipboard bridge is implemented and tested. Remote clipboard image bridging is separate and remains tied to Unix/macOS `herdr --remote`. + +Kitty graphics remains experimental and is not claimed as Windows-supported yet. Leave `experimental.kitty_graphics = false` unless you are specifically testing image rendering in Windows Terminal. + +## Copy and paste + +Herdr's pane text copy works on Windows beta. Drag-select text inside a pane to copy through Herdr. + +For paste, use `ctrl+shift+v` in Windows Terminal, or hold `shift` and right-click to use the outer terminal paste action instead of sending the click through Herdr. + +## Not supported on Windows beta + +| Capability | Status | +| --- | --- | +| Direct terminal attach | unsupported | +| `herdr --remote` from the Windows binary | unsupported | +| Live server handoff | unsupported | +| Unix file-descriptor handoff | unsupported | +| Unix foreground process groups | unsupported | +| Remote clipboard image bridge | unsupported | +| Prefix input-source switching | unsupported | +| Signed binary / SmartScreen avoidance | unsupported | + +For remote work from Windows, SSH into the server and run `herdr` there: + +```powershell +ssh you@server +herdr +``` + +That mode runs Herdr on the remote host. Native Windows `herdr --remote` is not part of the beta. + +Windows updates run through the Windows installer and update the versioned install junction. Restart running Herdr sessions after updating. Live handoff is Unix-only. + +## Reporting Windows beta issues + +Include: + +- Herdr version. +- Windows version. +- Terminal app. +- Shell, such as PowerShell or cmd. +- Whether you used a named `HERDR_SESSION`. +- Relevant Herdr logs. +- Exact steps to reproduce. |
