bookclerk_workerd

Development These docs follow the development version and change with every merge.

Last updated View as Markdown

Library surface for the pinned Cloudflare workerd helper and egress policy.

Audience

The bookclerk-workerd launcher binary and host packaging (cargo ensure-workerd). Guest authors do not link this crate; they run inside the isolate it configures.

See docs/plugins/README.md for jail / workerd isolation requirements.

Re-exports

Modules

  • bridge_addr: Where the launcher reaches workerd's bridge RPC socket, and the stream it gets.
  • bridge_http: Minimal HTTP/1.1 client for the workerd bridge (JSON control plane, Cap'n Proto /invoke bodies, and streamed object bodies).
  • bridge_stdio: Bookclerk Cap'n Proto stdio adapter over the workerd HTTP bridge.
  • config: Generate a real workerd Cap'n Proto config for one plugin isolate.
  • control: Control messages workerd writes on --control-fd: the port each socket bound.
  • egress: Host egress policy for workerd guests (wraps shared EgressPolicy).
  • egress_relay: The launcher's egress relay: a workerd isolate's only way out of its jail.
  • ensure: Download / refresh the pinned Cloudflare workerd binary.
  • grant: Operator consent grant overrides delivered to bookclerk-workerd via env.
  • granted: Host-granted HTTP reverse channel for workerd isolates: JobRunner.job streams (Source / Destination / ProgressSink), the job's Cancellation long poll (/cancel), named database sessions (/db/execute, /db/execute-streamed), and the EVENTS outbox binding (/events/publish, /events/read), the NOTIFY binding (/notify/raise), the AI binding (/ai/run), and the SOCKETS broker binding (/sockets/*, parsed in crate::granted_sockets).
  • granted_http: Sans-IO HTTP/1.1 parsing for the granted reverse channel.
  • granted_sockets: POST /sockets/<op> on the granted reverse channel: a workerd isolate's env.SOCKETS calls, parsed and answered over plain byte slices.
  • granted_webhooks: POST /webhooks/<op> on the granted reverse channel: a workerd isolate's env.WEBHOOKS calls, parsed and answered over plain byte slices.
  • inherited_link: Open a host-inherited sibling link (fd:<n> / handle:<n>) as a Tokio stream.
  • invoke: POST /invoke: the Cap'n Proto data plane between the launcher and the adapter isolate.
  • pin: Pinned Cloudflare workerd release metadata shared with bookclerk-dev.
  • python_snapshot: Python start-up snapshots for workerd isolates.
  • socket_broker: The socket broker: holds a plugin instance's WebSockets while its guest sleeps.
  • socket_proxy: Host-mediated TCP proxy for native-behind-workerd guests.
  • socket_table: The socket broker's bookkeeping, without I/O.
  • state_sweep: Removes isolate state directories that a killed launcher left behind.
  • unix_bind: Unix-domain listeners that stay under sockaddr_un limits.
  • webhook_request: Sans-IO checks for one request on the public webhook route (POST /hooks/<token>/<name>), in the order the route applies them.

Generated from crates/bookclerk-workerd at main · View as Markdown