Copy uncommitted changes from the chat bridge's server checkout into a local review worktree on a maintainer's machine, then reset the server checkout so it can resume pulling.
just chat-take HOST DIR does this. It sends crates/plugins/command/serve-chat/take.sh to the server over SSH and runs it there twice:
snapshot: under the bridge's lock (flock on $(git rev-parse --git-path jp-serve-chat.lock)), print the checkout's HEAD and a binary diff of every change (git add -A && git diff --cached --binary -M HEAD), which keeps renames (retitled tickets) and deletions.
Locally, create a worktree at that base commit and git apply --index the diff there, rather than onto origin/main: changes from an earlier take that are still in review may not be on the server's base yet, so rebasing onto origin/main afterwards resolves any .board.json overlap with a three-way merge.
reset: under the same lock, check that HEAD and the diff's hash are unchanged since the snapshot, then git reset --hard and git clean -fd. If either changed, a turn wrote in the meantime, and the checkout is left alone to be taken again.
The script runs under set -eu with pipefail where the shell has it, so a failing git add (a full disk, say) stops it before anything is discarded. crates/plugins/command/serve-chat/tests/take.rs runs it against real repositories, including that failure.
Written as just chat-take HOST DIR [WORKTREE] (commit 1d01fbc62). It takes the diff in one ssh call under the lock, applies it in a worktree at the bridge's base commit, and only then resets the server, in a second locked call that checks HEAD and the diff's sha256 are unchanged. Not yet run against a real server: close this once a take has gone through end to end.