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
94 changes: 47 additions & 47 deletions docs/ARCHITECTURE.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ These are real CLIs with Hide's kit against a keyless fake model; support in the
| The iOS app: pairing kept in the Keychain, a QR scan with the camera, a pairing link that opens the app ([ARCHITECTURE.md](ARCHITECTURE.md#the-ios-app-host)) | same on every computer, since the app runs on the iPhone and speaks the relay: verified on the iOS simulator (the pairing kept in the Keychain across a restart, the camera permission asked only on the scan press, the Settings tab, the icon and launch screen); not verified: a real iPhone's camera and a scanned or tapped pairing link opening the app by universal link (needs the deployed association file and a device); closes with the first TestFlight build | same on every computer, since the app runs on the iPhone and speaks the relay: verified on the iOS simulator (the pairing kept in the Keychain across a restart, the camera permission asked only on the scan press, the Settings tab, the icon and launch screen); not verified: a real iPhone's camera and a scanned or tapped pairing link opening the app by universal link (needs the deployed association file and a device); closes with the first TestFlight build | same on every computer, since the app runs on the iPhone and speaks the relay: verified on the iOS simulator (the pairing kept in the Keychain across a restart, the camera permission asked only on the scan press, the Settings tab, the icon and launch screen); not verified: a real iPhone's camera and a scanned or tapped pairing link opening the app by universal link (needs the deployed association file and a device); closes with the first TestFlight build |
| Advanced direct phone connection through Tailscale | supported with Tailscale installed and its HTTPS Serve setup | supported with Tailscale installed and its HTTPS Serve setup | not supported by the current Tailscale integration; closes with Linux CLI discovery, Serve lifecycle and phone connection verification; use the relay |
| Building and uploading the iOS app ([BUILD.md](BUILD.md#the-release-build)) | supported: `bash mobile/scripts/build-ios.sh release` builds, signs, checks and uploads from a Mac with Xcode 26 (the Mac mini); the Swift tests run there too and are not a CI lane | not supported: Xcode and the App Store upload run only on macOS; the command's build host is a Mac (`HIDE_IOS_BUILD_HOST`), but starting it from Windows is not verified; closes never for Xcode itself, it is Apple's toolchain | not supported: Xcode and the App Store upload run only on macOS; the command's build host is a Mac (`HIDE_IOS_BUILD_HOST`), but starting it from Linux is not verified; closes never for Xcode itself, it is Apple's toolchain |
| An agent Hide starts with full access (Settings › Agents, 권한) starts when your shell has an alias of its program that adds the same option, such as `alias codex="codex --dangerously-bypass-approvals-and-sandbox"`; Hide leaves your shell and its aliases as they are ([ARCHITECTURE.md](ARCHITECTURE.md#drawn-ahead-of-herdr), the permission choice) | supported for Claude Code, Codex, agy, OpenCode and omp, and Pi asks nothing: each full-access option is one its CLI accepts twice, measured with the real CLIs in an empty HOME on 2026-11-01 (Codex takes `-c approval_policy=never -c sandbox_mode=danger-full-access`, which it accepts beside that alias); not supported for Grok: Grok 1.0.70 refuses `--always-approve` twice and has no option to repeat in its place, so an alias that adds `--always-approve` stops the start (one that adds `--permission-mode bypassPermissions` does not); closes when Grok accepts a repeat or Hide's own engine types the program's path instead of its name | supported, unverified natively: the own engine starts a program that takes arguments through `Start-Process`, as Herdr v0.9.5 did, which no PowerShell alias or function reaches, so a full-access start never meets one; closes with a Windows start with a profile alias of the program | unverified natively: the same CLI releases parse their options the same way, but no run on Linux measured it; the same Grok gap as macOS; closes with the same measurement on the Linux lane |
| An agent Hide starts with full access (Settings › Agents, 권한) starts when your shell has an alias of its program that adds the same option, such as `alias codex="codex --dangerously-bypass-approvals-and-sandbox"`; Hide leaves your shell and its aliases as they are ([ARCHITECTURE.md](ARCHITECTURE.md#drawn-ahead-of-the-engine), the permission choice) | supported for Claude Code, Codex, agy, OpenCode and omp, and Pi asks nothing: each full-access option is one its CLI accepts twice, measured with the real CLIs in an empty HOME on 2026-11-01 (Codex takes `-c approval_policy=never -c sandbox_mode=danger-full-access`, which it accepts beside that alias); not supported for Grok: Grok 1.0.70 refuses `--always-approve` twice and has no option to repeat in its place, so an alias that adds `--always-approve` stops the start (one that adds `--permission-mode bypassPermissions` does not); closes when Grok accepts a repeat or Hide's own engine types the program's path instead of its name | supported, unverified natively: the own engine starts a program that takes arguments through `Start-Process`, as Herdr v0.9.5 did, which no PowerShell alias or function reaches, so a full-access start never meets one; closes with a Windows start with a profile alias of the program | unverified natively: the same CLI releases parse their options the same way, but no run on Linux measured it; the same Grok gap as macOS; closes with the same measurement on the Linux lane |
| Retiring a device's old Home, `~/hide` ([UI_BEHAVIOR.md](UI_BEHAVIOR.md#retired-home)): once per device, only what its marker lists is removed, the folder stays as the project `hide` when anything else is there or a session or pane was recorded in it | supported: `hide-host`'s `home` tests retire a temporary account home (links, guide, `CLAUDE.md`, marker, a changed link, an operator file, a rerun, an interrupted run) and `hided`'s `node_home` tests drive the call over the wire | supported in another form: an old Windows Home held no link, its `AGENTS.md` named each project and its `CLAUDE.md` imported it, so the retirement removes the guide and the import file by their content; the same `hide-host` tests run on the Windows lane | supported for the same tests as macOS |
| The home folder itself as a project, added only through Add a project's one-time question ([UI_BEHAVIOR.md](UI_BEHAVIOR.md#adding-a-project)): its Explorer and ⌘P leave out top-level hidden names and the system's app-data folder, ⌘P also other projects' folders, it gets no disk size, on this machine and on a device's own home | supported: the app-data folder is `Library`; `hide-host`'s registration, listing, index, disk tests judge a temporary home, and `hided`'s boundary and daemon tests the question and the refusal for an agent's `hide ~` | supported in another form: the app-data folder is `AppData`, the home is judged by file identity as on macOS; the same `hide-host` tests run on the Windows lane | supported in another form: no app-data folder is named, since Linux keeps account data in hidden folders, which the top-level rule leaves out already; the same `hide-host` tests run there |
| `hide .` and `hide <path>` open a folder as a project ([UI_BEHAVIOR.md](UI_BEHAVIOR.md#opening-a-folder-from-a-terminal)) | supported: the daemon test opens a registered folder over the command's token route and is refused each kind of folder Add a project refuses, and the core's tests register through `create_workspace`; the desktop window coming forward is unverified natively; from a connected device it works in a Hide pane there and in a plain SSH shell there: the device's node takes the shell's request on its owner-only bridge socket only from a process of its own account, as the kernel names the stream's other end, and sends nothing up but that one open (the node's tests, the core's journey over loopback SSH in the remote mailbox lane, and another account's refusal with passwordless sudo in that lane); a device with no live link answers to connect it in Hide first | supported for the same daemon and core tests on the Windows lane, `hide.cmd` passing the path through; the browser fallback hands the address to `ShellExecuteW`, unverified natively; closes with a native run of the installed command; from a connected Windows device it works in a Hide pane there, whose `PATH` starts with the device helper's own `current` folder, and in a plain SSH shell there while the device's `hide.cmd` holds the command folder (the `windows wsl` lane, under the redirection guard Windows' OpenSSH turns on); a plain SSH shell on a PC whose desktop app holds the command folder runs the app's `hide.cmd`, which names its runtime copy by a relative path (the `windows wsl` lane's redirection guard walk) | supported for the same tests on the Linux lane; the browser fallback hands the address to `xdg-open`, unverified natively; the same device routes as macOS, the journey running on this lane |
Expand Down
2 changes: 1 addition & 1 deletion docs/PERFORMANCE_TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ Keys are CDP `Input.dispatchKeyEvent` events, which Chrome delivers to the focus
Every time is on the page's clock from the chord's first keydown (or the click): `screen_ms` is the first animation frame whose DOM shows the change (the canvas's pane count, its zoom flag or the shown tab), and `frame_ms` the first frame after it in which the terminal the change is about shows it (text in a new pane, a new grid in a resized one).
`topology-summary.json` gives each operation's p50, p95 and max to screen and to frame.
`MEASURE_HIDED_BIN` points the run at another hided, such as a baseline built from the merge base with its `hide-holder` beside it, so baseline and candidate share the fixture; run both headless (`--isolated-headless`) under the same scale and report the load beside each.
The stage times are read from the candidate's `pane_op.timing` lines in the run's `hide-state` diagnostic log (`summarize.py timing`, Drawn ahead of Herdr in [ARCHITECTURE.md](ARCHITECTURE.md#drawn-ahead-of-herdr)).
The stage times are read from the candidate's `pane_op.timing` lines in the run's `hide-state` diagnostic log (`summarize.py timing`, Drawn ahead of the engine in [ARCHITECTURE.md](ARCHITECTURE.md#drawn-ahead-of-the-engine)).

### Restore after a reboot

Expand Down
4 changes: 2 additions & 2 deletions docs/delivery.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ Claude Code runs every user-level hook it is given, so its prompt hook hands the
Codex runs a user-level hook only once its own trust review approved that exact entry, so another tool's change to `hooks.json` silently stops Hide's, and a Codex attached to its shared app-server daemon runs hooks in the daemon's environment rather than the pane's ([agent-hooks.md](agent-hooks.md)); its bell turn can then arrive with neither the letter nor the guidance, so its line ends with ` · hide inbox`.
Grok's prompt hook observes the submission without adding letter context, so its line names `hide inbox` too; tool or turn-end intake still confirms the letters.

The line is submitted to the checked pane through the engine's prompt operation (`prompt_agent`) on every system, so the engine owns how each agent's input reader finishes a paste and submits it: the text goes in as one paste when the program has turned bracketed paste on, then Enter follows 300 ms later (`PROMPT_SUBMIT_DELAY`), as Herdr's `agent.prompt` did.
The line is submitted to the checked pane through the engine's prompt operation (`prompt_agent`) on every system, so the engine owns how each agent's input reader finishes a paste and submits it: the text goes in as one paste when the program has turned bracketed paste on, then Enter follows 300 ms later (`PROMPT_SUBMIT_DELAY`).
Hide adds no cursor keys or submission delay of its own.
A manually started agent is eligible once the engine detects it; it needs no start of its own, and the engine refuses a blocked or still-starting one (`agent_blocked`, `agent_not_ready`) before it writes anything.
On macOS, Herdr 0.9.5 accepted `/help` from Claude Code 2.1.302 and Codex CLI 0.163.0 through six launch paths each: direct binary, the journey's exec launcher, a shell alias, a shell function, `npx --no-install --call`, and managed `agent.start`.
Expand Down Expand Up @@ -1135,7 +1135,7 @@ A ledger with no wait writes no `identity_waits` field, and a build from before
They need the running daemon and a pane-bound caller, like the letter commands; a caller outside a Hide pane is refused by the credential boundary, and a checkout-bound one with `pane_required`.
The daemon admits the caller's pane and checkout on the core's owner thread (`Runtime::prepare_pane_command`), and the engine calls run on the caller's task, off the runtime lock, through the engine boundary (`hide_core::pane_command`); nothing they do is recorded in the ledger.

- They reach every pane of the machine they name, as Herdr's commands did: a bare pane id is a pane of the caller's machine, as `hide ps` lists it, and `remote:<device>:pane:<id>` a device's; an agent is named as a letter's target is, by its name, registration id or pane, and two agents of one name are `target_ambiguous`.
- They reach every pane of the machine they name: a bare pane id is a pane of the caller's machine, as `hide ps` lists it, and `remote:<device>:pane:<id>` a device's; an agent is named as a letter's target is, by its name, registration id or pane, and two agents of one name are `target_ambiguous`.
- A read prints the pane's last 120 lines unwrapped and without styling (`recent_unwrapped`), at most 2,000 (`lines_out_of_range` past it); `--json` prints the answer line `{"ok":true,"value":{"pane","text","truncated"}}` instead.
`hide pane read <pane> --source visible --format ansi [--json]` reads the whole visible screen with its physical rows and styling through the engine's existing `read_screen` operation, without taking over its terminal connection.
Both options are required together, and this whole-screen form refuses `--lines`; the ordinary read and `hide agent read` keep their defaults.
Expand Down
2 changes: 1 addition & 1 deletion docs/status-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Regression owners: `hide-core/src/runtime/tests/human_turn.rs`, the escalation t

## agent_status provenance and background waits

The raw `agent_status` is the core's own engine's, with Herdr's names and meaning: each pane's holder reads its screen with its agent's definition-file rules, and the engine turns a stop after work into `done` and its `completion_seq` ([ARCHITECTURE.md](ARCHITECTURE.md#agents-on-the-cores-own-engine)); the core derives its axes in `agent_state/axes.rs`.
The raw `agent_status` is the core's own engine's: each pane's holder reads its screen with its agent's definition-file rules, and the engine turns a stop after work into `done` and its `completion_seq` ([ARCHITECTURE.md](ARCHITECTURE.md#agents-on-the-cores-own-engine)); the core derives its axes in `agent_state/axes.rs`.
The screen rules follow Herdr's: for Claude Code and Codex, Herdr's [official agent reference](https://herdr.dev/docs/agents/) describes terminal-screen inference as the lifecycle source, rather than lifecycle state reported by their session hooks.
A native session reference or display-only hook token does not prove that a tool is running or that its command completed.
Other integrations can have full lifecycle reporting, so this screen-inference statement is specific to those two agents, not every agent.
Expand Down
6 changes: 3 additions & 3 deletions hide-agent-adapter/src/definition/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use serde::Deserialize;
pub const SCHEMA: u32 = 1;
/// The most words a line typed into a pane's shell holds, its program
/// included, and the most bytes its words hold: the resume command
/// limits of Herdr's `validate_resume_argv`, which the engine's start line
/// limits of the resume command check, which the engine's start line
/// keeps. A definition's words are checked against them here and the line a
/// start or resume types against them in the core's own engine (`engine/own/shell_line.rs`, `check_resume`).
pub const LINE_WORDS: usize = 64;
Expand Down Expand Up @@ -265,7 +265,7 @@ fn valid_package(package: &str) -> bool {
/// Programs are compared by their file's name, so none is a path or holds a
/// space; the first is what a start types into the pane's shell, so it is a
/// plain command name, as the resume check
/// (Herdr's `validate_resume_argv`) holds it.
/// holds it.
fn check_executables(name: &str, executables: &[String]) -> Result<(), String> {
let Some(first) = executables.first() else {
return Err(format!("{name}: executables is empty"));
Expand All @@ -289,7 +289,7 @@ fn check_executables(name: &str, executables: &[String]) -> Result<(), String> {
}

/// Words a start or a resume types after the program: the resume
/// command rules of Herdr's `validate_resume_argv` (no control character,
/// command rules (no control character,
/// no apostrophe, 64 words and 8 KiB with the program), and `{session}` exactly where the field takes it.
fn check_words(name: &str, field: &str, words: &[String], sessions: usize) -> Result<(), String> {
if words.len() > MAX_WORDS || words.iter().map(String::len).sum::<usize>() > LINE_BYTES {
Expand Down
2 changes: 1 addition & 1 deletion hide-agent-hooks/src/guidance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ impl GuidanceAgent {
Layout::event_map(at.place(AgentId::Grok.adapter(), AccountPath::Hooks), true)
}
// agy reads one global `hooks.json` whose top-level keys are
// named blocks; Hide's is `hide` (Herdr's was `herdr`). Hide creates
// named blocks; Hide's is `hide`. Hide creates
// the file when agy has none and deletes it again only when
// nothing is left in it.
Self::Antigravity => Layout {
Expand Down
2 changes: 1 addition & 1 deletion hide-agent-hooks/src/hook_request/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub fn stamp(answer: &mut Value, own: Option<&str>) {
}

/// Whether the `ok` answer `answer` counts for a pane naming `install`: it
/// names that same installation. A pane that names none (a Herdr pane, a
/// names that same installation. A pane that names none (an agent outside Hide, a
/// plain terminal) takes any answer, naming one or not.
pub fn confirm(answer: &Value, install: Option<&str>) -> Result<(), &'static str> {
match install {
Expand Down
7 changes: 3 additions & 4 deletions hide-agent-hooks/src/opencode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@

use crate::plugin::{Plugin, PluginFile};

/// OpenCode's global configuration folder as Herdr's integration found it,
/// `~/.config/opencode` on every system, so Hide's plugin sits beside Herdr's:
/// the folder OpenCode's declaration names (`hide_agent_adapter`).
/// OpenCode's global configuration folder, `~/.config/opencode` on every
/// system: the folder OpenCode's declaration names (`hide_agent_adapter`).
/// OpenCode itself reads `$XDG_CONFIG_HOME/opencode` when that is set; such a
/// machine loads neither plugin from here (known limitation, shared with Herdr).
/// machine loads no plugin from here (known limitation).
const CONFIG: hide_agent_adapter::AgentId = hide_agent_adapter::AgentId::OpenCode;

/// The folder OpenCode 2 loads as one plugin, its halves by their names.
Expand Down
6 changes: 3 additions & 3 deletions hide-agent-hooks/src/pi_extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
//! used where the host reports it.
//!
//! The file is plain JavaScript that is also valid TypeScript, in a `.ts`
//! file as Herdr's own extension for these agents was, so both hosts load it
//! file, so both hosts load it
//! from their user extension folder without a build step. Each prompt and
//! shell call asks the helper (`hide-agent-hooks pi|omp <operation>`,
//! `src/plugin/helper.rs`), and it tells the helper its version, so a file
//! another build wrote does nothing (B13).
//!
//! It goes only into the default agent folders, the ones Herdr's integration
//! used; an omp profile or a `PI_CODING_AGENT_DIR` folder gets none (PRD
//! It goes only into the default agent folders, the ones the agents read
//! their extensions from; an omp profile or a `PI_CODING_AGENT_DIR` folder gets none (PRD
//! non-goal).

use hide_agent_adapter::AgentId;
Expand Down
2 changes: 1 addition & 1 deletion hide-agent-hooks/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ fn remove_if_empty(folder: &Path) -> Result<(), String> {
}

impl PluginFile {
/// The agent's own folder, the one Herdr's integration for it used too.
/// The agent's own folder.
pub fn config_directory<'h>(&self, at: impl Into<AccountAt<'h>>) -> PathBuf {
at.into().place(
self.config.adapter(),
Expand Down
Loading
Loading