feat(local): protocol 2 — tabs in a folder or running a preset #1
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/terminal-cwd-presets"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Protocol 2 for local plugins, for RKD #968 phase C1: terminal tabs that open in a chosen folder, run a preset command, and pick from recent folders and git worktrees.
PROTOCOL = 2,MIN_PROTOCOL = 1. The plugin answers a client in the client's own version, so an RKD app that speaks 1 keeps working unchanged.opengains optionalcwdandargv(v2 only).cwdmust be an absolute, existing folder.argvruns as a program with its arguments, never through a shell, and the program is looked up like execvp. Every check runs before anything is spawned.dirs→dir_list: home, recent folders (most recent first, max 20, in<config>/recent.jsonunder the store lock), then git worktrees of those repos (git worktree list --porcelain, 2 s timeout, no prompt).test-vectors.jsongains amessagessection with byte-exact control-message bodies, each tagged with the protocol that added it.v0.2.0after merge; the RKD app pins it.Tests
cargo fmt --all --check,cargo clippy --workspace --all-targets --locked -- -D warnings,cargo test --workspace --locked(terminal suite 3x; integration suite 12x after a test-only flake fix).dirscwd: runs in the requested folderargv:/bin/echo "a;b"prints literally, and PATH lookup worksgit worktree addNot tested directly: the git env vars,
spawn_blockingplacement, and "record recent only after a successful spawn" when a spawn fails after the checks pass (it can't be triggered).https://claude.ai/code/session_01P4hUduqyzHTYckP7dX5fXV