Skip to content

Conversation

@rekmarks
Copy link
Member

@rekmarks rekmarks commented Aug 16, 2024

Title technically correct.

> await kernel.capTpCall('whatIsTheGreatFrangooly', [])
< "Crowned with Chaos"

This establishes a CapTP connection using @endo/captp over @ocap/streams between the offscreen document and the (currently singular) iframe. The iframe exposes a bootstrap object with a single method, which is called by the offscreen.

Instructions for whoever picks this up

  • The fanciful names of the iframe's bootstrap object can be replaced
    • It's fine to keep the functionality dead simple for now, as it is currently.
  • The implementation could use a lot of cleanup.
    • In particular I'm not committed to the current stream multiplexing implementation via StreamPayloadEnvelope.label. This ensures separate handling for Command and CapTP messages, which we need, but the current implementation is unlikely the ideal one.
  • I haven't made any attempt to get the extension tests running. It may require test(extension,streams): Set up browser tests #12 to get them working properly.

@socket-security
Copy link

socket-security bot commented Aug 16, 2024

No dependency changes detected. Learn more about Socket for GitHub ↗︎

👍 No dependency changes detected in pull request

@rekmarks rekmarks force-pushed the rekm/streams-2 branch 2 times, most recently from b34a259 to 28f3659 Compare August 19, 2024 22:33
Base automatically changed from rekm/streams-2 to main August 20, 2024 06:54
SMotaal added a commit that referenced this pull request Aug 22, 2024
This bumps `typescript@5.5.4` once again, reapplying changes from #23
which were accidentally reverted in #16.

This also applies minor patches to `packages/shims/scripts/bundle.js` to
prevent a known failure in `node@18`.
grypez added a commit that referenced this pull request Sep 12, 2024
Refs: #23 

> Title technically correct.
> 
> ```text
> > await kernel.capTpCall('whatIsTheGreatFrangooly', [])
> < "Crowned with Chaos"
> ```
> 
> This establishes a CapTP connection using `@endo/captp` over
`@ocap/streams` between the offscreen document and the (currently
singular) iframe. The iframe exposes a bootstrap object with a single
method, which is called by the offscreen.
> 

---------

Co-authored-by: Erik Marks <rekmarks@protonmail.com>
@rekmarks
Copy link
Member Author

Superseded by #43

@rekmarks rekmarks closed this Sep 13, 2024
@rekmarks rekmarks deleted the rekm/captp branch September 13, 2024 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants