feat: unified CLI, agent stop, listen --shell, SAS confirmation, relay limits#26
Merged
Conversation
P1: Add `amesh-agent agent stop` — writes PID file on start, reads it
on stop, sends SIGTERM for graceful shutdown.
P1.5: SAS confirmation protocol — controller now waits for target to
verify the SAS code before adding to allow list. Prevents
one-sided trust when target rejects or disconnects.
P2: Add `--shell` and `--files` flags to `amesh listen` — auto-grants
permissions after pairing completes.
P0: Add `amesh reset` / `amesh-agent reset` — clears ephemeral state
(stops running agent, removes stale PID) without affecting identity
or pairings.
P3: Add `amesh cp` file transfer — push local files to paired devices
over the encrypted relay tunnel. Reuses shell session infrastructure
(ECDH handshake, ChaCha20-Poly1305). New frame types: FILE_META,
FILE_CHUNK, FILE_ACK, FILE_ERROR. Requires `--files` permission.
Remove @authmesh/agent package entirely. All agent functionality (agent start/stop, reset, file transfer handler) now lives in @authmesh/cli under the unified amesh binary. Before: amesh (controller) + amesh-agent (target) — two binaries After: amesh (everything) — one binary, agent start enables target mode Updated all references across docs, landpage, packaging, and CI.
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
ameshbinary replacesamesh+amesh-agentamesh agent start/stopfor daemon management,amesh listen --shellfor auto-grant,amesh resetfor recoveryChanges
packages/cli: New commands (
agent/start,agent/stop,reset),--shellflag onlisten, SAS confirmation in handshake, unified SEA entry pointpackages/agent: Deleted — merged into CLI
packages/keystore: No functional changes
packages/relay: 5MB session data cap, 2 shell/min rate limit
docs + landpage: All
amesh-agentreferences updated toameshpackaging: Build scripts, Homebrew formula, nfpm updated for single binary
Test plan
bun run build && bun run test— all passamesh agent start/amesh agent stop— PID file created/removed, graceful shutdownamesh listen --shell— auto-grants shell permission after pairingamesh invite <code>— waits for SAS confirmation, aborts cleanly if target rejectsamesh reset— stops running agent, clears stale state