logstream

Live log tail in an opaque-origin sandboxed iframe (xterm.js). The only plugin whose traffic is not turn-based: the host PUSHES NDJSON lines from GET /stream and delivers unsolicited streamBatch events over the postMessage bridge; the frame renders one batch per ~16ms tick and acks with streamAck carrying the last rendered sequence number. Backpressure is explicit — a 4-batch ack window and a bounded host buffer that drops from the OLDEST end when the producer outruns the frame, with the dropped count riding the next batch and rendering as a visible 'N lines dropped' marker. Scrollback is bounded at 10,000 lines. Read-only: stream:read + theme:read only, no PTY, no shell, no command input, no writes.

v0.1.0sandboxed iframe

Install and mount

go get github.com/DonaldMurillo/gofastr-plugins@v0.5.0

import "github.com/DonaldMurillo/gofastr-plugins/logstream"

app.RegisterPlugin(logstream.New())

Isolation

Runs in an opaque-origin iframe

The frame never gets allow-same-origin, so it cannot reach host cookies, the database, or the host DOM. It talks to the host only over the versioned postMessage bridge, limited to the capabilities listed below.

Manifest

Plugin version
0.1.0
Framework compat
>=0.28.0
Isolation
sandbox-iframe-opaque
Sandbox tokens
allow-scripts
Capabilities
stream:read, theme:read
Optional capabilities
none
CSP additions
none
Route prefix
/__gofastr/plugin/logstream
Entry
/__gofastr/plugin/logstream/term.html
Schema
logstream-v1
Min height
560px

All plugins