Repository navigation
feat(j5): a guest's client reads a thread at the level it was granted - #577
Merged
Jacksondr5 merged 8 commits intoOct 13, 2026
Merged
Conversation
A guest's client decided "can you send?" from one server-wide permission, so it could not tell a View thread from a Collaborate one, and J5's own views kept asking a shared server for things a guest is always refused. The server now tells a connection whether it is a guest's and, for a guest, its level on each thread it opens, sent again when a grant changes it. Upstream's chat view makes one call into J5 where it read the permission, on web and mobile; a member's connection gets upstream's answer. J5's inbox, Fleet, Crew and Playbook reads are not sent on a guest's connection. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Jacksondr5
added a commit
that referenced
this pull request
Oct 12, 2026
3 of 8 tasks
A guest's configuration carried no providers, so upstream's composer showed its setup state and told a guest to enable a provider in Settings. The per-thread level could not show through it. A guest is now given each enabled provider's id, kind, display name and models, built field by field, with nothing of its sign-in, version, health, paths, usage, skills or commands. A View guest gets upstream's read-only composer. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Jacksondr5
added a commit
that referenced
this pull request
Oct 12, 2026
…pects Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 12, 2026
A member's client no longer waits on the sharing question: J5's reads go out as before and stop only once a connection is known to be a guest's. A guest is refused the HTTP sidebar snapshot and reads the sidebar from the socket's filtered feed, so upstream's orchestration http.ts is no longer edited. A guest may ask for a URL to an attachment or a tool's image only when the server's own records put it in a thread its grants cover. J5's Personas and Playbooks pages leave out a server the person is a guest on. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Jacksondr5
added a commit
that referenced
this pull request
Oct 12, 2026
The web thread header read the server-wide permission while the chat view asked J5, so a View guest could start an inline rename from the title. It now makes the same call. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream's thread action menu read the server-wide permission when it was opened, so a View guest was offered Rename, Archive and Delete. It now asks J5, as the chat view does, and shows them disabled the way upstream does for a connection without the permission. The thread header is upstream's file again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Jacksondr5
added a commit
that referenced
this pull request
Oct 12, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…time Upstream's test of the menu hook mocks `react` with only what the hook used. The J5 read it now calls lived beside a React hook, so importing it loaded the connection runtime and failed on the mock. The read is its own module, and the hook's module hands it a guest's level when it loads. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reached
This review includes 37 billable files and costs up to $9.25.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 59 minutes for your next included review. View limit details
Comment |
This was referenced Oct 13, 2026
Jacksondr5
added a commit
that referenced
this pull request
Oct 13, 2026
Rebased onto guest sharing (#536, #561, #577). The guest gate refuses every J5 read by default; the client now skips them for a connection it knows is a guest's, as it did for the HTTP reads, and hides the playbook boards. Co-Authored-By: Claude Opus 5.5 <[email protected]>
7 of 8 tasks
Jacksondr5
added a commit
that referenced
this pull request
Oct 13, 2026
* feat(j5): J5's client reads run over WebSocket methods J5's client reads called J5's own HTTP routes, each with its own authentication, error shape and "is this route missing" probe. Upstream's rule is that a small read is a socket query and a large, compressible payload goes over HTTP. Fourteen reads move to RPC methods: the Inbox list and open count, Crew proposals, runtime requests and memberships, the Fleet, spawned children, the archive preflight, participant identities, the peer list, the three playbook reads and the artifact list. Their routes are removed. Reading one artifact's content stays on HTTP, because it can be megabytes. Part of #506 (step 3). Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(web): the Artifacts page waits for the socket before listing The list is read over the socket now, which comes up after the prepared connection the page waited for, so a direct visit to /artifacts failed as "not connected" until Try again. Found in live testing. Review fixes: FORK.md no longer names deleted route files, and says which views skip an unsupported server. Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(server): drop an unused import Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(j5): a known guest is sent none of J5's socket reads Rebased onto guest sharing (#536, #561, #577). The guest gate refuses every J5 read by default; the client now skips them for a connection it knows is a guest's, as it did for the HTTP reads, and hides the playbook boards. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mobile): the playbook board calls its hooks unconditionally Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Jacksondr5
added a commit
that referenced
this pull request
Nov 23, 2026
Jacksondr5
added a commit
that referenced
this pull request
Nov 23, 2026
Jacksondr5
added a commit
that referenced
this pull request
Nov 23, 2026
Jacksondr5
added a commit
that referenced
this pull request
Nov 23, 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
A guest's client decided "can you send?" from one server-wide permission, so it could not tell a thread shared at View from one shared at Collaborate. J5's own views also kept asking a shared server for things a guest is always refused, and showed the refusals (an inbox "?" badge, refused reads every 7.5 seconds). Part of #532 / #533.
What changed
The server tells the client. A new J5 RPC group,
j5.sharing(packages/contracts/src/j5/sharing.ts):getConnectionAccesssays whether the connection is a member's or a guest's. A client asks once per connection, in the background: nothing a member's client does waits on the answer, and a server that cannot answer is treated as having no guests.subscribeThreadAccessgives a guest its level on one thread, and sends it again when a grant changes it. Only a guest's client opens it. The level comes fromPersonAccess.watchThreadAccess, so it covers the agents beneath a granted thread and threads of a granted project; the client never works a level out from grants.Both are allowed for a guest in
GUEST_RPC_RULESand answer only for the session the socket was opened with.One call in each chat view, and in the web thread action menu. Where upstream's web
ChatView.tsxand mobileThreadRouteScreen.tsxread the "Operate tasks" permission, they now call J5'suseCanOperateThread(environmentId, threadId). It returns upstream's answer for a member, and for a guest also requires Collaborate on that thread. While the server has not yet said which kind the connection is, nothing is withheld, so a member's composer never flickers.Quiet J5 surfaces. J5's reads (inbox and its count, Crew proposals and approvals, Fleet, Playbooks, Crew chips and spawned children on sidebar rows) stop once a connection is known to be a guest's: they report the server as one without the feature, which is never polled, and an earlier refusal leaves no error on screen. A guest's client may send one first round of these before it knows, which the server refuses. A member's reads go out exactly as before. J5's Personas and Playbooks pages leave out a server the person is a guest on, and say "Personas and Playbooks are not available on a server you are a guest on." when there is no other server.
Images and files in a granted thread. A guest may now ask
assets.createUrlfor a message attachment or a tool's inline image, and only when the server's own records put it in a thread the guest's grants cover (PersonAccess.messageAssetAccess: the attachment id must be in a message's attachment list, or the turn item must be stored under the thread named). Workspace, media and draft-workspace files, project favicons, GitHub media and native app icons stay refused. The URL is upstream's signed token for that one asset;/api/assetsserves only what the token's signed claims name.One sidebar path for a guest (changes #561). The HTTP sidebar snapshot is refused to a guest, and upstream's client falls back to the socket's feed, which was already filtered.
shellSnapshotForand the edit to upstream'sorchestration-v2/http.tsare gone.A reduced provider list for a guest (changes what #561 gives a guest). #561 gave a guest no providers. With none, upstream's composer shows its setup state, tells a guest to "Enable a provider in Settings" and offers a settings button, and the per-thread level cannot show through it.
GuestView.reduceServerConfignow gives a guest every enabled provider, built field by field. A guest receives exactly:instanceId,driver,displayName, andmodels; plus fixed values the schema requires:enabled: true,installed: true,version: null,status: "ready",auth: { status: "unknown" }, a placeholdercheckedAt,slashCommands: [],skills: [];slug,name,shortName,subProvider,isCustom,isDefault,isLegacy,capabilities.Nothing of a provider's sign-in (email, label, plan, profile), version or update state, health or messages, paths, usage, skills, commands, icons or setup links is sent. Disabled providers are left out. Later provider updates on the configuration feed are still dropped. The list does not depend on the guest's grants.
What a View guest still sees (not fixed here)
The single call covers the composer's send, queue, steer and stop, approvals and question prompts, and the snooze/settle banners. Everything below reads upstream's server-wide permission elsewhere, so it is still offered, and the server refuses it:
canOperateThreadthread-list-v2-items.tsx). From code, mobile was not runhtml_render, MCP Apps)Upstream requests a guest's client still sends and has refused (left alone):
vcs.listRefs(retries, capped at 30 s),server.reportClientActivity(every 25 s),subscribeVcsStatus,subscribeDeviceState,server.discoverSourceControl,projects.readFile,assets.createUrl,server.refreshProviders,scheduledTasks.subscribe,orchestration.getArchivedShellSnapshot, oneorchestration.dispatchCommandon opening a thread, andPOST /api/observability/v1/traces.UI changes
Not captured: the send button's "This connection cannot change threads." label (a tooltip); a Collaborate guest; mobile.
Live testing
Report:
artifacts/test-reports/j5code-share-2b-guest-client.md. Verdict: pass. Run by the builder with thej5-live-testskill, a member and a hand-made View guest on the same server; the base server (--base j5code/share-2-guest-filter) gave the before state. The last pass ran on the tree ofb86bcfc835.GET /api/orchestration/shellanswers it 403 (server log); the image attached to a granted thread's message renders for the guest (it loads from/api/assets, 200), where the base shows a filename tile; the Personas page shows the plain notice with no controls; the guest's first round of J5 reads is refused once per page load (Fleet, inbox count, Crew proposals) and none follows, with no badge or error left; the composer is upstream's read-only one; a member's thread, inbox count, Fleet and Crew chips are unchanged, and a member's Haiku turns completed.Upstream impact
Decisions: Jackson, 2026-10-12, per-thread levels and the thread action menu (#532); register D33 extended. All under
FORK.mdcase 69. After this PR the whole stack edits eight upstream files: these seven (ws.tsalso carries #561's wrapping calls) andapps/server/src/server.tsfrom #561.apps/web/src/components/ChatView.tsxapps/web/src/hooks/useThreadActionMenu.tsapps/mobile/src/features/threads/ThreadRouteScreen.tsxpackages/contracts/src/rpc.ts.merge(J5SharingRpcGroup)packages/client-runtime/src/rpc/client.tspackages/client-runtime/package.json./j5/sharingapps/server/src/ws.tslayerJ5WsRpc(...)callapps/server/src/orchestration-v2/http.tsChecklist
FORK.md(case text and file-table row) in this PRdocs/j5/product/upstream.mddocs/j5/product/and user docs rewritten where this changes them (register D33; no user doc, since no guest can be made yet)Built by Claude Opus 5.5 in Claude Code (J5 Code).
🤖 Generated with Claude Code