Skip to main content
awp-typescript (@hyperduality/awp) is an agent SDK for Node 20+, written from the specification and the canonical schemas alone. It targets 0.1-draft.12 and vendors that revision’s schemas, frame vectors, and lifecycle table.
Alpha: the API changes with each draft revision. Its demo agent, awp-demo, is Core Agent (lockstep): AWP-conformant against 0.1-draft.12 (awp-conformance 0.1.0a10) and Core Agent (streaming): AWP-conformant against 0.1-draft.12 (awp-conformance 0.1.0a10) (reports).

Usage

In lockstep, advance explicitly: await client.advance(1) returns once the result and a frame of the new tick on every per-tick channel are held (AWP-TIM-003).

What it covers

The control connection and JSON-RPC over WebSocket, manifest validation, grants, the binary and inline frame forms, per-channel loss accounting and resync, the action lifecycle and status_seq replay, heartbeats and clock synchronization, receiver reports, lockstep advancement, reconnection with resumption, the ws stream binding, and command channels. Not covered: stream bindings other than ws, the approver role, session.transfer, and the awp.bearer.<token> subprotocol for the credential (the client sends Authorization).

Demo agent

It moves the reference arm through four targets, cancels one move while it executes, and closes; it resumes after a lost connection and continues in a new session if the world no longer holds the old one.