smthrs/browser. It runs the
real Smithers driver, scheduler, renderer, graph extractor, schema validation,
and task dependency semantics in a lean, Node-free bundle.
createBrowserSmithers creates a fresh driver and scheduler session per
run() call. getRun(runId) and getOutputs(runId) read through the selected
storage adapter. runBrowserWorkflow(workflow, options) is the one-shot
equivalent when you don’t need to retain the wrapper.
Browser-safe exports
Runtime options
The default runtime usesDate, performance, abortable setTimeout, Web
Crypto UUIDs, and Map-backed run/output storage. Override any portable seam:
storage when state must outlive a page refresh, and executeTask to
route execution through an application-owned worker, provider client, or
policy boundary. The default executor supports static and compute tasks plus
in-process agents exposing generate, execute, run, or call, and
validates Zod-like outputSchema values before storing outputs.
Capability boundary
The browser adapter fails closed forfilesystem, subprocess, worktree,
and sandbox: calling one of those throws a RuntimeCapabilityError with
code RUNTIME_CAPABILITY_UNAVAILABLE, plus the runtime name, capability, and
operation. The exported Worktree primitive is portable at graph-render time,
but a browser run can’t resolve a real worktree unless the application
supplies a custom RuntimeAdapter that owns that capability.
The browser facade omits Node database factories, server helpers, CLI agents,
subprocess code, bundled tools, and the full Node component barrel. Use the
main smthrs entry point for those surfaces.
Source browser engine · Tests browser runtime tests · See also Run workflow, Testing workflows, Package configuration