Repository navigation
feat(kin): teammates link and remove their own devices - #539
Merged
Merged
Conversation
A teammate's own agents (Claude Code on their computer) could not read the Kin tasks they hold on someone else's server. The bridge joins with a device join link, keeps the session in ~/.config/kin-bridge (0600), and serves kin_tasks and kin_task_update over stdio, calling kin.work.* as that person, so the server's own team rules decide what it sees and may change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A teammate needed the owner for every new device, and every device signed out after 30 days. Now a person lists and removes their own devices, makes a one-use code and link (ten minutes) that adds a device to their own account, and a device in use renews its session under a fresh deadline (same session, so pushes and bindings stay). A person's own link never brings back someone the owner removed; code guesses are rate limited; ten devices a person. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ion in the Keychain `kin-mcp-bridge join` takes a Linked devices code (with --server the first time) or link. Each use renews the session once it is in its last 23 days, so a laptop in use stays signed in. On macOS the session lives in the login Keychain (written through `security -i`, so the token never sits in argv), and an older session file moves there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ession A teammate manages the phones and computers signed in as them, removes any, and links one more with a one-time code, link and QR. The phone renews its bearer once a run and the browser its cookie, so a device in use stays signed in; the owner sees and removes a teammate's devices. The bridge gains kin_link, renews before each call, and won't move to another server from a tool. Wrong codes pause only their sender. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts old row Accept takes the joining device's kind, so a laptop or browser no longer lists as a phone. The bridge removes its previous session when it links again, so Linked devices doesn't fill with stale copies. Device copy shared once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A device link only redeems while the device that made it is still signed in; the new device records which device linked it. - Removing a device signs out every device linked from it and cancels the links they left open. A linked device removes only itself and what it linked. - The 10-device limit holds when a link is used, not only when made. - Self-links stay out of the owner's invite list and can't be cancelled there. - The device list shows a session signed out any way as signed out; "Last used" is now "Last connected". - An open socket sees a renewed deadline instead of closing at the old one; web and phone retry a renewal that failed. - The cookie renewal route needs the app's own Origin, scheme included. - Each linked device rings the person's phones. - Migration renumbered to 175 (#496 holds 174). - The MCP bridge and typed codes are out of this PR; link and QR remain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Cookie renewal accepts the app's own origin behind a proxy (X-Forwarded-Host or same-origin fetch), still on the request's scheme. - Web renews when a tab is shown again and the phone when it returns to the front, at most daily, so a long-open app doesn't sign out. - A link replaces only the last one the same device made. - The new-device push leads with the kind of device the host saw; the phone route no longer takes a device type from the body. - Tests: linking rings the person and the new device hears nothing of itself; proxied and same-origin renewals pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Signing out a session by any path (Kin's Remove, Sharing & access, the CLI, a proof key) signs out every device linked from it and cancels the links they left open, in the same transaction. Plain expiry does not cascade. - Removing a device checks inside its transaction that the asking device is still signed in. - The owner's invite list and cancel respect who the caller may act on. - The 10-device limit also holds for an owner's invite for someone already at it. - Renewal routes answer 500 for host faults, so clients retry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # apps/server/src/kin/persistence/KinMigrations.test.ts # apps/server/src/kin/persistence/KinMigrations.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Phone renewal goes only through the live, checked connection and never overwrites a token a re-join saved; web and phone renew hourly while open - A co-owner can't invite their own person; their devices come only from links - Authority and time are read inside each transaction; links record their id - The renew route refuses null or malformed origins and trusts forwarded hosts only from a loopback peer; a full device list reads as such, not a bad link - Pushes skip signed-out or expired devices; a self-link posts a fixed notice in Kin - Removal copy walks the whole chain; "just linked" matches by link id Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Renewal leaves this change: devices keep today's 30-day session - A removal walks from the device named, whatever its session's state, and each step stays with one person in one company; a re-pair is a sign-out - A signed-out session acts as no one, and an open socket rechecks its row every minute, so a sign-out from the CLI closes it - Sign-out notices, chat events and authority reads sit inside the write's transaction; a team with no Team agent hears of a new device in its chats Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…its write - A barrier lands a removal or demotion just before each call opens its transaction; triggers record what every write saw of its maker - Removing a device whose session already ended, a re-pair, and a forged cross-person link; two redeemers leave exactly one session - A sign-out written by another process closes an open socket in a minute - With no Team agent, the new-device notice lands in the person's direct chats Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bring the linked-devices work up to date with kin. DeviceLinks moves from K176 (now RecordComments) to K179, after AskOutsideAndDispatch. KinPeople keeps the authority reads inside the write transaction and kin's new-person retry, removed-person refusal, held-question close and waiting cancellation; that cancellation now publishes after commit like the rest of removal. KinPushSender keeps kin's subject-aware recipients and the device-link exceptSession filter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Why
kin. Its access rules passed four independent reviews; the only blocker was being behind the base (its migration number was taken, and push changes from fix(kin): a push carries the whole message and a tap opens what it is about #505 and fix(kin): a notice about several tasks opens Tasks, and an agent's note reaches who asked #527 had landed in the same files).How
kin:DeviceLinksis now K179, the permission checks the pull request moved inside their transactions stay there, and everythingkinadded since is kept. One publish inkin's newer removal code is now commit-bound like the ones around it.Tests
🤖 Generated with Claude Code