Codegen
Generate typed accessors for your Lunnoa Automate deployment.
Entity types, workflow inputs, and agents are defined per deployment, so the generic SDK types them loosely. Generate typed accessors against your deployment first, then commit the output with your app.
Run codegen
codegen.sh
This writes lunnoa.generated.ts with createDeploymentClient. Entity attributes, workflow inputs, and agents become compile-time checked:
lunnoa.generated.usage.ts
Re-run codegen whenever entity types, workflows, or agents change on the deployment.
The generated file also exports:
DEPLOYMENT_SCHEMA_FINGERPRINT: stable string of entity-type slug,schemaRevision, andallowUnknownAttributesENTITY_TYPE_SCHEMA_REVISIONS: map of slug → revision at codegen time
Compare those against a live entityTypes.list() when you need to detect stale generated types after a schema deploy.
If you cannot run codegen yet, fall back to the generic namespaces and discover schemas at runtime.
Next
- Discovery: inspect schemas without generated types
- Entities: query and create records
- CLI: discover the catalogue, then deploy
defineEntityTypebefore regenerating - TypeScript client SDK: overview and auth patterns