Skip to content

Supported declarations ​

The native 0.2.0 SDK compiles the closed v2 grammar for four targets. Generation diagnostics, rather than historical APIs or release plans, define the checked-out implementation. Existing integrations require explicit app wiring and data migration; initial schema.sql is for an empty database.

Supported ​

FeatureAvailability / agent action
Closed v2 Schema/View/Procedure grammar, PostgreSQL SQL authoringGenerated for Bun SQLite, Bun PostgreSQL, Cloudflare D1 and Cloudflare PostgreSQL; dialect behavior stays native.
Operational Schemas, scope, TTL read visibility, indexes, checks, native SQL facilitiesGenerated initial DDL and compiled SQL policy; run migrations and TTL maintenance in application code.
System-only TTL maintenanceGenerated <schema>.sweepExpired, bounded cursor scans and optional dry-run; app owns scheduled() wiring and cron configuration. See TTL maintenance.
Typed SQL Views and Procedures, auth predicates, OCC, atomic writesGenerated bare queries accept validated inputs and a verified Caller; date/date-time outputs are ISO strings, native errors stay internal.
Typed Store collections and internal Views/ProceduresShared Store, AND-only filters, indexed non-null keyset ordering, atomic batches; interactive transactions on SQLite/PostgreSQL.
Searchable fields, Store search and SQL search/rankGenerated SQLite/D1 FTS5 trigram table and maintenance triggers; PostgreSQL ILIKE. Store find/first trim non-empty search and match exact id OR declared fields, within the caller's row rules.
Better Auth integration and Workers buildsApp owns auth.ts and resolveCaller; optional OAuth helpers provide consent/connected apps, live grant/session checks and DPoP. mantle generate emits native Wrangler build configuration. Keep heavy auth imports lazy.
Transactional email port, English templates and dev console senderOptional @aotter/mantle/email; app supplies the sender and passes locale through. See email wiring.
View keyset pages, generated boundary validation and HTTP error mappingGenerated paged/views/* for proved exposed/internal Views: indexed non-null tuples, complete groups and singleton joins/lookups; validation/* and wire; see surface contracts.
REST and http Trigger exposureSupported generated rest.ts; app mounts with { db, caller } and required handlers for ref contracts. Public Views page at /api/views/<name>; HTTP Triggers keep method/path.
Generated MCP and mcp Trigger exposurePublic/admin tools, shared generated checks, publishing transitions on admin only; SDK loads on matching requests. Install the official MCP peer for manifests selecting this surface.
Dynamic web.ts (llms.txt, sitemap, .md alternates, head tags)Generated; mount web({ ... }); see surface contracts.
Native Admin bindings, server and consoleSupported; select --admin / admin: true and mount entries(bindings.schemas, bindings.adapter). Shared authorized read templates, native Procedure writes and the console; see Native Admin.
Localized Schemas and translationsPlain-string locale values, atomic published-parent guard, SQL parent visibility and generated page locale helper; see Translations.
Opt-in lifecycle: publishingGenerated status, published_at, admin-only transitions and published-only public reads; see Publishing.
ref Procedures and typed HandlersGenerated Handlers type; pass implementations at store(db, caller, { handlers }); mantle generate lists them. See ref Procedures.
Optional site settings and mediaSelect site defaults at generation to emit the generated site module and deployment tables; native media upload lifecycle, app-owned R2/signing. See media.

Refused ​

Each unsupported declaration produces GENERATE_UNSUPPORTED, its manifest path, and the following hint. Invalid grammar/SQL retains the compiler's own diagnostic codes and paths. Multiple declarations produce multiple diagnostics.

DeclarationDo instead
schedule Triggers, including disabled onesWire scheduled() yourself.
lifecycle Triggers: before/after hooks, including targets using refWrite a custom handler.
requires.guard on a View or ProcedureWrite a custom handler that checks authorization before executing queries.
A View projecting a native geo valueSelect the latitude and longitude columns explicitly.
Dynamic or repeated View output namesGive each SELECT output a unique explicit alias.
Declared date/date-time outputs without one SELECT item per outputExpand the SELECT list explicitly.
Input properties differing only in caseRename input properties to be unique without regard to case.
PostgreSQL JSON/date/date-time parameters used without the declared castWrap each occurrence in the concrete CAST(... AS <type>) shown by the diagnostic.

Store handles simple AND reads and writes; use internal Views for OR, joins, aggregates and reuse. Ref Procedures are supported with a typed caller/transaction-bound Store. See typed queries, lifecycle/locales and database ownership.