Repository navigation
Count an agent as installed only when its program is found - #624
Merged
Merged
Conversation
hide_platform::host::login_shell_path runs $SHELL -ilc with the login variables and the given home, reads the PATH it prints between two marks past anything the startup files print, and ends the shell and its tree at the deadline or on stop. Windows says Unsupported. login_path's comment no longer claims to be the login shell's PATH: it is the process's own.
An agent is installed when one of its programs is found on the login shell's PATH, the daemon's own PATH or the usual install folders; a folder the agent creates no longer counts (~/.cursor without cursor-agent, ~/.pi/agent without pi). home_markers and AgentAdapter::detected/executable are gone. The nine adapters found by folder alone now name their program, confirmed against each vendor's install script and docs: copilot, amp, droid, goose, kilo, pi, grok, kimi, vibe. The kit's search asks the login shell (cached until a startup file changes, retried a minute after a failure, logged as kit.login_shell_unread), so CLIs whose installers add their own folder in ~/.zshrc (~/.grok/bin, ~/.kilo/bin, ~/.opencode/bin, ~/.kimi-code/bin, ~/.pi/agent/bin) are found from a Dock launch and on an SSH device helper. Only the kit asks; cli_path keeps its shell-free search for the hook diagnosis, Memory and Codex CLI per pane. An agent that is on and whose program is gone keeps its record, stub and hook, reads Not on this machine with the reason, and keeps its switch to take them out.
The Settings line for agents with no switch read "Not set up on this machine"; it now reads "Not installed on this machine" under the key settings.agentsNotInstalled, matching the onboarding tile and the other languages. Comments that defined a tile's or row's switch by "set up" now say installed.
When the kit's owner goes away (Hide quitting, a device connection closing) the shell read is cut short on purpose; that is not a failure to log or a PATH to remember for the next pass.
An agent now counts as installed only when its program is found, so the fixture home carries `claude` and `gemini` in ~/.local/bin.
Korean and Chinese already describe the agents Hide equips as the ones installed on a machine; the English and Japanese note now say the same.
An agent counts as installed only when its program is found, so the smoke's private home now carries stand-in `claude` and `codex` programs in ~/.local/bin, which the kit searches on Linux and Windows. Without them the first-run answer installs the hooks but is not recorded, and the upgraded package's pass reads both hooks off.
yansfil
added a commit
that referenced
this pull request
Oct 6, 2026
Related: #624 (where the failure was first seen) ## Summary The repository named no Rust version, so CI built with whatever stable the runner image carried. Since 2026-10-06 16:47 UTC the ubuntu image carries 1.99, and code already on `main` fails `-D warnings` there: `AtomicUsize::fetch_update` is deprecated (renamed `try_update`) at `herdr-core/src/remote.rs:3454` and `herdr-core/src/labels/tests.rs:95`, and Clippy's `needless_borrows_for_generic_args` fires at `herdr-core/src/changes.rs:258` ([run 37498297429](https://github.com/modakbul-gongbang/hide/actions/runs/37498297429), `rust workspace`). Every pull request that touches Rust, and `main` itself, fails the same way. `rust-toolchain.toml` now pins 1.98.0 with rustfmt and Clippy (minimal profile); rustup reads it on the first `rustc` or `cargo` call on every runner and workstation, so no workflow step changes. Moving to 1.99 with those three fixes is the next pull request. - The version is written only in that file: `scripts/tests/test_rust_toolchain_pin.py` (policy lane) fails when a workflow, script, document or crate manifest restates it, or when a script reaches a toolchain around rustup. - `scripts/check-typed-live-remote.sh` put `~/.rustup/toolchains/stable-*/bin` first on `PATH`, which bypasses the pin; that line is gone (`toolchain-env.sh`, which it already sourced, does the resolution). - `docs/BUILD.md` gains "One toolchain version"; the `pr.yml` rust-lane comment and the `nightly.yml` header no longer describe the image's toolchain as the one used. ## Review - **판단해 주세요**: 1.98.0, not 1.98.1. The last green `main` run ([37482154440](https://github.com/modakbul-gongbang/hide/actions/runs/37482154440)) used the image's 1.98.1; 1.98.0 is already installed with rustfmt and Clippy on the workstation that runs most local verification, so no session downloads a second toolchain. This pull request's full CI run is what proves 1.98.0 on `main`'s code. - **판단해 주세요**: who proposes the next version. Proposal, as its own small pull request after this one merges: a `rust-toolchain` entry in `dependabot.yml` (Dependabot updates `channel = "1.xx.yy"` in this file, [changelog](https://github.blog/changelog/2025-08-19-dependabot-now-supports-rust-toolchain-updates/)), weekly with the 7-day cooldown cargo uses; its pull request's CI lists what the new compiler and Clippy ask, and the fixes land on that pull request. - **조심해서 볼 파일**: `rust-toolchain.toml` - every Rust job on Linux, macOS and Windows now installs this version through rustup on its first call, including the `plan` job's `cargo metadata`; no job has an install step to fail visibly instead. - **비용 검토**: each job that runs Rust now downloads the pinned toolchain once (the image has another version, and `rust-cache` does not keep `~/.rustup`): about 8 s, the `plan` step's 10 s here against 2 s on #624; the cache steps took no longer than on `main`. ## Evidence - **확인한 것**: [verify run 37502329000](https://github.com/modakbul-gongbang/hide/actions/runs/37502329000), full plan: every job that built Rust reported 1.98.0 for its system (`rust workspace`, `web e2e / build hided linux`, `remote mailbox` and `os contract (linux)` on x86_64 Linux; `windows check`, `windows e2e` and `os contract (windows)` on x86_64 MSVC; `desktop e2e` and `os contract (macos)` on aarch64 macOS), and all passed, Clippy `-D warnings` over the whole workspace included. - **확인한 것**: policy suite locally, 165 tests pass, with the five structural checks and the Herdr pin check. - **확인한 것**: the new test fails on both defects it names when they are planted (`main`'s line 4 of `check-typed-live-remote.sh`; a line "Built with Rust 1.98.0 on CI." in `docs/BUILD.md`) and passes once they are removed. - **확인한 것**: under an empty HOME with `toolchain-env.sh` sourced, `rustup show active-toolchain` answers 1.98.0 overridden by this file, `cargo --version` answers 1.98.0, and the HOME stays 0 bytes: nothing was downloaded. - **확인하지 못한 것**: no local cargo build, Clippy or test run on 1.98.0 (workstation disk); the CI run above is the proof. `package.yml`, `release.yml` and `herdr-update.yml` did not run on this pull request; they build in the repository root on macOS like `desktop e2e`, so they read the same file.
yansfil
added a commit
that referenced
this pull request
Oct 6, 2026
…or unheard panes (#668) Related: PRD `agents/prd/settings-cleanup/prd.md` · builds on #623 and #624 (both already on `main`) ## Summary - Settings has six tabs (General, Agents, Hide AI, Devices, Mobile, Shortcuts); Appearance, Issues and Performance are gone and their settings moved to General, Agents (Idle agents, Starting work) and Hide AI (Worktree names). - Hide supports seven agents (Claude Code, Codex CLI, Gemini CLI, Grok, OpenCode, Pi, Cursor); "installed" means the CLI was found, never that a config folder exists. - The other 13 adapters are retired once, only from what the kit's own record says it put down; Herdr integrations are installed and removed with the agent switch. - Hide AI is its own tab: one on/off switch, a "Runs on" agent and model, and an ordered fallback list; the router asks only those agents. - A pane Hide cannot hear wears a `Not connected` chip with Reopen; Devices, Mobile (Show QR) and Shortcuts are cleaned up, and the B1-B68 and D-23 defects are fixed.    ## Review - **판단해 주세요**: Grok and Pi can be chosen as "Runs on" on first run with no operator pick (D-18), though no real Grok or Pi run has proven their read-only flags; Gemini CLI is never auto-picked because its sign-in cannot be checked. - **판단해 주세요**: an agent switched on by default (Claude Code, Codex CLI) whose CLI later disappears is listed under "Not installed" with no switch, so Hide's hook stays on disk until the CLI is back (B9, D-07). - **판단해 주세요**: a failed Reopen after the agent was ended is a notice, not a diagnostic-log line, because the operator can act on it (design principle 13); see `docs/UI_BEHAVIOR.md`. - **조심해서 볼 파일**: `hide-kit/src/retired_agents.rs` and `hide-kit/src/agent_kit.rs` - removes files in the operator's home, ownership-gated by the kit record. - **조심해서 볼 파일**: `hide-agent-hooks/` - the only crate that writes operator-owned config; the letter guard (`runtime::takes_letters`) is a three-runtime allowlist. - **조심해서 볼 파일**: `herdr-core/src/runtime/kit.rs`, `runtime/agents.rs`, `ai.rs` - `Mutex<Runtime>` discipline, what is published on a real transition, one event per user action. - **조심해서 볼 파일**: `hide-platform/src/programs.rs` - the one CLI search (login shell, daemon PATH, install folders); it keeps the single cached shell answer, the one state this crate holds. - **조심해서 볼 파일**: `hide-ai/src/router.rs`, `registry.rs`, `program.rs` - what leaves the machine, to which agent, and the PATH each child runs with. - **비용 검토**: the login shell is asked once per shell and home (cap 8 pairs, startup-file stamps, retry after 60 s, 10 s deadline, lock held across the ask); `ssh -G` is capped at 32 hosts, 3 s, 4 at a time; first-run and login rechecks run every 5 minutes only while no agent is chosen. - **질문**: a Memory store opened by this build moves to schema 7, which older builds refuse; is that acceptable for the installed app (see Breaking change)? ## Evidence - **확인한 것**: `sasu implement verify` on the final head, S1 `verify-cargo.sh test` and S2 `lint`, both PASS; web `tsc`, `eslint`, `vitest` (1164 tests), `vite build`, the desktop equivalents, and `check-design-contract.mjs` pass. - **확인한 것**: the full web Playwright suite (205 tests, isolated pinned Herdr and `hided`) ran on the head after the first merge with main: 204 passed, and the one failure (a new `link-graph` spec still clicking the removed Appearance tab) is fixed and passes alone; the full suite was not run again after the last, test-only commits and the second merge with main. - **확인한 것**: a real Claude Code run listed models through `initialize` and answered one Hide AI request; every other agent backend is proven against scripted stand-ins that record the exact argv, env and stdin. - **확인한 것**: Reopen ends and restarts a shimmed agent in the same pane; the kit pieces, the Herdr integration calls and the retirement ran against an isolated HOME and an isolated Herdr, never the operator's. - **확인하지 못한 것**: Rust was verified with the workstation's rustc 1.97.1, not the pinned 1.99.0 (no rustup here), so CI is the first run on 1.99.0. - **확인하지 못한 것**: no live Gemini CLI, Grok, OpenCode, Pi or Cursor run (none is installed on the test machine), so their read-only flags are fixture-proven only. - **확인하지 못한 것**: a real resumed Claude Code or Codex CLI session reconnecting after Reopen; Codex CLI shared-server reasons are unit and fake-Herdr proven only; the first-run auto-pick is unit-tested only. - **확인하지 못한 것**: desktop `local-kit`, `device-home` and `device-kit` e2e were not run on the final head (they need a packaged app and an isolated sshd that was not available); an earlier `device-home` failure at `[data-agent-counts]` is not re-checked. - **확인하지 못한 것**: the design library `Screen / Settings`, `Mobile` and `Onboarding` Pen sheets are stale because the `pen` tool is not installed here; `docs/DESIGN_WORKFLOW.md` names exactly which. - **확인하지 못한 것**: `bash scripts/verify-web.sh` as a whole did not run (`pnpm` 11 stops on esbuild's build-script check); each of its steps ran directly from `node_modules/.bin`. ## Breaking change - The Memory store moves from schema 6 to 7 on first open, and a build that expects 6 will refuse it. - Every project that accepted Memory's earlier disclosure has Memory turned off until it accepts the new wording (it names the Hide AI agents analysis may go to); stored Memory is kept. - The first Hide start with this build removes, from the operator's home, only what the kit record shows an earlier build put down for the 13 retired agents. - Hide AI asks no model until an agent is chosen (first run picks the first signed-in one in the fixed order, or the operator picks); an existing `ai.json` choice is kept. - The device helper protocol is 20 (main's link record took 18); a helper older than this build is refused with the existing rebuild-or-reinstall message. <details><summary>Verification record</summary> - PRD: `agents/prd/settings-cleanup/prd.md` (sha256 50a4410849b1701abb7176e05fe65f94f02b282e8f4e112c9c82170ad9645b33) - Base b3a1ba7 → head acf7edf, verified 2026-10-06T20:34:56.003Z: PASS - Verification report: `agents/runs/settings-cleanup/verification-report.json` and `agents/runs/settings-cleanup/verification-report.md`; source fingerprint 580774e7a3c52e884b063a2531f05366b8c0d4a4807efafe5992c2d5731d7091 - Suites: - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0) - S2: GREEN `bash scripts/verify-cargo.sh lint` (exit 0) - Reviews (native, advisory; the same three scopes ran twice, then a delta review): - Fidelity, head `c43c369` then `f3a6dbf`: first round F1 (an agent whose CLI is not found listed as Installed) and F2 (Check again showed no reason) fixed; second round F1 (`chosen` never sent, so an agent switched on and then uninstalled lost its switch) fixed by publishing `chosen` end to end; follow-ups (Memory analysis not resuming after Hide AI is turned back on, dead strings for check reasons with no sender) left open. - Code, same heads: label router not rebuilt on a fallback change, a running Memory analysis after Hide AI off, Start issue dialog waiting for a name that cannot come, a second CLI search, retirement not convergent, Reopen after an end, Check again never announced, found-but-not-runnable PATH, global state in `hide-platform` against its written rule: all fixed; two test-quality items fixed. - Security, same heads: Grok and Pi auto-pickable on first run with an unobserved read-only guarantee stands (PRD D-15, D-18) and is the first Review question above; the delta review found a relative-folder gap in the child PATH, fixed in the last head; follow-ups still open: `ssh -G` evaluating `Match exec`, Hide AI children inheriting the whole environment, integration ownership by agent name, the login-shell stop flag for Hide AI callers. - Delta review of the six fix commits (head `3efd366`): no regression; the Reopen notice can be lost before the snapshot is pulled (low, inferred), listed as a follow-up. - Evidence: none registered separately. - Changed paths: 337 (see Files changed) </details>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Settings › Agents와 첫 실행 그리드는 에이전트가 만드는 폴더만 보고도 "설치됨"으로 읽었습니다.
그래서
~/.pi/agent만 있고pi가 없는 Mac, Cursor 에디터가 만든~/.cursor도 설치로 보였습니다.이제 에이전트의 프로그램이 검색에서 찾아질 때만 설치로 봅니다. 폴더 규칙(
home_markers)은 지웠고, 이름이 비어 있던 9개 어댑터에 벤더 문서의 프로그램 이름을 채웠습니다.Grok(
~/.grok/bin), Kilo Code, OpenCode, Kimi Code처럼 설치기가 셸 rc 파일로 PATH에 넣는 CLI를 Dock에서 연 앱과 SSH 위의 기기 helper도 찾도록, kit은 계정의 로그인 셸($SHELL -ilc)이 만드는 PATH부터 봅니다.Hide가 스킬이나 훅을 넣은 뒤 프로그램이 사라진 에이전트는 파일을 그대로 두고 "Not on this machine"과 이유를 보여 줍니다.
Review
cursor-agent만 찾습니다. Cursor 설치기는 이제agent를 주 이름으로 쓰지만, Grok 설치기도agent를 PATH에 둡니다.goose(DB 마이그레이션 도구),amp,kilo(텍스트 에디터)가 있으면 그 에이전트로 읽습니다. 폴더 규칙보다 덜 틀린다고 판단했습니다.~/.claude,~/.codex폴더가 있을 때 들어갑니다. 설치 판단만 프로그램 기준으로 바뀌었습니다.hide-kit/src/agents.rs- failure path: 로그인 셸 읽기의 10초 상한, 실패 후 60초 재시도, 중단(Hide 종료, 기기 연결 끊김)은 로그도 캐시도 없음.hide-platform/src/host.rs-login_shell_path: 시작 파일이 무엇을 찍든 두 마크 사이의 PATH만 읽고, Windows는 Unsupported.hide-agent-hooks/src/diagnosis.rs-cli_path_with: 훅 진단, Memory 버전 확인, Codex CLI per pane은 셸 없는cli_path를 그대로 씁니다.Mutex<Runtime>밖에서 돕니다. 프로세스당 한 번, 그 뒤엔 시작 파일 약 25개의 stat이 바뀔 때만 다시 묻습니다(1.2~1.9초, 상한 10초).kiro-cli를 PATH에 어떻게 두는지 설치 스크립트로 확인하지 못했습니다. Kiro를 쓰는 기기가 있으면 위치를 알려 주세요.그래서 다른 빌드의 다음 pass는 그 훅을 off로 읽고 그대로 둡니다. kit이 설치된 에이전트의 켜기만 받게 좁힐지, 이 PR에서 할지 따로 할지 정해 주세요.
Evidence
copilotampdroidgoosekilopigrokkimivibe): 벤더 설치 스크립트를 받아 바이너리 이름 줄과 문서의 실행 예를 대조했습니다(2026-10-06, 아래 표).hided::opener_lifecycle::acceptance_timeout_ends_cli_spawned_before_watcher만 전체 실행 중 실패, 단독 3회 통과(kit과 무관).verify-cargo.sh lint(fmt, workspace clippy-D warnings),verify-web.sh,check-design-contract.mjs, off-lock, identity, attribution 검사 통과..zshrc가 바뀔 때만 셸을 다시 묻습니다.$HOME/.kilo/bin을 넣으면 Kilo Code가 설치로 읽히고, SHELL이 없으면 미설치입니다. 60초 멈추는 셸은 10.0초에 끊기고 남은 프로세스가 없습니다.~/.pi/agent만 있음)는 미설치, Grok은~/.grok/bin에서 찾습니다. 첫 pass 1.3초, 다음 pass 170 ms.claude,codex대역 프로그램을 둡니다. 없을 때의 CI 실패(업그레이드 뒤 pass가 두 훅을 off로 읽음)를이 Mac에서 debug 빌드 두 벌로 재현했고, 대역을 두면 두 훅이 새 패키지 경로로 옮겨 installed로 읽힙니다.
agent-onboarding.spec.ts통과. 임시 spec(커밋 안 함)으로 Settings와 그리드를 캡처했습니다(아래).ssh mini 'bash -s' < probe.sh로command -v,[ -x ], rc 파일 PATH 줄grep,ls만 실행했습니다./usr/bin:/bin:/usr/sbin:/sbin이고~/.local/bin,/opt/homebrew/bin은.zshrc가 넣으므로 셸 없이는 helper가 못 봅니다.hide.app으로는 확인하지 않았습니다./Applications/hide.app과 운영 중인 Herdr는 건드리지 않았습니다.56b090a8: package linux/windows, windows check, web e2e, rust workspace 통과, 재시도로 통과한 테스트 없음).추가 증거
Settings › Agents: 폴더만 있는 Cursor, Pi는 "Not installed on this machine" 줄에 있습니다.
gemini프로그램을 지운 뒤: 스위치는 켜진 채 "Not on this machine"과 이유가 보이고, 스킬과 훅 파일은 남아 있습니다.벤더 확인(설치 스크립트를
curl로 받아 읽음):copilotgithub/copilot-cliinstall.shchmod +x "$INSTALL_DIR/copilot", docs.github.com 예copilot help$PREFIX/bin(기본~/.local/bin), npm, brew caskampamp", install.shbinary_name="amp"~/.amp/bin+~/.local/bin링크droidbinary_name="droid"~/.local/bin, brew cask, npmgoose$GOOSE_BIN_DIR/goose~/.local/bin, brewkilokilo", npm binkilo~/.kilo/bin(rc 수정), npm, brewpipi~/.pi/agent/bin또는 PATH의 쓰기 가능한 폴더grok~/.grok/bin(rc 수정)kimikimi --version, npm binkimi~/.kimi-code/bin(rc 수정), npmvibe~/.local/bin)