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.
| Path | Content |
|---|---|
openapi/openapi.yaml | OpenAPI 3.1, routes under /v1 |
schemas/*.json | JSON Schema 2020-12, one file per type |
schemas/events/*.json | Event stream frames |
schemas/provider/*.json | External Provider protocol amaru.provider/v1 (stdio, one JSON object per line) |
proto/amaru/worker/v1/worker.proto | Worker 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
| Target | What it runs |
|---|---|
make contracts-test | Go structural checks of the schemas and the fixture corpus |
make contracts-proto | buf lint, buf format and buf breaking against the baseline |
make contracts-ts | TypeScript validation of the same fixture corpus |
make sdk-ts | SDK 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
- Platform core: the service that must serve these contracts.
- Development: every check target.
Platform core
The Go packages of the Amaru Platform core in services/platform, what each one holds today, how it is tested, and what is still missing on main.
Contributing
Information for people working on Amaru, covering the make targets and tools, conventions and ADRs, the contributor license agreement and security reports.