Skip to content

proto(serving): sandboxed frame and shell broker on one host (#175) - #185

Closed
allisonmahmood wants to merge 5 commits into
mainfrom
proto/frame-broker
Closed

allisonmahmood wants to merge 5 commits into
mainfrom
proto/frame-broker

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Sep 6, 2026 •

Copy link
Copy Markdown
Owner

Prototype for #175, the frame-and-broker ticket on the SDK map. Not for merge. It is here so the team can run it, poke at it and argue with it; the branch goes away when the ticket closes.

Tier 1 patches run script, and the decision on #171 is that the script runs in a sandboxed frame on the same host, reaching Patchy only through the shell over postMessage. Nobody had watched a real browser do that yet: deep links, back and forward, images from the patch's own files, downloads, printing, a public patch opened signed out, a viewer from another company.

This is a plain Node host with a session cookie, three fixture patches, the shell with its broker, the SDK as patch code sees it, and a Playwright click-through. Chromium and Firefox pass the whole list. Astra's review moved the broker onto a document-bound MessageChannel so a frame that navigates itself inherits nothing.

Decided on the ticket and reflected here: the frame gets allow-modals so patch code prints its own document, and the content CSP keeps connect-src 'none' so every data call goes through the broker. The findings, the reasoning and what the build ticket must carry are on #175.

Try it

pnpm proto:frame            # http://localhost:4175, pick who you are, open a patch
pnpm proto:frame:click      # the click-through in every installed Playwright browser

Safari is the browser nobody has run this in yet.

Built by Claude Fable 5.1 in Claude Code.

allisonmahmood and others added 3 commits September 6, 2026 18:56
Throwaway prototype for wayfinder ticket #175. Not for main.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…s validated

After astra's review: a navigated frame inherits nothing, table and file
names are identifiers, op dispatch is own-property only.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@github-actions github-actions Bot added area:server Touches the server area area:ci CI, shared testing infrastructure, development scripts and tooling area:docs Touches the docs area size:l 501-1,000 changed lines labels Sep 6, 2026
Decided with Allison: the frame prints its own document; connect-src stays
'none' on tier 1 content.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
So Safari on another machine can reach it over the LAN.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@vsrikar08

Copy link
Copy Markdown
Collaborator

Ok did some reviewing for this pr. I agree with the approach to building it is not to do it all at once, but to do it in steps. AKA build over time. We keep adding to the sdk for tier1, tier 2. etc. I agree with th

@vsrikar08

Copy link
Copy Markdown
Collaborator

We need to use daybreak at every step to ensure no vulnerabilities+ add in security features. But this can come at the end .

@vsrikar08

Copy link
Copy Markdown
Collaborator

Also, I feel the worst part of everytthing will be how we handle external libraries. Patchy needs supported ways to provide them. I need to research more on this, actually, but from my understanding, sometimes some libraries are incompatible with agents at times, or don't do it the right way the first time.

@vsrikar08

Copy link
Copy Markdown
Collaborator

Make sure one thing. We need to make sure explicitly that patchy does not send data (company data) through anything but Patchy. Make that a thing.

@vsrikar08

vsrikar08 commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

Again, there are a lot of tiny things we are gonna have to take into account here when designing for tier 1 such as large sets of data being corrupted while putting them on patch page, having super large files in our database, so definitely keep the database integration stuff in mind.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Closing as not for merge; the prototype answered its question. Findings and the resolution are on #175 (#175 (comment)). The branch stays until Tier 1 serving (#183) has lifted what it needs; delete it then.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Final prototype cleanup for #209: this not-for-merge PR remains closed. The frame and broker design was lifted into Tier 1 serving by #205 (PR #221). Deleting only the remote proto/frame-broker branch; local branches and worktrees are untouched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, shared testing infrastructure, development scripts and tooling area:docs Touches the docs area area:server Touches the server area size:l 501-1,000 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants