warp
warp copied to clipboard
Add warp control CLI foundation
Description
What:
- Adds the checked-in warp-control CLI specs under specs/warp-control-cli.
- Adds the shared local_control crate for protocol envelopes, action metadata, scoped credentials, discovery, selection, and client transport.
- Adds the warpctrl CLI skeleton and standalone binary for instance list, app ping/version, tab create, and completions.
- Adds private local-only outside-Warp control gates, feature flag wiring, and an app-side local-control bridge/server with app.ping, app.version, and tab.create handlers.
- Adds macOS/Linux app-bundle hooks to include warpctrl when warp_control_cli is enabled.
Why:
- Establishes the bottom foundation for a typed, feature-gated local control CLI while keeping outside-Warp control default-off and scoped by local app-issued credentials.
Notes:
- The visible Settings > Scripting UI is intentionally deferred; private settings and protocol gates fail closed by default.
- Inside-Warp verified terminal proofs and authenticated-user grants remain reserved protocol concepts and are rejected in this slice.
- Platform secure storage remains follow-up hardening; this slice uses owner-only local broker-token files plus short-lived scoped credentials.
Plan: http://localhost:8080/drive/notebook/QqEVmAmOJEFWsytm1sztnv
Testing
- [x] Added/updated unit coverage for local_control protocol/auth/discovery/selection behavior.
- [x] Added/updated parser coverage for the warpctrl first-slice command surface.
- [x] Added/updated app tests for local-control private defaults, top-level gate behavior, and inside-Warp denial.
- [x] cargo fmt --all -- --check
- [x] cargo clippy --workspace --exclude warp_completer --all-targets --all-features --tests -- -D warnings
- [x] cargo clippy -p warp_completer --all-targets --tests -- -D warnings
- [x] cargo test -p local_control
- [x] cargo test -p warp_cli local_control --features warp_control_cli
- [x] cargo test -p warp local_control --features warp_control_cli
Manual app testing with ./script/run was not run because this foundation slice has no visible Settings > Scripting enablement path yet; the production path remains default-off until that UI lands.
Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode
Co-Authored-By: Oz [email protected]