Architecture Overview
Layer 1: Intent qail-core AST + parser + validator Layer 2: Protocol AST -> PostgreSQL/Qdrant wire messages Layer 3: Drivers Connection I/O, pooling, response decode Layer 4: Tooling CLI, static fixtures, compatibility transpiler
Plain English: app input becomes one typed AST, then protocol messages are sent to the database engine.
Release Snapshot
Latest stable: v2.0.4.
The v2.0.0 release makes PostgreSQL the canonical SQL target, removes retired compatibility planes, and strengthens
tenant/owner RLS initialization, relation-qualified scope injection, migration policy resolution, wire encoding, and build-time query validation.
SDK packaging: Dart and the TypeScript 0.2.0 contract are present in the current monorepo source, but their
package-registry release state remains tracked separately from the Rust workspace version.
Gateway AutoREST page: /gateway
Layer 1: Intent (qail-core)
| Component | Ready | Notes |
|---|---|---|
| Qail AST | ✓ | Core typed structure for read/write/query workflows |
| Builder API | ✓ | .get() .filter() .order_by() .limit() |
| Parser | ✓ | Text syntax to AST for CLI/LSP pipelines (browser WASM packaging deferred) |
| Validator | ✓ | Schema checks with field/type hints |
| Formatter | ✓ | Canonical output for qail fmt |
| Schema-as-Proof | ✓ | Compile-time proof path via TypedQail, RelatedTo, and RLS witness builders |
Dedicated SDK page: /sdk
Layer 2: Protocol Encoders
| Target | Query Path | Params | Scope |
|---|---|---|---|
| ✓ | ✓ | Production protocol path | |
| ✓ | ✓ | Active vector target (driver surface currently beta) | |
| Native Cache | ✓ | ✓ | Built-in cache layer (Moka) |
Layer 3: Drivers
| Driver | Language | Connection | Pooling | Status |
|---|---|---|---|---|
| Rust | ✓ | ✓ | Production | |
| Zig | ✓ | ✓ | Production | |
| Flow Engine | Rust | ✓ | ✓ | Production workflow runtime |
| Flow Ledger | Rust/PostgreSQL | ✓ | ✓ | Postgres-backed leases, idempotency, side-effect replay, and timeouts |
| Rust | ✓ | ✓ | Beta (vector) |
SDK Surface
| SDK | Package / Path | Status | Notes |
|---|---|---|---|
| TypeScript | @qail/client | Production | First-party direct SDK |
| Swift | sdk/swift | Production | First-party direct SDK |
| Kotlin | sdk/kotlin | Production | First-party direct SDK |
| Dart | sdk/dart | Unreleased | First-party direct SDK (unreleased, 0.1.0) |
deferred | Deferred | Native binding remains out of current release scope |
Layer 4: Tooling
| Tool | State | Purpose |
|---|---|---|
| qail CLI | Live | Build, validate, format, and migration workflows |
| Static validation fixtures | Live | CLI-first reference fixtures and query-shape validation flow |
| SQL Transpiler Compatibility | Live | Compatibility output for docs/tooling paths |
| Browser WASM Transpiler | Deferred | Out of current release scope; use CLI/runtime driver paths instead |