Repository navigation
feat(j5): people and access: everyone is a person with a level at a scope, and several people work with one agent - #638
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…age reloads once Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…f what they reach Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd the definition edits of the plan review Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…for the web client to build against Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…other, never between Reads the credential's intent and its person's level, checks them, issues and binds in one transaction, which holds the write lock from its start; a level change waits for it or goes first. A J5 link's credential with no intent pairs nothing, and a device that took everything its credential carried follows its level (review items 1, 5a, 15). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eir devices, in the same transaction (review item 5b) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…red or removed (review item 2) The approval records how many times the Owners have changed; its session is issued only while that is unchanged, under the same lock as a change of level. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…they may know (review item 3) Its own thread is one they reach, or it sent a message to an agent whose thread they reach; any other comes back unknown, since an agent's name is its thread's title. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…their level (review item 4) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ew item 6) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…was published with (review item 7) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…m a catalog (review item 8) A server-scope Viewer is told every provider's skills, a project's Viewer the skills in its own folders, each by name and description with no path. Catalog install and update need Manage providers, which only an Owner's level gives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re they write (review item 9) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ch them, for now (review item 10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ple and access AC45) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o strip, and its change signals (review item 12) Registers the access and people streams and the author list's change signal in the client's subscriptions, and guards the four commands on a connection's own place at read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…thread gained a writer (review item 13) Also lands the test of an MCP approval voided by an Owner's change, which a reflowed anchor had dropped from item 2's commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and admission reads whose a socket is once (review item 14) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… before the request fails (review item 16) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…se (review item 17) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, not a copy of it (review item 18) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Fleet leaves removed people out (review item 19) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cheduled it A Collaborator could schedule a task on a shared thread and its runs reached the agent with no author line. Who scheduled a task is now recorded as a person saves it: whoever creates it, or whoever changes its prompt. On a shared conversation its runs begin with "[Scheduled by <name> (<level>)]", by their name and level as it runs, recorded like a person's message so the web client strips it for display. A task no person set the prompt of (an agent's, or one from before) runs with no line, and the note says so. When the scheduler can no longer write there, the run is not sent: it fails with the reason as its run error in the task list, and each later run fails the same way until someone who can write changes the prompt and takes it over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jackson's ruling for #638. Every Persona write, and the reads of the files a Persona is imported from, now need settings:write, which only an Owner's level holds, on the server and in the client's guard, so a server-scope Collaborator is refused them. The catalog and reads are unchanged. People and access AC20 says so, and that a Collaborator's agent can still save a Playbook through its own tool, as it can change files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
On the migration point from the review body: fixed in The branch is now merged with Claude Opus 5.5, orchestrating #638 for Jackson |
…g soon instead of going nowhere A thread's "Manage scheduled tasks" sent someone who owns no server to a Settings page that is not theirs: by the link it showed an unavailable environment, by its address it bounced to Appearance. The gate now shows a notice in its place, naming the server and, for someone who can write to a thread, that they can ask an agent. The gate wraps upstream's scope boundary in routes/settings.tsx, which answered first for a server the person does not own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rops a scope line that named none The notice sat under upstream's "Applying settings for … on Unavailable environment", which names servers the person does not own. It is now drawn without that line. It names the server the link carries, such as a thread's on another server, and the primary server otherwise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GuestGate.test.ts: kept deleted. #669's native-question links ride listCrewRuntimeRequests, which AccessGate already lists for narrowed connections and filters to threads the person can write to (Crews AC23). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ite to the seat's thread Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 25, 2026
Closed
Jacksondr5
added a commit
that referenced
this pull request
Oct 25, 2026
This was referenced Oct 26, 2026
Merged
BastiHu
added a commit
that referenced
this pull request
Oct 27, 2026
* fix(j5): reject changed spawn replay requests Co-Authored-By: GPT-6.1-Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(j5): verify spawn replay failures and concurrent retries Restore complete live-caller shell fixtures and assert injected failure causes. Keep identical and mismatched concurrent retries as distinct cases, and authorize persisted children before replaying create. Integration note: RequestReplay migration 039 conflicts with pending #638 migrations 039–042; reconcile numbering against main before publication. Co-Authored-By: GPT-6.1-Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(j5): address spawn replay review comments Keyless spawns no longer write replay rows nobody can retry. The replay service declares its interface inline, and check no longer returns an unused boolean. Both replay mode checks share one message; the early one stays because it is the only check an unbound legacy agent reaches. Replay rows record created_at, and the spawn tool description says that any change under a reused client_request_id is refused. * fix(j5): refuse bad spawn attachments before binding the key Duplicate attachment ids, attachment limits and non-pending references are refused before the client_request_id is bound, so a corrected list can be retried under the same key instead of being refused as a changed request. A replay-store SQL failure now tells the caller to retry the same key, keeping the inspect-target guidance for real conflicts. The agent tools doc states the whole-request binding. * fix(j5): reject changed Crew proposal replay requests (#661) * fix(j5): reject changed crew proposal replay requests Compare immutable original proposal fields before live validation and again after concurrent create/admit. Identical retries retain the original proposal after approval, decline, catalog changes and partial failures. Keep the existing stable ids and admission rules. Replay omits the optional live-validation playbook summary. Existing ambiguous or archived crew target selection still refuses visibly. Co-Authored-By: GPT-6.1-Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(server): replay crew proposals before playbook lookup * fix(j5): simplify crew proposal replay comparison * fix(j5): preserve replay workspace for playbook libraries * test(j5): verify crew replay against playbook libraries --------- Co-authored-by: GPT-6.1-Sol <noreply@openai.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix(j5): validate upload metadata before accepting spawns * refactor(j5): own direct spawn acceptance in domain service * fix(j5): complete replay recovery and canonical contracts * fix(j5): refuse cross-workspace legacy retries before binding --------- Co-authored-by: GPT-6.1-Sol <noreply@openai.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 29, 2026
This was referenced Oct 31, 2026
This branch was successfully deployed
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.
Problem
Sharing was designed while it was built, and the guest model it shipped (members, guests and grants) went back and forth on key decisions. #631 redefined it from first principles. People and access covers scopes, levels, one kind of link, devices and names, and Shared conversations was reworked. This PR builds those definitions, along with Inbox AC14–17 and Crews AC23. Closes #636.
What changed
Everyone is a person with a level at a scope. The scopes are a server, a project or a thread; a thread scope covers the agents beneath it. The levels are Viewer, Collaborator and Owner, and Owner is held only at server scope. "Member" and "guest" are gone. Migration 039 carries every existing share across: members become server Owners, and guests get Viewer or Collaborator on what they reached. Old unused links stop working, and Owners get a one-time notice that they did.
A device holds exactly its level's permissions (
LEVEL_PERMISSIONS, pinned to upstream's permission names), and nothing fails open.POST /api/j5/session/renew), and the web client renews and reloads once.View is the only boundary the server enforces.
AccessGate's allow-list.CommandAdmission: Viewers send nothing, and only Owners archive or delete.One kind of link (migration 040).
j5 pairnow needs--person. A barej5 auth pairing createmakes a link for an unknown device, which must name itself before it can use anything (upstream's desktop SSH path).guestcommand reaches every scope and level, an existing person's new device, and an unknown device, so testers no longer edit the test database by hand.People (Settings › People).
Shared conversations.
[Message from <name> (<level>)].[Answer from …]. Prompts, approvals and Crew rosters can be answered by anyone who can write, and the first answer settles them.Inbox and Crews.
Playbooks and Personas. After #621, Playbooks are the server's. Anyone who can write somewhere sees the library, and a run starts only on a thread they can write to. Only Owners change the library in the app, and only Owners change Personas, as with any setting. A Collaborator's agent can still save a Playbook through its own tool.
Scheduled tasks. On a shared thread, a task's runs carry
[Scheduled by <name> (<level>)], naming whoever wrote its prompt. If that person can no longer write to the thread, the run is not sent and fails with the reason in the task list. The task isn't paused, so upstream's scheduler is unchanged.T3 Connect sessions belong to the first owner. The mobile app doesn't renew its session, so a phone is paired again after a change of level (AC17; #609).
Settings belongs to Owners. A non-Owner sees only personal sections. Owner sections stay hidden while that is still being worked out.
Mobile is out of scope. The only mobile change is one renamed atom (
isGuest→isNarrow), so mobile still compiles.Built in four areas: A, the access core; B, people, links and the CLI; C, shared conversations, the inbox and Crews; D, the web client. Each area was reviewed separately, and the whole PR was reviewed at the end.
Reviews
Every finding was fixed or recorded as an accepted limit.
UI changes
Before and after
People page (Owner)
Sharing a thread
Thread details panel
Once answered, the question shows who answered it: "answered by Marco R.".
A non-Owner's People page
Button styles
Buttons follow upstream's: icon-only row actions with tooltips, a trailing arrow on Join and Continue (as in upstream's welcome wizard), outlined red Revoke, and a leading icon on add and copy actions. Upstream's own Connections rows, for reference:
People with two servers connected (one person: Owner of "Local", Viewer on a project of "Remote")
On the server they own: everyone on it, with the server picker beside the heading.
On the server where they are a Viewer: their own row and the project's roster, read only.
The server picker open.
An Owner-only Settings page reached by a link
Joining and links
Sharing the whole server: who has it, and the "Add a person" form.
"Anyone with the link" for a thread, which brings people in as Viewers only.
A link made for a named person on a project, with the warning that only this machine can reach the server.
The inline warning before someone is raised to Collaborator.
Raising someone already on the server, with no link needed.
The join page for a link made for one person, with their name filled in.
The join page refusing a name someone on the server already has.
A link opened by someone already on the server: it adds the thread to what they reach.
A link for another person, opened on a device already paired as someone.
A device link opened on a device that is already that person's.
Video: opening a server link. The join page has the person's name filled in, and Join pairs the device and opens the app.
join-by-link.mp4
People and Settings
Video: a Viewer's own People page while an Owner raises them. The tab reloads, says it is reading who is on the server, and shows Collaborator.
level-change-reconnect-v2.mp4
A device the server cannot place: pick a person (shown with their level) or name someone new.
A thread's Viewer: the thread menu without Rename or Share, a "Leave thread" item, and a composer that only reads.
"Nothing is shared with you", after leaving the only thing they reached.
A server Viewer's home: no "pair again" notice and no provider-update toast.
An Owner still gets the provider-update toast.
An Owner told, once, that share links made before the upgrade stopped working.
Shared conversations and the queue
A shared thread as the Owner sees it: the platform's note as a notice, and another person's message on the left with their name.
Another person's queued message, which the Owner can edit, steer or remove.
The delivered message: "Marco R. · edited by Test owner", from the queue.
"Edit from here" on another person's message puts their typed words back in the composer.
A project's Collaborator starts a new thread there, with Send enabled.
Inbox
Answered: an ask "for everyone here", marked "Marco R. answered".
A half-typed answer kept in place after someone else answered, saying who.
First run
The first owner of a fresh server gives their name before anything else.
The setup wizard, offered to that named Owner.
Not captured
j5/main.j5/mainhas no such state, or it wasn't captured there.Live testing
Tested with the j5-live-test rig in the Browser panel, with isolated homes, by a GPT-6-Astra tester. Real turns ran on Claude Haiku 5.5 and GPT-6-Luna.
Final test at
7b306bbb2c: FAIL, two findings (test-reports/j5code/people-and-access-final-7b306bbb2c.md).8b6f75a3b7.Everything else exercised passed:
--person, and a bare unknown-device link;Re-test at
2312409479: PASS (test-reports/j5code/people-and-access-retest-2312409479.md).Found in the re-test and fixed (
a1dc124311,4e58193ab6): after a project Collaborator's first message, the composer, the details panel and the thread menu kept treating the new thread as read-only until another access change. A thread's level is now never less than the person's level over its project. Confirmed live by the web builder: the composer stays writable, and the menu offers Rename, Settle and the rest without a reload.Not exercised live:
Upstream impact
Every upstream-owned file edited here is recorded in
FORK.md(case text and file-table row). The change to what upstream's product does is register entry D33 (people, levels and shared conversations). The CLI's--personis D36. Both were decided with Jackson in #631 and #636.apps/server/src/auth/EnvironmentAuth.tsapps/server/src/auth/http.tsapps/server/src/server.tsgateMcpOAuth)apps/server/src/ws.tsCommandAdmissionarounddispatchCommandandlaunchThread; provides J5's per-socket servicesapps/server/src/cli/pair.ts,cli/auth.ts,cli/pair.test.ts--personand--level; a bareauth pairing createmakes an unknown-device linkpackages/contracts/src/rpc.ts,environmentHttp.tspackages/client-runtime/src/rpc/client.ts,package.jsonapps/web/src/connection/runtime.ts,environments/primary/auth.tsapps/web/src/components/chat/MessagesTimeline.tsx,ChatView.tsx,QueuedRunsControl.tsx,ComposerPendingUserInputPanel.tsxapps/web/src/components/settings/*(6 files),routes/settings.tsxapps/web/src/components/Sidebar.tsx,chat/ChatComposer.tsx,chat/ThreadDetailsPanel.tsx,routes/_chat.index.tsx,routes/pair.tsx,routes/welcome.tsx,PermissionUpdateNotice.tsx(+ test)apps/web/src/routes/__root.tsx,hooks/useThreadActionMenu.test.tsdocs/README.mddocs/j5/user/people-and-sharing.mdTwo upstream behaviours change under D33. Upstream's pairing links still exist, but J5 mints them only through its own links, and every device belongs to a person. A shared conversation's stored message text carries the platform's author line, which the web client strips before display. Everything else is a call into J5-owned code under
src/j5.Checklist
FORK.md(case text and file-table row) in this PRdocs/j5/product/upstream.mddocs/j5/product/and user docs rewritten where this changes themBuilt by Claude Opus 5.5 builders (the access core and three areas). Reviewed by Claude Opus 5.5, GPT-6.1-Sol, Claude Fable 5.1 and GPT-6-Astra. Live-tested by GPT-6-Astra. Orchestrated by Claude Opus 5.5, in J5 Code through the Claude Code harness.
🤖 Generated with Claude Code