API reference
The reference below lists the implemented server-brain, customer-device, and shared runtime exports from @tabworker/sdk. It does not describe proposed routes or unpublished protocol resources.
Classes
TabWorkerBrainHttpClientcreatePairing, importWork, getWork, and cancelWork.TabWorkerBrainHttpErrorstatus, bounded Core code, and retryable.TabWorkerNodeClient{ descriptor, transport }.HandlerWrapperNodeTransportWrapperNodeTransport by delegating each operation to a typed callback.InMemoryWrapperNodeTransportNodeSdkErrorcode, operation, retryable, and optional cause.TabWorkerNodeHttpTransportBrainRuntimeBodyRuntimeBodyExecutorRegistryPolicyEnforcedBrowserDriverCdpBrowserDriverServer-brain methods
| Method | Application scope | Returns |
|---|---|---|
createPairing(input) | node:pairings:write | A one-time pairing code and expiry. |
importWork(input) | node:work:write | The imported work ID. |
getWork(workId) | node:work:read | A bounded status/result projection. |
cancelWork(input) | node:work:write | The cancelled work projection and replay flag. |
The Brain client requires a trusted server runtime and rejects browser construction. Payloads default to a 256 KiB ceiling, reject secret-shaped fields, and allow only opaque local: secret references. Its application key is separate from every customer Node credential.
Transport interface
WrapperNodeTransport defines typed callbacks for connect, pair, receivePinnedWork, claimPinnedWork, authorize, start, heartbeat, progress, complete, cancel, and disconnect.
WrapperNodeTransportHandlers is the corresponding callback object accepted by HandlerWrapperNodeTransport.
Core types
| Export | Purpose |
|---|---|
NodeDescriptor | Node ID, application, environment, optional label/metadata, and capabilities. |
NodeCapability | Namespaced capability name and version. |
PinnedWorkItem | Work ID, revision, capability, summary, and JSON input. |
ClaimedWork | Transport claim ID and the exact pinned item. |
LocalAuthorizationAcknowledgement | Explicit local authority, consent, time, and opaque reference. |
StructuredCompletion | JSON result plus ProofReference. |
NodeJsonObject | Recursive JSON object alias that does not replace the existing Review Queue JsonObject. |
Runtime types
The package root exports WrapperJob, WrapperJobAdapter, BrainDurableState, BrainWireTransport, AssignmentMode, BodySessionConnector, BodyWireSession, BodyExecutor, LocalAuthorizationGate, BodyProofHook, and BodyAuditSink. These are transport and lifecycle seams; none contains product-specific browser instructions.
Brain HTTP types
The package root and @tabworker/sdk/node-runtime export CreateBrainPairingInput, BrainPairingDelivery, ImportBrainWorkInput, ImportBrainWorkResult, BrainWorkProjection, BrainWorkResult, CancelBrainWorkInput, and CancelBrainWorkResult.
Error codes
NodeSdkErrorCode currently includes invalid_descriptor, invalid_capability, invalid_authorization, invalid_input, invalid_state, invalid_progress_sequence, and transport_error.