Documentation Index
Fetch the complete documentation index at: https://iii.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
This page is a hand-authored snapshot of the planned public surface. The final reference will be
generated from the SDK source. The Browser SDK is a standalone implementation alongside the
Node SDK, not a build of it.
Installation
Common methods
registerWorker
Connect a browser tab to a running iii engine and return its handle.
address is the engine’s SDK WebSocket URL. The returned ISdk carries every method below.
registerFunction
Register a callable function in this tab.
registerTrigger
Bind a registered function to a configured trigger instance.
Trigger.unregister() on the returned handle. There is no top-level
unregisterTrigger.
registerTriggerType
Declare a new trigger type that this tab advertises.
unregisterTriggerType
Remove a previously registered trigger type.
trigger
Invoke a registered function.
EnqueueResult for
TriggerAction.Enqueue actions, and with undefined for TriggerAction.Void.
shutdown
Disconnect from the engine and release resources.
Trigger actions
TriggerAction is a runtime const that produces the value passed to trigger’s action field.
{ type: "enqueue"; queue: string } | { type: "void" }.
Channels
ChannelReader and ChannelWriter are runtime classes wrapping the engine’s stream WebSockets
using the browser’s native WebSocket API. StreamChannelRef is the type passed between SDK calls
to identify a channel:
ChannelReader exposes onMessage, onBinary, readAll, and close. ChannelWriter exposes
sendMessage(msg: string), sendBinary(data: Uint8Array), and close().
Connection state
IIIConnectionState is the literal-type alias "disconnected" | "connecting" | "connected" | "reconnecting" | "failed", exported from the package root.
Info types
FunctionInfo.function_id, optionaldescription, optionalrequest_format/response_format, optionalmetadata.TriggerInfo.id,trigger_type,function_id, optionalconfig/metadata.
WorkerInfo and WorkerMetadata are not part of this SDK. Use the engine introspection
functions (engine::workers::list) when a
browser client needs metadata about other workers.
MessageType
A runtime enum naming every wire frame the SDK exchanges with the engine. Rarely needed by
callers.
Surfaces not in this SDK
Logger. The Browser SDK does not ship a structured logger; use the browser’s built-inconsoleand rely on the OpenTelemetry surfaces provided by the iii-observability worker for export.- Error class. There is no
IIIError/IIIInvocationErrorclass. Failures are surfaced as rejected promises carryingErrorinstances; inspect the message and any attachedcodefor the engine error code.