Skip to main content
@elanotes/sdk is packaging of the HTTP contract, not a new surface. Types come from openapi-typescript over contracts/openapi/elanotes.v1.json. The client is openapi-fetch. Workspace-only. Not published to npm. Package path: packages/sdk. Browser-safe: no Node-only modules. Read the bearer from ELA_API_TOKEN. Create a personal access token in web Settings → Access tokens. Read is included; authenticated note mutations require notes.write. Permissions are enforced through the SDK just as through HTTP, CLI, and Cloud MCP.

Create a client

baseUrl is the API origin (no /v1 suffix). A local API uses baseUrl: "http://127.0.0.1:4000". Send the bearer in token. Writes get an automatic Idempotency-Key (UUID) unless you set one. Failed responses throw ElanotesError with reason, hint, help, retryAfterSeconds, and details. Check write receipts before reading applied-only fields:
A queued write has not changed the note. Receipt inspection also requires notes.review when authenticated. With a write-only token, hand the ID to a reviewer; agents must not approve their own proposals.

VERSION_MOVED

Regenerate after an OpenAPI change: node scripts/sdk-generate.mjs. Drift check: node scripts/assert-sdk-current.mjs (wired into pnpm verify). The Python SDK is generated from the same spec.