Skip to content

docs: HTTP Proxy primitive (apps/http-proxy)#10

Merged
mgoldsborough merged 1 commit intomainfrom
docs/http-proxy
Apr 29, 2026
Merged

docs: HTTP Proxy primitive (apps/http-proxy)#10
mgoldsborough merged 1 commit intomainfrom
docs/http-proxy

Conversation

@mgoldsborough
Copy link
Copy Markdown
Contributor

Summary

New page documenting the http-proxy primitive added in nimblebrain#128.

Bundle authors need to know:

  • How to declare `_meta["ai.nimblebrain/http-proxy"]`
  • The route shape (`/v1/ws//apps///*`)
  • The three env vars the platform injects (`NB_WORKSPACE_ID`, `NB_PROXY_PREFIX`, `NB_PUBLIC_ORIGIN`)
  • The CSP block required on their `ui://` resources
  • The trust model — same-origin code, browser-extension level of trust

The page also lists platform-enforced defenses (loopback target, header strip, membership check, kill switch) and known gaps (no per-bundle origin isolation, WS not yet wired).

Cross-links `synapse-astro-editor` as the reference implementation.

Added to the Building Apps sidebar between UI Resources and Theming.

Test plan

  • `npm run build` succeeds — 70 pages built (was 69)
  • Sidebar entry renders in the right group order (verify in preview)
  • All in-page anchors resolve

Pairs with

Documents `_meta["ai.nimblebrain/http-proxy"]` for bundle authors:
manifest declaration (target/mount/websocket), the route shape
(`/v1/ws/<wsId>/apps/<bundle>/<mount>/*`), the three injected env vars
(NB_WORKSPACE_ID, NB_PROXY_PREFIX, NB_PUBLIC_ORIGIN), and the CSP
declaration required on `ui://` resources to frame the proxied URL.

Trust model spelled out plainly: same-origin code in the user's
session, treat http-proxy bundles like browser extensions, the
operator vouches for the code. Lists what the platform DOES enforce
(loopback target, header strip, response strip, membership check,
per-workspace kill switch) and what it does NOT (no per-bundle origin
isolation, no WS upgrade yet).

Cross-links to `synapse-astro-editor` as the reference implementation.
Added to the Building Apps sidebar between UI Resources and Theming.
@mgoldsborough mgoldsborough merged commit 7c56737 into main Apr 29, 2026
@mgoldsborough mgoldsborough deleted the docs/http-proxy branch April 29, 2026 07:52
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.

1 participant