Skip to Content
Amaru

Contracts and SDK

The versioned Amaru contracts, covering the OpenAPI HTTP API, JSON Schema events, the Provider and Worker protocols, and the generated TypeScript SDK.

packages/contracts is the versioned, UI-agnostic contract of the Amaru Platform: the public HTTP API, the event stream, the external Provider protocol and the Worker protocol. Clients, Workers and plugins depend on it, and the Platform must serve exactly what it declares. It is a 0.x package.

PathContent
openapi/openapi.yamlOpenAPI 3.1, routes under /v1
schemas/*.jsonJSON Schema 2020-12, one file per type
schemas/events/*.jsonEvent stream frames
schemas/provider/*.jsonExternal Provider protocol amaru.provider/v1 (stdio, one JSON object per line)
proto/amaru/worker/v1/worker.protoWorker protocol amaru.worker.v1 (WebSocket + Protobuf)
routeguard/Route-drift guard for the Platform's tests
fixtures/Shared fixture corpus, validated in Go and TypeScript

packages/sdk is a TypeScript SDK generated from the OpenAPI contract, with an event-stream client that resumes from a cursor.

Checks

TargetWhat it runs
make contracts-testGo structural checks of the schemas and the fixture corpus
make contracts-protobuf lint, buf format and buf breaking against the baseline
make contracts-tsTypeScript validation of the same fixture corpus
make sdk-tsSDK staleness check and type checks

The contract package is licensed Apache-2.0.

Based on packages/contracts/README.md, docs/engineering/validation.md.

Next steps

On this page