{"metadata":{"schemaVersion":1,"revision":"05d0bf2c2e562e5751f985c240f9ee20120716d8","dirty":false,"sourceDigest":"aabe6cfcc4172b870d5e272142958e9ea8d8784c2aa23133156e5a7ee633318e","generatedAt":"2026-09-04T23:58:25.590Z","typescript":"6.0.3","packages":[{"name":"@rindle/affinity","version":"0.0.0","private":false,"manifest":"packages/affinity/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/api-server","version":"0.0.0","private":false,"manifest":"packages/api-server/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/cli","version":"0.0.0","private":false,"manifest":"packages/cli/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/client","version":"0.0.0","private":false,"manifest":"packages/client/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/daemon-client","version":"0.0.0","private":false,"manifest":"packages/daemon-client/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/devtools","version":"0.0.0","private":false,"manifest":"packages/devtools/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/narrator","version":"0.0.0","private":false,"manifest":"packages/narrator/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/narrator-react","version":"0.0.0","private":false,"manifest":"packages/narrator-react/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/normalized","version":"0.0.0","private":false,"manifest":"packages/normalized/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/optimistic","version":"0.0.0","private":false,"manifest":"packages/optimistic/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/query-compiler","version":"0.0.0","private":false,"manifest":"packages/query-compiler/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/react","version":"0.0.0","private":false,"manifest":"packages/react/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/react-devtools","version":"0.0.0","private":false,"manifest":"packages/react-devtools/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/remote","version":"0.0.0","private":false,"manifest":"packages/remote/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/replica","version":"0.0.0","private":true,"manifest":"rust/rindle-replica-node/package.json","distribution":"Repository build; private package"},{"name":"@rindle/room","version":"0.0.0","private":false,"manifest":"packages/room/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/sql-client","version":"0.0.0","private":false,"manifest":"packages/sql-client/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/tanstack","version":"0.0.0","private":false,"manifest":"packages/tanstack/package.json","distribution":"Public export map; development manifest version (0.0.0)"},{"name":"@rindle/wasm","version":"0.0.0","private":false,"manifest":"packages/wasm/package.json","distribution":"Public export map; development manifest version (0.0.0)"}],"validation":{"declarations":"passed","publicTypecheck":"passed","unresolvedExports":[{"module":"@rindle/replica","name":"NativeReplicaDb"},{"module":"@rindle/replica","name":"NativeMutationTxn"},{"module":"@rindle/replica","name":"NativeClusterDb"},{"module":"@rindle/replica","name":"ClusterMutationTxn"}],"privateTypecheckDiagnostics":[{"code":2307,"message":"Cannot find module '../index.js' or its corresponding type declarations."},{"code":2307,"message":"Cannot find module '../index.js' or its corresponding type declarations."},{"code":2307,"message":"Cannot find module '../index.js' or its corresponding type declarations."},{"code":2307,"message":"Cannot find module '../index.js' or its corresponding type declarations."},{"code":2307,"message":"Cannot find module '../index.js' or its corresponding type declarations."}],"packageTests":"Not run by reference generation"},"buildUrl":null,"rust":{"compiler":"rustc 1.96.0 (ac68faa20 2026-05-25)","command":"cargo doc --locked --lib --no-deps -p libsqlite3-sys -p rindle -p rindle-cdc -p rindle-cdc-apply -p rindle-index-advice -p rindle-planner -p rindle-regex -p rindle-replica -p rindle-sqlite -p rindle-value -p rindle-wire -p rindle-writeplane -p rusqlite","features":"Default features; Cargo unifies features requested by these three crates and their dependencies.","crates":[{"name":"rindle","version":"0.1.0","publish":false},{"name":"rindle-replica","version":"0.1.0","publish":false},{"name":"rindle-sqlite","version":"0.1.0","publish":false}],"documentedCrates":[{"name":"libsqlite3-sys","version":"0.30.1"},{"name":"rindle","version":"0.1.0"},{"name":"rindle-cdc","version":"0.1.0"},{"name":"rindle-cdc-apply","version":"0.1.0"},{"name":"rindle-index-advice","version":"0.1.0"},{"name":"rindle-planner","version":"0.1.0"},{"name":"rindle-regex","version":"0.1.0"},{"name":"rindle-replica","version":"0.1.0"},{"name":"rindle-sqlite","version":"0.1.0"},{"name":"rindle-value","version":"0.1.0"},{"name":"rindle-wire","version":"0.1.0"},{"name":"rindle-writeplane","version":"0.1.0"},{"name":"rusqlite","version":"0.32.1"}],"validation":"rustdoc passed with broken intra-doc links denied","sourceDigest":"485d1ac96c5fb8a0ce069962259ffbb8d657024219e2a4a06b8deb2a206fac4d"}},"modules":[{"name":"@rindle/affinity","source":"packages/affinity/src/index.ts","package":"@rindle/affinity","symbols":[{"name":"Expect","originalName":"Expect","kind":"InterfaceDeclaration","signature":"/** What {@link verify} holds a ticket against, supplied by the verifier. */\nexport interface Expect {\n    /** The verifier's app id; must equal `payload.app`. */\n    app: string;\n    /** Current wall-clock, unix seconds. `exp < now` ⇒ rejected. */\n    now: number;\n    /** Minimum accepted generation; `gen < minGen` ⇒ rejected. `0` accepts any. */\n    minGen: number;\n}","description":"What {@link verify} holds a ticket against, supplied by the verifier.","source":"packages/affinity/src/index.ts","line":50,"href":"/reference/typescript/affinity/#symbol-Expect"},{"name":"HEADER_NAME","originalName":"HEADER_NAME","kind":"VariableDeclaration","signature":"/** The api-server → fleet control-plane header carrying the ticket on `/materialize` and `/query`. */\nexport declare const HEADER_NAME = \"Rindle-Affinity\";","description":"The api-server → fleet control-plane header carrying the ticket on `/materialize` and `/query`.","source":"packages/affinity/src/index.ts","line":26,"href":"/reference/typescript/affinity/#symbol-HEADER_NAME"},{"name":"headerTicket","originalName":"headerTicket","kind":"FunctionDeclaration","signature":"/** Extract the ticket from a {@link HEADER_NAME} value. Returns the raw segment, or `null`. */\nexport declare function headerTicket(value: string): string | null;","description":"Extract the ticket from a {@link HEADER_NAME} value. Returns the raw segment, or `null`.","source":"packages/affinity/src/index.ts","line":150,"href":"/reference/typescript/affinity/#symbol-headerTicket"},{"name":"mint","originalName":"mint","kind":"FunctionDeclaration","signature":"/**\n * Mint a ticket over `payload`, signed with `key`. Deterministic (no randomness): the same\n * `(payload, key)` always yields the same token. The compact JSON is built in the fixed field order\n * so the bytes match the Rust crate's `serde_json` compact output.\n */\nexport declare function mint(payload: Payload, key: Key): string;","description":"Mint a ticket over `payload`, signed with `key`. Deterministic (no randomness): the same\n`(payload, key)` always yields the same token. The compact JSON is built in the fixed field order\nso the bytes match the Rust crate's `serde_json` compact output.","source":"packages/affinity/src/index.ts","line":89,"href":"/reference/typescript/affinity/#symbol-mint"},{"name":"Payload","originalName":"Payload","kind":"InterfaceDeclaration","signature":"/**\n * The signed ticket body. Field order here is the canonical mint order — it is exactly the compact\n * JSON that gets base64url-encoded and signed, so it must match the Rust `Payload` struct order.\n */\nexport interface Payload {\n    /** App id the ticket is scoped to. */\n    app: string;\n    /** Placement target id. */\n    mid: string;\n    /** Region code of `mid`. */\n    region: string;\n    /** Subject: the connection identity (clientInstanceId). */\n    sub: string;\n    /** Issued-at, unix seconds (informational). */\n    iat: number;\n    /** Expiry, unix seconds. `verify` rejects once `now > exp`. */\n    exp: number;\n    /** Generation minted under; a fleet-wide bump drains older tickets. */\n    gen: number;\n}","description":"The signed ticket body. Field order here is the canonical mint order — it is exactly the compact\nJSON that gets base64url-encoded and signed, so it must match the Rust `Payload` struct order.","source":"packages/affinity/src/index.ts","line":32,"href":"/reference/typescript/affinity/#symbol-Payload"},{"name":"TICKET_PREFIX","originalName":"TICKET_PREFIX","kind":"VariableDeclaration","signature":"/** The token namespace marker — the first dot-segment of every ticket. */\nexport declare const TICKET_PREFIX = \"aff\";","description":"The token namespace marker — the first dot-segment of every ticket.","source":"packages/affinity/src/index.ts","line":20,"href":"/reference/typescript/affinity/#symbol-TICKET_PREFIX"},{"name":"verify","originalName":"verify","kind":"FunctionDeclaration","signature":"/**\n * Verify `token` against `keys` (current first, then rotation-window predecessors) and `expect`.\n * The HMAC is checked (constant-time) over the transmitted base64url payload segment before the\n * payload is parsed, so a tampered payload fails as `bad-signature`, never as a parse of attacker\n * bytes.\n */\nexport declare function verify(token: string, keys: readonly Key[], expect: Expect): VerifyResult;","description":"Verify `token` against `keys` (current first, then rotation-window predecessors) and `expect`.\nThe HMAC is checked (constant-time) over the transmitted base64url payload segment before the\npayload is parsed, so a tampered payload fails as `bad-signature`, never as a parse of attacker\nbytes.","source":"packages/affinity/src/index.ts","line":110,"href":"/reference/typescript/affinity/#symbol-verify"},{"name":"VerifyError","originalName":"VerifyError","kind":"TypeAliasDeclaration","signature":"/** Why a ticket failed {@link verify}. Every variant is a terminal reject (fall back to re-pin). */\nexport type VerifyError = \"malformed\" | \"bad-signature\" | \"wrong-app\" | \"expired\" | \"stale-generation\";","description":"Why a ticket failed {@link verify}. Every variant is a terminal reject (fall back to re-pin).","source":"packages/affinity/src/index.ts","line":60,"href":"/reference/typescript/affinity/#symbol-VerifyError"},{"name":"VerifyResult","originalName":"VerifyResult","kind":"TypeAliasDeclaration","signature":"/** {@link verify}'s result: the authenticated payload, or a reason. */\nexport type VerifyResult = {\n    readonly ok: true;\n    readonly payload: Payload;\n} | {\n    readonly ok: false;\n    readonly error: VerifyError;\n};","description":"{@link verify}'s result: the authenticated payload, or a reason.","source":"packages/affinity/src/index.ts","line":68,"href":"/reference/typescript/affinity/#symbol-VerifyResult"},{"name":"WS_SUBPROTOCOL","originalName":"WS_SUBPROTOCOL","kind":"VariableDeclaration","signature":"/** The base ws subprotocol offered alongside the `aff.*` ticket; the daemon echoes it on the 101. */\nexport declare const WS_SUBPROTOCOL = \"rindle.v1\";","description":"The base ws subprotocol offered alongside the `aff.*` ticket; the daemon echoes it on the 101.","source":"packages/affinity/src/index.ts","line":23,"href":"/reference/typescript/affinity/#symbol-WS_SUBPROTOCOL"},{"name":"wsOffersBase","originalName":"wsOffersBase","kind":"FunctionDeclaration","signature":"/** Whether the header offers the base {@link WS_SUBPROTOCOL} — the daemon must echo it on the 101. */\nexport declare function wsOffersBase(header: string): boolean;","description":"Whether the header offers the base {@link WS_SUBPROTOCOL} — the daemon must echo it on the 101.","source":"packages/affinity/src/index.ts","line":145,"href":"/reference/typescript/affinity/#symbol-wsOffersBase"},{"name":"wsSubprotocolTicket","originalName":"wsSubprotocolTicket","kind":"FunctionDeclaration","signature":"/**\n * Extract the `aff.*` ticket from a `Sec-WebSocket-Protocol` header value (a comma list, e.g.\n * `rindle.v1, aff.<…>`). Returns the raw ticket segment for {@link verify}, or `null`. Does not verify.\n */\nexport declare function wsSubprotocolTicket(header: string): string | null;","description":"Extract the `aff.*` ticket from a `Sec-WebSocket-Protocol` header value (a comma list, e.g.\n`rindle.v1, aff.<…>`). Returns the raw ticket segment for {@link verify}, or `null`. Does not verify.","source":"packages/affinity/src/index.ts","line":136,"href":"/reference/typescript/affinity/#symbol-wsSubprotocolTicket"}]},{"name":"@rindle/api-server","source":"packages/api-server/src/index.ts","package":"@rindle/api-server","symbols":[{"name":"ApiContext","originalName":"ApiContext","kind":"InterfaceDeclaration","signature":"/** Request context supplied by the application after authentication. The HTTP adapter or trusted\n *  caller owns `user`; do not populate it from an unverified request body. */\nexport interface ApiContext<User> {\n    user: User;\n    request?: unknown;\n}","description":"Request context supplied by the application after authentication. The HTTP adapter or trusted\ncaller owns `user`; do not populate it from an unverified request body.","source":"packages/api-server/src/index.ts","line":183,"href":"/reference/typescript/api-server/#symbol-ApiContext"},{"name":"ApiMutator","originalName":"ApiMutator","kind":"TypeAliasDeclaration","signature":"/** A server mutator: a plain async function against the live {@link ServerMutationTx}. Two ways to\n *  write one (MUTATORS-ISOMORPHIC): drive it directly (the raw escape hatch — an owner-gated cascade,\n *  a `NOT EXISTS` dedup — plus a returned `SqlStatement[]`/`SqlTxn`), OR delegate to a SHARED generator\n *  (the SAME body the client predicts) via {@link runSharedMutation}, keeping only the server-only\n *  authority (arg parse, principal, policy) in the wrapper. */\nexport type ApiMutator<User, Args> = (tx: ServerMutationTx, args: Args, ctx: MutationContext<User>) => MaybePromise<ApiMutatorResult>;","description":"A server mutator: a plain async function against the live {@link ServerMutationTx}. Two ways to\nwrite one (MUTATORS-ISOMORPHIC): drive it directly (the raw escape hatch — an owner-gated cascade,\na `NOT EXISTS` dedup — plus a returned `SqlStatement[]`/`SqlTxn`), OR delegate to a SHARED generator\n(the SAME body the client predicts) via {@link runSharedMutation}, keeping only the server-only\nauthority (arg parse, principal, policy) in the wrapper.","source":"packages/api-server/src/index.ts","line":276,"href":"/reference/typescript/api-server/#symbol-ApiMutator"},{"name":"ApiMutatorResult","originalName":"ApiMutatorResult","kind":"TypeAliasDeclaration","signature":"export type ApiMutatorResult = void | SqlStatement[] | SqlTxn;","description":"","source":"packages/api-server/src/index.ts","line":270,"href":"/reference/typescript/api-server/#symbol-ApiMutatorResult"},{"name":"ApiMutators","originalName":"ApiMutators","kind":"TypeAliasDeclaration","signature":"export type ApiMutators<User> = Record<string, ApiMutator<User, any>>;","description":"","source":"packages/api-server/src/index.ts","line":401,"href":"/reference/typescript/api-server/#symbol-ApiMutators"},{"name":"ApiQueries","originalName":"ApiQueries","kind":"TypeAliasDeclaration","signature":"export type ApiQueries<User> = Record<string, ApiQuery<User, any>>;","description":"","source":"packages/api-server/src/index.ts","line":190,"href":"/reference/typescript/api-server/#symbol-ApiQueries"},{"name":"ApiQuery","originalName":"ApiQuery","kind":"TypeAliasDeclaration","signature":"export type ApiQuery<User, Args> = (ctx: ApiContext<User>, args: Args) => MaybePromise<ApiQueryResult>;","description":"","source":"packages/api-server/src/index.ts","line":189,"href":"/reference/typescript/api-server/#symbol-ApiQuery"},{"name":"ApiQueryResult","originalName":"ApiQueryResult","kind":"TypeAliasDeclaration","signature":"export type ApiQueryResult = Ast | Query<any, any, any>;","description":"","source":"packages/api-server/src/index.ts","line":188,"href":"/reference/typescript/api-server/#symbol-ApiQueryResult"},{"name":"ArgSchema","originalName":"ArgSchema","kind":"InterfaceDeclaration","signature":"/** The minimal arg validator a shared mutator can carry so the SERVER can parse UNTRUSTED wire args\n *  before driving it (the client trusts its typed callsites and never calls this). Structural on\n *  purpose — a zod schema satisfies it as-is — so `@rindle/client` stays validator-library-agnostic. */\nexport interface ArgSchema<Args> {\n    parse(raw: unknown): Args;\n}","description":"The minimal arg validator a shared mutator can carry so the SERVER can parse UNTRUSTED wire args\nbefore driving it (the client trusts its typed callsites and never calls this). Structural on\npurpose — a zod schema satisfies it as-is — so `@rindle/client` stays validator-library-agnostic.","source":"packages/client/src/mutation-ops.ts","line":161,"href":"/reference/typescript/api-server/#symbol-ArgSchema"},{"name":"assembleDurableText","originalName":"assembleDurableText","kind":"FunctionDeclaration","signature":"/**\n * The durable half of the splice for the mapped-table layout: the compacted `body` followed by\n * whatever chunk rows have not been folded into it yet.\n *\n * Chunks are ALWAYS the suffix after `body` — the closing checkpoint rewrites `body` and drops the\n * chunks it absorbed in ONE transaction — so a reader never observes a torn state where a chunk both\n * is and is not in the body.\n */\nexport declare function assembleDurableText(message: {\n    body?: string | null;\n} | null | undefined, chunks?: ReadonlyArray<{\n    seq: number;\n    text: string;\n}>): string;","description":"The durable half of the splice for the mapped-table layout: the compacted `body` followed by\nwhatever chunk rows have not been folded into it yet.\n\nChunks are ALWAYS the suffix after `body` — the closing checkpoint rewrites `body` and drops the\nchunks it absorbed in ONE transaction — so a reader never observes a torn state where a chunk both\nis and is not in the body.","source":"packages/client/src/stream.ts","line":87,"href":"/reference/typescript/api-server/#symbol-assembleDurableText"},{"name":"AuthorizeMutationInput","originalName":"AuthorizeMutationInput","kind":"InterfaceDeclaration","signature":"export interface AuthorizeMutationInput<User> {\n    user: User;\n    envelope: MutationEnvelope;\n    context: ApiContext<User>;\n}","description":"","source":"packages/api-server/src/index.ts","line":209,"href":"/reference/typescript/api-server/#symbol-AuthorizeMutationInput"},{"name":"AuthorizeQueryInput","originalName":"AuthorizeQueryInput","kind":"InterfaceDeclaration","signature":"export interface AuthorizeQueryInput<User> {\n    user: User;\n    name: string;\n    args: unknown;\n    context: ApiContext<User>;\n}","description":"","source":"packages/api-server/src/index.ts","line":202,"href":"/reference/typescript/api-server/#symbol-AuthorizeQueryInput"},{"name":"Authorizer","originalName":"Authorizer","kind":"TypeAliasDeclaration","signature":"/** An optional request gate. Return `false` or throw to deny; `true` and `undefined` allow.\n *  This gate does not add row predicates or replace access checks inside a mutator. */\nexport type Authorizer<T> = (input: T) => MaybePromise<boolean | void>;","description":"An optional request gate. Return `false` or throw to deny; `true` and `undefined` allow.\nThis gate does not add row predicates or replace access checks inside a mutator.","source":"packages/api-server/src/index.ts","line":217,"href":"/reference/typescript/api-server/#symbol-Authorizer"},{"name":"AuthorizeStreamInput","originalName":"AuthorizeStreamInput","kind":"InterfaceDeclaration","signature":"export interface AuthorizeStreamInput<User> {\n    user: User;\n    streamId: string;\n    /** Where the subscriber claims to be. */\n    from: number;\n    /** The `meta` this stream was opened with — `undefined` when the stream is not hosted here, which\n     *  is precisely when the app must decide from `streamId` and its own durable state. */\n    meta: unknown;\n    request?: unknown;\n}","description":"","source":"packages/api-server/src/streams.ts","line":169,"href":"/reference/typescript/api-server/#symbol-AuthorizeStreamInput"},{"name":"BackendError","originalName":"BackendError","kind":"ClassDeclaration","signature":"/** Thrown (wrapping the driver error) by a server tx's DB calls, so the seam can tell an INFRA\n *  failure (retry) from a mutator-body throw (business rejection). */\nexport declare class BackendError extends Error {\n    readonly driverError: unknown;\n    constructor(driverError: unknown);\n}","description":"Thrown (wrapping the driver error) by a server tx's DB calls, so the seam can tell an INFRA\nfailure (retry) from a mutator-body throw (business rejection).","source":"packages/api-server/src/index.ts","line":1371,"href":"/reference/typescript/api-server/#symbol-BackendError"},{"name":"buildRenderIndex","originalName":"buildRenderIndex","kind":"FunctionDeclaration","signature":"/** Build the {@link RenderIndex} from a typed schema (`schema.tables[name]` is a `TableMeta`). */\nexport declare function buildRenderIndex(schema: Schema): RenderIndex;","description":"Build the {@link RenderIndex} from a typed schema (`schema.tables[name]` is a `TableMeta`).","source":"packages/api-server/src/index.ts","line":1252,"href":"/reference/typescript/api-server/#symbol-buildRenderIndex"},{"name":"createRindleApiServer","originalName":"createRindleApiServer","kind":"FunctionDeclaration","signature":"export declare function createRindleApiServer<User = unknown>(options: RindleApiServerOptions<User>): RindleApiServer<User>;","description":"","source":"packages/api-server/src/index.ts","line":2783,"href":"/reference/typescript/api-server/#symbol-createRindleApiServer"},{"name":"daemonBackend","originalName":"daemonBackend","kind":"FunctionDeclaration","signature":"/** Legacy/private-plane adapter. Kept for existing deployments; its mutation policy is shared with\n * {@link sqlBackend}, so the two transports cannot drift. */\nexport declare function daemonBackend(daemon: RindleDaemonClient): MutationBackend;","description":"Legacy/private-plane adapter. Kept for existing deployments; its mutation policy is shared with\n{@link sqlBackend}, so the two transports cannot drift.","source":"packages/api-server/src/index.ts","line":2165,"href":"/reference/typescript/api-server/#symbol-daemonBackend"},{"name":"DEFAULT_RINDLE_API_ROUTES","originalName":"DEFAULT_RINDLE_API_ROUTES","kind":"VariableDeclaration","signature":"export declare const DEFAULT_RINDLE_API_ROUTES: {\n    readonly query: \"/api/rindle/query\";\n    readonly read: \"/api/rindle/read\";\n    readonly mutate: \"/api/rindle/mutate\";\n    readonly applyRowChangeTxn: \"/api/rindle/apply-row-change-txn\";\n    readonly claimRoomEpoch: \"/api/rindle/claim-room-epoch\";\n    readonly roomLmids: \"/api/rindle/room-lmids\";\n    readonly roomBoot: \"/api/rindle/room-boot\";\n    readonly stream: \"/api/rindle/stream\";\n};","description":"","source":"packages/api-server/src/index.ts","line":163,"href":"/reference/typescript/api-server/#symbol-DEFAULT_RINDLE_API_ROUTES"},{"name":"defineApiMutators","originalName":"defineApiMutators","kind":"FunctionDeclaration","signature":"export declare function defineApiMutators<User, M extends ApiMutators<User>>(mutators: M): M;","description":"","source":"packages/api-server/src/index.ts","line":2400,"href":"/reference/typescript/api-server/#symbol-defineApiMutators"},{"name":"defineApiQueries","originalName":"defineApiQueries","kind":"FunctionDeclaration","signature":"export declare function defineApiQueries<User, Q extends ApiQueries<User>>(queries: Q): Q;","description":"","source":"packages/api-server/src/index.ts","line":2363,"href":"/reference/typescript/api-server/#symbol-defineApiQueries"},{"name":"dumpQueryShapes","originalName":"dumpQueryShapes","kind":"FunctionDeclaration","signature":"/**\n * Dump every registered named query's wire AST — feeder 1 (\"exemplar enumeration\") of\n * `rindle indices suggest` (docs/INDEXING.md applied mechanically to the query set).\n *\n * Because named queries are FUNCTIONS of `(args, ctx)`, one query can build structurally\n * different ASTs on different args; each exemplar invocation contributes its shape, and shapes\n * that differ only in literal values (a limit, a filter string) dedupe to one entry. A query\n * with no configured exemplars is invoked once with no args. The registry is the app's whole\n * server-side query surface, so the resulting document is the complete static shape set —\n * modulo arg-value-dependent branches, which need an exemplar (or runtime shape recording) to\n * surface.\n */\nexport declare function dumpQueryShapes<User>(opts: {\n    schema: Schema;\n    queries: ApiQueries<User>;\n    exemplars?: Partial<Record<string, ReadonlyArray<ShapeExemplar<User>>>>;\n}): Promise<QueryShapesDoc>;","description":"Dump every registered named query's wire AST — feeder 1 (\"exemplar enumeration\") of\n`rindle indices suggest` (docs/INDEXING.md applied mechanically to the query set).\n\nBecause named queries are FUNCTIONS of `(args, ctx)`, one query can build structurally\ndifferent ASTs on different args; each exemplar invocation contributes its shape, and shapes\nthat differ only in literal values (a limit, a filter string) dedupe to one entry. A query\nwith no configured exemplars is invoked once with no args. The registry is the app's whole\nserver-side query surface, so the resulting document is the complete static shape set —\nmodulo arg-value-dependent branches, which need an exemplar (or runtime shape recording) to\nsurface.","source":"packages/api-server/src/index.ts","line":2507,"href":"/reference/typescript/api-server/#symbol-dumpQueryShapes"},{"name":"frameResumePoint","originalName":"frameResumePoint","kind":"FunctionDeclaration","signature":"/** The resume point a frame implies — what rides an SSE `id:` line so a reconnecting `EventSource`\n *  hands it straight back as `Last-Event-ID`. `undefined` for frames that are not a position. */\nexport declare function frameResumePoint(frame: StreamFrame): number | undefined;","description":"The resume point a frame implies — what rides an SSE `id:` line so a reconnecting `EventSource`\nhands it straight back as `Last-Event-ID`. `undefined` for frames that are not a position.","source":"packages/client/src/stream.ts","line":51,"href":"/reference/typescript/api-server/#symbol-frameResumePoint"},{"name":"guardMutator","originalName":"guardMutator","kind":"FunctionDeclaration","signature":"/**\n * Wrap a SHARED (generator) mutator with a row-level ACCESS GUARD — the multi-tenant authz twin of\n * {@link sharedApiMutators}. It parses the untrusted wire args, derives the {@link MutatorCtx}\n * principal (the SAME mapping you pass to `sharedApiMutators`), evaluates `predicate` against the OPEN\n * mutation txn (so it can READ the rows the write depends on), and throws `forbidden` (403 — the\n * client's optimistic write snaps back) when access is denied; otherwise it drives the SAME body the\n * client predicts ({@link runSharedMutation}). Use it for the entries that need server-only authority\n * the client cannot predict, OVERRIDING the auto-wrapped default (spread `sharedApiMutators(...)`\n * first, then the guarded overrides win by key):\n *\n * ```ts\n * const principal = (ctx) => ({ user: requireUser(ctx.user) });\n * mutators: defineApiMutators({\n *   ...sharedApiMutators(sharedMutators, principal),\n *   updateSlide: guardMutator(sharedMutators.updateSlide, principal,\n *     async (tx, a, { user }) =>\n *       (await tx.query(q.slide.where.id(a.slideId).where(editableBy(user)).one())) != null,\n *     { message: \"not permitted to edit this slide\" }),\n * }),\n * ```\n *\n * The predicate keeps the shared body READ-FREE, so the client's `.folded` hot paths (drag/keystroke)\n * still fold — the read is server-side only. Return `false` to deny (→ the default or `opts.message`\n * forbidden); return `true`/nothing to allow. To reject with a different status/message (a business\n * rejection, a not-found), throw a {@link RindleApiError} from inside the predicate instead. `principal`\n * runs before the predicate, so it too may throw `forbidden` for an anonymous caller.\n */\nexport declare function guardMutator<User, Args>(gen: SharedMutatorWithArgs<Args>, principal: (ctx: MutationContext<User>) => MutatorCtx, predicate: (tx: ServerMutationTx, args: Args, ctx: MutatorCtx) => boolean | void | Promise<boolean | void>, opts?: {\n    message?: string;\n}): ApiMutator<User, unknown>;","description":"Wrap a SHARED (generator) mutator with a row-level ACCESS GUARD — the multi-tenant authz twin of\n{@link sharedApiMutators}. It parses the untrusted wire args, derives the {@link MutatorCtx}\nprincipal (the SAME mapping you pass to `sharedApiMutators`), evaluates `predicate` against the OPEN\nmutation txn (so it can READ the rows the write depends on), and throws `forbidden` (403 — the\nclient's optimistic write snaps back) when access is denied; otherwise it drives the SAME body the\nclient predicts ({@link runSharedMutation}). Use it for the entries that need server-only authority\nthe client cannot predict, OVERRIDING the auto-wrapped default (spread `sharedApiMutators(...)`\nfirst, then the guarded overrides win by key):\n\n```ts\nconst principal = (ctx) => ({ user: requireUser(ctx.user) });\nmutators: defineApiMutators({\n  ...sharedApiMutators(sharedMutators, principal),\n  updateSlide: guardMutator(sharedMutators.updateSlide, principal,\n    async (tx, a, { user }) =>\n      (await tx.query(q.slide.where.id(a.slideId).where(editableBy(user)).one())) != null,\n    { message: \"not permitted to edit this slide\" }),\n}),\n```\n\nThe predicate keeps the shared body READ-FREE, so the client's `.folded` hot paths (drag/keystroke)\nstill fold — the read is server-side only. Return `false` to deny (→ the default or `opts.message`\nforbidden); return `true`/nothing to allow. To reject with a different status/message (a business\nrejection, a not-found), throw a {@link RindleApiError} from inside the predicate instead. `principal`\nruns before the predicate, so it too may throw `forbidden` for an anonymous caller.","source":"packages/api-server/src/index.ts","line":2463,"href":"/reference/typescript/api-server/#symbol-guardMutator"},{"name":"isoTx","originalName":"isoTx","kind":"VariableDeclaration","signature":"/** The one shared effect factory (stateless — see {@link IsoTx}). Its methods just BUILD a\n *  {@link MutationOp}, so the single instance serves every schema; the generic {@link IsoTx} view is\n *  applied at the authoring site (a `json<T>` cell is a parsed object here and is stringified by the\n *  funnels, {@link toCell}), hence the cast — the runtime shape is schema-agnostic. */\nexport declare const isoTx: IsoTx;","description":"The one shared effect factory (stateless — see {@link IsoTx}). Its methods just BUILD a\n{@link MutationOp}, so the single instance serves every schema; the generic {@link IsoTx} view is\napplied at the authoring site (a `json<T>` cell is a parsed object here and is stringified by the\nfunnels, {@link toCell }), hence the cast — the runtime shape is schema-agnostic.","source":"packages/client/src/mutation-ops.ts","line":127,"href":"/reference/typescript/api-server/#symbol-isoTx"},{"name":"IsoTx","originalName":"IsoTx","kind":"InterfaceDeclaration","signature":"/** The tier-AGNOSTIC effect factory a generator mutator writes against. Every method just BUILDS an\n *  effect to `yield` — it performs no I/O and holds no state, so the single {@link isoTx} instance is\n *  shared by every mutator on both tiers; only the driver differs. `insert`/`upsert`/`insertIgnore`\n *  require non-nullable columns and permit nullable omissions, which become `null`.\n *  `update`/`delete` require the PK columns; `update` also names the columns to change. */\nexport interface IsoTx<S extends ColsMap = ColsMap, P extends Record<string, string> = PkMap<S>> {\n    /** Insert a row. Omitted nullable columns become `null`; database defaults are not applied. */\n    insert<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Update the row identified by its pk columns (REQUIRED); only the named non-pk columns change. */\n    update<N extends keyof S & string>(table: N, row: UpdateOf<S[N], PkColsOf<S, P, N>>): MutationOp;\n    /** Insert, or replace non-PK columns on PK conflict, with {@link IsoTx.insert}'s omission rules. */\n    upsert<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Insert with {@link IsoTx.insert}'s omission rules, or do nothing on PK conflict. */\n    insertIgnore<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Delete the row identified by its pk columns. */\n    delete<N extends keyof S & string>(table: N, pk: PkOf<S[N], PkColsOf<S, P, N>>): MutationOp;\n    /** Read one row by primary key (read-your-writes). */\n    row<N extends keyof S & string>(table: N, pk: PkOf<S[N], PkColsOf<S, P, N>>): ReadEffect;\n    /** Run a full query (`where`/`orderBy`/`limit`/join) over the state this mutator is mutating —\n     *  read-your-writes, like {@link row} but for arbitrary shapes. Pass a query from the tier-agnostic\n     *  builder, e.g. `tx.query(q.issue.where(\"ownerId\", \"=\", ctx.user))` where `q = newQueryBuilder(schema)`.\n     *  The `yield` evaluates to {@link QueryResultRow}`[]` (cast it — the generator's single next-type is a row). */\n    query(query: QueryArg): QueryEffect;\n    all(effects: readonly YieldEffect[]): BatchEffect;\n}","description":"The tier-AGNOSTIC effect factory a generator mutator writes against. Every method just BUILDS an\neffect to `yield` — it performs no I/O and holds no state, so the single {@link isoTx} instance is\nshared by every mutator on both tiers; only the driver differs. `insert`/`upsert`/`insertIgnore`\nrequire non-nullable columns and permit nullable omissions, which become `null`.\n`update`/`delete` require the PK columns; `update` also names the columns to change.","source":"packages/client/src/mutation-ops.ts","line":102,"href":"/reference/typescript/api-server/#symbol-IsoTx"},{"name":"MaybePromise","originalName":"MaybePromise","kind":"TypeAliasDeclaration","signature":"export type MaybePromise<T> = T | PromiseLike<T>;","description":"","source":"packages/api-server/src/index.ts","line":179,"href":"/reference/typescript/api-server/#symbol-MaybePromise"},{"name":"mintRoomFlushCredential","originalName":"mintRoomFlushCredential","kind":"FunctionDeclaration","signature":"/** Sign the default epoch-bound flush credential (`/room-boot` mints one per placement). */\nexport declare function mintRoomFlushCredential(opts: {\n    shellSecret: string;\n    doc: string;\n    epoch: number;\n    /** Mint time; defaults to `Date.now()`. Injectable for tests. */\n    now?: number;\n}): Promise<string>;","description":"Sign the default epoch-bound flush credential (`/room-boot` mints one per placement).","source":"packages/api-server/src/index.ts","line":840,"href":"/reference/typescript/api-server/#symbol-mintRoomFlushCredential"},{"name":"MutationBackend","originalName":"MutationBackend","kind":"InterfaceDeclaration","signature":"/**\n * Where a mutation runs and who stamps `lmid` — the seam that makes the mutator authoring surface\n * backend-agnostic (`BYO-POSTGRES-LMID-CONTRACT-DESIGN.md` §6; MUTATORS-ISOMORPHIC plan). Three\n * implementations ship: {@link sqlBackend} is the preferred managed-SQL path; {@link daemonBackend}\n * keeps the private control-plane compatibility path; and {@link postgresBackend} runs a real\n * interactive PG transaction with confirmation riding the CDC loop down.\n *\n * The load-bearing invariant is that a mutation ALWAYS advances the client's `last_mutation_id`:\n * - `runMutation` runs the mutator inside the backend's transaction; on success it advances `lmid`\n *   to `envelope.mid` in the SAME atomic unit (OPTIMISTIC-WRITES-DESIGN.md §8.2); on a BUSINESS\n *   rejection it rolls the data back but STILL advances `lmid` (§2.4 — else the client's pending\n *   queue never drains and the optimistic stack wedges).\n * - `reject` is the pre-flight path (unknown mutator, failed authorization): NO data, `lmid` alone.\n * - An infrastructure failure THROWS from `runMutation` — never a user rejection (the client\n *   retries; mid dedup absorbs any applied prefix).\n */\nexport interface MutationBackend {\n    /** The SQL dialect this backend renders logical ops to (drives placeholder style). */\n    readonly dialect: SqlDialect;\n    /** Optional raw-SQL surface outside the mutation transaction. Built-in backends provide it;\n     *  custom backends may omit it, in which case `scope.sql` fails as an infrastructure error. */\n    readonly outsideSql?: ServerSql;\n    runMutation(input: MutationRunInput): Promise<MutationOutcome>;\n    reject(input: {\n        envelope: MutationEnvelope;\n        reason: string;\n    }): Promise<unknown>;\n}","description":"Where a mutation runs and who stamps `lmid` — the seam that makes the mutator authoring surface\nbackend-agnostic (`BYO-POSTGRES-LMID-CONTRACT-DESIGN.md` §6; MUTATORS-ISOMORPHIC plan). Three\nimplementations ship: {@link sqlBackend} is the preferred managed-SQL path; {@link daemonBackend}\nkeeps the private control-plane compatibility path; and {@link postgresBackend} runs a real\ninteractive PG transaction with confirmation riding the CDC loop down.\n\nThe load-bearing invariant is that a mutation ALWAYS advances the client's `last_mutation_id`:\n- `runMutation` runs the mutator inside the backend's transaction; on success it advances `lmid`\n  to `envelope.mid` in the SAME atomic unit (OPTIMISTIC-WRITES-DESIGN.md §8.2); on a BUSINESS\n  rejection it rolls the data back but STILL advances `lmid` (§2.4 — else the client's pending\n  queue never drains and the optimistic stack wedges).\n- `reject` is the pre-flight path (unknown mutator, failed authorization): NO data, `lmid` alone.\n- An infrastructure failure THROWS from `runMutation` — never a user rejection (the client\n  retries; mid dedup absorbs any applied prefix).","source":"packages/api-server/src/index.ts","line":587,"href":"/reference/typescript/api-server/#symbol-MutationBackend"},{"name":"MutationContext","originalName":"MutationContext","kind":"InterfaceDeclaration","signature":"export interface MutationContext<User> {\n    user: User;\n    envelope: MutationEnvelope;\n    daemon: RindleDaemonClient;\n    request?: unknown;\n}","description":"","source":"packages/api-server/src/index.ts","line":219,"href":"/reference/typescript/api-server/#symbol-MutationContext"},{"name":"MutationGen","originalName":"MutationGen","kind":"TypeAliasDeclaration","signature":"/** What a generator mutator IS: `yield tx.<op>()` on every side effect; a `yield tx.row()` expression\n *  evaluates to the row. Neither sync nor async — the tier's driver decides, which is what lets one\n *  body run synchronously on the client and against a live async transaction on the server. */\nexport type MutationGen = Generator<YieldEffect, void, KeyedRow | undefined>;","description":"What a generator mutator IS: `yield tx.<op>()` on every side effect; a `yield tx.row()` expression\nevaluates to the row. Neither sync nor async — the tier's driver decides, which is what lets one\nbody run synchronously on the client and against a live async transaction on the server.","source":"packages/client/src/mutation-ops.ts","line":148,"href":"/reference/typescript/api-server/#symbol-MutationGen"},{"name":"MutationOutcome","originalName":"MutationOutcome","kind":"TypeAliasDeclaration","signature":"/** The result of {@link MutationBackend.runMutation}: either the data+lmid committed together, or a\n *  business rejection whose data was rolled back but whose `lmid` still advanced (§2.4). */\nexport type MutationOutcome = {\n    accepted: true;\n    output: SqlTxnOutput;\n} | {\n    accepted: false;\n    reason: string;\n    output?: unknown;\n};","description":"The result of {@link MutationBackend.runMutation}: either the data+lmid committed together, or a\nbusiness rejection whose data was rolled back but whose `lmid` still advanced (§2.4).","source":"packages/api-server/src/index.ts","line":567,"href":"/reference/typescript/api-server/#symbol-MutationOutcome"},{"name":"MutationRejected","originalName":"MutationRejected","kind":"ClassDeclaration","signature":"/** Thrown by {@link MutationScope.transact} when the transacted body BUSINESS-rejects: the data\n *  rolled back and `lmid` advanced alone (§2.4). Catch it to COMPENSATE an outside-tx side effect\n *  (refund the charge), then rethrow or return — the mutation's protocol outcome is already sealed\n *  as rejected, so a post-reject throw can't change it. A DB/infra failure is NOT this — it\n *  propagates as the raw driver error (the client retries; `lmid` did not advance). */\nexport declare class MutationRejected extends Error {\n    readonly reason: string;\n    constructor(reason: string);\n}","description":"Thrown by {@link MutationScope.transact} when the transacted body BUSINESS-rejects: the data\nrolled back and `lmid` advanced alone (§2.4). Catch it to COMPENSATE an outside-tx side effect\n(refund the charge), then rethrow or return — the mutation's protocol outcome is already sealed\nas rejected, so a post-reject throw can't change it. A DB/infra failure is NOT this — it\npropagates as the raw driver error (the client retries; `lmid` did not advance).","source":"packages/api-server/src/index.ts","line":297,"href":"/reference/typescript/api-server/#symbol-MutationRejected"},{"name":"MutationRunInput","originalName":"MutationRunInput","kind":"InterfaceDeclaration","signature":"/** The context a {@link MutationBackend} needs to run one mutation inside its transaction. */\nexport interface MutationRunInput {\n    envelope: MutationEnvelope;\n    /** Schema-derived render metadata (from {@link RindleApiServerOptions.schema}). A logical op on a\n     *  table absent here throws loudly — never a silent dropped write. `{}` when no schema is set. */\n    render: RenderIndex;\n    /** Invoke the (authorized) mutator against the backend-provided tx. A THROW that is NOT a\n     *  {@link BackendError} is a BUSINESS rejection (roll the data back, then advance `lmid` alone,\n     *  §2.4); a {@link BackendError} (a DB-layer failure) is INFRA and rejects the returned promise. */\n    run(tx: ServerMutationTx): Promise<void>;\n}","description":"The context a {@link MutationBackend} needs to run one mutation inside its transaction.","source":"packages/api-server/src/index.ts","line":554,"href":"/reference/typescript/api-server/#symbol-MutationRunInput"},{"name":"MutationScope","originalName":"MutationScope","kind":"InterfaceDeclaration","signature":"/** The per-mutation server handle a {@link ScopedMutator} runs against. Code before {@link transact}\n *  runs OUTSIDE the transaction; code after a clean `transact` runs AFTER the commit. The\n *  `lmid`-always-advances invariant is the HARNESS's, not the author's: {@link RindleApiServer.pushMutation}\n *  seals the response from this handle's recorded outcome, so an early return, a never-called\n *  `transact`, or a swallowed {@link MutationRejected} still advances `lmid` and never wedges the\n *  client's pending queue. */\nexport interface MutationScope {\n    /** Raw SQL OUTSIDE the mutation transaction. Every call commits independently and therefore may\n     *  be observed even if {@link transact} later rejects or fails. Calls may also repeat when an\n     *  envelope is retried, so outside writes need their own idempotency key/unique constraint. */\n    readonly sql: ServerSql;\n    /** Open the ONE atomic write transaction and drive `body` inside it, committing (stamping `lmid`\n     *  co-transactionally) on a clean return. MAY be called at most once — a second call throws.\n     *\n     *  Two forms:\n     *   - `transact(sharedMutator, args, ctx)` — drive a SHARED (generator) mutator (the same body the\n     *     client predicts); pass the already-parsed `args` and the server `ctx` (fold server-only\n     *     values like a charge id into `ctx` here).\n     *   - `transact(run)` — a raw callback receiving the live {@link ServerMutationTx} (the escape\n     *     hatch: `tx.exec`, logical writes, read-your-writes reads).\n     *\n     *  A THROW from the body that is not a {@link BackendError} is a BUSINESS rejection: the data rolls\n     *  back, `lmid` advances alone, and this method throws {@link MutationRejected} (so surrounding\n     *  code can compensate). A {@link BackendError} is INFRA: it propagates (the client retries).\n     *\n     *  **The callback form RETURNS ITS BODY'S VALUE**, and only on the committed path — a rejection\n     *  throws, so there is never a value to act on for a transaction that rolled back. That is what\n     *  lets a post-commit effect be decided by a TRANSACTIONAL read instead of a second, racy one\n     *  afterwards:\n     *\n     *  ```ts\n     *  const kick = await scope.transact(async (tx) => {\n     *    const prior = await tx.row(\"message\", { id: a.assistantMessageId });\n     *    if (prior) return undefined;                 // a replayed envelope — do NOT re-fire the effect\n     *    tx.insert(\"message\", …);\n     *    return { streamId: a.assistantMessageId, history: await readHistory(tx, a.chatId) };\n     *  });\n     *  if (kick) void startGeneration(kick);          // committed, and decided against committed state\n     *  ```\n     *\n     *  A tx-form mutator cannot do this: its return value is already the logical-write channel\n     *  ({@link ApiMutatorResult}). A post-commit effect chosen by a transactional read is exactly what\n     *  the scoped form is for. */\n    transact<T>(run: (tx: ServerMutationTx) => T | Promise<T>): Promise<T>;\n    transact<A, C extends MutatorCtx>(mutator: SharedMutator<A, C>, args: A, ctx: C): Promise<void>;\n}","description":"The per-mutation server handle a {@link ScopedMutator} runs against. Code before {@link transact}\nruns OUTSIDE the transaction; code after a clean `transact` runs AFTER the commit. The\n`lmid`-always-advances invariant is the HARNESS's, not the author's: {@link RindleApiServer.pushMutation}\nseals the response from this handle's recorded outcome, so an early return, a never-called\n`transact`, or a swallowed {@link MutationRejected} still advances `lmid` and never wedges the\nclient's pending queue.","source":"packages/api-server/src/index.ts","line":312,"href":"/reference/typescript/api-server/#symbol-MutationScope"},{"name":"MutatorCtx","originalName":"MutatorCtx","kind":"InterfaceDeclaration","signature":"/** The minimal per-invocation context a shared mutator sees on BOTH tiers: the acting principal. The\n *  server injects its AUTHENTICATED user; the client injects its local user. (The server's own\n *  `MutationContext` is a superset of this.) */\nexport interface MutatorCtx {\n    user: string;\n}","description":"The minimal per-invocation context a shared mutator sees on BOTH tiers: the acting principal. The\nserver injects its AUTHENTICATED user; the client injects its local user. (The server's own\n`MutationContext` is a superset of this.)","source":"packages/client/src/mutation-ops.ts","line":141,"href":"/reference/typescript/api-server/#symbol-MutatorCtx"},{"name":"OpenStreamInput","originalName":"OpenStreamInput","kind":"InterfaceDeclaration","signature":"export interface OpenStreamInput<User> {\n    user: User;\n    /** The app's message-row id: the durable pointer AND the live plane's key. The row must already\n     *  exist (the app's own mutator wrote it, alongside the user's prompt) with `seq = 0`. */\n    streamId: string;\n    /** Opaque app payload, passed through to a `commit` callback. Unused in `tables` mode. */\n    meta?: unknown;\n    request?: unknown;\n}","description":"","source":"packages/api-server/src/streams.ts","line":260,"href":"/reference/typescript/api-server/#symbol-OpenStreamInput"},{"name":"PgPoolLike","originalName":"PgPoolLike","kind":"InterfaceDeclaration","signature":"/** The slice of a node-postgres `Pool` the plugger needs — structural, so `pg` stays a\n *  dependency of the APP, never of this package. */\nexport interface PgPoolLike {\n    connect(): Promise<{\n        query(sql: string, params?: unknown[]): Promise<{\n            rows: Array<Record<string, unknown>>;\n        }>;\n        release(err?: unknown): void;\n    }>;\n}","description":"The slice of a node-postgres `Pool` the plugger needs — structural, so `pg` stays a\ndependency of the APP, never of this package.","source":"packages/api-server/src/index.ts","line":2278,"href":"/reference/typescript/api-server/#symbol-PgPoolLike"},{"name":"pgPoolPlugger","originalName":"pgPoolPlugger","kind":"FunctionDeclaration","signature":"/** Adapt a node-postgres `Pool` (or anything pool-shaped) to a {@link PostgresPlugger}:\n *  one client per transaction, `BEGIN`/`COMMIT` bracketing, `ROLLBACK` + rethrow on failure. */\nexport declare function pgPoolPlugger(pool: PgPoolLike): PostgresPlugger;","description":"Adapt a node-postgres `Pool` (or anything pool-shaped) to a {@link PostgresPlugger}:\none client per transaction, `BEGIN`/`COMMIT` bracketing, `ROLLBACK` + rethrow on failure.","source":"packages/api-server/src/index.ts","line":2287,"href":"/reference/typescript/api-server/#symbol-pgPoolPlugger"},{"name":"PgQuery","originalName":"PgQuery","kind":"InterfaceDeclaration","signature":"/** The query surface a {@link PostgresPlugger} transaction exposes. `exec` runs one statement;\n *  `query` returns rows keyed by column name (read-your-own-writes inside the txn). */\nexport interface PgQuery {\n    exec(sql: string, params?: unknown[]): Promise<void>;\n    query(sql: string, params?: unknown[]): Promise<Array<Record<string, unknown>>>;\n}","description":"The query surface a {@link PostgresPlugger} transaction exposes. `exec` runs one statement;\n`query` returns rows keyed by column name (read-your-own-writes inside the txn).","source":"packages/api-server/src/index.ts","line":2178,"href":"/reference/typescript/api-server/#symbol-PgQuery"},{"name":"PinFanout","originalName":"PinFanout","kind":"InterfaceDeclaration","signature":"/** The explicit fleet pin fan-out seam (READ-ROUTER-DESIGN.md §4.2). The api-server resolves each\n *  pin's authoritative AST under `pinUser` and hands the ready {@link MaterializeInput}s here; the\n *  implementation (the read router) fans EACH across all live followers. Distinct, on purpose, from\n *  a per-viewer `materialize` (which routes ONE) — a pin-assert always sprays ALL. */\nexport interface PinFanout {\n    assertPins(pins: readonly MaterializeInput[]): Promise<void>;\n}","description":"The explicit fleet pin fan-out seam (READ-ROUTER-DESIGN.md §4.2). The api-server resolves each\npin's authoritative AST under `pinUser` and hands the ready {@link MaterializeInput}s here; the\nimplementation (the read router) fans EACH across all live followers. Distinct, on purpose, from\na per-viewer `materialize` (which routes ONE) — a pin-assert always sprays ALL.","source":"packages/api-server/src/index.ts","line":643,"href":"/reference/typescript/api-server/#symbol-PinFanout"},{"name":"PinnedQuery","originalName":"PinnedQuery","kind":"InterfaceDeclaration","signature":"/** A named query to keep permanently materialized (warm with zero subscribers). */\nexport interface PinnedQuery {\n    name: string;\n    args?: unknown;\n}","description":"A named query to keep permanently materialized (warm with zero subscribers).","source":"packages/api-server/src/index.ts","line":634,"href":"/reference/typescript/api-server/#symbol-PinnedQuery"},{"name":"postgresBackend","originalName":"postgresBackend","kind":"FunctionDeclaration","signature":"/**\n * The BYO-Postgres {@link MutationBackend} (`BYO-POSTGRES-LMID-CONTRACT-DESIGN.md` §6.3): one PG\n * transaction runs the mutator's statements and ALWAYS upserts `_rindle_client_mutations` —\n * the upsert sits outside any acceptance guard by construction, so the §2.4 footgun (a rejection\n * that forgets to advance `lmid` and wedges the client's pending queue) cannot be written.\n *\n * Confirmation does NOT come from this call's response: the lmid row rides the same PG commit\n * through CDC → relay → follower and reaches the client in the same coherent release as the\n * data (§8.2 relocated upstream). A rejection's `reason` still returns on the HTTP reply, but\n * nothing rejection-shaped travels the replication path — the optimistic prediction snaps back\n * when the advanced `lmid` arrives.\n */\nexport declare function postgresBackend(plugger: PostgresPlugger, opts?: PostgresBackendOptions): MutationBackend;","description":"The BYO-Postgres {@link MutationBackend} (`BYO-POSTGRES-LMID-CONTRACT-DESIGN.md` §6.3): one PG\ntransaction runs the mutator's statements and ALWAYS upserts `_rindle_client_mutations` —\nthe upsert sits outside any acceptance guard by construction, so the §2.4 footgun (a rejection\nthat forgets to advance `lmid` and wedges the client's pending queue) cannot be written.\n\nConfirmation does NOT come from this call's response: the lmid row rides the same PG commit\nthrough CDC → relay → follower and reaches the client in the same coherent release as the\ndata (§8.2 relocated upstream). A rejection's `reason` still returns on the HTTP reply, but\nnothing rejection-shaped travels the replication path — the optimistic prediction snaps back\nwhen the advanced `lmid` arrives.","source":"packages/api-server/src/index.ts","line":2216,"href":"/reference/typescript/api-server/#symbol-postgresBackend"},{"name":"PostgresBackendOptions","originalName":"PostgresBackendOptions","kind":"InterfaceDeclaration","signature":"export interface PostgresBackendOptions {\n    /** Rewrite each MUTATOR statement's SQL before it runs (never the lmid upsert). The intended\n     *  use is dialect bridging for a dual-topology app whose mutators are written SQLite-style:\n     *  pass {@link questionToDollarParams} to convert `?` placeholders to `$1..$n`. */\n    rewriteSql?: (sql: string) => string;\n}","description":"","source":"packages/api-server/src/index.ts","line":2190,"href":"/reference/typescript/api-server/#symbol-PostgresBackendOptions"},{"name":"postgresDialect","originalName":"postgresDialect","kind":"VariableDeclaration","signature":"export declare const postgresDialect: SqlDialect;","description":"","source":"packages/api-server/src/index.ts","line":1233,"href":"/reference/typescript/api-server/#symbol-postgresDialect"},{"name":"PostgresPlugger","originalName":"PostgresPlugger","kind":"InterfaceDeclaration","signature":"/** The thin driver adapter that keeps `pg` / `postgres.js` out of this package's dependencies\n *  (`BYO-POSTGRES-LMID-CONTRACT-DESIGN.md` §6.2): run `fn` inside ONE transaction — commit on\n *  resolve, roll back on throw. {@link pgPoolPlugger} adapts a node-postgres `Pool`. */\nexport interface PostgresPlugger {\n    transaction<T>(fn: (q: PgQuery) => Promise<T>): Promise<T>;\n}","description":"The thin driver adapter that keeps `pg` / `postgres.js` out of this package's dependencies\n(`BYO-POSTGRES-LMID-CONTRACT-DESIGN.md` §6.2): run `fn` inside ONE transaction — commit on\nresolve, roll back on throw. {@link pgPoolPlugger} adapts a node-postgres `Pool`.","source":"packages/api-server/src/index.ts","line":2186,"href":"/reference/typescript/api-server/#symbol-PostgresPlugger"},{"name":"PushMutationRequest","originalName":"PushMutationRequest","kind":"InterfaceDeclaration","signature":"export interface PushMutationRequest<User> {\n    user: User;\n    envelope: MutationEnvelope;\n    request?: unknown;\n}","description":"","source":"packages/api-server/src/index.ts","line":597,"href":"/reference/typescript/api-server/#symbol-PushMutationRequest"},{"name":"PushMutationResponse","originalName":"PushMutationResponse","kind":"TypeAliasDeclaration","signature":"export type PushMutationResponse = {\n    accepted: true;\n    rejected: false;\n    output: SqlTxnOutput;\n} | {\n    accepted: false;\n    rejected: true;\n    reason: string;\n    output?: unknown;\n};","description":"","source":"packages/api-server/src/index.ts","line":609,"href":"/reference/typescript/api-server/#symbol-PushMutationResponse"},{"name":"PushMutationsRequest","originalName":"PushMutationsRequest","kind":"InterfaceDeclaration","signature":"export interface PushMutationsRequest<User> {\n    user: User;\n    envelopes: MutationEnvelope[];\n    request?: unknown;\n}","description":"","source":"packages/api-server/src/index.ts","line":603,"href":"/reference/typescript/api-server/#symbol-PushMutationsRequest"},{"name":"QueryLeaseLifecycle","originalName":"QueryLeaseLifecycle","kind":"InterfaceDeclaration","signature":"/** The §4 lifecycle block on a query lease (Slice I-iii): present only when BOTH the realtime\n *  `lifecycle` config is on AND the query is realtime-labeled. `doorbell` rides EVERY labeled\n *  lease (occupancy is counted whether or not the query is room-served — the 1→2 upgrade trigger\n *  needs solo watchers subscribed BEFORE any room exists, §4.1); `fence` rides only a ROOM-SERVED\n *  lease (the §4.2/§7.1/§3.3 downgrade surfaces are meaningful only where a room domain exists).\n *  The §4.2 fence VALUE (`finalFlushSeq`) is deliberately NOT here — it arrives with the I-v\n *  downgrade response; I-iii only stands up the streams. */\nexport interface QueryLeaseLifecycle {\n    doorbell: QueryLeaseLifecycleLease;\n    fence?: QueryLeaseLifecycleLease[];\n}","description":"The §4 lifecycle block on a query lease (Slice I-iii): present only when BOTH the realtime\n`lifecycle` config is on AND the query is realtime-labeled. `doorbell` rides EVERY labeled\nlease (occupancy is counted whether or not the query is room-served — the 1→2 upgrade trigger\nneeds solo watchers subscribed BEFORE any room exists, §4.1); `fence` rides only a ROOM-SERVED\nlease (the §4.2/§7.1/§3.3 downgrade surfaces are meaningful only where a room domain exists).\nThe §4.2 fence VALUE (`finalFlushSeq`) is deliberately NOT here — it arrives with the I-v\ndowngrade response; I-iii only stands up the streams.","source":"packages/api-server/src/index.ts","line":484,"href":"/reference/typescript/api-server/#symbol-QueryLeaseLifecycle"},{"name":"QueryLeaseLifecycleLease","originalName":"QueryLeaseLifecycleLease","kind":"InterfaceDeclaration","signature":"/**\n * One minted SYSTEM-STREAM lease on a query lease's `lifecycle` block (RINDLE-REALTIME-QUERY-\n * ENABLEMENT §4, Slice I-iii): an ordinary daemon materialization over one of the four\n * `_rindle_*` lifecycle system tables (registered by the daemon's `enable_realtime_lifecycle` —\n * `rust/rindle-replica/src/mutations.rs`), attachable by the EXISTING client subscribe path\n * (present `leaseToken` on a `subscribe` frame, exactly like the primary lease). The identity\n * fields (`scope`/`doc`/`clientId`) document the minted AST's predicate — the client keys its\n * retains and its release-time row filters on them.\n */\nexport interface QueryLeaseLifecycleLease {\n    /** Which system table this lease's subscription serves. */\n    table: string;\n    leaseToken: string;\n    /** DOORBELL only: the §4.1 occupancy scope — the wire room doc (`\"<profile>/<key>\"`). */\n    scope?: string;\n    /** FENCE entries only: the room doc the predicate is scoped to. */\n    doc?: string;\n    /** FENCE ledger/outcome entries: present iff the predicate was ALSO client-scoped (the lease\n     *  request carried `clientId`). Absent ⇒ doc-only predicate — the client filters to its own\n     *  rows regardless (defense in depth). */\n    clientId?: string;\n}","description":"One minted SYSTEM-STREAM lease on a query lease's `lifecycle` block (RINDLE-REALTIME-QUERY-\nENABLEMENT §4, Slice I-iii): an ordinary daemon materialization over one of the four\n`_rindle_*` lifecycle system tables (registered by the daemon's `enable_realtime_lifecycle` —\n`rust/rindle-replica/src/mutations.rs`), attachable by the EXISTING client subscribe path\n(present `leaseToken` on a `subscribe` frame, exactly like the primary lease). The identity\nfields (`scope`/`doc`/`clientId`) document the minted AST's predicate — the client keys its\nretains and its release-time row filters on them.","source":"packages/api-server/src/index.ts","line":463,"href":"/reference/typescript/api-server/#symbol-QueryLeaseLifecycleLease"},{"name":"QueryLeaseRealtime","originalName":"QueryLeaseRealtime","kind":"InterfaceDeclaration","signature":"/**\n * The room-serve block on a query lease (RINDLE-REALTIME-QUERY-ENABLEMENT §2.1 step 5 / §2.4,\n * slice G-iv-b): present when the named query carries a realtime label naming a configured room\n * profile (302 §5 — declared, not derived; no coverage proof). The G-v client uses it to open the\n * room transport for THIS query beside — never instead of — its daemon session.\n *\n * It is a dedicated block on purpose: the ROOM ws is a SEPARATE connection this query opens beside\n * its daemon session (never a migration of the daemon session — the daemon ws host is fixed and\n * placed by the affinity ticket). A room-served lease's top-level fields are byte-identical to the\n * daemon-served ones.\n */\nexport interface QueryLeaseRealtime {\n    /** The client store's gate/domain key for this room source (`connectSource`) AND the string the\n     *  wasm engine's `parse_source_key` accepts: any string other than the reserved `\"daemon\"`\n     *  parses as a room source, and the established convention is `\"room:\" + doc`\n     *  (e.g. `room:document/doc:d1`). */\n    sourceKey: string;\n    /** Where the client opens the ROOM ws for this query (from `realtime.locateRoom`) — its OWN\n     *  connection, distinct from the daemon session's fixed ws host. */\n    wsEndpoint: string;\n    /** The room's self-authorizing signed lease (`@rindle/room/token`): the APPROVED query AST +\n     *  doc + subject, HMAC-signed with `realtime.roomTokenKey` so the room shell's\n     *  `downstream.tokenKeys` ring verifies it. The room materializes on first presentation. */\n    roomToken: string;\n    /** Token expiry (ms epoch) — the client's renewal clock (renewal = a fresh lease). */\n    exp: number;\n    /** The wire room doc (`\"<profile>/<key>\"`, minted server-side — never client-derived). */\n    doc: string;\n    /** Per-footprint-table specs: the §2.2 owned/followed split + §3.2 routing metadata. Since\n     *  H-iii each spec also carries `footprintWhere` — the same exact membership predicate the boot\n     *  wire ships the room gate (one compiler, `compileRoomScopeSpecs`) — feeding the client's §3\n     *  prove-or-slow-path router. Advisory routing metadata, never a credential (§3.2). */\n    tables: RoomTableSpec[];\n}","description":"The room-serve block on a query lease (RINDLE-REALTIME-QUERY-ENABLEMENT §2.1 step 5 / §2.4,\nslice G-iv-b): present when the named query carries a realtime label naming a configured room\nprofile (302 §5 — declared, not derived; no coverage proof). The G-v client uses it to open the\nroom transport for THIS query beside — never instead of — its daemon session.\n\nIt is a dedicated block on purpose: the ROOM ws is a SEPARATE connection this query opens beside\nits daemon session (never a migration of the daemon session — the daemon ws host is fixed and\nplaced by the affinity ticket). A room-served lease's top-level fields are byte-identical to the\ndaemon-served ones.","source":"packages/api-server/src/index.ts","line":430,"href":"/reference/typescript/api-server/#symbol-QueryLeaseRealtime"},{"name":"QueryLeaseRealtimeFence","originalName":"QueryLeaseRealtimeFence","kind":"InterfaceDeclaration","signature":"/** The §4.2 downgrade fence on a query lease (Slice I-v): rides a labeled reply whose §4.1\n *  occupancy gate CLOSED (so there is NO `realtime` block) when the server could drain the room.\n *  A SIBLING of `realtime`, never nested inside it — block-ABSENCE is the downgrade signal, and\n *  the fence rides alongside that absence. Its `finalFlushSeq` is the room's last COMMITTED flush\n *  seq; the client's frozen room ghost holds visible until the daemon plane has provably absorbed\n *  it (`_rindle_room_watermark(doc) ≥ finalFlushSeq`). Absent from every non-downgrade reply. */\nexport interface QueryLeaseRealtimeFence {\n    /** The retiring room source's gate/domain key — `\"room:\" + doc`, matching what the room-served\n     *  lease's {@link QueryLeaseRealtime.sourceKey} carried. */\n    sourceKey: string;\n    doc: string;\n    finalFlushSeq: number;\n}","description":"The §4.2 downgrade fence on a query lease (Slice I-v): rides a labeled reply whose §4.1\noccupancy gate CLOSED (so there is NO `realtime` block) when the server could drain the room.\nA SIBLING of `realtime`, never nested inside it — block-ABSENCE is the downgrade signal, and\nthe fence rides alongside that absence. Its `finalFlushSeq` is the room's last COMMITTED flush\nseq; the client's frozen room ghost holds visible until the daemon plane has provably absorbed\nit (`_rindle_room_watermark(doc) ≥ finalFlushSeq`). Absent from every non-downgrade reply.","source":"packages/api-server/src/index.ts","line":495,"href":"/reference/typescript/api-server/#symbol-QueryLeaseRealtimeFence"},{"name":"QueryLeaseRequest","originalName":"QueryLeaseRequest","kind":"InterfaceDeclaration","signature":"export interface QueryLeaseRequest<User> {\n    user: User;\n    name: string;\n    args: unknown;\n    request?: unknown;\n    /** The browser's stable `clientId` (sent on the query POST) — the anonymous routing-key fallback\n     *  when there is no authenticated subject and no session cookie (READ-ROUTER-DESIGN.md §1.5/§2.2).\n     *  A routing HINT only, never authorization. */\n    clientId?: string;\n    /** The browser's opaque follower-affinity ticket (FOLLOWER-AFFINITY-DESIGN.md §3), read off the\n     *  query POST and forwarded opaquely on `materialize` so the fleet edge selects the follower\n     *  the browser's ws is pinned to (§2, §4) — both legs co-locate. The api-server does NOT verify\n     *  it (the fleet does); it holds no signing key. Absent ⇒ single daemon / affinity off. */\n    affinity?: string;\n}","description":"","source":"packages/api-server/src/index.ts","line":403,"href":"/reference/typescript/api-server/#symbol-QueryLeaseRequest"},{"name":"QueryLeaseResponse","originalName":"QueryLeaseResponse","kind":"InterfaceDeclaration","signature":"export interface QueryLeaseResponse {\n    leaseToken: string;\n    materializationId: string;\n    queryKey?: string;\n    reused?: boolean;\n    /** The public daemon/fleet WebSocket endpoint. With the unified `rindle` connection this is\n     *  derived from the same ingress URL (or `rindle.wsUrl`) so a browser can open its transport from\n     *  this lease and needs no application-authored runtime-config route. */\n    wsEndpoint?: string;\n    /** Fresh opaque follower-placement ticket minted with this follower-local lease. The optimistic\n     *  client offers it on the WebSocket opened at {@link wsEndpoint}, pinning both legs to the same\n     *  follower even though the first connection is created only after this response. */\n    affinity?: string;\n    /** The room-serve block (G-iv-b) — see {@link QueryLeaseRealtime}. Absent ⇒ the lease is\n     *  byte-identical to the legacy daemon-served shape. */\n    realtime?: QueryLeaseRealtime;\n    /** The §4.2 downgrade fence (Slice I-v) — see {@link QueryLeaseRealtimeFence}. Present only on a\n     *  labeled reply whose occupancy gate closed AND `realtime.lifecycle.drainRoom` could drain the\n     *  room; absent otherwise (including on every room-served reply). */\n    realtimeFence?: QueryLeaseRealtimeFence;\n    /** The §4 lifecycle system-stream block (Slice I-iii) — see {@link QueryLeaseLifecycle}.\n     *  Minted ONLY under the opt-in `realtime.lifecycle` config; absent ⇒ byte-identical to the\n     *  pre-lifecycle response. */\n    lifecycle?: QueryLeaseLifecycle;\n}","description":"","source":"packages/api-server/src/index.ts","line":503,"href":"/reference/typescript/api-server/#symbol-QueryLeaseResponse"},{"name":"QueryReadRequest","originalName":"QueryReadRequest","kind":"InterfaceDeclaration","signature":"/** A one-shot SSR read of a named query (SSR-DESIGN.md §6): same `(name, args)` surface as a lease,\n *  but the daemon serializes the current view ONCE and registers no subscriber. */\nexport interface QueryReadRequest<User> {\n    user: User;\n    name: string;\n    args: unknown;\n    request?: unknown;\n    /** The browser's stable `clientId` — the anonymous routing-key fallback (see\n     *  {@link QueryLeaseRequest.clientId}). Lets the SSR read co-locate on the follower the booting\n     *  client's first subscribe will hit (READ-ROUTER-DESIGN.md §2.4). */\n    clientId?: string;\n    /** The browser's opaque follower-affinity ticket — see {@link QueryLeaseRequest.affinity}.\n     *  Forwarded on the one-shot `query` so an SSR read lands on the same pinned follower. */\n    affinity?: string;\n}","description":"A one-shot SSR read of a named query (SSR-DESIGN.md §6): same `(name, args)` surface as a lease,\nbut the daemon serializes the current view ONCE and registers no subscriber.","source":"packages/api-server/src/index.ts","line":531,"href":"/reference/typescript/api-server/#symbol-QueryReadRequest"},{"name":"QueryReadResponse","originalName":"QueryReadResponse","kind":"InterfaceDeclaration","signature":"/** The assembled (nested-by-name) first-paint snapshot the server-side Store seeds + dehydrates\n *  (SSR-DESIGN.md §3.3). `rows` hydrate without an engine; `cvMin` is their watermark baseline. */\nexport interface QueryReadResponse {\n    rows: Array<{\n        cols: Record<string, unknown>;\n        [rel: string]: unknown;\n    }>;\n    cvMin?: number;\n    queryKey?: string;\n}","description":"The assembled (nested-by-name) first-paint snapshot the server-side Store seeds + dehydrates\n(SSR-DESIGN.md §3.3). `rows` hydrate without an engine; `cvMin` is their watermark baseline.","source":"packages/api-server/src/index.ts","line":547,"href":"/reference/typescript/api-server/#symbol-QueryReadResponse"},{"name":"queryRealtimeLabel","originalName":"queryRealtimeLabel","kind":"FunctionDeclaration","signature":"/** The realtime label a registered query carries (stamped by `registerQueries` from its\n *  `defineQuery` options), or `undefined` for an unlabeled query. The lease path uses this to\n *  derive `(room profile, args mapping)` for a named query. */\nexport declare function queryRealtimeLabel(query: ApiQuery<any, any> | undefined): RealtimeQueryLabel | undefined;","description":"The realtime label a registered query carries (stamped by `registerQueries` from its\n`defineQuery` options), or `undefined` for an unlabeled query. The lease path uses this to\nderive `(room profile, args mapping)` for a named query.","source":"packages/api-server/src/rooms.ts","line":548,"href":"/reference/typescript/api-server/#symbol-queryRealtimeLabel"},{"name":"queryResultToAst","originalName":"queryResultToAst","kind":"FunctionDeclaration","signature":"export declare function queryResultToAst(result: ApiQueryResult): Ast;","description":"","source":"packages/api-server/src/rooms.ts","line":42,"href":"/reference/typescript/api-server/#symbol-queryResultToAst"},{"name":"QueryShapesDoc","originalName":"QueryShapesDoc","kind":"InterfaceDeclaration","signature":"/** The query-shapes document `rindle indices suggest` consumes: the app's synced tables (name +\n *  primary key) and one wire AST per structurally distinct shape a registered query can build. */\nexport interface QueryShapesDoc {\n    tables: Array<{\n        name: string;\n        primaryKey: string[];\n    }>;\n    queries: Array<{\n        name: string;\n        ast: Ast;\n    }>;\n}","description":"The query-shapes document `rindle indices suggest` consumes: the app's synced tables (name +\nprimary key) and one wire AST per structurally distinct shape a registered query can build.","source":"packages/api-server/src/index.ts","line":2490,"href":"/reference/typescript/api-server/#symbol-QueryShapesDoc"},{"name":"questionToDollarParams","originalName":"questionToDollarParams","kind":"FunctionDeclaration","signature":"/**\n * Rewrite SQLite-style `?` positional placeholders to Postgres `$1..$n`, for mutators written\n * once and run against either backend (pass as {@link PostgresBackendOptions.rewriteSql}).\n * Skips `'…'` string literals (with `''` escapes), `\"…\"` quoted identifiers, `--` line comments,\n * and non-nested C-style block comments. Do not mix `?` and `$n` styles in one statement.\n */\nexport declare function questionToDollarParams(sql: string): string;","description":"Rewrite SQLite-style `?` positional placeholders to Postgres `$1..$n`, for mutators written\nonce and run against either backend (pass as {@link PostgresBackendOptions.rewriteSql}).\nSkips `'…'` string literals (with `''` escapes), `\"…\"` quoted identifiers, `--` line comments,\nand non-nested C-style block comments. Do not mix `?` and `$n` styles in one statement.","source":"packages/api-server/src/index.ts","line":2322,"href":"/reference/typescript/api-server/#symbol-questionToDollarParams"},{"name":"RealtimeQueryLabel","originalName":"RealtimeQueryLabel","kind":"InterfaceDeclaration","signature":"/**\n * The realtime LABEL a named query may declare (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §2.1):\n * which api-server room PROFILE the query wants to be served from, and how the query's args map\n * to that profile's key args. This is the DECLARATION only — the serve decision (covering proof,\n * lease routing) is the server's, and the final room key is minted server-side by the profile's\n * own `key` under authoritative ctx, so a label can never place a query in a room the server\n * didn't derive itself. Both tiers import the SAME `defineQuery` value, so they always agree\n * *which profile* a query belongs to.\n */\nexport interface RealtimeQueryLabel<Args = any> {\n    /** The room profile name — must match a `realtime.rooms` key on the api-server (validated\n     *  loudly at `createRindleApiServer` construction). May not contain `/` (the wire room-key\n     *  delimiter). */\n    readonly room: string;\n    /** Map the query's VALIDATED args to the profile's key args (what the server feeds the\n     *  profile's `key(args)`). Identity when omitted. Must be pure — both tiers may run it. */\n    readonly args?: (queryArgs: Args) => unknown;\n}","description":"The realtime LABEL a named query may declare (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §2.1):\nwhich api-server room PROFILE the query wants to be served from, and how the query's args map\nto that profile's key args. This is the DECLARATION only — the serve decision (covering proof,\nlease routing) is the server's, and the final room key is minted server-side by the profile's\nown `key` under authoritative ctx, so a label can never place a query in a room the server\ndidn't derive itself. Both tiers import the SAME `defineQuery` value, so they always agree\n*which profile* a query belongs to.","source":"packages/client/src/query.ts","line":372,"href":"/reference/typescript/api-server/#symbol-RealtimeQueryLabel"},{"name":"registerQueries","originalName":"registerQueries","kind":"FunctionDeclaration","signature":"/**\n * Register a list of co-located client {@link NamedQuery `defineQuery`} values as the server's query\n * surface — the bulk, no-boilerplate counterpart to {@link defineApiQueries}. Each query already\n * carries its wire `name` and a `resolve` that re-runs its validator on the UNTRUSTED wire args and\n * builds the authoritative `Query`, so the server just imports every co-located query and hands the\n * list here. The same validated args build a byte-identical AST on both tiers.\n *\n * The query's AUTHORITATIVE {@link ApiContext} is forwarded as `resolve`'s ctx — so a context-scoped\n * `defineQuery` (e.g. \"my issues\") is built from the server's trusted principal, never the client's.\n * A context-free query simply ignores the extra argument.\n *\n * Use {@link defineApiQueries} instead (or in addition) only when the server must DIVERGE from the\n * client — define a server-specific `defineQuery` with the same name and register that.\n *\n * ```ts\n * queries: registerQueries<User>([issuesPageQuery, issueDetailQuery, recentCommentsQuery, usersQuery]),\n * ```\n */\nexport declare function registerQueries<User>(queries: readonly NamedQuery<any, any, any>[]): ApiQueries<User>;","description":"Register a list of co-located client {@link NamedQuery`defineQuery`} values as the server's query\nsurface — the bulk, no-boilerplate counterpart to {@link defineApiQueries}. Each query already\ncarries its wire `name` and a `resolve` that re-runs its validator on the UNTRUSTED wire args and\nbuilds the authoritative `Query`, so the server just imports every co-located query and hands the\nlist here. The same validated args build a byte-identical AST on both tiers.\n\nThe query's AUTHORITATIVE {@link ApiContext} is forwarded as `resolve`'s ctx — so a context-scoped\n`defineQuery` (e.g. \"my issues\") is built from the server's trusted principal, never the client's.\nA context-free query simply ignores the extra argument.\n\nUse {@link defineApiQueries} instead (or in addition) only when the server must DIVERGE from the\nclient — define a server-specific `defineQuery` with the same name and register that.\n\n```ts\nqueries: registerQueries<User>([issuesPageQuery, issueDetailQuery, recentCommentsQuery, usersQuery]),\n```","source":"packages/api-server/src/index.ts","line":2385,"href":"/reference/typescript/api-server/#symbol-registerQueries"},{"name":"RenderIndex","originalName":"RenderIndex","kind":"TypeAliasDeclaration","signature":"export type RenderIndex = Record<string, TableRenderMeta>;","description":"","source":"packages/api-server/src/index.ts","line":1249,"href":"/reference/typescript/api-server/#symbol-RenderIndex"},{"name":"renderOp","originalName":"renderOp","kind":"FunctionDeclaration","signature":"/** Render one {@link MutationOp} to a `{sql, params}` for the dialect, or `null` for a no-op (an\n *  `update` whose row names only pk columns — nothing to SET, matching the client's no-op edit). */\nexport declare function renderOp(op: MutationOp, meta: TableRenderMeta, dialect: SqlDialect): SqlStatement | null;","description":"Render one {@link MutationOp} to a `{sql, params}` for the dialect, or `null` for a no-op (an\n`update` whose row names only pk columns — nothing to SET, matching the client's no-op edit).","source":"packages/api-server/src/index.ts","line":1302,"href":"/reference/typescript/api-server/#symbol-renderOp"},{"name":"renderPointRead","originalName":"renderPointRead","kind":"FunctionDeclaration","signature":"/** Render a point read (`tx.row`) — `SELECT <cols> FROM \"T\" WHERE <pk>` — for read-your-writes. */\nexport declare function renderPointRead(table: string, pk: KeyedRow, meta: TableRenderMeta, dialect: SqlDialect): SqlStatement;","description":"Render a point read (`tx.row`) — `SELECT <cols> FROM \"T\" WHERE <pk>` — for read-your-writes.","source":"packages/api-server/src/index.ts","line":1348,"href":"/reference/typescript/api-server/#symbol-renderPointRead"},{"name":"RindleApiError","originalName":"RindleApiError","kind":"ClassDeclaration","signature":"export declare class RindleApiError extends Error {\n    readonly code: RindleApiErrorCode;\n    readonly status: number;\n    constructor(code: RindleApiErrorCode, message: string, status: number);\n}","description":"","source":"packages/api-server/src/index.ts","line":1108,"href":"/reference/typescript/api-server/#symbol-RindleApiError"},{"name":"RindleApiErrorCode","originalName":"RindleApiErrorCode","kind":"TypeAliasDeclaration","signature":"export type RindleApiErrorCode = \"bad-request\" | \"forbidden\" | \"not-found\" | \"rejected\";","description":"","source":"packages/api-server/src/index.ts","line":1106,"href":"/reference/typescript/api-server/#symbol-RindleApiErrorCode"},{"name":"RindleApiRoutes","originalName":"RindleApiRoutes","kind":"InterfaceDeclaration","signature":"export interface RindleApiRoutes {\n    query: string;\n    read: string;\n    mutate: string;\n    applyRowChangeTxn: string;\n    claimRoomEpoch: string;\n    roomLmids: string;\n    roomBoot: string;\n    stream: string;\n}","description":"","source":"packages/api-server/src/index.ts","line":613,"href":"/reference/typescript/api-server/#symbol-RindleApiRoutes"},{"name":"RindleApiServer","originalName":"RindleApiServer","kind":"InterfaceDeclaration","signature":"export interface RindleApiServer<User> {\n    readonly routes: RindleApiRoutes;\n    /** Close the SQL client created from {@link RindleApiServerOptions.database}, and drop every live\n     *  stream's readers and timers WITHOUT a durable write (that is {@link drainStreams}). Injected\n     *  SQL sessions and custom backends remain caller-owned. Idempotent. */\n    close(): void;\n    /** Open an LM stream (LM-STREAM-CHECKPOINT §2): commits the durable POINTER row, then hands back\n     *  the producer handle. A resolved handle means the message already exists for every client's\n     *  query — so a subscriber that arrives before the first token has something to attach to.\n     *  Throws 403 unless {@link RindleApiServerOptions.streams} is configured. */\n    openStream(input: OpenStreamInput<User>): Promise<StreamHandle>;\n    /** Attach a reader at `from` — the same call serves a first-touch subscriber (`from: 0`), a late\n     *  joiner (`from` = the seq its IVM view shows), and a reconnect (`from` = `Last-Event-ID`).\n     *  Terminates with `end`, or with `stale`/`absent` when the client should fall back to the\n     *  durable plane (both are ordinary answers, never errors). */\n    subscribeStream(input: SubscribeStreamInput<User>): Promise<StreamSubscription>;\n    /** Parse a default `{streamId, from?}` subscribe body and run {@link subscribeStream}. For the\n     *  GET + `EventSource` shape, use {@link streamResponse} (or build the body with\n     *  `streamRequestFromHttp(request)` yourself). */\n    handleStreamJson(body: unknown, context: ApiContext<User>): Promise<StreamSubscription>;\n    /** The subscribe route in ONE call: parse a GET (`?streamId=…&from=…`, with `Last-Event-ID`\n     *  winning), authorize + subscribe, and encode the SSE response. A refusal comes back as a JSON\n     *  error `Response` (403 for denied or unconfigured) rather than a throw, so the route body is a\n     *  single expression after authentication. For custom transports, compose\n     *  `streamRequestFromHttp` + {@link subscribeStream} + `streamFramesToSse` instead. */\n    streamResponse(request: {\n        url: string;\n        headers: {\n            get(name: string): string | null;\n        };\n    }, context: ApiContext<User> & {\n        keepAliveMs?: number;\n    }): Promise<Response>;\n    /** Checkpoint every live stream's outstanding tail, then seal it `interrupted`\n     *  (LM-STREAM-CHECKPOINT §5). Wire it to SIGTERM: without it a rolling deploy drops each\n     *  response's un-checkpointed tail and strands rows saying `streaming` forever. */\n    drainStreams(): Promise<void>;\n    createQueryLease(input: QueryLeaseRequest<User>): Promise<QueryLeaseResponse>;\n    /** (Re-)materialize every `pinnedQueries` entry with a pinned policy. Idempotent — the daemon\n     *  dedupes by canonical query, so a re-assert reuses the existing materialization. Call it at\n     *  startup and whenever the daemon restarts (e.g. from the daemon-client `onBootId` hook), since\n     *  the daemon holds no durable materialization state. No-op when `pinnedQueries` is empty. */\n    assertPins(): Promise<void>;\n    pushMutation(input: PushMutationRequest<User>): Promise<PushMutationResponse>;\n    /** Apply an in-order batch (the client mutation queue's flush). Envelopes run strictly\n     *  sequentially; a rejection still advances the daemon's lmid, so later envelopes in the\n     *  batch stay contiguous and keep applying. A daemon ERROR throws for the whole batch —\n     *  the client retries it and the daemon's mid dedup absorbs the already-applied prefix. */\n    pushMutations(input: PushMutationsRequest<User>): Promise<PushMutationResponse[]>;\n    /** One-shot SSR read (SSR-DESIGN.md §6): resolve `(name, args)` → AST (same authority path as a\n     *  lease, `authorizeQuery` enforced), have the daemon serialize the current view once, and return\n     *  the assembled rows for the loader to seed + dehydrate. Registers NO subscriber — a dropped\n     *  render leaks nothing; the pipeline self-reclaims after the idle TTL ({@link\n     *  RindleApiServerOptions.readIdleTtlMs}) unless the browser's follow-up `subscribe` lands first. */\n    readQuery(input: QueryReadRequest<User>): Promise<QueryReadResponse>;\n    handleQueryJson(body: unknown, context: ApiContext<User>): Promise<QueryLeaseResponse>;\n    /** Parse a default `{name, args}` read body and run {@link readQuery}. */\n    handleReadJson(body: unknown, context: ApiContext<User>): Promise<QueryReadResponse>;\n    /** Accepts `{envelope}` (one) or `{envelopes: [...]}` (an in-order batch → array reply). */\n    handleMutateJson(body: unknown, context: ApiContext<User>): Promise<PushMutationResponse | PushMutationResponse[]>;\n    /** The room's flush (§5.3.1): gate on `authorizeRoom`, forward the txn to the write\n     *  authority, and pass the store's verdict through VERBATIM — `200 {applied, cv}`,\n     *  `409 {error:\"fenced\"|\"conflict\", …}`, or the loud identity `500`. Write\n     *  `status` + `body` as-is; the room's `httpAuthority` decodes them. */\n    handleApplyRowChangeTxnJson(body: unknown, context: ApiContext<User>): Promise<RoomHostResponse>;\n    /** Claim the next placement epoch for a doc (§2.5), same gate + envelope. */\n    handleClaimRoomEpochJson(body: unknown, context: ApiContext<User>): Promise<RoomHostResponse>;\n    /** The room's boot probe (§3.3), same gate + envelope. */\n    handleRoomLmidsJson(body: unknown, context: ApiContext<User>): Promise<RoomHostResponse>;\n    /** The DO shell's cold-boot callback (§10.1; enablement §3.1): authenticate the shell\n     *  secret, resolve the doc's footprint, claim the placement epoch, mint the upstream\n     *  lease and the flush leg. 403 until {@link RindleApiServerOptions.realtime} is set. */\n    handleRoomBootJson(body: unknown, context: ApiContext<User>): Promise<RoomHostResponse>;\n}","description":"","source":"packages/api-server/src/index.ts","line":1029,"href":"/reference/typescript/api-server/#symbol-RindleApiServer"},{"name":"RindleApiServerOptions","originalName":"RindleApiServerOptions","kind":"InterfaceDeclaration","signature":"export interface RindleApiServerOptions<User> {\n    /** The sync/IVM control-plane client (leases, materialization, rooms). Optional once\n     *  {@link rindle} is configured — the api-server then derives an HTTP client against the single\n     *  ingress. Pass one explicitly for a tokened production fleet, a split/routed deployment, or a\n     *  custom transport; an explicit client wins over the derivation. */\n    daemon?: RindleDaemonClient;\n    /** The unified connection (one URL, one key) that derives {@link daemon} and {@link database}\n     *  from the fleet's single ingress. `rindle: {}` resolves both halves from the `rindle dev`\n     *  environment. Any explicitly configured `daemon` / `database` / `sql` / `backend` field takes\n     *  precedence over its derived counterpart. */\n    rindle?: RindleConnectionOptions;\n    /** Preferred managed setup. The API server constructs and owns its SQL client; authoritative\n     *  mutators, `tx.sql`, and `scope.sql` use it, while `daemon` remains only the lease/query/\n     *  materialization/room control plane. Mutually exclusive with {@link sql} unless `backend`\n     *  explicitly replaces both. */\n    database?: RindleDatabaseOptions;\n    /** Advanced injection/test seam for an already-created SQL session. Most applications should\n     *  configure {@link database} and never import `createSqlClient`. When present (and `backend` is\n     *  absent), authoritative mutators run through {@link sqlBackend}. */\n    sql?: SqlSession;\n    /** Where mutations are applied and `lmid` is stamped ({@link MutationBackend}). Default:\n     *  managed `sqlBackend` when `database` or `sql` is configured, otherwise the compatibility\n     *  `daemonBackend(daemon)`. Pass `postgresBackend(...)` when Postgres is the source of truth. */\n    backend?: MutationBackend;\n    /** The typed schema (`createSchema`/`refineSchema`). Required only when a mutator uses the LOGICAL\n     *  write vocabulary (`tx.insert`/`update`/`upsert`/`insertIgnore`/`delete`/`row`) — it drives the\n     *  dialect SQL renderer (column order, pk, quoting). A logical op with no schema configured throws\n     *  loudly. Pure raw-`tx.exec` mutators do not need it. */\n    schema?: Schema;\n    queries?: ApiQueries<User>;\n    runQuery?: RunQuery<User>;\n    mutators?: ApiMutators<User>;\n    /** Optional gate before resolving a named query, for leases and one-shot reads. If omitted,\n     *  no gate runs. The query definition still owns row visibility predicates. */\n    authorizeQuery?: Authorizer<AuthorizeQueryInput<User>>;\n    /** Optional gate before mutation execution. If omitted, no gate runs. Mutators still own\n     *  row-level checks and business rules inside their authoritative transaction. */\n    authorizeMutation?: Authorizer<AuthorizeMutationInput<User>>;\n    /** Rindle Realtime (RINDLE-REALTIME-ENABLEMENT-DESIGN.md §3.1): the ONE named opt-in.\n     *  Presence activates the room flush trio AND `/room-boot`; absence keeps every room\n     *  endpoint 403. Takes precedence over the deprecated {@link authorizeRoom}. */\n    realtime?: RindleRealtimeOptions<User>;\n    /** The LM stream plane (LM-STREAM-CHECKPOINT-DESIGN.md): the ONE named opt-in for streaming a\n     *  model response live while the durable store only ever sees coarse checkpoints. Presence\n     *  activates {@link RindleApiServer.openStream}/{@link RindleApiServer.subscribeStream} and\n     *  `/stream`; absence keeps them 403. */\n    streams?: RindleStreamOptions<User>;\n    /** The room write-authority gate (§5.3.1): validates the caller is a placed room —\n     *  the epoch-bound flush credential rides `context.request`, and what it means is\n     *  the app's to define. The room endpoints are DISABLED (403) until this is set:\n     *  hosting a write authority is an explicit opt-in, never a default.\n     *  @deprecated Use {@link realtime} (its `authorize`) — this bare form gates the\n     *  flush trio but never activates `/room-boot`. When both are set, `realtime` wins. */\n    authorizeRoom?: Authorizer<ApiContext<User>>;\n    routes?: Partial<RindleApiRoutes>;\n    mode?: StreamMode;\n    materializationPolicy?: MaterializationPolicy | ((input: QueryLeaseRequest<User>) => MaybePromise<MaterializationPolicy>);\n    leaseTtlMs?: number;\n    /** Idle TTL (ms) the warm pipeline a one-shot SSR {@link RindleApiServer.readQuery read} leaves\n     *  behind is held at (SSR-DESIGN.md §3.4) — it must comfortably cover page-load + client-boot +\n     *  the follow-up live `subscribe` so the browser lands on a still-warm pipeline (the warm\n     *  handoff). The TTL is NOT part of the dedup key (max-wins), so it only ever extends a shared\n     *  query's window. Absent ⇒ the daemon's default idle TTL. */\n    readIdleTtlMs?: number;\n    subject?: string | ((input: QueryLeaseRequest<User>) => MaybePromise<string | undefined>);\n    /** The ANONYMOUS routing key forwarded to the read router (READ-ROUTER-DESIGN.md §2.2) — used by\n     *  HRW placement when there is no authenticated `subject`. The router keys on `subject ?? this`;\n     *  the resolved value rides `metadata.routingKey` to the daemon. Default: the browser-supplied\n     *  `clientId` (from the query POST body). NOTE: the default cannot co-locate an ANONYMOUS SSR read\n     *  with the booting client — an SSR server can't see the browser's localStorage `clientId`, so the\n     *  two legs compute different keys and §2.4's warm handoff misses (still correct — just an extra\n     *  first-touch materialize). For anonymous SSR co-location, set this to read a server-set session\n     *  cookie from `input.request` (it rides the SSR request AND every browser request). A routing\n     *  HINT only — never authorization. Ignored by a single (unrouted) daemon, which has nothing to\n     *  route. */\n    routingKey?: string | ((input: QueryLeaseRequest<User>) => MaybePromise<string | undefined>);\n    /** The EXPLICIT fleet pin fan-out — when set, {@link RindleApiServer.assertPins} fans each\n     *  resolved pin across ALL live followers through it (a fleet control action over the machine\n     *  list — FOLLOWER-AFFINITY-DESIGN.md §11) instead of materializing each pin once on the (single)\n     *  daemon. A per-viewer `materialize` always routes ONE; a pin-assert always fans ALL — never\n     *  inferred from `policy.kind`. Absent ⇒ single-daemon behavior (one materialize per pin). */\n    pinFanout?: PinFanout;\n    /** Named queries to keep permanently materialized via {@link RindleApiServer.assertPins}.\n     *  Each is materialized with a `pinned` policy (survives zero subscribers) so late joiners\n     *  attach to an already-warm result. Pins are viewer-independent — resolved with `pinUser`. */\n    pinnedQueries?: PinnedQuery[];\n    /** The user context pins resolve under (pins are shared, so they should not depend on a\n     *  per-viewer identity). Defaults to `undefined`. */\n    pinUser?: User;\n    /** Surfaced when a SCOPED mutator ({@link scoped}) throws from code that runs AFTER `scope.transact`\n     *  has already sealed the protocol outcome — a post-commit effect, or a compensation handler running\n     *  after a business rejection. The outcome is fixed (this callback CANNOT change the client's\n     *  response or the `lmid` advance), but the throw must not vanish: a failed refund is real money.\n     *  Absent ⇒ the error is logged to `console.error`. */\n    onScopeError?: (err: unknown, info: {\n        phase: \"committed\" | \"rejected\";\n        envelope: MutationEnvelope;\n    }) => void;\n}","description":"","source":"packages/api-server/src/index.ts","line":930,"href":"/reference/typescript/api-server/#symbol-RindleApiServerOptions"},{"name":"RindleConnectionOptions","originalName":"RindleConnectionOptions","kind":"InterfaceDeclaration","signature":"/** The unified fleet connection — one URL, one key. A Rindle is BOTH layers at once: the SQL\n *  database below and the sync/IVM control plane above, served by a single ingress that routes\n *  each request to the right tier. This option derives both from that one origin: the SQL layer\n *  ({@link RindleApiServerOptions.database}) at `url` with `token`, and the control-plane client\n *  ({@link RindleApiServerOptions.daemon}) at the same `url` — so an application configures \"a\n *  rindle\", not two subsystems.\n *\n *  The derived control-plane client sends the same bearer. A unified ingress is an explicitly\n *  merged customer API-server trust tier: it routes SQL to the master and control requests to a\n *  follower, while the browser still receives neither credential. Deployments that keep those\n *  trust tiers separate pass an explicit {@link RindleApiServerOptions.daemon}; explicit fields\n *  always win over this derivation. */\nexport interface RindleConnectionOptions {\n    /** The single ingress origin. Defaults to `$RINDLE_URL` — exported by `rindle dev` whenever\n     *  the rendered topology collapsed read+write onto one ingress. */\n    url?: string;\n    /** Public subscription WebSocket endpoint returned on query leases. Defaults to {@link url} with\n     *  `http:` → `ws:` / `https:` → `wss:`. Override when HTTP and WebSocket ingress differ. */\n    wsUrl?: string;\n    /** The server-side bearer for both legs of the unified ingress. Defaults to\n     *  `$RINDLE_DATABASE_TOKEN` (also a `rindle dev` export); required through one of those channels\n     *  unless both legs are configured explicitly. It never reaches the browser. */\n    token?: string;\n}","description":"The unified fleet connection — one URL, one key. A Rindle is BOTH layers at once: the SQL\ndatabase below and the sync/IVM control plane above, served by a single ingress that routes\neach request to the right tier. This option derives both from that one origin: the SQL layer\n({@link RindleApiServerOptions.database}) at `url` with `token`, and the control-plane client\n({@link RindleApiServerOptions.daemon}) at the same `url` — so an application configures \"a\nrindle\", not two subsystems.\n\nThe derived control-plane client sends the same bearer. A unified ingress is an explicitly\nmerged customer API-server trust tier: it routes SQL to the master and control requests to a\nfollower, while the browser still receives neither credential. Deployments that keep those\ntrust tiers separate pass an explicit {@link RindleApiServerOptions.daemon}; explicit fields\nalways win over this derivation.","source":"packages/api-server/src/index.ts","line":917,"href":"/reference/typescript/api-server/#symbol-RindleConnectionOptions"},{"name":"RindleDatabaseOptions","originalName":"RindleDatabaseOptions","kind":"TypeAliasDeclaration","signature":"/** Database connection used by the API server's managed SQL path.\n *\n *  `intMode` defaults to `\"number\"` because logical Rindle rows use the JSON-safe {@link WireValue}\n *  vocabulary — `\"bigint\"` does not survive `JSON.stringify`, and `\"string\"` silently retypes every\n *  integer, breaking arithmetic in mutator bodies. The cost is a HARD BOUND: a mutator read of an\n *  integer outside ±(2^53 − 1) rejects that mutation rather than silently rounding it. Tables with\n *  keys beyond that range (snowflake ids, and so on) must override `intMode` and have their mutators\n *  handle the resulting type. Commit receipts are unaffected — they never decode row values. */\nexport type RindleDatabaseOptions = Pick<SqlClientOptions, \"url\" | \"authToken\" | \"fetch\" | \"intMode\">;","description":"Database connection used by the API server's managed SQL path.\n\n`intMode` defaults to `\"number\"` because logical Rindle rows use the JSON-safe {@link WireValue}\nvocabulary — `\"bigint\"` does not survive `JSON.stringify`, and `\"string\"` silently retypes every\ninteger, breaking arithmetic in mutator bodies. The cost is a HARD BOUND: a mutator read of an\ninteger outside ±(2^53 − 1) rejects that mutation rather than silently rounding it. Tables with\nkeys beyond that range (snowflake ids, and so on) must override `intMode` and have their mutators\nhandle the resulting type. Commit receipts are unaffected — they never decode row values.","source":"packages/api-server/src/index.ts","line":903,"href":"/reference/typescript/api-server/#symbol-RindleDatabaseOptions"},{"name":"RindleRealtimeLifecycleOptions","originalName":"RindleRealtimeLifecycleOptions","kind":"InterfaceDeclaration","signature":"/** {@link RindleRealtimeOptions.lifecycle}. PRESENCE of the block is the opt-in switch (I-iii);\n *  the fields below are the Slice I-iv occupancy knobs (§4.1, decisions D4/D6/D7). All optional —\n *  `lifecycle: {}` gets the designed defaults. */\nexport interface RindleRealtimeLifecycleOptions {\n    /** D6 (§4.1): the occupancy threshold for room-serving. A labeled lease whose scope counts\n     *  FEWER than this many distinct unexpired sessions (the caller's own included) ships WITHOUT\n     *  the realtime block — served from the daemon, indistinguishable from an uncovered query —\n     *  but WITH the doorbell, so the 1→2 transition wakes it (that is the point: solo docs never\n     *  cost room infrastructure). Default **2** (the design's 1→2 trigger). Set `1` to room-serve\n     *  solo viewers (the pre-I-iv behavior under lifecycle config). */\n    minSessions?: number;\n    /** The §9.1 hysteresis window, ms (default **120_000**). Two consumers: (a) the lazy sweep\n     *  (D4) keeps expired session rows lingering at least this long past expiry — Slice I-v's\n     *  downgrade decision (\"no other unexpired row AND the newest other row expired > graceMs\n     *  ago\") is read FROM those rows, so they must survive to be read; (b) this slice's gate\n     *  applies the same hysteresis upward: a scope with an other-session row expired ≤ graceMs\n     *  ago keeps room-serving through the window (see `lifecycleOccupancy` — no flap on one\n     *  client's brief lapse). §9.1-tunable: raise it for docs where collaborators churn slowly. */\n    graceMs?: number;\n    /** TTL of an occupancy session row, ms — `expires_at = now + sessionTtlMs` on every labeled\n     *  lease mint/renewal (D7: session identity = the request's `clientId`; two tabs are two\n     *  sessions iff their clientIds differ). Default = the server's `leaseTtlMs`, else 5 minutes —\n     *  matching the room-token renewal cadence (`roomTokenTtlMs`, renewed 30s early), so a\n     *  room-attached client's renewals keep its row unexpired; a daemon-attached solo client's row\n     *  MAY lapse (it has no renewal timer) and is refreshed by its next doorbell-triggered\n     *  re-lease — occupancy converges through the doorbell itself. */\n    sessionTtlMs?: number;\n    /** The §4.2 downgrade drain hook (Slice I-v). When the occupancy gate CLOSES for a labeled\n     *  lease whose scope PLAUSIBLY hosted a room (an other-session row still lingers — never a\n     *  never-shared solo doc), the api-server calls this to drain the room's pending write-behind\n     *  and learn its last COMMITTED `flush_seq`, then rides the value back on the lease as the\n     *  {@link QueryLeaseRealtimeFence}. The deployment wires it to the room shell's / DO's `/drain`\n     *  control. Absent ⇒ no fence is attached (the client hits its loud legacy downgrade path);\n     *  a throw fails OPEN to the same (a downgrade never blocks the lease). Concurrent drains across\n     *  api-server instances are fine — `/drain` is idempotent. */\n    drainRoom?: (doc: string) => Promise<{\n        finalFlushSeq: number;\n    }>;\n}","description":"{@link RindleRealtimeOptions.lifecycle}. PRESENCE of the block is the opt-in switch (I-iii);\nthe fields below are the Slice I-iv occupancy knobs (§4.1, decisions D4/D6/D7). All optional —\n`lifecycle: {}` gets the designed defaults.","source":"packages/api-server/src/index.ts","line":759,"href":"/reference/typescript/api-server/#symbol-RindleRealtimeLifecycleOptions"},{"name":"RindleRealtimeOptions","originalName":"RindleRealtimeOptions","kind":"InterfaceDeclaration","signature":"export interface RindleRealtimeOptions<User> {\n    /** The boot shell secret (§10.1 — a host binding, never client-derived). Authenticates the\n     *  room's `Authorization: Bearer` on `/room-boot` (the default {@link authorizeBoot}) and keys\n     *  the DEFAULT epoch-bound flush credential. */\n    shellSecret: string;\n    /** NAMED room profiles (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §2.1): profile name → key\n     *  derivation + canonical unwindowed footprint + read-only context tables. The wire room key\n     *  for a named profile is `\"<profile>/<key>\"`; `/room-boot` splits it and resolves the\n     *  profile's footprint with the bare key. Compiled + validated LOUDLY at construction (§2.3):\n     *  a windowed footprint, a context table missing from the schema/footprint, or a registered\n     *  query whose realtime label names a missing profile all throw from `createRindleApiServer`. */\n    rooms?: Record<string, RoomProfile<User>>;\n    /** doc → the room's approved upstream footprint (§3.1) — an `Ast` or fluent `Query`. MAY\n     *  delegate to the named-query registry internally; throw `RindleApiError(\"not-found\", …, 404)`\n     *  for a doc that shouldn't exist. The §9 footprint budget belongs here — it runs once per\n     *  placement, at lease mint.\n     *  @deprecated Prefer named {@link rooms} profiles (RINDLE-REALTIME-QUERY-ENABLEMENT §2.1).\n     *  This bare form remains as the single-profile LEGACY alias — the anonymous/default profile:\n     *  a doc with no known `\"<profile>/\"` prefix resolves here, byte-identically to before named\n     *  profiles existed (and with none of their construction/boot-time validation). */\n    resolveFootprint?: (doc: string, ctx: ApiContext<User>) => MaybePromise<ApiQueryResult>;\n    /** Gates the flush trio — `authorizeRoom`, relocated. Default: verify the default flush\n     *  credential from the {@link ROOM_FLUSH_CREDENTIAL_HEADER} request header — which requires the\n     *  transport to pass its incoming request as `context.request` (Fetch `Request` and node\n     *  `IncomingMessage` shapes are both understood). */\n    authorize?: Authorizer<ApiContext<User>>;\n    /** Gates `/room-boot`. Default: constant-time `Authorization: Bearer` check against\n     *  {@link shellSecret} (same `context.request` requirement as {@link authorize}). */\n    authorizeBoot?: Authorizer<ApiContext<User>>;\n    /** Mint the flush headers a placed room presents on every flush call. Default:\n     *  {@link mintRoomFlushCredential} under {@link ROOM_FLUSH_CREDENTIAL_HEADER}. Override this\n     *  and {@link authorize} TOGETHER — they are the two ends of one credential. */\n    mintFlushHeaders?: (input: {\n        doc: string;\n        epoch: number;\n    }) => MaybePromise<Record<string, string>>;\n    /** Lease TTL for the room's upstream footprint materialization (defaults to the server-wide\n     *  `leaseTtlMs`, else the daemon's default). */\n    upstreamLeaseTtlMs?: number;\n    /** Static endpoint where rooms open their upstream subscription. In a follower fleet this is the\n     *  fleet ws URL; `/room-boot` pairs it with the materialization's fresh placement ticket so the\n     *  room lands on the exact follower holding its lease. Absent ⇒ no explicit upstream (the Node\n     *  room shell may use its own default; the shipped DO shell requires this endpoint). */\n    upstreamWsEndpoint?: string;\n    /** Locate (or place) the room serving `doc` and return the ROOM ws endpoint a room-served\n     *  lease's client should open (G-iv-b; on the DO shell this is the Worker's room URL). The\n     *  endpoint rides the lease's dedicated `realtime.wsEndpoint` — its OWN connection, distinct from\n     *  the daemon session's fixed ws host. Absent ⇒ room-serving is OFF: labeled queries serve from\n     *  the daemon exactly as today (fail-open). */\n    locateRoom?: (doc: string) => MaybePromise<{\n        wsEndpoint: string;\n    }>;\n    /** The room lease token signing key (`@rindle/room/token`): `kid` + secret, matching an entry\n     *  in the room shell's `downstream.tokenKeys` ring. Required for room-serving (without it a\n     *  labeled query fail-opens to the daemon with a one-time warning). A separate secret from\n     *  `shellSecret` on purpose — the shell's ring is the client-token trust domain, the shell\n     *  secret is the boot/flush trust domain. */\n    roomTokenKey?: {\n        kid: string;\n        secret: string;\n    };\n    /** Room lease token TTL, ms (default 5 minutes — the §4.1 short-TTL backstop; renewal is a\n     *  fresh lease through this server, never an extension). */\n    roomTokenTtlMs?: number;\n    /** Loud-diagnostics sink for the realtime layer (profile compilation warnings + the one-time\n     *  per-(query, profile) \"not room-served\" serve-decision warnings). Defaults to\n     *  `console.warn`; injectable for tests. */\n    warn?: (message: string) => void;\n    /** The §4 upgrade/downgrade lifecycle plane (RINDLE-REALTIME-QUERY-ENABLEMENT §4, Slice\n     *  I-iii): PRESENCE of this block is the opt-in — every realtime-labeled lease then\n     *  additionally mints the doorbell system lease (occupancy, §4.1) and every ROOM-SERVED lease\n     *  the fence bundle (watermark + ledger + outcomes, §4.2/§7.1/§3.3) — see\n     *  {@link QueryLeaseLifecycle}. Requires the daemon to have run `enable_realtime_lifecycle`\n     *  (the four `_rindle_*` system tables must be registered or the minted materializations fail\n     *  — which fail-opens with a one-time warning, never blocking the lease). Absent ⇒ the lease\n     *  response is byte-identical to pre-lifecycle. */\n    lifecycle?: RindleRealtimeLifecycleOptions;\n}","description":"","source":"packages/api-server/src/index.ts","line":685,"href":"/reference/typescript/api-server/#symbol-RindleRealtimeOptions"},{"name":"RindleStreamOptions","originalName":"RindleStreamOptions","kind":"InterfaceDeclaration","signature":"export interface RindleStreamOptions<User> {\n    /** Where checkpoints land: the app's tables (the default path) or a raw `commit` callback. */\n    checkpoint: StreamCheckpointTarget;\n    /** REQUIRED. Subscribing to a stream is reading someone's chat, so there is no default-allow.\n     *  Runs BEFORE existence is checked, so a denial cannot be used to probe for stream ids. */\n    authorize: Authorizer<AuthorizeStreamInput<User>>;\n    policy?: StreamCheckpointPolicy;\n    /** This process's identity — it must be UNIQUE per producer process, because the open CAS trusts\n     *  it to distinguish rivals (§5.1). In `tables` mode, map {@link StreamColumns.host} and the open\n     *  write persists it on the message row (so the app can route later subscribers to the hosting\n     *  instance, §4) and uses it as the single-flight token; setting it WITHOUT a mapped `host` column\n     *  is refused at construction. In `commit` mode it rides the `open` input. When a `host` column is\n     *  mapped and no hostId is given, a random per-plane token is used — the CAS still holds, routing\n     *  just has no stable name to read. */\n    hostId?: string;\n    /** Slack retained BELOW `durableSeq` so a client whose IVM view lags a checkpoint can still join\n     *  without a `stale` round trip. Text at or above `durableSeq` is never trimmed. Default 64 KiB.\n     *  `commit`-mode only — REFUSED (a construction-time `TypeError`) in `tables` mode, where\n     *  compaction needs the whole produced text at close (§3.4), so the buffer is retained in full. */\n    retainChars?: number;\n    /** How long a sealed stream stays joinable before eviction. Default 30s. */\n    lingerMs?: number;\n    /** Per-subscriber frame queue cap; overflow drops that subscriber with `stale` (§4). Default 1024.\n     *  Relayed readers reuse the same bound: a slow reader on a relayed stream costs itself the live\n     *  leg exactly as a local one does. */\n    maxQueuedFrames?: number;\n    /** A checkpoint that exhausted its retries. The stream keeps streaming — this is a durability\n     *  stall, not a stream stall — so the error must not vanish. Absent ⇒ `console.error`. */\n    onCheckpointError?: (err: unknown, info: {\n        streamId: string;\n        from: number;\n        seq: number;\n    }) => void;\n    /** Cross-process transport for the live plane ({@link StreamRelay}). Without one, a subscriber\n     *  that lands on a process not hosting its stream gets `absent` and reads the durable plane at\n     *  checkpoint granularity — correct, just chunky. */\n    relay?: StreamRelay;\n    /** Bound on `relay.attach`: a hung adapter yields `absent`, not a hung HTTP request. An\n     *  addressing adapter MAY deliberately spend this window waiting out a subscribe that races its\n     *  own kick. Default 2000. */\n    relayAttachTimeoutMs?: number;\n    /** A diagnostic, never a control path: relay failures (a throwing or rejecting `publish`, a failed\n     *  or timed-out `attach`, a conform violation in the frames) land here, wrapped so a throwing hook\n     *  cannot reach the plane. The reader-facing outcome is always the same legal `absent`/`stale`.\n     *  Absent ⇒ `console.error`. */\n    onRelayError?: (err: unknown, info: StreamRelayErrorInfo) => void;\n}","description":"","source":"packages/api-server/src/streams.ts","line":214,"href":"/reference/typescript/api-server/#symbol-RindleStreamOptions"},{"name":"ROOM_FLUSH_CREDENTIAL_HEADER","originalName":"ROOM_FLUSH_CREDENTIAL_HEADER","kind":"VariableDeclaration","signature":"export declare const ROOM_FLUSH_CREDENTIAL_HEADER = \"x-rindle-room-credential\";","description":"","source":"packages/api-server/src/index.ts","line":802,"href":"/reference/typescript/api-server/#symbol-ROOM_FLUSH_CREDENTIAL_HEADER"},{"name":"RoomBootFlush","originalName":"RoomBootFlush","kind":"InterfaceDeclaration","signature":"/** The room-boot flush leg (enablement §5): where the placed room's write-behind lands and what\n *  credential it presents. `urls` are the trio's ROUTE PATHS (root-relative — the shell resolves\n *  them against the boot call's origin), so an app that overrides `routes` needs no out-of-band\n *  sync; `headers` ride every flush call verbatim (`httpAuthority`'s `headers`). */\nexport interface RoomBootFlush {\n    urls: {\n        apply: string;\n        claim: string;\n        lmids: string;\n    };\n    headers: Record<string, string>;\n}","description":"The room-boot flush leg (enablement §5): where the placed room's write-behind lands and what\ncredential it presents. `urls` are the trio's ROUTE PATHS (root-relative — the shell resolves\nthem against the boot call's origin), so an app that overrides `routes` needs no out-of-band\nsync; `headers` ride every flush call verbatim (`httpAuthority`'s `headers`).","source":"packages/api-server/src/index.ts","line":658,"href":"/reference/typescript/api-server/#symbol-RoomBootFlush"},{"name":"RoomBootResponse","originalName":"RoomBootResponse","kind":"InterfaceDeclaration","signature":"/** The `/room-boot` response (RINDLE-REALTIME-DESIGN.md §10.1 — the DO shell's cold-boot\n *  callback): the claimed placement epoch, the room's upstream footprint lease, and the flush\n *  leg. A cold room boots inert and serves nothing until this returns. */\nexport interface RoomBootResponse {\n    epoch: number;\n    upstreamLeaseToken: string;\n    /** Where the room opens its upstream subscription (a routed deploy's follower). Absent ⇒ the\n     *  shell's statically configured rindled ws endpoint. */\n    upstreamWsEndpoint?: string;\n    /** Fresh opaque follower-placement ticket minted alongside `upstreamLeaseToken`. The DO offers\n     *  it with `rindle.v1` on the separate upstream ws so a static fleet endpoint replays to the\n     *  exact follower holding that local lease. Absent when daemon affinity is off. */\n    upstreamAffinity?: string;\n    /** Per-footprint-table scope specs (H-iv-b), compiled from the resolved footprint AST + the\n     *  profile's context set (the legacy anonymous profile compiles with an empty context set):\n     *  what the shell hands the wasm room's `enableWritesV2` — the §3.3 commit gate. Optional\n     *  only for wire compatibility with pre-H-iv-b servers; a shell that doesn't receive them\n     *  enables the v1 table-granular write plane exactly as before. */\n    scopes?: RoomScopeSpec[];\n    flush: RoomBootFlush;\n}","description":"The `/room-boot` response (RINDLE-REALTIME-DESIGN.md §10.1 — the DO shell's cold-boot\ncallback): the claimed placement epoch, the room's upstream footprint lease, and the flush\nleg. A cold room boots inert and serves nothing until this returns.","source":"packages/api-server/src/index.ts","line":666,"href":"/reference/typescript/api-server/#symbol-RoomBootResponse"},{"name":"RoomFlushCredentialPayload","originalName":"RoomFlushCredentialPayload","kind":"InterfaceDeclaration","signature":"export interface RoomFlushCredentialPayload {\n    v: 1;\n    doc: string;\n    epoch: number;\n    iat: number;\n}","description":"","source":"packages/api-server/src/index.ts","line":806,"href":"/reference/typescript/api-server/#symbol-RoomFlushCredentialPayload"},{"name":"RoomHostResponse","originalName":"RoomHostResponse","kind":"InterfaceDeclaration","signature":"/** A room-host reply the transport writes VERBATIM (`status` + JSON `body`): the\n *  daemon's fence/conflict/identity semantics ride specific statuses and body shapes\n *  the room's `httpAuthority` decodes, so this endpoint trio can't run through the\n *  throw-on-error result shapes the viewer endpoints use. */\nexport interface RoomHostResponse {\n    status: number;\n    body: unknown;\n}","description":"A room-host reply the transport writes VERBATIM (`status` + JSON `body`): the\ndaemon's fence/conflict/identity semantics ride specific statuses and body shapes\nthe room's `httpAuthority` decodes, so this endpoint trio can't run through the\nthrow-on-error result shapes the viewer endpoints use.","source":"packages/api-server/src/index.ts","line":628,"href":"/reference/typescript/api-server/#symbol-RoomHostResponse"},{"name":"RoomProfile","originalName":"RoomProfile","kind":"InterfaceDeclaration","signature":"/**\n * One NAMED room profile (§2.1). Rooms are document-scoped, not query-scoped: a profile is what\n * stands up and feeds a room — the flat `resolveFootprint` promoted to a named, reusable unit.\n * Labeled queries opt into a profile; the wire room key for a named profile is minted SERVER-side\n * as `\"<profile>/<key>\"`, and `/room-boot` splits it back to resolve the footprint.\n */\nexport interface RoomProfile<User = unknown> {\n    /** Derive the profile-local room key from the (label-mapped) query args. Runs server-side under\n     *  authoritative inputs — the client learns the key from the lease, it never computes one. */\n    key: (args: any) => string;\n    /** Build the room's canonical footprint — the replica boundary the room loads and follows —\n     *  from the profile-local doc key (this profile's `key` output; what `/room-boot` receives\n     *  after the prefix split). MUST be unwindowed (§2.3): no `limit`/`start`/`one` anywhere in the\n     *  AST — enforced loudly at construction when statically resolvable, and again at every boot.\n     *  Should be a TOTAL builder over any key (a shape constructor, not an authorizer). */\n    footprint: (docKey: string, ctx: ApiContext<User>) => MaybePromise<ApiQueryResult>;\n    /** Loaded-but-never-room-written tables (§2.2 — the \"followed\" set: real external writers, the\n     *  daemon stays write-authoritative for them). Must be a subset of the footprint's tables; the\n     *  room's writable scope is footprint minus context. Defaults to `[]`. */\n    context?: readonly string[];\n}","description":"One NAMED room profile (§2.1). Rooms are document-scoped, not query-scoped: a profile is what\nstands up and feeds a room — the flat `resolveFootprint` promoted to a named, reusable unit.\nLabeled queries opt into a profile; the wire room key for a named profile is minted SERVER-side\nas `\"<profile>/<key>\"`, and `/room-boot` splits it back to resolve the footprint.","source":"packages/api-server/src/rooms.ts","line":26,"href":"/reference/typescript/api-server/#symbol-RoomProfile"},{"name":"RoomScopeSpec","originalName":"RoomScopeSpec","kind":"TypeAliasDeclaration","signature":"/**\n * One footprint table's FULL scope spec (slice H-iv-b): byte-compatible with\n * `rindle-room-core`'s `TableScopeSpec` (scope.rs), the wasm room's `enableWritesV2` input. It\n * rides the boot wire (`RoomBootResponse.scopes`); since slice H-iii the LEASE wire's\n * {@link RoomTableSpec} carries `footprintWhere` too (the client-side routing proof), so the two\n * shapes are now structurally IDENTICAL — kept as two names because they are two wires with two\n * consumers (the room gate vs the client router).\n *\n * `footprintWhere` is computed for EVERY footprint table — context (`kind: \"none\"`) ones\n * included, because the gate proves ABSENT READS on any readable table with it (§3.1: an absent\n * read is covered only when the footprint predicate is decidable from the pk columns alone and\n * evaluates true on the read key). ABSENT (no exact membership predicate exists) ⇒ no absent\n * read on that table is provable — the room gate fails closed to a deopt.\n *\n * **`footprintWhere` is EXACT-only — the opposite discipline from the writable `where`.** The\n * writable side ships the WIDENING extraction ({@link tablePredicate}) and that is sound (the\n * held-row set is the real outer bound). The absent-read proof points the other way: it uses\n * `footprintWhere` to conclude \"a row with this pk would have been IN the footprint, so the\n * room's absence is truth's absence\" — a WIDENED predicate over-claims exactly there (a root\n * `where` mixing pk-column conjuncts with a dropped EXISTS, or a correlated child whose own\n * `where` reads only its pk, would prove an absence the dropped part can contradict). So\n * `footprintWhere` is emitted ONLY when the membership predicate is exact\n * ({@link exactMembershipPredicate}): every node reading the table is the footprint ROOT (a\n * child node's implicit correlation to its parent is itself a dropped, non-row-local constraint)\n * and the root's `where` extraction dropped nothing. An unconstrained exact root (the whole\n * table rides the footprint) emits the vacuous-true `{type:\"and\",conditions:[]}` — the gate's\n * combinator pins empty-AND = true — so whole-table footprints keep provable absent reads.\n * Child/correlated tables get NO `footprintWhere` and their absent reads deopt (fail closed);\n * propagating a parent constraint through a pk-covering correlation is a future refinement.\n */\nexport type RoomScopeSpec = {\n    table: string;\n    footprintWhere?: Condition;\n    writable: RoomTableSpec[\"writable\"];\n};","description":"One footprint table's FULL scope spec (slice H-iv-b): byte-compatible with\n`rindle-room-core`'s `TableScopeSpec` (scope.rs), the wasm room's `enableWritesV2` input. It\nrides the boot wire (`RoomBootResponse.scopes`); since slice H-iii the LEASE wire's\n{@link RoomTableSpec} carries `footprintWhere` too (the client-side routing proof), so the two\nshapes are now structurally IDENTICAL — kept as two names because they are two wires with two\nconsumers (the room gate vs the client router).\n\n`footprintWhere` is computed for EVERY footprint table — context (`kind: \"none\"`) ones\nincluded, because the gate proves ABSENT READS on any readable table with it (§3.1: an absent\nread is covered only when the footprint predicate is decidable from the pk columns alone and\nevaluates true on the read key). ABSENT (no exact membership predicate exists) ⇒ no absent\nread on that table is provable — the room gate fails closed to a deopt.\n\n**`footprintWhere` is EXACT-only — the opposite discipline from the writable `where`.** The\nwritable side ships the WIDENING extraction ({@link tablePredicate}) and that is sound (the\nheld-row set is the real outer bound). The absent-read proof points the other way: it uses\n`footprintWhere` to conclude \"a row with this pk would have been IN the footprint, so the\nroom's absence is truth's absence\" — a WIDENED predicate over-claims exactly there (a root\n`where` mixing pk-column conjuncts with a dropped EXISTS, or a correlated child whose own\n`where` reads only its pk, would prove an absence the dropped part can contradict). So\n`footprintWhere` is emitted ONLY when the membership predicate is exact\n({@link exactMembershipPredicate}): every node reading the table is the footprint ROOT (a\nchild node's implicit correlation to its parent is itself a dropped, non-row-local constraint)\nand the root's `where` extraction dropped nothing. An unconstrained exact root (the whole\ntable rides the footprint) emits the vacuous-true `{type:\"and\",conditions:[]}` — the gate's\ncombinator pins empty-AND = true — so whole-table footprints keep provable absent reads.\nChild/correlated tables get NO `footprintWhere` and their absent reads deopt (fail closed);\npropagating a parent constraint through a pk-covering correlation is a future refinement.","source":"packages/api-server/src/rooms.ts","line":249,"href":"/reference/typescript/api-server/#symbol-RoomScopeSpec"},{"name":"RoomTableSpec","originalName":"RoomTableSpec","kind":"TypeAliasDeclaration","signature":"/**\n * One footprint table's spec on the lease wire (`QueryLeaseResponse.realtime.tables`): the §2.2\n * owned/followed split plus §3.2's per-table routing metadata, compiled from the RESOLVED\n * footprint AST at lease time (so key-dependent and non-static profiles compile too).\n *\n * `writable`:\n * - `none` — a context table (§2.2 \"followed\"): loaded by the room, never room-written; the\n *   daemon stays write-authoritative.\n * - `predicate` — a writable table. `where` is the ROW-LOCAL part of the footprint's predicate\n *   for this table (simple column-vs-literal conditions composed with and/or); an ABSENT `where`\n *   means no row-local constraint — every row the room holds for this table is in the writable\n *   scope. `joinKeyCols` are the correlation columns the footprint binds on this table (slice\n *   H's \"room mutators never write join keys\" enforcement input).\n *\n * Dropping the non-row-local parts (correlated/EXISTS conditions, column-vs-column comparisons)\n * only ever WIDENS the predicate, which is sound here: the room only relays rows the footprint\n * materialized, so the held-row set — not this predicate — is the real outer bound; `where` is a\n * row-local refinement of it, and a wider refinement can never mark a held footprint row\n * non-writable that the full predicate would have allowed. (An OR with any non-row-local\n * disjunct is dropped WHOLE — keeping only some disjuncts would narrow, which is not sound.)\n *\n * `footprintWhere` (H-iii — the lease-wire flip): the EXACT footprint-membership predicate,\n * identical to {@link RoomScopeSpec.footprintWhere} (ONE compiler feeds both wires — the lease's\n * table specs and the boot wire's scopes are now the SAME objects). The client's §3 router\n * consumes it for the pk-membership read proof; it is advisory routing metadata, never a\n * credential (the room gate re-proves engine-side, H-iv).\n */\nexport type RoomTableSpec = {\n    table: string;\n    footprintWhere?: Condition;\n    writable: {\n        kind: \"none\";\n    } | {\n        kind: \"predicate\";\n        where?: Condition;\n        joinKeyCols: string[];\n    };\n};","description":"One footprint table's spec on the lease wire (`QueryLeaseResponse.realtime.tables`): the §2.2\nowned/followed split plus §3.2's per-table routing metadata, compiled from the RESOLVED\nfootprint AST at lease time (so key-dependent and non-static profiles compile too).\n\n`writable`:\n- `none` — a context table (§2.2 \"followed\"): loaded by the room, never room-written; the\n  daemon stays write-authoritative.\n- `predicate` — a writable table. `where` is the ROW-LOCAL part of the footprint's predicate\n  for this table (simple column-vs-literal conditions composed with and/or); an ABSENT `where`\n  means no row-local constraint — every row the room holds for this table is in the writable\n  scope. `joinKeyCols` are the correlation columns the footprint binds on this table (slice\n  H's \"room mutators never write join keys\" enforcement input).\n\nDropping the non-row-local parts (correlated/EXISTS conditions, column-vs-column comparisons)\nonly ever WIDENS the predicate, which is sound here: the room only relays rows the footprint\nmaterialized, so the held-row set — not this predicate — is the real outer bound; `where` is a\nrow-local refinement of it, and a wider refinement can never mark a held footprint row\nnon-writable that the full predicate would have allowed. (An OR with any non-row-local\ndisjunct is dropped WHOLE — keeping only some disjuncts would narrow, which is not sound.)\n\n`footprintWhere` (H-iii — the lease-wire flip): the EXACT footprint-membership predicate,\nidentical to {@link RoomScopeSpec.footprintWhere} (ONE compiler feeds both wires — the lease's\ntable specs and the boot wire's scopes are now the SAME objects). The client's §3 router\nconsumes it for the pk-membership read proof; it is advisory routing metadata, never a\ncredential (the room gate re-proves engine-side, H-iv).","source":"packages/api-server/src/rooms.ts","line":211,"href":"/reference/typescript/api-server/#symbol-RoomTableSpec"},{"name":"RunQuery","originalName":"RunQuery","kind":"TypeAliasDeclaration","signature":"export type RunQuery<User> = (input: RunQueryInput<User>) => MaybePromise<ApiQueryResult>;","description":"","source":"packages/api-server/src/index.ts","line":200,"href":"/reference/typescript/api-server/#symbol-RunQuery"},{"name":"RunQueryInput","originalName":"RunQueryInput","kind":"InterfaceDeclaration","signature":"export interface RunQueryInput<User> {\n    user: User;\n    name: string;\n    args: unknown;\n    query: ApiQuery<User, any>;\n    context: ApiContext<User>;\n}","description":"","source":"packages/api-server/src/index.ts","line":192,"href":"/reference/typescript/api-server/#symbol-RunQueryInput"},{"name":"runSharedMutation","originalName":"runSharedMutation","kind":"FunctionDeclaration","signature":"/** Run a SHARED generator mutator (the SAME body the client predicts) against a live server\n *  transaction (MUTATORS-ISOMORPHIC): bind the tier-agnostic {@link isoTx} factory and drive it —\n *  each yielded logical op renders + runs against `tx` (dialect SQL, per backend), each `tx.row`\n *  suspends for read-your-writes, and `tx.all` fans out. A server mutator uses this to delegate its\n *  write body after parsing untrusted args and applying its server-only authority (principal, policy).\n *  A mutator-body throw remains a business rejection; a DB failure propagates as infra. */\nexport declare function runSharedMutation<Args, Ctx extends MutatorCtx>(mutator: SharedMutator<Args, Ctx>, args: Args, ctx: Ctx, tx: ServerMutationTx): Promise<void>;","description":"Run a SHARED generator mutator (the SAME body the client predicts) against a live server\ntransaction (MUTATORS-ISOMORPHIC): bind the tier-agnostic {@link isoTx} factory and drive it —\neach yielded logical op renders + runs against `tx` (dialect SQL, per backend), each `tx.row`\nsuspends for read-your-writes, and `tx.all` fans out. A server mutator uses this to delegate its\nwrite body after parsing untrusted args and applying its server-only authority (principal, policy).\nA mutator-body throw remains a business rejection; a DB failure propagates as infra.","source":"packages/api-server/src/index.ts","line":3708,"href":"/reference/typescript/api-server/#symbol-runSharedMutation"},{"name":"scoped","originalName":"scoped","kind":"FunctionDeclaration","signature":"/** Mark a mutator as SCOPED so the api-server gives it a {@link MutationScope} (author-controlled tx\n *  boundary via `scope.transact`) rather than running its whole body inside the transaction. Register\n *  it alongside the tx-form mutators — it wins by key like any override:\n *\n *  ```ts\n *  mutators: defineApiMutators({\n *    ...sharedApiMutators(sharedMutators, sharedCtx),        // tx-form (common case)\n *    createOrder: scoped(async (scope, raw, ctx) => {        // needs outside-tx work\n *      const args = createOrder.args.parse(raw);\n *      const chargeId = await stripe.charge(args.amount, { idempotencyKey: ctx.envelope.mid }); // outside tx\n *      try {\n *        await scope.transact(createOrder, args, { ...sharedCtx(ctx), chargeId });              // inside tx\n *      } catch (e) {\n *        await stripe.refund(chargeId);                       // compensate — the write rejected\n *        throw e;\n *      }\n *      await sendReceipt(ctx.user);                           // after commit\n *    }),\n *  }),\n *  ```\n */\nexport declare function scoped<User, Args>(fn: ScopedMutator<User, Args>): ScopedApiMutator<User, Args>;","description":"Mark a mutator as SCOPED so the api-server gives it a {@link MutationScope} (author-controlled tx\nboundary via `scope.transact`) rather than running its whole body inside the transaction. Register\nit alongside the tx-form mutators — it wins by key like any override:\n\n```ts\nmutators: defineApiMutators({\n  ...sharedApiMutators(sharedMutators, sharedCtx),        // tx-form (common case)\n  createOrder: scoped(async (scope, raw, ctx) => {        // needs outside-tx work\n    const args = createOrder.args.parse(raw);\n    const chargeId = await stripe.charge(args.amount, { idempotencyKey: ctx.envelope.mid }); // outside tx\n    try {\n      await scope.transact(createOrder, args, { ...sharedCtx(ctx), chargeId });              // inside tx\n    } catch (e) {\n      await stripe.refund(chargeId);                       // compensate — the write rejected\n      throw e;\n    }\n    await sendReceipt(ctx.user);                           // after commit\n  }),\n}),\n```","source":"packages/api-server/src/index.ts","line":390,"href":"/reference/typescript/api-server/#symbol-scoped"},{"name":"ScopedApiMutator","originalName":"ScopedApiMutator","kind":"TypeAliasDeclaration","signature":"/** A {@link ScopedMutator} tagged by {@link scoped} so the harness invokes it with a\n *  {@link MutationScope}. Typed as a BRANDED tx-form {@link ApiMutator} purely so it registers in the\n *  `mutators` record without widening it to a union (which would break contextual inference for every\n *  plain tx-form entry). Its true runtime shape is `(scope, args, ctx)`; the tag — not the type —\n *  routes it, and it is never actually called as a tx-form mutator. */\nexport type ScopedApiMutator<User, Args> = ApiMutator<User, Args> & {\n    readonly __rindleScoped: true;\n};","description":"A {@link ScopedMutator} tagged by {@link scoped} so the harness invokes it with a\n{@link MutationScope}. Typed as a BRANDED tx-form {@link ApiMutator} purely so it registers in the\n`mutators` record without widening it to a union (which would break contextual inference for every\nplain tx-form entry). Its true runtime shape is `(scope, args, ctx)`; the tag — not the type —\nroutes it, and it is never actually called as a tx-form mutator.","source":"packages/api-server/src/index.ts","line":367,"href":"/reference/typescript/api-server/#symbol-ScopedApiMutator"},{"name":"ScopedMutator","originalName":"ScopedMutator","kind":"TypeAliasDeclaration","signature":"/** A SCOPED server mutator (WORK-OUTSIDE-TX): server-only code, ONE `scope.transact`, optional\n *  post-commit code. Register it by wrapping in {@link scoped} — the tag the api-server routes on to\n *  hand it a {@link MutationScope} instead of running its whole body inside the transaction. */\nexport type ScopedMutator<User, Args> = (scope: MutationScope, args: Args, ctx: MutationContext<User>) => void | Promise<void>;","description":"A SCOPED server mutator (WORK-OUTSIDE-TX): server-only code, ONE `scope.transact`, optional\npost-commit code. Register it by wrapping in {@link scoped} — the tag the api-server routes on to\nhand it a {@link MutationScope} instead of running its whole body inside the transaction.","source":"packages/api-server/src/index.ts","line":356,"href":"/reference/typescript/api-server/#symbol-ScopedMutator"},{"name":"ServerMutationTx","originalName":"ServerMutationTx","kind":"InterfaceDeclaration","signature":"/** The write handle a server mutator runs against — the ASYNC twin of the client's `MutationTx`. It\n *  is both the isomorphic {@link ServerWriteTx} logical surface (insert/update/upsert/insertIgnore/\n *  delete/row, rendered to dialect SQL) AND the legacy {@link SqlMutationTx} raw escape hatch. Both\n *  implementations run reads through the OPEN transaction (read-your-writes): Postgres executes\n *  everything live; the SQL-client and daemon adapters accumulate writes and lazily upgrade to an\n *  interactive mutation session at the first read (DAEMON-INTERACTIVE-TXN-DESIGN.md §5). */\nexport interface ServerMutationTx extends ServerWriteTx, SqlMutationTx {\n    /** Run a full query (a fluent `Query` or its wire `Ast`) INSIDE the open transaction —\n     *  read-your-writes, like {@link ServerWriteTx.row} but for arbitrary shapes. Returns the\n     *  parsed nested result tree: an array for a plural root, an object or `null` for a `.one()`\n     *  root, with cells in their raw SQLite storage-class representations (the same vocabulary\n     *  `row` speaks). Remote SQLite backends: compiled by `@rindle/query-compiler`'s sqlite dialect\n     *  (bind params, NO casts — §5.4) and executed through the mutation session. Postgres: lands with\n     *  the read-compiler catalog integration (POSTGRES-READ-COMPILER-DESIGN.md Phase B). */\n    query(q: Ast | Query<any, any, any>): Promise<unknown>;\n}","description":"The write handle a server mutator runs against — the ASYNC twin of the client's `MutationTx`. It\nis both the isomorphic {@link ServerWriteTx} logical surface (insert/update/upsert/insertIgnore/\ndelete/row, rendered to dialect SQL) AND the legacy {@link SqlMutationTx} raw escape hatch. Both\nimplementations run reads through the OPEN transaction (read-your-writes): Postgres executes\neverything live; the SQL-client and daemon adapters accumulate writes and lazily upgrade to an\ninteractive mutation session at the first read (DAEMON-INTERACTIVE-TXN-DESIGN.md §5).","source":"packages/api-server/src/index.ts","line":259,"href":"/reference/typescript/api-server/#symbol-ServerMutationTx"},{"name":"ServerSql","originalName":"ServerSql","kind":"InterfaceDeclaration","signature":"/** A deliberately narrow raw-SQL facade exposed by the API server. On {@link ServerMutationTx}\n *  it is bound to the open mutation transaction; on {@link MutationScope} each call runs in its\n *  own transaction outside the mutation boundary. Column aliases should be unique: positional\n *  driver rows are keyed by column name, so a duplicate alias is represented by its last value. */\nexport interface ServerSql {\n    /** Queue/execute one statement. A transaction-bound call commits with the surrounding mutation. */\n    execute(sql: string, params?: readonly WireValue[]): Promise<void>;\n    /** Queue/execute an ordered statement batch. An empty batch is a no-op. On an\n     *  outside-transaction surface ({@link MutationScope.sql}, `backend.outsideSql`) the batch MUST\n     *  execute as ONE atomic transaction — all statements or none. Every built-in backend does (the\n     *  daemon's `execute-sql-txn`, the sql-client's `/v1/sql/batch`, the Postgres plugger's\n     *  BEGIN/COMMIT); a custom backend that loops statements without a transaction silently breaks\n     *  the stream plane's chunk+CAS and compaction invariants, which ride single `batch` calls. */\n    batch(statements: readonly SqlStatement[]): Promise<void>;\n    /** Run a read and return rows keyed by their column names. */\n    query<Row = Record<string, unknown>>(sql: string, params?: readonly WireValue[]): Promise<Row[]>;\n}","description":"A deliberately narrow raw-SQL facade exposed by the API server. On {@link ServerMutationTx}\nit is bound to the open mutation transaction; on {@link MutationScope} each call runs in its\nown transaction outside the mutation boundary. Column aliases should be unique: positional\ndriver rows are keyed by column name, so a duplicate alias is represented by its last value.","source":"packages/api-server/src/index.ts","line":230,"href":"/reference/typescript/api-server/#symbol-ServerSql"},{"name":"ShapeExemplar","originalName":"ShapeExemplar","kind":"InterfaceDeclaration","signature":"/** One exemplar invocation for {@link dumpQueryShapes} — the `args`/`user` a query is built with.\n *  Literal values never matter to the dump (shapes are deduped with literals stripped); what an\n *  exemplar buys is BRANCH coverage, so supply one per code path a query function can take\n *  (an optional filter present/absent, each enum axis, …). */\nexport interface ShapeExemplar<User = unknown> {\n    args?: unknown;\n    user?: User;\n}","description":"One exemplar invocation for {@link dumpQueryShapes} — the `args`/`user` a query is built with.\nLiteral values never matter to the dump (shapes are deduped with literals stripped); what an\nexemplar buys is BRANCH coverage, so supply one per code path a query function can take\n(an optional filter present/absent, each enum axis, …).","source":"packages/api-server/src/index.ts","line":2483,"href":"/reference/typescript/api-server/#symbol-ShapeExemplar"},{"name":"shared","originalName":"shared","kind":"FunctionDeclaration","signature":"/** Co-locate a shared (generator) mutator with the validator for its args — pairing the arg SHAPE\n *  with the body that consumes it at ONE site, so neither tier restates it (the client derives its\n *  callsite type from `Args`; the server parses untrusted args through `.args`). Returns the SAME\n *  generator function with an `args` property attached (`Object.assign` mutates + returns it), so the\n *  registered value is byte-for-byte what the client drove before: {@link isGeneratorMutator} still\n *  detects it and it still `satisfies ClientRegistry`. */\nexport declare function shared<Args, Ctx extends MutatorCtx = MutatorCtx>(args: ArgSchema<Args>, run: SharedMutator<Args, Ctx>): SharedMutatorWithArgs<Args, Ctx>;","description":"Co-locate a shared (generator) mutator with the validator for its args — pairing the arg SHAPE\nwith the body that consumes it at ONE site, so neither tier restates it (the client derives its\ncallsite type from `Args`; the server parses untrusted args through `.args`). Returns the SAME\ngenerator function with an `args` property attached (`Object.assign` mutates + returns it), so the\nregistered value is byte-for-byte what the client drove before: {@link isGeneratorMutator} still\ndetects it and it still `satisfies ClientRegistry`.","source":"packages/client/src/mutation-ops.ts","line":180,"href":"/reference/typescript/api-server/#symbol-shared"},{"name":"sharedApiMutators","originalName":"sharedApiMutators","kind":"FunctionDeclaration","signature":"/**\n * Bulk-register a SHARED (generator) mutator registry as server mutators — the mutator twin of\n * {@link registerQueries} (which does the same for co-located `defineQuery` values). Each shared\n * mutator carries its own arg validator (`shared(schema, gen)`), so this wraps every one with the\n * UNIVERSAL server triad and nothing else: parse the UNTRUSTED wire args (its `.args`), map the server\n * {@link MutationContext} to the shared {@link MutatorCtx} principal, and drive the SAME body the\n * client predicts ({@link runSharedMutation}). The point is that a shared mutator whose server run\n * adds NO authority beyond that triad needs no hand-written wrapper.\n *\n * Server-only AUTHORITY the client cannot predict (a title guard, an owner-gated cascade, a\n * `NOT EXISTS` dedup) stays an explicit {@link ApiMutator} that OVERRIDES the auto-wrapped default —\n * spread this first, then the overrides win by key:\n *\n * ```ts\n * mutators: defineApiMutators({\n *   ...sharedApiMutators(sharedMutators, (ctx) => ({ user: requireUser(ctx.user) })),\n *   createIssue: withTitleGuard(sharedMutators.createIssue), // + server-only policy\n *   deleteIssue: async (tx, raw, ctx) => { ... },            // raw owner-gated cascade\n * }),\n * ```\n */\nexport declare function sharedApiMutators<User>(registry: Record<string, SharedMutatorWithArgs<any>>, principal: (ctx: MutationContext<User>) => MutatorCtx): ApiMutators<User>;","description":"Bulk-register a SHARED (generator) mutator registry as server mutators — the mutator twin of\n{@link registerQueries} (which does the same for co-located `defineQuery` values). Each shared\nmutator carries its own arg validator (`shared(schema, gen)`), so this wraps every one with the\nUNIVERSAL server triad and nothing else: parse the UNTRUSTED wire args (its `.args`), map the server\n{@link MutationContext} to the shared {@link MutatorCtx} principal, and drive the SAME body the\nclient predicts ({@link runSharedMutation}). The point is that a shared mutator whose server run\nadds NO authority beyond that triad needs no hand-written wrapper.\n\nServer-only AUTHORITY the client cannot predict (a title guard, an owner-gated cascade, a\n`NOT EXISTS` dedup) stays an explicit {@link ApiMutator} that OVERRIDES the auto-wrapped default —\nspread this first, then the overrides win by key:\n\n```ts\nmutators: defineApiMutators({\n  ...sharedApiMutators(sharedMutators, (ctx) => ({ user: requireUser(ctx.user) })),\n  createIssue: withTitleGuard(sharedMutators.createIssue), // + server-only policy\n  deleteIssue: async (tx, raw, ctx) => { ... },            // raw owner-gated cascade\n}),\n```","source":"packages/api-server/src/index.ts","line":2425,"href":"/reference/typescript/api-server/#symbol-sharedApiMutators"},{"name":"SharedMutator","originalName":"SharedMutator","kind":"TypeAliasDeclaration","signature":"/** A generator (isomorphic) mutator, shared verbatim by both tiers: the client trusts typed `args`,\n *  the server parses untrusted args into `Args` before invoking. */\nexport type SharedMutator<Args, Ctx extends MutatorCtx = MutatorCtx> = (tx: IsoTx, args: Args, ctx: Ctx) => MutationGen;","description":"A generator (isomorphic) mutator, shared verbatim by both tiers: the client trusts typed `args`,\nthe server parses untrusted args into `Args` before invoking.","source":"packages/client/src/mutation-ops.ts","line":152,"href":"/reference/typescript/api-server/#symbol-SharedMutator"},{"name":"SharedMutatorWithArgs","originalName":"SharedMutatorWithArgs","kind":"TypeAliasDeclaration","signature":"/** A shared mutator that CARRIES its own arg validator, co-located at the def site (`shared(schema,\n *  gen)`). The client registers it exactly like a bare generator mutator — the `.args` validator is\n *  inert there (typed callsites skip the parse); the server ({@link runSharedMutation}, via the\n *  api-server's `sharedApiMutators`) reads `.args` to parse untrusted wire args before driving the\n *  SAME body. */\nexport type SharedMutatorWithArgs<Args, Ctx extends MutatorCtx = MutatorCtx> = SharedMutator<Args, Ctx> & {\n    args: ArgSchema<Args>;\n};","description":"A shared mutator that CARRIES its own arg validator, co-located at the def site (`shared(schema,\ngen)`). The client registers it exactly like a bare generator mutator — the `.args` validator is\ninert there (typed callsites skip the parse); the server ({@link runSharedMutation }, via the\napi-server's `sharedApiMutators`) reads `.args` to parse untrusted wire args before driving the\nSAME body.","source":"packages/client/src/mutation-ops.ts","line":170,"href":"/reference/typescript/api-server/#symbol-SharedMutatorWithArgs"},{"name":"spliceStreamText","originalName":"spliceStreamText","kind":"FunctionDeclaration","signature":"/**\n * Merge the durable plane with the live tail.\n *\n * `durable` is what the IVM view shows; `produced` is what a subscription has accumulated (the prefix\n * it joined at, plus every `chunk`). Both are prefixes of the same response, so the merge is \"take\n * the longer\" — no diffing, no overlap handling, no ranges.\n *\n * The length comparison is the whole algorithm, which is why a caller MUST seed its accumulator with\n * the text it joined at: a tail carrying only the chunks it received would read as shorter than the\n * durable text and be discarded. `useStreamedText` does that for you.\n */\nexport declare function spliceStreamText(durable: string, produced: string): string;","description":"Merge the durable plane with the live tail.\n\n`durable` is what the IVM view shows; `produced` is what a subscription has accumulated (the prefix\nit joined at, plus every `chunk`). Both are prefixes of the same response, so the merge is \"take\nthe longer\" — no diffing, no overlap handling, no ranges.\n\nThe length comparison is the whole algorithm, which is why a caller MUST seed its accumulator with\nthe text it joined at: a tail carrying only the chunks it received would read as shorter than the\ndurable text and be discarded. `useStreamedText` does that for you.","source":"packages/client/src/stream.ts","line":75,"href":"/reference/typescript/api-server/#symbol-spliceStreamText"},{"name":"SplitDaemonClient","originalName":"SplitDaemonClient","kind":"ClassDeclaration","signature":"/**\n * A read/write-split `RindleDaemonClient` (READ-ROUTER-DESIGN.md §2.1). Writes\n * (`executeSqlTxn` / `rejectMutation` / `applyRowChangeTxn` / `migrate`) go to the single\n * write-master, UNCHANGED and never through the router; reads (`materialize` / `query` /\n * `dematerialize`, and raw `executeSqlRead`) go to the read router. Raw reads default to a replica\n * (`consistency:\"eventual\"`) so they scale off the write-master; pass `consistency:\"strong\"` on a\n * read to route it to the master for read-your-writes after a write to the same data. Hand one of\n * these to {@link createRindleApiServer} as `daemon` to point the reads leg at the router while\n * writes stay on the master — no placement logic enters the api-server.\n *\n * ```ts\n * const daemon = new SplitDaemonClient(\n *   new HttpRindleDaemonClient({ baseUrl: MASTER_URL, headers: writeAuth }),  // writes → master\n *   new HttpRindleDaemonClient({ baseUrl: ROUTER_URL, headers: routerAuth }), // reads  → router\n * );\n * ```\n */\nexport declare class SplitDaemonClient implements RindleDaemonClient {\n    private readonly writes;\n    private readonly reads;\n    constructor(writes: RindleDaemonClient, reads: RindleDaemonClient);\n    executeSqlTxn(input: SqlTxn): Promise<SqlTxnOutput>;\n    executeSqlRead(input: SqlRead): Promise<SqlReadOutput>;\n    rejectMutation(input: MutationRejection): Promise<MutationRejectionOutput>;\n    beginMutationSession(input: MutationSessionBegin): Promise<MutationSessionBeginOutput>;\n    execInMutationSession(input: MutationSessionExec): Promise<unknown>;\n    queryInMutationSession(input: MutationSessionQuery): Promise<SqlReadOutput>;\n    commitMutationSession(input: MutationSessionRef): Promise<SqlTxnOutput>;\n    rollbackMutationSession(input: MutationSessionRef): Promise<unknown>;\n    applyRowChangeTxn(input: RowChangeTxn): Promise<RowChangeTxnOutput>;\n    claimRoomEpoch(input: ClaimRoomEpochInput): Promise<ClaimRoomEpochOutput>;\n    roomLmids(input: RoomLmidsInput): Promise<RoomLmidsOutput>;\n    migrate(input: MigrateInput): Promise<MigrateOutput>;\n    materialize(input: MaterializeInput): Promise<MaterializeOutput>;\n    query(input: QueryOnceInput): Promise<QueryOnceOutput>;\n    dematerialize(input: DematerializeInput): Promise<DematerializeOutput>;\n}","description":"A read/write-split `RindleDaemonClient` (READ-ROUTER-DESIGN.md §2.1). Writes\n(`executeSqlTxn` / `rejectMutation` / `applyRowChangeTxn` / `migrate`) go to the single\nwrite-master, UNCHANGED and never through the router; reads (`materialize` / `query` /\n`dematerialize`, and raw `executeSqlRead`) go to the read router. Raw reads default to a replica\n(`consistency:\"eventual\"`) so they scale off the write-master; pass `consistency:\"strong\"` on a\nread to route it to the master for read-your-writes after a write to the same data. Hand one of\nthese to {@link createRindleApiServer} as `daemon` to point the reads leg at the router while\nwrites stay on the master — no placement logic enters the api-server.\n\n```ts\nconst daemon = new SplitDaemonClient(\n  new HttpRindleDaemonClient({ baseUrl: MASTER_URL, headers: writeAuth }),  // writes → master\n  new HttpRindleDaemonClient({ baseUrl: ROUTER_URL, headers: routerAuth }), // reads  → router\n);\n```","source":"packages/api-server/src/index.ts","line":1137,"href":"/reference/typescript/api-server/#symbol-SplitDaemonClient"},{"name":"sqlBackend","originalName":"sqlBackend","kind":"FunctionDeclaration","signature":"/** Run API-server mutators through `@rindle/sql-client`'s explicit mutation facade. Query leases,\n * SSR reads and room control continue to use `daemon`; only authoritative mutation execution moves\n * to the versioned SQL transport. */\nexport declare function sqlBackend(sql: SqlSession): MutationBackend;","description":"Run API-server mutators through `@rindle/sql-client`'s explicit mutation facade. Query leases,\nSSR reads and room control continue to use `daemon`; only authoritative mutation execution moves\nto the versioned SQL transport.","source":"packages/api-server/src/index.ts","line":2172,"href":"/reference/typescript/api-server/#symbol-sqlBackend"},{"name":"SqlDialect","originalName":"SqlDialect","kind":"InterfaceDeclaration","signature":"/** A SQL dialect for the logical mutation renderer. */\nexport interface SqlDialect {\n    readonly name: \"sqlite\" | \"postgres\";\n    /** Render the i-th (1-based) bind placeholder. sqlite: `?`; postgres: `$i`. */\n    placeholder(oneBased: number): string;\n    /** Optional value coercion hook (e.g. a future SQLite `0/1` boolean). Default: identity. */\n    encodeValue?(v: WireValue, type: ColType): WireValue;\n}","description":"A SQL dialect for the logical mutation renderer.","source":"packages/api-server/src/index.ts","line":1224,"href":"/reference/typescript/api-server/#symbol-SqlDialect"},{"name":"sqliteDialect","originalName":"sqliteDialect","kind":"VariableDeclaration","signature":"export declare const sqliteDialect: SqlDialect;","description":"","source":"packages/api-server/src/index.ts","line":1232,"href":"/reference/typescript/api-server/#symbol-sqliteDialect"},{"name":"SqlMutationTx","originalName":"SqlMutationTx","kind":"InterfaceDeclaration","signature":"/** The raw-SQL escape hatch for relational/authority statements a keyed op can't express — an\n *  owner-gated cascade, a `NOT EXISTS` dedup. Prefer `tx.sql`; `exec` remains the synchronous\n *  compatibility shorthand for a queued `tx.sql.execute`, and `statements` is the raw write list. */\nexport interface SqlMutationTx {\n    readonly sql: ServerSql;\n    exec(sql: string, params?: WireValue[]): void;\n    readonly statements: readonly SqlStatement[];\n}","description":"The raw-SQL escape hatch for relational/authority statements a keyed op can't express — an\nowner-gated cascade, a `NOT EXISTS` dedup. Prefer `tx.sql`; `exec` remains the synchronous\ncompatibility shorthand for a queued `tx.sql.execute`, and `statements` is the raw write list.","source":"packages/api-server/src/index.ts","line":247,"href":"/reference/typescript/api-server/#symbol-SqlMutationTx"},{"name":"STREAM_SSE_HEADERS","originalName":"STREAM_SSE_HEADERS","kind":"VariableDeclaration","signature":"/** Headers for the SSE response. `x-accel-buffering` is the nginx-family opt-out — without it a\n *  buffering proxy holds the tokens and hands the user a paragraph at a time. */\nexport declare const STREAM_SSE_HEADERS: Record<string, string>;","description":"Headers for the SSE response. `x-accel-buffering` is the nginx-family opt-out — without it a\nbuffering proxy holds the tokens and hands the user a paragraph at a time.","source":"packages/api-server/src/streams.ts","line":1652,"href":"/reference/typescript/api-server/#symbol-STREAM_SSE_HEADERS"},{"name":"STREAM_STATUS_STREAMING","originalName":"STREAM_STATUS_STREAMING","kind":"VariableDeclaration","signature":"/** The value in the mapped status column while a stream is live. */\nexport declare const STREAM_STATUS_STREAMING = \"streaming\";","description":"The value in the mapped status column while a stream is live.","source":"packages/client/src/stream.ts","line":22,"href":"/reference/typescript/api-server/#symbol-STREAM_STATUS_STREAMING"},{"name":"StreamCheckpointPolicy","originalName":"StreamCheckpointPolicy","kind":"InterfaceDeclaration","signature":"/** When a checkpoint fires — the FIRST of these wins (§3.1). Checkpoints are serialized, so a slow\n *  store degrades to fewer, larger checkpoints, never to a queue of them. */\nexport interface StreamCheckpointPolicy {\n    /** Produced-but-uncommitted characters that force a checkpoint. Default 512. */\n    chars?: number;\n    /** Milliseconds since the last checkpoint that force one. Default 750. */\n    intervalMs?: number;\n    /** Retries for a failing commit before the slice is left for the next trigger. Default 3. */\n    retries?: number;\n}","description":"When a checkpoint fires — the FIRST of these wins (§3.1). Checkpoints are serialized, so a slow\nstore degrades to fewer, larger checkpoints, never to a queue of them.","source":"packages/api-server/src/streams.ts","line":160,"href":"/reference/typescript/api-server/#symbol-StreamCheckpointPolicy"},{"name":"StreamCheckpointTarget","originalName":"StreamCheckpointTarget","kind":"TypeAliasDeclaration","signature":"export type StreamCheckpointTarget = {\n    tables: StreamTables;\n} | {\n    commit: StreamCommit;\n};","description":"","source":"packages/api-server/src/streams.ts","line":154,"href":"/reference/typescript/api-server/#symbol-StreamCheckpointTarget"},{"name":"streamChunkId","originalName":"streamChunkId","kind":"FunctionDeclaration","signature":"/** The chunk row's deterministic id: a replayed checkpoint collides with itself and is absorbed by\n *  `ON CONFLICT DO NOTHING` — idempotency without an envelope or a dedup ledger (§3.3). */\nexport declare function streamChunkId(streamId: string, seq: number): string;","description":"The chunk row's deterministic id: a replayed checkpoint collides with itself and is absorbed by\n`ON CONFLICT DO NOTHING` — idempotency without an envelope or a dedup ledger (§3.3).","source":"packages/api-server/src/streams.ts","line":397,"href":"/reference/typescript/api-server/#symbol-streamChunkId"},{"name":"streamChunkTableDdl","originalName":"streamChunkTableDdl","kind":"FunctionDeclaration","signature":"/**\n * The chunk table's DDL, for the app's migration. The app owns the message table (this only states\n * the three columns the plane needs on it); the chunk table is entirely protocol-shaped, so it is\n * generated rather than hand-written.\n */\nexport declare function streamChunkTableDdl(tables: StreamTables, dialect: SqlDialect): string[];","description":"The chunk table's DDL, for the app's migration. The app owns the message table (this only states\nthe three columns the plane needs on it); the chunk table is entirely protocol-shaped, so it is\ngenerated rather than hand-written.","source":"packages/api-server/src/streams.ts","line":406,"href":"/reference/typescript/api-server/#symbol-streamChunkTableDdl"},{"name":"StreamColumns","originalName":"StreamColumns","kind":"InterfaceDeclaration","signature":"/** Which columns of the app's own tables the plane reads and writes. Every entry has a default\n *  except `cancel`, `error`, and `host`, which are opt-in BY NAMING: the plane never emits SQL\n *  against a column the app did not ask it to use. */\nexport interface StreamColumns {\n    /** The message row's primary key, matched against `streamId`. Default `id`. */\n    key?: string;\n    /** The compacted response text. Default `body`. */\n    body?: string;\n    /** {@link STREAM_STATUS_STREAMING} then a {@link StreamStatus}. Default `status`. */\n    status?: string;\n    /** Total durable length — `length(body) + Σ chunk lengths`. The CAS column (§3.2). Default `seq`. */\n    seq?: string;\n    /** Opt-in (§6): a truthy value here stops the generation at the next checkpoint. No default —\n     *  naming it is what turns cancellation on. */\n    cancel?: string;\n    /** Opt-in: where a failed generation's message is recorded. No default. */\n    error?: string;\n    /** Opt-in: where the open write records this producer's identity ({@link RindleStreamOptions.hostId}).\n     *  Naming it upgrades the row-level single-flight guard from check-then-act to a true\n     *  compare-and-swap — the open write turns conditional and a read-back names the winner (§5.1) —\n     *  and gives multi-instance subscribe routing a column to read (§4). No default. */\n    host?: string;\n    /** Chunk primary key; the plane writes the deterministic `\"<streamId>:<seq>\"`. Default `id`. */\n    chunkKey?: string;\n    /** Chunk → message reference. Default `streamId`. */\n    chunkStream?: string;\n    /** The chunk's END offset — the ordering key. Default `seq`. */\n    chunkSeq?: string;\n    /** The chunk's slice of the response. Default `text`. */\n    chunkText?: string;\n}","description":"Which columns of the app's own tables the plane reads and writes. Every entry has a default\nexcept `cancel`, `error`, and `host`, which are opt-in BY NAMING: the plane never emits SQL\nagainst a column the app did not ask it to use.","source":"packages/api-server/src/streams.ts","line":92,"href":"/reference/typescript/api-server/#symbol-StreamColumns"},{"name":"StreamCommit","originalName":"StreamCommit","kind":"TypeAliasDeclaration","signature":"/** The escape hatch: persist the checkpoint however the app likes. Retried on throw (§3.3), so it\n *  must be idempotent under a repeated `(from, seq)` — AND under a RE-COVER: an append whose write\n *  committed but whose ack was lost leaves the plane believing less than the store holds, so the\n *  next append's `(from, seq)` can OVERLAP text already applied. Apply only the unseen suffix\n *  (`text.slice(applied - from)` when `applied > from`), or better, return `{seq: applied}` — the\n *  authoritative applied length — and the plane resynchronizes instead of re-covering at all.\n *  Return `{cancelRequested: true}` to tell the producer the reader asked it to stop (§6). */\nexport type StreamCommit = (input: StreamCommitInput) => Promise<void | {\n    cancelRequested?: boolean;\n    seq?: number;\n}>;","description":"The escape hatch: persist the checkpoint however the app likes. Retried on throw (§3.3), so it\nmust be idempotent under a repeated `(from, seq)` — AND under a RE-COVER: an append whose write\ncommitted but whose ack was lost leaves the plane believing less than the store holds, so the\nnext append's `(from, seq)` can OVERLAP text already applied. Apply only the unseen suffix\n(`text.slice(applied - from)` when `applied > from`), or better, return `{seq: applied}` — the\nauthoritative applied length — and the plane resynchronizes instead of re-covering at all.\nReturn `{cancelRequested: true}` to tell the producer the reader asked it to stop (§6).","source":"packages/api-server/src/streams.ts","line":85,"href":"/reference/typescript/api-server/#symbol-StreamCommit"},{"name":"StreamCommitInput","originalName":"StreamCommitInput","kind":"TypeAliasDeclaration","signature":"/** What a checkpoint hands the durable plane when the app supplies its own {@link StreamCommit}. */\nexport type StreamCommitInput = \n/** The pointer is marked live. The app's own mutator created the row (it owns `chatId`, `role`,\n *  the model name…); this only flips it to `streaming`. */\n{\n    kind: \"open\";\n    streamId: string;\n    meta: unknown;\n    hostId?: string;\n    startedAt: number;\n}\n/** A prefix advance carrying ONLY its own slice. `text.length === seq - from`, and `from` is the\n *  last append the PLANE saw confirmed — so appends are contiguous in the fault-free run, but an\n *  append that committed while its ack was lost makes the next one RE-COVER (its `from` lags what\n *  the app already applied). See {@link StreamCommit} for the two ways to stay idempotent. */\n | {\n    kind: \"append\";\n    streamId: string;\n    from: number;\n    seq: number;\n    text: string;\n}\n/** The seal. `body` is the producer's retained text and `bodyFrom` its absolute start offset:\n *  `bodyFrom === 0` — and `body` is the WHOLE response — unless the app opted into trimming via\n *  `retainChars` (`commit` mode only). A compacting app requires `bodyFrom === 0` and writes\n *  `body` wholesale; a non-compacting app appends the outstanding tail —\n *  `body.slice(from - bodyFrom)` — as a final chunk. `seq === bodyFrom + body.length`, always. */\n | {\n    kind: \"close\";\n    streamId: string;\n    from: number;\n    seq: number;\n    body: string;\n    bodyFrom: number;\n    status: StreamStatus;\n    error?: string;\n};","description":"What a checkpoint hands the durable plane when the app supplies its own {@link StreamCommit}.","source":"packages/api-server/src/streams.ts","line":62,"href":"/reference/typescript/api-server/#symbol-StreamCommitInput"},{"name":"StreamFrame","originalName":"StreamFrame","kind":"TypeAliasDeclaration","signature":"/**\n * One frame of a subscription. A subscription always begins with `open` and always ends with exactly\n * one terminal frame — `end`, `stale`, or `absent` — after which the iterator completes.\n *\n * `stale` and `absent` are the two \"you are on the durable plane now\" answers, and both are SAFE:\n * the store holds everything below `floorSeq` and everything through `durableSeq`, so the reader's\n * IVM view converges without the stream. Neither is an error.\n */\nexport type StreamFrame = \n/** Join accepted. `from` is the (clamped) offset the replay starts at. */\n{\n    type: \"open\";\n    streamId: string;\n    from: number;\n    seq: number;\n    durableSeq: number;\n    ended: boolean;\n}\n/** PRODUCED text — not a durability claim. `text.length === seq - from`, always. */\n | {\n    type: \"chunk\";\n    from: number;\n    seq: number;\n    text: string;\n}\n/** The store now holds the prefix through `seq`. */\n | {\n    type: \"durable\";\n    seq: number;\n}\n/** Sealed. No further frames. */\n | {\n    type: \"end\";\n    seq: number;\n    status: StreamStatus;\n    error?: string;\n}\n/** `from` is below the producer's retained buffer floor (or the subscriber fell too far behind):\n *  read the store. (A raw `EventSource` rejoins automatically on its reconnect; `useStreamedText`\n *  deliberately stays on the durable plane instead — correct, at checkpoint granularity.) */\n | {\n    type: \"stale\";\n    floorSeq: number;\n    durableSeq: number;\n}\n/** The process serving this subscribe is not hosting the stream (wrong instance, already evicted,\n *  or it never existed): the store is the whole truth. */\n | {\n    type: \"absent\";\n};","description":"One frame of a subscription. A subscription always begins with `open` and always ends with exactly\none terminal frame — `end`, `stale`, or `absent` — after which the iterator completes.\n\n`stale` and `absent` are the two \"you are on the durable plane now\" answers, and both are SAFE:\nthe store holds everything below `floorSeq` and everything through `durableSeq`, so the reader's\nIVM view converges without the stream. Neither is an error.","source":"packages/client/src/stream.ts","line":32,"href":"/reference/typescript/api-server/#symbol-StreamFrame"},{"name":"streamFramesToSse","originalName":"streamFramesToSse","kind":"FunctionDeclaration","signature":"/**\n * Encode a subscription as an SSE body. Each positional frame carries `id: <seq>`, so a browser\n * `EventSource` that drops the connection resumes at exactly the right offset with no application\n * code — its own `Last-Event-ID` header is the `from` of the next subscribe ({@link\n * streamRequestFromHttp}).\n *\n * The reader must close the `EventSource` on the `end` frame: `EventSource` reconnects on ANY close,\n * including a clean one.\n */\nexport declare function streamFramesToSse(sub: StreamSubscription, opts?: {\n    keepAliveMs?: number;\n}): ReadableStream<Uint8Array>;","description":"Encode a subscription as an SSE body. Each positional frame carries `id: <seq>`, so a browser\n`EventSource` that drops the connection resumes at exactly the right offset with no application\ncode — its own `Last-Event-ID` header is the `from` of the next subscribe ({@link * streamRequestFromHttp}).\n\nThe reader must close the `EventSource` on the `end` frame: `EventSource` reconnects on ANY close,\nincluding a clean one.","source":"packages/api-server/src/streams.ts","line":1683,"href":"/reference/typescript/api-server/#symbol-streamFramesToSse"},{"name":"StreamHandle","originalName":"StreamHandle","kind":"InterfaceDeclaration","signature":"/** The producer's handle (§2). One writer per stream, by construction. */\nexport interface StreamHandle {\n    readonly streamId: string;\n    /** Total produced code units. */\n    readonly seq: number;\n    /** Total code units the store has committed. Never exceeds {@link seq} (contract P). */\n    readonly durableSeq: number;\n    /** True once a checkpoint round-trip has seen the reader's cancel flag (§6). `pump` stops on it;\n     *  a hand-rolled generation loop should check it. */\n    readonly cancelled: boolean;\n    /** Append a delta: fanned to subscribers synchronously, checkpointed on policy. */\n    push(text: string): void;\n    /** Force a checkpoint and resolve once the store holds every character produced so far. This is\n     *  the ORDERING primitive: `await flush()` before writing a discrete row (a tool call, a stop\n     *  reason) so the text precedes it in the store (§1). Rejects if the checkpoint cannot commit. */\n    flush(): Promise<number>;\n    /** Drain a delta iterable into the stream (the shape every LLM SDK's text stream already has),\n     *  stopping early — and closing the iterator, which aborts the underlying request — once the\n     *  reader has cancelled. */\n    pump(deltas: AsyncIterable<string>): Promise<void>;\n    /** Seal the stream: `cancelled` if the reader asked it to stop, else `complete`. In `tables` mode\n     *  this is the compaction (§3.4) — it writes the whole body and drops the chunk rows in one\n     *  transaction, so it also REPAIRS any checkpoint that failed along the way. */\n    close(): Promise<void>;\n    /** Seal `error` at whatever was produced. Never throws for the reason it is sealing. */\n    fail(error: unknown): Promise<void>;\n}","description":"The producer's handle (§2). One writer per stream, by construction.","source":"packages/api-server/src/streams.ts","line":271,"href":"/reference/typescript/api-server/#symbol-StreamHandle"},{"name":"StreamOpenRefused","originalName":"StreamOpenRefused","kind":"ClassDeclaration","signature":"/** The open probe's verdict: the message row is missing or already advanced. Not retried — it is a\n *  settled statement about the app's data, and retrying re-asks a question already answered. */\nexport declare class StreamOpenRefused extends Error {\n    constructor(message: string);\n}","description":"The open probe's verdict: the message row is missing or already advanced. Not retried — it is a\nsettled statement about the app's data, and retrying re-asks a question already answered.","source":"packages/api-server/src/streams.ts","line":1595,"href":"/reference/typescript/api-server/#symbol-StreamOpenRefused"},{"name":"StreamRelay","originalName":"StreamRelay","kind":"InterfaceDeclaration","signature":"/**\n * Optional cross-process transport for the LIVE plane\n * (designs-implemented/LM-STREAM-RELAY-DESIGN.md). Both methods are independently optional; which\n * ones you implement is which topology you built — an addressing adapter (a Durable Object named by\n * `streamId`, `fly-replay`) implements only `attach`; a broadcast adapter (Redis pub/sub, NATS)\n * mirrors with `publish` and subscribes with `attach`; a log adapter (Redis Streams, Kafka) appends\n * and replays. Never consulted for the durable plane — checkpoints are unaffected by any of this.\n *\n * The plane does not trust what `attach` yields: frames are run through the conform pass\n * ({@link StreamRelayConform}) and any contract violation downgrades the subscription to `stale`,\n * which already means \"you are on the durable plane now\". A broken relay costs a reader smooth\n * tokens, never corrupted text — and can never reach the producer.\n */\nexport interface StreamRelay {\n    /** Producer side: every frame this process's producer fans out (`chunk`, `durable`, and the\n     *  terminal `end`), mirrored outward. MUST NOT block; a throw or rejected promise is caught and\n     *  routed to {@link RindleStreamOptions.onRelayError} — a relay outage may cost the live leg,\n     *  never the generation. Returned promises are observed but never awaited. */\n    publish?(streamId: string, frame: StreamFrame): void | PromiseLike<void>;\n    /** Subscriber side: this process is not hosting `streamId`. Return a frame source, or `undefined`\n     *  for `absent` — exactly the no-relay answer. Consulted only AFTER `authorize` has passed, and\n     *  only on a live-plane miss (a local stream always wins). The plane closes the source\n     *  (`return()`) when the reader disconnects. An adapter that cannot serve `from` (pub/sub has no\n     *  history) yields `stale` and stops — the reader converges on the durable plane (§5). */\n    attach?(streamId: string, from: number): Promise<AsyncIterable<StreamFrame> | undefined>;\n}","description":"Optional cross-process transport for the LIVE plane\n(designs-implemented/LM-STREAM-RELAY-DESIGN.md). Both methods are independently optional; which\nones you implement is which topology you built — an addressing adapter (a Durable Object named by\n`streamId`, `fly-replay`) implements only `attach`; a broadcast adapter (Redis pub/sub, NATS)\nmirrors with `publish` and subscribes with `attach`; a log adapter (Redis Streams, Kafka) appends\nand replays. Never consulted for the durable plane — checkpoints are unaffected by any of this.\n\nThe plane does not trust what `attach` yields: frames are run through the conform pass\n({@link StreamRelayConform}) and any contract violation downgrades the subscription to `stale`,\nwhich already means \"you are on the durable plane now\". A broken relay costs a reader smooth\ntokens, never corrupted text — and can never reach the producer.","source":"packages/api-server/src/streams.ts","line":193,"href":"/reference/typescript/api-server/#symbol-StreamRelay"},{"name":"StreamRelayConform","originalName":"StreamRelayConform","kind":"ClassDeclaration","signature":"/**\n * One frame source arriving over a relay, conformed to the CP §4 contract\n * (designs-implemented/LM-STREAM-RELAY-DESIGN.md §4).\n *\n * An adapter is app code talking to Redis or a socket, and its frames feed `spliceStreamText` on a\n * browser — so the plane does not trust them. This pass enforces the frame invariants against the\n * prefix actually delivered and downgrades EVERY violation to a legal `stale` and nothing else:\n * `stale` already means \"you are on the durable plane now, the store is the whole truth\", so a\n * broken relay costs a reader smooth tokens, never corrupted text — and cannot wedge a producer.\n *\n * Replayed spans (a reconnecting adapter re-delivering what it already sent) are ABSORBED rather\n * than punished — deduping against the delivered prefix is what makes reconnect-replay safe without\n * every adapter hand-rolling it. Spans that overlap the prefix but extend past it pass through\n * whole: the client splices at the frame's own offset, so an exact overlap re-covers and appends.\n *\n * Pure state, no I/O, no plane: `feed` maps one incoming frame to 0-2 outgoing frames (a missing\n * `open` is synthesized at the join offset); `end`/`fail` close out a source that finished or threw\n * without a terminal. After a terminal, every method returns `[]`.\n */\nexport declare class StreamRelayConform {\n    private readonly streamId;\n    /** The requested join offset — the synthesized `open`'s position, and where the prefix starts. */\n    private readonly from;\n    private readonly onViolation;\n    /** End of the delivered prefix. */\n    private pos;\n    private lastDurable;\n    private opened;\n    private done;\n    constructor(streamId: string, from: number, onViolation?: (reason: string) => void);\n    feed(frame: StreamFrame): StreamFrame[];\n    /** The source completed without a terminal (a truncated relay): the reader falls back. */\n    end(): StreamFrame[];\n    /** The source threw mid-iteration, or the plane is dropping a reader that stopped draining:\n     *  a bare `stale` at the delivered position. */\n    fail(): StreamFrame[];\n    /** A synthesized join, for an adapter that (correctly, in broadcast mode) never mirrors the\n     *  per-subscriber `open`: positioned at the requested offset, which the reader asked from because\n     *  its durable view already holds it. */\n    private synthOpen;\n    private terminate;\n    private violate;\n}","description":"One frame source arriving over a relay, conformed to the CP §4 contract\n(designs-implemented/LM-STREAM-RELAY-DESIGN.md §4).\n\nAn adapter is app code talking to Redis or a socket, and its frames feed `spliceStreamText` on a\nbrowser — so the plane does not trust them. This pass enforces the frame invariants against the\nprefix actually delivered and downgrades EVERY violation to a legal `stale` and nothing else:\n`stale` already means \"you are on the durable plane now, the store is the whole truth\", so a\nbroken relay costs a reader smooth tokens, never corrupted text — and cannot wedge a producer.\n\nReplayed spans (a reconnecting adapter re-delivering what it already sent) are ABSORBED rather\nthan punished — deduping against the delivered prefix is what makes reconnect-replay safe without\nevery adapter hand-rolling it. Spans that overlap the prefix but extend past it pass through\nwhole: the client splices at the frame's own offset, so an exact overlap re-covers and appends.\n\nPure state, no I/O, no plane: `feed` maps one incoming frame to 0-2 outgoing frames (a missing\n`open` is synthesized at the join offset); `end`/`fail` close out a source that finished or threw\nwithout a terminal. After a terminal, every method returns `[]`.","source":"packages/api-server/src/streams.ts","line":639,"href":"/reference/typescript/api-server/#symbol-StreamRelayConform"},{"name":"StreamRelayErrorInfo","originalName":"StreamRelayErrorInfo","kind":"InterfaceDeclaration","signature":"export interface StreamRelayErrorInfo {\n    streamId: string;\n    /** Where it failed: mirroring a frame out (`publish`), dialing the adapter (`attach`), or\n     *  consuming/conforming its frames (`frames`). */\n    phase: \"publish\" | \"attach\" | \"frames\";\n}","description":"","source":"packages/api-server/src/streams.ts","line":207,"href":"/reference/typescript/api-server/#symbol-StreamRelayErrorInfo"},{"name":"streamRequestFromHttp","originalName":"streamRequestFromHttp","kind":"FunctionDeclaration","signature":"/** Pull a subscribe request out of a fetch-style GET: `?streamId=…&from=…`, with `Last-Event-ID`\n *  winning over an explicit `from` (a reconnecting `EventSource` knows better than its own URL —\n *  the URL is the ORIGINAL join point, the header is where it actually got to). */\nexport declare function streamRequestFromHttp(req: {\n    url: string;\n    headers: {\n        get(name: string): string | null;\n    };\n}): {\n    streamId: string;\n    from: number;\n};","description":"Pull a subscribe request out of a fetch-style GET: `?streamId=…&from=…`, with `Last-Event-ID`\nwinning over an explicit `from` (a reconnecting `EventSource` knows better than its own URL —\nthe URL is the ORIGINAL join point, the header is where it actually got to).","source":"packages/api-server/src/streams.ts","line":1662,"href":"/reference/typescript/api-server/#symbol-streamRequestFromHttp"},{"name":"StreamStatus","originalName":"StreamStatus","kind":"TypeAliasDeclaration","signature":"/**\n * How a stream ended.\n * - `complete` — the model finished.\n * - `cancelled` — the reader asked it to stop and the producer honoured it.\n * - `error` — the generation threw.\n * - `interrupted` — the host went away mid-generation. The one status that implies the store may be\n *   short of what was produced.\n */\nexport type StreamStatus = \"complete\" | \"cancelled\" | \"error\" | \"interrupted\";","description":"How a stream ended.\n- `complete` — the model finished.\n- `cancelled` — the reader asked it to stop and the producer honoured it.\n- `error` — the generation threw.\n- `interrupted` — the host went away mid-generation. The one status that implies the store may be\n  short of what was produced.","source":"packages/client/src/stream.ts","line":19,"href":"/reference/typescript/api-server/#symbol-StreamStatus"},{"name":"StreamSubscription","originalName":"StreamSubscription","kind":"InterfaceDeclaration","signature":"export interface StreamSubscription {\n    readonly streamId: string;\n    /** Terminates after exactly one of `end` / `stale` / `absent`. */\n    readonly frames: AsyncIterable<StreamFrame>;\n    /** Detach early (a disconnected client). Idempotent. */\n    close(): void;\n}","description":"","source":"packages/api-server/src/streams.ts","line":307,"href":"/reference/typescript/api-server/#symbol-StreamSubscription"},{"name":"StreamTables","originalName":"StreamTables","kind":"InterfaceDeclaration","signature":"/**\n * The app's tables (§5). The app authors and migrates BOTH — the message row is unambiguously\n * app-owned (it has `chatId`, `role`, token counts) and the chunk row must be reachable from the\n * app's own query as a `related` subquery, which a Rindle system table would make awkward. The plane\n * only needs to be told where things live. Use {@link streamChunkTableDdl} for the chunk table's\n * migration.\n *\n * The message table carries WHATEVER ELSE the app wants; the plane's hard requirements are only:\n *\n * | mapped column | requirement | why |\n * | --- | --- | --- |\n * | `key`    | UNIQUE (normally the pk) | every checkpoint targets one row by it |\n * | `seq`    | integer, **NOT NULL DEFAULT 0** | the CAS column — nothing matches NULL (§3.2) |\n * | `body`   | text, empty at open | compaction overwrites it with the whole response |\n * | `status` | text accepting `streaming`/`complete`/`cancelled`/`error`/`interrupted` | a CHECK\n *              constraint that omits one of these turns a seal into an infra failure |\n * | `cancel` | truthy-readable, if mapped | read on the checkpoint round-trip (§6) |\n * | `error`  | nullable text, if mapped | compaction writes `NULL` when there is no error |\n * | `host`   | text, if mapped | written at open with the producer's token; the read-back decides the open race (§5.1) |\n *\n * `body` is PLANE-OWNED and always a bare string. Rich content (an array of content blocks, tool\n * calls, attachments) belongs in SIBLING columns the app's own mutators write — `flush()` orders the\n * text before them. For genuinely multi-block streaming, point `message` at a per-BLOCK table\n * instead: `streamId` is just an app key, so one stream per block needs nothing from this plane.\n */\nexport interface StreamTables {\n    /** The app's message table. Must already contain the row when {@link StreamPlane.open} runs. */\n    message: string;\n    /** The append-only chunk table. */\n    chunks: string;\n    columns?: StreamColumns;\n}","description":"The app's tables (§5). The app authors and migrates BOTH — the message row is unambiguously\napp-owned (it has `chatId`, `role`, token counts) and the chunk row must be reachable from the\napp's own query as a `related` subquery, which a Rindle system table would make awkward. The plane\nonly needs to be told where things live. Use {@link streamChunkTableDdl} for the chunk table's\nmigration.\n\nThe message table carries WHATEVER ELSE the app wants; the plane's hard requirements are only:\n\n| mapped column | requirement | why |\n| --- | --- | --- |\n| `key`    | UNIQUE (normally the pk) | every checkpoint targets one row by it |\n| `seq`    | integer, **NOT NULL DEFAULT 0** | the CAS column — nothing matches NULL (§3.2) |\n| `body`   | text, empty at open | compaction overwrites it with the whole response |\n| `status` | text accepting `streaming`/`complete`/`cancelled`/`error`/`interrupted` | a CHECK\n             constraint that omits one of these turns a seal into an infra failure |\n| `cancel` | truthy-readable, if mapped | read on the checkpoint round-trip (§6) |\n| `error`  | nullable text, if mapped | compaction writes `NULL` when there is no error |\n| `host`   | text, if mapped | written at open with the producer's token; the read-back decides the open race (§5.1) |\n\n`body` is PLANE-OWNED and always a bare string. Rich content (an array of content blocks, tool\ncalls, attachments) belongs in SIBLING columns the app's own mutators write — `flush()` orders the\ntext before them. For genuinely multi-block streaming, point `message` at a per-BLOCK table\ninstead: `streamId` is just an app key, so one stream per block needs nothing from this plane.","source":"packages/api-server/src/streams.ts","line":146,"href":"/reference/typescript/api-server/#symbol-StreamTables"},{"name":"SubscribeStreamInput","originalName":"SubscribeStreamInput","kind":"InterfaceDeclaration","signature":"export interface SubscribeStreamInput<User> {\n    user: User;\n    streamId: string;\n    /** \"I already have this many characters\" — from the client's IVM view, or a `Last-Event-ID`.\n     *  A non-negative integer; default 0. */\n    from?: number;\n    request?: unknown;\n}","description":"","source":"packages/api-server/src/streams.ts","line":298,"href":"/reference/typescript/api-server/#symbol-SubscribeStreamInput"},{"name":"TableRenderMeta","originalName":"TableRenderMeta","kind":"InterfaceDeclaration","signature":"/** Per-table metadata the renderer needs (all reachable from a `TableMeta`). */\nexport interface TableRenderMeta {\n    /** Columns in schema (wire) order — the stable INSERT column list + completeness check. */\n    columns: string[];\n    /** Primary-key column NAMES — the WHERE / ON CONFLICT target / SET partition. */\n    pkNames: string[];\n    /** Column name → declared type (only consulted by {@link SqlDialect.encodeValue}). */\n    types: Record<string, ColType>;\n    /** Columns a full insert must name — the non-nullable ones (design 206 §6.2). */\n    required: string[];\n    /** The nullable (omittable-to-null) columns — an omitted one binds `NULL` (design 206 §6.2). */\n    nullable: ReadonlySet<string>;\n}","description":"Per-table metadata the renderer needs (all reachable from a `TableMeta`).","source":"packages/api-server/src/index.ts","line":1236,"href":"/reference/typescript/api-server/#symbol-TableRenderMeta"},{"name":"verifyRoomFlushCredential","originalName":"verifyRoomFlushCredential","kind":"FunctionDeclaration","signature":"/** Verify a flush credential's MAC, then its claims; returns the payload or throws. The MAC is\n *  checked FIRST — no claim is trusted before it passes. */\nexport declare function verifyRoomFlushCredential(credential: string, shellSecret: string): Promise<RoomFlushCredentialPayload>;","description":"Verify a flush credential's MAC, then its claims; returns the payload or throws. The MAC is\nchecked FIRST — no claim is trusted before it passes.","source":"packages/api-server/src/index.ts","line":864,"href":"/reference/typescript/api-server/#symbol-verifyRoomFlushCredential"}]},{"name":"@rindle/cli","source":"packages/cli/src/index.ts","package":"@rindle/cli","symbols":[{"name":"Binary","originalName":"Binary","kind":"TypeAliasDeclaration","signature":"/** A native binary shipped by the Rindle development toolchain. */\nexport type Binary = \"rindle\" | \"rindled\" | \"rindle-replicator\" | \"rindle-dev-edge\";","description":"A native binary shipped by the Rindle development toolchain.","source":"packages/cli/src/platform.ts","line":15,"href":"/reference/typescript/cli/#symbol-Binary"},{"name":"binaryName","originalName":"binaryName","kind":"FunctionDeclaration","signature":"/** The on-disk filename of `bin` inside a platform package (`rindle` / `rindled.exe`). */\nexport declare function binaryName(bin: Binary, platform?: NodeJS.Platform): string;","description":"The on-disk filename of `bin` inside a platform package (`rindle` / `rindled.exe`).","source":"packages/cli/src/platform.ts","line":48,"href":"/reference/typescript/cli/#symbol-binaryName"},{"name":"binaryPath","originalName":"binaryPath","kind":"FunctionDeclaration","signature":"/**\n * Absolute path to a native Rindle toolchain binary for the current platform.\n *\n * Resolution order:\n *  1. The binary's explicit `*_BINARY_PATH` override.\n *  2. `RINDLE_BIN_DIR` — a directory holding the co-located toolchain. Point it at\n *     `target/release` after building the four binary crates and one env var lights up the fleet.\n *  3. The matching `@rindle/cli-<key>` optional dependency that npm/pnpm installed.\n *\n * Throws `UnsupportedPlatformError` for an un-targeted host, or a descriptive Error if the\n * platform package isn't installed (e.g. installed with `--no-optional`, or on a host the last\n * publish didn't target) and no override is set.\n */\nexport declare function binaryPath(bin: Binary): string;","description":"Absolute path to a native Rindle toolchain binary for the current platform.\n\nResolution order:\n 1. The binary's explicit `*_BINARY_PATH` override.\n 2. `RINDLE_BIN_DIR` — a directory holding the co-located toolchain. Point it at\n    `target/release` after building the four binary crates and one env var lights up the fleet.\n 3. The matching `@rindle/cli-<key>` optional dependency that npm/pnpm installed.\n\nThrows `UnsupportedPlatformError` for an un-targeted host, or a descriptive Error if the\nplatform package isn't installed (e.g. installed with `--no-optional`, or on a host the last\npublish didn't target) and no override is set.","source":"packages/cli/src/index.ts","line":49,"href":"/reference/typescript/cli/#symbol-binaryPath"},{"name":"Libc","originalName":"Libc","kind":"TypeAliasDeclaration","signature":"export type Libc = \"gnu\" | \"musl\";","description":"","source":"packages/cli/src/platform.ts","line":12,"href":"/reference/typescript/cli/#symbol-Libc"},{"name":"platformKey","originalName":"platformKey","kind":"FunctionDeclaration","signature":"/**\n * The package-name suffix identifying a build target for the current (or given) host:\n * `darwin-{arm64,x64}`, `linux-{x64,arm64}-{gnu,musl}`, `win32-x64-msvc`. Throws\n * `UnsupportedPlatformError` for a host we don't publish binaries for.\n */\nexport declare function platformKey(platform?: NodeJS.Platform, arch?: string, libc?: Libc): string;","description":"The package-name suffix identifying a build target for the current (or given) host:\n`darwin-{arm64,x64}`, `linux-{x64,arm64}-{gnu,musl}`, `win32-x64-msvc`. Throws\n`UnsupportedPlatformError` for a host we don't publish binaries for.","source":"packages/cli/src/platform.ts","line":22,"href":"/reference/typescript/cli/#symbol-platformKey"},{"name":"platformPackageName","originalName":"platformPackageName","kind":"FunctionDeclaration","signature":"/** The npm package name carrying the binaries for `key` (default: the current host's key). */\nexport declare function platformPackageName(key?: string): string;","description":"The npm package name carrying the binaries for `key` (default: the current host's key).","source":"packages/cli/src/platform.ts","line":43,"href":"/reference/typescript/cli/#symbol-platformPackageName"},{"name":"rindleBinaryPath","originalName":"rindleBinaryPath","kind":"FunctionDeclaration","signature":"/** Absolute path to the `rindle` CLI binary for the current platform. See {@link binaryPath}. */\nexport declare function rindleBinaryPath(): string;","description":"Absolute path to the `rindle` CLI binary for the current platform. See {@link binaryPath}.","source":"packages/cli/src/index.ts","line":88,"href":"/reference/typescript/cli/#symbol-rindleBinaryPath"},{"name":"rindledBinaryPath","originalName":"rindledBinaryPath","kind":"FunctionDeclaration","signature":"/** Absolute path to the `rindled` daemon binary for the current platform. See {@link binaryPath}. */\nexport declare function rindledBinaryPath(): string;","description":"Absolute path to the `rindled` daemon binary for the current platform. See {@link binaryPath}.","source":"packages/cli/src/index.ts","line":93,"href":"/reference/typescript/cli/#symbol-rindledBinaryPath"},{"name":"spawnBinary","originalName":"spawnBinary","kind":"FunctionDeclaration","signature":"/** Spawn `bin` with `args`, inheriting stdio by default. A thin wrapper over `child_process.spawn`. */\nexport declare function spawnBinary(bin: Binary, args?: string[], options?: SpawnOptions): ChildProcess;","description":"Spawn `bin` with `args`, inheriting stdio by default. A thin wrapper over `child_process.spawn`.","source":"packages/cli/src/index.ts","line":98,"href":"/reference/typescript/cli/#symbol-spawnBinary"},{"name":"spawnRindle","originalName":"spawnRindle","kind":"FunctionDeclaration","signature":"/** Spawn the `rindle` CLI with `args`. See {@link spawnBinary}. */\nexport declare function spawnRindle(args?: string[], options?: SpawnOptions): ChildProcess;","description":"Spawn the `rindle` CLI with `args`. See {@link spawnBinary}.","source":"packages/cli/src/index.ts","line":103,"href":"/reference/typescript/cli/#symbol-spawnRindle"},{"name":"spawnRindled","originalName":"spawnRindled","kind":"FunctionDeclaration","signature":"/** Spawn the `rindled` daemon with `args`, for embedding it in a Node supervisor. See {@link spawnBinary}. */\nexport declare function spawnRindled(args?: string[], options?: SpawnOptions): ChildProcess;","description":"Spawn the `rindled` daemon with `args`, for embedding it in a Node supervisor. See {@link spawnBinary}.","source":"packages/cli/src/index.ts","line":108,"href":"/reference/typescript/cli/#symbol-spawnRindled"},{"name":"UnsupportedPlatformError","originalName":"UnsupportedPlatformError","kind":"ClassDeclaration","signature":"export declare class UnsupportedPlatformError extends Error {\n    constructor(platform: string, arch: string);\n}","description":"","source":"packages/cli/src/platform.ts","line":52,"href":"/reference/typescript/cli/#symbol-UnsupportedPlatformError"}]},{"name":"@rindle/client","source":"packages/client/src/index.ts","package":"@rindle/client","symbols":[{"name":"Aggregate","originalName":"Aggregate","kind":"TypeAliasDeclaration","signature":"/** An aggregate over a (correlated) subquery's rows (`REDUCE-DESIGN.md`). v1: `count(*)`.\n *  Set on a `related` subquery (`Ast.aggregate`), it marks that relationship a count\n *  aggregate the builder lowers to a scalar-projected singular relationship (§9). */\nexport type Aggregate = \"count\";","description":"An aggregate over a (correlated) subquery's rows (`REDUCE-DESIGN.md`). v1: `count(*)`.\nSet on a `related` subquery (`Ast.aggregate`), it marks that relationship a count\naggregate the builder lowers to a scalar-projected singular relationship (§9).","source":"packages/client/src/ast.ts","line":67,"href":"/reference/typescript/client/#symbol-Aggregate"},{"name":"and","originalName":"and","kind":"FunctionDeclaration","signature":"/** All children must hold. */\nexport declare function and<R>(...conds: Cond<R>[]): Cond<R>;","description":"All children must hold.","source":"packages/client/src/operators.ts","line":66,"href":"/reference/typescript/client/#symbol-and"},{"name":"AnyCols","originalName":"AnyCols","kind":"TypeAliasDeclaration","signature":"export type AnyCols = Record<string, Col<unknown>>;","description":"","source":"packages/client/src/schema.ts","line":27,"href":"/reference/typescript/client/#symbol-AnyCols"},{"name":"AnyQuery","originalName":"AnyQuery","kind":"TypeAliasDeclaration","signature":"export type AnyQuery = Query<any, any, any, any, any, any>;","description":"","source":"packages/client/src/query.ts","line":308,"href":"/reference/typescript/client/#symbol-AnyQuery"},{"name":"AnyRelationship","originalName":"AnyRelationship","kind":"TypeAliasDeclaration","signature":"/** Any relationship, for positions that only read its correlation / child table. */\nexport type AnyRelationship = Relationship<AnyCols, AnyCols>;","description":"Any relationship, for positions that only read its correlation / child table.","source":"packages/client/src/schema.ts","line":469,"href":"/reference/typescript/client/#symbol-AnyRelationship"},{"name":"AnyTable","originalName":"AnyTable","kind":"TypeAliasDeclaration","signature":"export type AnyTable = TableLike<AnyCols>;","description":"","source":"packages/client/src/schema.ts","line":102,"href":"/reference/typescript/client/#symbol-AnyTable"},{"name":"Arg","originalName":"Arg","kind":"TypeAliasDeclaration","signature":"/** A field argument: its typed predicate, or a bare value (bare = `eq` sugar). */\nexport type Arg<V> = Pred<V> | V;","description":"A field argument: its typed predicate, or a bare value (bare = `eq` sugar).","source":"packages/client/src/operators.ts","line":47,"href":"/reference/typescript/client/#symbol-Arg"},{"name":"ArgSchema","originalName":"ArgSchema","kind":"InterfaceDeclaration","signature":"/** The minimal arg validator a shared mutator can carry so the SERVER can parse UNTRUSTED wire args\n *  before driving it (the client trusts its typed callsites and never calls this). Structural on\n *  purpose — a zod schema satisfies it as-is — so `@rindle/client` stays validator-library-agnostic. */\nexport interface ArgSchema<Args> {\n    parse(raw: unknown): Args;\n}","description":"The minimal arg validator a shared mutator can carry so the SERVER can parse UNTRUSTED wire args\nbefore driving it (the client trusts its typed callsites and never calls this). Structural on\npurpose — a zod schema satisfies it as-is — so `@rindle/client` stays validator-library-agnostic.","source":"packages/client/src/mutation-ops.ts","line":161,"href":"/reference/typescript/client/#symbol-ArgSchema"},{"name":"ArrayView","originalName":"ArrayView","kind":"InterfaceDeclaration","signature":"/** The public ArrayView contract `materialize()` returns. */\nexport interface ArrayView<R> {\n    /** The current materialized result (reference-stable where data is unchanged). */\n    readonly data: readonly R[];\n    /** The engine query id the Store assigned this view (1:1 with the view). The same `qid` the raw\n     *  change stream ({@link Store.subscribeChanges}) tags each frame with, so a consumer can\n     *  correlate this query with its `ChangeEvent`s (e.g. to bind a narrator) straight off\n     *  `materialize(query).qid` — no separate handle needed. */\n    readonly qid: QueryId;\n    /** The query's view `WireSchema` (the position→name source for {@link resolveChange}), captured\n     *  from its `hello` frame. `null` while PENDING — a remote backend's `hello` arrives async; an\n     *  in-process backend (wasm/replica) populates it synchronously during `materialize`. */\n    readonly schema: WireSchema | null;\n    /** The query's SERVER-CHANNEL state (`unknown` while loading, `complete` once server-authoritative;\n     *  the `error` variant is reserved and currently unproduced). A pending optimistic mutation no\n     *  longer moves this — it is a separate axis (FOLDED-MUTATIONS-DESIGN §7). `complete` for backends\n     *  with no server lifecycle. Changes notify subscribers. */\n    readonly resultType: ResultType;\n    /** Subscribe; fires immediately with the current data, then after each applied batch (and after\n     *  a {@link resultType} change — re-read `resultType` in the listener). */\n    subscribe(listener: (data: readonly R[]) => void): () => void;\n    /** Subscribe to this view's folded CHANGE stream — the `FlatChange[]` it applies, NET of no-op\n     *  cycles (a rebase's balanced `remove`+`add` / edit round-trip cancels, so a correctly predicted\n     *  optimistic write delivers nothing here). Carries the diff {@link subscribe} throws away; the\n     *  per-view seam a narrator rides. Does NOT replay on subscribe — attach via\n     *  `store.materialize(query, { onChanges })` to catch a synchronous backend's first snapshot.\n     *  A view with any change listener also enriches its own `remove` ops with the evicted subtree\n     *  (per-view, no global opt-in). Returns a detach function. */\n    onChanges(listener: ViewChangeListener): () => void;\n    /** Tear down + stop receiving updates. */\n    destroy(): void;\n}","description":"The public ArrayView contract `materialize()` returns.","source":"packages/client/src/view.ts","line":33,"href":"/reference/typescript/client/#symbol-ArrayView"},{"name":"AssembledNode","originalName":"AssembledNode","kind":"InterfaceDeclaration","signature":"/** A single assembled (nested-by-name) row from `POST /query` (SSR-DESIGN.md §3.3): the cells\n *  under `cols`, each in-view relationship inlined by its alias (a nested array / object, or a\n *  scalar for a `countAs` aggregate). {@link Store.assembleSnapshot} converts these to the\n *  view's projected result shape. */\nexport interface AssembledNode {\n    cols: Record<string, WireValue>;\n    [rel: string]: unknown;\n}","description":"A single assembled (nested-by-name) row from `POST /query` (SSR-DESIGN.md §3.3): the cells\nunder `cols`, each in-view relationship inlined by its alias (a nested array / object, or a\nscalar for a `countAs` aggregate). {@link Store.assembleSnapshot} converts these to the\nview's projected result shape.","source":"packages/client/src/store.ts","line":33,"href":"/reference/typescript/client/#symbol-AssembledNode"},{"name":"assembleDurableText","originalName":"assembleDurableText","kind":"FunctionDeclaration","signature":"/**\n * The durable half of the splice for the mapped-table layout: the compacted `body` followed by\n * whatever chunk rows have not been folded into it yet.\n *\n * Chunks are ALWAYS the suffix after `body` — the closing checkpoint rewrites `body` and drops the\n * chunks it absorbed in ONE transaction — so a reader never observes a torn state where a chunk both\n * is and is not in the body.\n */\nexport declare function assembleDurableText(message: {\n    body?: string | null;\n} | null | undefined, chunks?: ReadonlyArray<{\n    seq: number;\n    text: string;\n}>): string;","description":"The durable half of the splice for the mapped-table layout: the compacted `body` followed by\nwhatever chunk rows have not been folded into it yet.\n\nChunks are ALWAYS the suffix after `body` — the closing checkpoint rewrites `body` and drops the\nchunks it absorbed in ONE transaction — so a reader never observes a torn state where a chunk both\nis and is not in the body.","source":"packages/client/src/stream.ts","line":87,"href":"/reference/typescript/client/#symbol-assembleDurableText"},{"name":"assertNoLocalTables","originalName":"assertNoLocalTables","kind":"FunctionDeclaration","signature":"/** Throw if `ast` references a local-only table ANYWHERE — the complete form of the {@link queries}\n *  root guard (Q1 / E3 client half). The root proxy `get` only sees the table accessed off the\n *  builder root; a local table reached through a relationship / `sub` / `countAs` / `exists` CHILD is\n *  passed as a value and never touches the proxy, so it is caught here instead: at `.ast()` for a\n *  server-scope builder, and again as an SSR backstop in `ServerStore.preload`. A server/named query\n *  may never name a local table (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5). */\nexport declare function assertNoLocalTables<S extends ColsMap>(ast: Ast, schema: Schema<S>): void;","description":"Throw if `ast` references a local-only table ANYWHERE — the complete form of the {@link queries}\nroot guard (Q1 / E3 client half). The root proxy `get` only sees the table accessed off the\nbuilder root; a local table reached through a relationship / `sub` / `countAs` / `exists` CHILD is\npassed as a value and never touches the proxy, so it is caught here instead: at `.ast()` for a\nserver-scope builder, and again as an SSR backstop in `ServerStore.preload`. A server/named query\nmay never name a local table (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5).","source":"packages/client/src/query.ts","line":845,"href":"/reference/typescript/client/#symbol-assertNoLocalTables"},{"name":"Ast","originalName":"Ast","kind":"InterfaceDeclaration","signature":"/** The query AST. `table` is the only required field; the builder omits empty/false fields\n *  (matching the Rust `skip_serializing_if`), which the deserializer treats as absent. */\nexport interface Ast {\n    table: string;\n    alias?: string;\n    /** Projection (PROJECTION-SUPPORT-DESIGN.md §6). Absent ⇒ select all columns; present ⇒\n     *  project to just these (drives what syncs + what the view reports). Serializes only when\n     *  set, matching the Rust `Ast.select`'s `skip_serializing_if`. */\n    select?: string[];\n    where?: Condition;\n    related?: CorrelatedSubquery[];\n    start?: Bound;\n    limit?: number;\n    one?: boolean;\n    /** Aggregate this (sub)query's rows instead of materializing them (`REDUCE-DESIGN.md`\n     *  §9). `count` on a `related` subquery surfaces a scalar `commentCount` field; the\n     *  builder lowers it to a scalar-projected singular relationship. Absent ⇒ ordinary rows. */\n    aggregate?: Aggregate;\n    /** The {@link Ast.aggregate} value is **precomputed** — supplied as rows of a (synthetic)\n     *  source table rather than reduced from child rows. Set by the normalized client's AST\n     *  rewrite (`AGGREGATE-SYNC-DESIGN.md` §3.3) so the local engine reads the server's count\n     *  with a plain singular join + the same projection instead of a `reduce`. Only meaningful\n     *  with `aggregate`; absent ⇒ `false`. */\n    aggregatePrecomputed?: boolean;\n    /** Top-level `GROUP BY` columns (names), meaningful only alongside a root {@link Ast.aggregate}\n     *  (`REDUCE-DESIGN.md` §8). Empty + `aggregate` set ⇒ a **global** aggregate (one `[count]` row);\n     *  non-empty ⇒ one `[group…, count]` row per distinct value-tuple. Distinct from a relationship\n     *  aggregate's implicit grouping (the correlation child key). Absent on the wire ⇒ empty. */\n    groupBy?: string[];\n    /** `HAVING` — a filter over the **post-aggregation** rows of a root {@link Ast.aggregate}\n     *  (`REDUCE-DESIGN.md` §4: a filter directly above the `reduce`). Its condition addresses the\n     *  aggregate's *output* columns — the {@link Ast.groupBy} columns and the synthetic `count`\n     *  column — not base-table columns (those go in {@link Ast.where}, which filters rows *below* the\n     *  reduce). Absent ⇒ no post-aggregation filter. */\n    having?: Condition;\n    orderBy?: OrderPart[];\n}","description":"The query AST. `table` is the only required field; the builder omits empty/false fields\n(matching the Rust `skip_serializing_if`), which the deserializer treats as absent.","source":"packages/client/src/ast.ts","line":71,"href":"/reference/typescript/client/#symbol-Ast"},{"name":"AsyncEffectExec","originalName":"AsyncEffectExec","kind":"InterfaceDeclaration","signature":"/** A tier's ASYNCHRONOUS effect executor (the server transaction): every op is a Promise. */\nexport interface AsyncEffectExec {\n    apply(op: MutationOp): Promise<void>;\n    read(table: string, pk: KeyedRow): Promise<KeyedRow | undefined>;\n    query(q: QueryArg): Promise<QueryResultRow[]>;\n}","description":"A tier's ASYNCHRONOUS effect executor (the server transaction): every op is a Promise.","source":"packages/client/src/mutation-ops.ts","line":247,"href":"/reference/typescript/client/#symbol-AsyncEffectExec"},{"name":"Backend","originalName":"Backend","kind":"InterfaceDeclaration","signature":"/**\n * The seam the core talks to. Backend-agnostic: the same interface for the in-process\n * WASM backend and a remote (network) backend. The core never knows which. A backend\n * pushes a per-query {@link ChangeEvent} stream via {@link Backend.onEvent}; the remote\n * backend additionally owns the epoch/seq/gap protocol and emits only clean, in-order\n * events (so the ArrayView never sees the wire protocol).\n */\nexport interface Backend {\n    registerQuery(queryId: QueryId, ast: unknown, remote?: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Optional split path for local-first backends: retain/release a named remote footprint\n     *  without creating another local materialized view. `localQueryId`, when provided, names\n     *  the local AST view this remote footprint feeds. `ast`, when provided, gives the backend\n     *  the local schema context for sync-only retains that still need aggregate/table setup. */\n    retainRemoteQuery?(queryId: QueryId, remote: RemoteQuery, localQueryId?: QueryId, ast?: Ast): void;\n    releaseRemoteQuery?(queryId: QueryId): void;\n    /** Local: applies now (changes flow back on the stream). Remote: sends to the server. */\n    mutate(mutations: Mutation[]): Promise<void>;\n    /** Optional DIRECT-COMMIT path for LOCAL-only tables (`201-LOCAL-ONLY-TABLES-DESIGN.md` §6):\n     *  applies the writes straight to the engine, OUTSIDE the optimistic pending stack (a local\n     *  table is untracked, so it never rebases). The backend rejects any synced/tracked table (M2).\n     *  Backends with no local-table support (a plain remote sync backend) omit it.\n     *\n     *  `onCommitted` (207 §5.1) runs after the engine commit is applied but BEFORE subscriber\n     *  delivery: a subscriber throwing during delivery re-raises out of this call, and a caller\n     *  that must stay coherent with the engine (the persistence tap) cannot tell that throw from\n     *  a pre-commit rejection — the callback can, because it fires exactly when the commit is in. */\n    writeLocal?(mutations: Mutation[], onCommitted?: () => void): void;\n    onEvent(handler: (queryId: QueryId, event: ChangeEvent) => void): void;\n    /** Optional: the backend pushes per-query {@link ResultType} changes here and the core routes\n     *  each to the matching view (so `view.resultType` tracks it). Backends with no lifecycle (the\n     *  in-process engine) omit it and every view stays `complete`. */\n    onResultType?(handler: (queryId: QueryId, resultType: ResultType) => void): void;\n    /** Optional: brackets one commit's coherent multi-query delivery so the Store can fold every\n     *  affected view BEFORE notifying any subscriber — cross-view-atomic notification. The\n     *  in-process engine derives the whole commit's per-query deltas against one consistent post-\n     *  commit snapshot, then dispatches them one query at a time; without a barrier a subscriber on\n     *  the first-dispatched view, re-reading a sibling view in its callback, would observe that\n     *  sibling's PRE-commit state (it has not folded yet). The backend calls the handler with\n     *  `\"begin\"` before delivering a commit's per-query `batch` events (via {@link onEvent}) and\n     *  `\"end\"` after the last one; between them the Store folds each view but DEFERS its\n     *  notification, firing every affected view's subscribers together at `\"end\"`. Backends with no\n     *  synchronous multi-query commit boundary (a plain remote backend, where each query's frame\n     *  arrives in its own message) omit it — the Store then notifies per event, exactly as before. */\n    onCommitBoundary?(handler: (phase: \"begin\" | \"end\") => void): void;\n    /** Optional dev-only authoritative server stream tap. It is additive, like\n     *  `Store.subscribeChanges`, and must not displace the backend's normal event handler. */\n    __attachDevtoolsServerDeltas?(observer: BackendDevObserver): () => void;\n}","description":"The seam the core talks to. Backend-agnostic: the same interface for the in-process\nWASM backend and a remote (network) backend. The core never knows which. A backend\npushes a per-query {@link ChangeEvent} stream via {@link Backend.onEvent}; the remote\nbackend additionally owns the epoch/seq/gap protocol and emits only clean, in-order\nevents (so the ArrayView never sees the wire protocol).","source":"packages/client/src/types.ts","line":171,"href":"/reference/typescript/client/#symbol-Backend"},{"name":"BackendDevObserver","originalName":"BackendDevObserver","kind":"InterfaceDeclaration","signature":"/** Dev-only passive tap over a backend's authoritative server stream. Optional because in-process\n *  backends have no server stream, and older/custom backends may only expose the Store tap. */\nexport interface BackendDevObserver {\n    onServerDelta?(qid: QueryId, ev: BackendServerDelta): void;\n}","description":"Dev-only passive tap over a backend's authoritative server stream. Optional because in-process\nbackends have no server stream, and older/custom backends may only expose the Store tap.","source":"packages/client/src/types.ts","line":140,"href":"/reference/typescript/client/#symbol-BackendDevObserver"},{"name":"BackendServerDelta","originalName":"BackendServerDelta","kind":"TypeAliasDeclaration","signature":"/** A dev-only authoritative server delta exposed by backends that can distinguish the upstream\n *  server stream from their local view/IVM stream. Flat remote backends surface clean\n *  {@link ChangeEvent}s; local-first normalized/optimistic backends surface the path-free\n *  {@link NormalizedEvent}s before they are folded into the local engine. */\nexport type BackendServerDelta = {\n    format: \"flat\";\n    event: ChangeEvent;\n} | {\n    format: \"normalized\";\n    event: NormalizedEvent;\n};","description":"A dev-only authoritative server delta exposed by backends that can distinguish the upstream\nserver stream from their local view/IVM stream. Flat remote backends surface clean\n{@link ChangeEvent}s; local-first normalized/optimistic backends surface the path-free\n{@link NormalizedEvent}s before they are folded into the local engine.","source":"packages/client/src/types.ts","line":134,"href":"/reference/typescript/client/#symbol-BackendServerDelta"},{"name":"BatchEffect","originalName":"BatchEffect","kind":"TypeAliasDeclaration","signature":"/** A fan-out a generator mutator yields: run several effects \"together\". The server driver resolves\n *  them with `Promise.all`; the client driver runs them in array order (already synchronous). Results\n *  return in the same order on both tiers. Each result has its effect's shape: a row, query rows,\n *  `undefined` for a write, or an array for a nested batch. Cast the yielded result to that shape;\n *  the generator's declared next-type covers only point reads. */\nexport type BatchEffect = {\n    kind: \"all\";\n    effects: readonly YieldEffect[];\n};","description":"A fan-out a generator mutator yields: run several effects \"together\". The server driver resolves\nthem with `Promise.all`; the client driver runs them in array order (already synchronous). Results\nreturn in the same order on both tiers. Each result has its effect's shape: a row, query rows,\n`undefined` for a write, or an array for a nested batch. Cast the yielded result to that shape;\nthe generator's declared next-type covers only point reads.","source":"packages/client/src/mutation-ops.ts","line":72,"href":"/reference/typescript/client/#symbol-BatchEffect"},{"name":"boolean","originalName":"boolean","kind":"VariableDeclaration","signature":"export declare const boolean: () => ColBuilder<boolean>;","description":"","source":"packages/client/src/schema.ts","line":48,"href":"/reference/typescript/client/#symbol-boolean"},{"name":"Bound","originalName":"Bound","kind":"InterfaceDeclaration","signature":"/** A paging lower bound (`Bound`, `src/ast.rs`). `row` is a *partial* wire row — the bound\n *  columns by name (only the sort columns are read by the engine's `Skip` comparator).\n *  `exclusive` ⇒ start *after* the bound row (`Basis::After`); else *at* it (`Basis::At`). */\nexport interface Bound {\n    row: Record<string, LitValue>;\n    exclusive: boolean;\n}","description":"A paging lower bound (`Bound`, `src/ast.rs`). `row` is a *partial* wire row — the bound\ncolumns by name (only the sort columns are read by the engine's `Skip` comparator).\n`exclusive` ⇒ start *after* the bound row (`Basis::After`); else *at* it (`Basis::At`).","source":"packages/client/src/ast.ts","line":53,"href":"/reference/typescript/client/#symbol-Bound"},{"name":"CachedQueryView","originalName":"CachedQueryView","kind":"InterfaceDeclaration","signature":"export interface CachedQueryView<Q extends Query<any, any, any>> {\n    readonly view: ReturnType<Q[\"materialize\"]>;\n    /** Retain this query's named remote footprint and release it later. Ad-hoc local queries\n     *  return a no-op release function. */\n    retain(query: Q): () => void;\n    destroy(): void;\n}","description":"","source":"packages/client/src/store.ts","line":50,"href":"/reference/typescript/client/#symbol-CachedQueryView"},{"name":"ChangeEvent","originalName":"ChangeEvent","kind":"TypeAliasDeclaration","signature":"/**\n * What a {@link Backend} pushes per query: the handshake (`hello`), the (possibly\n * chunked) hydrate `snapshot`, then incremental `batch`es. The core builds an ArrayView\n * on `hello`, hydrates on `snapshot`, folds on `batch` — identically for any backend.\n */\nexport type ChangeEvent = {\n    type: \"hello\";\n    schema: WireSchema;\n    comparatorVersion: number;\n} | {\n    type: \"snapshot\";\n    adds: FlatChange[];\n    last: boolean;\n} | {\n    type: \"batch\";\n    events: FlatChange[];\n    catchUp?: boolean;\n};","description":"What a {@link Backend} pushes per query: the handshake (`hello`), the (possibly\nchunked) hydrate `snapshot`, then incremental `batch`es. The core builds an ArrayView\non `hello`, hydrates on `snapshot`, folds on `batch` — identically for any backend.","source":"packages/client/src/types.ts","line":79,"href":"/reference/typescript/client/#symbol-ChangeEvent"},{"name":"ChangePhase","originalName":"ChangePhase","kind":"TypeAliasDeclaration","signature":"/** The phase of an {@link ArrayView.onChanges} delivery: the initial hydrate `snapshot` vs a later\n *  incremental `batch` — the same distinction a narrator draws (`ChangeEvent` `snapshot`/`batch`). */\nexport type ChangePhase = \"snapshot\" | \"batch\";","description":"The phase of an {@link ArrayView.onChanges} delivery: the initial hydrate `snapshot` vs a later\nincremental `batch` — the same distinction a narrator draws (`ChangeEvent` `snapshot`/`batch`).","source":"packages/client/src/view.ts","line":23,"href":"/reference/typescript/client/#symbol-ChangePhase"},{"name":"CLIENT_MUTATIONS_SCHEMA","originalName":"CLIENT_MUTATIONS_SCHEMA","kind":"VariableDeclaration","signature":"/** The system table's wire schema — appended to the client's expected schemas so the\n *  lmid query's `hello` passes CRIT#4 validation. */\nexport declare const CLIENT_MUTATIONS_SCHEMA: NormalizedTableSchema;","description":"The system table's wire schema — appended to the client's expected schemas so the\nlmid query's `hello` passes CRIT#4 validation.","source":"packages/client/src/types.ts","line":291,"href":"/reference/typescript/client/#symbol-CLIENT_MUTATIONS_SCHEMA"},{"name":"CLIENT_MUTATIONS_TABLE","originalName":"CLIENT_MUTATIONS_TABLE","kind":"VariableDeclaration","signature":"/** The replicated bookkeeping table carrying each client's high-water mutation id\n *  (`lmid`). Engine-hosted and served like any base table; reserved (never part of a\n *  user schema). Columns: `[client_id, last_mutation_id]`, PK `client_id`. */\nexport declare const CLIENT_MUTATIONS_TABLE = \"_rindle_client_mutations\";","description":"The replicated bookkeeping table carrying each client's high-water mutation id\n(`lmid`). Engine-hosted and served like any base table; reserved (never part of a\nuser schema). Columns: `[client_id, last_mutation_id]`, PK `client_id`.","source":"packages/client/src/types.ts","line":282,"href":"/reference/typescript/client/#symbol-CLIENT_MUTATIONS_TABLE"},{"name":"Col","originalName":"Col","kind":"InterfaceDeclaration","signature":"/** A column descriptor. `type` drives the comparator + JSON parsing; `__t` is a phantom. A\n *  nullable column is a `Col<T | null>` — that is the ONLY thing nullability changes at the type\n *  level, so `RowOf` (and the field-condition factory) widen automatically.\n *\n *  `optional` is the runtime companion of that phantom: set by {@link ColBuilder.nullable}, it is\n *  what the write funnels read to make a nullable column omittable from an insert (filled with\n *  `null`, design 206 §6.2). It mirrors the engine's `ColumnDef.optional`\n *  (`pragma_table_info.notnull == 0`); absent ⇒ `NOT NULL` / required. */\nexport interface Col<T> {\n    readonly type: ColType;\n    readonly optional?: boolean;\n    readonly __t?: T;\n}","description":"A column descriptor. `type` drives the comparator + JSON parsing; `__t` is a phantom. A\nnullable column is a `Col<T | null>` — that is the ONLY thing nullability changes at the type\nlevel, so `RowOf` (and the field-condition factory) widen automatically.\n\n`optional` is the runtime companion of that phantom: set by {@link ColBuilder.nullable}, it is\nwhat the write funnels read to make a nullable column omittable from an insert (filled with\n`null`, design 206 §6.2). It mirrors the engine's `ColumnDef.optional`\n(`pragma_table_info.notnull == 0`); absent ⇒ `NOT NULL` / required.","source":"packages/client/src/schema.ts","line":21,"href":"/reference/typescript/client/#symbol-Col"},{"name":"ColBuilder","originalName":"ColBuilder","kind":"InterfaceDeclaration","signature":"/** The chainable form returned by the column factories: a {@link Col} plus `.nullable()`.\n *\n *  `.nullable()` widens the column's value type to `T | null` — its `Row<…>` field becomes\n *  `T | null` — and sets the runtime {@link Col.optional} marker so it may be omitted from an insert\n *  (design 206 §6.2). `rindle schema gen` emits `.nullable()` for every nullable (non-`NOT NULL`) SQL\n *  column; you can also call it by hand on a local-only table's columns. It is idempotent and stays\n *  chainable. */\nexport interface ColBuilder<T> extends Col<T> {\n    nullable(): ColBuilder<T | null>;\n}","description":"The chainable form returned by the column factories: a {@link Col} plus `.nullable()`.\n\n`.nullable()` widens the column's value type to `T | null` — its `Row<…>` field becomes\n`T | null` — and sets the runtime {@link Col.optional} marker so it may be omitted from an insert\n(design 206 §6.2). `rindle schema gen` emits `.nullable()` for every nullable (non-`NOT NULL`) SQL\ncolumn; you can also call it by hand on a local-only table's columns. It is idempotent and stays\nchainable.","source":"packages/client/src/schema.ts","line":37,"href":"/reference/typescript/client/#symbol-ColBuilder"},{"name":"ColRefinements","originalName":"ColRefinements","kind":"TypeAliasDeclaration","signature":"/** Per-column narrowings for {@link refineTable}: each entry must keep the column's kind and narrow\n *  its TS type (`Col<T2>` with `T2 extends T`) — `json<Meta>()` on a json column, a literal-union\n *  `string<\"a\" | \"b\">()` on a string column. Kind changes are rejected (cross-kind at compile time,\n *  same-phantom kind flips like `string()` on a json column at runtime). */\nexport type ColRefinements<C extends AnyCols> = {\n    readonly [K in keyof C]?: Col<ColT<C[K]>>;\n};","description":"Per-column narrowings for {@link refineTable}: each entry must keep the column's kind and narrow\nits TS type (`Col<T2>` with `T2 extends T`) — `json<Meta>()` on a json column, a literal-union\n`string<\"a\" | \"b\">()` on a string column. Kind changes are rejected (cross-kind at compile time,\nsame-phantom kind flips like `string()` on a json column at runtime).","source":"packages/client/src/schema.ts","line":303,"href":"/reference/typescript/client/#symbol-ColRefinements"},{"name":"ColsMap","originalName":"ColsMap","kind":"TypeAliasDeclaration","signature":"/** name → columns, the resolved schema map carried in the {@link Schema} type. */\nexport type ColsMap = Record<string, AnyCols>;","description":"name → columns, the resolved schema map carried in the {@link Schema} type.","source":"packages/client/src/schema.ts","line":199,"href":"/reference/typescript/client/#symbol-ColsMap"},{"name":"ColT","originalName":"ColT","kind":"TypeAliasDeclaration","signature":"export type ColT<X> = X extends Col<infer T> ? T : never;","description":"","source":"packages/client/src/schema.ts","line":26,"href":"/reference/typescript/client/#symbol-ColT"},{"name":"ColType","originalName":"ColType","kind":"TypeAliasDeclaration","signature":"/** Declared column type (from the typed schema) — drives the comparator + JSON parsing.\n *  `\"int64\"` is the exact-i64 column plane (design 226): the vocabulary exists from\n *  Stage C4 (codegen can name it), but no exact integer cell crosses this wire — and\n *  `WireValue` gains no `bigint` — until Stage E lands the browser bigint plane; until\n *  then the daemon refuses IVM queries whose footprint touches such a column. */\nexport type ColType = \"string\" | \"number\" | \"boolean\" | \"json\" | \"int64\";","description":"Declared column type (from the typed schema) — drives the comparator + JSON parsing.\n`\"int64\"` is the exact-i64 column plane (design 226): the vocabulary exists from\nStage C4 (codegen can name it), but no exact integer cell crosses this wire — and\n`WireValue` gains no `bigint` — until Stage E lands the browser bigint plane; until\nthen the daemon refuses IVM queries whose footprint touches such a column.","source":"packages/client/src/types.ts","line":16,"href":"/reference/typescript/client/#symbol-ColType"},{"name":"COMPARATOR_VERSION","originalName":"COMPARATOR_VERSION","kind":"VariableDeclaration","signature":"/** The `compare_values` / `compare_rows` algorithm-contract version (=== the engine's\n *  `wire_schema::COMPARATOR_VERSION`). A remote subscriber hard-rejects a `hello` whose\n *  `comparatorVersion` differs — the total order is a code contract, not data, so a schema\n *  fingerprint can't cover it. Bump in lockstep with the Rust constant if the order changes.\n *\n *  v2 (design 226 Stage B): the engine's mixed Int/Float comparison became exact instead\n *  of f64-widening. No TS behavior change — every value a client can hold today is an f64\n *  `number`, on which v1 and v2 order identically (the §8 gate keeps int64 cells out of\n *  the browser until Stage E) — but the contract the version names is the engine's. */\nexport declare const COMPARATOR_VERSION = 2;","description":"The `compare_values` / `compare_rows` algorithm-contract version (=== the engine's\n`wire_schema::COMPARATOR_VERSION`). A remote subscriber hard-rejects a `hello` whose\n`comparatorVersion` differs — the total order is a code contract, not data, so a schema\nfingerprint can't cover it. Bump in lockstep with the Rust constant if the order changes.\n\nv2 (design 226 Stage B): the engine's mixed Int/Float comparison became exact instead\nof f64-widening. No TS behavior change — every value a client can hold today is an f64\n`number`, on which v1 and v2 order identically (the §8 gate keeps int64 cells out of\nthe browser until Stage E) — but the contract the version names is the engine's.","source":"packages/client/src/compare.ts","line":28,"href":"/reference/typescript/client/#symbol-COMPARATOR_VERSION"},{"name":"compareNumber","originalName":"compareNumber","kind":"FunctionDeclaration","signature":"/** number compare with `f64::total_cmp` semantics (NaN deterministic & last; -0 < +0). */\nexport declare function compareNumber(a: number, b: number): -1 | 0 | 1;","description":"number compare with `f64::total_cmp` semantics (NaN deterministic & last; -0 < +0).","source":"packages/client/src/compare.ts","line":44,"href":"/reference/typescript/client/#symbol-compareNumber"},{"name":"compareRows","originalName":"compareRows","kind":"FunctionDeclaration","signature":"/** Compare two rows by a resolved sort (`[columnIndex, ascending]` pairs). First non-equal\n *  column wins; a descending column negates. */\nexport declare function compareRows(a: WireValue[], b: WireValue[], sort: [\n    number,\n    boolean\n][]): -1 | 0 | 1;","description":"Compare two rows by a resolved sort (`[columnIndex, ascending]` pairs). First non-equal\ncolumn wins; a descending column negates.","source":"packages/client/src/compare.ts","line":84,"href":"/reference/typescript/client/#symbol-compareRows"},{"name":"compareString","originalName":"compareString","kind":"FunctionDeclaration","signature":"/** UTF-8 bytewise string compare (=== SQLite `BINARY` / Rust `&str` Ord). Correct for\n *  supplementary-plane code points, where JS `<` / `localeCompare` (UTF-16) would disagree. */\nexport declare function compareString(a: string, b: string): -1 | 0 | 1;","description":"UTF-8 bytewise string compare (=== SQLite `BINARY` / Rust `&str` Ord). Correct for\nsupplementary-plane code points, where JS `<` / `localeCompare` (UTF-16) would disagree.","source":"packages/client/src/compare.ts","line":52,"href":"/reference/typescript/client/#symbol-compareString"},{"name":"compareValue","originalName":"compareValue","kind":"FunctionDeclaration","signature":"/** Compare two bare cells, dispatching on the runtime type (null sorts first). */\nexport declare function compareValue(a: WireValue, b: WireValue): -1 | 0 | 1;","description":"Compare two bare cells, dispatching on the runtime type (null sorts first).","source":"packages/client/src/compare.ts","line":63,"href":"/reference/typescript/client/#symbol-compareValue"},{"name":"Cond","originalName":"Cond","kind":"TypeAliasDeclaration","signature":"/** A condition over row `R`. The runtime value is the wire {@link Condition}; `R` is a\n *  phantom brand so a condition for one table can't be `.where()`d onto another. */\nexport type Cond<R> = Condition & {\n    readonly __row?: R;\n};","description":"A condition over row `R`. The runtime value is the wire {@link Condition}; `R` is a\nphantom brand so a condition for one table can't be `.where()`d onto another.","source":"packages/client/src/operators.ts","line":51,"href":"/reference/typescript/client/#symbol-Cond"},{"name":"Condition","originalName":"Condition","kind":"TypeAliasDeclaration","signature":"/** The filter tree — `type`-tagged; recursive. There is no generic NOT node (negation is\n *  via the negated operators and `NOT EXISTS`, matching `src/ast.rs` `Condition`). */\nexport type Condition = {\n    type: \"simple\";\n    op: SimpleOp;\n    left: ValuePosition;\n    right: ValuePosition;\n} | {\n    type: \"and\";\n    conditions: Condition[];\n} | {\n    type: \"or\";\n    conditions: Condition[];\n} | {\n    type: \"correlatedSubquery\";\n    related: CorrelatedSubquery;\n    op: ExistsOp;\n    flip?: boolean;\n    scalar?: boolean;\n};","description":"The filter tree — `type`-tagged; recursive. There is no generic NOT node (negation is\nvia the negated operators and `NOT EXISTS`, matching `src/ast.rs` `Condition`).","source":"packages/client/src/ast.ts","line":39,"href":"/reference/typescript/client/#symbol-Condition"},{"name":"CorrelatedSubquery","originalName":"CorrelatedSubquery","kind":"InterfaceDeclaration","signature":"export interface CorrelatedSubquery {\n    correlation: Correlation;\n    subquery: Ast;\n    system?: \"client\" | \"permissions\" | \"test\";\n}","description":"","source":"packages/client/src/ast.ts","line":58,"href":"/reference/typescript/client/#symbol-CorrelatedSubquery"},{"name":"Correlation","originalName":"Correlation","kind":"InterfaceDeclaration","signature":"export interface Correlation {\n    parentField: string[];\n    childField: string[];\n}","description":"","source":"packages/client/src/ast.ts","line":45,"href":"/reference/typescript/client/#symbol-Correlation"},{"name":"createLocalFragmentRef","originalName":"createLocalFragmentRef","kind":"FunctionDeclaration","signature":"export declare function createLocalFragmentRef<F extends Fragment<any, any, any>>(fragment: F, pk: Record<string, LitValue>, coverage: FragmentCoverage): LocalFragmentRef<F>;","description":"","source":"packages/client/src/query.ts","line":610,"href":"/reference/typescript/client/#symbol-createLocalFragmentRef"},{"name":"createLocalFragmentRefForTable","originalName":"createLocalFragmentRefForTable","kind":"FunctionDeclaration","signature":"export declare function createLocalFragmentRefForTable<F extends Fragment<any, any, any>>(table: string, pk: Record<string, LitValue>, coverage: FragmentCoverage): LocalFragmentRef<F>;","description":"","source":"packages/client/src/query.ts","line":618,"href":"/reference/typescript/client/#symbol-createLocalFragmentRefForTable"},{"name":"createRootFragmentRef","originalName":"createRootFragmentRef","kind":"FunctionDeclaration","signature":"export declare function createRootFragmentRef<F extends Fragment<any, any, any>, Q extends AnyQuery>(fragment: F, query: Q, coverageKey?: string): LocalFragmentRef<F>;","description":"","source":"packages/client/src/query.ts","line":632,"href":"/reference/typescript/client/#symbol-createRootFragmentRef"},{"name":"createSchema","originalName":"createSchema","kind":"FunctionDeclaration","signature":"export declare function createSchema<const T extends readonly AnyTable[]>(opts: {\n    tables: T;\n}): Schema<SchemaOf<T>, PkMapOf<T>>;","description":"","source":"packages/client/src/schema.ts","line":227,"href":"/reference/typescript/client/#symbol-createSchema"},{"name":"createServerStore","originalName":"createServerStore","kind":"FunctionDeclaration","signature":"/** Construct a {@link ServerStore} — the one-shot REST Store for server-side rendering. */\nexport declare function createServerStore<S extends ColsMap>(schema: Schema<S>, opts: ServerStoreOptions): ServerStore<S>;","description":"Construct a {@link ServerStore} — the one-shot REST Store for server-side rendering.","source":"packages/client/src/ssr.ts","line":140,"href":"/reference/typescript/client/#symbol-createServerStore"},{"name":"defineFragment","originalName":"defineFragment","kind":"FunctionDeclaration","signature":"/**\n * Define a co-located, composable {@link Fragment}: a named selection over `table`. The returned\n * value is callable (the `build` transform), so it threads through the existing `sub`/`Rels`\n * spine — no GraphQL, no codegen, no schema change (design §3).\n *\n * ```ts\n * const UserAvatar = defineFragment(schema.user, (f) => f.select(\"id\", \"name\", \"avatarUrl\"));\n * const CommentRow = defineFragment(schema.comment, (f) =>\n *   f.select(\"id\", \"body\", \"authorId\")\n *    .sub(\"author\", schema.user, { parent: [\"authorId\"], child: [\"id\"] }, UserAvatar));\n * ```\n */\nexport declare function defineFragment<C extends AnyCols, Rels = {}, Sel extends string = never, LocalRels = Rels>(table: TableLike<C>, build: (q: Query<C>) => Query<C, Rels, boolean, Sel, LocalRels>): Fragment<C, Rels, Sel, LocalRels>;","description":"Define a co-located, composable {@link Fragment}: a named selection over `table`. The returned\nvalue is callable (the `build` transform), so it threads through the existing `sub`/`Rels`\nspine — no GraphQL, no codegen, no schema change (design §3).\n\n```ts\nconst UserAvatar = defineFragment(schema.user, (f) => f.select(\"id\", \"name\", \"avatarUrl\"));\nconst CommentRow = defineFragment(schema.comment, (f) =>\n  f.select(\"id\", \"body\", \"authorId\")\n   .sub(\"author\", schema.user, { parent: [\"authorId\"], child: [\"id\"] }, UserAvatar));\n```","source":"packages/client/src/query.ts","line":577,"href":"/reference/typescript/client/#symbol-defineFragment"},{"name":"defineMutators","originalName":"defineMutators","kind":"FunctionDeclaration","signature":"export declare function defineMutators<S extends ColsMap, P extends Record<string, string>>(_schema: Schema<S, P>): {\n    shared<Args, Ctx extends MutatorCtx = MutatorCtx>(args: ArgSchema<Args>, run: (tx: IsoTx<S, P>, args: Args, ctx: Ctx) => MutationGen): SharedMutatorWithArgs<Args, Ctx>;\n};","description":"","source":"packages/client/src/mutation-ops.ts","line":202,"href":"/reference/typescript/client/#symbol-defineMutators"},{"name":"defineQuery","originalName":"defineQuery","kind":"FunctionDeclaration","signature":"/**\n * Define ONE co-located, named query. Keep it next to the component that reads it (a `*.queries.ts`\n * file), so a query lives where its fragments and its component live.\n *\n * The returned value is callable on the client (it stamps its result with `name` + args, so the\n * subscription SYNCS) and registerable on the server ({@link registerQueries}). The optional\n * `validate` step turns untrusted wire args into the canonical args type — and that type flows to\n * both the call signature and `build`, so the shape is written exactly once. `validate` runs on\n * BOTH tiers (it builds the byte-identical authoritative AST on the server, and guards + guarantees\n * the same AST on the client). If the server must DIVERGE from the client, define a second\n * `defineQuery` with the same `name` for the server and register that one instead.\n *\n * `build` may take a second CONTEXT parameter (see {@link QueryBuilder}). Context is off-wire: the\n * client passes its session ctx at the callsite, the server injects its authoritative ctx — so a\n * per-user query stays symmetric without ever trusting (or transmitting) a client-supplied identity.\n *\n * ```ts\n * // recentComments({ limit }) — validated, no ctx, byte-identical on both tiers\n * export const recentCommentsQuery = defineQuery(\n *   \"recentComments\",\n *   (raw): { limit: number } => ({ limit: validateFeedLimit(raw) }),\n *   ({ limit }) => q.comment.orderBy(\"createdAt\", \"desc\").limit(limit).include(FeedItemFragment),\n * );\n *\n * // myIssues({ limit }, ctx) — ctx-scoped; the wire still carries only { limit }\n * export const myIssuesQuery = defineQuery(\n *   \"myIssues\",\n *   (raw): { limit: number } => ({ limit: validateLimit(raw) }),\n *   ({ limit }, ctx: { user: string }) => q.issue.where.ownerId(ctx.user).limit(limit),\n * );\n * // client: myIssuesQuery({ limit: 20 }, { user: currentUser() })\n * ```\n */\nexport declare function defineQuery<Q extends AnyQuery>(name: string, build: () => Q, options?: DefineQueryOptions<void>): NamedQuery<void, [\n], Q>;\nexport declare function defineQuery<Args, Ctx extends readonly unknown[], Q extends AnyQuery>(name: string, build: (args: Args, ...ctx: Ctx) => Q, options?: DefineQueryOptions<Args>): NamedQuery<Args, Ctx, Q>;\nexport declare function defineQuery<Args, Ctx extends readonly unknown[], Q extends AnyQuery>(name: string, validate: QueryValidator<Args>, build: (args: Args, ...ctx: Ctx) => Q, options?: DefineQueryOptions<Args>): NamedQuery<Args, Ctx, Q>;","description":"Define ONE co-located, named query. Keep it next to the component that reads it (a `*.queries.ts`\nfile), so a query lives where its fragments and its component live.\n\nThe returned value is callable on the client (it stamps its result with `name` + args, so the\nsubscription SYNCS) and registerable on the server ({@link registerQueries }). The optional\n`validate` step turns untrusted wire args into the canonical args type — and that type flows to\nboth the call signature and `build`, so the shape is written exactly once. `validate` runs on\nBOTH tiers (it builds the byte-identical authoritative AST on the server, and guards + guarantees\nthe same AST on the client). If the server must DIVERGE from the client, define a second\n`defineQuery` with the same `name` for the server and register that one instead.\n\n`build` may take a second CONTEXT parameter (see {@link QueryBuilder}). Context is off-wire: the\nclient passes its session ctx at the callsite, the server injects its authoritative ctx — so a\nper-user query stays symmetric without ever trusting (or transmitting) a client-supplied identity.\n\n```ts\n// recentComments({ limit }) — validated, no ctx, byte-identical on both tiers\nexport const recentCommentsQuery = defineQuery(\n  \"recentComments\",\n  (raw): { limit: number } => ({ limit: validateFeedLimit(raw) }),\n  ({ limit }) => q.comment.orderBy(\"createdAt\", \"desc\").limit(limit).include(FeedItemFragment),\n);\n\n// myIssues({ limit }, ctx) — ctx-scoped; the wire still carries only { limit }\nexport const myIssuesQuery = defineQuery(\n  \"myIssues\",\n  (raw): { limit: number } => ({ limit: validateLimit(raw) }),\n  ({ limit }, ctx: { user: string }) => q.issue.where.ownerId(ctx.user).limit(limit),\n);\n// client: myIssuesQuery({ limit: 20 }, { user: currentUser() })\n```","source":"packages/client/src/query.ts","line":472,"href":"/reference/typescript/client/#symbol-defineQuery"},{"name":"DefineQueryOptions","originalName":"DefineQueryOptions","kind":"InterfaceDeclaration","signature":"/** Options for {@link defineQuery}. */\nexport interface DefineQueryOptions<Args = any> {\n    /** Declare this query realtime-eligible — see {@link RealtimeQueryLabel}. */\n    realtime?: RealtimeQueryLabel<Args>;\n}","description":"Options for {@link defineQuery}.","source":"packages/client/src/query.ts","line":383,"href":"/reference/typescript/client/#symbol-DefineQueryOptions"},{"name":"defineRelationships","originalName":"defineRelationships","kind":"FunctionDeclaration","signature":"/** A typed registry of named {@link Relationship}s — `defineRelationships({ issueOwner: rel(...) })`.\n *  A thin identity helper that names the bag and constrains its values; the keys are yours to choose. */\nexport declare function defineRelationships<R extends Record<string, AnyRelationship>>(rels: R): R;","description":"A typed registry of named {@link Relationship}s — `defineRelationships({ issueOwner: rel(...) })`.\nA thin identity helper that names the bag and constrains its values; the keys are yours to choose.","source":"packages/client/src/schema.ts","line":488,"href":"/reference/typescript/client/#symbol-defineRelationships"},{"name":"DehydratedQuery","originalName":"DehydratedQuery","kind":"InterfaceDeclaration","signature":"/** One query's SSR snapshot, keyed by its `viewKey` ({@link stableKey} of the AST): the\n *  pre-projected first-paint `rows` plus the `cvMin` watermark they reflect (SSR-DESIGN.md §6.2).\n *  Serializable as-is into the HTML — `rows` are already JSON values (json columns parsed). */\nexport interface DehydratedQuery {\n    rows: unknown[];\n    cvMin: number;\n}","description":"One query's SSR snapshot, keyed by its `viewKey` ({@link stableKey} of the AST): the\npre-projected first-paint `rows` plus the `cvMin` watermark they reflect (SSR-DESIGN.md §6.2).\nSerializable as-is into the HTML — `rows` are already JSON values (json columns parsed).","source":"packages/client/src/store.ts","line":20,"href":"/reference/typescript/client/#symbol-DehydratedQuery"},{"name":"DehydratedState","originalName":"DehydratedState","kind":"TypeAliasDeclaration","signature":"/** The whole dehydrated cache: every preloaded query's snapshot, keyed by `viewKey`. The server\n *  builds it with {@link Store.dehydrate}; the browser seeds it with {@link Store.hydrate}. */\nexport type DehydratedState = Record<string, DehydratedQuery>;","description":"The whole dehydrated cache: every preloaded query's snapshot, keyed by `viewKey`. The server\nbuilds it with {@link Store.dehydrate}; the browser seeds it with {@link Store.hydrate}.","source":"packages/client/src/store.ts","line":27,"href":"/reference/typescript/client/#symbol-DehydratedState"},{"name":"Dir","originalName":"Dir","kind":"TypeAliasDeclaration","signature":"export type Dir = \"asc\" | \"desc\";","description":"","source":"packages/client/src/ast.ts","line":5,"href":"/reference/typescript/client/#symbol-Dir"},{"name":"driveMutationAsync","originalName":"driveMutationAsync","kind":"FunctionDeclaration","signature":"/** Drive a generator mutator ASYNCHRONOUSLY (the server, against the open transaction). Writes are\n *  awaited (harmless: a single interactive Postgres connection serializes statements anyway, and the\n *  daemon backend resolves them instantly), reads (point or query) suspend, and a batch fans out with\n *  `Promise.all`. */\nexport declare function driveMutationAsync(gen: MutationGen, exec: AsyncEffectExec): Promise<void>;","description":"Drive a generator mutator ASYNCHRONOUSLY (the server, against the open transaction). Writes are\nawaited (harmless: a single interactive Postgres connection serializes statements anyway, and the\ndaemon backend resolves them instantly), reads (point or query) suspend, and a batch fans out with\n`Promise.all`.","source":"packages/client/src/mutation-ops.ts","line":257,"href":"/reference/typescript/client/#symbol-driveMutationAsync"},{"name":"driveMutationSync","originalName":"driveMutationSync","kind":"FunctionDeclaration","signature":"/** Drive a generator mutator SYNCHRONOUSLY (the client, inside the wasm write transaction). Each\n *  yielded write applies immediately; each read (point or query) is resolved and fed back; a batch\n *  runs in order. */\nexport declare function driveMutationSync(gen: MutationGen, exec: SyncEffectExec): void;","description":"Drive a generator mutator SYNCHRONOUSLY (the client, inside the wasm write transaction). Each\nyielded write applies immediately; each read (point or query) is resolved and fed back; a batch\nruns in order.","source":"packages/client/src/mutation-ops.ts","line":235,"href":"/reference/typescript/client/#symbol-driveMutationSync"},{"name":"EnsureQueryOptions","originalName":"EnsureQueryOptions","kind":"InterfaceDeclaration","signature":"export interface EnsureQueryOptions {\n    /** Readiness policy. Defaults to `complete`. */\n    until?: EnsureQueryUntil;\n    /** Cancel this caller's wait. The shared query may stay retained for another waiter/prefetch. */\n    signal?: AbortSignal;\n}","description":"","source":"packages/client/src/ensure.ts","line":22,"href":"/reference/typescript/client/#symbol-EnsureQueryOptions"},{"name":"EnsureQueryUntil","originalName":"EnsureQueryUntil","kind":"TypeAliasDeclaration","signature":"/** When an {@link QueryEnsureCache.ensure} call may resolve.\n *\n * - `complete` waits for the server-authoritative result (the default).\n * - `present` resolves as soon as the local view contains a result, while the remote retain keeps\n *   revalidating in the background. An authoritative empty result also resolves it, so a real\n *   not-found query never waits forever.\n *\n * `present` deliberately does not add a `partial` {@link ResultType}: a locally useful answer and\n * server authority are independent facts. While it resolves early, the view's result type remains\n * `unknown` until the server says otherwise. */\nexport type EnsureQueryUntil = \"complete\" | \"present\";","description":"When an {@link QueryEnsureCache.ensure} call may resolve.\n\n- `complete` waits for the server-authoritative result (the default).\n- `present` resolves as soon as the local view contains a result, while the remote retain keeps\n revalidating in the background. An authoritative empty result also resolves it, so a real\n not-found query never waits forever.\n\n`present` deliberately does not add a `partial` {@link ResultType}: a locally useful answer and\nserver authority are independent facts. While it resolves early, the view's result type remains\n`unknown` until the server says otherwise.","source":"packages/client/src/ensure.ts","line":20,"href":"/reference/typescript/client/#symbol-EnsureQueryUntil"},{"name":"eq","originalName":"eq","kind":"VariableDeclaration","signature":"export declare const eq: <V>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":26,"href":"/reference/typescript/client/#symbol-eq"},{"name":"exists","originalName":"exists","kind":"FunctionDeclaration","signature":"/** `EXISTS` by a named {@link Relationship} — correlation from the rel; the parent row type is the\n *  relationship's parent, so the condition lands on the matching `.where()`. */\nexport declare function exists<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<RowOf<PC>>;\n/** `EXISTS (<correlated subquery>)` — a condition (use inside `where`/`or`/`and`). */\nexport declare function exists<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<R>;","description":"`EXISTS` by a named {@link Relationship} — correlation from the rel; the parent row type is the\nrelationship's parent, so the condition lands on the matching `.where()`.\n`EXISTS (<correlated subquery>)` — a condition (use inside `where`/`or`/`and`).","source":"packages/client/src/query.ts","line":1210,"href":"/reference/typescript/client/#symbol-exists"},{"name":"existsNoSync","originalName":"existsNoSync","kind":"FunctionDeclaration","signature":"/**\n * `EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate (`exists_noSync`).\n * Identical to {@link exists} for filtering parent visibility, but stamps the subquery\n * `system: \"permissions\"`, so the engine's normalized serializer prunes its witnesses from the\n * footprint — the permission table's rows are never synced to the client and the client never\n * re-evaluates the gate. Use this when building the **server's** query (the user's API server);\n * the client holds its own un-gated query.\n */\nexport declare function existsNoSync<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<RowOf<PC>>;\nexport declare function existsNoSync<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<R>;","description":"`EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate (`exists_noSync`).\nIdentical to {@link exists} for filtering parent visibility, but stamps the subquery\n`system: \"permissions\"`, so the engine's normalized serializer prunes its witnesses from the\nfootprint — the permission table's rows are never synced to the client and the client never\nre-evaluates the gate. Use this when building the **server's** query (the user's API server);\nthe client holds its own un-gated query.","source":"packages/client/src/query.ts","line":1255,"href":"/reference/typescript/client/#symbol-existsNoSync"},{"name":"ExistsOp","originalName":"ExistsOp","kind":"TypeAliasDeclaration","signature":"export type ExistsOp = \"EXISTS\" | \"NOT EXISTS\";","description":"","source":"packages/client/src/ast.ts","line":35,"href":"/reference/typescript/client/#symbol-ExistsOp"},{"name":"ExistsOpts","originalName":"ExistsOpts","kind":"InterfaceDeclaration","signature":"/** Options for `exists` / `notExists`. */\nexport interface ExistsOpts {\n    /**\n     * Fold this `EXISTS` as a build-time **scalar** subquery: when the child binds a\n     * statically-unique key, the engine reads it once, inlines the correlation value as a\n     * literal, and deletes the join. **Snapshot semantics** — the inlined value does not\n     * react to later child changes. Defaults to `false` (a live `EXISTS` join).\n     */\n    scalar?: boolean;\n}","description":"Options for `exists` / `notExists`.","source":"packages/client/src/query.ts","line":1173,"href":"/reference/typescript/client/#symbol-ExistsOpts"},{"name":"extendSchema","originalName":"extendSchema","kind":"FunctionDeclaration","signature":"/** Extend a generated/synced schema with client-authoritative local-only tables.\n *\n *  This is the ergonomic path for SQL-first apps: keep `schema.gen.ts` fully generated, define\n *  private UI tables in a tiny hand-written file, then hand the combined schema to the browser\n *  client. The added tables MUST be `table(name, { local: true })`: `extendSchema` deliberately\n *  refuses to append ordinary synced tables, because those need to come from daemon introspection\n *  (`rindle schema gen`) so the server and client cannot drift. */\nexport declare function extendSchema<S extends ColsMap, P extends Record<string, string>, const T extends readonly AnyTable[]>(base: Schema<S, P>, opts: {\n    tables: T;\n}): Schema<S & SchemaOf<T>, P & PkMapOf<T>>;","description":"Extend a generated/synced schema with client-authoritative local-only tables.\n\nThis is the ergonomic path for SQL-first apps: keep `schema.gen.ts` fully generated, define\nprivate UI tables in a tiny hand-written file, then hand the combined schema to the browser\nclient. The added tables MUST be `table(name, { local: true })`: `extendSchema` deliberately\nrefuses to append ordinary synced tables, because those need to come from daemon introspection\n(`rindle schema gen`) so the server and client cannot drift.","source":"packages/client/src/schema.ts","line":245,"href":"/reference/typescript/client/#symbol-extendSchema"},{"name":"fieldCondition","originalName":"fieldCondition","kind":"FunctionDeclaration","signature":"/** Build a `simple` condition from a field name + (predicate | bare value). */\nexport declare function fieldCondition(field: string, arg: unknown): Condition;","description":"Build a `simple` condition from a field name + (predicate | bare value).","source":"packages/client/src/operators.ts","line":54,"href":"/reference/typescript/client/#symbol-fieldCondition"},{"name":"FlatArrayView","originalName":"FlatArrayView","kind":"ClassDeclaration","signature":"export declare class FlatArrayView<R = unknown> implements ArrayView<R> {\n    private readonly _qid;\n    private _schema;\n    private types?;\n    private seeded;\n    private top;\n    private dirty;\n    private cached;\n    private rt;\n    private readonly listeners;\n    private readonly changeListeners;\n    private pendingSegments;\n    constructor(schema?: WireSchema, types?: ViewTypes, qid?: QueryId);\n    get qid(): QueryId;\n    get schema(): WireSchema | null;\n    get resultType(): ResultType;\n    /** Set the query's lifecycle state (the Store routes the backend's per-query signal here).\n     *  Notifies subscribers on a change so a status-bound listener (React `useQueryStatus`) re-reads,\n     *  WITHOUT re-projecting data (it is unchanged). */\n    setResultType(rt: ResultType): void;\n    /** (Re)bind to a schema and clear the tree IN PLACE. The first `hello` (pending → ready)\n     *  and a re-hydrate (gap → new epoch — FLAT-CHANGES-DESIGN.md §2.3) both go through here, so\n     *  the caller's view reference and its subscribers survive a re-subscribe. Does NOT notify —\n     *  the snapshot that follows (`applyChanges`) does, avoiding an empty-then-filled flicker.\n     *  KEEPS any SSR `seeded` rows: they are retired only when the first live snapshot lands\n     *  ({@link retireSeed}, driven by the Store), so `data` shows the seed — not an empty tree —\n     *  across the whole `hello`→first-`snapshot` gap. */\n    reset(schema: WireSchema, types?: ViewTypes): void;\n    /** Install a pre-projected SSR first-paint snapshot (SSR-DESIGN.md §6). The rows are already\n     *  in result shape (json columns parsed, relationships nested), so a view with no live backend\n     *  (the server one-shot Store) reads them directly, and a browser view shows them until its\n     *  first live snapshot lands ({@link retireSeed}). Does NOT notify — it is set at materialize\n     *  time, before any subscriber, and the live snapshot that follows notifies. */\n    seed(rows: readonly R[]): void;\n    /** Retire the SSR first-paint seed — the Store calls this as it folds the maintained tree's first\n     *  live snapshot, so `data` switches from the seed to the live tree with no empty gap between them\n     *  (the seed deliberately survived the earlier `reset`/`hello`). Idempotent. Does NOT notify — the\n     *  snapshot fold it accompanies does; BUT when that fold is empty (a 0-row result, or rows already\n     *  in `top`) it notifies nothing, so the Store forces a {@link notify} on the strength of the `true`\n     *  return here — else the view reads the live tree yet never re-renders (a frozen seed). Returns\n     *  whether a live seed was actually cleared (so the Store knows a forced notify is owed). */\n    retireSeed(): boolean;\n    /** Apply a batch (the hydrate snapshot or one transaction's events) in order, then\n     *  notify subscribers once. Order is significant (FLAT-CHANGES-DESIGN.md §5.4). A no-op\n     *  while pending (changes never precede the `hello` that resets the schema).\n     *\n     *  `enrichRemoves` ⇒ before a removed node is dropped, reconstruct its full subtree and attach it\n     *  to the `remove` op's `node` (in place, so the same event object the Store fans out to its\n     *  change subscribers carries it). Off by default — paid only when a consumer asked for it, and\n     *  only on a real eviction (an rc-decrement that keeps the row leaves `node` absent). A view with\n     *  an attached {@link onChanges} listener ALSO enriches (per-view, no global opt-in), so a\n     *  narrator can resolve a removed row's subs whether or not the store-global counter is set.\n     *\n     *  `deferNotify` ⇒ fold but do NOT notify; the caller is responsible for calling {@link flush}\n     *  later. The Store uses this to fold every view in one commit before notifying any subscriber\n     *  (cross-view-atomic notification — `Store.onCommitBoundary`); standalone use leaves it off, so\n     *  a bare view still fires its subscribers after each applied batch.\n     *\n     *  `phase` tags the {@link onChanges} delivery (`snapshot` for the hydrate, `batch` otherwise); it\n     *  does not affect the fold. Returns whether the batch changed the view (so a deferring caller\n     *  knows it must be flushed). */\n    applyChanges(events: FlatChange[], enrichRemoves?: boolean, deferNotify?: boolean, phase?: ChangePhase): boolean;\n    /** Notify subscribers with the current data. The deferred half of {@link applyChanges} (when\n     *  `deferNotify` was set): the Store calls this at the commit-notify barrier — after every view\n     *  touched by the same commit has folded — so a subscriber that re-reads a sibling view inside\n     *  its callback observes post-commit data, never a torn mid-commit state. */\n    flush(): void;\n    get data(): readonly R[];\n    subscribe(listener: (data: readonly R[]) => void): () => void;\n    onChanges(listener: ViewChangeListener): () => void;\n    /** Net the folded batch and hand the survivors to the change listeners, AFTER the data `notify`\n     *  (the order `Store.subscribeChanges` consumers already observe). A batch that nets to nothing —\n     *  a correctly predicted rebase — makes no call, so a narrator sees only real change. Each listener\n     *  is isolated: a throwing one reports to `note` (the caller re-raises the first) and the rest still\n     *  run, so one bad narration template never starves a sibling listener nor corrupts the view. */\n    private deliverChanges;\n    destroy(): void;\n    private applyAt;\n    private applyOp;\n    private applyAdd;\n    /** Drop one path to `row`. Returns the evicted {@link Node} (its full subtree intact) when the\n     *  last path went away — `null` when another path still holds it (rc decremented, nothing left\n     *  the result). */\n    private applyRemove;\n    private applyEdit;\n    private project;\n    /** Notify data subscribers with the current {@link data}. Normally driven by a fold ({@link\n     *  applyChanges}/{@link flush}); the Store also calls it directly to land a seed retirement whose\n     *  accompanying fold was empty (see {@link retireSeed}). */\n    notify(): void;\n}","description":"","source":"packages/client/src/view.ts","line":348,"href":"/reference/typescript/client/#symbol-FlatArrayView"},{"name":"FlatChange","originalName":"FlatChange","kind":"InterfaceDeclaration","signature":"export interface FlatChange {\n    path: PathSeg[];\n    op: FlatOp;\n}","description":"","source":"packages/client/src/types.ts","line":69,"href":"/reference/typescript/client/#symbol-FlatChange"},{"name":"FlatOp","originalName":"FlatOp","kind":"TypeAliasDeclaration","signature":"/** A positional change at one level of the view tree. A `remove` ships only the leaving `row`\n *  (the receiver already holds the subtree and locates it by key) — `node` is NEVER on the wire;\n *  it is an OPTIONAL client-side enrichment carrying the full removed subtree, attached by the\n *  ArrayView when a change consumer opts in (`Store.subscribeChanges(_, { removedSubtree: true })`),\n *  so a narrator can resolve a removed row's nested subs just as it can on an `add`. */\nexport type FlatOp = {\n    tag: \"add\";\n    node: WireNode;\n} | {\n    tag: \"remove\";\n    row: WireValue[];\n    node?: WireNode;\n} | {\n    tag: \"edit\";\n    old: WireValue[];\n    new: WireValue[];\n};","description":"A positional change at one level of the view tree. A `remove` ships only the leaving `row`\n(the receiver already holds the subtree and locates it by key) — `node` is NEVER on the wire;\nit is an OPTIONAL client-side enrichment carrying the full removed subtree, attached by the\nArrayView when a change consumer opts in (`Store.subscribeChanges(_, { removedSubtree: true })`),\nso a narrator can resolve a removed row's nested subs just as it can on an `add`.","source":"packages/client/src/types.ts","line":64,"href":"/reference/typescript/client/#symbol-FlatOp"},{"name":"Fragment","originalName":"Fragment","kind":"InterfaceDeclaration","signature":"/**\n * A reusable, typed *selection over a table* — Relay's \"fragment\", promoted to a first-class\n * value. **Two verbs** compose a fragment, on one axis — does its data belong to THIS row or to a\n * related one:\n *\n *   - SAME node — `q.include(Frag)`: merge its selection into this node. This is also how you\n *     **root** a fragment onto a base query — `queries.t.where.id(x).include(Frag)`.\n *   - CHILD node — `q.sub(alias, child, corr, Frag)`: nest it under a relationship (`sub`'s 4th arg).\n *\n * A `Fragment` is therefore also a `build` transform (`(q: Query<C>) => Query<C, Rels>`); that\n * call signature is the mechanism by which `sub` accepts a fragment as its build. Prefer\n * `include` to root a fragment (canonical + merged) over calling it directly. It additionally\n * carries its `table` (for {@link FragmentRef}/`useFragment` typing and masking). Composing\n * fragments assembles ONE {@link Ast} → one materialization → one `/query` — the whole point\n * (no request waterfall; design §1).\n */\nexport interface Fragment<C extends AnyCols, Rels = {}, Sel extends string = never, LocalRels = Rels> {\n    (q: Query<C>): Query<C, Rels, false, Sel, LocalRels>;\n    readonly table: TableLike<C>;\n    readonly [FRAGMENT_BRAND]: true;\n}","description":"A reusable, typed *selection over a table* — Relay's \"fragment\", promoted to a first-class\nvalue. **Two verbs** compose a fragment, on one axis — does its data belong to THIS row or to a\nrelated one:\n\n  - SAME node — `q.include(Frag)`: merge its selection into this node. This is also how you\n    **root** a fragment onto a base query — `queries.t.where.id(x).include(Frag)`.\n  - CHILD node — `q.sub(alias, child, corr, Frag)`: nest it under a relationship (`sub`'s 4th arg).\n\nA `Fragment` is therefore also a `build` transform (`(q: Query<C>) => Query<C, Rels>`); that\ncall signature is the mechanism by which `sub` accepts a fragment as its build. Prefer\n`include` to root a fragment (canonical + merged) over calling it directly. It additionally\ncarries its `table` (for {@link FragmentRef}/`useFragment` typing and masking). Composing\nfragments assembles ONE {@link Ast} → one materialization → one `/query` — the whole point\n(no request waterfall; design §1).","source":"packages/client/src/query.ts","line":533,"href":"/reference/typescript/client/#symbol-Fragment"},{"name":"fragmentAst","originalName":"fragmentAst","kind":"FunctionDeclaration","signature":"export declare function fragmentAst<F extends Fragment<any, any, any>>(fragment: F): Ast;","description":"","source":"packages/client/src/query.ts","line":651,"href":"/reference/typescript/client/#symbol-fragmentAst"},{"name":"FragmentCoverage","originalName":"FragmentCoverage","kind":"InterfaceDeclaration","signature":"export interface FragmentCoverage<Q extends AnyQuery = AnyQuery> {\n    readonly key: string;\n    readonly query: Q;\n}","description":"","source":"packages/client/src/query.ts","line":548,"href":"/reference/typescript/client/#symbol-FragmentCoverage"},{"name":"FragmentData","originalName":"FragmentData","kind":"TypeAliasDeclaration","signature":"/**\n * The data returned by `useFragment(fragment, ref)`: the fragment's own selected columns plus\n * immediate relationship values. Relationships whose builder is another fragment surface as\n * opaque {@link FragmentRef}s, so child-owned payload is read only by the child fragment reader.\n */\nexport type FragmentData<F> = F extends Fragment<infer C, unknown, infer Sel, infer LocalRels> ? Projected<C, Sel> & LocalRels : never;","description":"The data returned by `useFragment(fragment, ref)`: the fragment's own selected columns plus\nimmediate relationship values. Relationships whose builder is another fragment surface as\nopaque {@link FragmentRef}s, so child-owned payload is read only by the child fragment reader.","source":"packages/client/src/query.ts","line":544,"href":"/reference/typescript/client/#symbol-FragmentData"},{"name":"fragmentKey","originalName":"fragmentKey","kind":"FunctionDeclaration","signature":"export declare function fragmentKey(ref: FragmentRef<any>): string;","description":"","source":"packages/client/src/query.ts","line":605,"href":"/reference/typescript/client/#symbol-fragmentKey"},{"name":"FragmentRef","originalName":"FragmentRef","kind":"TypeAliasDeclaration","signature":"/** The opaque token a parent passes to a component that reads {@link FragmentData} for `F`. */\nexport type FragmentRef<F> = F extends Fragment<any, any, any, any> ? LocalFragmentRef<F> : never;","description":"The opaque token a parent passes to a component that reads {@link FragmentData} for `F`.","source":"packages/client/src/query.ts","line":563,"href":"/reference/typescript/client/#symbol-FragmentRef"},{"name":"frameResumePoint","originalName":"frameResumePoint","kind":"FunctionDeclaration","signature":"/** The resume point a frame implies — what rides an SSE `id:` line so a reconnecting `EventSource`\n *  hands it straight back as `Last-Event-ID`. `undefined` for frames that are not a position. */\nexport declare function frameResumePoint(frame: StreamFrame): number | undefined;","description":"The resume point a frame implies — what rides an SSE `id:` line so a reconnecting `EventSource`\nhands it straight back as `Last-Event-ID`. `undefined` for frames that are not a position.","source":"packages/client/src/stream.ts","line":51,"href":"/reference/typescript/client/#symbol-frameResumePoint"},{"name":"ge","originalName":"ge","kind":"VariableDeclaration","signature":"export declare const ge: <V extends number | string>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":29,"href":"/reference/typescript/client/#symbol-ge"},{"name":"gt","originalName":"gt","kind":"VariableDeclaration","signature":"export declare const gt: <V extends number | string>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":28,"href":"/reference/typescript/client/#symbol-gt"},{"name":"ilike","originalName":"ilike","kind":"VariableDeclaration","signature":"export declare const ilike: (pattern: string) => Pred<string>;","description":"","source":"packages/client/src/operators.ts","line":34,"href":"/reference/typescript/client/#symbol-ilike"},{"name":"inList","originalName":"inList","kind":"VariableDeclaration","signature":"export declare const inList: <V>(values: V[]) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":36,"href":"/reference/typescript/client/#symbol-inList"},{"name":"Insert","originalName":"Insert","kind":"TypeAliasDeclaration","signature":"/** The insert type of a table def: `Insert<typeof issue>` → `{ id: string; … assignee?: string | null }`.\n *  The whole-table ergonomic form of {@link InsertOf} (the insert-side twin of {@link Row}). */\nexport type Insert<T extends AnyTable> = InsertOf<T[typeof SCHEMA][\"columns\"]>;","description":"The insert type of a table def: `Insert<typeof issue>` → `{ id: string; … assignee?: string | null }`.\nThe whole-table ergonomic form of {@link InsertOf} (the insert-side twin of {@link Row}).","source":"packages/client/src/schema.ts","line":136,"href":"/reference/typescript/client/#symbol-Insert"},{"name":"insertCell","originalName":"insertCell","kind":"FunctionDeclaration","signature":"/** The cell a full insert writes for column `c`: the given value, or `null` when a nullable column\n *  is omitted (design 206 §6.2). The caller's completeness check ({@link InsertPlan.required})\n *  guarantees a non-nullable column is present, so its omission never reaches here. */\nexport declare function insertCell(row: Record<string, WireValue>, c: string): WireValue;","description":"The cell a full insert writes for column `c`: the given value, or `null` when a nullable column\nis omitted (design 206 §6.2). The caller's completeness check ({@link InsertPlan.required})\nguarantees a non-nullable column is present, so its omission never reaches here.","source":"packages/client/src/schema.ts","line":528,"href":"/reference/typescript/client/#symbol-insertCell"},{"name":"InsertOf","originalName":"InsertOf","kind":"TypeAliasDeclaration","signature":"/** The INSERT shape of a column map: {@link RowOf} with every NULLABLE column made OPTIONAL (`?`) —\n *  it may be omitted and is filled with `null` by both write funnels (design 206 §6.2/§7). `NOT NULL`\n *  columns stay required. The insert-side twin of {@link RowOf}, mirroring Drizzle's `$inferInsert`\n *  vs `$inferSelect` split. */\nexport type InsertOf<C extends AnyCols> = Simplify<{\n    [K in keyof C as InsertOptional<C[K]> extends true ? never : K]: ColT<C[K]>;\n} & {\n    [K in keyof C as InsertOptional<C[K]> extends true ? K : never]?: ColT<C[K]>;\n}>;","description":"The INSERT shape of a column map: {@link RowOf} with every NULLABLE column made OPTIONAL (`?`) —\nit may be omitted and is filled with `null` by both write funnels (design 206 §6.2/§7). `NOT NULL`\ncolumns stay required. The insert-side twin of {@link RowOf}, mirroring Drizzle's `$inferInsert`\nvs `$inferSelect` split.","source":"packages/client/src/schema.ts","line":128,"href":"/reference/typescript/client/#symbol-InsertOf"},{"name":"insertPlan","originalName":"insertPlan","kind":"FunctionDeclaration","signature":"/** Derive a table's {@link InsertPlan} from its column markers. */\nexport declare function insertPlan(meta: TableMeta): InsertPlan;","description":"Derive a table's {@link InsertPlan} from its column markers.","source":"packages/client/src/schema.ts","line":519,"href":"/reference/typescript/client/#symbol-insertPlan"},{"name":"InsertPlan","originalName":"InsertPlan","kind":"InterfaceDeclaration","signature":"/** A table's insert-completeness plan, derived once from its `Col` markers and shared by BOTH write\n *  funnels — the client `trackingTx` and the server `renderOp` — so their required-sets can't drift\n *  (design 206 §6.1/§6.2). A `NOT NULL` column is `required`; a nullable column (`.nullable()` set\n *  `Col.optional`) may be omitted and is filled with `null` (see {@link insertCell}). PK columns are\n *  never nullable (introspection forces them non-null), so they are always required. */\nexport interface InsertPlan {\n    /** Every column, in wire order. */\n    readonly columns: string[];\n    /** Columns that MUST be present on a full insert — the non-nullable ones. */\n    readonly required: string[];\n    /** The nullable (omittable-to-null) columns, for a fast membership test in the fill. */\n    readonly nullable: ReadonlySet<string>;\n}","description":"A table's insert-completeness plan, derived once from its `Col` markers and shared by BOTH write\nfunnels — the client `trackingTx` and the server `renderOp` — so their required-sets can't drift\n(design 206 §6.1/§6.2). A `NOT NULL` column is `required`; a nullable column (`.nullable()` set\n`Col.optional`) may be omitted and is filled with `null` (see {@link insertCell}). PK columns are\nnever nullable (introspection forces them non-null), so they are always required.","source":"packages/client/src/schema.ts","line":509,"href":"/reference/typescript/client/#symbol-InsertPlan"},{"name":"int64","originalName":"int64","kind":"VariableDeclaration","signature":"/** The exact-i64 column plane (design 226, `BIGINT`/`INT8` decltype): typed `bigint` in\n *  application code. The vocabulary exists from Stage C4 so generated schemas can name it;\n *  no exact integer cell enters the browser IVM until Stage E — until then the daemon\n *  refuses IVM queries whose footprint touches the column, and the SQL plane carries it. */\nexport declare const int64: <T extends bigint = bigint>() => ColBuilder<T>;","description":"The exact-i64 column plane (design 226, `BIGINT`/`INT8` decltype): typed `bigint` in\napplication code. The vocabulary exists from Stage C4 so generated schemas can name it;\nno exact integer cell enters the browser IVM until Stage E — until then the daemon\nrefuses IVM queries whose footprint touches the column, and the SQL plane carries it.","source":"packages/client/src/schema.ts","line":54,"href":"/reference/typescript/client/#symbol-int64"},{"name":"is","originalName":"is","kind":"VariableDeclaration","signature":"export declare const is: <V>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":38,"href":"/reference/typescript/client/#symbol-is"},{"name":"isFragment","originalName":"isFragment","kind":"FunctionDeclaration","signature":"/** Runtime guard: is `v` a {@link Fragment} (a `defineFragment` value, not a plain build fn)? */\nexport declare function isFragment(v: unknown): v is Fragment<AnyCols, unknown, never, unknown>;","description":"Runtime guard: is `v` a {@link Fragment} (a `defineFragment` value, not a plain build fn)?","source":"packages/client/src/query.ts","line":586,"href":"/reference/typescript/client/#symbol-isFragment"},{"name":"isFragmentRelationship","originalName":"isFragmentRelationship","kind":"FunctionDeclaration","signature":"export declare function isFragmentRelationship(rel: CorrelatedSubquery): boolean;","description":"","source":"packages/client/src/query.ts","line":601,"href":"/reference/typescript/client/#symbol-isFragmentRelationship"},{"name":"isGeneratorMutator","originalName":"isGeneratorMutator","kind":"FunctionDeclaration","signature":"/** True iff `fn` is a generator function (a shared/isomorphic mutator) rather than a plain function —\n *  the driver accepts both forms. Detected structurally (native `GeneratorFunction`). */\nexport declare function isGeneratorMutator(fn: unknown): fn is (...args: never[]) => MutationGen;","description":"True iff `fn` is a generator function (a shared/isomorphic mutator) rather than a plain function —\nthe driver accepts both forms. Detected structurally (native `GeneratorFunction`).","source":"packages/client/src/mutation-ops.ts","line":217,"href":"/reference/typescript/client/#symbol-isGeneratorMutator"},{"name":"isLocalTable","originalName":"isLocalTable","kind":"FunctionDeclaration","signature":"/** Whether `table` is a {@link TableMeta.local local-only} table in `schema` (an unknown table\n *  reads as non-local). The single locality predicate the backends key off. BOTH variants —\n *  `true` and `\"session\"` — are local here; the persisted/ephemeral split matters only to the\n *  persistence plane ({@link persistedLocalTableNames}). */\nexport declare function isLocalTable<S extends ColsMap>(schema: Schema<S>, table: string): boolean;","description":"Whether `table` is a {@link TableMeta.locallocal-only} table in `schema` (an unknown table\nreads as non-local). The single locality predicate the backends key off. BOTH variants —\n`true` and `\"session\"` — are local here; the persisted/ephemeral split matters only to the\npersistence plane ({@link persistedLocalTableNames}).","source":"packages/client/src/schema.ts","line":406,"href":"/reference/typescript/client/#symbol-isLocalTable"},{"name":"isNot","originalName":"isNot","kind":"VariableDeclaration","signature":"export declare const isNot: <V>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":39,"href":"/reference/typescript/client/#symbol-isNot"},{"name":"isNotNull","originalName":"isNotNull","kind":"VariableDeclaration","signature":"/** `IS NOT NULL` — the negation of {@link isNull}; `V` is inferred from the field, like {@link isNull}. */\nexport declare const isNotNull: <V = never>() => Pred<V>;","description":"`IS NOT NULL` — the negation of {@link isNull}; `V` is inferred from the field, like {@link isNull}.","source":"packages/client/src/operators.ts","line":44,"href":"/reference/typescript/client/#symbol-isNotNull"},{"name":"isNull","originalName":"isNull","kind":"VariableDeclaration","signature":"/** `IS NULL` — a field-agnostic null check. `V` is inferred from the field's expected `Arg<V>`\n *  (e.g. `where.signedAt(isNull())`), so it fits a column of any type without a cast. */\nexport declare const isNull: <V = never>() => Pred<V>;","description":"`IS NULL` — a field-agnostic null check. `V` is inferred from the field's expected `Arg<V>`\n(e.g. `where.signedAt(isNull())`), so it fits a column of any type without a cast.","source":"packages/client/src/operators.ts","line":42,"href":"/reference/typescript/client/#symbol-isNull"},{"name":"isoTx","originalName":"isoTx","kind":"VariableDeclaration","signature":"/** The one shared effect factory (stateless — see {@link IsoTx}). Its methods just BUILD a\n *  {@link MutationOp}, so the single instance serves every schema; the generic {@link IsoTx} view is\n *  applied at the authoring site (a `json<T>` cell is a parsed object here and is stringified by the\n *  funnels, {@link toCell}), hence the cast — the runtime shape is schema-agnostic. */\nexport declare const isoTx: IsoTx;","description":"The one shared effect factory (stateless — see {@link IsoTx}). Its methods just BUILD a\n{@link MutationOp}, so the single instance serves every schema; the generic {@link IsoTx} view is\napplied at the authoring site (a `json<T>` cell is a parsed object here and is stringified by the\nfunnels, {@link toCell }), hence the cast — the runtime shape is schema-agnostic.","source":"packages/client/src/mutation-ops.ts","line":127,"href":"/reference/typescript/client/#symbol-isoTx"},{"name":"IsoTx","originalName":"IsoTx","kind":"InterfaceDeclaration","signature":"/** The tier-AGNOSTIC effect factory a generator mutator writes against. Every method just BUILDS an\n *  effect to `yield` — it performs no I/O and holds no state, so the single {@link isoTx} instance is\n *  shared by every mutator on both tiers; only the driver differs. `insert`/`upsert`/`insertIgnore`\n *  require non-nullable columns and permit nullable omissions, which become `null`.\n *  `update`/`delete` require the PK columns; `update` also names the columns to change. */\nexport interface IsoTx<S extends ColsMap = ColsMap, P extends Record<string, string> = PkMap<S>> {\n    /** Insert a row. Omitted nullable columns become `null`; database defaults are not applied. */\n    insert<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Update the row identified by its pk columns (REQUIRED); only the named non-pk columns change. */\n    update<N extends keyof S & string>(table: N, row: UpdateOf<S[N], PkColsOf<S, P, N>>): MutationOp;\n    /** Insert, or replace non-PK columns on PK conflict, with {@link IsoTx.insert}'s omission rules. */\n    upsert<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Insert with {@link IsoTx.insert}'s omission rules, or do nothing on PK conflict. */\n    insertIgnore<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Delete the row identified by its pk columns. */\n    delete<N extends keyof S & string>(table: N, pk: PkOf<S[N], PkColsOf<S, P, N>>): MutationOp;\n    /** Read one row by primary key (read-your-writes). */\n    row<N extends keyof S & string>(table: N, pk: PkOf<S[N], PkColsOf<S, P, N>>): ReadEffect;\n    /** Run a full query (`where`/`orderBy`/`limit`/join) over the state this mutator is mutating —\n     *  read-your-writes, like {@link row} but for arbitrary shapes. Pass a query from the tier-agnostic\n     *  builder, e.g. `tx.query(q.issue.where(\"ownerId\", \"=\", ctx.user))` where `q = newQueryBuilder(schema)`.\n     *  The `yield` evaluates to {@link QueryResultRow}`[]` (cast it — the generator's single next-type is a row). */\n    query(query: QueryArg): QueryEffect;\n    all(effects: readonly YieldEffect[]): BatchEffect;\n}","description":"The tier-AGNOSTIC effect factory a generator mutator writes against. Every method just BUILDS an\neffect to `yield` — it performs no I/O and holds no state, so the single {@link isoTx} instance is\nshared by every mutator on both tiers; only the driver differs. `insert`/`upsert`/`insertIgnore`\nrequire non-nullable columns and permit nullable omissions, which become `null`.\n`update`/`delete` require the PK columns; `update` also names the columns to change.","source":"packages/client/src/mutation-ops.ts","line":102,"href":"/reference/typescript/client/#symbol-IsoTx"},{"name":"IsoTxOf","originalName":"IsoTxOf","kind":"TypeAliasDeclaration","signature":"/** Bind a schema to the mutator authoring surface: `const { shared } = defineMutators(schema)`.\n *\n *  The returned `shared` is the schema-typed twin of the bare {@link shared} — its `tx` is an\n *  {@link IsoTx} parameterized by THIS schema, so `tx.insert`/`update`/`upsert`/`insertIgnore`/`delete`\n *  check the table name, every column name, each column's value type, nullable-omit on inserts, and\n *  the exact primary-key columns on `update`/`delete` — all at compile time. It registers identically\n *  to the bare form (same runtime value, still `satisfies ClientRegistry`, still an isomorphic\n *  generator the server drives): only the AUTHORING types tighten. `schema` is read for its TYPE only\n *  (never at runtime). Reads (`yield tx.row(...)`) stay loosely typed — a generator's single\n *  next-type can't carry a per-table row. */\n/** The typed {@link IsoTx} for a given schema — `IsoTxOf<typeof schema>`. Use it to annotate a helper\n *  that a mutator body passes its `tx` to (e.g. `const ensureUser = (tx: IsoTxOf<typeof schema>, …)`),\n *  so the helper gets the same table/column/pk typing the `defineMutators` `shared` callback does. */\nexport type IsoTxOf<Sch extends Schema> = Sch extends Schema<infer S, infer P> ? IsoTx<S, P> : never;","description":"The typed {@link IsoTx} for a given schema — `IsoTxOf<typeof schema>`. Use it to annotate a helper\nthat a mutator body passes its `tx` to (e.g. `const ensureUser = (tx: IsoTxOf<typeof schema>, …)`),\nso the helper gets the same table/column/pk typing the `defineMutators` `shared` callback does.","source":"packages/client/src/mutation-ops.ts","line":200,"href":"/reference/typescript/client/#symbol-IsoTxOf"},{"name":"isPred","originalName":"isPred","kind":"FunctionDeclaration","signature":"export declare function isPred(x: unknown): x is Pred<unknown>;","description":"","source":"packages/client/src/operators.ts","line":22,"href":"/reference/typescript/client/#symbol-isPred"},{"name":"isRelationship","originalName":"isRelationship","kind":"FunctionDeclaration","signature":"/** Runtime guard: is `v` a {@link Relationship} value (not a table or a plain object)? */\nexport declare function isRelationship(v: unknown): v is AnyRelationship;","description":"Runtime guard: is `v` a {@link Relationship} value (not a table or a plain object)?","source":"packages/client/src/schema.ts","line":493,"href":"/reference/typescript/client/#symbol-isRelationship"},{"name":"isReservedTableName","originalName":"isReservedTableName","kind":"FunctionDeclaration","signature":"/** Whether `name` collides with an engine-reserved synthetic prefix ({@link RESERVED_TABLE_PREFIXES}). */\nexport declare function isReservedTableName(name: string): boolean;","description":"Whether `name` collides with an engine-reserved synthetic prefix ({@link RESERVED_TABLE_PREFIXES}).","source":"packages/client/src/schema.ts","line":223,"href":"/reference/typescript/client/#symbol-isReservedTableName"},{"name":"json","originalName":"json","kind":"VariableDeclaration","signature":"export declare const json: <T = unknown>() => ColBuilder<T>;","description":"","source":"packages/client/src/schema.ts","line":49,"href":"/reference/typescript/client/#symbol-json"},{"name":"KeyedRow","originalName":"KeyedRow","kind":"TypeAliasDeclaration","signature":"/** A keyed row: column name → cell. The ergonomic write shape (validated against the schema at\n *  runtime). JSON columns carry their raw JSON string (a {@link WireValue}), never a parsed object. */\nexport type KeyedRow = Record<string, WireValue>;","description":"A keyed row: column name → cell. The ergonomic write shape (validated against the schema at\nruntime). JSON columns carry their raw JSON string (a {@link WireValue}), never a parsed object.","source":"packages/client/src/mutation-ops.ts","line":13,"href":"/reference/typescript/client/#symbol-KeyedRow"},{"name":"le","originalName":"le","kind":"VariableDeclaration","signature":"export declare const le: <V extends number | string>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":31,"href":"/reference/typescript/client/#symbol-le"},{"name":"like","originalName":"like","kind":"VariableDeclaration","signature":"export declare const like: (pattern: string) => Pred<string>;","description":"","source":"packages/client/src/operators.ts","line":32,"href":"/reference/typescript/client/#symbol-like"},{"name":"LitValue","originalName":"LitValue","kind":"TypeAliasDeclaration","signature":"/** An untagged literal (`null | bool | number | string | array`). Numbers are one f64. */\nexport type LitValue = null | boolean | number | string | LitValue[];","description":"An untagged literal (`null | bool | number | string | array`). Numbers are one f64.","source":"packages/client/src/ast.ts","line":11,"href":"/reference/typescript/client/#symbol-LitValue"},{"name":"LMID_QUERY_NAME","originalName":"LMID_QUERY_NAME","kind":"VariableDeclaration","signature":"/** The reserved server-query name every optimistic client subscribes at connect: the\n *  one-row system query `CLIENT_MUTATIONS_TABLE WHERE client_id = <me>`. The server\n *  derives the identity from the connection (args are ignored). */\nexport declare const LMID_QUERY_NAME = \"_rindle/clientLmid\";","description":"The reserved server-query name every optimistic client subscribes at connect: the\none-row system query `CLIENT_MUTATIONS_TABLE WHERE client_id = <me>`. The server\nderives the identity from the connection (args are ignored).","source":"packages/client/src/types.ts","line":287,"href":"/reference/typescript/client/#symbol-LMID_QUERY_NAME"},{"name":"localFragmentReadAst","originalName":"localFragmentReadAst","kind":"FunctionDeclaration","signature":"export declare function localFragmentReadAst<F extends Fragment<any, any, any>>(fragment: F, ref: LocalFragmentRef<F>, primaryKeyFor: (table: string) => readonly string[]): Ast;","description":"","source":"packages/client/src/query.ts","line":655,"href":"/reference/typescript/client/#symbol-localFragmentReadAst"},{"name":"LocalFragmentRef","originalName":"LocalFragmentRef","kind":"InterfaceDeclaration","signature":"export interface LocalFragmentRef<F extends Fragment<any, any, any, any> = Fragment<any, any, any, any>> {\n    readonly [LOCAL_FRAGMENT_REF_BRAND]: true;\n    readonly source: \"local\";\n    readonly table: string;\n    readonly pk: Readonly<Record<string, LitValue>>;\n    readonly coverage: FragmentCoverage;\n    readonly __fragment?: F;\n}","description":"","source":"packages/client/src/query.ts","line":553,"href":"/reference/typescript/client/#symbol-LocalFragmentRef"},{"name":"localQueryReadAst","originalName":"localQueryReadAst","kind":"FunctionDeclaration","signature":"export declare function localQueryReadAst(query: AnyQuery, primaryKeyFor: (table: string) => readonly string[]): Ast;","description":"","source":"packages/client/src/query.ts","line":687,"href":"/reference/typescript/client/#symbol-localQueryReadAst"},{"name":"localRootFragmentRefsAst","originalName":"localRootFragmentRefsAst","kind":"FunctionDeclaration","signature":"export declare function localRootFragmentRefsAst<F extends Fragment<any, any, any>>(fragment: F, query: AnyQuery, primaryKeyFor: (table: string) => readonly string[]): Ast;","description":"","source":"packages/client/src/query.ts","line":670,"href":"/reference/typescript/client/#symbol-localRootFragmentRefsAst"},{"name":"localSchemaHash","originalName":"localSchemaHash","kind":"FunctionDeclaration","signature":"/** A stable fingerprint of the schema's PERSISTED local tables only — the persistence gate's\n *  `schemaHash` (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §3.3 / P7). Per `local: true` table:\n *  `(name, ordered column names + types + optionality, pk columns)`. Column order is kept (rows are\n *  positional); tables are sorted by name so registration order can't skew it; synced-table AND\n *  `local: \"session\"` changes never move it (reshaping an ephemeral table must not wipe durable\n *  data). The value is the canonical descriptor itself, not a digest — local-table sets are tiny,\n *  and exactness (no collision can ever skip a P7 clear) beats compactness here. */\nexport declare function localSchemaHash<S extends ColsMap>(schema: Schema<S>): string;","description":"A stable fingerprint of the schema's PERSISTED local tables only — the persistence gate's\n`schemaHash` (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §3.3 / P7). Per `local: true` table:\n`(name, ordered column names + types + optionality, pk columns)`. Column order is kept (rows are\npositional); tables are sorted by name so registration order can't skew it; synced-table AND\n`local: \"session\"` changes never move it (reshaping an ephemeral table must not wipe durable\ndata). The value is the canonical descriptor itself, not a digest — local-table sets are tiny,\nand exactness (no collision can ever skip a P7 clear) beats compactness here.","source":"packages/client/src/schema.ts","line":430,"href":"/reference/typescript/client/#symbol-localSchemaHash"},{"name":"localTableNames","originalName":"localTableNames","kind":"FunctionDeclaration","signature":"/** The set of local-only table names in `schema` (`201-LOCAL-ONLY-TABLES-DESIGN.md` §4) — BOTH\n *  variants (`true` and `\"session\"`); every locality rule except persistence keys off this set. */\nexport declare function localTableNames<S extends ColsMap>(schema: Schema<S>): Set<string>;","description":"The set of local-only table names in `schema` (`201-LOCAL-ONLY-TABLES-DESIGN.md` §4) — BOTH\nvariants (`true` and `\"session\"`); every locality rule except persistence keys off this set.","source":"packages/client/src/schema.ts","line":412,"href":"/reference/typescript/client/#symbol-localTableNames"},{"name":"lt","originalName":"lt","kind":"VariableDeclaration","signature":"export declare const lt: <V extends number | string>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":30,"href":"/reference/typescript/client/#symbol-lt"},{"name":"Mutation","originalName":"Mutation","kind":"TypeAliasDeclaration","signature":"export type Mutation = {\n    op: \"add\";\n    table: string;\n    row: WireValue[];\n} | {\n    op: \"remove\";\n    table: string;\n    row: WireValue[];\n} | {\n    op: \"edit\";\n    table: string;\n    old: WireValue[];\n    new: WireValue[];\n};","description":"","source":"packages/client/src/types.ts","line":89,"href":"/reference/typescript/client/#symbol-Mutation"},{"name":"MutationEnvelope","originalName":"MutationEnvelope","kind":"InterfaceDeclaration","signature":"/** The upstream named-mutator envelope (OPTIMISTIC-WRITES-DESIGN.md §8.1): the wire\n *  carries the name + JSON args, never code; `mid` totally orders a client's mutations. */\nexport interface MutationEnvelope {\n    clientID: string;\n    mid: number;\n    name: string;\n    args: unknown;\n}","description":"The upstream named-mutator envelope (OPTIMISTIC-WRITES-DESIGN.md §8.1): the wire\ncarries the name + JSON args, never code; `mid` totally orders a client's mutations.","source":"packages/client/src/types.ts","line":236,"href":"/reference/typescript/client/#symbol-MutationEnvelope"},{"name":"MutationGen","originalName":"MutationGen","kind":"TypeAliasDeclaration","signature":"/** What a generator mutator IS: `yield tx.<op>()` on every side effect; a `yield tx.row()` expression\n *  evaluates to the row. Neither sync nor async — the tier's driver decides, which is what lets one\n *  body run synchronously on the client and against a live async transaction on the server. */\nexport type MutationGen = Generator<YieldEffect, void, KeyedRow | undefined>;","description":"What a generator mutator IS: `yield tx.<op>()` on every side effect; a `yield tx.row()` expression\nevaluates to the row. Neither sync nor async — the tier's driver decides, which is what lets one\nbody run synchronously on the client and against a live async transaction on the server.","source":"packages/client/src/mutation-ops.ts","line":148,"href":"/reference/typescript/client/#symbol-MutationGen"},{"name":"MutationOp","originalName":"MutationOp","kind":"TypeAliasDeclaration","signature":"/** One structured write intent — the discriminated union that mirrors the write half of the client\n *  `MutationTx` 1:1. Keyed (column-name addressed), so it is independent of column order. */\nexport type MutationOp = {\n    kind: \"insert\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"upsert\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"insertIgnore\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"update\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"delete\";\n    table: string;\n    pk: KeyedRow;\n};","description":"One structured write intent — the discriminated union that mirrors the write half of the client\n`MutationTx` 1:1. Keyed (column-name addressed), so it is independent of column order.","source":"packages/client/src/mutation-ops.ts","line":17,"href":"/reference/typescript/client/#symbol-MutationOp"},{"name":"MutationOutcomeFrame","originalName":"MutationOutcomeFrame","kind":"InterfaceDeclaration","signature":"/** A room authority's verdict for a NON-applied mutation (RINDLE-REALTIME-QUERY-ENABLEMENT\n *  §3.3, the deopt handshake; Slice H-iv-b server half / H-v client half). Sent on the author's\n *  own socket for every mutation the room did NOT apply, always BEFORE the lmid ack that burns\n *  the `mid` (same-socket ordering only — the ack may reach the client through another path\n *  first, e.g. a replayed lmid snapshot). Applied mutations send NOTHING: silence + lmid\n *  coverage ⇒ applied.\n *\n *  - `kind: \"deopt\"` — the room's §3.3 commit gate refused the routed mutation (or its\n *    environment fell short, e.g. `tx.query`); the mid is burnt in the ROOM ledger with zero\n *    effects and the client re-enqueues the same logical mutation onto the daemon stream.\n *    `name`/`args` are echoed so the frame is SELF-CONTAINED: a client that already retired the\n *    entry (the burnt-mid confirm won the race, or the frame is a replay re-answer) re-invokes\n *    from the frame alone.\n *  - `kind: \"rejected\"` — FINAL (authz/validation): the mid is burnt the same way and the\n *    prediction snaps back on the ordinary lmid release; no re-route.\n *\n *  `reason` may be absent on a re-answered frame whose record was seeded from journal replay\n *  (the verdict is journaled; the reason is not). */\nexport interface MutationOutcomeFrame {\n    mid: number;\n    kind: \"deopt\" | \"rejected\";\n    reason?: string;\n    /** Echoed on DEOPT frames only (self-contained re-invoke — see above). */\n    name?: string;\n    args?: unknown;\n}","description":"A room authority's verdict for a NON-applied mutation (RINDLE-REALTIME-QUERY-ENABLEMENT\n§3.3, the deopt handshake; Slice H-iv-b server half / H-v client half). Sent on the author's\nown socket for every mutation the room did NOT apply, always BEFORE the lmid ack that burns\nthe `mid` (same-socket ordering only — the ack may reach the client through another path\nfirst, e.g. a replayed lmid snapshot). Applied mutations send NOTHING: silence + lmid\ncoverage ⇒ applied.\n\n- `kind: \"deopt\"` — the room's §3.3 commit gate refused the routed mutation (or its\n  environment fell short, e.g. `tx.query`); the mid is burnt in the ROOM ledger with zero\n  effects and the client re-enqueues the same logical mutation onto the daemon stream.\n  `name`/`args` are echoed so the frame is SELF-CONTAINED: a client that already retired the\n  entry (the burnt-mid confirm won the race, or the frame is a replay re-answer) re-invokes\n  from the frame alone.\n- `kind: \"rejected\"` — FINAL (authz/validation): the mid is burnt the same way and the\n  prediction snaps back on the ordinary lmid release; no re-route.\n\n`reason` may be absent on a re-answered frame whose record was seeded from journal replay\n(the verdict is journaled; the reason is not).","source":"packages/client/src/types.ts","line":261,"href":"/reference/typescript/client/#symbol-MutationOutcomeFrame"},{"name":"MutatorCtx","originalName":"MutatorCtx","kind":"InterfaceDeclaration","signature":"/** The minimal per-invocation context a shared mutator sees on BOTH tiers: the acting principal. The\n *  server injects its AUTHENTICATED user; the client injects its local user. (The server's own\n *  `MutationContext` is a superset of this.) */\nexport interface MutatorCtx {\n    user: string;\n}","description":"The minimal per-invocation context a shared mutator sees on BOTH tiers: the acting principal. The\nserver injects its AUTHENTICATED user; the client injects its local user. (The server's own\n`MutationContext` is a superset of this.)","source":"packages/client/src/mutation-ops.ts","line":141,"href":"/reference/typescript/client/#symbol-MutatorCtx"},{"name":"NamedQuery","originalName":"NamedQuery","kind":"InterfaceDeclaration","signature":"/**\n * A single, co-located NAMED query (see {@link defineQuery}). It is:\n *   - **callable on the client** — `q(args, ctx?)` validates + builds + stamps the result with its\n *     remote subscription identity (`name` + args — NOT ctx), so a component that imports it always\n *     SYNCS. There is no unstamped builder to import by accident.\n *   - **registerable on the server** — it carries its `queryName` and a `resolve` that re-runs the\n *     SAME validator on untrusted wire args and builds the AUTHORITATIVE `Query` from the server's\n *     own ctx ({@link registerQueries `registerQueries`} in `@rindle/api-server`).\n *\n * `Ctx` is the ctx parameter list mirrored from `build` — `[]`, `[ctx: C]`, or `[ctx?: C]`. It is\n * never part of the wire identity.\n */\nexport interface NamedQuery<Args, Ctx extends readonly unknown[], Q extends AnyQuery> {\n    (args: Args, ...ctx: Ctx): Q;\n    /** The wire identity. The daemon leases by this name; client and server MUST agree on it — which\n     *  they do, because both sides import the SAME `defineQuery` value. */\n    readonly queryName: string;\n    /** The §2.1 realtime label, when this query was defined with one ({@link DefineQueryOptions}).\n     *  Absent on unlabeled queries. Carried onto the stamped built Query too, and preserved through\n     *  `registerQueries` on the server. */\n    readonly realtime?: RealtimeQueryLabel<Args>;\n    /** Server-side: validate raw wire args, then build the authoritative `Query` from the server's\n     *  authoritative ctx (forwarded by `registerQueries`). */\n    resolve(rawArgs: unknown, ...ctx: Ctx): Q;\n}","description":"A single, co-located NAMED query (see {@link defineQuery}). It is:\n  - **callable on the client** — `q(args, ctx?)` validates + builds + stamps the result with its\n    remote subscription identity (`name` + args — NOT ctx), so a component that imports it always\n    SYNCS. There is no unstamped builder to import by accident.\n  - **registerable on the server** — it carries its `queryName` and a `resolve` that re-runs the\n    SAME validator on untrusted wire args and builds the AUTHORITATIVE `Query` from the server's\n    own ctx ({@link registerQueries `registerQueries`} in `@rindle/api-server`).\n\n`Ctx` is the ctx parameter list mirrored from `build` — `[]`, `[ctx: C]`, or `[ctx?: C]`. It is\nnever part of the wire identity.","source":"packages/client/src/query.ts","line":425,"href":"/reference/typescript/client/#symbol-NamedQuery"},{"name":"NamedRow","originalName":"NamedRow","kind":"TypeAliasDeclaration","signature":"/** A row named against its level's wire columns. */\nexport type NamedRow = Record<string, WireValue>;","description":"A row named against its level's wire columns.","source":"packages/client/src/resolve.ts","line":26,"href":"/reference/typescript/client/#symbol-NamedRow"},{"name":"ne","originalName":"ne","kind":"VariableDeclaration","signature":"export declare const ne: <V>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":27,"href":"/reference/typescript/client/#symbol-ne"},{"name":"newQueryBuilder","originalName":"newQueryBuilder","kind":"FunctionDeclaration","signature":"/** A schema-bound query-builder factory for portable client/server query definitions. SERVER\n *  scope: local-only tables are excluded (a named/remote query may never reference one). */\nexport declare function newQueryBuilder<S extends ColsMap>(schema: Schema<S>): QueryRoot<S>;","description":"A schema-bound query-builder factory for portable client/server query definitions. SERVER\nscope: local-only tables are excluded (a named/remote query may never reference one).","source":"packages/client/src/query.ts","line":1333,"href":"/reference/typescript/client/#symbol-newQueryBuilder"},{"name":"NormalizedEvent","originalName":"NormalizedEvent","kind":"TypeAliasDeclaration","signature":"/**\n * A per-query NORMALIZED stream event — the path-free twin of {@link ChangeEvent}. The\n * `hello` carries the flat per-table schemas (no nested view schema, §3); `snapshot`/`batch`\n * carry table-tagged {@link NormalizedOp}s. The `NormalizedSync` layer folds these into the\n * local engine's base tables.\n *\n * `cv` (the global commit version the frame's data reflects — OPTIMISTIC-WRITES-DESIGN.md\n * §8.3/§8.6) is present on sources that speak the optimistic protocol; the plain normalized\n * path may omit it.\n */\nexport type NormalizedEvent = {\n    type: \"hello\";\n    tables: NormalizedTableSchema[];\n    comparatorVersion: number;\n    normalizedFp: string;\n} | {\n    type: \"snapshot\";\n    ops: NormalizedOp[];\n    cv?: number;\n} | {\n    type: \"batch\";\n    ops: NormalizedOp[];\n    cv?: number;\n};","description":"A per-query NORMALIZED stream event — the path-free twin of {@link ChangeEvent}. The\n`hello` carries the flat per-table schemas (no nested view schema, §3); `snapshot`/`batch`\ncarry table-tagged {@link NormalizedOp}s. The `NormalizedSync` layer folds these into the\nlocal engine's base tables.\n\n`cv` (the global commit version the frame's data reflects — OPTIMISTIC-WRITES-DESIGN.md\n§8.3/§8.6) is present on sources that speak the optimistic protocol; the plain normalized\npath may omit it.","source":"packages/client/src/types.ts","line":123,"href":"/reference/typescript/client/#symbol-NormalizedEvent"},{"name":"NormalizedOp","originalName":"NormalizedOp","kind":"TypeAliasDeclaration","signature":"/**\n * A table-tagged, path-free row delta — the **normalized** wire payload (the path-free twin\n * of {@link FlatChange}; NORMALIZED-CHANGES-DESIGN.md §3). Rows are positional (bare cells; a\n * json column is its raw JSON string). `op` is the discriminant. Lives here (not in\n * `@rindle/normalized`) so both the protocol (`@rindle/remote`) and the sync layer share one type.\n */\nexport type NormalizedOp = {\n    table: string;\n    op: \"add\";\n    row: WireValue[];\n} | {\n    table: string;\n    op: \"remove\";\n    row: WireValue[];\n} | {\n    table: string;\n    op: \"edit\";\n    old: WireValue[];\n    new: WireValue[];\n};","description":"A table-tagged, path-free row delta — the **normalized** wire payload (the path-free twin\nof {@link FlatChange}; NORMALIZED-CHANGES-DESIGN.md §3). Rows are positional (bare cells; a\njson column is its raw JSON string). `op` is the discriminant. Lives here (not in\n`@rindle/normalized`) so both the protocol (`@rindle/remote`) and the sync layer share one type.","source":"packages/client/src/types.ts","line":100,"href":"/reference/typescript/client/#symbol-NormalizedOp"},{"name":"NormalizedSource","originalName":"NormalizedSource","kind":"InterfaceDeclaration","signature":"/**\n * The server side of the **normalized** local-first path (NORMALIZED-CHANGES-DESIGN.md §5/§7):\n * registers queries and pushes each one's normalized footprint stream ({@link NormalizedEvent}s).\n * Both the in-process native (`@rindle/replica`) source and the ws (`@rindle/remote`\n * `RemoteNormalizedSource`) implement it; `@rindle/normalized`'s `NormalizedBackend` consumes one,\n * never knowing which — a sibling seam of {@link Backend} for the normalized composition.\n */\nexport interface NormalizedSource {\n    registerQuery(queryId: QueryId, remote: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Send base-table writes to the server; the authoritative stream flows back. */\n    mutate(mutations: Mutation[]): Promise<void>;\n    onNormalized(handler: (queryId: QueryId, event: NormalizedEvent) => void): void;\n    /** Optional: the backend hands its OWN typed per-table schemas so the source can validate\n     *  each server `hello` against them (column order / PK by name) and reject a schema skew\n     *  rather than silently transposing positional cells (CRIT#4 / §3 \"drift ⇒ re-subscribe\").\n     *  Sources that can't skew (the in-process native source) may omit it. */\n    expectClientSchema?(tables: NormalizedTableSchema[]): void;\n}","description":"The server side of the **normalized** local-first path (NORMALIZED-CHANGES-DESIGN.md §5/§7):\nregisters queries and pushes each one's normalized footprint stream ({@link NormalizedEvent}s).\nBoth the in-process native (`@rindle/replica`) source and the ws (`@rindle/remote`\n`RemoteNormalizedSource`) implement it; `@rindle/normalized`'s `NormalizedBackend` consumes one,\nnever knowing which — a sibling seam of {@link Backend} for the normalized composition.","source":"packages/client/src/types.ts","line":221,"href":"/reference/typescript/client/#symbol-NormalizedSource"},{"name":"NormalizedTableSchema","originalName":"NormalizedTableSchema","kind":"InterfaceDeclaration","signature":"/** One base table's flat schema on the normalized `hello` (§3): column names (in order) +\n *  primary-key column indices. Wire rows are positional against `columns`. */\nexport interface NormalizedTableSchema {\n    name: string;\n    columns: string[];\n    primaryKey: number[];\n}","description":"One base table's flat schema on the normalized `hello` (§3): column names (in order) +\nprimary-key column indices. Wire rows are positional against `columns`.","source":"packages/client/src/types.ts","line":107,"href":"/reference/typescript/client/#symbol-NormalizedTableSchema"},{"name":"normalizedTableSchemas","originalName":"normalizedTableSchemas","kind":"FunctionDeclaration","signature":"/** The client's per-table flat schema (name + column order + PK indices), the shape a\n *  normalized `hello` advertises (NORMALIZED-CHANGES-DESIGN.md §3). Used to validate a\n *  server hello against the CLIENT's own typed schema so a column-order / PK skew is caught\n *  instead of silently transposing positional cells (CRIT#4). Sorted by name for stable\n *  ordering.\n *\n *  Local-only tables are **omitted** (`201-LOCAL-ONLY-TABLES-DESIGN.md` E1): the client never\n *  claims them to the server, the server never expects/ships them, and they stay out of the schema\n *  fingerprint (`normalizedFp`) so a local table can't skew it vs. the server's. */\nexport declare function normalizedTableSchemas<S extends ColsMap>(schema: Schema<S>): {\n    name: string;\n    columns: string[];\n    primaryKey: number[];\n}[];","description":"The client's per-table flat schema (name + column order + PK indices), the shape a\nnormalized `hello` advertises (NORMALIZED-CHANGES-DESIGN.md §3). Used to validate a\nserver hello against the CLIENT's own typed schema so a column-order / PK skew is caught\ninstead of silently transposing positional cells (CRIT#4). Sorted by name for stable\nordering.\n\nLocal-only tables are **omitted** (`201-LOCAL-ONLY-TABLES-DESIGN.md` E1): the client never\nclaims them to the server, the server never expects/ships them, and they stay out of the schema\nfingerprint (`normalizedFp`) so a local table can't skew it vs. the server's.","source":"packages/client/src/schema.ts","line":550,"href":"/reference/typescript/client/#symbol-normalizedTableSchemas"},{"name":"notExists","originalName":"notExists","kind":"FunctionDeclaration","signature":"/** `NOT EXISTS` by a named {@link Relationship}. */\nexport declare function notExists<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<RowOf<PC>>;\n/** `NOT EXISTS (<correlated subquery>)`. */\nexport declare function notExists<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<R>;","description":"`NOT EXISTS` by a named {@link Relationship}.\n`NOT EXISTS (<correlated subquery>)`.","source":"packages/client/src/query.ts","line":1229,"href":"/reference/typescript/client/#symbol-notExists"},{"name":"notExistsNoSync","originalName":"notExistsNoSync","kind":"FunctionDeclaration","signature":"/** `NOT EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate — the `NOT EXISTS` form of {@link existsNoSync} (a deny-style permission rule). */\nexport declare function notExistsNoSync<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<RowOf<PC>>;\nexport declare function notExistsNoSync<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<R>;","description":"`NOT EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate — the `NOT EXISTS` form of {@link existsNoSync} (a deny-style permission rule).","source":"packages/client/src/query.ts","line":1270,"href":"/reference/typescript/client/#symbol-notExistsNoSync"},{"name":"notIlike","originalName":"notIlike","kind":"VariableDeclaration","signature":"export declare const notIlike: (pattern: string) => Pred<string>;","description":"","source":"packages/client/src/operators.ts","line":35,"href":"/reference/typescript/client/#symbol-notIlike"},{"name":"notInList","originalName":"notInList","kind":"VariableDeclaration","signature":"export declare const notInList: <V>(values: V[]) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":37,"href":"/reference/typescript/client/#symbol-notInList"},{"name":"notLike","originalName":"notLike","kind":"VariableDeclaration","signature":"export declare const notLike: (pattern: string) => Pred<string>;","description":"","source":"packages/client/src/operators.ts","line":33,"href":"/reference/typescript/client/#symbol-notLike"},{"name":"number","originalName":"number","kind":"VariableDeclaration","signature":"export declare const number: <T extends number = number>() => ColBuilder<T>;","description":"","source":"packages/client/src/schema.ts","line":47,"href":"/reference/typescript/client/#symbol-number"},{"name":"OneShotBackend","originalName":"OneShotBackend","kind":"ClassDeclaration","signature":"/**\n * A no-op live backend for SSR (SSR-DESIGN.md §6.1): it opens no transport and never streams.\n * `registerQuery` is inert, `mutate` rejects, and no `ChangeEvent` is pushed. Every view stays\n * PENDING — reading its SSR {@link Store.seedAssembled seed} — and, lacking `onResultType`,\n * reports `complete` (a backend with no server lifecycle leaves every view authoritative).\n */\nexport declare class OneShotBackend implements Backend {\n    registerQuery(_qid: QueryId, _ast: unknown, _remote?: RemoteQuery): void;\n    unregisterQuery(_qid: QueryId): void;\n    mutate(_mutations: Mutation[]): Promise<void>;\n    onEvent(_handler: (queryId: QueryId, event: ChangeEvent) => void): void;\n}","description":"A no-op live backend for SSR (SSR-DESIGN.md §6.1): it opens no transport and never streams.\n`registerQuery` is inert, `mutate` rejects, and no `ChangeEvent` is pushed. Every view stays\nPENDING — reading its SSR {@link Store.seedAssembledseed} — and, lacking `onResultType`,\nreports `complete` (a backend with no server lifecycle leaves every view authoritative).","source":"packages/client/src/ssr.ts","line":48,"href":"/reference/typescript/client/#symbol-OneShotBackend"},{"name":"OneShotQueryFn","originalName":"OneShotQueryFn","kind":"TypeAliasDeclaration","signature":"/** The one-shot read the server Store calls to preload a query. Two topologies inject different\n *  fns (SSR-DESIGN.md §6):\n *\n *   - **Direct to the daemon** (the trusted tier holds the daemon token): use `ast` —\n *     `(i) => daemon.query(i)`.\n *   - **Through the application's API tier** (the authority resolves names → ASTs, the loader never\n *     sends a raw AST): use `name`/`args` — `(i) => fetch('/api/rindle/read', {name: i.name, args: i.args})`.\n *\n *  `ast` is always present (the Store seeds the local view by its `viewKey`); `name`/`args` are\n *  present when the preloaded query came from `defineQuery`. This Store does not authenticate\n *  users or filter rows. The injected function must enforce access: either call the authenticated\n *  API route, or authorize and construct the AST before a privileged direct daemon read. */\nexport type OneShotQueryFn = (input: {\n    ast: unknown;\n    name?: string;\n    args?: unknown;\n    visibilityKey?: string;\n    ttlMs?: number;\n}) => Promise<OneShotResult>;","description":"The one-shot read the server Store calls to preload a query. Two topologies inject different\nfns (SSR-DESIGN.md §6):\n\n - **Direct to the daemon** (the trusted tier holds the daemon token): use `ast` —\n   `(i) => daemon.query(i)`.\n - **Through the application's API tier** (the authority resolves names → ASTs, the loader never\n   sends a raw AST): use `name`/`args` — `(i) => fetch('/api/rindle/read', {name: i.name, args: i.args})`.\n\n`ast` is always present (the Store seeds the local view by its `viewKey`); `name`/`args` are\npresent when the preloaded query came from `defineQuery`. This Store does not authenticate\nusers or filter rows. The injected function must enforce access: either call the authenticated\nAPI route, or authorize and construct the AST before a privileged direct daemon read.","source":"packages/client/src/ssr.ts","line":38,"href":"/reference/typescript/client/#symbol-OneShotQueryFn"},{"name":"OneShotResult","originalName":"OneShotResult","kind":"InterfaceDeclaration","signature":"/** An authorized one-shot read result, as far as the server Store needs it: the\n *  assembled rows plus the `cvMin` baseline they reflect. (Matches `@rindle/daemon-client`'s\n *  `QueryOnceOutput`, but `@rindle/client` stays dependency-free — inject the call.) */\nexport interface OneShotResult {\n    rows: AssembledNode[];\n    cvMin?: number;\n}","description":"An authorized one-shot read result, as far as the server Store needs it: the\nassembled rows plus the `cvMin` baseline they reflect. (Matches `@rindle/daemon-client`'s\n`QueryOnceOutput`, but `@rindle/client` stays dependency-free — inject the call.)","source":"packages/client/src/ssr.ts","line":21,"href":"/reference/typescript/client/#symbol-OneShotResult"},{"name":"OptimisticSource","originalName":"OptimisticSource","kind":"InterfaceDeclaration","signature":"/**\n * The server side of the OPTIMISTIC path (OPTIMISTIC-WRITES-DESIGN.md §8): the\n * {@link NormalizedSource} stream with `cv`-tagged data frames, plus the connection-level\n * {@link ProgressFrame} channel and the named-mutator upstream. The client buffers data\n * frames by `cv` and applies all `cv ≤ cvMin` as one coherent release (§8.5).\n */\nexport interface OptimisticSource {\n    registerQuery(queryId: QueryId, remote: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Ship one named-mutator invocation upstream (§8.1). Confirmation rides the progress frames. */\n    pushMutation(envelope: MutationEnvelope): Promise<void>;\n    onNormalized(handler: (queryId: QueryId, event: NormalizedEvent) => void): void;\n    onProgress(handler: (frame: ProgressFrame) => void): void;\n    /** Optional: the backend hands its OWN typed per-table schemas so the source validates each\n     *  server `hello` against them and rejects a schema skew (CRIT#4); see {@link NormalizedSource}. */\n    expectClientSchema?(tables: NormalizedTableSchema[]): void;\n    /** Optional: fired when the server restarts (a transport that can detect it, e.g. via a daemon\n     *  boot id). The backend resets its `cv` watermark so the server's reset `cv` sequence is\n     *  accepted rather than dropped as stale. In-process sources never restart and omit it. */\n    onRestart?(handler: () => void): void;\n    /** Optional (Slice H-v): the channel's {@link MutationOutcomeFrame} stream — the room deopt\n     *  handshake's client half. **OUT-OF-BAND BY DESIGN**: the frame carries no `cv` and the source\n     *  MUST dispatch it immediately on arrival, never behind the cv buffer — a deopt has to migrate\n     *  its pending entry BEFORE the buffered lmid release that would otherwise retire it as a\n     *  success (and the §7.3 hold-back trigger, keyed on the entry's confirming domain, would then\n     *  park its staged writes the wrong way). Sources whose authority never deopts (the in-process\n     *  native source, a plain daemon) omit it. */\n    onMutationOutcome?(handler: (frame: MutationOutcomeFrame) => void): void;\n    /** Optional (Slice H-v, the §7.5 rule-3 crash-window closer): fired when the transport\n     *  RE-establishes its session (reconnect → re-`init`), BEFORE any post-reconnect frame is\n     *  processed — the ordering is load-bearing: the re-subscribed lmid stream's fresh snapshot may\n     *  cover a mid whose `mutationOutcome` frame died with the old socket, and once that release\n     *  retires the entry as an apparent success there is nothing left to re-send. The backend\n     *  re-sends this domain's unconfirmed pending envelopes with their ORIGINAL mids, in mid order;\n     *  the source may DEFER their delivery until the session is re-authorized (a room's\n     *  `pushMutation` requires the lease-token subscribe's subject). Idempotent under the domain's\n     *  own ledger — a processed mid dedups silently (silence + lmid coverage ⇒ applied), a\n     *  non-applied mid is re-answered from the authority's recorded-outcome map (resolving even an\n     *  already-retired entry through the handshake's not-found arm). Distinct from\n     *  {@link onRestart} (a NEW server incarnation): a same-incarnation socket drop re-syncs\n     *  without restarting, and envelopes sent into the dead socket are exactly what this recovers.\n     *  In-process sources never drop a session and omit it. */\n    onResync?(handler: () => void): void;\n}","description":"The server side of the OPTIMISTIC path (OPTIMISTIC-WRITES-DESIGN.md §8): the\n{@link NormalizedSource} stream with `cv`-tagged data frames, plus the connection-level\n{@link ProgressFrame} channel and the named-mutator upstream. The client buffers data\nframes by `cv` and applies all `cv ≤ cvMin` as one coherent release (§8.5).","source":"packages/client/src/types.ts","line":303,"href":"/reference/typescript/client/#symbol-OptimisticSource"},{"name":"or","originalName":"or","kind":"FunctionDeclaration","signature":"/** At least one child must hold. */\nexport declare function or<R>(...conds: Cond<R>[]): Cond<R>;","description":"At least one child must hold.","source":"packages/client/src/operators.ts","line":71,"href":"/reference/typescript/client/#symbol-or"},{"name":"OrderPart","originalName":"OrderPart","kind":"TypeAliasDeclaration","signature":"/** One `(field, direction)` ordering — serializes as the 2-tuple `[\"id\", \"asc\"]`. */\nexport type OrderPart = [\n    field: string,\n    dir: Dir\n];","description":"One `(field, direction)` ordering — serializes as the 2-tuple `[\"id\", \"asc\"]`.","source":"packages/client/src/ast.ts","line":8,"href":"/reference/typescript/client/#symbol-OrderPart"},{"name":"PathSeg","originalName":"PathSeg","kind":"InterfaceDeclaration","signature":"export interface PathSeg {\n    rel: number;\n    parentRow: WireValue[];\n}","description":"","source":"packages/client/src/types.ts","line":54,"href":"/reference/typescript/client/#symbol-PathSeg"},{"name":"persistedLocalTableNames","originalName":"persistedLocalTableNames","kind":"FunctionDeclaration","signature":"/** The subset of {@link localTableNames} eligible for the persistence plane — `local: true` only.\n *  A `local: \"session\"` table stays outside it: never persisted, never replicated across tabs\n *  (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §5.4). */\nexport declare function persistedLocalTableNames<S extends ColsMap>(schema: Schema<S>): Set<string>;","description":"The subset of {@link localTableNames} eligible for the persistence plane — `local: true` only.\nA `local: \"session\"` table stays outside it: never persisted, never replicated across tabs\n(`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §5.4).","source":"packages/client/src/schema.ts","line":419,"href":"/reference/typescript/client/#symbol-persistedLocalTableNames"},{"name":"PkColsOf","originalName":"PkColsOf","kind":"TypeAliasDeclaration","signature":"/** The primary-key column union for table `N` of a schema, read from its `__pk` map `P` and narrowed\n *  to `N`'s actual columns (falling back to all columns when `P` doesn't name `N` — e.g. the loose\n *  default schema). Feeds {@link PkOf}/{@link UpdateOf} in the typed mutator tx. */\nexport type PkColsOf<S extends ColsMap, P extends Record<string, string>, N extends keyof S> = (N extends keyof P ? P[N] : keyof S[N] & string) & keyof S[N] & string;","description":"The primary-key column union for table `N` of a schema, read from its `__pk` map `P` and narrowed\nto `N`'s actual columns (falling back to all columns when `P` doesn't name `N` — e.g. the loose\ndefault schema). Feeds {@link PkOf}/{@link UpdateOf} in the typed mutator tx.","source":"packages/client/src/schema.ts","line":152,"href":"/reference/typescript/client/#symbol-PkColsOf"},{"name":"PkMap","originalName":"PkMap","kind":"TypeAliasDeclaration","signature":"/** name → (some subset of its column names): the loose shape a {@link Schema}'s pk-map satisfies. The\n *  fallback when a schema wasn't built through {@link createSchema} — every column could be the pk. */\nexport type PkMap<S extends ColsMap> = {\n    [N in keyof S]: keyof S[N] & string;\n};","description":"name → (some subset of its column names): the loose shape a {@link Schema}'s pk-map satisfies. The\nfallback when a schema wasn't built through {@link createSchema} — every column could be the pk.","source":"packages/client/src/schema.ts","line":203,"href":"/reference/typescript/client/#symbol-PkMap"},{"name":"PkMapOf","originalName":"PkMapOf","kind":"TypeAliasDeclaration","signature":"/** name → its primary-key column union, derived from the tables array (the PK captured by the\n *  `primaryKey(...)` builder). Powers the mutator tx's typed `update`/`delete`/`row` pk args. */\nexport type PkMapOf<T extends readonly AnyTable[]> = {\n    [E in T[number] as E[typeof SCHEMA][\"name\"]]: E[typeof SCHEMA][\"primaryKey\"][number];\n};","description":"name → its primary-key column union, derived from the tables array (the PK captured by the\n`primaryKey(...)` builder). Powers the mutator tx's typed `update`/`delete`/`row` pk args.","source":"packages/client/src/schema.ts","line":194,"href":"/reference/typescript/client/#symbol-PkMapOf"},{"name":"PkOf","originalName":"PkOf","kind":"TypeAliasDeclaration","signature":"/** The exact PRIMARY-KEY columns of a table (each typed), required — the identity a `delete`/`row`,\n *  and the WHERE half of an `update`, take. `PK` is the table's pk-column union (the schema's `__pk`). */\nexport type PkOf<C extends AnyCols, PK extends string> = {\n    [K in PK & keyof C]: ColT<C[K & keyof C]>;\n};","description":"The exact PRIMARY-KEY columns of a table (each typed), required — the identity a `delete`/`row`,\nand the WHERE half of an `update`, take. `PK` is the table's pk-column union (the schema's `__pk`).","source":"packages/client/src/schema.ts","line":140,"href":"/reference/typescript/client/#symbol-PkOf"},{"name":"Pred","originalName":"Pred","kind":"InterfaceDeclaration","signature":"/** A value predicate (an operator applied to a value). `V` is a phantom for type-checking. */\nexport interface Pred<V> {\n    readonly [PRED]: true;\n    readonly op: SimpleOp;\n    readonly value: LitValue;\n    readonly __v?: V;\n}","description":"A value predicate (an operator applied to a value). `V` is a phantom for type-checking.","source":"packages/client/src/operators.ts","line":11,"href":"/reference/typescript/client/#symbol-Pred"},{"name":"ProgressFrame","originalName":"ProgressFrame","kind":"InterfaceDeclaration","signature":"/** The connection-level progress frame (§8.6): advances the coherent-apply release point\n *  (`cvMin`). A pure release signal — mutation confirmation does NOT ride it: `lmid` is a\n *  row in {@link CLIENT_MUTATIONS_TABLE}, delivered through the client's own per-client\n *  system query ({@link LMID_QUERY_NAME}) like any data, so it is released by the same\n *  `cvMin` as the commit's effects (transactionally coherent by construction). */\nexport interface ProgressFrame {\n    cvMin: number;\n}","description":"The connection-level progress frame (§8.6): advances the coherent-apply release point\n(`cvMin`). A pure release signal — mutation confirmation does NOT ride it: `lmid` is a\nrow in {@link CLIENT_MUTATIONS_TABLE}, delivered through the client's own per-client\nsystem query ({@link LMID_QUERY_NAME}) like any data, so it is released by the same\n`cvMin` as the commit's effects (transactionally coherent by construction).","source":"packages/client/src/types.ts","line":275,"href":"/reference/typescript/client/#symbol-ProgressFrame"},{"name":"queries","originalName":"queries","kind":"FunctionDeclaration","signature":"/** A typed query entry over a schema: `queries(schema).issue.where.closed(false)…`. */\nexport declare function queries<S extends ColsMap>(schema: Schema<S>, onMaterialize?: (query: AnyQuery) => unknown, opts?: QueriesOptions): QueryRoot<S>;","description":"A typed query entry over a schema: `queries(schema).issue.where.closed(false)…`.","source":"packages/client/src/query.ts","line":1297,"href":"/reference/typescript/client/#symbol-queries"},{"name":"QueriesOptions","originalName":"QueriesOptions","kind":"InterfaceDeclaration","signature":"/** Scoping for {@link queries} (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5). */\nexport interface QueriesOptions {\n    /** Include {@link TableMeta.local local-only} tables in the builder's root scope. The **local**\n     *  builder (`store.query`) sets this; the **server** builder ({@link newQueryBuilder}) does NOT,\n     *  so naming a local table in a remote/named query is a build error (Q1 / E3 client half). */\n    includeLocal?: boolean;\n}","description":"Scoping for {@link queries} (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5).","source":"packages/client/src/query.ts","line":1289,"href":"/reference/typescript/client/#symbol-QueriesOptions"},{"name":"Query","originalName":"Query","kind":"TypeAliasDeclaration","signature":"export type Query<C extends AnyCols, Rels = {}, One extends boolean = false, Sel extends string = never, LocalRels = Rels, Agg = false> = Omit<QueryBase<C, Rels, One, Sel, LocalRels, Agg>, \"where\"> & {\n    where: QueryBase<C, Rels, One, Sel, LocalRels, Agg>[\"where\"] & WhereProxy<C, Rels, One, Sel, LocalRels>;\n} & WhereSugar<C, Rels, One, Sel, LocalRels>;","description":"","source":"packages/client/src/query.ts","line":296,"href":"/reference/typescript/client/#symbol-Query"},{"name":"QueryArg","originalName":"QueryArg","kind":"TypeAliasDeclaration","signature":"/** What {@link IsoTx.query} accepts: a query handle whose `.ast()` lowers to the wire {@link Ast} —\n *  exactly what the typed query builder produces (`newQueryBuilder(schema).<table>…`, the tier-agnostic\n *  server-scope builder both tiers can construct because it performs no I/O). Structural so the seam\n *  need not carry the builder's heavy generics. */\nexport type QueryArg = {\n    ast(): Ast;\n};","description":"What {@link IsoTx.query} accepts: a query handle whose `.ast()` lowers to the wire {@link Ast} —\nexactly what the typed query builder produces (`newQueryBuilder(schema).<table>…`, the tier-agnostic\nserver-scope builder both tiers can construct because it performs no I/O). Structural so the seam\nneed not carry the builder's heavy generics.","source":"packages/client/src/mutation-ops.ts","line":84,"href":"/reference/typescript/client/#symbol-QueryArg"},{"name":"QueryBuilder","originalName":"QueryBuilder","kind":"TypeAliasDeclaration","signature":"/**\n * Build a `Query` (an `Ast` constructor) from already-validated args, plus an optional CONTEXT — the\n * authenticated principal the query is scoped to. `Ctx` is **off-wire**: the client passes its own\n * session ctx at the callsite, the server injects the AUTHORITATIVE ctx ({@link NamedQuery.resolve}\n * via `registerQueries`), and the wire still carries only `name` + args. Both tiers run the same\n * `build`, so whenever their ctx agrees the AST is byte-identical — and a client can never spoof it,\n * since the server re-derives ctx from its trusted session and ignores anything the client claimed.\n *\n * The ctx is a *tuple* so a query opts into it by how it types `build`'s second parameter — and that\n * shape becomes the call signature verbatim:\n *   - `(args) => Q` — no ctx (`q(args)`).\n *   - `(args, ctx: C) => Q` — ctx REQUIRED (`q(args, ctx)`); for always-authenticated queries.\n *   - `(args, ctx?: C) => Q` — ctx OPTIONAL (`q(args)` or `q(args, ctx)`); sound only when \"no ctx\"\n *     is a real, SYMMETRIC state — i.e. the build yields the SAME broad AST whether ctx is absent or\n *     present-with-no-user (anonymous / SSR), since the server always forwards a ctx (possibly\n *     anonymous). Otherwise type ctx required so the type catches an omitted ctx.\n */\nexport type QueryBuilder<Args, Q extends AnyQuery, Ctx extends readonly unknown[] = [\n]> = (args: Args, ...ctx: Ctx) => Q;","description":"Build a `Query` (an `Ast` constructor) from already-validated args, plus an optional CONTEXT — the\nauthenticated principal the query is scoped to. `Ctx` is **off-wire**: the client passes its own\nsession ctx at the callsite, the server injects the AUTHORITATIVE ctx ({@link NamedQuery.resolve}\nvia `registerQueries`), and the wire still carries only `name` + args. Both tiers run the same\n`build`, so whenever their ctx agrees the AST is byte-identical — and a client can never spoof it,\nsince the server re-derives ctx from its trusted session and ignores anything the client claimed.\n\nThe ctx is a *tuple* so a query opts into it by how it types `build`'s second parameter — and that\nshape becomes the call signature verbatim:\n  - `(args) => Q` — no ctx (`q(args)`).\n  - `(args, ctx: C) => Q` — ctx REQUIRED (`q(args, ctx)`); for always-authenticated queries.\n  - `(args, ctx?: C) => Q` — ctx OPTIONAL (`q(args)` or `q(args, ctx)`); sound only when \"no ctx\"\n    is a real, SYMMETRIC state — i.e. the build yields the SAME broad AST whether ctx is absent or\n    present-with-no-user (anonymous / SSR), since the server always forwards a ctx (possibly\n    anonymous). Otherwise type ctx required so the type catches an omitted ctx.","source":"packages/client/src/query.ts","line":358,"href":"/reference/typescript/client/#symbol-QueryBuilder"},{"name":"QueryEffect","originalName":"QueryEffect","kind":"TypeAliasDeclaration","signature":"/** A full-shape read a generator mutator yields — a `where`/`orderBy`/`limit`/join query over the\n *  state this mutator is mutating (read-your-writes, like {@link ReadEffect} but an arbitrary shape).\n *  Evaluates to {@link QueryResultRow}`[]` — ALWAYS an array of the matching rows, in the query's\n *  order, on BOTH tiers (a root `.one()` is not unwrapped here: take `[0]`). The single next-type is\n *  a row, so cast the yield (`(yield tx.query(q)) as unknown as QueryResultRow[]`), same as `all`. */\nexport type QueryEffect = {\n    kind: \"query\";\n    query: QueryArg;\n};","description":"A full-shape read a generator mutator yields — a `where`/`orderBy`/`limit`/join query over the\nstate this mutator is mutating (read-your-writes, like {@link ReadEffect} but an arbitrary shape).\nEvaluates to {@link QueryResultRow}`[]` — ALWAYS an array of the matching rows, in the query's\norder, on BOTH tiers (a root `.one()` is not unwrapped here: take `[0]`). The single next-type is\na row, so cast the yield (`(yield tx.query(q)) as unknown as QueryResultRow[]`), same as `all`.","source":"packages/client/src/mutation-ops.ts","line":91,"href":"/reference/typescript/client/#symbol-QueryEffect"},{"name":"QueryEnsureCache","originalName":"QueryEnsureCache","kind":"ClassDeclaration","signature":"/**\n * Deduplicates route/intent preloads and holds their live view through the navigation handoff.\n *\n * The cache materializes the real named query rather than retaining sync coverage alone: that is\n * what makes `until: \"present\"` observable for overlapping queries already satisfied by local\n * normalized rows. Once the server marks the query complete, the entry is kept briefly for a\n * destination component to take its own retain, then released automatically.\n */\nexport declare class QueryEnsureCache<S extends ColsMap> implements QueryEnsurer {\n    private readonly store;\n    private readonly releaseDelayMs;\n    private readonly maxEntries;\n    private readonly entries;\n    private closed;\n    constructor(store: Store<S>, options?: QueryEnsureCacheOptions);\n    /**\n     * Ensure a named query is retained, resolving according to `options.until`.\n     *\n     * Concurrent calls for the same `(name, args, AST)` share one materialized view and one remote\n     * subscription. A `present` call can resolve from local rows while a concurrent `complete` call\n     * continues waiting for server authority.\n     */\n    ensure<Q extends AnyQuery>(query: Q, options?: EnsureQueryOptions): Promise<void>;\n    /** Release every retained preload and reject outstanding waits. Idempotent. */\n    close(): void;\n    /** Number of retained query entries (primarily useful for tests/devtools). */\n    size(): number;\n    private createEntry;\n    private inspect;\n    private isReady;\n    private touch;\n    private scheduleRelease;\n    private trim;\n    private dispose;\n    private queryError;\n    private detachAbort;\n}","description":"Deduplicates route/intent preloads and holds their live view through the navigation handoff.\n\nThe cache materializes the real named query rather than retaining sync coverage alone: that is\nwhat makes `until: \"present\"` observable for overlapping queries already satisfied by local\nnormalized rows. Once the server marks the query complete, the entry is kept briefly for a\ndestination component to take its own retain, then released automatically.","source":"packages/client/src/ensure.ts","line":76,"href":"/reference/typescript/client/#symbol-QueryEnsureCache"},{"name":"QueryEnsureCacheOptions","originalName":"QueryEnsureCacheOptions","kind":"InterfaceDeclaration","signature":"export interface QueryEnsureCacheOptions {\n    /** Keep a completed preload alive for this long so the destination can adopt its rows. */\n    releaseDelayMs?: number;\n    /** Bound retained preloads. In-flight waits are never evicted. */\n    maxEntries?: number;\n}","description":"","source":"packages/client/src/ensure.ts","line":29,"href":"/reference/typescript/client/#symbol-QueryEnsureCacheOptions"},{"name":"QueryEnsurer","originalName":"QueryEnsurer","kind":"InterfaceDeclaration","signature":"/** The structural surface consumed by framework adapters such as `@rindle/tanstack`. */\nexport interface QueryEnsurer {\n    ensure(query: AnyQuery, options?: EnsureQueryOptions): Promise<void>;\n}","description":"The structural surface consumed by framework adapters such as `@rindle/tanstack`.","source":"packages/client/src/ensure.ts","line":37,"href":"/reference/typescript/client/#symbol-QueryEnsurer"},{"name":"queryFromAst","originalName":"queryFromAst","kind":"FunctionDeclaration","signature":"export declare function queryFromAst(ast: Ast): AnyQuery;","description":"","source":"packages/client/src/query.ts","line":694,"href":"/reference/typescript/client/#symbol-queryFromAst"},{"name":"QueryId","originalName":"QueryId","kind":"TypeAliasDeclaration","signature":"export type QueryId = number;","description":"","source":"packages/client/src/types.ts","line":128,"href":"/reference/typescript/client/#symbol-QueryId"},{"name":"QueryInspect","originalName":"QueryInspect","kind":"InterfaceDeclaration","signature":"/** One live materialized view's read-only summary for a devtools pane (DEBUG-TOOLS-BROWSER-DESIGN\n *  §4.2 — \"surface, not instrument\"). All fields are already held by the {@link Store}; this is the\n *  single read-only accessor over the otherwise-private `views`/`asts` maps. */\nexport interface QueryInspect {\n    /** The Store-assigned query id (also the backend's qid — the Store passes it straight through). */\n    qid: QueryId;\n    /** The query's AST (`Store.asts`), for the inspector's pretty-print / table-derivation. */\n    ast: Ast;\n    /** The view's SERVER-CHANNEL state (`unknown` while loading, `complete` once authoritative). */\n    resultType: ResultType;\n    /** Current materialized row count (`view.data.length`). */\n    rowCount: number;\n    /** A capped peek at the projected rows (reference-stable objects off the live view). */\n    sample: readonly unknown[];\n}","description":"One live materialized view's read-only summary for a devtools pane (DEBUG-TOOLS-BROWSER-DESIGN\n§4.2 — \"surface, not instrument\"). All fields are already held by the {@link Store}; this is the\nsingle read-only accessor over the otherwise-private `views`/`asts` maps.","source":"packages/client/src/store.ts","line":74,"href":"/reference/typescript/client/#symbol-QueryInspect"},{"name":"QueryLocalData","originalName":"QueryLocalData","kind":"TypeAliasDeclaration","signature":"export type QueryLocalData<Q extends AnyQuery> = Q extends Query<infer C, any, infer One, infer Sel, infer LocalRels, infer Agg> ? [\n    Agg\n] extends [\n    false\n] ? One extends true ? (Projected<C, Sel> & LocalRels) | null : readonly (Projected<C, Sel> & LocalRels)[] : readonly Agg[] : never;","description":"","source":"packages/client/src/query.ts","line":310,"href":"/reference/typescript/client/#symbol-QueryLocalData"},{"name":"QueryResultRow","originalName":"QueryResultRow","kind":"TypeAliasDeclaration","signature":"/** A row returned by a {@link QueryEffect}: column name → cell, plus each materialized relationship\n *  name → its nested row(s) — an array (a plural relationship) or a single row / `null` (a `.one()`\n *  relationship). Recursive. Presented identically on both tiers (a `view.data` row of the same\n *  query). */\nexport type QueryResultRow = {\n    [key: string]: WireValue | QueryResultRow | QueryResultRow[];\n};","description":"A row returned by a {@link QueryEffect}: column name → cell, plus each materialized relationship\nname → its nested row(s) — an array (a plural relationship) or a single row / `null` (a `.one()`\nrelationship). Recursive. Presented identically on both tiers (a `view.data` row of the same\nquery).","source":"packages/client/src/mutation-ops.ts","line":78,"href":"/reference/typescript/client/#symbol-QueryResultRow"},{"name":"QueryRoot","originalName":"QueryRoot","kind":"TypeAliasDeclaration","signature":"export type QueryRoot<S extends ColsMap> = {\n    [N in keyof S]: Query<S[N]>;\n};","description":"","source":"packages/client/src/query.ts","line":1286,"href":"/reference/typescript/client/#symbol-QueryRoot"},{"name":"QueryValidator","originalName":"QueryValidator","kind":"TypeAliasDeclaration","signature":"/** Turn raw, UNTRUSTED wire args into the canonical, typed args a query is built from. Its return\n *  type IS the query's args type — written once, it flows to both the client call signature and the\n *  `build` step, so there's no second place to restate the shape. */\nexport type QueryValidator<Args> = (rawArgs: unknown) => Args;","description":"Turn raw, UNTRUSTED wire args into the canonical, typed args a query is built from. Its return\ntype IS the query's args type — written once, it flows to both the client call signature and the\n`build` step, so there's no second place to restate the shape.","source":"packages/client/src/query.ts","line":340,"href":"/reference/typescript/client/#symbol-QueryValidator"},{"name":"ReadEffect","originalName":"ReadEffect","kind":"TypeAliasDeclaration","signature":"/** A point read a generator mutator yields; the driver resolves it and feeds the row back through\n *  `gen.next(row)`. Read-your-writes on every tier: the client reads its local engine, and both\n *  server backends read the open transaction (the daemon via an interactive mutation session). */\nexport type ReadEffect = {\n    kind: \"row\";\n    table: string;\n    pk: KeyedRow;\n};","description":"A point read a generator mutator yields; the driver resolves it and feeds the row back through\n`gen.next(row)`. Read-your-writes on every tier: the client reads its local engine, and both\nserver backends read the open transaction (the daemon via an interactive mutation session).","source":"packages/client/src/mutation-ops.ts","line":65,"href":"/reference/typescript/client/#symbol-ReadEffect"},{"name":"RealtimeQueryLabel","originalName":"RealtimeQueryLabel","kind":"InterfaceDeclaration","signature":"/**\n * The realtime LABEL a named query may declare (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §2.1):\n * which api-server room PROFILE the query wants to be served from, and how the query's args map\n * to that profile's key args. This is the DECLARATION only — the serve decision (covering proof,\n * lease routing) is the server's, and the final room key is minted server-side by the profile's\n * own `key` under authoritative ctx, so a label can never place a query in a room the server\n * didn't derive itself. Both tiers import the SAME `defineQuery` value, so they always agree\n * *which profile* a query belongs to.\n */\nexport interface RealtimeQueryLabel<Args = any> {\n    /** The room profile name — must match a `realtime.rooms` key on the api-server (validated\n     *  loudly at `createRindleApiServer` construction). May not contain `/` (the wire room-key\n     *  delimiter). */\n    readonly room: string;\n    /** Map the query's VALIDATED args to the profile's key args (what the server feeds the\n     *  profile's `key(args)`). Identity when omitted. Must be pure — both tiers may run it. */\n    readonly args?: (queryArgs: Args) => unknown;\n}","description":"The realtime LABEL a named query may declare (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §2.1):\nwhich api-server room PROFILE the query wants to be served from, and how the query's args map\nto that profile's key args. This is the DECLARATION only — the serve decision (covering proof,\nlease routing) is the server's, and the final room key is minted server-side by the profile's\nown `key` under authoritative ctx, so a label can never place a query in a room the server\ndidn't derive itself. Both tiers import the SAME `defineQuery` value, so they always agree\n*which profile* a query belongs to.","source":"packages/client/src/query.ts","line":372,"href":"/reference/typescript/client/#symbol-RealtimeQueryLabel"},{"name":"RefinableTable","originalName":"RefinableTable","kind":"TypeAliasDeclaration","signature":"/** A table def acceptable to {@link refineSchema} over `Schema<S>`: its NAME must be one of `S`'s\n *  tables (a def for an unknown table is a compile error at the call site). */\nexport type RefinableTable<S extends ColsMap> = {\n    readonly [SCHEMA]: TableMeta<Extract<keyof S, string>, AnyCols>;\n};","description":"A table def acceptable to {@link refineSchema} over `Schema<S>`: its NAME must be one of `S`'s\ntables (a def for an unknown table is a compile error at the call site).","source":"packages/client/src/schema.ts","line":340,"href":"/reference/typescript/client/#symbol-RefinableTable"},{"name":"RefinedCols","originalName":"RefinedCols","kind":"TypeAliasDeclaration","signature":"/** `C` with the columns named in `R` re-typed to their refined `Col`s. */\nexport type RefinedCols<C extends AnyCols, R extends ColRefinements<C>> = {\n    [K in keyof C]: K extends keyof R ? (R[K] extends Col<unknown> ? R[K] : C[K]) : C[K];\n};","description":"`C` with the columns named in `R` re-typed to their refined `Col`s.","source":"packages/client/src/schema.ts","line":308,"href":"/reference/typescript/client/#symbol-RefinedCols"},{"name":"RefinedColsMap","originalName":"RefinedColsMap","kind":"TypeAliasDeclaration","signature":"/** `S` with each table named in `T` re-typed to that def's (refined) columns. (The inner\n *  `extends AnyCols` guard is how the checker proves the remapped `SchemaOf<T>[K]` is a column\n *  map while `T` is still generic; it always holds for a concrete `T`.) */\nexport type RefinedColsMap<S extends ColsMap, T extends readonly AnyTable[]> = {\n    [K in keyof S]: K extends keyof SchemaOf<T> ? (SchemaOf<T>[K] extends AnyCols ? SchemaOf<T>[K] : S[K]) : S[K];\n};","description":"`S` with each table named in `T` re-typed to that def's (refined) columns. (The inner\n`extends AnyCols` guard is how the checker proves the remapped `SchemaOf<T>[K]` is a column\nmap while `T` is still generic; it always holds for a concrete `T`.)","source":"packages/client/src/schema.ts","line":347,"href":"/reference/typescript/client/#symbol-RefinedColsMap"},{"name":"refineSchema","originalName":"refineSchema","kind":"FunctionDeclaration","signature":"/** Swap {@link refineTable}-narrowed table defs into a generated schema, re-typing those tables for\n *  everything downstream of the schema (`newQueryBuilder`/`queries` roots, store row types).\n *\n *  Runtime-validated identity: each def must name a table already in the schema and match its\n *  runtime shape exactly (same columns, kinds, primary key, and locality) — refinement narrows TS\n *  types, never what's on the wire. Composes with {@link extendSchema} in either order. */\nexport declare function refineSchema<S extends ColsMap, P extends Record<string, string>, const T extends readonly RefinableTable<S>[]>(base: Schema<S, P>, opts: {\n    tables: T;\n}): Schema<RefinedColsMap<S, T>, P>;","description":"Swap {@link refineTable}-narrowed table defs into a generated schema, re-typing those tables for\neverything downstream of the schema (`newQueryBuilder`/`queries` roots, store row types).\n\nRuntime-validated identity: each def must name a table already in the schema and match its\nruntime shape exactly (same columns, kinds, primary key, and locality) — refinement narrows TS\ntypes, never what's on the wire. Composes with {@link extendSchema} in either order.","source":"packages/client/src/schema.ts","line":357,"href":"/reference/typescript/client/#symbol-refineSchema"},{"name":"refineTable","originalName":"refineTable","kind":"FunctionDeclaration","signature":"/** Narrow a generated table's column TYPES without touching its runtime shape.\n *\n *  Returns the SAME def, re-typed (identity, after validating that every refined column exists and\n *  keeps its kind) — so conditions built from it, `rel(...)`s anchored on it, and `Row<typeof t>`\n *  all see the narrowed types. Pass the result to {@link refineSchema} so query roots narrow too. */\nexport declare function refineTable<N extends string, C extends AnyCols, R extends ColRefinements<C>>(base: TableDef<N, C>, cols: R): TableDef<N, RefinedCols<C, R>>;","description":"Narrow a generated table's column TYPES without touching its runtime shape.\n\nReturns the SAME def, re-typed (identity, after validating that every refined column exists and\nkeeps its kind) — so conditions built from it, `rel(...)`s anchored on it, and `Row<typeof t>`\nall see the narrowed types. Pass the result to {@link refineSchema} so query roots narrow too.","source":"packages/client/src/schema.ts","line":317,"href":"/reference/typescript/client/#symbol-refineTable"},{"name":"rel","originalName":"rel","kind":"FunctionDeclaration","signature":"/**\n * Declare a relationship once: `rel(issue, user, { ownerId: \"id\" })` means `issue.ownerId → user.id`.\n * `mapping` is `{ [parentColumn]: childColumn }` (a composite join is multiple entries). The `parent`\n * table is used only to type-check the keys; pass the result to `sub`/`countAs`/`exists`.\n */\nexport declare function rel<PC extends AnyCols, CC extends AnyCols>(_parent: TableLike<PC>, child: TableLike<CC>, mapping: Partial<Record<keyof PC & string, keyof CC & string>>): Relationship<PC, CC>;","description":"Declare a relationship once: `rel(issue, user, { ownerId: \"id\" })` means `issue.ownerId → user.id`.\n`mapping` is `{ [parentColumn]: childColumn }` (a composite join is multiple entries). The `parent`\ntable is used only to type-check the keys; pass the result to `sub`/`countAs`/`exists`.","source":"packages/client/src/schema.ts","line":476,"href":"/reference/typescript/client/#symbol-rel"},{"name":"Relationship","originalName":"Relationship","kind":"InterfaceDeclaration","signature":"/**\n * A reusable, typed JOIN between two tables — the correlation declared once (design §4). Built with\n * {@link rel}; parameterized by the parent columns `PC` (so a `sub` checks the relationship belongs to\n * the query's table) and the child columns `CC` (which flow into the nested result type). Pass it to\n * `sub`/`countAs`/`exists` in place of an explicit `child` + `{ parent, child }` correlation.\n */\nexport interface Relationship<PC extends AnyCols, CC extends AnyCols> {\n    /** The child table the relationship points at. */\n    readonly child: TableLike<CC>;\n    /** Correlation keys: `parent[i]` (a parent column) joins to `child[i]` (a child column). */\n    readonly correlation: {\n        readonly parent: readonly string[];\n        readonly child: readonly string[];\n    };\n    /** Phantom binding the parent columns so `Query<C>.sub(alias, rel)` rejects a rel for another table. */\n    readonly __parent?: PC;\n    readonly [RELATIONSHIP_BRAND]: true;\n}","description":"A reusable, typed JOIN between two tables — the correlation declared once (design §4). Built with\n{@link rel}; parameterized by the parent columns `PC` (so a `sub` checks the relationship belongs to\nthe query's table) and the child columns `CC` (which flow into the nested result type). Pass it to\n`sub`/`countAs`/`exists` in place of an explicit `child` + `{ parent, child }` correlation.","source":"packages/client/src/schema.ts","line":458,"href":"/reference/typescript/client/#symbol-Relationship"},{"name":"RemoteQuery","originalName":"RemoteQuery","kind":"InterfaceDeclaration","signature":"/** The network identity for a named query subscription. The local AST remains local; remote\n *  normalized/optimistic sources use only this `(name,args)` pair upstream. */\nexport interface RemoteQuery {\n    name: string;\n    args: unknown;\n}","description":"The network identity for a named query subscription. The local AST remains local; remote\nnormalized/optimistic sources use only this `(name,args)` pair upstream.","source":"packages/client/src/types.ts","line":159,"href":"/reference/typescript/client/#symbol-RemoteQuery"},{"name":"RESERVED_TABLE_PREFIXES","originalName":"RESERVED_TABLE_PREFIXES","kind":"VariableDeclaration","signature":"/** Table-name prefixes reserved by the engine for SYNTHETIC tables — `__agg_<fnv>` aggregate\n *  bases (`AGGREGATE-SYNC-DESIGN.md` §3.3) and `_rindle_*` system tables (e.g. the lmid table).\n *  A user table (synced OR local) under one of these would shadow a synthetic source — and since\n *  `registerTable` is idempotent-on-name and base tables register before synthetics, the later\n *  synthetic registration would silently no-op and the agg join would read the user table as the\n *  count (silent corruption, `201-LOCAL-ONLY-TABLES-DESIGN.md` N1). The ban makes that\n *  structurally impossible — checked once, statically, at {@link createSchema}. */\nexport declare const RESERVED_TABLE_PREFIXES: readonly [\n    \"__agg_\",\n    \"_rindle_\"\n];","description":"Table-name prefixes reserved by the engine for SYNTHETIC tables — `__agg_<fnv>` aggregate\nbases (`AGGREGATE-SYNC-DESIGN.md` §3.3) and `_rindle_*` system tables (e.g. the lmid table).\nA user table (synced OR local) under one of these would shadow a synthetic source — and since\n`registerTable` is idempotent-on-name and base tables register before synthetics, the later\nsynthetic registration would silently no-op and the agg join would read the user table as the\ncount (silent corruption, `201-LOCAL-ONLY-TABLES-DESIGN.md` N1). The ban makes that\nstructurally impossible — checked once, statically, at {@link createSchema}.","source":"packages/client/src/schema.ts","line":220,"href":"/reference/typescript/client/#symbol-RESERVED_TABLE_PREFIXES"},{"name":"resolveChange","originalName":"resolveChange","kind":"FunctionDeclaration","signature":"/** Lift one `FlatChange` into a {@link ResolvedChange} against the query's `WireSchema`, or `null`\n *  if its path doesn't resolve to a materialized level. */\nexport declare function resolveChange(schema: WireSchema, change: FlatChange): ResolvedChange | null;","description":"Lift one `FlatChange` into a {@link ResolvedChange} against the query's `WireSchema`, or `null`\nif its path doesn't resolve to a materialized level.","source":"packages/client/src/resolve.ts","line":84,"href":"/reference/typescript/client/#symbol-resolveChange"},{"name":"ResolvedChange","originalName":"ResolvedChange","kind":"InterfaceDeclaration","signature":"/** One resolved change: a `FlatChange` lifted out of positional/indexed wire form into names,\n *  using the query's `WireSchema` (from `hello`) as the sole position→name source. */\nexport interface ResolvedChange {\n    /** Relationship-alias chain from the query root to the changed level (`[]` ⇒ the root rows). */\n    aliasChain: string[];\n    /** The alias of the changed level (`\"\"` ⇒ root), i.e. the last of `aliasChain`. */\n    alias: string;\n    op: \"add\" | \"remove\" | \"edit\";\n    /** The affected row, named. For `edit` this is the NEW row; see `old` for the prior one. */\n    row: NamedRow;\n    /** The prior row, named (present only for `edit`). */\n    old?: NamedRow;\n    /** The PARENT row (named), for a nested/aggregate change — e.g. the `ticket_type` whose `sold`\n     *  count moved. Taken from the path's last `parentRow`; absent for a root-level change. */\n    parent?: NamedRow;\n    /** Set when the changed level is a `countAs`/aggregate slot. The value is EXACT — read from the\n     *  slot's projected count column (`WireRel.project.col`). */\n    aggregate?: {\n        alias: string;\n        value: WireValue;\n        previous?: WireValue;\n    };\n    /** The raw node whose children a consumer can dig a named sub-row out of (via {@link subRow}). On\n     *  an `add` the engine always ships it; on a `remove` it is present only when the consumer opted\n     *  into the removed subtree (see the `op` mapping below). */\n    node?: WireNode;\n    /** The changed level's `WireSchema` — used by {@link subRow} to resolve a named sub of `node`. */\n    levelSchema: WireSchema;\n}","description":"One resolved change: a `FlatChange` lifted out of positional/indexed wire form into names,\nusing the query's `WireSchema` (from `hello`) as the sole position→name source.","source":"packages/client/src/resolve.ts","line":30,"href":"/reference/typescript/client/#symbol-ResolvedChange"},{"name":"ResultType","originalName":"ResultType","kind":"TypeAliasDeclaration","signature":"/** A query's SERVER-CHANNEL state, surfaced on its {@link ArrayView} (FOLDED-MUTATIONS-DESIGN §7 —\n *  formerly conflated with pending-ness, OPTIMISTIC-WRITES-DESIGN.md §6):\n *   - `unknown`  — not hydrated: the server has not produced a first result for this query yet;\n *   - `complete` — the server has answered. STAYS `complete` while a local mutation is pending (the\n *                  prediction is the client's best current answer); reversion on rejection is an\n *                  event (`onRejected`), not a downgrade of completeness;\n *   - `error`    — RESERVED for a future server-side, query-level error signal\n *                  (see `designs/101-QUERY-ERRORS-DESIGN.md`); no longer produced by a pending mutation.\n *  \"Is a prediction pending here?\" is now a separate reactive axis (the backend's `pending(qid)` /\n *  `onPending`), not folded into this type. A backend with no server lifecycle (the in-process\n *  engine) leaves every view `complete`. */\nexport type ResultType = \"unknown\" | \"complete\" | \"error\";","description":"A query's SERVER-CHANNEL state, surfaced on its {@link ArrayView } (FOLDED-MUTATIONS-DESIGN §7 —\nformerly conflated with pending-ness, OPTIMISTIC-WRITES-DESIGN.md §6):\n - `unknown`  — not hydrated: the server has not produced a first result for this query yet;\n - `complete` — the server has answered. STAYS `complete` while a local mutation is pending (the\n                prediction is the client's best current answer); reversion on rejection is an\n                event (`onRejected`), not a downgrade of completeness;\n - `error`    — RESERVED for a future server-side, query-level error signal\n                (see `designs/101-QUERY-ERRORS-DESIGN.md`); no longer produced by a pending mutation.\n\"Is a prediction pending here?\" is now a separate reactive axis (the backend's `pending(qid)` /\n`onPending`), not folded into this type. A backend with no server lifecycle (the in-process\nengine) leaves every view `complete`.","source":"packages/client/src/types.ts","line":155,"href":"/reference/typescript/client/#symbol-ResultType"},{"name":"Row","originalName":"Row","kind":"TypeAliasDeclaration","signature":"/** The row type of a table definition: `Row<typeof issue>` → `{ id: string; … }`. The\n *  whole-table ergonomic form of {@link RowOf}, so app code derives its row interfaces from\n *  the schema instead of hand-maintaining a parallel twin. */\nexport type Row<T extends AnyTable> = RowOf<T[typeof SCHEMA][\"columns\"]>;","description":"The row type of a table definition: `Row<typeof issue>` → `{ id: string; … }`. The\nwhole-table ergonomic form of {@link RowOf}, so app code derives its row interfaces from\nthe schema instead of hand-maintaining a parallel twin.","source":"packages/client/src/schema.ts","line":107,"href":"/reference/typescript/client/#symbol-Row"},{"name":"RowOf","originalName":"RowOf","kind":"TypeAliasDeclaration","signature":"export type RowOf<C extends AnyCols> = {\n    [K in keyof C]: ColT<C[K]>;\n};","description":"","source":"packages/client/src/schema.ts","line":28,"href":"/reference/typescript/client/#symbol-RowOf"},{"name":"rowsEqual","originalName":"rowsEqual","kind":"FunctionDeclaration","signature":"/** Elementwise equality over positional bare-cell rows — THE row comparator for every JS-side\n *  diff (views, aggregate heads, the persistence mirror), exported so no caller grows a drifted\n *  private copy. Per cell: `===` keeps `-0 === 0` (the engine's key semantics treat them equal);\n *  the `Object.is` arm makes a NaN cell equal itself (under `!==` alone, a NaN-bearing row never\n *  matches any copy of itself, so every diff re-emits it as a spurious edit forever). */\nexport declare function rowsEqual(a: WireValue[], b: WireValue[]): boolean;","description":"Elementwise equality over positional bare-cell rows — THE row comparator for every JS-side\ndiff (views, aggregate heads, the persistence mirror), exported so no caller grows a drifted\nprivate copy. Per cell: `===` keeps `-0 === 0` (the engine's key semantics treat them equal);\nthe `Object.is` arm makes a NaN cell equal itself (under `!==` alone, a NaN-bearing row never\nmatches any copy of itself, so every diff re-emits it as a spurious edit forever).","source":"packages/client/src/view.ts","line":196,"href":"/reference/typescript/client/#symbol-rowsEqual"},{"name":"Schema","originalName":"Schema","kind":"InterfaceDeclaration","signature":"export interface Schema<S extends ColsMap = ColsMap, P extends Record<string, string> = PkMap<S>> {\n    readonly tables: Readonly<Record<string, TableMeta>>;\n    /** Phantom carrying name→columns for query-root inference (never read at runtime). */\n    readonly __cols: S;\n    /** Phantom carrying name→pk-column-union for the typed mutator tx (never read at runtime). */\n    readonly __pk: P;\n}","description":"","source":"packages/client/src/schema.ts","line":205,"href":"/reference/typescript/client/#symbol-Schema"},{"name":"SCHEMA","originalName":"SCHEMA","kind":"VariableDeclaration","signature":"/** Metadata key on a {@link TableDef} (a `unique symbol`, so no column name collides). */\nexport declare const SCHEMA: unique symbol;","description":"Metadata key on a {@link TableDef} (a `unique symbol`, so no column name collides).","source":"packages/client/src/schema.ts","line":57,"href":"/reference/typescript/client/#symbol-SCHEMA"},{"name":"SchemaOf","originalName":"SchemaOf","kind":"TypeAliasDeclaration","signature":"/** name → columns, derived from the tables array (for typing `store.query.<table>`). */\nexport type SchemaOf<T extends readonly AnyTable[]> = {\n    [E in T[number] as E[typeof SCHEMA][\"name\"]]: E[typeof SCHEMA][\"columns\"];\n};","description":"name → columns, derived from the tables array (for typing `store.query.<table>`).","source":"packages/client/src/schema.ts","line":188,"href":"/reference/typescript/client/#symbol-SchemaOf"},{"name":"ServerStore","originalName":"ServerStore","kind":"ClassDeclaration","signature":"/**\n * The server-side Store wrapper (SSR-DESIGN.md §6.2). Wraps a {@link Store} over a\n * {@link OneShotBackend} and adds the loader-phase `preload` plus `dehydrate`. Pass `.store` to\n * the React `<Rindle>` provider for the synchronous render; return `.dehydrate()` from the loader.\n * Create one instance per request, with an authorized read function for that request's principal.\n * Its snapshots seed views; they do not persist synced rows in the browser database.\n */\nexport declare class ServerStore<S extends ColsMap> {\n    readonly store: Store<S>;\n    private readonly schema;\n    private readonly opts;\n    constructor(schema: Schema<S>, opts: ServerStoreOptions);\n    /** Run the one-shot read for `query` and seed its first-paint snapshot (SSR-DESIGN.md §6.2).\n     *  Call once per query in the route loader, before the synchronous render. */\n    preload(query: Query<any, any, any>): Promise<void>;\n    /** The dehydrated first-paint cache for every preloaded query — embed in the HTML, then\n     *  `store.hydrate(...)` it in the browser. */\n    dehydrate(): DehydratedState;\n    /**\n     * Loader-phase convenience over {@link preload} + {@link dehydrate}: preload EVERY query (reads run\n     * concurrently) and return the dehydrated first-paint cache. Composition keeps this to one read per\n     * composed root query — no request waterfall (SSR-DESIGN.md §6.2).\n     *\n     * A failed read produces no seed for that query and calls `onError`, if provided. Other reads\n     * can still supply seeds. The browser must establish its own successful live subscription to\n     * obtain the missing data; hydration alone does not retry this read. Without `onError`, the\n     * preload failure is silent. An `onError` callback that throws rejects the batch.\n     */\n    preloadAll(queries: Array<Query<any, any, any>>, opts?: {\n        onError?: (query: Query<any, any, any>, err: unknown) => void;\n    }): Promise<DehydratedState>;\n}","description":"The server-side Store wrapper (SSR-DESIGN.md §6.2). Wraps a {@link Store} over a\n{@link OneShotBackend} and adds the loader-phase `preload` plus `dehydrate`. Pass `.store` to\nthe React `<Rindle>` provider for the synchronous render; return `.dehydrate()` from the loader.\nCreate one instance per request, with an authorized read function for that request's principal.\nIts snapshots seed views; they do not persist synced rows in the browser database.","source":"packages/client/src/ssr.ts","line":78,"href":"/reference/typescript/client/#symbol-ServerStore"},{"name":"ServerStoreOptions","originalName":"ServerStoreOptions","kind":"InterfaceDeclaration","signature":"export interface ServerStoreOptions {\n    /** Performs an authorized one-shot read. See {@link OneShotQueryFn} for access ownership. */\n    query: OneShotQueryFn;\n    /** Optional namespace for query deduplication, forwarded to every preload. Different keys\n     *  prevent pipeline sharing for the same AST. This key does not authorize access or filter rows;\n     *  the query must already contain the required visibility predicates. */\n    visibilityKey?: string;\n    /** Optional idle TTL (ms) the warm pipeline is left at, forwarded to every preload (SSR-DESIGN.md\n     *  §3.4). The TTL is NOT part of the dedup key, so a shared materialization keeps the LONGEST TTL\n     *  any caller requested (max-wins) — `ttlMs` can extend a query's warm-handoff window, never\n     *  shrink it; absent ⇒ the daemon's default idle TTL. */\n    ttlMs?: number;\n}","description":"","source":"packages/client/src/ssr.ts","line":57,"href":"/reference/typescript/client/#symbol-ServerStoreOptions"},{"name":"ServerWriteTx","originalName":"ServerWriteTx","kind":"InterfaceDeclaration","signature":"/** The ASYNC server-side write surface a mutator runs against. Semantically the twin of the client's\n *  synchronous `MutationTx` write methods — same names, same keyed-row arguments — but every op is a\n *  Promise. Reads see this transaction's own writes on both Postgres and the daemon; the daemon\n *  opens an interactive transaction when a read is needed. Inserts require every non-nullable\n *  column and fill omitted nullable columns with `null`. Updates and deletes require the PK. */\nexport interface ServerWriteTx {\n    /** Insert a row. Missing required columns and unknown columns throw; omitted nullable\n     *  columns become `null`, rather than using database defaults. */\n    insert(table: string, row: KeyedRow): Promise<void>;\n    /** Update the row identified by the pk columns; only the named non-pk columns change. A missing\n     *  row is a NO-OP. */\n    update(table: string, row: KeyedRow): Promise<void>;\n    /** Insert, or replace non-PK columns on PK conflict, using the same insert shape. */\n    upsert(table: string, row: KeyedRow): Promise<void>;\n    /** Insert with the same nullable-column rules as `insert`, or do nothing on PK conflict. */\n    insertIgnore(table: string, row: KeyedRow): Promise<void>;\n    /** Delete the row identified by the pk columns. A missing row is a NO-OP. */\n    delete(table: string, pk: KeyedRow): Promise<void>;\n    /** Read one row by primary key, through the OPEN transaction on both backends\n     *  (read-your-writes: live on Postgres; via an interactive mutation session on the daemon,\n     *  DAEMON-INTERACTIVE-TXN-DESIGN.md §5.3). */\n    row(table: string, pk: KeyedRow): Promise<KeyedRow | undefined>;\n}","description":"The ASYNC server-side write surface a mutator runs against. Semantically the twin of the client's\nsynchronous `MutationTx` write methods — same names, same keyed-row arguments — but every op is a\nPromise. Reads see this transaction's own writes on both Postgres and the daemon; the daemon\nopens an interactive transaction when a read is needed. Inserts require every non-nullable\ncolumn and fill omitted nullable columns with `null`. Updates and deletes require the PK.","source":"packages/client/src/mutation-ops.ts","line":29,"href":"/reference/typescript/client/#symbol-ServerWriteTx"},{"name":"shared","originalName":"shared","kind":"FunctionDeclaration","signature":"/** Co-locate a shared (generator) mutator with the validator for its args — pairing the arg SHAPE\n *  with the body that consumes it at ONE site, so neither tier restates it (the client derives its\n *  callsite type from `Args`; the server parses untrusted args through `.args`). Returns the SAME\n *  generator function with an `args` property attached (`Object.assign` mutates + returns it), so the\n *  registered value is byte-for-byte what the client drove before: {@link isGeneratorMutator} still\n *  detects it and it still `satisfies ClientRegistry`. */\nexport declare function shared<Args, Ctx extends MutatorCtx = MutatorCtx>(args: ArgSchema<Args>, run: SharedMutator<Args, Ctx>): SharedMutatorWithArgs<Args, Ctx>;","description":"Co-locate a shared (generator) mutator with the validator for its args — pairing the arg SHAPE\nwith the body that consumes it at ONE site, so neither tier restates it (the client derives its\ncallsite type from `Args`; the server parses untrusted args through `.args`). Returns the SAME\ngenerator function with an `args` property attached (`Object.assign` mutates + returns it), so the\nregistered value is byte-for-byte what the client drove before: {@link isGeneratorMutator} still\ndetects it and it still `satisfies ClientRegistry`.","source":"packages/client/src/mutation-ops.ts","line":180,"href":"/reference/typescript/client/#symbol-shared"},{"name":"SharedMutator","originalName":"SharedMutator","kind":"TypeAliasDeclaration","signature":"/** A generator (isomorphic) mutator, shared verbatim by both tiers: the client trusts typed `args`,\n *  the server parses untrusted args into `Args` before invoking. */\nexport type SharedMutator<Args, Ctx extends MutatorCtx = MutatorCtx> = (tx: IsoTx, args: Args, ctx: Ctx) => MutationGen;","description":"A generator (isomorphic) mutator, shared verbatim by both tiers: the client trusts typed `args`,\nthe server parses untrusted args into `Args` before invoking.","source":"packages/client/src/mutation-ops.ts","line":152,"href":"/reference/typescript/client/#symbol-SharedMutator"},{"name":"SharedMutatorWithArgs","originalName":"SharedMutatorWithArgs","kind":"TypeAliasDeclaration","signature":"/** A shared mutator that CARRIES its own arg validator, co-located at the def site (`shared(schema,\n *  gen)`). The client registers it exactly like a bare generator mutator — the `.args` validator is\n *  inert there (typed callsites skip the parse); the server ({@link runSharedMutation}, via the\n *  api-server's `sharedApiMutators`) reads `.args` to parse untrusted wire args before driving the\n *  SAME body. */\nexport type SharedMutatorWithArgs<Args, Ctx extends MutatorCtx = MutatorCtx> = SharedMutator<Args, Ctx> & {\n    args: ArgSchema<Args>;\n};","description":"A shared mutator that CARRIES its own arg validator, co-located at the def site (`shared(schema,\ngen)`). The client registers it exactly like a bare generator mutator — the `.args` validator is\ninert there (typed callsites skip the parse); the server ({@link runSharedMutation }, via the\napi-server's `sharedApiMutators`) reads `.args` to parse untrusted wire args before driving the\nSAME body.","source":"packages/client/src/mutation-ops.ts","line":170,"href":"/reference/typescript/client/#symbol-SharedMutatorWithArgs"},{"name":"SimpleOp","originalName":"SimpleOp","kind":"TypeAliasDeclaration","signature":"/** The wire comparison operators (exact strings, `src/ast.rs` `Op`). */\nexport type SimpleOp = \"=\" | \"!=\" | \"<\" | \"<=\" | \">\" | \">=\" | \"IS\" | \"IS NOT\" | \"LIKE\" | \"NOT LIKE\" | \"ILIKE\" | \"NOT ILIKE\" | \"IN\" | \"NOT IN\";","description":"The wire comparison operators (exact strings, `src/ast.rs` `Op`).","source":"packages/client/src/ast.ts","line":19,"href":"/reference/typescript/client/#symbol-SimpleOp"},{"name":"SingularArrayView","originalName":"SingularArrayView","kind":"InterfaceDeclaration","signature":"/** What a top-level `.one()` query materializes to: the single row (or `null`), not an array.\n *  A thin adapter over a {@link FlatArrayView} — all the folding is shared; only the result\n *  boundary unwraps (`data[0] ?? null`). Reference identity of the row is preserved. */\nexport interface SingularArrayView<R> {\n    /** The single current row, or `null` when the query matches nothing. */\n    readonly data: R | null;\n    /** The engine query id — see {@link ArrayView.qid}. */\n    readonly qid: QueryId;\n    /** The query's view `WireSchema` — see {@link ArrayView.schema}. */\n    readonly schema: WireSchema | null;\n    /** The query's lifecycle state — see {@link ArrayView.resultType}. */\n    readonly resultType: ResultType;\n    /** Subscribe; fires immediately with the current row, then after each applied batch (and after\n     *  a {@link resultType} change). */\n    subscribe(listener: (data: R | null) => void): () => void;\n    /** Subscribe to the view's folded CHANGE stream — see {@link ArrayView.onChanges}. The changes\n     *  are the same positional `FlatChange`s as the plural view (a `.one()` is just the list capped to\n     *  one), so a narrator resolves them identically. */\n    onChanges(listener: ViewChangeListener): () => void;\n    /** Tear down + stop receiving updates. */\n    destroy(): void;\n}","description":"What a top-level `.one()` query materializes to: the single row (or `null`), not an array.\nA thin adapter over a {@link FlatArrayView} — all the folding is shared; only the result\nboundary unwraps (`data[0] ?? null`). Reference identity of the row is preserved.","source":"packages/client/src/view.ts","line":68,"href":"/reference/typescript/client/#symbol-SingularArrayView"},{"name":"SingularView","originalName":"SingularView","kind":"ClassDeclaration","signature":"/** Wrap a plural {@link FlatArrayView} as a {@link SingularArrayView} for a `.one()` query\n *  (the engine caps it to `limit = 1`, so the top list holds at most one node). */\nexport declare class SingularView<R> implements SingularArrayView<R> {\n    private readonly inner;\n    constructor(inner: ArrayView<R>);\n    get data(): R | null;\n    get qid(): QueryId;\n    get schema(): WireSchema | null;\n    get resultType(): ResultType;\n    subscribe(listener: (data: R | null) => void): () => void;\n    onChanges(listener: ViewChangeListener): () => void;\n    destroy(): void;\n}","description":"Wrap a plural {@link FlatArrayView} as a {@link SingularArrayView} for a `.one()` query\n(the engine caps it to `limit = 1`, so the top list holds at most one node).","source":"packages/client/src/view.ts","line":90,"href":"/reference/typescript/client/#symbol-SingularView"},{"name":"spliceStreamText","originalName":"spliceStreamText","kind":"FunctionDeclaration","signature":"/**\n * Merge the durable plane with the live tail.\n *\n * `durable` is what the IVM view shows; `produced` is what a subscription has accumulated (the prefix\n * it joined at, plus every `chunk`). Both are prefixes of the same response, so the merge is \"take\n * the longer\" — no diffing, no overlap handling, no ranges.\n *\n * The length comparison is the whole algorithm, which is why a caller MUST seed its accumulator with\n * the text it joined at: a tail carrying only the chunks it received would read as shorter than the\n * durable text and be discarded. `useStreamedText` does that for you.\n */\nexport declare function spliceStreamText(durable: string, produced: string): string;","description":"Merge the durable plane with the live tail.\n\n`durable` is what the IVM view shows; `produced` is what a subscription has accumulated (the prefix\nit joined at, plus every `chunk`). Both are prefixes of the same response, so the merge is \"take\nthe longer\" — no diffing, no overlap handling, no ranges.\n\nThe length comparison is the whole algorithm, which is why a caller MUST seed its accumulator with\nthe text it joined at: a tail carrying only the chunks it received would read as shorter than the\ndurable text and be discarded. `useStreamedText` does that for you.","source":"packages/client/src/stream.ts","line":75,"href":"/reference/typescript/client/#symbol-spliceStreamText"},{"name":"stableKey","originalName":"stableKey","kind":"FunctionDeclaration","signature":"export declare function stableKey(value: unknown, seen?: WeakSet<object>): string;","description":"","source":"packages/client/src/key.ts","line":6,"href":"/reference/typescript/client/#symbol-stableKey"},{"name":"Store","originalName":"Store","kind":"ClassDeclaration","signature":"export declare class Store<S extends ColsMap> {\n    /** Type-safe query entry: `store.query.issue.where.closed(false).materialize()`. */\n    readonly query: QueryRoot<S>;\n    private readonly schema;\n    private readonly backend;\n    private nextId;\n    private readonly views;\n    private readonly asts;\n    private readonly syncLeases;\n    private readonly seeds;\n    private changeListeners?;\n    private removedSubtreeWanted;\n    private resultTypeListeners?;\n    private readonly hasResultTypeLifecycle;\n    private commitDepth;\n    private readonly pendingFlush;\n    private readonly pendingChanges;\n    constructor(schema: Schema<S>, backend: Backend);\n    /** Materialize any fluent query object. Named queries subscribe remotely by `(name,args)`;\n     *  ad-hoc builder queries are local-only for local-first backends.\n     *\n     *  `opts.onChanges` binds a narrator to this view's DIFF stream ({@link ArrayView.onChanges}) — the\n     *  per-view seam that replaces filtering the store-global {@link subscribeChanges} by `qid`. It is\n     *  wired BEFORE the backend registers the query, so a synchronous backend's first `snapshot` (fired\n     *  inside `registerQuery`, before this returns) is delivered too. */\n    materialize<Q extends Query<any, any, any>>(query: Q, opts?: {\n        onChanges?: ViewChangeListener;\n    }): ReturnType<Q[\"materialize\"]>;\n    /** One-shot AUTHORITATIVE read: materialize `query`, wait until its result is server-authoritative\n     *  ({@link ResultType} `\"complete\"`), read the data once, then destroy the view — resolving with the\n     *  plain result rather than a live subscription. Rejects if the query enters the `\"error\"` state. Use\n     *  it for exports, imports, undo snapshots — anywhere that wants the current answer as a value.\n     *\n     *  A synchronous local-first backend (wasm/replica) has already delivered the first snapshot inside\n     *  {@link materialize}, so the view is `\"complete\"` on entry and this settles on the next microtask\n     *  without ever attaching a listener; a remote backend settles when the first live snapshot lands.\n     *  The query is NEVER left subscribed — the view is destroyed before the promise settles either way.\n     *  (A remote query that never completes leaves the promise pending, exactly as a `resultType` poll\n     *  would; race a timeout at the call site if you need one.) */\n    readOnce<Q extends Query<any, any, any>>(query: Q): Promise<ReturnType<Q[\"materialize\"]>[\"data\"]>;\n    /** True when the backend can retain a remote named query independently from the local\n     *  materialized AST view. React uses this to keep one local view per AST while still sending\n     *  every mounted `(name,args)` lease through the backend. */\n    canRetainRemoteQueries(): boolean;\n    /** Build one local AST view, with remote syncing retained separately through the returned\n     *  handle. This is a lower-level API for UI bindings; ordinary app code should keep using\n     *  `materialize(query)`. */\n    createCachedQueryView<Q extends Query<any, any, any>>(query: Q): CachedQueryView<Q>;\n    /** Retain a named remote query purely for normalized/local-first coverage. This does not\n     *  register or materialize the query AST locally, so React can keep server sync coverage alive\n     *  without subscribing to the broad coverage result tree. */\n    retainSyncQuery<Q extends Query<any, any, any>>(query: Q): SyncQueryLease;\n    /** Apply a batch of mutations (object rows → positional). Resolves when the backend has\n     *  accepted them (local: applied; remote: sent). The resulting view updates flow back via\n     *  the backend's event stream. */\n    write(fn: (tx: WriteTx<S>) => void): Promise<void>;\n    /** Direct-commit write to LOCAL-only tables (`201-LOCAL-ONLY-TABLES-DESIGN.md` §6): the\n     *  client-authoritative path for selection state, draft text, view prefs, scratch rows. It\n     *  bypasses the optimistic pending stack entirely — a local table is untracked, so it never\n     *  rebases, reverts, or waits on a server confirmation (it \"moves on its own\").\n     *\n     *  Rejects a synced/tracked table (M2): a direct write to one would be un-applied on the very\n     *  next server rewind. Local writes also must NOT live inside a replayable mutator (M1) — the\n     *  server runs the mutator from `args` alone and cannot see local tables; use this instead.\n     *  Same keyed `WriteTx` shape as {@link write}. `async` so the no-seam / M2 guards surface as a\n     *  REJECTED promise (the `Promise<void>` contract) rather than a synchronous throw that escapes a\n     *  caller's `.catch` and crashes the event handler / render frame. */\n    writeLocal(fn: (tx: WriteTx<S>) => void): Promise<void>;\n    /** Drain a keyed `WriteTx` callback into positional {@link Mutation}s (shared by\n     *  {@link write} / {@link writeLocal}; json columns stringified, rows in column order). */\n    private collectMutations;\n    /** Seed a query's first-paint snapshot from a `POST /query` response (server side): convert the\n     *  assembled rows to the view's projected shape and stash them by `viewKey`. A view materialized\n     *  for this AST (during the synchronous render) reads the seed; {@link dehydrate} serializes it. */\n    seedAssembled(ast: Ast, rows: AssembledNode[], cvMin: number): void;\n    /** The dehydrated first-paint cache for every preloaded query — embed it in the HTML and pass it\n     *  to {@link hydrate} in the browser (SSR-DESIGN.md §6.2). */\n    dehydrate(): DehydratedState;\n    /** Seed the browser store from the server's {@link dehydrate} output (SSR-DESIGN.md §6.2): each\n     *  view materialized for a hydrated AST shows these rows until its first live `hello` reconciles. */\n    hydrate(state: DehydratedState): void;\n    /** A query's hydrated first-paint snapshot, by `viewKey` — what React's `getServerSnapshot`\n     *  reads so an SSR render (and the matching client hydration pass) sees the seeded rows without\n     *  opening a subscription. */\n    seedSnapshot(viewKey: string): DehydratedQuery | undefined;\n    primaryKeyFor(table: string): readonly string[];\n    /** Convert assembled (nested-by-name) rows (SSR-DESIGN.md §3.3) into the view's projected result\n     *  shape: spread `cols` (parsing json columns), recurse into each relationship by its alias\n     *  (plural → array, `.one()` → object/null, `countAs` → bare scalar). */\n    assembleSnapshot(ast: Ast, rows: AssembledNode[]): unknown[];\n    private assembleNode;\n    private registerMaterialized;\n    private retainRemote;\n    private onEvent;\n    /** Retire a view's SSR seed — from the view (so `data` switches from the seed to the maintained\n     *  tree) AND from the seeds map (so no later mount re-seeds a now-live query) — but ONLY once the\n     *  query is AUTHORITATIVE (`resultType === \"complete\"`). Called BEFORE the fold it accompanies, so\n     *  that fold's notify already reflects the live tree with no empty gap. Idempotent.\n     *\n     *  The gate is the fix for the synchronous optimistic/wasm backend: it fires a query's FIRST snapshot\n     *  from LOCAL, not-yet-synced state while the query is still `unknown` (`registerMaterialized` marks a\n     *  lifecycle-backed remote view `unknown` up front for exactly this), then delivers the authoritative\n     *  rows one event later as a `catchUp` batch — having already flipped the query to `complete`. So the\n     *  seed survives the pre-sync snapshot (`unknown` ⇒ skip) and retires on the catch-up (`complete` ⇒\n     *  retire). A lifecycle-LESS backend (pure wasm, the SSR one-shot, tests) is `complete` from creation,\n     *  so its first snapshot retires the seed exactly as before this gate existed. */\n    private retireSeedIfLive;\n    /** Retire the SSR seed (if authoritative) and fold the accompanying hydration delta — BEFORE the\n     *  fold so its notify already reflects the live tree with no empty gap. The subtlety: a hydration\n     *  can fold NOTHING — a 0-row authoritative result, or one whose rows are already present in `top`\n     *  (a query whose result is fully covered by an already-hydrated sibling: the shared rows dedup to\n     *  zero net base mutations). Then {@link FlatArrayView.applyChanges} notifies nothing, so the\n     *  seed→tree switch would never reach subscribers and the view freezes on the stale seed. Guard\n     *  against that: if the seed retired but the fold was a no-op, force the handoff notify (inline, or\n     *  via the commit-boundary flush). Flash-safe — the forced notify only fires when there was nothing\n     *  to fold, so `data` is already the correct live tree by then. */\n    private foldHydration;\n    /** Fold a batch into its view, then notify now or — inside a commit bracket — defer the view's\n     *  notification to the commit boundary, so all sibling views fold first (cross-view-atomic\n     *  notification; see `commitDepth`). */\n    private applyAndTrack;\n    /** Deliver everything deferred during the just-ended commit, after every affected view has folded\n     *  (cross-view-atomic notification): view subscribers first, then the raw change stream\n     *  (narrators/devtools), each frame in arrival order. A throwing listener does not stop the others\n     *  — the first error is re-raised only once the whole flush completes (mirroring the backend's\n     *  per-query isolation). View subscribers run before change listeners, preserving the per-event\n     *  order that held before coalescing (a view's subscribers fired before its change frame). */\n    private flushCommit;\n    /** Subscribe to the raw per-query {@link ChangeEvent} stream (hello / snapshot / batch) the Store\n     *  routes to its views, tagged by `qid`. Fired AFTER the event is folded — and, for a commit that\n     *  fans out to several queries (the in-process engine's `onCommitBoundary`), after EVERY view in\n     *  that commit has folded — so a listener that re-reads ANY view (its own or a sibling) sees\n     *  post-commit state, never a torn mid-commit one. Frames keep their arrival (engine-dispatch)\n     *  order, one per affected query. This is the supported way to drive change-derived layers\n     *  (e.g. {@link resolveChange} → @rindle/narrator, or a devtools pane) off a live store — attach\n     *  BEFORE `materialize` to catch a synchronous backend's first `hello`+`snapshot`.\n     *  The per-query view `WireSchema` rides the `hello` frame (also readable via `view.schema`).\n     *\n     *  The third listener arg is the post-fold {@link ArrayView} for this `qid` (so a template wanting\n     *  list context — current `data`, `schema`, `resultType` — needn't look it up). It is ALWAYS the\n     *  plural view, even for a top-level `.one()` query: the Store retains the list-shaped view, not the\n     *  SingularView wrapper handed back from `materialize`. `undefined` only if the view is mid-teardown.\n     *\n     *  `opts.removedSubtree` enriches every `remove` op on this stream with the full removed subtree\n     *  ({@link FlatOp.node}), so a consumer can resolve a removed row's nested subs exactly as on an\n     *  `add` (a bare remove carries only the leaving row). It is reconstructed client-side from the\n     *  view — no wire/engine cost — and paid only on real evictions while at least one subscriber asks.\n     *\n     *  Returns a detach function; multiple listeners may attach. */\n    subscribeChanges(listener: (qid: QueryId, ev: ChangeEvent, view?: ArrayView<unknown>) => void, opts?: {\n        removedSubtree?: boolean;\n    }): () => void;\n    /** Subscribe to per-query {@link ResultType} transitions (the server-channel lifecycle the backend\n     *  pushes — `unknown` → `complete`, etc.), tagged by `qid`. Fired only on a CHANGE (never replayed\n     *  on attach; read `view.resultType` for the current value). The supported seam for a status-driven\n     *  layer (a devtools pane). Returns a detach function; multiple listeners may attach. */\n    subscribeResultType(listener: (qid: QueryId, rt: ResultType) => void): () => void;\n    /** A read-only snapshot of every live materialized view (DEBUG-TOOLS-BROWSER-DESIGN §4.2): its\n     *  qid, AST, {@link ResultType}, row count, and a capped row sample. Built fresh on each call from\n     *  the live `views`/`asts` maps — never cached, never mutating. `sampleRows` caps the per-query\n     *  peek (default 50) so a large view doesn't bloat the snapshot. */\n    __inspect(sampleRows?: number): StoreInspect;\n    private columns;\n    /** An object row → a positional cell array in the table's column order (json → string). */\n    private positionalize;\n    /** The per-level column types parallel to the WireSchema, so the view parses json columns. */\n    private viewTypes;\n}","description":"","source":"packages/client/src/store.ts","line":92,"href":"/reference/typescript/client/#symbol-Store"},{"name":"StoreInspect","originalName":"StoreInspect","kind":"InterfaceDeclaration","signature":"/** A frozen snapshot of the Store's live query state for a devtools pane ({@link Store.__inspect}). */\nexport interface StoreInspect {\n    queries: QueryInspect[];\n}","description":"A frozen snapshot of the Store's live query state for a devtools pane ({@link Store.__inspect}).","source":"packages/client/src/store.ts","line":88,"href":"/reference/typescript/client/#symbol-StoreInspect"},{"name":"STREAM_STATUS_STREAMING","originalName":"STREAM_STATUS_STREAMING","kind":"VariableDeclaration","signature":"/** The value in the mapped status column while a stream is live. */\nexport declare const STREAM_STATUS_STREAMING = \"streaming\";","description":"The value in the mapped status column while a stream is live.","source":"packages/client/src/stream.ts","line":22,"href":"/reference/typescript/client/#symbol-STREAM_STATUS_STREAMING"},{"name":"StreamFrame","originalName":"StreamFrame","kind":"TypeAliasDeclaration","signature":"/**\n * One frame of a subscription. A subscription always begins with `open` and always ends with exactly\n * one terminal frame — `end`, `stale`, or `absent` — after which the iterator completes.\n *\n * `stale` and `absent` are the two \"you are on the durable plane now\" answers, and both are SAFE:\n * the store holds everything below `floorSeq` and everything through `durableSeq`, so the reader's\n * IVM view converges without the stream. Neither is an error.\n */\nexport type StreamFrame = \n/** Join accepted. `from` is the (clamped) offset the replay starts at. */\n{\n    type: \"open\";\n    streamId: string;\n    from: number;\n    seq: number;\n    durableSeq: number;\n    ended: boolean;\n}\n/** PRODUCED text — not a durability claim. `text.length === seq - from`, always. */\n | {\n    type: \"chunk\";\n    from: number;\n    seq: number;\n    text: string;\n}\n/** The store now holds the prefix through `seq`. */\n | {\n    type: \"durable\";\n    seq: number;\n}\n/** Sealed. No further frames. */\n | {\n    type: \"end\";\n    seq: number;\n    status: StreamStatus;\n    error?: string;\n}\n/** `from` is below the producer's retained buffer floor (or the subscriber fell too far behind):\n *  read the store. (A raw `EventSource` rejoins automatically on its reconnect; `useStreamedText`\n *  deliberately stays on the durable plane instead — correct, at checkpoint granularity.) */\n | {\n    type: \"stale\";\n    floorSeq: number;\n    durableSeq: number;\n}\n/** The process serving this subscribe is not hosting the stream (wrong instance, already evicted,\n *  or it never existed): the store is the whole truth. */\n | {\n    type: \"absent\";\n};","description":"One frame of a subscription. A subscription always begins with `open` and always ends with exactly\none terminal frame — `end`, `stale`, or `absent` — after which the iterator completes.\n\n`stale` and `absent` are the two \"you are on the durable plane now\" answers, and both are SAFE:\nthe store holds everything below `floorSeq` and everything through `durableSeq`, so the reader's\nIVM view converges without the stream. Neither is an error.","source":"packages/client/src/stream.ts","line":32,"href":"/reference/typescript/client/#symbol-StreamFrame"},{"name":"StreamStatus","originalName":"StreamStatus","kind":"TypeAliasDeclaration","signature":"/**\n * How a stream ended.\n * - `complete` — the model finished.\n * - `cancelled` — the reader asked it to stop and the producer honoured it.\n * - `error` — the generation threw.\n * - `interrupted` — the host went away mid-generation. The one status that implies the store may be\n *   short of what was produced.\n */\nexport type StreamStatus = \"complete\" | \"cancelled\" | \"error\" | \"interrupted\";","description":"How a stream ended.\n- `complete` — the model finished.\n- `cancelled` — the reader asked it to stop and the producer honoured it.\n- `error` — the generation threw.\n- `interrupted` — the host went away mid-generation. The one status that implies the store may be\n  short of what was produced.","source":"packages/client/src/stream.ts","line":19,"href":"/reference/typescript/client/#symbol-StreamStatus"},{"name":"string","originalName":"string","kind":"VariableDeclaration","signature":"export declare const string: <T extends string = string>() => ColBuilder<T>;","description":"","source":"packages/client/src/schema.ts","line":46,"href":"/reference/typescript/client/#symbol-string"},{"name":"subRow","originalName":"subRow","kind":"FunctionDeclaration","signature":"/** Read a named sub-row off a change's `node` by relationship alias (e.g. the `guest` under an\n *  `rsvp`) — the `add` node, or a `remove`'s subtree when the consumer opted into it. The alias →\n *  wire slot mapping comes from the changed level's `WireSchema`. `null` when no node rode along. */\nexport declare function subRow(rc: ResolvedChange, alias: string): NamedRow | null;","description":"Read a named sub-row off a change's `node` by relationship alias (e.g. the `guest` under an\n`rsvp`) — the `add` node, or a `remove`'s subtree when the consumer opted into it. The alias →\nwire slot mapping comes from the changed level's `WireSchema`. `null` when no node rode along.","source":"packages/client/src/resolve.ts","line":128,"href":"/reference/typescript/client/#symbol-subRow"},{"name":"SyncEffectExec","originalName":"SyncEffectExec","kind":"InterfaceDeclaration","signature":"/** A tier's SYNCHRONOUS effect executor (the browser wasm engine): apply a write, resolve a read —\n *  both immediate. */\nexport interface SyncEffectExec {\n    apply(op: MutationOp): void;\n    read(table: string, pk: KeyedRow): KeyedRow | undefined;\n    query(q: QueryArg): QueryResultRow[];\n}","description":"A tier's SYNCHRONOUS effect executor (the browser wasm engine): apply a write, resolve a read —\nboth immediate.","source":"packages/client/src/mutation-ops.ts","line":226,"href":"/reference/typescript/client/#symbol-SyncEffectExec"},{"name":"SyncQueryLease","originalName":"SyncQueryLease","kind":"InterfaceDeclaration","signature":"export interface SyncQueryLease {\n    readonly resultType: ResultType;\n    subscribe(listener: () => void): () => void;\n    release(): void;\n}","description":"","source":"packages/client/src/store.ts","line":58,"href":"/reference/typescript/client/#symbol-SyncQueryLease"},{"name":"table","originalName":"table","kind":"FunctionDeclaration","signature":"/** `table(\"issue\").columns({ id: string(), … }).primaryKey(\"id\")`. Pass `{ local: true }` for a\n *  {@link TableMeta.local local-only} table (`201-LOCAL-ONLY-TABLES-DESIGN.md`). */\nexport declare function table<N extends string>(name: N, opts?: TableOptions): {\n    columns<C extends AnyCols>(cols: C): {\n        primaryKey<K extends keyof C & string>(...keys: K[]): TableDef<N, C, K>;\n    };\n};","description":"`table(\"issue\").columns({ id: string(), … }).primaryKey(\"id\")`. Pass `{ local: true }` for a\n{@link TableMeta.locallocal-only} table (`201-LOCAL-ONLY-TABLES-DESIGN.md`).","source":"packages/client/src/schema.ts","line":160,"href":"/reference/typescript/client/#symbol-table"},{"name":"TableDef","originalName":"TableDef","kind":"TypeAliasDeclaration","signature":"export type TableDef<N extends string, C extends AnyCols, PK extends string = string> = {\n    readonly [SCHEMA]: TableMeta<N, C, PK>;\n} & {\n    readonly [K in keyof C]: (arg: Arg<ColT<C[K]>>) => Cond<RowOf<C>>;\n};","description":"","source":"packages/client/src/schema.ts","line":92,"href":"/reference/typescript/client/#symbol-TableDef"},{"name":"TableLike","originalName":"TableLike","kind":"TypeAliasDeclaration","signature":"/** Any table, for positions that only read its metadata. The field-factory part of a\n *  `TableDef` is invariant in `C`, so callers constrain on the `[SCHEMA]` meta only — to\n *  which every concrete `TableDef<N, C>` is assignable. */\nexport type TableLike<C extends AnyCols> = {\n    readonly [SCHEMA]: TableMeta<string, C>;\n};","description":"Any table, for positions that only read its metadata. The field-factory part of a\n`TableDef` is invariant in `C`, so callers constrain on the `[SCHEMA]` meta only — to\nwhich every concrete `TableDef<N, C>` is assignable.","source":"packages/client/src/schema.ts","line":101,"href":"/reference/typescript/client/#symbol-TableLike"},{"name":"tableMeta","originalName":"tableMeta","kind":"FunctionDeclaration","signature":"/** Read a table's metadata (columns / PK / name). */\nexport declare function tableMeta(t: AnyTable): TableMeta;","description":"Read a table's metadata (columns / PK / name).","source":"packages/client/src/schema.ts","line":183,"href":"/reference/typescript/client/#symbol-tableMeta"},{"name":"TableMeta","originalName":"TableMeta","kind":"InterfaceDeclaration","signature":"export interface TableMeta<N extends string = string, C extends AnyCols = AnyCols, PK extends string = string> {\n    readonly name: N;\n    readonly columns: C;\n    readonly primaryKey: readonly PK[];\n    /** A **local-only** table (`201-LOCAL-ONLY-TABLES-DESIGN.md`): client-authoritative,\n     *  never synced/tracked/rebased. The single marker the whole design keys off (§4) — it is\n     *  immutable for the table's lifetime (N2) and never crosses the wire (C2). Absent ⇒ an\n     *  ordinary synced table.\n     *\n     *  `true` ⇒ eligible for the local-persistence plane (durable + cross-tab when the client\n     *  enables `persistLocal`, `207-LOCAL-TABLE-PERSISTENCE-DESIGN.md`). `\"session\"` ⇒ local but\n     *  EPHEMERAL: outside the plane entirely — never persisted, never replicated across tabs,\n     *  per-client-instance state that empties on reload (201's original behavior) even when\n     *  `persistLocal` is on. Every OTHER locality rule (untracked source, M1/M2 guards, E3/Q1\n     *  wire exclusion) treats both variants identically. */\n    readonly local?: boolean | \"session\";\n}","description":"","source":"packages/client/src/schema.ts","line":59,"href":"/reference/typescript/client/#symbol-TableMeta"},{"name":"TableOptions","originalName":"TableOptions","kind":"InterfaceDeclaration","signature":"/** Options for {@link table}. */\nexport interface TableOptions {\n    /** Declare a {@link TableMeta.local local-only} table (selection state, draft text, view\n     *  prefs, scratch rows): client-authoritative, never synced or rebased. See\n     *  `201-LOCAL-ONLY-TABLES-DESIGN.md`. Pass `\"session\"` for a local table that must stay\n     *  EPHEMERAL and per-tab even when the client enables `persistLocal` — e.g. selection state\n     *  that should not follow the user across tabs or reloads (207 §5.4). */\n    local?: boolean | \"session\";\n}","description":"Options for {@link table}.","source":"packages/client/src/schema.ts","line":83,"href":"/reference/typescript/client/#symbol-TableOptions"},{"name":"tableSpec","originalName":"tableSpec","kind":"FunctionDeclaration","signature":"/** The `SchemaSpec` (`columns` + `primaryKey` indices) the wasm `Db.registerTable` wants. */\nexport declare function tableSpec(meta: TableMeta): {\n    columns: string[];\n    primaryKey: number[];\n};","description":"The `SchemaSpec` (`columns` + `primaryKey` indices) the wasm `Db.registerTable` wants.","source":"packages/client/src/schema.ts","line":498,"href":"/reference/typescript/client/#symbol-tableSpec"},{"name":"toCell","originalName":"toCell","kind":"FunctionDeclaration","signature":"/** Encode a keyed-row cell to its wire {@link WireValue} for a column KIND — the one place both write\n *  funnels stringify a `json<T>` object (the typed mutator surface / design 206 §7). An\n *  already-stringified json value (a `string`) or any non-json cell passes through unchanged, so a\n *  mutator may pass EITHER a parsed object OR a JSON string. Mirrors `store.positionalize`. */\nexport declare function toCell(v: WireValue | object, type: ColType): WireValue;","description":"Encode a keyed-row cell to its wire {@link WireValue} for a column KIND — the one place both write\nfunnels stringify a `json<T>` object (the typed mutator surface / design 206 §7). An\nalready-stringified json value (a `string`) or any non-json cell passes through unchanged, so a\nmutator may pass EITHER a parsed object OR a JSON string. Mirrors `store.positionalize`.","source":"packages/client/src/schema.ts","line":536,"href":"/reference/typescript/client/#symbol-toCell"},{"name":"UpdateOf","originalName":"UpdateOf","kind":"TypeAliasDeclaration","signature":"/** The UPDATE shape of a table: its {@link PkOf primary-key columns} REQUIRED (they identify the row)\n *  plus every non-pk column OPTIONAL (`?`) and typed — a nullable one stays `T | null` (settable to\n *  null), a `NOT NULL` one is `T`. Omitted non-pk columns are left unchanged. */\nexport type UpdateOf<C extends AnyCols, PK extends string> = Simplify<PkOf<C, PK> & {\n    [K in Exclude<keyof C, PK>]?: ColT<C[K]>;\n}>;","description":"The UPDATE shape of a table: its {@link PkOfprimary-key columns} REQUIRED (they identify the row)\nplus every non-pk column OPTIONAL (`?`) and typed — a nullable one stays `T | null` (settable to\nnull), a `NOT NULL` one is `T`. Omitted non-pk columns are left unchanged.","source":"packages/client/src/schema.ts","line":145,"href":"/reference/typescript/client/#symbol-UpdateOf"},{"name":"ValuePosition","originalName":"ValuePosition","kind":"TypeAliasDeclaration","signature":"/** A column reference or a literal — `type`-tagged. */\nexport type ValuePosition = {\n    type: \"column\";\n    name: string;\n} | {\n    type: \"literal\";\n    value: LitValue;\n};","description":"A column reference or a literal — `type`-tagged.","source":"packages/client/src/ast.ts","line":14,"href":"/reference/typescript/client/#symbol-ValuePosition"},{"name":"ViewChangeListener","originalName":"ViewChangeListener","kind":"TypeAliasDeclaration","signature":"/** A per-view change listener ({@link ArrayView.onChanges}): the net `FlatChange[]` this view folded,\n *  the {@link ChangePhase} it arrived on, and the view's `WireSchema` (the position→name source for\n *  `resolveChange`). This is the DIFF the data channel ({@link ArrayView.subscribe}) discards — the\n *  seam a narrator drives off. The `schema` is passed (not closed over) because the first `snapshot`\n *  fires synchronously inside `materialize`, before the caller holds the view handle. */\nexport type ViewChangeListener = (changes: FlatChange[], phase: ChangePhase, schema: WireSchema) => void;","description":"A per-view change listener ({@link ArrayView.onChanges}): the net `FlatChange[]` this view folded,\nthe {@link ChangePhase} it arrived on, and the view's `WireSchema` (the position→name source for\n`resolveChange`). This is the DIFF the data channel ({@link ArrayView.subscribe}) discards — the\nseam a narrator drives off. The `schema` is passed (not closed over) because the first `snapshot`\nfires synchronously inside `materialize`, before the caller holds the view handle.","source":"packages/client/src/view.ts","line":30,"href":"/reference/typescript/client/#symbol-ViewChangeListener"},{"name":"ViewTypes","originalName":"ViewTypes","kind":"InterfaceDeclaration","signature":"/** Per-level column types (parallel to the WireSchema), used to JSON.parse json columns on\n *  projection. Built by the Store from the typed schema; absent ⇒ no parsing (bare values). */\nexport interface ViewTypes {\n    columnTypes: ColType[];\n    rels: Record<number, ViewTypes>;\n}","description":"Per-level column types (parallel to the WireSchema), used to JSON.parse json columns on\nprojection. Built by the Store from the typed schema; absent ⇒ no parsing (bare values).","source":"packages/client/src/view.ts","line":16,"href":"/reference/typescript/client/#symbol-ViewTypes"},{"name":"WireNode","originalName":"WireNode","kind":"InterfaceDeclaration","signature":"export interface WireNode {\n    row: WireValue[];\n    rels: {\n        rel: number;\n        children: WireNode[];\n    }[];\n}","description":"","source":"packages/client/src/types.ts","line":49,"href":"/reference/typescript/client/#symbol-WireNode"},{"name":"WireProjection","originalName":"WireProjection","kind":"InterfaceDeclaration","signature":"/** A scalar-projection annotation on a relationship slot (REDUCE-DESIGN.md §9): a\n *  relationship aggregate (`issue { commentCount: count(comments) }`) lives as a singular\n *  one-row relationship whose child is the aggregate row; this tells the receiver to unwrap\n *  it into a scalar field — `commentCount: 5` instead of `commentCount: [{ count: 5 }]`. */\nexport interface WireProjection {\n    /** Which CHILD column to surface as the scalar value (the aggregate column). */\n    col: number;\n    /** The value to emit when the relationship is empty (a childless parent) — the\n     *  aggregate identity (`0` for count, `null` for sum/avg). */\n    identity: WireValue;\n}","description":"A scalar-projection annotation on a relationship slot (REDUCE-DESIGN.md §9): a\nrelationship aggregate (`issue { commentCount: count(comments) }`) lives as a singular\none-row relationship whose child is the aggregate row; this tells the receiver to unwrap\nit into a scalar field — `commentCount: 5` instead of `commentCount: [{ count: 5 }]`.","source":"packages/client/src/types.ts","line":22,"href":"/reference/typescript/client/#symbol-WireProjection"},{"name":"WireRel","originalName":"WireRel","kind":"InterfaceDeclaration","signature":"export interface WireRel {\n    name: string;\n    slot: number;\n    /** `null` ⇒ an out-of-view / gating slot (the in-view gate drops `Child`s addressed here). */\n    child: WireSchema | null;\n    /** Non-null ⇒ a scalar-projected relationship aggregate the receiver unwraps to a scalar\n     *  (REDUCE-DESIGN.md §9). Absent/`null` for an ordinary (plural or `.one()`) relationship. */\n    project?: WireProjection | null;\n}","description":"","source":"packages/client/src/types.ts","line":30,"href":"/reference/typescript/client/#symbol-WireRel"},{"name":"WireSchema","originalName":"WireSchema","kind":"InterfaceDeclaration","signature":"export interface WireSchema {\n    columns: string[];\n    primaryKey: number[];\n    /** Resolved, PK-completed sort: `[columnIndex, ascending]` pairs (the comparator input). */\n    sort: [\n        number,\n        boolean\n    ][];\n    singular: boolean;\n    relationships: WireRel[];\n}","description":"","source":"packages/client/src/types.ts","line":40,"href":"/reference/typescript/client/#symbol-WireSchema"},{"name":"WireValue","originalName":"WireValue","kind":"TypeAliasDeclaration","signature":"/** A bare wire cell. (JSON columns arrive as their raw JSON string.) */\nexport type WireValue = number | string | boolean | null;","description":"A bare wire cell. (JSON columns arrive as their raw JSON string.)","source":"packages/client/src/types.ts","line":9,"href":"/reference/typescript/client/#symbol-WireValue"},{"name":"WriteTx","originalName":"WriteTx","kind":"InterfaceDeclaration","signature":"/** The write transaction handed to `store.write(tx => …)`. Rows are objects keyed by column;\n *  the Store positionalizes them (and stringifies json columns) before the backend sees them.\n *\n *  `add` takes an {@link InsertOf} row — a nullable column may be omitted (it is filled with `null`,\n *  design 206 §7). `remove`/`edit` take a full {@link RowOf} row: they identify an EXISTING row, so\n *  every column (nullable ones as their actual `T | null` value) must be present. */\nexport interface WriteTx<S extends ColsMap> {\n    add<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): void;\n    remove<N extends keyof S & string>(table: N, row: RowOf<S[N]>): void;\n    edit<N extends keyof S & string>(table: N, oldRow: RowOf<S[N]>, newRow: RowOf<S[N]>): void;\n}","description":"The write transaction handed to `store.write(tx => …)`. Rows are objects keyed by column;\nthe Store positionalizes them (and stringifies json columns) before the backend sees them.\n\n`add` takes an {@link InsertOf} row — a nullable column may be omitted (it is filled with `null`,\ndesign 206 §7). `remove`/`edit` take a full {@link RowOf} row: they identify an EXISTING row, so\nevery column (nullable ones as their actual `T | null` value) must be present.","source":"packages/client/src/store.ts","line":44,"href":"/reference/typescript/client/#symbol-WriteTx"},{"name":"YieldEffect","originalName":"YieldEffect","kind":"TypeAliasDeclaration","signature":"/** Everything a generator mutator may `yield`: a write {@link MutationOp}, a point {@link ReadEffect},\n *  a full-query {@link QueryEffect}, or a {@link BatchEffect} fan-out. */\nexport type YieldEffect = MutationOp | ReadEffect | BatchEffect | QueryEffect;","description":"Everything a generator mutator may `yield`: a write {@link MutationOp}, a point {@link ReadEffect},\na full-query {@link QueryEffect}, or a {@link BatchEffect} fan-out.","source":"packages/client/src/mutation-ops.ts","line":95,"href":"/reference/typescript/client/#symbol-YieldEffect"}]},{"name":"@rindle/daemon-client","source":"packages/daemon-client/src/index.ts","package":"@rindle/daemon-client","symbols":[{"name":"ClaimRoomEpochInput","originalName":"ClaimRoomEpochInput","kind":"InterfaceDeclaration","signature":"/** `/claim-room-epoch` (RINDLE-REALTIME §2.5): bump + return the placement epoch. */\nexport interface ClaimRoomEpochInput {\n    doc: string;\n}","description":"`/claim-room-epoch` (RINDLE-REALTIME §2.5): bump + return the placement epoch.","source":"packages/daemon-client/src/index.ts","line":139,"href":"/reference/typescript/daemon-client/#symbol-ClaimRoomEpochInput"},{"name":"ClaimRoomEpochOutput","originalName":"ClaimRoomEpochOutput","kind":"InterfaceDeclaration","signature":"export interface ClaimRoomEpochOutput {\n    epoch: number;\n}","description":"","source":"packages/daemon-client/src/index.ts","line":142,"href":"/reference/typescript/daemon-client/#symbol-ClaimRoomEpochOutput"},{"name":"DaemonHttpError","originalName":"DaemonHttpError","kind":"ClassDeclaration","signature":"export declare class DaemonHttpError extends Error {\n    readonly status: number;\n    readonly statusText: string;\n    readonly body: string;\n    constructor(status: number, statusText: string, body: string);\n}","description":"","source":"packages/daemon-client/src/index.ts","line":434,"href":"/reference/typescript/daemon-client/#symbol-DaemonHttpError"},{"name":"DematerializeInput","originalName":"DematerializeInput","kind":"InterfaceDeclaration","signature":"export interface DematerializeInput {\n    materializationId?: string;\n    queryKey?: string;\n    name?: string;\n}","description":"","source":"packages/daemon-client/src/index.ts","line":37,"href":"/reference/typescript/daemon-client/#symbol-DematerializeInput"},{"name":"DematerializeOutput","originalName":"DematerializeOutput","kind":"InterfaceDeclaration","signature":"export interface DematerializeOutput {\n    removed: boolean;\n}","description":"","source":"packages/daemon-client/src/index.ts","line":43,"href":"/reference/typescript/daemon-client/#symbol-DematerializeOutput"},{"name":"FetchLike","originalName":"FetchLike","kind":"TypeAliasDeclaration","signature":"export type FetchLike = (input: string, init: {\n    method: string;\n    headers: Record<string, string>;\n    body: string;\n}) => Promise<FetchResponseLike>;","description":"","source":"packages/daemon-client/src/index.ts","line":391,"href":"/reference/typescript/daemon-client/#symbol-FetchLike"},{"name":"FetchResponseLike","originalName":"FetchResponseLike","kind":"InterfaceDeclaration","signature":"export interface FetchResponseLike {\n    ok: boolean;\n    status: number;\n    statusText: string;\n    text(): Promise<string>;\n    /** Optional response headers — the real `fetch` Response exposes these. Used to read the\n     *  daemon's `Rindle-Boot-Id` (see {@link HttpRindleDaemonClientOptions.onBootId}). */\n    headers?: {\n        get(name: string): string | null;\n    };\n}","description":"","source":"packages/daemon-client/src/index.ts","line":381,"href":"/reference/typescript/daemon-client/#symbol-FetchResponseLike"},{"name":"HeadersFactory","originalName":"HeadersFactory","kind":"TypeAliasDeclaration","signature":"export type HeadersFactory = () => HeadersInput | PromiseLike<HeadersInput>;","description":"","source":"packages/daemon-client/src/index.ts","line":379,"href":"/reference/typescript/daemon-client/#symbol-HeadersFactory"},{"name":"HeadersInput","originalName":"HeadersInput","kind":"TypeAliasDeclaration","signature":"export type HeadersInput = Record<string, HeaderValue>;","description":"","source":"packages/daemon-client/src/index.ts","line":378,"href":"/reference/typescript/daemon-client/#symbol-HeadersInput"},{"name":"HeaderValue","originalName":"HeaderValue","kind":"TypeAliasDeclaration","signature":"export type HeaderValue = string | undefined;","description":"","source":"packages/daemon-client/src/index.ts","line":377,"href":"/reference/typescript/daemon-client/#symbol-HeaderValue"},{"name":"HttpRindleDaemonClient","originalName":"HttpRindleDaemonClient","kind":"ClassDeclaration","signature":"export declare class HttpRindleDaemonClient implements RindleDaemonClient {\n    private readonly baseUrl;\n    private readonly fetchImpl;\n    private readonly headers?;\n    private readonly paths;\n    private readonly onBootId?;\n    private lastBootId?;\n    constructor(opts: HttpRindleDaemonClientOptions);\n    materialize(input: MaterializeInput): Promise<MaterializeOutput>;\n    dematerialize(input: DematerializeInput): Promise<DematerializeOutput>;\n    executeSqlTxn(input: SqlTxn): Promise<SqlTxnOutput>;\n    executeSqlRead(input: SqlRead): Promise<SqlReadOutput>;\n    applyRowChangeTxn(input: RowChangeTxn): Promise<RowChangeTxnOutput>;\n    claimRoomEpoch(input: ClaimRoomEpochInput): Promise<ClaimRoomEpochOutput>;\n    roomLmids(input: RoomLmidsInput): Promise<RoomLmidsOutput>;\n    rejectMutation(input: MutationRejection): Promise<MutationRejectionOutput>;\n    beginMutationSession(input: MutationSessionBegin): Promise<MutationSessionBeginOutput>;\n    execInMutationSession(input: MutationSessionExec): Promise<unknown>;\n    queryInMutationSession(input: MutationSessionQuery): Promise<SqlReadOutput>;\n    commitMutationSession(input: MutationSessionRef): Promise<SqlTxnOutput>;\n    rollbackMutationSession(input: MutationSessionRef): Promise<unknown>;\n    query(input: QueryOnceInput): Promise<QueryOnceOutput>;\n    migrate(input: MigrateInput): Promise<MigrateOutput>;\n    /** Apply an ordered SET of migrations in one round-trip — the array form of {@link migrate}. The\n     *  daemon applies them in order (stopping at the first failure) and, when supervised, self-restarts\n     *  ONCE for the whole set. Drive it from a migration runner (`rindle migrate apply` does). See\n     *  {@link MigrateBatchOutput} — inspect its `error` field rather than relying on the HTTP status. */\n    migrateBatch(inputs: MigrateInput[]): Promise<MigrateBatchOutput>;\n    /** The daemon's introspected base-table schema for client-schema codegen\n     *  (`DRIZZLE-MIGRATIONS-DESIGN.md` §6.2). Read-only `GET /schema`, bearer-auth'd when the daemon\n     *  has a token configured. Deliberately NOT on {@link RindleDaemonClient}: schema codegen is a\n     *  dev/CI concern, not part of the runtime control-plane contract a router/splitter satisfies. */\n    schema(): Promise<SchemaOutput>;\n    private post;\n    /** A bearer-auth'd GET (the read-only `/schema`, `/version`-style routes). Carries no request\n     *  body — `defaultFetch` strips the placeholder before the real fetch (WHATWG fetch rejects a\n     *  GET body). */\n    private get;\n    /** Notice the daemon's boot id on any response; fire `onBootId` on the first one and on every\n     *  change (a restart). Updates `lastBootId` BEFORE the hook so a re-assert it triggers (which\n     *  POSTs again, same boot id) does not re-fire — no recursion. */\n    private observeBootId;\n    private resolveHeaders;\n}","description":"","source":"packages/daemon-client/src/index.ts","line":448,"href":"/reference/typescript/daemon-client/#symbol-HttpRindleDaemonClient"},{"name":"HttpRindleDaemonClientOptions","originalName":"HttpRindleDaemonClientOptions","kind":"InterfaceDeclaration","signature":"export interface HttpRindleDaemonClientOptions {\n    baseUrl: string;\n    fetch?: FetchLike;\n    headers?: HeadersInput | HeadersFactory;\n    paths?: Partial<HttpRindleDaemonClientPaths>;\n    /** Fired with the daemon's boot id on the first control-plane response and again whenever it\n     *  CHANGES — i.e. the daemon restarted (it keeps no durable lease/materialization state). Use\n     *  it to re-assert pins / re-materialize. Treat every call as \"(re)assert now\"; it rides\n     *  responses you already make (e.g. an ingester's writes), so no polling is needed. Must not\n     *  throw or reject — handle your own errors (e.g. `onBootId: () => server.assertPins().catch(log)`). */\n    onBootId?: (bootId: string) => void;\n}","description":"","source":"packages/daemon-client/src/index.ts","line":396,"href":"/reference/typescript/daemon-client/#symbol-HttpRindleDaemonClientOptions"},{"name":"HttpRindleDaemonClientPaths","originalName":"HttpRindleDaemonClientPaths","kind":"InterfaceDeclaration","signature":"export interface HttpRindleDaemonClientPaths {\n    materialize: string;\n    dematerialize: string;\n    executeSqlTxn: string;\n    executeSqlRead: string;\n    applyRowChangeTxn: string;\n    rejectMutation: string;\n    query: string;\n    migrate: string;\n    schema: string;\n    claimRoomEpoch: string;\n    roomLmids: string;\n    mutateSessionBegin: string;\n    mutateSessionExec: string;\n    mutateSessionQuery: string;\n    mutateSessionCommit: string;\n    mutateSessionRollback: string;\n}","description":"","source":"packages/daemon-client/src/index.ts","line":358,"href":"/reference/typescript/daemon-client/#symbol-HttpRindleDaemonClientPaths"},{"name":"MaterializationPolicy","originalName":"MaterializationPolicy","kind":"TypeAliasDeclaration","signature":"export type MaterializationPolicy = {\n    kind: \"pinned\";\n    name?: string;\n} | {\n    kind: \"whileSubscribed\";\n    idleTtlMs?: number;\n};","description":"","source":"packages/daemon-client/src/index.ts","line":5,"href":"/reference/typescript/daemon-client/#symbol-MaterializationPolicy"},{"name":"MaterializeInput","originalName":"MaterializeInput","kind":"InterfaceDeclaration","signature":"export interface MaterializeInput {\n    ast: unknown;\n    mode?: StreamMode;\n    policy?: MaterializationPolicy;\n    subject?: string;\n    leaseTtlMs?: number;\n    maxSubscribers?: number;\n    metadata?: Record<string, unknown>;\n    /** The browser's opaque follower-affinity ticket (FOLLOWER-AFFINITY-DESIGN.md §3), forwarded by\n     *  the api-server. {@link HttpRindleDaemonClient} lifts it into the `Rindle-Affinity` request\n     *  HEADER (never the body) so the fleet edge routes this `/materialize` to the follower the\n     *  browser's ws is pinned to (§4) — both legs co-locate on one follower. Placement, not\n     *  authorization: the follower verifies it, the api-server forwards it opaquely. Absent ⇒ no\n     *  affinity (single daemon / affinity off), byte-identical to today. */\n    affinity?: string;\n}","description":"","source":"packages/daemon-client/src/index.ts","line":9,"href":"/reference/typescript/daemon-client/#symbol-MaterializeInput"},{"name":"MaterializeOutput","originalName":"MaterializeOutput","kind":"InterfaceDeclaration","signature":"export interface MaterializeOutput {\n    materializationId: string;\n    queryKey?: string;\n    leaseToken: string;\n    reused?: boolean;\n    /** Fresh follower-placement ticket returned by an affinity-enabled daemon. A machine client\n     *  opening a separate ws for this follower-local lease (for example a room upstream) offers it\n     *  as a subprotocol so the fleet edge routes that socket back to the minting follower. */\n    affinity?: string;\n}","description":"","source":"packages/daemon-client/src/index.ts","line":26,"href":"/reference/typescript/daemon-client/#symbol-MaterializeOutput"},{"name":"MigrateBatchOutput","originalName":"MigrateBatchOutput","kind":"InterfaceDeclaration","signature":"/** The response to the ARRAY form of `/migrate` ({@link HttpRindleDaemonClient.migrateBatch}): a\n *  whole ordered set applied in one round-trip so a supervised daemon self-restarts ONCE for the\n *  set instead of once per migration. `results` are the migrations processed before any failure, in\n *  order; `applied` counts the newly-applied ones; `schemaVersion` is the latest applied id;\n *  `restarting` is true when the daemon is self-restarting to re-introspect (wait for it before the\n *  next call). On a failed migration `error`/`failedId` name it — the batch stops there, earlier\n *  migrations are committed (forward-only), and the daemon does NOT restart: fix forward and\n *  re-send. Unlike the single-migration form, this always arrives as HTTP 200; inspect `error`. */\nexport interface MigrateBatchOutput {\n    results: MigrateResultItem[];\n    applied: number;\n    schemaVersion?: string;\n    restarting?: boolean;\n    error?: string;\n    errorCode?: string;\n    failedId?: string;\n}","description":"The response to the ARRAY form of `/migrate` ({@link HttpRindleDaemonClient.migrateBatch}): a\nwhole ordered set applied in one round-trip so a supervised daemon self-restarts ONCE for the\nset instead of once per migration. `results` are the migrations processed before any failure, in\norder; `applied` counts the newly-applied ones; `schemaVersion` is the latest applied id;\n`restarting` is true when the daemon is self-restarting to re-introspect (wait for it before the\nnext call). On a failed migration `error`/`failedId` name it — the batch stops there, earlier\nmigrations are committed (forward-only), and the daemon does NOT restart: fix forward and\nre-send. Unlike the single-migration form, this always arrives as HTTP 200; inspect `error`.","source":"packages/daemon-client/src/index.ts","line":260,"href":"/reference/typescript/daemon-client/#symbol-MigrateBatchOutput"},{"name":"MigrateInput","originalName":"MigrateInput","kind":"InterfaceDeclaration","signature":"/** One pure migration file: either ordered DDL statements or ordered DML statements. The opaque\n *  `id` is the journaled idempotency key. `checksum` is the canonical SHA-256 content identity\n *  sent by current deploy tooling; it is required for data migrations and optional only for\n *  compatibility with legacy private DDL callers. `overrideHash` is an operator-reviewed checksum\n *  for the content this migration originally applied with. DDL may be additive or destructive,\n *  while `RENAME` and raw `blob` remain unsupported. */\nexport interface MigrateInput {\n    id: string;\n    checksum?: string;\n    overrideHash?: string;\n    statements: string[];\n}","description":"One pure migration file: either ordered DDL statements or ordered DML statements. The opaque\n`id` is the journaled idempotency key. `checksum` is the canonical SHA-256 content identity\nsent by current deploy tooling; it is required for data migrations and optional only for\ncompatibility with legacy private DDL callers. `overrideHash` is an operator-reviewed checksum\nfor the content this migration originally applied with. DDL may be additive or destructive,\nwhile `RENAME` and raw `blob` remain unsupported.","source":"packages/daemon-client/src/index.ts","line":222,"href":"/reference/typescript/daemon-client/#symbol-MigrateInput"},{"name":"MigrateOutput","originalName":"MigrateOutput","kind":"InterfaceDeclaration","signature":"/** The `/migrate` response: `applied` is false when `id` was already journaled (an idempotent\n *  replay ran nothing); `hashOverridden` reports that the supplied override matched the journaled\n *  content identity; `schemaVersion` is the version the daemon will report AFTER it serves the new\n *  shape (the latest applied migration id, `DRIZZLE-MIGRATIONS-DESIGN.md` §5.3). `restarting` is\n *  true when the daemon is self-restarting to re-introspect (a supervised daemon with\n *  `RINDLE_RESTART_ON_MIGRATE`) — the caller should wait for it to come back before its next call. */\nexport interface MigrateOutput {\n    applied: boolean;\n    hashOverridden?: boolean;\n    schemaVersion?: string;\n    restarting?: boolean;\n}","description":"The `/migrate` response: `applied` is false when `id` was already journaled (an idempotent\nreplay ran nothing); `hashOverridden` reports that the supplied override matched the journaled\ncontent identity; `schemaVersion` is the version the daemon will report AFTER it serves the new\nshape (the latest applied migration id, `DRIZZLE-MIGRATIONS-DESIGN.md` §5.3). `restarting` is\ntrue when the daemon is self-restarting to re-introspect (a supervised daemon with\n`RINDLE_RESTART_ON_MIGRATE`) — the caller should wait for it to come back before its next call.","source":"packages/daemon-client/src/index.ts","line":235,"href":"/reference/typescript/daemon-client/#symbol-MigrateOutput"},{"name":"MigrateResultItem","originalName":"MigrateResultItem","kind":"InterfaceDeclaration","signature":"/** One entry in a {@link MigrateBatchOutput}: the migration `id`, whether this apply ran it\n *  (false = the `id` was already journaled, an idempotent no-op), and whether its override matched\n *  the journaled content identity. */\nexport interface MigrateResultItem {\n    id: string;\n    applied: boolean;\n    hashOverridden?: boolean;\n    schemaVersion?: string;\n}","description":"One entry in a {@link MigrateBatchOutput}: the migration `id`, whether this apply ran it\n(false = the `id` was already journaled, an idempotent no-op), and whether its override matched\nthe journaled content identity.","source":"packages/daemon-client/src/index.ts","line":245,"href":"/reference/typescript/daemon-client/#symbol-MigrateResultItem"},{"name":"MutationRejection","originalName":"MutationRejection","kind":"InterfaceDeclaration","signature":"export interface MutationRejection {\n    clientID: string;\n    mid: number;\n    reason?: string;\n}","description":"","source":"packages/daemon-client/src/index.ts","line":205,"href":"/reference/typescript/daemon-client/#symbol-MutationRejection"},{"name":"MutationRejectionOutput","originalName":"MutationRejectionOutput","kind":"InterfaceDeclaration","signature":"export interface MutationRejectionOutput {\n    cv?: number;\n    lmid?: number;\n}","description":"","source":"packages/daemon-client/src/index.ts","line":211,"href":"/reference/typescript/daemon-client/#symbol-MutationRejectionOutput"},{"name":"MutationSessionBegin","originalName":"MutationSessionBegin","kind":"InterfaceDeclaration","signature":"/** `/mutate-session/begin` (DAEMON-INTERACTIVE-TXN-DESIGN.md §4.1): open an interactive write\n *  transaction on the master, held open across round trips under the daemon-owned deadline.\n *  Client-attributed sessions (`clientID` + `mid`) get mid dedup/gap resolution UP FRONT — an\n *  absorbed replay opens no session and the caller must skip the mutator. `statements` is the\n *  accumulated write prefix to replay into the fresh transaction (sound: nothing before the\n *  first read observed DB state); `query` rides the begin so a one-read mutator pays exactly\n *  one extra round trip over the batch path. */\nexport interface MutationSessionBegin {\n    clientID?: string;\n    mid?: number;\n    /** A foreign session's dedup watermark; see {@link WriteProducer}. Mutually exclusive with\n     *  `clientID`/`mid`. */\n    producer?: WriteProducer;\n    statements?: SqlStatement[];\n    query?: SqlStatement;\n}","description":"`/mutate-session/begin` (DAEMON-INTERACTIVE-TXN-DESIGN.md §4.1): open an interactive write\ntransaction on the master, held open across round trips under the daemon-owned deadline.\nClient-attributed sessions (`clientID` + `mid`) get mid dedup/gap resolution UP FRONT — an\nabsorbed replay opens no session and the caller must skip the mutator. `statements` is the\naccumulated write prefix to replay into the fresh transaction (sound: nothing before the\nfirst read observed DB state); `query` rides the begin so a one-read mutator pays exactly\none extra round trip over the batch path.","source":"packages/daemon-client/src/index.ts","line":164,"href":"/reference/typescript/daemon-client/#symbol-MutationSessionBegin"},{"name":"MutationSessionBeginOutput","originalName":"MutationSessionBeginOutput","kind":"InterfaceDeclaration","signature":"export interface MutationSessionBeginOutput {\n    /** Present iff a session opened. */\n    sessionId?: string;\n    /** The `query` read's result, when one rode the begin (`{cols, rows}`, bare cell arrays). */\n    read?: SqlReadOutput;\n    /** True when mid/producer-watermark dedup absorbed the envelope at begin: NO session opened, the\n     *  mutator must not run — the remaining fields are the authoritative replay output, the same\n     *  shape {@link RindleDaemonClient.executeSqlTxn} answers for a deduped mid. */\n    absorbed?: boolean;\n    applied?: boolean;\n    lmid?: number;\n    lmidAdvances?: Array<{\n        clientID: string;\n        lmid: number;\n    }>;\n}","description":"","source":"packages/daemon-client/src/index.ts","line":174,"href":"/reference/typescript/daemon-client/#symbol-MutationSessionBeginOutput"},{"name":"MutationSessionExec","originalName":"MutationSessionExec","kind":"InterfaceDeclaration","signature":"export interface MutationSessionExec {\n    sessionId: string;\n    statements: SqlStatement[];\n}","description":"","source":"packages/daemon-client/src/index.ts","line":188,"href":"/reference/typescript/daemon-client/#symbol-MutationSessionExec"},{"name":"MutationSessionQuery","originalName":"MutationSessionQuery","kind":"InterfaceDeclaration","signature":"/** A read through the open transaction (read-your-writes) — flat `{sessionId, sql, params}`,\n *  answered in the `/execute-sql-read` shape. */\nexport interface MutationSessionQuery {\n    sessionId: string;\n    sql: string;\n    params?: WireValue[];\n}","description":"A read through the open transaction (read-your-writes) — flat `{sessionId, sql, params}`,\nanswered in the `/execute-sql-read` shape.","source":"packages/daemon-client/src/index.ts","line":195,"href":"/reference/typescript/daemon-client/#symbol-MutationSessionQuery"},{"name":"MutationSessionRef","originalName":"MutationSessionRef","kind":"InterfaceDeclaration","signature":"export interface MutationSessionRef {\n    sessionId: string;\n}","description":"","source":"packages/daemon-client/src/index.ts","line":201,"href":"/reference/typescript/daemon-client/#symbol-MutationSessionRef"},{"name":"QueryOnceInput","originalName":"QueryOnceInput","kind":"InterfaceDeclaration","signature":"/** The SSR one-shot read (`SSR-DESIGN.md` §3). Materialize-or-reuse the query, read its current\n *  view ONCE, return it assembled; registers no subscriber. `visibilityKey`/`ttlMs` are optional. */\nexport interface QueryOnceInput {\n    ast: unknown;\n    visibilityKey?: string;\n    ttlMs?: number;\n    /** The browser's opaque follower-affinity ticket — see {@link MaterializeInput.affinity}. Lifted\n     *  into the `Rindle-Affinity` header so an SSR / one-shot read co-locates on the same pinned\n     *  follower the browser's ws is (or will be) on. */\n    affinity?: string;\n}","description":"The SSR one-shot read (`SSR-DESIGN.md` §3). Materialize-or-reuse the query, read its current\nview ONCE, return it assembled; registers no subscriber. `visibilityKey`/`ttlMs` are optional.","source":"packages/daemon-client/src/index.ts","line":272,"href":"/reference/typescript/daemon-client/#symbol-QueryOnceInput"},{"name":"QueryOnceOutput","originalName":"QueryOnceOutput","kind":"InterfaceDeclaration","signature":"/** The `POST /query` response: assembled `rows` (nested by name, ready to hydrate without an\n *  engine), the `cvMin` baseline they reflect, the per-query `schema` hello, and `queryKey`. */\nexport interface QueryOnceOutput {\n    queryKey?: string;\n    cvMin?: number;\n    bootId?: string;\n    schema?: unknown;\n    rows: Array<{\n        cols: Record<string, WireValue>;\n        [rel: string]: unknown;\n    }>;\n}","description":"The `POST /query` response: assembled `rows` (nested by name, ready to hydrate without an\nengine), the `cvMin` baseline they reflect, the per-query `schema` hello, and `queryKey`.","source":"packages/daemon-client/src/index.ts","line":284,"href":"/reference/typescript/daemon-client/#symbol-QueryOnceOutput"},{"name":"RindleDaemonClient","originalName":"RindleDaemonClient","kind":"InterfaceDeclaration","signature":"export interface RindleDaemonClient {\n    materialize(input: MaterializeInput): Promise<MaterializeOutput>;\n    dematerialize(input: DematerializeInput): Promise<DematerializeOutput>;\n    executeSqlTxn(input: SqlTxn): Promise<SqlTxnOutput>;\n    /** Raw SQL read (a single `SELECT` + params) against the latest committed snapshot, returning\n     *  `{ cols, rows }` (bare row arrays). The read counterpart to {@link executeSqlTxn}. Under\n     *  {@link SplitDaemonClient} this defaults to a replica (`consistency:\"eventual\"`); pass\n     *  `consistency:\"strong\"` for read-your-writes on the master. */\n    executeSqlRead(input: SqlRead): Promise<SqlReadOutput>;\n    applyRowChangeTxn(input: RowChangeTxn): Promise<RowChangeTxnOutput>;\n    rejectMutation(input: MutationRejection): Promise<MutationRejectionOutput>;\n    /** SSR one-shot read (`SSR-DESIGN.md` §3): the current assembled view, no subscription. */\n    query(input: QueryOnceInput): Promise<QueryOnceOutput>;\n    /** Apply one schema migration through the daemon's controlled DDL channel + journal it\n     *  (`DRIZZLE-MIGRATIONS-DESIGN.md` §5.1). Idempotent by `id`. The new shape is served only after\n     *  the daemon is bounced (migrate-at-bounce, §5.2) — this applies DDL to the file but does not\n     *  re-introspect the running engine. Drive it from a migration runner, not the request path. */\n    migrate(input: MigrateInput): Promise<MigrateOutput>;\n    /** Open an interactive mutation session (DAEMON-INTERACTIVE-TXN-DESIGN.md §4) — the write\n     *  transaction a read-bearing mutator lazily upgrades onto. Optional as a group with the four\n     *  ops below: only the daemon's control plane serves sessions (master-only — a follower's\n     *  write-fence rejects begin); a client that lacks them forces the legacy committed-state\n     *  read path. Session ops against a finished/expired session reject with a\n     *  {@link DaemonHttpError} whose `status` is 410 — treat it as infra (retry the envelope;\n     *  begin-time dedup absorbs a committed outcome). */\n    beginMutationSession?(input: MutationSessionBegin): Promise<MutationSessionBeginOutput>;\n    execInMutationSession?(input: MutationSessionExec): Promise<unknown>;\n    queryInMutationSession?(input: MutationSessionQuery): Promise<SqlReadOutput>;\n    commitMutationSession?(input: MutationSessionRef): Promise<SqlTxnOutput>;\n    rollbackMutationSession?(input: MutationSessionRef): Promise<unknown>;\n    /** Claim the next placement epoch for a room's doc (RINDLE-REALTIME §2.5). Optional:\n     *  only daemons serving as a room write authority implement it; the API server's\n     *  room host refuses loudly when its configured client lacks it. */\n    claimRoomEpoch?(input: ClaimRoomEpochInput): Promise<ClaimRoomEpochOutput>;\n    /** The room's boot probe (§3.3). Optional, same contract as {@link claimRoomEpoch}. */\n    roomLmids?(input: RoomLmidsInput): Promise<RoomLmidsOutput>;\n}","description":"","source":"packages/daemon-client/src/index.ts","line":320,"href":"/reference/typescript/daemon-client/#symbol-RindleDaemonClient"},{"name":"RoomLmidsInput","originalName":"RoomLmidsInput","kind":"InterfaceDeclaration","signature":"/** `/room-lmids` (§3.3): the domain-scoped ledger's lmid per client under `doc` — the\n *  room's boot probe. `doc` scopes the read to `_rindle_room_client_mutations` (§7.1), so a\n *  client's room stream never aliases its slow-path daemon stream. */\nexport interface RoomLmidsInput {\n    doc: string;\n    clients: string[];\n}","description":"`/room-lmids` (§3.3): the domain-scoped ledger's lmid per client under `doc` — the\nroom's boot probe. `doc` scopes the read to `_rindle_room_client_mutations` (§7.1), so a\nclient's room stream never aliases its slow-path daemon stream.","source":"packages/daemon-client/src/index.ts","line":149,"href":"/reference/typescript/daemon-client/#symbol-RoomLmidsInput"},{"name":"RoomLmidsOutput","originalName":"RoomLmidsOutput","kind":"InterfaceDeclaration","signature":"export interface RoomLmidsOutput {\n    lmids: Record<string, number>;\n}","description":"","source":"packages/daemon-client/src/index.ts","line":153,"href":"/reference/typescript/daemon-client/#symbol-RoomLmidsOutput"},{"name":"RowChangeTxn","originalName":"RowChangeTxn","kind":"TypeAliasDeclaration","signature":"export type RowChangeTxn = {\n    source: string;\n    offset: string;\n    changes: Array<{\n        table: string;\n        op: \"add\";\n        row: WireValue[];\n    } | {\n        table: string;\n        op: \"remove\";\n        old: WireValue[];\n    } | {\n        table: string;\n        op: \"edit\";\n        old: WireValue[];\n        row: WireValue[];\n    }>;\n    /** The room write-behind extensions (RINDLE-REALTIME §5.3, each opt-in by\n     *  presence): the placement fence (`doc` + `epoch` — a stale epoch gets a\n     *  `409 {error:\"fenced\"}`), the §8.3 batch identity (`batchHash` — same id +\n     *  different body is a loud 500), and the CAS preconditions (`cas: true` — a miss\n     *  gets a `409 {error:\"conflict\", conflicts}` with authoritative images, nothing\n     *  applied). Plain change sources send none and are byte-compatible unchanged. */\n    doc?: string;\n    epoch?: number;\n    batchHash?: string;\n    cas?: boolean;\n};","description":"","source":"packages/daemon-client/src/index.ts","line":112,"href":"/reference/typescript/daemon-client/#symbol-RowChangeTxn"},{"name":"RowChangeTxnOutput","originalName":"RowChangeTxnOutput","kind":"InterfaceDeclaration","signature":"export interface RowChangeTxnOutput {\n    /** `false` = the `(source, offset)` keyset absorbed a replay. */\n    applied?: boolean;\n    cv?: number;\n}","description":"","source":"packages/daemon-client/src/index.ts","line":132,"href":"/reference/typescript/daemon-client/#symbol-RowChangeTxnOutput"},{"name":"SchemaColumn","originalName":"SchemaColumn","kind":"InterfaceDeclaration","signature":"/** One column in a {@link SchemaTable}: its name and the daemon's `ColType` wire name. */\nexport interface SchemaColumn {\n    name: string;\n    /** The daemon's `ColType` wire name. Because the daemon only ever *introspects* the SQLite file\n     *  and affinity is lossy, this is `\"string\"` or `\"number\"` in practice — a column's app-level\n     *  `\"boolean\"`/`\"json\"` intent is not recoverable from the file (`DRIZZLE-MIGRATIONS-DESIGN.md`\n     *  §6.2). The full vocabulary is `\"string\" | \"number\" | \"boolean\" | \"json\"`. */\n    type: string;\n    /** `true` when the column is nullable (introspected `pragma_table_info.notnull == 0`); the\n     *  generated column becomes `.nullable()`, typing it `T | null`. PK columns are always `false`\n     *  (row identity). Absent on older daemons ⇒ treat as non-nullable. See design 206. */\n    nullable?: boolean;\n}","description":"One column in a {@link SchemaTable}: its name and the daemon's `ColType` wire name.","source":"packages/daemon-client/src/index.ts","line":293,"href":"/reference/typescript/daemon-client/#symbol-SchemaColumn"},{"name":"SchemaOutput","originalName":"SchemaOutput","kind":"InterfaceDeclaration","signature":"/** The daemon's introspected base-table schema (`GET /schema`) — the input to client-schema\n *  codegen (`DRIZZLE-MIGRATIONS-DESIGN.md` §6.2). Tables are sorted by name and the daemon's own\n *  bookkeeping tables (`_rindle_*`) are excluded. */\nexport interface SchemaOutput {\n    tables: SchemaTable[];\n}","description":"The daemon's introspected base-table schema (`GET /schema`) — the input to client-schema\ncodegen (`DRIZZLE-MIGRATIONS-DESIGN.md` §6.2). Tables are sorted by name and the daemon's own\nbookkeeping tables (`_rindle_*`) are excluded.","source":"packages/daemon-client/src/index.ts","line":316,"href":"/reference/typescript/daemon-client/#symbol-SchemaOutput"},{"name":"SchemaTable","originalName":"SchemaTable","kind":"InterfaceDeclaration","signature":"/** One base table in the daemon's introspected schema: its name, ordered columns, and PK columns. */\nexport interface SchemaTable {\n    name: string;\n    columns: SchemaColumn[];\n    primaryKey: string[];\n}","description":"One base table in the daemon's introspected schema: its name, ordered columns, and PK columns.","source":"packages/daemon-client/src/index.ts","line":307,"href":"/reference/typescript/daemon-client/#symbol-SchemaTable"},{"name":"SqlRead","originalName":"SqlRead","kind":"InterfaceDeclaration","signature":"/** A raw read: one `SELECT` and its positional parameters. The read counterpart to {@link SqlTxn}\n *  — no idempotency/mutation fields (reads are idempotent).\n *\n *  `consistency` / `routingKey` are **client-tier routing directives**: `consistency` is consumed\n *  by {@link SplitDaemonClient}, `routingKey` by the read router. They ride along the wire (the\n *  router is reached through an `HttpRindleDaemonClient`, so `routingKey` must) but the daemon\n *  itself ignores them and reads only `sql` + `params`. `consistency` defaults to `\"eventual\"`\n *  (route to a replica, scaling reads off the write-master); set `\"strong\"` to route to the master\n *  for read-your-writes after a write to the same data. `routingKey` co-locates a replica read on a\n *  chosen follower (e.g. by tenant); absent, the router places it by the SQL text. */\nexport interface SqlRead {\n    sql: string;\n    params?: WireValue[];\n    consistency?: \"eventual\" | \"strong\";\n    routingKey?: string;\n}","description":"A raw read: one `SELECT` and its positional parameters. The read counterpart to {@link SqlTxn}\n— no idempotency/mutation fields (reads are idempotent).\n\n`consistency` / `routingKey` are **client-tier routing directives**: `consistency` is consumed\nby {@link SplitDaemonClient }, `routingKey` by the read router. They ride along the wire (the\nrouter is reached through an `HttpRindleDaemonClient`, so `routingKey` must) but the daemon\nitself ignores them and reads only `sql` + `params`. `consistency` defaults to `\"eventual\"`\n(route to a replica, scaling reads off the write-master); set `\"strong\"` to route to the master\nfor read-your-writes after a write to the same data. `routingKey` co-locates a replica read on a\nchosen follower (e.g. by tenant); absent, the router places it by the SQL text.","source":"packages/daemon-client/src/index.ts","line":97,"href":"/reference/typescript/daemon-client/#symbol-SqlRead"},{"name":"SqlReadOutput","originalName":"SqlReadOutput","kind":"InterfaceDeclaration","signature":"/** The `/execute-sql-read` response: result columns in order and each row as a bare cell array\n *  (NOT keyed objects — the daemon keeps per-cell object construction off the write-master; zip\n *  `cols` with each row client-side if you want objects). Lossless for duplicate/aliased columns. */\nexport interface SqlReadOutput {\n    cols: string[];\n    rows: WireValue[][];\n}","description":"The `/execute-sql-read` response: result columns in order and each row as a bare cell array\n(NOT keyed objects — the daemon keeps per-cell object construction off the write-master; zip\n`cols` with each row client-side if you want objects). Lossless for duplicate/aliased columns.","source":"packages/daemon-client/src/index.ts","line":107,"href":"/reference/typescript/daemon-client/#symbol-SqlReadOutput"},{"name":"SqlStatement","originalName":"SqlStatement","kind":"InterfaceDeclaration","signature":"export interface SqlStatement {\n    sql: string;\n    params?: WireValue[];\n}","description":"","source":"packages/daemon-client/src/index.ts","line":47,"href":"/reference/typescript/daemon-client/#symbol-SqlStatement"},{"name":"SqlTxn","originalName":"SqlTxn","kind":"InterfaceDeclaration","signature":"export interface SqlTxn {\n    /** A foreign write's dedup watermark. Mutually exclusive with `clientID`/`mid` — supplying\n     *  both is a `400`, because a silent precedence rule is what let the two write authorities\n     *  disagree about which receipt they stored. */\n    producer?: WriteProducer;\n    clientID?: string;\n    mid?: number;\n    statements: SqlStatement[];\n}","description":"","source":"packages/daemon-client/src/index.ts","line":66,"href":"/reference/typescript/daemon-client/#symbol-SqlTxn"},{"name":"SqlTxnOutput","originalName":"SqlTxnOutput","kind":"InterfaceDeclaration","signature":"export interface SqlTxnOutput {\n    applied?: boolean;\n    cv?: number;\n    txId?: number | string;\n    /** Replicator-master commit identity (the public mutation SQL facade calls this `cursor`). */\n    cursor?: string;\n    /** Flat convenience mirror of this client's entry in `lmidAdvances`. */\n    lmid?: number;\n    lmidAdvances?: Array<{\n        clientID: string;\n        lmid: number;\n    }>;\n}","description":"","source":"packages/daemon-client/src/index.ts","line":76,"href":"/reference/typescript/daemon-client/#symbol-SqlTxnOutput"},{"name":"StreamMode","originalName":"StreamMode","kind":"TypeAliasDeclaration","signature":"export type StreamMode = \"flat\" | \"normalized\";","description":"","source":"packages/daemon-client/src/index.ts","line":3,"href":"/reference/typescript/daemon-client/#symbol-StreamMode"},{"name":"WireValue","originalName":"WireValue","kind":"TypeAliasDeclaration","signature":"export type WireValue = number | string | boolean | null;","description":"","source":"packages/daemon-client/src/index.ts","line":1,"href":"/reference/typescript/daemon-client/#symbol-WireValue"},{"name":"WriteProducer","originalName":"WriteProducer","kind":"InterfaceDeclaration","signature":"/** A foreign (non-client) writer's durable identity: a stable, low-cardinality `id` plus that\n *  producer's own gapless sequence — the same `(producer, sequence)` model Kafka uses.\n *\n *  The daemon stores ONE row per producer and overwrites it in place, so the dedup state is\n *  bounded by how many producers you have, not by how much you write. The contract that buys:\n *  number a producer's writes `1, 2, 3, …` and send them **in order**. `seq <= last` is absorbed\n *  (`applied: false`, nothing runs), `seq == last + 1` applies, and anything beyond is a `409`\n *  gap. Express concurrency with several producer ids, not by fanning out under one — and keep\n *  ids stable and few, because a fresh id per process re-introduces unbounded growth. */\nexport interface WriteProducer {\n    id: string;\n    seq: number;\n}","description":"A foreign (non-client) writer's durable identity: a stable, low-cardinality `id` plus that\nproducer's own gapless sequence — the same `(producer, sequence)` model Kafka uses.\n\nThe daemon stores ONE row per producer and overwrites it in place, so the dedup state is\nbounded by how many producers you have, not by how much you write. The contract that buys:\nnumber a producer's writes `1, 2, 3, …` and send them **in order**. `seq <= last` is absorbed\n(`applied: false`, nothing runs), `seq == last + 1` applies, and anything beyond is a `409`\ngap. Express concurrency with several producer ids, not by fanning out under one — and keep\nids stable and few, because a fresh id per process re-introduces unbounded growth.","source":"packages/daemon-client/src/index.ts","line":61,"href":"/reference/typescript/daemon-client/#symbol-WriteProducer"}]},{"name":"@rindle/devtools","source":"packages/devtools/src/index.ts","package":"@rindle/devtools","symbols":[{"name":"Ast","originalName":"Ast","kind":"InterfaceDeclaration","signature":"/** The query AST. `table` is the only required field; the builder omits empty/false fields\n *  (matching the Rust `skip_serializing_if`), which the deserializer treats as absent. */\nexport interface Ast {\n    table: string;\n    alias?: string;\n    /** Projection (PROJECTION-SUPPORT-DESIGN.md §6). Absent ⇒ select all columns; present ⇒\n     *  project to just these (drives what syncs + what the view reports). Serializes only when\n     *  set, matching the Rust `Ast.select`'s `skip_serializing_if`. */\n    select?: string[];\n    where?: Condition;\n    related?: CorrelatedSubquery[];\n    start?: Bound;\n    limit?: number;\n    one?: boolean;\n    /** Aggregate this (sub)query's rows instead of materializing them (`REDUCE-DESIGN.md`\n     *  §9). `count` on a `related` subquery surfaces a scalar `commentCount` field; the\n     *  builder lowers it to a scalar-projected singular relationship. Absent ⇒ ordinary rows. */\n    aggregate?: Aggregate;\n    /** The {@link Ast.aggregate} value is **precomputed** — supplied as rows of a (synthetic)\n     *  source table rather than reduced from child rows. Set by the normalized client's AST\n     *  rewrite (`AGGREGATE-SYNC-DESIGN.md` §3.3) so the local engine reads the server's count\n     *  with a plain singular join + the same projection instead of a `reduce`. Only meaningful\n     *  with `aggregate`; absent ⇒ `false`. */\n    aggregatePrecomputed?: boolean;\n    /** Top-level `GROUP BY` columns (names), meaningful only alongside a root {@link Ast.aggregate}\n     *  (`REDUCE-DESIGN.md` §8). Empty + `aggregate` set ⇒ a **global** aggregate (one `[count]` row);\n     *  non-empty ⇒ one `[group…, count]` row per distinct value-tuple. Distinct from a relationship\n     *  aggregate's implicit grouping (the correlation child key). Absent on the wire ⇒ empty. */\n    groupBy?: string[];\n    /** `HAVING` — a filter over the **post-aggregation** rows of a root {@link Ast.aggregate}\n     *  (`REDUCE-DESIGN.md` §4: a filter directly above the `reduce`). Its condition addresses the\n     *  aggregate's *output* columns — the {@link Ast.groupBy} columns and the synthetic `count`\n     *  column — not base-table columns (those go in {@link Ast.where}, which filters rows *below* the\n     *  reduce). Absent ⇒ no post-aggregation filter. */\n    having?: Condition;\n    orderBy?: OrderPart[];\n}","description":"The query AST. `table` is the only required field; the builder omits empty/false fields\n(matching the Rust `skip_serializing_if`), which the deserializer treats as absent.","source":"packages/client/src/ast.ts","line":71,"href":"/reference/typescript/devtools/#symbol-Ast"},{"name":"attachDevtools","originalName":"attachDevtools","kind":"FunctionDeclaration","signature":"/** Attach a devtools pane to a running client (DEBUG-TOOLS-BROWSER-DESIGN §6.2). Call this ONLY in a\n *  dev build (e.g. behind `import.meta.env.DEV` with a dynamic `import(\"@rindle/devtools\")`) so the\n *  pane, its core, and this registration tree-shake out of production. Returns the {@link DevtoolsCore}\n *  (also discoverable via {@link getDevtoolsHub}); call `core.detach()` to unwind. */\nexport declare function attachDevtools(target: DevtoolsTarget, opts?: DevtoolsCoreOptions): DevtoolsCore;","description":"Attach a devtools pane to a running client (DEBUG-TOOLS-BROWSER-DESIGN §6.2). Call this ONLY in a\ndev build (e.g. behind `import.meta.env.DEV` with a dynamic `import(\"@rindle/devtools\")`) so the\npane, its core, and this registration tree-shake out of production. Returns the {@link DevtoolsCore}\n(also discoverable via {@link getDevtoolsHub}); call `core.detach()` to unwind.","source":"packages/devtools/src/global.ts","line":73,"href":"/reference/typescript/devtools/#symbol-attachDevtools"},{"name":"BackendDevObserver","originalName":"BackendDevObserver","kind":"InterfaceDeclaration","signature":"/** Dev-only passive tap over a backend's authoritative server stream. Optional because in-process\n *  backends have no server stream, and older/custom backends may only expose the Store tap. */\nexport interface BackendDevObserver {\n    onServerDelta?(qid: QueryId, ev: BackendServerDelta): void;\n}","description":"Dev-only passive tap over a backend's authoritative server stream. Optional because in-process\nbackends have no server stream, and older/custom backends may only expose the Store tap.","source":"packages/client/src/types.ts","line":140,"href":"/reference/typescript/devtools/#symbol-BackendDevObserver"},{"name":"BackendServerDelta","originalName":"BackendServerDelta","kind":"TypeAliasDeclaration","signature":"/** A dev-only authoritative server delta exposed by backends that can distinguish the upstream\n *  server stream from their local view/IVM stream. Flat remote backends surface clean\n *  {@link ChangeEvent}s; local-first normalized/optimistic backends surface the path-free\n *  {@link NormalizedEvent}s before they are folded into the local engine. */\nexport type BackendServerDelta = {\n    format: \"flat\";\n    event: ChangeEvent;\n} | {\n    format: \"normalized\";\n    event: NormalizedEvent;\n};","description":"A dev-only authoritative server delta exposed by backends that can distinguish the upstream\nserver stream from their local view/IVM stream. Flat remote backends surface clean\n{@link ChangeEvent}s; local-first normalized/optimistic backends surface the path-free\n{@link NormalizedEvent}s before they are folded into the local engine.","source":"packages/client/src/types.ts","line":134,"href":"/reference/typescript/devtools/#symbol-BackendServerDelta"},{"name":"ChangeEvent","originalName":"ChangeEvent","kind":"TypeAliasDeclaration","signature":"/**\n * What a {@link Backend} pushes per query: the handshake (`hello`), the (possibly\n * chunked) hydrate `snapshot`, then incremental `batch`es. The core builds an ArrayView\n * on `hello`, hydrates on `snapshot`, folds on `batch` — identically for any backend.\n */\nexport type ChangeEvent = {\n    type: \"hello\";\n    schema: WireSchema;\n    comparatorVersion: number;\n} | {\n    type: \"snapshot\";\n    adds: FlatChange[];\n    last: boolean;\n} | {\n    type: \"batch\";\n    events: FlatChange[];\n    catchUp?: boolean;\n};","description":"What a {@link Backend} pushes per query: the handshake (`hello`), the (possibly\nchunked) hydrate `snapshot`, then incremental `batch`es. The core builds an ArrayView\non `hello`, hydrates on `snapshot`, folds on `batch` — identically for any backend.","source":"packages/client/src/types.ts","line":79,"href":"/reference/typescript/devtools/#symbol-ChangeEvent"},{"name":"collectTables","originalName":"collectTables","kind":"FunctionDeclaration","signature":"/** Every base table this query can read: the root, each `related` subquery, and any correlated\n *  subquery in the `where` tree (recursively). Mirrors the optimistic backend's `queryTables`\n *  derivation (DEBUG-TOOLS-BROWSER-DESIGN §4.2 — a `count(comments)` subquery names `comment`, so a\n *  comment mutation flips this query's pending axis). */\nexport declare function collectTables(ast: Ast, into?: Set<string>): Set<string>;","description":"Every base table this query can read: the root, each `related` subquery, and any correlated\nsubquery in the `where` tree (recursively). Mirrors the optimistic backend's `queryTables`\nderivation (DEBUG-TOOLS-BROWSER-DESIGN §4.2 — a `count(comments)` subquery names `comment`, so a\ncomment mutation flips this query's pending axis).","source":"packages/devtools/src/ast.ts","line":11,"href":"/reference/typescript/devtools/#symbol-collectTables"},{"name":"DeltaEntry","originalName":"DeltaEntry","kind":"InterfaceDeclaration","signature":"/** One entry of the live delta stream — the IVM change primitive made visible (§4.3). */\nexport interface DeltaEntry {\n    seq: number;\n    at: number;\n    qid: number;\n    kind: DeltaKind;\n    /** Nesting depth of the change path: 0 = top-level row, >0 = a child (relationship) change. */\n    depth: number;\n    /** A compact, human-readable description of the change. */\n    label: string;\n}","description":"One entry of the live delta stream — the IVM change primitive made visible (§4.3).","source":"packages/devtools/src/types.ts","line":141,"href":"/reference/typescript/devtools/#symbol-DeltaEntry"},{"name":"DeltaKind","originalName":"DeltaKind","kind":"TypeAliasDeclaration","signature":"/** The kind of a delta-stream row. `child` is an Add/Remove/Edit addressed at a NESTED path\n *  (`depth > 0`) — rindle's relationship-level change (DEBUG-TOOLS-BROWSER-DESIGN §4.3). */\nexport type DeltaKind = \"hello\" | \"snapshot\" | \"add\" | \"remove\" | \"edit\";","description":"The kind of a delta-stream row. `child` is an Add/Remove/Edit addressed at a NESTED path\n(`depth > 0`) — rindle's relationship-level change (DEBUG-TOOLS-BROWSER-DESIGN §4.3).","source":"packages/devtools/src/types.ts","line":138,"href":"/reference/typescript/devtools/#symbol-DeltaKind"},{"name":"DevtoolsBackend","originalName":"DevtoolsBackend","kind":"InterfaceDeclaration","signature":"/** Optional backend-side devtools capabilities. `__inspect` is present on `OptimisticBackend`;\n *  `__attachDevtoolsServerDeltas` is present on backends that can surface authoritative server\n *  frames separately from the Store's post-apply view stream. */\nexport interface DevtoolsBackend {\n    __inspect?(): OptimisticInspect;\n    __attachDevtoolsServerDeltas?(observer: BackendDevObserver): () => void;\n}","description":"Optional backend-side devtools capabilities. `__inspect` is present on `OptimisticBackend`;\n`__attachDevtoolsServerDeltas` is present on backends that can surface authoritative server\nframes separately from the Store's post-apply view stream.","source":"packages/devtools/src/types.ts","line":74,"href":"/reference/typescript/devtools/#symbol-DevtoolsBackend"},{"name":"DevtoolsCore","originalName":"DevtoolsCore","kind":"ClassDeclaration","signature":"export declare class DevtoolsCore {\n    private readonly store;\n    private readonly backend?;\n    private readonly detachStore;\n    private readonly detachServerDeltas?;\n    private readonly hasServerDeltaTap;\n    private readonly timelineCap;\n    private readonly deltaCap;\n    private readonly sampleRows;\n    private readonly autoFlush;\n    private readonly now;\n    private readonly pollHandle?;\n    private readonly timeline;\n    private readonly order;\n    /** The pending keys seen at the previous recompute — the diff basis for lifecycle transitions. */\n    private prevPendingKeys;\n    private deltas;\n    private deltaSeq;\n    /** Set by a `batch` delta, consumed by the next recompute: did view churn coincide with a\n     *  confirmation this turn? (the §4.1 snap-back heuristic). */\n    private churnSeen;\n    private queries;\n    private optimistic?;\n    private readonly listeners;\n    private dirty;\n    private flushScheduled;\n    private snapshot;\n    /** Optional deregistration from the global hub (set by {@link attachDevtools}). */\n    onDetach?: () => void;\n    constructor(target: DevtoolsTarget, opts?: DevtoolsCoreOptions);\n    /** The current read-model. Reference-stable between updates (rebuilt only on recompute), so it is\n     *  safe to feed a `useSyncExternalStore`-style binding. */\n    getState(): DevtoolsState;\n    /** Subscribe to updates; fires immediately with the current state, then after each recompute. */\n    subscribe(listener: () => void): () => void;\n    /** Force a synchronous recompute (also used by the safety-net poll and by tests). */\n    refresh(): void;\n    /** Clear the delta stream ring (a panel \"clear\" affordance). */\n    clearDeltas(): void;\n    /** Drop every SETTLED timeline row (confirmed/dropped), keeping live pending ones + the deltas. */\n    clearHistory(): void;\n    /** Detach from the client: stop the poll, drop the store tap, deregister from the global hub. */\n    detach(): void;\n    private attachServerDeltas;\n    private onStoreDelta;\n    private onServerDelta;\n    private onResultType;\n    private markDirty;\n    private flush;\n    private recompute;\n    /** Reconstruct the fork/rebase lifecycle by diffing this pending snapshot against the previous\n     *  one (DEBUG-TOOLS-BROWSER-DESIGN §4.1): new keys → invoked; vanished keys → confirmed (mid ≤\n     *  confirmedLmid) or dropped; a fold's `f:<foldKey>` → `m:<mid>` transition is linked, not double\n     *  counted. */\n    private reconcileTimeline;\n    private rebuildQueries;\n    private pushServerDelta;\n    private pushChangeDelta;\n    private pushNormalizedDelta;\n    private appendDelta;\n    private addEntry;\n    private renameEntry;\n}","description":"","source":"packages/devtools/src/core.ts","line":44,"href":"/reference/typescript/devtools/#symbol-DevtoolsCore"},{"name":"DevtoolsCoreOptions","originalName":"DevtoolsCoreOptions","kind":"InterfaceDeclaration","signature":"/** Construction options for {@link DevtoolsCore}. */\nexport interface DevtoolsCoreOptions {\n    /** Max timeline rows retained (oldest settled rows drop first). Default 200. */\n    timelineCap?: number;\n    /** Max delta-stream rows retained. Default 500. */\n    deltaCap?: number;\n    /** Per-query row sample size pulled from the store. Default 25. */\n    sampleRows?: number;\n    /** Safety-net poll interval (ms) that catches state moves with no event — a fold's debounced\n     *  flush, or a pending flip on an already-`complete` query. Default 0 (off); {@link attachDevtools}\n     *  turns it on. */\n    pollMs?: number;\n    /** Coalesce event-driven recomputes onto a microtask. Default true; tests pass `false` and drive\n     *  recomputes explicitly via {@link DevtoolsCore.refresh}. */\n    autoFlush?: boolean;\n    /** Injectable clock (ms). Default `Date.now`; tests inject a deterministic counter. */\n    now?: () => number;\n}","description":"Construction options for {@link DevtoolsCore }.","source":"packages/devtools/src/types.ts","line":167,"href":"/reference/typescript/devtools/#symbol-DevtoolsCoreOptions"},{"name":"DevtoolsHub","originalName":"DevtoolsHub","kind":"InterfaceDeclaration","signature":"/** The discovery surface a panel binds to: the set of attached cores + a change subscription. */\nexport interface DevtoolsHub {\n    readonly version: number;\n    readonly cores: readonly DevtoolsCore[];\n    /** Fires whenever a core attaches or detaches (so a panel can pick one up). */\n    subscribe(listener: () => void): () => void;\n    /** Register a core; returns its deregistration function. */\n    register(core: DevtoolsCore): () => void;\n}","description":"The discovery surface a panel binds to: the set of attached cores + a change subscription.","source":"packages/devtools/src/global.ts","line":14,"href":"/reference/typescript/devtools/#symbol-DevtoolsHub"},{"name":"DevtoolsState","originalName":"DevtoolsState","kind":"InterfaceDeclaration","signature":"/** The whole devtools snapshot a panel renders. Reference-stable arrays between updates where the\n *  underlying data did not change is NOT guaranteed — panels should treat each `getState()` as fresh. */\nexport interface DevtoolsState {\n    /** Newest-last mutation timeline (capped). */\n    timeline: TimelineEntry[];\n    /** Every live materialized view. */\n    queries: QueryEntry[];\n    /** Newest-last delta stream ring (capped). */\n    deltas: DeltaEntry[];\n    /** The raw optimistic-loop snapshot, when the backend exposes one (a \"loop\" summary line). */\n    optimistic?: OptimisticInspect;\n    capabilities: {\n        optimistic: boolean;\n    };\n}","description":"The whole devtools snapshot a panel renders. Reference-stable arrays between updates where the\nunderlying data did not change is NOT guaranteed — panels should treat each `getState()` as fresh.","source":"packages/devtools/src/types.ts","line":154,"href":"/reference/typescript/devtools/#symbol-DevtoolsState"},{"name":"DevtoolsStore","originalName":"DevtoolsStore","kind":"InterfaceDeclaration","signature":"/** The Store surface the core reads (a structural subset of `@rindle/client`'s `Store`). The delta\n *  + resultType taps are the SUPPORTED app-facing seams (no private devtools back door). */\nexport interface DevtoolsStore {\n    subscribeChanges(listener: (qid: QueryId, ev: ChangeEvent) => void): () => void;\n    subscribeResultType(listener: (qid: QueryId, rt: ResultType) => void): () => void;\n    __inspect(sampleRows?: number): StoreInspect;\n}","description":"The Store surface the core reads (a structural subset of `@rindle/client`'s `Store`). The delta\n+ resultType taps are the SUPPORTED app-facing seams (no private devtools back door).","source":"packages/devtools/src/types.ts","line":65,"href":"/reference/typescript/devtools/#symbol-DevtoolsStore"},{"name":"DevtoolsTarget","originalName":"DevtoolsTarget","kind":"InterfaceDeclaration","signature":"/** What {@link attachDevtools} binds to: a `createRindleClient` app, or any `{ store, backend }`. */\nexport interface DevtoolsTarget {\n    store: DevtoolsStore;\n    /** Narrowed to {@link DevtoolsBackend} at runtime when it carries `__inspect` (capability probe). */\n    backend?: unknown;\n}","description":"What {@link attachDevtools } binds to: a `createRindleClient` app, or any `{ store, backend }`.","source":"packages/devtools/src/types.ts","line":80,"href":"/reference/typescript/devtools/#symbol-DevtoolsTarget"},{"name":"FoldInspect","originalName":"FoldInspect","kind":"InterfaceDeclaration","signature":"/** One folded entry's debounce window — mirror of `@rindle/optimistic`'s `FoldInspect`. */\nexport interface FoldInspect {\n    foldKey: string;\n    debounceMs: number;\n    maxWaitMs?: number;\n    deferAcrossWrites: boolean;\n    flushed: boolean;\n}","description":"One folded entry's debounce window — mirror of `@rindle/optimistic`'s `FoldInspect`.","source":"packages/devtools/src/types.ts","line":35,"href":"/reference/typescript/devtools/#symbol-FoldInspect"},{"name":"getDevtoolsCore","originalName":"getDevtoolsCore","kind":"FunctionDeclaration","signature":"/** The most recently attached core, or `undefined` — the common single-app convenience a panel uses. */\nexport declare function getDevtoolsCore(): DevtoolsCore | undefined;","description":"The most recently attached core, or `undefined` — the common single-app convenience a panel uses.","source":"packages/devtools/src/global.ts","line":64,"href":"/reference/typescript/devtools/#symbol-getDevtoolsCore"},{"name":"getDevtoolsHub","originalName":"getDevtoolsHub","kind":"FunctionDeclaration","signature":"/** Get (creating on first use) the global devtools hub. A panel calls this to discover attached\n *  clients; it is safe to call before any `attachDevtools`. */\nexport declare function getDevtoolsHub(): DevtoolsHub;","description":"Get (creating on first use) the global devtools hub. A panel calls this to discover attached\nclients; it is safe to call before any `attachDevtools`.","source":"packages/devtools/src/global.ts","line":58,"href":"/reference/typescript/devtools/#symbol-getDevtoolsHub"},{"name":"MutationState","originalName":"MutationState","kind":"TypeAliasDeclaration","signature":"/** A mutation's place in the fork/rebase lifecycle (DEBUG-TOOLS-BROWSER-DESIGN §4.1). */\nexport type MutationState = \"pending\" | \"confirmed\" | \"dropped\";","description":"A mutation's place in the fork/rebase lifecycle (DEBUG-TOOLS-BROWSER-DESIGN §4.1).","source":"packages/devtools/src/types.ts","line":89,"href":"/reference/typescript/devtools/#symbol-MutationState"},{"name":"NormalizedOp","originalName":"NormalizedOp","kind":"TypeAliasDeclaration","signature":"/**\n * A table-tagged, path-free row delta — the **normalized** wire payload (the path-free twin\n * of {@link FlatChange}; NORMALIZED-CHANGES-DESIGN.md §3). Rows are positional (bare cells; a\n * json column is its raw JSON string). `op` is the discriminant. Lives here (not in\n * `@rindle/normalized`) so both the protocol (`@rindle/remote`) and the sync layer share one type.\n */\nexport type NormalizedOp = {\n    table: string;\n    op: \"add\";\n    row: WireValue[];\n} | {\n    table: string;\n    op: \"remove\";\n    row: WireValue[];\n} | {\n    table: string;\n    op: \"edit\";\n    old: WireValue[];\n    new: WireValue[];\n};","description":"A table-tagged, path-free row delta — the **normalized** wire payload (the path-free twin\nof {@link FlatChange}; NORMALIZED-CHANGES-DESIGN.md §3). Rows are positional (bare cells; a\njson column is its raw JSON string). `op` is the discriminant. Lives here (not in\n`@rindle/normalized`) so both the protocol (`@rindle/remote`) and the sync layer share one type.","source":"packages/client/src/types.ts","line":100,"href":"/reference/typescript/devtools/#symbol-NormalizedOp"},{"name":"OptimisticInspect","originalName":"OptimisticInspect","kind":"InterfaceDeclaration","signature":"/** A snapshot of the optimistic loop — mirror of `@rindle/optimistic`'s `OptimisticInspect`. */\nexport interface OptimisticInspect {\n    pending: PendingInspect[];\n    confirmedLmid: number;\n    nextMid: number;\n    appliedCv: number;\n    bufferedFrames: number;\n    pendingTables: string[];\n}","description":"A snapshot of the optimistic loop — mirror of `@rindle/optimistic`'s `OptimisticInspect`.","source":"packages/devtools/src/types.ts","line":54,"href":"/reference/typescript/devtools/#symbol-OptimisticInspect"},{"name":"PendingInspect","originalName":"PendingInspect","kind":"InterfaceDeclaration","signature":"/** One pending mutation — mirror of `@rindle/optimistic`'s `PendingInspect`. */\nexport interface PendingInspect {\n    key: string;\n    mid: number | null;\n    name: string;\n    args: unknown;\n    tables: string[];\n    fold?: FoldInspect;\n}","description":"One pending mutation — mirror of `@rindle/optimistic`'s `PendingInspect`.","source":"packages/devtools/src/types.ts","line":44,"href":"/reference/typescript/devtools/#symbol-PendingInspect"},{"name":"QueryEntry","originalName":"QueryEntry","kind":"InterfaceDeclaration","signature":"/** One materialized view in the queries inspector (DEBUG-TOOLS-BROWSER-DESIGN §4.2). */\nexport interface QueryEntry {\n    qid: number;\n    ast: Ast;\n    /** The root table (`ast.table`). */\n    table: string;\n    /** A one-line human summary of the AST (table, filters, order, limit, relationships). */\n    summary: string;\n    /** Every base table the query reads (root + correlated subqueries). */\n    tables: string[];\n    resultType: ResultType;\n    rowCount: number;\n    sample: readonly unknown[];\n    /** Does any pending mutation touch this query's tables? (the §7.2 pending axis). */\n    pending: boolean;\n}","description":"One materialized view in the queries inspector (DEBUG-TOOLS-BROWSER-DESIGN §4.2).","source":"packages/devtools/src/types.ts","line":120,"href":"/reference/typescript/devtools/#symbol-QueryEntry"},{"name":"QueryId","originalName":"QueryId","kind":"TypeAliasDeclaration","signature":"export type QueryId = number;","description":"","source":"packages/client/src/types.ts","line":128,"href":"/reference/typescript/devtools/#symbol-QueryId"},{"name":"ResultType","originalName":"ResultType","kind":"TypeAliasDeclaration","signature":"/** A query's SERVER-CHANNEL state, surfaced on its {@link ArrayView} (FOLDED-MUTATIONS-DESIGN §7 —\n *  formerly conflated with pending-ness, OPTIMISTIC-WRITES-DESIGN.md §6):\n *   - `unknown`  — not hydrated: the server has not produced a first result for this query yet;\n *   - `complete` — the server has answered. STAYS `complete` while a local mutation is pending (the\n *                  prediction is the client's best current answer); reversion on rejection is an\n *                  event (`onRejected`), not a downgrade of completeness;\n *   - `error`    — RESERVED for a future server-side, query-level error signal\n *                  (see `designs/101-QUERY-ERRORS-DESIGN.md`); no longer produced by a pending mutation.\n *  \"Is a prediction pending here?\" is now a separate reactive axis (the backend's `pending(qid)` /\n *  `onPending`), not folded into this type. A backend with no server lifecycle (the in-process\n *  engine) leaves every view `complete`. */\nexport type ResultType = \"unknown\" | \"complete\" | \"error\";","description":"A query's SERVER-CHANNEL state, surfaced on its {@link ArrayView } (FOLDED-MUTATIONS-DESIGN §7 —\nformerly conflated with pending-ness, OPTIMISTIC-WRITES-DESIGN.md §6):\n - `unknown`  — not hydrated: the server has not produced a first result for this query yet;\n - `complete` — the server has answered. STAYS `complete` while a local mutation is pending (the\n                prediction is the client's best current answer); reversion on rejection is an\n                event (`onRejected`), not a downgrade of completeness;\n - `error`    — RESERVED for a future server-side, query-level error signal\n                (see `designs/101-QUERY-ERRORS-DESIGN.md`); no longer produced by a pending mutation.\n\"Is a prediction pending here?\" is now a separate reactive axis (the backend's `pending(qid)` /\n`onPending`), not folded into this type. A backend with no server lifecycle (the in-process\nengine) leaves every view `complete`.","source":"packages/client/src/types.ts","line":155,"href":"/reference/typescript/devtools/#symbol-ResultType"},{"name":"StoreInspect","originalName":"StoreInspect","kind":"InterfaceDeclaration","signature":"/** A frozen snapshot of the Store's live query state for a devtools pane ({@link Store.__inspect}). */\nexport interface StoreInspect {\n    queries: QueryInspect[];\n}","description":"A frozen snapshot of the Store's live query state for a devtools pane ({@link Store.__inspect}).","source":"packages/client/src/store.ts","line":88,"href":"/reference/typescript/devtools/#symbol-StoreInspect"},{"name":"summarizeAst","originalName":"summarizeAst","kind":"FunctionDeclaration","signature":"/** A compact, one-line description of a query AST for the inspector header — best-effort and\n *  truncation-friendly (the full AST is available for a collapsible pretty-print alongside). */\nexport declare function summarizeAst(ast: Ast): string;","description":"A compact, one-line description of a query AST for the inspector header — best-effort and\ntruncation-friendly (the full AST is available for a collapsible pretty-print alongside).","source":"packages/devtools/src/ast.ts","line":28,"href":"/reference/typescript/devtools/#symbol-summarizeAst"},{"name":"TimelineEntry","originalName":"TimelineEntry","kind":"InterfaceDeclaration","signature":"/** One row of the mutation timeline — the optimistic loop made visible. */\nexport interface TimelineEntry {\n    /** Stable identity across snapshots: the pending key (`m:<mid>` once a mid is dealt, else\n     *  `f:<foldKey>` while a fold debounces). Retained after the entry settles. */\n    id: string;\n    /** The wire mutation id, or `null` for a still-folding entry. */\n    mid: number | null;\n    name: string;\n    args: unknown;\n    /** Tables the mutator touched (its pending-axis footprint). */\n    tables: string[];\n    state: MutationState;\n    /** True for a debounced/folded write; `fold` carries its window while it is live. */\n    folded: boolean;\n    fold?: FoldInspect;\n    /** Devtools-clock ms at first observation (invoke). */\n    invokedAt: number;\n    /** Devtools-clock ms when it left the pending stack (confirmed or dropped). */\n    settledAt?: number;\n    /** Heuristic (§4.1): view churn coincided with this mutation's confirmation — a POSSIBLE\n     *  snap-back (the optimistic prediction diverged from the authoritative server result). Labeled\n     *  \"possible\" because unrelated server data released in the same coherent batch also shows churn;\n     *  a precise signal needs a reconcile-boundary event (a future engine seam). */\n    reconciledWithChurn: boolean;\n    /** qids of live queries whose tables this mutation touches (computed against the current views). */\n    affectedQueries: number[];\n}","description":"One row of the mutation timeline — the optimistic loop made visible.","source":"packages/devtools/src/types.ts","line":92,"href":"/reference/typescript/devtools/#symbol-TimelineEntry"}]},{"name":"@rindle/narrator","source":"packages/narrator/src/index.ts","package":"@rindle/narrator","symbols":[{"name":"createNarrator","originalName":"createNarrator","kind":"FunctionDeclaration","signature":"/** Build a narrator over an app-supplied {@link NarratorRegistry}. Resolution is driven entirely by\n *  the per-query `WireSchema` passed to {@link Narrator.narrate}, so the narrator holds no schema\n *  state of its own. */\nexport declare function createNarrator(narrators: NarratorRegistry): Narrator;","description":"Build a narrator over an app-supplied {@link NarratorRegistry}. Resolution is driven entirely by\nthe per-query `WireSchema` passed to {@link Narrator.narrate}, so the narrator holds no schema\nstate of its own.","source":"packages/narrator/src/narrator.ts","line":95,"href":"/reference/typescript/narrator/#symbol-createNarrator"},{"name":"NamedRow","originalName":"NamedRow","kind":"TypeAliasDeclaration","signature":"/** A row named against its level's wire columns. */\nexport type NamedRow = Record<string, WireValue>;","description":"A row named against its level's wire columns.","source":"packages/client/src/resolve.ts","line":26,"href":"/reference/typescript/narrator/#symbol-NamedRow"},{"name":"NarrateContext","originalName":"NarrateContext","kind":"InterfaceDeclaration","signature":"/** Context a template may interpolate — e.g. a human label for the subscription's subject. */\nexport interface NarrateContext {\n    /** A human name for what the query is scoped to (\"the Smith wedding\"). */\n    subject?: string;\n    [k: string]: unknown;\n}","description":"Context a template may interpolate — e.g. a human label for the subscription's subject.","source":"packages/narrator/src/narrator.ts","line":18,"href":"/reference/typescript/narrator/#symbol-NarrateContext"},{"name":"Narrator","originalName":"Narrator","kind":"InterfaceDeclaration","signature":"export interface Narrator {\n    /** Resolve + render a `FlatChange[]` for a named query into semantic events. `schema` is the\n     *  query's `WireSchema`, captured from its `hello` frame (or read off `view.schema`) — the\n     *  position→name source. */\n    narrate(query: string, schema: WireSchema, changes: FlatChange[], phase: \"snapshot\" | \"batch\", ctx?: NarrateContext): SemanticEvent[];\n    /** Format a batch of rendered events for an agent prompt (salience-marked, suppressions dropped). */\n    digest(events: SemanticEvent[]): string;\n}","description":"","source":"packages/narrator/src/narrator.ts","line":77,"href":"/reference/typescript/narrator/#symbol-Narrator"},{"name":"NarratorRegistry","originalName":"NarratorRegistry","kind":"TypeAliasDeclaration","signature":"/** A registry of {@link QueryNarrator}s, keyed by `defineQuery` name. Supplied by the app. */\nexport type NarratorRegistry = Record<string, QueryNarrator>;","description":"A registry of {@link QueryNarrator}s, keyed by `defineQuery` name. Supplied by the app.","source":"packages/narrator/src/narrator.ts","line":66,"href":"/reference/typescript/narrator/#symbol-NarratorRegistry"},{"name":"QueryNarrator","originalName":"QueryNarrator","kind":"InterfaceDeclaration","signature":"export interface QueryNarrator {\n    /** Default importance of this query's events; an op handler may override via the return tuple. */\n    salience: Salience;\n    /** Handlers for changes at the ROOT level, by op. */\n    root?: Partial<Record<\"add\" | \"remove\" | \"edit\", Template>>;\n    /** Handlers for changes to a NESTED relationship, keyed by op — so ONE materialized view narrates\n     *  its whole tree: e.g. a deck's title at the root, slide edits under `slides`, component adds under\n     *  `components`. Key by the relationship's LEAF alias (`components`) for the common case, or by the\n     *  FULL dotted alias-chain from the root (`slides.components`) to disambiguate two relationships that\n     *  share a leaf alias at different tree positions (e.g. `slides.components` vs `appendix.components`).\n     *  A dotted key wins over a leaf key when both match; a bare leaf key still matches at any depth. */\n    related?: Record<string, RelatedNarrator>;\n    /** Handlers for an aggregate slot (`countAs`), keyed by the count's alias. */\n    counts?: Record<string, Template>;\n}","description":"","source":"packages/narrator/src/narrator.ts","line":49,"href":"/reference/typescript/narrator/#symbol-QueryNarrator"},{"name":"RelatedNarrator","originalName":"RelatedNarrator","kind":"InterfaceDeclaration","signature":"/** Handlers for changes to ONE nested relationship (keyed by its alias in {@link QueryNarrator.related}),\n *  by op — plus an optional salience override for that relationship's events. A nested template reads\n *  `row` (the nested row), `old`, and `parent` (its immediate container — the deck for a slide, the\n *  slide for a component). */\nexport interface RelatedNarrator {\n    /** Override the query's default salience for events on this relationship (else inherits it). */\n    salience?: Salience;\n    add?: Template;\n    remove?: Template;\n    edit?: Template;\n}","description":"Handlers for changes to ONE nested relationship (keyed by its alias in {@link QueryNarrator.related}),\nby op — plus an optional salience override for that relationship's events. A nested template reads\n`row` (the nested row), `old`, and `parent` (its immediate container — the deck for a slide, the\nslide for a component).","source":"packages/narrator/src/narrator.ts","line":41,"href":"/reference/typescript/narrator/#symbol-RelatedNarrator"},{"name":"ResolvedChange","originalName":"ResolvedChange","kind":"InterfaceDeclaration","signature":"/** One resolved change: a `FlatChange` lifted out of positional/indexed wire form into names,\n *  using the query's `WireSchema` (from `hello`) as the sole position→name source. */\nexport interface ResolvedChange {\n    /** Relationship-alias chain from the query root to the changed level (`[]` ⇒ the root rows). */\n    aliasChain: string[];\n    /** The alias of the changed level (`\"\"` ⇒ root), i.e. the last of `aliasChain`. */\n    alias: string;\n    op: \"add\" | \"remove\" | \"edit\";\n    /** The affected row, named. For `edit` this is the NEW row; see `old` for the prior one. */\n    row: NamedRow;\n    /** The prior row, named (present only for `edit`). */\n    old?: NamedRow;\n    /** The PARENT row (named), for a nested/aggregate change — e.g. the `ticket_type` whose `sold`\n     *  count moved. Taken from the path's last `parentRow`; absent for a root-level change. */\n    parent?: NamedRow;\n    /** Set when the changed level is a `countAs`/aggregate slot. The value is EXACT — read from the\n     *  slot's projected count column (`WireRel.project.col`). */\n    aggregate?: {\n        alias: string;\n        value: WireValue;\n        previous?: WireValue;\n    };\n    /** The raw node whose children a consumer can dig a named sub-row out of (via {@link subRow}). On\n     *  an `add` the engine always ships it; on a `remove` it is present only when the consumer opted\n     *  into the removed subtree (see the `op` mapping below). */\n    node?: WireNode;\n    /** The changed level's `WireSchema` — used by {@link subRow} to resolve a named sub of `node`. */\n    levelSchema: WireSchema;\n}","description":"One resolved change: a `FlatChange` lifted out of positional/indexed wire form into names,\nusing the query's `WireSchema` (from `hello`) as the sole position→name source.","source":"packages/client/src/resolve.ts","line":30,"href":"/reference/typescript/narrator/#symbol-ResolvedChange"},{"name":"Salience","originalName":"Salience","kind":"TypeAliasDeclaration","signature":"export type Salience = \"alert\" | \"info\" | \"ambient\";","description":"","source":"packages/narrator/src/narrator.ts","line":15,"href":"/reference/typescript/narrator/#symbol-Salience"},{"name":"SALIENCE_MARK","originalName":"SALIENCE_MARK","kind":"VariableDeclaration","signature":"/** Per-salience glyph for a rendered line. */\nexport declare const SALIENCE_MARK: Record<Salience, string>;","description":"Per-salience glyph for a rendered line.","source":"packages/narrator/src/narrator.ts","line":87,"href":"/reference/typescript/narrator/#symbol-SALIENCE_MARK"},{"name":"salienceRank","originalName":"salienceRank","kind":"VariableDeclaration","signature":"/** Order salience high→low. */\nexport declare const salienceRank: (s: Salience) => number;","description":"Order salience high→low.","source":"packages/narrator/src/narrator.ts","line":90,"href":"/reference/typescript/narrator/#symbol-salienceRank"},{"name":"SemanticEvent","originalName":"SemanticEvent","kind":"InterfaceDeclaration","signature":"/** One rendered semantic event. `text === null` was suppressed by its template (too ambient). */\nexport interface SemanticEvent {\n    query: string;\n    phase: \"snapshot\" | \"batch\";\n    salience: Salience;\n    resolved: ResolvedChange;\n    text: string | null;\n}","description":"One rendered semantic event. `text === null` was suppressed by its template (too ambient).","source":"packages/narrator/src/narrator.ts","line":69,"href":"/reference/typescript/narrator/#symbol-SemanticEvent"},{"name":"Template","originalName":"Template","kind":"TypeAliasDeclaration","signature":"export type Template = (ctx: TemplateCtx) => string | null;","description":"","source":"packages/narrator/src/narrator.ts","line":35,"href":"/reference/typescript/narrator/#symbol-Template"},{"name":"TemplateCtx","originalName":"TemplateCtx","kind":"InterfaceDeclaration","signature":"export interface TemplateCtx {\n    row: NamedRow;\n    old?: NamedRow;\n    /** The parent row, for an aggregate/nested change (e.g. the `ticket_type` behind a `sold` count). */\n    parent?: NamedRow;\n    /** Resolve a named sub-row of the change (only populated on `add`). */\n    sub: (alias: string) => NamedRow | null;\n    aggregate?: ResolvedChange[\"aggregate\"];\n    context: NarrateContext;\n}","description":"","source":"packages/narrator/src/narrator.ts","line":24,"href":"/reference/typescript/narrator/#symbol-TemplateCtx"}]},{"name":"@rindle/narrator-react","source":"packages/narrator-react/src/index.ts","package":"@rindle/narrator-react","symbols":[{"name":"Narration","originalName":"Narration","kind":"InterfaceDeclaration","signature":"/** A stable handle over a query's live narration buffer. */\nexport interface Narration {\n    /** Drain the events accumulated since the last call, then clear — call this when you hand context\n     *  to an agent (e.g. on chat send). */\n    take(): SemanticEvent[];\n    /** Discard the buffer without returning it. */\n    clear(): void;\n}","description":"A stable handle over a query's live narration buffer.","source":"packages/narrator-react/src/index.ts","line":25,"href":"/reference/typescript/narrator-react/#symbol-Narration"},{"name":"useNarration","originalName":"useNarration","kind":"FunctionDeclaration","signature":"/** Narrate a live query's change stream into buffered {@link SemanticEvent}s — the agent-facing twin\n *  of `useQuery`. It drives off the view's OWN `onChanges` channel (net of no-op rebase cycles, so a\n *  correctly predicted optimistic write narrates nothing) and needs no store-global qid filter.\n *\n *  The returned handle is STABLE and does NOT re-render on each change — narration feeds an agent,\n *  not the DOM. Drain it with `take()` at the moment you send context. Pass a STABLE `registry` (a\n *  module const): a fresh object each render re-subscribes the view. */\nexport declare function useNarration<Q extends AnyQuery>(query: Q, registry: NarratorRegistry, opts?: UseNarrationOptions): Narration;","description":"Narrate a live query's change stream into buffered {@link SemanticEvent}s — the agent-facing twin\nof `useQuery`. It drives off the view's OWN `onChanges` channel (net of no-op rebase cycles, so a\ncorrectly predicted optimistic write narrates nothing) and needs no store-global qid filter.\n\nThe returned handle is STABLE and does NOT re-render on each change — narration feeds an agent,\nnot the DOM. Drain it with `take()` at the moment you send context. Pass a STABLE `registry` (a\nmodule const): a fresh object each render re-subscribes the view.","source":"packages/narrator-react/src/index.ts","line":40,"href":"/reference/typescript/narrator-react/#symbol-useNarration"},{"name":"UseNarrationOptions","originalName":"UseNarrationOptions","kind":"InterfaceDeclaration","signature":"/** Options for {@link useNarration}. */\nexport interface UseNarrationOptions {\n    /** The registry key for this query's templates. Defaults to a named query's `name`; pass it for an\n     *  ad-hoc (unnamed) query, e.g. `{ as: \"deckSlides\" }`. */\n    as?: string;\n    /** Context handed to every template (e.g. a human subject label). */\n    ctx?: NarrateContext;\n    /** Which delivery phases to narrate. Default `[\"batch\"]` — the initial `snapshot` is the current\n     *  state (not a change), so \"tell me what CHANGED\" ignores it. Pass `[\"snapshot\", \"batch\"]` to also\n     *  narrate the initial rows. */\n    phases?: ChangePhase[];\n    /** Cap the retained event buffer; oldest drop first. Default 200. */\n    max?: number;\n}","description":"Options for {@link useNarration}.","source":"packages/narrator-react/src/index.ts","line":10,"href":"/reference/typescript/narrator-react/#symbol-UseNarrationOptions"}]},{"name":"@rindle/normalized","source":"packages/normalized/src/index.ts","package":"@rindle/normalized","symbols":[{"name":"aggTableName","originalName":"aggTableName","kind":"FunctionDeclaration","signature":"/** The synthetic base-table name for a relationship `count` aggregate — the byte-exact twin\n *  of Rust `agg_table_name` (`normalize.rs` §3.1). A content hash of the aggregate definition\n *  (child table, kind, group key = correlation **child** fields, child `where`); the parent\n *  correlation field is excluded. Same definition ⇒ same name (cross-query sharing); a\n *  different filter ⇒ a different name (no `(table, pk)` collision). */\nexport declare function aggTableName(csq: CorrelatedSubquery): string;","description":"The synthetic base-table name for a relationship `count` aggregate — the byte-exact twin\nof Rust `agg_table_name` (`normalize.rs` §3.1). A content hash of the aggregate definition\n(child table, kind, group key = correlation **child** fields, child `where`); the parent\ncorrelation field is excluded. Same definition ⇒ same name (cross-query sharing); a\ndifferent filter ⇒ a different name (no `(table, pk)` collision).","source":"packages/normalized/src/agg-table.ts","line":71,"href":"/reference/typescript/normalized/#symbol-aggTableName"},{"name":"aggTableSchemas","originalName":"aggTableSchemas","kind":"FunctionDeclaration","signature":"/** Every synthetic aggregate table `ast` surfaces (recursively, a nested aggregate under a\n *  materialized relationship included), as flat table schemas — the twin of Rust\n *  `agg_table_schemas`. Columns `[childField…, \"count\"]`; PK = the leading group columns. */\nexport declare function aggTableSchemas(ast: Ast, isLocal?: (table: string) => boolean): NormalizedTableSchema[];","description":"Every synthetic aggregate table `ast` surfaces (recursively, a nested aggregate under a\nmaterialized relationship included), as flat table schemas — the twin of Rust\n`agg_table_schemas`. Columns `[childField…, \"count\"]`; PK = the leading group columns.","source":"packages/normalized/src/agg-table.ts","line":218,"href":"/reference/typescript/normalized/#symbol-aggTableSchemas"},{"name":"ColCounts","originalName":"ColCounts","kind":"TypeAliasDeclaration","signature":"/** Per-table FULL column count — the width of a base/union row. Needed to scatter a projected\n *  (narrower) wire row into the shared positional layout (PROJECTION-SUPPORT-DESIGN.md §5.3). */\nexport type ColCounts = Record<string, number>;","description":"Per-table FULL column count — the width of a base/union row. Needed to scatter a projected\n(narrower) wire row into the shared positional layout (PROJECTION-SUPPORT-DESIGN.md §5.3).","source":"packages/normalized/src/sync.ts","line":47,"href":"/reference/typescript/normalized/#symbol-ColCounts"},{"name":"createNormalizedStore","originalName":"createNormalizedStore","kind":"FunctionDeclaration","signature":"/** A local-first {@link Store} whose base tables are fed by a server's normalized stream.\n *  The returned Store is the ordinary `@rindle/client` Store — `store.query…materialize()` and\n *  `store.write(…)` work as always; only the backend composition differs. */\nexport declare function createNormalizedStore<S extends ColsMap>(schema: Schema<S>, source: NormalizedSource): Store<S>;","description":"A local-first {@link Store} whose base tables are fed by a server's normalized stream.\nThe returned Store is the ordinary `@rindle/client` Store — `store.query…materialize()` and\n`store.write(…)` work as always; only the backend composition differs.","source":"packages/normalized/src/backend.ts","line":439,"href":"/reference/typescript/normalized/#symbol-createNormalizedStore"},{"name":"NormalizedBackend","originalName":"NormalizedBackend","kind":"ClassDeclaration","signature":"export declare class NormalizedBackend<S extends ColsMap> implements Backend {\n    private readonly local;\n    private readonly sync;\n    private readonly source;\n    private handler;\n    /** The Store's commit-boundary handler ({@link Backend.onCommitBoundary}), forwarded from the\n     *  local engine's `dispatch` brackets so the Store folds every affected view before notifying any\n     *  subscriber (cross-view-atomic notification). A normalized batch becomes net base mutations\n     *  applied to the local engine in one commit, which fans to every view reading those rows — this\n     *  carries that commit's boundary up so all those views notify together. */\n    private boundaryHandler;\n    private readonly devObservers;\n    private readonly remoteSubs;\n    private readonly localToRemote;\n    private readonly remoteRetainToLocal;\n    private readonly sourceToRemote;\n    private readonly resultTypes;\n    private readonly hydrated;\n    /** Local qids that are JUST hydrating on the in-flight `onNormalized` snapshot — set only for the\n     *  duration of its `local.mutate`, so the local-event forwarder stamps their fold `catchUp`: the\n     *  whole first result set arrives as a `batch` (we hydrate the view by mutating the embedded engine,\n     *  which speaks in batches — there is no second `snapshot`), and `catchUp` is the flag that tells the\n     *  Store this batch IS hydration (retire the SSR seed, phase it as a snapshot for narration). The\n     *  optimistic backend does the identical thing across its reconcile cycle. `null` outside a hydrate. */\n    private catchUpQids;\n    private resultTypeHandler;\n    /** The client's OWN typed per-table schemas (for CRIT#4 validation), fixed at construction. */\n    private readonly clientTables;\n    /** Synthetic aggregate tables (`__agg_*`) registered so far, by name (§3.3). Per aggregate\n     *  DEFINITION (not per query), so two queries over the same count share one table. */\n    private readonly synthetic;\n    /** table → (column name → base ColId), for mapping a projected hello to base positions. */\n    private readonly colIndex;\n    /** table → full column count, to detect whether a hello's table is projected. */\n    private readonly colCounts;\n    /** Synthetic table name → how many registered queries reference it. Materialized on `0→1`,\n     *  reclaimed (engine source + refcount layer) on `1→0` — so aggregate state is not permanent (§4). */\n    private readonly syntheticRefs;\n    /** queryId → the synthetic tables it referenced at registration, to decrement on teardown. */\n    private readonly queryAggTables;\n    constructor(schema: Schema<S>, source: NormalizedSource);\n    registerQuery(qid: QueryId, ast: Ast, remote?: RemoteQuery): void;\n    /** Register every synthetic aggregate table `ast` needs that we haven't seen yet: on the\n     *  local engine (so it can join to it), on `NormalizedSync` (so its rows refcount/GC by\n     *  group key), and into the source's expected-schema set (so the server's `hello` — which\n     *  advertises the same table — passes CRIT#4 validation, the client deriving the schema\n     *  identically). Idempotent across queries that share an aggregate definition. */\n    private ensureSyntheticTables;\n    /** Decrement each synthetic table query `qid` referenced; remove the ones that reach 0 (no\n     *  reader left) from the engine + refcount layer — aggregate state reclaimed, not permanent\n     *  (§4). Runs AFTER `local.unregisterQuery(qid)` so the source has no live connection when\n     *  `unregisterTable` frees it. */\n    private releaseSyntheticTables;\n    unregisterQuery(qid: QueryId): void;\n    retainRemoteQuery(qid: QueryId, remote: RemoteQuery, localQueryId?: QueryId, ast?: Ast): void;\n    releaseRemoteQuery(qid: QueryId): void;\n    /** Writes are authoritative-only here: send to the server, the stream reconciles locally.\n     *  (Optimistic local apply + rebase is Slice 6.) */\n    mutate(mutations: Mutation[]): Promise<void>;\n    onEvent(handler: (qid: QueryId, ev: ChangeEvent) => void): void;\n    onCommitBoundary(handler: (phase: \"begin\" | \"end\") => void): void;\n    onResultType(handler: (qid: QueryId, rt: ResultType) => void): void;\n    __attachDevtoolsServerDeltas(observer: BackendDevObserver): () => void;\n    private onNormalized;\n    private emitServerDelta;\n    private localQidsForSource;\n    private retainRemote;\n    private releaseRemote;\n    private markSubHydrated;\n    private hasRemoteDependency;\n    private setResultType;\n    private recomputeResultType;\n}","description":"","source":"packages/normalized/src/backend.ts","line":72,"href":"/reference/typescript/normalized/#symbol-NormalizedBackend"},{"name":"NormalizedEvent","originalName":"NormalizedEvent","kind":"TypeAliasDeclaration","signature":"/**\n * A per-query NORMALIZED stream event — the path-free twin of {@link ChangeEvent}. The\n * `hello` carries the flat per-table schemas (no nested view schema, §3); `snapshot`/`batch`\n * carry table-tagged {@link NormalizedOp}s. The `NormalizedSync` layer folds these into the\n * local engine's base tables.\n *\n * `cv` (the global commit version the frame's data reflects — OPTIMISTIC-WRITES-DESIGN.md\n * §8.3/§8.6) is present on sources that speak the optimistic protocol; the plain normalized\n * path may omit it.\n */\nexport type NormalizedEvent = {\n    type: \"hello\";\n    tables: NormalizedTableSchema[];\n    comparatorVersion: number;\n    normalizedFp: string;\n} | {\n    type: \"snapshot\";\n    ops: NormalizedOp[];\n    cv?: number;\n} | {\n    type: \"batch\";\n    ops: NormalizedOp[];\n    cv?: number;\n};","description":"A per-query NORMALIZED stream event — the path-free twin of {@link ChangeEvent}. The\n`hello` carries the flat per-table schemas (no nested view schema, §3); `snapshot`/`batch`\ncarry table-tagged {@link NormalizedOp}s. The `NormalizedSync` layer folds these into the\nlocal engine's base tables.\n\n`cv` (the global commit version the frame's data reflects — OPTIMISTIC-WRITES-DESIGN.md\n§8.3/§8.6) is present on sources that speak the optimistic protocol; the plain normalized\npath may omit it.","source":"packages/client/src/types.ts","line":123,"href":"/reference/typescript/normalized/#symbol-NormalizedEvent"},{"name":"NormalizedOp","originalName":"NormalizedOp","kind":"TypeAliasDeclaration","signature":"/**\n * A table-tagged, path-free row delta — the **normalized** wire payload (the path-free twin\n * of {@link FlatChange}; NORMALIZED-CHANGES-DESIGN.md §3). Rows are positional (bare cells; a\n * json column is its raw JSON string). `op` is the discriminant. Lives here (not in\n * `@rindle/normalized`) so both the protocol (`@rindle/remote`) and the sync layer share one type.\n */\nexport type NormalizedOp = {\n    table: string;\n    op: \"add\";\n    row: WireValue[];\n} | {\n    table: string;\n    op: \"remove\";\n    row: WireValue[];\n} | {\n    table: string;\n    op: \"edit\";\n    old: WireValue[];\n    new: WireValue[];\n};","description":"A table-tagged, path-free row delta — the **normalized** wire payload (the path-free twin\nof {@link FlatChange}; NORMALIZED-CHANGES-DESIGN.md §3). Rows are positional (bare cells; a\njson column is its raw JSON string). `op` is the discriminant. Lives here (not in\n`@rindle/normalized`) so both the protocol (`@rindle/remote`) and the sync layer share one type.","source":"packages/client/src/types.ts","line":100,"href":"/reference/typescript/normalized/#symbol-NormalizedOp"},{"name":"NormalizedSource","originalName":"NormalizedSource","kind":"InterfaceDeclaration","signature":"/**\n * The server side of the **normalized** local-first path (NORMALIZED-CHANGES-DESIGN.md §5/§7):\n * registers queries and pushes each one's normalized footprint stream ({@link NormalizedEvent}s).\n * Both the in-process native (`@rindle/replica`) source and the ws (`@rindle/remote`\n * `RemoteNormalizedSource`) implement it; `@rindle/normalized`'s `NormalizedBackend` consumes one,\n * never knowing which — a sibling seam of {@link Backend} for the normalized composition.\n */\nexport interface NormalizedSource {\n    registerQuery(queryId: QueryId, remote: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Send base-table writes to the server; the authoritative stream flows back. */\n    mutate(mutations: Mutation[]): Promise<void>;\n    onNormalized(handler: (queryId: QueryId, event: NormalizedEvent) => void): void;\n    /** Optional: the backend hands its OWN typed per-table schemas so the source can validate\n     *  each server `hello` against them (column order / PK by name) and reject a schema skew\n     *  rather than silently transposing positional cells (CRIT#4 / §3 \"drift ⇒ re-subscribe\").\n     *  Sources that can't skew (the in-process native source) may omit it. */\n    expectClientSchema?(tables: NormalizedTableSchema[]): void;\n}","description":"The server side of the **normalized** local-first path (NORMALIZED-CHANGES-DESIGN.md §5/§7):\nregisters queries and pushes each one's normalized footprint stream ({@link NormalizedEvent}s).\nBoth the in-process native (`@rindle/replica`) source and the ws (`@rindle/remote`\n`RemoteNormalizedSource`) implement it; `@rindle/normalized`'s `NormalizedBackend` consumes one,\nnever knowing which — a sibling seam of {@link Backend} for the normalized composition.","source":"packages/client/src/types.ts","line":221,"href":"/reference/typescript/normalized/#symbol-NormalizedSource"},{"name":"NormalizedSync","originalName":"NormalizedSync","kind":"ClassDeclaration","signature":"export declare class NormalizedSync {\n    private readonly pkCols;\n    /** Per-table full width, for scattering projected rows. Empty ⇒ projection unsupported\n     *  (every query must be `'*'`), which is the pre-projection behavior. */\n    private readonly colCounts;\n    /** `(table, pk)` key → the one shared base entry. */\n    private readonly base;\n    /** queryId → the set of `(table, pk)` keys that query currently footprints. */\n    private readonly qfoot;\n    /** queryId → (table → the base ColIds it contributes for that table, in the order its wire\n     *  rows are positional against — its `required_cols` for the table, §4.1). A query spans\n     *  multiple base tables (root + related/EXISTS children), each projected independently; a\n     *  table absent from the inner map ⇒ that query syncs it `'*'` (all columns, full width). */\n    private readonly qcols;\n    constructor(pkCols: PkCols, colCounts?: ColCounts);\n    /**\n     * Register a query's projection for one base table (PROJECTION-SUPPORT-DESIGN.md §4.1): the\n     * base ColIds it contributes for `table`, in the order that table's wire rows are positional\n     * against. Omit a table (or never call) for a `'*'` table — it then contributes every column\n     * and its rows are full width. Must be called before the query's first batch.\n     *\n     * A `cols[i] < 0` entry is a DROP sentinel: wire column `i` is an EXPANDED server column the\n     * client doesn't have (the server side of an `expand-then-contract` migration), so its cell is\n     * discarded rather than scattered. The query still contributes only its real (`>= 0`) ColIds.\n     */\n    registerProjection(queryId: QueryId, table: string, cols: number[]): void;\n    /**\n     * Drop a query's projection for one table, reverting it to `'*'` (full presence, rows scattered\n     * verbatim). The inverse of {@link registerProjection}; a no-op if none was registered. Needed\n     * because `qcols` persists across re-hydrate epochs: if a live subscription's hello narrows from\n     * an EXPANDED layout (a `-1`-bearing map) back to an exact full-width one, the stale map must be\n     * cleared or it would mis-scatter the now-exact rows. A no-op for an unprojected (`'*'`) table.\n     */\n    unregisterProjection(queryId: QueryId, table: string): void;\n    /**\n     * Register a table's primary-key columns after construction — for a **synthetic aggregate\n     * table** (`AGGREGATE-SYNC-DESIGN.md` §3.3): a relationship `count` is synced as a\n     * server-authoritative `__agg_*` base table that is not in the client's typed schema, so\n     * the backend registers it here (and on the local engine) as queries that use it arrive.\n     * Idempotent — re-registering the same table (a second query over the same aggregate)\n     * is a no-op. Once registered, its rows refcount/GC exactly like any base table.\n     */\n    registerTable(table: string, primaryKey: number[]): void;\n    /**\n     * The inverse of {@link registerTable} for a synthetic aggregate table whose last\n     * referencing query is gone (`AGGREGATE-SYNC-DESIGN.md` §4): drop its primary-key\n     * registration so the table is unknown again. A balanced stream has already GC'd its rows\n     * at the `1→0` transition (via {@link dropQuery}); defensively this also sweeps any residual\n     * base rows + per-query footprint entries for the table, so a later re-registration of the\n     * same name starts clean. A no-op for an unregistered table.\n     */\n    unregisterTable(table: string): void;\n    /**\n     * Apply one query's normalized batch (its hydrate snapshot or one transaction's ops) and\n     * return the NET base-table mutations to commit to the wasm `Db` in a single transaction.\n     * Cross-query refcount + per-query dedup + column union (§4, §5):\n     * - `add`: counted into this query's footprint once; on the base `0→1` transition the row\n     *   enters at this query's projection; on a `1→N` transition the query's columns are merged\n     *   into the shared union (widen) and an `edit` is forwarded if the union changed.\n     * - `remove`: on the base `N→0` transition the row leaves; on `N→M>0` the union is recomputed\n     *   from the remaining queries and an `edit` narrows the shared row.\n     * - `edit`: column-merge this query's cells into the shared union; forward once (idempotent\n     *   across queries — same source row, same values).\n     */\n    applyBatch(queryId: QueryId, ops: NormalizedOp[]): Mutation[];\n    /**\n     * Re-hydrate one query under a new epoch (§5.3): the server re-sent `queryId`'s whole\n     * footprint as seq-0 `add`s. Diff the new footprint against the query's current one —\n     * rows only in the old set leave (refcount out, GC/narrow), rows only in the new set enter\n     * (refcount in / widen), and an intersecting row whose value changed during the gap is an\n     * edit. Only `queryId`'s references move; other queries' counts are untouched. Returns the\n     * net mutations to commit.\n     */\n    rehydrate(queryId: QueryId, snapshot: NormalizedOp[]): Mutation[];\n    /**\n     * Drop a query (§5.1): decrement its footprint's refcounts, GC each row at the last\n     * reference (or narrow the union if others remain), and forget the query. `O(footprint)`,\n     * no per-row scan. Returns the net mutations. (The caller also tells the server to\n     * deregister the stream.)\n     */\n    dropQuery(queryId: QueryId): Mutation[];\n    /** The number of distinct base rows currently synced into the local store. */\n    baseSize(): number;\n    /** How many queries currently reference `(table, row)` (0 if absent). The lookup keys by PK,\n     *  so a projected `row` need only carry its PK columns at the base positions. */\n    refCount(table: string, row: UnionCell[]): number;\n    /**\n     * The synced (server-authoritative) row currently held for `(table, pkCells)`, or\n     * `undefined` if no query references it. `pkCells` are the primary-key cells in\n     * `primaryKey` order (NOT a full row) — the same key the cross-query refcount uses.\n     *\n     * The optimistic aggregate overlay (`AGGREGATE-SYNC-DESIGN.md` §4) reads the server's\n     * `__agg` count cell through this so it can compute `displayed = server_base ⊕ delta`\n     * from the authoritative base rather than re-deriving it from the local engine's head\n     * (which already carries the optimistic layer — a torn read).\n     */\n    baseRow(table: string, pkCells: WireValue[]): (WireValue | undefined)[] | undefined;\n    private footOf;\n    /** Scatter a query's (possibly narrower) wire row for `table` into the shared full-width\n     *  positional layout. No registered projection for `(queryId, table)` ⇒ a `'*'` table whose\n     *  row is already full width (returned as-is). Otherwise allocate a full-width row of\n     *  `ABSENT` and place `row[i]` at `cols[i]`. */\n    private scatter;\n    /** Column-merge `incoming`'s present cells over `e.row` (a widen / pure-value change) and\n     *  forward a single `edit` if the union changed. Both rows are full width. */\n    private mergeInto;\n    private add;\n    private remove;\n    private removeKey;\n    private edit;\n    /** The columns present on a `table` row footprinted by `queries`: the union of their\n     *  projections for that table. `null` ⇒ all columns present (some referencing query syncs\n     *  the table `'*'`), so the row is full. */\n    private presentCols;\n    private key;\n}","description":"","source":"packages/normalized/src/sync.ts","line":78,"href":"/reference/typescript/normalized/#symbol-NormalizedSync"},{"name":"NormalizedTableSchema","originalName":"NormalizedTableSchema","kind":"InterfaceDeclaration","signature":"/** One base table's flat schema on the normalized `hello` (§3): column names (in order) +\n *  primary-key column indices. Wire rows are positional against `columns`. */\nexport interface NormalizedTableSchema {\n    name: string;\n    columns: string[];\n    primaryKey: number[];\n}","description":"One base table's flat schema on the normalized `hello` (§3): column names (in order) +\nprimary-key column indices. Wire rows are positional against `columns`.","source":"packages/client/src/types.ts","line":107,"href":"/reference/typescript/normalized/#symbol-NormalizedTableSchema"},{"name":"PkCols","originalName":"PkCols","kind":"TypeAliasDeclaration","signature":"/** Per-table primary-key column indices (into a positional row) — how `(table, pk)` is keyed. */\nexport type PkCols = Record<string, number[]>;","description":"Per-table primary-key column indices (into a positional row) — how `(table, pk)` is keyed.","source":"packages/normalized/src/sync.ts","line":43,"href":"/reference/typescript/normalized/#symbol-PkCols"},{"name":"rewriteAggregates","originalName":"rewriteAggregates","kind":"FunctionDeclaration","signature":"/** Rewrite an AST for the LOCAL engine: each relationship `count` becomes a precomputed,\n *  source-backed singular relationship over its synthetic table — read the server's count\n *  with a plain join + the same scalar projection (`aggregatePrecomputed`), never a `reduce`\n *  (which would recount the already-aggregated rows). Non-aggregate relationships recurse\n *  (a nested aggregate is rewritten too); the parent's frame is otherwise untouched, so the\n *  view-schema slot order is preserved. Returns a new AST; the input is not mutated.\n *\n *  The `where` tree is rewritten the SAME way (`PARENT-AGGREGATE-FILTER-DESIGN.md` §3): a\n *  `having_count` parent gate lowers to an EXISTS whose subquery CLONES the display `count_as`\n *  and adds a post-aggregation `HAVING`. That is a relationship `count` like any other, so §3's\n *  premise — the client never recomputes a count, it lacks the child rows — applies to it too;\n *  left un-rewritten the gate would reduce over child rows the server (rightly) does not sync\n *  and every parent would fail it. `agg_table_name` hashes neither `alias` nor `having`, so the\n *  gate resolves to the SAME `__agg_*` table the display `count_as` already registers and syncs:\n *  the rewrite costs no extra table, no extra rows, and reads a count the server already sent.\n *  Its counterpart is the server pruning the gate's witnesses from the footprint (Rust\n *  `table_tree`) — that prune is only sound BECAUSE of this rewrite, so ship this side first. */\nexport declare function rewriteAggregates(ast: Ast, isLocal?: (table: string) => boolean): Ast;","description":"Rewrite an AST for the LOCAL engine: each relationship `count` becomes a precomputed,\nsource-backed singular relationship over its synthetic table — read the server's count\nwith a plain join + the same scalar projection (`aggregatePrecomputed`), never a `reduce`\n(which would recount the already-aggregated rows). Non-aggregate relationships recurse\n(a nested aggregate is rewritten too); the parent's frame is otherwise untouched, so the\nview-schema slot order is preserved. Returns a new AST; the input is not mutated.\n\nThe `where` tree is rewritten the SAME way (`PARENT-AGGREGATE-FILTER-DESIGN.md` §3): a\n`having_count` parent gate lowers to an EXISTS whose subquery CLONES the display `count_as`\nand adds a post-aggregation `HAVING`. That is a relationship `count` like any other, so §3's\npremise — the client never recomputes a count, it lacks the child rows — applies to it too;\nleft un-rewritten the gate would reduce over child rows the server (rightly) does not sync\nand every parent would fail it. `agg_table_name` hashes neither `alias` nor `having`, so the\ngate resolves to the SAME `__agg_*` table the display `count_as` already registers and syncs:\nthe rewrite costs no extra table, no extra rows, and reads a count the server already sent.\nIts counterpart is the server pruning the gate's witnesses from the footprint (Rust\n`table_tree`) — that prune is only sound BECAUSE of this rewrite, so ship this side first.","source":"packages/normalized/src/agg-table.ts","line":259,"href":"/reference/typescript/normalized/#symbol-rewriteAggregates"}]},{"name":"@rindle/optimistic","source":"packages/optimistic/src/index.ts","package":"@rindle/optimistic","symbols":[{"name":"attachLocalPersistence","originalName":"attachLocalPersistence","kind":"FunctionDeclaration","signature":"/** Attach the persistence layer to a backend (standalone form — `createRindleClient` calls this\n *  for you). The observer is wired SYNCHRONOUSLY, but the mirror starts empty: attach before the\n *  first `writeLocal` (§5.2, a v1 constraint `createRindleClient` satisfies by construction).\n *  Await `handle.ready` before first render if the app wants restored rows at first paint. */\nexport declare function attachLocalPersistence<S extends ColsMap>(backend: OptimisticBackend<S>, schema: Schema<S>, opts: PersistLocalOptions): LocalPersistence;","description":"Attach the persistence layer to a backend (standalone form — `createRindleClient` calls this\nfor you). The observer is wired SYNCHRONOUSLY, but the mirror starts empty: attach before the\nfirst `writeLocal` (§5.2, a v1 constraint `createRindleClient` satisfies by construction).\nAwait `handle.ready` before first render if the app wants restored rows at first paint.","source":"packages/optimistic/src/local-persist.ts","line":74,"href":"/reference/typescript/optimistic/#symbol-attachLocalPersistence"},{"name":"ClientMutator","originalName":"ClientMutator","kind":"TypeAliasDeclaration","signature":"/** A client mutator: optimistic, deterministic, replayable — a pure function of `(base, args)` (§5:\n *  no clock, no randomness; it is RE-INVOKED on every rebase). Either shape is accepted:\n *  - a plain synchronous function `(tx, args) => void` (client-only), OR\n *  - a shared GENERATOR `(tx, args, ctx) => MutationGen` (the isomorphic form: the SAME body the API\n *    server runs against a live async transaction — MUTATORS-ISOMORPHIC). The driver detects which. */\nexport type ClientMutator = ((tx: MutationTx, args: never) => void) | ((tx: IsoTx, args: never, ctx: MutatorCtx) => MutationGen);","description":"A client mutator: optimistic, deterministic, replayable — a pure function of `(base, args)` (§5:\nno clock, no randomness; it is RE-INVOKED on every rebase). Either shape is accepted:\n- a plain synchronous function `(tx, args) => void` (client-only), OR\n- a shared GENERATOR `(tx, args, ctx) => MutationGen` (the isomorphic form: the SAME body the API\n  server runs against a live async transaction — MUTATORS-ISOMORPHIC). The driver detects which.","source":"packages/optimistic/src/backend.ts","line":155,"href":"/reference/typescript/optimistic/#symbol-ClientMutator"},{"name":"ClientRegistry","originalName":"ClientRegistry","kind":"TypeAliasDeclaration","signature":"/** The client registry (§4.2) — one of the two registries; the server's authoritative\n *  twin shares names (and possibly code), never the wire. */\nexport type ClientRegistry = Record<string, ClientMutator>;","description":"The client registry (§4.2) — one of the two registries; the server's authoritative\ntwin shares names (and possibly code), never the wire.","source":"packages/optimistic/src/backend.ts","line":161,"href":"/reference/typescript/optimistic/#symbol-ClientRegistry"},{"name":"createOptimisticStore","originalName":"createOptimisticStore","kind":"FunctionDeclaration","signature":"/** A {@link Store} over an {@link OptimisticBackend}, plus the named-mutator entry\n *  (`mutate.createIssue(args)` — the §9 dream shape) and the §6 lifecycle surface. */\nexport declare function createOptimisticStore<S extends ColsMap, R extends ClientRegistry>(schema: Schema<S>, source: OptimisticSource, registry: R, opts: OptimisticBackendOptions): {\n    store: Store<S>;\n    backend: OptimisticBackend<S>;\n    mutate: {\n        [K in keyof R]: MutateFn<Parameters<R[K]>[1]>;\n    };\n};","description":"A {@link Store} over an {@link OptimisticBackend}, plus the named-mutator entry\n(`mutate.createIssue(args)` — the §9 dream shape) and the §6 lifecycle surface.","source":"packages/optimistic/src/index.ts","line":107,"href":"/reference/typescript/optimistic/#symbol-createOptimisticStore"},{"name":"createRindleClient","originalName":"createRindleClient","kind":"FunctionDeclaration","signature":"/** Create a synced application client over the local WASM engine. Connects named query leases,\n *  WebSocket subscriptions, and the optimistic mutation queue to the application's API routes.\n *  Await construction before using the store; when configured, it awaits the local-table restore\n *  attempt as well. Construction does not mean remote queries are synchronized: retain queries\n *  or use `ensure` for the required readiness boundary.\n *\n *  Keep one client per application session. Call `close()` when the session ends, and create a\n *  new client when its authenticated principal changes. The application server owns authorization.\n */\nexport declare function createRindleClient<S extends ColsMap, R extends ClientRegistry>(opts: RindleClientOptions<S, R>): Promise<RindleClient<S, R>>;","description":"Create a synced application client over the local WASM engine. Connects named query leases,\nWebSocket subscriptions, and the optimistic mutation queue to the application's API routes.\nAwait construction before using the store; when configured, it awaits the local-table restore\nattempt as well. Construction does not mean remote queries are synchronized: retain queries\nor use `ensure` for the required readiness boundary.\n\nKeep one client per application session. Call `close()` when the session ends, and create a\nnew client when its authenticated principal changes. The application server owns authorization.","source":"packages/optimistic/src/client.ts","line":345,"href":"/reference/typescript/optimistic/#symbol-createRindleClient"},{"name":"deleteLocalPersistence","originalName":"deleteLocalPersistence","kind":"FunctionDeclaration","signature":"/** Delete a user's local-persistence database — the sanctioned LOGOUT hook (§3.2). Never called\n *  implicitly; the old database otherwise remains on disk (fast re-login, and a privacy decision\n *  the app owns). Close this tab's live client for `user` first; a SIBLING tab's connection is\n *  released automatically (it closes on `versionchange` and degrades to broadcast-only), so a\n *  multi-tab logout completes instead of parking behind the other tab forever. */\nexport declare function deleteLocalPersistence(user: string, env?: PersistEnv): Promise<void>;","description":"Delete a user's local-persistence database — the sanctioned LOGOUT hook (§3.2). Never called\nimplicitly; the old database otherwise remains on disk (fast re-login, and a privacy decision\nthe app owns). Close this tab's live client for `user` first; a SIBLING tab's connection is\nreleased automatically (it closes on `versionchange` and degrades to broadcast-only), so a\nmulti-tab logout completes instead of parking behind the other tab forever.","source":"packages/optimistic/src/local-persist.ts","line":66,"href":"/reference/typescript/optimistic/#symbol-deleteLocalPersistence"},{"name":"DowngradeStuckEvent","originalName":"DowngradeStuckEvent","kind":"InterfaceDeclaration","signature":"/** The I-v stuck-downgrade event ({@link OptimisticBackend.onDowngradeStuck}): the ghost's fence\n *  is satisfied but these SENT room-domain mids never resolved (an entry that never reached the\n *  room — sent-but-undelivered when the socket died — is undecidable in general, §7.5). The ghost\n *  HOLDS (fail LOUD, never silent; no timeout-retire is invented) and the mids are surfaced once,\n *  actionably. */\nexport interface DowngradeStuckEvent {\n    sourceKey: string;\n    doc: string;\n    mids: number[];\n}","description":"The I-v stuck-downgrade event ({@link OptimisticBackend.onDowngradeStuck}): the ghost's fence\nis satisfied but these SENT room-domain mids never resolved (an entry that never reached the\nroom — sent-but-undelivered when the socket died — is undecidable in general, §7.5). The ghost\nHOLDS (fail LOUD, never silent; no timeout-retire is invented) and the mids are surfaced once,\nactionably.","source":"packages/optimistic/src/backend.ts","line":419,"href":"/reference/typescript/optimistic/#symbol-DowngradeStuckEvent"},{"name":"EnsureQueryOptions","originalName":"EnsureQueryOptions","kind":"InterfaceDeclaration","signature":"export interface EnsureQueryOptions {\n    /** Readiness policy. Defaults to `complete`. */\n    until?: EnsureQueryUntil;\n    /** Cancel this caller's wait. The shared query may stay retained for another waiter/prefetch. */\n    signal?: AbortSignal;\n}","description":"","source":"packages/client/src/ensure.ts","line":22,"href":"/reference/typescript/optimistic/#symbol-EnsureQueryOptions"},{"name":"EnsureQueryUntil","originalName":"EnsureQueryUntil","kind":"TypeAliasDeclaration","signature":"/** When an {@link QueryEnsureCache.ensure} call may resolve.\n *\n * - `complete` waits for the server-authoritative result (the default).\n * - `present` resolves as soon as the local view contains a result, while the remote retain keeps\n *   revalidating in the background. An authoritative empty result also resolves it, so a real\n *   not-found query never waits forever.\n *\n * `present` deliberately does not add a `partial` {@link ResultType}: a locally useful answer and\n * server authority are independent facts. While it resolves early, the view's result type remains\n * `unknown` until the server says otherwise. */\nexport type EnsureQueryUntil = \"complete\" | \"present\";","description":"When an {@link QueryEnsureCache.ensure} call may resolve.\n\n- `complete` waits for the server-authoritative result (the default).\n- `present` resolves as soon as the local view contains a result, while the remote retain keeps\n revalidating in the background. An authoritative empty result also resolves it, so a real\n not-found query never waits forever.\n\n`present` deliberately does not add a `partial` {@link ResultType}: a locally useful answer and\nserver authority are independent facts. While it resolves early, the view's result type remains\n`unknown` until the server says otherwise.","source":"packages/client/src/ensure.ts","line":20,"href":"/reference/typescript/optimistic/#symbol-EnsureQueryUntil"},{"name":"FoldClock","originalName":"FoldClock","kind":"InterfaceDeclaration","signature":"/** A virtual-clock seam for fold debounce timers and elapsed-time checks (FOLDED-MUTATIONS-DESIGN §9): the\n *  oracle injects a deterministic scheduler; production defaults to real timers + `Date.now`. */\nexport interface FoldClock {\n    setTimeout(cb: () => void, ms: number): unknown;\n    clearTimeout(handle: unknown): void;\n    now(): number;\n}","description":"A virtual-clock seam for fold debounce timers and elapsed-time checks (FOLDED-MUTATIONS-DESIGN §9): the\noracle injects a deterministic scheduler; production defaults to real timers + `Date.now`.","source":"packages/optimistic/src/backend.ts","line":290,"href":"/reference/typescript/optimistic/#symbol-FoldClock"},{"name":"FoldHandle","originalName":"FoldHandle","kind":"InterfaceDeclaration","signature":"/** A folded mutation window. `flush()` assigns its mutation ID and queues the latest arguments\n *  for delivery. `mid` resolves with that ID at flush; it does not wait for server acceptance\n *  or confirming-stream progress. Each call in the same window shares this promise. */\nexport interface FoldHandle {\n    flush(): void;\n    readonly mid: Promise<number>;\n}","description":"A folded mutation window. `flush()` assigns its mutation ID and queues the latest arguments\nfor delivery. `mid` resolves with that ID at flush; it does not wait for server acceptance\nor confirming-stream progress. Each call in the same window shares this promise.","source":"packages/optimistic/src/backend.ts","line":320,"href":"/reference/typescript/optimistic/#symbol-FoldHandle"},{"name":"FoldInspect","originalName":"FoldInspect","kind":"InterfaceDeclaration","signature":"/** One folded entry's debounce window, for the timeline's fold drill-down (§4.1). */\nexport interface FoldInspect {\n    /** The fold key (`${name}\\0${identityJSON}`) collapsing same-key invokes into one entry. */\n    foldKey: string;\n    debounceMs: number;\n    maxWaitMs?: number;\n    deferAcrossWrites: boolean;\n    /** Whether the window has flushed (a real `mid` was dealt); an un-flushed fold has `mid == null`. */\n    flushed: boolean;\n}","description":"One folded entry's debounce window, for the timeline's fold drill-down (§4.1).","source":"packages/optimistic/src/backend.ts","line":464,"href":"/reference/typescript/optimistic/#symbol-FoldInspect"},{"name":"FoldOptions","originalName":"FoldOptions","kind":"InterfaceDeclaration","signature":"/** Options for a folded call site (FOLDED-MUTATIONS-DESIGN §3). `key` is the identity half of the\n *  fold key (combined with the mutator name); the rest tune the debounce policy. */\nexport interface FoldOptions {\n    /** The identity half of the fold key (typically the targeted primary key). Required. */\n    key: unknown;\n    /** Trailing debounce: the flush fires this long after the LAST invoke for `key`. Default 120ms. */\n    debounceMs?: number;\n    /** Elapsed-time threshold checked on each invocation. Once reached, that invocation flushes\n     *  immediately. This does not arm a separate timer: without another invocation, the trailing\n     *  debounce still controls the flush. Omit to use only the trailing debounce. */\n    maxWaitMs?: number;\n    /** For a declared room route, use this value for both `debounceMs` and `maxWaitMs`.\n     *  The domain policy selects the route on the window's first invocation; it stays fixed\n     *  for that window. `0` flushes each invocation. Omit to use the ordinary fold options.\n     *  This does not detect collaborators or infer a route from the writes. */\n    roomDebounceMs?: number;\n    /** Keep deferring across overlapping non-fold writes for maximum economy, accepting the §4.2\n     *  read-dependent reorder snap. Default `false` (flush-on-enqueue — correct-and-boring). */\n    deferAcrossWrites?: boolean;\n}","description":"Options for a folded call site (FOLDED-MUTATIONS-DESIGN §3). `key` is the identity half of the\nfold key (combined with the mutator name); the rest tune the debounce policy.","source":"packages/optimistic/src/backend.ts","line":298,"href":"/reference/typescript/optimistic/#symbol-FoldOptions"},{"name":"isoTx","originalName":"isoTx","kind":"VariableDeclaration","signature":"/** The one shared effect factory (stateless — see {@link IsoTx}). Its methods just BUILD a\n *  {@link MutationOp}, so the single instance serves every schema; the generic {@link IsoTx} view is\n *  applied at the authoring site (a `json<T>` cell is a parsed object here and is stringified by the\n *  funnels, {@link toCell}), hence the cast — the runtime shape is schema-agnostic. */\nexport declare const isoTx: IsoTx;","description":"The one shared effect factory (stateless — see {@link IsoTx}). Its methods just BUILD a\n{@link MutationOp}, so the single instance serves every schema; the generic {@link IsoTx} view is\napplied at the authoring site (a `json<T>` cell is a parsed object here and is stringified by the\nfunnels, {@link toCell }), hence the cast — the runtime shape is schema-agnostic.","source":"packages/client/src/mutation-ops.ts","line":127,"href":"/reference/typescript/optimistic/#symbol-isoTx"},{"name":"IsoTx","originalName":"IsoTx","kind":"InterfaceDeclaration","signature":"/** The tier-AGNOSTIC effect factory a generator mutator writes against. Every method just BUILDS an\n *  effect to `yield` — it performs no I/O and holds no state, so the single {@link isoTx} instance is\n *  shared by every mutator on both tiers; only the driver differs. `insert`/`upsert`/`insertIgnore`\n *  require non-nullable columns and permit nullable omissions, which become `null`.\n *  `update`/`delete` require the PK columns; `update` also names the columns to change. */\nexport interface IsoTx<S extends ColsMap = ColsMap, P extends Record<string, string> = PkMap<S>> {\n    /** Insert a row. Omitted nullable columns become `null`; database defaults are not applied. */\n    insert<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Update the row identified by its pk columns (REQUIRED); only the named non-pk columns change. */\n    update<N extends keyof S & string>(table: N, row: UpdateOf<S[N], PkColsOf<S, P, N>>): MutationOp;\n    /** Insert, or replace non-PK columns on PK conflict, with {@link IsoTx.insert}'s omission rules. */\n    upsert<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Insert with {@link IsoTx.insert}'s omission rules, or do nothing on PK conflict. */\n    insertIgnore<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Delete the row identified by its pk columns. */\n    delete<N extends keyof S & string>(table: N, pk: PkOf<S[N], PkColsOf<S, P, N>>): MutationOp;\n    /** Read one row by primary key (read-your-writes). */\n    row<N extends keyof S & string>(table: N, pk: PkOf<S[N], PkColsOf<S, P, N>>): ReadEffect;\n    /** Run a full query (`where`/`orderBy`/`limit`/join) over the state this mutator is mutating —\n     *  read-your-writes, like {@link row} but for arbitrary shapes. Pass a query from the tier-agnostic\n     *  builder, e.g. `tx.query(q.issue.where(\"ownerId\", \"=\", ctx.user))` where `q = newQueryBuilder(schema)`.\n     *  The `yield` evaluates to {@link QueryResultRow}`[]` (cast it — the generator's single next-type is a row). */\n    query(query: QueryArg): QueryEffect;\n    all(effects: readonly YieldEffect[]): BatchEffect;\n}","description":"The tier-AGNOSTIC effect factory a generator mutator writes against. Every method just BUILDS an\neffect to `yield` — it performs no I/O and holds no state, so the single {@link isoTx} instance is\nshared by every mutator on both tiers; only the driver differs. `insert`/`upsert`/`insertIgnore`\nrequire non-nullable columns and permit nullable omissions, which become `null`.\n`update`/`delete` require the PK columns; `update` also names the columns to change.","source":"packages/client/src/mutation-ops.ts","line":102,"href":"/reference/typescript/optimistic/#symbol-IsoTx"},{"name":"KeyedRow","originalName":"KeyedRow","kind":"TypeAliasDeclaration","signature":"/** A keyed row: column name → cell. The ergonomic write shape (validated against the schema at\n *  runtime). JSON columns carry their raw JSON string (a {@link WireValue}), never a parsed object. */\nexport type KeyedRow = Record<string, WireValue>;","description":"A keyed row: column name → cell. The ergonomic write shape (validated against the schema at\nruntime). JSON columns carry their raw JSON string (a {@link WireValue}), never a parsed object.","source":"packages/client/src/mutation-ops.ts","line":13,"href":"/reference/typescript/optimistic/#symbol-KeyedRow"},{"name":"LIFECYCLE_QUERY_NAME","originalName":"LIFECYCLE_QUERY_NAME","kind":"VariableDeclaration","signature":"/** The reserved name system retains subscribe under (never an app query — see the module doc).\n *  Its `args` carry the {@link SystemStreamSpec} identity fields PLUS the parent labeled query's\n *  `(name, args)`, so a RE-resolution (reconnect / gate overflow) can re-lease the parent and pick\n *  the matching lifecycle entry — renewal-as-reauthorization, the room-token precedent. */\nexport declare const LIFECYCLE_QUERY_NAME = \"_rindle/lifecycle\";","description":"The reserved name system retains subscribe under (never an app query — see the module doc).\nIts `args` carry the {@link SystemStreamSpec} identity fields PLUS the parent labeled query's\n`(name, args)`, so a RE-resolution (reconnect / gate overflow) can re-lease the parent and pick\nthe matching lifecycle entry — renewal-as-reauthorization, the room-token precedent.","source":"packages/optimistic/src/system-streams.ts","line":97,"href":"/reference/typescript/optimistic/#symbol-LIFECYCLE_QUERY_NAME"},{"name":"LIFECYCLE_TABLE_SCHEMAS","originalName":"LIFECYCLE_TABLE_SCHEMAS","kind":"VariableDeclaration","signature":"export declare const LIFECYCLE_TABLE_SCHEMAS: readonly NormalizedTableSchema[];","description":"","source":"packages/optimistic/src/system-streams.ts","line":65,"href":"/reference/typescript/optimistic/#symbol-LIFECYCLE_TABLE_SCHEMAS"},{"name":"LifecycleLeaseBlock","originalName":"LifecycleLeaseBlock","kind":"InterfaceDeclaration","signature":"/** The §4 lifecycle block on a query lease (mirror of the api-server's `QueryLeaseLifecycle`):\n *  `doorbell` on every labeled lease under the opt-in server config, `fence` (watermark + ledger\n *  + outcomes) only when the lease is ALSO room-served. Absent ⇒ this client behaves exactly as\n *  today — the whole plane is inert-until-fed. */\nexport interface LifecycleLeaseBlock {\n    doorbell: LifecycleLeaseEntry;\n    fence?: LifecycleLeaseEntry[];\n}","description":"The §4 lifecycle block on a query lease (mirror of the api-server's `QueryLeaseLifecycle`):\n`doorbell` on every labeled lease under the opt-in server config, `fence` (watermark + ledger\n+ outcomes) only when the lease is ALSO room-served. Absent ⇒ this client behaves exactly as\ntoday — the whole plane is inert-until-fed.","source":"packages/optimistic/src/client.ts","line":119,"href":"/reference/typescript/optimistic/#symbol-LifecycleLeaseBlock"},{"name":"LifecycleLeaseEntry","originalName":"LifecycleLeaseEntry","kind":"InterfaceDeclaration","signature":"/** One minted SYSTEM-STREAM lease on the `lifecycle` block (mirror of the api-server's\n *  `QueryLeaseLifecycleLease`; Slice I-iii): an ordinary daemon materialization over one of the\n *  four `_rindle_*` lifecycle tables, presented on the wire exactly like the primary lease\n *  (subscribe-with-`leaseToken`). The identity fields document the minted predicate — this client\n *  keys its retains (idempotence per (table, scope/doc/clientId)) and the backend keys its\n *  release-time row filters on them. */\nexport interface LifecycleLeaseEntry {\n    table: string;\n    leaseToken: string;\n    wsEndpoint?: string;\n    /** DOORBELL only: the §4.1 occupancy scope (= the wire room doc, `\"<profile>/<key>\"`). */\n    scope?: string;\n    /** FENCE entries only: the room doc. */\n    doc?: string;\n    /** FENCE ledger/outcomes when the server could client-scope the predicate. */\n    clientId?: string;\n}","description":"One minted SYSTEM-STREAM lease on the `lifecycle` block (mirror of the api-server's\n`QueryLeaseLifecycleLease`; Slice I-iii): an ordinary daemon materialization over one of the\nfour `_rindle_*` lifecycle tables, presented on the wire exactly like the primary lease\n(subscribe-with-`leaseToken`). The identity fields document the minted predicate — this client\nkeys its retains (idempotence per (table, scope/doc/clientId)) and the backend keys its\nrelease-time row filters on them.","source":"packages/optimistic/src/client.ts","line":103,"href":"/reference/typescript/optimistic/#symbol-LifecycleLeaseEntry"},{"name":"LocalPersistence","originalName":"LocalPersistence","kind":"InterfaceDeclaration","signature":"/** The attached layer's handle. `createRindleClient` awaits {@link ready} before returning (§5.2). */\nexport interface LocalPersistence {\n    /** Resolves after the initial restore attempt. It can resolve in a degraded mode when browser\n     *  storage is unavailable or an operation fails; it is not a durability guarantee. */\n    readonly ready: Promise<void>;\n    /** Best-effort final persist/forward (the `pagehide` hook, §9): re-posts unacked ops (any\n     *  role), then a leader drains its persist queue and retries P9-degraded batches. */\n    flush(): Promise<void>;\n    /** Release leadership (or abandon the queued lock request), close the channel + IDB (P10).\n     *  A leader DRAINS its queued persist steps first (they carry already-committed writes) and\n     *  releases the lock only after the last one lands; a follower re-posts its unacked ops. */\n    close(): void;\n    /** Introspection for tests/devtools: current role. */\n    role(): \"leader\" | \"follower\";\n}","description":"The attached layer's handle. `createRindleClient` awaits {@link ready} before returning (§5.2).","source":"packages/optimistic/src/local-persist.ts","line":46,"href":"/reference/typescript/optimistic/#symbol-LocalPersistence"},{"name":"MutateFn","originalName":"MutateFn","kind":"TypeAliasDeclaration","signature":"/** One entry of the {@link createOptimisticStore} `mutate` facade: call it for a normal optimistic\n *  write (returns the `mid`), or `.folded(opts, args)` for a debounced, last-value-wins folded write\n *  (returns a {@link FoldHandle} — the `mid` is assigned at flush, FOLDED-MUTATIONS-DESIGN §3). */\nexport type MutateFn<Args> = ((args: Args) => number) & {\n    folded(opts: FoldOptions, args: Args): FoldHandle;\n};","description":"One entry of the {@link createOptimisticStore} `mutate` facade: call it for a normal optimistic\nwrite (returns the `mid`), or `.folded(opts, args)` for a debounced, last-value-wins folded write\n(returns a {@link FoldHandle} — the `mid` is assigned at flush, FOLDED-MUTATIONS-DESIGN §3).","source":"packages/optimistic/src/index.ts","line":20,"href":"/reference/typescript/optimistic/#symbol-MutateFn"},{"name":"MutationEnvelope","originalName":"MutationEnvelope","kind":"InterfaceDeclaration","signature":"/** The upstream named-mutator envelope (OPTIMISTIC-WRITES-DESIGN.md §8.1): the wire\n *  carries the name + JSON args, never code; `mid` totally orders a client's mutations. */\nexport interface MutationEnvelope {\n    clientID: string;\n    mid: number;\n    name: string;\n    args: unknown;\n}","description":"The upstream named-mutator envelope (OPTIMISTIC-WRITES-DESIGN.md §8.1): the wire\ncarries the name + JSON args, never code; `mid` totally orders a client's mutations.","source":"packages/client/src/types.ts","line":236,"href":"/reference/typescript/optimistic/#symbol-MutationEnvelope"},{"name":"MutationGen","originalName":"MutationGen","kind":"TypeAliasDeclaration","signature":"/** What a generator mutator IS: `yield tx.<op>()` on every side effect; a `yield tx.row()` expression\n *  evaluates to the row. Neither sync nor async — the tier's driver decides, which is what lets one\n *  body run synchronously on the client and against a live async transaction on the server. */\nexport type MutationGen = Generator<YieldEffect, void, KeyedRow | undefined>;","description":"What a generator mutator IS: `yield tx.<op>()` on every side effect; a `yield tx.row()` expression\nevaluates to the row. Neither sync nor async — the tier's driver decides, which is what lets one\nbody run synchronously on the client and against a live async transaction on the server.","source":"packages/client/src/mutation-ops.ts","line":148,"href":"/reference/typescript/optimistic/#symbol-MutationGen"},{"name":"MutationTx","originalName":"MutationTx","kind":"InterfaceDeclaration","signature":"/** The write handle a client mutator runs against (the client `MutationTx`, §4.2):\n *  reads see the current base + this transaction's own staged writes (§4.1).\n *\n *  Prefer the KEYED methods (`insert`/`update`/`upsert`/`delete`/`row`) — named columns,\n *  schema-checked. The positional methods (`get`/`add`/`remove`/`edit`) are the raw wire\n *  shape: bare cells in schema column order, `pk` cells in `primaryKey` order. */\nexport interface MutationTx {\n    /** Read one row by primary key (e.g. `tx.row(\"issue\", { id: 1 })`). */\n    row(table: string, pk: KeyedRow): KeyedRow | undefined;\n    /** Insert a FULL row (every column named; missing or unknown columns throw). */\n    insert(table: string, row: KeyedRow): void;\n    /** Update the row identified by the pk columns; only the named non-pk columns change.\n     *  A missing row is a NO-OP (rebase-friendly: the row may have vanished upstream). */\n    update(table: string, row: KeyedRow): void;\n    /** Insert, or fully replace when the pk already exists (a FULL row, like `insert`). */\n    upsert(table: string, row: KeyedRow): void;\n    /** Insert a FULL row, or do nothing if the pk already exists (the isomorphic form of the classic\n     *  `if (!tx.row(pk)) tx.insert(row)` upsert-if-absent; renders `ON CONFLICT DO NOTHING` server-side). */\n    insertIgnore(table: string, row: KeyedRow): void;\n    /** Delete the row identified by the pk columns. A missing row is a NO-OP. */\n    delete(table: string, pk: KeyedRow): void;\n    /** Run a one-shot read query (`where`/`orderBy`/`limit`/join) over the state this\n     *  mutator is mutating — it sees this transaction's own writes-so-far, the same\n     *  read-your-writes contract as `get`/`row` (§4.1; 203-MUTATOR-READS-DESIGN.md §5.2).\n     *  Synchronous; returns the matching rows in the query's order, each with its materialized\n     *  relationship children nested by name (presented identically to a `view.data` row). Pass\n     *  a query from the typed builder, e.g. `tx.query(q.issue.where(\"owner\", \"=\", me))`.\n     *  Refused inside a FOLDED mutator (a reading mutator is non-absorbing, §9.1). */\n    query(query: QueryArg): QueryResultRow[];\n    get(table: string, pk: WireValue[]): WireValue[] | undefined;\n    add(table: string, row: WireValue[]): void;\n    remove(table: string, row: WireValue[]): void;\n    edit(table: string, oldRow: WireValue[], newRow: WireValue[]): void;\n}","description":"The write handle a client mutator runs against (the client `MutationTx`, §4.2):\nreads see the current base + this transaction's own staged writes (§4.1).\n\nPrefer the KEYED methods (`insert`/`update`/`upsert`/`delete`/`row`) — named columns,\nschema-checked. The positional methods (`get`/`add`/`remove`/`edit`) are the raw wire\nshape: bare cells in schema column order, `pk` cells in `primaryKey` order.","source":"packages/optimistic/src/backend.ts","line":119,"href":"/reference/typescript/optimistic/#symbol-MutationTx"},{"name":"MutatorCtx","originalName":"MutatorCtx","kind":"InterfaceDeclaration","signature":"/** The minimal per-invocation context a shared mutator sees on BOTH tiers: the acting principal. The\n *  server injects its AUTHENTICATED user; the client injects its local user. (The server's own\n *  `MutationContext` is a superset of this.) */\nexport interface MutatorCtx {\n    user: string;\n}","description":"The minimal per-invocation context a shared mutator sees on BOTH tiers: the acting principal. The\nserver injects its AUTHENTICATED user; the client injects its local user. (The server's own\n`MutationContext` is a superset of this.)","source":"packages/client/src/mutation-ops.ts","line":141,"href":"/reference/typescript/optimistic/#symbol-MutatorCtx"},{"name":"OptimisticBackend","originalName":"OptimisticBackend","kind":"ClassDeclaration","signature":"export declare class OptimisticBackend<S extends ColsMap> implements Backend {\n    private readonly local;\n    private readonly sync;\n    private readonly source;\n    private readonly registry;\n    private readonly clientID;\n    /** The acting principal provider for a shared mutator's `ctx.user` (§ shared mutators). */\n    private readonly user;\n    private readonly bufferCap;\n    /** Column order + pk indices per table, for the keyed `MutationTx` methods. */\n    private readonly specs;\n    /** Local-only table names (`201-LOCAL-ONLY-TABLES-DESIGN.md` §4). Drives: the agg-rewrite gate\n     *  (L1 — a local-child count stays a native reduce), the mutator guard (M1 — a replayable\n     *  mutator may not read/write one), and `writeLocal` (M2 — it accepts ONLY these). */\n    private readonly localTables;\n    /** Each table's full column count (union-row width) + column-name → base ColId — to learn a\n     *  projected query's per-table projection off its `hello` and register it with the sync layer,\n     *  so it scatters that query's narrower rows into the shared union (PROJECTION-SUPPORT-DESIGN\n     *  §5.2). Without this a projected query's short rows reach the wasm `Db` un-scattered and fail\n     *  its width check. */\n    private readonly colCounts;\n    private readonly colIndex;\n    /** Per-table pk column indices — held so `connectSource` can build a fresh per-source\n     *  `NormalizedSync` with the same layout the daemon's uses. */\n    private readonly pkCols;\n    /** The client's OWN typed per-table schemas + the reserved lmid table — the fixed base\n     *  of the expected-schema set (CRIT#4 validation). Synthetic agg tables are appended as\n     *  queries arrive (`ensureSyntheticTables`). */\n    private readonly clientTablesBase;\n    /** Synthetic aggregate tables (`__agg_*`) registered so far, by name (AGGREGATE-SYNC-DESIGN\n     *  §3.3). Per aggregate DEFINITION (not per query), so two queries over the same count\n     *  share one table. */\n    private readonly synthetic;\n    /** Synthetic table name → how many registered LOCAL queries reference it. A table is\n     *  materialized on the `0→1` transition and reclaimed (engine source + baseline + refcount\n     *  layer + overlay def) on `1→0` — so aggregate state is not permanent (§4). */\n    private readonly syntheticRefs;\n    /** Local qid → the synthetic tables it referenced at registration, to decrement on teardown. */\n    private readonly queryAggTables;\n    /** The optimistic aggregate overlay (§4–§6): the per-aggregate definitions + the per-group\n     *  pending delta `displayed = server_base ⊕ local_pending_delta` is applied from. */\n    private readonly overlay;\n    private handler;\n    private catchUpQids;\n    /** Newly-hydrated qids whose reconcile ACTUALLY emitted a (catch-up-stamped) batch — recorded by the\n     *  local-event forwarder alongside {@link catchUpQids}. After the reconcile, any newly-hydrated qid\n     *  NOT in here folded nothing (0 rows, or its result already present via a sibling → 0 net muts, or\n     *  the reconcile was skipped), so `onProgress` sends it an explicit empty catch-up — else its SSR\n     *  seed would never retire (the view freezes). Non-null only for the reconcile's duration. */\n    private catchUpEmitted;\n    /** The Store's commit-boundary handler ({@link Backend.onCommitBoundary}), forwarded from the\n     *  local engine's `dispatch` brackets so the Store folds every affected view before notifying any\n     *  subscriber (cross-view-atomic notification). All this backend's data deltas originate from the\n     *  local engine, so its commit brackets are this backend's commit brackets. */\n    private boundaryHandler;\n    private readonly devObservers;\n    private pendingMutations;\n    /** The next mid to deal, PER DOMAIN (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §7.1): a client\n     *  writing through room + daemon concurrently must not alias one lmid counter. Seeded with the\n     *  `\"daemon\"` stream at 1; a domain absent from the map starts at 1. In the single-domain\n     *  configuration only `\"daemon\"` is ever touched, so the sequence is byte-for-byte as before. */\n    private nextMid;\n    /** The client-global deal counter behind {@link PendingMutation.seq}: one sequence across ALL\n     *  domains, bumped whenever any domain's mid is dealt. The replay order (mids are per-domain and\n     *  incomparable across domains — see the `seq` field doc). */\n    private dealSeq;\n    /** The explicit confirming-stream override (§7.1/§3) — see\n     *  {@link OptimisticBackendOptions.domainPolicy}. `undefined` from it ⇒ H-iii derivation. */\n    private readonly domainPolicy;\n    /** The final-rejection reason surface ({@link OptimisticBackendOptions.onRejected}). */\n    private readonly rejectedHandler;\n    /** Processed `(domain, mid)` outcome frames (H-v) — the deopt handshake's idempotence guard: a\n     *  duplicate frame (the original plus a reconnect re-send's re-answer, or two re-answers across\n     *  two reconnects) must not double-invoke. Needed precisely because a deopt frame can arrive for\n     *  an ALREADY-RETIRED mid (the replay gotcha) — \"no matching entry\" alone cannot distinguish\n     *  \"handle it fresh\" from \"already handled\". Per-domain FIFO, capped like the shell's\n     *  recorded-outcome map ({@link MAX_PROCESSED_OUTCOMES_PER_DOMAIN}); past the cap a duplicate of\n     *  an evicted mid would be re-processed — the same bounded-window trade the shell makes, and it\n     *  takes 512 interleaving non-applied outcomes on one domain to open it. */\n    private readonly outcomesProcessed;\n    /** THE room-table registry (302 §2 — one source per table): per connected room `sourceKey`, the\n     *  wire-table → engine-table map for the tables that room OWNS (its writable scope). Written by\n     *  {@link registerRoomTables} (same breath as the engine registration); read by the gate's\n     *  release rename/filter, the mutator staging map, the view swap ({@link processSwapIns}), and\n     *  the client's `__realtimeInspect` bookkeeping. The record outlives a downgrade's disconnect —\n     *  the ghost's views still read the engine tables — and drops at {@link dropGhost} (or the last\n     *  clean release via {@link unregisterRoomTables}). */\n    private readonly roomTables;\n    /** Local view qids currently REGISTERED on a room's namespaced tables (302 §4 swap-in), →\n     *  their sourceKey. Set by {@link processSwapIns}; cleared by the swap-back ({@link dropGhost})\n     *  and view teardown. The original AST stays in {@link asts} throughout — the swap re-registers\n     *  only the ENGINE query. */\n    private readonly roomSwappedViews;\n    /** Room subs whose FIRST snapshot released in the current release — their views swap onto the\n     *  room tables at the release tail ({@link processSwapIns}), strictly AFTER the reconcile folded\n     *  the snapshot into those tables (swapping earlier would hydrate the view EMPTY, a flash). */\n    private readonly pendingSwapIns;\n    /** The live fold entries, by fold key `${name}\\0${identityJSON}` — at most one per key\n     *  (FOLDED-MUTATIONS-DESIGN §8). Insertion order is creation order (the drain/flush tiebreak). */\n    private readonly folds;\n    /** The fold debounce clock (real timers by default; the oracle injects a virtual one). */\n    private readonly clock;\n    /** The high-water confirmed mutation id, PER DOMAIN (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md\n     *  §7.2 per-domain confirm-drop): an entry with `mid <= watermark[entry.domain]` has been\n     *  confirmed. The `\"daemon\"` domain is folded from the lmid system query's RELEASED ops\n     *  (lmid-as-data) — never from a frame; a room domain will fold from its own lmid stream (later\n     *  slice). Seeded with `\"daemon\"` at 0; the daemon scalar `confirmedLmid` (devtools) is\n     *  `watermark.get(\"daemon\")`. */\n    private watermark;\n    /** The per-source coherence gates (§5.1), by source key. Seeded with the daemon gate at\n     *  construction; a room channel attaches later (`connectSource`). Single-domain: one entry,\n     *  and every gate-generalized path degenerates to the old single-buffer code. NOT the same\n     *  space as {@link watermark}/{@link nextMid}: a DOMAIN can confirm with no gate connected\n     *  (the `__testRelease` seam); a gate's `key` names the domain its lmid stream folds into. */\n    private readonly gates;\n    /** The daemon's gate — the always-present channel (constructor-attached). The devtools\n     *  scalars (`__inspect`) read it directly; its `sync` IS {@link sync} (the agg overlay and\n     *  synthetic tables are daemon-tracked by design). */\n    private readonly daemonGate;\n    /** System retains by source qid ({@link retainSystemQuery}): a subscription with NO store view\n     *  and NO user-visible table — its frames buffer on its gate exactly like {@link LMID_QID}'s and\n     *  fold at RELEASE time ({@link foldSystemFrames}), never entering the sync layer or the local\n     *  engine. The spec names which system table the qid serves and the scope/doc it was minted for\n     *  (the fold's row filter). Empty on every non-lifecycle client — every partition below is then\n     *  a structural no-op and the release path is byte-identical to before. */\n    private readonly systemQids;\n    /** The §4.2 fence state: room doc → highest `flush_seq` delivered through the daemon plane\n     *  (monotone max-fold; a remove never regresses it). Slice I-v's ghost-drop consumer — I-iii\n     *  only maintains + exposes it (`__inspectDomains().lifecycle`). */\n    private readonly roomWatermarks;\n    /** The §4.1 occupancy state: scope → (client_id → expires_at) from the doorbell stream. Slice\n     *  I-iv's doorbell consumer (the 1→2 re-lease reaction) — I-iii only maintains + exposes it.\n     *  A snapshot REPLACES the scope's map (authoritative re-hydrate); a batch folds add/edit/remove\n     *  incrementally (the age-out sweep's deletes arrive as removes). */\n    private readonly scopeSessions;\n    /** The I-iv doorbell event sink ({@link onScopeSessions}) — fired once per scope a release's\n     *  scope-session fold touched, AFTER the whole release applied. Default no-op: a client that\n     *  never registers (no lifecycle plane) pays nothing. */\n    private scopeSessionsHandler;\n    /** Deferred old-channel row GC for in-flight upgrade retargets ({@link retargetRemoteQuery}):\n     *  sub sourceQid → the channel it left. The rows the OLD gate's sync holds for the qid stay\n     *  visible (merge: daemon tier) until the sub's first snapshot RELEASES on its new room channel\n     *  ({@link flushRetargetGc}) — dropping them at retarget time would emit net removes ahead of\n     *  the room's re-adds, the flicker the two-phase cutover exists to avoid. Doubles as the\n     *  wrong-channel GRACE window in {@link onFrame}: a frame already in flight from the old\n     *  channel when the sub moved is stale, not a wiring bug. Empty on every non-upgrade client —\n     *  every consultation below is then a structural no-op. */\n    private readonly pendingRetargetGc;\n    /** The §4.2 GHOSTS (Slice I-v): demoted room sources awaiting their watermark fence, by\n     *  sourceKey. Written only by {@link demoteRoomSource}; evaluated after every release\n     *  ({@link evaluateGhosts}) and dropped by {@link dropGhost} once the fence clears with no\n     *  sent room-domain pending left. Empty on every non-downgrade client — the per-release\n     *  evaluation is then a structural no-op. */\n    private readonly ghosts;\n    /** The I-v stuck-downgrade surface ({@link onDowngradeStuck}) — fired AT MOST ONCE per ghost\n     *  when its fence is satisfied but sent room-domain mids remain unresolved (§7.5: they retire\n     *  only through outcome resolution; the ghost holds rather than inventing a timeout-retire).\n     *  Default no-op. */\n    private downgradeStuckHandler;\n    private readonly asts;\n    /** Per query: the base tables its result can draw from (from the AST tree). */\n    private readonly queryTables;\n    private readonly remoteSubs;\n    private readonly sourceToRemote;\n    private readonly localToRemote;\n    private readonly remoteRetainToLocal;\n    private readonly resultTypes;\n    /** Local view qids that are server-authoritative: a query with no remote sub (purely local) is\n     *  hydrated on registration; a remote query is hydrated when its sub's first snapshot releases.\n     *  An un-hydrated query reports `unknown` (still loading) — the basis of `resultType`. */\n    private readonly hydrated;\n    private resultTypeHandler;\n    /** The pending AXIS (§7.2), split off `ResultType`: per query, whether any pending mutation\n     *  touches its tables. Cached so `onPending` fires only on transitions (invoke ↔ confirm). */\n    private readonly pendingState;\n    private pendingHandler;\n    /** The local-persistence write-through tap (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §5.1):\n     *  {@link writeLocal} invokes it post-commit; {@link applyLocalReplica} deliberately does not. */\n    private localWriteObserver;\n    constructor(schema: Schema<S>, source: OptimisticSource, registry: ClientRegistry, opts: OptimisticBackendOptions);\n    /** Wire one authority channel into its own coherence gate (§5.1): every frame the channel\n     *  delivers buffers on THIS gate's cv timeline, its progress frames release THIS buffer, its\n     *  restart resets THIS gate alone, and its reserved lmid stream folds into `watermark[key]`.\n     *  Validates each server hello against our OWN typed schema → reject a schema skew (CRIT#4);\n     *  the reserved lmid table is part of the expected set so the system query's hello passes, and\n     *  synthetic agg tables join the set as queries register them. */\n    private attachGate;\n    /** Attach a SECOND authority channel (§5.1) — the seam Slice G's room upgrade calls with the\n     *  ws-backed room feed. Rooms speak the daemon protocol verbatim (§2.4: the client cannot tell\n     *  a room from the daemon), so the argument is a full {@link OptimisticSource} — exactly what\n     *  `@rindle/remote` builds from `{roomUrl, leaseToken}`. The channel buffers/releases on its\n     *  own cv timeline (an independent §5.1 gate: coherent within, eventual across) and its\n     *  reserved lmid stream folds into `watermark[sourceKey]` — so `sourceKey` must equal the\n     *  `domainPolicy` name for the mutations this authority confirms. The converse is NOT required:\n     *  a domain may exist with no connected gate (`__testRelease` drives confirms gate-less); the\n     *  live production path stays daemon-only until G calls this. */\n    connectSource(sourceKey: string, source: OptimisticSource): void;\n    /** Register the tables room `sourceKey` OWNS (its writable scope — 302 §2): each wire table\n     *  gets its own namespaced ENGINE table (`{@link roomEngineTable}`), an ordinary tracked table\n     *  whose sole authority is the room channel. From here on the channel's released deltas rename\n     *  into these tables (wire tables outside the map are DROPPED — context stays daemon-owned,\n     *  302 §6), room-domain mutators stage onto them, and a room-homed view swaps onto them once\n     *  the room sub hydrates ({@link processSwapIns}). Idempotent per (sourceKey, table); a wire\n     *  table unknown to the schema is skipped (nothing to hold rows for). */\n    registerRoomTables(sourceKey: string, tables: readonly string[]): void;\n    /** The wire-table → engine-table map for room `sourceKey`'s owned tables (empty when none) —\n     *  the client's idempotence check and `__realtimeInspect` read THIS record (one source of\n     *  truth; the client keeps no shadow copy). */\n    roomTablesFor(sourceKey: string): ReadonlyMap<string, string>;\n    /** `channel` (G-iii registration-time routing) names the authority channel the remote sub\n     *  registers on — a `connectSource`d gate key; default `\"daemon\"` (every existing caller is\n     *  byte-identical). Slice G-v threads the lease's `realtime.sourceKey` here. Validated FIRST\n     *  (like the E3 check below): a bad channel must throw before any per-query state is recorded. */\n    registerQuery(qid: QueryId, ast: Ast, remote?: RemoteQuery, channel?: string): void;\n    /** Register every synthetic aggregate table `ast` needs that we haven't seen yet: on the\n     *  local engine (which auto-tracks it for the optimistic rebase loop), on `NormalizedSync`\n     *  (so its rows refcount/GC by group key), and into the source's expected-schema set (so\n     *  the server's `hello` — which advertises the same table — passes CRIT#4 validation).\n     *  Idempotent across queries that share an aggregate definition. */\n    private ensureSyntheticTables;\n    /** Decrement the refcount of every synthetic table query `qid` referenced; for each one that\n     *  reaches 0 (no live reader left), remove it from the engine, the refcount layer, and the\n     *  overlay — so aggregate state is reclaimed, not permanent (§4). Must run AFTER\n     *  `local.unregisterQuery(qid)` so the engine source has no live connection when\n     *  `unregisterTable` frees it (the engine refuses otherwise). */\n    private releaseSyntheticTables;\n    unregisterQuery(qid: QueryId): void;\n    /** `channel` as in {@link registerQuery} (G-iii): the gate the remote sub registers on; default\n     *  `\"daemon\"`. This is the split-retain seam G-v's resolve-then-register drives — resolve the\n     *  lease, learn `realtime.sourceKey`, `connectSource` it, then retain the query on that channel.\n     *  Validated FIRST so a bad channel throws before any synthetic-table refcount moves. */\n    retainRemoteQuery(qid: QueryId, remote: RemoteQuery, localQueryId?: QueryId, ast?: Ast, channel?: string): void;\n    releaseRemoteQuery(qid: QueryId): void;\n    /** The Slice I-iv upgrade retarget (§4.1 \"Retarget\" / the doorbell reaction): move a LIVE\n     *  (name, args) sub — every retain of it and every local view it feeds, wholesale — from the\n     *  channel it lives on onto `sourceKey`'s (already-`connectSource`d, already-promoted) room\n     *  channel, WITHOUT the view ever dropping its rows. Returns the sub's wire `sourceQid` (the\n     *  identity the client's renewal loop re-subscribes with).\n     *\n     *  Why a dedicated primitive: the one-channel-per-(name,args) invariant ({@link retainRemote}'s\n     *  loud throw) is correct — a sub's frames must never split across two cv timelines — so the\n     *  upgrade cannot simply retain a second sub on the room and release the daemon one; and the\n     *  naive release-then-retain order GCs the daemon sync's rows synchronously (net removes emit,\n     *  the view flashes empty) a full ws round trip before the room's seq-0 snapshot refills it.\n     *  The cutover is therefore TWO-PHASE around the room's first release:\n     *\n     *   1. NOW (here): unsubscribe the old channel's wire sub, sweep its still-buffered frames for\n     *      this qid (their cv timeline continues without the sub — the hello-supersession\n     *      precedent), flip `sub.channel`, re-arm `sub.hydrated` (the room's own snapshot is the\n     *      cutover point), and register on the room source (its resolver presents the handed\n     *      roomToken). The old gate's SYNC rows are deliberately NOT dropped: they keep the view's\n     *      plain tables populated through the window — the view still reads them until the swap.\n     *   2. AT THE ROOM'S FIRST RELEASED SNAPSHOT: the reconcile folds the snapshot into the room's\n     *      namespaced tables, the release tail SWAPS every local view onto them (302 §4.1,\n     *      {@link processSwapIns} — the accepted-flash boundary), and {@link flushRetargetGc}'s\n     *      deferred `dropQuery`+reconcile on the OLD gate then GCs the plain-table rows the sub\n     *      alone referenced — invisible to the swapped views.\n     *\n     *  Idempotent per target channel: a sub already on `sourceKey` returns immediately (the\n     *  double-doorbell / re-entrancy guard — one retarget per (query, sourceKey)). Validates before\n     *  mutating: a throw here leaves the sub fully daemon-attached (the client's fail-open). */\n    retargetRemoteQuery(remote: RemoteQuery, sourceKey: string): QueryId;\n    /** Phase 2 of {@link retargetRemoteQuery}, run at the end of every gate release: once a\n     *  retargeted sub's first snapshot has RELEASED on its new channel (`sub.hydrated` re-armed at\n     *  retarget, re-set by {@link markSubHydrated} inside this very release), drop the qid's rows\n     *  from the OLD gate's sync and reconcile them out — after the room's rows are already applied,\n     *  so the winner flip is value-equal (net-zero; see the phase table above). A sub torn down\n     *  mid-window was already swept by `releaseRemoteQuery`/`unregisterQuery` (which delete the\n     *  record); a vanished record here is pruned defensively. */\n    private flushRetargetGc;\n    /** The I-v downgrade orchestration primitive (§4.2/§7.4, re-expressed by 302 §4.2 as the\n     *  SWAP-BACK GATE): retire room `sourceKey` behind the watermark fence. The caller has ALREADY\n     *  retargeted every live sub off the channel ({@link retargetRemoteQuery} room→daemon —\n     *  validated loudly below) and holds the fence from the api-server's downgrade response\n     *  (`finalFlushSeq` = the room's last COMMITTED flush seq; `doc` keys the §4.2 watermark fold,\n     *  {@link roomWatermarks}). Steps, in order:\n     *\n     *   1. **Disconnect** the channel ({@link disconnectSource}): handlers detached, gate + buffer\n     *      dropped. `nextMid`/`watermark`/processed-outcomes for the domain are KEPT FOREVER (§7.1:\n     *      an assigned mid pins its domain; a later re-upgrade of the same doc continues the\n     *      sequence — {@link connectSource} attaches a fresh gate and the lmid snapshot max-folds\n     *      into the surviving watermark). Disconnecting BEFORE the daemon sub's first release is\n     *      load-bearing: it makes {@link flushRetargetGc}'s deferred old-channel GC a no-op (gate\n     *      gone ⇒ record deleted, nothing dropped). The room's namespaced tables — and the views\n     *      swapped onto them — deliberately stay: frozen at the room's last state, they keep the\n     *      document visible while the falling-back follower may still lack the final flush.\n     *      Swapping back earlier would show its pre-flush images — the regression §4.2 prevents.\n     *   2. **Ghost + first evaluation**: the record joins {@link ghosts} and is evaluated once\n     *      immediately — `finalFlushSeq === 0` (a never-flushed room) with no room-domain pending\n     *      drops on the spot, the single-daemon first-frame case.\n     *\n     *  In-flight discipline (§7.5): entries with `mid !== null` on `sourceKey` stay PINNED (rule\n     *  2 — never re-route a sent mutation); their resolution arrives via the daemon-carried\n     *  ledger+outcome folds (I-iii) and blocks the drop until then. Idempotent per sourceKey (a\n     *  second labeled query sharing the room demotes into the existing ghost). */\n    demoteRoomSource(sourceKey: string, doc: string, finalFlushSeq: number): void;\n    /** Detach one connected room channel (Slice I-v step 3): the source's handlers are replaced\n     *  with no-ops (the {@link OptimisticSource} handler seam is single-registration, so this IS\n     *  the detach — a late frame from a dying socket can no longer touch any bookkeeping), its\n     *  reserved lmid sub is unregistered, and the gate — buffer, per-source sync, cv watermark —\n     *  is dropped from {@link gates}. The DOMAIN state deliberately survives forever:\n     *  `nextMid[sourceKey]`, `watermark[sourceKey]`, and the processed-outcome set are untouched\n     *  (§7.1 — an assigned mid pins its domain; a re-upgrade must continue, never restart, the mid\n     *  sequence; {@link connectSource} then attaches a fresh gate whose lmid snapshot max-folds\n     *  into the surviving watermark via {@link foldConfirm}). Closing the underlying transport is\n     *  the caller's job. Idempotent (a missing gate is a no-op). */\n    disconnectSource(sourceKey: string): void;\n    /** Register the I-v stuck-downgrade sink — see {@link DowngradeStuckEvent}. One handler (a\n     *  later registration replaces it, the {@link onScopeSessions} convention); client.ts maps it\n     *  onto the loud anomaly surface. */\n    onDowngradeStuck(handler: (event: DowngradeStuckEvent) => void): void;\n    /** The I-v ghost-drop watcher (§4.2), run after every applied release ({@link applyRelease} —\n     *  the seam where {@link roomWatermarks} has just folded and the confirm-drop has just run) and\n     *  once at demote time. For each ghost: the fence must be satisfied\n     *  (`roomWatermarks[doc] ≥ finalFlushSeq`; 0 is trivially satisfied) AND no SENT room-domain\n     *  pending may remain (§7.5 — such entries resolve only through the daemon-carried\n     *  outcome/ledger folds; an entry that never reached the room is undecidable, so the ghost\n     *  HOLDS and the stuck event fires exactly once, naming the mids). Both satisfied ⇒\n     *  {@link dropGhost}. */\n    private evaluateGhosts;\n    /** Drop one cleared ghost — the 302 §4.2 SWAP-BACK: under the fence the daemon tables are\n     *  value-equal-or-ahead of the room's final state, so (1) every view swapped onto the room's\n     *  namespaced tables re-registers on its ORIGINAL (daemon-table) AST — visually a no-op, the\n     *  Store folds the re-hello as an in-place reset; (2) the namespaced tables unregister (no\n     *  reader is left after the swap); (3) ONE daemon reconcile re-invokes the pending set so any\n     *  entry whose writes had staged onto the now-gone room tables re-stages onto the daemon tables\n     *  (its domain policy stopped naming the dead room when the client dropped it). The whole drop\n     *  runs under one commit boundary so the swap and the re-staged predictions notify as ONE step.\n     *  After this, a FUTURE upgrade of the same doc registers again from scratch. */\n    private dropGhost;\n    /** Unregister room `sourceKey`'s namespaced engine tables and drop the {@link roomTables}\n     *  record. Callers must have no view registered on them (the engine refuses otherwise —\n     *  loud by design). No-op for an unknown sourceKey. */\n    unregisterRoomTables(sourceKey: string): void;\n    /** Retain one minted SYSTEM subscription (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §4, Slice\n     *  I-iii): a wire sub with NO store view and NO user-visible table. Registered through the same\n     *  {@link RemoteSub} bookkeeping as any remote retain — so qid→channel ownership, the overflow\n     *  re-subscribe, and refcounted release all work unchanged — but with an EMPTY `localQids` set\n     *  (no hydration/resultType coupling) and a {@link systemQids} record telling the release path\n     *  which system table this qid's frames carry (`spec.table`) and which scope/doc it was minted\n     *  for (the fold's row filter). Its frames then buffer on the channel's gate exactly like\n     *  {@link LMID_QID}'s and fold at RELEASE time in {@link foldSystemFrames} — riding the SAME\n     *  buffered cv path as the data they co-committed with (fence coherence: an out-of-band\n     *  shortcut would break I-ii's co-commit ordering guarantee).\n     *\n     *  `channel` defaults to `\"daemon\"` — the system tables live in the DAEMON store (that is the\n     *  point: outcome/ledger/watermark rows must be readable with no room socket alive, §7.1\n     *  \"load-bearing for §7.5\"). Idempotence per (table, scope/doc) is the CALLER's job (client.ts\n     *  keys its retains on exactly that); a duplicate retain of the SAME remote identity refcounts\n     *  like any sub. */\n    retainSystemQuery(retainQid: QueryId, remote: RemoteQuery, spec: SystemStreamSpec, channel?: string): void;\n    /** Release a {@link retainSystemQuery} retain. Refcounted like any sub; the LAST release\n     *  unregisters from the owning channel, sweeps its buffered frames, and drops the\n     *  {@link systemQids} record. The folded lifecycle STATE (`roomWatermarks`/`scopeSessions`/\n     *  processed outcomes) deliberately survives — the fence is monotone truth about the store, not\n     *  about the subscription (a re-retained fence must not forget a cleared watermark). */\n    releaseSystemQuery(retainQid: QueryId): void;\n    /** Raw CRUD has no optimistic story (§9 replaces it with named mutators). Register a\n     *  mutator — even a trivial one — and `invoke` it. */\n    mutate(_mutations: Mutation[]): Promise<void>;\n    /** Direct-commit a batch of LOCAL-only writes (`201-LOCAL-ONLY-TABLES-DESIGN.md` §6 / M2):\n     *  straight to the local engine, OUTSIDE the optimistic pending stack — a local table is\n     *  untracked, so it never rebases, reverts, or waits on a confirmation. Rejects a synced/tracked\n     *  table (the local engine's `writeLocal` is the chokepoint). Reconcile is synchronous and\n     *  non-reentrant (A5), so a local write can never interleave with an open server cycle.\n     *\n     *  Fires the {@link onLocalWrite} observer AFTER the engine commit but BEFORE subscriber\n     *  delivery — i.e. for exactly the batches that passed the M2 guard and committed (the\n     *  persistence layer's write-through tap, `207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §5.1). A\n     *  subscriber throwing during delivery re-raises out of this call, but only after the tap has\n     *  seen the batch: a committed write can never be invisible to the persistence plane. */\n    writeLocal(mutations: Mutation[]): void;\n    /** The write-through tap for the local-persistence layer (207 §5.1): `observer` sees every\n     *  {@link writeLocal} batch post-commit. One observer (the layer); a later registration\n     *  replaces it. The observer must not throw — a persistence failure degrades durability, never\n     *  the write path (P9); the layer catches internally. */\n    onLocalWrite(observer: (mutations: Mutation[]) => void): void;\n    /** Apply a REPLICATED local batch (a restore snapshot / a leader `commit` — 207 §5.1): delegates\n     *  to the engine's `writeLocal`, so the M2 locality guard still fires (P8 — a corrupt record\n     *  naming a synced table dies loudly here), but does NOT invoke the {@link onLocalWrite}\n     *  observer — the echo guard is structural, so the persistence layer can never re-enter itself.\n     *  `onCommitted` fires post-commit pre-delivery (same anchor as {@link writeLocal}'s tap): the\n     *  layer updates its mirror there, so a subscriber throw can never desync mirror from engine. */\n    applyLocalReplica(mutations: Mutation[], onCommitted?: () => void): void;\n    onEvent(handler: (qid: QueryId, ev: ChangeEvent) => void): void;\n    onCommitBoundary(handler: (phase: \"begin\" | \"end\") => void): void;\n    /** Bracket a multi-step optimistic apply as ONE notification commit (cross-view-atomic\n     *  notification — {@link Backend.onCommitBoundary}). `invoke`/`invokeFolded` apply the prediction\n     *  and then reconcile the `__agg` head in TWO `this.local` commits, but they are two halves of one\n     *  logical mutation: a relationship-`count` view and the data view it counts must update together.\n     *  The Store's `commitDepth` is a counter, so each inner commit's own `begin`/`end` nests under this\n     *  outer pair and the Store flushes every affected view (data AND count) once, together, at the\n     *  outer `end` — a subscriber re-reading a sibling view then sees post-commit data, never a torn\n     *  half. Balanced on throw (the prediction mutator may reject) via the `finally`, so a thrown\n     *  prediction never wedges the Store in deferred mode. */\n    private inOneCommit;\n    /** Run one client mutator against the staged `tx`, accepting BOTH forms (§ shared mutators):\n     *  a plain sync function runs as-is; a shared GENERATOR is driven synchronously — every yielded\n     *  write applies to the wasm txn now, every `tx.row` read is resolved against the same staged\n     *  state (read-your-writes), the SAME body the API server drives asynchronously. `ctx.user` is\n     *  the acting principal (re-read per invoke, stable across a rebase re-invoke). */\n    private runMutator;\n    /** Deal the next wire mid from `domain`'s ledger (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md\n     *  §7.1) and advance that counter. A domain absent from the map starts at 1. Per-domain, so a\n     *  client writing through room + daemon concurrently keeps two gapless, non-aliasing sequences.\n     *  The client-global `seq` is stamped in the same breath — the ONE cross-domain total order\n     *  (confirmation order is per-domain; replay order is client-global). Bundled here so no call\n     *  site can deal a mid without its seq. ONE caller discards the seq deliberately: the H-v deopt\n     *  flip ({@link handleMutationOutcome}) keeps the entry's ORIGINAL seq — its replay position —\n     *  and takes only the fresh mid (the dealSeq bump is harmless: seq consumers order, never\n     *  count). */\n    private dealMid;\n    /** The declared confirming stream for one invocation: the `domainPolicy`'s verdict, `\"daemon\"`\n     *  when it abstains. Resolved BEFORE the prediction runs — the domain picks the staging map\n     *  (a room domain stages its owned tables onto the room's namespaced twins). */\n    private resolveDomain;\n    /** The staging table map for a `domain`-routed prediction ({@link trackingTx}'s `stage`):\n     *  wire table → the room's namespaced engine table for the tables the room owns; identity for\n     *  everything else (including the whole map for the daemon domain). */\n    private stagingMap;\n    /** The PLAIN (daemon-homed) engine AST for `ast` — aggregate relationships rewritten to their\n     *  synthetic `__agg_*` reads, no room renames. The ONE form every non-swapped engine\n     *  registration uses ({@link registerQuery}, {@link dropGhost}'s swap-back) and the base the\n     *  swap-in renames ({@link processSwapIns}). */\n    private plainEngineAst;\n    /** Mutator names the cross-authority warn below already fired for (once per name). */\n    private readonly warnedCrossAuthority;\n    /** 302 §5.1 dev-time guard: a room-DECLARED mutator wrote tables the room does not own. Those\n     *  writes staged onto the PLAIN daemon tables (the staging map covers only owned tables), but\n     *  the entry confirms on the ROOM stream — and only the room's OWNED tables flush back to the\n     *  daemon, so nothing upstream ever echoes them: once the room confirm retires the entry, the\n     *  next release's whole-store rewind reverts them for good. The first-party room shell refuses\n     *  such a mutation (the §3.3 deopt/reject backstop re-routes it to the daemon), so this warns\n     *  for the shapes where that backstop may be absent (a BYO relay) — loud, once, soft (§5.1:\n     *  misdeclarations never throw). */\n    private warnCrossAuthorityWrites;\n    /** Run the named client mutator optimistically: the prediction applies to the live\n     *  engine now (affected views update synchronously), `(mid, name, args)` joins the\n     *  pending stack, and the envelope ships upstream. Returns the assigned `mid`. */\n    invoke(name: string, args: unknown): number;\n    /** {@link invoke} with an optional PINNED confirming domain (H-v): the deopt handshake's\n     *  already-retired arm re-invokes the frame's echoed `(name, args)` as a FRESH invocation pinned\n     *  to `\"daemon\"` — an honest re-prediction on the current base, never derived (`pin` bypasses\n     *  {@link resolveDomain} entirely, so the router never runs and no Q6 counter moves). Every\n     *  other step is `invoke` verbatim: prediction now, capture, drainOverlapping, mid dealt from\n     *  the pinned domain's ledger, envelope on its channel. */\n    private invokeWith;\n    /** Run a FOLDED invoke (FOLDED-MUTATIONS-DESIGN §8): apply the prediction to the live engine now\n     *  (like `invoke`), but collapse a run of same-key invokes into ONE pending entry whose `args`\n     *  are overwritten in place, debounce the server write, and ship only the last value. The `mid`\n     *  is assigned at flush, not here (§4.1) — so the return is a {@link FoldHandle}, not a mid. */\n    invokeFolded(name: string, opts: FoldOptions, args: unknown): FoldHandle;\n    /** Flush-on-enqueue (§4.2): for each outstanding fold whose touched tables overlap `tables`,\n     *  assign its mid NOW and ship it — in creation (insertion) order, so the wire stays gapless. A\n     *  `deferAcrossWrites` fold opts out (it keeps deferring, accepting the read-dependent snap). The\n     *  incoming write's own fold key (if any) is skipped — it is being folded into, not flushed. */\n    private drainOverlapping;\n    /** Flush one fold (§8): deal its `mid` from `nextMid` (SEND order — never reserved, so gapless\n     *  by construction), stamp the entry, ship the envelope with the LATEST args, resolve the handle.\n     *  The entry stays on `pendingMutations` (now with a real mid) until the lmid release confirms it. */\n    private flushFold;\n    /** The transport a `domain`-confirmed mutation ships on (§7.5 sent-pins-domain: only the\n     *  domain's own authority can confirm it, so its channel is the only correct transport). A\n     *  domain with NO connected gate ships on the daemon channel — the gate-less configurations\n     *  (`__testRelease`-driven tests) and today's entire live path resolve `\"daemon\"` anyway. */\n    private channelFor;\n    /** The gate a channel-keyed retain registers through (G-iii registration-time routing). The\n     *  channel MUST already be connected (`connectSource`; the daemon is constructor-attached) —\n     *  loud by design: a typo'd or not-yet-connected sourceKey must throw at retain time, never\n     *  silently register on the daemon and split the query's frames across channels. */\n    private requireGate;\n    /** The channel that owns `sourceQid` — {@link RemoteSub.channel}, the ONE source of truth for\n     *  qid routing (G-iii). `undefined` when no sub owns the qid (a harness-delivered raw feed, or\n     *  a just-released sub): such frames buffer on whatever gate they arrive at. */\n    private channelOf;\n    /** Record `(domain, mid)` as processed; `false` if it already was (a duplicate frame —\n     *  ignore it). FIFO-capped per domain ({@link MAX_PROCESSED_OUTCOMES_PER_DOMAIN}). */\n    private markOutcomeProcessed;\n    /** One `mutationOutcome` frame from `domain`'s channel (H-v — the §3.3 handshake's client\n     *  half). The frame arrives OUT-OF-BAND (see {@link attachGate}); the state machine:\n     *\n     *  1. `mid` never issued on `domain` ⇒ ignore (a confused/foreign frame must not invent work).\n     *  2. `(domain, mid)` already processed ⇒ ignore — idempotence under duplicate frames (the\n     *     original + a re-send's re-answer; a deopt for a mid whose entry ALREADY FLIPPED also\n     *     lands here harmlessly on its second frame).\n     *  3. `kind:\"rejected\"` ⇒ FINAL. Surface the reason through {@link rejectedHandler} (room-plane\n     *     parity with the HTTP queue's callback) and STOP — the drop + snap-back is the EXISTING\n     *     failed-mutation machinery: the room burnt the mid, its lmid release retires the entry\n     *     per-domain and the reconcile rewinds the prediction, exactly the daemon path's\n     *     processed-as-no-op rejection. No new drop path.\n     *  4. `kind:\"deopt\"`, entry found (pending `(domain, mid)`) ⇒ FLIP IN PLACE: `domain` becomes\n     *     `\"daemon\"`, a fresh daemon mid is dealt and the envelope ships NOW on the daemon channel\n     *     (\"deal-and-send-now\" — the conforming §3.3 re-enqueue: there is no flush machinery for\n     *     non-fold entries, so the design's \"mid: null until the daemon flush\" is satisfied\n     *     momentarily inside this call). THE ENTRY'S `seq` IS KEPT — settled (§5.3, commit\n     *     68141096): `seq` is the client-global REPLAY order; re-sequencing would move the entry's\n     *     overlay position and change read-dependent SIBLINGS' replay base. Everything else stays\n     *     (writes/reads/touched/touchedSources/writeSources — union-never-shrink), the prediction\n     *     stays applied (the entry never leaves `pendingMutations`, so no rewind fires), and the\n     *     router does NOT re-run nor does `drainOverlapping` (§3.3 re-enqueues, never re-derives;\n     *     any open overlapping fold was invoked later and flushes later with a larger mid).\n     *  5. `kind:\"deopt\"`, entry NOT found ⇒ the burnt-mid confirm won the race, or the frame is a\n     *     replay re-answer for an entry a previous session retired (the replay gotcha): re-invoke\n     *     the frame's echoed `name`/`args` as a FRESH invocation PINNED to `\"daemon\"` — an honest\n     *     re-prediction on the current base, never a derived route ({@link invokeWith}). A frame\n     *     without `name` (not self-contained) has nothing to re-invoke and is dropped; a re-invoke\n     *     that THROWS (the base moved from under it) is surfaced through {@link rejectedHandler} —\n     *     the mutation is dead with no stream left to confirm it.\n     *\n     *  A `\"deopt\"` bump joins the Q6 routing counters either way (`routing.reasons.deopt`) —\n     *  derived-and-deopted routes are visible beside derived successes. */\n    private handleMutationOutcome;\n    /** §7.5 rule 3 (H-v): re-send `domain`'s unconfirmed pending envelopes with their ORIGINAL\n     *  mids, in mid order, on the domain's own channel. Folds with `mid === null` are excluded —\n     *  nothing was ever sent for them (the flush deals their mid). Envelopes are reconstructed from\n     *  the pending entries exactly as `invoke` shipped them (`clientID`/`mid`/`name`/`args` —\n     *  entries carry everything the wire needs). Idempotent under the domain's ledger: an APPLIED\n     *  mid dedups silently and its lmid coverage retires the entry; a NON-APPLIED mid is re-answered\n     *  from the shell's recorded-outcome map into {@link handleMutationOutcome}. Confirmed entries\n     *  are already gone from `pendingMutations`, so no filter against the watermark is needed. */\n    private resendPending;\n    /** Drain every outstanding fold immediately (FOLDED-MUTATIONS-DESIGN §3): the explicit\n     *  `app.flushFolds()` and the `beforeunload`/`close` hook. Creation (insertion) order. */\n    flushFolds(): void;\n    /** A `trackingTx` op collector that records only the ops over a tracked aggregate's child\n     *  table (the others can't move any count). Applied to the overlay by the caller AFTER the\n     *  mutator succeeds, so a throwing mutator (whose staged write is discarded) leaves no delta. */\n    private opCollector;\n    /** Push the optimistic per-group delta onto the `__agg` head rows (§4):\n     *  `target = server_base ⊕ delta`. A head-only write to the (tracked) synthetic table, so it\n     *  joins the optimistic layer and is rewound/rebuilt by the reconcile cycle like any\n     *  prediction. `server_base` is read from `NormalizedSync` (the authoritative base) — NOT\n     *  from head, which already carries the optimistic layer (a torn read). Works standalone (an\n     *  ordinary delivery) and inside an open cycle (the write buffers into it). */\n    private reconcileAggHead;\n    /** The SERVER CHANNEL's state for a query (§7): `unknown` while not hydrated, else `complete`.\n     *  A pending local mutation no longer moves it — see {@link pending}. */\n    resultType(qid: QueryId): ResultType;\n    onResultType(handler: (qid: QueryId, rt: ResultType) => void): void;\n    __attachDevtoolsServerDeltas(observer: BackendDevObserver): () => void;\n    /** Whether any pending mutation (folded or not) touches this query's tables — \"is a prediction\n     *  pending here?\" (FOLDED-MUTATIONS-DESIGN §7.2). Orthogonal to {@link resultType}; this is the\n     *  same `queryTables ∩ pending.touched` computation that used to be smuggled into `unknown`. */\n    pending(qid: QueryId): boolean;\n    /** Reactive pending axis (§7.2): fires when a query's pending-ness flips (invoke ↔ confirm), so a\n     *  \"saving…\" affordance clears on its own when `lmid` catches up. */\n    onPending(handler: (qid: QueryId, pending: boolean) => void): void;\n    /** The coarse, table-level pending indicator set (§7.2): every table some pending mutation touched. */\n    pendingTables(): Set<string>;\n    /** A read-only snapshot of the optimistic loop for a devtools pane (DEBUG-TOOLS-BROWSER-DESIGN\n     *  §4.1). Built fresh per call from state the backend already holds — no new instrumentation, no\n     *  mutation. Only ever called by `@rindle/devtools` (imported in dev). */\n    __inspect(): OptimisticInspect;\n    /** Test-only per-domain ledger snapshot (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §7.1/§8.5).\n     *  Kept separate from {@link __inspect} so the devtools `OptimisticInspect` mirror stays byte-for-\n     *  byte identical (daemon-scalar-only). Exposes the per-domain `nextMid`/`watermark` maps plus each\n     *  pending entry's confirming domain — the axes the §8.5 ledger-isolation assertion checks. */\n    __inspectDomains(): {\n        nextMid: Record<string, number>;\n        watermark: Record<string, number>;\n        /** Per connected CHANNEL (§5.1): its release watermark + buffered-frame depth — the axis the\n         *  gate-isolation assertions read (one source's laggy cvMin must never move the other's). */\n        gates: Record<string, {\n            appliedCv: number;\n            bufferedFrames: number;\n        }>;\n        /** Per connected/registered room: its wire-table → engine-table map (302 §2) and which local\n         *  view qids are currently swapped onto it (302 §4). */\n        roomTables: Record<string, Record<string, string>>;\n        swappedViews: Record<number, string>;\n        /** The §4 lifecycle plane's folded state (Slice I-iii introspection): the per-doc §4.2 fence\n         *  value (`roomWatermarks`, I-v's ghost-drop input), the per-scope §4.1 occupancy map\n         *  (`scopeSessions`: scope → client_id → expires_at, I-iv's doorbell input), and the live\n         *  I-v ghosts (demoted room sources still awaiting their swap-back fence). */\n        lifecycle: {\n            roomWatermarks: Record<string, number>;\n            scopeSessions: Record<string, Record<string, number>>;\n            ghosts: Record<string, {\n                doc: string;\n                finalFlushSeq: number;\n            }>;\n        };\n        pending: {\n            mid: number | null;\n            seq: number | null;\n            name: string;\n            domain: string;\n        }[];\n    };\n    /** Recompute the pending axis for every query and fire `onPending` on transitions only. Called\n     *  from the two points that move the pending set: invoke/invokeFolded (add) and the confirm-drop\n     *  (remove) — exactly where `:359`/`:468` used to flip ResultType (§7.3). */\n    private refreshPending;\n    private onFrame;\n    private emitServerDelta;\n    private localQidsForSource;\n    /** One gate's release (§5.1 release gate): compute the coherent delta from THIS gate's cv-buffer,\n     *  then apply it against the gate's source/domain. Split into {@link computeRelease} (buffer →\n     *  delta, lmid → watermark) and {@link applyRelease} (per-source confirm-drop + reconcile) —\n     *  N independent gates all feed the ONE apply half; {@link __testRelease} drives it directly. */\n    private onGateProgress;\n    /** Compute one coherent release from ONE gate's cv-buffer (§5.1) — gate-scoped: its buffer, its\n     *  cvMin timeline. Take every buffered frame at `cv ≤ cvMin`, in (cv, arrival) order, and fold\n     *  it: the lmid system-query frame advances `watermark[gate.key]` (via {@link foldLmidOps} — the\n     *  daemon stream folds \"daemon\", a room stream folds its own domain); data frames fold through\n     *  this SOURCE's cross-query refcount into ONE net base delta — the §1.3 `D`. Returns that delta\n     *  plus the set of local views this release JUST hydrated (so their reconcile batch phases as a\n     *  `snapshot`). Mutates the gate's buffer/`appliedCv`, hydration, and the gate's domain\n     *  watermark; the pending set and the reconcile are {@link applyRelease}'s job. */\n    private computeRelease;\n    /** Apply one released delta against `sourceKey`'s domain (§7.2 per-domain confirm-drop + the §1.3\n     *  reconcile cycle). `watermarkUpdate`, when given, advances `watermark[sourceKey]` first — the\n     *  hook a per-source lmid confirm rides on (the daemon path folds its watermark in\n     *  {@link computeRelease} and passes `undefined`). Then: drop every pending entry its OWN domain's\n     *  watermark now covers (a room confirm can never retire a daemon entry, and vice-versa — the §7.1\n     *  ledger-collision fix), and run the reconcile cycle against `sourceKey` when the base delta or the\n     *  pending set changed. `newlyHydrated` stamps the initial-hydration batch as a catch-up. */\n    private applyRelease;\n    /** Test-only per-source release seam (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §7.2/§8.5): drive\n     *  {@link applyRelease} for `sourceKey` directly — an explicit `watermarkUpdate` (a simulated lmid\n     *  confirm for that domain) and `deltas` (a coherent base delta), with no real gate. Lets a harness\n     *  exercise a room-domain confirm before the real second lmid stream / per-source gate is wired\n     *  (E-iii-b/c). The `__`-prefix marks it a test hook, alongside {@link __inspect}. */\n    __testRelease(sourceKey: string, deltas: Mutation[], watermarkUpdate?: number): void;\n    /** Swap every view of each just-hydrated ROOM sub onto the room's namespaced tables (302 §4.1):\n     *  re-register the local engine query with the AST's room-owned table references renamed\n     *  ({@link remapAstTables}); the Store folds the re-hello as an in-place reset, so the caller's\n     *  view reference survives and subscribers see ONE transition. Runs at the applyRelease tail —\n     *  the reconcile has already folded the sub's snapshot into the room tables, so the swapped\n     *  view hydrates straight to the room state (swapping earlier would flash it empty). The\n     *  ORIGINAL ast stays in {@link asts}; the swap-back ({@link dropGhost}) re-registers it.\n     *\n     *  This is the accepted-flash boundary (302 §4.1/§7.1): the room's copy may be behind the\n     *  daemon rows the view showed a moment ago — accepted by decision, revisit on a real\n     *  two-region deploy. */\n    private processSwapIns;\n    /** Fold `domain`'s lmid system query's released ops (lmid-as-data): the one row's\n     *  `last_mutation_id` cell is this client's confirmed high-water mid in that domain — it advances\n     *  `watermark[domain]` and, on a fresh session ahead of our issued mids, `nextMid[domain]`. The\n     *  daemon stream folds `\"daemon\"`; a room stream folds its own `\"room:doc:X\"`; the daemon-carried\n     *  §7.1 ledger rows fold through the same {@link foldConfirm} core (Slice I-iii). */\n    private foldLmidOps;\n    /** THE one confirm fold (§7.1/§7.2): advance `watermark[domain]` to `lmid` (monotone max) and,\n     *  on a fresh session ahead of our issued mids, adopt `nextMid[domain]`. Shared verbatim by the\n     *  per-channel lmid system query ({@link foldLmidOps}) and the daemon-carried room-ledger rows\n     *  ({@link foldSystemFrames} — one core so the two paths cannot drift). */\n    private foldConfirm;\n    /** Fold one release's SYSTEM frames in a FIXED category order — the order is STRUCTURAL (one\n     *  function, categories in sequence), because it is the client half of THE NAMED INVARIANT\n     *  (§3.3's shipped note; documented above {@link handleMutationOutcome}): **never retire a\n     *  room-domain entry off a daemon-carried lmid without outcome resolution.**\n     *\n     *    1. **outcome rows** (`_rindle_room_mutation_outcomes`) — each row for OUR clientID is\n     *       synthesized into a {@link MutationOutcomeFrame} and routed through\n     *       {@link handleMutationOutcome}, the SAME H-v state machine the room socket's frames use\n     *       (one verdict path: frames and rows cannot drift). A deopt flips its pending entry to\n     *       the daemon IN PLACE (keep-seq, deal-and-send-now); a rejection surfaces + stays for the\n     *       ordinary burnt-mid retire; a duplicate (frame already seen, or the row re-delivered) is\n     *       absorbed by the processed set — which doubles as the resolved-verdict memory across\n     *       releases (per-domain FIFO, {@link MAX_PROCESSED_OUTCOMES_PER_DOMAIN}, mirroring the\n     *       shell's recorded-outcome cap).\n     *    2. **room-ledger rows** (`_rindle_room_client_mutations`) — the FIRST daemon-carried\n     *       room-lmid path: OUR row's `last_mutation_id` folds into `watermark[room:<doc>]` via\n     *       {@link foldConfirm}. Because step 1 ALREADY resolved every non-applied verdict this\n     *       release carries (and earlier releases' verdicts were resolved at their own release),\n     *       the confirm-drop that follows in {@link applyRelease} retires only entries whose\n     *       outcome is resolution-by-absence — which I-ii's co-commit atomicity defines as APPLIED\n     *       (a room flush co-commits the ledger row and every non-applied mid's outcome row in ONE\n     *       daemon transaction, so a covering lmid without a row IS the applied verdict).\n     *       Processing this category before step 1 is the violation, in two proven directions\n     *       (each run break→fail→revert against `test/system_streams.test.ts`): (a) the ledger's\n     *       fresh-session `nextMid` ADOPTION must not run before historical outcome rows are\n     *       judged — adopted-first, a previous session's retained deopt row passes the\n     *       \"never-issued\" guard and spuriously re-invokes a mutation that session already handled\n     *       (a double-apply); (b) the RETIRE must not precede resolution — it does not BECAUSE the\n     *       confirm-drop runs in {@link applyRelease}, strictly after this whole function. That\n     *       deferral is load-bearing: an \"optimization\" retiring inline with the watermark fold\n     *       retires a deopted entry as a silent success (the exact lost-write H-v exists to\n     *       prevent) and mis-attributes a rejected row's reason.\n     *    3. **watermark rows** (`_rindle_room_watermark`) — the §4.2 fence value, max-folded per\n     *       doc ({@link roomWatermarks}); I-v's ghost-drop consumer, no reaction here.\n     *    4. **scope-session rows** (`_rindle_scope_sessions`) — the §4.1 occupancy map\n     *       ({@link scopeSessions}); I-iv's doorbell consumer, no reaction here.\n     *\n     *  Ordinary data ops fold AFTER all of these (the caller's main loop) — outcome/ledger state\n     *  must be in place before {@link applyRelease}'s confirm-drop + reconcile consume the release.\n     *  Every row is filtered against the retain's {@link SystemStreamSpec} scope/doc AND (for the\n     *  client-keyed tables) our own `clientID` — defense in depth: the server predicate may have\n     *  been minted doc-only (no `clientId` at lease time), so other clients' rows are expected and\n     *  must be ignored, and a row for a doc this retain was not minted for is never folded.\n     *\n     *  Returns the scopes category 4 touched (snapshot or ops) — the I-iv doorbell events' input;\n     *  `null` when none (every non-lifecycle release). The events themselves fire from\n     *  `onGateProgress` AFTER the release applies, never from inside the fold. */\n    private foldSystemFrames;\n    /** The I-iv occupancy count — THE one rule (§4.1/D7): unexpired (`expires_at >` the fold\n     *  clock's now) sessions under `scope` from OTHER clientIDs. Shared by the doorbell events\n     *  ({@link onGateProgress}) and the client's registration-time check (a doorbell that folded\n     *  BEFORE a candidate registered must still be able to trigger it) so the two can never\n     *  disagree. Own-clientID rows never count — a solo client cannot ring its own bell — and\n     *  expiry is judged on the injectable {@link FoldClock} (deterministic in a virtual-clock\n     *  harness, the folded-oracle discipline). */\n    otherScopeSessions(scope: string): number;\n    /** Register the I-iv doorbell event sink — see {@link ScopeSessionsEvent}. One handler (a later\n     *  registration replaces it, the {@link onLocalWrite} convention); client.ts is the consumer. */\n    onScopeSessions(handler: (event: ScopeSessionsEvent) => void): void;\n    /** One §1.3 reconcile cycle: rewind the optimistic layer and fold the coherent SERVER\n     *  delta into BOTH head AND the `sync` baseline (`serverBatchBegin`), re-invoke every\n     *  still-pending mutator to re-stage the optimistic layer (the rewind un-applied it), then\n     *  deliver the coalesced result (`serverBatchEnd`). This is the engine's only sync-moving\n     *  boundary — `onProgress` releases and `unregisterQuery`'s GC both go through here so head\n     *  and sync never diverge (the §1.2 invariant; CRIT#2). */\n    private runReconcileCycle;\n    /** ONE channel's authority restarted (a new boot id): it lost all materialization + `cv` state\n     *  and its `cv` sequence reset, so previously-released `cv`s no longer bound the new stream. The\n     *  source has already re-subscribed every query (reconnect → resync); drop THIS gate's buffer\n     *  and `cv` watermark so the fresh, low-`cv` snapshots are RELEASED instead of dropped as stale\n     *  (`onFrame`/`computeRelease` gate on `appliedCv`). The OTHER gates are untouched — an\n     *  authority restart is per-channel (§5.1). Pending optimistic mutations stay put — they\n     *  re-apply on the next reconcile, and the channel's lmid system query's fresh snapshot restores\n     *  its domain's confirmation watermark. */\n    private resetGate;\n    /** The §8.5 escape: ONE gate's buffer outgrew its cap (a pinned `cvMin` under churn on that\n     *  channel). Drop everything it buffered and re-register every query on that source — the fresh\n     *  snapshots arrive as ordinary frames and the next release re-hydrates via the footprint diff\n     *  (the §5.3 path); still-pending optimism re-applies in that cycle. The other gates' buffers\n     *  and subscriptions are untouched. */\n    private overflow;\n    private setResultType;\n    /** Recompute a query's server-channel state from hydration alone (§7): a pending mutation no\n     *  longer affects it. Used when a remote sub attaches to or hydrates a local view. */\n    private recomputeResultType;\n    /** A remote sub's first snapshot landed: mark it (and every local view it feeds) hydrated, then\n     *  lift those views out of `unknown` (loading). A ROOM sub's hydration additionally queues the\n     *  302 §4.1 swap-in — performed at the applyRelease TAIL ({@link processSwapIns}), once the\n     *  reconcile has folded this snapshot into the room tables. Idempotent — a re-hydrate snapshot\n     *  re-marks harmlessly; a source qid with no sub (the lmid system query) is a no-op. */\n    private markSubHydrated;\n    /** `channel` (G-iii registration-time routing): the gate the sub registers on — the qid's\n     *  ownership is fixed HERE, at retain time (no lazy claim; `onFrame` only asserts it). Default\n     *  `\"daemon\"`, so every channel-less caller is byte-identical to before. */\n    private retainRemote;\n    private releaseRemote;\n    private addServerDependencyTables;\n}","description":"","source":"packages/optimistic/src/backend.ts","line":532,"href":"/reference/typescript/optimistic/#symbol-OptimisticBackend"},{"name":"OptimisticBackendOptions","originalName":"OptimisticBackendOptions","kind":"InterfaceDeclaration","signature":"export interface OptimisticBackendOptions {\n    /** Stable per-client identity for the upstream envelopes (§8.1). */\n    clientID: string;\n    /** Supplies a shared mutator's local `ctx.user` on every run, including reconciliation.\n     *  Keep the principal stable for this client's lifetime; recreate the client on account changes.\n     *  The server obtains its own authenticated principal. Defaults to the empty string. Plain\n     *  client-only mutators ignore this option. */\n    user?: () => string;\n    /** Buffered-frame ceiling before the §8.5 escape (drop + re-hydrate). */\n    bufferCap?: number;\n    /** Virtual-clock seam for the fold debounce timers (FOLDED-MUTATIONS-DESIGN §9). Defaults to\n     *  real `setTimeout`/`clearTimeout`/`Date.now`; the fold oracle injects a deterministic clock. */\n    clock?: FoldClock;\n    /** The DECLARED confirming stream per mutation (302 §5: declared, not derived — there is no\n     *  routing proof). A policy returning a string pins that domain verbatim: the mutation stages\n     *  onto that room's namespaced tables and ships on its channel. Returning `undefined` (or\n     *  configuring no policy) means `\"daemon\"`. The client layer builds this from the app's declared\n     *  realtime mutators + the currently attached rooms; a misdeclaration fails SOFT (302 §5.1) —\n     *  the write lands on the other authority's tables and the view simply stops feeling instant\n     *  until the echo relays it. */\n    domainPolicy?: (name: string, args: unknown) => string | undefined;\n    /** A FINAL (authz/validation) mutation rejection's reason surface — the room plane's twin of the\n     *  HTTP mutate route's `onRejected` (H-v; the H-iv-b `mutationOutcome {kind:\"rejected\"}` frame).\n     *  The prediction's snap-back is NOT this callback's job: the room burns the mid and its lmid\n     *  release drops the entry exactly as a daemon-path rejection does (processed-as-no-op) — this\n     *  is where the REASON reaches the app, same contract as the queue's callback. Also invoked when\n     *  a DEOPT's fresh re-invocation (the already-retired arm) throws — that mutation is dead on the\n     *  current base with no stream left to confirm it, the closest thing to a rejection there is. */\n    onRejected?: (envelope: MutationEnvelope, reason: string) => void;\n}","description":"","source":"packages/optimistic/src/backend.ts","line":425,"href":"/reference/typescript/optimistic/#symbol-OptimisticBackendOptions"},{"name":"OptimisticInspect","originalName":"OptimisticInspect","kind":"InterfaceDeclaration","signature":"/** A read-only snapshot of the optimistic loop ({@link OptimisticBackend.__inspect}). */\nexport interface OptimisticInspect {\n    /** The pending stack in array order (assigned mids ascending, un-flushed folds interleaved by\n     *  creation — the re-invoke order is derived from this in `runReconcileCycle`). */\n    pending: PendingInspect[];\n    /** High-water confirmed mid: an entry with `mid <= confirmedLmid` has been confirmed/dropped. */\n    confirmedLmid: number;\n    /** The next mid to be dealt (so `nextMid - 1` is the highest issued). */\n    nextMid: number;\n    /** The applied coherent-release watermark (`cvMin`, §8.6). */\n    appliedCv: number;\n    /** Frames still buffered awaiting their release point (§8.5) — a backpressure gauge. */\n    bufferedFrames: number;\n    /** Every table some pending mutation currently touches (the coarse pending indicator set, §7.2). */\n    pendingTables: string[];\n}","description":"A read-only snapshot of the optimistic loop ({@link OptimisticBackend.__inspect}).","source":"packages/optimistic/src/backend.ts","line":497,"href":"/reference/typescript/optimistic/#symbol-OptimisticInspect"},{"name":"OptimisticSource","originalName":"OptimisticSource","kind":"InterfaceDeclaration","signature":"/**\n * The server side of the OPTIMISTIC path (OPTIMISTIC-WRITES-DESIGN.md §8): the\n * {@link NormalizedSource} stream with `cv`-tagged data frames, plus the connection-level\n * {@link ProgressFrame} channel and the named-mutator upstream. The client buffers data\n * frames by `cv` and applies all `cv ≤ cvMin` as one coherent release (§8.5).\n */\nexport interface OptimisticSource {\n    registerQuery(queryId: QueryId, remote: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Ship one named-mutator invocation upstream (§8.1). Confirmation rides the progress frames. */\n    pushMutation(envelope: MutationEnvelope): Promise<void>;\n    onNormalized(handler: (queryId: QueryId, event: NormalizedEvent) => void): void;\n    onProgress(handler: (frame: ProgressFrame) => void): void;\n    /** Optional: the backend hands its OWN typed per-table schemas so the source validates each\n     *  server `hello` against them and rejects a schema skew (CRIT#4); see {@link NormalizedSource}. */\n    expectClientSchema?(tables: NormalizedTableSchema[]): void;\n    /** Optional: fired when the server restarts (a transport that can detect it, e.g. via a daemon\n     *  boot id). The backend resets its `cv` watermark so the server's reset `cv` sequence is\n     *  accepted rather than dropped as stale. In-process sources never restart and omit it. */\n    onRestart?(handler: () => void): void;\n    /** Optional (Slice H-v): the channel's {@link MutationOutcomeFrame} stream — the room deopt\n     *  handshake's client half. **OUT-OF-BAND BY DESIGN**: the frame carries no `cv` and the source\n     *  MUST dispatch it immediately on arrival, never behind the cv buffer — a deopt has to migrate\n     *  its pending entry BEFORE the buffered lmid release that would otherwise retire it as a\n     *  success (and the §7.3 hold-back trigger, keyed on the entry's confirming domain, would then\n     *  park its staged writes the wrong way). Sources whose authority never deopts (the in-process\n     *  native source, a plain daemon) omit it. */\n    onMutationOutcome?(handler: (frame: MutationOutcomeFrame) => void): void;\n    /** Optional (Slice H-v, the §7.5 rule-3 crash-window closer): fired when the transport\n     *  RE-establishes its session (reconnect → re-`init`), BEFORE any post-reconnect frame is\n     *  processed — the ordering is load-bearing: the re-subscribed lmid stream's fresh snapshot may\n     *  cover a mid whose `mutationOutcome` frame died with the old socket, and once that release\n     *  retires the entry as an apparent success there is nothing left to re-send. The backend\n     *  re-sends this domain's unconfirmed pending envelopes with their ORIGINAL mids, in mid order;\n     *  the source may DEFER their delivery until the session is re-authorized (a room's\n     *  `pushMutation` requires the lease-token subscribe's subject). Idempotent under the domain's\n     *  own ledger — a processed mid dedups silently (silence + lmid coverage ⇒ applied), a\n     *  non-applied mid is re-answered from the authority's recorded-outcome map (resolving even an\n     *  already-retired entry through the handshake's not-found arm). Distinct from\n     *  {@link onRestart} (a NEW server incarnation): a same-incarnation socket drop re-syncs\n     *  without restarting, and envelopes sent into the dead socket are exactly what this recovers.\n     *  In-process sources never drop a session and omit it. */\n    onResync?(handler: () => void): void;\n}","description":"The server side of the OPTIMISTIC path (OPTIMISTIC-WRITES-DESIGN.md §8): the\n{@link NormalizedSource} stream with `cv`-tagged data frames, plus the connection-level\n{@link ProgressFrame} channel and the named-mutator upstream. The client buffers data\nframes by `cv` and applies all `cv ≤ cvMin` as one coherent release (§8.5).","source":"packages/client/src/types.ts","line":303,"href":"/reference/typescript/optimistic/#symbol-OptimisticSource"},{"name":"PendingInspect","originalName":"PendingInspect","kind":"InterfaceDeclaration","signature":"/** One pending mutation, as the timeline sees it (DEBUG-TOOLS-BROWSER-DESIGN §4.1). */\nexport interface PendingInspect {\n    /** Stable identity across snapshots: `m:<mid>` once a mid is assigned, else `f:<foldKey>` for an\n     *  un-flushed folded entry (the mid is dealt at flush, FOLDED-MUTATIONS-DESIGN §4.1). */\n    key: string;\n    /** The wire mutation id, or `null` for an un-flushed fold. */\n    mid: number | null;\n    name: string;\n    args: unknown;\n    /** Tables this mutator touched at its last (re)invocation — the pending-axis basis (§7.2). */\n    tables: string[];\n    /** The pk-granular write-set captured at this entry's LAST invocation (RINDLE-REALTIME-QUERY-\n     *  ENABLEMENT-DESIGN.md §3.2 #1), flattened from the {@link WriteSet} map for inspection — one\n     *  entry per `(table, pk)` currently held. Pure capture; no routing consumer yet. */\n    writes: WriteRecord[];\n    /** The read-log captured at this entry's LAST *recorded* invocation (§3.2 #2). Empty for a\n     *  folded entry — the read TRAP arms there, not recording (see {@link PendingMutation.reads}). */\n    reads: ReadLog;\n    /** Present iff this entry is a folded (debounced) write. */\n    fold?: FoldInspect;\n}","description":"One pending mutation, as the timeline sees it (DEBUG-TOOLS-BROWSER-DESIGN §4.1).","source":"packages/optimistic/src/backend.ts","line":475,"href":"/reference/typescript/optimistic/#symbol-PendingInspect"},{"name":"PersistChannel","originalName":"PersistChannel","kind":"InterfaceDeclaration","signature":"export interface PersistChannel {\n    post(msg: unknown): void;\n    onMessage(handler: (msg: unknown) => void): void;\n    close(): void;\n}","description":"","source":"packages/optimistic/src/local-persist.ts","line":102,"href":"/reference/typescript/optimistic/#symbol-PersistChannel"},{"name":"PersistDb","originalName":"PersistDb","kind":"InterfaceDeclaration","signature":"/** The narrow storage surface the layer needs (§3.1): two fixed stores, `rows` + `meta`. Each\n *  method is one atomic IDB transaction; a resolved promise means the txn COMPLETED — the P1\n *  (\"persist-then-broadcast\") anchor. */\nexport interface PersistDb {\n    getMeta(): Promise<PersistMeta | undefined>;\n    putMeta(meta: PersistMeta): Promise<void>;\n    getAllRows(): Promise<StoredRow[]>;\n    /** Apply one commit batch atomically: `row === null` deletes, else puts. */\n    putBatch(batch: RowState[]): Promise<void>;\n    /** The P7 gate: clear `rows` and write `meta` in ONE transaction (never a half state). */\n    reset(meta: PersistMeta): Promise<void>;\n    /** Delete specific records (the leader's stale-table sweep, §3.1). */\n    deleteRows(keys: Array<{\n        table: string;\n        pkKey: string;\n    }>): Promise<void>;\n    close(): void;\n}","description":"The narrow storage surface the layer needs (§3.1): two fixed stores, `rows` + `meta`. Each\nmethod is one atomic IDB transaction; a resolved promise means the txn COMPLETED — the P1\n(\"persist-then-broadcast\") anchor.","source":"packages/optimistic/src/local-persist.ts","line":89,"href":"/reference/typescript/optimistic/#symbol-PersistDb"},{"name":"PersistEnv","originalName":"PersistEnv","kind":"InterfaceDeclaration","signature":"export interface PersistEnv {\n    /** Open (creating if needed) the database. Resolves `null` when storage is unavailable —\n     *  the layer degrades to broadcast-only (§3.2). */\n    openDatabase(name: string): Promise<PersistDb | null>;\n    deleteDatabase(name: string): Promise<void>;\n    /** Open the tab-coherence channel; `null` when BroadcastChannel is unavailable (single-tab). */\n    createChannel(name: string): PersistChannel | null;\n    /** Queue for the exclusive leadership lock (§4.1): `onAcquired`'s promise HOLDS the lock until\n     *  it resolves; `signal` aborts a still-queued request. When Web Locks are unavailable, grant\n     *  immediately ONLY if the runtime is provably single-context (no channel) — see\n     *  {@link leaderElectionUnavailable}. */\n    requestLock(name: string, signal: AbortSignal, onAcquired: () => Promise<void>): void;\n    /** The runtime has tabs (a channel) but NO exclusive lock (Firefox <96, Safari 15.1–15.3,\n     *  Node): every context would self-promote into concurrent leaders over one database — P2\n     *  violated, permanent divergence. When set, the layer runs INERT: local tables still work,\n     *  session-scoped (the 201 baseline), with no persistence and no cross-tab replication. */\n    leaderElectionUnavailable?: boolean;\n    /** `navigator.storage.persist()` (§3.2), best-effort. */\n    requestPersistentStorage?(): void;\n}","description":"","source":"packages/optimistic/src/local-persist.ts","line":108,"href":"/reference/typescript/optimistic/#symbol-PersistEnv"},{"name":"PersistLocalOptions","originalName":"PersistLocalOptions","kind":"InterfaceDeclaration","signature":"export interface PersistLocalOptions {\n    /** The storage identity (§3.2): one IDB database per (origin, user). NOT the mutator principal —\n     *  this is fixed for the client's lifetime; an anonymous mode passes its own sentinel (`\"anon\"`). */\n    user: string;\n    /** Call `navigator.storage.persist()` to resist eviction (§3.2). Default false — it can prompt. */\n    requestPersistentStorage?: boolean;\n    /** Reports storage-operation failures without rejecting local writes. Default `console.error`.\n     *  Missing browser APIs can warn and disable a feature instead; this hook does not receive\n     *  every channel failure. Persistence and cross-tab delivery remain best effort. */\n    onError?: (e: Error) => void;\n    /** Test seam: a fake IDB/locks/channel environment. Defaults to the browser globals. */\n    env?: PersistEnv;\n}","description":"","source":"packages/optimistic/src/local-persist.ts","line":31,"href":"/reference/typescript/optimistic/#symbol-PersistLocalOptions"},{"name":"PersistMeta","originalName":"PersistMeta","kind":"InterfaceDeclaration","signature":"export interface PersistMeta {\n    schemaHash: string;\n    epoch: number;\n}","description":"","source":"packages/optimistic/src/local-persist.ts","line":129,"href":"/reference/typescript/optimistic/#symbol-PersistMeta"},{"name":"ProgressFrame","originalName":"ProgressFrame","kind":"InterfaceDeclaration","signature":"/** The connection-level progress frame (§8.6): advances the coherent-apply release point\n *  (`cvMin`). A pure release signal — mutation confirmation does NOT ride it: `lmid` is a\n *  row in {@link CLIENT_MUTATIONS_TABLE}, delivered through the client's own per-client\n *  system query ({@link LMID_QUERY_NAME}) like any data, so it is released by the same\n *  `cvMin` as the commit's effects (transactionally coherent by construction). */\nexport interface ProgressFrame {\n    cvMin: number;\n}","description":"The connection-level progress frame (§8.6): advances the coherent-apply release point\n(`cvMin`). A pure release signal — mutation confirmation does NOT ride it: `lmid` is a\nrow in {@link CLIENT_MUTATIONS_TABLE}, delivered through the client's own per-client\nsystem query ({@link LMID_QUERY_NAME}) like any data, so it is released by the same\n`cvMin` as the commit's effects (transactionally coherent by construction).","source":"packages/client/src/types.ts","line":275,"href":"/reference/typescript/optimistic/#symbol-ProgressFrame"},{"name":"QueryArg","originalName":"QueryArg","kind":"TypeAliasDeclaration","signature":"/** What {@link IsoTx.query} accepts: a query handle whose `.ast()` lowers to the wire {@link Ast} —\n *  exactly what the typed query builder produces (`newQueryBuilder(schema).<table>…`, the tier-agnostic\n *  server-scope builder both tiers can construct because it performs no I/O). Structural so the seam\n *  need not carry the builder's heavy generics. */\nexport type QueryArg = {\n    ast(): Ast;\n};","description":"What {@link IsoTx.query} accepts: a query handle whose `.ast()` lowers to the wire {@link Ast} —\nexactly what the typed query builder produces (`newQueryBuilder(schema).<table>…`, the tier-agnostic\nserver-scope builder both tiers can construct because it performs no I/O). Structural so the seam\nneed not carry the builder's heavy generics.","source":"packages/client/src/mutation-ops.ts","line":84,"href":"/reference/typescript/optimistic/#symbol-QueryArg"},{"name":"QueryResultRow","originalName":"QueryResultRow","kind":"TypeAliasDeclaration","signature":"/** A row returned by a {@link QueryEffect}: column name → cell, plus each materialized relationship\n *  name → its nested row(s) — an array (a plural relationship) or a single row / `null` (a `.one()`\n *  relationship). Recursive. Presented identically on both tiers (a `view.data` row of the same\n *  query). */\nexport type QueryResultRow = {\n    [key: string]: WireValue | QueryResultRow | QueryResultRow[];\n};","description":"A row returned by a {@link QueryEffect}: column name → cell, plus each materialized relationship\nname → its nested row(s) — an array (a plural relationship) or a single row / `null` (a `.one()`\nrelationship). Recursive. Presented identically on both tiers (a `view.data` row of the same\nquery).","source":"packages/client/src/mutation-ops.ts","line":78,"href":"/reference/typescript/optimistic/#symbol-QueryResultRow"},{"name":"ReadLog","originalName":"ReadLog","kind":"InterfaceDeclaration","signature":"/** The read-log captured over ONE mutator invocation when recording is armed (RINDLE-REALTIME-\n *  QUERY-ENABLEMENT-DESIGN.md §3.2 #2): every point read (`reads` — the public `tx.get`/`tx.row`\n *  and, since H-ii, the keyed writers' internal pre-existence probes) plus every resolved query AST\n *  (`queries`, from `tx.query`). A SIBLING of the folded read TRAP (`FoldReadError` below) — the\n *  trap arms on the folded path and throws before any read completes (recording never runs there);\n *  recording arms on the ordinary (non-folded) prediction run and never throws. Pure capture for\n *  devtools/inspection (the §3 routing derivation it once fed was removed by\n *  302-ROOM-STORE-SEPARATION-DESIGN.md §5 — mutators DECLARE their domain now). */\nexport interface ReadLog {\n    reads: ReadRecord[];\n    queries: Ast[];\n}","description":"The read-log captured over ONE mutator invocation when recording is armed (RINDLE-REALTIME-\nQUERY-ENABLEMENT-DESIGN.md §3.2 #2): every point read (`reads` — the public `tx.get`/`tx.row`\nand, since H-ii, the keyed writers' internal pre-existence probes) plus every resolved query AST\n(`queries`, from `tx.query`). A SIBLING of the folded read TRAP (`FoldReadError` below) — the\ntrap arms on the folded path and throws before any read completes (recording never runs there);\nrecording arms on the ordinary (non-folded) prediction run and never throws. Pure capture for\ndevtools/inspection (the §3 routing derivation it once fed was removed by\n302-ROOM-STORE-SEPARATION-DESIGN.md §5 — mutators DECLARE their domain now).","source":"packages/optimistic/src/backend.ts","line":238,"href":"/reference/typescript/optimistic/#symbol-ReadLog"},{"name":"ReadOutcome","originalName":"ReadOutcome","kind":"TypeAliasDeclaration","signature":"/** Whether a recorded point read (`tx.get`/`tx.row`) found a row. */\nexport type ReadOutcome = \"present\" | \"absent\";","description":"Whether a recorded point read (`tx.get`/`tx.row`) found a row.","source":"packages/optimistic/src/backend.ts","line":219,"href":"/reference/typescript/optimistic/#symbol-ReadOutcome"},{"name":"ReadRecord","originalName":"ReadRecord","kind":"InterfaceDeclaration","signature":"/** One recorded point read, pk-granular (§3.2 #2). Recording-mode only — see {@link ReadLog}.\n *  Since H-ii this covers BOTH the public reads (`tx.get`/`tx.row`) and the keyed writers'\n *  internal pre-existence probes (§3.2 #3 — see the `rawGet` note in {@link trackingTx}). */\nexport interface ReadRecord {\n    table: string;\n    pk: WireValue[];\n    outcome: ReadOutcome;\n}","description":"One recorded point read, pk-granular (§3.2 #2). Recording-mode only — see {@link ReadLog}.\nSince H-ii this covers BOTH the public reads (`tx.get`/`tx.row`) and the keyed writers'\ninternal pre-existence probes (§3.2 #3 — see the `rawGet` note in {@link trackingTx}).","source":"packages/optimistic/src/backend.ts","line":224,"href":"/reference/typescript/optimistic/#symbol-ReadRecord"},{"name":"RealtimeAnomaly","originalName":"RealtimeAnomaly","kind":"InterfaceDeclaration","signature":"/** A loud realtime lease anomaly (always ALSO `console.error`'d). */\nexport interface RealtimeAnomaly {\n    kind: RealtimeAnomalyKind;\n    name: string;\n    args: unknown;\n    message: string;\n}","description":"A loud realtime lease anomaly (always ALSO `console.error`'d).","source":"packages/optimistic/src/client.ts","line":170,"href":"/reference/typescript/optimistic/#symbol-RealtimeAnomaly"},{"name":"RealtimeAnomalyKind","originalName":"RealtimeAnomalyKind","kind":"TypeAliasDeclaration","signature":"export type RealtimeAnomalyKind = \n/** A re-lease (renewal / reconnect re-resolution) came back WITHOUT a realtime block AND\n *  without a §4.2 fence — the query is no longer room-served but the server gave nothing to\n *  downgrade behind (a legacy/pre-I-v server, or `lifecycle.drainRoom` unconfigured). Surfaced\n *  loudly; a reply WITH a `realtimeFence` takes the graceful I-v dance instead. */\n\"downgrade\"\n/** The I-v ghost is STUCK (§7.5): its watermark fence cleared but sent room-domain mids never\n *  resolved (sent-but-undelivered when the socket died — undecidable in general). The ghost\n *  holds — no timeout-retire is invented — and the mids are named once, actionably. */\n | \"downgrade-stuck\"\n/** A lease named a DIFFERENT `sourceKey` than the query's live room sub — surfaced loudly, no\n *  re-attach. Deliberately NOT composed from demote+upgrade (deferred to §7.6's rare-case\n *  follow-up): a sourceKey-change reply carries a realtime block for the NEW room but NO\n *  fence for the OLD one, and without `finalFlushSeq` the old slice cannot be ghosted soundly. */\n | \"source-key-changed\"\n/** The lease POST failed or the room attach threw. The initial-materialize case fails OPEN to\n *  the daemon path (indistinguishable from an unlabeled query's recovery). */\n | \"lease-failed\";","description":"","source":"packages/optimistic/src/client.ts","line":150,"href":"/reference/typescript/optimistic/#symbol-RealtimeAnomalyKind"},{"name":"RealtimeClientOptions","originalName":"RealtimeClientOptions","kind":"InterfaceDeclaration","signature":"/** Rindle Realtime client knobs (Slice G-v). All optional — an app with no labeled queries never\n *  touches any of this. */\nexport interface RealtimeClientOptions {\n    /** The DECLARED room mutators (302 §5: declared, not derived). A mutator named here routes to\n     *  the attached room — it stages onto the room's own tables and ships on the room socket —\n     *  whenever exactly ONE room is attached; solo (no room) it takes the ordinary daemon path,\n     *  and with several rooms attached it routes daemon too (explicit multi-room binding is a\n     *  later slice). Every mutator NOT named here is a daemon mutator. A misdeclaration fails\n     *  SOFT (302 §5.1): the write lands on the other authority's tables, so the view just stops\n     *  feeling instant until the echo relays it — never a divergence. An explicit top-level\n     *  `domainPolicy` overrides this entirely. */\n    mutators?: readonly string[];\n    /** Build the ROOM ws transport for a lease's `realtime.wsEndpoint`. Default\n     *  `(endpoint) => new WsTransport(endpoint)`. Injectable for tests / custom ws impls. */\n    transport?: (endpoint: string) => Transport;\n    /** Loud anomaly surface — see {@link RealtimeAnomaly}. Every anomaly is also `console.error`'d. */\n    onAnomaly?: (anomaly: RealtimeAnomaly) => void;\n    /** How long before a room lease's `exp` the proactive token renewal fires (default 30s). The\n     *  renewal is a FRESH lease through the app query route (renewal-as-reauthorization), and the\n     *  live room sub proactively re-subscribes with the fresh token so the shell's TTL backstop\n     *  never fires on a healthy session. */\n    renewMarginMs?: number;\n}","description":"Rindle Realtime client knobs (Slice G-v). All optional — an app with no labeled queries never\ntouches any of this.","source":"packages/optimistic/src/client.ts","line":179,"href":"/reference/typescript/optimistic/#symbol-RealtimeClientOptions"},{"name":"RealtimeInspect","originalName":"RealtimeInspect","kind":"InterfaceDeclaration","signature":"/** Read-only realtime bookkeeping snapshot ({@link RindleClient.__realtimeInspect}) — test/devtools\n *  introspection, mirroring the backend's `__inspect` convention. */\nexport interface RealtimeInspect {\n    rooms: Record<string, {\n        wsEndpoint: string;\n        /** The room's OWNED tables (302 §2): wire table → its namespaced engine table — read back\n         *  from the BACKEND's registry (`backend.roomTablesFor`, the one source of truth; the\n         *  client keeps no shadow copy). */\n        promoted: Record<string, string>;\n        /** Live room-retained queries on this room, by remote key. */\n        queries: Record<string, {\n            name: string;\n            sourceQid: QueryId;\n            exp: number;\n            refCount: number;\n        }>;\n    }>;\n}","description":"Read-only realtime bookkeeping snapshot ({@link RindleClient.__realtimeInspect}) — test/devtools\nintrospection, mirroring the backend's `__inspect` convention.","source":"packages/optimistic/src/client.ts","line":203,"href":"/reference/typescript/optimistic/#symbol-RealtimeInspect"},{"name":"RealtimeLeaseBlock","originalName":"RealtimeLeaseBlock","kind":"InterfaceDeclaration","signature":"/** The room-serve block on a query lease (mirror of the api-server's `QueryLeaseRealtime`). */\nexport interface RealtimeLeaseBlock {\n    /** The store's gate/domain key for this room source (`connectSource`) — `\"room:<profile>/<key>\"`. */\n    sourceKey: string;\n    /** Where the ROOM ws opens — the lease's DEDICATED field. Never confuse it with the TOP-LEVEL\n     *  `wsEndpoint` (the read-router's whole-DAEMON-session migration signal). */\n    wsEndpoint: string;\n    /** The room shell's self-authorizing signed lease (seals the APPROVED query AST) — presented as\n     *  the room subscribe's `leaseToken`. */\n    roomToken: string;\n    /** Token expiry (ms epoch) — the renewal clock (renewal = a fresh lease through the app route). */\n    exp: number;\n    doc: string;\n    tables: RealtimeLeaseTableSpec[];\n}","description":"The room-serve block on a query lease (mirror of the api-server's `QueryLeaseRealtime`).","source":"packages/optimistic/src/client.ts","line":82,"href":"/reference/typescript/optimistic/#symbol-RealtimeLeaseBlock"},{"name":"RealtimeLeaseTableSpec","originalName":"RealtimeLeaseTableSpec","kind":"InterfaceDeclaration","signature":"/** One footprint table's spec on the lease wire (mirror of the api-server's `RoomTableSpec`).\n *  `footprintWhere` (H-iii lease-wire flip) is the EXACT footprint-membership predicate from the\n *  ONE unified compiler (`compileRoomScopeSpecs` — the same output the boot wire ships the room\n *  gate): present only for an exact footprint ROOT (lossless row-local extraction; the vacuous-true\n *  empty AND for an unconstrained one), ABSENT for child/correlated tables. It feeds the §3\n *  router's pk-membership read proof (`OptimisticBackend`'s routing table) — never authorization. */\nexport interface RealtimeLeaseTableSpec {\n    table: string;\n    footprintWhere?: Condition;\n    writable: {\n        kind: \"none\";\n    } | {\n        kind: \"predicate\";\n        where?: Condition;\n        joinKeyCols: string[];\n    };\n}","description":"One footprint table's spec on the lease wire (mirror of the api-server's `RoomTableSpec`).\n`footprintWhere` (H-iii lease-wire flip) is the EXACT footprint-membership predicate from the\nONE unified compiler (`compileRoomScopeSpecs` — the same output the boot wire ships the room\ngate): present only for an exact footprint ROOT (lossless row-local extraction; the vacuous-true\nempty AND for an unconstrained one), ABSENT for child/correlated tables. It feeds the §3\nrouter's pk-membership read proof (`OptimisticBackend`'s routing table) — never authorization.","source":"packages/optimistic/src/client.ts","line":73,"href":"/reference/typescript/optimistic/#symbol-RealtimeLeaseTableSpec"},{"name":"resetStableClientID","originalName":"resetStableClientID","kind":"FunctionDeclaration","signature":"/** Clear the persisted client identity so the next page load starts a fresh mid/lmid stream.\n *  Intended for dev recovery after out-of-band server state loss, not for normal operation. */\nexport declare function resetStableClientID(): void;","description":"Clear the persisted client identity so the next page load starts a fresh mid/lmid stream.\nIntended for dev recovery after out-of-band server state loss, not for normal operation.","source":"packages/optimistic/src/client-id.ts","line":52,"href":"/reference/typescript/optimistic/#symbol-resetStableClientID"},{"name":"ResultType","originalName":"ResultType","kind":"TypeAliasDeclaration","signature":"/** A query's SERVER-CHANNEL state, surfaced on its {@link ArrayView} (FOLDED-MUTATIONS-DESIGN §7 —\n *  formerly conflated with pending-ness, OPTIMISTIC-WRITES-DESIGN.md §6):\n *   - `unknown`  — not hydrated: the server has not produced a first result for this query yet;\n *   - `complete` — the server has answered. STAYS `complete` while a local mutation is pending (the\n *                  prediction is the client's best current answer); reversion on rejection is an\n *                  event (`onRejected`), not a downgrade of completeness;\n *   - `error`    — RESERVED for a future server-side, query-level error signal\n *                  (see `designs/101-QUERY-ERRORS-DESIGN.md`); no longer produced by a pending mutation.\n *  \"Is a prediction pending here?\" is now a separate reactive axis (the backend's `pending(qid)` /\n *  `onPending`), not folded into this type. A backend with no server lifecycle (the in-process\n *  engine) leaves every view `complete`. */\nexport type ResultType = \"unknown\" | \"complete\" | \"error\";","description":"A query's SERVER-CHANNEL state, surfaced on its {@link ArrayView } (FOLDED-MUTATIONS-DESIGN §7 —\nformerly conflated with pending-ness, OPTIMISTIC-WRITES-DESIGN.md §6):\n - `unknown`  — not hydrated: the server has not produced a first result for this query yet;\n - `complete` — the server has answered. STAYS `complete` while a local mutation is pending (the\n                prediction is the client's best current answer); reversion on rejection is an\n                event (`onRejected`), not a downgrade of completeness;\n - `error`    — RESERVED for a future server-side, query-level error signal\n                (see `designs/101-QUERY-ERRORS-DESIGN.md`); no longer produced by a pending mutation.\n\"Is a prediction pending here?\" is now a separate reactive axis (the backend's `pending(qid)` /\n`onPending`), not folded into this type. A backend with no server lifecycle (the in-process\nengine) leaves every view `complete`.","source":"packages/client/src/types.ts","line":155,"href":"/reference/typescript/optimistic/#symbol-ResultType"},{"name":"RindleClient","originalName":"RindleClient","kind":"InterfaceDeclaration","signature":"export interface RindleClient<S extends ColsMap, R extends ClientRegistry> {\n    store: Store<S>;\n    backend: OptimisticBackend<S>;\n    /** Retain a named query for navigation/prefetch. By default waits for server authority; pass\n     *  `{ until: \"present\" }` to continue as soon as the local view has a result. */\n    ensure<Q extends AnyQuery>(query: Q, options?: EnsureQueryOptions): Promise<void>;\n    /** Call `mutate.foo(args)` for a normal optimistic write, or `mutate.foo.folded(opts, args)` for a\n     *  debounced, last-value-wins folded write (FOLDED-MUTATIONS-DESIGN §3). */\n    mutate: {\n        [K in keyof R]: MutateFn<Parameters<R[K]>[1]>;\n    };\n    /** Assign IDs and enqueue every outstanding fold immediately. Also called on\n     *  `beforeunload`/`pagehide` as a best-effort flush; neither path confirms delivery. */\n    flushFolds(): void;\n    clientID: string;\n    /** Release retained prefetch queries, transports, and lifecycle listeners; close local persistence.\n     *  Flushes folded arguments into the queue first; does not await server confirmation. */\n    close(): void;\n    /** Read-only realtime bookkeeping snapshot (rooms, promoted tables + their client-held\n     *  `joinKeyCols`, live room queries) — the `__inspect`-convention test/devtools hook. */\n    __realtimeInspect(): RealtimeInspect;\n}","description":"","source":"packages/optimistic/src/client.ts","line":315,"href":"/reference/typescript/optimistic/#symbol-RindleClient"},{"name":"RindleClientOptions","originalName":"RindleClientOptions","kind":"InterfaceDeclaration","signature":"export interface RindleClientOptions<S extends ColsMap, R extends ClientRegistry> {\n    schema: Schema<S>;\n    /** The PREDICTED mutators (the API server holds the authoritative twins by name). */\n    mutators: R;\n    /** The acting principal for a shared (generator) mutator's `ctx.user` — the local identity the\n     *  optimistic prediction writes under (the server injects its OWN authenticated user for the\n     *  authoritative run). Re-read on each run, including replay. Keep this identity stable for\n     *  the client's lifetime and recreate the client on account changes. */\n    user?: () => string;\n    /** The app API server: named queries resolve to leases here, mutations push here. */\n    api: {\n        url: string;\n        routes?: {\n            query?: string;\n            mutate?: string;\n        };\n        /** Extra headers per request (auth). A function is re-evaluated per call. */\n        headers?: HeadersInit | (() => HeadersInit | Promise<HeadersInit>);\n        fetch?: typeof fetch;\n    };\n    /** Optional subscription transport override. Omit it in the normal unified setup: the first\n     *  query lease carries `wsEndpoint` + a fresh affinity ticket and opens the transport lazily.\n     *  - `{ wsUrl }` — a static endpoint (single daemon), opened eagerly; in a routed deploy this is\n     *    the SSR-injected bootstrap endpoint (READ-ROUTER-DESIGN.md §2.4). A routed lease naming a\n     *    different follower migrates the connection there.\n     *  - `{ wsUrl }` omitted (or this whole option omitted) — pure-lazy: the first lease's\n     *    `wsEndpoint` opens the connection (a\n     *    routed SPA with no SSR bootstrap).\n     *  - `{ transport }` — a pre-built transport (tests / in-process); fixed, no migration.\n     *\n     *  With a fixed `wsUrl`, set `affinity: true` to opt into FOLLOWER-AFFINITY mode (design §2).\n     *  With no daemon option, a lease that returns an affinity ticket enables the same mode\n     *  automatically before opening its socket. The ticket is persisted per-tab and forwarded on\n     *  later leases so both legs pin the same nearby follower. Ignored for `{ transport }`. */\n    daemon?: {\n        wsUrl?: string;\n        affinity?: boolean;\n    } | {\n        transport: Transport;\n    };\n    /** Stable client identity. Default: a per-origin base (localStorage) plus per-tab and per-instance\n     *  suffixes, so each tab — and each client instance within a tab — gets its own mid sequence yet a\n     *  reload keeps it; falls back to a fresh random id when web storage is unavailable. Pass a value\n     *  to override. */\n    clientID?: string;\n    /** A policy rejection's reason (the prediction's snap-back rides the lmid release). Fires for\n     *  BOTH planes since H-v: the HTTP mutate route's per-envelope rejections AND a room's\n     *  `mutationOutcome {kind:\"rejected\"}` frames — one surface, whichever authority said no. */\n    onRejected?: (envelope: MutationEnvelope, reason: string) => void;\n    /** A failed mutate FLUSH — the transport/authority leg, not a policy verdict: the batch is\n     *  retried with backoff and nothing has been confirmed yet, so the pending mutations stay\n     *  predicted and the queue is head-of-line blocked until it succeeds. Fires once per attempt.\n     *  This is the twin of {@link onRejected}: `onRejected` is \"the authority said no\" (final,\n     *  lmid already advanced), this is \"the authority never answered\" (retrying).\n     *\n     *  LOUD by contract — every attempt reaching this hook is ALSO `console.error`'d (backed off\n     *  to attempts 1, 2, 4, 8, … so a long outage doesn't flood the console), because an\n     *  indefinitely retried flush is indistinguishable from a hung app if it stays silent. */\n    onMutationError?: (err: unknown, attempt: number) => void;\n    /** Persist `local: true` tables across reloads and keep them live-coherent across tabs\n     *  (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md`). `user` is the storage identity (§3.2) — one IDB\n     *  database per (origin, user); pass a sentinel like `\"anon\"` for a signed-out mode. When set,\n     *  `createRindleClient` awaits the initial restore attempt before returning. Storage failures\n     *  can leave tables empty while local writes remain usable. Close the old client before calling\n     *  `deleteLocalPersistence(user)` at logout; deletion is never implicit.\n     *  Per-table opt-out: declare `table(name, { local: \"session\" })` for local state that must stay\n     *  ephemeral and per-tab (e.g. selection) even with persistence on (§5.4). */\n    persistLocal?: PersistLocalOptions;\n    queue?: {\n        maxBatch?: number;\n        retryDelayMs?: (attempt: number) => number;\n    };\n    /** Explicitly selects a mutation's confirming stream. Its domain supplies the mutation ID,\n     *  transport, and confirmation watermark. Returning `undefined` selects `\"daemon\"`.\n     *  If this policy is omitted, `realtime.mutators` supplies the declared room routing policy;\n     *  without either declaration, mutations route to the daemon. Routes are not inferred from\n     *  reads or writes. A room deopt can re-enqueue the mutation on the daemon stream. */\n    domainPolicy?: (name: string, args: unknown) => string | undefined;\n    /** Rindle Realtime client knobs (G-v resolve-then-register) — see {@link RealtimeClientOptions}. */\n    realtime?: RealtimeClientOptions;\n    /** Development-only recovery knobs. Keep off in production: a mutation gap means state loss\n     *  or two writers sharing a clientID, and should be investigated. */\n    dev?: {\n        /** On a mutation-gap response, clear the persisted clientID and hard reload the page. This\n         *  recovers from dev DB wipes while making the reset visible to the developer. */\n        resetOnMutationGap?: boolean;\n    };\n}","description":"","source":"packages/optimistic/src/client.ts","line":237,"href":"/reference/typescript/optimistic/#symbol-RindleClientOptions"},{"name":"ROOM_CLIENT_MUTATIONS_TABLE","originalName":"ROOM_CLIENT_MUTATIONS_TABLE","kind":"VariableDeclaration","signature":"/** §7.1 domain-scoped room ledger: `(doc, client_id, last_mutation_id)`, PK `(doc, client_id)` —\n *  the FIRST daemon-carried room-lmid path (the named invariant's enforcement point). */\nexport declare const ROOM_CLIENT_MUTATIONS_TABLE = \"_rindle_room_client_mutations\";","description":"§7.1 domain-scoped room ledger: `(doc, client_id, last_mutation_id)`, PK `(doc, client_id)` —\nthe FIRST daemon-carried room-lmid path (the named invariant's enforcement point).","source":"packages/optimistic/src/system-streams.ts","line":33,"href":"/reference/typescript/optimistic/#symbol-ROOM_CLIENT_MUTATIONS_TABLE"},{"name":"ROOM_MUTATION_OUTCOMES_TABLE","originalName":"ROOM_MUTATION_OUTCOMES_TABLE","kind":"VariableDeclaration","signature":"/** §3.3 durable outcome rows: `(doc, client_id, mid, kind, reason, name, args)`, PK\n *  `(doc, client_id, mid)` — the H-iv-b `mutationOutcome` frame's durable twin (Slice I-ii\n *  co-commits one per NON-applied mid; an absent row under a covering lmid means `applied`). */\nexport declare const ROOM_MUTATION_OUTCOMES_TABLE = \"_rindle_room_mutation_outcomes\";","description":"§3.3 durable outcome rows: `(doc, client_id, mid, kind, reason, name, args)`, PK\n`(doc, client_id, mid)` — the H-iv-b `mutationOutcome` frame's durable twin (Slice I-ii\nco-commits one per NON-applied mid; an absent row under a covering lmid means `applied`).","source":"packages/optimistic/src/system-streams.ts","line":37,"href":"/reference/typescript/optimistic/#symbol-ROOM_MUTATION_OUTCOMES_TABLE"},{"name":"ROOM_WATERMARK_TABLE","originalName":"ROOM_WATERMARK_TABLE","kind":"VariableDeclaration","signature":"/** §4.2 downgrade fence: `(doc, flush_seq)`, PK `doc` — monotone, co-committed per room flush. */\nexport declare const ROOM_WATERMARK_TABLE = \"_rindle_room_watermark\";","description":"§4.2 downgrade fence: `(doc, flush_seq)`, PK `doc` — monotone, co-committed per room flush.","source":"packages/optimistic/src/system-streams.ts","line":30,"href":"/reference/typescript/optimistic/#symbol-ROOM_WATERMARK_TABLE"},{"name":"roomDomainKey","originalName":"roomDomainKey","kind":"FunctionDeclaration","signature":"/** The domain/gate key a room doc's daemon-carried confirms fold into — the SAME key the lease\n *  wire mints for the room source (`api-server: sourceKey = \"room:\" + doc`), so a daemon-carried\n *  lmid and a live room socket's lmid stream land on ONE watermark entry. */\nexport declare function roomDomainKey(doc: string): string;","description":"The domain/gate key a room doc's daemon-carried confirms fold into — the SAME key the lease\nwire mints for the room source (`api-server: sourceKey = \"room:\" + doc`), so a daemon-carried\nlmid and a live room socket's lmid stream land on ONE watermark entry.","source":"packages/optimistic/src/system-streams.ts","line":102,"href":"/reference/typescript/optimistic/#symbol-roomDomainKey"},{"name":"RowState","originalName":"RowState","kind":"InterfaceDeclaration","signature":"/** The replication unit everywhere (§4.3): idempotent full-row state. `row: null` = tombstone\n *  (live protocol only — removes DELETE the IDB record; there are no persisted tombstones). */\nexport interface RowState {\n    table: string;\n    pkKey: string;\n    row: WireValue[] | null;\n}","description":"The replication unit everywhere (§4.3): idempotent full-row state. `row: null` = tombstone\n(live protocol only — removes DELETE the IDB record; there are no persisted tombstones).","source":"packages/optimistic/src/local-persist.ts","line":142,"href":"/reference/typescript/optimistic/#symbol-RowState"},{"name":"SCOPE_SESSIONS_TABLE","originalName":"SCOPE_SESSIONS_TABLE","kind":"VariableDeclaration","signature":"/** §4.1 occupancy: `(scope, client_id, expires_at)`, PK `(scope, client_id)`. The row delta IS\n *  the upgrade doorbell (Slice I-iv reacts; I-iii only folds the map). */\nexport declare const SCOPE_SESSIONS_TABLE = \"_rindle_scope_sessions\";","description":"§4.1 occupancy: `(scope, client_id, expires_at)`, PK `(scope, client_id)`. The row delta IS\nthe upgrade doorbell (Slice I-iv reacts; I-iii only folds the map).","source":"packages/optimistic/src/system-streams.ts","line":28,"href":"/reference/typescript/optimistic/#symbol-SCOPE_SESSIONS_TABLE"},{"name":"ScopeSessionsEvent","originalName":"ScopeSessionsEvent","kind":"InterfaceDeclaration","signature":"/** One I-iv doorbell event ({@link OptimisticBackend.onScopeSessions}, §4.1): a release folded\n *  scope-session rows for `scope`, and `others` is the count of OTHER clients' unexpired sessions\n *  there — {@link OptimisticBackend.otherScopeSessions} evaluated at fold time (the same one rule,\n *  on the injectable {@link FoldClock}, so a virtual-clock harness gets deterministic verdicts).\n *  The consumer (client.ts) triggers its one debounced re-lease on the 0→≥1 transition; expired\n *  and own-clientID rows never count, so a solo client's own row can never ring its own bell. */\nexport interface ScopeSessionsEvent {\n    scope: string;\n    others: number;\n}","description":"One I-iv doorbell event ({@link OptimisticBackend.onScopeSessions}, §4.1): a release folded\nscope-session rows for `scope`, and `others` is the count of OTHER clients' unexpired sessions\nthere — {@link OptimisticBackend.otherScopeSessions} evaluated at fold time (the same one rule,\non the injectable {@link FoldClock}, so a virtual-clock harness gets deterministic verdicts).\nThe consumer (client.ts) triggers its one debounced re-lease on the 0→≥1 transition; expired\nand own-clientID rows never count, so a solo client's own row can never ring its own bell.","source":"packages/optimistic/src/backend.ts","line":388,"href":"/reference/typescript/optimistic/#symbol-ScopeSessionsEvent"},{"name":"SharedMutator","originalName":"SharedMutator","kind":"TypeAliasDeclaration","signature":"/** A generator (isomorphic) mutator, shared verbatim by both tiers: the client trusts typed `args`,\n *  the server parses untrusted args into `Args` before invoking. */\nexport type SharedMutator<Args, Ctx extends MutatorCtx = MutatorCtx> = (tx: IsoTx, args: Args, ctx: Ctx) => MutationGen;","description":"A generator (isomorphic) mutator, shared verbatim by both tiers: the client trusts typed `args`,\nthe server parses untrusted args into `Args` before invoking.","source":"packages/client/src/mutation-ops.ts","line":152,"href":"/reference/typescript/optimistic/#symbol-SharedMutator"},{"name":"stableClientID","originalName":"stableClientID","kind":"FunctionDeclaration","signature":"/** The connection's stable clientID. A per-origin base (localStorage) keeps one logical identity\n *  across reloads; a per-tab suffix (sessionStorage) gives each tab its OWN mid/lmid stream; a\n *  per-load instance suffix keeps two clients constructed in ONE tab from sharing that stream. Falls\n *  back to a fresh random id when web storage is unavailable.\n *\n *  Note: an explicit \"duplicate tab\" copies sessionStorage, so the clone briefly shares its source's\n *  suffix until reloaded — the one residual case of the shared-clientID collision. */\nexport declare function stableClientID(): string;","description":"The connection's stable clientID. A per-origin base (localStorage) keeps one logical identity\nacross reloads; a per-tab suffix (sessionStorage) gives each tab its OWN mid/lmid stream; a\nper-load instance suffix keeps two clients constructed in ONE tab from sharing that stream. Falls\nback to a fresh random id when web storage is unavailable.\n\nNote: an explicit \"duplicate tab\" copies sessionStorage, so the clone briefly shares its source's\nsuffix until reloaded — the one residual case of the shared-clientID collision.","source":"packages/optimistic/src/client-id.ts","line":109,"href":"/reference/typescript/optimistic/#symbol-stableClientID"},{"name":"StoredRow","originalName":"StoredRow","kind":"InterfaceDeclaration","signature":"export interface StoredRow {\n    table: string;\n    pkKey: string;\n    row: WireValue[];\n}","description":"","source":"packages/optimistic/src/local-persist.ts","line":134,"href":"/reference/typescript/optimistic/#symbol-StoredRow"},{"name":"SystemStreamSpec","originalName":"SystemStreamSpec","kind":"InterfaceDeclaration","signature":"/** What a system retain declares about itself (`OptimisticBackend.retainSystemQuery`): which\n *  system table its frames carry, and the scope/doc its minted predicate was scoped to. The fold\n *  filters rows against this spec (AND against the client's own `clientID`) as DEFENSE IN DEPTH —\n *  the server predicate is the tight path, but a server that couldn't scope (no `clientId` on the\n *  lease request) legitimately delivers other clients' rows, and a confused server must never\n *  invent verdicts for us. */\nexport interface SystemStreamSpec {\n    table: SystemStreamTable;\n    /** The §4.1 occupancy scope the doorbell was minted for (`_rindle_scope_sessions` only). */\n    scope?: string;\n    /** The room doc the fence entry was minted for (the three room tables). */\n    doc?: string;\n}","description":"What a system retain declares about itself (`OptimisticBackend.retainSystemQuery`): which\nsystem table its frames carry, and the scope/doc its minted predicate was scoped to. The fold\nfilters rows against this spec (AND against the client's own `clientID`) as DEFENSE IN DEPTH —\nthe server predicate is the tight path, but a server that couldn't scope (no `clientId` on the\nlease request) legitimately delivers other clients' rows, and a confused server must never\ninvent verdicts for us.","source":"packages/optimistic/src/system-streams.ts","line":85,"href":"/reference/typescript/optimistic/#symbol-SystemStreamSpec"},{"name":"SystemStreamTable","originalName":"SystemStreamTable","kind":"TypeAliasDeclaration","signature":"/** The tables a system retain may serve — the fold category discriminant. */\nexport type SystemStreamTable = typeof SCOPE_SESSIONS_TABLE | typeof ROOM_WATERMARK_TABLE | typeof ROOM_CLIENT_MUTATIONS_TABLE | typeof ROOM_MUTATION_OUTCOMES_TABLE;","description":"The tables a system retain may serve — the fold category discriminant.","source":"packages/optimistic/src/system-streams.ts","line":73,"href":"/reference/typescript/optimistic/#symbol-SystemStreamTable"},{"name":"WriteRecord","originalName":"WriteRecord","kind":"InterfaceDeclaration","signature":"/** One captured write, pk-granular (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §3.2 #1: \"the\n *  writers already receive `(table, row)`... this is pure capture, no semantic change\"). `row` is\n *  the post-write image (positional wire cells, schema column order); `undefined` for a `remove` —\n *  no row survives it, and `row === undefined` stays the remove marker.\n *\n *  `oldRow` is the PRE-IMAGE, captured for a `remove` AND an `edit` (H-ii): the full-width row\n *  read via `tx.get` immediately BEFORE the write staged — read-your-writes, so a write to the\n *  same pk earlier in the SAME invocation shows through — falling back to the caller's asserted\n *  old row when the pk is not txn-visible (a raw remove/edit of an absent row; incl. the\n *  pk-MOVING raw edit, whose record is keyed by the NEW pk yet whose pre-image is the caller's\n *  OLD row). A captured remove/edit thus always carries a full-width pre-image — with ONE\n *  exception: a record that collapses to a (re-)insert has none, see the matrix.\n *\n *  Coalescing within one invocation is last-write-wins per pk on `row` (the final image matches\n *  the engine head's own semantics for that pk) with `oldRow` pinned to the TXN-ENTRY BASE — the\n *  H-ii matrix:\n *    - edit-after-add / edit-after-remove: the record collapses to a (re-)insert — post-image\n *      only, NO `oldRow` (the pk did not pre-exist this invocation's base; presence hold-back\n *      uses `row`).\n *    - edit-after-edit: keeps the FIRST pre-image (the txn-entry base — the chain nets to ONE\n *      edit from the base to the final image).\n *    - remove-after-edit / remove-after-remove: keeps the ORIGINAL pre-image (the first write's\n *      captured base), NOT the edited transient — the net effect is a remove of the row the\n *      external world last knew.\n *    - remove-after-add: keeps the txn-visible pre-image (the transient added row — the pk had\n *      no base, and this is the only truthful full-width row there is; G-iii pinned it).\n *    - add-after-remove (a re-insert): drops `oldRow` (presence hold-back uses `row`).\n *  Across rebase re-invocations the write-set is union-never-shrink ({@link mergeWriteSet}): a\n *  re-run that no-ops keeps the prior record — and its pre-image — intact. */\nexport interface WriteRecord {\n    table: string;\n    pk: WireValue[];\n    row: WireValue[] | undefined;\n    oldRow?: WireValue[];\n}","description":"One captured write, pk-granular (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §3.2 #1: \"the\nwriters already receive `(table, row)`... this is pure capture, no semantic change\"). `row` is\nthe post-write image (positional wire cells, schema column order); `undefined` for a `remove` —\nno row survives it, and `row === undefined` stays the remove marker.\n\n`oldRow` is the PRE-IMAGE, captured for a `remove` AND an `edit` (H-ii): the full-width row\nread via `tx.get` immediately BEFORE the write staged — read-your-writes, so a write to the\nsame pk earlier in the SAME invocation shows through — falling back to the caller's asserted\nold row when the pk is not txn-visible (a raw remove/edit of an absent row; incl. the\npk-MOVING raw edit, whose record is keyed by the NEW pk yet whose pre-image is the caller's\nOLD row). A captured remove/edit thus always carries a full-width pre-image — with ONE\nexception: a record that collapses to a (re-)insert has none, see the matrix.\n\nCoalescing within one invocation is last-write-wins per pk on `row` (the final image matches\nthe engine head's own semantics for that pk) with `oldRow` pinned to the TXN-ENTRY BASE — the\nH-ii matrix:\n  - edit-after-add / edit-after-remove: the record collapses to a (re-)insert — post-image\n    only, NO `oldRow` (the pk did not pre-exist this invocation's base; presence hold-back\n    uses `row`).\n  - edit-after-edit: keeps the FIRST pre-image (the txn-entry base — the chain nets to ONE\n    edit from the base to the final image).\n  - remove-after-edit / remove-after-remove: keeps the ORIGINAL pre-image (the first write's\n    captured base), NOT the edited transient — the net effect is a remove of the row the\n    external world last knew.\n  - remove-after-add: keeps the txn-visible pre-image (the transient added row — the pk had\n    no base, and this is the only truthful full-width row there is; G-iii pinned it).\n  - add-after-remove (a re-insert): drops `oldRow` (presence hold-back uses `row`).\nAcross rebase re-invocations the write-set is union-never-shrink ({@link mergeWriteSet}): a\nre-run that no-ops keeps the prior record — and its pre-image — intact.","source":"packages/optimistic/src/backend.ts","line":198,"href":"/reference/typescript/optimistic/#symbol-WriteRecord"},{"name":"WriteSet","originalName":"WriteSet","kind":"TypeAliasDeclaration","signature":"/** The pk-granular write-set captured over ONE mutator invocation: table → pk-key (a stable-JSON\n *  encoding of the pk cells, {@link stableJson}) → that pk's write, LAST-WRITE-WINS within the\n *  invocation — an add-then-edit or edit-then-edit of the SAME pk collapses to its final image,\n *  matching the engine head's own semantics for that pk. Chosen (over a flat array) because the\n *  later routing proof needs \"is pk P in the writable scope\" / \"did we already see this pk in this\n *  invocation\" as cheap lookups, and rebase re-invocation needs to MERGE a fresh write-set into an\n *  accumulated one ({@link mergeWriteSet}) — both are Map operations, not scans.\n *\n *  `touched` (the pre-existing table-granular `Set<string>` the pending axis reads, §7.2) is\n *  exactly `new Set(writeSet.keys())` — derived from this, never separately populated, so the two\n *  can never drift. */\nexport type WriteSet = Map<string, Map<string, WriteRecord>>;","description":"The pk-granular write-set captured over ONE mutator invocation: table → pk-key (a stable-JSON\nencoding of the pk cells, {@link stableJson}) → that pk's write, LAST-WRITE-WINS within the\ninvocation — an add-then-edit or edit-then-edit of the SAME pk collapses to its final image,\nmatching the engine head's own semantics for that pk. Chosen (over a flat array) because the\nlater routing proof needs \"is pk P in the writable scope\" / \"did we already see this pk in this\ninvocation\" as cheap lookups, and rebase re-invocation needs to MERGE a fresh write-set into an\naccumulated one ({@link mergeWriteSet}) — both are Map operations, not scans.\n\n`touched` (the pre-existing table-granular `Set<string>` the pending axis reads, §7.2) is\nexactly `new Set(writeSet.keys())` — derived from this, never separately populated, so the two\ncan never drift.","source":"packages/optimistic/src/backend.ts","line":216,"href":"/reference/typescript/optimistic/#symbol-WriteSet"},{"name":"YieldEffect","originalName":"YieldEffect","kind":"TypeAliasDeclaration","signature":"/** Everything a generator mutator may `yield`: a write {@link MutationOp}, a point {@link ReadEffect},\n *  a full-query {@link QueryEffect}, or a {@link BatchEffect} fan-out. */\nexport type YieldEffect = MutationOp | ReadEffect | BatchEffect | QueryEffect;","description":"Everything a generator mutator may `yield`: a write {@link MutationOp}, a point {@link ReadEffect},\na full-query {@link QueryEffect}, or a {@link BatchEffect} fan-out.","source":"packages/client/src/mutation-ops.ts","line":95,"href":"/reference/typescript/optimistic/#symbol-YieldEffect"}]},{"name":"@rindle/query-compiler","source":"packages/query-compiler/src/index.ts","package":"@rindle/query-compiler","symbols":[{"name":"Aggregate","originalName":"Aggregate","kind":"TypeAliasDeclaration","signature":"/** An aggregate over a (correlated) subquery's rows (`REDUCE-DESIGN.md`). v1: `count(*)`.\n *  Set on a `related` subquery (`Ast.aggregate`), it marks that relationship a count\n *  aggregate the builder lowers to a scalar-projected singular relationship (§9). */\nexport type Aggregate = \"count\";","description":"An aggregate over a (correlated) subquery's rows (`REDUCE-DESIGN.md`). v1: `count(*)`.\nSet on a `related` subquery (`Ast.aggregate`), it marks that relationship a count\naggregate the builder lowers to a scalar-projected singular relationship (§9).","source":"packages/client/src/ast.ts","line":67,"href":"/reference/typescript/query-compiler/#symbol-Aggregate"},{"name":"Ast","originalName":"Ast","kind":"InterfaceDeclaration","signature":"/** The query AST. `table` is the only required field; the builder omits empty/false fields\n *  (matching the Rust `skip_serializing_if`), which the deserializer treats as absent. */\nexport interface Ast {\n    table: string;\n    alias?: string;\n    /** Projection (PROJECTION-SUPPORT-DESIGN.md §6). Absent ⇒ select all columns; present ⇒\n     *  project to just these (drives what syncs + what the view reports). Serializes only when\n     *  set, matching the Rust `Ast.select`'s `skip_serializing_if`. */\n    select?: string[];\n    where?: Condition;\n    related?: CorrelatedSubquery[];\n    start?: Bound;\n    limit?: number;\n    one?: boolean;\n    /** Aggregate this (sub)query's rows instead of materializing them (`REDUCE-DESIGN.md`\n     *  §9). `count` on a `related` subquery surfaces a scalar `commentCount` field; the\n     *  builder lowers it to a scalar-projected singular relationship. Absent ⇒ ordinary rows. */\n    aggregate?: Aggregate;\n    /** The {@link Ast.aggregate} value is **precomputed** — supplied as rows of a (synthetic)\n     *  source table rather than reduced from child rows. Set by the normalized client's AST\n     *  rewrite (`AGGREGATE-SYNC-DESIGN.md` §3.3) so the local engine reads the server's count\n     *  with a plain singular join + the same projection instead of a `reduce`. Only meaningful\n     *  with `aggregate`; absent ⇒ `false`. */\n    aggregatePrecomputed?: boolean;\n    /** Top-level `GROUP BY` columns (names), meaningful only alongside a root {@link Ast.aggregate}\n     *  (`REDUCE-DESIGN.md` §8). Empty + `aggregate` set ⇒ a **global** aggregate (one `[count]` row);\n     *  non-empty ⇒ one `[group…, count]` row per distinct value-tuple. Distinct from a relationship\n     *  aggregate's implicit grouping (the correlation child key). Absent on the wire ⇒ empty. */\n    groupBy?: string[];\n    /** `HAVING` — a filter over the **post-aggregation** rows of a root {@link Ast.aggregate}\n     *  (`REDUCE-DESIGN.md` §4: a filter directly above the `reduce`). Its condition addresses the\n     *  aggregate's *output* columns — the {@link Ast.groupBy} columns and the synthetic `count`\n     *  column — not base-table columns (those go in {@link Ast.where}, which filters rows *below* the\n     *  reduce). Absent ⇒ no post-aggregation filter. */\n    having?: Condition;\n    orderBy?: OrderPart[];\n}","description":"The query AST. `table` is the only required field; the builder omits empty/false fields\n(matching the Rust `skip_serializing_if`), which the deserializer treats as absent.","source":"packages/client/src/ast.ts","line":71,"href":"/reference/typescript/query-compiler/#symbol-Ast"},{"name":"Bound","originalName":"Bound","kind":"InterfaceDeclaration","signature":"/** A paging lower bound (`Bound`, `src/ast.rs`). `row` is a *partial* wire row — the bound\n *  columns by name (only the sort columns are read by the engine's `Skip` comparator).\n *  `exclusive` ⇒ start *after* the bound row (`Basis::After`); else *at* it (`Basis::At`). */\nexport interface Bound {\n    row: Record<string, LitValue>;\n    exclusive: boolean;\n}","description":"A paging lower bound (`Bound`, `src/ast.rs`). `row` is a *partial* wire row — the bound\ncolumns by name (only the sort columns are read by the engine's `Skip` comparator).\n`exclusive` ⇒ start *after* the bound row (`Basis::After`); else *at* it (`Basis::At`).","source":"packages/client/src/ast.ts","line":53,"href":"/reference/typescript/query-compiler/#symbol-Bound"},{"name":"Cardinality","originalName":"Cardinality","kind":"TypeAliasDeclaration","signature":"/** Whether a relationship yields a single child object (`one`) or an array (`many`). */\nexport type Cardinality = \"one\" | \"many\";","description":"Whether a relationship yields a single child object (`one`) or an array (`many`).","source":"packages/query-compiler/src/catalog.ts","line":8,"href":"/reference/typescript/query-compiler/#symbol-Cardinality"},{"name":"Catalog","originalName":"Catalog","kind":"InterfaceDeclaration","signature":"/**\n * The catalog: every table the compiler may reference, keyed by table name. Produced\n * statically by `rindle pg prepare` from an ephemeral migration-built Postgres (§7,\n * Phase B); hand-authored for tests. A pure input — the compiler never touches a database\n * to obtain it.\n */\nexport interface Catalog {\n    tables: Record<string, TableSchema>;\n}","description":"The catalog: every table the compiler may reference, keyed by table name. Produced\nstatically by `rindle pg prepare` from an ephemeral migration-built Postgres (§7,\nPhase B); hand-authored for tests. A pure input — the compiler never touches a database\nto obtain it.","source":"packages/query-compiler/src/catalog.ts","line":57,"href":"/reference/typescript/query-compiler/#symbol-Catalog"},{"name":"ColumnType","originalName":"ColumnType","kind":"InterfaceDeclaration","signature":"/**\n * Per-column type detail the Postgres compiler needs for value-model↔native-type\n * reconciliation (§6.2). Mirrors z2s's `ServerColumnSchema`: the raw Postgres type name\n * plus the two flags the cast switch branches on. The extension over what\n * `rindle-pg-source` derives today (§7, review decision 2): enums and arrays are carried\n * distinctly instead of collapsing into a text fallback.\n *\n * - `type` — the native Postgres type name: `\"int4\"`, `\"text\"`, `\"bool\"`, `\"float8\"`,\n *   `\"numeric\"`, `\"timestamptz\"`, `\"timestamp\"`, `\"date\"`, `\"timetz\"`, `\"time\"`, `\"uuid\"`,\n *   `\"json\"`/`\"jsonb\"`, or an **enum type name** (paired with `isEnum: true`).\n * - `isEnum` — `type` names a Postgres enum ⇒ cast via `$N::text::\"<type>\"`.\n * - `isArray` — the column is an array ⇒ unnest via `jsonb_array_elements_text`.\n *\n * The SQLite oracle dialect ignores this entirely: it binds native values (no casts).\n */\nexport interface ColumnType {\n    type: string;\n    isEnum: boolean;\n    isArray: boolean;\n}","description":"Per-column type detail the Postgres compiler needs for value-model↔native-type\nreconciliation (§6.2). Mirrors z2s's `ServerColumnSchema`: the raw Postgres type name\nplus the two flags the cast switch branches on. The extension over what\n`rindle-pg-source` derives today (§7, review decision 2): enums and arrays are carried\ndistinctly instead of collapsing into a text fallback.\n\n- `type` — the native Postgres type name: `\"int4\"`, `\"text\"`, `\"bool\"`, `\"float8\"`,\n  `\"numeric\"`, `\"timestamptz\"`, `\"timestamp\"`, `\"date\"`, `\"timetz\"`, `\"time\"`, `\"uuid\"`,\n  `\"json\"`/`\"jsonb\"`, or an **enum type name** (paired with `isEnum: true`).\n- `isEnum` — `type` names a Postgres enum ⇒ cast via `$N::text::\"<type>\"`.\n- `isArray` — the column is an array ⇒ unnest via `jsonb_array_elements_text`.\n\nThe SQLite oracle dialect ignores this entirely: it binds native values (no casts).","source":"packages/query-compiler/src/catalog.ts","line":25,"href":"/reference/typescript/query-compiler/#symbol-ColumnType"},{"name":"compile","originalName":"compile","kind":"FunctionDeclaration","signature":"/**\n * Compile `ast` against `catalog` into `{ sql, params }` (§4). A pure function of its\n * inputs — no database access (Invariant 2). The root is **singular** when `ast.one` is set\n * (a single JSON object or `null`), else **plural** (a JSON array).\n */\nexport declare function compile(ast: Ast, catalog: Catalog, opts: CompileOptions): CompiledQuery;","description":"Compile `ast` against `catalog` into `{ sql, params }` (§4). A pure function of its\ninputs — no database access (Invariant 2). The root is **singular** when `ast.one` is set\n(a single JSON object or `null`), else **plural** (a JSON array).","source":"packages/query-compiler/src/index.ts","line":66,"href":"/reference/typescript/query-compiler/#symbol-compile"},{"name":"CompiledQuery","originalName":"CompiledQuery","kind":"InterfaceDeclaration","signature":"/**\n * A compiled query: one SQL `SELECT` plus its positional bound parameters. `sql` returns a\n * single row with a single column `\"rindle_result\"` — the whole nested result as JSON\n * (`jsonb` on Postgres, `json` text on SQLite). No runtime value is ever interpolated into\n * `sql`; every filter/paging value is a bound parameter (Invariant 4).\n */\nexport interface CompiledQuery {\n    sql: string;\n    /** In order: `$1..$n` for Postgres, `?` for SQLite. */\n    params: unknown[];\n}","description":"A compiled query: one SQL `SELECT` plus its positional bound parameters. `sql` returns a\nsingle row with a single column `\"rindle_result\"` — the whole nested result as JSON\n(`jsonb` on Postgres, `json` text on SQLite). No runtime value is ever interpolated into\n`sql`; every filter/paging value is a bound parameter (Invariant 4).","source":"packages/query-compiler/src/index.ts","line":55,"href":"/reference/typescript/query-compiler/#symbol-CompiledQuery"},{"name":"CompileOptions","originalName":"CompileOptions","kind":"InterfaceDeclaration","signature":"export interface CompileOptions {\n    dialect: DialectName;\n}","description":"","source":"packages/query-compiler/src/index.ts","line":45,"href":"/reference/typescript/query-compiler/#symbol-CompileOptions"},{"name":"Condition","originalName":"Condition","kind":"TypeAliasDeclaration","signature":"/** The filter tree — `type`-tagged; recursive. There is no generic NOT node (negation is\n *  via the negated operators and `NOT EXISTS`, matching `src/ast.rs` `Condition`). */\nexport type Condition = {\n    type: \"simple\";\n    op: SimpleOp;\n    left: ValuePosition;\n    right: ValuePosition;\n} | {\n    type: \"and\";\n    conditions: Condition[];\n} | {\n    type: \"or\";\n    conditions: Condition[];\n} | {\n    type: \"correlatedSubquery\";\n    related: CorrelatedSubquery;\n    op: ExistsOp;\n    flip?: boolean;\n    scalar?: boolean;\n};","description":"The filter tree — `type`-tagged; recursive. There is no generic NOT node (negation is\nvia the negated operators and `NOT EXISTS`, matching `src/ast.rs` `Condition`).","source":"packages/client/src/ast.ts","line":39,"href":"/reference/typescript/query-compiler/#symbol-Condition"},{"name":"CorrelatedSubquery","originalName":"CorrelatedSubquery","kind":"InterfaceDeclaration","signature":"export interface CorrelatedSubquery {\n    correlation: Correlation;\n    subquery: Ast;\n    system?: \"client\" | \"permissions\" | \"test\";\n}","description":"","source":"packages/client/src/ast.ts","line":58,"href":"/reference/typescript/query-compiler/#symbol-CorrelatedSubquery"},{"name":"Correlation","originalName":"Correlation","kind":"InterfaceDeclaration","signature":"export interface Correlation {\n    parentField: string[];\n    childField: string[];\n}","description":"","source":"packages/client/src/ast.ts","line":45,"href":"/reference/typescript/query-compiler/#symbol-Correlation"},{"name":"Dialect","originalName":"Dialect","kind":"InterfaceDeclaration","signature":"export interface Dialect {\n    readonly name: \"postgres\" | \"sqlite\";\n    /** `json_object('k', v, …)` | `jsonb_build_object('k', v, …)`. `parts` are the flat\n     *  `'key', valueExpr` fragments, in order. */\n    objectBuild(parts: string[]): string;\n    /** The array aggregate over `elem` with `orderSql` (e.g. ` ORDER BY __o0 ASC`) inside:\n     *  `json_group_array(elem ORDER BY …)` | `jsonb_agg(elem ORDER BY …)`. */\n    groupArray(elem: string, orderSql: string): string;\n    /** The empty-array default for the `COALESCE` wrapper: `'[]'` | `'[]'::jsonb`. */\n    readonly emptyArray: string;\n    /** Re-assert the JSON subtype on a value round-tripped through a subquery's `AS` column\n     *  (`json(x)` in SQLite; identity in Postgres, where `jsonb` is a real type). */\n    reassertJson(x: string): string;\n    /** The truthy/falsy constants for empty `AND`/`OR` folding and boolean keyword positions:\n     *  `1`/`0` | `TRUE`/`FALSE`. */\n    readonly trueLit: string;\n    readonly falseLit: string;\n    /** An `ORDER BY` direction with the engine's null-low ordering made explicit where the\n     *  dialect default differs (§8): SQLite is null-low by default (`ASC`/`DESC`); Postgres's\n     *  default is the opposite, so it must emit `ASC NULLS FIRST` / `DESC NULLS LAST`. */\n    orderDir(dir: Dir): string;\n    /** Project a stored column into the value model's representation for the result JSON.\n     *  Identity in SQLite; the outbound half of §6.2 in Postgres (e.g. timestamptz → epoch-ms). */\n    projectColumn(colRef: string, col: ColumnType | null): string;\n    /** Bind a scalar filter/paging value as a parameter: push onto `params`, return the\n     *  placeholder SQL. `col` is the compared column's type when known (drives the Postgres\n     *  `::text::<type>` casts, §6.2); `null` ⇒ infer from the JS type. SQLite ignores `col`\n     *  and `isComparison` — it binds natives. */\n    bindValue(params: unknown[], value: LitScalar, col: ColumnType | null, isComparison: boolean): string;\n    /** Double-quote an identifier, doubling embedded `\"`. Identical across dialects (kept on\n     *  the seam for uniformity). */\n    quoteIdent(name: string): string;\n}","description":"","source":"packages/query-compiler/src/dialect.ts","line":12,"href":"/reference/typescript/query-compiler/#symbol-Dialect"},{"name":"DialectName","originalName":"DialectName","kind":"TypeAliasDeclaration","signature":"/** Which SQL dialect to emit. Both are product targets: `postgres` for the BYO-PG backend,\n *  `sqlite` for the daemon backend's session reads (and the offline oracle, §9). */\nexport type DialectName = \"postgres\" | \"sqlite\";","description":"Which SQL dialect to emit. Both are product targets: `postgres` for the BYO-PG backend,\n`sqlite` for the daemon backend's session reads (and the offline oracle, §9).","source":"packages/query-compiler/src/index.ts","line":43,"href":"/reference/typescript/query-compiler/#symbol-DialectName"},{"name":"Dir","originalName":"Dir","kind":"TypeAliasDeclaration","signature":"export type Dir = \"asc\" | \"desc\";","description":"","source":"packages/client/src/ast.ts","line":5,"href":"/reference/typescript/query-compiler/#symbol-Dir"},{"name":"ExistsOp","originalName":"ExistsOp","kind":"TypeAliasDeclaration","signature":"export type ExistsOp = \"EXISTS\" | \"NOT EXISTS\";","description":"","source":"packages/client/src/ast.ts","line":35,"href":"/reference/typescript/query-compiler/#symbol-ExistsOp"},{"name":"LitValue","originalName":"LitValue","kind":"TypeAliasDeclaration","signature":"/** An untagged literal (`null | bool | number | string | array`). Numbers are one f64. */\nexport type LitValue = null | boolean | number | string | LitValue[];","description":"An untagged literal (`null | bool | number | string | array`). Numbers are one f64.","source":"packages/client/src/ast.ts","line":11,"href":"/reference/typescript/query-compiler/#symbol-LitValue"},{"name":"OrderPart","originalName":"OrderPart","kind":"TypeAliasDeclaration","signature":"/** One `(field, direction)` ordering — serializes as the 2-tuple `[\"id\", \"asc\"]`. */\nexport type OrderPart = [\n    field: string,\n    dir: Dir\n];","description":"One `(field, direction)` ordering — serializes as the 2-tuple `[\"id\", \"asc\"]`.","source":"packages/client/src/ast.ts","line":8,"href":"/reference/typescript/query-compiler/#symbol-OrderPart"},{"name":"postgresDialect","originalName":"postgresDialect","kind":"VariableDeclaration","signature":"/**\n * The Postgres dialect — the BYO-Postgres server-mutator read target. Emits `(sql, params)`\n * with `$N::text::<type>` parameters and never imports a driver (Invariant 7).\n */\nexport declare const postgresDialect: Dialect;","description":"The Postgres dialect — the BYO-Postgres server-mutator read target. Emits `(sql, params)`\nwith `$N::text::<type>` parameters and never imports a driver (Invariant 7).","source":"packages/query-compiler/src/postgres.ts","line":140,"href":"/reference/typescript/query-compiler/#symbol-postgresDialect"},{"name":"SimpleOp","originalName":"SimpleOp","kind":"TypeAliasDeclaration","signature":"/** The wire comparison operators (exact strings, `src/ast.rs` `Op`). */\nexport type SimpleOp = \"=\" | \"!=\" | \"<\" | \"<=\" | \">\" | \">=\" | \"IS\" | \"IS NOT\" | \"LIKE\" | \"NOT LIKE\" | \"ILIKE\" | \"NOT ILIKE\" | \"IN\" | \"NOT IN\";","description":"The wire comparison operators (exact strings, `src/ast.rs` `Op`).","source":"packages/client/src/ast.ts","line":19,"href":"/reference/typescript/query-compiler/#symbol-SimpleOp"},{"name":"sqliteDialect","originalName":"sqliteDialect","kind":"VariableDeclaration","signature":"/**\n * The SQLite dialect — the daemon backend's session-read target (DAEMON-INTERACTIVE-TXN §5.4)\n * and the offline differential oracle (§9). It binds native values as parameters (no\n * `::text::<type>` casts — SQLite is the canonical store, so there is no driver seam to pin\n * and no second representation to reconcile), relies on SQLite's null-low default ordering\n * (which matches the engine's `null < everything`), and re-asserts the `json()` subtype where\n * objects round-trip through a subquery column. Matches `rindle-d2s`'s raw SQL shapes so the\n * two agree modulo parameterization; the executing connection must run\n * `PRAGMA case_sensitive_like = ON` (every daemon cluster connection does — `open_wal2`).\n */\nexport declare const sqliteDialect: Dialect;","description":"The SQLite dialect — the daemon backend's session-read target (DAEMON-INTERACTIVE-TXN §5.4)\nand the offline differential oracle (§9). It binds native values as parameters (no\n`::text::<type>` casts — SQLite is the canonical store, so there is no driver seam to pin\nand no second representation to reconcile), relies on SQLite's null-low default ordering\n(which matches the engine's `null < everything`), and re-asserts the `json()` subtype where\nobjects round-trip through a subquery column. Matches `rindle-d2s`'s raw SQL shapes so the\ntwo agree modulo parameterization; the executing connection must run\n`PRAGMA case_sensitive_like = ON` (every daemon cluster connection does — `open_wal2`).","source":"packages/query-compiler/src/dialect.ts","line":69,"href":"/reference/typescript/query-compiler/#symbol-sqliteDialect"},{"name":"TableSchema","originalName":"TableSchema","kind":"InterfaceDeclaration","signature":"/**\n * Per-table metadata the compiler needs beyond the `Ast`:\n * - `columns` — the projected column list, **in projection order** (the order\n *   `json_object`/`jsonb_build_object` enumerates), matching the View's `Schema`.\n * - `primaryKey` — the PK columns, for ordering-completion (§8): the compiler appends the\n *   full PK to every `orderBy` at every level for a total order, exactly as the engine's\n *   builder does (`rindle::complete_ordering`).\n * - `columnTypes` — per-column native type detail, keyed by column name (§6.2; Postgres\n *   dialect only).\n * - `relationships` — declared relationships → cardinality. This is the one structural\n *   fact not carried by the `Ast` (the relationship *shape* — correlation keys, nesting,\n *   where/order/limit — lives in the `Ast`'s `related` subqueries).\n */\nexport interface TableSchema {\n    columns: string[];\n    primaryKey: string[];\n    columnTypes: Record<string, ColumnType>;\n    relationships: Record<string, Cardinality>;\n}","description":"Per-table metadata the compiler needs beyond the `Ast`:\n- `columns` — the projected column list, **in projection order** (the order\n  `json_object`/`jsonb_build_object` enumerates), matching the View's `Schema`.\n- `primaryKey` — the PK columns, for ordering-completion (§8): the compiler appends the\n  full PK to every `orderBy` at every level for a total order, exactly as the engine's\n  builder does (`rindle::complete_ordering`).\n- `columnTypes` — per-column native type detail, keyed by column name (§6.2; Postgres\n  dialect only).\n- `relationships` — declared relationships → cardinality. This is the one structural\n  fact not carried by the `Ast` (the relationship *shape* — correlation keys, nesting,\n  where/order/limit — lives in the `Ast`'s `related` subqueries).","source":"packages/query-compiler/src/catalog.ts","line":44,"href":"/reference/typescript/query-compiler/#symbol-TableSchema"},{"name":"ValuePosition","originalName":"ValuePosition","kind":"TypeAliasDeclaration","signature":"/** A column reference or a literal — `type`-tagged. */\nexport type ValuePosition = {\n    type: \"column\";\n    name: string;\n} | {\n    type: \"literal\";\n    value: LitValue;\n};","description":"A column reference or a literal — `type`-tagged.","source":"packages/client/src/ast.ts","line":14,"href":"/reference/typescript/query-compiler/#symbol-ValuePosition"}]},{"name":"@rindle/react","source":"packages/react/src/index.ts","package":"@rindle/react","symbols":[{"name":"assembleDurableText","originalName":"assembleDurableText","kind":"FunctionDeclaration","signature":"/**\n * The durable half of the splice for the mapped-table layout: the compacted `body` followed by\n * whatever chunk rows have not been folded into it yet.\n *\n * Chunks are ALWAYS the suffix after `body` — the closing checkpoint rewrites `body` and drops the\n * chunks it absorbed in ONE transaction — so a reader never observes a torn state where a chunk both\n * is and is not in the body.\n */\nexport declare function assembleDurableText(message: {\n    body?: string | null;\n} | null | undefined, chunks?: ReadonlyArray<{\n    seq: number;\n    text: string;\n}>): string;","description":"The durable half of the splice for the mapped-table layout: the compacted `body` followed by\nwhatever chunk rows have not been folded into it yet.\n\nChunks are ALWAYS the suffix after `body` — the closing checkpoint rewrites `body` and drops the\nchunks it absorbed in ONE transaction — so a reader never observes a torn state where a chunk both\nis and is not in the body.","source":"packages/client/src/stream.ts","line":87,"href":"/reference/typescript/react/#symbol-assembleDurableText"},{"name":"DEFAULT_STREAM_ENDPOINT","originalName":"DEFAULT_STREAM_ENDPOINT","kind":"VariableDeclaration","signature":"/** Where {@link useStreamedText} subscribes by default — `DEFAULT_RINDLE_API_ROUTES.stream`, mirrored\n *  here rather than imported so the browser never pulls `@rindle/api-server`. */\nexport declare const DEFAULT_STREAM_ENDPOINT = \"/api/rindle/stream\";","description":"Where {@link useStreamedText} subscribes by default — `DEFAULT_RINDLE_API_ROUTES.stream`, mirrored\nhere rather than imported so the browser never pulls `@rindle/api-server`.","source":"packages/react/src/stream.ts","line":37,"href":"/reference/typescript/react/#symbol-DEFAULT_STREAM_ENDPOINT"},{"name":"eventSourceTransport","originalName":"eventSourceTransport","kind":"FunctionDeclaration","signature":"/** The default SSE transport. Absent `EventSource` (SSR, an older runtime, a test without jsdom) it\n *  attaches nothing and the reader stays on the durable plane — correct, just chunkier. */\nexport declare function eventSourceTransport(onError?: (err: unknown) => void): StreamTransport;","description":"The default SSE transport. Absent `EventSource` (SSR, an older runtime, a test without jsdom) it\nattaches nothing and the reader stays on the durable plane — correct, just chunkier.","source":"packages/react/src/stream.ts","line":81,"href":"/reference/typescript/react/#symbol-eventSourceTransport"},{"name":"Frag","originalName":"Frag","kind":"FunctionDeclaration","signature":"/**\n * Render-prop sugar over {@link useFragment}: does the `null` check once. `from` is a fragment ref\n * (or null/undefined — an absent to-one relationship, an emptied `.one()`, or a row deleted out from\n * under a live read); when the row is present `children(data)` renders, otherwise `fallback` (default\n * nothing). Keeps the per-row subscription isolation — a child-only edit re-renders just this read.\n */\nexport declare function Frag<F extends AnyFragment>({ of, from, fallback, releaseDelayMs, children }: {\n    of: F;\n    from: FragmentRef<F> | null | undefined;\n    fallback?: ReactNode;\n    /** Per-call-site grace window — see {@link QueryReleaseOptions}. */\n    releaseDelayMs?: number;\n    children: (data: FragmentData<F>) => ReactNode;\n}): ReactNode;","description":"Render-prop sugar over {@link useFragment}: does the `null` check once. `from` is a fragment ref\n(or null/undefined — an absent to-one relationship, an emptied `.one()`, or a row deleted out from\nunder a live read); when the row is present `children(data)` renders, otherwise `fallback` (default\nnothing). Keeps the per-row subscription isolation — a child-only edit re-renders just this read.","source":"packages/react/src/index.ts","line":605,"href":"/reference/typescript/react/#symbol-Frag"},{"name":"Fragment","originalName":"Fragment","kind":"InterfaceDeclaration","signature":"/**\n * A reusable, typed *selection over a table* — Relay's \"fragment\", promoted to a first-class\n * value. **Two verbs** compose a fragment, on one axis — does its data belong to THIS row or to a\n * related one:\n *\n *   - SAME node — `q.include(Frag)`: merge its selection into this node. This is also how you\n *     **root** a fragment onto a base query — `queries.t.where.id(x).include(Frag)`.\n *   - CHILD node — `q.sub(alias, child, corr, Frag)`: nest it under a relationship (`sub`'s 4th arg).\n *\n * A `Fragment` is therefore also a `build` transform (`(q: Query<C>) => Query<C, Rels>`); that\n * call signature is the mechanism by which `sub` accepts a fragment as its build. Prefer\n * `include` to root a fragment (canonical + merged) over calling it directly. It additionally\n * carries its `table` (for {@link FragmentRef}/`useFragment` typing and masking). Composing\n * fragments assembles ONE {@link Ast} → one materialization → one `/query` — the whole point\n * (no request waterfall; design §1).\n */\nexport interface Fragment<C extends AnyCols, Rels = {}, Sel extends string = never, LocalRels = Rels> {\n    (q: Query<C>): Query<C, Rels, false, Sel, LocalRels>;\n    readonly table: TableLike<C>;\n    readonly [FRAGMENT_BRAND]: true;\n}","description":"A reusable, typed *selection over a table* — Relay's \"fragment\", promoted to a first-class\nvalue. **Two verbs** compose a fragment, on one axis — does its data belong to THIS row or to a\nrelated one:\n\n  - SAME node — `q.include(Frag)`: merge its selection into this node. This is also how you\n    **root** a fragment onto a base query — `queries.t.where.id(x).include(Frag)`.\n  - CHILD node — `q.sub(alias, child, corr, Frag)`: nest it under a relationship (`sub`'s 4th arg).\n\nA `Fragment` is therefore also a `build` transform (`(q: Query<C>) => Query<C, Rels>`); that\ncall signature is the mechanism by which `sub` accepts a fragment as its build. Prefer\n`include` to root a fragment (canonical + merged) over calling it directly. It additionally\ncarries its `table` (for {@link FragmentRef}/`useFragment` typing and masking). Composing\nfragments assembles ONE {@link Ast} → one materialization → one `/query` — the whole point\n(no request waterfall; design §1).","source":"packages/client/src/query.ts","line":533,"href":"/reference/typescript/react/#symbol-Fragment"},{"name":"FragmentData","originalName":"FragmentData","kind":"TypeAliasDeclaration","signature":"/**\n * The data returned by `useFragment(fragment, ref)`: the fragment's own selected columns plus\n * immediate relationship values. Relationships whose builder is another fragment surface as\n * opaque {@link FragmentRef}s, so child-owned payload is read only by the child fragment reader.\n */\nexport type FragmentData<F> = F extends Fragment<infer C, unknown, infer Sel, infer LocalRels> ? Projected<C, Sel> & LocalRels : never;","description":"The data returned by `useFragment(fragment, ref)`: the fragment's own selected columns plus\nimmediate relationship values. Relationships whose builder is another fragment surface as\nopaque {@link FragmentRef}s, so child-owned payload is read only by the child fragment reader.","source":"packages/client/src/query.ts","line":544,"href":"/reference/typescript/react/#symbol-FragmentData"},{"name":"fragmentKey","originalName":"fragmentKey","kind":"FunctionDeclaration","signature":"export declare function fragmentKey(ref: FragmentRef<any>): string;","description":"","source":"packages/client/src/query.ts","line":605,"href":"/reference/typescript/react/#symbol-fragmentKey"},{"name":"FragmentRef","originalName":"FragmentRef","kind":"TypeAliasDeclaration","signature":"/** The opaque token a parent passes to a component that reads {@link FragmentData} for `F`. */\nexport type FragmentRef<F> = F extends Fragment<any, any, any, any> ? LocalFragmentRef<F> : never;","description":"The opaque token a parent passes to a component that reads {@link FragmentData} for `F`.","source":"packages/client/src/query.ts","line":563,"href":"/reference/typescript/react/#symbol-FragmentRef"},{"name":"QueryCache","originalName":"QueryCache","kind":"ClassDeclaration","signature":"export declare class QueryCache {\n    private readonly entries;\n    private nextLeaseId;\n    private readonly store;\n    private readonly defaultReleaseDelayMs;\n    constructor(store: Store<ColsMap>, opts?: QueryCacheOptions);\n    /** `releaseDelayMs` overrides the cache default for THIS lease only (see\n     *  {@link QueryReleaseOptions}). Ignored for a local-only store, whose views are always torn down\n     *  on release. */\n    retain<Q extends AnyQuery>(viewKey: string, query: Q, releaseDelayMs?: number): QueryLease;\n    release(lease: QueryLease): void;\n    subscribe(viewKey: string, listener: () => void): () => void;\n    snapshot(viewKey: string, one: boolean): unknown;\n    /** A query's current {@link ResultType} (from its view), or `unknown` before it is retained. */\n    resultType(viewKey: string): ResultType;\n    /** The SSR/hydration snapshot for `viewKey` — the store's preloaded/dehydrated seed, read\n     *  WITHOUT retaining (the server never opens a subscription). Falls back to empty so a\n     *  non-preloaded query renders like an unhydrated one. */\n    serverSnapshot(viewKey: string, one: boolean): unknown;\n    /** The SSR {@link ResultType}: `complete` when a seed exists (server-authoritative first paint),\n     *  else `unknown`. */\n    serverResultType(viewKey: string): ResultType;\n    size(): number;\n    private createSplitEntry;\n    private createSplitLease;\n    private createMaterializedEntry;\n    private createMaterializedLease;\n    private chooseCanonical;\n    private setCanonical;\n    private resolveDelay;\n    /** Hand back every deferred remote lease and cancel the pending teardown, WITHOUT touching\n     *  `entry.releaseDeadline`. Called when a retain revives the entry: the new lease covers the query,\n     *  so the deferred ones are redundant, and the timer armed for an idle entry is stale. The deadline\n     *  is not — it is an outstanding claim, and dropping it here would let a remount silently refresh a\n     *  window that must only ever decay. */\n    private flushPendingReleases;\n    /** Arm (or re-arm) the teardown for `entry.releaseDeadline`. Because the deadline is an ABSOLUTE\n     *  instant, re-arming is idempotent — a later release recomputes the same wake-up time instead of\n     *  restarting the window. */\n    private scheduleSplitRelease;\n    private finalizeSplitRelease;\n}","description":"","source":"packages/react/src/index.ts","line":1044,"href":"/reference/typescript/react/#symbol-QueryCache"},{"name":"queryCacheKey","originalName":"queryCacheKey","kind":"FunctionDeclaration","signature":"export declare function queryCacheKey(query: AnyQuery): string;","description":"","source":"packages/react/src/index.ts","line":1281,"href":"/reference/typescript/react/#symbol-queryCacheKey"},{"name":"QueryData","originalName":"QueryData","kind":"TypeAliasDeclaration","signature":"export type QueryData<Q extends AnyQuery> = ReturnType<Q[\"materialize\"]>[\"data\"];","description":"","source":"packages/react/src/index.ts","line":49,"href":"/reference/typescript/react/#symbol-QueryData"},{"name":"QueryReleaseOptions","originalName":"QueryReleaseOptions","kind":"InterfaceDeclaration","signature":"/**\n * Per-call-site override for how long a query is kept warm after its LAST subscriber unmounts.\n *\n * The default (2s, or whatever `<Rindle releaseDelayMs>` sets) exists so a changed filter/limit can\n * re-materialize from the still-warm local base while the replacement server lease streams its first\n * answer — it's what keeps navigation from flashing empty. That grace window is wrong for queries you\n * KNOW you will never come back to, the canonical case being typeahead search: every keystroke is a\n * distinct query, so a 2s window leaves one dead view + server subscription open per character typed.\n * Pass `0` there to tear down on unmount:\n *\n * ```tsx\n * const results = useQuery(searchIssues(term), { releaseDelayMs: 0 });\n * ```\n *\n * Treat the value as a constant per call site — changing it re-leases the query (drops the old lease\n * and takes a fresh one), which is wasted work if it changes every render.\n *\n * The rule for a query several components share with DIFFERENT delays is a DEADLINE, not a duration:\n * every release stamps `now + that lease's delay`, and the query stays warm until the latest deadline\n * any of its leases asked for (max-wins over what REMAINS, matching the SSR preload TTL rule in\n * `@rindle/client`'s `ssr.ts`). Two consequences worth internalizing:\n *\n *   - The clock starts when a subscriber LEAVES, never when it arrives — a mounted reader is never\n *     timed out, however long it stays.\n *   - A deadline expires on its own, so a later lease inherits at most the RESIDUE of an older window,\n *     never a fresh copy of it. Unmount a 2s reader, remount a `releaseDelayMs: 0` one 1.9s later and\n *     drop it: teardown lands at the original 2s mark, not 1.9s past it.\n *\n * Only meaningful against a backend that can retain remote queries. A local-only store (the SSR seed\n * over `OneShotBackend`, or a store with no remote leg) always tears its views down on release, so\n * there is no window to shorten.\n */\nexport interface QueryReleaseOptions {\n    /** ms to keep this query warm after the last subscriber unmounts. `0` = release immediately.\n     *  Defaults to the provider's `releaseDelayMs` (2s). */\n    releaseDelayMs?: number;\n}","description":"Per-call-site override for how long a query is kept warm after its LAST subscriber unmounts.\n\nThe default (2s, or whatever `<Rindle releaseDelayMs>` sets) exists so a changed filter/limit can\nre-materialize from the still-warm local base while the replacement server lease streams its first\nanswer — it's what keeps navigation from flashing empty. That grace window is wrong for queries you\nKNOW you will never come back to, the canonical case being typeahead search: every keystroke is a\ndistinct query, so a 2s window leaves one dead view + server subscription open per character typed.\nPass `0` there to tear down on unmount:\n\n```tsx\nconst results = useQuery(searchIssues(term), { releaseDelayMs: 0 });\n```\n\nTreat the value as a constant per call site — changing it re-leases the query (drops the old lease\nand takes a fresh one), which is wasted work if it changes every render.\n\nThe rule for a query several components share with DIFFERENT delays is a DEADLINE, not a duration:\nevery release stamps `now + that lease's delay`, and the query stays warm until the latest deadline\nany of its leases asked for (max-wins over what REMAINS, matching the SSR preload TTL rule in\n`@rindle/client`'s `ssr.ts`). Two consequences worth internalizing:\n\n  - The clock starts when a subscriber LEAVES, never when it arrives — a mounted reader is never\n    timed out, however long it stays.\n  - A deadline expires on its own, so a later lease inherits at most the RESIDUE of an older window,\n    never a fresh copy of it. Unmount a 2s reader, remount a `releaseDelayMs: 0` one 1.9s later and\n    drop it: teardown lands at the original 2s mark, not 1.9s past it.\n\nOnly meaningful against a backend that can retain remote queries. A local-only store (the SSR seed\nover `OneShotBackend`, or a store with no remote leg) always tears its views down on release, so\nthere is no window to shorten.","source":"packages/react/src/index.ts","line":189,"href":"/reference/typescript/react/#symbol-QueryReleaseOptions"},{"name":"ResultType","originalName":"ResultType","kind":"TypeAliasDeclaration","signature":"/** A query's SERVER-CHANNEL state, surfaced on its {@link ArrayView} (FOLDED-MUTATIONS-DESIGN §7 —\n *  formerly conflated with pending-ness, OPTIMISTIC-WRITES-DESIGN.md §6):\n *   - `unknown`  — not hydrated: the server has not produced a first result for this query yet;\n *   - `complete` — the server has answered. STAYS `complete` while a local mutation is pending (the\n *                  prediction is the client's best current answer); reversion on rejection is an\n *                  event (`onRejected`), not a downgrade of completeness;\n *   - `error`    — RESERVED for a future server-side, query-level error signal\n *                  (see `designs/101-QUERY-ERRORS-DESIGN.md`); no longer produced by a pending mutation.\n *  \"Is a prediction pending here?\" is now a separate reactive axis (the backend's `pending(qid)` /\n *  `onPending`), not folded into this type. A backend with no server lifecycle (the in-process\n *  engine) leaves every view `complete`. */\nexport type ResultType = \"unknown\" | \"complete\" | \"error\";","description":"A query's SERVER-CHANNEL state, surfaced on its {@link ArrayView } (FOLDED-MUTATIONS-DESIGN §7 —\nformerly conflated with pending-ness, OPTIMISTIC-WRITES-DESIGN.md §6):\n - `unknown`  — not hydrated: the server has not produced a first result for this query yet;\n - `complete` — the server has answered. STAYS `complete` while a local mutation is pending (the\n                prediction is the client's best current answer); reversion on rejection is an\n                event (`onRejected`), not a downgrade of completeness;\n - `error`    — RESERVED for a future server-side, query-level error signal\n                (see `designs/101-QUERY-ERRORS-DESIGN.md`); no longer produced by a pending mutation.\n\"Is a prediction pending here?\" is now a separate reactive axis (the backend's `pending(qid)` /\n`onPending`), not folded into this type. A backend with no server lifecycle (the in-process\nengine) leaves every view `complete`.","source":"packages/client/src/types.ts","line":155,"href":"/reference/typescript/react/#symbol-ResultType"},{"name":"Rindle","originalName":"Rindle","kind":"FunctionDeclaration","signature":"export declare function Rindle<S extends ColsMap>({ store, releaseDelayMs, children }: RindleProps<S>): import(\"react\").FunctionComponentElement<import(\"react\").ProviderProps<RindleContextValue | null>>;","description":"","source":"packages/react/src/index.ts","line":221,"href":"/reference/typescript/react/#symbol-Rindle"},{"name":"RindleProps","originalName":"RindleProps","kind":"InterfaceDeclaration","signature":"export interface RindleProps<S extends ColsMap = ColsMap> {\n    store: Store<S>;\n    /** Default grace window (ms) for every query in this tree — how long a view + its server lease are\n     *  kept warm after the last subscriber unmounts. Defaults to 2s; see {@link QueryReleaseOptions}\n     *  for why, and for the per-call-site override. Treat as a constant: changing it rebuilds the\n     *  caches and tears down every live view. */\n    releaseDelayMs?: number;\n    children?: ReactNode;\n}","description":"","source":"packages/react/src/index.ts","line":77,"href":"/reference/typescript/react/#symbol-RindleProps"},{"name":"RindleProvider","originalName":"RindleProvider","kind":"VariableDeclaration","signature":"export declare const RindleProvider: typeof Rindle;","description":"","source":"packages/react/src/index.ts","line":232,"href":"/reference/typescript/react/#symbol-RindleProvider"},{"name":"RindleSSR","originalName":"RindleSSR","kind":"FunctionDeclaration","signature":"/**\n * The SSR→SPA store handoff (SSR-DESIGN.md §6.1). Renders `<Rindle>` with a store that swaps from a\n * transport-less SSR seed to the live engine WITHOUT changing a single `useQuery` caller — bind the\n * app's `schema` + `bootClient` and drop it in above the tree:\n *\n *   - Server render + browser HYDRATION: a seed {@link Store} over a {@link OneShotBackend}, hydrated\n *     from `ssrState`. `useQuery` reads its seed via `getServerSnapshot`, so the server and the\n *     client's first render produce identical markup with NO engine on either side — first paint is\n *     the server-rendered data, never a \"Starting…\" splash that would break hydration.\n *   - After hydration: `boot()` starts the wasm IVM engine (browser only), its views are seeded from\n *     the SAME snapshot (so the swap shows the SSR rows with no flash), and the live `subscribe`\n *     reconciles — the page is now a live SPA.\n *\n * Framework-agnostic of the app: everything but `schema`/`boot`/`ssrState` is owned here (previously\n * hand-rolled per app as `src/RindleApp.tsx`).\n */\nexport declare function RindleSSR<S extends ColsMap>({ schema, ssrState, boot, children }: RindleSSRProps<S>): import(\"react\").FunctionComponentElement<RindleProps<S>>;","description":"The SSR→SPA store handoff (SSR-DESIGN.md §6.1). Renders `<Rindle>` with a store that swaps from a\ntransport-less SSR seed to the live engine WITHOUT changing a single `useQuery` caller — bind the\napp's `schema` + `bootClient` and drop it in above the tree:\n\n  - Server render + browser HYDRATION: a seed {@link Store} over a {@link OneShotBackend}, hydrated\n    from `ssrState`. `useQuery` reads its seed via `getServerSnapshot`, so the server and the\n    client's first render produce identical markup with NO engine on either side — first paint is\n    the server-rendered data, never a \"Starting…\" splash that would break hydration.\n  - After hydration: `boot()` starts the wasm IVM engine (browser only), its views are seeded from\n    the SAME snapshot (so the swap shows the SSR rows with no flash), and the live `subscribe`\n    reconciles — the page is now a live SPA.\n\nFramework-agnostic of the app: everything but `schema`/`boot`/`ssrState` is owned here (previously\nhand-rolled per app as `src/RindleApp.tsx`).","source":"packages/react/src/index.ts","line":268,"href":"/reference/typescript/react/#symbol-RindleSSR"},{"name":"RindleSSRProps","originalName":"RindleSSRProps","kind":"InterfaceDeclaration","signature":"export interface RindleSSRProps<S extends ColsMap = ColsMap> {\n    /** The app schema — used to build the transport-less seed {@link Store} that backs the server\n     *  render and the matching client hydration pass. */\n    schema: Schema<S>;\n    /** The dehydrated first-paint cache from the route loader (`ServerStore.dehydrate()`), embedded in\n     *  the HTML. Read on BOTH the server render and the client's first (hydration) render. */\n    ssrState: DehydratedState;\n    /** Boots the live (wasm-backed) client in the BROWSER — the app's `bootClient`. Called once, after\n     *  hydration, and must resolve to the live optimistic store. Never invoked during the server\n     *  render (SSR seeds are a first-paint concern only). */\n    boot: () => Promise<{\n        store: Store<S>;\n    }>;\n    children?: ReactNode;\n}","description":"","source":"packages/react/src/index.ts","line":238,"href":"/reference/typescript/react/#symbol-RindleSSRProps"},{"name":"RootData","originalName":"RootData","kind":"TypeAliasDeclaration","signature":"export type RootData<Q extends AnyQuery> = QueryLocalData<Q>;","description":"","source":"packages/react/src/index.ts","line":50,"href":"/reference/typescript/react/#symbol-RootData"},{"name":"RootDetails","originalName":"RootDetails","kind":"InterfaceDeclaration","signature":"export interface RootDetails {\n    readonly status: ResultType;\n}","description":"","source":"packages/react/src/index.ts","line":53,"href":"/reference/typescript/react/#symbol-RootDetails"},{"name":"RootRefData","originalName":"RootRefData","kind":"TypeAliasDeclaration","signature":"export type RootRefData<Q extends AnyQuery, F extends Fragment<any, any, any, any>> = QueryData<Q> extends readonly unknown[] ? readonly FragmentRef<F>[] : FragmentRef<F> | null;","description":"","source":"packages/react/src/index.ts","line":51,"href":"/reference/typescript/react/#symbol-RootRefData"},{"name":"RootRefResult","originalName":"RootRefResult","kind":"TypeAliasDeclaration","signature":"export type RootRefResult<Q extends AnyQuery, F extends Fragment<any, any, any, any>> = readonly [\n    data: RootRefData<Q, F>,\n    details: RootDetails\n];","description":"","source":"packages/react/src/index.ts","line":57,"href":"/reference/typescript/react/#symbol-RootRefResult"},{"name":"RootResult","originalName":"RootResult","kind":"TypeAliasDeclaration","signature":"export type RootResult<Q extends AnyQuery> = readonly [\n    data: RootData<Q>,\n    details: RootDetails\n];","description":"","source":"packages/react/src/index.ts","line":56,"href":"/reference/typescript/react/#symbol-RootResult"},{"name":"spliceStreamText","originalName":"spliceStreamText","kind":"FunctionDeclaration","signature":"/**\n * Merge the durable plane with the live tail.\n *\n * `durable` is what the IVM view shows; `produced` is what a subscription has accumulated (the prefix\n * it joined at, plus every `chunk`). Both are prefixes of the same response, so the merge is \"take\n * the longer\" — no diffing, no overlap handling, no ranges.\n *\n * The length comparison is the whole algorithm, which is why a caller MUST seed its accumulator with\n * the text it joined at: a tail carrying only the chunks it received would read as shorter than the\n * durable text and be discarded. `useStreamedText` does that for you.\n */\nexport declare function spliceStreamText(durable: string, produced: string): string;","description":"Merge the durable plane with the live tail.\n\n`durable` is what the IVM view shows; `produced` is what a subscription has accumulated (the prefix\nit joined at, plus every `chunk`). Both are prefixes of the same response, so the merge is \"take\nthe longer\" — no diffing, no overlap handling, no ranges.\n\nThe length comparison is the whole algorithm, which is why a caller MUST seed its accumulator with\nthe text it joined at: a tail carrying only the chunks it received would read as shorter than the\ndurable text and be discarded. `useStreamedText` does that for you.","source":"packages/client/src/stream.ts","line":75,"href":"/reference/typescript/react/#symbol-spliceStreamText"},{"name":"StreamFrame","originalName":"StreamFrame","kind":"TypeAliasDeclaration","signature":"/**\n * One frame of a subscription. A subscription always begins with `open` and always ends with exactly\n * one terminal frame — `end`, `stale`, or `absent` — after which the iterator completes.\n *\n * `stale` and `absent` are the two \"you are on the durable plane now\" answers, and both are SAFE:\n * the store holds everything below `floorSeq` and everything through `durableSeq`, so the reader's\n * IVM view converges without the stream. Neither is an error.\n */\nexport type StreamFrame = \n/** Join accepted. `from` is the (clamped) offset the replay starts at. */\n{\n    type: \"open\";\n    streamId: string;\n    from: number;\n    seq: number;\n    durableSeq: number;\n    ended: boolean;\n}\n/** PRODUCED text — not a durability claim. `text.length === seq - from`, always. */\n | {\n    type: \"chunk\";\n    from: number;\n    seq: number;\n    text: string;\n}\n/** The store now holds the prefix through `seq`. */\n | {\n    type: \"durable\";\n    seq: number;\n}\n/** Sealed. No further frames. */\n | {\n    type: \"end\";\n    seq: number;\n    status: StreamStatus;\n    error?: string;\n}\n/** `from` is below the producer's retained buffer floor (or the subscriber fell too far behind):\n *  read the store. (A raw `EventSource` rejoins automatically on its reconnect; `useStreamedText`\n *  deliberately stays on the durable plane instead — correct, at checkpoint granularity.) */\n | {\n    type: \"stale\";\n    floorSeq: number;\n    durableSeq: number;\n}\n/** The process serving this subscribe is not hosting the stream (wrong instance, already evicted,\n *  or it never existed): the store is the whole truth. */\n | {\n    type: \"absent\";\n};","description":"One frame of a subscription. A subscription always begins with `open` and always ends with exactly\none terminal frame — `end`, `stale`, or `absent` — after which the iterator completes.\n\n`stale` and `absent` are the two \"you are on the durable plane now\" answers, and both are SAFE:\nthe store holds everything below `floorSeq` and everything through `durableSeq`, so the reader's\nIVM view converges without the stream. Neither is an error.","source":"packages/client/src/stream.ts","line":32,"href":"/reference/typescript/react/#symbol-StreamFrame"},{"name":"StreamStatus","originalName":"StreamStatus","kind":"TypeAliasDeclaration","signature":"/**\n * How a stream ended.\n * - `complete` — the model finished.\n * - `cancelled` — the reader asked it to stop and the producer honoured it.\n * - `error` — the generation threw.\n * - `interrupted` — the host went away mid-generation. The one status that implies the store may be\n *   short of what was produced.\n */\nexport type StreamStatus = \"complete\" | \"cancelled\" | \"error\" | \"interrupted\";","description":"How a stream ended.\n- `complete` — the model finished.\n- `cancelled` — the reader asked it to stop and the producer honoured it.\n- `error` — the generation threw.\n- `interrupted` — the host went away mid-generation. The one status that implies the store may be\n  short of what was produced.","source":"packages/client/src/stream.ts","line":19,"href":"/reference/typescript/react/#symbol-StreamStatus"},{"name":"streamSubscribeUrl","originalName":"streamSubscribeUrl","kind":"FunctionDeclaration","signature":"/** `<endpoint>?streamId=…&from=…`. `from` is the join offset; a reconnecting `EventSource` overrides\n *  it with its own `Last-Event-ID` header, which the server prefers. */\nexport declare function streamSubscribeUrl(endpoint: string, streamId: string, from: number): string;","description":"`<endpoint>?streamId=…&from=…`. `from` is the join offset; a reconnecting `EventSource` overrides\nit with its own `Last-Event-ID` header, which the server prefers.","source":"packages/react/src/stream.ts","line":74,"href":"/reference/typescript/react/#symbol-streamSubscribeUrl"},{"name":"StreamTransport","originalName":"StreamTransport","kind":"InterfaceDeclaration","signature":"/**\n * How the live plane is reached. The default ({@link eventSourceTransport}) is SSE, which is what the\n * api-server's `streamFramesToSse` serves and what gets `Last-Event-ID` resume for free. Supply your\n * own for a WebSocket, a fetch-stream, or a test.\n */\nexport interface StreamTransport {\n    /** Attach at `url` and call `onFrame` per decoded frame. MUST return a detach function; it may be\n     *  called more than once and must tolerate that. `onFrame` may be called synchronously. */\n    subscribe(url: string, onFrame: (frame: StreamFrame) => void): () => void;\n}","description":"How the live plane is reached. The default ({@link eventSourceTransport}) is SSE, which is what the\napi-server's `streamFramesToSse` serves and what gets `Last-Event-ID` resume for free. Supply your\nown for a WebSocket, a fetch-stream, or a test.","source":"packages/react/src/stream.ts","line":44,"href":"/reference/typescript/react/#symbol-StreamTransport"},{"name":"SyncQueryCache","originalName":"SyncQueryCache","kind":"ClassDeclaration","signature":"export declare class SyncQueryCache {\n    private readonly entries;\n    private nextLeaseId;\n    private readonly store;\n    private readonly defaultReleaseDelayMs;\n    constructor(store: Store<ColsMap>, opts?: QueryCacheOptions);\n    /** `releaseDelayMs` overrides the cache default for THIS lease only (see\n     *  {@link QueryReleaseOptions}) — `0` asks for no warm window of its own, though an unexpired\n     *  deadline from an earlier lease on this coverage still applies. */\n    retain(coverageKey: string, query: AnyQuery, releaseDelayMs?: number): SyncLease;\n    release(lease: SyncLease): void;\n    subscribe(coverageKey: string, listener: () => void): () => void;\n    resultType(coverageKey: string): ResultType;\n    size(): number;\n    private createHandle;\n    private resolveDelay;\n    /** Arm (or re-arm) the teardown for `entry.releaseDeadline`. Because the deadline is an ABSOLUTE\n     *  instant, re-arming is idempotent — a later release recomputes the same wake-up time instead of\n     *  restarting the window. */\n    private scheduleRelease;\n    private finalizeRelease;\n}","description":"","source":"packages/react/src/index.ts","line":923,"href":"/reference/typescript/react/#symbol-SyncQueryCache"},{"name":"useFragment","originalName":"useFragment","kind":"FunctionDeclaration","signature":"/**\n * Read a {@link Fragment}'s local data from an opaque ref.\n *\n * The query boundary calls {@link useRoot} with a fragment argument to retain the full named\n * coverage query and receive root refs. Descendants call `useFragment` with those refs (or child\n * refs returned by a parent fragment read) to open narrow local-only reads for the fields their\n * fragment owns.\n *\n * `ref` is an opaque token created by {@link useRoot} or returned from another local fragment read.\n * The hook opens a narrow local-only query for this exact fragment and keeps the root coverage\n * lease retained while mounted. Passing a legacy projected data object is unsupported.\n */\nexport declare function useFragment<F extends Fragment<any, any, any, any>>(fragment: F, ref: FragmentRef<F> | null | undefined, opts?: QueryReleaseOptions): FragmentData<F> | null;","description":"Read a {@link Fragment}'s local data from an opaque ref.\n\nThe query boundary calls {@link useRoot} with a fragment argument to retain the full named\ncoverage query and receive root refs. Descendants call `useFragment` with those refs (or child\nrefs returned by a parent fragment read) to open narrow local-only reads for the fields their\nfragment owns.\n\n`ref` is an opaque token created by {@link useRoot} or returned from another local fragment read.\nThe hook opens a narrow local-only query for this exact fragment and keeps the root coverage\nlease retained while mounted. Passing a legacy projected data object is unsupported.","source":"packages/react/src/index.ts","line":591,"href":"/reference/typescript/react/#symbol-useFragment"},{"name":"useQuery","originalName":"useQuery","kind":"FunctionDeclaration","signature":"export declare function useQuery<Q extends AnyQuery>(query: Q, opts?: QueryReleaseOptions): QueryData<Q>;","description":"","source":"packages/react/src/index.ts","line":302,"href":"/reference/typescript/react/#symbol-useQuery"},{"name":"useQueryStatus","originalName":"useQueryStatus","kind":"FunctionDeclaration","signature":"/** The SERVER-CHANNEL state of a query's view (`@rindle/client` {@link ResultType}): `unknown` while\n *  it loads (not yet server-authoritative), `complete` once the server has answered. A pending\n *  optimistic mutation no longer moves this — that is a separate axis now (FOLDED-MUTATIONS-DESIGN\n *  §7); the `error` variant is reserved and currently unproduced. Shares the same cached/leased view\n *  as {@link useQuery} (so reading both for one query is one subscription), and re-renders only when\n *  the status changes. */\nexport declare function useQueryStatus(query: AnyQuery, opts?: QueryReleaseOptions): ResultType;","description":"The SERVER-CHANNEL state of a query's view (`@rindle/client` {@link ResultType}): `unknown` while\nit loads (not yet server-authoritative), `complete` once the server has answered. A pending\noptimistic mutation no longer moves this — that is a separate axis now (FOLDED-MUTATIONS-DESIGN\n§7); the `error` variant is reserved and currently unproduced. Shares the same cached/leased view\nas {@link useQuery} (so reading both for one query is one subscription), and re-renders only when\nthe status changes.","source":"packages/react/src/index.ts","line":343,"href":"/reference/typescript/react/#symbol-useQueryStatus"},{"name":"useRindleStore","originalName":"useRindleStore","kind":"FunctionDeclaration","signature":"export declare function useRindleStore<S extends ColsMap = ColsMap>(): Store<S>;","description":"","source":"packages/react/src/index.ts","line":234,"href":"/reference/typescript/react/#symbol-useRindleStore"},{"name":"useRoot","originalName":"useRoot","kind":"FunctionDeclaration","signature":"/** Run a named root query and expose its local React-facing data. Fragment child relationships are\n *  refs, so child components can keep owning their own local reads. Passing a root fragment as the\n *  final argument switches the result to opaque root refs for that fragment. */\nexport declare function useRoot<Q extends AnyQuery>(query: Q): RootResult<Q>;\nexport declare function useRoot<Q extends AnyQuery, F extends AnyFragment>(query: Q, fragment: F): RootRefResult<Q, F>;\nexport declare function useRoot<Q extends AnyQuery>(query: NamedQuery<void, [\n], Q>): RootResult<Q>;\nexport declare function useRoot<Q extends AnyQuery, F extends AnyFragment>(query: NamedQuery<void, [\n], Q>, fragment: F): RootRefResult<Q, F>;\nexport declare function useRoot<Args, Ctx extends readonly unknown[], Q extends AnyQuery>(query: NamedQuery<Args, Ctx, Q>, args: Args, ...ctx: Ctx): RootResult<Q>;\nexport declare function useRoot<Args, Ctx extends readonly unknown[], Q extends AnyQuery, F extends AnyFragment>(query: NamedQuery<Args, Ctx, Q>, args: Args, ...ctxAndFragment: [\n    ...ctx: Ctx,\n    fragment: F\n]): RootRefResult<Q, F>;","description":"Run a named root query and expose its local React-facing data. Fragment child relationships are\nrefs, so child components can keep owning their own local reads. Passing a root fragment as the\nfinal argument switches the result to opaque root refs for that fragment.","source":"packages/react/src/index.ts","line":411,"href":"/reference/typescript/react/#symbol-useRoot"},{"name":"useStreamedText","originalName":"useStreamedText","kind":"FunctionDeclaration","signature":"/**\n * The response text as it should be rendered right now: the durable prefix spliced with the live\n * tail.\n *\n * ```tsx\n * const data = useFragment(MessageFragment, message);\n * const text = useStreamedText({\n *   streamId: data.id,\n *   durable: assembleDurableText(data, data.chunks),\n *   live: data.status === \"streaming\" || data.status === \"pending\",\n * });\n * ```\n *\n * The value is monotone in practice — it only grows while a stream runs — and when the closing\n * checkpoint compacts the chunks into the body it returns the identical string, so there is no\n * flicker at the handoff.\n */\nexport declare function useStreamedText({ streamId, durable, live }: UseStreamedTextInput, options?: UseStreamedTextOptions): string;","description":"The response text as it should be rendered right now: the durable prefix spliced with the live\ntail.\n\n```tsx\nconst data = useFragment(MessageFragment, message);\nconst text = useStreamedText({\n  streamId: data.id,\n  durable: assembleDurableText(data, data.chunks),\n  live: data.status === \"streaming\" || data.status === \"pending\",\n});\n```\n\nThe value is monotone in practice — it only grows while a stream runs — and when the closing\ncheckpoint compacts the chunks into the body it returns the identical string, so there is no\nflicker at the handoff.","source":"packages/react/src/stream.ts","line":131,"href":"/reference/typescript/react/#symbol-useStreamedText"},{"name":"UseStreamedTextInput","originalName":"UseStreamedTextInput","kind":"InterfaceDeclaration","signature":"export interface UseStreamedTextInput {\n    /** The stream's id — the message row's key. Changing it drops the old tail and rejoins. */\n    streamId: string;\n    /** What the IVM view shows: `assembleDurableText(message, message.chunks)`. Read from a ref\n     *  internally (TRAP 1), so it may change every checkpoint without disturbing the connection. */\n    durable: string;\n    /** Whether a producer is still running — the app's own read of its status column (typically\n     *  `status === \"streaming\" || status === \"pending\"`). The live leg attaches only while true. */\n    live: boolean;\n}","description":"","source":"packages/react/src/stream.ts","line":50,"href":"/reference/typescript/react/#symbol-UseStreamedTextInput"},{"name":"UseStreamedTextOptions","originalName":"UseStreamedTextOptions","kind":"InterfaceDeclaration","signature":"export interface UseStreamedTextOptions {\n    /** Default {@link DEFAULT_STREAM_ENDPOINT}. `streamId` and `from` are appended as query params. */\n    endpoint?: string;\n    /** Default {@link eventSourceTransport}. Read at subscribe time, NOT a dependency — an inline\n     *  literal would otherwise reconnect on every render. */\n    transport?: StreamTransport;\n    /** A frame that could not be decoded, or a transport-level error. The durable plane is unaffected,\n     *  so this is a diagnostic, not a failure. */\n    onError?: (err: unknown) => void;\n}","description":"","source":"packages/react/src/stream.ts","line":61,"href":"/reference/typescript/react/#symbol-UseStreamedTextOptions"},{"name":"useSyncQuery","originalName":"useSyncQuery","kind":"FunctionDeclaration","signature":"/** Retain a named server query for normalized/local-first sync coverage without subscribing React\n *  to that query's broad result tree. The returned value is lifecycle state only; it is `unknown`\n *  until the backend reports that the retained coverage has hydrated. */\nexport declare function useSyncQuery(query: AnyQuery, opts?: QueryReleaseOptions): ResultType;","description":"Retain a named server query for normalized/local-first sync coverage without subscribing React\nto that query's broad result tree. The returned value is lifecycle state only; it is `unknown`\nuntil the backend reports that the retained coverage has hydrated.","source":"packages/react/src/index.ts","line":376,"href":"/reference/typescript/react/#symbol-useSyncQuery"}]},{"name":"@rindle/react-devtools","source":"packages/react-devtools/src/index.ts","package":"@rindle/react-devtools","symbols":[{"name":"attachDevtools","originalName":"attachDevtools","kind":"FunctionDeclaration","signature":"/** Attach a devtools pane to a running client (DEBUG-TOOLS-BROWSER-DESIGN §6.2). Call this ONLY in a\n *  dev build (e.g. behind `import.meta.env.DEV` with a dynamic `import(\"@rindle/devtools\")`) so the\n *  pane, its core, and this registration tree-shake out of production. Returns the {@link DevtoolsCore}\n *  (also discoverable via {@link getDevtoolsHub}); call `core.detach()` to unwind. */\nexport declare function attachDevtools(target: DevtoolsTarget, opts?: DevtoolsCoreOptions): DevtoolsCore;","description":"Attach a devtools pane to a running client (DEBUG-TOOLS-BROWSER-DESIGN §6.2). Call this ONLY in a\ndev build (e.g. behind `import.meta.env.DEV` with a dynamic `import(\"@rindle/devtools\")`) so the\npane, its core, and this registration tree-shake out of production. Returns the {@link DevtoolsCore}\n(also discoverable via {@link getDevtoolsHub}); call `core.detach()` to unwind.","source":"packages/devtools/src/global.ts","line":73,"href":"/reference/typescript/react-devtools/#symbol-attachDevtools"},{"name":"DevtoolsCore","originalName":"DevtoolsCore","kind":"ClassDeclaration","signature":"export declare class DevtoolsCore {\n    private readonly store;\n    private readonly backend?;\n    private readonly detachStore;\n    private readonly detachServerDeltas?;\n    private readonly hasServerDeltaTap;\n    private readonly timelineCap;\n    private readonly deltaCap;\n    private readonly sampleRows;\n    private readonly autoFlush;\n    private readonly now;\n    private readonly pollHandle?;\n    private readonly timeline;\n    private readonly order;\n    /** The pending keys seen at the previous recompute — the diff basis for lifecycle transitions. */\n    private prevPendingKeys;\n    private deltas;\n    private deltaSeq;\n    /** Set by a `batch` delta, consumed by the next recompute: did view churn coincide with a\n     *  confirmation this turn? (the §4.1 snap-back heuristic). */\n    private churnSeen;\n    private queries;\n    private optimistic?;\n    private readonly listeners;\n    private dirty;\n    private flushScheduled;\n    private snapshot;\n    /** Optional deregistration from the global hub (set by {@link attachDevtools}). */\n    onDetach?: () => void;\n    constructor(target: DevtoolsTarget, opts?: DevtoolsCoreOptions);\n    /** The current read-model. Reference-stable between updates (rebuilt only on recompute), so it is\n     *  safe to feed a `useSyncExternalStore`-style binding. */\n    getState(): DevtoolsState;\n    /** Subscribe to updates; fires immediately with the current state, then after each recompute. */\n    subscribe(listener: () => void): () => void;\n    /** Force a synchronous recompute (also used by the safety-net poll and by tests). */\n    refresh(): void;\n    /** Clear the delta stream ring (a panel \"clear\" affordance). */\n    clearDeltas(): void;\n    /** Drop every SETTLED timeline row (confirmed/dropped), keeping live pending ones + the deltas. */\n    clearHistory(): void;\n    /** Detach from the client: stop the poll, drop the store tap, deregister from the global hub. */\n    detach(): void;\n    private attachServerDeltas;\n    private onStoreDelta;\n    private onServerDelta;\n    private onResultType;\n    private markDirty;\n    private flush;\n    private recompute;\n    /** Reconstruct the fork/rebase lifecycle by diffing this pending snapshot against the previous\n     *  one (DEBUG-TOOLS-BROWSER-DESIGN §4.1): new keys → invoked; vanished keys → confirmed (mid ≤\n     *  confirmedLmid) or dropped; a fold's `f:<foldKey>` → `m:<mid>` transition is linked, not double\n     *  counted. */\n    private reconcileTimeline;\n    private rebuildQueries;\n    private pushServerDelta;\n    private pushChangeDelta;\n    private pushNormalizedDelta;\n    private appendDelta;\n    private addEntry;\n    private renameEntry;\n}","description":"","source":"packages/devtools/src/core.ts","line":44,"href":"/reference/typescript/react-devtools/#symbol-DevtoolsCore"},{"name":"DevtoolsState","originalName":"DevtoolsState","kind":"InterfaceDeclaration","signature":"/** The whole devtools snapshot a panel renders. Reference-stable arrays between updates where the\n *  underlying data did not change is NOT guaranteed — panels should treat each `getState()` as fresh. */\nexport interface DevtoolsState {\n    /** Newest-last mutation timeline (capped). */\n    timeline: TimelineEntry[];\n    /** Every live materialized view. */\n    queries: QueryEntry[];\n    /** Newest-last delta stream ring (capped). */\n    deltas: DeltaEntry[];\n    /** The raw optimistic-loop snapshot, when the backend exposes one (a \"loop\" summary line). */\n    optimistic?: OptimisticInspect;\n    capabilities: {\n        optimistic: boolean;\n    };\n}","description":"The whole devtools snapshot a panel renders. Reference-stable arrays between updates where the\nunderlying data did not change is NOT guaranteed — panels should treat each `getState()` as fresh.","source":"packages/devtools/src/types.ts","line":154,"href":"/reference/typescript/react-devtools/#symbol-DevtoolsState"},{"name":"getDevtoolsCore","originalName":"getDevtoolsCore","kind":"FunctionDeclaration","signature":"/** The most recently attached core, or `undefined` — the common single-app convenience a panel uses. */\nexport declare function getDevtoolsCore(): DevtoolsCore | undefined;","description":"The most recently attached core, or `undefined` — the common single-app convenience a panel uses.","source":"packages/devtools/src/global.ts","line":64,"href":"/reference/typescript/react-devtools/#symbol-getDevtoolsCore"},{"name":"getDevtoolsHub","originalName":"getDevtoolsHub","kind":"FunctionDeclaration","signature":"/** Get (creating on first use) the global devtools hub. A panel calls this to discover attached\n *  clients; it is safe to call before any `attachDevtools`. */\nexport declare function getDevtoolsHub(): DevtoolsHub;","description":"Get (creating on first use) the global devtools hub. A panel calls this to discover attached\nclients; it is safe to call before any `attachDevtools`.","source":"packages/devtools/src/global.ts","line":58,"href":"/reference/typescript/react-devtools/#symbol-getDevtoolsHub"},{"name":"RindleDevtools","originalName":"RindleDevtools","kind":"FunctionDeclaration","signature":"/** The floating Rindle devtools panel. Renders just a launcher until a client is attached via\n *  `attachDevtools(app)`. */\nexport declare function RindleDevtools({ core: explicit, defaultOpen }: RindleDevtoolsProps): ReactNode;","description":"The floating Rindle devtools panel. Renders just a launcher until a client is attached via\n`attachDevtools(app)`.","source":"packages/react-devtools/src/index.ts","line":36,"href":"/reference/typescript/react-devtools/#symbol-RindleDevtools"},{"name":"RindleDevtoolsProps","originalName":"RindleDevtoolsProps","kind":"InterfaceDeclaration","signature":"export interface RindleDevtoolsProps {\n    /** Bind to a specific core. Omit to auto-discover the most recently attached client via the\n     *  global hub (the common case). */\n    core?: DevtoolsCore;\n    /** Open the panel on first mount. Default false (starts as the launcher button). */\n    defaultOpen?: boolean;\n}","description":"","source":"packages/react-devtools/src/index.ts","line":26,"href":"/reference/typescript/react-devtools/#symbol-RindleDevtoolsProps"}]},{"name":"@rindle/remote","source":"packages/remote/src/index.ts","package":"@rindle/remote","symbols":[{"name":"AffinityTicketStore","originalName":"AffinityTicketStore","kind":"InterfaceDeclaration","signature":"/** A mutable holder for the current opaque affinity ticket, shared by the transport, the source,\n *  and the lease POST (see the module header). */\nexport interface AffinityTicketStore {\n    /** The ticket to offer on the next ws handshake, or undefined — ticketless, so the edge\n     *  anycasts + mints a fresh one. A persisted/previous-connection ticket may be returned here\n     *  even while it is NOT yet safe for a lease; see {@link leaseTicket}. */\n    get(): string | undefined;\n    /** Record a freshly minted/refreshed ticket (from a connection's `{t:\"affinity\"}` frame). */\n    set(ticket: string): void;\n    /** Drop the ticket so the next connect goes ticketless (the pinned follower is gone, §8). */\n    clear(): void;\n    /** Mark the held ticket handshake-only until this connection emits a fresh mint frame. Called\n     *  before the first connection and every reconnect, after the held ticket was already selected\n     *  for the ws subprotocol offer. This prevents a restored/rotated/expired persisted ticket from\n     *  racing an HTTP lease onto an independently-anycast follower. */\n    connectionPending(): void;\n    /** Resolve with a ticket minted/refreshed on the CURRENT connection, or the next one\n     *  {@link set}. A persisted ticket deliberately does not resolve this wait. */\n    waitForTicket(): Promise<string>;\n    /** Obtain the current connection's ticket for an HTTP lease. The first missing-ticket wait is\n     *  bounded; its timeout removes the waiter and latches ticketless fallback, so later leases\n     *  return immediately until a mint frame arrives. Concurrent callers share the one timer.\n     *  `timedOut` is true only for that transition, allowing one warning per fallback episode. */\n    leaseTicket(timeoutMs: number): Promise<{\n        ticket?: string;\n        timedOut: boolean;\n    }>;\n}","description":"A mutable holder for the current opaque affinity ticket, shared by the transport, the source,\nand the lease POST (see the module header).","source":"packages/remote/src/affinity.ts","line":23,"href":"/reference/typescript/remote/#symbol-AffinityTicketStore"},{"name":"Aggregate","originalName":"Aggregate","kind":"TypeAliasDeclaration","signature":"/** An aggregate over a (correlated) subquery's rows (`REDUCE-DESIGN.md`). v1: `count(*)`.\n *  Set on a `related` subquery (`Ast.aggregate`), it marks that relationship a count\n *  aggregate the builder lowers to a scalar-projected singular relationship (§9). */\nexport type Aggregate = \"count\";","description":"An aggregate over a (correlated) subquery's rows (`REDUCE-DESIGN.md`). v1: `count(*)`.\nSet on a `related` subquery (`Ast.aggregate`), it marks that relationship a count\naggregate the builder lowers to a scalar-projected singular relationship (§9).","source":"packages/client/src/ast.ts","line":67,"href":"/reference/typescript/remote/#symbol-Aggregate"},{"name":"and","originalName":"and","kind":"FunctionDeclaration","signature":"/** All children must hold. */\nexport declare function and<R>(...conds: Cond<R>[]): Cond<R>;","description":"All children must hold.","source":"packages/client/src/operators.ts","line":66,"href":"/reference/typescript/remote/#symbol-and"},{"name":"AnyCols","originalName":"AnyCols","kind":"TypeAliasDeclaration","signature":"export type AnyCols = Record<string, Col<unknown>>;","description":"","source":"packages/client/src/schema.ts","line":27,"href":"/reference/typescript/remote/#symbol-AnyCols"},{"name":"AnyQuery","originalName":"AnyQuery","kind":"TypeAliasDeclaration","signature":"export type AnyQuery = Query<any, any, any, any, any, any>;","description":"","source":"packages/client/src/query.ts","line":308,"href":"/reference/typescript/remote/#symbol-AnyQuery"},{"name":"AnyRelationship","originalName":"AnyRelationship","kind":"TypeAliasDeclaration","signature":"/** Any relationship, for positions that only read its correlation / child table. */\nexport type AnyRelationship = Relationship<AnyCols, AnyCols>;","description":"Any relationship, for positions that only read its correlation / child table.","source":"packages/client/src/schema.ts","line":469,"href":"/reference/typescript/remote/#symbol-AnyRelationship"},{"name":"AnyTable","originalName":"AnyTable","kind":"TypeAliasDeclaration","signature":"export type AnyTable = TableLike<AnyCols>;","description":"","source":"packages/client/src/schema.ts","line":102,"href":"/reference/typescript/remote/#symbol-AnyTable"},{"name":"Arg","originalName":"Arg","kind":"TypeAliasDeclaration","signature":"/** A field argument: its typed predicate, or a bare value (bare = `eq` sugar). */\nexport type Arg<V> = Pred<V> | V;","description":"A field argument: its typed predicate, or a bare value (bare = `eq` sugar).","source":"packages/client/src/operators.ts","line":47,"href":"/reference/typescript/remote/#symbol-Arg"},{"name":"ArgSchema","originalName":"ArgSchema","kind":"InterfaceDeclaration","signature":"/** The minimal arg validator a shared mutator can carry so the SERVER can parse UNTRUSTED wire args\n *  before driving it (the client trusts its typed callsites and never calls this). Structural on\n *  purpose — a zod schema satisfies it as-is — so `@rindle/client` stays validator-library-agnostic. */\nexport interface ArgSchema<Args> {\n    parse(raw: unknown): Args;\n}","description":"The minimal arg validator a shared mutator can carry so the SERVER can parse UNTRUSTED wire args\nbefore driving it (the client trusts its typed callsites and never calls this). Structural on\npurpose — a zod schema satisfies it as-is — so `@rindle/client` stays validator-library-agnostic.","source":"packages/client/src/mutation-ops.ts","line":161,"href":"/reference/typescript/remote/#symbol-ArgSchema"},{"name":"ArrayView","originalName":"ArrayView","kind":"InterfaceDeclaration","signature":"/** The public ArrayView contract `materialize()` returns. */\nexport interface ArrayView<R> {\n    /** The current materialized result (reference-stable where data is unchanged). */\n    readonly data: readonly R[];\n    /** The engine query id the Store assigned this view (1:1 with the view). The same `qid` the raw\n     *  change stream ({@link Store.subscribeChanges}) tags each frame with, so a consumer can\n     *  correlate this query with its `ChangeEvent`s (e.g. to bind a narrator) straight off\n     *  `materialize(query).qid` — no separate handle needed. */\n    readonly qid: QueryId;\n    /** The query's view `WireSchema` (the position→name source for {@link resolveChange}), captured\n     *  from its `hello` frame. `null` while PENDING — a remote backend's `hello` arrives async; an\n     *  in-process backend (wasm/replica) populates it synchronously during `materialize`. */\n    readonly schema: WireSchema | null;\n    /** The query's SERVER-CHANNEL state (`unknown` while loading, `complete` once server-authoritative;\n     *  the `error` variant is reserved and currently unproduced). A pending optimistic mutation no\n     *  longer moves this — it is a separate axis (FOLDED-MUTATIONS-DESIGN §7). `complete` for backends\n     *  with no server lifecycle. Changes notify subscribers. */\n    readonly resultType: ResultType;\n    /** Subscribe; fires immediately with the current data, then after each applied batch (and after\n     *  a {@link resultType} change — re-read `resultType` in the listener). */\n    subscribe(listener: (data: readonly R[]) => void): () => void;\n    /** Subscribe to this view's folded CHANGE stream — the `FlatChange[]` it applies, NET of no-op\n     *  cycles (a rebase's balanced `remove`+`add` / edit round-trip cancels, so a correctly predicted\n     *  optimistic write delivers nothing here). Carries the diff {@link subscribe} throws away; the\n     *  per-view seam a narrator rides. Does NOT replay on subscribe — attach via\n     *  `store.materialize(query, { onChanges })` to catch a synchronous backend's first snapshot.\n     *  A view with any change listener also enriches its own `remove` ops with the evicted subtree\n     *  (per-view, no global opt-in). Returns a detach function. */\n    onChanges(listener: ViewChangeListener): () => void;\n    /** Tear down + stop receiving updates. */\n    destroy(): void;\n}","description":"The public ArrayView contract `materialize()` returns.","source":"packages/client/src/view.ts","line":33,"href":"/reference/typescript/remote/#symbol-ArrayView"},{"name":"AssembledNode","originalName":"AssembledNode","kind":"InterfaceDeclaration","signature":"/** A single assembled (nested-by-name) row from `POST /query` (SSR-DESIGN.md §3.3): the cells\n *  under `cols`, each in-view relationship inlined by its alias (a nested array / object, or a\n *  scalar for a `countAs` aggregate). {@link Store.assembleSnapshot} converts these to the\n *  view's projected result shape. */\nexport interface AssembledNode {\n    cols: Record<string, WireValue>;\n    [rel: string]: unknown;\n}","description":"A single assembled (nested-by-name) row from `POST /query` (SSR-DESIGN.md §3.3): the cells\nunder `cols`, each in-view relationship inlined by its alias (a nested array / object, or a\nscalar for a `countAs` aggregate). {@link Store.assembleSnapshot} converts these to the\nview's projected result shape.","source":"packages/client/src/store.ts","line":33,"href":"/reference/typescript/remote/#symbol-AssembledNode"},{"name":"assembleDurableText","originalName":"assembleDurableText","kind":"FunctionDeclaration","signature":"/**\n * The durable half of the splice for the mapped-table layout: the compacted `body` followed by\n * whatever chunk rows have not been folded into it yet.\n *\n * Chunks are ALWAYS the suffix after `body` — the closing checkpoint rewrites `body` and drops the\n * chunks it absorbed in ONE transaction — so a reader never observes a torn state where a chunk both\n * is and is not in the body.\n */\nexport declare function assembleDurableText(message: {\n    body?: string | null;\n} | null | undefined, chunks?: ReadonlyArray<{\n    seq: number;\n    text: string;\n}>): string;","description":"The durable half of the splice for the mapped-table layout: the compacted `body` followed by\nwhatever chunk rows have not been folded into it yet.\n\nChunks are ALWAYS the suffix after `body` — the closing checkpoint rewrites `body` and drops the\nchunks it absorbed in ONE transaction — so a reader never observes a torn state where a chunk both\nis and is not in the body.","source":"packages/client/src/stream.ts","line":87,"href":"/reference/typescript/remote/#symbol-assembleDurableText"},{"name":"assertNoLocalTables","originalName":"assertNoLocalTables","kind":"FunctionDeclaration","signature":"/** Throw if `ast` references a local-only table ANYWHERE — the complete form of the {@link queries}\n *  root guard (Q1 / E3 client half). The root proxy `get` only sees the table accessed off the\n *  builder root; a local table reached through a relationship / `sub` / `countAs` / `exists` CHILD is\n *  passed as a value and never touches the proxy, so it is caught here instead: at `.ast()` for a\n *  server-scope builder, and again as an SSR backstop in `ServerStore.preload`. A server/named query\n *  may never name a local table (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5). */\nexport declare function assertNoLocalTables<S extends ColsMap>(ast: Ast, schema: Schema<S>): void;","description":"Throw if `ast` references a local-only table ANYWHERE — the complete form of the {@link queries}\nroot guard (Q1 / E3 client half). The root proxy `get` only sees the table accessed off the\nbuilder root; a local table reached through a relationship / `sub` / `countAs` / `exists` CHILD is\npassed as a value and never touches the proxy, so it is caught here instead: at `.ast()` for a\nserver-scope builder, and again as an SSR backstop in `ServerStore.preload`. A server/named query\nmay never name a local table (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5).","source":"packages/client/src/query.ts","line":845,"href":"/reference/typescript/remote/#symbol-assertNoLocalTables"},{"name":"Ast","originalName":"Ast","kind":"InterfaceDeclaration","signature":"/** The query AST. `table` is the only required field; the builder omits empty/false fields\n *  (matching the Rust `skip_serializing_if`), which the deserializer treats as absent. */\nexport interface Ast {\n    table: string;\n    alias?: string;\n    /** Projection (PROJECTION-SUPPORT-DESIGN.md §6). Absent ⇒ select all columns; present ⇒\n     *  project to just these (drives what syncs + what the view reports). Serializes only when\n     *  set, matching the Rust `Ast.select`'s `skip_serializing_if`. */\n    select?: string[];\n    where?: Condition;\n    related?: CorrelatedSubquery[];\n    start?: Bound;\n    limit?: number;\n    one?: boolean;\n    /** Aggregate this (sub)query's rows instead of materializing them (`REDUCE-DESIGN.md`\n     *  §9). `count` on a `related` subquery surfaces a scalar `commentCount` field; the\n     *  builder lowers it to a scalar-projected singular relationship. Absent ⇒ ordinary rows. */\n    aggregate?: Aggregate;\n    /** The {@link Ast.aggregate} value is **precomputed** — supplied as rows of a (synthetic)\n     *  source table rather than reduced from child rows. Set by the normalized client's AST\n     *  rewrite (`AGGREGATE-SYNC-DESIGN.md` §3.3) so the local engine reads the server's count\n     *  with a plain singular join + the same projection instead of a `reduce`. Only meaningful\n     *  with `aggregate`; absent ⇒ `false`. */\n    aggregatePrecomputed?: boolean;\n    /** Top-level `GROUP BY` columns (names), meaningful only alongside a root {@link Ast.aggregate}\n     *  (`REDUCE-DESIGN.md` §8). Empty + `aggregate` set ⇒ a **global** aggregate (one `[count]` row);\n     *  non-empty ⇒ one `[group…, count]` row per distinct value-tuple. Distinct from a relationship\n     *  aggregate's implicit grouping (the correlation child key). Absent on the wire ⇒ empty. */\n    groupBy?: string[];\n    /** `HAVING` — a filter over the **post-aggregation** rows of a root {@link Ast.aggregate}\n     *  (`REDUCE-DESIGN.md` §4: a filter directly above the `reduce`). Its condition addresses the\n     *  aggregate's *output* columns — the {@link Ast.groupBy} columns and the synthetic `count`\n     *  column — not base-table columns (those go in {@link Ast.where}, which filters rows *below* the\n     *  reduce). Absent ⇒ no post-aggregation filter. */\n    having?: Condition;\n    orderBy?: OrderPart[];\n}","description":"The query AST. `table` is the only required field; the builder omits empty/false fields\n(matching the Rust `skip_serializing_if`), which the deserializer treats as absent.","source":"packages/client/src/ast.ts","line":71,"href":"/reference/typescript/remote/#symbol-Ast"},{"name":"AsyncEffectExec","originalName":"AsyncEffectExec","kind":"InterfaceDeclaration","signature":"/** A tier's ASYNCHRONOUS effect executor (the server transaction): every op is a Promise. */\nexport interface AsyncEffectExec {\n    apply(op: MutationOp): Promise<void>;\n    read(table: string, pk: KeyedRow): Promise<KeyedRow | undefined>;\n    query(q: QueryArg): Promise<QueryResultRow[]>;\n}","description":"A tier's ASYNCHRONOUS effect executor (the server transaction): every op is a Promise.","source":"packages/client/src/mutation-ops.ts","line":247,"href":"/reference/typescript/remote/#symbol-AsyncEffectExec"},{"name":"Backend","originalName":"Backend","kind":"InterfaceDeclaration","signature":"/**\n * The seam the core talks to. Backend-agnostic: the same interface for the in-process\n * WASM backend and a remote (network) backend. The core never knows which. A backend\n * pushes a per-query {@link ChangeEvent} stream via {@link Backend.onEvent}; the remote\n * backend additionally owns the epoch/seq/gap protocol and emits only clean, in-order\n * events (so the ArrayView never sees the wire protocol).\n */\nexport interface Backend {\n    registerQuery(queryId: QueryId, ast: unknown, remote?: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Optional split path for local-first backends: retain/release a named remote footprint\n     *  without creating another local materialized view. `localQueryId`, when provided, names\n     *  the local AST view this remote footprint feeds. `ast`, when provided, gives the backend\n     *  the local schema context for sync-only retains that still need aggregate/table setup. */\n    retainRemoteQuery?(queryId: QueryId, remote: RemoteQuery, localQueryId?: QueryId, ast?: Ast): void;\n    releaseRemoteQuery?(queryId: QueryId): void;\n    /** Local: applies now (changes flow back on the stream). Remote: sends to the server. */\n    mutate(mutations: Mutation[]): Promise<void>;\n    /** Optional DIRECT-COMMIT path for LOCAL-only tables (`201-LOCAL-ONLY-TABLES-DESIGN.md` §6):\n     *  applies the writes straight to the engine, OUTSIDE the optimistic pending stack (a local\n     *  table is untracked, so it never rebases). The backend rejects any synced/tracked table (M2).\n     *  Backends with no local-table support (a plain remote sync backend) omit it.\n     *\n     *  `onCommitted` (207 §5.1) runs after the engine commit is applied but BEFORE subscriber\n     *  delivery: a subscriber throwing during delivery re-raises out of this call, and a caller\n     *  that must stay coherent with the engine (the persistence tap) cannot tell that throw from\n     *  a pre-commit rejection — the callback can, because it fires exactly when the commit is in. */\n    writeLocal?(mutations: Mutation[], onCommitted?: () => void): void;\n    onEvent(handler: (queryId: QueryId, event: ChangeEvent) => void): void;\n    /** Optional: the backend pushes per-query {@link ResultType} changes here and the core routes\n     *  each to the matching view (so `view.resultType` tracks it). Backends with no lifecycle (the\n     *  in-process engine) omit it and every view stays `complete`. */\n    onResultType?(handler: (queryId: QueryId, resultType: ResultType) => void): void;\n    /** Optional: brackets one commit's coherent multi-query delivery so the Store can fold every\n     *  affected view BEFORE notifying any subscriber — cross-view-atomic notification. The\n     *  in-process engine derives the whole commit's per-query deltas against one consistent post-\n     *  commit snapshot, then dispatches them one query at a time; without a barrier a subscriber on\n     *  the first-dispatched view, re-reading a sibling view in its callback, would observe that\n     *  sibling's PRE-commit state (it has not folded yet). The backend calls the handler with\n     *  `\"begin\"` before delivering a commit's per-query `batch` events (via {@link onEvent}) and\n     *  `\"end\"` after the last one; between them the Store folds each view but DEFERS its\n     *  notification, firing every affected view's subscribers together at `\"end\"`. Backends with no\n     *  synchronous multi-query commit boundary (a plain remote backend, where each query's frame\n     *  arrives in its own message) omit it — the Store then notifies per event, exactly as before. */\n    onCommitBoundary?(handler: (phase: \"begin\" | \"end\") => void): void;\n    /** Optional dev-only authoritative server stream tap. It is additive, like\n     *  `Store.subscribeChanges`, and must not displace the backend's normal event handler. */\n    __attachDevtoolsServerDeltas?(observer: BackendDevObserver): () => void;\n}","description":"The seam the core talks to. Backend-agnostic: the same interface for the in-process\nWASM backend and a remote (network) backend. The core never knows which. A backend\npushes a per-query {@link ChangeEvent} stream via {@link Backend.onEvent}; the remote\nbackend additionally owns the epoch/seq/gap protocol and emits only clean, in-order\nevents (so the ArrayView never sees the wire protocol).","source":"packages/client/src/types.ts","line":171,"href":"/reference/typescript/remote/#symbol-Backend"},{"name":"BackendDevObserver","originalName":"BackendDevObserver","kind":"InterfaceDeclaration","signature":"/** Dev-only passive tap over a backend's authoritative server stream. Optional because in-process\n *  backends have no server stream, and older/custom backends may only expose the Store tap. */\nexport interface BackendDevObserver {\n    onServerDelta?(qid: QueryId, ev: BackendServerDelta): void;\n}","description":"Dev-only passive tap over a backend's authoritative server stream. Optional because in-process\nbackends have no server stream, and older/custom backends may only expose the Store tap.","source":"packages/client/src/types.ts","line":140,"href":"/reference/typescript/remote/#symbol-BackendDevObserver"},{"name":"BackendServerDelta","originalName":"BackendServerDelta","kind":"TypeAliasDeclaration","signature":"/** A dev-only authoritative server delta exposed by backends that can distinguish the upstream\n *  server stream from their local view/IVM stream. Flat remote backends surface clean\n *  {@link ChangeEvent}s; local-first normalized/optimistic backends surface the path-free\n *  {@link NormalizedEvent}s before they are folded into the local engine. */\nexport type BackendServerDelta = {\n    format: \"flat\";\n    event: ChangeEvent;\n} | {\n    format: \"normalized\";\n    event: NormalizedEvent;\n};","description":"A dev-only authoritative server delta exposed by backends that can distinguish the upstream\nserver stream from their local view/IVM stream. Flat remote backends surface clean\n{@link ChangeEvent}s; local-first normalized/optimistic backends surface the path-free\n{@link NormalizedEvent}s before they are folded into the local engine.","source":"packages/client/src/types.ts","line":134,"href":"/reference/typescript/remote/#symbol-BackendServerDelta"},{"name":"Batch","originalName":"Batch","kind":"InterfaceDeclaration","signature":"/** One transaction's flat changes (or the seq-0 hydrate snapshot). `events` apply in order. */\nexport interface Batch {\n    epoch: number;\n    seq: number;\n    schemaFp: string;\n    events: FlatChange[];\n}","description":"One transaction's flat changes (or the seq-0 hydrate snapshot). `events` apply in order.","source":"packages/remote/src/protocol.ts","line":102,"href":"/reference/typescript/remote/#symbol-Batch"},{"name":"BatchEffect","originalName":"BatchEffect","kind":"TypeAliasDeclaration","signature":"/** A fan-out a generator mutator yields: run several effects \"together\". The server driver resolves\n *  them with `Promise.all`; the client driver runs them in array order (already synchronous). Results\n *  return in the same order on both tiers. Each result has its effect's shape: a row, query rows,\n *  `undefined` for a write, or an array for a nested batch. Cast the yielded result to that shape;\n *  the generator's declared next-type covers only point reads. */\nexport type BatchEffect = {\n    kind: \"all\";\n    effects: readonly YieldEffect[];\n};","description":"A fan-out a generator mutator yields: run several effects \"together\". The server driver resolves\nthem with `Promise.all`; the client driver runs them in array order (already synchronous). Results\nreturn in the same order on both tiers. Each result has its effect's shape: a row, query rows,\n`undefined` for a write, or an array for a nested batch. Cast the yielded result to that shape;\nthe generator's declared next-type covers only point reads.","source":"packages/client/src/mutation-ops.ts","line":72,"href":"/reference/typescript/remote/#symbol-BatchEffect"},{"name":"boolean","originalName":"boolean","kind":"VariableDeclaration","signature":"export declare const boolean: () => ColBuilder<boolean>;","description":"","source":"packages/client/src/schema.ts","line":48,"href":"/reference/typescript/remote/#symbol-boolean"},{"name":"Bound","originalName":"Bound","kind":"InterfaceDeclaration","signature":"/** A paging lower bound (`Bound`, `src/ast.rs`). `row` is a *partial* wire row — the bound\n *  columns by name (only the sort columns are read by the engine's `Skip` comparator).\n *  `exclusive` ⇒ start *after* the bound row (`Basis::After`); else *at* it (`Basis::At`). */\nexport interface Bound {\n    row: Record<string, LitValue>;\n    exclusive: boolean;\n}","description":"A paging lower bound (`Bound`, `src/ast.rs`). `row` is a *partial* wire row — the bound\ncolumns by name (only the sort columns are read by the engine's `Skip` comparator).\n`exclusive` ⇒ start *after* the bound row (`Basis::After`); else *at* it (`Basis::At`).","source":"packages/client/src/ast.ts","line":53,"href":"/reference/typescript/remote/#symbol-Bound"},{"name":"CachedQueryView","originalName":"CachedQueryView","kind":"InterfaceDeclaration","signature":"export interface CachedQueryView<Q extends Query<any, any, any>> {\n    readonly view: ReturnType<Q[\"materialize\"]>;\n    /** Retain this query's named remote footprint and release it later. Ad-hoc local queries\n     *  return a no-op release function. */\n    retain(query: Q): () => void;\n    destroy(): void;\n}","description":"","source":"packages/client/src/store.ts","line":50,"href":"/reference/typescript/remote/#symbol-CachedQueryView"},{"name":"ChangeEvent","originalName":"ChangeEvent","kind":"TypeAliasDeclaration","signature":"/**\n * What a {@link Backend} pushes per query: the handshake (`hello`), the (possibly\n * chunked) hydrate `snapshot`, then incremental `batch`es. The core builds an ArrayView\n * on `hello`, hydrates on `snapshot`, folds on `batch` — identically for any backend.\n */\nexport type ChangeEvent = {\n    type: \"hello\";\n    schema: WireSchema;\n    comparatorVersion: number;\n} | {\n    type: \"snapshot\";\n    adds: FlatChange[];\n    last: boolean;\n} | {\n    type: \"batch\";\n    events: FlatChange[];\n    catchUp?: boolean;\n};","description":"What a {@link Backend} pushes per query: the handshake (`hello`), the (possibly\nchunked) hydrate `snapshot`, then incremental `batch`es. The core builds an ArrayView\non `hello`, hydrates on `snapshot`, folds on `batch` — identically for any backend.","source":"packages/client/src/types.ts","line":79,"href":"/reference/typescript/remote/#symbol-ChangeEvent"},{"name":"ChangePhase","originalName":"ChangePhase","kind":"TypeAliasDeclaration","signature":"/** The phase of an {@link ArrayView.onChanges} delivery: the initial hydrate `snapshot` vs a later\n *  incremental `batch` — the same distinction a narrator draws (`ChangeEvent` `snapshot`/`batch`). */\nexport type ChangePhase = \"snapshot\" | \"batch\";","description":"The phase of an {@link ArrayView.onChanges} delivery: the initial hydrate `snapshot` vs a later\nincremental `batch` — the same distinction a narrator draws (`ChangeEvent` `snapshot`/`batch`).","source":"packages/client/src/view.ts","line":23,"href":"/reference/typescript/remote/#symbol-ChangePhase"},{"name":"CLIENT_MUTATIONS_SCHEMA","originalName":"CLIENT_MUTATIONS_SCHEMA","kind":"VariableDeclaration","signature":"/** The system table's wire schema — appended to the client's expected schemas so the\n *  lmid query's `hello` passes CRIT#4 validation. */\nexport declare const CLIENT_MUTATIONS_SCHEMA: NormalizedTableSchema;","description":"The system table's wire schema — appended to the client's expected schemas so the\nlmid query's `hello` passes CRIT#4 validation.","source":"packages/client/src/types.ts","line":291,"href":"/reference/typescript/remote/#symbol-CLIENT_MUTATIONS_SCHEMA"},{"name":"CLIENT_MUTATIONS_TABLE","originalName":"CLIENT_MUTATIONS_TABLE","kind":"VariableDeclaration","signature":"/** The replicated bookkeeping table carrying each client's high-water mutation id\n *  (`lmid`). Engine-hosted and served like any base table; reserved (never part of a\n *  user schema). Columns: `[client_id, last_mutation_id]`, PK `client_id`. */\nexport declare const CLIENT_MUTATIONS_TABLE = \"_rindle_client_mutations\";","description":"The replicated bookkeeping table carrying each client's high-water mutation id\n(`lmid`). Engine-hosted and served like any base table; reserved (never part of a\nuser schema). Columns: `[client_id, last_mutation_id]`, PK `client_id`.","source":"packages/client/src/types.ts","line":282,"href":"/reference/typescript/remote/#symbol-CLIENT_MUTATIONS_TABLE"},{"name":"ClientMsg","originalName":"ClientMsg","kind":"TypeAliasDeclaration","signature":"export type ClientMsg = {\n    t: \"init\";\n    clientID: string;\n} | SubscribeClientMsg | {\n    t: \"unsubscribe\";\n    queryId: number;\n} | {\n    t: \"mutate\";\n    mutations: Mutation[];\n} | {\n    t: \"pushMutation\";\n    envelope: MutationEnvelope;\n};","description":"","source":"packages/remote/src/protocol.ts","line":123,"href":"/reference/typescript/remote/#symbol-ClientMsg"},{"name":"Col","originalName":"Col","kind":"InterfaceDeclaration","signature":"/** A column descriptor. `type` drives the comparator + JSON parsing; `__t` is a phantom. A\n *  nullable column is a `Col<T | null>` — that is the ONLY thing nullability changes at the type\n *  level, so `RowOf` (and the field-condition factory) widen automatically.\n *\n *  `optional` is the runtime companion of that phantom: set by {@link ColBuilder.nullable}, it is\n *  what the write funnels read to make a nullable column omittable from an insert (filled with\n *  `null`, design 206 §6.2). It mirrors the engine's `ColumnDef.optional`\n *  (`pragma_table_info.notnull == 0`); absent ⇒ `NOT NULL` / required. */\nexport interface Col<T> {\n    readonly type: ColType;\n    readonly optional?: boolean;\n    readonly __t?: T;\n}","description":"A column descriptor. `type` drives the comparator + JSON parsing; `__t` is a phantom. A\nnullable column is a `Col<T | null>` — that is the ONLY thing nullability changes at the type\nlevel, so `RowOf` (and the field-condition factory) widen automatically.\n\n`optional` is the runtime companion of that phantom: set by {@link ColBuilder.nullable}, it is\nwhat the write funnels read to make a nullable column omittable from an insert (filled with\n`null`, design 206 §6.2). It mirrors the engine's `ColumnDef.optional`\n(`pragma_table_info.notnull == 0`); absent ⇒ `NOT NULL` / required.","source":"packages/client/src/schema.ts","line":21,"href":"/reference/typescript/remote/#symbol-Col"},{"name":"ColBuilder","originalName":"ColBuilder","kind":"InterfaceDeclaration","signature":"/** The chainable form returned by the column factories: a {@link Col} plus `.nullable()`.\n *\n *  `.nullable()` widens the column's value type to `T | null` — its `Row<…>` field becomes\n *  `T | null` — and sets the runtime {@link Col.optional} marker so it may be omitted from an insert\n *  (design 206 §6.2). `rindle schema gen` emits `.nullable()` for every nullable (non-`NOT NULL`) SQL\n *  column; you can also call it by hand on a local-only table's columns. It is idempotent and stays\n *  chainable. */\nexport interface ColBuilder<T> extends Col<T> {\n    nullable(): ColBuilder<T | null>;\n}","description":"The chainable form returned by the column factories: a {@link Col} plus `.nullable()`.\n\n`.nullable()` widens the column's value type to `T | null` — its `Row<…>` field becomes\n`T | null` — and sets the runtime {@link Col.optional} marker so it may be omitted from an insert\n(design 206 §6.2). `rindle schema gen` emits `.nullable()` for every nullable (non-`NOT NULL`) SQL\ncolumn; you can also call it by hand on a local-only table's columns. It is idempotent and stays\nchainable.","source":"packages/client/src/schema.ts","line":37,"href":"/reference/typescript/remote/#symbol-ColBuilder"},{"name":"ColRefinements","originalName":"ColRefinements","kind":"TypeAliasDeclaration","signature":"/** Per-column narrowings for {@link refineTable}: each entry must keep the column's kind and narrow\n *  its TS type (`Col<T2>` with `T2 extends T`) — `json<Meta>()` on a json column, a literal-union\n *  `string<\"a\" | \"b\">()` on a string column. Kind changes are rejected (cross-kind at compile time,\n *  same-phantom kind flips like `string()` on a json column at runtime). */\nexport type ColRefinements<C extends AnyCols> = {\n    readonly [K in keyof C]?: Col<ColT<C[K]>>;\n};","description":"Per-column narrowings for {@link refineTable}: each entry must keep the column's kind and narrow\nits TS type (`Col<T2>` with `T2 extends T`) — `json<Meta>()` on a json column, a literal-union\n`string<\"a\" | \"b\">()` on a string column. Kind changes are rejected (cross-kind at compile time,\nsame-phantom kind flips like `string()` on a json column at runtime).","source":"packages/client/src/schema.ts","line":303,"href":"/reference/typescript/remote/#symbol-ColRefinements"},{"name":"ColsMap","originalName":"ColsMap","kind":"TypeAliasDeclaration","signature":"/** name → columns, the resolved schema map carried in the {@link Schema} type. */\nexport type ColsMap = Record<string, AnyCols>;","description":"name → columns, the resolved schema map carried in the {@link Schema} type.","source":"packages/client/src/schema.ts","line":199,"href":"/reference/typescript/remote/#symbol-ColsMap"},{"name":"ColT","originalName":"ColT","kind":"TypeAliasDeclaration","signature":"export type ColT<X> = X extends Col<infer T> ? T : never;","description":"","source":"packages/client/src/schema.ts","line":26,"href":"/reference/typescript/remote/#symbol-ColT"},{"name":"ColType","originalName":"ColType","kind":"TypeAliasDeclaration","signature":"/** Declared column type (from the typed schema) — drives the comparator + JSON parsing.\n *  `\"int64\"` is the exact-i64 column plane (design 226): the vocabulary exists from\n *  Stage C4 (codegen can name it), but no exact integer cell crosses this wire — and\n *  `WireValue` gains no `bigint` — until Stage E lands the browser bigint plane; until\n *  then the daemon refuses IVM queries whose footprint touches such a column. */\nexport type ColType = \"string\" | \"number\" | \"boolean\" | \"json\" | \"int64\";","description":"Declared column type (from the typed schema) — drives the comparator + JSON parsing.\n`\"int64\"` is the exact-i64 column plane (design 226): the vocabulary exists from\nStage C4 (codegen can name it), but no exact integer cell crosses this wire — and\n`WireValue` gains no `bigint` — until Stage E lands the browser bigint plane; until\nthen the daemon refuses IVM queries whose footprint touches such a column.","source":"packages/client/src/types.ts","line":16,"href":"/reference/typescript/remote/#symbol-ColType"},{"name":"COMPARATOR_VERSION","originalName":"COMPARATOR_VERSION","kind":"VariableDeclaration","signature":"/** The `compare_values` / `compare_rows` algorithm-contract version (=== the engine's\n *  `wire_schema::COMPARATOR_VERSION`). A remote subscriber hard-rejects a `hello` whose\n *  `comparatorVersion` differs — the total order is a code contract, not data, so a schema\n *  fingerprint can't cover it. Bump in lockstep with the Rust constant if the order changes.\n *\n *  v2 (design 226 Stage B): the engine's mixed Int/Float comparison became exact instead\n *  of f64-widening. No TS behavior change — every value a client can hold today is an f64\n *  `number`, on which v1 and v2 order identically (the §8 gate keeps int64 cells out of\n *  the browser until Stage E) — but the contract the version names is the engine's. */\nexport declare const COMPARATOR_VERSION = 2;","description":"The `compare_values` / `compare_rows` algorithm-contract version (=== the engine's\n`wire_schema::COMPARATOR_VERSION`). A remote subscriber hard-rejects a `hello` whose\n`comparatorVersion` differs — the total order is a code contract, not data, so a schema\nfingerprint can't cover it. Bump in lockstep with the Rust constant if the order changes.\n\nv2 (design 226 Stage B): the engine's mixed Int/Float comparison became exact instead\nof f64-widening. No TS behavior change — every value a client can hold today is an f64\n`number`, on which v1 and v2 order identically (the §8 gate keeps int64 cells out of\nthe browser until Stage E) — but the contract the version names is the engine's.","source":"packages/client/src/compare.ts","line":28,"href":"/reference/typescript/remote/#symbol-COMPARATOR_VERSION"},{"name":"compareNumber","originalName":"compareNumber","kind":"FunctionDeclaration","signature":"/** number compare with `f64::total_cmp` semantics (NaN deterministic & last; -0 < +0). */\nexport declare function compareNumber(a: number, b: number): -1 | 0 | 1;","description":"number compare with `f64::total_cmp` semantics (NaN deterministic & last; -0 < +0).","source":"packages/client/src/compare.ts","line":44,"href":"/reference/typescript/remote/#symbol-compareNumber"},{"name":"compareRows","originalName":"compareRows","kind":"FunctionDeclaration","signature":"/** Compare two rows by a resolved sort (`[columnIndex, ascending]` pairs). First non-equal\n *  column wins; a descending column negates. */\nexport declare function compareRows(a: WireValue[], b: WireValue[], sort: [\n    number,\n    boolean\n][]): -1 | 0 | 1;","description":"Compare two rows by a resolved sort (`[columnIndex, ascending]` pairs). First non-equal\ncolumn wins; a descending column negates.","source":"packages/client/src/compare.ts","line":84,"href":"/reference/typescript/remote/#symbol-compareRows"},{"name":"compareString","originalName":"compareString","kind":"FunctionDeclaration","signature":"/** UTF-8 bytewise string compare (=== SQLite `BINARY` / Rust `&str` Ord). Correct for\n *  supplementary-plane code points, where JS `<` / `localeCompare` (UTF-16) would disagree. */\nexport declare function compareString(a: string, b: string): -1 | 0 | 1;","description":"UTF-8 bytewise string compare (=== SQLite `BINARY` / Rust `&str` Ord). Correct for\nsupplementary-plane code points, where JS `<` / `localeCompare` (UTF-16) would disagree.","source":"packages/client/src/compare.ts","line":52,"href":"/reference/typescript/remote/#symbol-compareString"},{"name":"compareValue","originalName":"compareValue","kind":"FunctionDeclaration","signature":"/** Compare two bare cells, dispatching on the runtime type (null sorts first). */\nexport declare function compareValue(a: WireValue, b: WireValue): -1 | 0 | 1;","description":"Compare two bare cells, dispatching on the runtime type (null sorts first).","source":"packages/client/src/compare.ts","line":63,"href":"/reference/typescript/remote/#symbol-compareValue"},{"name":"Cond","originalName":"Cond","kind":"TypeAliasDeclaration","signature":"/** A condition over row `R`. The runtime value is the wire {@link Condition}; `R` is a\n *  phantom brand so a condition for one table can't be `.where()`d onto another. */\nexport type Cond<R> = Condition & {\n    readonly __row?: R;\n};","description":"A condition over row `R`. The runtime value is the wire {@link Condition}; `R` is a\nphantom brand so a condition for one table can't be `.where()`d onto another.","source":"packages/client/src/operators.ts","line":51,"href":"/reference/typescript/remote/#symbol-Cond"},{"name":"Condition","originalName":"Condition","kind":"TypeAliasDeclaration","signature":"/** The filter tree — `type`-tagged; recursive. There is no generic NOT node (negation is\n *  via the negated operators and `NOT EXISTS`, matching `src/ast.rs` `Condition`). */\nexport type Condition = {\n    type: \"simple\";\n    op: SimpleOp;\n    left: ValuePosition;\n    right: ValuePosition;\n} | {\n    type: \"and\";\n    conditions: Condition[];\n} | {\n    type: \"or\";\n    conditions: Condition[];\n} | {\n    type: \"correlatedSubquery\";\n    related: CorrelatedSubquery;\n    op: ExistsOp;\n    flip?: boolean;\n    scalar?: boolean;\n};","description":"The filter tree — `type`-tagged; recursive. There is no generic NOT node (negation is\nvia the negated operators and `NOT EXISTS`, matching `src/ast.rs` `Condition`).","source":"packages/client/src/ast.ts","line":39,"href":"/reference/typescript/remote/#symbol-Condition"},{"name":"CorrelatedSubquery","originalName":"CorrelatedSubquery","kind":"InterfaceDeclaration","signature":"export interface CorrelatedSubquery {\n    correlation: Correlation;\n    subquery: Ast;\n    system?: \"client\" | \"permissions\" | \"test\";\n}","description":"","source":"packages/client/src/ast.ts","line":58,"href":"/reference/typescript/remote/#symbol-CorrelatedSubquery"},{"name":"Correlation","originalName":"Correlation","kind":"InterfaceDeclaration","signature":"export interface Correlation {\n    parentField: string[];\n    childField: string[];\n}","description":"","source":"packages/client/src/ast.ts","line":45,"href":"/reference/typescript/remote/#symbol-Correlation"},{"name":"createAffinityTicketStore","originalName":"createAffinityTicketStore","kind":"FunctionDeclaration","signature":"/** Build an {@link AffinityTicketStore}, optionally persisted. Pure/in-memory when `persist` is\n *  omitted. */\nexport declare function createAffinityTicketStore(persist?: TicketPersistence): AffinityTicketStore;","description":"Build an {@link AffinityTicketStore}, optionally persisted. Pure/in-memory when `persist` is\nomitted.","source":"packages/remote/src/affinity.ts","line":57,"href":"/reference/typescript/remote/#symbol-createAffinityTicketStore"},{"name":"createLocalFragmentRef","originalName":"createLocalFragmentRef","kind":"FunctionDeclaration","signature":"export declare function createLocalFragmentRef<F extends Fragment<any, any, any>>(fragment: F, pk: Record<string, LitValue>, coverage: FragmentCoverage): LocalFragmentRef<F>;","description":"","source":"packages/client/src/query.ts","line":610,"href":"/reference/typescript/remote/#symbol-createLocalFragmentRef"},{"name":"createLocalFragmentRefForTable","originalName":"createLocalFragmentRefForTable","kind":"FunctionDeclaration","signature":"export declare function createLocalFragmentRefForTable<F extends Fragment<any, any, any>>(table: string, pk: Record<string, LitValue>, coverage: FragmentCoverage): LocalFragmentRef<F>;","description":"","source":"packages/client/src/query.ts","line":618,"href":"/reference/typescript/remote/#symbol-createLocalFragmentRefForTable"},{"name":"createQueuedMutationSender","originalName":"createQueuedMutationSender","kind":"FunctionDeclaration","signature":"/** A `MutationEnvelopeSender` (the `pushMutation` option of `RemoteOptimisticSource`) that\n *  queues envelopes and delivers them as confirmed, in-order batches. */\nexport declare function createQueuedMutationSender(opts: QueuedMutationSenderOptions): MutationEnvelopeSender;","description":"A `MutationEnvelopeSender` (the `pushMutation` option of `RemoteOptimisticSource`) that\nqueues envelopes and delivers them as confirmed, in-order batches.","source":"packages/remote/src/mutation-queue.ts","line":66,"href":"/reference/typescript/remote/#symbol-createQueuedMutationSender"},{"name":"createRemoteNormalizedSource","originalName":"createRemoteNormalizedSource","kind":"FunctionDeclaration","signature":"/** Convenience: a `RemoteNormalizedSource` over a ws URL or a custom transport. */\nexport declare function createRemoteNormalizedSource(urlOrTransport: string | Transport, opts?: RemoteNormalizedSourceOptions): RemoteNormalizedSource;","description":"Convenience: a `RemoteNormalizedSource` over a ws URL or a custom transport.","source":"packages/remote/src/remote-source.ts","line":208,"href":"/reference/typescript/remote/#symbol-createRemoteNormalizedSource"},{"name":"createRemoteOptimisticSource","originalName":"createRemoteOptimisticSource","kind":"FunctionDeclaration","signature":"/** Convenience: a `RemoteOptimisticSource` over a ws URL or a custom transport. A URL becomes a\n *  replaceable connection seeded at that endpoint (so a routed lease can still migrate it); a\n *  pre-built transport stays fixed. */\nexport declare function createRemoteOptimisticSource(urlOrTransport: string | Transport, clientID: string, opts?: RemoteOptimisticSourceOptions): RemoteOptimisticSource;","description":"Convenience: a `RemoteOptimisticSource` over a ws URL or a custom transport. A URL becomes a\nreplaceable connection seeded at that endpoint (so a routed lease can still migrate it); a\npre-built transport stays fixed.","source":"packages/remote/src/optimistic-source.ts","line":554,"href":"/reference/typescript/remote/#symbol-createRemoteOptimisticSource"},{"name":"createRemoteStore","originalName":"createRemoteStore","kind":"FunctionDeclaration","signature":"/** Convenience: a `Store` backed by a remote server, over a ws URL or a custom transport. */\nexport declare function createRemoteStore<S extends ColsMap>(schema: Schema<S>, urlOrTransport: string | Transport, opts?: RemoteBackendOptions): Store<S>;","description":"Convenience: a `Store` backed by a remote server, over a ws URL or a custom transport.","source":"packages/remote/src/backend.ts","line":214,"href":"/reference/typescript/remote/#symbol-createRemoteStore"},{"name":"createRootFragmentRef","originalName":"createRootFragmentRef","kind":"FunctionDeclaration","signature":"export declare function createRootFragmentRef<F extends Fragment<any, any, any>, Q extends AnyQuery>(fragment: F, query: Q, coverageKey?: string): LocalFragmentRef<F>;","description":"","source":"packages/client/src/query.ts","line":632,"href":"/reference/typescript/remote/#symbol-createRootFragmentRef"},{"name":"createSchema","originalName":"createSchema","kind":"FunctionDeclaration","signature":"export declare function createSchema<const T extends readonly AnyTable[]>(opts: {\n    tables: T;\n}): Schema<SchemaOf<T>, PkMapOf<T>>;","description":"","source":"packages/client/src/schema.ts","line":227,"href":"/reference/typescript/remote/#symbol-createSchema"},{"name":"createServerStore","originalName":"createServerStore","kind":"FunctionDeclaration","signature":"/** Construct a {@link ServerStore} — the one-shot REST Store for server-side rendering. */\nexport declare function createServerStore<S extends ColsMap>(schema: Schema<S>, opts: ServerStoreOptions): ServerStore<S>;","description":"Construct a {@link ServerStore} — the one-shot REST Store for server-side rendering.","source":"packages/client/src/ssr.ts","line":140,"href":"/reference/typescript/remote/#symbol-createServerStore"},{"name":"defineFragment","originalName":"defineFragment","kind":"FunctionDeclaration","signature":"/**\n * Define a co-located, composable {@link Fragment}: a named selection over `table`. The returned\n * value is callable (the `build` transform), so it threads through the existing `sub`/`Rels`\n * spine — no GraphQL, no codegen, no schema change (design §3).\n *\n * ```ts\n * const UserAvatar = defineFragment(schema.user, (f) => f.select(\"id\", \"name\", \"avatarUrl\"));\n * const CommentRow = defineFragment(schema.comment, (f) =>\n *   f.select(\"id\", \"body\", \"authorId\")\n *    .sub(\"author\", schema.user, { parent: [\"authorId\"], child: [\"id\"] }, UserAvatar));\n * ```\n */\nexport declare function defineFragment<C extends AnyCols, Rels = {}, Sel extends string = never, LocalRels = Rels>(table: TableLike<C>, build: (q: Query<C>) => Query<C, Rels, boolean, Sel, LocalRels>): Fragment<C, Rels, Sel, LocalRels>;","description":"Define a co-located, composable {@link Fragment}: a named selection over `table`. The returned\nvalue is callable (the `build` transform), so it threads through the existing `sub`/`Rels`\nspine — no GraphQL, no codegen, no schema change (design §3).\n\n```ts\nconst UserAvatar = defineFragment(schema.user, (f) => f.select(\"id\", \"name\", \"avatarUrl\"));\nconst CommentRow = defineFragment(schema.comment, (f) =>\n  f.select(\"id\", \"body\", \"authorId\")\n   .sub(\"author\", schema.user, { parent: [\"authorId\"], child: [\"id\"] }, UserAvatar));\n```","source":"packages/client/src/query.ts","line":577,"href":"/reference/typescript/remote/#symbol-defineFragment"},{"name":"defineMutators","originalName":"defineMutators","kind":"FunctionDeclaration","signature":"export declare function defineMutators<S extends ColsMap, P extends Record<string, string>>(_schema: Schema<S, P>): {\n    shared<Args, Ctx extends MutatorCtx = MutatorCtx>(args: ArgSchema<Args>, run: (tx: IsoTx<S, P>, args: Args, ctx: Ctx) => MutationGen): SharedMutatorWithArgs<Args, Ctx>;\n};","description":"","source":"packages/client/src/mutation-ops.ts","line":202,"href":"/reference/typescript/remote/#symbol-defineMutators"},{"name":"defineQuery","originalName":"defineQuery","kind":"FunctionDeclaration","signature":"/**\n * Define ONE co-located, named query. Keep it next to the component that reads it (a `*.queries.ts`\n * file), so a query lives where its fragments and its component live.\n *\n * The returned value is callable on the client (it stamps its result with `name` + args, so the\n * subscription SYNCS) and registerable on the server ({@link registerQueries}). The optional\n * `validate` step turns untrusted wire args into the canonical args type — and that type flows to\n * both the call signature and `build`, so the shape is written exactly once. `validate` runs on\n * BOTH tiers (it builds the byte-identical authoritative AST on the server, and guards + guarantees\n * the same AST on the client). If the server must DIVERGE from the client, define a second\n * `defineQuery` with the same `name` for the server and register that one instead.\n *\n * `build` may take a second CONTEXT parameter (see {@link QueryBuilder}). Context is off-wire: the\n * client passes its session ctx at the callsite, the server injects its authoritative ctx — so a\n * per-user query stays symmetric without ever trusting (or transmitting) a client-supplied identity.\n *\n * ```ts\n * // recentComments({ limit }) — validated, no ctx, byte-identical on both tiers\n * export const recentCommentsQuery = defineQuery(\n *   \"recentComments\",\n *   (raw): { limit: number } => ({ limit: validateFeedLimit(raw) }),\n *   ({ limit }) => q.comment.orderBy(\"createdAt\", \"desc\").limit(limit).include(FeedItemFragment),\n * );\n *\n * // myIssues({ limit }, ctx) — ctx-scoped; the wire still carries only { limit }\n * export const myIssuesQuery = defineQuery(\n *   \"myIssues\",\n *   (raw): { limit: number } => ({ limit: validateLimit(raw) }),\n *   ({ limit }, ctx: { user: string }) => q.issue.where.ownerId(ctx.user).limit(limit),\n * );\n * // client: myIssuesQuery({ limit: 20 }, { user: currentUser() })\n * ```\n */\nexport declare function defineQuery<Q extends AnyQuery>(name: string, build: () => Q, options?: DefineQueryOptions<void>): NamedQuery<void, [\n], Q>;\nexport declare function defineQuery<Args, Ctx extends readonly unknown[], Q extends AnyQuery>(name: string, build: (args: Args, ...ctx: Ctx) => Q, options?: DefineQueryOptions<Args>): NamedQuery<Args, Ctx, Q>;\nexport declare function defineQuery<Args, Ctx extends readonly unknown[], Q extends AnyQuery>(name: string, validate: QueryValidator<Args>, build: (args: Args, ...ctx: Ctx) => Q, options?: DefineQueryOptions<Args>): NamedQuery<Args, Ctx, Q>;","description":"Define ONE co-located, named query. Keep it next to the component that reads it (a `*.queries.ts`\nfile), so a query lives where its fragments and its component live.\n\nThe returned value is callable on the client (it stamps its result with `name` + args, so the\nsubscription SYNCS) and registerable on the server ({@link registerQueries }). The optional\n`validate` step turns untrusted wire args into the canonical args type — and that type flows to\nboth the call signature and `build`, so the shape is written exactly once. `validate` runs on\nBOTH tiers (it builds the byte-identical authoritative AST on the server, and guards + guarantees\nthe same AST on the client). If the server must DIVERGE from the client, define a second\n`defineQuery` with the same `name` for the server and register that one instead.\n\n`build` may take a second CONTEXT parameter (see {@link QueryBuilder}). Context is off-wire: the\nclient passes its session ctx at the callsite, the server injects its authoritative ctx — so a\nper-user query stays symmetric without ever trusting (or transmitting) a client-supplied identity.\n\n```ts\n// recentComments({ limit }) — validated, no ctx, byte-identical on both tiers\nexport const recentCommentsQuery = defineQuery(\n  \"recentComments\",\n  (raw): { limit: number } => ({ limit: validateFeedLimit(raw) }),\n  ({ limit }) => q.comment.orderBy(\"createdAt\", \"desc\").limit(limit).include(FeedItemFragment),\n);\n\n// myIssues({ limit }, ctx) — ctx-scoped; the wire still carries only { limit }\nexport const myIssuesQuery = defineQuery(\n  \"myIssues\",\n  (raw): { limit: number } => ({ limit: validateLimit(raw) }),\n  ({ limit }, ctx: { user: string }) => q.issue.where.ownerId(ctx.user).limit(limit),\n);\n// client: myIssuesQuery({ limit: 20 }, { user: currentUser() })\n```","source":"packages/client/src/query.ts","line":472,"href":"/reference/typescript/remote/#symbol-defineQuery"},{"name":"DefineQueryOptions","originalName":"DefineQueryOptions","kind":"InterfaceDeclaration","signature":"/** Options for {@link defineQuery}. */\nexport interface DefineQueryOptions<Args = any> {\n    /** Declare this query realtime-eligible — see {@link RealtimeQueryLabel}. */\n    realtime?: RealtimeQueryLabel<Args>;\n}","description":"Options for {@link defineQuery}.","source":"packages/client/src/query.ts","line":383,"href":"/reference/typescript/remote/#symbol-DefineQueryOptions"},{"name":"defineRelationships","originalName":"defineRelationships","kind":"FunctionDeclaration","signature":"/** A typed registry of named {@link Relationship}s — `defineRelationships({ issueOwner: rel(...) })`.\n *  A thin identity helper that names the bag and constrains its values; the keys are yours to choose. */\nexport declare function defineRelationships<R extends Record<string, AnyRelationship>>(rels: R): R;","description":"A typed registry of named {@link Relationship}s — `defineRelationships({ issueOwner: rel(...) })`.\nA thin identity helper that names the bag and constrains its values; the keys are yours to choose.","source":"packages/client/src/schema.ts","line":488,"href":"/reference/typescript/remote/#symbol-defineRelationships"},{"name":"DehydratedQuery","originalName":"DehydratedQuery","kind":"InterfaceDeclaration","signature":"/** One query's SSR snapshot, keyed by its `viewKey` ({@link stableKey} of the AST): the\n *  pre-projected first-paint `rows` plus the `cvMin` watermark they reflect (SSR-DESIGN.md §6.2).\n *  Serializable as-is into the HTML — `rows` are already JSON values (json columns parsed). */\nexport interface DehydratedQuery {\n    rows: unknown[];\n    cvMin: number;\n}","description":"One query's SSR snapshot, keyed by its `viewKey` ({@link stableKey} of the AST): the\npre-projected first-paint `rows` plus the `cvMin` watermark they reflect (SSR-DESIGN.md §6.2).\nSerializable as-is into the HTML — `rows` are already JSON values (json columns parsed).","source":"packages/client/src/store.ts","line":20,"href":"/reference/typescript/remote/#symbol-DehydratedQuery"},{"name":"DehydratedState","originalName":"DehydratedState","kind":"TypeAliasDeclaration","signature":"/** The whole dehydrated cache: every preloaded query's snapshot, keyed by `viewKey`. The server\n *  builds it with {@link Store.dehydrate}; the browser seeds it with {@link Store.hydrate}. */\nexport type DehydratedState = Record<string, DehydratedQuery>;","description":"The whole dehydrated cache: every preloaded query's snapshot, keyed by `viewKey`. The server\nbuilds it with {@link Store.dehydrate}; the browser seeds it with {@link Store.hydrate}.","source":"packages/client/src/store.ts","line":27,"href":"/reference/typescript/remote/#symbol-DehydratedState"},{"name":"Dir","originalName":"Dir","kind":"TypeAliasDeclaration","signature":"export type Dir = \"asc\" | \"desc\";","description":"","source":"packages/client/src/ast.ts","line":5,"href":"/reference/typescript/remote/#symbol-Dir"},{"name":"driveMutationAsync","originalName":"driveMutationAsync","kind":"FunctionDeclaration","signature":"/** Drive a generator mutator ASYNCHRONOUSLY (the server, against the open transaction). Writes are\n *  awaited (harmless: a single interactive Postgres connection serializes statements anyway, and the\n *  daemon backend resolves them instantly), reads (point or query) suspend, and a batch fans out with\n *  `Promise.all`. */\nexport declare function driveMutationAsync(gen: MutationGen, exec: AsyncEffectExec): Promise<void>;","description":"Drive a generator mutator ASYNCHRONOUSLY (the server, against the open transaction). Writes are\nawaited (harmless: a single interactive Postgres connection serializes statements anyway, and the\ndaemon backend resolves them instantly), reads (point or query) suspend, and a batch fans out with\n`Promise.all`.","source":"packages/client/src/mutation-ops.ts","line":257,"href":"/reference/typescript/remote/#symbol-driveMutationAsync"},{"name":"driveMutationSync","originalName":"driveMutationSync","kind":"FunctionDeclaration","signature":"/** Drive a generator mutator SYNCHRONOUSLY (the client, inside the wasm write transaction). Each\n *  yielded write applies immediately; each read (point or query) is resolved and fed back; a batch\n *  runs in order. */\nexport declare function driveMutationSync(gen: MutationGen, exec: SyncEffectExec): void;","description":"Drive a generator mutator SYNCHRONOUSLY (the client, inside the wasm write transaction). Each\nyielded write applies immediately; each read (point or query) is resolved and fed back; a batch\nruns in order.","source":"packages/client/src/mutation-ops.ts","line":235,"href":"/reference/typescript/remote/#symbol-driveMutationSync"},{"name":"EnsureQueryOptions","originalName":"EnsureQueryOptions","kind":"InterfaceDeclaration","signature":"export interface EnsureQueryOptions {\n    /** Readiness policy. Defaults to `complete`. */\n    until?: EnsureQueryUntil;\n    /** Cancel this caller's wait. The shared query may stay retained for another waiter/prefetch. */\n    signal?: AbortSignal;\n}","description":"","source":"packages/client/src/ensure.ts","line":22,"href":"/reference/typescript/remote/#symbol-EnsureQueryOptions"},{"name":"EnsureQueryUntil","originalName":"EnsureQueryUntil","kind":"TypeAliasDeclaration","signature":"/** When an {@link QueryEnsureCache.ensure} call may resolve.\n *\n * - `complete` waits for the server-authoritative result (the default).\n * - `present` resolves as soon as the local view contains a result, while the remote retain keeps\n *   revalidating in the background. An authoritative empty result also resolves it, so a real\n *   not-found query never waits forever.\n *\n * `present` deliberately does not add a `partial` {@link ResultType}: a locally useful answer and\n * server authority are independent facts. While it resolves early, the view's result type remains\n * `unknown` until the server says otherwise. */\nexport type EnsureQueryUntil = \"complete\" | \"present\";","description":"When an {@link QueryEnsureCache.ensure} call may resolve.\n\n- `complete` waits for the server-authoritative result (the default).\n- `present` resolves as soon as the local view contains a result, while the remote retain keeps\n revalidating in the background. An authoritative empty result also resolves it, so a real\n not-found query never waits forever.\n\n`present` deliberately does not add a `partial` {@link ResultType}: a locally useful answer and\nserver authority are independent facts. While it resolves early, the view's result type remains\n`unknown` until the server says otherwise.","source":"packages/client/src/ensure.ts","line":20,"href":"/reference/typescript/remote/#symbol-EnsureQueryUntil"},{"name":"eq","originalName":"eq","kind":"VariableDeclaration","signature":"export declare const eq: <V>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":26,"href":"/reference/typescript/remote/#symbol-eq"},{"name":"exists","originalName":"exists","kind":"FunctionDeclaration","signature":"/** `EXISTS` by a named {@link Relationship} — correlation from the rel; the parent row type is the\n *  relationship's parent, so the condition lands on the matching `.where()`. */\nexport declare function exists<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<RowOf<PC>>;\n/** `EXISTS (<correlated subquery>)` — a condition (use inside `where`/`or`/`and`). */\nexport declare function exists<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<R>;","description":"`EXISTS` by a named {@link Relationship} — correlation from the rel; the parent row type is the\nrelationship's parent, so the condition lands on the matching `.where()`.\n`EXISTS (<correlated subquery>)` — a condition (use inside `where`/`or`/`and`).","source":"packages/client/src/query.ts","line":1210,"href":"/reference/typescript/remote/#symbol-exists"},{"name":"existsNoSync","originalName":"existsNoSync","kind":"FunctionDeclaration","signature":"/**\n * `EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate (`exists_noSync`).\n * Identical to {@link exists} for filtering parent visibility, but stamps the subquery\n * `system: \"permissions\"`, so the engine's normalized serializer prunes its witnesses from the\n * footprint — the permission table's rows are never synced to the client and the client never\n * re-evaluates the gate. Use this when building the **server's** query (the user's API server);\n * the client holds its own un-gated query.\n */\nexport declare function existsNoSync<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<RowOf<PC>>;\nexport declare function existsNoSync<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<R>;","description":"`EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate (`exists_noSync`).\nIdentical to {@link exists} for filtering parent visibility, but stamps the subquery\n`system: \"permissions\"`, so the engine's normalized serializer prunes its witnesses from the\nfootprint — the permission table's rows are never synced to the client and the client never\nre-evaluates the gate. Use this when building the **server's** query (the user's API server);\nthe client holds its own un-gated query.","source":"packages/client/src/query.ts","line":1255,"href":"/reference/typescript/remote/#symbol-existsNoSync"},{"name":"ExistsOp","originalName":"ExistsOp","kind":"TypeAliasDeclaration","signature":"export type ExistsOp = \"EXISTS\" | \"NOT EXISTS\";","description":"","source":"packages/client/src/ast.ts","line":35,"href":"/reference/typescript/remote/#symbol-ExistsOp"},{"name":"ExistsOpts","originalName":"ExistsOpts","kind":"InterfaceDeclaration","signature":"/** Options for `exists` / `notExists`. */\nexport interface ExistsOpts {\n    /**\n     * Fold this `EXISTS` as a build-time **scalar** subquery: when the child binds a\n     * statically-unique key, the engine reads it once, inlines the correlation value as a\n     * literal, and deletes the join. **Snapshot semantics** — the inlined value does not\n     * react to later child changes. Defaults to `false` (a live `EXISTS` join).\n     */\n    scalar?: boolean;\n}","description":"Options for `exists` / `notExists`.","source":"packages/client/src/query.ts","line":1173,"href":"/reference/typescript/remote/#symbol-ExistsOpts"},{"name":"extendSchema","originalName":"extendSchema","kind":"FunctionDeclaration","signature":"/** Extend a generated/synced schema with client-authoritative local-only tables.\n *\n *  This is the ergonomic path for SQL-first apps: keep `schema.gen.ts` fully generated, define\n *  private UI tables in a tiny hand-written file, then hand the combined schema to the browser\n *  client. The added tables MUST be `table(name, { local: true })`: `extendSchema` deliberately\n *  refuses to append ordinary synced tables, because those need to come from daemon introspection\n *  (`rindle schema gen`) so the server and client cannot drift. */\nexport declare function extendSchema<S extends ColsMap, P extends Record<string, string>, const T extends readonly AnyTable[]>(base: Schema<S, P>, opts: {\n    tables: T;\n}): Schema<S & SchemaOf<T>, P & PkMapOf<T>>;","description":"Extend a generated/synced schema with client-authoritative local-only tables.\n\nThis is the ergonomic path for SQL-first apps: keep `schema.gen.ts` fully generated, define\nprivate UI tables in a tiny hand-written file, then hand the combined schema to the browser\nclient. The added tables MUST be `table(name, { local: true })`: `extendSchema` deliberately\nrefuses to append ordinary synced tables, because those need to come from daemon introspection\n(`rindle schema gen`) so the server and client cannot drift.","source":"packages/client/src/schema.ts","line":245,"href":"/reference/typescript/remote/#symbol-extendSchema"},{"name":"fieldCondition","originalName":"fieldCondition","kind":"FunctionDeclaration","signature":"/** Build a `simple` condition from a field name + (predicate | bare value). */\nexport declare function fieldCondition(field: string, arg: unknown): Condition;","description":"Build a `simple` condition from a field name + (predicate | bare value).","source":"packages/client/src/operators.ts","line":54,"href":"/reference/typescript/remote/#symbol-fieldCondition"},{"name":"FlatArrayView","originalName":"FlatArrayView","kind":"ClassDeclaration","signature":"export declare class FlatArrayView<R = unknown> implements ArrayView<R> {\n    private readonly _qid;\n    private _schema;\n    private types?;\n    private seeded;\n    private top;\n    private dirty;\n    private cached;\n    private rt;\n    private readonly listeners;\n    private readonly changeListeners;\n    private pendingSegments;\n    constructor(schema?: WireSchema, types?: ViewTypes, qid?: QueryId);\n    get qid(): QueryId;\n    get schema(): WireSchema | null;\n    get resultType(): ResultType;\n    /** Set the query's lifecycle state (the Store routes the backend's per-query signal here).\n     *  Notifies subscribers on a change so a status-bound listener (React `useQueryStatus`) re-reads,\n     *  WITHOUT re-projecting data (it is unchanged). */\n    setResultType(rt: ResultType): void;\n    /** (Re)bind to a schema and clear the tree IN PLACE. The first `hello` (pending → ready)\n     *  and a re-hydrate (gap → new epoch — FLAT-CHANGES-DESIGN.md §2.3) both go through here, so\n     *  the caller's view reference and its subscribers survive a re-subscribe. Does NOT notify —\n     *  the snapshot that follows (`applyChanges`) does, avoiding an empty-then-filled flicker.\n     *  KEEPS any SSR `seeded` rows: they are retired only when the first live snapshot lands\n     *  ({@link retireSeed}, driven by the Store), so `data` shows the seed — not an empty tree —\n     *  across the whole `hello`→first-`snapshot` gap. */\n    reset(schema: WireSchema, types?: ViewTypes): void;\n    /** Install a pre-projected SSR first-paint snapshot (SSR-DESIGN.md §6). The rows are already\n     *  in result shape (json columns parsed, relationships nested), so a view with no live backend\n     *  (the server one-shot Store) reads them directly, and a browser view shows them until its\n     *  first live snapshot lands ({@link retireSeed}). Does NOT notify — it is set at materialize\n     *  time, before any subscriber, and the live snapshot that follows notifies. */\n    seed(rows: readonly R[]): void;\n    /** Retire the SSR first-paint seed — the Store calls this as it folds the maintained tree's first\n     *  live snapshot, so `data` switches from the seed to the live tree with no empty gap between them\n     *  (the seed deliberately survived the earlier `reset`/`hello`). Idempotent. Does NOT notify — the\n     *  snapshot fold it accompanies does; BUT when that fold is empty (a 0-row result, or rows already\n     *  in `top`) it notifies nothing, so the Store forces a {@link notify} on the strength of the `true`\n     *  return here — else the view reads the live tree yet never re-renders (a frozen seed). Returns\n     *  whether a live seed was actually cleared (so the Store knows a forced notify is owed). */\n    retireSeed(): boolean;\n    /** Apply a batch (the hydrate snapshot or one transaction's events) in order, then\n     *  notify subscribers once. Order is significant (FLAT-CHANGES-DESIGN.md §5.4). A no-op\n     *  while pending (changes never precede the `hello` that resets the schema).\n     *\n     *  `enrichRemoves` ⇒ before a removed node is dropped, reconstruct its full subtree and attach it\n     *  to the `remove` op's `node` (in place, so the same event object the Store fans out to its\n     *  change subscribers carries it). Off by default — paid only when a consumer asked for it, and\n     *  only on a real eviction (an rc-decrement that keeps the row leaves `node` absent). A view with\n     *  an attached {@link onChanges} listener ALSO enriches (per-view, no global opt-in), so a\n     *  narrator can resolve a removed row's subs whether or not the store-global counter is set.\n     *\n     *  `deferNotify` ⇒ fold but do NOT notify; the caller is responsible for calling {@link flush}\n     *  later. The Store uses this to fold every view in one commit before notifying any subscriber\n     *  (cross-view-atomic notification — `Store.onCommitBoundary`); standalone use leaves it off, so\n     *  a bare view still fires its subscribers after each applied batch.\n     *\n     *  `phase` tags the {@link onChanges} delivery (`snapshot` for the hydrate, `batch` otherwise); it\n     *  does not affect the fold. Returns whether the batch changed the view (so a deferring caller\n     *  knows it must be flushed). */\n    applyChanges(events: FlatChange[], enrichRemoves?: boolean, deferNotify?: boolean, phase?: ChangePhase): boolean;\n    /** Notify subscribers with the current data. The deferred half of {@link applyChanges} (when\n     *  `deferNotify` was set): the Store calls this at the commit-notify barrier — after every view\n     *  touched by the same commit has folded — so a subscriber that re-reads a sibling view inside\n     *  its callback observes post-commit data, never a torn mid-commit state. */\n    flush(): void;\n    get data(): readonly R[];\n    subscribe(listener: (data: readonly R[]) => void): () => void;\n    onChanges(listener: ViewChangeListener): () => void;\n    /** Net the folded batch and hand the survivors to the change listeners, AFTER the data `notify`\n     *  (the order `Store.subscribeChanges` consumers already observe). A batch that nets to nothing —\n     *  a correctly predicted rebase — makes no call, so a narrator sees only real change. Each listener\n     *  is isolated: a throwing one reports to `note` (the caller re-raises the first) and the rest still\n     *  run, so one bad narration template never starves a sibling listener nor corrupts the view. */\n    private deliverChanges;\n    destroy(): void;\n    private applyAt;\n    private applyOp;\n    private applyAdd;\n    /** Drop one path to `row`. Returns the evicted {@link Node} (its full subtree intact) when the\n     *  last path went away — `null` when another path still holds it (rc decremented, nothing left\n     *  the result). */\n    private applyRemove;\n    private applyEdit;\n    private project;\n    /** Notify data subscribers with the current {@link data}. Normally driven by a fold ({@link\n     *  applyChanges}/{@link flush}); the Store also calls it directly to land a seed retirement whose\n     *  accompanying fold was empty (see {@link retireSeed}). */\n    notify(): void;\n}","description":"","source":"packages/client/src/view.ts","line":348,"href":"/reference/typescript/remote/#symbol-FlatArrayView"},{"name":"FlatChange","originalName":"FlatChange","kind":"InterfaceDeclaration","signature":"export interface FlatChange {\n    path: PathSeg[];\n    op: FlatOp;\n}","description":"","source":"packages/client/src/types.ts","line":69,"href":"/reference/typescript/remote/#symbol-FlatChange"},{"name":"FlatOp","originalName":"FlatOp","kind":"TypeAliasDeclaration","signature":"/** A positional change at one level of the view tree. A `remove` ships only the leaving `row`\n *  (the receiver already holds the subtree and locates it by key) — `node` is NEVER on the wire;\n *  it is an OPTIONAL client-side enrichment carrying the full removed subtree, attached by the\n *  ArrayView when a change consumer opts in (`Store.subscribeChanges(_, { removedSubtree: true })`),\n *  so a narrator can resolve a removed row's nested subs just as it can on an `add`. */\nexport type FlatOp = {\n    tag: \"add\";\n    node: WireNode;\n} | {\n    tag: \"remove\";\n    row: WireValue[];\n    node?: WireNode;\n} | {\n    tag: \"edit\";\n    old: WireValue[];\n    new: WireValue[];\n};","description":"A positional change at one level of the view tree. A `remove` ships only the leaving `row`\n(the receiver already holds the subtree and locates it by key) — `node` is NEVER on the wire;\nit is an OPTIONAL client-side enrichment carrying the full removed subtree, attached by the\nArrayView when a change consumer opts in (`Store.subscribeChanges(_, { removedSubtree: true })`),\nso a narrator can resolve a removed row's nested subs just as it can on an `add`.","source":"packages/client/src/types.ts","line":64,"href":"/reference/typescript/remote/#symbol-FlatOp"},{"name":"Fragment","originalName":"Fragment","kind":"InterfaceDeclaration","signature":"/**\n * A reusable, typed *selection over a table* — Relay's \"fragment\", promoted to a first-class\n * value. **Two verbs** compose a fragment, on one axis — does its data belong to THIS row or to a\n * related one:\n *\n *   - SAME node — `q.include(Frag)`: merge its selection into this node. This is also how you\n *     **root** a fragment onto a base query — `queries.t.where.id(x).include(Frag)`.\n *   - CHILD node — `q.sub(alias, child, corr, Frag)`: nest it under a relationship (`sub`'s 4th arg).\n *\n * A `Fragment` is therefore also a `build` transform (`(q: Query<C>) => Query<C, Rels>`); that\n * call signature is the mechanism by which `sub` accepts a fragment as its build. Prefer\n * `include` to root a fragment (canonical + merged) over calling it directly. It additionally\n * carries its `table` (for {@link FragmentRef}/`useFragment` typing and masking). Composing\n * fragments assembles ONE {@link Ast} → one materialization → one `/query` — the whole point\n * (no request waterfall; design §1).\n */\nexport interface Fragment<C extends AnyCols, Rels = {}, Sel extends string = never, LocalRels = Rels> {\n    (q: Query<C>): Query<C, Rels, false, Sel, LocalRels>;\n    readonly table: TableLike<C>;\n    readonly [FRAGMENT_BRAND]: true;\n}","description":"A reusable, typed *selection over a table* — Relay's \"fragment\", promoted to a first-class\nvalue. **Two verbs** compose a fragment, on one axis — does its data belong to THIS row or to a\nrelated one:\n\n  - SAME node — `q.include(Frag)`: merge its selection into this node. This is also how you\n    **root** a fragment onto a base query — `queries.t.where.id(x).include(Frag)`.\n  - CHILD node — `q.sub(alias, child, corr, Frag)`: nest it under a relationship (`sub`'s 4th arg).\n\nA `Fragment` is therefore also a `build` transform (`(q: Query<C>) => Query<C, Rels>`); that\ncall signature is the mechanism by which `sub` accepts a fragment as its build. Prefer\n`include` to root a fragment (canonical + merged) over calling it directly. It additionally\ncarries its `table` (for {@link FragmentRef}/`useFragment` typing and masking). Composing\nfragments assembles ONE {@link Ast} → one materialization → one `/query` — the whole point\n(no request waterfall; design §1).","source":"packages/client/src/query.ts","line":533,"href":"/reference/typescript/remote/#symbol-Fragment"},{"name":"fragmentAst","originalName":"fragmentAst","kind":"FunctionDeclaration","signature":"export declare function fragmentAst<F extends Fragment<any, any, any>>(fragment: F): Ast;","description":"","source":"packages/client/src/query.ts","line":651,"href":"/reference/typescript/remote/#symbol-fragmentAst"},{"name":"FragmentCoverage","originalName":"FragmentCoverage","kind":"InterfaceDeclaration","signature":"export interface FragmentCoverage<Q extends AnyQuery = AnyQuery> {\n    readonly key: string;\n    readonly query: Q;\n}","description":"","source":"packages/client/src/query.ts","line":548,"href":"/reference/typescript/remote/#symbol-FragmentCoverage"},{"name":"FragmentData","originalName":"FragmentData","kind":"TypeAliasDeclaration","signature":"/**\n * The data returned by `useFragment(fragment, ref)`: the fragment's own selected columns plus\n * immediate relationship values. Relationships whose builder is another fragment surface as\n * opaque {@link FragmentRef}s, so child-owned payload is read only by the child fragment reader.\n */\nexport type FragmentData<F> = F extends Fragment<infer C, unknown, infer Sel, infer LocalRels> ? Projected<C, Sel> & LocalRels : never;","description":"The data returned by `useFragment(fragment, ref)`: the fragment's own selected columns plus\nimmediate relationship values. Relationships whose builder is another fragment surface as\nopaque {@link FragmentRef}s, so child-owned payload is read only by the child fragment reader.","source":"packages/client/src/query.ts","line":544,"href":"/reference/typescript/remote/#symbol-FragmentData"},{"name":"fragmentKey","originalName":"fragmentKey","kind":"FunctionDeclaration","signature":"export declare function fragmentKey(ref: FragmentRef<any>): string;","description":"","source":"packages/client/src/query.ts","line":605,"href":"/reference/typescript/remote/#symbol-fragmentKey"},{"name":"FragmentRef","originalName":"FragmentRef","kind":"TypeAliasDeclaration","signature":"/** The opaque token a parent passes to a component that reads {@link FragmentData} for `F`. */\nexport type FragmentRef<F> = F extends Fragment<any, any, any, any> ? LocalFragmentRef<F> : never;","description":"The opaque token a parent passes to a component that reads {@link FragmentData} for `F`.","source":"packages/client/src/query.ts","line":563,"href":"/reference/typescript/remote/#symbol-FragmentRef"},{"name":"frameResumePoint","originalName":"frameResumePoint","kind":"FunctionDeclaration","signature":"/** The resume point a frame implies — what rides an SSE `id:` line so a reconnecting `EventSource`\n *  hands it straight back as `Last-Event-ID`. `undefined` for frames that are not a position. */\nexport declare function frameResumePoint(frame: StreamFrame): number | undefined;","description":"The resume point a frame implies — what rides an SSE `id:` line so a reconnecting `EventSource`\nhands it straight back as `Last-Event-ID`. `undefined` for frames that are not a position.","source":"packages/client/src/stream.ts","line":51,"href":"/reference/typescript/remote/#symbol-frameResumePoint"},{"name":"ge","originalName":"ge","kind":"VariableDeclaration","signature":"export declare const ge: <V extends number | string>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":29,"href":"/reference/typescript/remote/#symbol-ge"},{"name":"gt","originalName":"gt","kind":"VariableDeclaration","signature":"export declare const gt: <V extends number | string>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":28,"href":"/reference/typescript/remote/#symbol-gt"},{"name":"Hello","originalName":"Hello","kind":"InterfaceDeclaration","signature":"/** The subscription handshake, sent once before any {@link Batch}. */\nexport interface Hello {\n    epoch: number;\n    comparatorVersion: number;\n    schema: WireSchema;\n    schemaFp: string;\n}","description":"The subscription handshake, sent once before any {@link Batch}.","source":"packages/remote/src/protocol.ts","line":94,"href":"/reference/typescript/remote/#symbol-Hello"},{"name":"ilike","originalName":"ilike","kind":"VariableDeclaration","signature":"export declare const ilike: (pattern: string) => Pred<string>;","description":"","source":"packages/client/src/operators.ts","line":34,"href":"/reference/typescript/remote/#symbol-ilike"},{"name":"inList","originalName":"inList","kind":"VariableDeclaration","signature":"export declare const inList: <V>(values: V[]) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":36,"href":"/reference/typescript/remote/#symbol-inList"},{"name":"Insert","originalName":"Insert","kind":"TypeAliasDeclaration","signature":"/** The insert type of a table def: `Insert<typeof issue>` → `{ id: string; … assignee?: string | null }`.\n *  The whole-table ergonomic form of {@link InsertOf} (the insert-side twin of {@link Row}). */\nexport type Insert<T extends AnyTable> = InsertOf<T[typeof SCHEMA][\"columns\"]>;","description":"The insert type of a table def: `Insert<typeof issue>` → `{ id: string; … assignee?: string | null }`.\nThe whole-table ergonomic form of {@link InsertOf} (the insert-side twin of {@link Row}).","source":"packages/client/src/schema.ts","line":136,"href":"/reference/typescript/remote/#symbol-Insert"},{"name":"insertCell","originalName":"insertCell","kind":"FunctionDeclaration","signature":"/** The cell a full insert writes for column `c`: the given value, or `null` when a nullable column\n *  is omitted (design 206 §6.2). The caller's completeness check ({@link InsertPlan.required})\n *  guarantees a non-nullable column is present, so its omission never reaches here. */\nexport declare function insertCell(row: Record<string, WireValue>, c: string): WireValue;","description":"The cell a full insert writes for column `c`: the given value, or `null` when a nullable column\nis omitted (design 206 §6.2). The caller's completeness check ({@link InsertPlan.required})\nguarantees a non-nullable column is present, so its omission never reaches here.","source":"packages/client/src/schema.ts","line":528,"href":"/reference/typescript/remote/#symbol-insertCell"},{"name":"InsertOf","originalName":"InsertOf","kind":"TypeAliasDeclaration","signature":"/** The INSERT shape of a column map: {@link RowOf} with every NULLABLE column made OPTIONAL (`?`) —\n *  it may be omitted and is filled with `null` by both write funnels (design 206 §6.2/§7). `NOT NULL`\n *  columns stay required. The insert-side twin of {@link RowOf}, mirroring Drizzle's `$inferInsert`\n *  vs `$inferSelect` split. */\nexport type InsertOf<C extends AnyCols> = Simplify<{\n    [K in keyof C as InsertOptional<C[K]> extends true ? never : K]: ColT<C[K]>;\n} & {\n    [K in keyof C as InsertOptional<C[K]> extends true ? K : never]?: ColT<C[K]>;\n}>;","description":"The INSERT shape of a column map: {@link RowOf} with every NULLABLE column made OPTIONAL (`?`) —\nit may be omitted and is filled with `null` by both write funnels (design 206 §6.2/§7). `NOT NULL`\ncolumns stay required. The insert-side twin of {@link RowOf}, mirroring Drizzle's `$inferInsert`\nvs `$inferSelect` split.","source":"packages/client/src/schema.ts","line":128,"href":"/reference/typescript/remote/#symbol-InsertOf"},{"name":"insertPlan","originalName":"insertPlan","kind":"FunctionDeclaration","signature":"/** Derive a table's {@link InsertPlan} from its column markers. */\nexport declare function insertPlan(meta: TableMeta): InsertPlan;","description":"Derive a table's {@link InsertPlan} from its column markers.","source":"packages/client/src/schema.ts","line":519,"href":"/reference/typescript/remote/#symbol-insertPlan"},{"name":"InsertPlan","originalName":"InsertPlan","kind":"InterfaceDeclaration","signature":"/** A table's insert-completeness plan, derived once from its `Col` markers and shared by BOTH write\n *  funnels — the client `trackingTx` and the server `renderOp` — so their required-sets can't drift\n *  (design 206 §6.1/§6.2). A `NOT NULL` column is `required`; a nullable column (`.nullable()` set\n *  `Col.optional`) may be omitted and is filled with `null` (see {@link insertCell}). PK columns are\n *  never nullable (introspection forces them non-null), so they are always required. */\nexport interface InsertPlan {\n    /** Every column, in wire order. */\n    readonly columns: string[];\n    /** Columns that MUST be present on a full insert — the non-nullable ones. */\n    readonly required: string[];\n    /** The nullable (omittable-to-null) columns, for a fast membership test in the fill. */\n    readonly nullable: ReadonlySet<string>;\n}","description":"A table's insert-completeness plan, derived once from its `Col` markers and shared by BOTH write\nfunnels — the client `trackingTx` and the server `renderOp` — so their required-sets can't drift\n(design 206 §6.1/§6.2). A `NOT NULL` column is `required`; a nullable column (`.nullable()` set\n`Col.optional`) may be omitted and is filled with `null` (see {@link insertCell}). PK columns are\nnever nullable (introspection forces them non-null), so they are always required.","source":"packages/client/src/schema.ts","line":509,"href":"/reference/typescript/remote/#symbol-InsertPlan"},{"name":"int64","originalName":"int64","kind":"VariableDeclaration","signature":"/** The exact-i64 column plane (design 226, `BIGINT`/`INT8` decltype): typed `bigint` in\n *  application code. The vocabulary exists from Stage C4 so generated schemas can name it;\n *  no exact integer cell enters the browser IVM until Stage E — until then the daemon\n *  refuses IVM queries whose footprint touches the column, and the SQL plane carries it. */\nexport declare const int64: <T extends bigint = bigint>() => ColBuilder<T>;","description":"The exact-i64 column plane (design 226, `BIGINT`/`INT8` decltype): typed `bigint` in\napplication code. The vocabulary exists from Stage C4 so generated schemas can name it;\nno exact integer cell enters the browser IVM until Stage E — until then the daemon\nrefuses IVM queries whose footprint touches the column, and the SQL plane carries it.","source":"packages/client/src/schema.ts","line":54,"href":"/reference/typescript/remote/#symbol-int64"},{"name":"is","originalName":"is","kind":"VariableDeclaration","signature":"export declare const is: <V>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":38,"href":"/reference/typescript/remote/#symbol-is"},{"name":"isFragment","originalName":"isFragment","kind":"FunctionDeclaration","signature":"/** Runtime guard: is `v` a {@link Fragment} (a `defineFragment` value, not a plain build fn)? */\nexport declare function isFragment(v: unknown): v is Fragment<AnyCols, unknown, never, unknown>;","description":"Runtime guard: is `v` a {@link Fragment} (a `defineFragment` value, not a plain build fn)?","source":"packages/client/src/query.ts","line":586,"href":"/reference/typescript/remote/#symbol-isFragment"},{"name":"isFragmentRelationship","originalName":"isFragmentRelationship","kind":"FunctionDeclaration","signature":"export declare function isFragmentRelationship(rel: CorrelatedSubquery): boolean;","description":"","source":"packages/client/src/query.ts","line":601,"href":"/reference/typescript/remote/#symbol-isFragmentRelationship"},{"name":"isGeneratorMutator","originalName":"isGeneratorMutator","kind":"FunctionDeclaration","signature":"/** True iff `fn` is a generator function (a shared/isomorphic mutator) rather than a plain function —\n *  the driver accepts both forms. Detected structurally (native `GeneratorFunction`). */\nexport declare function isGeneratorMutator(fn: unknown): fn is (...args: never[]) => MutationGen;","description":"True iff `fn` is a generator function (a shared/isomorphic mutator) rather than a plain function —\nthe driver accepts both forms. Detected structurally (native `GeneratorFunction`).","source":"packages/client/src/mutation-ops.ts","line":217,"href":"/reference/typescript/remote/#symbol-isGeneratorMutator"},{"name":"isLocalTable","originalName":"isLocalTable","kind":"FunctionDeclaration","signature":"/** Whether `table` is a {@link TableMeta.local local-only} table in `schema` (an unknown table\n *  reads as non-local). The single locality predicate the backends key off. BOTH variants —\n *  `true` and `\"session\"` — are local here; the persisted/ephemeral split matters only to the\n *  persistence plane ({@link persistedLocalTableNames}). */\nexport declare function isLocalTable<S extends ColsMap>(schema: Schema<S>, table: string): boolean;","description":"Whether `table` is a {@link TableMeta.locallocal-only} table in `schema` (an unknown table\nreads as non-local). The single locality predicate the backends key off. BOTH variants —\n`true` and `\"session\"` — are local here; the persisted/ephemeral split matters only to the\npersistence plane ({@link persistedLocalTableNames}).","source":"packages/client/src/schema.ts","line":406,"href":"/reference/typescript/remote/#symbol-isLocalTable"},{"name":"isNot","originalName":"isNot","kind":"VariableDeclaration","signature":"export declare const isNot: <V>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":39,"href":"/reference/typescript/remote/#symbol-isNot"},{"name":"isNotNull","originalName":"isNotNull","kind":"VariableDeclaration","signature":"/** `IS NOT NULL` — the negation of {@link isNull}; `V` is inferred from the field, like {@link isNull}. */\nexport declare const isNotNull: <V = never>() => Pred<V>;","description":"`IS NOT NULL` — the negation of {@link isNull}; `V` is inferred from the field, like {@link isNull}.","source":"packages/client/src/operators.ts","line":44,"href":"/reference/typescript/remote/#symbol-isNotNull"},{"name":"isNull","originalName":"isNull","kind":"VariableDeclaration","signature":"/** `IS NULL` — a field-agnostic null check. `V` is inferred from the field's expected `Arg<V>`\n *  (e.g. `where.signedAt(isNull())`), so it fits a column of any type without a cast. */\nexport declare const isNull: <V = never>() => Pred<V>;","description":"`IS NULL` — a field-agnostic null check. `V` is inferred from the field's expected `Arg<V>`\n(e.g. `where.signedAt(isNull())`), so it fits a column of any type without a cast.","source":"packages/client/src/operators.ts","line":42,"href":"/reference/typescript/remote/#symbol-isNull"},{"name":"isoTx","originalName":"isoTx","kind":"VariableDeclaration","signature":"/** The one shared effect factory (stateless — see {@link IsoTx}). Its methods just BUILD a\n *  {@link MutationOp}, so the single instance serves every schema; the generic {@link IsoTx} view is\n *  applied at the authoring site (a `json<T>` cell is a parsed object here and is stringified by the\n *  funnels, {@link toCell}), hence the cast — the runtime shape is schema-agnostic. */\nexport declare const isoTx: IsoTx;","description":"The one shared effect factory (stateless — see {@link IsoTx}). Its methods just BUILD a\n{@link MutationOp}, so the single instance serves every schema; the generic {@link IsoTx} view is\napplied at the authoring site (a `json<T>` cell is a parsed object here and is stringified by the\nfunnels, {@link toCell }), hence the cast — the runtime shape is schema-agnostic.","source":"packages/client/src/mutation-ops.ts","line":127,"href":"/reference/typescript/remote/#symbol-isoTx"},{"name":"IsoTx","originalName":"IsoTx","kind":"InterfaceDeclaration","signature":"/** The tier-AGNOSTIC effect factory a generator mutator writes against. Every method just BUILDS an\n *  effect to `yield` — it performs no I/O and holds no state, so the single {@link isoTx} instance is\n *  shared by every mutator on both tiers; only the driver differs. `insert`/`upsert`/`insertIgnore`\n *  require non-nullable columns and permit nullable omissions, which become `null`.\n *  `update`/`delete` require the PK columns; `update` also names the columns to change. */\nexport interface IsoTx<S extends ColsMap = ColsMap, P extends Record<string, string> = PkMap<S>> {\n    /** Insert a row. Omitted nullable columns become `null`; database defaults are not applied. */\n    insert<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Update the row identified by its pk columns (REQUIRED); only the named non-pk columns change. */\n    update<N extends keyof S & string>(table: N, row: UpdateOf<S[N], PkColsOf<S, P, N>>): MutationOp;\n    /** Insert, or replace non-PK columns on PK conflict, with {@link IsoTx.insert}'s omission rules. */\n    upsert<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Insert with {@link IsoTx.insert}'s omission rules, or do nothing on PK conflict. */\n    insertIgnore<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Delete the row identified by its pk columns. */\n    delete<N extends keyof S & string>(table: N, pk: PkOf<S[N], PkColsOf<S, P, N>>): MutationOp;\n    /** Read one row by primary key (read-your-writes). */\n    row<N extends keyof S & string>(table: N, pk: PkOf<S[N], PkColsOf<S, P, N>>): ReadEffect;\n    /** Run a full query (`where`/`orderBy`/`limit`/join) over the state this mutator is mutating —\n     *  read-your-writes, like {@link row} but for arbitrary shapes. Pass a query from the tier-agnostic\n     *  builder, e.g. `tx.query(q.issue.where(\"ownerId\", \"=\", ctx.user))` where `q = newQueryBuilder(schema)`.\n     *  The `yield` evaluates to {@link QueryResultRow}`[]` (cast it — the generator's single next-type is a row). */\n    query(query: QueryArg): QueryEffect;\n    all(effects: readonly YieldEffect[]): BatchEffect;\n}","description":"The tier-AGNOSTIC effect factory a generator mutator writes against. Every method just BUILDS an\neffect to `yield` — it performs no I/O and holds no state, so the single {@link isoTx} instance is\nshared by every mutator on both tiers; only the driver differs. `insert`/`upsert`/`insertIgnore`\nrequire non-nullable columns and permit nullable omissions, which become `null`.\n`update`/`delete` require the PK columns; `update` also names the columns to change.","source":"packages/client/src/mutation-ops.ts","line":102,"href":"/reference/typescript/remote/#symbol-IsoTx"},{"name":"IsoTxOf","originalName":"IsoTxOf","kind":"TypeAliasDeclaration","signature":"/** Bind a schema to the mutator authoring surface: `const { shared } = defineMutators(schema)`.\n *\n *  The returned `shared` is the schema-typed twin of the bare {@link shared} — its `tx` is an\n *  {@link IsoTx} parameterized by THIS schema, so `tx.insert`/`update`/`upsert`/`insertIgnore`/`delete`\n *  check the table name, every column name, each column's value type, nullable-omit on inserts, and\n *  the exact primary-key columns on `update`/`delete` — all at compile time. It registers identically\n *  to the bare form (same runtime value, still `satisfies ClientRegistry`, still an isomorphic\n *  generator the server drives): only the AUTHORING types tighten. `schema` is read for its TYPE only\n *  (never at runtime). Reads (`yield tx.row(...)`) stay loosely typed — a generator's single\n *  next-type can't carry a per-table row. */\n/** The typed {@link IsoTx} for a given schema — `IsoTxOf<typeof schema>`. Use it to annotate a helper\n *  that a mutator body passes its `tx` to (e.g. `const ensureUser = (tx: IsoTxOf<typeof schema>, …)`),\n *  so the helper gets the same table/column/pk typing the `defineMutators` `shared` callback does. */\nexport type IsoTxOf<Sch extends Schema> = Sch extends Schema<infer S, infer P> ? IsoTx<S, P> : never;","description":"The typed {@link IsoTx} for a given schema — `IsoTxOf<typeof schema>`. Use it to annotate a helper\nthat a mutator body passes its `tx` to (e.g. `const ensureUser = (tx: IsoTxOf<typeof schema>, …)`),\nso the helper gets the same table/column/pk typing the `defineMutators` `shared` callback does.","source":"packages/client/src/mutation-ops.ts","line":200,"href":"/reference/typescript/remote/#symbol-IsoTxOf"},{"name":"isPred","originalName":"isPred","kind":"FunctionDeclaration","signature":"export declare function isPred(x: unknown): x is Pred<unknown>;","description":"","source":"packages/client/src/operators.ts","line":22,"href":"/reference/typescript/remote/#symbol-isPred"},{"name":"isRelationship","originalName":"isRelationship","kind":"FunctionDeclaration","signature":"/** Runtime guard: is `v` a {@link Relationship} value (not a table or a plain object)? */\nexport declare function isRelationship(v: unknown): v is AnyRelationship;","description":"Runtime guard: is `v` a {@link Relationship} value (not a table or a plain object)?","source":"packages/client/src/schema.ts","line":493,"href":"/reference/typescript/remote/#symbol-isRelationship"},{"name":"isReservedTableName","originalName":"isReservedTableName","kind":"FunctionDeclaration","signature":"/** Whether `name` collides with an engine-reserved synthetic prefix ({@link RESERVED_TABLE_PREFIXES}). */\nexport declare function isReservedTableName(name: string): boolean;","description":"Whether `name` collides with an engine-reserved synthetic prefix ({@link RESERVED_TABLE_PREFIXES}).","source":"packages/client/src/schema.ts","line":223,"href":"/reference/typescript/remote/#symbol-isReservedTableName"},{"name":"json","originalName":"json","kind":"VariableDeclaration","signature":"export declare const json: <T = unknown>() => ColBuilder<T>;","description":"","source":"packages/client/src/schema.ts","line":49,"href":"/reference/typescript/remote/#symbol-json"},{"name":"KeyedRow","originalName":"KeyedRow","kind":"TypeAliasDeclaration","signature":"/** A keyed row: column name → cell. The ergonomic write shape (validated against the schema at\n *  runtime). JSON columns carry their raw JSON string (a {@link WireValue}), never a parsed object. */\nexport type KeyedRow = Record<string, WireValue>;","description":"A keyed row: column name → cell. The ergonomic write shape (validated against the schema at\nruntime). JSON columns carry their raw JSON string (a {@link WireValue}), never a parsed object.","source":"packages/client/src/mutation-ops.ts","line":13,"href":"/reference/typescript/remote/#symbol-KeyedRow"},{"name":"le","originalName":"le","kind":"VariableDeclaration","signature":"export declare const le: <V extends number | string>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":31,"href":"/reference/typescript/remote/#symbol-le"},{"name":"like","originalName":"like","kind":"VariableDeclaration","signature":"export declare const like: (pattern: string) => Pred<string>;","description":"","source":"packages/client/src/operators.ts","line":32,"href":"/reference/typescript/remote/#symbol-like"},{"name":"LitValue","originalName":"LitValue","kind":"TypeAliasDeclaration","signature":"/** An untagged literal (`null | bool | number | string | array`). Numbers are one f64. */\nexport type LitValue = null | boolean | number | string | LitValue[];","description":"An untagged literal (`null | bool | number | string | array`). Numbers are one f64.","source":"packages/client/src/ast.ts","line":11,"href":"/reference/typescript/remote/#symbol-LitValue"},{"name":"LMID_QUERY_NAME","originalName":"LMID_QUERY_NAME","kind":"VariableDeclaration","signature":"/** The reserved server-query name every optimistic client subscribes at connect: the\n *  one-row system query `CLIENT_MUTATIONS_TABLE WHERE client_id = <me>`. The server\n *  derives the identity from the connection (args are ignored). */\nexport declare const LMID_QUERY_NAME = \"_rindle/clientLmid\";","description":"The reserved server-query name every optimistic client subscribes at connect: the\none-row system query `CLIENT_MUTATIONS_TABLE WHERE client_id = <me>`. The server\nderives the identity from the connection (args are ignored).","source":"packages/client/src/types.ts","line":287,"href":"/reference/typescript/remote/#symbol-LMID_QUERY_NAME"},{"name":"localFragmentReadAst","originalName":"localFragmentReadAst","kind":"FunctionDeclaration","signature":"export declare function localFragmentReadAst<F extends Fragment<any, any, any>>(fragment: F, ref: LocalFragmentRef<F>, primaryKeyFor: (table: string) => readonly string[]): Ast;","description":"","source":"packages/client/src/query.ts","line":655,"href":"/reference/typescript/remote/#symbol-localFragmentReadAst"},{"name":"LocalFragmentRef","originalName":"LocalFragmentRef","kind":"InterfaceDeclaration","signature":"export interface LocalFragmentRef<F extends Fragment<any, any, any, any> = Fragment<any, any, any, any>> {\n    readonly [LOCAL_FRAGMENT_REF_BRAND]: true;\n    readonly source: \"local\";\n    readonly table: string;\n    readonly pk: Readonly<Record<string, LitValue>>;\n    readonly coverage: FragmentCoverage;\n    readonly __fragment?: F;\n}","description":"","source":"packages/client/src/query.ts","line":553,"href":"/reference/typescript/remote/#symbol-LocalFragmentRef"},{"name":"localQueryReadAst","originalName":"localQueryReadAst","kind":"FunctionDeclaration","signature":"export declare function localQueryReadAst(query: AnyQuery, primaryKeyFor: (table: string) => readonly string[]): Ast;","description":"","source":"packages/client/src/query.ts","line":687,"href":"/reference/typescript/remote/#symbol-localQueryReadAst"},{"name":"localRootFragmentRefsAst","originalName":"localRootFragmentRefsAst","kind":"FunctionDeclaration","signature":"export declare function localRootFragmentRefsAst<F extends Fragment<any, any, any>>(fragment: F, query: AnyQuery, primaryKeyFor: (table: string) => readonly string[]): Ast;","description":"","source":"packages/client/src/query.ts","line":670,"href":"/reference/typescript/remote/#symbol-localRootFragmentRefsAst"},{"name":"localSchemaHash","originalName":"localSchemaHash","kind":"FunctionDeclaration","signature":"/** A stable fingerprint of the schema's PERSISTED local tables only — the persistence gate's\n *  `schemaHash` (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §3.3 / P7). Per `local: true` table:\n *  `(name, ordered column names + types + optionality, pk columns)`. Column order is kept (rows are\n *  positional); tables are sorted by name so registration order can't skew it; synced-table AND\n *  `local: \"session\"` changes never move it (reshaping an ephemeral table must not wipe durable\n *  data). The value is the canonical descriptor itself, not a digest — local-table sets are tiny,\n *  and exactness (no collision can ever skip a P7 clear) beats compactness here. */\nexport declare function localSchemaHash<S extends ColsMap>(schema: Schema<S>): string;","description":"A stable fingerprint of the schema's PERSISTED local tables only — the persistence gate's\n`schemaHash` (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §3.3 / P7). Per `local: true` table:\n`(name, ordered column names + types + optionality, pk columns)`. Column order is kept (rows are\npositional); tables are sorted by name so registration order can't skew it; synced-table AND\n`local: \"session\"` changes never move it (reshaping an ephemeral table must not wipe durable\ndata). The value is the canonical descriptor itself, not a digest — local-table sets are tiny,\nand exactness (no collision can ever skip a P7 clear) beats compactness here.","source":"packages/client/src/schema.ts","line":430,"href":"/reference/typescript/remote/#symbol-localSchemaHash"},{"name":"localTableNames","originalName":"localTableNames","kind":"FunctionDeclaration","signature":"/** The set of local-only table names in `schema` (`201-LOCAL-ONLY-TABLES-DESIGN.md` §4) — BOTH\n *  variants (`true` and `\"session\"`); every locality rule except persistence keys off this set. */\nexport declare function localTableNames<S extends ColsMap>(schema: Schema<S>): Set<string>;","description":"The set of local-only table names in `schema` (`201-LOCAL-ONLY-TABLES-DESIGN.md` §4) — BOTH\nvariants (`true` and `\"session\"`); every locality rule except persistence keys off this set.","source":"packages/client/src/schema.ts","line":412,"href":"/reference/typescript/remote/#symbol-localTableNames"},{"name":"lt","originalName":"lt","kind":"VariableDeclaration","signature":"export declare const lt: <V extends number | string>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":30,"href":"/reference/typescript/remote/#symbol-lt"},{"name":"Mutation","originalName":"Mutation","kind":"TypeAliasDeclaration","signature":"export type Mutation = {\n    op: \"add\";\n    table: string;\n    row: WireValue[];\n} | {\n    op: \"remove\";\n    table: string;\n    row: WireValue[];\n} | {\n    op: \"edit\";\n    table: string;\n    old: WireValue[];\n    new: WireValue[];\n};","description":"","source":"packages/client/src/types.ts","line":89,"href":"/reference/typescript/remote/#symbol-Mutation"},{"name":"MutationEnvelope","originalName":"MutationEnvelope","kind":"InterfaceDeclaration","signature":"/** The upstream named-mutator envelope (OPTIMISTIC-WRITES-DESIGN.md §8.1): the wire\n *  carries the name + JSON args, never code; `mid` totally orders a client's mutations. */\nexport interface MutationEnvelope {\n    clientID: string;\n    mid: number;\n    name: string;\n    args: unknown;\n}","description":"The upstream named-mutator envelope (OPTIMISTIC-WRITES-DESIGN.md §8.1): the wire\ncarries the name + JSON args, never code; `mid` totally orders a client's mutations.","source":"packages/client/src/types.ts","line":236,"href":"/reference/typescript/remote/#symbol-MutationEnvelope"},{"name":"MutationEnvelopeSender","originalName":"MutationEnvelopeSender","kind":"TypeAliasDeclaration","signature":"export type MutationEnvelopeSender = (envelope: MutationEnvelope) => void | PromiseLike<void>;","description":"","source":"packages/remote/src/subscribe.ts","line":24,"href":"/reference/typescript/remote/#symbol-MutationEnvelopeSender"},{"name":"MutationGen","originalName":"MutationGen","kind":"TypeAliasDeclaration","signature":"/** What a generator mutator IS: `yield tx.<op>()` on every side effect; a `yield tx.row()` expression\n *  evaluates to the row. Neither sync nor async — the tier's driver decides, which is what lets one\n *  body run synchronously on the client and against a live async transaction on the server. */\nexport type MutationGen = Generator<YieldEffect, void, KeyedRow | undefined>;","description":"What a generator mutator IS: `yield tx.<op>()` on every side effect; a `yield tx.row()` expression\nevaluates to the row. Neither sync nor async — the tier's driver decides, which is what lets one\nbody run synchronously on the client and against a live async transaction on the server.","source":"packages/client/src/mutation-ops.ts","line":148,"href":"/reference/typescript/remote/#symbol-MutationGen"},{"name":"MutationOp","originalName":"MutationOp","kind":"TypeAliasDeclaration","signature":"/** One structured write intent — the discriminated union that mirrors the write half of the client\n *  `MutationTx` 1:1. Keyed (column-name addressed), so it is independent of column order. */\nexport type MutationOp = {\n    kind: \"insert\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"upsert\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"insertIgnore\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"update\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"delete\";\n    table: string;\n    pk: KeyedRow;\n};","description":"One structured write intent — the discriminated union that mirrors the write half of the client\n`MutationTx` 1:1. Keyed (column-name addressed), so it is independent of column order.","source":"packages/client/src/mutation-ops.ts","line":17,"href":"/reference/typescript/remote/#symbol-MutationOp"},{"name":"MutationOutcomeFrame","originalName":"MutationOutcomeFrame","kind":"InterfaceDeclaration","signature":"/** A room authority's verdict for a NON-applied mutation (RINDLE-REALTIME-QUERY-ENABLEMENT\n *  §3.3, the deopt handshake; Slice H-iv-b server half / H-v client half). Sent on the author's\n *  own socket for every mutation the room did NOT apply, always BEFORE the lmid ack that burns\n *  the `mid` (same-socket ordering only — the ack may reach the client through another path\n *  first, e.g. a replayed lmid snapshot). Applied mutations send NOTHING: silence + lmid\n *  coverage ⇒ applied.\n *\n *  - `kind: \"deopt\"` — the room's §3.3 commit gate refused the routed mutation (or its\n *    environment fell short, e.g. `tx.query`); the mid is burnt in the ROOM ledger with zero\n *    effects and the client re-enqueues the same logical mutation onto the daemon stream.\n *    `name`/`args` are echoed so the frame is SELF-CONTAINED: a client that already retired the\n *    entry (the burnt-mid confirm won the race, or the frame is a replay re-answer) re-invokes\n *    from the frame alone.\n *  - `kind: \"rejected\"` — FINAL (authz/validation): the mid is burnt the same way and the\n *    prediction snaps back on the ordinary lmid release; no re-route.\n *\n *  `reason` may be absent on a re-answered frame whose record was seeded from journal replay\n *  (the verdict is journaled; the reason is not). */\nexport interface MutationOutcomeFrame {\n    mid: number;\n    kind: \"deopt\" | \"rejected\";\n    reason?: string;\n    /** Echoed on DEOPT frames only (self-contained re-invoke — see above). */\n    name?: string;\n    args?: unknown;\n}","description":"A room authority's verdict for a NON-applied mutation (RINDLE-REALTIME-QUERY-ENABLEMENT\n§3.3, the deopt handshake; Slice H-iv-b server half / H-v client half). Sent on the author's\nown socket for every mutation the room did NOT apply, always BEFORE the lmid ack that burns\nthe `mid` (same-socket ordering only — the ack may reach the client through another path\nfirst, e.g. a replayed lmid snapshot). Applied mutations send NOTHING: silence + lmid\ncoverage ⇒ applied.\n\n- `kind: \"deopt\"` — the room's §3.3 commit gate refused the routed mutation (or its\n  environment fell short, e.g. `tx.query`); the mid is burnt in the ROOM ledger with zero\n  effects and the client re-enqueues the same logical mutation onto the daemon stream.\n  `name`/`args` are echoed so the frame is SELF-CONTAINED: a client that already retired the\n  entry (the burnt-mid confirm won the race, or the frame is a replay re-answer) re-invokes\n  from the frame alone.\n- `kind: \"rejected\"` — FINAL (authz/validation): the mid is burnt the same way and the\n  prediction snaps back on the ordinary lmid release; no re-route.\n\n`reason` may be absent on a re-answered frame whose record was seeded from journal replay\n(the verdict is journaled; the reason is not).","source":"packages/client/src/types.ts","line":261,"href":"/reference/typescript/remote/#symbol-MutationOutcomeFrame"},{"name":"MutatorCtx","originalName":"MutatorCtx","kind":"InterfaceDeclaration","signature":"/** The minimal per-invocation context a shared mutator sees on BOTH tiers: the acting principal. The\n *  server injects its AUTHENTICATED user; the client injects its local user. (The server's own\n *  `MutationContext` is a superset of this.) */\nexport interface MutatorCtx {\n    user: string;\n}","description":"The minimal per-invocation context a shared mutator sees on BOTH tiers: the acting principal. The\nserver injects its AUTHENTICATED user; the client injects its local user. (The server's own\n`MutationContext` is a superset of this.)","source":"packages/client/src/mutation-ops.ts","line":141,"href":"/reference/typescript/remote/#symbol-MutatorCtx"},{"name":"NamedQuery","originalName":"NamedQuery","kind":"InterfaceDeclaration","signature":"/**\n * A single, co-located NAMED query (see {@link defineQuery}). It is:\n *   - **callable on the client** — `q(args, ctx?)` validates + builds + stamps the result with its\n *     remote subscription identity (`name` + args — NOT ctx), so a component that imports it always\n *     SYNCS. There is no unstamped builder to import by accident.\n *   - **registerable on the server** — it carries its `queryName` and a `resolve` that re-runs the\n *     SAME validator on untrusted wire args and builds the AUTHORITATIVE `Query` from the server's\n *     own ctx ({@link registerQueries `registerQueries`} in `@rindle/api-server`).\n *\n * `Ctx` is the ctx parameter list mirrored from `build` — `[]`, `[ctx: C]`, or `[ctx?: C]`. It is\n * never part of the wire identity.\n */\nexport interface NamedQuery<Args, Ctx extends readonly unknown[], Q extends AnyQuery> {\n    (args: Args, ...ctx: Ctx): Q;\n    /** The wire identity. The daemon leases by this name; client and server MUST agree on it — which\n     *  they do, because both sides import the SAME `defineQuery` value. */\n    readonly queryName: string;\n    /** The §2.1 realtime label, when this query was defined with one ({@link DefineQueryOptions}).\n     *  Absent on unlabeled queries. Carried onto the stamped built Query too, and preserved through\n     *  `registerQueries` on the server. */\n    readonly realtime?: RealtimeQueryLabel<Args>;\n    /** Server-side: validate raw wire args, then build the authoritative `Query` from the server's\n     *  authoritative ctx (forwarded by `registerQueries`). */\n    resolve(rawArgs: unknown, ...ctx: Ctx): Q;\n}","description":"A single, co-located NAMED query (see {@link defineQuery}). It is:\n  - **callable on the client** — `q(args, ctx?)` validates + builds + stamps the result with its\n    remote subscription identity (`name` + args — NOT ctx), so a component that imports it always\n    SYNCS. There is no unstamped builder to import by accident.\n  - **registerable on the server** — it carries its `queryName` and a `resolve` that re-runs the\n    SAME validator on untrusted wire args and builds the AUTHORITATIVE `Query` from the server's\n    own ctx ({@link registerQueries `registerQueries`} in `@rindle/api-server`).\n\n`Ctx` is the ctx parameter list mirrored from `build` — `[]`, `[ctx: C]`, or `[ctx?: C]`. It is\nnever part of the wire identity.","source":"packages/client/src/query.ts","line":425,"href":"/reference/typescript/remote/#symbol-NamedQuery"},{"name":"NamedRow","originalName":"NamedRow","kind":"TypeAliasDeclaration","signature":"/** A row named against its level's wire columns. */\nexport type NamedRow = Record<string, WireValue>;","description":"A row named against its level's wire columns.","source":"packages/client/src/resolve.ts","line":26,"href":"/reference/typescript/remote/#symbol-NamedRow"},{"name":"ne","originalName":"ne","kind":"VariableDeclaration","signature":"export declare const ne: <V>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":27,"href":"/reference/typescript/remote/#symbol-ne"},{"name":"newQueryBuilder","originalName":"newQueryBuilder","kind":"FunctionDeclaration","signature":"/** A schema-bound query-builder factory for portable client/server query definitions. SERVER\n *  scope: local-only tables are excluded (a named/remote query may never reference one). */\nexport declare function newQueryBuilder<S extends ColsMap>(schema: Schema<S>): QueryRoot<S>;","description":"A schema-bound query-builder factory for portable client/server query definitions. SERVER\nscope: local-only tables are excluded (a named/remote query may never reference one).","source":"packages/client/src/query.ts","line":1333,"href":"/reference/typescript/remote/#symbol-newQueryBuilder"},{"name":"NormalizedBatch","originalName":"NormalizedBatch","kind":"InterfaceDeclaration","signature":"/** One committed transaction's normalized ops (or the seq-0 hydrate snapshot). `cv` (the\n *  global commit version the frame reflects) is stamped by optimistic-protocol servers and\n *  rides through to the `NormalizedEvent` (OPTIMISTIC-WRITES-DESIGN.md §8.3). */\nexport interface NormalizedBatch {\n    epoch: number;\n    seq: number;\n    normalizedFp: string;\n    ops: NormalizedOp[];\n    cv?: number;\n}","description":"One committed transaction's normalized ops (or the seq-0 hydrate snapshot). `cv` (the\nglobal commit version the frame reflects) is stamped by optimistic-protocol servers and\nrides through to the `NormalizedEvent` (OPTIMISTIC-WRITES-DESIGN.md §8.3).","source":"packages/remote/src/normalized.ts","line":102,"href":"/reference/typescript/remote/#symbol-NormalizedBatch"},{"name":"NormalizedEvent","originalName":"NormalizedEvent","kind":"TypeAliasDeclaration","signature":"/**\n * A per-query NORMALIZED stream event — the path-free twin of {@link ChangeEvent}. The\n * `hello` carries the flat per-table schemas (no nested view schema, §3); `snapshot`/`batch`\n * carry table-tagged {@link NormalizedOp}s. The `NormalizedSync` layer folds these into the\n * local engine's base tables.\n *\n * `cv` (the global commit version the frame's data reflects — OPTIMISTIC-WRITES-DESIGN.md\n * §8.3/§8.6) is present on sources that speak the optimistic protocol; the plain normalized\n * path may omit it.\n */\nexport type NormalizedEvent = {\n    type: \"hello\";\n    tables: NormalizedTableSchema[];\n    comparatorVersion: number;\n    normalizedFp: string;\n} | {\n    type: \"snapshot\";\n    ops: NormalizedOp[];\n    cv?: number;\n} | {\n    type: \"batch\";\n    ops: NormalizedOp[];\n    cv?: number;\n};","description":"A per-query NORMALIZED stream event — the path-free twin of {@link ChangeEvent}. The\n`hello` carries the flat per-table schemas (no nested view schema, §3); `snapshot`/`batch`\ncarry table-tagged {@link NormalizedOp}s. The `NormalizedSync` layer folds these into the\nlocal engine's base tables.\n\n`cv` (the global commit version the frame's data reflects — OPTIMISTIC-WRITES-DESIGN.md\n§8.3/§8.6) is present on sources that speak the optimistic protocol; the plain normalized\npath may omit it.","source":"packages/client/src/types.ts","line":123,"href":"/reference/typescript/remote/#symbol-NormalizedEvent"},{"name":"normalizedFp","originalName":"normalizedFp","kind":"FunctionDeclaration","signature":"/** A `tables` set's content fingerprint — FNV-1a 64 over the canonical, length-prefixed byte\n *  stream of `rindle-replica::normalize_protocol::normalized_fp` (PK resolved to column NAMES),\n *  as 16-char lowercase hex (=== the Rust hex). `tables` MUST be sorted by name (the server's\n *  `NormalizedPublisher` guarantees it) so the fingerprint is order-stable. */\nexport declare function normalizedFp(tables: NormalizedTableSchema[]): string;","description":"A `tables` set's content fingerprint — FNV-1a 64 over the canonical, length-prefixed byte\nstream of `rindle-replica::normalize_protocol::normalized_fp` (PK resolved to column NAMES),\nas 16-char lowercase hex (=== the Rust hex). `tables` MUST be sorted by name (the server's\n`NormalizedPublisher` guarantees it) so the fingerprint is order-stable.","source":"packages/remote/src/normalized.ts","line":22,"href":"/reference/typescript/remote/#symbol-normalizedFp"},{"name":"NormalizedHello","originalName":"NormalizedHello","kind":"InterfaceDeclaration","signature":"/** The slim normalized handshake (§3), sent once before any {@link NormalizedBatch}. */\nexport interface NormalizedHello {\n    epoch: number;\n    comparatorVersion: number;\n    tables: NormalizedTableSchema[];\n    normalizedFp: string;\n}","description":"The slim normalized handshake (§3), sent once before any {@link NormalizedBatch}.","source":"packages/remote/src/normalized.ts","line":92,"href":"/reference/typescript/remote/#symbol-NormalizedHello"},{"name":"NormalizedOp","originalName":"NormalizedOp","kind":"TypeAliasDeclaration","signature":"/**\n * A table-tagged, path-free row delta — the **normalized** wire payload (the path-free twin\n * of {@link FlatChange}; NORMALIZED-CHANGES-DESIGN.md §3). Rows are positional (bare cells; a\n * json column is its raw JSON string). `op` is the discriminant. Lives here (not in\n * `@rindle/normalized`) so both the protocol (`@rindle/remote`) and the sync layer share one type.\n */\nexport type NormalizedOp = {\n    table: string;\n    op: \"add\";\n    row: WireValue[];\n} | {\n    table: string;\n    op: \"remove\";\n    row: WireValue[];\n} | {\n    table: string;\n    op: \"edit\";\n    old: WireValue[];\n    new: WireValue[];\n};","description":"A table-tagged, path-free row delta — the **normalized** wire payload (the path-free twin\nof {@link FlatChange}; NORMALIZED-CHANGES-DESIGN.md §3). Rows are positional (bare cells; a\njson column is its raw JSON string). `op` is the discriminant. Lives here (not in\n`@rindle/normalized`) so both the protocol (`@rindle/remote`) and the sync layer share one type.","source":"packages/client/src/types.ts","line":100,"href":"/reference/typescript/remote/#symbol-NormalizedOp"},{"name":"NormalizedSource","originalName":"NormalizedSource","kind":"InterfaceDeclaration","signature":"/**\n * The server side of the **normalized** local-first path (NORMALIZED-CHANGES-DESIGN.md §5/§7):\n * registers queries and pushes each one's normalized footprint stream ({@link NormalizedEvent}s).\n * Both the in-process native (`@rindle/replica`) source and the ws (`@rindle/remote`\n * `RemoteNormalizedSource`) implement it; `@rindle/normalized`'s `NormalizedBackend` consumes one,\n * never knowing which — a sibling seam of {@link Backend} for the normalized composition.\n */\nexport interface NormalizedSource {\n    registerQuery(queryId: QueryId, remote: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Send base-table writes to the server; the authoritative stream flows back. */\n    mutate(mutations: Mutation[]): Promise<void>;\n    onNormalized(handler: (queryId: QueryId, event: NormalizedEvent) => void): void;\n    /** Optional: the backend hands its OWN typed per-table schemas so the source can validate\n     *  each server `hello` against them (column order / PK by name) and reject a schema skew\n     *  rather than silently transposing positional cells (CRIT#4 / §3 \"drift ⇒ re-subscribe\").\n     *  Sources that can't skew (the in-process native source) may omit it. */\n    expectClientSchema?(tables: NormalizedTableSchema[]): void;\n}","description":"The server side of the **normalized** local-first path (NORMALIZED-CHANGES-DESIGN.md §5/§7):\nregisters queries and pushes each one's normalized footprint stream ({@link NormalizedEvent}s).\nBoth the in-process native (`@rindle/replica`) source and the ws (`@rindle/remote`\n`RemoteNormalizedSource`) implement it; `@rindle/normalized`'s `NormalizedBackend` consumes one,\nnever knowing which — a sibling seam of {@link Backend} for the normalized composition.","source":"packages/client/src/types.ts","line":221,"href":"/reference/typescript/remote/#symbol-NormalizedSource"},{"name":"NormalizedSubscriber","originalName":"NormalizedSubscriber","kind":"ClassDeclaration","signature":"/** Receiver side: validates a normalized frame stream (comparator at `hello`; per batch —\n *  epoch match, fingerprint match, strict in-order seq) and emits clean `NormalizedEvent`s.\n *  It does NOT fold (the `NormalizedSync` layer does). Mirrors the flat {@link Subscriber}. */\nexport declare class NormalizedSubscriber {\n    readonly epoch: number;\n    readonly normalizedFp: string;\n    private readonly emit;\n    private phase;\n    private lastSeq;\n    /**\n     * @param hello         the server's normalized handshake.\n     * @param emit          clean-event sink (the `NormalizedSync` fold).\n     * @param clientTables  the CLIENT's own typed per-table schemas (all tables). When given,\n     *   each table the hello advertises is validated by NAME against it (column order + PK\n     *   indices). The hello's `tables` is a per-query SUBSET (the query's table tree), so this\n     *   checks each advertised table rather than one global fingerprint. A mismatch (routine\n     *   deployment / schema skew) is rejected here — without it, positional rows aligned to the\n     *   SERVER's column order are stored verbatim under the CLIENT's order, silently swapping\n     *   cells and mis-keying the refcount/GC (CRIT#4 / §3 \"drift ⇒ re-subscribe\").\n     */\n    constructor(hello: NormalizedHello, emit: (ev: NormalizedEvent) => void, clientTables?: NormalizedTableSchema[]);\n    /** Apply one normalized batch (or the seq-0 snapshot). Returns `\"duplicate\"` for an\n     *  already-applied seq; throws {@link ProtocolError} on a gap / epoch / fp mismatch (the\n     *  caller re-hydrates under a new epoch). */\n    apply(batch: NormalizedBatch): \"applied\" | \"duplicate\";\n}","description":"Receiver side: validates a normalized frame stream (comparator at `hello`; per batch —\nepoch match, fingerprint match, strict in-order seq) and emits clean `NormalizedEvent`s.\nIt does NOT fold (the `NormalizedSync` layer does). Mirrors the flat {@link Subscriber }.","source":"packages/remote/src/normalized.ts","line":115,"href":"/reference/typescript/remote/#symbol-NormalizedSubscriber"},{"name":"NormalizedTableSchema","originalName":"NormalizedTableSchema","kind":"InterfaceDeclaration","signature":"/** One base table's flat schema on the normalized `hello` (§3): column names (in order) +\n *  primary-key column indices. Wire rows are positional against `columns`. */\nexport interface NormalizedTableSchema {\n    name: string;\n    columns: string[];\n    primaryKey: number[];\n}","description":"One base table's flat schema on the normalized `hello` (§3): column names (in order) +\nprimary-key column indices. Wire rows are positional against `columns`.","source":"packages/client/src/types.ts","line":107,"href":"/reference/typescript/remote/#symbol-NormalizedTableSchema"},{"name":"normalizedTableSchemas","originalName":"normalizedTableSchemas","kind":"FunctionDeclaration","signature":"/** The client's per-table flat schema (name + column order + PK indices), the shape a\n *  normalized `hello` advertises (NORMALIZED-CHANGES-DESIGN.md §3). Used to validate a\n *  server hello against the CLIENT's own typed schema so a column-order / PK skew is caught\n *  instead of silently transposing positional cells (CRIT#4). Sorted by name for stable\n *  ordering.\n *\n *  Local-only tables are **omitted** (`201-LOCAL-ONLY-TABLES-DESIGN.md` E1): the client never\n *  claims them to the server, the server never expects/ships them, and they stay out of the schema\n *  fingerprint (`normalizedFp`) so a local table can't skew it vs. the server's. */\nexport declare function normalizedTableSchemas<S extends ColsMap>(schema: Schema<S>): {\n    name: string;\n    columns: string[];\n    primaryKey: number[];\n}[];","description":"The client's per-table flat schema (name + column order + PK indices), the shape a\nnormalized `hello` advertises (NORMALIZED-CHANGES-DESIGN.md §3). Used to validate a\nserver hello against the CLIENT's own typed schema so a column-order / PK skew is caught\ninstead of silently transposing positional cells (CRIT#4). Sorted by name for stable\nordering.\n\nLocal-only tables are **omitted** (`201-LOCAL-ONLY-TABLES-DESIGN.md` E1): the client never\nclaims them to the server, the server never expects/ships them, and they stay out of the schema\nfingerprint (`normalizedFp`) so a local table can't skew it vs. the server's.","source":"packages/client/src/schema.ts","line":550,"href":"/reference/typescript/remote/#symbol-normalizedTableSchemas"},{"name":"notExists","originalName":"notExists","kind":"FunctionDeclaration","signature":"/** `NOT EXISTS` by a named {@link Relationship}. */\nexport declare function notExists<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<RowOf<PC>>;\n/** `NOT EXISTS (<correlated subquery>)`. */\nexport declare function notExists<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<R>;","description":"`NOT EXISTS` by a named {@link Relationship}.\n`NOT EXISTS (<correlated subquery>)`.","source":"packages/client/src/query.ts","line":1229,"href":"/reference/typescript/remote/#symbol-notExists"},{"name":"notExistsNoSync","originalName":"notExistsNoSync","kind":"FunctionDeclaration","signature":"/** `NOT EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate — the `NOT EXISTS` form of {@link existsNoSync} (a deny-style permission rule). */\nexport declare function notExistsNoSync<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<RowOf<PC>>;\nexport declare function notExistsNoSync<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<R>;","description":"`NOT EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate — the `NOT EXISTS` form of {@link existsNoSync} (a deny-style permission rule).","source":"packages/client/src/query.ts","line":1270,"href":"/reference/typescript/remote/#symbol-notExistsNoSync"},{"name":"notIlike","originalName":"notIlike","kind":"VariableDeclaration","signature":"export declare const notIlike: (pattern: string) => Pred<string>;","description":"","source":"packages/client/src/operators.ts","line":35,"href":"/reference/typescript/remote/#symbol-notIlike"},{"name":"notInList","originalName":"notInList","kind":"VariableDeclaration","signature":"export declare const notInList: <V>(values: V[]) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":37,"href":"/reference/typescript/remote/#symbol-notInList"},{"name":"notLike","originalName":"notLike","kind":"VariableDeclaration","signature":"export declare const notLike: (pattern: string) => Pred<string>;","description":"","source":"packages/client/src/operators.ts","line":33,"href":"/reference/typescript/remote/#symbol-notLike"},{"name":"number","originalName":"number","kind":"VariableDeclaration","signature":"export declare const number: <T extends number = number>() => ColBuilder<T>;","description":"","source":"packages/client/src/schema.ts","line":47,"href":"/reference/typescript/remote/#symbol-number"},{"name":"offerSubprotocols","originalName":"offerSubprotocols","kind":"FunctionDeclaration","signature":"/** The subprotocol list to offer for one connection: the base protocol always, plus the held ticket\n *  (already an `aff.<…>` token) when one exists. */\nexport declare function offerSubprotocols(store: AffinityTicketStore): string[];","description":"The subprotocol list to offer for one connection: the base protocol always, plus the held ticket\n(already an `aff.<…>` token) when one exists.","source":"packages/remote/src/affinity.ts","line":134,"href":"/reference/typescript/remote/#symbol-offerSubprotocols"},{"name":"OneShotBackend","originalName":"OneShotBackend","kind":"ClassDeclaration","signature":"/**\n * A no-op live backend for SSR (SSR-DESIGN.md §6.1): it opens no transport and never streams.\n * `registerQuery` is inert, `mutate` rejects, and no `ChangeEvent` is pushed. Every view stays\n * PENDING — reading its SSR {@link Store.seedAssembled seed} — and, lacking `onResultType`,\n * reports `complete` (a backend with no server lifecycle leaves every view authoritative).\n */\nexport declare class OneShotBackend implements Backend {\n    registerQuery(_qid: QueryId, _ast: unknown, _remote?: RemoteQuery): void;\n    unregisterQuery(_qid: QueryId): void;\n    mutate(_mutations: Mutation[]): Promise<void>;\n    onEvent(_handler: (queryId: QueryId, event: ChangeEvent) => void): void;\n}","description":"A no-op live backend for SSR (SSR-DESIGN.md §6.1): it opens no transport and never streams.\n`registerQuery` is inert, `mutate` rejects, and no `ChangeEvent` is pushed. Every view stays\nPENDING — reading its SSR {@link Store.seedAssembledseed} — and, lacking `onResultType`,\nreports `complete` (a backend with no server lifecycle leaves every view authoritative).","source":"packages/client/src/ssr.ts","line":48,"href":"/reference/typescript/remote/#symbol-OneShotBackend"},{"name":"OneShotQueryFn","originalName":"OneShotQueryFn","kind":"TypeAliasDeclaration","signature":"/** The one-shot read the server Store calls to preload a query. Two topologies inject different\n *  fns (SSR-DESIGN.md §6):\n *\n *   - **Direct to the daemon** (the trusted tier holds the daemon token): use `ast` —\n *     `(i) => daemon.query(i)`.\n *   - **Through the application's API tier** (the authority resolves names → ASTs, the loader never\n *     sends a raw AST): use `name`/`args` — `(i) => fetch('/api/rindle/read', {name: i.name, args: i.args})`.\n *\n *  `ast` is always present (the Store seeds the local view by its `viewKey`); `name`/`args` are\n *  present when the preloaded query came from `defineQuery`. This Store does not authenticate\n *  users or filter rows. The injected function must enforce access: either call the authenticated\n *  API route, or authorize and construct the AST before a privileged direct daemon read. */\nexport type OneShotQueryFn = (input: {\n    ast: unknown;\n    name?: string;\n    args?: unknown;\n    visibilityKey?: string;\n    ttlMs?: number;\n}) => Promise<OneShotResult>;","description":"The one-shot read the server Store calls to preload a query. Two topologies inject different\nfns (SSR-DESIGN.md §6):\n\n - **Direct to the daemon** (the trusted tier holds the daemon token): use `ast` —\n   `(i) => daemon.query(i)`.\n - **Through the application's API tier** (the authority resolves names → ASTs, the loader never\n   sends a raw AST): use `name`/`args` — `(i) => fetch('/api/rindle/read', {name: i.name, args: i.args})`.\n\n`ast` is always present (the Store seeds the local view by its `viewKey`); `name`/`args` are\npresent when the preloaded query came from `defineQuery`. This Store does not authenticate\nusers or filter rows. The injected function must enforce access: either call the authenticated\nAPI route, or authorize and construct the AST before a privileged direct daemon read.","source":"packages/client/src/ssr.ts","line":38,"href":"/reference/typescript/remote/#symbol-OneShotQueryFn"},{"name":"OneShotResult","originalName":"OneShotResult","kind":"InterfaceDeclaration","signature":"/** An authorized one-shot read result, as far as the server Store needs it: the\n *  assembled rows plus the `cvMin` baseline they reflect. (Matches `@rindle/daemon-client`'s\n *  `QueryOnceOutput`, but `@rindle/client` stays dependency-free — inject the call.) */\nexport interface OneShotResult {\n    rows: AssembledNode[];\n    cvMin?: number;\n}","description":"An authorized one-shot read result, as far as the server Store needs it: the\nassembled rows plus the `cvMin` baseline they reflect. (Matches `@rindle/daemon-client`'s\n`QueryOnceOutput`, but `@rindle/client` stays dependency-free — inject the call.)","source":"packages/client/src/ssr.ts","line":21,"href":"/reference/typescript/remote/#symbol-OneShotResult"},{"name":"OptimisticSource","originalName":"OptimisticSource","kind":"InterfaceDeclaration","signature":"/**\n * The server side of the OPTIMISTIC path (OPTIMISTIC-WRITES-DESIGN.md §8): the\n * {@link NormalizedSource} stream with `cv`-tagged data frames, plus the connection-level\n * {@link ProgressFrame} channel and the named-mutator upstream. The client buffers data\n * frames by `cv` and applies all `cv ≤ cvMin` as one coherent release (§8.5).\n */\nexport interface OptimisticSource {\n    registerQuery(queryId: QueryId, remote: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Ship one named-mutator invocation upstream (§8.1). Confirmation rides the progress frames. */\n    pushMutation(envelope: MutationEnvelope): Promise<void>;\n    onNormalized(handler: (queryId: QueryId, event: NormalizedEvent) => void): void;\n    onProgress(handler: (frame: ProgressFrame) => void): void;\n    /** Optional: the backend hands its OWN typed per-table schemas so the source validates each\n     *  server `hello` against them and rejects a schema skew (CRIT#4); see {@link NormalizedSource}. */\n    expectClientSchema?(tables: NormalizedTableSchema[]): void;\n    /** Optional: fired when the server restarts (a transport that can detect it, e.g. via a daemon\n     *  boot id). The backend resets its `cv` watermark so the server's reset `cv` sequence is\n     *  accepted rather than dropped as stale. In-process sources never restart and omit it. */\n    onRestart?(handler: () => void): void;\n    /** Optional (Slice H-v): the channel's {@link MutationOutcomeFrame} stream — the room deopt\n     *  handshake's client half. **OUT-OF-BAND BY DESIGN**: the frame carries no `cv` and the source\n     *  MUST dispatch it immediately on arrival, never behind the cv buffer — a deopt has to migrate\n     *  its pending entry BEFORE the buffered lmid release that would otherwise retire it as a\n     *  success (and the §7.3 hold-back trigger, keyed on the entry's confirming domain, would then\n     *  park its staged writes the wrong way). Sources whose authority never deopts (the in-process\n     *  native source, a plain daemon) omit it. */\n    onMutationOutcome?(handler: (frame: MutationOutcomeFrame) => void): void;\n    /** Optional (Slice H-v, the §7.5 rule-3 crash-window closer): fired when the transport\n     *  RE-establishes its session (reconnect → re-`init`), BEFORE any post-reconnect frame is\n     *  processed — the ordering is load-bearing: the re-subscribed lmid stream's fresh snapshot may\n     *  cover a mid whose `mutationOutcome` frame died with the old socket, and once that release\n     *  retires the entry as an apparent success there is nothing left to re-send. The backend\n     *  re-sends this domain's unconfirmed pending envelopes with their ORIGINAL mids, in mid order;\n     *  the source may DEFER their delivery until the session is re-authorized (a room's\n     *  `pushMutation` requires the lease-token subscribe's subject). Idempotent under the domain's\n     *  own ledger — a processed mid dedups silently (silence + lmid coverage ⇒ applied), a\n     *  non-applied mid is re-answered from the authority's recorded-outcome map (resolving even an\n     *  already-retired entry through the handshake's not-found arm). Distinct from\n     *  {@link onRestart} (a NEW server incarnation): a same-incarnation socket drop re-syncs\n     *  without restarting, and envelopes sent into the dead socket are exactly what this recovers.\n     *  In-process sources never drop a session and omit it. */\n    onResync?(handler: () => void): void;\n}","description":"The server side of the OPTIMISTIC path (OPTIMISTIC-WRITES-DESIGN.md §8): the\n{@link NormalizedSource} stream with `cv`-tagged data frames, plus the connection-level\n{@link ProgressFrame} channel and the named-mutator upstream. The client buffers data\nframes by `cv` and applies all `cv ≤ cvMin` as one coherent release (§8.5).","source":"packages/client/src/types.ts","line":303,"href":"/reference/typescript/remote/#symbol-OptimisticSource"},{"name":"or","originalName":"or","kind":"FunctionDeclaration","signature":"/** At least one child must hold. */\nexport declare function or<R>(...conds: Cond<R>[]): Cond<R>;","description":"At least one child must hold.","source":"packages/client/src/operators.ts","line":71,"href":"/reference/typescript/remote/#symbol-or"},{"name":"OrderPart","originalName":"OrderPart","kind":"TypeAliasDeclaration","signature":"/** One `(field, direction)` ordering — serializes as the 2-tuple `[\"id\", \"asc\"]`. */\nexport type OrderPart = [\n    field: string,\n    dir: Dir\n];","description":"One `(field, direction)` ordering — serializes as the 2-tuple `[\"id\", \"asc\"]`.","source":"packages/client/src/ast.ts","line":8,"href":"/reference/typescript/remote/#symbol-OrderPart"},{"name":"PathSeg","originalName":"PathSeg","kind":"InterfaceDeclaration","signature":"export interface PathSeg {\n    rel: number;\n    parentRow: WireValue[];\n}","description":"","source":"packages/client/src/types.ts","line":54,"href":"/reference/typescript/remote/#symbol-PathSeg"},{"name":"persistedLocalTableNames","originalName":"persistedLocalTableNames","kind":"FunctionDeclaration","signature":"/** The subset of {@link localTableNames} eligible for the persistence plane — `local: true` only.\n *  A `local: \"session\"` table stays outside it: never persisted, never replicated across tabs\n *  (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §5.4). */\nexport declare function persistedLocalTableNames<S extends ColsMap>(schema: Schema<S>): Set<string>;","description":"The subset of {@link localTableNames} eligible for the persistence plane — `local: true` only.\nA `local: \"session\"` table stays outside it: never persisted, never replicated across tabs\n(`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §5.4).","source":"packages/client/src/schema.ts","line":419,"href":"/reference/typescript/remote/#symbol-persistedLocalTableNames"},{"name":"PkColsOf","originalName":"PkColsOf","kind":"TypeAliasDeclaration","signature":"/** The primary-key column union for table `N` of a schema, read from its `__pk` map `P` and narrowed\n *  to `N`'s actual columns (falling back to all columns when `P` doesn't name `N` — e.g. the loose\n *  default schema). Feeds {@link PkOf}/{@link UpdateOf} in the typed mutator tx. */\nexport type PkColsOf<S extends ColsMap, P extends Record<string, string>, N extends keyof S> = (N extends keyof P ? P[N] : keyof S[N] & string) & keyof S[N] & string;","description":"The primary-key column union for table `N` of a schema, read from its `__pk` map `P` and narrowed\nto `N`'s actual columns (falling back to all columns when `P` doesn't name `N` — e.g. the loose\ndefault schema). Feeds {@link PkOf}/{@link UpdateOf} in the typed mutator tx.","source":"packages/client/src/schema.ts","line":152,"href":"/reference/typescript/remote/#symbol-PkColsOf"},{"name":"PkMap","originalName":"PkMap","kind":"TypeAliasDeclaration","signature":"/** name → (some subset of its column names): the loose shape a {@link Schema}'s pk-map satisfies. The\n *  fallback when a schema wasn't built through {@link createSchema} — every column could be the pk. */\nexport type PkMap<S extends ColsMap> = {\n    [N in keyof S]: keyof S[N] & string;\n};","description":"name → (some subset of its column names): the loose shape a {@link Schema}'s pk-map satisfies. The\nfallback when a schema wasn't built through {@link createSchema} — every column could be the pk.","source":"packages/client/src/schema.ts","line":203,"href":"/reference/typescript/remote/#symbol-PkMap"},{"name":"PkMapOf","originalName":"PkMapOf","kind":"TypeAliasDeclaration","signature":"/** name → its primary-key column union, derived from the tables array (the PK captured by the\n *  `primaryKey(...)` builder). Powers the mutator tx's typed `update`/`delete`/`row` pk args. */\nexport type PkMapOf<T extends readonly AnyTable[]> = {\n    [E in T[number] as E[typeof SCHEMA][\"name\"]]: E[typeof SCHEMA][\"primaryKey\"][number];\n};","description":"name → its primary-key column union, derived from the tables array (the PK captured by the\n`primaryKey(...)` builder). Powers the mutator tx's typed `update`/`delete`/`row` pk args.","source":"packages/client/src/schema.ts","line":194,"href":"/reference/typescript/remote/#symbol-PkMapOf"},{"name":"PkOf","originalName":"PkOf","kind":"TypeAliasDeclaration","signature":"/** The exact PRIMARY-KEY columns of a table (each typed), required — the identity a `delete`/`row`,\n *  and the WHERE half of an `update`, take. `PK` is the table's pk-column union (the schema's `__pk`). */\nexport type PkOf<C extends AnyCols, PK extends string> = {\n    [K in PK & keyof C]: ColT<C[K & keyof C]>;\n};","description":"The exact PRIMARY-KEY columns of a table (each typed), required — the identity a `delete`/`row`,\nand the WHERE half of an `update`, take. `PK` is the table's pk-column union (the schema's `__pk`).","source":"packages/client/src/schema.ts","line":140,"href":"/reference/typescript/remote/#symbol-PkOf"},{"name":"Pred","originalName":"Pred","kind":"InterfaceDeclaration","signature":"/** A value predicate (an operator applied to a value). `V` is a phantom for type-checking. */\nexport interface Pred<V> {\n    readonly [PRED]: true;\n    readonly op: SimpleOp;\n    readonly value: LitValue;\n    readonly __v?: V;\n}","description":"A value predicate (an operator applied to a value). `V` is a phantom for type-checking.","source":"packages/client/src/operators.ts","line":11,"href":"/reference/typescript/remote/#symbol-Pred"},{"name":"ProgressFrame","originalName":"ProgressFrame","kind":"InterfaceDeclaration","signature":"/** The connection-level progress frame (§8.6): advances the coherent-apply release point\n *  (`cvMin`). A pure release signal — mutation confirmation does NOT ride it: `lmid` is a\n *  row in {@link CLIENT_MUTATIONS_TABLE}, delivered through the client's own per-client\n *  system query ({@link LMID_QUERY_NAME}) like any data, so it is released by the same\n *  `cvMin` as the commit's effects (transactionally coherent by construction). */\nexport interface ProgressFrame {\n    cvMin: number;\n}","description":"The connection-level progress frame (§8.6): advances the coherent-apply release point\n(`cvMin`). A pure release signal — mutation confirmation does NOT ride it: `lmid` is a\nrow in {@link CLIENT_MUTATIONS_TABLE}, delivered through the client's own per-client\nsystem query ({@link LMID_QUERY_NAME}) like any data, so it is released by the same\n`cvMin` as the commit's effects (transactionally coherent by construction).","source":"packages/client/src/types.ts","line":275,"href":"/reference/typescript/remote/#symbol-ProgressFrame"},{"name":"ProtocolError","originalName":"ProtocolError","kind":"ClassDeclaration","signature":"/** A protocol violation. All but a duplicate (handled silently) are unrecoverable for the\n *  current subscription — the RemoteBackend re-hydrates under a new epoch. */\nexport declare class ProtocolError extends Error {\n    readonly kind: ProtocolErrorKind;\n    constructor(kind: ProtocolErrorKind, message: string);\n}","description":"A protocol violation. All but a duplicate (handled silently) are unrecoverable for the\ncurrent subscription — the RemoteBackend re-hydrates under a new epoch.","source":"packages/remote/src/protocol.ts","line":204,"href":"/reference/typescript/remote/#symbol-ProtocolError"},{"name":"ProtocolErrorKind","originalName":"ProtocolErrorKind","kind":"TypeAliasDeclaration","signature":"export type ProtocolErrorKind = \"comparator-mismatch\" | \"epoch-mismatch\" | \"schema-mismatch\" | \"gap\";","description":"","source":"packages/remote/src/protocol.ts","line":200,"href":"/reference/typescript/remote/#symbol-ProtocolErrorKind"},{"name":"Publisher","originalName":"Publisher","kind":"ClassDeclaration","signature":"/** Sender side: stamps batches with the subscription `epoch` + `schemaFp` and drives the\n *  gap-free seq. The hydrate snapshot is seq 0; increments are seq 1, 2, …. An empty\n *  transaction emits no batch and consumes no seq (so a gap always means a lost batch). */\nexport declare class Publisher {\n    readonly epoch: number;\n    readonly schema: WireSchema;\n    readonly schemaFp: string;\n    private nextSeq;\n    constructor(epoch: number, schema: WireSchema);\n    hello(): Hello;\n    /** The hydrate snapshot (seq 0). Always emitted, even when empty, so the receiver learns it. */\n    snapshot(events: FlatChange[]): Batch;\n    /** One transaction's events — `null` for an empty transaction (no batch, no seq consumed). */\n    commit(events: FlatChange[]): Batch | null;\n    private emit;\n}","description":"Sender side: stamps batches with the subscription `epoch` + `schemaFp` and drives the\ngap-free seq. The hydrate snapshot is seq 0; increments are seq 1, 2, …. An empty\ntransaction emits no batch and consumes no seq (so a gap always means a lost batch).","source":"packages/remote/src/protocol.ts","line":166,"href":"/reference/typescript/remote/#symbol-Publisher"},{"name":"PushOutcome","originalName":"PushOutcome","kind":"InterfaceDeclaration","signature":"/** One envelope's outcome from the API server's mutate endpoint. */\nexport interface PushOutcome {\n    accepted: boolean;\n    reason?: string;\n}","description":"One envelope's outcome from the API server's mutate endpoint.","source":"packages/remote/src/mutation-queue.ts","line":19,"href":"/reference/typescript/remote/#symbol-PushOutcome"},{"name":"queries","originalName":"queries","kind":"FunctionDeclaration","signature":"/** A typed query entry over a schema: `queries(schema).issue.where.closed(false)…`. */\nexport declare function queries<S extends ColsMap>(schema: Schema<S>, onMaterialize?: (query: AnyQuery) => unknown, opts?: QueriesOptions): QueryRoot<S>;","description":"A typed query entry over a schema: `queries(schema).issue.where.closed(false)…`.","source":"packages/client/src/query.ts","line":1297,"href":"/reference/typescript/remote/#symbol-queries"},{"name":"QueriesOptions","originalName":"QueriesOptions","kind":"InterfaceDeclaration","signature":"/** Scoping for {@link queries} (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5). */\nexport interface QueriesOptions {\n    /** Include {@link TableMeta.local local-only} tables in the builder's root scope. The **local**\n     *  builder (`store.query`) sets this; the **server** builder ({@link newQueryBuilder}) does NOT,\n     *  so naming a local table in a remote/named query is a build error (Q1 / E3 client half). */\n    includeLocal?: boolean;\n}","description":"Scoping for {@link queries} (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5).","source":"packages/client/src/query.ts","line":1289,"href":"/reference/typescript/remote/#symbol-QueriesOptions"},{"name":"Query","originalName":"Query","kind":"TypeAliasDeclaration","signature":"export type Query<C extends AnyCols, Rels = {}, One extends boolean = false, Sel extends string = never, LocalRels = Rels, Agg = false> = Omit<QueryBase<C, Rels, One, Sel, LocalRels, Agg>, \"where\"> & {\n    where: QueryBase<C, Rels, One, Sel, LocalRels, Agg>[\"where\"] & WhereProxy<C, Rels, One, Sel, LocalRels>;\n} & WhereSugar<C, Rels, One, Sel, LocalRels>;","description":"","source":"packages/client/src/query.ts","line":296,"href":"/reference/typescript/remote/#symbol-Query"},{"name":"QueryArg","originalName":"QueryArg","kind":"TypeAliasDeclaration","signature":"/** What {@link IsoTx.query} accepts: a query handle whose `.ast()` lowers to the wire {@link Ast} —\n *  exactly what the typed query builder produces (`newQueryBuilder(schema).<table>…`, the tier-agnostic\n *  server-scope builder both tiers can construct because it performs no I/O). Structural so the seam\n *  need not carry the builder's heavy generics. */\nexport type QueryArg = {\n    ast(): Ast;\n};","description":"What {@link IsoTx.query} accepts: a query handle whose `.ast()` lowers to the wire {@link Ast} —\nexactly what the typed query builder produces (`newQueryBuilder(schema).<table>…`, the tier-agnostic\nserver-scope builder both tiers can construct because it performs no I/O). Structural so the seam\nneed not carry the builder's heavy generics.","source":"packages/client/src/mutation-ops.ts","line":84,"href":"/reference/typescript/remote/#symbol-QueryArg"},{"name":"QueryBuilder","originalName":"QueryBuilder","kind":"TypeAliasDeclaration","signature":"/**\n * Build a `Query` (an `Ast` constructor) from already-validated args, plus an optional CONTEXT — the\n * authenticated principal the query is scoped to. `Ctx` is **off-wire**: the client passes its own\n * session ctx at the callsite, the server injects the AUTHORITATIVE ctx ({@link NamedQuery.resolve}\n * via `registerQueries`), and the wire still carries only `name` + args. Both tiers run the same\n * `build`, so whenever their ctx agrees the AST is byte-identical — and a client can never spoof it,\n * since the server re-derives ctx from its trusted session and ignores anything the client claimed.\n *\n * The ctx is a *tuple* so a query opts into it by how it types `build`'s second parameter — and that\n * shape becomes the call signature verbatim:\n *   - `(args) => Q` — no ctx (`q(args)`).\n *   - `(args, ctx: C) => Q` — ctx REQUIRED (`q(args, ctx)`); for always-authenticated queries.\n *   - `(args, ctx?: C) => Q` — ctx OPTIONAL (`q(args)` or `q(args, ctx)`); sound only when \"no ctx\"\n *     is a real, SYMMETRIC state — i.e. the build yields the SAME broad AST whether ctx is absent or\n *     present-with-no-user (anonymous / SSR), since the server always forwards a ctx (possibly\n *     anonymous). Otherwise type ctx required so the type catches an omitted ctx.\n */\nexport type QueryBuilder<Args, Q extends AnyQuery, Ctx extends readonly unknown[] = [\n]> = (args: Args, ...ctx: Ctx) => Q;","description":"Build a `Query` (an `Ast` constructor) from already-validated args, plus an optional CONTEXT — the\nauthenticated principal the query is scoped to. `Ctx` is **off-wire**: the client passes its own\nsession ctx at the callsite, the server injects the AUTHORITATIVE ctx ({@link NamedQuery.resolve}\nvia `registerQueries`), and the wire still carries only `name` + args. Both tiers run the same\n`build`, so whenever their ctx agrees the AST is byte-identical — and a client can never spoof it,\nsince the server re-derives ctx from its trusted session and ignores anything the client claimed.\n\nThe ctx is a *tuple* so a query opts into it by how it types `build`'s second parameter — and that\nshape becomes the call signature verbatim:\n  - `(args) => Q` — no ctx (`q(args)`).\n  - `(args, ctx: C) => Q` — ctx REQUIRED (`q(args, ctx)`); for always-authenticated queries.\n  - `(args, ctx?: C) => Q` — ctx OPTIONAL (`q(args)` or `q(args, ctx)`); sound only when \"no ctx\"\n    is a real, SYMMETRIC state — i.e. the build yields the SAME broad AST whether ctx is absent or\n    present-with-no-user (anonymous / SSR), since the server always forwards a ctx (possibly\n    anonymous). Otherwise type ctx required so the type catches an omitted ctx.","source":"packages/client/src/query.ts","line":358,"href":"/reference/typescript/remote/#symbol-QueryBuilder"},{"name":"QueryEffect","originalName":"QueryEffect","kind":"TypeAliasDeclaration","signature":"/** A full-shape read a generator mutator yields — a `where`/`orderBy`/`limit`/join query over the\n *  state this mutator is mutating (read-your-writes, like {@link ReadEffect} but an arbitrary shape).\n *  Evaluates to {@link QueryResultRow}`[]` — ALWAYS an array of the matching rows, in the query's\n *  order, on BOTH tiers (a root `.one()` is not unwrapped here: take `[0]`). The single next-type is\n *  a row, so cast the yield (`(yield tx.query(q)) as unknown as QueryResultRow[]`), same as `all`. */\nexport type QueryEffect = {\n    kind: \"query\";\n    query: QueryArg;\n};","description":"A full-shape read a generator mutator yields — a `where`/`orderBy`/`limit`/join query over the\nstate this mutator is mutating (read-your-writes, like {@link ReadEffect} but an arbitrary shape).\nEvaluates to {@link QueryResultRow}`[]` — ALWAYS an array of the matching rows, in the query's\norder, on BOTH tiers (a root `.one()` is not unwrapped here: take `[0]`). The single next-type is\na row, so cast the yield (`(yield tx.query(q)) as unknown as QueryResultRow[]`), same as `all`.","source":"packages/client/src/mutation-ops.ts","line":91,"href":"/reference/typescript/remote/#symbol-QueryEffect"},{"name":"QueryEnsureCache","originalName":"QueryEnsureCache","kind":"ClassDeclaration","signature":"/**\n * Deduplicates route/intent preloads and holds their live view through the navigation handoff.\n *\n * The cache materializes the real named query rather than retaining sync coverage alone: that is\n * what makes `until: \"present\"` observable for overlapping queries already satisfied by local\n * normalized rows. Once the server marks the query complete, the entry is kept briefly for a\n * destination component to take its own retain, then released automatically.\n */\nexport declare class QueryEnsureCache<S extends ColsMap> implements QueryEnsurer {\n    private readonly store;\n    private readonly releaseDelayMs;\n    private readonly maxEntries;\n    private readonly entries;\n    private closed;\n    constructor(store: Store<S>, options?: QueryEnsureCacheOptions);\n    /**\n     * Ensure a named query is retained, resolving according to `options.until`.\n     *\n     * Concurrent calls for the same `(name, args, AST)` share one materialized view and one remote\n     * subscription. A `present` call can resolve from local rows while a concurrent `complete` call\n     * continues waiting for server authority.\n     */\n    ensure<Q extends AnyQuery>(query: Q, options?: EnsureQueryOptions): Promise<void>;\n    /** Release every retained preload and reject outstanding waits. Idempotent. */\n    close(): void;\n    /** Number of retained query entries (primarily useful for tests/devtools). */\n    size(): number;\n    private createEntry;\n    private inspect;\n    private isReady;\n    private touch;\n    private scheduleRelease;\n    private trim;\n    private dispose;\n    private queryError;\n    private detachAbort;\n}","description":"Deduplicates route/intent preloads and holds their live view through the navigation handoff.\n\nThe cache materializes the real named query rather than retaining sync coverage alone: that is\nwhat makes `until: \"present\"` observable for overlapping queries already satisfied by local\nnormalized rows. Once the server marks the query complete, the entry is kept briefly for a\ndestination component to take its own retain, then released automatically.","source":"packages/client/src/ensure.ts","line":76,"href":"/reference/typescript/remote/#symbol-QueryEnsureCache"},{"name":"QueryEnsureCacheOptions","originalName":"QueryEnsureCacheOptions","kind":"InterfaceDeclaration","signature":"export interface QueryEnsureCacheOptions {\n    /** Keep a completed preload alive for this long so the destination can adopt its rows. */\n    releaseDelayMs?: number;\n    /** Bound retained preloads. In-flight waits are never evicted. */\n    maxEntries?: number;\n}","description":"","source":"packages/client/src/ensure.ts","line":29,"href":"/reference/typescript/remote/#symbol-QueryEnsureCacheOptions"},{"name":"QueryEnsurer","originalName":"QueryEnsurer","kind":"InterfaceDeclaration","signature":"/** The structural surface consumed by framework adapters such as `@rindle/tanstack`. */\nexport interface QueryEnsurer {\n    ensure(query: AnyQuery, options?: EnsureQueryOptions): Promise<void>;\n}","description":"The structural surface consumed by framework adapters such as `@rindle/tanstack`.","source":"packages/client/src/ensure.ts","line":37,"href":"/reference/typescript/remote/#symbol-QueryEnsurer"},{"name":"queryFromAst","originalName":"queryFromAst","kind":"FunctionDeclaration","signature":"export declare function queryFromAst(ast: Ast): AnyQuery;","description":"","source":"packages/client/src/query.ts","line":694,"href":"/reference/typescript/remote/#symbol-queryFromAst"},{"name":"QueryId","originalName":"QueryId","kind":"TypeAliasDeclaration","signature":"export type QueryId = number;","description":"","source":"packages/client/src/types.ts","line":128,"href":"/reference/typescript/remote/#symbol-QueryId"},{"name":"QueryInspect","originalName":"QueryInspect","kind":"InterfaceDeclaration","signature":"/** One live materialized view's read-only summary for a devtools pane (DEBUG-TOOLS-BROWSER-DESIGN\n *  §4.2 — \"surface, not instrument\"). All fields are already held by the {@link Store}; this is the\n *  single read-only accessor over the otherwise-private `views`/`asts` maps. */\nexport interface QueryInspect {\n    /** The Store-assigned query id (also the backend's qid — the Store passes it straight through). */\n    qid: QueryId;\n    /** The query's AST (`Store.asts`), for the inspector's pretty-print / table-derivation. */\n    ast: Ast;\n    /** The view's SERVER-CHANNEL state (`unknown` while loading, `complete` once authoritative). */\n    resultType: ResultType;\n    /** Current materialized row count (`view.data.length`). */\n    rowCount: number;\n    /** A capped peek at the projected rows (reference-stable objects off the live view). */\n    sample: readonly unknown[];\n}","description":"One live materialized view's read-only summary for a devtools pane (DEBUG-TOOLS-BROWSER-DESIGN\n§4.2 — \"surface, not instrument\"). All fields are already held by the {@link Store}; this is the\nsingle read-only accessor over the otherwise-private `views`/`asts` maps.","source":"packages/client/src/store.ts","line":74,"href":"/reference/typescript/remote/#symbol-QueryInspect"},{"name":"QueryLocalData","originalName":"QueryLocalData","kind":"TypeAliasDeclaration","signature":"export type QueryLocalData<Q extends AnyQuery> = Q extends Query<infer C, any, infer One, infer Sel, infer LocalRels, infer Agg> ? [\n    Agg\n] extends [\n    false\n] ? One extends true ? (Projected<C, Sel> & LocalRels) | null : readonly (Projected<C, Sel> & LocalRels)[] : readonly Agg[] : never;","description":"","source":"packages/client/src/query.ts","line":310,"href":"/reference/typescript/remote/#symbol-QueryLocalData"},{"name":"QueryResultRow","originalName":"QueryResultRow","kind":"TypeAliasDeclaration","signature":"/** A row returned by a {@link QueryEffect}: column name → cell, plus each materialized relationship\n *  name → its nested row(s) — an array (a plural relationship) or a single row / `null` (a `.one()`\n *  relationship). Recursive. Presented identically on both tiers (a `view.data` row of the same\n *  query). */\nexport type QueryResultRow = {\n    [key: string]: WireValue | QueryResultRow | QueryResultRow[];\n};","description":"A row returned by a {@link QueryEffect}: column name → cell, plus each materialized relationship\nname → its nested row(s) — an array (a plural relationship) or a single row / `null` (a `.one()`\nrelationship). Recursive. Presented identically on both tiers (a `view.data` row of the same\nquery).","source":"packages/client/src/mutation-ops.ts","line":78,"href":"/reference/typescript/remote/#symbol-QueryResultRow"},{"name":"QueryRoot","originalName":"QueryRoot","kind":"TypeAliasDeclaration","signature":"export type QueryRoot<S extends ColsMap> = {\n    [N in keyof S]: Query<S[N]>;\n};","description":"","source":"packages/client/src/query.ts","line":1286,"href":"/reference/typescript/remote/#symbol-QueryRoot"},{"name":"QueryValidator","originalName":"QueryValidator","kind":"TypeAliasDeclaration","signature":"/** Turn raw, UNTRUSTED wire args into the canonical, typed args a query is built from. Its return\n *  type IS the query's args type — written once, it flows to both the client call signature and the\n *  `build` step, so there's no second place to restate the shape. */\nexport type QueryValidator<Args> = (rawArgs: unknown) => Args;","description":"Turn raw, UNTRUSTED wire args into the canonical, typed args a query is built from. Its return\ntype IS the query's args type — written once, it flows to both the client call signature and the\n`build` step, so there's no second place to restate the shape.","source":"packages/client/src/query.ts","line":340,"href":"/reference/typescript/remote/#symbol-QueryValidator"},{"name":"QueuedMutationSenderOptions","originalName":"QueuedMutationSenderOptions","kind":"InterfaceDeclaration","signature":"export interface QueuedMutationSenderOptions {\n    /** Deliver one in-order batch; resolve once the daemon durably processed it (i.e. the\n     *  API server awaited its daemon call before responding). Throw to have the SAME batch\n     *  retried. Return per-envelope outcomes, or void when everything was accepted. */\n    send: (envelopes: MutationEnvelope[]) => Promise<PushOutcome[] | void>;\n    /** A policy rejection for one envelope (never retried; the prediction snaps back via the\n     *  lmid release — this callback is where the reason reaches the app). */\n    onRejected?: (envelope: MutationEnvelope, reason: string) => void;\n    /** A failed flush attempt, before its retry. The ONLY surface for a transport/authority\n     *  failure: `send` throwing is otherwise absorbed by the retry loop, so a queue built without\n     *  this hook fails perfectly silently while head-of-line blocking every later mutation. */\n    onError?: (err: unknown, attempt: number) => void;\n    /** Backoff before retry `attempt` (1-based). Default: 200ms · 2^(attempt-1), capped at 5s. */\n    retryDelayMs?: (attempt: number) => number;\n    /** Max envelopes per flush. Default 32. */\n    maxBatch?: number;\n}","description":"","source":"packages/remote/src/mutation-queue.ts","line":24,"href":"/reference/typescript/remote/#symbol-QueuedMutationSenderOptions"},{"name":"RawMutationSender","originalName":"RawMutationSender","kind":"TypeAliasDeclaration","signature":"export type RawMutationSender = (mutations: Mutation[]) => void | PromiseLike<void>;","description":"","source":"packages/remote/src/subscribe.ts","line":22,"href":"/reference/typescript/remote/#symbol-RawMutationSender"},{"name":"ReadEffect","originalName":"ReadEffect","kind":"TypeAliasDeclaration","signature":"/** A point read a generator mutator yields; the driver resolves it and feeds the row back through\n *  `gen.next(row)`. Read-your-writes on every tier: the client reads its local engine, and both\n *  server backends read the open transaction (the daemon via an interactive mutation session). */\nexport type ReadEffect = {\n    kind: \"row\";\n    table: string;\n    pk: KeyedRow;\n};","description":"A point read a generator mutator yields; the driver resolves it and feeds the row back through\n`gen.next(row)`. Read-your-writes on every tier: the client reads its local engine, and both\nserver backends read the open transaction (the daemon via an interactive mutation session).","source":"packages/client/src/mutation-ops.ts","line":65,"href":"/reference/typescript/remote/#symbol-ReadEffect"},{"name":"RealtimeQueryLabel","originalName":"RealtimeQueryLabel","kind":"InterfaceDeclaration","signature":"/**\n * The realtime LABEL a named query may declare (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §2.1):\n * which api-server room PROFILE the query wants to be served from, and how the query's args map\n * to that profile's key args. This is the DECLARATION only — the serve decision (covering proof,\n * lease routing) is the server's, and the final room key is minted server-side by the profile's\n * own `key` under authoritative ctx, so a label can never place a query in a room the server\n * didn't derive itself. Both tiers import the SAME `defineQuery` value, so they always agree\n * *which profile* a query belongs to.\n */\nexport interface RealtimeQueryLabel<Args = any> {\n    /** The room profile name — must match a `realtime.rooms` key on the api-server (validated\n     *  loudly at `createRindleApiServer` construction). May not contain `/` (the wire room-key\n     *  delimiter). */\n    readonly room: string;\n    /** Map the query's VALIDATED args to the profile's key args (what the server feeds the\n     *  profile's `key(args)`). Identity when omitted. Must be pure — both tiers may run it. */\n    readonly args?: (queryArgs: Args) => unknown;\n}","description":"The realtime LABEL a named query may declare (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §2.1):\nwhich api-server room PROFILE the query wants to be served from, and how the query's args map\nto that profile's key args. This is the DECLARATION only — the serve decision (covering proof,\nlease routing) is the server's, and the final room key is minted server-side by the profile's\nown `key` under authoritative ctx, so a label can never place a query in a room the server\ndidn't derive itself. Both tiers import the SAME `defineQuery` value, so they always agree\n*which profile* a query belongs to.","source":"packages/client/src/query.ts","line":372,"href":"/reference/typescript/remote/#symbol-RealtimeQueryLabel"},{"name":"RefinableTable","originalName":"RefinableTable","kind":"TypeAliasDeclaration","signature":"/** A table def acceptable to {@link refineSchema} over `Schema<S>`: its NAME must be one of `S`'s\n *  tables (a def for an unknown table is a compile error at the call site). */\nexport type RefinableTable<S extends ColsMap> = {\n    readonly [SCHEMA]: TableMeta<Extract<keyof S, string>, AnyCols>;\n};","description":"A table def acceptable to {@link refineSchema} over `Schema<S>`: its NAME must be one of `S`'s\ntables (a def for an unknown table is a compile error at the call site).","source":"packages/client/src/schema.ts","line":340,"href":"/reference/typescript/remote/#symbol-RefinableTable"},{"name":"RefinedCols","originalName":"RefinedCols","kind":"TypeAliasDeclaration","signature":"/** `C` with the columns named in `R` re-typed to their refined `Col`s. */\nexport type RefinedCols<C extends AnyCols, R extends ColRefinements<C>> = {\n    [K in keyof C]: K extends keyof R ? (R[K] extends Col<unknown> ? R[K] : C[K]) : C[K];\n};","description":"`C` with the columns named in `R` re-typed to their refined `Col`s.","source":"packages/client/src/schema.ts","line":308,"href":"/reference/typescript/remote/#symbol-RefinedCols"},{"name":"RefinedColsMap","originalName":"RefinedColsMap","kind":"TypeAliasDeclaration","signature":"/** `S` with each table named in `T` re-typed to that def's (refined) columns. (The inner\n *  `extends AnyCols` guard is how the checker proves the remapped `SchemaOf<T>[K]` is a column\n *  map while `T` is still generic; it always holds for a concrete `T`.) */\nexport type RefinedColsMap<S extends ColsMap, T extends readonly AnyTable[]> = {\n    [K in keyof S]: K extends keyof SchemaOf<T> ? (SchemaOf<T>[K] extends AnyCols ? SchemaOf<T>[K] : S[K]) : S[K];\n};","description":"`S` with each table named in `T` re-typed to that def's (refined) columns. (The inner\n`extends AnyCols` guard is how the checker proves the remapped `SchemaOf<T>[K]` is a column\nmap while `T` is still generic; it always holds for a concrete `T`.)","source":"packages/client/src/schema.ts","line":347,"href":"/reference/typescript/remote/#symbol-RefinedColsMap"},{"name":"refineSchema","originalName":"refineSchema","kind":"FunctionDeclaration","signature":"/** Swap {@link refineTable}-narrowed table defs into a generated schema, re-typing those tables for\n *  everything downstream of the schema (`newQueryBuilder`/`queries` roots, store row types).\n *\n *  Runtime-validated identity: each def must name a table already in the schema and match its\n *  runtime shape exactly (same columns, kinds, primary key, and locality) — refinement narrows TS\n *  types, never what's on the wire. Composes with {@link extendSchema} in either order. */\nexport declare function refineSchema<S extends ColsMap, P extends Record<string, string>, const T extends readonly RefinableTable<S>[]>(base: Schema<S, P>, opts: {\n    tables: T;\n}): Schema<RefinedColsMap<S, T>, P>;","description":"Swap {@link refineTable}-narrowed table defs into a generated schema, re-typing those tables for\neverything downstream of the schema (`newQueryBuilder`/`queries` roots, store row types).\n\nRuntime-validated identity: each def must name a table already in the schema and match its\nruntime shape exactly (same columns, kinds, primary key, and locality) — refinement narrows TS\ntypes, never what's on the wire. Composes with {@link extendSchema} in either order.","source":"packages/client/src/schema.ts","line":357,"href":"/reference/typescript/remote/#symbol-refineSchema"},{"name":"refineTable","originalName":"refineTable","kind":"FunctionDeclaration","signature":"/** Narrow a generated table's column TYPES without touching its runtime shape.\n *\n *  Returns the SAME def, re-typed (identity, after validating that every refined column exists and\n *  keeps its kind) — so conditions built from it, `rel(...)`s anchored on it, and `Row<typeof t>`\n *  all see the narrowed types. Pass the result to {@link refineSchema} so query roots narrow too. */\nexport declare function refineTable<N extends string, C extends AnyCols, R extends ColRefinements<C>>(base: TableDef<N, C>, cols: R): TableDef<N, RefinedCols<C, R>>;","description":"Narrow a generated table's column TYPES without touching its runtime shape.\n\nReturns the SAME def, re-typed (identity, after validating that every refined column exists and\nkeeps its kind) — so conditions built from it, `rel(...)`s anchored on it, and `Row<typeof t>`\nall see the narrowed types. Pass the result to {@link refineSchema} so query roots narrow too.","source":"packages/client/src/schema.ts","line":317,"href":"/reference/typescript/remote/#symbol-refineTable"},{"name":"rel","originalName":"rel","kind":"FunctionDeclaration","signature":"/**\n * Declare a relationship once: `rel(issue, user, { ownerId: \"id\" })` means `issue.ownerId → user.id`.\n * `mapping` is `{ [parentColumn]: childColumn }` (a composite join is multiple entries). The `parent`\n * table is used only to type-check the keys; pass the result to `sub`/`countAs`/`exists`.\n */\nexport declare function rel<PC extends AnyCols, CC extends AnyCols>(_parent: TableLike<PC>, child: TableLike<CC>, mapping: Partial<Record<keyof PC & string, keyof CC & string>>): Relationship<PC, CC>;","description":"Declare a relationship once: `rel(issue, user, { ownerId: \"id\" })` means `issue.ownerId → user.id`.\n`mapping` is `{ [parentColumn]: childColumn }` (a composite join is multiple entries). The `parent`\ntable is used only to type-check the keys; pass the result to `sub`/`countAs`/`exists`.","source":"packages/client/src/schema.ts","line":476,"href":"/reference/typescript/remote/#symbol-rel"},{"name":"Relationship","originalName":"Relationship","kind":"InterfaceDeclaration","signature":"/**\n * A reusable, typed JOIN between two tables — the correlation declared once (design §4). Built with\n * {@link rel}; parameterized by the parent columns `PC` (so a `sub` checks the relationship belongs to\n * the query's table) and the child columns `CC` (which flow into the nested result type). Pass it to\n * `sub`/`countAs`/`exists` in place of an explicit `child` + `{ parent, child }` correlation.\n */\nexport interface Relationship<PC extends AnyCols, CC extends AnyCols> {\n    /** The child table the relationship points at. */\n    readonly child: TableLike<CC>;\n    /** Correlation keys: `parent[i]` (a parent column) joins to `child[i]` (a child column). */\n    readonly correlation: {\n        readonly parent: readonly string[];\n        readonly child: readonly string[];\n    };\n    /** Phantom binding the parent columns so `Query<C>.sub(alias, rel)` rejects a rel for another table. */\n    readonly __parent?: PC;\n    readonly [RELATIONSHIP_BRAND]: true;\n}","description":"A reusable, typed JOIN between two tables — the correlation declared once (design §4). Built with\n{@link rel}; parameterized by the parent columns `PC` (so a `sub` checks the relationship belongs to\nthe query's table) and the child columns `CC` (which flow into the nested result type). Pass it to\n`sub`/`countAs`/`exists` in place of an explicit `child` + `{ parent, child }` correlation.","source":"packages/client/src/schema.ts","line":458,"href":"/reference/typescript/remote/#symbol-Relationship"},{"name":"RemoteBackend","originalName":"RemoteBackend","kind":"ClassDeclaration","signature":"export declare class RemoteBackend implements Backend {\n    private readonly transport;\n    private readonly resolveSubscribe;\n    private readonly sendMutation?;\n    private handler;\n    private readonly devObservers;\n    private readonly subs;\n    constructor(transport: Transport, opts?: RemoteBackendOptions);\n    registerQuery(qid: QueryId, _ast: unknown, remote?: RemoteQuery): void;\n    unregisterQuery(qid: QueryId): void;\n    /** Eventually-consistent: the mutation is sent; the resulting batches arrive async on the\n     *  stream. The promise resolves once sent (the §2.3 write asymmetry, named not leaked). */\n    mutate(mutations: Mutation[]): Promise<void>;\n    onEvent(handler: (qid: QueryId, ev: ChangeEvent) => void): void;\n    __attachDevtoolsServerDeltas(observer: BackendDevObserver): () => void;\n    private subscribe;\n    private onServerMsg;\n    /** Route a `queryError` by its 101 §5 classification: retryable ⇒ keep the QState (and the\n     *  rows already folded downstream — 101 §6) and re-subscribe after a jittered backoff\n     *  honoring `retryAfterMs`; terminal (or pre-classification servers) ⇒ drop the\n     *  subscription, exactly as before (FOLLOWER-LAG-SHED §6.3). */\n    private onQueryError;\n    private openSubscriber;\n    private applyBatch;\n    private emitServerEvent;\n}","description":"","source":"packages/remote/src/backend.ts","line":48,"href":"/reference/typescript/remote/#symbol-RemoteBackend"},{"name":"RemoteBackendOptions","originalName":"RemoteBackendOptions","kind":"InterfaceDeclaration","signature":"export interface RemoteBackendOptions {\n    /** Resolve the upstream subscribe target. Defaults to embedded-server `{name,args}`. */\n    resolveSubscribe?: SubscribeResolver;\n    /** Override raw authoritative writes, e.g. POST them to an app API server. */\n    sendMutation?: RawMutationSender;\n}","description":"","source":"packages/remote/src/backend.ts","line":41,"href":"/reference/typescript/remote/#symbol-RemoteBackendOptions"},{"name":"RemoteNormalizedSource","originalName":"RemoteNormalizedSource","kind":"ClassDeclaration","signature":"export declare class RemoteNormalizedSource implements NormalizedSource {\n    private readonly transport;\n    private readonly resolveSubscribe;\n    private readonly sendMutation?;\n    private handler;\n    private readonly subs;\n    /** The client's own typed per-table schemas, for hello validation (CRIT#4); set by the backend. */\n    private clientTables;\n    constructor(transport: Transport, opts?: RemoteNormalizedSourceOptions);\n    expectClientSchema(tables: NormalizedTableSchema[]): void;\n    registerQuery(qid: QueryId, remote: RemoteQuery): void;\n    unregisterQuery(qid: QueryId): void;\n    mutate(mutations: Mutation[]): Promise<void>;\n    onNormalized(handler: (qid: QueryId, ev: NormalizedEvent) => void): void;\n    private subscribe;\n    private onServerMsg;\n    /** Route a `queryError` by its 101 §5 classification: retryable ⇒ keep the QState (and the\n     *  rows already folded downstream — 101 §6) and re-subscribe after a jittered backoff\n     *  honoring `retryAfterMs`; terminal (or pre-classification servers) ⇒ drop the\n     *  subscription, exactly as before (FOLLOWER-LAG-SHED §6.3). */\n    private onQueryError;\n    private openSubscriber;\n    private applyBatch;\n}","description":"","source":"packages/remote/src/remote-source.ts","line":58,"href":"/reference/typescript/remote/#symbol-RemoteNormalizedSource"},{"name":"RemoteNormalizedSourceOptions","originalName":"RemoteNormalizedSourceOptions","kind":"InterfaceDeclaration","signature":"export interface RemoteNormalizedSourceOptions {\n    /** Resolve the upstream subscribe target. Defaults to embedded-server `{name,args}`. */\n    resolveSubscribe?: SubscribeResolver;\n    /** Override raw authoritative writes, e.g. POST them to an app API server. */\n    sendMutation?: RawMutationSender;\n}","description":"","source":"packages/remote/src/remote-source.ts","line":51,"href":"/reference/typescript/remote/#symbol-RemoteNormalizedSourceOptions"},{"name":"RemoteOptimisticConnection","originalName":"RemoteOptimisticConnection","kind":"TypeAliasDeclaration","signature":"/** How the source obtains its transport:\n *  - a pre-built {@link Transport} (or `{ transport }`) — FIXED: no endpoint migration, `wsEndpoint`\n *    on leases is ignored (in-process / tests / a single static daemon);\n *  - `{ factory, endpoint? }` — REPLACEABLE: transports are built on demand. An initial `endpoint`\n *    (a static `wsUrl` or an SSR-injected bootstrap) opens eagerly; otherwise the first lease's\n *    `wsEndpoint` opens it lazily, and a later lease naming a DIFFERENT endpoint migrates the whole\n *    session there. */\nexport type RemoteOptimisticConnection = Transport | {\n    transport: Transport;\n} | {\n    factory: TransportFactory;\n    endpoint?: string;\n};","description":"How the source obtains its transport:\n- a pre-built {@link Transport} (or `{ transport }`) — FIXED: no endpoint migration, `wsEndpoint`\n  on leases is ignored (in-process / tests / a single static daemon);\n- `{ factory, endpoint? }` — REPLACEABLE: transports are built on demand. An initial `endpoint`\n  (a static `wsUrl` or an SSR-injected bootstrap) opens eagerly; otherwise the first lease's\n  `wsEndpoint` opens it lazily, and a later lease naming a DIFFERENT endpoint migrates the whole\n  session there.","source":"packages/remote/src/optimistic-source.ts","line":77,"href":"/reference/typescript/remote/#symbol-RemoteOptimisticConnection"},{"name":"RemoteOptimisticSource","originalName":"RemoteOptimisticSource","kind":"ClassDeclaration","signature":"export declare class RemoteOptimisticSource implements OptimisticSource {\n    /** The CURRENT transport (undefined in pure-lazy mode until the first lease opens one). */\n    private transport;\n    /** The ws endpoint the current transport points at (undefined for a fixed transport). */\n    private currentEndpoint;\n    /** Builds a transport for an endpoint; undefined ⇒ fixed transport (no migration). */\n    private readonly transportFactory;\n    private readonly clientID;\n    private readonly resolveSubscribe;\n    private readonly pushMutationSender?;\n    /** Resolve the current affinity ticket store. A thunk lets the one-call client turn affinity on\n     *  after its first pure-lazy lease returns a placement ticket, before it opens the socket. */\n    private readonly affinityStore;\n    private handler;\n    private progressHandler;\n    private restartHandler;\n    private outcomeHandler;\n    private resyncHandler;\n    /** Set by {@link resync} when this is a LEASE-AUTH session (some sub presented a `leaseToken`):\n     *  transport pushes queue in {@link pendingPushes} until the first authenticated re-subscribe's\n     *  hello re-establishes the socket's subject, then flush (see QState.authed). Never set on a\n     *  token-less (embedded/rindled) session — its pushes need no subject and go straight out. */\n    private awaitingAuthedHello;\n    /** Envelopes held while {@link awaitingAuthedHello} (H-v §7.5 rule 3). Every entry corresponds\n     *  to a still-pending backend mutation (the re-send reconstructs from pending entries; app\n     *  invokes in the window are pending by definition), so a superseding resync may CLEAR this —\n     *  its own re-send regenerates whatever still matters. */\n    private pendingPushes;\n    private readonly subs;\n    /** Queries whose subscribe is waiting for a transport to exist — endpoint-less subscribes issued\n     *  in pure-lazy mode before any lease opens a transport (the lmid system query is registered by\n     *  the backend at construction). Flushed when a transport comes up. */\n    private readonly deferred;\n    /** One warning per source when an APP lease resolves without a `wsEndpoint` in pure-lazy mode —\n     *  nothing will ever open the transport, which is otherwise silent (views just stay empty). */\n    private warnedEndpointlessLease;\n    /** The daemon's boot id (from each `nhello`); a change means it restarted. */\n    private lastBootId;\n    /** The client's own typed per-table schemas, for hello validation (CRIT#4); set by the backend. */\n    private clientTables;\n    /** Once true (set by {@link close}), in-flight lease resolutions are inert — they must not open a\n     *  new transport or send after teardown. */\n    private closed;\n    /** True once any lease has carried a routed `wsEndpoint`. Gates onDown re-leasing so a single\n     *  UNROUTED daemon keeps its pre-router behavior (recover via reconnect→resync only), not an extra\n     *  lease POST during an outage. */\n    private sawRoutedEndpoint;\n    /** Bumped at the start of every re-subscribe-all pass. A migrate triggered mid-pass starts a new\n     *  pass (higher generation); the outer pass then aborts instead of re-subscribing queries twice. */\n    private resubscribeGen;\n    constructor(connection: RemoteOptimisticConnection, clientID: string, opts?: RemoteOptimisticSourceOptions);\n    /** Wire a transport's handlers (no `init`). */\n    private attach;\n    /** Make `transport` the current one, announce identity, and (re)subscribe anything deferred. */\n    private bringUp;\n    /** Build + bring up a fresh transport to `endpoint` (replaceable mode only). */\n    private openEndpoint;\n    /** Migrate the whole session to a new follower (§2.3): build the new transport, tear the old one\n     *  down, and re-subscribe EVERY active query there (re-leasing — the old tokens are\n     *  follower-local and invalid on the new node). */\n    private migrate;\n    /** Re-subscribe every live query on the current transport (each re-resolves its lease). A\n     *  re-subscribe can synchronously trigger a `migrate` (lease names a new endpoint), whose own\n     *  re-subscribe pass supersedes this one — the generation check then aborts this pass so a query\n     *  is never re-subscribed (and re-leased) twice. */\n    private resubscribeAll;\n    /** Flush subscribes deferred until a transport existed (e.g. the lmid query in pure-lazy mode). */\n    private flushDeferred;\n    /** The current follower's ws is sustainedly down — re-lease every query. The router returns a\n     *  (possibly new) `wsEndpoint`: a changed one migrates the session; an unchanged one re-subscribes\n     *  over the reconnecting transport (READ-ROUTER-DESIGN.md §3). No-op for an UNROUTED daemon (no\n     *  lease ever carried a `wsEndpoint`) — there is nowhere to move, so we keep the pre-router\n     *  behavior and let the transport's own reconnect→resync recover. */\n    private onDown;\n    /** Tear down the current transport and make any in-flight lease resolution inert (a late lease\n     *  must NOT open a new transport after the consumer closed the client). */\n    close(): void;\n    /** Register a handler fired when the DAEMON restarts (a new boot id) — the backend resets its\n     *  `cv` watermark so the new daemon's reset `cv` sequence is accepted instead of dropped. */\n    onRestart(handler: () => void): void;\n    expectClientSchema(tables: NormalizedTableSchema[]): void;\n    registerQuery(qid: QueryId, remote: RemoteQuery): void;\n    unregisterQuery(qid: QueryId): void;\n    pushMutation(envelope: MutationEnvelope): Promise<void>;\n    onNormalized(handler: (qid: QueryId, ev: NormalizedEvent) => void): void;\n    onProgress(handler: (frame: ProgressFrame) => void): void;\n    /** The room deopt handshake's verdict stream (H-v). Dispatched OUT-OF-BAND on arrival — see\n     *  {@link onServerMsg}'s `mutationOutcome` arm for why it must never wait behind the cv buffer. */\n    onMutationOutcome(handler: (frame: MutationOutcomeFrame) => void): void;\n    /** Fired once per re-established session, SYNCHRONOUSLY inside {@link resync} — before any\n     *  post-reconnect frame can release (the §7.5 rule-3 window: a replayed lmid snapshot must not\n     *  retire an entry whose outcome frame died with the old socket before the re-send captured\n     *  it). The backend re-sends the domain's unconfirmed pending envelopes with their original\n     *  mids; on a lease-auth session their DELIVERY is deferred until the first token hello\n     *  re-authenticates the socket ({@link pendingPushes}). */\n    onResync(handler: () => void): void;\n    private subscribe;\n    private onServerMsg;\n    /** On reconnect: re-announce identity, fire the `onResync` re-send, and re-subscribe every live\n     *  query (each re-resolves its lease, so a restarted daemon re-materializes + re-leases on the\n     *  transiently). The re-send fires HERE — synchronously, before any post-reconnect frame can be\n     *  processed — because the §7.5 rule-3 window closes fast: the re-subscribed lmid stream's\n     *  fresh snapshot may cover a mid whose outcome frame died with the OLD socket, and once the\n     *  release retires that entry as an apparent success there is nothing left to re-send (the\n     *  lost-deopt write would silently vanish). Firing now captures the in-flight set intact; on a\n     *  lease-auth session the envelopes themselves are HELD ({@link pendingPushes}) until the first\n     *  token re-subscribe's hello re-authenticates the socket, then flush in order — so the shell's\n     *  subject gate never refuses them, and its re-answer (a recorded outcome for any non-applied\n     *  mid) resolves even an already-retired entry via the handshake's not-found arm. */\n    private resync;\n    /** Track the daemon's boot id; a change (after the first) means it restarted — fire onRestart. */\n    private observeBootId;\n    /** Route a `queryError` by its 101 §5 classification: retryable ⇒ keep the QState (and the\n     *  rows already folded downstream — 101 §6) and re-subscribe after a jittered backoff\n     *  honoring `retryAfterMs`; terminal (or pre-classification servers) ⇒ drop the\n     *  subscription, exactly as before. Fixes the stranded-client gap: a worker fault's or a\n     *  shedding follower's error now heals end-to-end (FOLLOWER-LAG-SHED §6.3). */\n    private onQueryError;\n    private openSubscriber;\n    private applyBatch;\n}","description":"","source":"packages/remote/src/optimistic-source.ts","line":94,"href":"/reference/typescript/remote/#symbol-RemoteOptimisticSource"},{"name":"RemoteOptimisticSourceOptions","originalName":"RemoteOptimisticSourceOptions","kind":"InterfaceDeclaration","signature":"export interface RemoteOptimisticSourceOptions {\n    /** Resolve the upstream subscribe target. Defaults to embedded-server `{name,args}`. */\n    resolveSubscribe?: SubscribeResolver;\n    /** Override named-mutator delivery, e.g. POST envelopes to the app API server. */\n    pushMutation?: MutationEnvelopeSender;\n    /** Follower-affinity mode (FOLLOWER-AFFINITY-DESIGN.md §3): the shared ticket store. When set, the\n     *  source records the follower's minted ticket from the `{t:\"affinity\"}` frame and CLEARS it on a\n     *  sustained outage so the next (ticketless) reconnect anycasts to a live follower and re-pins\n     *  (§8). Absent ⇒ affinity off (today's behavior). */\n    affinity?: AffinityTicketStore | (() => AffinityTicketStore | undefined);\n}","description":"","source":"packages/remote/src/optimistic-source.ts","line":82,"href":"/reference/typescript/remote/#symbol-RemoteOptimisticSourceOptions"},{"name":"RemoteQuery","originalName":"RemoteQuery","kind":"InterfaceDeclaration","signature":"/** The network identity for a named query subscription. The local AST remains local; remote\n *  normalized/optimistic sources use only this `(name,args)` pair upstream. */\nexport interface RemoteQuery {\n    name: string;\n    args: unknown;\n}","description":"The network identity for a named query subscription. The local AST remains local; remote\nnormalized/optimistic sources use only this `(name,args)` pair upstream.","source":"packages/client/src/types.ts","line":159,"href":"/reference/typescript/remote/#symbol-RemoteQuery"},{"name":"RESERVED_TABLE_PREFIXES","originalName":"RESERVED_TABLE_PREFIXES","kind":"VariableDeclaration","signature":"/** Table-name prefixes reserved by the engine for SYNTHETIC tables — `__agg_<fnv>` aggregate\n *  bases (`AGGREGATE-SYNC-DESIGN.md` §3.3) and `_rindle_*` system tables (e.g. the lmid table).\n *  A user table (synced OR local) under one of these would shadow a synthetic source — and since\n *  `registerTable` is idempotent-on-name and base tables register before synthetics, the later\n *  synthetic registration would silently no-op and the agg join would read the user table as the\n *  count (silent corruption, `201-LOCAL-ONLY-TABLES-DESIGN.md` N1). The ban makes that\n *  structurally impossible — checked once, statically, at {@link createSchema}. */\nexport declare const RESERVED_TABLE_PREFIXES: readonly [\n    \"__agg_\",\n    \"_rindle_\"\n];","description":"Table-name prefixes reserved by the engine for SYNTHETIC tables — `__agg_<fnv>` aggregate\nbases (`AGGREGATE-SYNC-DESIGN.md` §3.3) and `_rindle_*` system tables (e.g. the lmid table).\nA user table (synced OR local) under one of these would shadow a synthetic source — and since\n`registerTable` is idempotent-on-name and base tables register before synthetics, the later\nsynthetic registration would silently no-op and the agg join would read the user table as the\ncount (silent corruption, `201-LOCAL-ONLY-TABLES-DESIGN.md` N1). The ban makes that\nstructurally impossible — checked once, statically, at {@link createSchema}.","source":"packages/client/src/schema.ts","line":220,"href":"/reference/typescript/remote/#symbol-RESERVED_TABLE_PREFIXES"},{"name":"resolveChange","originalName":"resolveChange","kind":"FunctionDeclaration","signature":"/** Lift one `FlatChange` into a {@link ResolvedChange} against the query's `WireSchema`, or `null`\n *  if its path doesn't resolve to a materialized level. */\nexport declare function resolveChange(schema: WireSchema, change: FlatChange): ResolvedChange | null;","description":"Lift one `FlatChange` into a {@link ResolvedChange} against the query's `WireSchema`, or `null`\nif its path doesn't resolve to a materialized level.","source":"packages/client/src/resolve.ts","line":84,"href":"/reference/typescript/remote/#symbol-resolveChange"},{"name":"ResolvedChange","originalName":"ResolvedChange","kind":"InterfaceDeclaration","signature":"/** One resolved change: a `FlatChange` lifted out of positional/indexed wire form into names,\n *  using the query's `WireSchema` (from `hello`) as the sole position→name source. */\nexport interface ResolvedChange {\n    /** Relationship-alias chain from the query root to the changed level (`[]` ⇒ the root rows). */\n    aliasChain: string[];\n    /** The alias of the changed level (`\"\"` ⇒ root), i.e. the last of `aliasChain`. */\n    alias: string;\n    op: \"add\" | \"remove\" | \"edit\";\n    /** The affected row, named. For `edit` this is the NEW row; see `old` for the prior one. */\n    row: NamedRow;\n    /** The prior row, named (present only for `edit`). */\n    old?: NamedRow;\n    /** The PARENT row (named), for a nested/aggregate change — e.g. the `ticket_type` whose `sold`\n     *  count moved. Taken from the path's last `parentRow`; absent for a root-level change. */\n    parent?: NamedRow;\n    /** Set when the changed level is a `countAs`/aggregate slot. The value is EXACT — read from the\n     *  slot's projected count column (`WireRel.project.col`). */\n    aggregate?: {\n        alias: string;\n        value: WireValue;\n        previous?: WireValue;\n    };\n    /** The raw node whose children a consumer can dig a named sub-row out of (via {@link subRow}). On\n     *  an `add` the engine always ships it; on a `remove` it is present only when the consumer opted\n     *  into the removed subtree (see the `op` mapping below). */\n    node?: WireNode;\n    /** The changed level's `WireSchema` — used by {@link subRow} to resolve a named sub of `node`. */\n    levelSchema: WireSchema;\n}","description":"One resolved change: a `FlatChange` lifted out of positional/indexed wire form into names,\nusing the query's `WireSchema` (from `hello`) as the sole position→name source.","source":"packages/client/src/resolve.ts","line":30,"href":"/reference/typescript/remote/#symbol-ResolvedChange"},{"name":"ResultType","originalName":"ResultType","kind":"TypeAliasDeclaration","signature":"/** A query's SERVER-CHANNEL state, surfaced on its {@link ArrayView} (FOLDED-MUTATIONS-DESIGN §7 —\n *  formerly conflated with pending-ness, OPTIMISTIC-WRITES-DESIGN.md §6):\n *   - `unknown`  — not hydrated: the server has not produced a first result for this query yet;\n *   - `complete` — the server has answered. STAYS `complete` while a local mutation is pending (the\n *                  prediction is the client's best current answer); reversion on rejection is an\n *                  event (`onRejected`), not a downgrade of completeness;\n *   - `error`    — RESERVED for a future server-side, query-level error signal\n *                  (see `designs/101-QUERY-ERRORS-DESIGN.md`); no longer produced by a pending mutation.\n *  \"Is a prediction pending here?\" is now a separate reactive axis (the backend's `pending(qid)` /\n *  `onPending`), not folded into this type. A backend with no server lifecycle (the in-process\n *  engine) leaves every view `complete`. */\nexport type ResultType = \"unknown\" | \"complete\" | \"error\";","description":"A query's SERVER-CHANNEL state, surfaced on its {@link ArrayView } (FOLDED-MUTATIONS-DESIGN §7 —\nformerly conflated with pending-ness, OPTIMISTIC-WRITES-DESIGN.md §6):\n - `unknown`  — not hydrated: the server has not produced a first result for this query yet;\n - `complete` — the server has answered. STAYS `complete` while a local mutation is pending (the\n                prediction is the client's best current answer); reversion on rejection is an\n                event (`onRejected`), not a downgrade of completeness;\n - `error`    — RESERVED for a future server-side, query-level error signal\n                (see `designs/101-QUERY-ERRORS-DESIGN.md`); no longer produced by a pending mutation.\n\"Is a prediction pending here?\" is now a separate reactive axis (the backend's `pending(qid)` /\n`onPending`), not folded into this type. A backend with no server lifecycle (the in-process\nengine) leaves every view `complete`.","source":"packages/client/src/types.ts","line":155,"href":"/reference/typescript/remote/#symbol-ResultType"},{"name":"Row","originalName":"Row","kind":"TypeAliasDeclaration","signature":"/** The row type of a table definition: `Row<typeof issue>` → `{ id: string; … }`. The\n *  whole-table ergonomic form of {@link RowOf}, so app code derives its row interfaces from\n *  the schema instead of hand-maintaining a parallel twin. */\nexport type Row<T extends AnyTable> = RowOf<T[typeof SCHEMA][\"columns\"]>;","description":"The row type of a table definition: `Row<typeof issue>` → `{ id: string; … }`. The\nwhole-table ergonomic form of {@link RowOf}, so app code derives its row interfaces from\nthe schema instead of hand-maintaining a parallel twin.","source":"packages/client/src/schema.ts","line":107,"href":"/reference/typescript/remote/#symbol-Row"},{"name":"RowOf","originalName":"RowOf","kind":"TypeAliasDeclaration","signature":"export type RowOf<C extends AnyCols> = {\n    [K in keyof C]: ColT<C[K]>;\n};","description":"","source":"packages/client/src/schema.ts","line":28,"href":"/reference/typescript/remote/#symbol-RowOf"},{"name":"rowsEqual","originalName":"rowsEqual","kind":"FunctionDeclaration","signature":"/** Elementwise equality over positional bare-cell rows — THE row comparator for every JS-side\n *  diff (views, aggregate heads, the persistence mirror), exported so no caller grows a drifted\n *  private copy. Per cell: `===` keeps `-0 === 0` (the engine's key semantics treat them equal);\n *  the `Object.is` arm makes a NaN cell equal itself (under `!==` alone, a NaN-bearing row never\n *  matches any copy of itself, so every diff re-emits it as a spurious edit forever). */\nexport declare function rowsEqual(a: WireValue[], b: WireValue[]): boolean;","description":"Elementwise equality over positional bare-cell rows — THE row comparator for every JS-side\ndiff (views, aggregate heads, the persistence mirror), exported so no caller grows a drifted\nprivate copy. Per cell: `===` keeps `-0 === 0` (the engine's key semantics treat them equal);\nthe `Object.is` arm makes a NaN cell equal itself (under `!==` alone, a NaN-bearing row never\nmatches any copy of itself, so every diff re-emits it as a spurious edit forever).","source":"packages/client/src/view.ts","line":196,"href":"/reference/typescript/remote/#symbol-rowsEqual"},{"name":"Schema","originalName":"Schema","kind":"InterfaceDeclaration","signature":"export interface Schema<S extends ColsMap = ColsMap, P extends Record<string, string> = PkMap<S>> {\n    readonly tables: Readonly<Record<string, TableMeta>>;\n    /** Phantom carrying name→columns for query-root inference (never read at runtime). */\n    readonly __cols: S;\n    /** Phantom carrying name→pk-column-union for the typed mutator tx (never read at runtime). */\n    readonly __pk: P;\n}","description":"","source":"packages/client/src/schema.ts","line":205,"href":"/reference/typescript/remote/#symbol-Schema"},{"name":"SCHEMA","originalName":"SCHEMA","kind":"VariableDeclaration","signature":"/** Metadata key on a {@link TableDef} (a `unique symbol`, so no column name collides). */\nexport declare const SCHEMA: unique symbol;","description":"Metadata key on a {@link TableDef} (a `unique symbol`, so no column name collides).","source":"packages/client/src/schema.ts","line":57,"href":"/reference/typescript/remote/#symbol-SCHEMA"},{"name":"schemaFp","originalName":"schemaFp","kind":"FunctionDeclaration","signature":"/** A `WireSchema`'s content fingerprint — FNV-1a 64 over the canonical, length-prefixed byte\n *  stream of `src/wire_schema.rs`, rendered as 16-char lowercase hex (=== Rust `SchemaFp`\n *  `Display`). A string (not a JS number) so the full 64 bits survive JSON without precision loss. */\nexport declare function schemaFp(ws: WireSchema): string;","description":"A `WireSchema`'s content fingerprint — FNV-1a 64 over the canonical, length-prefixed byte\nstream of `src/wire_schema.rs`, rendered as 16-char lowercase hex (=== Rust `SchemaFp`\n`Display`). A string (not a JS number) so the full 64 bits survive JSON without precision loss.","source":"packages/remote/src/protocol.ts","line":85,"href":"/reference/typescript/remote/#symbol-schemaFp"},{"name":"SchemaOf","originalName":"SchemaOf","kind":"TypeAliasDeclaration","signature":"/** name → columns, derived from the tables array (for typing `store.query.<table>`). */\nexport type SchemaOf<T extends readonly AnyTable[]> = {\n    [E in T[number] as E[typeof SCHEMA][\"name\"]]: E[typeof SCHEMA][\"columns\"];\n};","description":"name → columns, derived from the tables array (for typing `store.query.<table>`).","source":"packages/client/src/schema.ts","line":188,"href":"/reference/typescript/remote/#symbol-SchemaOf"},{"name":"ServerMsg","originalName":"ServerMsg","kind":"TypeAliasDeclaration","signature":"export type ServerMsg = {\n    t: \"hello\";\n    queryId: number;\n    hello: Hello;\n} | {\n    t: \"batch\";\n    queryId: number;\n    batch: Batch;\n} | {\n    t: \"nhello\";\n    queryId: number;\n    hello: NormalizedHello;\n    bootId?: string;\n} | {\n    t: \"nbatch\";\n    queryId: number;\n    batch: NormalizedBatch;\n} | {\n    t: \"queryError\";\n    queryId: number;\n    message: string;\n    code?: string;\n    retryable?: boolean;\n    retryAfterMs?: number;\n} | {\n    t: \"progress\";\n    frame: ProgressFrame;\n} | {\n    t: \"affinity\";\n    ticket: string;\n} | {\n    t: \"mutationOutcome\";\n    mid: number;\n    kind: \"deopt\" | \"rejected\";\n    reason?: string;\n    name?: string;\n    args?: unknown;\n} | {\n    t: \"error\";\n    queryId?: number;\n    message: string;\n};","description":"","source":"packages/remote/src/protocol.ts","line":130,"href":"/reference/typescript/remote/#symbol-ServerMsg"},{"name":"ServerStore","originalName":"ServerStore","kind":"ClassDeclaration","signature":"/**\n * The server-side Store wrapper (SSR-DESIGN.md §6.2). Wraps a {@link Store} over a\n * {@link OneShotBackend} and adds the loader-phase `preload` plus `dehydrate`. Pass `.store` to\n * the React `<Rindle>` provider for the synchronous render; return `.dehydrate()` from the loader.\n * Create one instance per request, with an authorized read function for that request's principal.\n * Its snapshots seed views; they do not persist synced rows in the browser database.\n */\nexport declare class ServerStore<S extends ColsMap> {\n    readonly store: Store<S>;\n    private readonly schema;\n    private readonly opts;\n    constructor(schema: Schema<S>, opts: ServerStoreOptions);\n    /** Run the one-shot read for `query` and seed its first-paint snapshot (SSR-DESIGN.md §6.2).\n     *  Call once per query in the route loader, before the synchronous render. */\n    preload(query: Query<any, any, any>): Promise<void>;\n    /** The dehydrated first-paint cache for every preloaded query — embed in the HTML, then\n     *  `store.hydrate(...)` it in the browser. */\n    dehydrate(): DehydratedState;\n    /**\n     * Loader-phase convenience over {@link preload} + {@link dehydrate}: preload EVERY query (reads run\n     * concurrently) and return the dehydrated first-paint cache. Composition keeps this to one read per\n     * composed root query — no request waterfall (SSR-DESIGN.md §6.2).\n     *\n     * A failed read produces no seed for that query and calls `onError`, if provided. Other reads\n     * can still supply seeds. The browser must establish its own successful live subscription to\n     * obtain the missing data; hydration alone does not retry this read. Without `onError`, the\n     * preload failure is silent. An `onError` callback that throws rejects the batch.\n     */\n    preloadAll(queries: Array<Query<any, any, any>>, opts?: {\n        onError?: (query: Query<any, any, any>, err: unknown) => void;\n    }): Promise<DehydratedState>;\n}","description":"The server-side Store wrapper (SSR-DESIGN.md §6.2). Wraps a {@link Store} over a\n{@link OneShotBackend} and adds the loader-phase `preload` plus `dehydrate`. Pass `.store` to\nthe React `<Rindle>` provider for the synchronous render; return `.dehydrate()` from the loader.\nCreate one instance per request, with an authorized read function for that request's principal.\nIts snapshots seed views; they do not persist synced rows in the browser database.","source":"packages/client/src/ssr.ts","line":78,"href":"/reference/typescript/remote/#symbol-ServerStore"},{"name":"ServerStoreOptions","originalName":"ServerStoreOptions","kind":"InterfaceDeclaration","signature":"export interface ServerStoreOptions {\n    /** Performs an authorized one-shot read. See {@link OneShotQueryFn} for access ownership. */\n    query: OneShotQueryFn;\n    /** Optional namespace for query deduplication, forwarded to every preload. Different keys\n     *  prevent pipeline sharing for the same AST. This key does not authorize access or filter rows;\n     *  the query must already contain the required visibility predicates. */\n    visibilityKey?: string;\n    /** Optional idle TTL (ms) the warm pipeline is left at, forwarded to every preload (SSR-DESIGN.md\n     *  §3.4). The TTL is NOT part of the dedup key, so a shared materialization keeps the LONGEST TTL\n     *  any caller requested (max-wins) — `ttlMs` can extend a query's warm-handoff window, never\n     *  shrink it; absent ⇒ the daemon's default idle TTL. */\n    ttlMs?: number;\n}","description":"","source":"packages/client/src/ssr.ts","line":57,"href":"/reference/typescript/remote/#symbol-ServerStoreOptions"},{"name":"ServerWriteTx","originalName":"ServerWriteTx","kind":"InterfaceDeclaration","signature":"/** The ASYNC server-side write surface a mutator runs against. Semantically the twin of the client's\n *  synchronous `MutationTx` write methods — same names, same keyed-row arguments — but every op is a\n *  Promise. Reads see this transaction's own writes on both Postgres and the daemon; the daemon\n *  opens an interactive transaction when a read is needed. Inserts require every non-nullable\n *  column and fill omitted nullable columns with `null`. Updates and deletes require the PK. */\nexport interface ServerWriteTx {\n    /** Insert a row. Missing required columns and unknown columns throw; omitted nullable\n     *  columns become `null`, rather than using database defaults. */\n    insert(table: string, row: KeyedRow): Promise<void>;\n    /** Update the row identified by the pk columns; only the named non-pk columns change. A missing\n     *  row is a NO-OP. */\n    update(table: string, row: KeyedRow): Promise<void>;\n    /** Insert, or replace non-PK columns on PK conflict, using the same insert shape. */\n    upsert(table: string, row: KeyedRow): Promise<void>;\n    /** Insert with the same nullable-column rules as `insert`, or do nothing on PK conflict. */\n    insertIgnore(table: string, row: KeyedRow): Promise<void>;\n    /** Delete the row identified by the pk columns. A missing row is a NO-OP. */\n    delete(table: string, pk: KeyedRow): Promise<void>;\n    /** Read one row by primary key, through the OPEN transaction on both backends\n     *  (read-your-writes: live on Postgres; via an interactive mutation session on the daemon,\n     *  DAEMON-INTERACTIVE-TXN-DESIGN.md §5.3). */\n    row(table: string, pk: KeyedRow): Promise<KeyedRow | undefined>;\n}","description":"The ASYNC server-side write surface a mutator runs against. Semantically the twin of the client's\nsynchronous `MutationTx` write methods — same names, same keyed-row arguments — but every op is a\nPromise. Reads see this transaction's own writes on both Postgres and the daemon; the daemon\nopens an interactive transaction when a read is needed. Inserts require every non-nullable\ncolumn and fill omitted nullable columns with `null`. Updates and deletes require the PK.","source":"packages/client/src/mutation-ops.ts","line":29,"href":"/reference/typescript/remote/#symbol-ServerWriteTx"},{"name":"shared","originalName":"shared","kind":"FunctionDeclaration","signature":"/** Co-locate a shared (generator) mutator with the validator for its args — pairing the arg SHAPE\n *  with the body that consumes it at ONE site, so neither tier restates it (the client derives its\n *  callsite type from `Args`; the server parses untrusted args through `.args`). Returns the SAME\n *  generator function with an `args` property attached (`Object.assign` mutates + returns it), so the\n *  registered value is byte-for-byte what the client drove before: {@link isGeneratorMutator} still\n *  detects it and it still `satisfies ClientRegistry`. */\nexport declare function shared<Args, Ctx extends MutatorCtx = MutatorCtx>(args: ArgSchema<Args>, run: SharedMutator<Args, Ctx>): SharedMutatorWithArgs<Args, Ctx>;","description":"Co-locate a shared (generator) mutator with the validator for its args — pairing the arg SHAPE\nwith the body that consumes it at ONE site, so neither tier restates it (the client derives its\ncallsite type from `Args`; the server parses untrusted args through `.args`). Returns the SAME\ngenerator function with an `args` property attached (`Object.assign` mutates + returns it), so the\nregistered value is byte-for-byte what the client drove before: {@link isGeneratorMutator} still\ndetects it and it still `satisfies ClientRegistry`.","source":"packages/client/src/mutation-ops.ts","line":180,"href":"/reference/typescript/remote/#symbol-shared"},{"name":"SharedMutator","originalName":"SharedMutator","kind":"TypeAliasDeclaration","signature":"/** A generator (isomorphic) mutator, shared verbatim by both tiers: the client trusts typed `args`,\n *  the server parses untrusted args into `Args` before invoking. */\nexport type SharedMutator<Args, Ctx extends MutatorCtx = MutatorCtx> = (tx: IsoTx, args: Args, ctx: Ctx) => MutationGen;","description":"A generator (isomorphic) mutator, shared verbatim by both tiers: the client trusts typed `args`,\nthe server parses untrusted args into `Args` before invoking.","source":"packages/client/src/mutation-ops.ts","line":152,"href":"/reference/typescript/remote/#symbol-SharedMutator"},{"name":"SharedMutatorWithArgs","originalName":"SharedMutatorWithArgs","kind":"TypeAliasDeclaration","signature":"/** A shared mutator that CARRIES its own arg validator, co-located at the def site (`shared(schema,\n *  gen)`). The client registers it exactly like a bare generator mutator — the `.args` validator is\n *  inert there (typed callsites skip the parse); the server ({@link runSharedMutation}, via the\n *  api-server's `sharedApiMutators`) reads `.args` to parse untrusted wire args before driving the\n *  SAME body. */\nexport type SharedMutatorWithArgs<Args, Ctx extends MutatorCtx = MutatorCtx> = SharedMutator<Args, Ctx> & {\n    args: ArgSchema<Args>;\n};","description":"A shared mutator that CARRIES its own arg validator, co-located at the def site (`shared(schema,\ngen)`). The client registers it exactly like a bare generator mutator — the `.args` validator is\ninert there (typed callsites skip the parse); the server ({@link runSharedMutation }, via the\napi-server's `sharedApiMutators`) reads `.args` to parse untrusted wire args before driving the\nSAME body.","source":"packages/client/src/mutation-ops.ts","line":170,"href":"/reference/typescript/remote/#symbol-SharedMutatorWithArgs"},{"name":"SimpleOp","originalName":"SimpleOp","kind":"TypeAliasDeclaration","signature":"/** The wire comparison operators (exact strings, `src/ast.rs` `Op`). */\nexport type SimpleOp = \"=\" | \"!=\" | \"<\" | \"<=\" | \">\" | \">=\" | \"IS\" | \"IS NOT\" | \"LIKE\" | \"NOT LIKE\" | \"ILIKE\" | \"NOT ILIKE\" | \"IN\" | \"NOT IN\";","description":"The wire comparison operators (exact strings, `src/ast.rs` `Op`).","source":"packages/client/src/ast.ts","line":19,"href":"/reference/typescript/remote/#symbol-SimpleOp"},{"name":"SingularArrayView","originalName":"SingularArrayView","kind":"InterfaceDeclaration","signature":"/** What a top-level `.one()` query materializes to: the single row (or `null`), not an array.\n *  A thin adapter over a {@link FlatArrayView} — all the folding is shared; only the result\n *  boundary unwraps (`data[0] ?? null`). Reference identity of the row is preserved. */\nexport interface SingularArrayView<R> {\n    /** The single current row, or `null` when the query matches nothing. */\n    readonly data: R | null;\n    /** The engine query id — see {@link ArrayView.qid}. */\n    readonly qid: QueryId;\n    /** The query's view `WireSchema` — see {@link ArrayView.schema}. */\n    readonly schema: WireSchema | null;\n    /** The query's lifecycle state — see {@link ArrayView.resultType}. */\n    readonly resultType: ResultType;\n    /** Subscribe; fires immediately with the current row, then after each applied batch (and after\n     *  a {@link resultType} change). */\n    subscribe(listener: (data: R | null) => void): () => void;\n    /** Subscribe to the view's folded CHANGE stream — see {@link ArrayView.onChanges}. The changes\n     *  are the same positional `FlatChange`s as the plural view (a `.one()` is just the list capped to\n     *  one), so a narrator resolves them identically. */\n    onChanges(listener: ViewChangeListener): () => void;\n    /** Tear down + stop receiving updates. */\n    destroy(): void;\n}","description":"What a top-level `.one()` query materializes to: the single row (or `null`), not an array.\nA thin adapter over a {@link FlatArrayView} — all the folding is shared; only the result\nboundary unwraps (`data[0] ?? null`). Reference identity of the row is preserved.","source":"packages/client/src/view.ts","line":68,"href":"/reference/typescript/remote/#symbol-SingularArrayView"},{"name":"SingularView","originalName":"SingularView","kind":"ClassDeclaration","signature":"/** Wrap a plural {@link FlatArrayView} as a {@link SingularArrayView} for a `.one()` query\n *  (the engine caps it to `limit = 1`, so the top list holds at most one node). */\nexport declare class SingularView<R> implements SingularArrayView<R> {\n    private readonly inner;\n    constructor(inner: ArrayView<R>);\n    get data(): R | null;\n    get qid(): QueryId;\n    get schema(): WireSchema | null;\n    get resultType(): ResultType;\n    subscribe(listener: (data: R | null) => void): () => void;\n    onChanges(listener: ViewChangeListener): () => void;\n    destroy(): void;\n}","description":"Wrap a plural {@link FlatArrayView} as a {@link SingularArrayView} for a `.one()` query\n(the engine caps it to `limit = 1`, so the top list holds at most one node).","source":"packages/client/src/view.ts","line":90,"href":"/reference/typescript/remote/#symbol-SingularView"},{"name":"spliceStreamText","originalName":"spliceStreamText","kind":"FunctionDeclaration","signature":"/**\n * Merge the durable plane with the live tail.\n *\n * `durable` is what the IVM view shows; `produced` is what a subscription has accumulated (the prefix\n * it joined at, plus every `chunk`). Both are prefixes of the same response, so the merge is \"take\n * the longer\" — no diffing, no overlap handling, no ranges.\n *\n * The length comparison is the whole algorithm, which is why a caller MUST seed its accumulator with\n * the text it joined at: a tail carrying only the chunks it received would read as shorter than the\n * durable text and be discarded. `useStreamedText` does that for you.\n */\nexport declare function spliceStreamText(durable: string, produced: string): string;","description":"Merge the durable plane with the live tail.\n\n`durable` is what the IVM view shows; `produced` is what a subscription has accumulated (the prefix\nit joined at, plus every `chunk`). Both are prefixes of the same response, so the merge is \"take\nthe longer\" — no diffing, no overlap handling, no ranges.\n\nThe length comparison is the whole algorithm, which is why a caller MUST seed its accumulator with\nthe text it joined at: a tail carrying only the chunks it received would read as shorter than the\ndurable text and be discarded. `useStreamedText` does that for you.","source":"packages/client/src/stream.ts","line":75,"href":"/reference/typescript/remote/#symbol-spliceStreamText"},{"name":"stableKey","originalName":"stableKey","kind":"FunctionDeclaration","signature":"export declare function stableKey(value: unknown, seen?: WeakSet<object>): string;","description":"","source":"packages/client/src/key.ts","line":6,"href":"/reference/typescript/remote/#symbol-stableKey"},{"name":"Store","originalName":"Store","kind":"ClassDeclaration","signature":"export declare class Store<S extends ColsMap> {\n    /** Type-safe query entry: `store.query.issue.where.closed(false).materialize()`. */\n    readonly query: QueryRoot<S>;\n    private readonly schema;\n    private readonly backend;\n    private nextId;\n    private readonly views;\n    private readonly asts;\n    private readonly syncLeases;\n    private readonly seeds;\n    private changeListeners?;\n    private removedSubtreeWanted;\n    private resultTypeListeners?;\n    private readonly hasResultTypeLifecycle;\n    private commitDepth;\n    private readonly pendingFlush;\n    private readonly pendingChanges;\n    constructor(schema: Schema<S>, backend: Backend);\n    /** Materialize any fluent query object. Named queries subscribe remotely by `(name,args)`;\n     *  ad-hoc builder queries are local-only for local-first backends.\n     *\n     *  `opts.onChanges` binds a narrator to this view's DIFF stream ({@link ArrayView.onChanges}) — the\n     *  per-view seam that replaces filtering the store-global {@link subscribeChanges} by `qid`. It is\n     *  wired BEFORE the backend registers the query, so a synchronous backend's first `snapshot` (fired\n     *  inside `registerQuery`, before this returns) is delivered too. */\n    materialize<Q extends Query<any, any, any>>(query: Q, opts?: {\n        onChanges?: ViewChangeListener;\n    }): ReturnType<Q[\"materialize\"]>;\n    /** One-shot AUTHORITATIVE read: materialize `query`, wait until its result is server-authoritative\n     *  ({@link ResultType} `\"complete\"`), read the data once, then destroy the view — resolving with the\n     *  plain result rather than a live subscription. Rejects if the query enters the `\"error\"` state. Use\n     *  it for exports, imports, undo snapshots — anywhere that wants the current answer as a value.\n     *\n     *  A synchronous local-first backend (wasm/replica) has already delivered the first snapshot inside\n     *  {@link materialize}, so the view is `\"complete\"` on entry and this settles on the next microtask\n     *  without ever attaching a listener; a remote backend settles when the first live snapshot lands.\n     *  The query is NEVER left subscribed — the view is destroyed before the promise settles either way.\n     *  (A remote query that never completes leaves the promise pending, exactly as a `resultType` poll\n     *  would; race a timeout at the call site if you need one.) */\n    readOnce<Q extends Query<any, any, any>>(query: Q): Promise<ReturnType<Q[\"materialize\"]>[\"data\"]>;\n    /** True when the backend can retain a remote named query independently from the local\n     *  materialized AST view. React uses this to keep one local view per AST while still sending\n     *  every mounted `(name,args)` lease through the backend. */\n    canRetainRemoteQueries(): boolean;\n    /** Build one local AST view, with remote syncing retained separately through the returned\n     *  handle. This is a lower-level API for UI bindings; ordinary app code should keep using\n     *  `materialize(query)`. */\n    createCachedQueryView<Q extends Query<any, any, any>>(query: Q): CachedQueryView<Q>;\n    /** Retain a named remote query purely for normalized/local-first coverage. This does not\n     *  register or materialize the query AST locally, so React can keep server sync coverage alive\n     *  without subscribing to the broad coverage result tree. */\n    retainSyncQuery<Q extends Query<any, any, any>>(query: Q): SyncQueryLease;\n    /** Apply a batch of mutations (object rows → positional). Resolves when the backend has\n     *  accepted them (local: applied; remote: sent). The resulting view updates flow back via\n     *  the backend's event stream. */\n    write(fn: (tx: WriteTx<S>) => void): Promise<void>;\n    /** Direct-commit write to LOCAL-only tables (`201-LOCAL-ONLY-TABLES-DESIGN.md` §6): the\n     *  client-authoritative path for selection state, draft text, view prefs, scratch rows. It\n     *  bypasses the optimistic pending stack entirely — a local table is untracked, so it never\n     *  rebases, reverts, or waits on a server confirmation (it \"moves on its own\").\n     *\n     *  Rejects a synced/tracked table (M2): a direct write to one would be un-applied on the very\n     *  next server rewind. Local writes also must NOT live inside a replayable mutator (M1) — the\n     *  server runs the mutator from `args` alone and cannot see local tables; use this instead.\n     *  Same keyed `WriteTx` shape as {@link write}. `async` so the no-seam / M2 guards surface as a\n     *  REJECTED promise (the `Promise<void>` contract) rather than a synchronous throw that escapes a\n     *  caller's `.catch` and crashes the event handler / render frame. */\n    writeLocal(fn: (tx: WriteTx<S>) => void): Promise<void>;\n    /** Drain a keyed `WriteTx` callback into positional {@link Mutation}s (shared by\n     *  {@link write} / {@link writeLocal}; json columns stringified, rows in column order). */\n    private collectMutations;\n    /** Seed a query's first-paint snapshot from a `POST /query` response (server side): convert the\n     *  assembled rows to the view's projected shape and stash them by `viewKey`. A view materialized\n     *  for this AST (during the synchronous render) reads the seed; {@link dehydrate} serializes it. */\n    seedAssembled(ast: Ast, rows: AssembledNode[], cvMin: number): void;\n    /** The dehydrated first-paint cache for every preloaded query — embed it in the HTML and pass it\n     *  to {@link hydrate} in the browser (SSR-DESIGN.md §6.2). */\n    dehydrate(): DehydratedState;\n    /** Seed the browser store from the server's {@link dehydrate} output (SSR-DESIGN.md §6.2): each\n     *  view materialized for a hydrated AST shows these rows until its first live `hello` reconciles. */\n    hydrate(state: DehydratedState): void;\n    /** A query's hydrated first-paint snapshot, by `viewKey` — what React's `getServerSnapshot`\n     *  reads so an SSR render (and the matching client hydration pass) sees the seeded rows without\n     *  opening a subscription. */\n    seedSnapshot(viewKey: string): DehydratedQuery | undefined;\n    primaryKeyFor(table: string): readonly string[];\n    /** Convert assembled (nested-by-name) rows (SSR-DESIGN.md §3.3) into the view's projected result\n     *  shape: spread `cols` (parsing json columns), recurse into each relationship by its alias\n     *  (plural → array, `.one()` → object/null, `countAs` → bare scalar). */\n    assembleSnapshot(ast: Ast, rows: AssembledNode[]): unknown[];\n    private assembleNode;\n    private registerMaterialized;\n    private retainRemote;\n    private onEvent;\n    /** Retire a view's SSR seed — from the view (so `data` switches from the seed to the maintained\n     *  tree) AND from the seeds map (so no later mount re-seeds a now-live query) — but ONLY once the\n     *  query is AUTHORITATIVE (`resultType === \"complete\"`). Called BEFORE the fold it accompanies, so\n     *  that fold's notify already reflects the live tree with no empty gap. Idempotent.\n     *\n     *  The gate is the fix for the synchronous optimistic/wasm backend: it fires a query's FIRST snapshot\n     *  from LOCAL, not-yet-synced state while the query is still `unknown` (`registerMaterialized` marks a\n     *  lifecycle-backed remote view `unknown` up front for exactly this), then delivers the authoritative\n     *  rows one event later as a `catchUp` batch — having already flipped the query to `complete`. So the\n     *  seed survives the pre-sync snapshot (`unknown` ⇒ skip) and retires on the catch-up (`complete` ⇒\n     *  retire). A lifecycle-LESS backend (pure wasm, the SSR one-shot, tests) is `complete` from creation,\n     *  so its first snapshot retires the seed exactly as before this gate existed. */\n    private retireSeedIfLive;\n    /** Retire the SSR seed (if authoritative) and fold the accompanying hydration delta — BEFORE the\n     *  fold so its notify already reflects the live tree with no empty gap. The subtlety: a hydration\n     *  can fold NOTHING — a 0-row authoritative result, or one whose rows are already present in `top`\n     *  (a query whose result is fully covered by an already-hydrated sibling: the shared rows dedup to\n     *  zero net base mutations). Then {@link FlatArrayView.applyChanges} notifies nothing, so the\n     *  seed→tree switch would never reach subscribers and the view freezes on the stale seed. Guard\n     *  against that: if the seed retired but the fold was a no-op, force the handoff notify (inline, or\n     *  via the commit-boundary flush). Flash-safe — the forced notify only fires when there was nothing\n     *  to fold, so `data` is already the correct live tree by then. */\n    private foldHydration;\n    /** Fold a batch into its view, then notify now or — inside a commit bracket — defer the view's\n     *  notification to the commit boundary, so all sibling views fold first (cross-view-atomic\n     *  notification; see `commitDepth`). */\n    private applyAndTrack;\n    /** Deliver everything deferred during the just-ended commit, after every affected view has folded\n     *  (cross-view-atomic notification): view subscribers first, then the raw change stream\n     *  (narrators/devtools), each frame in arrival order. A throwing listener does not stop the others\n     *  — the first error is re-raised only once the whole flush completes (mirroring the backend's\n     *  per-query isolation). View subscribers run before change listeners, preserving the per-event\n     *  order that held before coalescing (a view's subscribers fired before its change frame). */\n    private flushCommit;\n    /** Subscribe to the raw per-query {@link ChangeEvent} stream (hello / snapshot / batch) the Store\n     *  routes to its views, tagged by `qid`. Fired AFTER the event is folded — and, for a commit that\n     *  fans out to several queries (the in-process engine's `onCommitBoundary`), after EVERY view in\n     *  that commit has folded — so a listener that re-reads ANY view (its own or a sibling) sees\n     *  post-commit state, never a torn mid-commit one. Frames keep their arrival (engine-dispatch)\n     *  order, one per affected query. This is the supported way to drive change-derived layers\n     *  (e.g. {@link resolveChange} → @rindle/narrator, or a devtools pane) off a live store — attach\n     *  BEFORE `materialize` to catch a synchronous backend's first `hello`+`snapshot`.\n     *  The per-query view `WireSchema` rides the `hello` frame (also readable via `view.schema`).\n     *\n     *  The third listener arg is the post-fold {@link ArrayView} for this `qid` (so a template wanting\n     *  list context — current `data`, `schema`, `resultType` — needn't look it up). It is ALWAYS the\n     *  plural view, even for a top-level `.one()` query: the Store retains the list-shaped view, not the\n     *  SingularView wrapper handed back from `materialize`. `undefined` only if the view is mid-teardown.\n     *\n     *  `opts.removedSubtree` enriches every `remove` op on this stream with the full removed subtree\n     *  ({@link FlatOp.node}), so a consumer can resolve a removed row's nested subs exactly as on an\n     *  `add` (a bare remove carries only the leaving row). It is reconstructed client-side from the\n     *  view — no wire/engine cost — and paid only on real evictions while at least one subscriber asks.\n     *\n     *  Returns a detach function; multiple listeners may attach. */\n    subscribeChanges(listener: (qid: QueryId, ev: ChangeEvent, view?: ArrayView<unknown>) => void, opts?: {\n        removedSubtree?: boolean;\n    }): () => void;\n    /** Subscribe to per-query {@link ResultType} transitions (the server-channel lifecycle the backend\n     *  pushes — `unknown` → `complete`, etc.), tagged by `qid`. Fired only on a CHANGE (never replayed\n     *  on attach; read `view.resultType` for the current value). The supported seam for a status-driven\n     *  layer (a devtools pane). Returns a detach function; multiple listeners may attach. */\n    subscribeResultType(listener: (qid: QueryId, rt: ResultType) => void): () => void;\n    /** A read-only snapshot of every live materialized view (DEBUG-TOOLS-BROWSER-DESIGN §4.2): its\n     *  qid, AST, {@link ResultType}, row count, and a capped row sample. Built fresh on each call from\n     *  the live `views`/`asts` maps — never cached, never mutating. `sampleRows` caps the per-query\n     *  peek (default 50) so a large view doesn't bloat the snapshot. */\n    __inspect(sampleRows?: number): StoreInspect;\n    private columns;\n    /** An object row → a positional cell array in the table's column order (json → string). */\n    private positionalize;\n    /** The per-level column types parallel to the WireSchema, so the view parses json columns. */\n    private viewTypes;\n}","description":"","source":"packages/client/src/store.ts","line":92,"href":"/reference/typescript/remote/#symbol-Store"},{"name":"StoreInspect","originalName":"StoreInspect","kind":"InterfaceDeclaration","signature":"/** A frozen snapshot of the Store's live query state for a devtools pane ({@link Store.__inspect}). */\nexport interface StoreInspect {\n    queries: QueryInspect[];\n}","description":"A frozen snapshot of the Store's live query state for a devtools pane ({@link Store.__inspect}).","source":"packages/client/src/store.ts","line":88,"href":"/reference/typescript/remote/#symbol-StoreInspect"},{"name":"STREAM_STATUS_STREAMING","originalName":"STREAM_STATUS_STREAMING","kind":"VariableDeclaration","signature":"/** The value in the mapped status column while a stream is live. */\nexport declare const STREAM_STATUS_STREAMING = \"streaming\";","description":"The value in the mapped status column while a stream is live.","source":"packages/client/src/stream.ts","line":22,"href":"/reference/typescript/remote/#symbol-STREAM_STATUS_STREAMING"},{"name":"StreamFrame","originalName":"StreamFrame","kind":"TypeAliasDeclaration","signature":"/**\n * One frame of a subscription. A subscription always begins with `open` and always ends with exactly\n * one terminal frame — `end`, `stale`, or `absent` — after which the iterator completes.\n *\n * `stale` and `absent` are the two \"you are on the durable plane now\" answers, and both are SAFE:\n * the store holds everything below `floorSeq` and everything through `durableSeq`, so the reader's\n * IVM view converges without the stream. Neither is an error.\n */\nexport type StreamFrame = \n/** Join accepted. `from` is the (clamped) offset the replay starts at. */\n{\n    type: \"open\";\n    streamId: string;\n    from: number;\n    seq: number;\n    durableSeq: number;\n    ended: boolean;\n}\n/** PRODUCED text — not a durability claim. `text.length === seq - from`, always. */\n | {\n    type: \"chunk\";\n    from: number;\n    seq: number;\n    text: string;\n}\n/** The store now holds the prefix through `seq`. */\n | {\n    type: \"durable\";\n    seq: number;\n}\n/** Sealed. No further frames. */\n | {\n    type: \"end\";\n    seq: number;\n    status: StreamStatus;\n    error?: string;\n}\n/** `from` is below the producer's retained buffer floor (or the subscriber fell too far behind):\n *  read the store. (A raw `EventSource` rejoins automatically on its reconnect; `useStreamedText`\n *  deliberately stays on the durable plane instead — correct, at checkpoint granularity.) */\n | {\n    type: \"stale\";\n    floorSeq: number;\n    durableSeq: number;\n}\n/** The process serving this subscribe is not hosting the stream (wrong instance, already evicted,\n *  or it never existed): the store is the whole truth. */\n | {\n    type: \"absent\";\n};","description":"One frame of a subscription. A subscription always begins with `open` and always ends with exactly\none terminal frame — `end`, `stale`, or `absent` — after which the iterator completes.\n\n`stale` and `absent` are the two \"you are on the durable plane now\" answers, and both are SAFE:\nthe store holds everything below `floorSeq` and everything through `durableSeq`, so the reader's\nIVM view converges without the stream. Neither is an error.","source":"packages/client/src/stream.ts","line":32,"href":"/reference/typescript/remote/#symbol-StreamFrame"},{"name":"StreamStatus","originalName":"StreamStatus","kind":"TypeAliasDeclaration","signature":"/**\n * How a stream ended.\n * - `complete` — the model finished.\n * - `cancelled` — the reader asked it to stop and the producer honoured it.\n * - `error` — the generation threw.\n * - `interrupted` — the host went away mid-generation. The one status that implies the store may be\n *   short of what was produced.\n */\nexport type StreamStatus = \"complete\" | \"cancelled\" | \"error\" | \"interrupted\";","description":"How a stream ended.\n- `complete` — the model finished.\n- `cancelled` — the reader asked it to stop and the producer honoured it.\n- `error` — the generation threw.\n- `interrupted` — the host went away mid-generation. The one status that implies the store may be\n  short of what was produced.","source":"packages/client/src/stream.ts","line":19,"href":"/reference/typescript/remote/#symbol-StreamStatus"},{"name":"string","originalName":"string","kind":"VariableDeclaration","signature":"export declare const string: <T extends string = string>() => ColBuilder<T>;","description":"","source":"packages/client/src/schema.ts","line":46,"href":"/reference/typescript/remote/#symbol-string"},{"name":"subRow","originalName":"subRow","kind":"FunctionDeclaration","signature":"/** Read a named sub-row off a change's `node` by relationship alias (e.g. the `guest` under an\n *  `rsvp`) — the `add` node, or a `remove`'s subtree when the consumer opted into it. The alias →\n *  wire slot mapping comes from the changed level's `WireSchema`. `null` when no node rode along. */\nexport declare function subRow(rc: ResolvedChange, alias: string): NamedRow | null;","description":"Read a named sub-row off a change's `node` by relationship alias (e.g. the `guest` under an\n`rsvp`) — the `add` node, or a `remove`'s subtree when the consumer opted into it. The alias →\nwire slot mapping comes from the changed level's `WireSchema`. `null` when no node rode along.","source":"packages/client/src/resolve.ts","line":128,"href":"/reference/typescript/remote/#symbol-subRow"},{"name":"SubscribeClientMsg","originalName":"SubscribeClientMsg","kind":"TypeAliasDeclaration","signature":"/** The multiplexed wire messages (many queries over one connection, tagged by `queryId`).\n *  `subscribe.mode` selects the serializer (default flat); a normalized subscription gets\n *  `nhello`/`nbatch` back instead of `hello`/`batch` (NORMALIZED-CHANGES-DESIGN.md §6).\n *  Embedded servers receive `{name,args}`. Daemon/serverless deployments can instead receive an\n *  opaque `leaseToken` that the app API server minted after auth + named-query resolution.\n *\n *  The OPTIMISTIC path (OPTIMISTIC-WRITES-DESIGN.md §8) adds `init` (the connection\n *  identifies its stable clientID, so progress frames can carry that client's `lmid`) and\n *  `pushMutation` (one named-mutator envelope up); the server answers with the normalized\n *  frames (`cv`-stamped) plus connection-level `progress` frames. */\nexport type SubscribeClientMsg = {\n    t: \"subscribe\";\n    queryId: number;\n    name: string;\n    args: unknown;\n    mode?: \"flat\" | \"normalized\";\n} | {\n    t: \"subscribe\";\n    queryId: number;\n    leaseToken: string;\n    mode?: \"flat\" | \"normalized\";\n};","description":"The multiplexed wire messages (many queries over one connection, tagged by `queryId`).\n`subscribe.mode` selects the serializer (default flat); a normalized subscription gets\n`nhello`/`nbatch` back instead of `hello`/`batch` (NORMALIZED-CHANGES-DESIGN.md §6).\nEmbedded servers receive `{name,args}`. Daemon/serverless deployments can instead receive an\nopaque `leaseToken` that the app API server minted after auth + named-query resolution.\n\nThe OPTIMISTIC path (OPTIMISTIC-WRITES-DESIGN.md §8) adds `init` (the connection\nidentifies its stable clientID, so progress frames can carry that client's `lmid`) and\n`pushMutation` (one named-mutator envelope up); the server answers with the normalized\nframes (`cv`-stamped) plus connection-level `progress` frames.","source":"packages/remote/src/protocol.ts","line":119,"href":"/reference/typescript/remote/#symbol-SubscribeClientMsg"},{"name":"SubscribeMode","originalName":"SubscribeMode","kind":"TypeAliasDeclaration","signature":"export type SubscribeMode = \"flat\" | \"normalized\";","description":"","source":"packages/remote/src/subscribe.ts","line":5,"href":"/reference/typescript/remote/#symbol-SubscribeMode"},{"name":"Subscriber","originalName":"Subscriber","kind":"ClassDeclaration","signature":"/** Receiver side: validates a frame stream (comparator at `hello`; per batch — epoch match,\n *  schema-fp match, strict in-order seq) and emits the clean `hello`/`snapshot`/`batch`\n *  `ChangeEvent`s. It does NOT fold (the core `ArrayView` does) — the §2.2 split. */\nexport declare class Subscriber {\n    readonly epoch: number;\n    readonly schemaFp: string;\n    private readonly emit;\n    private phase;\n    private lastSeq;\n    constructor(hello: Hello, emit: (ev: ChangeEvent) => void);\n    /** Apply one incremental batch (or the seq-0 snapshot). Returns `\"duplicate\"` for an\n     *  already-applied seq (discarded — rc ops are not idempotent); throws {@link ProtocolError}\n     *  on a gap / epoch / schema mismatch (the caller re-hydrates). */\n    apply(batch: Batch): \"applied\" | \"duplicate\";\n}","description":"Receiver side: validates a frame stream (comparator at `hello`; per batch — epoch match,\nschema-fp match, strict in-order seq) and emits the clean `hello`/`snapshot`/`batch`\n`ChangeEvent`s. It does NOT fold (the core `ArrayView` does) — the §2.2 split.","source":"packages/remote/src/protocol.ts","line":216,"href":"/reference/typescript/remote/#symbol-Subscriber"},{"name":"SubscribeRequest","originalName":"SubscribeRequest","kind":"InterfaceDeclaration","signature":"export interface SubscribeRequest {\n    queryId: QueryId;\n    remote: RemoteQuery;\n    mode: SubscribeMode;\n}","description":"","source":"packages/remote/src/subscribe.ts","line":7,"href":"/reference/typescript/remote/#symbol-SubscribeRequest"},{"name":"SubscribeResolver","originalName":"SubscribeResolver","kind":"TypeAliasDeclaration","signature":"export type SubscribeResolver = (request: SubscribeRequest) => SubscribeTarget | PromiseLike<SubscribeTarget>;","description":"","source":"packages/remote/src/subscribe.ts","line":20,"href":"/reference/typescript/remote/#symbol-SubscribeResolver"},{"name":"SubscribeTarget","originalName":"SubscribeTarget","kind":"TypeAliasDeclaration","signature":"export type SubscribeTarget = {\n    name: string;\n    args: unknown;\n    leaseToken?: never;\n    wsEndpoint?: never;\n} | {\n    leaseToken: string;\n    wsEndpoint?: string;\n    name?: never;\n    args?: never;\n};","description":"","source":"packages/remote/src/subscribe.ts","line":13,"href":"/reference/typescript/remote/#symbol-SubscribeTarget"},{"name":"SyncEffectExec","originalName":"SyncEffectExec","kind":"InterfaceDeclaration","signature":"/** A tier's SYNCHRONOUS effect executor (the browser wasm engine): apply a write, resolve a read —\n *  both immediate. */\nexport interface SyncEffectExec {\n    apply(op: MutationOp): void;\n    read(table: string, pk: KeyedRow): KeyedRow | undefined;\n    query(q: QueryArg): QueryResultRow[];\n}","description":"A tier's SYNCHRONOUS effect executor (the browser wasm engine): apply a write, resolve a read —\nboth immediate.","source":"packages/client/src/mutation-ops.ts","line":226,"href":"/reference/typescript/remote/#symbol-SyncEffectExec"},{"name":"SyncQueryLease","originalName":"SyncQueryLease","kind":"InterfaceDeclaration","signature":"export interface SyncQueryLease {\n    readonly resultType: ResultType;\n    subscribe(listener: () => void): () => void;\n    release(): void;\n}","description":"","source":"packages/client/src/store.ts","line":58,"href":"/reference/typescript/remote/#symbol-SyncQueryLease"},{"name":"table","originalName":"table","kind":"FunctionDeclaration","signature":"/** `table(\"issue\").columns({ id: string(), … }).primaryKey(\"id\")`. Pass `{ local: true }` for a\n *  {@link TableMeta.local local-only} table (`201-LOCAL-ONLY-TABLES-DESIGN.md`). */\nexport declare function table<N extends string>(name: N, opts?: TableOptions): {\n    columns<C extends AnyCols>(cols: C): {\n        primaryKey<K extends keyof C & string>(...keys: K[]): TableDef<N, C, K>;\n    };\n};","description":"`table(\"issue\").columns({ id: string(), … }).primaryKey(\"id\")`. Pass `{ local: true }` for a\n{@link TableMeta.locallocal-only} table (`201-LOCAL-ONLY-TABLES-DESIGN.md`).","source":"packages/client/src/schema.ts","line":160,"href":"/reference/typescript/remote/#symbol-table"},{"name":"TableDef","originalName":"TableDef","kind":"TypeAliasDeclaration","signature":"export type TableDef<N extends string, C extends AnyCols, PK extends string = string> = {\n    readonly [SCHEMA]: TableMeta<N, C, PK>;\n} & {\n    readonly [K in keyof C]: (arg: Arg<ColT<C[K]>>) => Cond<RowOf<C>>;\n};","description":"","source":"packages/client/src/schema.ts","line":92,"href":"/reference/typescript/remote/#symbol-TableDef"},{"name":"TableLike","originalName":"TableLike","kind":"TypeAliasDeclaration","signature":"/** Any table, for positions that only read its metadata. The field-factory part of a\n *  `TableDef` is invariant in `C`, so callers constrain on the `[SCHEMA]` meta only — to\n *  which every concrete `TableDef<N, C>` is assignable. */\nexport type TableLike<C extends AnyCols> = {\n    readonly [SCHEMA]: TableMeta<string, C>;\n};","description":"Any table, for positions that only read its metadata. The field-factory part of a\n`TableDef` is invariant in `C`, so callers constrain on the `[SCHEMA]` meta only — to\nwhich every concrete `TableDef<N, C>` is assignable.","source":"packages/client/src/schema.ts","line":101,"href":"/reference/typescript/remote/#symbol-TableLike"},{"name":"tableMeta","originalName":"tableMeta","kind":"FunctionDeclaration","signature":"/** Read a table's metadata (columns / PK / name). */\nexport declare function tableMeta(t: AnyTable): TableMeta;","description":"Read a table's metadata (columns / PK / name).","source":"packages/client/src/schema.ts","line":183,"href":"/reference/typescript/remote/#symbol-tableMeta"},{"name":"TableMeta","originalName":"TableMeta","kind":"InterfaceDeclaration","signature":"export interface TableMeta<N extends string = string, C extends AnyCols = AnyCols, PK extends string = string> {\n    readonly name: N;\n    readonly columns: C;\n    readonly primaryKey: readonly PK[];\n    /** A **local-only** table (`201-LOCAL-ONLY-TABLES-DESIGN.md`): client-authoritative,\n     *  never synced/tracked/rebased. The single marker the whole design keys off (§4) — it is\n     *  immutable for the table's lifetime (N2) and never crosses the wire (C2). Absent ⇒ an\n     *  ordinary synced table.\n     *\n     *  `true` ⇒ eligible for the local-persistence plane (durable + cross-tab when the client\n     *  enables `persistLocal`, `207-LOCAL-TABLE-PERSISTENCE-DESIGN.md`). `\"session\"` ⇒ local but\n     *  EPHEMERAL: outside the plane entirely — never persisted, never replicated across tabs,\n     *  per-client-instance state that empties on reload (201's original behavior) even when\n     *  `persistLocal` is on. Every OTHER locality rule (untracked source, M1/M2 guards, E3/Q1\n     *  wire exclusion) treats both variants identically. */\n    readonly local?: boolean | \"session\";\n}","description":"","source":"packages/client/src/schema.ts","line":59,"href":"/reference/typescript/remote/#symbol-TableMeta"},{"name":"TableOptions","originalName":"TableOptions","kind":"InterfaceDeclaration","signature":"/** Options for {@link table}. */\nexport interface TableOptions {\n    /** Declare a {@link TableMeta.local local-only} table (selection state, draft text, view\n     *  prefs, scratch rows): client-authoritative, never synced or rebased. See\n     *  `201-LOCAL-ONLY-TABLES-DESIGN.md`. Pass `\"session\"` for a local table that must stay\n     *  EPHEMERAL and per-tab even when the client enables `persistLocal` — e.g. selection state\n     *  that should not follow the user across tabs or reloads (207 §5.4). */\n    local?: boolean | \"session\";\n}","description":"Options for {@link table}.","source":"packages/client/src/schema.ts","line":83,"href":"/reference/typescript/remote/#symbol-TableOptions"},{"name":"tableSpec","originalName":"tableSpec","kind":"FunctionDeclaration","signature":"/** The `SchemaSpec` (`columns` + `primaryKey` indices) the wasm `Db.registerTable` wants. */\nexport declare function tableSpec(meta: TableMeta): {\n    columns: string[];\n    primaryKey: number[];\n};","description":"The `SchemaSpec` (`columns` + `primaryKey` indices) the wasm `Db.registerTable` wants.","source":"packages/client/src/schema.ts","line":498,"href":"/reference/typescript/remote/#symbol-tableSpec"},{"name":"TicketPersistence","originalName":"TicketPersistence","kind":"InterfaceDeclaration","signature":"/** Where a store persists the ticket across reloads. The browser backs this with sessionStorage\n *  (per-TAB, so two tabs can pin two regions — design §13); tests pass none (pure in-memory). */\nexport interface TicketPersistence {\n    load(): string | undefined;\n    save(ticket: string): void;\n    clear(): void;\n}","description":"Where a store persists the ticket across reloads. The browser backs this with sessionStorage\n(per-TAB, so two tabs can pin two regions — design §13); tests pass none (pure in-memory).","source":"packages/remote/src/affinity.ts","line":49,"href":"/reference/typescript/remote/#symbol-TicketPersistence"},{"name":"toCell","originalName":"toCell","kind":"FunctionDeclaration","signature":"/** Encode a keyed-row cell to its wire {@link WireValue} for a column KIND — the one place both write\n *  funnels stringify a `json<T>` object (the typed mutator surface / design 206 §7). An\n *  already-stringified json value (a `string`) or any non-json cell passes through unchanged, so a\n *  mutator may pass EITHER a parsed object OR a JSON string. Mirrors `store.positionalize`. */\nexport declare function toCell(v: WireValue | object, type: ColType): WireValue;","description":"Encode a keyed-row cell to its wire {@link WireValue} for a column KIND — the one place both write\nfunnels stringify a `json<T>` object (the typed mutator surface / design 206 §7). An\nalready-stringified json value (a `string`) or any non-json cell passes through unchanged, so a\nmutator may pass EITHER a parsed object OR a JSON string. Mirrors `store.positionalize`.","source":"packages/client/src/schema.ts","line":536,"href":"/reference/typescript/remote/#symbol-toCell"},{"name":"Transport","originalName":"Transport","kind":"InterfaceDeclaration","signature":"export interface Transport {\n    /** Send a message up to the server. */\n    send(msg: ClientMsg): void;\n    /** Register the single handler for incoming server messages. */\n    onMessage(handler: (msg: ServerMsg) => void): void;\n    /** Register a handler fired after the connection is RE-established (not the first open) — the\n     *  source uses it to re-`init` + re-subscribe so a dropped/restarted daemon heals. Optional:\n     *  transports without reconnect (mocks, in-process) may omit it. */\n    onReconnect?(handler: () => void): void;\n    /** Register a handler fired when the connection is SUSTAINEDLY down — repeated reconnects to the\n     *  same endpoint have failed (a dead/removed follower, READ-ROUTER-DESIGN.md §3). The source uses\n     *  it to re-lease: the router returns a (possibly new) `wsEndpoint`, and a changed one migrates the\n     *  whole session off the dead node. Optional: transports without failover (mocks, in-process,\n     *  fixed endpoints) may omit it. */\n    onDown?(handler: () => void): void;\n    /** Tear down the connection. */\n    close(): void;\n}","description":"","source":"packages/remote/src/transport.ts","line":7,"href":"/reference/typescript/remote/#symbol-Transport"},{"name":"TransportFactory","originalName":"TransportFactory","kind":"TypeAliasDeclaration","signature":"/** Build a transport to a follower's public ws endpoint (READ-ROUTER-DESIGN.md §2.3). Default\n *  `(endpoint) => new WsTransport(endpoint)`. */\nexport type TransportFactory = (endpoint: string) => Transport;","description":"Build a transport to a follower's public ws endpoint (READ-ROUTER-DESIGN.md §2.3). Default\n`(endpoint) => new WsTransport(endpoint)`.","source":"packages/remote/src/optimistic-source.ts","line":68,"href":"/reference/typescript/remote/#symbol-TransportFactory"},{"name":"UpdateOf","originalName":"UpdateOf","kind":"TypeAliasDeclaration","signature":"/** The UPDATE shape of a table: its {@link PkOf primary-key columns} REQUIRED (they identify the row)\n *  plus every non-pk column OPTIONAL (`?`) and typed — a nullable one stays `T | null` (settable to\n *  null), a `NOT NULL` one is `T`. Omitted non-pk columns are left unchanged. */\nexport type UpdateOf<C extends AnyCols, PK extends string> = Simplify<PkOf<C, PK> & {\n    [K in Exclude<keyof C, PK>]?: ColT<C[K]>;\n}>;","description":"The UPDATE shape of a table: its {@link PkOfprimary-key columns} REQUIRED (they identify the row)\nplus every non-pk column OPTIONAL (`?`) and typed — a nullable one stays `T | null` (settable to\nnull), a `NOT NULL` one is `T`. Omitted non-pk columns are left unchanged.","source":"packages/client/src/schema.ts","line":145,"href":"/reference/typescript/remote/#symbol-UpdateOf"},{"name":"ValuePosition","originalName":"ValuePosition","kind":"TypeAliasDeclaration","signature":"/** A column reference or a literal — `type`-tagged. */\nexport type ValuePosition = {\n    type: \"column\";\n    name: string;\n} | {\n    type: \"literal\";\n    value: LitValue;\n};","description":"A column reference or a literal — `type`-tagged.","source":"packages/client/src/ast.ts","line":14,"href":"/reference/typescript/remote/#symbol-ValuePosition"},{"name":"ViewChangeListener","originalName":"ViewChangeListener","kind":"TypeAliasDeclaration","signature":"/** A per-view change listener ({@link ArrayView.onChanges}): the net `FlatChange[]` this view folded,\n *  the {@link ChangePhase} it arrived on, and the view's `WireSchema` (the position→name source for\n *  `resolveChange`). This is the DIFF the data channel ({@link ArrayView.subscribe}) discards — the\n *  seam a narrator drives off. The `schema` is passed (not closed over) because the first `snapshot`\n *  fires synchronously inside `materialize`, before the caller holds the view handle. */\nexport type ViewChangeListener = (changes: FlatChange[], phase: ChangePhase, schema: WireSchema) => void;","description":"A per-view change listener ({@link ArrayView.onChanges}): the net `FlatChange[]` this view folded,\nthe {@link ChangePhase} it arrived on, and the view's `WireSchema` (the position→name source for\n`resolveChange`). This is the DIFF the data channel ({@link ArrayView.subscribe}) discards — the\nseam a narrator drives off. The `schema` is passed (not closed over) because the first `snapshot`\nfires synchronously inside `materialize`, before the caller holds the view handle.","source":"packages/client/src/view.ts","line":30,"href":"/reference/typescript/remote/#symbol-ViewChangeListener"},{"name":"ViewTypes","originalName":"ViewTypes","kind":"InterfaceDeclaration","signature":"/** Per-level column types (parallel to the WireSchema), used to JSON.parse json columns on\n *  projection. Built by the Store from the typed schema; absent ⇒ no parsing (bare values). */\nexport interface ViewTypes {\n    columnTypes: ColType[];\n    rels: Record<number, ViewTypes>;\n}","description":"Per-level column types (parallel to the WireSchema), used to JSON.parse json columns on\nprojection. Built by the Store from the typed schema; absent ⇒ no parsing (bare values).","source":"packages/client/src/view.ts","line":16,"href":"/reference/typescript/remote/#symbol-ViewTypes"},{"name":"WireNode","originalName":"WireNode","kind":"InterfaceDeclaration","signature":"export interface WireNode {\n    row: WireValue[];\n    rels: {\n        rel: number;\n        children: WireNode[];\n    }[];\n}","description":"","source":"packages/client/src/types.ts","line":49,"href":"/reference/typescript/remote/#symbol-WireNode"},{"name":"WireProjection","originalName":"WireProjection","kind":"InterfaceDeclaration","signature":"/** A scalar-projection annotation on a relationship slot (REDUCE-DESIGN.md §9): a\n *  relationship aggregate (`issue { commentCount: count(comments) }`) lives as a singular\n *  one-row relationship whose child is the aggregate row; this tells the receiver to unwrap\n *  it into a scalar field — `commentCount: 5` instead of `commentCount: [{ count: 5 }]`. */\nexport interface WireProjection {\n    /** Which CHILD column to surface as the scalar value (the aggregate column). */\n    col: number;\n    /** The value to emit when the relationship is empty (a childless parent) — the\n     *  aggregate identity (`0` for count, `null` for sum/avg). */\n    identity: WireValue;\n}","description":"A scalar-projection annotation on a relationship slot (REDUCE-DESIGN.md §9): a\nrelationship aggregate (`issue { commentCount: count(comments) }`) lives as a singular\none-row relationship whose child is the aggregate row; this tells the receiver to unwrap\nit into a scalar field — `commentCount: 5` instead of `commentCount: [{ count: 5 }]`.","source":"packages/client/src/types.ts","line":22,"href":"/reference/typescript/remote/#symbol-WireProjection"},{"name":"WireRel","originalName":"WireRel","kind":"InterfaceDeclaration","signature":"export interface WireRel {\n    name: string;\n    slot: number;\n    /** `null` ⇒ an out-of-view / gating slot (the in-view gate drops `Child`s addressed here). */\n    child: WireSchema | null;\n    /** Non-null ⇒ a scalar-projected relationship aggregate the receiver unwraps to a scalar\n     *  (REDUCE-DESIGN.md §9). Absent/`null` for an ordinary (plural or `.one()`) relationship. */\n    project?: WireProjection | null;\n}","description":"","source":"packages/client/src/types.ts","line":30,"href":"/reference/typescript/remote/#symbol-WireRel"},{"name":"WireSchema","originalName":"WireSchema","kind":"InterfaceDeclaration","signature":"export interface WireSchema {\n    columns: string[];\n    primaryKey: number[];\n    /** Resolved, PK-completed sort: `[columnIndex, ascending]` pairs (the comparator input). */\n    sort: [\n        number,\n        boolean\n    ][];\n    singular: boolean;\n    relationships: WireRel[];\n}","description":"","source":"packages/client/src/types.ts","line":40,"href":"/reference/typescript/remote/#symbol-WireSchema"},{"name":"WireValue","originalName":"WireValue","kind":"TypeAliasDeclaration","signature":"/** A bare wire cell. (JSON columns arrive as their raw JSON string.) */\nexport type WireValue = number | string | boolean | null;","description":"A bare wire cell. (JSON columns arrive as their raw JSON string.)","source":"packages/client/src/types.ts","line":9,"href":"/reference/typescript/remote/#symbol-WireValue"},{"name":"WriteTx","originalName":"WriteTx","kind":"InterfaceDeclaration","signature":"/** The write transaction handed to `store.write(tx => …)`. Rows are objects keyed by column;\n *  the Store positionalizes them (and stringifies json columns) before the backend sees them.\n *\n *  `add` takes an {@link InsertOf} row — a nullable column may be omitted (it is filled with `null`,\n *  design 206 §7). `remove`/`edit` take a full {@link RowOf} row: they identify an EXISTING row, so\n *  every column (nullable ones as their actual `T | null` value) must be present. */\nexport interface WriteTx<S extends ColsMap> {\n    add<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): void;\n    remove<N extends keyof S & string>(table: N, row: RowOf<S[N]>): void;\n    edit<N extends keyof S & string>(table: N, oldRow: RowOf<S[N]>, newRow: RowOf<S[N]>): void;\n}","description":"The write transaction handed to `store.write(tx => …)`. Rows are objects keyed by column;\nthe Store positionalizes them (and stringifies json columns) before the backend sees them.\n\n`add` takes an {@link InsertOf} row — a nullable column may be omitted (it is filled with `null`,\ndesign 206 §7). `remove`/`edit` take a full {@link RowOf} row: they identify an EXISTING row, so\nevery column (nullable ones as their actual `T | null` value) must be present.","source":"packages/client/src/store.ts","line":44,"href":"/reference/typescript/remote/#symbol-WriteTx"},{"name":"WS_SUBPROTOCOL","originalName":"WS_SUBPROTOCOL","kind":"VariableDeclaration","signature":"/** The base ws subprotocol the browser offers alongside its `aff.*` ticket; the fleet follower\n *  echoes it on the 101 (a strict browser closes a socket whose selected subprotocol it never\n *  offered, so the base is always offered in affinity mode). Inlined — NOT imported from\n *  `@rindle/affinity`'s `WS_SUBPROTOCOL` — to keep that crate's `node:crypto` out of the browser\n *  bundle (the same duplicate-to-stay-bundle-clean discipline the lease wire types use). Keep the\n *  two spellings in lock-step. */\nexport declare const WS_SUBPROTOCOL = \"rindle.v1\";","description":"The base ws subprotocol the browser offers alongside its `aff.*` ticket; the fleet follower\nechoes it on the 101 (a strict browser closes a socket whose selected subprotocol it never\noffered, so the base is always offered in affinity mode). Inlined — NOT imported from\n`@rindle/affinity`'s `WS_SUBPROTOCOL` — to keep that crate's `node:crypto` out of the browser\nbundle (the same duplicate-to-stay-bundle-clean discipline the lease wire types use). Keep the\ntwo spellings in lock-step.","source":"packages/remote/src/affinity.ts","line":19,"href":"/reference/typescript/remote/#symbol-WS_SUBPROTOCOL"},{"name":"WsTransport","originalName":"WsTransport","kind":"ClassDeclaration","signature":"/** A `Transport` over a `WebSocket` (text JSON frames). Messages sent before the socket\n *  opens are buffered and flushed on open (so `registerQuery`/`mutate` can be called eagerly).\n *  Reconnects with capped exponential backoff: if the socket drops (e.g. the daemon restarted)\n *  it reopens and fires `onReconnect` so the source rebuilds its subscriptions. */\nexport declare class WsTransport implements Transport {\n    private readonly url;\n    /** Reads the subprotocols to offer at each (re)connect — in affinity mode, `[\"rindle.v1\", \"aff.…\"]`\n     *  with the CURRENT ticket (FOLLOWER-AFFINITY-DESIGN.md §5). Undefined ⇒ offer none (today's\n     *  single-daemon behavior, byte-identical). Evaluated per connect so a reconnect presents the\n     *  freshest (or freshly cleared) ticket. */\n    private readonly subprotocols?;\n    private ws;\n    private handler;\n    private reconnectHandler;\n    private downHandler;\n    /** Buffered as PRE-SERIALIZED frames: serialization happens at `send` time so an\n     *  unserializable message (a `bigint` query arg — `JSON.stringify` throws on bigint)\n     *  throws typed INTO ITS CALLER instead of detonating later inside the socket's\n     *  `open` listener, where it would strand every frame queued behind it. */\n    private readonly pending;\n    private open;\n    private everOpened;\n    private closedByUser;\n    private attempt;\n    private reconnectTimer;\n    /** Failed reconnect attempts after which the connection is declared \"down\" (fires `onDown`). */\n    private readonly downThreshold;\n    /** True once `onDown` has fired for the CURRENT down episode; reset on the next successful open\n     *  so a later outage fires again (but a single episode fires `onDown` exactly once — no re-lease\n     *  storm while a follower is gone). */\n    private downFired;\n    constructor(url: string, opts?: {\n        downThreshold?: number;\n        subprotocols?: () => string[];\n    });\n    private connect;\n    private scheduleReconnect;\n    send(msg: ClientMsg): void;\n    onMessage(handler: (msg: ServerMsg) => void): void;\n    onReconnect(handler: () => void): void;\n    onDown(handler: () => void): void;\n    close(): void;\n}","description":"A `Transport` over a `WebSocket` (text JSON frames). Messages sent before the socket\nopens are buffered and flushed on open (so `registerQuery`/`mutate` can be called eagerly).\nReconnects with capped exponential backoff: if the socket drops (e.g. the daemon restarted)\nit reopens and fires `onReconnect` so the source rebuilds its subscriptions.","source":"packages/remote/src/transport.ts","line":30,"href":"/reference/typescript/remote/#symbol-WsTransport"},{"name":"YieldEffect","originalName":"YieldEffect","kind":"TypeAliasDeclaration","signature":"/** Everything a generator mutator may `yield`: a write {@link MutationOp}, a point {@link ReadEffect},\n *  a full-query {@link QueryEffect}, or a {@link BatchEffect} fan-out. */\nexport type YieldEffect = MutationOp | ReadEffect | BatchEffect | QueryEffect;","description":"Everything a generator mutator may `yield`: a write {@link MutationOp}, a point {@link ReadEffect},\na full-query {@link QueryEffect}, or a {@link BatchEffect} fan-out.","source":"packages/client/src/mutation-ops.ts","line":95,"href":"/reference/typescript/remote/#symbol-YieldEffect"}]},{"name":"@rindle/replica","source":"rust/rindle-replica-node/src/index.ts","package":"@rindle/replica","symbols":[{"name":"Aggregate","originalName":"Aggregate","kind":"TypeAliasDeclaration","signature":"/** An aggregate over a (correlated) subquery's rows (`REDUCE-DESIGN.md`). v1: `count(*)`.\n *  Set on a `related` subquery (`Ast.aggregate`), it marks that relationship a count\n *  aggregate the builder lowers to a scalar-projected singular relationship (§9). */\nexport type Aggregate = \"count\";","description":"An aggregate over a (correlated) subquery's rows (`REDUCE-DESIGN.md`). v1: `count(*)`.\nSet on a `related` subquery (`Ast.aggregate`), it marks that relationship a count\naggregate the builder lowers to a scalar-projected singular relationship (§9).","source":"packages/client/src/ast.ts","line":67,"href":"/reference/typescript/replica/#symbol-Aggregate"},{"name":"and","originalName":"and","kind":"FunctionDeclaration","signature":"/** All children must hold. */\nexport declare function and<R>(...conds: Cond<R>[]): Cond<R>;","description":"All children must hold.","source":"packages/client/src/operators.ts","line":66,"href":"/reference/typescript/replica/#symbol-and"},{"name":"AnyCols","originalName":"AnyCols","kind":"TypeAliasDeclaration","signature":"export type AnyCols = Record<string, Col<unknown>>;","description":"","source":"packages/client/src/schema.ts","line":27,"href":"/reference/typescript/replica/#symbol-AnyCols"},{"name":"AnyQuery","originalName":"AnyQuery","kind":"TypeAliasDeclaration","signature":"export type AnyQuery = Query<any, any, any, any, any, any>;","description":"","source":"packages/client/src/query.ts","line":308,"href":"/reference/typescript/replica/#symbol-AnyQuery"},{"name":"AnyRelationship","originalName":"AnyRelationship","kind":"TypeAliasDeclaration","signature":"/** Any relationship, for positions that only read its correlation / child table. */\nexport type AnyRelationship = Relationship<AnyCols, AnyCols>;","description":"Any relationship, for positions that only read its correlation / child table.","source":"packages/client/src/schema.ts","line":469,"href":"/reference/typescript/replica/#symbol-AnyRelationship"},{"name":"AnyTable","originalName":"AnyTable","kind":"TypeAliasDeclaration","signature":"export type AnyTable = TableLike<AnyCols>;","description":"","source":"packages/client/src/schema.ts","line":102,"href":"/reference/typescript/replica/#symbol-AnyTable"},{"name":"Arg","originalName":"Arg","kind":"TypeAliasDeclaration","signature":"/** A field argument: its typed predicate, or a bare value (bare = `eq` sugar). */\nexport type Arg<V> = Pred<V> | V;","description":"A field argument: its typed predicate, or a bare value (bare = `eq` sugar).","source":"packages/client/src/operators.ts","line":47,"href":"/reference/typescript/replica/#symbol-Arg"},{"name":"ArgSchema","originalName":"ArgSchema","kind":"InterfaceDeclaration","signature":"/** The minimal arg validator a shared mutator can carry so the SERVER can parse UNTRUSTED wire args\n *  before driving it (the client trusts its typed callsites and never calls this). Structural on\n *  purpose — a zod schema satisfies it as-is — so `@rindle/client` stays validator-library-agnostic. */\nexport interface ArgSchema<Args> {\n    parse(raw: unknown): Args;\n}","description":"The minimal arg validator a shared mutator can carry so the SERVER can parse UNTRUSTED wire args\nbefore driving it (the client trusts its typed callsites and never calls this). Structural on\npurpose — a zod schema satisfies it as-is — so `@rindle/client` stays validator-library-agnostic.","source":"packages/client/src/mutation-ops.ts","line":161,"href":"/reference/typescript/replica/#symbol-ArgSchema"},{"name":"ArrayView","originalName":"ArrayView","kind":"InterfaceDeclaration","signature":"/** The public ArrayView contract `materialize()` returns. */\nexport interface ArrayView<R> {\n    /** The current materialized result (reference-stable where data is unchanged). */\n    readonly data: readonly R[];\n    /** The engine query id the Store assigned this view (1:1 with the view). The same `qid` the raw\n     *  change stream ({@link Store.subscribeChanges}) tags each frame with, so a consumer can\n     *  correlate this query with its `ChangeEvent`s (e.g. to bind a narrator) straight off\n     *  `materialize(query).qid` — no separate handle needed. */\n    readonly qid: QueryId;\n    /** The query's view `WireSchema` (the position→name source for {@link resolveChange}), captured\n     *  from its `hello` frame. `null` while PENDING — a remote backend's `hello` arrives async; an\n     *  in-process backend (wasm/replica) populates it synchronously during `materialize`. */\n    readonly schema: WireSchema | null;\n    /** The query's SERVER-CHANNEL state (`unknown` while loading, `complete` once server-authoritative;\n     *  the `error` variant is reserved and currently unproduced). A pending optimistic mutation no\n     *  longer moves this — it is a separate axis (FOLDED-MUTATIONS-DESIGN §7). `complete` for backends\n     *  with no server lifecycle. Changes notify subscribers. */\n    readonly resultType: ResultType;\n    /** Subscribe; fires immediately with the current data, then after each applied batch (and after\n     *  a {@link resultType} change — re-read `resultType` in the listener). */\n    subscribe(listener: (data: readonly R[]) => void): () => void;\n    /** Subscribe to this view's folded CHANGE stream — the `FlatChange[]` it applies, NET of no-op\n     *  cycles (a rebase's balanced `remove`+`add` / edit round-trip cancels, so a correctly predicted\n     *  optimistic write delivers nothing here). Carries the diff {@link subscribe} throws away; the\n     *  per-view seam a narrator rides. Does NOT replay on subscribe — attach via\n     *  `store.materialize(query, { onChanges })` to catch a synchronous backend's first snapshot.\n     *  A view with any change listener also enriches its own `remove` ops with the evicted subtree\n     *  (per-view, no global opt-in). Returns a detach function. */\n    onChanges(listener: ViewChangeListener): () => void;\n    /** Tear down + stop receiving updates. */\n    destroy(): void;\n}","description":"The public ArrayView contract `materialize()` returns.","source":"packages/client/src/view.ts","line":33,"href":"/reference/typescript/replica/#symbol-ArrayView"},{"name":"AssembledNode","originalName":"AssembledNode","kind":"InterfaceDeclaration","signature":"/** A single assembled (nested-by-name) row from `POST /query` (SSR-DESIGN.md §3.3): the cells\n *  under `cols`, each in-view relationship inlined by its alias (a nested array / object, or a\n *  scalar for a `countAs` aggregate). {@link Store.assembleSnapshot} converts these to the\n *  view's projected result shape. */\nexport interface AssembledNode {\n    cols: Record<string, WireValue>;\n    [rel: string]: unknown;\n}","description":"A single assembled (nested-by-name) row from `POST /query` (SSR-DESIGN.md §3.3): the cells\nunder `cols`, each in-view relationship inlined by its alias (a nested array / object, or a\nscalar for a `countAs` aggregate). {@link Store.assembleSnapshot} converts these to the\nview's projected result shape.","source":"packages/client/src/store.ts","line":33,"href":"/reference/typescript/replica/#symbol-AssembledNode"},{"name":"assembleDurableText","originalName":"assembleDurableText","kind":"FunctionDeclaration","signature":"/**\n * The durable half of the splice for the mapped-table layout: the compacted `body` followed by\n * whatever chunk rows have not been folded into it yet.\n *\n * Chunks are ALWAYS the suffix after `body` — the closing checkpoint rewrites `body` and drops the\n * chunks it absorbed in ONE transaction — so a reader never observes a torn state where a chunk both\n * is and is not in the body.\n */\nexport declare function assembleDurableText(message: {\n    body?: string | null;\n} | null | undefined, chunks?: ReadonlyArray<{\n    seq: number;\n    text: string;\n}>): string;","description":"The durable half of the splice for the mapped-table layout: the compacted `body` followed by\nwhatever chunk rows have not been folded into it yet.\n\nChunks are ALWAYS the suffix after `body` — the closing checkpoint rewrites `body` and drops the\nchunks it absorbed in ONE transaction — so a reader never observes a torn state where a chunk both\nis and is not in the body.","source":"packages/client/src/stream.ts","line":87,"href":"/reference/typescript/replica/#symbol-assembleDurableText"},{"name":"assertNoLocalTables","originalName":"assertNoLocalTables","kind":"FunctionDeclaration","signature":"/** Throw if `ast` references a local-only table ANYWHERE — the complete form of the {@link queries}\n *  root guard (Q1 / E3 client half). The root proxy `get` only sees the table accessed off the\n *  builder root; a local table reached through a relationship / `sub` / `countAs` / `exists` CHILD is\n *  passed as a value and never touches the proxy, so it is caught here instead: at `.ast()` for a\n *  server-scope builder, and again as an SSR backstop in `ServerStore.preload`. A server/named query\n *  may never name a local table (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5). */\nexport declare function assertNoLocalTables<S extends ColsMap>(ast: Ast, schema: Schema<S>): void;","description":"Throw if `ast` references a local-only table ANYWHERE — the complete form of the {@link queries}\nroot guard (Q1 / E3 client half). The root proxy `get` only sees the table accessed off the\nbuilder root; a local table reached through a relationship / `sub` / `countAs` / `exists` CHILD is\npassed as a value and never touches the proxy, so it is caught here instead: at `.ast()` for a\nserver-scope builder, and again as an SSR backstop in `ServerStore.preload`. A server/named query\nmay never name a local table (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5).","source":"packages/client/src/query.ts","line":845,"href":"/reference/typescript/replica/#symbol-assertNoLocalTables"},{"name":"Ast","originalName":"Ast","kind":"InterfaceDeclaration","signature":"/** The query AST. `table` is the only required field; the builder omits empty/false fields\n *  (matching the Rust `skip_serializing_if`), which the deserializer treats as absent. */\nexport interface Ast {\n    table: string;\n    alias?: string;\n    /** Projection (PROJECTION-SUPPORT-DESIGN.md §6). Absent ⇒ select all columns; present ⇒\n     *  project to just these (drives what syncs + what the view reports). Serializes only when\n     *  set, matching the Rust `Ast.select`'s `skip_serializing_if`. */\n    select?: string[];\n    where?: Condition;\n    related?: CorrelatedSubquery[];\n    start?: Bound;\n    limit?: number;\n    one?: boolean;\n    /** Aggregate this (sub)query's rows instead of materializing them (`REDUCE-DESIGN.md`\n     *  §9). `count` on a `related` subquery surfaces a scalar `commentCount` field; the\n     *  builder lowers it to a scalar-projected singular relationship. Absent ⇒ ordinary rows. */\n    aggregate?: Aggregate;\n    /** The {@link Ast.aggregate} value is **precomputed** — supplied as rows of a (synthetic)\n     *  source table rather than reduced from child rows. Set by the normalized client's AST\n     *  rewrite (`AGGREGATE-SYNC-DESIGN.md` §3.3) so the local engine reads the server's count\n     *  with a plain singular join + the same projection instead of a `reduce`. Only meaningful\n     *  with `aggregate`; absent ⇒ `false`. */\n    aggregatePrecomputed?: boolean;\n    /** Top-level `GROUP BY` columns (names), meaningful only alongside a root {@link Ast.aggregate}\n     *  (`REDUCE-DESIGN.md` §8). Empty + `aggregate` set ⇒ a **global** aggregate (one `[count]` row);\n     *  non-empty ⇒ one `[group…, count]` row per distinct value-tuple. Distinct from a relationship\n     *  aggregate's implicit grouping (the correlation child key). Absent on the wire ⇒ empty. */\n    groupBy?: string[];\n    /** `HAVING` — a filter over the **post-aggregation** rows of a root {@link Ast.aggregate}\n     *  (`REDUCE-DESIGN.md` §4: a filter directly above the `reduce`). Its condition addresses the\n     *  aggregate's *output* columns — the {@link Ast.groupBy} columns and the synthetic `count`\n     *  column — not base-table columns (those go in {@link Ast.where}, which filters rows *below* the\n     *  reduce). Absent ⇒ no post-aggregation filter. */\n    having?: Condition;\n    orderBy?: OrderPart[];\n}","description":"The query AST. `table` is the only required field; the builder omits empty/false fields\n(matching the Rust `skip_serializing_if`), which the deserializer treats as absent.","source":"packages/client/src/ast.ts","line":71,"href":"/reference/typescript/replica/#symbol-Ast"},{"name":"AsyncEffectExec","originalName":"AsyncEffectExec","kind":"InterfaceDeclaration","signature":"/** A tier's ASYNCHRONOUS effect executor (the server transaction): every op is a Promise. */\nexport interface AsyncEffectExec {\n    apply(op: MutationOp): Promise<void>;\n    read(table: string, pk: KeyedRow): Promise<KeyedRow | undefined>;\n    query(q: QueryArg): Promise<QueryResultRow[]>;\n}","description":"A tier's ASYNCHRONOUS effect executor (the server transaction): every op is a Promise.","source":"packages/client/src/mutation-ops.ts","line":247,"href":"/reference/typescript/replica/#symbol-AsyncEffectExec"},{"name":"Backend","originalName":"Backend","kind":"InterfaceDeclaration","signature":"/**\n * The seam the core talks to. Backend-agnostic: the same interface for the in-process\n * WASM backend and a remote (network) backend. The core never knows which. A backend\n * pushes a per-query {@link ChangeEvent} stream via {@link Backend.onEvent}; the remote\n * backend additionally owns the epoch/seq/gap protocol and emits only clean, in-order\n * events (so the ArrayView never sees the wire protocol).\n */\nexport interface Backend {\n    registerQuery(queryId: QueryId, ast: unknown, remote?: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Optional split path for local-first backends: retain/release a named remote footprint\n     *  without creating another local materialized view. `localQueryId`, when provided, names\n     *  the local AST view this remote footprint feeds. `ast`, when provided, gives the backend\n     *  the local schema context for sync-only retains that still need aggregate/table setup. */\n    retainRemoteQuery?(queryId: QueryId, remote: RemoteQuery, localQueryId?: QueryId, ast?: Ast): void;\n    releaseRemoteQuery?(queryId: QueryId): void;\n    /** Local: applies now (changes flow back on the stream). Remote: sends to the server. */\n    mutate(mutations: Mutation[]): Promise<void>;\n    /** Optional DIRECT-COMMIT path for LOCAL-only tables (`201-LOCAL-ONLY-TABLES-DESIGN.md` §6):\n     *  applies the writes straight to the engine, OUTSIDE the optimistic pending stack (a local\n     *  table is untracked, so it never rebases). The backend rejects any synced/tracked table (M2).\n     *  Backends with no local-table support (a plain remote sync backend) omit it.\n     *\n     *  `onCommitted` (207 §5.1) runs after the engine commit is applied but BEFORE subscriber\n     *  delivery: a subscriber throwing during delivery re-raises out of this call, and a caller\n     *  that must stay coherent with the engine (the persistence tap) cannot tell that throw from\n     *  a pre-commit rejection — the callback can, because it fires exactly when the commit is in. */\n    writeLocal?(mutations: Mutation[], onCommitted?: () => void): void;\n    onEvent(handler: (queryId: QueryId, event: ChangeEvent) => void): void;\n    /** Optional: the backend pushes per-query {@link ResultType} changes here and the core routes\n     *  each to the matching view (so `view.resultType` tracks it). Backends with no lifecycle (the\n     *  in-process engine) omit it and every view stays `complete`. */\n    onResultType?(handler: (queryId: QueryId, resultType: ResultType) => void): void;\n    /** Optional: brackets one commit's coherent multi-query delivery so the Store can fold every\n     *  affected view BEFORE notifying any subscriber — cross-view-atomic notification. The\n     *  in-process engine derives the whole commit's per-query deltas against one consistent post-\n     *  commit snapshot, then dispatches them one query at a time; without a barrier a subscriber on\n     *  the first-dispatched view, re-reading a sibling view in its callback, would observe that\n     *  sibling's PRE-commit state (it has not folded yet). The backend calls the handler with\n     *  `\"begin\"` before delivering a commit's per-query `batch` events (via {@link onEvent}) and\n     *  `\"end\"` after the last one; between them the Store folds each view but DEFERS its\n     *  notification, firing every affected view's subscribers together at `\"end\"`. Backends with no\n     *  synchronous multi-query commit boundary (a plain remote backend, where each query's frame\n     *  arrives in its own message) omit it — the Store then notifies per event, exactly as before. */\n    onCommitBoundary?(handler: (phase: \"begin\" | \"end\") => void): void;\n    /** Optional dev-only authoritative server stream tap. It is additive, like\n     *  `Store.subscribeChanges`, and must not displace the backend's normal event handler. */\n    __attachDevtoolsServerDeltas?(observer: BackendDevObserver): () => void;\n}","description":"The seam the core talks to. Backend-agnostic: the same interface for the in-process\nWASM backend and a remote (network) backend. The core never knows which. A backend\npushes a per-query {@link ChangeEvent} stream via {@link Backend.onEvent}; the remote\nbackend additionally owns the epoch/seq/gap protocol and emits only clean, in-order\nevents (so the ArrayView never sees the wire protocol).","source":"packages/client/src/types.ts","line":171,"href":"/reference/typescript/replica/#symbol-Backend"},{"name":"BackendDevObserver","originalName":"BackendDevObserver","kind":"InterfaceDeclaration","signature":"/** Dev-only passive tap over a backend's authoritative server stream. Optional because in-process\n *  backends have no server stream, and older/custom backends may only expose the Store tap. */\nexport interface BackendDevObserver {\n    onServerDelta?(qid: QueryId, ev: BackendServerDelta): void;\n}","description":"Dev-only passive tap over a backend's authoritative server stream. Optional because in-process\nbackends have no server stream, and older/custom backends may only expose the Store tap.","source":"packages/client/src/types.ts","line":140,"href":"/reference/typescript/replica/#symbol-BackendDevObserver"},{"name":"BackendServerDelta","originalName":"BackendServerDelta","kind":"TypeAliasDeclaration","signature":"/** A dev-only authoritative server delta exposed by backends that can distinguish the upstream\n *  server stream from their local view/IVM stream. Flat remote backends surface clean\n *  {@link ChangeEvent}s; local-first normalized/optimistic backends surface the path-free\n *  {@link NormalizedEvent}s before they are folded into the local engine. */\nexport type BackendServerDelta = {\n    format: \"flat\";\n    event: ChangeEvent;\n} | {\n    format: \"normalized\";\n    event: NormalizedEvent;\n};","description":"A dev-only authoritative server delta exposed by backends that can distinguish the upstream\nserver stream from their local view/IVM stream. Flat remote backends surface clean\n{@link ChangeEvent}s; local-first normalized/optimistic backends surface the path-free\n{@link NormalizedEvent}s before they are folded into the local engine.","source":"packages/client/src/types.ts","line":134,"href":"/reference/typescript/replica/#symbol-BackendServerDelta"},{"name":"BatchEffect","originalName":"BatchEffect","kind":"TypeAliasDeclaration","signature":"/** A fan-out a generator mutator yields: run several effects \"together\". The server driver resolves\n *  them with `Promise.all`; the client driver runs them in array order (already synchronous). Results\n *  return in the same order on both tiers. Each result has its effect's shape: a row, query rows,\n *  `undefined` for a write, or an array for a nested batch. Cast the yielded result to that shape;\n *  the generator's declared next-type covers only point reads. */\nexport type BatchEffect = {\n    kind: \"all\";\n    effects: readonly YieldEffect[];\n};","description":"A fan-out a generator mutator yields: run several effects \"together\". The server driver resolves\nthem with `Promise.all`; the client driver runs them in array order (already synchronous). Results\nreturn in the same order on both tiers. Each result has its effect's shape: a row, query rows,\n`undefined` for a write, or an array for a nested batch. Cast the yielded result to that shape;\nthe generator's declared next-type covers only point reads.","source":"packages/client/src/mutation-ops.ts","line":72,"href":"/reference/typescript/replica/#symbol-BatchEffect"},{"name":"boolean","originalName":"boolean","kind":"VariableDeclaration","signature":"export declare const boolean: () => ColBuilder<boolean>;","description":"","source":"packages/client/src/schema.ts","line":48,"href":"/reference/typescript/replica/#symbol-boolean"},{"name":"Bound","originalName":"Bound","kind":"InterfaceDeclaration","signature":"/** A paging lower bound (`Bound`, `src/ast.rs`). `row` is a *partial* wire row — the bound\n *  columns by name (only the sort columns are read by the engine's `Skip` comparator).\n *  `exclusive` ⇒ start *after* the bound row (`Basis::After`); else *at* it (`Basis::At`). */\nexport interface Bound {\n    row: Record<string, LitValue>;\n    exclusive: boolean;\n}","description":"A paging lower bound (`Bound`, `src/ast.rs`). `row` is a *partial* wire row — the bound\ncolumns by name (only the sort columns are read by the engine's `Skip` comparator).\n`exclusive` ⇒ start *after* the bound row (`Basis::After`); else *at* it (`Basis::At`).","source":"packages/client/src/ast.ts","line":53,"href":"/reference/typescript/replica/#symbol-Bound"},{"name":"CachedQueryView","originalName":"CachedQueryView","kind":"InterfaceDeclaration","signature":"export interface CachedQueryView<Q extends Query<any, any, any>> {\n    readonly view: ReturnType<Q[\"materialize\"]>;\n    /** Retain this query's named remote footprint and release it later. Ad-hoc local queries\n     *  return a no-op release function. */\n    retain(query: Q): () => void;\n    destroy(): void;\n}","description":"","source":"packages/client/src/store.ts","line":50,"href":"/reference/typescript/replica/#symbol-CachedQueryView"},{"name":"ChangeEvent","originalName":"ChangeEvent","kind":"TypeAliasDeclaration","signature":"/**\n * What a {@link Backend} pushes per query: the handshake (`hello`), the (possibly\n * chunked) hydrate `snapshot`, then incremental `batch`es. The core builds an ArrayView\n * on `hello`, hydrates on `snapshot`, folds on `batch` — identically for any backend.\n */\nexport type ChangeEvent = {\n    type: \"hello\";\n    schema: WireSchema;\n    comparatorVersion: number;\n} | {\n    type: \"snapshot\";\n    adds: FlatChange[];\n    last: boolean;\n} | {\n    type: \"batch\";\n    events: FlatChange[];\n    catchUp?: boolean;\n};","description":"What a {@link Backend} pushes per query: the handshake (`hello`), the (possibly\nchunked) hydrate `snapshot`, then incremental `batch`es. The core builds an ArrayView\non `hello`, hydrates on `snapshot`, folds on `batch` — identically for any backend.","source":"packages/client/src/types.ts","line":79,"href":"/reference/typescript/replica/#symbol-ChangeEvent"},{"name":"ChangePhase","originalName":"ChangePhase","kind":"TypeAliasDeclaration","signature":"/** The phase of an {@link ArrayView.onChanges} delivery: the initial hydrate `snapshot` vs a later\n *  incremental `batch` — the same distinction a narrator draws (`ChangeEvent` `snapshot`/`batch`). */\nexport type ChangePhase = \"snapshot\" | \"batch\";","description":"The phase of an {@link ArrayView.onChanges} delivery: the initial hydrate `snapshot` vs a later\nincremental `batch` — the same distinction a narrator draws (`ChangeEvent` `snapshot`/`batch`).","source":"packages/client/src/view.ts","line":23,"href":"/reference/typescript/replica/#symbol-ChangePhase"},{"name":"CLIENT_MUTATIONS_SCHEMA","originalName":"CLIENT_MUTATIONS_SCHEMA","kind":"VariableDeclaration","signature":"/** The system table's wire schema — appended to the client's expected schemas so the\n *  lmid query's `hello` passes CRIT#4 validation. */\nexport declare const CLIENT_MUTATIONS_SCHEMA: NormalizedTableSchema;","description":"The system table's wire schema — appended to the client's expected schemas so the\nlmid query's `hello` passes CRIT#4 validation.","source":"packages/client/src/types.ts","line":291,"href":"/reference/typescript/replica/#symbol-CLIENT_MUTATIONS_SCHEMA"},{"name":"CLIENT_MUTATIONS_TABLE","originalName":"CLIENT_MUTATIONS_TABLE","kind":"VariableDeclaration","signature":"/** The replicated bookkeeping table carrying each client's high-water mutation id\n *  (`lmid`). Engine-hosted and served like any base table; reserved (never part of a\n *  user schema). Columns: `[client_id, last_mutation_id]`, PK `client_id`. */\nexport declare const CLIENT_MUTATIONS_TABLE = \"_rindle_client_mutations\";","description":"The replicated bookkeeping table carrying each client's high-water mutation id\n(`lmid`). Engine-hosted and served like any base table; reserved (never part of a\nuser schema). Columns: `[client_id, last_mutation_id]`, PK `client_id`.","source":"packages/client/src/types.ts","line":282,"href":"/reference/typescript/replica/#symbol-CLIENT_MUTATIONS_TABLE"},{"name":"Col","originalName":"Col","kind":"InterfaceDeclaration","signature":"/** A column descriptor. `type` drives the comparator + JSON parsing; `__t` is a phantom. A\n *  nullable column is a `Col<T | null>` — that is the ONLY thing nullability changes at the type\n *  level, so `RowOf` (and the field-condition factory) widen automatically.\n *\n *  `optional` is the runtime companion of that phantom: set by {@link ColBuilder.nullable}, it is\n *  what the write funnels read to make a nullable column omittable from an insert (filled with\n *  `null`, design 206 §6.2). It mirrors the engine's `ColumnDef.optional`\n *  (`pragma_table_info.notnull == 0`); absent ⇒ `NOT NULL` / required. */\nexport interface Col<T> {\n    readonly type: ColType;\n    readonly optional?: boolean;\n    readonly __t?: T;\n}","description":"A column descriptor. `type` drives the comparator + JSON parsing; `__t` is a phantom. A\nnullable column is a `Col<T | null>` — that is the ONLY thing nullability changes at the type\nlevel, so `RowOf` (and the field-condition factory) widen automatically.\n\n`optional` is the runtime companion of that phantom: set by {@link ColBuilder.nullable}, it is\nwhat the write funnels read to make a nullable column omittable from an insert (filled with\n`null`, design 206 §6.2). It mirrors the engine's `ColumnDef.optional`\n(`pragma_table_info.notnull == 0`); absent ⇒ `NOT NULL` / required.","source":"packages/client/src/schema.ts","line":21,"href":"/reference/typescript/replica/#symbol-Col"},{"name":"ColBuilder","originalName":"ColBuilder","kind":"InterfaceDeclaration","signature":"/** The chainable form returned by the column factories: a {@link Col} plus `.nullable()`.\n *\n *  `.nullable()` widens the column's value type to `T | null` — its `Row<…>` field becomes\n *  `T | null` — and sets the runtime {@link Col.optional} marker so it may be omitted from an insert\n *  (design 206 §6.2). `rindle schema gen` emits `.nullable()` for every nullable (non-`NOT NULL`) SQL\n *  column; you can also call it by hand on a local-only table's columns. It is idempotent and stays\n *  chainable. */\nexport interface ColBuilder<T> extends Col<T> {\n    nullable(): ColBuilder<T | null>;\n}","description":"The chainable form returned by the column factories: a {@link Col} plus `.nullable()`.\n\n`.nullable()` widens the column's value type to `T | null` — its `Row<…>` field becomes\n`T | null` — and sets the runtime {@link Col.optional} marker so it may be omitted from an insert\n(design 206 §6.2). `rindle schema gen` emits `.nullable()` for every nullable (non-`NOT NULL`) SQL\ncolumn; you can also call it by hand on a local-only table's columns. It is idempotent and stays\nchainable.","source":"packages/client/src/schema.ts","line":37,"href":"/reference/typescript/replica/#symbol-ColBuilder"},{"name":"ColRefinements","originalName":"ColRefinements","kind":"TypeAliasDeclaration","signature":"/** Per-column narrowings for {@link refineTable}: each entry must keep the column's kind and narrow\n *  its TS type (`Col<T2>` with `T2 extends T`) — `json<Meta>()` on a json column, a literal-union\n *  `string<\"a\" | \"b\">()` on a string column. Kind changes are rejected (cross-kind at compile time,\n *  same-phantom kind flips like `string()` on a json column at runtime). */\nexport type ColRefinements<C extends AnyCols> = {\n    readonly [K in keyof C]?: Col<ColT<C[K]>>;\n};","description":"Per-column narrowings for {@link refineTable}: each entry must keep the column's kind and narrow\nits TS type (`Col<T2>` with `T2 extends T`) — `json<Meta>()` on a json column, a literal-union\n`string<\"a\" | \"b\">()` on a string column. Kind changes are rejected (cross-kind at compile time,\nsame-phantom kind flips like `string()` on a json column at runtime).","source":"packages/client/src/schema.ts","line":303,"href":"/reference/typescript/replica/#symbol-ColRefinements"},{"name":"ColsMap","originalName":"ColsMap","kind":"TypeAliasDeclaration","signature":"/** name → columns, the resolved schema map carried in the {@link Schema} type. */\nexport type ColsMap = Record<string, AnyCols>;","description":"name → columns, the resolved schema map carried in the {@link Schema} type.","source":"packages/client/src/schema.ts","line":199,"href":"/reference/typescript/replica/#symbol-ColsMap"},{"name":"ColT","originalName":"ColT","kind":"TypeAliasDeclaration","signature":"export type ColT<X> = X extends Col<infer T> ? T : never;","description":"","source":"packages/client/src/schema.ts","line":26,"href":"/reference/typescript/replica/#symbol-ColT"},{"name":"ColType","originalName":"ColType","kind":"TypeAliasDeclaration","signature":"/** Declared column type (from the typed schema) — drives the comparator + JSON parsing.\n *  `\"int64\"` is the exact-i64 column plane (design 226): the vocabulary exists from\n *  Stage C4 (codegen can name it), but no exact integer cell crosses this wire — and\n *  `WireValue` gains no `bigint` — until Stage E lands the browser bigint plane; until\n *  then the daemon refuses IVM queries whose footprint touches such a column. */\nexport type ColType = \"string\" | \"number\" | \"boolean\" | \"json\" | \"int64\";","description":"Declared column type (from the typed schema) — drives the comparator + JSON parsing.\n`\"int64\"` is the exact-i64 column plane (design 226): the vocabulary exists from\nStage C4 (codegen can name it), but no exact integer cell crosses this wire — and\n`WireValue` gains no `bigint` — until Stage E lands the browser bigint plane; until\nthen the daemon refuses IVM queries whose footprint touches such a column.","source":"packages/client/src/types.ts","line":16,"href":"/reference/typescript/replica/#symbol-ColType"},{"name":"COMPARATOR_VERSION","originalName":"COMPARATOR_VERSION","kind":"VariableDeclaration","signature":"/** The `compare_values` / `compare_rows` algorithm-contract version (=== the engine's\n *  `wire_schema::COMPARATOR_VERSION`). A remote subscriber hard-rejects a `hello` whose\n *  `comparatorVersion` differs — the total order is a code contract, not data, so a schema\n *  fingerprint can't cover it. Bump in lockstep with the Rust constant if the order changes.\n *\n *  v2 (design 226 Stage B): the engine's mixed Int/Float comparison became exact instead\n *  of f64-widening. No TS behavior change — every value a client can hold today is an f64\n *  `number`, on which v1 and v2 order identically (the §8 gate keeps int64 cells out of\n *  the browser until Stage E) — but the contract the version names is the engine's. */\nexport declare const COMPARATOR_VERSION = 2;","description":"The `compare_values` / `compare_rows` algorithm-contract version (=== the engine's\n`wire_schema::COMPARATOR_VERSION`). A remote subscriber hard-rejects a `hello` whose\n`comparatorVersion` differs — the total order is a code contract, not data, so a schema\nfingerprint can't cover it. Bump in lockstep with the Rust constant if the order changes.\n\nv2 (design 226 Stage B): the engine's mixed Int/Float comparison became exact instead\nof f64-widening. No TS behavior change — every value a client can hold today is an f64\n`number`, on which v1 and v2 order identically (the §8 gate keeps int64 cells out of\nthe browser until Stage E) — but the contract the version names is the engine's.","source":"packages/client/src/compare.ts","line":28,"href":"/reference/typescript/replica/#symbol-COMPARATOR_VERSION"},{"name":"compareNumber","originalName":"compareNumber","kind":"FunctionDeclaration","signature":"/** number compare with `f64::total_cmp` semantics (NaN deterministic & last; -0 < +0). */\nexport declare function compareNumber(a: number, b: number): -1 | 0 | 1;","description":"number compare with `f64::total_cmp` semantics (NaN deterministic & last; -0 < +0).","source":"packages/client/src/compare.ts","line":44,"href":"/reference/typescript/replica/#symbol-compareNumber"},{"name":"compareRows","originalName":"compareRows","kind":"FunctionDeclaration","signature":"/** Compare two rows by a resolved sort (`[columnIndex, ascending]` pairs). First non-equal\n *  column wins; a descending column negates. */\nexport declare function compareRows(a: WireValue[], b: WireValue[], sort: [\n    number,\n    boolean\n][]): -1 | 0 | 1;","description":"Compare two rows by a resolved sort (`[columnIndex, ascending]` pairs). First non-equal\ncolumn wins; a descending column negates.","source":"packages/client/src/compare.ts","line":84,"href":"/reference/typescript/replica/#symbol-compareRows"},{"name":"compareString","originalName":"compareString","kind":"FunctionDeclaration","signature":"/** UTF-8 bytewise string compare (=== SQLite `BINARY` / Rust `&str` Ord). Correct for\n *  supplementary-plane code points, where JS `<` / `localeCompare` (UTF-16) would disagree. */\nexport declare function compareString(a: string, b: string): -1 | 0 | 1;","description":"UTF-8 bytewise string compare (=== SQLite `BINARY` / Rust `&str` Ord). Correct for\nsupplementary-plane code points, where JS `<` / `localeCompare` (UTF-16) would disagree.","source":"packages/client/src/compare.ts","line":52,"href":"/reference/typescript/replica/#symbol-compareString"},{"name":"compareValue","originalName":"compareValue","kind":"FunctionDeclaration","signature":"/** Compare two bare cells, dispatching on the runtime type (null sorts first). */\nexport declare function compareValue(a: WireValue, b: WireValue): -1 | 0 | 1;","description":"Compare two bare cells, dispatching on the runtime type (null sorts first).","source":"packages/client/src/compare.ts","line":63,"href":"/reference/typescript/replica/#symbol-compareValue"},{"name":"Cond","originalName":"Cond","kind":"TypeAliasDeclaration","signature":"/** A condition over row `R`. The runtime value is the wire {@link Condition}; `R` is a\n *  phantom brand so a condition for one table can't be `.where()`d onto another. */\nexport type Cond<R> = Condition & {\n    readonly __row?: R;\n};","description":"A condition over row `R`. The runtime value is the wire {@link Condition}; `R` is a\nphantom brand so a condition for one table can't be `.where()`d onto another.","source":"packages/client/src/operators.ts","line":51,"href":"/reference/typescript/replica/#symbol-Cond"},{"name":"Condition","originalName":"Condition","kind":"TypeAliasDeclaration","signature":"/** The filter tree — `type`-tagged; recursive. There is no generic NOT node (negation is\n *  via the negated operators and `NOT EXISTS`, matching `src/ast.rs` `Condition`). */\nexport type Condition = {\n    type: \"simple\";\n    op: SimpleOp;\n    left: ValuePosition;\n    right: ValuePosition;\n} | {\n    type: \"and\";\n    conditions: Condition[];\n} | {\n    type: \"or\";\n    conditions: Condition[];\n} | {\n    type: \"correlatedSubquery\";\n    related: CorrelatedSubquery;\n    op: ExistsOp;\n    flip?: boolean;\n    scalar?: boolean;\n};","description":"The filter tree — `type`-tagged; recursive. There is no generic NOT node (negation is\nvia the negated operators and `NOT EXISTS`, matching `src/ast.rs` `Condition`).","source":"packages/client/src/ast.ts","line":39,"href":"/reference/typescript/replica/#symbol-Condition"},{"name":"CorrelatedSubquery","originalName":"CorrelatedSubquery","kind":"InterfaceDeclaration","signature":"export interface CorrelatedSubquery {\n    correlation: Correlation;\n    subquery: Ast;\n    system?: \"client\" | \"permissions\" | \"test\";\n}","description":"","source":"packages/client/src/ast.ts","line":58,"href":"/reference/typescript/replica/#symbol-CorrelatedSubquery"},{"name":"Correlation","originalName":"Correlation","kind":"InterfaceDeclaration","signature":"export interface Correlation {\n    parentField: string[];\n    childField: string[];\n}","description":"","source":"packages/client/src/ast.ts","line":45,"href":"/reference/typescript/replica/#symbol-Correlation"},{"name":"createLocalFragmentRef","originalName":"createLocalFragmentRef","kind":"FunctionDeclaration","signature":"export declare function createLocalFragmentRef<F extends Fragment<any, any, any>>(fragment: F, pk: Record<string, LitValue>, coverage: FragmentCoverage): LocalFragmentRef<F>;","description":"","source":"packages/client/src/query.ts","line":610,"href":"/reference/typescript/replica/#symbol-createLocalFragmentRef"},{"name":"createLocalFragmentRefForTable","originalName":"createLocalFragmentRefForTable","kind":"FunctionDeclaration","signature":"export declare function createLocalFragmentRefForTable<F extends Fragment<any, any, any>>(table: string, pk: Record<string, LitValue>, coverage: FragmentCoverage): LocalFragmentRef<F>;","description":"","source":"packages/client/src/query.ts","line":618,"href":"/reference/typescript/replica/#symbol-createLocalFragmentRefForTable"},{"name":"createReplicaStore","originalName":"createReplicaStore","kind":"FunctionDeclaration","signature":"/** Create a local {@link Store} over a fresh temporary SQLite database. The schema creates the\n *  tables; there is no file-path or restart-persistence option. Destroy materialized views when\n *  finished. The native replica's temporary files are removed when its handle is finalized. */\nexport declare function createReplicaStore<S extends ColsMap>(schema: Schema<S>): Store<S>;","description":"Create a local {@link Store} over a fresh temporary SQLite database. The schema creates the\ntables; there is no file-path or restart-persistence option. Destroy materialized views when\nfinished. The native replica's temporary files are removed when its handle is finalized.","source":"rust/rindle-replica-node/src/index.ts","line":156,"href":"/reference/typescript/replica/#symbol-createReplicaStore"},{"name":"createRootFragmentRef","originalName":"createRootFragmentRef","kind":"FunctionDeclaration","signature":"export declare function createRootFragmentRef<F extends Fragment<any, any, any>, Q extends AnyQuery>(fragment: F, query: Q, coverageKey?: string): LocalFragmentRef<F>;","description":"","source":"packages/client/src/query.ts","line":632,"href":"/reference/typescript/replica/#symbol-createRootFragmentRef"},{"name":"createSchema","originalName":"createSchema","kind":"FunctionDeclaration","signature":"export declare function createSchema<const T extends readonly AnyTable[]>(opts: {\n    tables: T;\n}): Schema<SchemaOf<T>, PkMapOf<T>>;","description":"","source":"packages/client/src/schema.ts","line":227,"href":"/reference/typescript/replica/#symbol-createSchema"},{"name":"createServerStore","originalName":"createServerStore","kind":"FunctionDeclaration","signature":"/** Construct a {@link ServerStore} — the one-shot REST Store for server-side rendering. */\nexport declare function createServerStore<S extends ColsMap>(schema: Schema<S>, opts: ServerStoreOptions): ServerStore<S>;","description":"Construct a {@link ServerStore} — the one-shot REST Store for server-side rendering.","source":"packages/client/src/ssr.ts","line":140,"href":"/reference/typescript/replica/#symbol-createServerStore"},{"name":"defineFragment","originalName":"defineFragment","kind":"FunctionDeclaration","signature":"/**\n * Define a co-located, composable {@link Fragment}: a named selection over `table`. The returned\n * value is callable (the `build` transform), so it threads through the existing `sub`/`Rels`\n * spine — no GraphQL, no codegen, no schema change (design §3).\n *\n * ```ts\n * const UserAvatar = defineFragment(schema.user, (f) => f.select(\"id\", \"name\", \"avatarUrl\"));\n * const CommentRow = defineFragment(schema.comment, (f) =>\n *   f.select(\"id\", \"body\", \"authorId\")\n *    .sub(\"author\", schema.user, { parent: [\"authorId\"], child: [\"id\"] }, UserAvatar));\n * ```\n */\nexport declare function defineFragment<C extends AnyCols, Rels = {}, Sel extends string = never, LocalRels = Rels>(table: TableLike<C>, build: (q: Query<C>) => Query<C, Rels, boolean, Sel, LocalRels>): Fragment<C, Rels, Sel, LocalRels>;","description":"Define a co-located, composable {@link Fragment}: a named selection over `table`. The returned\nvalue is callable (the `build` transform), so it threads through the existing `sub`/`Rels`\nspine — no GraphQL, no codegen, no schema change (design §3).\n\n```ts\nconst UserAvatar = defineFragment(schema.user, (f) => f.select(\"id\", \"name\", \"avatarUrl\"));\nconst CommentRow = defineFragment(schema.comment, (f) =>\n  f.select(\"id\", \"body\", \"authorId\")\n   .sub(\"author\", schema.user, { parent: [\"authorId\"], child: [\"id\"] }, UserAvatar));\n```","source":"packages/client/src/query.ts","line":577,"href":"/reference/typescript/replica/#symbol-defineFragment"},{"name":"defineMutators","originalName":"defineMutators","kind":"FunctionDeclaration","signature":"export declare function defineMutators<S extends ColsMap, P extends Record<string, string>>(_schema: Schema<S, P>): {\n    shared<Args, Ctx extends MutatorCtx = MutatorCtx>(args: ArgSchema<Args>, run: (tx: IsoTx<S, P>, args: Args, ctx: Ctx) => MutationGen): SharedMutatorWithArgs<Args, Ctx>;\n};","description":"","source":"packages/client/src/mutation-ops.ts","line":202,"href":"/reference/typescript/replica/#symbol-defineMutators"},{"name":"defineQuery","originalName":"defineQuery","kind":"FunctionDeclaration","signature":"/**\n * Define ONE co-located, named query. Keep it next to the component that reads it (a `*.queries.ts`\n * file), so a query lives where its fragments and its component live.\n *\n * The returned value is callable on the client (it stamps its result with `name` + args, so the\n * subscription SYNCS) and registerable on the server ({@link registerQueries}). The optional\n * `validate` step turns untrusted wire args into the canonical args type — and that type flows to\n * both the call signature and `build`, so the shape is written exactly once. `validate` runs on\n * BOTH tiers (it builds the byte-identical authoritative AST on the server, and guards + guarantees\n * the same AST on the client). If the server must DIVERGE from the client, define a second\n * `defineQuery` with the same `name` for the server and register that one instead.\n *\n * `build` may take a second CONTEXT parameter (see {@link QueryBuilder}). Context is off-wire: the\n * client passes its session ctx at the callsite, the server injects its authoritative ctx — so a\n * per-user query stays symmetric without ever trusting (or transmitting) a client-supplied identity.\n *\n * ```ts\n * // recentComments({ limit }) — validated, no ctx, byte-identical on both tiers\n * export const recentCommentsQuery = defineQuery(\n *   \"recentComments\",\n *   (raw): { limit: number } => ({ limit: validateFeedLimit(raw) }),\n *   ({ limit }) => q.comment.orderBy(\"createdAt\", \"desc\").limit(limit).include(FeedItemFragment),\n * );\n *\n * // myIssues({ limit }, ctx) — ctx-scoped; the wire still carries only { limit }\n * export const myIssuesQuery = defineQuery(\n *   \"myIssues\",\n *   (raw): { limit: number } => ({ limit: validateLimit(raw) }),\n *   ({ limit }, ctx: { user: string }) => q.issue.where.ownerId(ctx.user).limit(limit),\n * );\n * // client: myIssuesQuery({ limit: 20 }, { user: currentUser() })\n * ```\n */\nexport declare function defineQuery<Q extends AnyQuery>(name: string, build: () => Q, options?: DefineQueryOptions<void>): NamedQuery<void, [\n], Q>;\nexport declare function defineQuery<Args, Ctx extends readonly unknown[], Q extends AnyQuery>(name: string, build: (args: Args, ...ctx: Ctx) => Q, options?: DefineQueryOptions<Args>): NamedQuery<Args, Ctx, Q>;\nexport declare function defineQuery<Args, Ctx extends readonly unknown[], Q extends AnyQuery>(name: string, validate: QueryValidator<Args>, build: (args: Args, ...ctx: Ctx) => Q, options?: DefineQueryOptions<Args>): NamedQuery<Args, Ctx, Q>;","description":"Define ONE co-located, named query. Keep it next to the component that reads it (a `*.queries.ts`\nfile), so a query lives where its fragments and its component live.\n\nThe returned value is callable on the client (it stamps its result with `name` + args, so the\nsubscription SYNCS) and registerable on the server ({@link registerQueries }). The optional\n`validate` step turns untrusted wire args into the canonical args type — and that type flows to\nboth the call signature and `build`, so the shape is written exactly once. `validate` runs on\nBOTH tiers (it builds the byte-identical authoritative AST on the server, and guards + guarantees\nthe same AST on the client). If the server must DIVERGE from the client, define a second\n`defineQuery` with the same `name` for the server and register that one instead.\n\n`build` may take a second CONTEXT parameter (see {@link QueryBuilder}). Context is off-wire: the\nclient passes its session ctx at the callsite, the server injects its authoritative ctx — so a\nper-user query stays symmetric without ever trusting (or transmitting) a client-supplied identity.\n\n```ts\n// recentComments({ limit }) — validated, no ctx, byte-identical on both tiers\nexport const recentCommentsQuery = defineQuery(\n  \"recentComments\",\n  (raw): { limit: number } => ({ limit: validateFeedLimit(raw) }),\n  ({ limit }) => q.comment.orderBy(\"createdAt\", \"desc\").limit(limit).include(FeedItemFragment),\n);\n\n// myIssues({ limit }, ctx) — ctx-scoped; the wire still carries only { limit }\nexport const myIssuesQuery = defineQuery(\n  \"myIssues\",\n  (raw): { limit: number } => ({ limit: validateLimit(raw) }),\n  ({ limit }, ctx: { user: string }) => q.issue.where.ownerId(ctx.user).limit(limit),\n);\n// client: myIssuesQuery({ limit: 20 }, { user: currentUser() })\n```","source":"packages/client/src/query.ts","line":472,"href":"/reference/typescript/replica/#symbol-defineQuery"},{"name":"DefineQueryOptions","originalName":"DefineQueryOptions","kind":"InterfaceDeclaration","signature":"/** Options for {@link defineQuery}. */\nexport interface DefineQueryOptions<Args = any> {\n    /** Declare this query realtime-eligible — see {@link RealtimeQueryLabel}. */\n    realtime?: RealtimeQueryLabel<Args>;\n}","description":"Options for {@link defineQuery}.","source":"packages/client/src/query.ts","line":383,"href":"/reference/typescript/replica/#symbol-DefineQueryOptions"},{"name":"defineRelationships","originalName":"defineRelationships","kind":"FunctionDeclaration","signature":"/** A typed registry of named {@link Relationship}s — `defineRelationships({ issueOwner: rel(...) })`.\n *  A thin identity helper that names the bag and constrains its values; the keys are yours to choose. */\nexport declare function defineRelationships<R extends Record<string, AnyRelationship>>(rels: R): R;","description":"A typed registry of named {@link Relationship}s — `defineRelationships({ issueOwner: rel(...) })`.\nA thin identity helper that names the bag and constrains its values; the keys are yours to choose.","source":"packages/client/src/schema.ts","line":488,"href":"/reference/typescript/replica/#symbol-defineRelationships"},{"name":"DehydratedQuery","originalName":"DehydratedQuery","kind":"InterfaceDeclaration","signature":"/** One query's SSR snapshot, keyed by its `viewKey` ({@link stableKey} of the AST): the\n *  pre-projected first-paint `rows` plus the `cvMin` watermark they reflect (SSR-DESIGN.md §6.2).\n *  Serializable as-is into the HTML — `rows` are already JSON values (json columns parsed). */\nexport interface DehydratedQuery {\n    rows: unknown[];\n    cvMin: number;\n}","description":"One query's SSR snapshot, keyed by its `viewKey` ({@link stableKey} of the AST): the\npre-projected first-paint `rows` plus the `cvMin` watermark they reflect (SSR-DESIGN.md §6.2).\nSerializable as-is into the HTML — `rows` are already JSON values (json columns parsed).","source":"packages/client/src/store.ts","line":20,"href":"/reference/typescript/replica/#symbol-DehydratedQuery"},{"name":"DehydratedState","originalName":"DehydratedState","kind":"TypeAliasDeclaration","signature":"/** The whole dehydrated cache: every preloaded query's snapshot, keyed by `viewKey`. The server\n *  builds it with {@link Store.dehydrate}; the browser seeds it with {@link Store.hydrate}. */\nexport type DehydratedState = Record<string, DehydratedQuery>;","description":"The whole dehydrated cache: every preloaded query's snapshot, keyed by `viewKey`. The server\nbuilds it with {@link Store.dehydrate}; the browser seeds it with {@link Store.hydrate}.","source":"packages/client/src/store.ts","line":27,"href":"/reference/typescript/replica/#symbol-DehydratedState"},{"name":"Dir","originalName":"Dir","kind":"TypeAliasDeclaration","signature":"export type Dir = \"asc\" | \"desc\";","description":"","source":"packages/client/src/ast.ts","line":5,"href":"/reference/typescript/replica/#symbol-Dir"},{"name":"driveMutationAsync","originalName":"driveMutationAsync","kind":"FunctionDeclaration","signature":"/** Drive a generator mutator ASYNCHRONOUSLY (the server, against the open transaction). Writes are\n *  awaited (harmless: a single interactive Postgres connection serializes statements anyway, and the\n *  daemon backend resolves them instantly), reads (point or query) suspend, and a batch fans out with\n *  `Promise.all`. */\nexport declare function driveMutationAsync(gen: MutationGen, exec: AsyncEffectExec): Promise<void>;","description":"Drive a generator mutator ASYNCHRONOUSLY (the server, against the open transaction). Writes are\nawaited (harmless: a single interactive Postgres connection serializes statements anyway, and the\ndaemon backend resolves them instantly), reads (point or query) suspend, and a batch fans out with\n`Promise.all`.","source":"packages/client/src/mutation-ops.ts","line":257,"href":"/reference/typescript/replica/#symbol-driveMutationAsync"},{"name":"driveMutationSync","originalName":"driveMutationSync","kind":"FunctionDeclaration","signature":"/** Drive a generator mutator SYNCHRONOUSLY (the client, inside the wasm write transaction). Each\n *  yielded write applies immediately; each read (point or query) is resolved and fed back; a batch\n *  runs in order. */\nexport declare function driveMutationSync(gen: MutationGen, exec: SyncEffectExec): void;","description":"Drive a generator mutator SYNCHRONOUSLY (the client, inside the wasm write transaction). Each\nyielded write applies immediately; each read (point or query) is resolved and fed back; a batch\nruns in order.","source":"packages/client/src/mutation-ops.ts","line":235,"href":"/reference/typescript/replica/#symbol-driveMutationSync"},{"name":"EnsureQueryOptions","originalName":"EnsureQueryOptions","kind":"InterfaceDeclaration","signature":"export interface EnsureQueryOptions {\n    /** Readiness policy. Defaults to `complete`. */\n    until?: EnsureQueryUntil;\n    /** Cancel this caller's wait. The shared query may stay retained for another waiter/prefetch. */\n    signal?: AbortSignal;\n}","description":"","source":"packages/client/src/ensure.ts","line":22,"href":"/reference/typescript/replica/#symbol-EnsureQueryOptions"},{"name":"EnsureQueryUntil","originalName":"EnsureQueryUntil","kind":"TypeAliasDeclaration","signature":"/** When an {@link QueryEnsureCache.ensure} call may resolve.\n *\n * - `complete` waits for the server-authoritative result (the default).\n * - `present` resolves as soon as the local view contains a result, while the remote retain keeps\n *   revalidating in the background. An authoritative empty result also resolves it, so a real\n *   not-found query never waits forever.\n *\n * `present` deliberately does not add a `partial` {@link ResultType}: a locally useful answer and\n * server authority are independent facts. While it resolves early, the view's result type remains\n * `unknown` until the server says otherwise. */\nexport type EnsureQueryUntil = \"complete\" | \"present\";","description":"When an {@link QueryEnsureCache.ensure} call may resolve.\n\n- `complete` waits for the server-authoritative result (the default).\n- `present` resolves as soon as the local view contains a result, while the remote retain keeps\n revalidating in the background. An authoritative empty result also resolves it, so a real\n not-found query never waits forever.\n\n`present` deliberately does not add a `partial` {@link ResultType}: a locally useful answer and\nserver authority are independent facts. While it resolves early, the view's result type remains\n`unknown` until the server says otherwise.","source":"packages/client/src/ensure.ts","line":20,"href":"/reference/typescript/replica/#symbol-EnsureQueryUntil"},{"name":"eq","originalName":"eq","kind":"VariableDeclaration","signature":"export declare const eq: <V>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":26,"href":"/reference/typescript/replica/#symbol-eq"},{"name":"exists","originalName":"exists","kind":"FunctionDeclaration","signature":"/** `EXISTS` by a named {@link Relationship} — correlation from the rel; the parent row type is the\n *  relationship's parent, so the condition lands on the matching `.where()`. */\nexport declare function exists<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<RowOf<PC>>;\n/** `EXISTS (<correlated subquery>)` — a condition (use inside `where`/`or`/`and`). */\nexport declare function exists<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<R>;","description":"`EXISTS` by a named {@link Relationship} — correlation from the rel; the parent row type is the\nrelationship's parent, so the condition lands on the matching `.where()`.\n`EXISTS (<correlated subquery>)` — a condition (use inside `where`/`or`/`and`).","source":"packages/client/src/query.ts","line":1210,"href":"/reference/typescript/replica/#symbol-exists"},{"name":"existsNoSync","originalName":"existsNoSync","kind":"FunctionDeclaration","signature":"/**\n * `EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate (`exists_noSync`).\n * Identical to {@link exists} for filtering parent visibility, but stamps the subquery\n * `system: \"permissions\"`, so the engine's normalized serializer prunes its witnesses from the\n * footprint — the permission table's rows are never synced to the client and the client never\n * re-evaluates the gate. Use this when building the **server's** query (the user's API server);\n * the client holds its own un-gated query.\n */\nexport declare function existsNoSync<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<RowOf<PC>>;\nexport declare function existsNoSync<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<R>;","description":"`EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate (`exists_noSync`).\nIdentical to {@link exists} for filtering parent visibility, but stamps the subquery\n`system: \"permissions\"`, so the engine's normalized serializer prunes its witnesses from the\nfootprint — the permission table's rows are never synced to the client and the client never\nre-evaluates the gate. Use this when building the **server's** query (the user's API server);\nthe client holds its own un-gated query.","source":"packages/client/src/query.ts","line":1255,"href":"/reference/typescript/replica/#symbol-existsNoSync"},{"name":"ExistsOp","originalName":"ExistsOp","kind":"TypeAliasDeclaration","signature":"export type ExistsOp = \"EXISTS\" | \"NOT EXISTS\";","description":"","source":"packages/client/src/ast.ts","line":35,"href":"/reference/typescript/replica/#symbol-ExistsOp"},{"name":"ExistsOpts","originalName":"ExistsOpts","kind":"InterfaceDeclaration","signature":"/** Options for `exists` / `notExists`. */\nexport interface ExistsOpts {\n    /**\n     * Fold this `EXISTS` as a build-time **scalar** subquery: when the child binds a\n     * statically-unique key, the engine reads it once, inlines the correlation value as a\n     * literal, and deletes the join. **Snapshot semantics** — the inlined value does not\n     * react to later child changes. Defaults to `false` (a live `EXISTS` join).\n     */\n    scalar?: boolean;\n}","description":"Options for `exists` / `notExists`.","source":"packages/client/src/query.ts","line":1173,"href":"/reference/typescript/replica/#symbol-ExistsOpts"},{"name":"extendSchema","originalName":"extendSchema","kind":"FunctionDeclaration","signature":"/** Extend a generated/synced schema with client-authoritative local-only tables.\n *\n *  This is the ergonomic path for SQL-first apps: keep `schema.gen.ts` fully generated, define\n *  private UI tables in a tiny hand-written file, then hand the combined schema to the browser\n *  client. The added tables MUST be `table(name, { local: true })`: `extendSchema` deliberately\n *  refuses to append ordinary synced tables, because those need to come from daemon introspection\n *  (`rindle schema gen`) so the server and client cannot drift. */\nexport declare function extendSchema<S extends ColsMap, P extends Record<string, string>, const T extends readonly AnyTable[]>(base: Schema<S, P>, opts: {\n    tables: T;\n}): Schema<S & SchemaOf<T>, P & PkMapOf<T>>;","description":"Extend a generated/synced schema with client-authoritative local-only tables.\n\nThis is the ergonomic path for SQL-first apps: keep `schema.gen.ts` fully generated, define\nprivate UI tables in a tiny hand-written file, then hand the combined schema to the browser\nclient. The added tables MUST be `table(name, { local: true })`: `extendSchema` deliberately\nrefuses to append ordinary synced tables, because those need to come from daemon introspection\n(`rindle schema gen`) so the server and client cannot drift.","source":"packages/client/src/schema.ts","line":245,"href":"/reference/typescript/replica/#symbol-extendSchema"},{"name":"fieldCondition","originalName":"fieldCondition","kind":"FunctionDeclaration","signature":"/** Build a `simple` condition from a field name + (predicate | bare value). */\nexport declare function fieldCondition(field: string, arg: unknown): Condition;","description":"Build a `simple` condition from a field name + (predicate | bare value).","source":"packages/client/src/operators.ts","line":54,"href":"/reference/typescript/replica/#symbol-fieldCondition"},{"name":"FlatArrayView","originalName":"FlatArrayView","kind":"ClassDeclaration","signature":"export declare class FlatArrayView<R = unknown> implements ArrayView<R> {\n    private readonly _qid;\n    private _schema;\n    private types?;\n    private seeded;\n    private top;\n    private dirty;\n    private cached;\n    private rt;\n    private readonly listeners;\n    private readonly changeListeners;\n    private pendingSegments;\n    constructor(schema?: WireSchema, types?: ViewTypes, qid?: QueryId);\n    get qid(): QueryId;\n    get schema(): WireSchema | null;\n    get resultType(): ResultType;\n    /** Set the query's lifecycle state (the Store routes the backend's per-query signal here).\n     *  Notifies subscribers on a change so a status-bound listener (React `useQueryStatus`) re-reads,\n     *  WITHOUT re-projecting data (it is unchanged). */\n    setResultType(rt: ResultType): void;\n    /** (Re)bind to a schema and clear the tree IN PLACE. The first `hello` (pending → ready)\n     *  and a re-hydrate (gap → new epoch — FLAT-CHANGES-DESIGN.md §2.3) both go through here, so\n     *  the caller's view reference and its subscribers survive a re-subscribe. Does NOT notify —\n     *  the snapshot that follows (`applyChanges`) does, avoiding an empty-then-filled flicker.\n     *  KEEPS any SSR `seeded` rows: they are retired only when the first live snapshot lands\n     *  ({@link retireSeed}, driven by the Store), so `data` shows the seed — not an empty tree —\n     *  across the whole `hello`→first-`snapshot` gap. */\n    reset(schema: WireSchema, types?: ViewTypes): void;\n    /** Install a pre-projected SSR first-paint snapshot (SSR-DESIGN.md §6). The rows are already\n     *  in result shape (json columns parsed, relationships nested), so a view with no live backend\n     *  (the server one-shot Store) reads them directly, and a browser view shows them until its\n     *  first live snapshot lands ({@link retireSeed}). Does NOT notify — it is set at materialize\n     *  time, before any subscriber, and the live snapshot that follows notifies. */\n    seed(rows: readonly R[]): void;\n    /** Retire the SSR first-paint seed — the Store calls this as it folds the maintained tree's first\n     *  live snapshot, so `data` switches from the seed to the live tree with no empty gap between them\n     *  (the seed deliberately survived the earlier `reset`/`hello`). Idempotent. Does NOT notify — the\n     *  snapshot fold it accompanies does; BUT when that fold is empty (a 0-row result, or rows already\n     *  in `top`) it notifies nothing, so the Store forces a {@link notify} on the strength of the `true`\n     *  return here — else the view reads the live tree yet never re-renders (a frozen seed). Returns\n     *  whether a live seed was actually cleared (so the Store knows a forced notify is owed). */\n    retireSeed(): boolean;\n    /** Apply a batch (the hydrate snapshot or one transaction's events) in order, then\n     *  notify subscribers once. Order is significant (FLAT-CHANGES-DESIGN.md §5.4). A no-op\n     *  while pending (changes never precede the `hello` that resets the schema).\n     *\n     *  `enrichRemoves` ⇒ before a removed node is dropped, reconstruct its full subtree and attach it\n     *  to the `remove` op's `node` (in place, so the same event object the Store fans out to its\n     *  change subscribers carries it). Off by default — paid only when a consumer asked for it, and\n     *  only on a real eviction (an rc-decrement that keeps the row leaves `node` absent). A view with\n     *  an attached {@link onChanges} listener ALSO enriches (per-view, no global opt-in), so a\n     *  narrator can resolve a removed row's subs whether or not the store-global counter is set.\n     *\n     *  `deferNotify` ⇒ fold but do NOT notify; the caller is responsible for calling {@link flush}\n     *  later. The Store uses this to fold every view in one commit before notifying any subscriber\n     *  (cross-view-atomic notification — `Store.onCommitBoundary`); standalone use leaves it off, so\n     *  a bare view still fires its subscribers after each applied batch.\n     *\n     *  `phase` tags the {@link onChanges} delivery (`snapshot` for the hydrate, `batch` otherwise); it\n     *  does not affect the fold. Returns whether the batch changed the view (so a deferring caller\n     *  knows it must be flushed). */\n    applyChanges(events: FlatChange[], enrichRemoves?: boolean, deferNotify?: boolean, phase?: ChangePhase): boolean;\n    /** Notify subscribers with the current data. The deferred half of {@link applyChanges} (when\n     *  `deferNotify` was set): the Store calls this at the commit-notify barrier — after every view\n     *  touched by the same commit has folded — so a subscriber that re-reads a sibling view inside\n     *  its callback observes post-commit data, never a torn mid-commit state. */\n    flush(): void;\n    get data(): readonly R[];\n    subscribe(listener: (data: readonly R[]) => void): () => void;\n    onChanges(listener: ViewChangeListener): () => void;\n    /** Net the folded batch and hand the survivors to the change listeners, AFTER the data `notify`\n     *  (the order `Store.subscribeChanges` consumers already observe). A batch that nets to nothing —\n     *  a correctly predicted rebase — makes no call, so a narrator sees only real change. Each listener\n     *  is isolated: a throwing one reports to `note` (the caller re-raises the first) and the rest still\n     *  run, so one bad narration template never starves a sibling listener nor corrupts the view. */\n    private deliverChanges;\n    destroy(): void;\n    private applyAt;\n    private applyOp;\n    private applyAdd;\n    /** Drop one path to `row`. Returns the evicted {@link Node} (its full subtree intact) when the\n     *  last path went away — `null` when another path still holds it (rc decremented, nothing left\n     *  the result). */\n    private applyRemove;\n    private applyEdit;\n    private project;\n    /** Notify data subscribers with the current {@link data}. Normally driven by a fold ({@link\n     *  applyChanges}/{@link flush}); the Store also calls it directly to land a seed retirement whose\n     *  accompanying fold was empty (see {@link retireSeed}). */\n    notify(): void;\n}","description":"","source":"packages/client/src/view.ts","line":348,"href":"/reference/typescript/replica/#symbol-FlatArrayView"},{"name":"FlatChange","originalName":"FlatChange","kind":"InterfaceDeclaration","signature":"export interface FlatChange {\n    path: PathSeg[];\n    op: FlatOp;\n}","description":"","source":"packages/client/src/types.ts","line":69,"href":"/reference/typescript/replica/#symbol-FlatChange"},{"name":"FlatOp","originalName":"FlatOp","kind":"TypeAliasDeclaration","signature":"/** A positional change at one level of the view tree. A `remove` ships only the leaving `row`\n *  (the receiver already holds the subtree and locates it by key) — `node` is NEVER on the wire;\n *  it is an OPTIONAL client-side enrichment carrying the full removed subtree, attached by the\n *  ArrayView when a change consumer opts in (`Store.subscribeChanges(_, { removedSubtree: true })`),\n *  so a narrator can resolve a removed row's nested subs just as it can on an `add`. */\nexport type FlatOp = {\n    tag: \"add\";\n    node: WireNode;\n} | {\n    tag: \"remove\";\n    row: WireValue[];\n    node?: WireNode;\n} | {\n    tag: \"edit\";\n    old: WireValue[];\n    new: WireValue[];\n};","description":"A positional change at one level of the view tree. A `remove` ships only the leaving `row`\n(the receiver already holds the subtree and locates it by key) — `node` is NEVER on the wire;\nit is an OPTIONAL client-side enrichment carrying the full removed subtree, attached by the\nArrayView when a change consumer opts in (`Store.subscribeChanges(_, { removedSubtree: true })`),\nso a narrator can resolve a removed row's nested subs just as it can on an `add`.","source":"packages/client/src/types.ts","line":64,"href":"/reference/typescript/replica/#symbol-FlatOp"},{"name":"Fragment","originalName":"Fragment","kind":"InterfaceDeclaration","signature":"/**\n * A reusable, typed *selection over a table* — Relay's \"fragment\", promoted to a first-class\n * value. **Two verbs** compose a fragment, on one axis — does its data belong to THIS row or to a\n * related one:\n *\n *   - SAME node — `q.include(Frag)`: merge its selection into this node. This is also how you\n *     **root** a fragment onto a base query — `queries.t.where.id(x).include(Frag)`.\n *   - CHILD node — `q.sub(alias, child, corr, Frag)`: nest it under a relationship (`sub`'s 4th arg).\n *\n * A `Fragment` is therefore also a `build` transform (`(q: Query<C>) => Query<C, Rels>`); that\n * call signature is the mechanism by which `sub` accepts a fragment as its build. Prefer\n * `include` to root a fragment (canonical + merged) over calling it directly. It additionally\n * carries its `table` (for {@link FragmentRef}/`useFragment` typing and masking). Composing\n * fragments assembles ONE {@link Ast} → one materialization → one `/query` — the whole point\n * (no request waterfall; design §1).\n */\nexport interface Fragment<C extends AnyCols, Rels = {}, Sel extends string = never, LocalRels = Rels> {\n    (q: Query<C>): Query<C, Rels, false, Sel, LocalRels>;\n    readonly table: TableLike<C>;\n    readonly [FRAGMENT_BRAND]: true;\n}","description":"A reusable, typed *selection over a table* — Relay's \"fragment\", promoted to a first-class\nvalue. **Two verbs** compose a fragment, on one axis — does its data belong to THIS row or to a\nrelated one:\n\n  - SAME node — `q.include(Frag)`: merge its selection into this node. This is also how you\n    **root** a fragment onto a base query — `queries.t.where.id(x).include(Frag)`.\n  - CHILD node — `q.sub(alias, child, corr, Frag)`: nest it under a relationship (`sub`'s 4th arg).\n\nA `Fragment` is therefore also a `build` transform (`(q: Query<C>) => Query<C, Rels>`); that\ncall signature is the mechanism by which `sub` accepts a fragment as its build. Prefer\n`include` to root a fragment (canonical + merged) over calling it directly. It additionally\ncarries its `table` (for {@link FragmentRef}/`useFragment` typing and masking). Composing\nfragments assembles ONE {@link Ast} → one materialization → one `/query` — the whole point\n(no request waterfall; design §1).","source":"packages/client/src/query.ts","line":533,"href":"/reference/typescript/replica/#symbol-Fragment"},{"name":"fragmentAst","originalName":"fragmentAst","kind":"FunctionDeclaration","signature":"export declare function fragmentAst<F extends Fragment<any, any, any>>(fragment: F): Ast;","description":"","source":"packages/client/src/query.ts","line":651,"href":"/reference/typescript/replica/#symbol-fragmentAst"},{"name":"FragmentCoverage","originalName":"FragmentCoverage","kind":"InterfaceDeclaration","signature":"export interface FragmentCoverage<Q extends AnyQuery = AnyQuery> {\n    readonly key: string;\n    readonly query: Q;\n}","description":"","source":"packages/client/src/query.ts","line":548,"href":"/reference/typescript/replica/#symbol-FragmentCoverage"},{"name":"FragmentData","originalName":"FragmentData","kind":"TypeAliasDeclaration","signature":"/**\n * The data returned by `useFragment(fragment, ref)`: the fragment's own selected columns plus\n * immediate relationship values. Relationships whose builder is another fragment surface as\n * opaque {@link FragmentRef}s, so child-owned payload is read only by the child fragment reader.\n */\nexport type FragmentData<F> = F extends Fragment<infer C, unknown, infer Sel, infer LocalRels> ? Projected<C, Sel> & LocalRels : never;","description":"The data returned by `useFragment(fragment, ref)`: the fragment's own selected columns plus\nimmediate relationship values. Relationships whose builder is another fragment surface as\nopaque {@link FragmentRef}s, so child-owned payload is read only by the child fragment reader.","source":"packages/client/src/query.ts","line":544,"href":"/reference/typescript/replica/#symbol-FragmentData"},{"name":"fragmentKey","originalName":"fragmentKey","kind":"FunctionDeclaration","signature":"export declare function fragmentKey(ref: FragmentRef<any>): string;","description":"","source":"packages/client/src/query.ts","line":605,"href":"/reference/typescript/replica/#symbol-fragmentKey"},{"name":"FragmentRef","originalName":"FragmentRef","kind":"TypeAliasDeclaration","signature":"/** The opaque token a parent passes to a component that reads {@link FragmentData} for `F`. */\nexport type FragmentRef<F> = F extends Fragment<any, any, any, any> ? LocalFragmentRef<F> : never;","description":"The opaque token a parent passes to a component that reads {@link FragmentData} for `F`.","source":"packages/client/src/query.ts","line":563,"href":"/reference/typescript/replica/#symbol-FragmentRef"},{"name":"frameResumePoint","originalName":"frameResumePoint","kind":"FunctionDeclaration","signature":"/** The resume point a frame implies — what rides an SSE `id:` line so a reconnecting `EventSource`\n *  hands it straight back as `Last-Event-ID`. `undefined` for frames that are not a position. */\nexport declare function frameResumePoint(frame: StreamFrame): number | undefined;","description":"The resume point a frame implies — what rides an SSE `id:` line so a reconnecting `EventSource`\nhands it straight back as `Last-Event-ID`. `undefined` for frames that are not a position.","source":"packages/client/src/stream.ts","line":51,"href":"/reference/typescript/replica/#symbol-frameResumePoint"},{"name":"ge","originalName":"ge","kind":"VariableDeclaration","signature":"export declare const ge: <V extends number | string>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":29,"href":"/reference/typescript/replica/#symbol-ge"},{"name":"gt","originalName":"gt","kind":"VariableDeclaration","signature":"export declare const gt: <V extends number | string>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":28,"href":"/reference/typescript/replica/#symbol-gt"},{"name":"ilike","originalName":"ilike","kind":"VariableDeclaration","signature":"export declare const ilike: (pattern: string) => Pred<string>;","description":"","source":"packages/client/src/operators.ts","line":34,"href":"/reference/typescript/replica/#symbol-ilike"},{"name":"inList","originalName":"inList","kind":"VariableDeclaration","signature":"export declare const inList: <V>(values: V[]) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":36,"href":"/reference/typescript/replica/#symbol-inList"},{"name":"Insert","originalName":"Insert","kind":"TypeAliasDeclaration","signature":"/** The insert type of a table def: `Insert<typeof issue>` → `{ id: string; … assignee?: string | null }`.\n *  The whole-table ergonomic form of {@link InsertOf} (the insert-side twin of {@link Row}). */\nexport type Insert<T extends AnyTable> = InsertOf<T[typeof SCHEMA][\"columns\"]>;","description":"The insert type of a table def: `Insert<typeof issue>` → `{ id: string; … assignee?: string | null }`.\nThe whole-table ergonomic form of {@link InsertOf} (the insert-side twin of {@link Row}).","source":"packages/client/src/schema.ts","line":136,"href":"/reference/typescript/replica/#symbol-Insert"},{"name":"insertCell","originalName":"insertCell","kind":"FunctionDeclaration","signature":"/** The cell a full insert writes for column `c`: the given value, or `null` when a nullable column\n *  is omitted (design 206 §6.2). The caller's completeness check ({@link InsertPlan.required})\n *  guarantees a non-nullable column is present, so its omission never reaches here. */\nexport declare function insertCell(row: Record<string, WireValue>, c: string): WireValue;","description":"The cell a full insert writes for column `c`: the given value, or `null` when a nullable column\nis omitted (design 206 §6.2). The caller's completeness check ({@link InsertPlan.required})\nguarantees a non-nullable column is present, so its omission never reaches here.","source":"packages/client/src/schema.ts","line":528,"href":"/reference/typescript/replica/#symbol-insertCell"},{"name":"InsertOf","originalName":"InsertOf","kind":"TypeAliasDeclaration","signature":"/** The INSERT shape of a column map: {@link RowOf} with every NULLABLE column made OPTIONAL (`?`) —\n *  it may be omitted and is filled with `null` by both write funnels (design 206 §6.2/§7). `NOT NULL`\n *  columns stay required. The insert-side twin of {@link RowOf}, mirroring Drizzle's `$inferInsert`\n *  vs `$inferSelect` split. */\nexport type InsertOf<C extends AnyCols> = Simplify<{\n    [K in keyof C as InsertOptional<C[K]> extends true ? never : K]: ColT<C[K]>;\n} & {\n    [K in keyof C as InsertOptional<C[K]> extends true ? K : never]?: ColT<C[K]>;\n}>;","description":"The INSERT shape of a column map: {@link RowOf} with every NULLABLE column made OPTIONAL (`?`) —\nit may be omitted and is filled with `null` by both write funnels (design 206 §6.2/§7). `NOT NULL`\ncolumns stay required. The insert-side twin of {@link RowOf}, mirroring Drizzle's `$inferInsert`\nvs `$inferSelect` split.","source":"packages/client/src/schema.ts","line":128,"href":"/reference/typescript/replica/#symbol-InsertOf"},{"name":"insertPlan","originalName":"insertPlan","kind":"FunctionDeclaration","signature":"/** Derive a table's {@link InsertPlan} from its column markers. */\nexport declare function insertPlan(meta: TableMeta): InsertPlan;","description":"Derive a table's {@link InsertPlan} from its column markers.","source":"packages/client/src/schema.ts","line":519,"href":"/reference/typescript/replica/#symbol-insertPlan"},{"name":"InsertPlan","originalName":"InsertPlan","kind":"InterfaceDeclaration","signature":"/** A table's insert-completeness plan, derived once from its `Col` markers and shared by BOTH write\n *  funnels — the client `trackingTx` and the server `renderOp` — so their required-sets can't drift\n *  (design 206 §6.1/§6.2). A `NOT NULL` column is `required`; a nullable column (`.nullable()` set\n *  `Col.optional`) may be omitted and is filled with `null` (see {@link insertCell}). PK columns are\n *  never nullable (introspection forces them non-null), so they are always required. */\nexport interface InsertPlan {\n    /** Every column, in wire order. */\n    readonly columns: string[];\n    /** Columns that MUST be present on a full insert — the non-nullable ones. */\n    readonly required: string[];\n    /** The nullable (omittable-to-null) columns, for a fast membership test in the fill. */\n    readonly nullable: ReadonlySet<string>;\n}","description":"A table's insert-completeness plan, derived once from its `Col` markers and shared by BOTH write\nfunnels — the client `trackingTx` and the server `renderOp` — so their required-sets can't drift\n(design 206 §6.1/§6.2). A `NOT NULL` column is `required`; a nullable column (`.nullable()` set\n`Col.optional`) may be omitted and is filled with `null` (see {@link insertCell}). PK columns are\nnever nullable (introspection forces them non-null), so they are always required.","source":"packages/client/src/schema.ts","line":509,"href":"/reference/typescript/replica/#symbol-InsertPlan"},{"name":"int64","originalName":"int64","kind":"VariableDeclaration","signature":"/** The exact-i64 column plane (design 226, `BIGINT`/`INT8` decltype): typed `bigint` in\n *  application code. The vocabulary exists from Stage C4 so generated schemas can name it;\n *  no exact integer cell enters the browser IVM until Stage E — until then the daemon\n *  refuses IVM queries whose footprint touches the column, and the SQL plane carries it. */\nexport declare const int64: <T extends bigint = bigint>() => ColBuilder<T>;","description":"The exact-i64 column plane (design 226, `BIGINT`/`INT8` decltype): typed `bigint` in\napplication code. The vocabulary exists from Stage C4 so generated schemas can name it;\nno exact integer cell enters the browser IVM until Stage E — until then the daemon\nrefuses IVM queries whose footprint touches the column, and the SQL plane carries it.","source":"packages/client/src/schema.ts","line":54,"href":"/reference/typescript/replica/#symbol-int64"},{"name":"is","originalName":"is","kind":"VariableDeclaration","signature":"export declare const is: <V>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":38,"href":"/reference/typescript/replica/#symbol-is"},{"name":"isFragment","originalName":"isFragment","kind":"FunctionDeclaration","signature":"/** Runtime guard: is `v` a {@link Fragment} (a `defineFragment` value, not a plain build fn)? */\nexport declare function isFragment(v: unknown): v is Fragment<AnyCols, unknown, never, unknown>;","description":"Runtime guard: is `v` a {@link Fragment} (a `defineFragment` value, not a plain build fn)?","source":"packages/client/src/query.ts","line":586,"href":"/reference/typescript/replica/#symbol-isFragment"},{"name":"isFragmentRelationship","originalName":"isFragmentRelationship","kind":"FunctionDeclaration","signature":"export declare function isFragmentRelationship(rel: CorrelatedSubquery): boolean;","description":"","source":"packages/client/src/query.ts","line":601,"href":"/reference/typescript/replica/#symbol-isFragmentRelationship"},{"name":"isGeneratorMutator","originalName":"isGeneratorMutator","kind":"FunctionDeclaration","signature":"/** True iff `fn` is a generator function (a shared/isomorphic mutator) rather than a plain function —\n *  the driver accepts both forms. Detected structurally (native `GeneratorFunction`). */\nexport declare function isGeneratorMutator(fn: unknown): fn is (...args: never[]) => MutationGen;","description":"True iff `fn` is a generator function (a shared/isomorphic mutator) rather than a plain function —\nthe driver accepts both forms. Detected structurally (native `GeneratorFunction`).","source":"packages/client/src/mutation-ops.ts","line":217,"href":"/reference/typescript/replica/#symbol-isGeneratorMutator"},{"name":"isLocalTable","originalName":"isLocalTable","kind":"FunctionDeclaration","signature":"/** Whether `table` is a {@link TableMeta.local local-only} table in `schema` (an unknown table\n *  reads as non-local). The single locality predicate the backends key off. BOTH variants —\n *  `true` and `\"session\"` — are local here; the persisted/ephemeral split matters only to the\n *  persistence plane ({@link persistedLocalTableNames}). */\nexport declare function isLocalTable<S extends ColsMap>(schema: Schema<S>, table: string): boolean;","description":"Whether `table` is a {@link TableMeta.locallocal-only} table in `schema` (an unknown table\nreads as non-local). The single locality predicate the backends key off. BOTH variants —\n`true` and `\"session\"` — are local here; the persisted/ephemeral split matters only to the\npersistence plane ({@link persistedLocalTableNames}).","source":"packages/client/src/schema.ts","line":406,"href":"/reference/typescript/replica/#symbol-isLocalTable"},{"name":"isNot","originalName":"isNot","kind":"VariableDeclaration","signature":"export declare const isNot: <V>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":39,"href":"/reference/typescript/replica/#symbol-isNot"},{"name":"isNotNull","originalName":"isNotNull","kind":"VariableDeclaration","signature":"/** `IS NOT NULL` — the negation of {@link isNull}; `V` is inferred from the field, like {@link isNull}. */\nexport declare const isNotNull: <V = never>() => Pred<V>;","description":"`IS NOT NULL` — the negation of {@link isNull}; `V` is inferred from the field, like {@link isNull}.","source":"packages/client/src/operators.ts","line":44,"href":"/reference/typescript/replica/#symbol-isNotNull"},{"name":"isNull","originalName":"isNull","kind":"VariableDeclaration","signature":"/** `IS NULL` — a field-agnostic null check. `V` is inferred from the field's expected `Arg<V>`\n *  (e.g. `where.signedAt(isNull())`), so it fits a column of any type without a cast. */\nexport declare const isNull: <V = never>() => Pred<V>;","description":"`IS NULL` — a field-agnostic null check. `V` is inferred from the field's expected `Arg<V>`\n(e.g. `where.signedAt(isNull())`), so it fits a column of any type without a cast.","source":"packages/client/src/operators.ts","line":42,"href":"/reference/typescript/replica/#symbol-isNull"},{"name":"isoTx","originalName":"isoTx","kind":"VariableDeclaration","signature":"/** The one shared effect factory (stateless — see {@link IsoTx}). Its methods just BUILD a\n *  {@link MutationOp}, so the single instance serves every schema; the generic {@link IsoTx} view is\n *  applied at the authoring site (a `json<T>` cell is a parsed object here and is stringified by the\n *  funnels, {@link toCell}), hence the cast — the runtime shape is schema-agnostic. */\nexport declare const isoTx: IsoTx;","description":"The one shared effect factory (stateless — see {@link IsoTx}). Its methods just BUILD a\n{@link MutationOp}, so the single instance serves every schema; the generic {@link IsoTx} view is\napplied at the authoring site (a `json<T>` cell is a parsed object here and is stringified by the\nfunnels, {@link toCell }), hence the cast — the runtime shape is schema-agnostic.","source":"packages/client/src/mutation-ops.ts","line":127,"href":"/reference/typescript/replica/#symbol-isoTx"},{"name":"IsoTx","originalName":"IsoTx","kind":"InterfaceDeclaration","signature":"/** The tier-AGNOSTIC effect factory a generator mutator writes against. Every method just BUILDS an\n *  effect to `yield` — it performs no I/O and holds no state, so the single {@link isoTx} instance is\n *  shared by every mutator on both tiers; only the driver differs. `insert`/`upsert`/`insertIgnore`\n *  require non-nullable columns and permit nullable omissions, which become `null`.\n *  `update`/`delete` require the PK columns; `update` also names the columns to change. */\nexport interface IsoTx<S extends ColsMap = ColsMap, P extends Record<string, string> = PkMap<S>> {\n    /** Insert a row. Omitted nullable columns become `null`; database defaults are not applied. */\n    insert<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Update the row identified by its pk columns (REQUIRED); only the named non-pk columns change. */\n    update<N extends keyof S & string>(table: N, row: UpdateOf<S[N], PkColsOf<S, P, N>>): MutationOp;\n    /** Insert, or replace non-PK columns on PK conflict, with {@link IsoTx.insert}'s omission rules. */\n    upsert<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Insert with {@link IsoTx.insert}'s omission rules, or do nothing on PK conflict. */\n    insertIgnore<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Delete the row identified by its pk columns. */\n    delete<N extends keyof S & string>(table: N, pk: PkOf<S[N], PkColsOf<S, P, N>>): MutationOp;\n    /** Read one row by primary key (read-your-writes). */\n    row<N extends keyof S & string>(table: N, pk: PkOf<S[N], PkColsOf<S, P, N>>): ReadEffect;\n    /** Run a full query (`where`/`orderBy`/`limit`/join) over the state this mutator is mutating —\n     *  read-your-writes, like {@link row} but for arbitrary shapes. Pass a query from the tier-agnostic\n     *  builder, e.g. `tx.query(q.issue.where(\"ownerId\", \"=\", ctx.user))` where `q = newQueryBuilder(schema)`.\n     *  The `yield` evaluates to {@link QueryResultRow}`[]` (cast it — the generator's single next-type is a row). */\n    query(query: QueryArg): QueryEffect;\n    all(effects: readonly YieldEffect[]): BatchEffect;\n}","description":"The tier-AGNOSTIC effect factory a generator mutator writes against. Every method just BUILDS an\neffect to `yield` — it performs no I/O and holds no state, so the single {@link isoTx} instance is\nshared by every mutator on both tiers; only the driver differs. `insert`/`upsert`/`insertIgnore`\nrequire non-nullable columns and permit nullable omissions, which become `null`.\n`update`/`delete` require the PK columns; `update` also names the columns to change.","source":"packages/client/src/mutation-ops.ts","line":102,"href":"/reference/typescript/replica/#symbol-IsoTx"},{"name":"IsoTxOf","originalName":"IsoTxOf","kind":"TypeAliasDeclaration","signature":"/** Bind a schema to the mutator authoring surface: `const { shared } = defineMutators(schema)`.\n *\n *  The returned `shared` is the schema-typed twin of the bare {@link shared} — its `tx` is an\n *  {@link IsoTx} parameterized by THIS schema, so `tx.insert`/`update`/`upsert`/`insertIgnore`/`delete`\n *  check the table name, every column name, each column's value type, nullable-omit on inserts, and\n *  the exact primary-key columns on `update`/`delete` — all at compile time. It registers identically\n *  to the bare form (same runtime value, still `satisfies ClientRegistry`, still an isomorphic\n *  generator the server drives): only the AUTHORING types tighten. `schema` is read for its TYPE only\n *  (never at runtime). Reads (`yield tx.row(...)`) stay loosely typed — a generator's single\n *  next-type can't carry a per-table row. */\n/** The typed {@link IsoTx} for a given schema — `IsoTxOf<typeof schema>`. Use it to annotate a helper\n *  that a mutator body passes its `tx` to (e.g. `const ensureUser = (tx: IsoTxOf<typeof schema>, …)`),\n *  so the helper gets the same table/column/pk typing the `defineMutators` `shared` callback does. */\nexport type IsoTxOf<Sch extends Schema> = Sch extends Schema<infer S, infer P> ? IsoTx<S, P> : never;","description":"The typed {@link IsoTx} for a given schema — `IsoTxOf<typeof schema>`. Use it to annotate a helper\nthat a mutator body passes its `tx` to (e.g. `const ensureUser = (tx: IsoTxOf<typeof schema>, …)`),\nso the helper gets the same table/column/pk typing the `defineMutators` `shared` callback does.","source":"packages/client/src/mutation-ops.ts","line":200,"href":"/reference/typescript/replica/#symbol-IsoTxOf"},{"name":"isPred","originalName":"isPred","kind":"FunctionDeclaration","signature":"export declare function isPred(x: unknown): x is Pred<unknown>;","description":"","source":"packages/client/src/operators.ts","line":22,"href":"/reference/typescript/replica/#symbol-isPred"},{"name":"isRelationship","originalName":"isRelationship","kind":"FunctionDeclaration","signature":"/** Runtime guard: is `v` a {@link Relationship} value (not a table or a plain object)? */\nexport declare function isRelationship(v: unknown): v is AnyRelationship;","description":"Runtime guard: is `v` a {@link Relationship} value (not a table or a plain object)?","source":"packages/client/src/schema.ts","line":493,"href":"/reference/typescript/replica/#symbol-isRelationship"},{"name":"isReservedTableName","originalName":"isReservedTableName","kind":"FunctionDeclaration","signature":"/** Whether `name` collides with an engine-reserved synthetic prefix ({@link RESERVED_TABLE_PREFIXES}). */\nexport declare function isReservedTableName(name: string): boolean;","description":"Whether `name` collides with an engine-reserved synthetic prefix ({@link RESERVED_TABLE_PREFIXES}).","source":"packages/client/src/schema.ts","line":223,"href":"/reference/typescript/replica/#symbol-isReservedTableName"},{"name":"json","originalName":"json","kind":"VariableDeclaration","signature":"export declare const json: <T = unknown>() => ColBuilder<T>;","description":"","source":"packages/client/src/schema.ts","line":49,"href":"/reference/typescript/replica/#symbol-json"},{"name":"KeyedRow","originalName":"KeyedRow","kind":"TypeAliasDeclaration","signature":"/** A keyed row: column name → cell. The ergonomic write shape (validated against the schema at\n *  runtime). JSON columns carry their raw JSON string (a {@link WireValue}), never a parsed object. */\nexport type KeyedRow = Record<string, WireValue>;","description":"A keyed row: column name → cell. The ergonomic write shape (validated against the schema at\nruntime). JSON columns carry their raw JSON string (a {@link WireValue}), never a parsed object.","source":"packages/client/src/mutation-ops.ts","line":13,"href":"/reference/typescript/replica/#symbol-KeyedRow"},{"name":"le","originalName":"le","kind":"VariableDeclaration","signature":"export declare const le: <V extends number | string>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":31,"href":"/reference/typescript/replica/#symbol-le"},{"name":"like","originalName":"like","kind":"VariableDeclaration","signature":"export declare const like: (pattern: string) => Pred<string>;","description":"","source":"packages/client/src/operators.ts","line":32,"href":"/reference/typescript/replica/#symbol-like"},{"name":"LitValue","originalName":"LitValue","kind":"TypeAliasDeclaration","signature":"/** An untagged literal (`null | bool | number | string | array`). Numbers are one f64. */\nexport type LitValue = null | boolean | number | string | LitValue[];","description":"An untagged literal (`null | bool | number | string | array`). Numbers are one f64.","source":"packages/client/src/ast.ts","line":11,"href":"/reference/typescript/replica/#symbol-LitValue"},{"name":"LMID_QUERY_NAME","originalName":"LMID_QUERY_NAME","kind":"VariableDeclaration","signature":"/** The reserved server-query name every optimistic client subscribes at connect: the\n *  one-row system query `CLIENT_MUTATIONS_TABLE WHERE client_id = <me>`. The server\n *  derives the identity from the connection (args are ignored). */\nexport declare const LMID_QUERY_NAME = \"_rindle/clientLmid\";","description":"The reserved server-query name every optimistic client subscribes at connect: the\none-row system query `CLIENT_MUTATIONS_TABLE WHERE client_id = <me>`. The server\nderives the identity from the connection (args are ignored).","source":"packages/client/src/types.ts","line":287,"href":"/reference/typescript/replica/#symbol-LMID_QUERY_NAME"},{"name":"localFragmentReadAst","originalName":"localFragmentReadAst","kind":"FunctionDeclaration","signature":"export declare function localFragmentReadAst<F extends Fragment<any, any, any>>(fragment: F, ref: LocalFragmentRef<F>, primaryKeyFor: (table: string) => readonly string[]): Ast;","description":"","source":"packages/client/src/query.ts","line":655,"href":"/reference/typescript/replica/#symbol-localFragmentReadAst"},{"name":"LocalFragmentRef","originalName":"LocalFragmentRef","kind":"InterfaceDeclaration","signature":"export interface LocalFragmentRef<F extends Fragment<any, any, any, any> = Fragment<any, any, any, any>> {\n    readonly [LOCAL_FRAGMENT_REF_BRAND]: true;\n    readonly source: \"local\";\n    readonly table: string;\n    readonly pk: Readonly<Record<string, LitValue>>;\n    readonly coverage: FragmentCoverage;\n    readonly __fragment?: F;\n}","description":"","source":"packages/client/src/query.ts","line":553,"href":"/reference/typescript/replica/#symbol-LocalFragmentRef"},{"name":"localQueryReadAst","originalName":"localQueryReadAst","kind":"FunctionDeclaration","signature":"export declare function localQueryReadAst(query: AnyQuery, primaryKeyFor: (table: string) => readonly string[]): Ast;","description":"","source":"packages/client/src/query.ts","line":687,"href":"/reference/typescript/replica/#symbol-localQueryReadAst"},{"name":"localRootFragmentRefsAst","originalName":"localRootFragmentRefsAst","kind":"FunctionDeclaration","signature":"export declare function localRootFragmentRefsAst<F extends Fragment<any, any, any>>(fragment: F, query: AnyQuery, primaryKeyFor: (table: string) => readonly string[]): Ast;","description":"","source":"packages/client/src/query.ts","line":670,"href":"/reference/typescript/replica/#symbol-localRootFragmentRefsAst"},{"name":"localSchemaHash","originalName":"localSchemaHash","kind":"FunctionDeclaration","signature":"/** A stable fingerprint of the schema's PERSISTED local tables only — the persistence gate's\n *  `schemaHash` (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §3.3 / P7). Per `local: true` table:\n *  `(name, ordered column names + types + optionality, pk columns)`. Column order is kept (rows are\n *  positional); tables are sorted by name so registration order can't skew it; synced-table AND\n *  `local: \"session\"` changes never move it (reshaping an ephemeral table must not wipe durable\n *  data). The value is the canonical descriptor itself, not a digest — local-table sets are tiny,\n *  and exactness (no collision can ever skip a P7 clear) beats compactness here. */\nexport declare function localSchemaHash<S extends ColsMap>(schema: Schema<S>): string;","description":"A stable fingerprint of the schema's PERSISTED local tables only — the persistence gate's\n`schemaHash` (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §3.3 / P7). Per `local: true` table:\n`(name, ordered column names + types + optionality, pk columns)`. Column order is kept (rows are\npositional); tables are sorted by name so registration order can't skew it; synced-table AND\n`local: \"session\"` changes never move it (reshaping an ephemeral table must not wipe durable\ndata). The value is the canonical descriptor itself, not a digest — local-table sets are tiny,\nand exactness (no collision can ever skip a P7 clear) beats compactness here.","source":"packages/client/src/schema.ts","line":430,"href":"/reference/typescript/replica/#symbol-localSchemaHash"},{"name":"localTableNames","originalName":"localTableNames","kind":"FunctionDeclaration","signature":"/** The set of local-only table names in `schema` (`201-LOCAL-ONLY-TABLES-DESIGN.md` §4) — BOTH\n *  variants (`true` and `\"session\"`); every locality rule except persistence keys off this set. */\nexport declare function localTableNames<S extends ColsMap>(schema: Schema<S>): Set<string>;","description":"The set of local-only table names in `schema` (`201-LOCAL-ONLY-TABLES-DESIGN.md` §4) — BOTH\nvariants (`true` and `\"session\"`); every locality rule except persistence keys off this set.","source":"packages/client/src/schema.ts","line":412,"href":"/reference/typescript/replica/#symbol-localTableNames"},{"name":"lt","originalName":"lt","kind":"VariableDeclaration","signature":"export declare const lt: <V extends number | string>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":30,"href":"/reference/typescript/replica/#symbol-lt"},{"name":"Mutation","originalName":"Mutation","kind":"TypeAliasDeclaration","signature":"export type Mutation = {\n    op: \"add\";\n    table: string;\n    row: WireValue[];\n} | {\n    op: \"remove\";\n    table: string;\n    row: WireValue[];\n} | {\n    op: \"edit\";\n    table: string;\n    old: WireValue[];\n    new: WireValue[];\n};","description":"","source":"packages/client/src/types.ts","line":89,"href":"/reference/typescript/replica/#symbol-Mutation"},{"name":"MutationEnvelope","originalName":"MutationEnvelope","kind":"InterfaceDeclaration","signature":"/** The upstream named-mutator envelope (OPTIMISTIC-WRITES-DESIGN.md §8.1): the wire\n *  carries the name + JSON args, never code; `mid` totally orders a client's mutations. */\nexport interface MutationEnvelope {\n    clientID: string;\n    mid: number;\n    name: string;\n    args: unknown;\n}","description":"The upstream named-mutator envelope (OPTIMISTIC-WRITES-DESIGN.md §8.1): the wire\ncarries the name + JSON args, never code; `mid` totally orders a client's mutations.","source":"packages/client/src/types.ts","line":236,"href":"/reference/typescript/replica/#symbol-MutationEnvelope"},{"name":"MutationGen","originalName":"MutationGen","kind":"TypeAliasDeclaration","signature":"/** What a generator mutator IS: `yield tx.<op>()` on every side effect; a `yield tx.row()` expression\n *  evaluates to the row. Neither sync nor async — the tier's driver decides, which is what lets one\n *  body run synchronously on the client and against a live async transaction on the server. */\nexport type MutationGen = Generator<YieldEffect, void, KeyedRow | undefined>;","description":"What a generator mutator IS: `yield tx.<op>()` on every side effect; a `yield tx.row()` expression\nevaluates to the row. Neither sync nor async — the tier's driver decides, which is what lets one\nbody run synchronously on the client and against a live async transaction on the server.","source":"packages/client/src/mutation-ops.ts","line":148,"href":"/reference/typescript/replica/#symbol-MutationGen"},{"name":"MutationOp","originalName":"MutationOp","kind":"TypeAliasDeclaration","signature":"/** One structured write intent — the discriminated union that mirrors the write half of the client\n *  `MutationTx` 1:1. Keyed (column-name addressed), so it is independent of column order. */\nexport type MutationOp = {\n    kind: \"insert\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"upsert\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"insertIgnore\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"update\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"delete\";\n    table: string;\n    pk: KeyedRow;\n};","description":"One structured write intent — the discriminated union that mirrors the write half of the client\n`MutationTx` 1:1. Keyed (column-name addressed), so it is independent of column order.","source":"packages/client/src/mutation-ops.ts","line":17,"href":"/reference/typescript/replica/#symbol-MutationOp"},{"name":"MutationOutcomeFrame","originalName":"MutationOutcomeFrame","kind":"InterfaceDeclaration","signature":"/** A room authority's verdict for a NON-applied mutation (RINDLE-REALTIME-QUERY-ENABLEMENT\n *  §3.3, the deopt handshake; Slice H-iv-b server half / H-v client half). Sent on the author's\n *  own socket for every mutation the room did NOT apply, always BEFORE the lmid ack that burns\n *  the `mid` (same-socket ordering only — the ack may reach the client through another path\n *  first, e.g. a replayed lmid snapshot). Applied mutations send NOTHING: silence + lmid\n *  coverage ⇒ applied.\n *\n *  - `kind: \"deopt\"` — the room's §3.3 commit gate refused the routed mutation (or its\n *    environment fell short, e.g. `tx.query`); the mid is burnt in the ROOM ledger with zero\n *    effects and the client re-enqueues the same logical mutation onto the daemon stream.\n *    `name`/`args` are echoed so the frame is SELF-CONTAINED: a client that already retired the\n *    entry (the burnt-mid confirm won the race, or the frame is a replay re-answer) re-invokes\n *    from the frame alone.\n *  - `kind: \"rejected\"` — FINAL (authz/validation): the mid is burnt the same way and the\n *    prediction snaps back on the ordinary lmid release; no re-route.\n *\n *  `reason` may be absent on a re-answered frame whose record was seeded from journal replay\n *  (the verdict is journaled; the reason is not). */\nexport interface MutationOutcomeFrame {\n    mid: number;\n    kind: \"deopt\" | \"rejected\";\n    reason?: string;\n    /** Echoed on DEOPT frames only (self-contained re-invoke — see above). */\n    name?: string;\n    args?: unknown;\n}","description":"A room authority's verdict for a NON-applied mutation (RINDLE-REALTIME-QUERY-ENABLEMENT\n§3.3, the deopt handshake; Slice H-iv-b server half / H-v client half). Sent on the author's\nown socket for every mutation the room did NOT apply, always BEFORE the lmid ack that burns\nthe `mid` (same-socket ordering only — the ack may reach the client through another path\nfirst, e.g. a replayed lmid snapshot). Applied mutations send NOTHING: silence + lmid\ncoverage ⇒ applied.\n\n- `kind: \"deopt\"` — the room's §3.3 commit gate refused the routed mutation (or its\n  environment fell short, e.g. `tx.query`); the mid is burnt in the ROOM ledger with zero\n  effects and the client re-enqueues the same logical mutation onto the daemon stream.\n  `name`/`args` are echoed so the frame is SELF-CONTAINED: a client that already retired the\n  entry (the burnt-mid confirm won the race, or the frame is a replay re-answer) re-invokes\n  from the frame alone.\n- `kind: \"rejected\"` — FINAL (authz/validation): the mid is burnt the same way and the\n  prediction snaps back on the ordinary lmid release; no re-route.\n\n`reason` may be absent on a re-answered frame whose record was seeded from journal replay\n(the verdict is journaled; the reason is not).","source":"packages/client/src/types.ts","line":261,"href":"/reference/typescript/replica/#symbol-MutationOutcomeFrame"},{"name":"MutatorCtx","originalName":"MutatorCtx","kind":"InterfaceDeclaration","signature":"/** The minimal per-invocation context a shared mutator sees on BOTH tiers: the acting principal. The\n *  server injects its AUTHENTICATED user; the client injects its local user. (The server's own\n *  `MutationContext` is a superset of this.) */\nexport interface MutatorCtx {\n    user: string;\n}","description":"The minimal per-invocation context a shared mutator sees on BOTH tiers: the acting principal. The\nserver injects its AUTHENTICATED user; the client injects its local user. (The server's own\n`MutationContext` is a superset of this.)","source":"packages/client/src/mutation-ops.ts","line":141,"href":"/reference/typescript/replica/#symbol-MutatorCtx"},{"name":"NamedQuery","originalName":"NamedQuery","kind":"InterfaceDeclaration","signature":"/**\n * A single, co-located NAMED query (see {@link defineQuery}). It is:\n *   - **callable on the client** — `q(args, ctx?)` validates + builds + stamps the result with its\n *     remote subscription identity (`name` + args — NOT ctx), so a component that imports it always\n *     SYNCS. There is no unstamped builder to import by accident.\n *   - **registerable on the server** — it carries its `queryName` and a `resolve` that re-runs the\n *     SAME validator on untrusted wire args and builds the AUTHORITATIVE `Query` from the server's\n *     own ctx ({@link registerQueries `registerQueries`} in `@rindle/api-server`).\n *\n * `Ctx` is the ctx parameter list mirrored from `build` — `[]`, `[ctx: C]`, or `[ctx?: C]`. It is\n * never part of the wire identity.\n */\nexport interface NamedQuery<Args, Ctx extends readonly unknown[], Q extends AnyQuery> {\n    (args: Args, ...ctx: Ctx): Q;\n    /** The wire identity. The daemon leases by this name; client and server MUST agree on it — which\n     *  they do, because both sides import the SAME `defineQuery` value. */\n    readonly queryName: string;\n    /** The §2.1 realtime label, when this query was defined with one ({@link DefineQueryOptions}).\n     *  Absent on unlabeled queries. Carried onto the stamped built Query too, and preserved through\n     *  `registerQueries` on the server. */\n    readonly realtime?: RealtimeQueryLabel<Args>;\n    /** Server-side: validate raw wire args, then build the authoritative `Query` from the server's\n     *  authoritative ctx (forwarded by `registerQueries`). */\n    resolve(rawArgs: unknown, ...ctx: Ctx): Q;\n}","description":"A single, co-located NAMED query (see {@link defineQuery}). It is:\n  - **callable on the client** — `q(args, ctx?)` validates + builds + stamps the result with its\n    remote subscription identity (`name` + args — NOT ctx), so a component that imports it always\n    SYNCS. There is no unstamped builder to import by accident.\n  - **registerable on the server** — it carries its `queryName` and a `resolve` that re-runs the\n    SAME validator on untrusted wire args and builds the AUTHORITATIVE `Query` from the server's\n    own ctx ({@link registerQueries `registerQueries`} in `@rindle/api-server`).\n\n`Ctx` is the ctx parameter list mirrored from `build` — `[]`, `[ctx: C]`, or `[ctx?: C]`. It is\nnever part of the wire identity.","source":"packages/client/src/query.ts","line":425,"href":"/reference/typescript/replica/#symbol-NamedQuery"},{"name":"NamedRow","originalName":"NamedRow","kind":"TypeAliasDeclaration","signature":"/** A row named against its level's wire columns. */\nexport type NamedRow = Record<string, WireValue>;","description":"A row named against its level's wire columns.","source":"packages/client/src/resolve.ts","line":26,"href":"/reference/typescript/replica/#symbol-NamedRow"},{"name":"ne","originalName":"ne","kind":"VariableDeclaration","signature":"export declare const ne: <V>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":27,"href":"/reference/typescript/replica/#symbol-ne"},{"name":"newQueryBuilder","originalName":"newQueryBuilder","kind":"FunctionDeclaration","signature":"/** A schema-bound query-builder factory for portable client/server query definitions. SERVER\n *  scope: local-only tables are excluded (a named/remote query may never reference one). */\nexport declare function newQueryBuilder<S extends ColsMap>(schema: Schema<S>): QueryRoot<S>;","description":"A schema-bound query-builder factory for portable client/server query definitions. SERVER\nscope: local-only tables are excluded (a named/remote query may never reference one).","source":"packages/client/src/query.ts","line":1333,"href":"/reference/typescript/replica/#symbol-newQueryBuilder"},{"name":"NormalizedEvent","originalName":"NormalizedEvent","kind":"TypeAliasDeclaration","signature":"/**\n * A per-query NORMALIZED stream event — the path-free twin of {@link ChangeEvent}. The\n * `hello` carries the flat per-table schemas (no nested view schema, §3); `snapshot`/`batch`\n * carry table-tagged {@link NormalizedOp}s. The `NormalizedSync` layer folds these into the\n * local engine's base tables.\n *\n * `cv` (the global commit version the frame's data reflects — OPTIMISTIC-WRITES-DESIGN.md\n * §8.3/§8.6) is present on sources that speak the optimistic protocol; the plain normalized\n * path may omit it.\n */\nexport type NormalizedEvent = {\n    type: \"hello\";\n    tables: NormalizedTableSchema[];\n    comparatorVersion: number;\n    normalizedFp: string;\n} | {\n    type: \"snapshot\";\n    ops: NormalizedOp[];\n    cv?: number;\n} | {\n    type: \"batch\";\n    ops: NormalizedOp[];\n    cv?: number;\n};","description":"A per-query NORMALIZED stream event — the path-free twin of {@link ChangeEvent}. The\n`hello` carries the flat per-table schemas (no nested view schema, §3); `snapshot`/`batch`\ncarry table-tagged {@link NormalizedOp}s. The `NormalizedSync` layer folds these into the\nlocal engine's base tables.\n\n`cv` (the global commit version the frame's data reflects — OPTIMISTIC-WRITES-DESIGN.md\n§8.3/§8.6) is present on sources that speak the optimistic protocol; the plain normalized\npath may omit it.","source":"packages/client/src/types.ts","line":123,"href":"/reference/typescript/replica/#symbol-NormalizedEvent"},{"name":"NormalizedOp","originalName":"NormalizedOp","kind":"TypeAliasDeclaration","signature":"/**\n * A table-tagged, path-free row delta — the **normalized** wire payload (the path-free twin\n * of {@link FlatChange}; NORMALIZED-CHANGES-DESIGN.md §3). Rows are positional (bare cells; a\n * json column is its raw JSON string). `op` is the discriminant. Lives here (not in\n * `@rindle/normalized`) so both the protocol (`@rindle/remote`) and the sync layer share one type.\n */\nexport type NormalizedOp = {\n    table: string;\n    op: \"add\";\n    row: WireValue[];\n} | {\n    table: string;\n    op: \"remove\";\n    row: WireValue[];\n} | {\n    table: string;\n    op: \"edit\";\n    old: WireValue[];\n    new: WireValue[];\n};","description":"A table-tagged, path-free row delta — the **normalized** wire payload (the path-free twin\nof {@link FlatChange}; NORMALIZED-CHANGES-DESIGN.md §3). Rows are positional (bare cells; a\njson column is its raw JSON string). `op` is the discriminant. Lives here (not in\n`@rindle/normalized`) so both the protocol (`@rindle/remote`) and the sync layer share one type.","source":"packages/client/src/types.ts","line":100,"href":"/reference/typescript/replica/#symbol-NormalizedOp"},{"name":"NormalizedSource","originalName":"NormalizedSource","kind":"InterfaceDeclaration","signature":"/**\n * The server side of the **normalized** local-first path (NORMALIZED-CHANGES-DESIGN.md §5/§7):\n * registers queries and pushes each one's normalized footprint stream ({@link NormalizedEvent}s).\n * Both the in-process native (`@rindle/replica`) source and the ws (`@rindle/remote`\n * `RemoteNormalizedSource`) implement it; `@rindle/normalized`'s `NormalizedBackend` consumes one,\n * never knowing which — a sibling seam of {@link Backend} for the normalized composition.\n */\nexport interface NormalizedSource {\n    registerQuery(queryId: QueryId, remote: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Send base-table writes to the server; the authoritative stream flows back. */\n    mutate(mutations: Mutation[]): Promise<void>;\n    onNormalized(handler: (queryId: QueryId, event: NormalizedEvent) => void): void;\n    /** Optional: the backend hands its OWN typed per-table schemas so the source can validate\n     *  each server `hello` against them (column order / PK by name) and reject a schema skew\n     *  rather than silently transposing positional cells (CRIT#4 / §3 \"drift ⇒ re-subscribe\").\n     *  Sources that can't skew (the in-process native source) may omit it. */\n    expectClientSchema?(tables: NormalizedTableSchema[]): void;\n}","description":"The server side of the **normalized** local-first path (NORMALIZED-CHANGES-DESIGN.md §5/§7):\nregisters queries and pushes each one's normalized footprint stream ({@link NormalizedEvent}s).\nBoth the in-process native (`@rindle/replica`) source and the ws (`@rindle/remote`\n`RemoteNormalizedSource`) implement it; `@rindle/normalized`'s `NormalizedBackend` consumes one,\nnever knowing which — a sibling seam of {@link Backend} for the normalized composition.","source":"packages/client/src/types.ts","line":221,"href":"/reference/typescript/replica/#symbol-NormalizedSource"},{"name":"NormalizedTableSchema","originalName":"NormalizedTableSchema","kind":"InterfaceDeclaration","signature":"/** One base table's flat schema on the normalized `hello` (§3): column names (in order) +\n *  primary-key column indices. Wire rows are positional against `columns`. */\nexport interface NormalizedTableSchema {\n    name: string;\n    columns: string[];\n    primaryKey: number[];\n}","description":"One base table's flat schema on the normalized `hello` (§3): column names (in order) +\nprimary-key column indices. Wire rows are positional against `columns`.","source":"packages/client/src/types.ts","line":107,"href":"/reference/typescript/replica/#symbol-NormalizedTableSchema"},{"name":"normalizedTableSchemas","originalName":"normalizedTableSchemas","kind":"FunctionDeclaration","signature":"/** The client's per-table flat schema (name + column order + PK indices), the shape a\n *  normalized `hello` advertises (NORMALIZED-CHANGES-DESIGN.md §3). Used to validate a\n *  server hello against the CLIENT's own typed schema so a column-order / PK skew is caught\n *  instead of silently transposing positional cells (CRIT#4). Sorted by name for stable\n *  ordering.\n *\n *  Local-only tables are **omitted** (`201-LOCAL-ONLY-TABLES-DESIGN.md` E1): the client never\n *  claims them to the server, the server never expects/ships them, and they stay out of the schema\n *  fingerprint (`normalizedFp`) so a local table can't skew it vs. the server's. */\nexport declare function normalizedTableSchemas<S extends ColsMap>(schema: Schema<S>): {\n    name: string;\n    columns: string[];\n    primaryKey: number[];\n}[];","description":"The client's per-table flat schema (name + column order + PK indices), the shape a\nnormalized `hello` advertises (NORMALIZED-CHANGES-DESIGN.md §3). Used to validate a\nserver hello against the CLIENT's own typed schema so a column-order / PK skew is caught\ninstead of silently transposing positional cells (CRIT#4). Sorted by name for stable\nordering.\n\nLocal-only tables are **omitted** (`201-LOCAL-ONLY-TABLES-DESIGN.md` E1): the client never\nclaims them to the server, the server never expects/ships them, and they stay out of the schema\nfingerprint (`normalizedFp`) so a local table can't skew it vs. the server's.","source":"packages/client/src/schema.ts","line":550,"href":"/reference/typescript/replica/#symbol-normalizedTableSchemas"},{"name":"notExists","originalName":"notExists","kind":"FunctionDeclaration","signature":"/** `NOT EXISTS` by a named {@link Relationship}. */\nexport declare function notExists<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<RowOf<PC>>;\n/** `NOT EXISTS (<correlated subquery>)`. */\nexport declare function notExists<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<R>;","description":"`NOT EXISTS` by a named {@link Relationship}.\n`NOT EXISTS (<correlated subquery>)`.","source":"packages/client/src/query.ts","line":1229,"href":"/reference/typescript/replica/#symbol-notExists"},{"name":"notExistsNoSync","originalName":"notExistsNoSync","kind":"FunctionDeclaration","signature":"/** `NOT EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate — the `NOT EXISTS` form of {@link existsNoSync} (a deny-style permission rule). */\nexport declare function notExistsNoSync<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<RowOf<PC>>;\nexport declare function notExistsNoSync<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<R>;","description":"`NOT EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate — the `NOT EXISTS` form of {@link existsNoSync} (a deny-style permission rule).","source":"packages/client/src/query.ts","line":1270,"href":"/reference/typescript/replica/#symbol-notExistsNoSync"},{"name":"notIlike","originalName":"notIlike","kind":"VariableDeclaration","signature":"export declare const notIlike: (pattern: string) => Pred<string>;","description":"","source":"packages/client/src/operators.ts","line":35,"href":"/reference/typescript/replica/#symbol-notIlike"},{"name":"notInList","originalName":"notInList","kind":"VariableDeclaration","signature":"export declare const notInList: <V>(values: V[]) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":37,"href":"/reference/typescript/replica/#symbol-notInList"},{"name":"notLike","originalName":"notLike","kind":"VariableDeclaration","signature":"export declare const notLike: (pattern: string) => Pred<string>;","description":"","source":"packages/client/src/operators.ts","line":33,"href":"/reference/typescript/replica/#symbol-notLike"},{"name":"number","originalName":"number","kind":"VariableDeclaration","signature":"export declare const number: <T extends number = number>() => ColBuilder<T>;","description":"","source":"packages/client/src/schema.ts","line":47,"href":"/reference/typescript/replica/#symbol-number"},{"name":"OneShotBackend","originalName":"OneShotBackend","kind":"ClassDeclaration","signature":"/**\n * A no-op live backend for SSR (SSR-DESIGN.md §6.1): it opens no transport and never streams.\n * `registerQuery` is inert, `mutate` rejects, and no `ChangeEvent` is pushed. Every view stays\n * PENDING — reading its SSR {@link Store.seedAssembled seed} — and, lacking `onResultType`,\n * reports `complete` (a backend with no server lifecycle leaves every view authoritative).\n */\nexport declare class OneShotBackend implements Backend {\n    registerQuery(_qid: QueryId, _ast: unknown, _remote?: RemoteQuery): void;\n    unregisterQuery(_qid: QueryId): void;\n    mutate(_mutations: Mutation[]): Promise<void>;\n    onEvent(_handler: (queryId: QueryId, event: ChangeEvent) => void): void;\n}","description":"A no-op live backend for SSR (SSR-DESIGN.md §6.1): it opens no transport and never streams.\n`registerQuery` is inert, `mutate` rejects, and no `ChangeEvent` is pushed. Every view stays\nPENDING — reading its SSR {@link Store.seedAssembledseed} — and, lacking `onResultType`,\nreports `complete` (a backend with no server lifecycle leaves every view authoritative).","source":"packages/client/src/ssr.ts","line":48,"href":"/reference/typescript/replica/#symbol-OneShotBackend"},{"name":"OneShotQueryFn","originalName":"OneShotQueryFn","kind":"TypeAliasDeclaration","signature":"/** The one-shot read the server Store calls to preload a query. Two topologies inject different\n *  fns (SSR-DESIGN.md §6):\n *\n *   - **Direct to the daemon** (the trusted tier holds the daemon token): use `ast` —\n *     `(i) => daemon.query(i)`.\n *   - **Through the application's API tier** (the authority resolves names → ASTs, the loader never\n *     sends a raw AST): use `name`/`args` — `(i) => fetch('/api/rindle/read', {name: i.name, args: i.args})`.\n *\n *  `ast` is always present (the Store seeds the local view by its `viewKey`); `name`/`args` are\n *  present when the preloaded query came from `defineQuery`. This Store does not authenticate\n *  users or filter rows. The injected function must enforce access: either call the authenticated\n *  API route, or authorize and construct the AST before a privileged direct daemon read. */\nexport type OneShotQueryFn = (input: {\n    ast: unknown;\n    name?: string;\n    args?: unknown;\n    visibilityKey?: string;\n    ttlMs?: number;\n}) => Promise<OneShotResult>;","description":"The one-shot read the server Store calls to preload a query. Two topologies inject different\nfns (SSR-DESIGN.md §6):\n\n - **Direct to the daemon** (the trusted tier holds the daemon token): use `ast` —\n   `(i) => daemon.query(i)`.\n - **Through the application's API tier** (the authority resolves names → ASTs, the loader never\n   sends a raw AST): use `name`/`args` — `(i) => fetch('/api/rindle/read', {name: i.name, args: i.args})`.\n\n`ast` is always present (the Store seeds the local view by its `viewKey`); `name`/`args` are\npresent when the preloaded query came from `defineQuery`. This Store does not authenticate\nusers or filter rows. The injected function must enforce access: either call the authenticated\nAPI route, or authorize and construct the AST before a privileged direct daemon read.","source":"packages/client/src/ssr.ts","line":38,"href":"/reference/typescript/replica/#symbol-OneShotQueryFn"},{"name":"OneShotResult","originalName":"OneShotResult","kind":"InterfaceDeclaration","signature":"/** An authorized one-shot read result, as far as the server Store needs it: the\n *  assembled rows plus the `cvMin` baseline they reflect. (Matches `@rindle/daemon-client`'s\n *  `QueryOnceOutput`, but `@rindle/client` stays dependency-free — inject the call.) */\nexport interface OneShotResult {\n    rows: AssembledNode[];\n    cvMin?: number;\n}","description":"An authorized one-shot read result, as far as the server Store needs it: the\nassembled rows plus the `cvMin` baseline they reflect. (Matches `@rindle/daemon-client`'s\n`QueryOnceOutput`, but `@rindle/client` stays dependency-free — inject the call.)","source":"packages/client/src/ssr.ts","line":21,"href":"/reference/typescript/replica/#symbol-OneShotResult"},{"name":"OptimisticSource","originalName":"OptimisticSource","kind":"InterfaceDeclaration","signature":"/**\n * The server side of the OPTIMISTIC path (OPTIMISTIC-WRITES-DESIGN.md §8): the\n * {@link NormalizedSource} stream with `cv`-tagged data frames, plus the connection-level\n * {@link ProgressFrame} channel and the named-mutator upstream. The client buffers data\n * frames by `cv` and applies all `cv ≤ cvMin` as one coherent release (§8.5).\n */\nexport interface OptimisticSource {\n    registerQuery(queryId: QueryId, remote: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Ship one named-mutator invocation upstream (§8.1). Confirmation rides the progress frames. */\n    pushMutation(envelope: MutationEnvelope): Promise<void>;\n    onNormalized(handler: (queryId: QueryId, event: NormalizedEvent) => void): void;\n    onProgress(handler: (frame: ProgressFrame) => void): void;\n    /** Optional: the backend hands its OWN typed per-table schemas so the source validates each\n     *  server `hello` against them and rejects a schema skew (CRIT#4); see {@link NormalizedSource}. */\n    expectClientSchema?(tables: NormalizedTableSchema[]): void;\n    /** Optional: fired when the server restarts (a transport that can detect it, e.g. via a daemon\n     *  boot id). The backend resets its `cv` watermark so the server's reset `cv` sequence is\n     *  accepted rather than dropped as stale. In-process sources never restart and omit it. */\n    onRestart?(handler: () => void): void;\n    /** Optional (Slice H-v): the channel's {@link MutationOutcomeFrame} stream — the room deopt\n     *  handshake's client half. **OUT-OF-BAND BY DESIGN**: the frame carries no `cv` and the source\n     *  MUST dispatch it immediately on arrival, never behind the cv buffer — a deopt has to migrate\n     *  its pending entry BEFORE the buffered lmid release that would otherwise retire it as a\n     *  success (and the §7.3 hold-back trigger, keyed on the entry's confirming domain, would then\n     *  park its staged writes the wrong way). Sources whose authority never deopts (the in-process\n     *  native source, a plain daemon) omit it. */\n    onMutationOutcome?(handler: (frame: MutationOutcomeFrame) => void): void;\n    /** Optional (Slice H-v, the §7.5 rule-3 crash-window closer): fired when the transport\n     *  RE-establishes its session (reconnect → re-`init`), BEFORE any post-reconnect frame is\n     *  processed — the ordering is load-bearing: the re-subscribed lmid stream's fresh snapshot may\n     *  cover a mid whose `mutationOutcome` frame died with the old socket, and once that release\n     *  retires the entry as an apparent success there is nothing left to re-send. The backend\n     *  re-sends this domain's unconfirmed pending envelopes with their ORIGINAL mids, in mid order;\n     *  the source may DEFER their delivery until the session is re-authorized (a room's\n     *  `pushMutation` requires the lease-token subscribe's subject). Idempotent under the domain's\n     *  own ledger — a processed mid dedups silently (silence + lmid coverage ⇒ applied), a\n     *  non-applied mid is re-answered from the authority's recorded-outcome map (resolving even an\n     *  already-retired entry through the handshake's not-found arm). Distinct from\n     *  {@link onRestart} (a NEW server incarnation): a same-incarnation socket drop re-syncs\n     *  without restarting, and envelopes sent into the dead socket are exactly what this recovers.\n     *  In-process sources never drop a session and omit it. */\n    onResync?(handler: () => void): void;\n}","description":"The server side of the OPTIMISTIC path (OPTIMISTIC-WRITES-DESIGN.md §8): the\n{@link NormalizedSource} stream with `cv`-tagged data frames, plus the connection-level\n{@link ProgressFrame} channel and the named-mutator upstream. The client buffers data\nframes by `cv` and applies all `cv ≤ cvMin` as one coherent release (§8.5).","source":"packages/client/src/types.ts","line":303,"href":"/reference/typescript/replica/#symbol-OptimisticSource"},{"name":"or","originalName":"or","kind":"FunctionDeclaration","signature":"/** At least one child must hold. */\nexport declare function or<R>(...conds: Cond<R>[]): Cond<R>;","description":"At least one child must hold.","source":"packages/client/src/operators.ts","line":71,"href":"/reference/typescript/replica/#symbol-or"},{"name":"OrderPart","originalName":"OrderPart","kind":"TypeAliasDeclaration","signature":"/** One `(field, direction)` ordering — serializes as the 2-tuple `[\"id\", \"asc\"]`. */\nexport type OrderPart = [\n    field: string,\n    dir: Dir\n];","description":"One `(field, direction)` ordering — serializes as the 2-tuple `[\"id\", \"asc\"]`.","source":"packages/client/src/ast.ts","line":8,"href":"/reference/typescript/replica/#symbol-OrderPart"},{"name":"PathSeg","originalName":"PathSeg","kind":"InterfaceDeclaration","signature":"export interface PathSeg {\n    rel: number;\n    parentRow: WireValue[];\n}","description":"","source":"packages/client/src/types.ts","line":54,"href":"/reference/typescript/replica/#symbol-PathSeg"},{"name":"persistedLocalTableNames","originalName":"persistedLocalTableNames","kind":"FunctionDeclaration","signature":"/** The subset of {@link localTableNames} eligible for the persistence plane — `local: true` only.\n *  A `local: \"session\"` table stays outside it: never persisted, never replicated across tabs\n *  (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §5.4). */\nexport declare function persistedLocalTableNames<S extends ColsMap>(schema: Schema<S>): Set<string>;","description":"The subset of {@link localTableNames} eligible for the persistence plane — `local: true` only.\nA `local: \"session\"` table stays outside it: never persisted, never replicated across tabs\n(`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §5.4).","source":"packages/client/src/schema.ts","line":419,"href":"/reference/typescript/replica/#symbol-persistedLocalTableNames"},{"name":"PkColsOf","originalName":"PkColsOf","kind":"TypeAliasDeclaration","signature":"/** The primary-key column union for table `N` of a schema, read from its `__pk` map `P` and narrowed\n *  to `N`'s actual columns (falling back to all columns when `P` doesn't name `N` — e.g. the loose\n *  default schema). Feeds {@link PkOf}/{@link UpdateOf} in the typed mutator tx. */\nexport type PkColsOf<S extends ColsMap, P extends Record<string, string>, N extends keyof S> = (N extends keyof P ? P[N] : keyof S[N] & string) & keyof S[N] & string;","description":"The primary-key column union for table `N` of a schema, read from its `__pk` map `P` and narrowed\nto `N`'s actual columns (falling back to all columns when `P` doesn't name `N` — e.g. the loose\ndefault schema). Feeds {@link PkOf}/{@link UpdateOf} in the typed mutator tx.","source":"packages/client/src/schema.ts","line":152,"href":"/reference/typescript/replica/#symbol-PkColsOf"},{"name":"PkMap","originalName":"PkMap","kind":"TypeAliasDeclaration","signature":"/** name → (some subset of its column names): the loose shape a {@link Schema}'s pk-map satisfies. The\n *  fallback when a schema wasn't built through {@link createSchema} — every column could be the pk. */\nexport type PkMap<S extends ColsMap> = {\n    [N in keyof S]: keyof S[N] & string;\n};","description":"name → (some subset of its column names): the loose shape a {@link Schema}'s pk-map satisfies. The\nfallback when a schema wasn't built through {@link createSchema} — every column could be the pk.","source":"packages/client/src/schema.ts","line":203,"href":"/reference/typescript/replica/#symbol-PkMap"},{"name":"PkMapOf","originalName":"PkMapOf","kind":"TypeAliasDeclaration","signature":"/** name → its primary-key column union, derived from the tables array (the PK captured by the\n *  `primaryKey(...)` builder). Powers the mutator tx's typed `update`/`delete`/`row` pk args. */\nexport type PkMapOf<T extends readonly AnyTable[]> = {\n    [E in T[number] as E[typeof SCHEMA][\"name\"]]: E[typeof SCHEMA][\"primaryKey\"][number];\n};","description":"name → its primary-key column union, derived from the tables array (the PK captured by the\n`primaryKey(...)` builder). Powers the mutator tx's typed `update`/`delete`/`row` pk args.","source":"packages/client/src/schema.ts","line":194,"href":"/reference/typescript/replica/#symbol-PkMapOf"},{"name":"PkOf","originalName":"PkOf","kind":"TypeAliasDeclaration","signature":"/** The exact PRIMARY-KEY columns of a table (each typed), required — the identity a `delete`/`row`,\n *  and the WHERE half of an `update`, take. `PK` is the table's pk-column union (the schema's `__pk`). */\nexport type PkOf<C extends AnyCols, PK extends string> = {\n    [K in PK & keyof C]: ColT<C[K & keyof C]>;\n};","description":"The exact PRIMARY-KEY columns of a table (each typed), required — the identity a `delete`/`row`,\nand the WHERE half of an `update`, take. `PK` is the table's pk-column union (the schema's `__pk`).","source":"packages/client/src/schema.ts","line":140,"href":"/reference/typescript/replica/#symbol-PkOf"},{"name":"Pred","originalName":"Pred","kind":"InterfaceDeclaration","signature":"/** A value predicate (an operator applied to a value). `V` is a phantom for type-checking. */\nexport interface Pred<V> {\n    readonly [PRED]: true;\n    readonly op: SimpleOp;\n    readonly value: LitValue;\n    readonly __v?: V;\n}","description":"A value predicate (an operator applied to a value). `V` is a phantom for type-checking.","source":"packages/client/src/operators.ts","line":11,"href":"/reference/typescript/replica/#symbol-Pred"},{"name":"ProgressFrame","originalName":"ProgressFrame","kind":"InterfaceDeclaration","signature":"/** The connection-level progress frame (§8.6): advances the coherent-apply release point\n *  (`cvMin`). A pure release signal — mutation confirmation does NOT ride it: `lmid` is a\n *  row in {@link CLIENT_MUTATIONS_TABLE}, delivered through the client's own per-client\n *  system query ({@link LMID_QUERY_NAME}) like any data, so it is released by the same\n *  `cvMin` as the commit's effects (transactionally coherent by construction). */\nexport interface ProgressFrame {\n    cvMin: number;\n}","description":"The connection-level progress frame (§8.6): advances the coherent-apply release point\n(`cvMin`). A pure release signal — mutation confirmation does NOT ride it: `lmid` is a\nrow in {@link CLIENT_MUTATIONS_TABLE}, delivered through the client's own per-client\nsystem query ({@link LMID_QUERY_NAME}) like any data, so it is released by the same\n`cvMin` as the commit's effects (transactionally coherent by construction).","source":"packages/client/src/types.ts","line":275,"href":"/reference/typescript/replica/#symbol-ProgressFrame"},{"name":"queries","originalName":"queries","kind":"FunctionDeclaration","signature":"/** A typed query entry over a schema: `queries(schema).issue.where.closed(false)…`. */\nexport declare function queries<S extends ColsMap>(schema: Schema<S>, onMaterialize?: (query: AnyQuery) => unknown, opts?: QueriesOptions): QueryRoot<S>;","description":"A typed query entry over a schema: `queries(schema).issue.where.closed(false)…`.","source":"packages/client/src/query.ts","line":1297,"href":"/reference/typescript/replica/#symbol-queries"},{"name":"QueriesOptions","originalName":"QueriesOptions","kind":"InterfaceDeclaration","signature":"/** Scoping for {@link queries} (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5). */\nexport interface QueriesOptions {\n    /** Include {@link TableMeta.local local-only} tables in the builder's root scope. The **local**\n     *  builder (`store.query`) sets this; the **server** builder ({@link newQueryBuilder}) does NOT,\n     *  so naming a local table in a remote/named query is a build error (Q1 / E3 client half). */\n    includeLocal?: boolean;\n}","description":"Scoping for {@link queries} (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5).","source":"packages/client/src/query.ts","line":1289,"href":"/reference/typescript/replica/#symbol-QueriesOptions"},{"name":"Query","originalName":"Query","kind":"TypeAliasDeclaration","signature":"export type Query<C extends AnyCols, Rels = {}, One extends boolean = false, Sel extends string = never, LocalRels = Rels, Agg = false> = Omit<QueryBase<C, Rels, One, Sel, LocalRels, Agg>, \"where\"> & {\n    where: QueryBase<C, Rels, One, Sel, LocalRels, Agg>[\"where\"] & WhereProxy<C, Rels, One, Sel, LocalRels>;\n} & WhereSugar<C, Rels, One, Sel, LocalRels>;","description":"","source":"packages/client/src/query.ts","line":296,"href":"/reference/typescript/replica/#symbol-Query"},{"name":"QueryArg","originalName":"QueryArg","kind":"TypeAliasDeclaration","signature":"/** What {@link IsoTx.query} accepts: a query handle whose `.ast()` lowers to the wire {@link Ast} —\n *  exactly what the typed query builder produces (`newQueryBuilder(schema).<table>…`, the tier-agnostic\n *  server-scope builder both tiers can construct because it performs no I/O). Structural so the seam\n *  need not carry the builder's heavy generics. */\nexport type QueryArg = {\n    ast(): Ast;\n};","description":"What {@link IsoTx.query} accepts: a query handle whose `.ast()` lowers to the wire {@link Ast} —\nexactly what the typed query builder produces (`newQueryBuilder(schema).<table>…`, the tier-agnostic\nserver-scope builder both tiers can construct because it performs no I/O). Structural so the seam\nneed not carry the builder's heavy generics.","source":"packages/client/src/mutation-ops.ts","line":84,"href":"/reference/typescript/replica/#symbol-QueryArg"},{"name":"QueryBuilder","originalName":"QueryBuilder","kind":"TypeAliasDeclaration","signature":"/**\n * Build a `Query` (an `Ast` constructor) from already-validated args, plus an optional CONTEXT — the\n * authenticated principal the query is scoped to. `Ctx` is **off-wire**: the client passes its own\n * session ctx at the callsite, the server injects the AUTHORITATIVE ctx ({@link NamedQuery.resolve}\n * via `registerQueries`), and the wire still carries only `name` + args. Both tiers run the same\n * `build`, so whenever their ctx agrees the AST is byte-identical — and a client can never spoof it,\n * since the server re-derives ctx from its trusted session and ignores anything the client claimed.\n *\n * The ctx is a *tuple* so a query opts into it by how it types `build`'s second parameter — and that\n * shape becomes the call signature verbatim:\n *   - `(args) => Q` — no ctx (`q(args)`).\n *   - `(args, ctx: C) => Q` — ctx REQUIRED (`q(args, ctx)`); for always-authenticated queries.\n *   - `(args, ctx?: C) => Q` — ctx OPTIONAL (`q(args)` or `q(args, ctx)`); sound only when \"no ctx\"\n *     is a real, SYMMETRIC state — i.e. the build yields the SAME broad AST whether ctx is absent or\n *     present-with-no-user (anonymous / SSR), since the server always forwards a ctx (possibly\n *     anonymous). Otherwise type ctx required so the type catches an omitted ctx.\n */\nexport type QueryBuilder<Args, Q extends AnyQuery, Ctx extends readonly unknown[] = [\n]> = (args: Args, ...ctx: Ctx) => Q;","description":"Build a `Query` (an `Ast` constructor) from already-validated args, plus an optional CONTEXT — the\nauthenticated principal the query is scoped to. `Ctx` is **off-wire**: the client passes its own\nsession ctx at the callsite, the server injects the AUTHORITATIVE ctx ({@link NamedQuery.resolve}\nvia `registerQueries`), and the wire still carries only `name` + args. Both tiers run the same\n`build`, so whenever their ctx agrees the AST is byte-identical — and a client can never spoof it,\nsince the server re-derives ctx from its trusted session and ignores anything the client claimed.\n\nThe ctx is a *tuple* so a query opts into it by how it types `build`'s second parameter — and that\nshape becomes the call signature verbatim:\n  - `(args) => Q` — no ctx (`q(args)`).\n  - `(args, ctx: C) => Q` — ctx REQUIRED (`q(args, ctx)`); for always-authenticated queries.\n  - `(args, ctx?: C) => Q` — ctx OPTIONAL (`q(args)` or `q(args, ctx)`); sound only when \"no ctx\"\n    is a real, SYMMETRIC state — i.e. the build yields the SAME broad AST whether ctx is absent or\n    present-with-no-user (anonymous / SSR), since the server always forwards a ctx (possibly\n    anonymous). Otherwise type ctx required so the type catches an omitted ctx.","source":"packages/client/src/query.ts","line":358,"href":"/reference/typescript/replica/#symbol-QueryBuilder"},{"name":"QueryEffect","originalName":"QueryEffect","kind":"TypeAliasDeclaration","signature":"/** A full-shape read a generator mutator yields — a `where`/`orderBy`/`limit`/join query over the\n *  state this mutator is mutating (read-your-writes, like {@link ReadEffect} but an arbitrary shape).\n *  Evaluates to {@link QueryResultRow}`[]` — ALWAYS an array of the matching rows, in the query's\n *  order, on BOTH tiers (a root `.one()` is not unwrapped here: take `[0]`). The single next-type is\n *  a row, so cast the yield (`(yield tx.query(q)) as unknown as QueryResultRow[]`), same as `all`. */\nexport type QueryEffect = {\n    kind: \"query\";\n    query: QueryArg;\n};","description":"A full-shape read a generator mutator yields — a `where`/`orderBy`/`limit`/join query over the\nstate this mutator is mutating (read-your-writes, like {@link ReadEffect} but an arbitrary shape).\nEvaluates to {@link QueryResultRow}`[]` — ALWAYS an array of the matching rows, in the query's\norder, on BOTH tiers (a root `.one()` is not unwrapped here: take `[0]`). The single next-type is\na row, so cast the yield (`(yield tx.query(q)) as unknown as QueryResultRow[]`), same as `all`.","source":"packages/client/src/mutation-ops.ts","line":91,"href":"/reference/typescript/replica/#symbol-QueryEffect"},{"name":"QueryEnsureCache","originalName":"QueryEnsureCache","kind":"ClassDeclaration","signature":"/**\n * Deduplicates route/intent preloads and holds their live view through the navigation handoff.\n *\n * The cache materializes the real named query rather than retaining sync coverage alone: that is\n * what makes `until: \"present\"` observable for overlapping queries already satisfied by local\n * normalized rows. Once the server marks the query complete, the entry is kept briefly for a\n * destination component to take its own retain, then released automatically.\n */\nexport declare class QueryEnsureCache<S extends ColsMap> implements QueryEnsurer {\n    private readonly store;\n    private readonly releaseDelayMs;\n    private readonly maxEntries;\n    private readonly entries;\n    private closed;\n    constructor(store: Store<S>, options?: QueryEnsureCacheOptions);\n    /**\n     * Ensure a named query is retained, resolving according to `options.until`.\n     *\n     * Concurrent calls for the same `(name, args, AST)` share one materialized view and one remote\n     * subscription. A `present` call can resolve from local rows while a concurrent `complete` call\n     * continues waiting for server authority.\n     */\n    ensure<Q extends AnyQuery>(query: Q, options?: EnsureQueryOptions): Promise<void>;\n    /** Release every retained preload and reject outstanding waits. Idempotent. */\n    close(): void;\n    /** Number of retained query entries (primarily useful for tests/devtools). */\n    size(): number;\n    private createEntry;\n    private inspect;\n    private isReady;\n    private touch;\n    private scheduleRelease;\n    private trim;\n    private dispose;\n    private queryError;\n    private detachAbort;\n}","description":"Deduplicates route/intent preloads and holds their live view through the navigation handoff.\n\nThe cache materializes the real named query rather than retaining sync coverage alone: that is\nwhat makes `until: \"present\"` observable for overlapping queries already satisfied by local\nnormalized rows. Once the server marks the query complete, the entry is kept briefly for a\ndestination component to take its own retain, then released automatically.","source":"packages/client/src/ensure.ts","line":76,"href":"/reference/typescript/replica/#symbol-QueryEnsureCache"},{"name":"QueryEnsureCacheOptions","originalName":"QueryEnsureCacheOptions","kind":"InterfaceDeclaration","signature":"export interface QueryEnsureCacheOptions {\n    /** Keep a completed preload alive for this long so the destination can adopt its rows. */\n    releaseDelayMs?: number;\n    /** Bound retained preloads. In-flight waits are never evicted. */\n    maxEntries?: number;\n}","description":"","source":"packages/client/src/ensure.ts","line":29,"href":"/reference/typescript/replica/#symbol-QueryEnsureCacheOptions"},{"name":"QueryEnsurer","originalName":"QueryEnsurer","kind":"InterfaceDeclaration","signature":"/** The structural surface consumed by framework adapters such as `@rindle/tanstack`. */\nexport interface QueryEnsurer {\n    ensure(query: AnyQuery, options?: EnsureQueryOptions): Promise<void>;\n}","description":"The structural surface consumed by framework adapters such as `@rindle/tanstack`.","source":"packages/client/src/ensure.ts","line":37,"href":"/reference/typescript/replica/#symbol-QueryEnsurer"},{"name":"queryFromAst","originalName":"queryFromAst","kind":"FunctionDeclaration","signature":"export declare function queryFromAst(ast: Ast): AnyQuery;","description":"","source":"packages/client/src/query.ts","line":694,"href":"/reference/typescript/replica/#symbol-queryFromAst"},{"name":"QueryId","originalName":"QueryId","kind":"TypeAliasDeclaration","signature":"export type QueryId = number;","description":"","source":"packages/client/src/types.ts","line":128,"href":"/reference/typescript/replica/#symbol-QueryId"},{"name":"QueryInspect","originalName":"QueryInspect","kind":"InterfaceDeclaration","signature":"/** One live materialized view's read-only summary for a devtools pane (DEBUG-TOOLS-BROWSER-DESIGN\n *  §4.2 — \"surface, not instrument\"). All fields are already held by the {@link Store}; this is the\n *  single read-only accessor over the otherwise-private `views`/`asts` maps. */\nexport interface QueryInspect {\n    /** The Store-assigned query id (also the backend's qid — the Store passes it straight through). */\n    qid: QueryId;\n    /** The query's AST (`Store.asts`), for the inspector's pretty-print / table-derivation. */\n    ast: Ast;\n    /** The view's SERVER-CHANNEL state (`unknown` while loading, `complete` once authoritative). */\n    resultType: ResultType;\n    /** Current materialized row count (`view.data.length`). */\n    rowCount: number;\n    /** A capped peek at the projected rows (reference-stable objects off the live view). */\n    sample: readonly unknown[];\n}","description":"One live materialized view's read-only summary for a devtools pane (DEBUG-TOOLS-BROWSER-DESIGN\n§4.2 — \"surface, not instrument\"). All fields are already held by the {@link Store}; this is the\nsingle read-only accessor over the otherwise-private `views`/`asts` maps.","source":"packages/client/src/store.ts","line":74,"href":"/reference/typescript/replica/#symbol-QueryInspect"},{"name":"QueryLocalData","originalName":"QueryLocalData","kind":"TypeAliasDeclaration","signature":"export type QueryLocalData<Q extends AnyQuery> = Q extends Query<infer C, any, infer One, infer Sel, infer LocalRels, infer Agg> ? [\n    Agg\n] extends [\n    false\n] ? One extends true ? (Projected<C, Sel> & LocalRels) | null : readonly (Projected<C, Sel> & LocalRels)[] : readonly Agg[] : never;","description":"","source":"packages/client/src/query.ts","line":310,"href":"/reference/typescript/replica/#symbol-QueryLocalData"},{"name":"QueryResultRow","originalName":"QueryResultRow","kind":"TypeAliasDeclaration","signature":"/** A row returned by a {@link QueryEffect}: column name → cell, plus each materialized relationship\n *  name → its nested row(s) — an array (a plural relationship) or a single row / `null` (a `.one()`\n *  relationship). Recursive. Presented identically on both tiers (a `view.data` row of the same\n *  query). */\nexport type QueryResultRow = {\n    [key: string]: WireValue | QueryResultRow | QueryResultRow[];\n};","description":"A row returned by a {@link QueryEffect}: column name → cell, plus each materialized relationship\nname → its nested row(s) — an array (a plural relationship) or a single row / `null` (a `.one()`\nrelationship). Recursive. Presented identically on both tiers (a `view.data` row of the same\nquery).","source":"packages/client/src/mutation-ops.ts","line":78,"href":"/reference/typescript/replica/#symbol-QueryResultRow"},{"name":"QueryRoot","originalName":"QueryRoot","kind":"TypeAliasDeclaration","signature":"export type QueryRoot<S extends ColsMap> = {\n    [N in keyof S]: Query<S[N]>;\n};","description":"","source":"packages/client/src/query.ts","line":1286,"href":"/reference/typescript/replica/#symbol-QueryRoot"},{"name":"QueryValidator","originalName":"QueryValidator","kind":"TypeAliasDeclaration","signature":"/** Turn raw, UNTRUSTED wire args into the canonical, typed args a query is built from. Its return\n *  type IS the query's args type — written once, it flows to both the client call signature and the\n *  `build` step, so there's no second place to restate the shape. */\nexport type QueryValidator<Args> = (rawArgs: unknown) => Args;","description":"Turn raw, UNTRUSTED wire args into the canonical, typed args a query is built from. Its return\ntype IS the query's args type — written once, it flows to both the client call signature and the\n`build` step, so there's no second place to restate the shape.","source":"packages/client/src/query.ts","line":340,"href":"/reference/typescript/replica/#symbol-QueryValidator"},{"name":"ReadEffect","originalName":"ReadEffect","kind":"TypeAliasDeclaration","signature":"/** A point read a generator mutator yields; the driver resolves it and feeds the row back through\n *  `gen.next(row)`. Read-your-writes on every tier: the client reads its local engine, and both\n *  server backends read the open transaction (the daemon via an interactive mutation session). */\nexport type ReadEffect = {\n    kind: \"row\";\n    table: string;\n    pk: KeyedRow;\n};","description":"A point read a generator mutator yields; the driver resolves it and feeds the row back through\n`gen.next(row)`. Read-your-writes on every tier: the client reads its local engine, and both\nserver backends read the open transaction (the daemon via an interactive mutation session).","source":"packages/client/src/mutation-ops.ts","line":65,"href":"/reference/typescript/replica/#symbol-ReadEffect"},{"name":"RealtimeQueryLabel","originalName":"RealtimeQueryLabel","kind":"InterfaceDeclaration","signature":"/**\n * The realtime LABEL a named query may declare (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §2.1):\n * which api-server room PROFILE the query wants to be served from, and how the query's args map\n * to that profile's key args. This is the DECLARATION only — the serve decision (covering proof,\n * lease routing) is the server's, and the final room key is minted server-side by the profile's\n * own `key` under authoritative ctx, so a label can never place a query in a room the server\n * didn't derive itself. Both tiers import the SAME `defineQuery` value, so they always agree\n * *which profile* a query belongs to.\n */\nexport interface RealtimeQueryLabel<Args = any> {\n    /** The room profile name — must match a `realtime.rooms` key on the api-server (validated\n     *  loudly at `createRindleApiServer` construction). May not contain `/` (the wire room-key\n     *  delimiter). */\n    readonly room: string;\n    /** Map the query's VALIDATED args to the profile's key args (what the server feeds the\n     *  profile's `key(args)`). Identity when omitted. Must be pure — both tiers may run it. */\n    readonly args?: (queryArgs: Args) => unknown;\n}","description":"The realtime LABEL a named query may declare (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §2.1):\nwhich api-server room PROFILE the query wants to be served from, and how the query's args map\nto that profile's key args. This is the DECLARATION only — the serve decision (covering proof,\nlease routing) is the server's, and the final room key is minted server-side by the profile's\nown `key` under authoritative ctx, so a label can never place a query in a room the server\ndidn't derive itself. Both tiers import the SAME `defineQuery` value, so they always agree\n*which profile* a query belongs to.","source":"packages/client/src/query.ts","line":372,"href":"/reference/typescript/replica/#symbol-RealtimeQueryLabel"},{"name":"RefinableTable","originalName":"RefinableTable","kind":"TypeAliasDeclaration","signature":"/** A table def acceptable to {@link refineSchema} over `Schema<S>`: its NAME must be one of `S`'s\n *  tables (a def for an unknown table is a compile error at the call site). */\nexport type RefinableTable<S extends ColsMap> = {\n    readonly [SCHEMA]: TableMeta<Extract<keyof S, string>, AnyCols>;\n};","description":"A table def acceptable to {@link refineSchema} over `Schema<S>`: its NAME must be one of `S`'s\ntables (a def for an unknown table is a compile error at the call site).","source":"packages/client/src/schema.ts","line":340,"href":"/reference/typescript/replica/#symbol-RefinableTable"},{"name":"RefinedCols","originalName":"RefinedCols","kind":"TypeAliasDeclaration","signature":"/** `C` with the columns named in `R` re-typed to their refined `Col`s. */\nexport type RefinedCols<C extends AnyCols, R extends ColRefinements<C>> = {\n    [K in keyof C]: K extends keyof R ? (R[K] extends Col<unknown> ? R[K] : C[K]) : C[K];\n};","description":"`C` with the columns named in `R` re-typed to their refined `Col`s.","source":"packages/client/src/schema.ts","line":308,"href":"/reference/typescript/replica/#symbol-RefinedCols"},{"name":"RefinedColsMap","originalName":"RefinedColsMap","kind":"TypeAliasDeclaration","signature":"/** `S` with each table named in `T` re-typed to that def's (refined) columns. (The inner\n *  `extends AnyCols` guard is how the checker proves the remapped `SchemaOf<T>[K]` is a column\n *  map while `T` is still generic; it always holds for a concrete `T`.) */\nexport type RefinedColsMap<S extends ColsMap, T extends readonly AnyTable[]> = {\n    [K in keyof S]: K extends keyof SchemaOf<T> ? (SchemaOf<T>[K] extends AnyCols ? SchemaOf<T>[K] : S[K]) : S[K];\n};","description":"`S` with each table named in `T` re-typed to that def's (refined) columns. (The inner\n`extends AnyCols` guard is how the checker proves the remapped `SchemaOf<T>[K]` is a column\nmap while `T` is still generic; it always holds for a concrete `T`.)","source":"packages/client/src/schema.ts","line":347,"href":"/reference/typescript/replica/#symbol-RefinedColsMap"},{"name":"refineSchema","originalName":"refineSchema","kind":"FunctionDeclaration","signature":"/** Swap {@link refineTable}-narrowed table defs into a generated schema, re-typing those tables for\n *  everything downstream of the schema (`newQueryBuilder`/`queries` roots, store row types).\n *\n *  Runtime-validated identity: each def must name a table already in the schema and match its\n *  runtime shape exactly (same columns, kinds, primary key, and locality) — refinement narrows TS\n *  types, never what's on the wire. Composes with {@link extendSchema} in either order. */\nexport declare function refineSchema<S extends ColsMap, P extends Record<string, string>, const T extends readonly RefinableTable<S>[]>(base: Schema<S, P>, opts: {\n    tables: T;\n}): Schema<RefinedColsMap<S, T>, P>;","description":"Swap {@link refineTable}-narrowed table defs into a generated schema, re-typing those tables for\neverything downstream of the schema (`newQueryBuilder`/`queries` roots, store row types).\n\nRuntime-validated identity: each def must name a table already in the schema and match its\nruntime shape exactly (same columns, kinds, primary key, and locality) — refinement narrows TS\ntypes, never what's on the wire. Composes with {@link extendSchema} in either order.","source":"packages/client/src/schema.ts","line":357,"href":"/reference/typescript/replica/#symbol-refineSchema"},{"name":"refineTable","originalName":"refineTable","kind":"FunctionDeclaration","signature":"/** Narrow a generated table's column TYPES without touching its runtime shape.\n *\n *  Returns the SAME def, re-typed (identity, after validating that every refined column exists and\n *  keeps its kind) — so conditions built from it, `rel(...)`s anchored on it, and `Row<typeof t>`\n *  all see the narrowed types. Pass the result to {@link refineSchema} so query roots narrow too. */\nexport declare function refineTable<N extends string, C extends AnyCols, R extends ColRefinements<C>>(base: TableDef<N, C>, cols: R): TableDef<N, RefinedCols<C, R>>;","description":"Narrow a generated table's column TYPES without touching its runtime shape.\n\nReturns the SAME def, re-typed (identity, after validating that every refined column exists and\nkeeps its kind) — so conditions built from it, `rel(...)`s anchored on it, and `Row<typeof t>`\nall see the narrowed types. Pass the result to {@link refineSchema} so query roots narrow too.","source":"packages/client/src/schema.ts","line":317,"href":"/reference/typescript/replica/#symbol-refineTable"},{"name":"rel","originalName":"rel","kind":"FunctionDeclaration","signature":"/**\n * Declare a relationship once: `rel(issue, user, { ownerId: \"id\" })` means `issue.ownerId → user.id`.\n * `mapping` is `{ [parentColumn]: childColumn }` (a composite join is multiple entries). The `parent`\n * table is used only to type-check the keys; pass the result to `sub`/`countAs`/`exists`.\n */\nexport declare function rel<PC extends AnyCols, CC extends AnyCols>(_parent: TableLike<PC>, child: TableLike<CC>, mapping: Partial<Record<keyof PC & string, keyof CC & string>>): Relationship<PC, CC>;","description":"Declare a relationship once: `rel(issue, user, { ownerId: \"id\" })` means `issue.ownerId → user.id`.\n`mapping` is `{ [parentColumn]: childColumn }` (a composite join is multiple entries). The `parent`\ntable is used only to type-check the keys; pass the result to `sub`/`countAs`/`exists`.","source":"packages/client/src/schema.ts","line":476,"href":"/reference/typescript/replica/#symbol-rel"},{"name":"Relationship","originalName":"Relationship","kind":"InterfaceDeclaration","signature":"/**\n * A reusable, typed JOIN between two tables — the correlation declared once (design §4). Built with\n * {@link rel}; parameterized by the parent columns `PC` (so a `sub` checks the relationship belongs to\n * the query's table) and the child columns `CC` (which flow into the nested result type). Pass it to\n * `sub`/`countAs`/`exists` in place of an explicit `child` + `{ parent, child }` correlation.\n */\nexport interface Relationship<PC extends AnyCols, CC extends AnyCols> {\n    /** The child table the relationship points at. */\n    readonly child: TableLike<CC>;\n    /** Correlation keys: `parent[i]` (a parent column) joins to `child[i]` (a child column). */\n    readonly correlation: {\n        readonly parent: readonly string[];\n        readonly child: readonly string[];\n    };\n    /** Phantom binding the parent columns so `Query<C>.sub(alias, rel)` rejects a rel for another table. */\n    readonly __parent?: PC;\n    readonly [RELATIONSHIP_BRAND]: true;\n}","description":"A reusable, typed JOIN between two tables — the correlation declared once (design §4). Built with\n{@link rel}; parameterized by the parent columns `PC` (so a `sub` checks the relationship belongs to\nthe query's table) and the child columns `CC` (which flow into the nested result type). Pass it to\n`sub`/`countAs`/`exists` in place of an explicit `child` + `{ parent, child }` correlation.","source":"packages/client/src/schema.ts","line":458,"href":"/reference/typescript/replica/#symbol-Relationship"},{"name":"RemoteQuery","originalName":"RemoteQuery","kind":"InterfaceDeclaration","signature":"/** The network identity for a named query subscription. The local AST remains local; remote\n *  normalized/optimistic sources use only this `(name,args)` pair upstream. */\nexport interface RemoteQuery {\n    name: string;\n    args: unknown;\n}","description":"The network identity for a named query subscription. The local AST remains local; remote\nnormalized/optimistic sources use only this `(name,args)` pair upstream.","source":"packages/client/src/types.ts","line":159,"href":"/reference/typescript/replica/#symbol-RemoteQuery"},{"name":"ReplicaBackend","originalName":"ReplicaBackend","kind":"ClassDeclaration","signature":"/** The in-process, SQLite-backed native backend. Each instance owns its own replica (a\n *  temporary WAL database). Registers every schema table on construction. This wrapper has no\n *  database-path option and does not persist application data across process restarts. */\nexport declare class ReplicaBackend<S extends ColsMap> implements Backend {\n    private readonly db;\n    private handler;\n    private boundaryHandler;\n    private readonly dispatchQueue;\n    private draining;\n    constructor(schema: Schema<S>);\n    registerQuery(qid: QueryId, ast: Ast): void;\n    unregisterQuery(qid: QueryId): void;\n    mutate(mutations: Mutation[]): Promise<void>;\n    onEvent(handler: (qid: QueryId, ev: ChangeEvent) => void): void;\n    /** Register the Store's commit-boundary handler ({@link Backend.onCommitBoundary}): `dispatch`\n     *  calls it around each commit's per-query batch delivery so the Store can fold every affected\n     *  view before notifying any subscriber. */\n    onCommitBoundary(handler: (phase: \"begin\" | \"end\") => void): void;\n    /** Deliver one commit's per-query batches — a faithful mirror of `WasmBackend.dispatch`.\n     *  Non-reentrant: if a delivery is already in progress (a subscriber re-entered via `write()`),\n     *  enqueue and let the active drain pick it up FIFO, so each query folds commits in order.\n     *  Per-query isolated: a view's fold or subscriber throwing does NOT drop sibling queries'\n     *  batches — the first error is re-raised only after every query has been delivered.\n     *\n     *  Cross-view-atomic notification: each commit is bracketed with `boundaryHandler(\"begin\"/\"end\")`\n     *  so the Store folds ALL of this commit's views before notifying ANY subscriber (a subscriber\n     *  re-reading a sibling view then sees post-commit data). `begin`/`end` stay balanced even if a\n     *  fold throws (the `finally`), and a re-entrant write enqueued during the `end` flush drains as\n     *  its own bracketed commit in the next loop turn. */\n    private dispatch;\n}","description":"The in-process, SQLite-backed native backend. Each instance owns its own replica (a\ntemporary WAL database). Registers every schema table on construction. This wrapper has no\ndatabase-path option and does not persist application data across process restarts.","source":"rust/rindle-replica-node/src/index.ts","line":48,"href":"/reference/typescript/replica/#symbol-ReplicaBackend"},{"name":"RESERVED_TABLE_PREFIXES","originalName":"RESERVED_TABLE_PREFIXES","kind":"VariableDeclaration","signature":"/** Table-name prefixes reserved by the engine for SYNTHETIC tables — `__agg_<fnv>` aggregate\n *  bases (`AGGREGATE-SYNC-DESIGN.md` §3.3) and `_rindle_*` system tables (e.g. the lmid table).\n *  A user table (synced OR local) under one of these would shadow a synthetic source — and since\n *  `registerTable` is idempotent-on-name and base tables register before synthetics, the later\n *  synthetic registration would silently no-op and the agg join would read the user table as the\n *  count (silent corruption, `201-LOCAL-ONLY-TABLES-DESIGN.md` N1). The ban makes that\n *  structurally impossible — checked once, statically, at {@link createSchema}. */\nexport declare const RESERVED_TABLE_PREFIXES: readonly [\n    \"__agg_\",\n    \"_rindle_\"\n];","description":"Table-name prefixes reserved by the engine for SYNTHETIC tables — `__agg_<fnv>` aggregate\nbases (`AGGREGATE-SYNC-DESIGN.md` §3.3) and `_rindle_*` system tables (e.g. the lmid table).\nA user table (synced OR local) under one of these would shadow a synthetic source — and since\n`registerTable` is idempotent-on-name and base tables register before synthetics, the later\nsynthetic registration would silently no-op and the agg join would read the user table as the\ncount (silent corruption, `201-LOCAL-ONLY-TABLES-DESIGN.md` N1). The ban makes that\nstructurally impossible — checked once, statically, at {@link createSchema}.","source":"packages/client/src/schema.ts","line":220,"href":"/reference/typescript/replica/#symbol-RESERVED_TABLE_PREFIXES"},{"name":"resolveChange","originalName":"resolveChange","kind":"FunctionDeclaration","signature":"/** Lift one `FlatChange` into a {@link ResolvedChange} against the query's `WireSchema`, or `null`\n *  if its path doesn't resolve to a materialized level. */\nexport declare function resolveChange(schema: WireSchema, change: FlatChange): ResolvedChange | null;","description":"Lift one `FlatChange` into a {@link ResolvedChange} against the query's `WireSchema`, or `null`\nif its path doesn't resolve to a materialized level.","source":"packages/client/src/resolve.ts","line":84,"href":"/reference/typescript/replica/#symbol-resolveChange"},{"name":"ResolvedChange","originalName":"ResolvedChange","kind":"InterfaceDeclaration","signature":"/** One resolved change: a `FlatChange` lifted out of positional/indexed wire form into names,\n *  using the query's `WireSchema` (from `hello`) as the sole position→name source. */\nexport interface ResolvedChange {\n    /** Relationship-alias chain from the query root to the changed level (`[]` ⇒ the root rows). */\n    aliasChain: string[];\n    /** The alias of the changed level (`\"\"` ⇒ root), i.e. the last of `aliasChain`. */\n    alias: string;\n    op: \"add\" | \"remove\" | \"edit\";\n    /** The affected row, named. For `edit` this is the NEW row; see `old` for the prior one. */\n    row: NamedRow;\n    /** The prior row, named (present only for `edit`). */\n    old?: NamedRow;\n    /** The PARENT row (named), for a nested/aggregate change — e.g. the `ticket_type` whose `sold`\n     *  count moved. Taken from the path's last `parentRow`; absent for a root-level change. */\n    parent?: NamedRow;\n    /** Set when the changed level is a `countAs`/aggregate slot. The value is EXACT — read from the\n     *  slot's projected count column (`WireRel.project.col`). */\n    aggregate?: {\n        alias: string;\n        value: WireValue;\n        previous?: WireValue;\n    };\n    /** The raw node whose children a consumer can dig a named sub-row out of (via {@link subRow}). On\n     *  an `add` the engine always ships it; on a `remove` it is present only when the consumer opted\n     *  into the removed subtree (see the `op` mapping below). */\n    node?: WireNode;\n    /** The changed level's `WireSchema` — used by {@link subRow} to resolve a named sub of `node`. */\n    levelSchema: WireSchema;\n}","description":"One resolved change: a `FlatChange` lifted out of positional/indexed wire form into names,\nusing the query's `WireSchema` (from `hello`) as the sole position→name source.","source":"packages/client/src/resolve.ts","line":30,"href":"/reference/typescript/replica/#symbol-ResolvedChange"},{"name":"ResultType","originalName":"ResultType","kind":"TypeAliasDeclaration","signature":"/** A query's SERVER-CHANNEL state, surfaced on its {@link ArrayView} (FOLDED-MUTATIONS-DESIGN §7 —\n *  formerly conflated with pending-ness, OPTIMISTIC-WRITES-DESIGN.md §6):\n *   - `unknown`  — not hydrated: the server has not produced a first result for this query yet;\n *   - `complete` — the server has answered. STAYS `complete` while a local mutation is pending (the\n *                  prediction is the client's best current answer); reversion on rejection is an\n *                  event (`onRejected`), not a downgrade of completeness;\n *   - `error`    — RESERVED for a future server-side, query-level error signal\n *                  (see `designs/101-QUERY-ERRORS-DESIGN.md`); no longer produced by a pending mutation.\n *  \"Is a prediction pending here?\" is now a separate reactive axis (the backend's `pending(qid)` /\n *  `onPending`), not folded into this type. A backend with no server lifecycle (the in-process\n *  engine) leaves every view `complete`. */\nexport type ResultType = \"unknown\" | \"complete\" | \"error\";","description":"A query's SERVER-CHANNEL state, surfaced on its {@link ArrayView } (FOLDED-MUTATIONS-DESIGN §7 —\nformerly conflated with pending-ness, OPTIMISTIC-WRITES-DESIGN.md §6):\n - `unknown`  — not hydrated: the server has not produced a first result for this query yet;\n - `complete` — the server has answered. STAYS `complete` while a local mutation is pending (the\n                prediction is the client's best current answer); reversion on rejection is an\n                event (`onRejected`), not a downgrade of completeness;\n - `error`    — RESERVED for a future server-side, query-level error signal\n                (see `designs/101-QUERY-ERRORS-DESIGN.md`); no longer produced by a pending mutation.\n\"Is a prediction pending here?\" is now a separate reactive axis (the backend's `pending(qid)` /\n`onPending`), not folded into this type. A backend with no server lifecycle (the in-process\nengine) leaves every view `complete`.","source":"packages/client/src/types.ts","line":155,"href":"/reference/typescript/replica/#symbol-ResultType"},{"name":"Row","originalName":"Row","kind":"TypeAliasDeclaration","signature":"/** The row type of a table definition: `Row<typeof issue>` → `{ id: string; … }`. The\n *  whole-table ergonomic form of {@link RowOf}, so app code derives its row interfaces from\n *  the schema instead of hand-maintaining a parallel twin. */\nexport type Row<T extends AnyTable> = RowOf<T[typeof SCHEMA][\"columns\"]>;","description":"The row type of a table definition: `Row<typeof issue>` → `{ id: string; … }`. The\nwhole-table ergonomic form of {@link RowOf}, so app code derives its row interfaces from\nthe schema instead of hand-maintaining a parallel twin.","source":"packages/client/src/schema.ts","line":107,"href":"/reference/typescript/replica/#symbol-Row"},{"name":"RowOf","originalName":"RowOf","kind":"TypeAliasDeclaration","signature":"export type RowOf<C extends AnyCols> = {\n    [K in keyof C]: ColT<C[K]>;\n};","description":"","source":"packages/client/src/schema.ts","line":28,"href":"/reference/typescript/replica/#symbol-RowOf"},{"name":"rowsEqual","originalName":"rowsEqual","kind":"FunctionDeclaration","signature":"/** Elementwise equality over positional bare-cell rows — THE row comparator for every JS-side\n *  diff (views, aggregate heads, the persistence mirror), exported so no caller grows a drifted\n *  private copy. Per cell: `===` keeps `-0 === 0` (the engine's key semantics treat them equal);\n *  the `Object.is` arm makes a NaN cell equal itself (under `!==` alone, a NaN-bearing row never\n *  matches any copy of itself, so every diff re-emits it as a spurious edit forever). */\nexport declare function rowsEqual(a: WireValue[], b: WireValue[]): boolean;","description":"Elementwise equality over positional bare-cell rows — THE row comparator for every JS-side\ndiff (views, aggregate heads, the persistence mirror), exported so no caller grows a drifted\nprivate copy. Per cell: `===` keeps `-0 === 0` (the engine's key semantics treat them equal);\nthe `Object.is` arm makes a NaN cell equal itself (under `!==` alone, a NaN-bearing row never\nmatches any copy of itself, so every diff re-emits it as a spurious edit forever).","source":"packages/client/src/view.ts","line":196,"href":"/reference/typescript/replica/#symbol-rowsEqual"},{"name":"Schema","originalName":"Schema","kind":"InterfaceDeclaration","signature":"export interface Schema<S extends ColsMap = ColsMap, P extends Record<string, string> = PkMap<S>> {\n    readonly tables: Readonly<Record<string, TableMeta>>;\n    /** Phantom carrying name→columns for query-root inference (never read at runtime). */\n    readonly __cols: S;\n    /** Phantom carrying name→pk-column-union for the typed mutator tx (never read at runtime). */\n    readonly __pk: P;\n}","description":"","source":"packages/client/src/schema.ts","line":205,"href":"/reference/typescript/replica/#symbol-Schema"},{"name":"SCHEMA","originalName":"SCHEMA","kind":"VariableDeclaration","signature":"/** Metadata key on a {@link TableDef} (a `unique symbol`, so no column name collides). */\nexport declare const SCHEMA: unique symbol;","description":"Metadata key on a {@link TableDef} (a `unique symbol`, so no column name collides).","source":"packages/client/src/schema.ts","line":57,"href":"/reference/typescript/replica/#symbol-SCHEMA"},{"name":"SchemaOf","originalName":"SchemaOf","kind":"TypeAliasDeclaration","signature":"/** name → columns, derived from the tables array (for typing `store.query.<table>`). */\nexport type SchemaOf<T extends readonly AnyTable[]> = {\n    [E in T[number] as E[typeof SCHEMA][\"name\"]]: E[typeof SCHEMA][\"columns\"];\n};","description":"name → columns, derived from the tables array (for typing `store.query.<table>`).","source":"packages/client/src/schema.ts","line":188,"href":"/reference/typescript/replica/#symbol-SchemaOf"},{"name":"ServerStore","originalName":"ServerStore","kind":"ClassDeclaration","signature":"/**\n * The server-side Store wrapper (SSR-DESIGN.md §6.2). Wraps a {@link Store} over a\n * {@link OneShotBackend} and adds the loader-phase `preload` plus `dehydrate`. Pass `.store` to\n * the React `<Rindle>` provider for the synchronous render; return `.dehydrate()` from the loader.\n * Create one instance per request, with an authorized read function for that request's principal.\n * Its snapshots seed views; they do not persist synced rows in the browser database.\n */\nexport declare class ServerStore<S extends ColsMap> {\n    readonly store: Store<S>;\n    private readonly schema;\n    private readonly opts;\n    constructor(schema: Schema<S>, opts: ServerStoreOptions);\n    /** Run the one-shot read for `query` and seed its first-paint snapshot (SSR-DESIGN.md §6.2).\n     *  Call once per query in the route loader, before the synchronous render. */\n    preload(query: Query<any, any, any>): Promise<void>;\n    /** The dehydrated first-paint cache for every preloaded query — embed in the HTML, then\n     *  `store.hydrate(...)` it in the browser. */\n    dehydrate(): DehydratedState;\n    /**\n     * Loader-phase convenience over {@link preload} + {@link dehydrate}: preload EVERY query (reads run\n     * concurrently) and return the dehydrated first-paint cache. Composition keeps this to one read per\n     * composed root query — no request waterfall (SSR-DESIGN.md §6.2).\n     *\n     * A failed read produces no seed for that query and calls `onError`, if provided. Other reads\n     * can still supply seeds. The browser must establish its own successful live subscription to\n     * obtain the missing data; hydration alone does not retry this read. Without `onError`, the\n     * preload failure is silent. An `onError` callback that throws rejects the batch.\n     */\n    preloadAll(queries: Array<Query<any, any, any>>, opts?: {\n        onError?: (query: Query<any, any, any>, err: unknown) => void;\n    }): Promise<DehydratedState>;\n}","description":"The server-side Store wrapper (SSR-DESIGN.md §6.2). Wraps a {@link Store} over a\n{@link OneShotBackend} and adds the loader-phase `preload` plus `dehydrate`. Pass `.store` to\nthe React `<Rindle>` provider for the synchronous render; return `.dehydrate()` from the loader.\nCreate one instance per request, with an authorized read function for that request's principal.\nIts snapshots seed views; they do not persist synced rows in the browser database.","source":"packages/client/src/ssr.ts","line":78,"href":"/reference/typescript/replica/#symbol-ServerStore"},{"name":"ServerStoreOptions","originalName":"ServerStoreOptions","kind":"InterfaceDeclaration","signature":"export interface ServerStoreOptions {\n    /** Performs an authorized one-shot read. See {@link OneShotQueryFn} for access ownership. */\n    query: OneShotQueryFn;\n    /** Optional namespace for query deduplication, forwarded to every preload. Different keys\n     *  prevent pipeline sharing for the same AST. This key does not authorize access or filter rows;\n     *  the query must already contain the required visibility predicates. */\n    visibilityKey?: string;\n    /** Optional idle TTL (ms) the warm pipeline is left at, forwarded to every preload (SSR-DESIGN.md\n     *  §3.4). The TTL is NOT part of the dedup key, so a shared materialization keeps the LONGEST TTL\n     *  any caller requested (max-wins) — `ttlMs` can extend a query's warm-handoff window, never\n     *  shrink it; absent ⇒ the daemon's default idle TTL. */\n    ttlMs?: number;\n}","description":"","source":"packages/client/src/ssr.ts","line":57,"href":"/reference/typescript/replica/#symbol-ServerStoreOptions"},{"name":"ServerWriteTx","originalName":"ServerWriteTx","kind":"InterfaceDeclaration","signature":"/** The ASYNC server-side write surface a mutator runs against. Semantically the twin of the client's\n *  synchronous `MutationTx` write methods — same names, same keyed-row arguments — but every op is a\n *  Promise. Reads see this transaction's own writes on both Postgres and the daemon; the daemon\n *  opens an interactive transaction when a read is needed. Inserts require every non-nullable\n *  column and fill omitted nullable columns with `null`. Updates and deletes require the PK. */\nexport interface ServerWriteTx {\n    /** Insert a row. Missing required columns and unknown columns throw; omitted nullable\n     *  columns become `null`, rather than using database defaults. */\n    insert(table: string, row: KeyedRow): Promise<void>;\n    /** Update the row identified by the pk columns; only the named non-pk columns change. A missing\n     *  row is a NO-OP. */\n    update(table: string, row: KeyedRow): Promise<void>;\n    /** Insert, or replace non-PK columns on PK conflict, using the same insert shape. */\n    upsert(table: string, row: KeyedRow): Promise<void>;\n    /** Insert with the same nullable-column rules as `insert`, or do nothing on PK conflict. */\n    insertIgnore(table: string, row: KeyedRow): Promise<void>;\n    /** Delete the row identified by the pk columns. A missing row is a NO-OP. */\n    delete(table: string, pk: KeyedRow): Promise<void>;\n    /** Read one row by primary key, through the OPEN transaction on both backends\n     *  (read-your-writes: live on Postgres; via an interactive mutation session on the daemon,\n     *  DAEMON-INTERACTIVE-TXN-DESIGN.md §5.3). */\n    row(table: string, pk: KeyedRow): Promise<KeyedRow | undefined>;\n}","description":"The ASYNC server-side write surface a mutator runs against. Semantically the twin of the client's\nsynchronous `MutationTx` write methods — same names, same keyed-row arguments — but every op is a\nPromise. Reads see this transaction's own writes on both Postgres and the daemon; the daemon\nopens an interactive transaction when a read is needed. Inserts require every non-nullable\ncolumn and fill omitted nullable columns with `null`. Updates and deletes require the PK.","source":"packages/client/src/mutation-ops.ts","line":29,"href":"/reference/typescript/replica/#symbol-ServerWriteTx"},{"name":"shared","originalName":"shared","kind":"FunctionDeclaration","signature":"/** Co-locate a shared (generator) mutator with the validator for its args — pairing the arg SHAPE\n *  with the body that consumes it at ONE site, so neither tier restates it (the client derives its\n *  callsite type from `Args`; the server parses untrusted args through `.args`). Returns the SAME\n *  generator function with an `args` property attached (`Object.assign` mutates + returns it), so the\n *  registered value is byte-for-byte what the client drove before: {@link isGeneratorMutator} still\n *  detects it and it still `satisfies ClientRegistry`. */\nexport declare function shared<Args, Ctx extends MutatorCtx = MutatorCtx>(args: ArgSchema<Args>, run: SharedMutator<Args, Ctx>): SharedMutatorWithArgs<Args, Ctx>;","description":"Co-locate a shared (generator) mutator with the validator for its args — pairing the arg SHAPE\nwith the body that consumes it at ONE site, so neither tier restates it (the client derives its\ncallsite type from `Args`; the server parses untrusted args through `.args`). Returns the SAME\ngenerator function with an `args` property attached (`Object.assign` mutates + returns it), so the\nregistered value is byte-for-byte what the client drove before: {@link isGeneratorMutator} still\ndetects it and it still `satisfies ClientRegistry`.","source":"packages/client/src/mutation-ops.ts","line":180,"href":"/reference/typescript/replica/#symbol-shared"},{"name":"SharedMutator","originalName":"SharedMutator","kind":"TypeAliasDeclaration","signature":"/** A generator (isomorphic) mutator, shared verbatim by both tiers: the client trusts typed `args`,\n *  the server parses untrusted args into `Args` before invoking. */\nexport type SharedMutator<Args, Ctx extends MutatorCtx = MutatorCtx> = (tx: IsoTx, args: Args, ctx: Ctx) => MutationGen;","description":"A generator (isomorphic) mutator, shared verbatim by both tiers: the client trusts typed `args`,\nthe server parses untrusted args into `Args` before invoking.","source":"packages/client/src/mutation-ops.ts","line":152,"href":"/reference/typescript/replica/#symbol-SharedMutator"},{"name":"SharedMutatorWithArgs","originalName":"SharedMutatorWithArgs","kind":"TypeAliasDeclaration","signature":"/** A shared mutator that CARRIES its own arg validator, co-located at the def site (`shared(schema,\n *  gen)`). The client registers it exactly like a bare generator mutator — the `.args` validator is\n *  inert there (typed callsites skip the parse); the server ({@link runSharedMutation}, via the\n *  api-server's `sharedApiMutators`) reads `.args` to parse untrusted wire args before driving the\n *  SAME body. */\nexport type SharedMutatorWithArgs<Args, Ctx extends MutatorCtx = MutatorCtx> = SharedMutator<Args, Ctx> & {\n    args: ArgSchema<Args>;\n};","description":"A shared mutator that CARRIES its own arg validator, co-located at the def site (`shared(schema,\ngen)`). The client registers it exactly like a bare generator mutator — the `.args` validator is\ninert there (typed callsites skip the parse); the server ({@link runSharedMutation }, via the\napi-server's `sharedApiMutators`) reads `.args` to parse untrusted wire args before driving the\nSAME body.","source":"packages/client/src/mutation-ops.ts","line":170,"href":"/reference/typescript/replica/#symbol-SharedMutatorWithArgs"},{"name":"SimpleOp","originalName":"SimpleOp","kind":"TypeAliasDeclaration","signature":"/** The wire comparison operators (exact strings, `src/ast.rs` `Op`). */\nexport type SimpleOp = \"=\" | \"!=\" | \"<\" | \"<=\" | \">\" | \">=\" | \"IS\" | \"IS NOT\" | \"LIKE\" | \"NOT LIKE\" | \"ILIKE\" | \"NOT ILIKE\" | \"IN\" | \"NOT IN\";","description":"The wire comparison operators (exact strings, `src/ast.rs` `Op`).","source":"packages/client/src/ast.ts","line":19,"href":"/reference/typescript/replica/#symbol-SimpleOp"},{"name":"SingularArrayView","originalName":"SingularArrayView","kind":"InterfaceDeclaration","signature":"/** What a top-level `.one()` query materializes to: the single row (or `null`), not an array.\n *  A thin adapter over a {@link FlatArrayView} — all the folding is shared; only the result\n *  boundary unwraps (`data[0] ?? null`). Reference identity of the row is preserved. */\nexport interface SingularArrayView<R> {\n    /** The single current row, or `null` when the query matches nothing. */\n    readonly data: R | null;\n    /** The engine query id — see {@link ArrayView.qid}. */\n    readonly qid: QueryId;\n    /** The query's view `WireSchema` — see {@link ArrayView.schema}. */\n    readonly schema: WireSchema | null;\n    /** The query's lifecycle state — see {@link ArrayView.resultType}. */\n    readonly resultType: ResultType;\n    /** Subscribe; fires immediately with the current row, then after each applied batch (and after\n     *  a {@link resultType} change). */\n    subscribe(listener: (data: R | null) => void): () => void;\n    /** Subscribe to the view's folded CHANGE stream — see {@link ArrayView.onChanges}. The changes\n     *  are the same positional `FlatChange`s as the plural view (a `.one()` is just the list capped to\n     *  one), so a narrator resolves them identically. */\n    onChanges(listener: ViewChangeListener): () => void;\n    /** Tear down + stop receiving updates. */\n    destroy(): void;\n}","description":"What a top-level `.one()` query materializes to: the single row (or `null`), not an array.\nA thin adapter over a {@link FlatArrayView} — all the folding is shared; only the result\nboundary unwraps (`data[0] ?? null`). Reference identity of the row is preserved.","source":"packages/client/src/view.ts","line":68,"href":"/reference/typescript/replica/#symbol-SingularArrayView"},{"name":"SingularView","originalName":"SingularView","kind":"ClassDeclaration","signature":"/** Wrap a plural {@link FlatArrayView} as a {@link SingularArrayView} for a `.one()` query\n *  (the engine caps it to `limit = 1`, so the top list holds at most one node). */\nexport declare class SingularView<R> implements SingularArrayView<R> {\n    private readonly inner;\n    constructor(inner: ArrayView<R>);\n    get data(): R | null;\n    get qid(): QueryId;\n    get schema(): WireSchema | null;\n    get resultType(): ResultType;\n    subscribe(listener: (data: R | null) => void): () => void;\n    onChanges(listener: ViewChangeListener): () => void;\n    destroy(): void;\n}","description":"Wrap a plural {@link FlatArrayView} as a {@link SingularArrayView} for a `.one()` query\n(the engine caps it to `limit = 1`, so the top list holds at most one node).","source":"packages/client/src/view.ts","line":90,"href":"/reference/typescript/replica/#symbol-SingularView"},{"name":"spliceStreamText","originalName":"spliceStreamText","kind":"FunctionDeclaration","signature":"/**\n * Merge the durable plane with the live tail.\n *\n * `durable` is what the IVM view shows; `produced` is what a subscription has accumulated (the prefix\n * it joined at, plus every `chunk`). Both are prefixes of the same response, so the merge is \"take\n * the longer\" — no diffing, no overlap handling, no ranges.\n *\n * The length comparison is the whole algorithm, which is why a caller MUST seed its accumulator with\n * the text it joined at: a tail carrying only the chunks it received would read as shorter than the\n * durable text and be discarded. `useStreamedText` does that for you.\n */\nexport declare function spliceStreamText(durable: string, produced: string): string;","description":"Merge the durable plane with the live tail.\n\n`durable` is what the IVM view shows; `produced` is what a subscription has accumulated (the prefix\nit joined at, plus every `chunk`). Both are prefixes of the same response, so the merge is \"take\nthe longer\" — no diffing, no overlap handling, no ranges.\n\nThe length comparison is the whole algorithm, which is why a caller MUST seed its accumulator with\nthe text it joined at: a tail carrying only the chunks it received would read as shorter than the\ndurable text and be discarded. `useStreamedText` does that for you.","source":"packages/client/src/stream.ts","line":75,"href":"/reference/typescript/replica/#symbol-spliceStreamText"},{"name":"stableKey","originalName":"stableKey","kind":"FunctionDeclaration","signature":"export declare function stableKey(value: unknown, seen?: WeakSet<object>): string;","description":"","source":"packages/client/src/key.ts","line":6,"href":"/reference/typescript/replica/#symbol-stableKey"},{"name":"Store","originalName":"Store","kind":"ClassDeclaration","signature":"export declare class Store<S extends ColsMap> {\n    /** Type-safe query entry: `store.query.issue.where.closed(false).materialize()`. */\n    readonly query: QueryRoot<S>;\n    private readonly schema;\n    private readonly backend;\n    private nextId;\n    private readonly views;\n    private readonly asts;\n    private readonly syncLeases;\n    private readonly seeds;\n    private changeListeners?;\n    private removedSubtreeWanted;\n    private resultTypeListeners?;\n    private readonly hasResultTypeLifecycle;\n    private commitDepth;\n    private readonly pendingFlush;\n    private readonly pendingChanges;\n    constructor(schema: Schema<S>, backend: Backend);\n    /** Materialize any fluent query object. Named queries subscribe remotely by `(name,args)`;\n     *  ad-hoc builder queries are local-only for local-first backends.\n     *\n     *  `opts.onChanges` binds a narrator to this view's DIFF stream ({@link ArrayView.onChanges}) — the\n     *  per-view seam that replaces filtering the store-global {@link subscribeChanges} by `qid`. It is\n     *  wired BEFORE the backend registers the query, so a synchronous backend's first `snapshot` (fired\n     *  inside `registerQuery`, before this returns) is delivered too. */\n    materialize<Q extends Query<any, any, any>>(query: Q, opts?: {\n        onChanges?: ViewChangeListener;\n    }): ReturnType<Q[\"materialize\"]>;\n    /** One-shot AUTHORITATIVE read: materialize `query`, wait until its result is server-authoritative\n     *  ({@link ResultType} `\"complete\"`), read the data once, then destroy the view — resolving with the\n     *  plain result rather than a live subscription. Rejects if the query enters the `\"error\"` state. Use\n     *  it for exports, imports, undo snapshots — anywhere that wants the current answer as a value.\n     *\n     *  A synchronous local-first backend (wasm/replica) has already delivered the first snapshot inside\n     *  {@link materialize}, so the view is `\"complete\"` on entry and this settles on the next microtask\n     *  without ever attaching a listener; a remote backend settles when the first live snapshot lands.\n     *  The query is NEVER left subscribed — the view is destroyed before the promise settles either way.\n     *  (A remote query that never completes leaves the promise pending, exactly as a `resultType` poll\n     *  would; race a timeout at the call site if you need one.) */\n    readOnce<Q extends Query<any, any, any>>(query: Q): Promise<ReturnType<Q[\"materialize\"]>[\"data\"]>;\n    /** True when the backend can retain a remote named query independently from the local\n     *  materialized AST view. React uses this to keep one local view per AST while still sending\n     *  every mounted `(name,args)` lease through the backend. */\n    canRetainRemoteQueries(): boolean;\n    /** Build one local AST view, with remote syncing retained separately through the returned\n     *  handle. This is a lower-level API for UI bindings; ordinary app code should keep using\n     *  `materialize(query)`. */\n    createCachedQueryView<Q extends Query<any, any, any>>(query: Q): CachedQueryView<Q>;\n    /** Retain a named remote query purely for normalized/local-first coverage. This does not\n     *  register or materialize the query AST locally, so React can keep server sync coverage alive\n     *  without subscribing to the broad coverage result tree. */\n    retainSyncQuery<Q extends Query<any, any, any>>(query: Q): SyncQueryLease;\n    /** Apply a batch of mutations (object rows → positional). Resolves when the backend has\n     *  accepted them (local: applied; remote: sent). The resulting view updates flow back via\n     *  the backend's event stream. */\n    write(fn: (tx: WriteTx<S>) => void): Promise<void>;\n    /** Direct-commit write to LOCAL-only tables (`201-LOCAL-ONLY-TABLES-DESIGN.md` §6): the\n     *  client-authoritative path for selection state, draft text, view prefs, scratch rows. It\n     *  bypasses the optimistic pending stack entirely — a local table is untracked, so it never\n     *  rebases, reverts, or waits on a server confirmation (it \"moves on its own\").\n     *\n     *  Rejects a synced/tracked table (M2): a direct write to one would be un-applied on the very\n     *  next server rewind. Local writes also must NOT live inside a replayable mutator (M1) — the\n     *  server runs the mutator from `args` alone and cannot see local tables; use this instead.\n     *  Same keyed `WriteTx` shape as {@link write}. `async` so the no-seam / M2 guards surface as a\n     *  REJECTED promise (the `Promise<void>` contract) rather than a synchronous throw that escapes a\n     *  caller's `.catch` and crashes the event handler / render frame. */\n    writeLocal(fn: (tx: WriteTx<S>) => void): Promise<void>;\n    /** Drain a keyed `WriteTx` callback into positional {@link Mutation}s (shared by\n     *  {@link write} / {@link writeLocal}; json columns stringified, rows in column order). */\n    private collectMutations;\n    /** Seed a query's first-paint snapshot from a `POST /query` response (server side): convert the\n     *  assembled rows to the view's projected shape and stash them by `viewKey`. A view materialized\n     *  for this AST (during the synchronous render) reads the seed; {@link dehydrate} serializes it. */\n    seedAssembled(ast: Ast, rows: AssembledNode[], cvMin: number): void;\n    /** The dehydrated first-paint cache for every preloaded query — embed it in the HTML and pass it\n     *  to {@link hydrate} in the browser (SSR-DESIGN.md §6.2). */\n    dehydrate(): DehydratedState;\n    /** Seed the browser store from the server's {@link dehydrate} output (SSR-DESIGN.md §6.2): each\n     *  view materialized for a hydrated AST shows these rows until its first live `hello` reconciles. */\n    hydrate(state: DehydratedState): void;\n    /** A query's hydrated first-paint snapshot, by `viewKey` — what React's `getServerSnapshot`\n     *  reads so an SSR render (and the matching client hydration pass) sees the seeded rows without\n     *  opening a subscription. */\n    seedSnapshot(viewKey: string): DehydratedQuery | undefined;\n    primaryKeyFor(table: string): readonly string[];\n    /** Convert assembled (nested-by-name) rows (SSR-DESIGN.md §3.3) into the view's projected result\n     *  shape: spread `cols` (parsing json columns), recurse into each relationship by its alias\n     *  (plural → array, `.one()` → object/null, `countAs` → bare scalar). */\n    assembleSnapshot(ast: Ast, rows: AssembledNode[]): unknown[];\n    private assembleNode;\n    private registerMaterialized;\n    private retainRemote;\n    private onEvent;\n    /** Retire a view's SSR seed — from the view (so `data` switches from the seed to the maintained\n     *  tree) AND from the seeds map (so no later mount re-seeds a now-live query) — but ONLY once the\n     *  query is AUTHORITATIVE (`resultType === \"complete\"`). Called BEFORE the fold it accompanies, so\n     *  that fold's notify already reflects the live tree with no empty gap. Idempotent.\n     *\n     *  The gate is the fix for the synchronous optimistic/wasm backend: it fires a query's FIRST snapshot\n     *  from LOCAL, not-yet-synced state while the query is still `unknown` (`registerMaterialized` marks a\n     *  lifecycle-backed remote view `unknown` up front for exactly this), then delivers the authoritative\n     *  rows one event later as a `catchUp` batch — having already flipped the query to `complete`. So the\n     *  seed survives the pre-sync snapshot (`unknown` ⇒ skip) and retires on the catch-up (`complete` ⇒\n     *  retire). A lifecycle-LESS backend (pure wasm, the SSR one-shot, tests) is `complete` from creation,\n     *  so its first snapshot retires the seed exactly as before this gate existed. */\n    private retireSeedIfLive;\n    /** Retire the SSR seed (if authoritative) and fold the accompanying hydration delta — BEFORE the\n     *  fold so its notify already reflects the live tree with no empty gap. The subtlety: a hydration\n     *  can fold NOTHING — a 0-row authoritative result, or one whose rows are already present in `top`\n     *  (a query whose result is fully covered by an already-hydrated sibling: the shared rows dedup to\n     *  zero net base mutations). Then {@link FlatArrayView.applyChanges} notifies nothing, so the\n     *  seed→tree switch would never reach subscribers and the view freezes on the stale seed. Guard\n     *  against that: if the seed retired but the fold was a no-op, force the handoff notify (inline, or\n     *  via the commit-boundary flush). Flash-safe — the forced notify only fires when there was nothing\n     *  to fold, so `data` is already the correct live tree by then. */\n    private foldHydration;\n    /** Fold a batch into its view, then notify now or — inside a commit bracket — defer the view's\n     *  notification to the commit boundary, so all sibling views fold first (cross-view-atomic\n     *  notification; see `commitDepth`). */\n    private applyAndTrack;\n    /** Deliver everything deferred during the just-ended commit, after every affected view has folded\n     *  (cross-view-atomic notification): view subscribers first, then the raw change stream\n     *  (narrators/devtools), each frame in arrival order. A throwing listener does not stop the others\n     *  — the first error is re-raised only once the whole flush completes (mirroring the backend's\n     *  per-query isolation). View subscribers run before change listeners, preserving the per-event\n     *  order that held before coalescing (a view's subscribers fired before its change frame). */\n    private flushCommit;\n    /** Subscribe to the raw per-query {@link ChangeEvent} stream (hello / snapshot / batch) the Store\n     *  routes to its views, tagged by `qid`. Fired AFTER the event is folded — and, for a commit that\n     *  fans out to several queries (the in-process engine's `onCommitBoundary`), after EVERY view in\n     *  that commit has folded — so a listener that re-reads ANY view (its own or a sibling) sees\n     *  post-commit state, never a torn mid-commit one. Frames keep their arrival (engine-dispatch)\n     *  order, one per affected query. This is the supported way to drive change-derived layers\n     *  (e.g. {@link resolveChange} → @rindle/narrator, or a devtools pane) off a live store — attach\n     *  BEFORE `materialize` to catch a synchronous backend's first `hello`+`snapshot`.\n     *  The per-query view `WireSchema` rides the `hello` frame (also readable via `view.schema`).\n     *\n     *  The third listener arg is the post-fold {@link ArrayView} for this `qid` (so a template wanting\n     *  list context — current `data`, `schema`, `resultType` — needn't look it up). It is ALWAYS the\n     *  plural view, even for a top-level `.one()` query: the Store retains the list-shaped view, not the\n     *  SingularView wrapper handed back from `materialize`. `undefined` only if the view is mid-teardown.\n     *\n     *  `opts.removedSubtree` enriches every `remove` op on this stream with the full removed subtree\n     *  ({@link FlatOp.node}), so a consumer can resolve a removed row's nested subs exactly as on an\n     *  `add` (a bare remove carries only the leaving row). It is reconstructed client-side from the\n     *  view — no wire/engine cost — and paid only on real evictions while at least one subscriber asks.\n     *\n     *  Returns a detach function; multiple listeners may attach. */\n    subscribeChanges(listener: (qid: QueryId, ev: ChangeEvent, view?: ArrayView<unknown>) => void, opts?: {\n        removedSubtree?: boolean;\n    }): () => void;\n    /** Subscribe to per-query {@link ResultType} transitions (the server-channel lifecycle the backend\n     *  pushes — `unknown` → `complete`, etc.), tagged by `qid`. Fired only on a CHANGE (never replayed\n     *  on attach; read `view.resultType` for the current value). The supported seam for a status-driven\n     *  layer (a devtools pane). Returns a detach function; multiple listeners may attach. */\n    subscribeResultType(listener: (qid: QueryId, rt: ResultType) => void): () => void;\n    /** A read-only snapshot of every live materialized view (DEBUG-TOOLS-BROWSER-DESIGN §4.2): its\n     *  qid, AST, {@link ResultType}, row count, and a capped row sample. Built fresh on each call from\n     *  the live `views`/`asts` maps — never cached, never mutating. `sampleRows` caps the per-query\n     *  peek (default 50) so a large view doesn't bloat the snapshot. */\n    __inspect(sampleRows?: number): StoreInspect;\n    private columns;\n    /** An object row → a positional cell array in the table's column order (json → string). */\n    private positionalize;\n    /** The per-level column types parallel to the WireSchema, so the view parses json columns. */\n    private viewTypes;\n}","description":"","source":"packages/client/src/store.ts","line":92,"href":"/reference/typescript/replica/#symbol-Store"},{"name":"StoreInspect","originalName":"StoreInspect","kind":"InterfaceDeclaration","signature":"/** A frozen snapshot of the Store's live query state for a devtools pane ({@link Store.__inspect}). */\nexport interface StoreInspect {\n    queries: QueryInspect[];\n}","description":"A frozen snapshot of the Store's live query state for a devtools pane ({@link Store.__inspect}).","source":"packages/client/src/store.ts","line":88,"href":"/reference/typescript/replica/#symbol-StoreInspect"},{"name":"STREAM_STATUS_STREAMING","originalName":"STREAM_STATUS_STREAMING","kind":"VariableDeclaration","signature":"/** The value in the mapped status column while a stream is live. */\nexport declare const STREAM_STATUS_STREAMING = \"streaming\";","description":"The value in the mapped status column while a stream is live.","source":"packages/client/src/stream.ts","line":22,"href":"/reference/typescript/replica/#symbol-STREAM_STATUS_STREAMING"},{"name":"StreamFrame","originalName":"StreamFrame","kind":"TypeAliasDeclaration","signature":"/**\n * One frame of a subscription. A subscription always begins with `open` and always ends with exactly\n * one terminal frame — `end`, `stale`, or `absent` — after which the iterator completes.\n *\n * `stale` and `absent` are the two \"you are on the durable plane now\" answers, and both are SAFE:\n * the store holds everything below `floorSeq` and everything through `durableSeq`, so the reader's\n * IVM view converges without the stream. Neither is an error.\n */\nexport type StreamFrame = \n/** Join accepted. `from` is the (clamped) offset the replay starts at. */\n{\n    type: \"open\";\n    streamId: string;\n    from: number;\n    seq: number;\n    durableSeq: number;\n    ended: boolean;\n}\n/** PRODUCED text — not a durability claim. `text.length === seq - from`, always. */\n | {\n    type: \"chunk\";\n    from: number;\n    seq: number;\n    text: string;\n}\n/** The store now holds the prefix through `seq`. */\n | {\n    type: \"durable\";\n    seq: number;\n}\n/** Sealed. No further frames. */\n | {\n    type: \"end\";\n    seq: number;\n    status: StreamStatus;\n    error?: string;\n}\n/** `from` is below the producer's retained buffer floor (or the subscriber fell too far behind):\n *  read the store. (A raw `EventSource` rejoins automatically on its reconnect; `useStreamedText`\n *  deliberately stays on the durable plane instead — correct, at checkpoint granularity.) */\n | {\n    type: \"stale\";\n    floorSeq: number;\n    durableSeq: number;\n}\n/** The process serving this subscribe is not hosting the stream (wrong instance, already evicted,\n *  or it never existed): the store is the whole truth. */\n | {\n    type: \"absent\";\n};","description":"One frame of a subscription. A subscription always begins with `open` and always ends with exactly\none terminal frame — `end`, `stale`, or `absent` — after which the iterator completes.\n\n`stale` and `absent` are the two \"you are on the durable plane now\" answers, and both are SAFE:\nthe store holds everything below `floorSeq` and everything through `durableSeq`, so the reader's\nIVM view converges without the stream. Neither is an error.","source":"packages/client/src/stream.ts","line":32,"href":"/reference/typescript/replica/#symbol-StreamFrame"},{"name":"StreamStatus","originalName":"StreamStatus","kind":"TypeAliasDeclaration","signature":"/**\n * How a stream ended.\n * - `complete` — the model finished.\n * - `cancelled` — the reader asked it to stop and the producer honoured it.\n * - `error` — the generation threw.\n * - `interrupted` — the host went away mid-generation. The one status that implies the store may be\n *   short of what was produced.\n */\nexport type StreamStatus = \"complete\" | \"cancelled\" | \"error\" | \"interrupted\";","description":"How a stream ended.\n- `complete` — the model finished.\n- `cancelled` — the reader asked it to stop and the producer honoured it.\n- `error` — the generation threw.\n- `interrupted` — the host went away mid-generation. The one status that implies the store may be\n  short of what was produced.","source":"packages/client/src/stream.ts","line":19,"href":"/reference/typescript/replica/#symbol-StreamStatus"},{"name":"string","originalName":"string","kind":"VariableDeclaration","signature":"export declare const string: <T extends string = string>() => ColBuilder<T>;","description":"","source":"packages/client/src/schema.ts","line":46,"href":"/reference/typescript/replica/#symbol-string"},{"name":"subRow","originalName":"subRow","kind":"FunctionDeclaration","signature":"/** Read a named sub-row off a change's `node` by relationship alias (e.g. the `guest` under an\n *  `rsvp`) — the `add` node, or a `remove`'s subtree when the consumer opted into it. The alias →\n *  wire slot mapping comes from the changed level's `WireSchema`. `null` when no node rode along. */\nexport declare function subRow(rc: ResolvedChange, alias: string): NamedRow | null;","description":"Read a named sub-row off a change's `node` by relationship alias (e.g. the `guest` under an\n`rsvp`) — the `add` node, or a `remove`'s subtree when the consumer opted into it. The alias →\nwire slot mapping comes from the changed level's `WireSchema`. `null` when no node rode along.","source":"packages/client/src/resolve.ts","line":128,"href":"/reference/typescript/replica/#symbol-subRow"},{"name":"SyncEffectExec","originalName":"SyncEffectExec","kind":"InterfaceDeclaration","signature":"/** A tier's SYNCHRONOUS effect executor (the browser wasm engine): apply a write, resolve a read —\n *  both immediate. */\nexport interface SyncEffectExec {\n    apply(op: MutationOp): void;\n    read(table: string, pk: KeyedRow): KeyedRow | undefined;\n    query(q: QueryArg): QueryResultRow[];\n}","description":"A tier's SYNCHRONOUS effect executor (the browser wasm engine): apply a write, resolve a read —\nboth immediate.","source":"packages/client/src/mutation-ops.ts","line":226,"href":"/reference/typescript/replica/#symbol-SyncEffectExec"},{"name":"SyncQueryLease","originalName":"SyncQueryLease","kind":"InterfaceDeclaration","signature":"export interface SyncQueryLease {\n    readonly resultType: ResultType;\n    subscribe(listener: () => void): () => void;\n    release(): void;\n}","description":"","source":"packages/client/src/store.ts","line":58,"href":"/reference/typescript/replica/#symbol-SyncQueryLease"},{"name":"table","originalName":"table","kind":"FunctionDeclaration","signature":"/** `table(\"issue\").columns({ id: string(), … }).primaryKey(\"id\")`. Pass `{ local: true }` for a\n *  {@link TableMeta.local local-only} table (`201-LOCAL-ONLY-TABLES-DESIGN.md`). */\nexport declare function table<N extends string>(name: N, opts?: TableOptions): {\n    columns<C extends AnyCols>(cols: C): {\n        primaryKey<K extends keyof C & string>(...keys: K[]): TableDef<N, C, K>;\n    };\n};","description":"`table(\"issue\").columns({ id: string(), … }).primaryKey(\"id\")`. Pass `{ local: true }` for a\n{@link TableMeta.locallocal-only} table (`201-LOCAL-ONLY-TABLES-DESIGN.md`).","source":"packages/client/src/schema.ts","line":160,"href":"/reference/typescript/replica/#symbol-table"},{"name":"TableDef","originalName":"TableDef","kind":"TypeAliasDeclaration","signature":"export type TableDef<N extends string, C extends AnyCols, PK extends string = string> = {\n    readonly [SCHEMA]: TableMeta<N, C, PK>;\n} & {\n    readonly [K in keyof C]: (arg: Arg<ColT<C[K]>>) => Cond<RowOf<C>>;\n};","description":"","source":"packages/client/src/schema.ts","line":92,"href":"/reference/typescript/replica/#symbol-TableDef"},{"name":"TableLike","originalName":"TableLike","kind":"TypeAliasDeclaration","signature":"/** Any table, for positions that only read its metadata. The field-factory part of a\n *  `TableDef` is invariant in `C`, so callers constrain on the `[SCHEMA]` meta only — to\n *  which every concrete `TableDef<N, C>` is assignable. */\nexport type TableLike<C extends AnyCols> = {\n    readonly [SCHEMA]: TableMeta<string, C>;\n};","description":"Any table, for positions that only read its metadata. The field-factory part of a\n`TableDef` is invariant in `C`, so callers constrain on the `[SCHEMA]` meta only — to\nwhich every concrete `TableDef<N, C>` is assignable.","source":"packages/client/src/schema.ts","line":101,"href":"/reference/typescript/replica/#symbol-TableLike"},{"name":"tableMeta","originalName":"tableMeta","kind":"FunctionDeclaration","signature":"/** Read a table's metadata (columns / PK / name). */\nexport declare function tableMeta(t: AnyTable): TableMeta;","description":"Read a table's metadata (columns / PK / name).","source":"packages/client/src/schema.ts","line":183,"href":"/reference/typescript/replica/#symbol-tableMeta"},{"name":"TableMeta","originalName":"TableMeta","kind":"InterfaceDeclaration","signature":"export interface TableMeta<N extends string = string, C extends AnyCols = AnyCols, PK extends string = string> {\n    readonly name: N;\n    readonly columns: C;\n    readonly primaryKey: readonly PK[];\n    /** A **local-only** table (`201-LOCAL-ONLY-TABLES-DESIGN.md`): client-authoritative,\n     *  never synced/tracked/rebased. The single marker the whole design keys off (§4) — it is\n     *  immutable for the table's lifetime (N2) and never crosses the wire (C2). Absent ⇒ an\n     *  ordinary synced table.\n     *\n     *  `true` ⇒ eligible for the local-persistence plane (durable + cross-tab when the client\n     *  enables `persistLocal`, `207-LOCAL-TABLE-PERSISTENCE-DESIGN.md`). `\"session\"` ⇒ local but\n     *  EPHEMERAL: outside the plane entirely — never persisted, never replicated across tabs,\n     *  per-client-instance state that empties on reload (201's original behavior) even when\n     *  `persistLocal` is on. Every OTHER locality rule (untracked source, M1/M2 guards, E3/Q1\n     *  wire exclusion) treats both variants identically. */\n    readonly local?: boolean | \"session\";\n}","description":"","source":"packages/client/src/schema.ts","line":59,"href":"/reference/typescript/replica/#symbol-TableMeta"},{"name":"TableOptions","originalName":"TableOptions","kind":"InterfaceDeclaration","signature":"/** Options for {@link table}. */\nexport interface TableOptions {\n    /** Declare a {@link TableMeta.local local-only} table (selection state, draft text, view\n     *  prefs, scratch rows): client-authoritative, never synced or rebased. See\n     *  `201-LOCAL-ONLY-TABLES-DESIGN.md`. Pass `\"session\"` for a local table that must stay\n     *  EPHEMERAL and per-tab even when the client enables `persistLocal` — e.g. selection state\n     *  that should not follow the user across tabs or reloads (207 §5.4). */\n    local?: boolean | \"session\";\n}","description":"Options for {@link table}.","source":"packages/client/src/schema.ts","line":83,"href":"/reference/typescript/replica/#symbol-TableOptions"},{"name":"tableSpec","originalName":"tableSpec","kind":"FunctionDeclaration","signature":"/** The `SchemaSpec` (`columns` + `primaryKey` indices) the wasm `Db.registerTable` wants. */\nexport declare function tableSpec(meta: TableMeta): {\n    columns: string[];\n    primaryKey: number[];\n};","description":"The `SchemaSpec` (`columns` + `primaryKey` indices) the wasm `Db.registerTable` wants.","source":"packages/client/src/schema.ts","line":498,"href":"/reference/typescript/replica/#symbol-tableSpec"},{"name":"toCell","originalName":"toCell","kind":"FunctionDeclaration","signature":"/** Encode a keyed-row cell to its wire {@link WireValue} for a column KIND — the one place both write\n *  funnels stringify a `json<T>` object (the typed mutator surface / design 206 §7). An\n *  already-stringified json value (a `string`) or any non-json cell passes through unchanged, so a\n *  mutator may pass EITHER a parsed object OR a JSON string. Mirrors `store.positionalize`. */\nexport declare function toCell(v: WireValue | object, type: ColType): WireValue;","description":"Encode a keyed-row cell to its wire {@link WireValue} for a column KIND — the one place both write\nfunnels stringify a `json<T>` object (the typed mutator surface / design 206 §7). An\nalready-stringified json value (a `string`) or any non-json cell passes through unchanged, so a\nmutator may pass EITHER a parsed object OR a JSON string. Mirrors `store.positionalize`.","source":"packages/client/src/schema.ts","line":536,"href":"/reference/typescript/replica/#symbol-toCell"},{"name":"UpdateOf","originalName":"UpdateOf","kind":"TypeAliasDeclaration","signature":"/** The UPDATE shape of a table: its {@link PkOf primary-key columns} REQUIRED (they identify the row)\n *  plus every non-pk column OPTIONAL (`?`) and typed — a nullable one stays `T | null` (settable to\n *  null), a `NOT NULL` one is `T`. Omitted non-pk columns are left unchanged. */\nexport type UpdateOf<C extends AnyCols, PK extends string> = Simplify<PkOf<C, PK> & {\n    [K in Exclude<keyof C, PK>]?: ColT<C[K]>;\n}>;","description":"The UPDATE shape of a table: its {@link PkOfprimary-key columns} REQUIRED (they identify the row)\nplus every non-pk column OPTIONAL (`?`) and typed — a nullable one stays `T | null` (settable to\nnull), a `NOT NULL` one is `T`. Omitted non-pk columns are left unchanged.","source":"packages/client/src/schema.ts","line":145,"href":"/reference/typescript/replica/#symbol-UpdateOf"},{"name":"ValuePosition","originalName":"ValuePosition","kind":"TypeAliasDeclaration","signature":"/** A column reference or a literal — `type`-tagged. */\nexport type ValuePosition = {\n    type: \"column\";\n    name: string;\n} | {\n    type: \"literal\";\n    value: LitValue;\n};","description":"A column reference or a literal — `type`-tagged.","source":"packages/client/src/ast.ts","line":14,"href":"/reference/typescript/replica/#symbol-ValuePosition"},{"name":"ViewChangeListener","originalName":"ViewChangeListener","kind":"TypeAliasDeclaration","signature":"/** A per-view change listener ({@link ArrayView.onChanges}): the net `FlatChange[]` this view folded,\n *  the {@link ChangePhase} it arrived on, and the view's `WireSchema` (the position→name source for\n *  `resolveChange`). This is the DIFF the data channel ({@link ArrayView.subscribe}) discards — the\n *  seam a narrator drives off. The `schema` is passed (not closed over) because the first `snapshot`\n *  fires synchronously inside `materialize`, before the caller holds the view handle. */\nexport type ViewChangeListener = (changes: FlatChange[], phase: ChangePhase, schema: WireSchema) => void;","description":"A per-view change listener ({@link ArrayView.onChanges}): the net `FlatChange[]` this view folded,\nthe {@link ChangePhase} it arrived on, and the view's `WireSchema` (the position→name source for\n`resolveChange`). This is the DIFF the data channel ({@link ArrayView.subscribe}) discards — the\nseam a narrator drives off. The `schema` is passed (not closed over) because the first `snapshot`\nfires synchronously inside `materialize`, before the caller holds the view handle.","source":"packages/client/src/view.ts","line":30,"href":"/reference/typescript/replica/#symbol-ViewChangeListener"},{"name":"ViewTypes","originalName":"ViewTypes","kind":"InterfaceDeclaration","signature":"/** Per-level column types (parallel to the WireSchema), used to JSON.parse json columns on\n *  projection. Built by the Store from the typed schema; absent ⇒ no parsing (bare values). */\nexport interface ViewTypes {\n    columnTypes: ColType[];\n    rels: Record<number, ViewTypes>;\n}","description":"Per-level column types (parallel to the WireSchema), used to JSON.parse json columns on\nprojection. Built by the Store from the typed schema; absent ⇒ no parsing (bare values).","source":"packages/client/src/view.ts","line":16,"href":"/reference/typescript/replica/#symbol-ViewTypes"},{"name":"WireNode","originalName":"WireNode","kind":"InterfaceDeclaration","signature":"export interface WireNode {\n    row: WireValue[];\n    rels: {\n        rel: number;\n        children: WireNode[];\n    }[];\n}","description":"","source":"packages/client/src/types.ts","line":49,"href":"/reference/typescript/replica/#symbol-WireNode"},{"name":"WireProjection","originalName":"WireProjection","kind":"InterfaceDeclaration","signature":"/** A scalar-projection annotation on a relationship slot (REDUCE-DESIGN.md §9): a\n *  relationship aggregate (`issue { commentCount: count(comments) }`) lives as a singular\n *  one-row relationship whose child is the aggregate row; this tells the receiver to unwrap\n *  it into a scalar field — `commentCount: 5` instead of `commentCount: [{ count: 5 }]`. */\nexport interface WireProjection {\n    /** Which CHILD column to surface as the scalar value (the aggregate column). */\n    col: number;\n    /** The value to emit when the relationship is empty (a childless parent) — the\n     *  aggregate identity (`0` for count, `null` for sum/avg). */\n    identity: WireValue;\n}","description":"A scalar-projection annotation on a relationship slot (REDUCE-DESIGN.md §9): a\nrelationship aggregate (`issue { commentCount: count(comments) }`) lives as a singular\none-row relationship whose child is the aggregate row; this tells the receiver to unwrap\nit into a scalar field — `commentCount: 5` instead of `commentCount: [{ count: 5 }]`.","source":"packages/client/src/types.ts","line":22,"href":"/reference/typescript/replica/#symbol-WireProjection"},{"name":"WireRel","originalName":"WireRel","kind":"InterfaceDeclaration","signature":"export interface WireRel {\n    name: string;\n    slot: number;\n    /** `null` ⇒ an out-of-view / gating slot (the in-view gate drops `Child`s addressed here). */\n    child: WireSchema | null;\n    /** Non-null ⇒ a scalar-projected relationship aggregate the receiver unwraps to a scalar\n     *  (REDUCE-DESIGN.md §9). Absent/`null` for an ordinary (plural or `.one()`) relationship. */\n    project?: WireProjection | null;\n}","description":"","source":"packages/client/src/types.ts","line":30,"href":"/reference/typescript/replica/#symbol-WireRel"},{"name":"WireSchema","originalName":"WireSchema","kind":"InterfaceDeclaration","signature":"export interface WireSchema {\n    columns: string[];\n    primaryKey: number[];\n    /** Resolved, PK-completed sort: `[columnIndex, ascending]` pairs (the comparator input). */\n    sort: [\n        number,\n        boolean\n    ][];\n    singular: boolean;\n    relationships: WireRel[];\n}","description":"","source":"packages/client/src/types.ts","line":40,"href":"/reference/typescript/replica/#symbol-WireSchema"},{"name":"WireValue","originalName":"WireValue","kind":"TypeAliasDeclaration","signature":"/** A bare wire cell. (JSON columns arrive as their raw JSON string.) */\nexport type WireValue = number | string | boolean | null;","description":"A bare wire cell. (JSON columns arrive as their raw JSON string.)","source":"packages/client/src/types.ts","line":9,"href":"/reference/typescript/replica/#symbol-WireValue"},{"name":"WriteTx","originalName":"WriteTx","kind":"InterfaceDeclaration","signature":"/** The write transaction handed to `store.write(tx => …)`. Rows are objects keyed by column;\n *  the Store positionalizes them (and stringifies json columns) before the backend sees them.\n *\n *  `add` takes an {@link InsertOf} row — a nullable column may be omitted (it is filled with `null`,\n *  design 206 §7). `remove`/`edit` take a full {@link RowOf} row: they identify an EXISTING row, so\n *  every column (nullable ones as their actual `T | null` value) must be present. */\nexport interface WriteTx<S extends ColsMap> {\n    add<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): void;\n    remove<N extends keyof S & string>(table: N, row: RowOf<S[N]>): void;\n    edit<N extends keyof S & string>(table: N, oldRow: RowOf<S[N]>, newRow: RowOf<S[N]>): void;\n}","description":"The write transaction handed to `store.write(tx => …)`. Rows are objects keyed by column;\nthe Store positionalizes them (and stringifies json columns) before the backend sees them.\n\n`add` takes an {@link InsertOf} row — a nullable column may be omitted (it is filled with `null`,\ndesign 206 §7). `remove`/`edit` take a full {@link RowOf} row: they identify an EXISTING row, so\nevery column (nullable ones as their actual `T | null` value) must be present.","source":"packages/client/src/store.ts","line":44,"href":"/reference/typescript/replica/#symbol-WriteTx"},{"name":"YieldEffect","originalName":"YieldEffect","kind":"TypeAliasDeclaration","signature":"/** Everything a generator mutator may `yield`: a write {@link MutationOp}, a point {@link ReadEffect},\n *  a full-query {@link QueryEffect}, or a {@link BatchEffect} fan-out. */\nexport type YieldEffect = MutationOp | ReadEffect | BatchEffect | QueryEffect;","description":"Everything a generator mutator may `yield`: a write {@link MutationOp}, a point {@link ReadEffect},\na full-query {@link QueryEffect}, or a {@link BatchEffect} fan-out.","source":"packages/client/src/mutation-ops.ts","line":95,"href":"/reference/typescript/replica/#symbol-YieldEffect"}]},{"name":"@rindle/room","source":"packages/room/src/index.ts","package":"@rindle/room","symbols":[{"name":"AuthorityApplyResult","originalName":"AuthorityApplyResult","kind":"TypeAliasDeclaration","signature":"/** The apply outcome. Anything else — network failure, a 5xx — is a **throw**: plain\n *  errors retry (same body, same id; dedup absorbs a landed retry), errors marked\n *  `fatal: true` (an identity mismatch — same id, different body — or a malformed\n *  refusal) kill the incarnation loudly instead. */\nexport type AuthorityApplyResult = {\n    kind: \"ok\";\n    applied: boolean;\n    cv?: number;\n} | {\n    kind: \"conflict\";\n    conflicts: AuthorityConflict[];\n} | {\n    kind: \"fenced\";\n    currentEpoch?: number;\n};","description":"The apply outcome. Anything else — network failure, a 5xx — is a **throw**: plain\nerrors retry (same body, same id; dedup absorbs a landed retry), errors marked\n`fatal: true` (an identity mismatch — same id, different body — or a malformed\nrefusal) kill the incarnation loudly instead.","source":"packages/room/src/authority.ts","line":27,"href":"/reference/typescript/room/#symbol-AuthorityApplyResult"},{"name":"AuthorityConflict","originalName":"AuthorityConflict","kind":"InterfaceDeclaration","signature":"/** One CAS rejection in the authority's `409 conflict` body: the row's authoritative\n *  current image (`null` = absent), keyed by table + pk cells. */\nexport interface AuthorityConflict {\n    table: string;\n    pk: unknown[];\n    current: unknown[] | null;\n}","description":"One CAS rejection in the authority's `409 conflict` body: the row's authoritative\ncurrent image (`null` = absent), keyed by table + pk cells.","source":"packages/room/src/authority.ts","line":17,"href":"/reference/typescript/room/#symbol-AuthorityConflict"},{"name":"createRoomShell","originalName":"createRoomShell","kind":"FunctionDeclaration","signature":"/** Boot a room shell: init the wasm, mint the upstream lease, connect the upstream leg,\n *  and serve the downstream ws (+ the private control plane, if configured). Returns\n *  once the ports are bound and the upstream connection is underway — await\n *  `shell.awaitLive()` for the seed. */\nexport declare function createRoomShell(opts: RoomShellOptions): Promise<RoomShell>;","description":"Boot a room shell: init the wasm, mint the upstream lease, connect the upstream leg,\nand serve the downstream ws (+ the private control plane, if configured). Returns\nonce the ports are bound and the upstream connection is underway — await\n`shell.awaitLive()` for the seed.","source":"packages/room/src/shell.ts","line":1810,"href":"/reference/typescript/room/#symbol-createRoomShell"},{"name":"DownstreamOptions","originalName":"DownstreamOptions","kind":"InterfaceDeclaration","signature":"/** The downstream half: how clients are authorized and served (§4/§10.1). */\nexport interface DownstreamOptions {\n    /** This room's document id — lease tokens for any other doc are refused. */\n    docId: string;\n    /** Token key ring: `kid` → shared secret (the API server signs with the same ring). */\n    tokenKeys: Record<string, string>;\n    /** Idle grace before an unsubscribed query's pipeline is reclaimed (default 30s). */\n    idleTtlMs?: number;\n    /** Lease-expiry / idle-sweep cadence (default 1s). */\n    sweepIntervalMs?: number;\n    /** How long a revocation keeps refusing pre-revocation tokens (default 30min — set\n     *  it ≥ the longest token TTL the API server mints). */\n    revocationWindowMs?: number;\n    /** The room's private control plane (`POST /revoke`, `GET /stats`). Omit to run\n     *  without one (no revocation surface). */\n    control?: {\n        authToken: string;\n        port?: number;\n    };\n    /** The write plane (§5.1). Omit to run read-only (writes are refused). */\n    writes?: WritesOptions;\n    /** Per-socket downstream send budget in bytes (§9; default 4 MiB). A socket whose\n     *  queued bytes would exceed it is terminated with a gap — re-subscribing is the\n     *  repair. */\n    sendBudgetBytes?: number;\n}","description":"The downstream half: how clients are authorized and served (§4/§10.1).","source":"packages/room/src/shell.ts","line":96,"href":"/reference/typescript/room/#symbol-DownstreamOptions"},{"name":"fatalAuthorityError","originalName":"fatalAuthorityError","kind":"FunctionDeclaration","signature":"export declare function fatalAuthorityError(message: string): FatalAuthorityError;","description":"","source":"packages/room/src/authority.ts","line":51,"href":"/reference/typescript/room/#symbol-fatalAuthorityError"},{"name":"httpAuthority","originalName":"httpAuthority","kind":"FunctionDeclaration","signature":"/** The HTTP [`RoomAuthority`]: the API-server host as the room's sole counterpart\n *  (§5.3.1). Maps `409 {error:\"fenced\"}` / `409 {error:\"conflict\"}` to their results,\n *  a `500` mentioning a batch-identity mismatch to a fatal error, and anything else\n *  non-OK to a retryable throw. */\nexport declare function httpAuthority(opts: HttpAuthorityOptions): RoomAuthority;","description":"The HTTP [`RoomAuthority`]: the API-server host as the room's sole counterpart\n(§5.3.1). Maps `409 {error:\"fenced\"}` / `409 {error:\"conflict\"}` to their results,\na `500` mentioning a batch-identity mismatch to a fatal error, and anything else\nnon-OK to a retryable throw.","source":"packages/room/src/authority.ts","line":73,"href":"/reference/typescript/room/#symbol-httpAuthority"},{"name":"HttpAuthorityOptions","originalName":"HttpAuthorityOptions","kind":"InterfaceDeclaration","signature":"export interface HttpAuthorityOptions {\n    /** The API server's apply endpoint (e.g. `http://…/api/rindle/apply-row-change-txn`). */\n    applyUrl: string;\n    /** The epoch-claim endpoint (e.g. `http://…/api/rindle/claim-room-epoch`). */\n    claimUrl: string;\n    /** The lmid-probe endpoint (e.g. `http://…/api/rindle/room-lmids`). */\n    lmidsUrl: string;\n    /** Extra headers on every call — the epoch-bound flush credential rides here. */\n    headers?: Record<string, string>;\n    fetch?: typeof fetch;\n}","description":"","source":"packages/room/src/authority.ts","line":57,"href":"/reference/typescript/room/#symbol-HttpAuthorityOptions"},{"name":"initRoomWasm","originalName":"initRoomWasm","kind":"FunctionDeclaration","signature":"/** Initialize the room wasm module (idempotent). Call once before `WasmRoom.open`.\n *  Node: bytes are read from the package. Browser/bundler: the wasm is fetched. Pass\n *  `moduleOrPath` to override (a `WebAssembly.Module`, URL, or bytes). */\nexport declare function initRoomWasm(moduleOrPath?: unknown): Promise<void>;","description":"Initialize the room wasm module (idempotent). Call once before `WasmRoom.open`.\nNode: bytes are read from the package. Browser/bundler: the wasm is fetched. Pass\n`moduleOrPath` to override (a `WebAssembly.Module`, URL, or bytes).","source":"packages/room/src/wasm.ts","line":15,"href":"/reference/typescript/room/#symbol-initRoomWasm"},{"name":"journalEntryOutcome","originalName":"journalEntryOutcome","kind":"FunctionDeclaration","signature":"/** The ONE reading rule for an entry's verdict across journal generations: `outcome`\n *  when present, else the legacy `rejected` flag, else applied. */\nexport declare function journalEntryOutcome(entry: RoomJournalEntry): \"applied\" | \"rejected\" | \"deopt\";","description":"The ONE reading rule for an entry's verdict across journal generations: `outcome`\nwhen present, else the legacy `rejected` flag, else applied.","source":"packages/room/src/journal.ts","line":50,"href":"/reference/typescript/room/#symbol-journalEntryOutcome"},{"name":"KeyedRow","originalName":"KeyedRow","kind":"TypeAliasDeclaration","signature":"/** A row keyed by column name. */\nexport type KeyedRow = Record<string, WireValue>;","description":"A row keyed by column name.","source":"packages/room/src/mutation-tx.ts","line":22,"href":"/reference/typescript/room/#symbol-KeyedRow"},{"name":"memoryJournal","originalName":"memoryJournal","kind":"FunctionDeclaration","signature":"/** An in-process journal: survives incarnations within one shell process (and, handed\n *  to a second shell, a simulated process crash — the T2 harness). Not durable beyond\n *  the process, by definition. */\nexport declare function memoryJournal(): RoomJournal;","description":"An in-process journal: survives incarnations within one shell process (and, handed\nto a second shell, a simulated process crash — the T2 harness). Not durable beyond\nthe process, by definition.","source":"packages/room/src/journal.ts","line":84,"href":"/reference/typescript/room/#symbol-memoryJournal"},{"name":"mintRoomToken","originalName":"mintRoomToken","kind":"FunctionDeclaration","signature":"/** Sign a room lease token. This runs on the API-server side (or a test playing it). */\nexport declare function mintRoomToken(opts: MintRoomTokenOptions): Promise<string>;","description":"Sign a room lease token. This runs on the API-server side (or a test playing it).","source":"packages/room/src/token.ts","line":126,"href":"/reference/typescript/room/#symbol-mintRoomToken"},{"name":"MintRoomTokenOptions","originalName":"MintRoomTokenOptions","kind":"InterfaceDeclaration","signature":"export interface MintRoomTokenOptions {\n    doc: string;\n    ast: unknown;\n    /** The subject (user id) this token authorizes — the §4.1 revocation key. */\n    sub: string;\n    /** Key id + its secret (utf-8; give every room the same `keys` map). */\n    kid: string;\n    key: string;\n    /** Expiry, ms from `now`. Keep short (minutes) — the §4.1 TTL backstop. */\n    ttlMs: number;\n    /** Mint time; defaults to `Date.now()`. Injectable for tests. */\n    now?: number;\n    /** The room's {@link scopeSpecsHash} for the profile this lease serves — stamped so the\n     *  shell can flag scope skew (see {@link RoomTokenPayload.scopesHash}). Omit to not stamp. */\n    scopesHash?: string;\n}","description":"","source":"packages/room/src/token.ts","line":46,"href":"/reference/typescript/room/#symbol-MintRoomTokenOptions"},{"name":"MutationTx","originalName":"MutationTx","kind":"InterfaceDeclaration","signature":"/** The §4.2 write handle. Keyed methods are schema-checked; positional methods are the\n *  raw wire shape (cells in schema column order, pk cells in `primaryKey` order).\n *  `query` is not available in room mutators yet (it throws) — typed so a client\n *  registry that uses it still registers, and fails loudly at run time. */\nexport interface MutationTx {\n    /** Read one row by primary key (e.g. `tx.row(\"issue\", { id: 1 })`). */\n    row(table: string, pk: KeyedRow): KeyedRow | undefined;\n    /** Insert a FULL row (every column named; missing or unknown columns throw). */\n    insert(table: string, row: KeyedRow): void;\n    /** Update the row identified by the pk columns; only the named non-pk columns\n     *  change. A missing row is a NO-OP (rebase-friendly). */\n    update(table: string, row: KeyedRow): void;\n    /** Insert, or fully replace when the pk already exists (a FULL row, like insert). */\n    upsert(table: string, row: KeyedRow): void;\n    /** Delete the row identified by the pk columns. A missing row is a NO-OP. */\n    delete(table: string, pk: KeyedRow): void;\n    /** NOT SUPPORTED in room mutators yet — throws. (Typed to accept the client\n     *  builder's queries so shared registries typecheck.) */\n    query(query: {\n        ast(): unknown;\n    }): never;\n    get(table: string, pk: WireValue[]): WireValue[] | undefined;\n    add(table: string, row: WireValue[]): void;\n    remove(table: string, row: WireValue[]): void;\n    edit(table: string, oldRow: WireValue[], newRow: (WireValue | undefined)[]): void;\n}","description":"The §4.2 write handle. Keyed methods are schema-checked; positional methods are the\nraw wire shape (cells in schema column order, pk cells in `primaryKey` order).\n`query` is not available in room mutators yet (it throws) — typed so a client\nregistry that uses it still registers, and fails loudly at run time.","source":"packages/room/src/mutation-tx.ts","line":28,"href":"/reference/typescript/room/#symbol-MutationTx"},{"name":"RoomAuthority","originalName":"RoomAuthority","kind":"InterfaceDeclaration","signature":"export interface RoomAuthority {\n    /** Claim the placement epoch for `doc` (§2.5) — once per shell process, at boot,\n     *  AFTER resubmitting the previous incarnation's unconfirmed batches (their recorded\n     *  epochs must still be current to land). */\n    claimEpoch(doc: string): Promise<number>;\n    /** The authority's ledger lmid per client (0 = none) — the boot probe that lets\n     *  journal replay absorb already-durable mutations as dedup. */\n    lmids(doc: string, clients: string[]): Promise<Record<string, number>>;\n    /** Apply one batch: `body` is the exact journaled `/apply-row-change-txn` body\n     *  string, sent verbatim. */\n    applyRowChangeTxn(body: string): Promise<AuthorityApplyResult>;\n}","description":"","source":"packages/room/src/authority.ts","line":32,"href":"/reference/typescript/room/#symbol-RoomAuthority"},{"name":"RoomFlushRecord","originalName":"RoomFlushRecord","kind":"InterfaceDeclaration","signature":"/** One journaled flush batch: the room's flush-stream position, the placement epoch it\n *  was built under, and the EXACT `/apply-row-change-txn` body string — resubmitted\n *  verbatim, never rebuilt (§5.3 step 4). */\nexport interface RoomFlushRecord {\n    seq: number;\n    epoch: number;\n    body: string;\n}","description":"One journaled flush batch: the room's flush-stream position, the placement epoch it\nwas built under, and the EXACT `/apply-row-change-txn` body string — resubmitted\nverbatim, never rebuilt (§5.3 step 4).","source":"packages/room/src/journal.ts","line":57,"href":"/reference/typescript/room/#symbol-RoomFlushRecord"},{"name":"RoomJournal","originalName":"RoomJournal","kind":"InterfaceDeclaration","signature":"export interface RoomJournal {\n    /** Append `entries` durably, in order. Resolving is the ack gate (§8.1): the shell\n     *  advances lmid rows only after this resolves. A rejection is fatal to the\n     *  incarnation — an ack that might not survive must never be sent. */\n    append(entries: RoomJournalEntry[]): Promise<void>;\n    /** Every entry ever appended, in append order — the boot-time replay source. */\n    replay(): Promise<RoomJournalEntry[]>;\n    /** Journal one built flush batch, BEFORE its first send. Same durability contract\n     *  as `append`: a rejection is fatal (an unjournaled batch must never reach the\n     *  wire — a retry could otherwise rebuild different bytes under the same id). */\n    appendFlush(record: RoomFlushRecord): Promise<void>;\n    /** The authority settled flush `seq` (committed, deduped, or dead) — drop it. */\n    confirmFlush(seq: number): Promise<void>;\n    /** Unconfirmed flush records in seq order, plus the highest seq ever appended\n     *  (0 = none) — the boot-time resubmission source and the seq seed. */\n    replayFlushes(): Promise<{\n        records: RoomFlushRecord[];\n        maxSeq: number;\n    }>;\n}","description":"","source":"packages/room/src/journal.ts","line":63,"href":"/reference/typescript/room/#symbol-RoomJournal"},{"name":"RoomJournalEntry","originalName":"RoomJournalEntry","kind":"InterfaceDeclaration","signature":"/** One journaled mutation: the wire envelope plus its recorded outcome. Replay applies\n *  the OUTCOME — a non-applied (`rejected`/`deopt`) entry consumes its mid without\n *  running the mutator. */\nexport interface RoomJournalEntry {\n    clientID: string;\n    mid: number;\n    name: string;\n    args: unknown;\n    /** The connection's authenticated subject at push time (the lease token's `sub`,\n     *  shell-stamped — managed-writes §3.3): recovery is re-invocation, so identity is\n     *  an input that must survive the crash. `\"\"` = an entry journaled before the\n     *  identity plane existed (mutators see it as unauthenticated). */\n    sub: string;\n    /** The recorded verdict (H-iv-b): `\"applied\"` replays by RE-INVOKING the mutator\n     *  (§3.3 — and against a moved base the re-invocation may legitimately reject or\n     *  DEOPT; the journal record is never rewritten, the shell's recorded-outcome map\n     *  reflects what the replaying incarnation produced); `\"rejected\"` (final — authz /\n     *  validation / unknown mutator) and `\"deopt\"` (the §3.3 commit gate refused; the\n     *  client was told to re-route the mutation) both replay as a consumed-mid-no-effect\n     *  WITHOUT running anything — re-judging a deopt could invent effects the client\n     *  already re-routed elsewhere. Absent = a legacy pre-H-iv-b entry: read through\n     *  {@link journalEntryOutcome}. */\n    outcome?: \"applied\" | \"rejected\" | \"deopt\";\n    /** Legacy pre-H-iv-b flag, superseded by {@link outcome} but still WRITTEN (`true`)\n     *  alongside BOTH non-applied outcomes: a legacy reader replays either kind as a\n     *  consumed-mid-no-effect, which is exactly right. */\n    rejected?: boolean;\n}","description":"One journaled mutation: the wire envelope plus its recorded outcome. Replay applies\nthe OUTCOME — a non-applied (`rejected`/`deopt`) entry consumes its mid without\nrunning the mutator.","source":"packages/room/src/journal.ts","line":22,"href":"/reference/typescript/room/#symbol-RoomJournalEntry"},{"name":"RoomMutator","originalName":"RoomMutator","kind":"TypeAliasDeclaration","signature":"/** A room mutator: deterministic, replayable — re-invoked on journal replay against\n *  the freshly re-subscribed base (§3.3), so the same purity rules as a client\n *  mutator apply (no clock, no randomness, a pure function of `(base, args, ctx)`).\n *  An auth check against `ctx` re-runs on replay against the freshly rebuilt base —\n *  a mutation that passed before a crash can replay as rejected if the permission\n *  row changed in between; that is §3.3's intended rebase behavior. */\nexport type RoomMutator = (tx: MutationTx, args: never, ctx: RoomMutatorCtx) => void;","description":"A room mutator: deterministic, replayable — re-invoked on journal replay against\nthe freshly re-subscribed base (§3.3), so the same purity rules as a client\nmutator apply (no clock, no randomness, a pure function of `(base, args, ctx)`).\nAn auth check against `ctx` re-runs on replay against the freshly rebuilt base —\na mutation that passed before a crash can replay as rejected if the permission\nrow changed in between; that is §3.3's intended rebase behavior.","source":"packages/room/src/mutation-tx.ts","line":67,"href":"/reference/typescript/room/#symbol-RoomMutator"},{"name":"RoomMutatorCtx","originalName":"RoomMutatorCtx","kind":"InterfaceDeclaration","signature":"/** The ambient authorization context a room mutator runs under (managed-writes design\n *  §3.2). Shell-stamped from the connection's DO-verified lease token — NEVER\n *  client-supplied — so per-row/per-field rules checked against it are trustworthy.\n *  The shape deliberately matches the shared-generator drivers' `ctx.user`, so one\n *  registry body runs identically in all three homes (client / api-server / room). */\nexport interface RoomMutatorCtx {\n    /** The authenticated subject (the lease token's `sub`). `\"\"` on replay of an entry\n     *  journaled before the identity plane — treat as unauthenticated. */\n    user: string;\n}","description":"The ambient authorization context a room mutator runs under (managed-writes design\n§3.2). Shell-stamped from the connection's DO-verified lease token — NEVER\nclient-supplied — so per-row/per-field rules checked against it are trustworthy.\nThe shape deliberately matches the shared-generator drivers' `ctx.user`, so one\nregistry body runs identically in all three homes (client / api-server / room).","source":"packages/room/src/mutation-tx.ts","line":55,"href":"/reference/typescript/room/#symbol-RoomMutatorCtx"},{"name":"RoomScopeSpec","originalName":"RoomScopeSpec","kind":"InterfaceDeclaration","signature":"/** One table's §3.3 scope spec (H-iv-b): an element of the api-server's\n *  `RoomBootResponse.scopes`, passed VERBATIM to the wasm room's `enableWritesV2`.\n *  Structurally identical to `@rindle/api-server`'s `RoomScopeSpec` (declared locally —\n *  the shell must not depend on the api-server package; TS structural typing keeps the\n *  two in lockstep at the host's threading site). */\nexport interface RoomScopeSpec {\n    table: string;\n    /** The footprint's row-local predicate for this table (a wire `Condition`) — drives\n     *  the commit gate's absent-read proof. Absent ⇒ absent reads on this table always\n     *  deopt (fail closed). */\n    footprintWhere?: unknown;\n    writable: {\n        kind: \"none\";\n    } | {\n        kind: \"predicate\";\n        where?: unknown;\n        joinKeyCols: string[];\n    };\n}","description":"One table's §3.3 scope spec (H-iv-b): an element of the api-server's\n`RoomBootResponse.scopes`, passed VERBATIM to the wasm room's `enableWritesV2`.\nStructurally identical to `@rindle/api-server`'s `RoomScopeSpec` (declared locally —\nthe shell must not depend on the api-server package; TS structural typing keeps the\ntwo in lockstep at the host's threading site).","source":"packages/room/src/shell.ts","line":124,"href":"/reference/typescript/room/#symbol-RoomScopeSpec"},{"name":"RoomShell","originalName":"RoomShell","kind":"InterfaceDeclaration","signature":"export interface RoomShell {\n    /** The bound downstream port. */\n    readonly port: number;\n    /** The bound control-plane port (0 when no control plane was configured). */\n    readonly controlPort: number;\n    /** Resolves when the CURRENT incarnation is live (seq-0 snapshot applied);\n     *  immediately if it already is. */\n    awaitLive(): Promise<void>;\n    /** The last-applied upstream commit version, if live. */\n    cv(): number | undefined;\n    /** The upstream subscription epoch of the current incarnation, if any. */\n    upstreamEpoch(): number | undefined;\n    /** This incarnation's downstream bootId (rotates on every re-subscribe). */\n    bootId(): string;\n    /** Fire the write-behind flush now (instead of the debounce) and await its\n     *  settlement — deterministic flushing for tests and drain-before-close. No-op\n     *  without an authority. */\n    flushNow(): Promise<void>;\n    close(): Promise<void>;\n}","description":"","source":"packages/room/src/shell.ts","line":182,"href":"/reference/typescript/room/#symbol-RoomShell"},{"name":"RoomShellOptions","originalName":"RoomShellOptions","kind":"InterfaceDeclaration","signature":"export interface RoomShellOptions {\n    upstream: UpstreamOptions;\n    downstream: DownstreamOptions;\n    /** Downstream ws port (default 0 = ephemeral; bound on 127.0.0.1). */\n    port?: number;\n    /** Diagnostic sink (default: silent). */\n    log?: (line: string) => void;\n}","description":"","source":"packages/room/src/shell.ts","line":173,"href":"/reference/typescript/room/#symbol-RoomShellOptions"},{"name":"RoomTokenError","originalName":"RoomTokenError","kind":"ClassDeclaration","signature":"/** Why a token was refused. The `reason` is terse and safe to echo in a queryError. */\nexport declare class RoomTokenError extends Error {\n    readonly reason: string;\n    constructor(reason: string);\n}","description":"Why a token was refused. The `reason` is terse and safe to echo in a queryError.","source":"packages/room/src/token.ts","line":149,"href":"/reference/typescript/room/#symbol-RoomTokenError"},{"name":"RoomTokenPayload","originalName":"RoomTokenPayload","kind":"InterfaceDeclaration","signature":"/**\n * The room's **self-authorizing signed lease token** (RINDLE-REALTIME-DESIGN.md §10.1).\n *\n * The API server is the authority (§4): it authenticates the user, resolves the named\n * query to an approved AST, and signs this token. The token then IS the lease — the\n * room materializes on first presentation, so no pre-placement `/materialize` control\n * call ever touches it (the §10.1 inversion; on the DO shell the Worker verifies the\n * same signature statelessly before `get(id)`).\n *\n * Shape: `rt1.<base64url(payload)>.<base64url(hmac-sha256(prefix.payload))>` with\n * payload `{ v: 1, doc, ast, sub, iat, exp, kid }`:\n *\n * - `doc` — the room/document id the token authorizes (a token for one room presented\n *   to another is refused);\n * - `ast` — the approved wire `Ast` (the client never composes this; §4's \"ASTs never\n *   cross the public wire\" holds because the token is opaque TO THE CLIENT — it carries\n *   it, it cannot mint or alter it);\n * - `sub` — the subject (user id): the revocation key (§4.1);\n * - `iat`/`exp` — issued-at / expiry, ms epoch. Renewal is re-authorization: clients\n *   obtain a fresh token through the API server, never extend this one. `iat` is what\n *   lets a revocation refuse pre-revocation tokens while a genuine re-grant (a newer\n *   token) passes immediately;\n * - `kid` — which shared secret signed it (rotation).\n *\n * HMAC via WebCrypto (`crypto.subtle`) so the exact same code verifies in Node (the\n * test shell) and in a Cloudflare Worker/DO (P4) — no `node:crypto` import.\n */\nexport interface RoomTokenPayload {\n    v: 1;\n    doc: string;\n    ast: unknown;\n    sub: string;\n    iat: number;\n    exp: number;\n    kid: string;\n    /** A short fingerprint of the room's compiled scope specs at mint time\n     *  ({@link scopeSpecsHash}). Advisory, not a credential: the room's §3.3 gate is the\n     *  contract regardless. It lets the shell detect SCOPE SKEW — a room profile edited\n     *  while a room is already live arms the gate with the OLD specs (a one-shot at boot)\n     *  while fresh leases prove against the NEW ones, so every routed write silently\n     *  deopt-loops. Optional so a pre-stamp api-server / older token still verifies. */\n    scopesHash?: string;\n}","description":"The room's **self-authorizing signed lease token** (RINDLE-REALTIME-DESIGN.md §10.1).\n\nThe API server is the authority (§4): it authenticates the user, resolves the named\nquery to an approved AST, and signs this token. The token then IS the lease — the\nroom materializes on first presentation, so no pre-placement `/materialize` control\ncall ever touches it (the §10.1 inversion; on the DO shell the Worker verifies the\nsame signature statelessly before `get(id)`).\n\nShape: `rt1.<base64url(payload)>.<base64url(hmac-sha256(prefix.payload))>` with\npayload `{ v: 1, doc, ast, sub, iat, exp, kid }`:\n\n- `doc` — the room/document id the token authorizes (a token for one room presented\n  to another is refused);\n- `ast` — the approved wire `Ast` (the client never composes this; §4's \"ASTs never\n  cross the public wire\" holds because the token is opaque TO THE CLIENT — it carries\n  it, it cannot mint or alter it);\n- `sub` — the subject (user id): the revocation key (§4.1);\n- `iat`/`exp` — issued-at / expiry, ms epoch. Renewal is re-authorization: clients\n  obtain a fresh token through the API server, never extend this one. `iat` is what\n  lets a revocation refuse pre-revocation tokens while a genuine re-grant (a newer\n  token) passes immediately;\n- `kid` — which shared secret signed it (rotation).\n\nHMAC via WebCrypto (`crypto.subtle`) so the exact same code verifies in Node (the\ntest shell) and in a Cloudflare Worker/DO (P4) — no `node:crypto` import.","source":"packages/room/src/token.ts","line":29,"href":"/reference/typescript/room/#symbol-RoomTokenPayload"},{"name":"scopeSpecsHash","originalName":"scopeSpecsHash","kind":"FunctionDeclaration","signature":"/** A stable short fingerprint of the compiled scope specs — the scope-skew tripwire.\n *  NOT security (the gate re-proves every write): FNV-1a-32 over the {@link canonicalJson}\n *  form, 8 hex chars. Both the api-server (stamping the lease token) and the room shell\n *  (hashing the boot-wire scopes it armed the gate with) run this over the SAME compiler\n *  output, so an unchanged profile ⇒ equal hash and a profile edited under a live room ⇒\n *  mismatch. A collision only costs a missed diagnostic, never correctness. Accepts either\n *  wire's spec array (`RoomScopeSpec[]` / `RoomTableSpec[]` — structurally identical). */\nexport declare function scopeSpecsHash(specs: readonly unknown[]): string;","description":"A stable short fingerprint of the compiled scope specs — the scope-skew tripwire.\nNOT security (the gate re-proves every write): FNV-1a-32 over the {@link canonicalJson}\nform, 8 hex chars. Both the api-server (stamping the lease token) and the room shell\n(hashing the boot-wire scopes it armed the gate with) run this over the SAME compiler\noutput, so an unchanged profile ⇒ equal hash and a profile edited under a live room ⇒\nmismatch. A collision only costs a missed diagnostic, never correctness. Accepts either\nwire's spec array (`RoomScopeSpec[]` / `RoomTableSpec[]` — structurally identical).","source":"packages/room/src/token.ts","line":87,"href":"/reference/typescript/room/#symbol-scopeSpecsHash"},{"name":"UpstreamOptions","originalName":"UpstreamOptions","kind":"InterfaceDeclaration","signature":"/** The upstream half of the shell's config: where rindled lives and what to follow. */\nexport interface UpstreamOptions {\n    /** rindled's public subscription plane, e.g. `ws://127.0.0.1:7601`. */\n    wsUrl: string;\n    /** rindled's private control plane, e.g. `http://127.0.0.1:7600` (lease minting). */\n    controlUrl: string;\n    /** Bearer token for the control plane (required unless rindled runs unauthenticated). */\n    authToken?: string;\n    /** The document footprint — a wire `Ast` (§3.1). What this room follows and serves from. */\n    footprintAst: unknown;\n    /** Lease TTL passed to `/materialize` (rindled's default when omitted). */\n    leaseTtlMs?: number;\n    /** The `init` clientID on the upstream socket (diagnostic identity). */\n    clientId?: string;\n}","description":"The upstream half of the shell's config: where rindled lives and what to follow.","source":"packages/room/src/shell.ts","line":80,"href":"/reference/typescript/room/#symbol-UpstreamOptions"},{"name":"verifyRoomToken","originalName":"verifyRoomToken","kind":"FunctionDeclaration","signature":"/**\n * Verify a token's signature and claims; returns the payload (with the approved AST)\n * or throws {@link RoomTokenError}. Signature is checked FIRST — no claim is trusted\n * (not even `kid`'s existence beyond the key lookup) before the MAC passes.\n */\nexport declare function verifyRoomToken(token: string, opts: VerifyRoomTokenOptions): Promise<RoomTokenPayload>;","description":"Verify a token's signature and claims; returns the payload (with the approved AST)\nor throws {@link RoomTokenError}. Signature is checked FIRST — no claim is trusted\n(not even `kid`'s existence beyond the key lookup) before the MAC passes.","source":"packages/room/src/token.ts","line":172,"href":"/reference/typescript/room/#symbol-verifyRoomToken"},{"name":"VerifyRoomTokenOptions","originalName":"VerifyRoomTokenOptions","kind":"InterfaceDeclaration","signature":"export interface VerifyRoomTokenOptions {\n    /** The room's own doc id — a token for any other doc is refused. */\n    doc: string;\n    /** kid → shared secret. Unknown kids are refused (never \"try them all\"). */\n    keys: Record<string, string>;\n    /** Verification time; defaults to `Date.now()`. Injectable for tests. */\n    now?: number;\n}","description":"","source":"packages/room/src/token.ts","line":158,"href":"/reference/typescript/room/#symbol-VerifyRoomTokenOptions"},{"name":"WasmRoom","originalName":"WasmRoom","kind":"ClassDeclaration","signature":"/* tslint:disable */\n/* eslint-disable */\n/**\n * One room instance: the upstream-fed base store plus its downstream serving state\n * (materialized queries deduped by `QueryKey`, subscribers addressed by the host's\n * opaque keys) and — once [`enableWrites`](Self::enable_writes) runs — the §5.1\n * write plane, with **at most one mutation transaction open at a time** (the room is\n * an actor; the host serializes mutations onto it).\n */\nexport class WasmRoom {\n    private constructor();\n    free(): void;\n    [Symbol.dispose](): void;\n    /**\n     * Advance the ledger rows for journal-committed mutations — **the ack** (§5.1\n     * step 4; call once the journal append resolves). `entries_json` is a JSON array\n     * of `{clientID, mid}`. Returns `{\"headCv\": n}` — drain\n     * [`commitAll`](Self::commit_all) to ship the lmid frames — or `{\"headCv\": null}`\n     * when everything was already covered.\n     */\n    ack(entries_json: string): string;\n    /**\n     * The ledger row's current value for `clientID` (0 if none) — what the wire has\n     * confirmed.\n     */\n    ackedLmid(client_id: string): number;\n    /**\n     * The highest mid applied to the head for `clientID` (0 if none) — the dedup\n     * watermark; diagnostics and the crash-replay tests read it.\n     */\n    appliedMid(client_id: string): number;\n    /**\n     * Apply one upstream `nbatch` frame's `batch` object (JSON text). Returns a status\n     * object (JSON text): `{applied: \"snapshot\", rows}` | `{applied: \"live\", ops}` |\n     * `{applied: \"duplicate\"}` | `{applied: \"staleEpoch\", expected, got}`. Throws when\n     * the frame is garbage or the apply poisons the store — in both cases the host\n     * tears down and re-subscribes under a new epoch (§3.4); there is no repair call.\n     *\n     * After a `live`/`snapshot` apply, drain the fan-out with\n     * [`commitAll`](Self::commit_all).\n     */\n    apply(batch_json: string): string;\n    /**\n     * Build the §5.3 net-effect batch from the dirty entries + ledger co-edits.\n     * Returns `undefined` when there is nothing to flush, else JSON text\n     * `{changes, batchHash, lmids}`: `changes` is the `/apply-row-change-txn`\n     * `changes[]` array (ingest shape, old-images = the CAS base chain), `batchHash`\n     * the batch identity computed over its canonical bytes, `lmids` the\n     * `{clientID, mid}` advances the batch covers. At most one flush may be in\n     * flight — resolve with [`flushOk`](Self::flush_ok) or\n     * [`flushConflict`](Self::flush_conflict); retries resubmit the SAME journaled\n     * body, never a rebuilt one.\n     */\n    beginFlush(): string | undefined;\n    /**\n     * Open the transaction for `(clientID, mid)`. Returns `{\"begin\": \"tx\"}` (run the\n     * mutator, then [`commitMutation`](Self::commit_mutation) or\n     * [`rejectMutation`](Self::reject_mutation)) or `{\"begin\": \"dedup\"}` (an absorbed\n     * redelivery — send nothing). Throws on a mid gap with the exact\n     * `mutation gap for …` message the client's recovery keys on — forward it on an\n     * `error` frame. At most one transaction may be open.\n     *\n     * `name`/`args_json` (optional, Slice I-ii) are the wire envelope's mutator name\n     * and JSON-text args: should this mid end non-applied, its durable outcome row\n     * echoes them on a DEOPT (self-contained re-invoke, mirroring the H-iv-b frame).\n     * Omitting them degrades deopt rows to NULL name/args, nothing else.\n     */\n    beginMutation(client_id: string, mid: number, name?: string | null, args_json?: string | null): string;\n    /**\n     * Drain every materialized query once and return the fan-out as JSON text:\n     * `[{sub, batch}, …]` — one entry per attached subscriber per query with a\n     * non-empty net delta, each `batch` stamped with that subscriber's own epoch/seq.\n     * Empty array when nothing changed (or the store is no longer live — a dead\n     * incarnation must not ship a torn frame).\n     */\n    commitAll(): string;\n    /**\n     * Apply the open transaction to the head as one local commit: dirty entries are\n     * captured, the applied watermark advances, and every attached query sees the ops.\n     * Returns `{\"headCv\": n}` — drain [`commitAll`](Self::commit_all) and fan out NOW\n     * (§5.1 step 2: data fanout is never gated on durability), then journal the\n     * envelope and [`ack`](Self::ack) once the append commits. Throws only when the\n     * commit tears the head (store poisoned — tear down).\n     *\n     * Under [`enableWritesV2`](Self::enable_writes_v2) the §3.3 commit gate runs\n     * first; a containment violation returns `{\"deopt\": {reason, table, pk, …}}`\n     * instead (`reason`: `\"writeOutOfScope\"` (+ `op`) | `\"joinKeyChanged\"`\n     * (+ `column`) | `\"absentReadUnproven\"`): **nothing was applied**, the tx is\n     * consumed and the mid burnt exactly like [`rejectMutation`](Self::reject_mutation)\n     * (do NOT call it too) — journal the envelope as rejected and [`ack`](Self::ack)\n     * as usual, answering the client with a deopt. Under the v1 enable the return is\n     * always `{\"headCv\": n}`, byte-identical to before.\n     */\n    commitMutation(): string;\n    /**\n     * The last-applied upstream commit version (`undefined` before the seq-0 snapshot).\n     * This is the journal cursor's `cv` half — persist `(epoch, cv)` to resume (§3.3).\n     */\n    cv(): number | undefined;\n    /**\n     * How many `(table, pk)` keys are dirty (§5.3 — P3's flush input).\n     */\n    dirtyLen(): number;\n    /**\n     * The highest mid the write authority has committed for `clientID` (0 if none) —\n     * §8.1's `durable` level.\n     */\n    durableLmid(client_id: string): number;\n    /**\n     * Enable the §5.1 write plane over a live store: `owned_json` is a JSON array of\n     * the tables mutators may write (§3.2's owned set — must all be in the upstream\n     * hello). Registers the `_rindle_client_mutations` ledger; call once, right after\n     * the seq-0 snapshot applies and before serving. Idempotence is deliberate-ly NOT\n     * provided: enabling twice is a shell bug and throws.\n     */\n    enableWrites(owned_json: string): void;\n    /**\n     * Enable the write plane with per-table **scope specs** — the §3.3 room commit\n     * gate (H-iv-a). `specs_json` is a JSON array of\n     * `{ table, footprintWhere?, writable }` where `writable` is the lease block's\n     * `RoomTableSpec.writable` shape (`{kind:\"none\"}` for a context table,\n     * `{kind:\"predicate\", where?, joinKeyCols}` for a writable one) and\n     * `footprintWhere` is the footprint's row-local wire `Condition` for the table\n     * (drives the absent-read proof). Predicates compile NOW, loudly — a malformed or\n     * non-row-local spec (e.g. a `correlatedSubquery`) throws and nothing is enabled.\n     * With the gate armed, [`commitMutation`](Self::commit_mutation) can return a\n     * `{\"deopt\": …}` verdict. Same once-only/live-store rules as\n     * [`enableWrites`](Self::enable_writes), which remains the legacy table-granular\n     * entry (its gate proves nothing and never deopts).\n     */\n    enableWritesV2(specs_json: string): void;\n    /**\n     * The upstream subscription epoch this store was opened under.\n     */\n    epoch(): number;\n    /**\n     * The authority rejected the in-flight batch on CAS (§5.4 `flush_conflict`):\n     * `conflicts_json` is its `409` body's `conflicts` array —\n     * `[{table, pk, current}]`, `current: null` for an absent row. Each conflicted\n     * key converges to the authority's image (the local net effect is dropped);\n     * everything else stays dirty and retries next flush. Returns\n     * `{\"headCv\": n | null}` — drain [`commitAll`](Self::commit_all) after a\n     * non-null cv to ship the corrective frames.\n     */\n    flushConflict(conflicts_json: string): string;\n    /**\n     * Whether a §5.3 flush is in flight (diagnostics; the shell also guards).\n     */\n    flushInFlight(): boolean;\n    /**\n     * The authority committed the in-flight batch (§5.3 step 6): consumed entries\n     * retire (or re-base onto the image just written, if re-dirtied mid-flight),\n     * durable watermarks advance, `pending ≤` them retires. Returns\n     * `{\"retired\": n, \"dirty\": n}` — a non-zero `dirty` means writes landed during\n     * the flight; schedule the next flush.\n     */\n    flushOk(): string;\n    /**\n     * The room's own commit order — what downstream frames are stamped with and what\n     * the shell's `progress {cvMin}` release points are computed from. Advances on\n     * every upstream apply and every local commit (see `RoomStore::head_cv`).\n     */\n    headCv(): number;\n    /**\n     * Baseline present and not poisoned — the store is serving.\n     */\n    isLive(): boolean;\n    /**\n     * A failed apply left this incarnation dead (§3.4): tear down, re-subscribe.\n     */\n    isPoisoned(): boolean;\n    /**\n     * Subscribe `sub` to the reserved per-client lmid query (`_rindle/clientLmid`):\n     * the room composes the `_rindle_client_mutations WHERE client_id = <clientID>`\n     * AST itself — identity comes from the connection's `init`, never client args.\n     * Same return shape and envelope rules as [`subscribe`](Self::subscribe).\n     */\n    lmidSubscribe(sub: string, epoch: number, client_id: string, now_ms: number): string;\n    /**\n     * How many downstream queries are currently materialized (post-dedup).\n     */\n    materializationCount(): number;\n    /**\n     * Open the room's base store from the upstream `nhello` frame's `hello` object\n     * (JSON text). `idle_ttl_ms` is the downstream retention grace: a materialized\n     * query with no subscribers for that long is reclaimed by [`sweep`](Self::sweep).\n     * Rejects malformed hellos loudly — nothing is constructed.\n     */\n    static open(hello_json: string, idle_ttl_ms: number): WasmRoom;\n    /**\n     * Applied-but-not-retired mutations (everything, until P3's write-behind).\n     */\n    pendingLen(): number;\n    /**\n     * Drop the open transaction's staged ops and consume its mid anyway — the reject\n     * path (unknown mutator, mutator threw, staging refusal, a replayed non-applied\n     * journal entry). The stream stays contiguous; the eventual [`ack`](Self::ack)\n     * advances the ledger with no effects, snapping the author's prediction back.\n     *\n     * `kind` (`\"rejected\"` (default) | `\"deopt\"`) + `reason` are the shell's H-iv-b\n     * classification of the verdict: the outcome is RECORDED (Slice I-ii) and its\n     * durable row rides the next flush beside the covering lmid co-edit — one\n     * authority transaction, so a post-downgrade client resolving through the daemon\n     * never reads a burnt non-applied mid as applied. A deopt row echoes the\n     * [`beginMutation`](Self::begin_mutation) envelope's `name`/`args`.\n     */\n    rejectMutation(kind?: string | null, reason?: string | null): void;\n    /**\n     * Seed the durable watermarks from the write authority's ledger — the boot probe\n     * (§3.3; T2's committed-before-crash row). Call after [`enableWrites`] and\n     * **before** the journal replay: seeded mids replay as dedup instead of\n     * re-invoking. `seeds_json` is a JSON array of `{clientID, lmid}`. Returns\n     * `{\"headCv\": n | null}` — the ledger rows ride a local commit so the client's\n     * lmid slice confirms them.\n     *\n     * [`enableWrites`]: Self::enable_writes\n     */\n    seedDurable(seeds_json: string): string;\n    /**\n     * Materialize-on-presentation (§10.1): attach subscriber `sub` (the host's opaque\n     * routing key) at `epoch` to the query for this approved wire `Ast` (JSON text) —\n     * reusing the pipeline on a `QueryKey` hit. Returns\n     * `{queryKey, reused, hello, snapshot}` (JSON text): send `nhello(hello)` then\n     * `nbatch(snapshot)` (its `seq` is 0), then this subscriber's entries from each\n     * [`commitAll`](Self::commit_all). Re-subscribing an existing `sub` replaces its\n     * envelope — pass the bumped `epoch`, exactly as before.\n     */\n    subscribe(sub: string, epoch: number, ast_json: string, now_ms: number): string;\n    /**\n     * How many downstream subscribers are currently attached.\n     */\n    subscriberCount(): number;\n    /**\n     * Reclaim downstream queries idle past their grace window, on the host's clock.\n     * Returns how many were destroyed.\n     */\n    sweep(now_ms: number): number;\n    /**\n     * Stage an add of a full-width row (JSON-array text). Clean refusal (throw, head\n     * untouched) when the key exists, the table is not owned, or the width is wrong —\n     * catch it and reject the mutation.\n     */\n    txAdd(table: string, row_json: string): void;\n    /**\n     * Stage an edit to a full-width row (JSON-array text) keyed by its pk cells. The\n     * shell resolves partial updates against [`txGet`](Self::tx_get) first — only\n     * concrete cells cross this boundary (JSON has no `undefined`). The pk must not\n     * change; the row must exist.\n     */\n    txEdit(table: string, row_json: string): void;\n    /**\n     * The effective row for `pk_json` (a JSON array of pk cells, `primaryKey` order):\n     * the live head under this transaction's own staged writes — read-your-writes for\n     * read-dependent mutators, and what the keyed `update`/`delete`/`upsert` layers\n     * probe before composing their writes. Returns the row as JSON-array text, or\n     * `undefined` when absent.\n     */\n    txGet(table: string, pk_json: string): string | undefined;\n    /**\n     * Stage a remove of the row keyed `pk_json` (JSON array of pk cells). The change\n     * is composed from the effective row; a missing key is a clean refusal (the keyed\n     * `delete` layer no-ops before calling this).\n     */\n    txRemove(table: string, pk_json: string): void;\n    /**\n     * Detach subscriber `sub` (unsubscribe, socket close, lease expiry, revocation —\n     * the host decides why). Idempotent: returns whether it was attached. Its query\n     * stays materialized for `idle_ttl_ms` (a quick re-subscribe is cheap), then\n     * [`sweep`](Self::sweep) reclaims it.\n     */\n    unsubscribe(sub: string, now_ms: number): boolean;\n}","description":"One room instance: the upstream-fed base store plus its downstream serving state\n(materialized queries deduped by `QueryKey`, subscribers addressed by the host's\nopaque keys) and — once [`enableWrites`](Self::enable_writes) runs — the §5.1\nwrite plane, with **at most one mutation transaction open at a time** (the room is\nan actor; the host serializes mutations onto it).","source":"packages/room/pkg/rindle_room.d.ts","line":11,"href":"/reference/typescript/room/#symbol-WasmRoom"},{"name":"WireValue","originalName":"WireValue","kind":"TypeAliasDeclaration","signature":"/** A bare wire cell (the client stack's `WireValue`). */\nexport type WireValue = number | string | boolean | null;","description":"A bare wire cell (the client stack's `WireValue`).","source":"packages/room/src/mutation-tx.ts","line":20,"href":"/reference/typescript/room/#symbol-WireValue"},{"name":"WritesOptions","originalName":"WritesOptions","kind":"InterfaceDeclaration","signature":"/** The §5.1 write plane: the room's own mutator registry over its owned tables. */\nexport interface WritesOptions {\n    /** The server registry (§4.2): named mutators run against the shared head. PLAIN\n     *  synchronous `(tx, args, ctx)` functions only — a `shared(...)` GENERATOR registry\n     *  does NOT register verbatim (nothing drives it here; the shell rejects a mutator\n     *  that returns a generator/promise — see `assertSyncMutatorReturn`). */\n    mutators: Record<string, RoomMutator>;\n    /** §3.2's owned set — the only tables mutators may write. Must all be in the\n     *  upstream footprint; followed tables and the ledger are never writable. */\n    ownedTables: string[];\n    /** The §3.3 per-table scope specs from the boot wire (`RoomBootResponse.scopes` —\n     *  H-iv-b). Present ⇒ the write plane enables in v2 GATED mode (`enableWritesV2`):\n     *  staged writes validate against the writable predicates, join-key edits refuse,\n     *  absent reads must prove against `footprintWhere`, context (`kind:\"none\"`) tables\n     *  become txGet-READABLE, and a violating commit returns a structured DEOPT instead\n     *  of applying. The scopes' writable tables must be a SUBSET of {@link ownedTables}\n     *  (the host's own declaration) — a wider server scope throws at construction, so a\n     *  self-hoster's owned set can never be extended from the wire. Absent ⇒ the v1\n     *  table-granular write plane, byte-identical to before. */\n    scopes?: RoomScopeSpec[];\n    /** The durable sidecar an ack means (§8.1). Defaults to `memoryJournal()` — the\n     *  \"survives nothing beyond the process\" class; hosts bring their own. */\n    journal?: RoomJournal;\n    /** The journal group-commit window (default 5ms): mutations arriving within it\n     *  share one append, and their acks ride one ledger commit. */\n    groupCommitMs?: number;\n    /** The write authority (§5.3.1) — the API server's `/apply-row-change-txn` host\n     *  (or the P3 gate's mock). Omit to run journal-only (P2 semantics: nothing is\n     *  ever durable upstream). With an authority, the shell claims a placement epoch\n     *  at boot, probes durable lmids before replay, and write-behinds on the flush\n     *  cadence (§5.3). */\n    authority?: RoomAuthority;\n    /** The flush debounce (§5.3; default 250ms, within the design's ≤1s budget). */\n    flushDebounceMs?: number;\n    /** Flush immediately once this many keys are dirty (default 512). */\n    flushDirtyMax?: number;\n}","description":"The §5.1 write plane: the room's own mutator registry over its owned tables.","source":"packages/room/src/shell.ts","line":136,"href":"/reference/typescript/room/#symbol-WritesOptions"}]},{"name":"@rindle/room/wasm","source":"packages/room/src/wasm.ts","package":"@rindle/room","symbols":[{"name":"initRoomWasm","originalName":"initRoomWasm","kind":"FunctionDeclaration","signature":"/** Initialize the room wasm module (idempotent). Call once before `WasmRoom.open`.\n *  Node: bytes are read from the package. Browser/bundler: the wasm is fetched. Pass\n *  `moduleOrPath` to override (a `WebAssembly.Module`, URL, or bytes). */\nexport declare function initRoomWasm(moduleOrPath?: unknown): Promise<void>;","description":"Initialize the room wasm module (idempotent). Call once before `WasmRoom.open`.\nNode: bytes are read from the package. Browser/bundler: the wasm is fetched. Pass\n`moduleOrPath` to override (a `WebAssembly.Module`, URL, or bytes).","source":"packages/room/src/wasm.ts","line":15,"href":"/reference/typescript/room/wasm/#symbol-initRoomWasm"},{"name":"WasmRoom","originalName":"WasmRoom","kind":"ClassDeclaration","signature":"/* tslint:disable */\n/* eslint-disable */\n/**\n * One room instance: the upstream-fed base store plus its downstream serving state\n * (materialized queries deduped by `QueryKey`, subscribers addressed by the host's\n * opaque keys) and — once [`enableWrites`](Self::enable_writes) runs — the §5.1\n * write plane, with **at most one mutation transaction open at a time** (the room is\n * an actor; the host serializes mutations onto it).\n */\nexport class WasmRoom {\n    private constructor();\n    free(): void;\n    [Symbol.dispose](): void;\n    /**\n     * Advance the ledger rows for journal-committed mutations — **the ack** (§5.1\n     * step 4; call once the journal append resolves). `entries_json` is a JSON array\n     * of `{clientID, mid}`. Returns `{\"headCv\": n}` — drain\n     * [`commitAll`](Self::commit_all) to ship the lmid frames — or `{\"headCv\": null}`\n     * when everything was already covered.\n     */\n    ack(entries_json: string): string;\n    /**\n     * The ledger row's current value for `clientID` (0 if none) — what the wire has\n     * confirmed.\n     */\n    ackedLmid(client_id: string): number;\n    /**\n     * The highest mid applied to the head for `clientID` (0 if none) — the dedup\n     * watermark; diagnostics and the crash-replay tests read it.\n     */\n    appliedMid(client_id: string): number;\n    /**\n     * Apply one upstream `nbatch` frame's `batch` object (JSON text). Returns a status\n     * object (JSON text): `{applied: \"snapshot\", rows}` | `{applied: \"live\", ops}` |\n     * `{applied: \"duplicate\"}` | `{applied: \"staleEpoch\", expected, got}`. Throws when\n     * the frame is garbage or the apply poisons the store — in both cases the host\n     * tears down and re-subscribes under a new epoch (§3.4); there is no repair call.\n     *\n     * After a `live`/`snapshot` apply, drain the fan-out with\n     * [`commitAll`](Self::commit_all).\n     */\n    apply(batch_json: string): string;\n    /**\n     * Build the §5.3 net-effect batch from the dirty entries + ledger co-edits.\n     * Returns `undefined` when there is nothing to flush, else JSON text\n     * `{changes, batchHash, lmids}`: `changes` is the `/apply-row-change-txn`\n     * `changes[]` array (ingest shape, old-images = the CAS base chain), `batchHash`\n     * the batch identity computed over its canonical bytes, `lmids` the\n     * `{clientID, mid}` advances the batch covers. At most one flush may be in\n     * flight — resolve with [`flushOk`](Self::flush_ok) or\n     * [`flushConflict`](Self::flush_conflict); retries resubmit the SAME journaled\n     * body, never a rebuilt one.\n     */\n    beginFlush(): string | undefined;\n    /**\n     * Open the transaction for `(clientID, mid)`. Returns `{\"begin\": \"tx\"}` (run the\n     * mutator, then [`commitMutation`](Self::commit_mutation) or\n     * [`rejectMutation`](Self::reject_mutation)) or `{\"begin\": \"dedup\"}` (an absorbed\n     * redelivery — send nothing). Throws on a mid gap with the exact\n     * `mutation gap for …` message the client's recovery keys on — forward it on an\n     * `error` frame. At most one transaction may be open.\n     *\n     * `name`/`args_json` (optional, Slice I-ii) are the wire envelope's mutator name\n     * and JSON-text args: should this mid end non-applied, its durable outcome row\n     * echoes them on a DEOPT (self-contained re-invoke, mirroring the H-iv-b frame).\n     * Omitting them degrades deopt rows to NULL name/args, nothing else.\n     */\n    beginMutation(client_id: string, mid: number, name?: string | null, args_json?: string | null): string;\n    /**\n     * Drain every materialized query once and return the fan-out as JSON text:\n     * `[{sub, batch}, …]` — one entry per attached subscriber per query with a\n     * non-empty net delta, each `batch` stamped with that subscriber's own epoch/seq.\n     * Empty array when nothing changed (or the store is no longer live — a dead\n     * incarnation must not ship a torn frame).\n     */\n    commitAll(): string;\n    /**\n     * Apply the open transaction to the head as one local commit: dirty entries are\n     * captured, the applied watermark advances, and every attached query sees the ops.\n     * Returns `{\"headCv\": n}` — drain [`commitAll`](Self::commit_all) and fan out NOW\n     * (§5.1 step 2: data fanout is never gated on durability), then journal the\n     * envelope and [`ack`](Self::ack) once the append commits. Throws only when the\n     * commit tears the head (store poisoned — tear down).\n     *\n     * Under [`enableWritesV2`](Self::enable_writes_v2) the §3.3 commit gate runs\n     * first; a containment violation returns `{\"deopt\": {reason, table, pk, …}}`\n     * instead (`reason`: `\"writeOutOfScope\"` (+ `op`) | `\"joinKeyChanged\"`\n     * (+ `column`) | `\"absentReadUnproven\"`): **nothing was applied**, the tx is\n     * consumed and the mid burnt exactly like [`rejectMutation`](Self::reject_mutation)\n     * (do NOT call it too) — journal the envelope as rejected and [`ack`](Self::ack)\n     * as usual, answering the client with a deopt. Under the v1 enable the return is\n     * always `{\"headCv\": n}`, byte-identical to before.\n     */\n    commitMutation(): string;\n    /**\n     * The last-applied upstream commit version (`undefined` before the seq-0 snapshot).\n     * This is the journal cursor's `cv` half — persist `(epoch, cv)` to resume (§3.3).\n     */\n    cv(): number | undefined;\n    /**\n     * How many `(table, pk)` keys are dirty (§5.3 — P3's flush input).\n     */\n    dirtyLen(): number;\n    /**\n     * The highest mid the write authority has committed for `clientID` (0 if none) —\n     * §8.1's `durable` level.\n     */\n    durableLmid(client_id: string): number;\n    /**\n     * Enable the §5.1 write plane over a live store: `owned_json` is a JSON array of\n     * the tables mutators may write (§3.2's owned set — must all be in the upstream\n     * hello). Registers the `_rindle_client_mutations` ledger; call once, right after\n     * the seq-0 snapshot applies and before serving. Idempotence is deliberate-ly NOT\n     * provided: enabling twice is a shell bug and throws.\n     */\n    enableWrites(owned_json: string): void;\n    /**\n     * Enable the write plane with per-table **scope specs** — the §3.3 room commit\n     * gate (H-iv-a). `specs_json` is a JSON array of\n     * `{ table, footprintWhere?, writable }` where `writable` is the lease block's\n     * `RoomTableSpec.writable` shape (`{kind:\"none\"}` for a context table,\n     * `{kind:\"predicate\", where?, joinKeyCols}` for a writable one) and\n     * `footprintWhere` is the footprint's row-local wire `Condition` for the table\n     * (drives the absent-read proof). Predicates compile NOW, loudly — a malformed or\n     * non-row-local spec (e.g. a `correlatedSubquery`) throws and nothing is enabled.\n     * With the gate armed, [`commitMutation`](Self::commit_mutation) can return a\n     * `{\"deopt\": …}` verdict. Same once-only/live-store rules as\n     * [`enableWrites`](Self::enable_writes), which remains the legacy table-granular\n     * entry (its gate proves nothing and never deopts).\n     */\n    enableWritesV2(specs_json: string): void;\n    /**\n     * The upstream subscription epoch this store was opened under.\n     */\n    epoch(): number;\n    /**\n     * The authority rejected the in-flight batch on CAS (§5.4 `flush_conflict`):\n     * `conflicts_json` is its `409` body's `conflicts` array —\n     * `[{table, pk, current}]`, `current: null` for an absent row. Each conflicted\n     * key converges to the authority's image (the local net effect is dropped);\n     * everything else stays dirty and retries next flush. Returns\n     * `{\"headCv\": n | null}` — drain [`commitAll`](Self::commit_all) after a\n     * non-null cv to ship the corrective frames.\n     */\n    flushConflict(conflicts_json: string): string;\n    /**\n     * Whether a §5.3 flush is in flight (diagnostics; the shell also guards).\n     */\n    flushInFlight(): boolean;\n    /**\n     * The authority committed the in-flight batch (§5.3 step 6): consumed entries\n     * retire (or re-base onto the image just written, if re-dirtied mid-flight),\n     * durable watermarks advance, `pending ≤` them retires. Returns\n     * `{\"retired\": n, \"dirty\": n}` — a non-zero `dirty` means writes landed during\n     * the flight; schedule the next flush.\n     */\n    flushOk(): string;\n    /**\n     * The room's own commit order — what downstream frames are stamped with and what\n     * the shell's `progress {cvMin}` release points are computed from. Advances on\n     * every upstream apply and every local commit (see `RoomStore::head_cv`).\n     */\n    headCv(): number;\n    /**\n     * Baseline present and not poisoned — the store is serving.\n     */\n    isLive(): boolean;\n    /**\n     * A failed apply left this incarnation dead (§3.4): tear down, re-subscribe.\n     */\n    isPoisoned(): boolean;\n    /**\n     * Subscribe `sub` to the reserved per-client lmid query (`_rindle/clientLmid`):\n     * the room composes the `_rindle_client_mutations WHERE client_id = <clientID>`\n     * AST itself — identity comes from the connection's `init`, never client args.\n     * Same return shape and envelope rules as [`subscribe`](Self::subscribe).\n     */\n    lmidSubscribe(sub: string, epoch: number, client_id: string, now_ms: number): string;\n    /**\n     * How many downstream queries are currently materialized (post-dedup).\n     */\n    materializationCount(): number;\n    /**\n     * Open the room's base store from the upstream `nhello` frame's `hello` object\n     * (JSON text). `idle_ttl_ms` is the downstream retention grace: a materialized\n     * query with no subscribers for that long is reclaimed by [`sweep`](Self::sweep).\n     * Rejects malformed hellos loudly — nothing is constructed.\n     */\n    static open(hello_json: string, idle_ttl_ms: number): WasmRoom;\n    /**\n     * Applied-but-not-retired mutations (everything, until P3's write-behind).\n     */\n    pendingLen(): number;\n    /**\n     * Drop the open transaction's staged ops and consume its mid anyway — the reject\n     * path (unknown mutator, mutator threw, staging refusal, a replayed non-applied\n     * journal entry). The stream stays contiguous; the eventual [`ack`](Self::ack)\n     * advances the ledger with no effects, snapping the author's prediction back.\n     *\n     * `kind` (`\"rejected\"` (default) | `\"deopt\"`) + `reason` are the shell's H-iv-b\n     * classification of the verdict: the outcome is RECORDED (Slice I-ii) and its\n     * durable row rides the next flush beside the covering lmid co-edit — one\n     * authority transaction, so a post-downgrade client resolving through the daemon\n     * never reads a burnt non-applied mid as applied. A deopt row echoes the\n     * [`beginMutation`](Self::begin_mutation) envelope's `name`/`args`.\n     */\n    rejectMutation(kind?: string | null, reason?: string | null): void;\n    /**\n     * Seed the durable watermarks from the write authority's ledger — the boot probe\n     * (§3.3; T2's committed-before-crash row). Call after [`enableWrites`] and\n     * **before** the journal replay: seeded mids replay as dedup instead of\n     * re-invoking. `seeds_json` is a JSON array of `{clientID, lmid}`. Returns\n     * `{\"headCv\": n | null}` — the ledger rows ride a local commit so the client's\n     * lmid slice confirms them.\n     *\n     * [`enableWrites`]: Self::enable_writes\n     */\n    seedDurable(seeds_json: string): string;\n    /**\n     * Materialize-on-presentation (§10.1): attach subscriber `sub` (the host's opaque\n     * routing key) at `epoch` to the query for this approved wire `Ast` (JSON text) —\n     * reusing the pipeline on a `QueryKey` hit. Returns\n     * `{queryKey, reused, hello, snapshot}` (JSON text): send `nhello(hello)` then\n     * `nbatch(snapshot)` (its `seq` is 0), then this subscriber's entries from each\n     * [`commitAll`](Self::commit_all). Re-subscribing an existing `sub` replaces its\n     * envelope — pass the bumped `epoch`, exactly as before.\n     */\n    subscribe(sub: string, epoch: number, ast_json: string, now_ms: number): string;\n    /**\n     * How many downstream subscribers are currently attached.\n     */\n    subscriberCount(): number;\n    /**\n     * Reclaim downstream queries idle past their grace window, on the host's clock.\n     * Returns how many were destroyed.\n     */\n    sweep(now_ms: number): number;\n    /**\n     * Stage an add of a full-width row (JSON-array text). Clean refusal (throw, head\n     * untouched) when the key exists, the table is not owned, or the width is wrong —\n     * catch it and reject the mutation.\n     */\n    txAdd(table: string, row_json: string): void;\n    /**\n     * Stage an edit to a full-width row (JSON-array text) keyed by its pk cells. The\n     * shell resolves partial updates against [`txGet`](Self::tx_get) first — only\n     * concrete cells cross this boundary (JSON has no `undefined`). The pk must not\n     * change; the row must exist.\n     */\n    txEdit(table: string, row_json: string): void;\n    /**\n     * The effective row for `pk_json` (a JSON array of pk cells, `primaryKey` order):\n     * the live head under this transaction's own staged writes — read-your-writes for\n     * read-dependent mutators, and what the keyed `update`/`delete`/`upsert` layers\n     * probe before composing their writes. Returns the row as JSON-array text, or\n     * `undefined` when absent.\n     */\n    txGet(table: string, pk_json: string): string | undefined;\n    /**\n     * Stage a remove of the row keyed `pk_json` (JSON array of pk cells). The change\n     * is composed from the effective row; a missing key is a clean refusal (the keyed\n     * `delete` layer no-ops before calling this).\n     */\n    txRemove(table: string, pk_json: string): void;\n    /**\n     * Detach subscriber `sub` (unsubscribe, socket close, lease expiry, revocation —\n     * the host decides why). Idempotent: returns whether it was attached. Its query\n     * stays materialized for `idle_ttl_ms` (a quick re-subscribe is cheap), then\n     * [`sweep`](Self::sweep) reclaims it.\n     */\n    unsubscribe(sub: string, now_ms: number): boolean;\n}","description":"One room instance: the upstream-fed base store plus its downstream serving state\n(materialized queries deduped by `QueryKey`, subscribers addressed by the host's\nopaque keys) and — once [`enableWrites`](Self::enable_writes) runs — the §5.1\nwrite plane, with **at most one mutation transaction open at a time** (the room is\nan actor; the host serializes mutations onto it).","source":"packages/room/pkg/rindle_room.d.ts","line":11,"href":"/reference/typescript/room/wasm/#symbol-WasmRoom"}]},{"name":"@rindle/room/token","source":"packages/room/src/token.ts","package":"@rindle/room","symbols":[{"name":"mintRoomToken","originalName":"mintRoomToken","kind":"FunctionDeclaration","signature":"/** Sign a room lease token. This runs on the API-server side (or a test playing it). */\nexport declare function mintRoomToken(opts: MintRoomTokenOptions): Promise<string>;","description":"Sign a room lease token. This runs on the API-server side (or a test playing it).","source":"packages/room/src/token.ts","line":126,"href":"/reference/typescript/room/token/#symbol-mintRoomToken"},{"name":"MintRoomTokenOptions","originalName":"MintRoomTokenOptions","kind":"InterfaceDeclaration","signature":"export interface MintRoomTokenOptions {\n    doc: string;\n    ast: unknown;\n    /** The subject (user id) this token authorizes — the §4.1 revocation key. */\n    sub: string;\n    /** Key id + its secret (utf-8; give every room the same `keys` map). */\n    kid: string;\n    key: string;\n    /** Expiry, ms from `now`. Keep short (minutes) — the §4.1 TTL backstop. */\n    ttlMs: number;\n    /** Mint time; defaults to `Date.now()`. Injectable for tests. */\n    now?: number;\n    /** The room's {@link scopeSpecsHash} for the profile this lease serves — stamped so the\n     *  shell can flag scope skew (see {@link RoomTokenPayload.scopesHash}). Omit to not stamp. */\n    scopesHash?: string;\n}","description":"","source":"packages/room/src/token.ts","line":46,"href":"/reference/typescript/room/token/#symbol-MintRoomTokenOptions"},{"name":"RoomTokenError","originalName":"RoomTokenError","kind":"ClassDeclaration","signature":"/** Why a token was refused. The `reason` is terse and safe to echo in a queryError. */\nexport declare class RoomTokenError extends Error {\n    readonly reason: string;\n    constructor(reason: string);\n}","description":"Why a token was refused. The `reason` is terse and safe to echo in a queryError.","source":"packages/room/src/token.ts","line":149,"href":"/reference/typescript/room/token/#symbol-RoomTokenError"},{"name":"RoomTokenPayload","originalName":"RoomTokenPayload","kind":"InterfaceDeclaration","signature":"/**\n * The room's **self-authorizing signed lease token** (RINDLE-REALTIME-DESIGN.md §10.1).\n *\n * The API server is the authority (§4): it authenticates the user, resolves the named\n * query to an approved AST, and signs this token. The token then IS the lease — the\n * room materializes on first presentation, so no pre-placement `/materialize` control\n * call ever touches it (the §10.1 inversion; on the DO shell the Worker verifies the\n * same signature statelessly before `get(id)`).\n *\n * Shape: `rt1.<base64url(payload)>.<base64url(hmac-sha256(prefix.payload))>` with\n * payload `{ v: 1, doc, ast, sub, iat, exp, kid }`:\n *\n * - `doc` — the room/document id the token authorizes (a token for one room presented\n *   to another is refused);\n * - `ast` — the approved wire `Ast` (the client never composes this; §4's \"ASTs never\n *   cross the public wire\" holds because the token is opaque TO THE CLIENT — it carries\n *   it, it cannot mint or alter it);\n * - `sub` — the subject (user id): the revocation key (§4.1);\n * - `iat`/`exp` — issued-at / expiry, ms epoch. Renewal is re-authorization: clients\n *   obtain a fresh token through the API server, never extend this one. `iat` is what\n *   lets a revocation refuse pre-revocation tokens while a genuine re-grant (a newer\n *   token) passes immediately;\n * - `kid` — which shared secret signed it (rotation).\n *\n * HMAC via WebCrypto (`crypto.subtle`) so the exact same code verifies in Node (the\n * test shell) and in a Cloudflare Worker/DO (P4) — no `node:crypto` import.\n */\nexport interface RoomTokenPayload {\n    v: 1;\n    doc: string;\n    ast: unknown;\n    sub: string;\n    iat: number;\n    exp: number;\n    kid: string;\n    /** A short fingerprint of the room's compiled scope specs at mint time\n     *  ({@link scopeSpecsHash}). Advisory, not a credential: the room's §3.3 gate is the\n     *  contract regardless. It lets the shell detect SCOPE SKEW — a room profile edited\n     *  while a room is already live arms the gate with the OLD specs (a one-shot at boot)\n     *  while fresh leases prove against the NEW ones, so every routed write silently\n     *  deopt-loops. Optional so a pre-stamp api-server / older token still verifies. */\n    scopesHash?: string;\n}","description":"The room's **self-authorizing signed lease token** (RINDLE-REALTIME-DESIGN.md §10.1).\n\nThe API server is the authority (§4): it authenticates the user, resolves the named\nquery to an approved AST, and signs this token. The token then IS the lease — the\nroom materializes on first presentation, so no pre-placement `/materialize` control\ncall ever touches it (the §10.1 inversion; on the DO shell the Worker verifies the\nsame signature statelessly before `get(id)`).\n\nShape: `rt1.<base64url(payload)>.<base64url(hmac-sha256(prefix.payload))>` with\npayload `{ v: 1, doc, ast, sub, iat, exp, kid }`:\n\n- `doc` — the room/document id the token authorizes (a token for one room presented\n  to another is refused);\n- `ast` — the approved wire `Ast` (the client never composes this; §4's \"ASTs never\n  cross the public wire\" holds because the token is opaque TO THE CLIENT — it carries\n  it, it cannot mint or alter it);\n- `sub` — the subject (user id): the revocation key (§4.1);\n- `iat`/`exp` — issued-at / expiry, ms epoch. Renewal is re-authorization: clients\n  obtain a fresh token through the API server, never extend this one. `iat` is what\n  lets a revocation refuse pre-revocation tokens while a genuine re-grant (a newer\n  token) passes immediately;\n- `kid` — which shared secret signed it (rotation).\n\nHMAC via WebCrypto (`crypto.subtle`) so the exact same code verifies in Node (the\ntest shell) and in a Cloudflare Worker/DO (P4) — no `node:crypto` import.","source":"packages/room/src/token.ts","line":29,"href":"/reference/typescript/room/token/#symbol-RoomTokenPayload"},{"name":"scopeSpecsHash","originalName":"scopeSpecsHash","kind":"FunctionDeclaration","signature":"/** A stable short fingerprint of the compiled scope specs — the scope-skew tripwire.\n *  NOT security (the gate re-proves every write): FNV-1a-32 over the {@link canonicalJson}\n *  form, 8 hex chars. Both the api-server (stamping the lease token) and the room shell\n *  (hashing the boot-wire scopes it armed the gate with) run this over the SAME compiler\n *  output, so an unchanged profile ⇒ equal hash and a profile edited under a live room ⇒\n *  mismatch. A collision only costs a missed diagnostic, never correctness. Accepts either\n *  wire's spec array (`RoomScopeSpec[]` / `RoomTableSpec[]` — structurally identical). */\nexport declare function scopeSpecsHash(specs: readonly unknown[]): string;","description":"A stable short fingerprint of the compiled scope specs — the scope-skew tripwire.\nNOT security (the gate re-proves every write): FNV-1a-32 over the {@link canonicalJson}\nform, 8 hex chars. Both the api-server (stamping the lease token) and the room shell\n(hashing the boot-wire scopes it armed the gate with) run this over the SAME compiler\noutput, so an unchanged profile ⇒ equal hash and a profile edited under a live room ⇒\nmismatch. A collision only costs a missed diagnostic, never correctness. Accepts either\nwire's spec array (`RoomScopeSpec[]` / `RoomTableSpec[]` — structurally identical).","source":"packages/room/src/token.ts","line":87,"href":"/reference/typescript/room/token/#symbol-scopeSpecsHash"},{"name":"verifyRoomToken","originalName":"verifyRoomToken","kind":"FunctionDeclaration","signature":"/**\n * Verify a token's signature and claims; returns the payload (with the approved AST)\n * or throws {@link RoomTokenError}. Signature is checked FIRST — no claim is trusted\n * (not even `kid`'s existence beyond the key lookup) before the MAC passes.\n */\nexport declare function verifyRoomToken(token: string, opts: VerifyRoomTokenOptions): Promise<RoomTokenPayload>;","description":"Verify a token's signature and claims; returns the payload (with the approved AST)\nor throws {@link RoomTokenError}. Signature is checked FIRST — no claim is trusted\n(not even `kid`'s existence beyond the key lookup) before the MAC passes.","source":"packages/room/src/token.ts","line":172,"href":"/reference/typescript/room/token/#symbol-verifyRoomToken"},{"name":"VerifyRoomTokenOptions","originalName":"VerifyRoomTokenOptions","kind":"InterfaceDeclaration","signature":"export interface VerifyRoomTokenOptions {\n    /** The room's own doc id — a token for any other doc is refused. */\n    doc: string;\n    /** kid → shared secret. Unknown kids are refused (never \"try them all\"). */\n    keys: Record<string, string>;\n    /** Verification time; defaults to `Date.now()`. Injectable for tests. */\n    now?: number;\n}","description":"","source":"packages/room/src/token.ts","line":158,"href":"/reference/typescript/room/token/#symbol-VerifyRoomTokenOptions"}]},{"name":"@rindle/room/journal","source":"packages/room/src/journal.ts","package":"@rindle/room","symbols":[{"name":"journalEntryOutcome","originalName":"journalEntryOutcome","kind":"FunctionDeclaration","signature":"/** The ONE reading rule for an entry's verdict across journal generations: `outcome`\n *  when present, else the legacy `rejected` flag, else applied. */\nexport declare function journalEntryOutcome(entry: RoomJournalEntry): \"applied\" | \"rejected\" | \"deopt\";","description":"The ONE reading rule for an entry's verdict across journal generations: `outcome`\nwhen present, else the legacy `rejected` flag, else applied.","source":"packages/room/src/journal.ts","line":50,"href":"/reference/typescript/room/journal/#symbol-journalEntryOutcome"},{"name":"memoryJournal","originalName":"memoryJournal","kind":"FunctionDeclaration","signature":"/** An in-process journal: survives incarnations within one shell process (and, handed\n *  to a second shell, a simulated process crash — the T2 harness). Not durable beyond\n *  the process, by definition. */\nexport declare function memoryJournal(): RoomJournal;","description":"An in-process journal: survives incarnations within one shell process (and, handed\nto a second shell, a simulated process crash — the T2 harness). Not durable beyond\nthe process, by definition.","source":"packages/room/src/journal.ts","line":84,"href":"/reference/typescript/room/journal/#symbol-memoryJournal"},{"name":"RoomFlushRecord","originalName":"RoomFlushRecord","kind":"InterfaceDeclaration","signature":"/** One journaled flush batch: the room's flush-stream position, the placement epoch it\n *  was built under, and the EXACT `/apply-row-change-txn` body string — resubmitted\n *  verbatim, never rebuilt (§5.3 step 4). */\nexport interface RoomFlushRecord {\n    seq: number;\n    epoch: number;\n    body: string;\n}","description":"One journaled flush batch: the room's flush-stream position, the placement epoch it\nwas built under, and the EXACT `/apply-row-change-txn` body string — resubmitted\nverbatim, never rebuilt (§5.3 step 4).","source":"packages/room/src/journal.ts","line":57,"href":"/reference/typescript/room/journal/#symbol-RoomFlushRecord"},{"name":"RoomJournal","originalName":"RoomJournal","kind":"InterfaceDeclaration","signature":"export interface RoomJournal {\n    /** Append `entries` durably, in order. Resolving is the ack gate (§8.1): the shell\n     *  advances lmid rows only after this resolves. A rejection is fatal to the\n     *  incarnation — an ack that might not survive must never be sent. */\n    append(entries: RoomJournalEntry[]): Promise<void>;\n    /** Every entry ever appended, in append order — the boot-time replay source. */\n    replay(): Promise<RoomJournalEntry[]>;\n    /** Journal one built flush batch, BEFORE its first send. Same durability contract\n     *  as `append`: a rejection is fatal (an unjournaled batch must never reach the\n     *  wire — a retry could otherwise rebuild different bytes under the same id). */\n    appendFlush(record: RoomFlushRecord): Promise<void>;\n    /** The authority settled flush `seq` (committed, deduped, or dead) — drop it. */\n    confirmFlush(seq: number): Promise<void>;\n    /** Unconfirmed flush records in seq order, plus the highest seq ever appended\n     *  (0 = none) — the boot-time resubmission source and the seq seed. */\n    replayFlushes(): Promise<{\n        records: RoomFlushRecord[];\n        maxSeq: number;\n    }>;\n}","description":"","source":"packages/room/src/journal.ts","line":63,"href":"/reference/typescript/room/journal/#symbol-RoomJournal"},{"name":"RoomJournalEntry","originalName":"RoomJournalEntry","kind":"InterfaceDeclaration","signature":"/** One journaled mutation: the wire envelope plus its recorded outcome. Replay applies\n *  the OUTCOME — a non-applied (`rejected`/`deopt`) entry consumes its mid without\n *  running the mutator. */\nexport interface RoomJournalEntry {\n    clientID: string;\n    mid: number;\n    name: string;\n    args: unknown;\n    /** The connection's authenticated subject at push time (the lease token's `sub`,\n     *  shell-stamped — managed-writes §3.3): recovery is re-invocation, so identity is\n     *  an input that must survive the crash. `\"\"` = an entry journaled before the\n     *  identity plane existed (mutators see it as unauthenticated). */\n    sub: string;\n    /** The recorded verdict (H-iv-b): `\"applied\"` replays by RE-INVOKING the mutator\n     *  (§3.3 — and against a moved base the re-invocation may legitimately reject or\n     *  DEOPT; the journal record is never rewritten, the shell's recorded-outcome map\n     *  reflects what the replaying incarnation produced); `\"rejected\"` (final — authz /\n     *  validation / unknown mutator) and `\"deopt\"` (the §3.3 commit gate refused; the\n     *  client was told to re-route the mutation) both replay as a consumed-mid-no-effect\n     *  WITHOUT running anything — re-judging a deopt could invent effects the client\n     *  already re-routed elsewhere. Absent = a legacy pre-H-iv-b entry: read through\n     *  {@link journalEntryOutcome}. */\n    outcome?: \"applied\" | \"rejected\" | \"deopt\";\n    /** Legacy pre-H-iv-b flag, superseded by {@link outcome} but still WRITTEN (`true`)\n     *  alongside BOTH non-applied outcomes: a legacy reader replays either kind as a\n     *  consumed-mid-no-effect, which is exactly right. */\n    rejected?: boolean;\n}","description":"One journaled mutation: the wire envelope plus its recorded outcome. Replay applies\nthe OUTCOME — a non-applied (`rejected`/`deopt`) entry consumes its mid without\nrunning the mutator.","source":"packages/room/src/journal.ts","line":22,"href":"/reference/typescript/room/journal/#symbol-RoomJournalEntry"}]},{"name":"@rindle/room/authority","source":"packages/room/src/authority.ts","package":"@rindle/room","symbols":[{"name":"AuthorityApplyResult","originalName":"AuthorityApplyResult","kind":"TypeAliasDeclaration","signature":"/** The apply outcome. Anything else — network failure, a 5xx — is a **throw**: plain\n *  errors retry (same body, same id; dedup absorbs a landed retry), errors marked\n *  `fatal: true` (an identity mismatch — same id, different body — or a malformed\n *  refusal) kill the incarnation loudly instead. */\nexport type AuthorityApplyResult = {\n    kind: \"ok\";\n    applied: boolean;\n    cv?: number;\n} | {\n    kind: \"conflict\";\n    conflicts: AuthorityConflict[];\n} | {\n    kind: \"fenced\";\n    currentEpoch?: number;\n};","description":"The apply outcome. Anything else — network failure, a 5xx — is a **throw**: plain\nerrors retry (same body, same id; dedup absorbs a landed retry), errors marked\n`fatal: true` (an identity mismatch — same id, different body — or a malformed\nrefusal) kill the incarnation loudly instead.","source":"packages/room/src/authority.ts","line":27,"href":"/reference/typescript/room/authority/#symbol-AuthorityApplyResult"},{"name":"AuthorityConflict","originalName":"AuthorityConflict","kind":"InterfaceDeclaration","signature":"/** One CAS rejection in the authority's `409 conflict` body: the row's authoritative\n *  current image (`null` = absent), keyed by table + pk cells. */\nexport interface AuthorityConflict {\n    table: string;\n    pk: unknown[];\n    current: unknown[] | null;\n}","description":"One CAS rejection in the authority's `409 conflict` body: the row's authoritative\ncurrent image (`null` = absent), keyed by table + pk cells.","source":"packages/room/src/authority.ts","line":17,"href":"/reference/typescript/room/authority/#symbol-AuthorityConflict"},{"name":"fatalAuthorityError","originalName":"fatalAuthorityError","kind":"FunctionDeclaration","signature":"export declare function fatalAuthorityError(message: string): FatalAuthorityError;","description":"","source":"packages/room/src/authority.ts","line":51,"href":"/reference/typescript/room/authority/#symbol-fatalAuthorityError"},{"name":"FatalAuthorityError","originalName":"FatalAuthorityError","kind":"InterfaceDeclaration","signature":"/** An apply error the shell must NOT retry (retrying cannot help; something is wrong\n *  with the batch or the room, not the network). */\nexport interface FatalAuthorityError extends Error {\n    fatal: true;\n}","description":"An apply error the shell must NOT retry (retrying cannot help; something is wrong\nwith the batch or the room, not the network).","source":"packages/room/src/authority.ts","line":47,"href":"/reference/typescript/room/authority/#symbol-FatalAuthorityError"},{"name":"httpAuthority","originalName":"httpAuthority","kind":"FunctionDeclaration","signature":"/** The HTTP [`RoomAuthority`]: the API-server host as the room's sole counterpart\n *  (§5.3.1). Maps `409 {error:\"fenced\"}` / `409 {error:\"conflict\"}` to their results,\n *  a `500` mentioning a batch-identity mismatch to a fatal error, and anything else\n *  non-OK to a retryable throw. */\nexport declare function httpAuthority(opts: HttpAuthorityOptions): RoomAuthority;","description":"The HTTP [`RoomAuthority`]: the API-server host as the room's sole counterpart\n(§5.3.1). Maps `409 {error:\"fenced\"}` / `409 {error:\"conflict\"}` to their results,\na `500` mentioning a batch-identity mismatch to a fatal error, and anything else\nnon-OK to a retryable throw.","source":"packages/room/src/authority.ts","line":73,"href":"/reference/typescript/room/authority/#symbol-httpAuthority"},{"name":"HttpAuthorityOptions","originalName":"HttpAuthorityOptions","kind":"InterfaceDeclaration","signature":"export interface HttpAuthorityOptions {\n    /** The API server's apply endpoint (e.g. `http://…/api/rindle/apply-row-change-txn`). */\n    applyUrl: string;\n    /** The epoch-claim endpoint (e.g. `http://…/api/rindle/claim-room-epoch`). */\n    claimUrl: string;\n    /** The lmid-probe endpoint (e.g. `http://…/api/rindle/room-lmids`). */\n    lmidsUrl: string;\n    /** Extra headers on every call — the epoch-bound flush credential rides here. */\n    headers?: Record<string, string>;\n    fetch?: typeof fetch;\n}","description":"","source":"packages/room/src/authority.ts","line":57,"href":"/reference/typescript/room/authority/#symbol-HttpAuthorityOptions"},{"name":"RoomAuthority","originalName":"RoomAuthority","kind":"InterfaceDeclaration","signature":"export interface RoomAuthority {\n    /** Claim the placement epoch for `doc` (§2.5) — once per shell process, at boot,\n     *  AFTER resubmitting the previous incarnation's unconfirmed batches (their recorded\n     *  epochs must still be current to land). */\n    claimEpoch(doc: string): Promise<number>;\n    /** The authority's ledger lmid per client (0 = none) — the boot probe that lets\n     *  journal replay absorb already-durable mutations as dedup. */\n    lmids(doc: string, clients: string[]): Promise<Record<string, number>>;\n    /** Apply one batch: `body` is the exact journaled `/apply-row-change-txn` body\n     *  string, sent verbatim. */\n    applyRowChangeTxn(body: string): Promise<AuthorityApplyResult>;\n}","description":"","source":"packages/room/src/authority.ts","line":32,"href":"/reference/typescript/room/authority/#symbol-RoomAuthority"}]},{"name":"@rindle/room/mutation-tx","source":"packages/room/src/mutation-tx.ts","package":"@rindle/room","symbols":[{"name":"assertSyncMutatorReturn","originalName":"assertSyncMutatorReturn","kind":"FunctionDeclaration","signature":"/**\n * Guard against the two mutator shapes that would corrupt silently instead of failing loudly.\n * A `shared(...)` GENERATOR registered verbatim returns an un-iterated generator — zero writes,\n * acked as applied (data loss); an ASYNC mutator runs synchronously only to its first `await`,\n * so later writes land OUTSIDE the committed transaction. Both shells call this on the\n * mutator's return value inside their try/reject path, so either shape becomes an explicit\n * rejection with a pointed message. (An adapter that DRIVES a shared generator registry against\n * the room tx is future work — managed-writes design §8.)\n */\nexport declare function assertSyncMutatorReturn(returned: unknown, name: string): void;","description":"Guard against the two mutator shapes that would corrupt silently instead of failing loudly.\nA `shared(...)` GENERATOR registered verbatim returns an un-iterated generator — zero writes,\nacked as applied (data loss); an ASYNC mutator runs synchronously only to its first `await`,\nso later writes land OUTSIDE the committed transaction. Both shells call this on the\nmutator's return value inside their try/reject path, so either shape becomes an explicit\nrejection with a pointed message. (An adapter that DRIVES a shared generator registry against\nthe room tx is future work — managed-writes design §8.)","source":"packages/room/src/mutation-tx.ts","line":99,"href":"/reference/typescript/room/mutation-tx/#symbol-assertSyncMutatorReturn"},{"name":"environmentShortfall","originalName":"environmentShortfall","kind":"FunctionDeclaration","signature":"/**\n * Tag an error as an ENVIRONMENT shortfall (H-iv-b): the room lacks a capability the\n * mutation needs (today: `tx.query`), which is a verdict about the ROOM, not the\n * mutation — the shell classifies it as a DEOPT (the client re-routes the mutation to\n * the daemon stream, where the capability exists) instead of a FINAL rejection (which\n * would drop the mutation). Contrast a validation/authz throw: re-routing can't help\n * those, so they stay `rejected`.\n */\nexport declare function environmentShortfall(message: string): Error;","description":"Tag an error as an ENVIRONMENT shortfall (H-iv-b): the room lacks a capability the\nmutation needs (today: `tx.query`), which is a verdict about the ROOM, not the\nmutation — the shell classifies it as a DEOPT (the client re-routes the mutation to\nthe daemon stream, where the capability exists) instead of a FINAL rejection (which\nwould drop the mutation). Contrast a validation/authz throw: re-routing can't help\nthose, so they stay `rejected`.","source":"packages/room/src/mutation-tx.ts","line":77,"href":"/reference/typescript/room/mutation-tx/#symbol-environmentShortfall"},{"name":"isEnvironmentShortfall","originalName":"isEnvironmentShortfall","kind":"FunctionDeclaration","signature":"/** Whether `e` was tagged by {@link environmentShortfall}. */\nexport declare function isEnvironmentShortfall(e: unknown): boolean;","description":"Whether `e` was tagged by {@link environmentShortfall}.","source":"packages/room/src/mutation-tx.ts","line":84,"href":"/reference/typescript/room/mutation-tx/#symbol-isEnvironmentShortfall"},{"name":"KeyedRow","originalName":"KeyedRow","kind":"TypeAliasDeclaration","signature":"/** A row keyed by column name. */\nexport type KeyedRow = Record<string, WireValue>;","description":"A row keyed by column name.","source":"packages/room/src/mutation-tx.ts","line":22,"href":"/reference/typescript/room/mutation-tx/#symbol-KeyedRow"},{"name":"mutationTx","originalName":"mutationTx","kind":"FunctionDeclaration","signature":"/** Build the MutationTx for one open wasm transaction. Valid only while that\n *  transaction is open — the shell creates one per mutation and never retains it. */\nexport declare function mutationTx(room: WasmRoom, shapes: Map<string, TableShape>): MutationTx;","description":"Build the MutationTx for one open wasm transaction. Valid only while that\ntransaction is open — the shell creates one per mutation and never retains it.","source":"packages/room/src/mutation-tx.ts","line":152,"href":"/reference/typescript/room/mutation-tx/#symbol-mutationTx"},{"name":"MutationTx","originalName":"MutationTx","kind":"InterfaceDeclaration","signature":"/** The §4.2 write handle. Keyed methods are schema-checked; positional methods are the\n *  raw wire shape (cells in schema column order, pk cells in `primaryKey` order).\n *  `query` is not available in room mutators yet (it throws) — typed so a client\n *  registry that uses it still registers, and fails loudly at run time. */\nexport interface MutationTx {\n    /** Read one row by primary key (e.g. `tx.row(\"issue\", { id: 1 })`). */\n    row(table: string, pk: KeyedRow): KeyedRow | undefined;\n    /** Insert a FULL row (every column named; missing or unknown columns throw). */\n    insert(table: string, row: KeyedRow): void;\n    /** Update the row identified by the pk columns; only the named non-pk columns\n     *  change. A missing row is a NO-OP (rebase-friendly). */\n    update(table: string, row: KeyedRow): void;\n    /** Insert, or fully replace when the pk already exists (a FULL row, like insert). */\n    upsert(table: string, row: KeyedRow): void;\n    /** Delete the row identified by the pk columns. A missing row is a NO-OP. */\n    delete(table: string, pk: KeyedRow): void;\n    /** NOT SUPPORTED in room mutators yet — throws. (Typed to accept the client\n     *  builder's queries so shared registries typecheck.) */\n    query(query: {\n        ast(): unknown;\n    }): never;\n    get(table: string, pk: WireValue[]): WireValue[] | undefined;\n    add(table: string, row: WireValue[]): void;\n    remove(table: string, row: WireValue[]): void;\n    edit(table: string, oldRow: WireValue[], newRow: (WireValue | undefined)[]): void;\n}","description":"The §4.2 write handle. Keyed methods are schema-checked; positional methods are the\nraw wire shape (cells in schema column order, pk cells in `primaryKey` order).\n`query` is not available in room mutators yet (it throws) — typed so a client\nregistry that uses it still registers, and fails loudly at run time.","source":"packages/room/src/mutation-tx.ts","line":28,"href":"/reference/typescript/room/mutation-tx/#symbol-MutationTx"},{"name":"RoomMutator","originalName":"RoomMutator","kind":"TypeAliasDeclaration","signature":"/** A room mutator: deterministic, replayable — re-invoked on journal replay against\n *  the freshly re-subscribed base (§3.3), so the same purity rules as a client\n *  mutator apply (no clock, no randomness, a pure function of `(base, args, ctx)`).\n *  An auth check against `ctx` re-runs on replay against the freshly rebuilt base —\n *  a mutation that passed before a crash can replay as rejected if the permission\n *  row changed in between; that is §3.3's intended rebase behavior. */\nexport type RoomMutator = (tx: MutationTx, args: never, ctx: RoomMutatorCtx) => void;","description":"A room mutator: deterministic, replayable — re-invoked on journal replay against\nthe freshly re-subscribed base (§3.3), so the same purity rules as a client\nmutator apply (no clock, no randomness, a pure function of `(base, args, ctx)`).\nAn auth check against `ctx` re-runs on replay against the freshly rebuilt base —\na mutation that passed before a crash can replay as rejected if the permission\nrow changed in between; that is §3.3's intended rebase behavior.","source":"packages/room/src/mutation-tx.ts","line":67,"href":"/reference/typescript/room/mutation-tx/#symbol-RoomMutator"},{"name":"RoomMutatorCtx","originalName":"RoomMutatorCtx","kind":"InterfaceDeclaration","signature":"/** The ambient authorization context a room mutator runs under (managed-writes design\n *  §3.2). Shell-stamped from the connection's DO-verified lease token — NEVER\n *  client-supplied — so per-row/per-field rules checked against it are trustworthy.\n *  The shape deliberately matches the shared-generator drivers' `ctx.user`, so one\n *  registry body runs identically in all three homes (client / api-server / room). */\nexport interface RoomMutatorCtx {\n    /** The authenticated subject (the lease token's `sub`). `\"\"` on replay of an entry\n     *  journaled before the identity plane — treat as unauthenticated. */\n    user: string;\n}","description":"The ambient authorization context a room mutator runs under (managed-writes design\n§3.2). Shell-stamped from the connection's DO-verified lease token — NEVER\nclient-supplied — so per-row/per-field rules checked against it are trustworthy.\nThe shape deliberately matches the shared-generator drivers' `ctx.user`, so one\nregistry body runs identically in all three homes (client / api-server / room).","source":"packages/room/src/mutation-tx.ts","line":55,"href":"/reference/typescript/room/mutation-tx/#symbol-RoomMutatorCtx"},{"name":"TableShape","originalName":"TableShape","kind":"InterfaceDeclaration","signature":"/** One table's positional shape, parsed from the upstream hello. */\nexport interface TableShape {\n    columns: string[];\n    /** Indices into `columns`. */\n    primaryKey: number[];\n}","description":"One table's positional shape, parsed from the upstream hello.","source":"packages/room/src/mutation-tx.ts","line":118,"href":"/reference/typescript/room/mutation-tx/#symbol-TableShape"},{"name":"WireValue","originalName":"WireValue","kind":"TypeAliasDeclaration","signature":"/** A bare wire cell (the client stack's `WireValue`). */\nexport type WireValue = number | string | boolean | null;","description":"A bare wire cell (the client stack's `WireValue`).","source":"packages/room/src/mutation-tx.ts","line":20,"href":"/reference/typescript/room/mutation-tx/#symbol-WireValue"}]},{"name":"@rindle/sql-client","source":"packages/sql-client/src/index.ts","package":"@rindle/sql-client","symbols":[{"name":"BatchOptions","originalName":"BatchOptions","kind":"TypeAliasDeclaration","signature":"export type BatchOptions = ExecuteOptions;","description":"","source":"packages/sql-client/src/types.ts","line":69,"href":"/reference/typescript/sql-client/#symbol-BatchOptions"},{"name":"BatchResult","originalName":"BatchResult","kind":"InterfaceDeclaration","signature":"export interface BatchResult {\n    results: StatementResult[];\n    commitCursor: string | null;\n    routing: RoutingMetadata;\n}","description":"","source":"packages/sql-client/src/types.ts","line":38,"href":"/reference/typescript/sql-client/#symbol-BatchResult"},{"name":"BeginMutationInput","originalName":"BeginMutationInput","kind":"InterfaceDeclaration","signature":"export interface BeginMutationInput extends MutationIdentity {\n    /** A pure-write prefix accumulated before the mutator's first read. */\n    statements?: Statement[];\n    /** Optional first read, coalesced with begin to preserve the mutation fast path. */\n    query?: Statement | string;\n}","description":"","source":"packages/sql-client/src/types.ts","line":103,"href":"/reference/typescript/sql-client/#symbol-BeginMutationInput"},{"name":"BeginMutationResult","originalName":"BeginMutationResult","kind":"TypeAliasDeclaration","signature":"/** Begin-time mid dedup can absorb a replay without opening a transaction; callers must skip the\n *  mutator body in that branch. */\nexport type BeginMutationResult = {\n    absorbed: true;\n    receipt: MutationReceipt;\n} | {\n    absorbed: false;\n    transaction: SqlMutationTransaction;\n    read?: MutationRows;\n};","description":"Begin-time mid dedup can absorb a replay without opening a transaction; callers must skip the\nmutator body in that branch.","source":"packages/sql-client/src/types.ts","line":124,"href":"/reference/typescript/sql-client/#symbol-BeginMutationResult"},{"name":"ClientOptions","originalName":"ClientOptions","kind":"InterfaceDeclaration","signature":"export interface ClientOptions {\n    url: string;\n    authToken: string;\n    consistency?: ReadConsistency;\n    sessionCursor?: string | null;\n    intMode?: IntMode;\n    /** Test/service-binding seam. The default is the runtime's global fetch. */\n    fetch?: Fetch;\n}","description":"","source":"packages/sql-client/src/types.ts","line":142,"href":"/reference/typescript/sql-client/#symbol-ClientOptions"},{"name":"Column","originalName":"Column","kind":"InterfaceDeclaration","signature":"export interface Column {\n    name: string;\n    decltype: string | null;\n}","description":"","source":"packages/sql-client/src/types.ts","line":12,"href":"/reference/typescript/sql-client/#symbol-Column"},{"name":"createSqlClient","originalName":"createSqlClient","kind":"FunctionDeclaration","signature":"export declare function createSqlClient(options: ClientOptions): SqlClient;","description":"","source":"packages/sql-client/src/client.ts","line":1157,"href":"/reference/typescript/sql-client/#symbol-createSqlClient"},{"name":"decodeSqlValue","originalName":"decodeSqlValue","kind":"FunctionDeclaration","signature":"/** Decode one frozen v1 tagged JSON value using the client's integer policy. */\nexport declare function decodeSqlValue(value: unknown, intMode?: IntMode): SqlValue;","description":"Decode one frozen v1 tagged JSON value using the client's integer policy.","source":"packages/sql-client/src/value.ts","line":66,"href":"/reference/typescript/sql-client/#symbol-decodeSqlValue"},{"name":"encodeArgs","originalName":"encodeArgs","kind":"FunctionDeclaration","signature":"export declare function encodeArgs(args: SqlArgs): WireArgs;","description":"","source":"packages/sql-client/src/value.ts","line":94,"href":"/reference/typescript/sql-client/#symbol-encodeArgs"},{"name":"encodeSqlValue","originalName":"encodeSqlValue","kind":"FunctionDeclaration","signature":"/** Encode one public SDK value into the frozen v1 tagged JSON representation. */\nexport declare function encodeSqlValue(value: SqlValue): WireSqlValue;","description":"Encode one public SDK value into the frozen v1 tagged JSON representation.","source":"packages/sql-client/src/value.ts","line":24,"href":"/reference/typescript/sql-client/#symbol-encodeSqlValue"},{"name":"encodeStatement","originalName":"encodeStatement","kind":"FunctionDeclaration","signature":"export declare function encodeStatement(statement: Statement | string): WireStatement;","description":"","source":"packages/sql-client/src/value.ts","line":102,"href":"/reference/typescript/sql-client/#symbol-encodeStatement"},{"name":"ExecuteMutationInput","originalName":"ExecuteMutationInput","kind":"InterfaceDeclaration","signature":"export interface ExecuteMutationInput extends MutationIdentity {\n    /** May be empty: an accepted no-op must still advance lmid and retire the prediction. */\n    statements: Statement[];\n}","description":"","source":"packages/sql-client/src/types.ts","line":98,"href":"/reference/typescript/sql-client/#symbol-ExecuteMutationInput"},{"name":"ExecuteOptions","originalName":"ExecuteOptions","kind":"InterfaceDeclaration","signature":"export interface ExecuteOptions extends OperationOptions {\n    consistency?: ReadConsistency;\n    sessionCursor?: string | null;\n}","description":"","source":"packages/sql-client/src/types.ts","line":64,"href":"/reference/typescript/sql-client/#symbol-ExecuteOptions"},{"name":"ExecuteResult","originalName":"ExecuteResult","kind":"InterfaceDeclaration","signature":"export interface ExecuteResult {\n    result: StatementResult;\n    commitCursor: string | null;\n    routing: RoutingMetadata;\n}","description":"","source":"packages/sql-client/src/types.ts","line":32,"href":"/reference/typescript/sql-client/#symbol-ExecuteResult"},{"name":"Fetch","originalName":"Fetch","kind":"TypeAliasDeclaration","signature":"/** Portable subset of the WHATWG fetch signature used by the client. Keeping the input to the\n *  URL forms we actually emit avoids leaking the DOM-only `RequestInfo` alias into Node/Worker\n *  consumers that compile this package from source. */\nexport type Fetch = (input: string | URL, init?: RequestInit) => Promise<Response>;","description":"Portable subset of the WHATWG fetch signature used by the client. Keeping the input to the\nURL forms we actually emit avoids leaking the DOM-only `RequestInfo` alias into Node/Worker\nconsumers that compile this package from source.","source":"packages/sql-client/src/types.ts","line":140,"href":"/reference/typescript/sql-client/#symbol-Fetch"},{"name":"IntMode","originalName":"IntMode","kind":"TypeAliasDeclaration","signature":"export type IntMode = \"bigint\" | \"number\" | \"string\";","description":"","source":"packages/sql-client/src/types.ts","line":56,"href":"/reference/typescript/sql-client/#symbol-IntMode"},{"name":"isRindleSqlError","originalName":"isRindleSqlError","kind":"FunctionDeclaration","signature":"export declare function isRindleSqlError(error: unknown): error is RindleSqlError;","description":"","source":"packages/sql-client/src/errors.ts","line":41,"href":"/reference/typescript/sql-client/#symbol-isRindleSqlError"},{"name":"MigrationInput","originalName":"MigrationInput","kind":"InterfaceDeclaration","signature":"export interface MigrationInput {\n    id: string;\n    checksum: string;\n    statements: string[];\n}","description":"","source":"packages/sql-client/src/types.ts","line":44,"href":"/reference/typescript/sql-client/#symbol-MigrationInput"},{"name":"MigrationResult","originalName":"MigrationResult","kind":"InterfaceDeclaration","signature":"export interface MigrationResult {\n    applied: boolean;\n    commitCursor: string;\n}","description":"","source":"packages/sql-client/src/types.ts","line":50,"href":"/reference/typescript/sql-client/#symbol-MigrationResult"},{"name":"MutationIdentity","originalName":"MutationIdentity","kind":"InterfaceDeclaration","signature":"/** The optimistic mutation whose effects a mutation-aware SQL transaction commits. `mid` is the\n *  requested mutation id; `lmid` is server-owned state and therefore only appears in receipts. */\nexport interface MutationIdentity {\n    clientId: string;\n    mid: number;\n}","description":"The optimistic mutation whose effects a mutation-aware SQL transaction commits. `mid` is the\nrequested mutation id; `lmid` is server-owned state and therefore only appears in receipts.","source":"packages/sql-client/src/types.ts","line":80,"href":"/reference/typescript/sql-client/#symbol-MutationIdentity"},{"name":"MutationReceipt","originalName":"MutationReceipt","kind":"InterfaceDeclaration","signature":"/** The authoritative outcome of a mutation commit or lmid-only rejection. */\nexport interface MutationReceipt {\n    applied: boolean;\n    lmid: number;\n    commitCursor: string | null;\n}","description":"The authoritative outcome of a mutation commit or lmid-only rejection.","source":"packages/sql-client/src/types.ts","line":86,"href":"/reference/typescript/sql-client/#symbol-MutationReceipt"},{"name":"MutationRows","originalName":"MutationRows","kind":"InterfaceDeclaration","signature":"/** Positional rows returned by a read inside an open mutation transaction. */\nexport interface MutationRows {\n    columns: string[];\n    rows: SqlValue[][];\n}","description":"Positional rows returned by a read inside an open mutation transaction.","source":"packages/sql-client/src/types.ts","line":93,"href":"/reference/typescript/sql-client/#symbol-MutationRows"},{"name":"OperationOptions","originalName":"OperationOptions","kind":"InterfaceDeclaration","signature":"export interface OperationOptions {\n    signal?: AbortSignal;\n}","description":"","source":"packages/sql-client/src/types.ts","line":60,"href":"/reference/typescript/sql-client/#symbol-OperationOptions"},{"name":"ReadConsistency","originalName":"ReadConsistency","kind":"TypeAliasDeclaration","signature":"export type ReadConsistency = \"session\" | \"strong\" | \"eventual\";","description":"","source":"packages/sql-client/src/types.ts","line":55,"href":"/reference/typescript/sql-client/#symbol-ReadConsistency"},{"name":"RejectMutationInput","originalName":"RejectMutationInput","kind":"InterfaceDeclaration","signature":"export interface RejectMutationInput extends MutationIdentity {\n    reason?: string;\n}","description":"","source":"packages/sql-client/src/types.ts","line":110,"href":"/reference/typescript/sql-client/#symbol-RejectMutationInput"},{"name":"RetryOptions","originalName":"RetryOptions","kind":"InterfaceDeclaration","signature":"export interface RetryOptions extends TransactionOptions {\n    /** Total closure attempts, including the first. Defaults to 5. */\n    maxAttempts?: number;\n    /** Initial closure-retry delay. Defaults to 10ms. */\n    baseDelayMs?: number;\n    /** Maximum closure-retry delay. Defaults to 250ms. */\n    maxDelayMs?: number;\n}","description":"","source":"packages/sql-client/src/types.ts","line":128,"href":"/reference/typescript/sql-client/#symbol-RetryOptions"},{"name":"RetryScope","originalName":"RetryScope","kind":"TypeAliasDeclaration","signature":"export type RetryScope = \"request\" | \"transaction\" | \"closure\" | \"never\";","description":"","source":"packages/sql-client/src/types.ts","line":57,"href":"/reference/typescript/sql-client/#symbol-RetryScope"},{"name":"RindleSqlError","originalName":"RindleSqlError","kind":"ClassDeclaration","signature":"/** Stable error surfaced for both server envelopes and client-side contract refusals. */\nexport declare class RindleSqlError extends Error {\n    readonly code: string;\n    readonly sqliteCode: number | undefined;\n    readonly retryScope: RetryScope;\n    readonly transactionState: TransactionState | undefined;\n    readonly status: number | undefined;\n    readonly requestId: string | undefined;\n    readonly statementIndex: number | undefined;\n    readonly partialResults: StatementResult[] | undefined;\n    constructor(options: RindleSqlErrorOptions);\n}","description":"Stable error surfaced for both server envelopes and client-side contract refusals.","source":"packages/sql-client/src/errors.ts","line":17,"href":"/reference/typescript/sql-client/#symbol-RindleSqlError"},{"name":"RoutingMetadata","originalName":"RoutingMetadata","kind":"InterfaceDeclaration","signature":"export interface RoutingMetadata {\n    servedBy: \"master\" | \"follower\" | \"standalone\";\n    appliedLagMs: number | null;\n    fenceFallback: boolean;\n}","description":"","source":"packages/sql-client/src/types.ts","line":26,"href":"/reference/typescript/sql-client/#symbol-RoutingMetadata"},{"name":"SqlArgs","originalName":"SqlArgs","kind":"TypeAliasDeclaration","signature":"export type SqlArgs = readonly SqlValue[] | Readonly<Record<string, SqlValue>>;","description":"","source":"packages/sql-client/src/types.ts","line":4,"href":"/reference/typescript/sql-client/#symbol-SqlArgs"},{"name":"SqlClient","originalName":"SqlClient","kind":"InterfaceDeclaration","signature":"export interface SqlClient extends SqlSession {\n    close(): void;\n}","description":"","source":"packages/sql-client/src/types.ts","line":180,"href":"/reference/typescript/sql-client/#symbol-SqlClient"},{"name":"SqlMutationTransaction","originalName":"SqlMutationTransaction","kind":"InterfaceDeclaration","signature":"export interface SqlMutationTransaction {\n    execute(statement: Statement | string, options?: OperationOptions): Promise<void>;\n    batch(statements: Statement[], options?: OperationOptions): Promise<void>;\n    query(statement: Statement | string, options?: OperationOptions): Promise<MutationRows>;\n    commit(options?: OperationOptions): Promise<MutationReceipt>;\n    rollback(options?: OperationOptions): Promise<void>;\n}","description":"","source":"packages/sql-client/src/types.ts","line":114,"href":"/reference/typescript/sql-client/#symbol-SqlMutationTransaction"},{"name":"SqlSession","originalName":"SqlSession","kind":"InterfaceDeclaration","signature":"export interface SqlSession {\n    execute(statement: Statement | string, options?: ExecuteOptions): Promise<ExecuteResult>;\n    batch(statements: Statement[], options?: BatchOptions): Promise<BatchResult>;\n    begin(options?: TransactionOptions): Promise<SqlTransaction>;\n    withTransaction<T>(fn: (tx: SqlTransaction) => Promise<T>, options?: TransactionOptions): Promise<T>;\n    withTransactionRetry<T>(fn: (tx: SqlTransaction) => Promise<T>, options?: RetryOptions): Promise<T>;\n    /** One-round-trip optimistic mutation commit (effects + lmid in the same atomic unit). */\n    executeMutation(input: ExecuteMutationInput, options?: OperationOptions): Promise<MutationReceipt>;\n    /** Open an interactive optimistic mutation transaction, or absorb a replay before it runs. */\n    beginMutation(input: BeginMutationInput, options?: OperationOptions): Promise<BeginMutationResult>;\n    /** Process a business/pre-flight rejection as an lmid-only commit. */\n    rejectMutation(input: RejectMutationInput, options?: OperationOptions): Promise<MutationReceipt>;\n    executeDdl(sql: string, options?: OperationOptions): Promise<ExecuteResult>;\n    migrate(input: MigrationInput, options?: OperationOptions): Promise<MigrationResult>;\n    executeMultiple(sql: string, options?: OperationOptions): Promise<void>;\n    session(cursor?: string | null): SqlSession;\n    getSessionCursor(): string | null;\n    resetSessionCursor(): void;\n    ping(options?: OperationOptions): Promise<void>;\n}","description":"","source":"packages/sql-client/src/types.ts","line":159,"href":"/reference/typescript/sql-client/#symbol-SqlSession"},{"name":"SqlTransaction","originalName":"SqlTransaction","kind":"InterfaceDeclaration","signature":"export interface SqlTransaction {\n    execute(statement: Statement | string, options?: OperationOptions): Promise<StatementResult>;\n    batch(statements: Statement[], options?: OperationOptions): Promise<StatementResult[]>;\n    commit(options?: OperationOptions): Promise<{\n        commitCursor: string | null;\n    }>;\n    rollback(options?: OperationOptions): Promise<void>;\n}","description":"","source":"packages/sql-client/src/types.ts","line":152,"href":"/reference/typescript/sql-client/#symbol-SqlTransaction"},{"name":"SqlValue","originalName":"SqlValue","kind":"TypeAliasDeclaration","signature":"/** A value accepted by Rindle SQL's v1 client. Binary values are deliberately unsupported. */\nexport type SqlValue = null | string | number | bigint | boolean;","description":"A value accepted by Rindle SQL's v1 client. Binary values are deliberately unsupported.","source":"packages/sql-client/src/types.ts","line":2,"href":"/reference/typescript/sql-client/#symbol-SqlValue"},{"name":"Statement","originalName":"Statement","kind":"InterfaceDeclaration","signature":"export interface Statement {\n    sql: string;\n    args?: SqlArgs;\n    wantRows?: boolean;\n}","description":"","source":"packages/sql-client/src/types.ts","line":6,"href":"/reference/typescript/sql-client/#symbol-Statement"},{"name":"StatementResult","originalName":"StatementResult","kind":"InterfaceDeclaration","signature":"export interface StatementResult {\n    columns: Column[];\n    rows: SqlValue[][];\n    rowsAffected: number;\n    lastInsertRowid: string | null;\n    rowsRead: number | null;\n    rowsWritten: number | null;\n}","description":"","source":"packages/sql-client/src/types.ts","line":17,"href":"/reference/typescript/sql-client/#symbol-StatementResult"},{"name":"TransactionOptions","originalName":"TransactionOptions","kind":"InterfaceDeclaration","signature":"export interface TransactionOptions extends OperationOptions {\n    readOnly?: boolean;\n    isolation?: \"serializable\" | \"snapshot\";\n    consistency?: ReadConsistency;\n    sessionCursor?: string | null;\n}","description":"","source":"packages/sql-client/src/types.ts","line":71,"href":"/reference/typescript/sql-client/#symbol-TransactionOptions"},{"name":"TransactionState","originalName":"TransactionState","kind":"TypeAliasDeclaration","signature":"export type TransactionState = \"open\" | \"closed\" | \"unknown\";","description":"","source":"packages/sql-client/src/types.ts","line":58,"href":"/reference/typescript/sql-client/#symbol-TransactionState"},{"name":"WireArgs","originalName":"WireArgs","kind":"TypeAliasDeclaration","signature":"export type WireArgs = WireSqlValue[] | Record<string, WireSqlValue>;","description":"","source":"packages/sql-client/src/types.ts","line":196,"href":"/reference/typescript/sql-client/#symbol-WireArgs"},{"name":"WireBatchResponse","originalName":"WireBatchResponse","kind":"InterfaceDeclaration","signature":"export interface WireBatchResponse {\n    results: WireStatementResult[];\n    commit_cursor: string | null;\n    routing: WireRoutingMetadata;\n}","description":"","source":"packages/sql-client/src/types.ts","line":230,"href":"/reference/typescript/sql-client/#symbol-WireBatchResponse"},{"name":"WireColumn","originalName":"WireColumn","kind":"InterfaceDeclaration","signature":"export interface WireColumn {\n    name: string;\n    decltype: string | null;\n}","description":"","source":"packages/sql-client/src/types.ts","line":204,"href":"/reference/typescript/sql-client/#symbol-WireColumn"},{"name":"WireExecuteResponse","originalName":"WireExecuteResponse","kind":"InterfaceDeclaration","signature":"export interface WireExecuteResponse {\n    result: WireStatementResult;\n    commit_cursor: string | null;\n    routing: WireRoutingMetadata;\n}","description":"","source":"packages/sql-client/src/types.ts","line":224,"href":"/reference/typescript/sql-client/#symbol-WireExecuteResponse"},{"name":"WireFloat","originalName":"WireFloat","kind":"InterfaceDeclaration","signature":"export interface WireFloat {\n    $rindle: \"float\";\n    value: \"Infinity\" | \"-Infinity\";\n}","description":"","source":"packages/sql-client/src/types.ts","line":190,"href":"/reference/typescript/sql-client/#symbol-WireFloat"},{"name":"WireI64","originalName":"WireI64","kind":"InterfaceDeclaration","signature":"export interface WireI64 {\n    $rindle: \"i64\";\n    value: string;\n}","description":"","source":"packages/sql-client/src/types.ts","line":185,"href":"/reference/typescript/sql-client/#symbol-WireI64"},{"name":"WireRoutingMetadata","originalName":"WireRoutingMetadata","kind":"InterfaceDeclaration","signature":"export interface WireRoutingMetadata {\n    served_by: \"master\" | \"follower\" | \"standalone\";\n    applied_lag_ms: number | null;\n    fence_fallback: boolean;\n}","description":"","source":"packages/sql-client/src/types.ts","line":218,"href":"/reference/typescript/sql-client/#symbol-WireRoutingMetadata"},{"name":"WireSqlValue","originalName":"WireSqlValue","kind":"TypeAliasDeclaration","signature":"export type WireSqlValue = null | string | number | WireI64 | WireFloat;","description":"","source":"packages/sql-client/src/types.ts","line":195,"href":"/reference/typescript/sql-client/#symbol-WireSqlValue"},{"name":"WireStatement","originalName":"WireStatement","kind":"InterfaceDeclaration","signature":"export interface WireStatement {\n    sql: string;\n    args?: WireArgs;\n    want_rows?: boolean;\n}","description":"","source":"packages/sql-client/src/types.ts","line":198,"href":"/reference/typescript/sql-client/#symbol-WireStatement"},{"name":"WireStatementResult","originalName":"WireStatementResult","kind":"InterfaceDeclaration","signature":"export interface WireStatementResult {\n    columns: WireColumn[];\n    rows: WireSqlValue[][];\n    rows_affected: number;\n    last_insert_rowid: string | null;\n    rows_read: number | null;\n    rows_written: number | null;\n}","description":"","source":"packages/sql-client/src/types.ts","line":209,"href":"/reference/typescript/sql-client/#symbol-WireStatementResult"}]},{"name":"@rindle/sql-client/drizzle","source":"packages/sql-client/src/drizzle.ts","package":"@rindle/sql-client","symbols":[{"name":"createDrizzleClient","originalName":"createDrizzleClient","kind":"FunctionDeclaration","signature":"/** Create the structural libSQL-client facade used by drizzle-orm/libsql. */\nexport declare function createDrizzleClient(options: ClientOptions | SqlClient): DrizzleClient;","description":"Create the structural libSQL-client facade used by drizzle-orm/libsql.","source":"packages/sql-client/src/drizzle.ts","line":296,"href":"/reference/typescript/sql-client/drizzle/#symbol-createDrizzleClient"},{"name":"DrizzleArgs","originalName":"DrizzleArgs","kind":"TypeAliasDeclaration","signature":"export type DrizzleArgs = readonly unknown[] | Readonly<Record<string, unknown>>;","description":"","source":"packages/sql-client/src/drizzle.ts","line":41,"href":"/reference/typescript/sql-client/drizzle/#symbol-DrizzleArgs"},{"name":"DrizzleClient","originalName":"DrizzleClient","kind":"InterfaceDeclaration","signature":"export interface DrizzleClient {\n    readonly protocol: string;\n    readonly closed: boolean;\n    execute(statement: DrizzleInputStatement, args?: DrizzleArgs): Promise<DrizzleResultSet>;\n    batch(statements: DrizzleInputStatement[], mode?: DrizzleTransactionMode): Promise<DrizzleResultSet[]>;\n    /** Present for structural Client typing; Drizzle's libSQL migrator is deliberately unsupported. */\n    migrate(statements: DrizzleInputStatement[]): Promise<DrizzleResultSet[]>;\n    transaction(mode?: DrizzleTransactionMode): Promise<DrizzleTransaction>;\n    executeMultiple(sql: string): Promise<void>;\n    /** Embedded-replica sync is deliberately unsupported. */\n    sync(): Promise<never>;\n    reconnect(): void;\n    close(): void;\n    /** Escape hatch for Rindle-specific operations and session-cursor persistence. */\n    readonly rindle: SqlClient;\n}","description":"","source":"packages/sql-client/src/drizzle.ts","line":70,"href":"/reference/typescript/sql-client/drizzle/#symbol-DrizzleClient"},{"name":"DrizzleInputStatement","originalName":"DrizzleInputStatement","kind":"TypeAliasDeclaration","signature":"export type DrizzleInputStatement = string | DrizzleStatement | readonly [\n    sql: string,\n    args?: DrizzleArgs\n];","description":"","source":"packages/sql-client/src/drizzle.ts","line":42,"href":"/reference/typescript/sql-client/drizzle/#symbol-DrizzleInputStatement"},{"name":"DrizzleResultSet","originalName":"DrizzleResultSet","kind":"InterfaceDeclaration","signature":"export interface DrizzleResultSet {\n    columns: string[];\n    columnTypes: string[];\n    rows: DrizzleRow[];\n    rowsAffected: number;\n    lastInsertRowid: bigint | undefined;\n    toJSON(): unknown;\n}","description":"","source":"packages/sql-client/src/drizzle.ts","line":51,"href":"/reference/typescript/sql-client/drizzle/#symbol-DrizzleResultSet"},{"name":"DrizzleRow","originalName":"DrizzleRow","kind":"TypeAliasDeclaration","signature":"export type DrizzleRow = DrizzleValue[] & Record<string, DrizzleValue>;","description":"","source":"packages/sql-client/src/drizzle.ts","line":49,"href":"/reference/typescript/sql-client/drizzle/#symbol-DrizzleRow"},{"name":"DrizzleStatement","originalName":"DrizzleStatement","kind":"InterfaceDeclaration","signature":"/** The small, structural statement shape consumed by drizzle-orm/libsql. */\nexport interface DrizzleStatement {\n    sql: string;\n    args?: DrizzleArgs;\n}","description":"The small, structural statement shape consumed by drizzle-orm/libsql.","source":"packages/sql-client/src/drizzle.ts","line":36,"href":"/reference/typescript/sql-client/drizzle/#symbol-DrizzleStatement"},{"name":"DrizzleTransaction","originalName":"DrizzleTransaction","kind":"InterfaceDeclaration","signature":"export interface DrizzleTransaction {\n    readonly closed: boolean;\n    execute(statement: DrizzleInputStatement): Promise<DrizzleResultSet>;\n    batch(statements: DrizzleInputStatement[]): Promise<DrizzleResultSet[]>;\n    executeMultiple(sql: string): Promise<void>;\n    commit(): Promise<void>;\n    rollback(): Promise<void>;\n    close(): void;\n}","description":"","source":"packages/sql-client/src/drizzle.ts","line":60,"href":"/reference/typescript/sql-client/drizzle/#symbol-DrizzleTransaction"},{"name":"DrizzleTransactionMode","originalName":"DrizzleTransactionMode","kind":"TypeAliasDeclaration","signature":"export type DrizzleTransactionMode = \"write\" | \"read\" | \"deferred\";","description":"","source":"packages/sql-client/src/drizzle.ts","line":43,"href":"/reference/typescript/sql-client/drizzle/#symbol-DrizzleTransactionMode"},{"name":"DrizzleValue","originalName":"DrizzleValue","kind":"TypeAliasDeclaration","signature":"export type DrizzleValue = Exclude<SqlValue, boolean>;","description":"","source":"packages/sql-client/src/drizzle.ts","line":48,"href":"/reference/typescript/sql-client/drizzle/#symbol-DrizzleValue"},{"name":"rindleBigint","originalName":"rindleBigint","kind":"VariableDeclaration","signature":"/**\n * The exact-i64 column for Drizzle schemas (design 226 §7.2). Three promises,\n * lined up with the column contract: generated DDL says `BIGINT` (the opt-in\n * exact int64 declaration), bind/predicate values are JS `bigint`, and selected\n * values infer as JS `bigint`. Drizzle's own `integer()` remains the\n * number/date/boolean surface and still emits `INTEGER` (the safe-range f64\n * plane).\n *\n * Caveat (§7.2): decltype dispatch fires only for **direct column references**.\n * SQLite reports no decltype for expression results, so `max(big_id)` or\n * `big_id + 1` falls into the safe-number arm and is a typed\n * `VALUE_UNSUPPORTED` past the round-trip bound — never a rounded number. For\n * exact expression results, use the native client with `intMode: \"bigint\"`.\n */\nexport declare const rindleBigint: {\n    (): import(\"drizzle-orm/sqlite-core\").SQLiteCustomColumnBuilder<{\n        name: \"\";\n        dataType: \"custom\";\n        columnType: \"SQLiteCustomColumn\";\n        data: bigint;\n        driverParam: bigint;\n        enumValues: undefined;\n    }>;\n    <TConfig extends Record<string, any>>(fieldConfig?: TConfig | undefined): import(\"drizzle-orm/sqlite-core\").SQLiteCustomColumnBuilder<{\n        name: \"\";\n        dataType: \"custom\";\n        columnType: \"SQLiteCustomColumn\";\n        data: bigint;\n        driverParam: bigint;\n        enumValues: undefined;\n    }>;\n    <TName extends string>(dbName: TName, fieldConfig?: unknown): import(\"drizzle-orm/sqlite-core\").SQLiteCustomColumnBuilder<{\n        name: TName;\n        dataType: \"custom\";\n        columnType: \"SQLiteCustomColumn\";\n        data: bigint;\n        driverParam: bigint;\n        enumValues: undefined;\n    }>;\n};","description":"The exact-i64 column for Drizzle schemas (design 226 §7.2). Three promises,\nlined up with the column contract: generated DDL says `BIGINT` (the opt-in\nexact int64 declaration), bind/predicate values are JS `bigint`, and selected\nvalues infer as JS `bigint`. Drizzle's own `integer()` remains the\nnumber/date/boolean surface and still emits `INTEGER` (the safe-range f64\nplane).\n\nCaveat (§7.2): decltype dispatch fires only for **direct column references**.\nSQLite reports no decltype for expression results, so `max(big_id)` or\n`big_id + 1` falls into the safe-number arm and is a typed\n`VALUE_UNSUPPORTED` past the round-trip bound — never a rounded number. For\nexact expression results, use the native client with `intMode: \"bigint\"`.","source":"packages/sql-client/src/drizzle.ts","line":28,"href":"/reference/typescript/sql-client/drizzle/#symbol-rindleBigint"},{"name":"toDrizzleResultSet","originalName":"toDrizzleResultSet","kind":"FunctionDeclaration","signature":"/** Convert Rindle's lossless positional result into libSQL's positional + named hybrid rows. */\nexport declare function toDrizzleResultSet(result: StatementResult): DrizzleResultSet;","description":"Convert Rindle's lossless positional result into libSQL's positional + named hybrid rows.","source":"packages/sql-client/src/drizzle.ts","line":151,"href":"/reference/typescript/sql-client/drizzle/#symbol-toDrizzleResultSet"}]},{"name":"@rindle/tanstack","source":"packages/tanstack/src/index.ts","package":"@rindle/tanstack","symbols":[{"name":"createRindleTanStack","originalName":"createRindleTanStack","kind":"FunctionDeclaration","signature":"/**\n * Bind one Rindle client/server pair to TanStack Router. The returned `loader` is used by routes;\n * `Provider` replaces the app's manual `useMatches()` dehydration merge plus `<RindleSSR>` glue.\n */\nexport declare function createRindleTanStack<S extends ColsMap>(options: RindleTanStackOptions<S>): RindleTanStackIntegration<S>;","description":"Bind one Rindle client/server pair to TanStack Router. The returned `loader` is used by routes;\n`Provider` replaces the app's manual `useMatches()` dehydration merge plus `<RindleSSR>` glue.","source":"packages/tanstack/src/index.ts","line":89,"href":"/reference/typescript/tanstack/#symbol-createRindleTanStack"},{"name":"mergeRindleLoaderData","originalName":"mergeRindleLoaderData","kind":"FunctionDeclaration","signature":"/** Merge the serialized Rindle slice from every matched route. Exported for custom providers/tests. */\nexport declare function mergeRindleLoaderData(loaderData: readonly unknown[]): DehydratedState;","description":"Merge the serialized Rindle slice from every matched route. Exported for custom providers/tests.","source":"packages/tanstack/src/index.ts","line":149,"href":"/reference/typescript/tanstack/#symbol-mergeRindleLoaderData"},{"name":"RINDLE_LOADER_DATA_KEY","originalName":"RINDLE_LOADER_DATA_KEY","kind":"VariableDeclaration","signature":"/** The loader-data field serialized by TanStack Start and consumed by {@link Provider}. */\nexport declare const RINDLE_LOADER_DATA_KEY: \"rindle\";","description":"The loader-data field serialized by TanStack Start and consumed by {@link Provider }.","source":"packages/tanstack/src/index.ts","line":20,"href":"/reference/typescript/tanstack/#symbol-RINDLE_LOADER_DATA_KEY"},{"name":"RindleLoaderContext","originalName":"RindleLoaderContext","kind":"InterfaceDeclaration","signature":"/** The stable subset of TanStack's loader context exposed to route query factories. TanStack passes\n *  a richer object at runtime; keeping this structural avoids coupling the adapter to a generated\n *  router's route-tree generics while still contextually typing the common fields. */\nexport interface RindleLoaderContext {\n    abortController: AbortController;\n    preload: boolean;\n    params: Record<string, string>;\n    deps: Record<string, unknown>;\n    context: unknown;\n    location: unknown;\n    cause: \"preload\" | \"enter\" | \"stay\";\n}","description":"The stable subset of TanStack's loader context exposed to route query factories. TanStack passes\na richer object at runtime; keeping this structural avoids coupling the adapter to a generated\nrouter's route-tree generics while still contextually typing the common fields.","source":"packages/tanstack/src/index.ts","line":25,"href":"/reference/typescript/tanstack/#symbol-RindleLoaderContext"},{"name":"RindleLoaderData","originalName":"RindleLoaderData","kind":"InterfaceDeclaration","signature":"export interface RindleLoaderData {\n    rindle: DehydratedState;\n}","description":"","source":"packages/tanstack/src/index.ts","line":35,"href":"/reference/typescript/tanstack/#symbol-RindleLoaderData"},{"name":"RindleProviderProps","originalName":"RindleProviderProps","kind":"InterfaceDeclaration","signature":"export interface RindleProviderProps {\n    children?: ReactNode;\n}","description":"","source":"packages/tanstack/src/index.ts","line":74,"href":"/reference/typescript/tanstack/#symbol-RindleProviderProps"},{"name":"RindleRouteLoader","originalName":"RindleRouteLoader","kind":"InterfaceDeclaration","signature":"export interface RindleRouteLoader<Context extends RindleLoaderContext = RindleLoaderContext> {\n    handler(context: Context): Promise<RindleLoaderData>;\n    /** Re-entry must not commit a stale match while its Rindle query is being warmed. */\n    staleReloadMode: \"blocking\";\n}","description":"","source":"packages/tanstack/src/index.ts","line":68,"href":"/reference/typescript/tanstack/#symbol-RindleRouteLoader"},{"name":"RindleRouteLoaderOptions","originalName":"RindleRouteLoaderOptions","kind":"InterfaceDeclaration","signature":"export interface RindleRouteLoaderOptions<Context extends RindleLoaderContext = RindleLoaderContext> {\n    /** Query (or queries) that blocks client route entry and is always included in the SSR seed. */\n    query?: (context: Context) => QueryList;\n    /** Additional queries needed for SSR first paint but not worth blocking client navigation on. */\n    ssr?: (context: Context) => QueryList;\n    /** Client readiness policy for `query`. Defaults to local-first `present`; set `complete` when\n     *  route entry must wait for a server-authoritative result. */\n    until?: EnsureQueryUntil;\n}","description":"","source":"packages/tanstack/src/index.ts","line":58,"href":"/reference/typescript/tanstack/#symbol-RindleRouteLoaderOptions"},{"name":"RindleTanStackClient","originalName":"RindleTanStackClient","kind":"InterfaceDeclaration","signature":"export interface RindleTanStackClient<S extends ColsMap> extends QueryEnsurer {\n    store: Store<S>;\n}","description":"","source":"packages/tanstack/src/index.ts","line":39,"href":"/reference/typescript/tanstack/#symbol-RindleTanStackClient"},{"name":"RindleTanStackIntegration","originalName":"RindleTanStackIntegration","kind":"InterfaceDeclaration","signature":"export interface RindleTanStackIntegration<S extends ColsMap> {\n    loader<Context extends RindleLoaderContext = RindleLoaderContext>(options: RindleRouteLoaderOptions<Context>): RindleRouteLoader<Context>;\n    Provider(props: RindleProviderProps): ReturnType<typeof createElement>;\n}","description":"","source":"packages/tanstack/src/index.ts","line":78,"href":"/reference/typescript/tanstack/#symbol-RindleTanStackIntegration"},{"name":"RindleTanStackOptions","originalName":"RindleTanStackOptions","kind":"InterfaceDeclaration","signature":"export interface RindleTanStackOptions<S extends ColsMap> {\n    schema: Schema<S>;\n    /** Browser-only lazy client boot. The adapter calls it at most once and shares that client\n     *  between route loaders and the provider. It is never called during SSR. */\n    boot: () => Promise<RindleTanStackClient<S>>;\n    /** Server-side named-query preload. A dynamic implementation keeps server authority code out of\n     *  the browser bundle; the full loader context is forwarded for request-scoped auth/policy. */\n    preload: (queries: readonly AnyQuery[], context: RindleLoaderContext) => Promise<DehydratedState>;\n}","description":"","source":"packages/tanstack/src/index.ts","line":43,"href":"/reference/typescript/tanstack/#symbol-RindleTanStackOptions"}]},{"name":"@rindle/wasm","source":"packages/wasm/src/index.ts","package":"@rindle/wasm","symbols":[{"name":"Aggregate","originalName":"Aggregate","kind":"TypeAliasDeclaration","signature":"/** An aggregate over a (correlated) subquery's rows (`REDUCE-DESIGN.md`). v1: `count(*)`.\n *  Set on a `related` subquery (`Ast.aggregate`), it marks that relationship a count\n *  aggregate the builder lowers to a scalar-projected singular relationship (§9). */\nexport type Aggregate = \"count\";","description":"An aggregate over a (correlated) subquery's rows (`REDUCE-DESIGN.md`). v1: `count(*)`.\nSet on a `related` subquery (`Ast.aggregate`), it marks that relationship a count\naggregate the builder lowers to a scalar-projected singular relationship (§9).","source":"packages/client/src/ast.ts","line":67,"href":"/reference/typescript/wasm/#symbol-Aggregate"},{"name":"and","originalName":"and","kind":"FunctionDeclaration","signature":"/** All children must hold. */\nexport declare function and<R>(...conds: Cond<R>[]): Cond<R>;","description":"All children must hold.","source":"packages/client/src/operators.ts","line":66,"href":"/reference/typescript/wasm/#symbol-and"},{"name":"AnyCols","originalName":"AnyCols","kind":"TypeAliasDeclaration","signature":"export type AnyCols = Record<string, Col<unknown>>;","description":"","source":"packages/client/src/schema.ts","line":27,"href":"/reference/typescript/wasm/#symbol-AnyCols"},{"name":"AnyQuery","originalName":"AnyQuery","kind":"TypeAliasDeclaration","signature":"export type AnyQuery = Query<any, any, any, any, any, any>;","description":"","source":"packages/client/src/query.ts","line":308,"href":"/reference/typescript/wasm/#symbol-AnyQuery"},{"name":"AnyRelationship","originalName":"AnyRelationship","kind":"TypeAliasDeclaration","signature":"/** Any relationship, for positions that only read its correlation / child table. */\nexport type AnyRelationship = Relationship<AnyCols, AnyCols>;","description":"Any relationship, for positions that only read its correlation / child table.","source":"packages/client/src/schema.ts","line":469,"href":"/reference/typescript/wasm/#symbol-AnyRelationship"},{"name":"AnyTable","originalName":"AnyTable","kind":"TypeAliasDeclaration","signature":"export type AnyTable = TableLike<AnyCols>;","description":"","source":"packages/client/src/schema.ts","line":102,"href":"/reference/typescript/wasm/#symbol-AnyTable"},{"name":"Arg","originalName":"Arg","kind":"TypeAliasDeclaration","signature":"/** A field argument: its typed predicate, or a bare value (bare = `eq` sugar). */\nexport type Arg<V> = Pred<V> | V;","description":"A field argument: its typed predicate, or a bare value (bare = `eq` sugar).","source":"packages/client/src/operators.ts","line":47,"href":"/reference/typescript/wasm/#symbol-Arg"},{"name":"ArgSchema","originalName":"ArgSchema","kind":"InterfaceDeclaration","signature":"/** The minimal arg validator a shared mutator can carry so the SERVER can parse UNTRUSTED wire args\n *  before driving it (the client trusts its typed callsites and never calls this). Structural on\n *  purpose — a zod schema satisfies it as-is — so `@rindle/client` stays validator-library-agnostic. */\nexport interface ArgSchema<Args> {\n    parse(raw: unknown): Args;\n}","description":"The minimal arg validator a shared mutator can carry so the SERVER can parse UNTRUSTED wire args\nbefore driving it (the client trusts its typed callsites and never calls this). Structural on\npurpose — a zod schema satisfies it as-is — so `@rindle/client` stays validator-library-agnostic.","source":"packages/client/src/mutation-ops.ts","line":161,"href":"/reference/typescript/wasm/#symbol-ArgSchema"},{"name":"ArrayView","originalName":"ArrayView","kind":"InterfaceDeclaration","signature":"/** The public ArrayView contract `materialize()` returns. */\nexport interface ArrayView<R> {\n    /** The current materialized result (reference-stable where data is unchanged). */\n    readonly data: readonly R[];\n    /** The engine query id the Store assigned this view (1:1 with the view). The same `qid` the raw\n     *  change stream ({@link Store.subscribeChanges}) tags each frame with, so a consumer can\n     *  correlate this query with its `ChangeEvent`s (e.g. to bind a narrator) straight off\n     *  `materialize(query).qid` — no separate handle needed. */\n    readonly qid: QueryId;\n    /** The query's view `WireSchema` (the position→name source for {@link resolveChange}), captured\n     *  from its `hello` frame. `null` while PENDING — a remote backend's `hello` arrives async; an\n     *  in-process backend (wasm/replica) populates it synchronously during `materialize`. */\n    readonly schema: WireSchema | null;\n    /** The query's SERVER-CHANNEL state (`unknown` while loading, `complete` once server-authoritative;\n     *  the `error` variant is reserved and currently unproduced). A pending optimistic mutation no\n     *  longer moves this — it is a separate axis (FOLDED-MUTATIONS-DESIGN §7). `complete` for backends\n     *  with no server lifecycle. Changes notify subscribers. */\n    readonly resultType: ResultType;\n    /** Subscribe; fires immediately with the current data, then after each applied batch (and after\n     *  a {@link resultType} change — re-read `resultType` in the listener). */\n    subscribe(listener: (data: readonly R[]) => void): () => void;\n    /** Subscribe to this view's folded CHANGE stream — the `FlatChange[]` it applies, NET of no-op\n     *  cycles (a rebase's balanced `remove`+`add` / edit round-trip cancels, so a correctly predicted\n     *  optimistic write delivers nothing here). Carries the diff {@link subscribe} throws away; the\n     *  per-view seam a narrator rides. Does NOT replay on subscribe — attach via\n     *  `store.materialize(query, { onChanges })` to catch a synchronous backend's first snapshot.\n     *  A view with any change listener also enriches its own `remove` ops with the evicted subtree\n     *  (per-view, no global opt-in). Returns a detach function. */\n    onChanges(listener: ViewChangeListener): () => void;\n    /** Tear down + stop receiving updates. */\n    destroy(): void;\n}","description":"The public ArrayView contract `materialize()` returns.","source":"packages/client/src/view.ts","line":33,"href":"/reference/typescript/wasm/#symbol-ArrayView"},{"name":"AssembledNode","originalName":"AssembledNode","kind":"InterfaceDeclaration","signature":"/** A single assembled (nested-by-name) row from `POST /query` (SSR-DESIGN.md §3.3): the cells\n *  under `cols`, each in-view relationship inlined by its alias (a nested array / object, or a\n *  scalar for a `countAs` aggregate). {@link Store.assembleSnapshot} converts these to the\n *  view's projected result shape. */\nexport interface AssembledNode {\n    cols: Record<string, WireValue>;\n    [rel: string]: unknown;\n}","description":"A single assembled (nested-by-name) row from `POST /query` (SSR-DESIGN.md §3.3): the cells\nunder `cols`, each in-view relationship inlined by its alias (a nested array / object, or a\nscalar for a `countAs` aggregate). {@link Store.assembleSnapshot} converts these to the\nview's projected result shape.","source":"packages/client/src/store.ts","line":33,"href":"/reference/typescript/wasm/#symbol-AssembledNode"},{"name":"assembleDurableText","originalName":"assembleDurableText","kind":"FunctionDeclaration","signature":"/**\n * The durable half of the splice for the mapped-table layout: the compacted `body` followed by\n * whatever chunk rows have not been folded into it yet.\n *\n * Chunks are ALWAYS the suffix after `body` — the closing checkpoint rewrites `body` and drops the\n * chunks it absorbed in ONE transaction — so a reader never observes a torn state where a chunk both\n * is and is not in the body.\n */\nexport declare function assembleDurableText(message: {\n    body?: string | null;\n} | null | undefined, chunks?: ReadonlyArray<{\n    seq: number;\n    text: string;\n}>): string;","description":"The durable half of the splice for the mapped-table layout: the compacted `body` followed by\nwhatever chunk rows have not been folded into it yet.\n\nChunks are ALWAYS the suffix after `body` — the closing checkpoint rewrites `body` and drops the\nchunks it absorbed in ONE transaction — so a reader never observes a torn state where a chunk both\nis and is not in the body.","source":"packages/client/src/stream.ts","line":87,"href":"/reference/typescript/wasm/#symbol-assembleDurableText"},{"name":"assertNoLocalTables","originalName":"assertNoLocalTables","kind":"FunctionDeclaration","signature":"/** Throw if `ast` references a local-only table ANYWHERE — the complete form of the {@link queries}\n *  root guard (Q1 / E3 client half). The root proxy `get` only sees the table accessed off the\n *  builder root; a local table reached through a relationship / `sub` / `countAs` / `exists` CHILD is\n *  passed as a value and never touches the proxy, so it is caught here instead: at `.ast()` for a\n *  server-scope builder, and again as an SSR backstop in `ServerStore.preload`. A server/named query\n *  may never name a local table (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5). */\nexport declare function assertNoLocalTables<S extends ColsMap>(ast: Ast, schema: Schema<S>): void;","description":"Throw if `ast` references a local-only table ANYWHERE — the complete form of the {@link queries}\nroot guard (Q1 / E3 client half). The root proxy `get` only sees the table accessed off the\nbuilder root; a local table reached through a relationship / `sub` / `countAs` / `exists` CHILD is\npassed as a value and never touches the proxy, so it is caught here instead: at `.ast()` for a\nserver-scope builder, and again as an SSR backstop in `ServerStore.preload`. A server/named query\nmay never name a local table (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5).","source":"packages/client/src/query.ts","line":845,"href":"/reference/typescript/wasm/#symbol-assertNoLocalTables"},{"name":"Ast","originalName":"Ast","kind":"InterfaceDeclaration","signature":"/** The query AST. `table` is the only required field; the builder omits empty/false fields\n *  (matching the Rust `skip_serializing_if`), which the deserializer treats as absent. */\nexport interface Ast {\n    table: string;\n    alias?: string;\n    /** Projection (PROJECTION-SUPPORT-DESIGN.md §6). Absent ⇒ select all columns; present ⇒\n     *  project to just these (drives what syncs + what the view reports). Serializes only when\n     *  set, matching the Rust `Ast.select`'s `skip_serializing_if`. */\n    select?: string[];\n    where?: Condition;\n    related?: CorrelatedSubquery[];\n    start?: Bound;\n    limit?: number;\n    one?: boolean;\n    /** Aggregate this (sub)query's rows instead of materializing them (`REDUCE-DESIGN.md`\n     *  §9). `count` on a `related` subquery surfaces a scalar `commentCount` field; the\n     *  builder lowers it to a scalar-projected singular relationship. Absent ⇒ ordinary rows. */\n    aggregate?: Aggregate;\n    /** The {@link Ast.aggregate} value is **precomputed** — supplied as rows of a (synthetic)\n     *  source table rather than reduced from child rows. Set by the normalized client's AST\n     *  rewrite (`AGGREGATE-SYNC-DESIGN.md` §3.3) so the local engine reads the server's count\n     *  with a plain singular join + the same projection instead of a `reduce`. Only meaningful\n     *  with `aggregate`; absent ⇒ `false`. */\n    aggregatePrecomputed?: boolean;\n    /** Top-level `GROUP BY` columns (names), meaningful only alongside a root {@link Ast.aggregate}\n     *  (`REDUCE-DESIGN.md` §8). Empty + `aggregate` set ⇒ a **global** aggregate (one `[count]` row);\n     *  non-empty ⇒ one `[group…, count]` row per distinct value-tuple. Distinct from a relationship\n     *  aggregate's implicit grouping (the correlation child key). Absent on the wire ⇒ empty. */\n    groupBy?: string[];\n    /** `HAVING` — a filter over the **post-aggregation** rows of a root {@link Ast.aggregate}\n     *  (`REDUCE-DESIGN.md` §4: a filter directly above the `reduce`). Its condition addresses the\n     *  aggregate's *output* columns — the {@link Ast.groupBy} columns and the synthetic `count`\n     *  column — not base-table columns (those go in {@link Ast.where}, which filters rows *below* the\n     *  reduce). Absent ⇒ no post-aggregation filter. */\n    having?: Condition;\n    orderBy?: OrderPart[];\n}","description":"The query AST. `table` is the only required field; the builder omits empty/false fields\n(matching the Rust `skip_serializing_if`), which the deserializer treats as absent.","source":"packages/client/src/ast.ts","line":71,"href":"/reference/typescript/wasm/#symbol-Ast"},{"name":"AsyncEffectExec","originalName":"AsyncEffectExec","kind":"InterfaceDeclaration","signature":"/** A tier's ASYNCHRONOUS effect executor (the server transaction): every op is a Promise. */\nexport interface AsyncEffectExec {\n    apply(op: MutationOp): Promise<void>;\n    read(table: string, pk: KeyedRow): Promise<KeyedRow | undefined>;\n    query(q: QueryArg): Promise<QueryResultRow[]>;\n}","description":"A tier's ASYNCHRONOUS effect executor (the server transaction): every op is a Promise.","source":"packages/client/src/mutation-ops.ts","line":247,"href":"/reference/typescript/wasm/#symbol-AsyncEffectExec"},{"name":"Backend","originalName":"Backend","kind":"InterfaceDeclaration","signature":"/**\n * The seam the core talks to. Backend-agnostic: the same interface for the in-process\n * WASM backend and a remote (network) backend. The core never knows which. A backend\n * pushes a per-query {@link ChangeEvent} stream via {@link Backend.onEvent}; the remote\n * backend additionally owns the epoch/seq/gap protocol and emits only clean, in-order\n * events (so the ArrayView never sees the wire protocol).\n */\nexport interface Backend {\n    registerQuery(queryId: QueryId, ast: unknown, remote?: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Optional split path for local-first backends: retain/release a named remote footprint\n     *  without creating another local materialized view. `localQueryId`, when provided, names\n     *  the local AST view this remote footprint feeds. `ast`, when provided, gives the backend\n     *  the local schema context for sync-only retains that still need aggregate/table setup. */\n    retainRemoteQuery?(queryId: QueryId, remote: RemoteQuery, localQueryId?: QueryId, ast?: Ast): void;\n    releaseRemoteQuery?(queryId: QueryId): void;\n    /** Local: applies now (changes flow back on the stream). Remote: sends to the server. */\n    mutate(mutations: Mutation[]): Promise<void>;\n    /** Optional DIRECT-COMMIT path for LOCAL-only tables (`201-LOCAL-ONLY-TABLES-DESIGN.md` §6):\n     *  applies the writes straight to the engine, OUTSIDE the optimistic pending stack (a local\n     *  table is untracked, so it never rebases). The backend rejects any synced/tracked table (M2).\n     *  Backends with no local-table support (a plain remote sync backend) omit it.\n     *\n     *  `onCommitted` (207 §5.1) runs after the engine commit is applied but BEFORE subscriber\n     *  delivery: a subscriber throwing during delivery re-raises out of this call, and a caller\n     *  that must stay coherent with the engine (the persistence tap) cannot tell that throw from\n     *  a pre-commit rejection — the callback can, because it fires exactly when the commit is in. */\n    writeLocal?(mutations: Mutation[], onCommitted?: () => void): void;\n    onEvent(handler: (queryId: QueryId, event: ChangeEvent) => void): void;\n    /** Optional: the backend pushes per-query {@link ResultType} changes here and the core routes\n     *  each to the matching view (so `view.resultType` tracks it). Backends with no lifecycle (the\n     *  in-process engine) omit it and every view stays `complete`. */\n    onResultType?(handler: (queryId: QueryId, resultType: ResultType) => void): void;\n    /** Optional: brackets one commit's coherent multi-query delivery so the Store can fold every\n     *  affected view BEFORE notifying any subscriber — cross-view-atomic notification. The\n     *  in-process engine derives the whole commit's per-query deltas against one consistent post-\n     *  commit snapshot, then dispatches them one query at a time; without a barrier a subscriber on\n     *  the first-dispatched view, re-reading a sibling view in its callback, would observe that\n     *  sibling's PRE-commit state (it has not folded yet). The backend calls the handler with\n     *  `\"begin\"` before delivering a commit's per-query `batch` events (via {@link onEvent}) and\n     *  `\"end\"` after the last one; between them the Store folds each view but DEFERS its\n     *  notification, firing every affected view's subscribers together at `\"end\"`. Backends with no\n     *  synchronous multi-query commit boundary (a plain remote backend, where each query's frame\n     *  arrives in its own message) omit it — the Store then notifies per event, exactly as before. */\n    onCommitBoundary?(handler: (phase: \"begin\" | \"end\") => void): void;\n    /** Optional dev-only authoritative server stream tap. It is additive, like\n     *  `Store.subscribeChanges`, and must not displace the backend's normal event handler. */\n    __attachDevtoolsServerDeltas?(observer: BackendDevObserver): () => void;\n}","description":"The seam the core talks to. Backend-agnostic: the same interface for the in-process\nWASM backend and a remote (network) backend. The core never knows which. A backend\npushes a per-query {@link ChangeEvent} stream via {@link Backend.onEvent}; the remote\nbackend additionally owns the epoch/seq/gap protocol and emits only clean, in-order\nevents (so the ArrayView never sees the wire protocol).","source":"packages/client/src/types.ts","line":171,"href":"/reference/typescript/wasm/#symbol-Backend"},{"name":"BackendDevObserver","originalName":"BackendDevObserver","kind":"InterfaceDeclaration","signature":"/** Dev-only passive tap over a backend's authoritative server stream. Optional because in-process\n *  backends have no server stream, and older/custom backends may only expose the Store tap. */\nexport interface BackendDevObserver {\n    onServerDelta?(qid: QueryId, ev: BackendServerDelta): void;\n}","description":"Dev-only passive tap over a backend's authoritative server stream. Optional because in-process\nbackends have no server stream, and older/custom backends may only expose the Store tap.","source":"packages/client/src/types.ts","line":140,"href":"/reference/typescript/wasm/#symbol-BackendDevObserver"},{"name":"BackendServerDelta","originalName":"BackendServerDelta","kind":"TypeAliasDeclaration","signature":"/** A dev-only authoritative server delta exposed by backends that can distinguish the upstream\n *  server stream from their local view/IVM stream. Flat remote backends surface clean\n *  {@link ChangeEvent}s; local-first normalized/optimistic backends surface the path-free\n *  {@link NormalizedEvent}s before they are folded into the local engine. */\nexport type BackendServerDelta = {\n    format: \"flat\";\n    event: ChangeEvent;\n} | {\n    format: \"normalized\";\n    event: NormalizedEvent;\n};","description":"A dev-only authoritative server delta exposed by backends that can distinguish the upstream\nserver stream from their local view/IVM stream. Flat remote backends surface clean\n{@link ChangeEvent}s; local-first normalized/optimistic backends surface the path-free\n{@link NormalizedEvent}s before they are folded into the local engine.","source":"packages/client/src/types.ts","line":134,"href":"/reference/typescript/wasm/#symbol-BackendServerDelta"},{"name":"BatchEffect","originalName":"BatchEffect","kind":"TypeAliasDeclaration","signature":"/** A fan-out a generator mutator yields: run several effects \"together\". The server driver resolves\n *  them with `Promise.all`; the client driver runs them in array order (already synchronous). Results\n *  return in the same order on both tiers. Each result has its effect's shape: a row, query rows,\n *  `undefined` for a write, or an array for a nested batch. Cast the yielded result to that shape;\n *  the generator's declared next-type covers only point reads. */\nexport type BatchEffect = {\n    kind: \"all\";\n    effects: readonly YieldEffect[];\n};","description":"A fan-out a generator mutator yields: run several effects \"together\". The server driver resolves\nthem with `Promise.all`; the client driver runs them in array order (already synchronous). Results\nreturn in the same order on both tiers. Each result has its effect's shape: a row, query rows,\n`undefined` for a write, or an array for a nested batch. Cast the yielded result to that shape;\nthe generator's declared next-type covers only point reads.","source":"packages/client/src/mutation-ops.ts","line":72,"href":"/reference/typescript/wasm/#symbol-BatchEffect"},{"name":"boolean","originalName":"boolean","kind":"VariableDeclaration","signature":"export declare const boolean: () => ColBuilder<boolean>;","description":"","source":"packages/client/src/schema.ts","line":48,"href":"/reference/typescript/wasm/#symbol-boolean"},{"name":"Bound","originalName":"Bound","kind":"InterfaceDeclaration","signature":"/** A paging lower bound (`Bound`, `src/ast.rs`). `row` is a *partial* wire row — the bound\n *  columns by name (only the sort columns are read by the engine's `Skip` comparator).\n *  `exclusive` ⇒ start *after* the bound row (`Basis::After`); else *at* it (`Basis::At`). */\nexport interface Bound {\n    row: Record<string, LitValue>;\n    exclusive: boolean;\n}","description":"A paging lower bound (`Bound`, `src/ast.rs`). `row` is a *partial* wire row — the bound\ncolumns by name (only the sort columns are read by the engine's `Skip` comparator).\n`exclusive` ⇒ start *after* the bound row (`Basis::After`); else *at* it (`Basis::At`).","source":"packages/client/src/ast.ts","line":53,"href":"/reference/typescript/wasm/#symbol-Bound"},{"name":"CachedQueryView","originalName":"CachedQueryView","kind":"InterfaceDeclaration","signature":"export interface CachedQueryView<Q extends Query<any, any, any>> {\n    readonly view: ReturnType<Q[\"materialize\"]>;\n    /** Retain this query's named remote footprint and release it later. Ad-hoc local queries\n     *  return a no-op release function. */\n    retain(query: Q): () => void;\n    destroy(): void;\n}","description":"","source":"packages/client/src/store.ts","line":50,"href":"/reference/typescript/wasm/#symbol-CachedQueryView"},{"name":"ChangeEvent","originalName":"ChangeEvent","kind":"TypeAliasDeclaration","signature":"/**\n * What a {@link Backend} pushes per query: the handshake (`hello`), the (possibly\n * chunked) hydrate `snapshot`, then incremental `batch`es. The core builds an ArrayView\n * on `hello`, hydrates on `snapshot`, folds on `batch` — identically for any backend.\n */\nexport type ChangeEvent = {\n    type: \"hello\";\n    schema: WireSchema;\n    comparatorVersion: number;\n} | {\n    type: \"snapshot\";\n    adds: FlatChange[];\n    last: boolean;\n} | {\n    type: \"batch\";\n    events: FlatChange[];\n    catchUp?: boolean;\n};","description":"What a {@link Backend} pushes per query: the handshake (`hello`), the (possibly\nchunked) hydrate `snapshot`, then incremental `batch`es. The core builds an ArrayView\non `hello`, hydrates on `snapshot`, folds on `batch` — identically for any backend.","source":"packages/client/src/types.ts","line":79,"href":"/reference/typescript/wasm/#symbol-ChangeEvent"},{"name":"ChangePhase","originalName":"ChangePhase","kind":"TypeAliasDeclaration","signature":"/** The phase of an {@link ArrayView.onChanges} delivery: the initial hydrate `snapshot` vs a later\n *  incremental `batch` — the same distinction a narrator draws (`ChangeEvent` `snapshot`/`batch`). */\nexport type ChangePhase = \"snapshot\" | \"batch\";","description":"The phase of an {@link ArrayView.onChanges} delivery: the initial hydrate `snapshot` vs a later\nincremental `batch` — the same distinction a narrator draws (`ChangeEvent` `snapshot`/`batch`).","source":"packages/client/src/view.ts","line":23,"href":"/reference/typescript/wasm/#symbol-ChangePhase"},{"name":"CLIENT_MUTATIONS_SCHEMA","originalName":"CLIENT_MUTATIONS_SCHEMA","kind":"VariableDeclaration","signature":"/** The system table's wire schema — appended to the client's expected schemas so the\n *  lmid query's `hello` passes CRIT#4 validation. */\nexport declare const CLIENT_MUTATIONS_SCHEMA: NormalizedTableSchema;","description":"The system table's wire schema — appended to the client's expected schemas so the\nlmid query's `hello` passes CRIT#4 validation.","source":"packages/client/src/types.ts","line":291,"href":"/reference/typescript/wasm/#symbol-CLIENT_MUTATIONS_SCHEMA"},{"name":"CLIENT_MUTATIONS_TABLE","originalName":"CLIENT_MUTATIONS_TABLE","kind":"VariableDeclaration","signature":"/** The replicated bookkeeping table carrying each client's high-water mutation id\n *  (`lmid`). Engine-hosted and served like any base table; reserved (never part of a\n *  user schema). Columns: `[client_id, last_mutation_id]`, PK `client_id`. */\nexport declare const CLIENT_MUTATIONS_TABLE = \"_rindle_client_mutations\";","description":"The replicated bookkeeping table carrying each client's high-water mutation id\n(`lmid`). Engine-hosted and served like any base table; reserved (never part of a\nuser schema). Columns: `[client_id, last_mutation_id]`, PK `client_id`.","source":"packages/client/src/types.ts","line":282,"href":"/reference/typescript/wasm/#symbol-CLIENT_MUTATIONS_TABLE"},{"name":"Col","originalName":"Col","kind":"InterfaceDeclaration","signature":"/** A column descriptor. `type` drives the comparator + JSON parsing; `__t` is a phantom. A\n *  nullable column is a `Col<T | null>` — that is the ONLY thing nullability changes at the type\n *  level, so `RowOf` (and the field-condition factory) widen automatically.\n *\n *  `optional` is the runtime companion of that phantom: set by {@link ColBuilder.nullable}, it is\n *  what the write funnels read to make a nullable column omittable from an insert (filled with\n *  `null`, design 206 §6.2). It mirrors the engine's `ColumnDef.optional`\n *  (`pragma_table_info.notnull == 0`); absent ⇒ `NOT NULL` / required. */\nexport interface Col<T> {\n    readonly type: ColType;\n    readonly optional?: boolean;\n    readonly __t?: T;\n}","description":"A column descriptor. `type` drives the comparator + JSON parsing; `__t` is a phantom. A\nnullable column is a `Col<T | null>` — that is the ONLY thing nullability changes at the type\nlevel, so `RowOf` (and the field-condition factory) widen automatically.\n\n`optional` is the runtime companion of that phantom: set by {@link ColBuilder.nullable}, it is\nwhat the write funnels read to make a nullable column omittable from an insert (filled with\n`null`, design 206 §6.2). It mirrors the engine's `ColumnDef.optional`\n(`pragma_table_info.notnull == 0`); absent ⇒ `NOT NULL` / required.","source":"packages/client/src/schema.ts","line":21,"href":"/reference/typescript/wasm/#symbol-Col"},{"name":"ColBuilder","originalName":"ColBuilder","kind":"InterfaceDeclaration","signature":"/** The chainable form returned by the column factories: a {@link Col} plus `.nullable()`.\n *\n *  `.nullable()` widens the column's value type to `T | null` — its `Row<…>` field becomes\n *  `T | null` — and sets the runtime {@link Col.optional} marker so it may be omitted from an insert\n *  (design 206 §6.2). `rindle schema gen` emits `.nullable()` for every nullable (non-`NOT NULL`) SQL\n *  column; you can also call it by hand on a local-only table's columns. It is idempotent and stays\n *  chainable. */\nexport interface ColBuilder<T> extends Col<T> {\n    nullable(): ColBuilder<T | null>;\n}","description":"The chainable form returned by the column factories: a {@link Col} plus `.nullable()`.\n\n`.nullable()` widens the column's value type to `T | null` — its `Row<…>` field becomes\n`T | null` — and sets the runtime {@link Col.optional} marker so it may be omitted from an insert\n(design 206 §6.2). `rindle schema gen` emits `.nullable()` for every nullable (non-`NOT NULL`) SQL\ncolumn; you can also call it by hand on a local-only table's columns. It is idempotent and stays\nchainable.","source":"packages/client/src/schema.ts","line":37,"href":"/reference/typescript/wasm/#symbol-ColBuilder"},{"name":"ColRefinements","originalName":"ColRefinements","kind":"TypeAliasDeclaration","signature":"/** Per-column narrowings for {@link refineTable}: each entry must keep the column's kind and narrow\n *  its TS type (`Col<T2>` with `T2 extends T`) — `json<Meta>()` on a json column, a literal-union\n *  `string<\"a\" | \"b\">()` on a string column. Kind changes are rejected (cross-kind at compile time,\n *  same-phantom kind flips like `string()` on a json column at runtime). */\nexport type ColRefinements<C extends AnyCols> = {\n    readonly [K in keyof C]?: Col<ColT<C[K]>>;\n};","description":"Per-column narrowings for {@link refineTable}: each entry must keep the column's kind and narrow\nits TS type (`Col<T2>` with `T2 extends T`) — `json<Meta>()` on a json column, a literal-union\n`string<\"a\" | \"b\">()` on a string column. Kind changes are rejected (cross-kind at compile time,\nsame-phantom kind flips like `string()` on a json column at runtime).","source":"packages/client/src/schema.ts","line":303,"href":"/reference/typescript/wasm/#symbol-ColRefinements"},{"name":"ColsMap","originalName":"ColsMap","kind":"TypeAliasDeclaration","signature":"/** name → columns, the resolved schema map carried in the {@link Schema} type. */\nexport type ColsMap = Record<string, AnyCols>;","description":"name → columns, the resolved schema map carried in the {@link Schema} type.","source":"packages/client/src/schema.ts","line":199,"href":"/reference/typescript/wasm/#symbol-ColsMap"},{"name":"ColT","originalName":"ColT","kind":"TypeAliasDeclaration","signature":"export type ColT<X> = X extends Col<infer T> ? T : never;","description":"","source":"packages/client/src/schema.ts","line":26,"href":"/reference/typescript/wasm/#symbol-ColT"},{"name":"ColType","originalName":"ColType","kind":"TypeAliasDeclaration","signature":"/** Declared column type (from the typed schema) — drives the comparator + JSON parsing.\n *  `\"int64\"` is the exact-i64 column plane (design 226): the vocabulary exists from\n *  Stage C4 (codegen can name it), but no exact integer cell crosses this wire — and\n *  `WireValue` gains no `bigint` — until Stage E lands the browser bigint plane; until\n *  then the daemon refuses IVM queries whose footprint touches such a column. */\nexport type ColType = \"string\" | \"number\" | \"boolean\" | \"json\" | \"int64\";","description":"Declared column type (from the typed schema) — drives the comparator + JSON parsing.\n`\"int64\"` is the exact-i64 column plane (design 226): the vocabulary exists from\nStage C4 (codegen can name it), but no exact integer cell crosses this wire — and\n`WireValue` gains no `bigint` — until Stage E lands the browser bigint plane; until\nthen the daemon refuses IVM queries whose footprint touches such a column.","source":"packages/client/src/types.ts","line":16,"href":"/reference/typescript/wasm/#symbol-ColType"},{"name":"COMPARATOR_VERSION","originalName":"COMPARATOR_VERSION","kind":"VariableDeclaration","signature":"/** The `compare_values` / `compare_rows` algorithm-contract version (=== the engine's\n *  `wire_schema::COMPARATOR_VERSION`). A remote subscriber hard-rejects a `hello` whose\n *  `comparatorVersion` differs — the total order is a code contract, not data, so a schema\n *  fingerprint can't cover it. Bump in lockstep with the Rust constant if the order changes.\n *\n *  v2 (design 226 Stage B): the engine's mixed Int/Float comparison became exact instead\n *  of f64-widening. No TS behavior change — every value a client can hold today is an f64\n *  `number`, on which v1 and v2 order identically (the §8 gate keeps int64 cells out of\n *  the browser until Stage E) — but the contract the version names is the engine's. */\nexport declare const COMPARATOR_VERSION = 2;","description":"The `compare_values` / `compare_rows` algorithm-contract version (=== the engine's\n`wire_schema::COMPARATOR_VERSION`). A remote subscriber hard-rejects a `hello` whose\n`comparatorVersion` differs — the total order is a code contract, not data, so a schema\nfingerprint can't cover it. Bump in lockstep with the Rust constant if the order changes.\n\nv2 (design 226 Stage B): the engine's mixed Int/Float comparison became exact instead\nof f64-widening. No TS behavior change — every value a client can hold today is an f64\n`number`, on which v1 and v2 order identically (the §8 gate keeps int64 cells out of\nthe browser until Stage E) — but the contract the version names is the engine's.","source":"packages/client/src/compare.ts","line":28,"href":"/reference/typescript/wasm/#symbol-COMPARATOR_VERSION"},{"name":"compareNumber","originalName":"compareNumber","kind":"FunctionDeclaration","signature":"/** number compare with `f64::total_cmp` semantics (NaN deterministic & last; -0 < +0). */\nexport declare function compareNumber(a: number, b: number): -1 | 0 | 1;","description":"number compare with `f64::total_cmp` semantics (NaN deterministic & last; -0 < +0).","source":"packages/client/src/compare.ts","line":44,"href":"/reference/typescript/wasm/#symbol-compareNumber"},{"name":"compareRows","originalName":"compareRows","kind":"FunctionDeclaration","signature":"/** Compare two rows by a resolved sort (`[columnIndex, ascending]` pairs). First non-equal\n *  column wins; a descending column negates. */\nexport declare function compareRows(a: WireValue[], b: WireValue[], sort: [\n    number,\n    boolean\n][]): -1 | 0 | 1;","description":"Compare two rows by a resolved sort (`[columnIndex, ascending]` pairs). First non-equal\ncolumn wins; a descending column negates.","source":"packages/client/src/compare.ts","line":84,"href":"/reference/typescript/wasm/#symbol-compareRows"},{"name":"compareString","originalName":"compareString","kind":"FunctionDeclaration","signature":"/** UTF-8 bytewise string compare (=== SQLite `BINARY` / Rust `&str` Ord). Correct for\n *  supplementary-plane code points, where JS `<` / `localeCompare` (UTF-16) would disagree. */\nexport declare function compareString(a: string, b: string): -1 | 0 | 1;","description":"UTF-8 bytewise string compare (=== SQLite `BINARY` / Rust `&str` Ord). Correct for\nsupplementary-plane code points, where JS `<` / `localeCompare` (UTF-16) would disagree.","source":"packages/client/src/compare.ts","line":52,"href":"/reference/typescript/wasm/#symbol-compareString"},{"name":"compareValue","originalName":"compareValue","kind":"FunctionDeclaration","signature":"/** Compare two bare cells, dispatching on the runtime type (null sorts first). */\nexport declare function compareValue(a: WireValue, b: WireValue): -1 | 0 | 1;","description":"Compare two bare cells, dispatching on the runtime type (null sorts first).","source":"packages/client/src/compare.ts","line":63,"href":"/reference/typescript/wasm/#symbol-compareValue"},{"name":"Cond","originalName":"Cond","kind":"TypeAliasDeclaration","signature":"/** A condition over row `R`. The runtime value is the wire {@link Condition}; `R` is a\n *  phantom brand so a condition for one table can't be `.where()`d onto another. */\nexport type Cond<R> = Condition & {\n    readonly __row?: R;\n};","description":"A condition over row `R`. The runtime value is the wire {@link Condition}; `R` is a\nphantom brand so a condition for one table can't be `.where()`d onto another.","source":"packages/client/src/operators.ts","line":51,"href":"/reference/typescript/wasm/#symbol-Cond"},{"name":"Condition","originalName":"Condition","kind":"TypeAliasDeclaration","signature":"/** The filter tree — `type`-tagged; recursive. There is no generic NOT node (negation is\n *  via the negated operators and `NOT EXISTS`, matching `src/ast.rs` `Condition`). */\nexport type Condition = {\n    type: \"simple\";\n    op: SimpleOp;\n    left: ValuePosition;\n    right: ValuePosition;\n} | {\n    type: \"and\";\n    conditions: Condition[];\n} | {\n    type: \"or\";\n    conditions: Condition[];\n} | {\n    type: \"correlatedSubquery\";\n    related: CorrelatedSubquery;\n    op: ExistsOp;\n    flip?: boolean;\n    scalar?: boolean;\n};","description":"The filter tree — `type`-tagged; recursive. There is no generic NOT node (negation is\nvia the negated operators and `NOT EXISTS`, matching `src/ast.rs` `Condition`).","source":"packages/client/src/ast.ts","line":39,"href":"/reference/typescript/wasm/#symbol-Condition"},{"name":"CorrelatedSubquery","originalName":"CorrelatedSubquery","kind":"InterfaceDeclaration","signature":"export interface CorrelatedSubquery {\n    correlation: Correlation;\n    subquery: Ast;\n    system?: \"client\" | \"permissions\" | \"test\";\n}","description":"","source":"packages/client/src/ast.ts","line":58,"href":"/reference/typescript/wasm/#symbol-CorrelatedSubquery"},{"name":"Correlation","originalName":"Correlation","kind":"InterfaceDeclaration","signature":"export interface Correlation {\n    parentField: string[];\n    childField: string[];\n}","description":"","source":"packages/client/src/ast.ts","line":45,"href":"/reference/typescript/wasm/#symbol-Correlation"},{"name":"createLocalFragmentRef","originalName":"createLocalFragmentRef","kind":"FunctionDeclaration","signature":"export declare function createLocalFragmentRef<F extends Fragment<any, any, any>>(fragment: F, pk: Record<string, LitValue>, coverage: FragmentCoverage): LocalFragmentRef<F>;","description":"","source":"packages/client/src/query.ts","line":610,"href":"/reference/typescript/wasm/#symbol-createLocalFragmentRef"},{"name":"createLocalFragmentRefForTable","originalName":"createLocalFragmentRefForTable","kind":"FunctionDeclaration","signature":"export declare function createLocalFragmentRefForTable<F extends Fragment<any, any, any>>(table: string, pk: Record<string, LitValue>, coverage: FragmentCoverage): LocalFragmentRef<F>;","description":"","source":"packages/client/src/query.ts","line":618,"href":"/reference/typescript/wasm/#symbol-createLocalFragmentRefForTable"},{"name":"createRootFragmentRef","originalName":"createRootFragmentRef","kind":"FunctionDeclaration","signature":"export declare function createRootFragmentRef<F extends Fragment<any, any, any>, Q extends AnyQuery>(fragment: F, query: Q, coverageKey?: string): LocalFragmentRef<F>;","description":"","source":"packages/client/src/query.ts","line":632,"href":"/reference/typescript/wasm/#symbol-createRootFragmentRef"},{"name":"createSchema","originalName":"createSchema","kind":"FunctionDeclaration","signature":"export declare function createSchema<const T extends readonly AnyTable[]>(opts: {\n    tables: T;\n}): Schema<SchemaOf<T>, PkMapOf<T>>;","description":"","source":"packages/client/src/schema.ts","line":227,"href":"/reference/typescript/wasm/#symbol-createSchema"},{"name":"createServerStore","originalName":"createServerStore","kind":"FunctionDeclaration","signature":"/** Construct a {@link ServerStore} — the one-shot REST Store for server-side rendering. */\nexport declare function createServerStore<S extends ColsMap>(schema: Schema<S>, opts: ServerStoreOptions): ServerStore<S>;","description":"Construct a {@link ServerStore} — the one-shot REST Store for server-side rendering.","source":"packages/client/src/ssr.ts","line":140,"href":"/reference/typescript/wasm/#symbol-createServerStore"},{"name":"createWasmStore","originalName":"createWasmStore","kind":"FunctionDeclaration","signature":"/** Convenience: init the wasm + return a ready local {@link Store}. */\nexport declare function createWasmStore<S extends ColsMap>(schema: Schema<S>): Promise<Store<S>>;","description":"Convenience: init the wasm + return a ready local {@link Store}.","source":"packages/wasm/src/index.ts","line":276,"href":"/reference/typescript/wasm/#symbol-createWasmStore"},{"name":"defineFragment","originalName":"defineFragment","kind":"FunctionDeclaration","signature":"/**\n * Define a co-located, composable {@link Fragment}: a named selection over `table`. The returned\n * value is callable (the `build` transform), so it threads through the existing `sub`/`Rels`\n * spine — no GraphQL, no codegen, no schema change (design §3).\n *\n * ```ts\n * const UserAvatar = defineFragment(schema.user, (f) => f.select(\"id\", \"name\", \"avatarUrl\"));\n * const CommentRow = defineFragment(schema.comment, (f) =>\n *   f.select(\"id\", \"body\", \"authorId\")\n *    .sub(\"author\", schema.user, { parent: [\"authorId\"], child: [\"id\"] }, UserAvatar));\n * ```\n */\nexport declare function defineFragment<C extends AnyCols, Rels = {}, Sel extends string = never, LocalRels = Rels>(table: TableLike<C>, build: (q: Query<C>) => Query<C, Rels, boolean, Sel, LocalRels>): Fragment<C, Rels, Sel, LocalRels>;","description":"Define a co-located, composable {@link Fragment}: a named selection over `table`. The returned\nvalue is callable (the `build` transform), so it threads through the existing `sub`/`Rels`\nspine — no GraphQL, no codegen, no schema change (design §3).\n\n```ts\nconst UserAvatar = defineFragment(schema.user, (f) => f.select(\"id\", \"name\", \"avatarUrl\"));\nconst CommentRow = defineFragment(schema.comment, (f) =>\n  f.select(\"id\", \"body\", \"authorId\")\n   .sub(\"author\", schema.user, { parent: [\"authorId\"], child: [\"id\"] }, UserAvatar));\n```","source":"packages/client/src/query.ts","line":577,"href":"/reference/typescript/wasm/#symbol-defineFragment"},{"name":"defineMutators","originalName":"defineMutators","kind":"FunctionDeclaration","signature":"export declare function defineMutators<S extends ColsMap, P extends Record<string, string>>(_schema: Schema<S, P>): {\n    shared<Args, Ctx extends MutatorCtx = MutatorCtx>(args: ArgSchema<Args>, run: (tx: IsoTx<S, P>, args: Args, ctx: Ctx) => MutationGen): SharedMutatorWithArgs<Args, Ctx>;\n};","description":"","source":"packages/client/src/mutation-ops.ts","line":202,"href":"/reference/typescript/wasm/#symbol-defineMutators"},{"name":"defineQuery","originalName":"defineQuery","kind":"FunctionDeclaration","signature":"/**\n * Define ONE co-located, named query. Keep it next to the component that reads it (a `*.queries.ts`\n * file), so a query lives where its fragments and its component live.\n *\n * The returned value is callable on the client (it stamps its result with `name` + args, so the\n * subscription SYNCS) and registerable on the server ({@link registerQueries}). The optional\n * `validate` step turns untrusted wire args into the canonical args type — and that type flows to\n * both the call signature and `build`, so the shape is written exactly once. `validate` runs on\n * BOTH tiers (it builds the byte-identical authoritative AST on the server, and guards + guarantees\n * the same AST on the client). If the server must DIVERGE from the client, define a second\n * `defineQuery` with the same `name` for the server and register that one instead.\n *\n * `build` may take a second CONTEXT parameter (see {@link QueryBuilder}). Context is off-wire: the\n * client passes its session ctx at the callsite, the server injects its authoritative ctx — so a\n * per-user query stays symmetric without ever trusting (or transmitting) a client-supplied identity.\n *\n * ```ts\n * // recentComments({ limit }) — validated, no ctx, byte-identical on both tiers\n * export const recentCommentsQuery = defineQuery(\n *   \"recentComments\",\n *   (raw): { limit: number } => ({ limit: validateFeedLimit(raw) }),\n *   ({ limit }) => q.comment.orderBy(\"createdAt\", \"desc\").limit(limit).include(FeedItemFragment),\n * );\n *\n * // myIssues({ limit }, ctx) — ctx-scoped; the wire still carries only { limit }\n * export const myIssuesQuery = defineQuery(\n *   \"myIssues\",\n *   (raw): { limit: number } => ({ limit: validateLimit(raw) }),\n *   ({ limit }, ctx: { user: string }) => q.issue.where.ownerId(ctx.user).limit(limit),\n * );\n * // client: myIssuesQuery({ limit: 20 }, { user: currentUser() })\n * ```\n */\nexport declare function defineQuery<Q extends AnyQuery>(name: string, build: () => Q, options?: DefineQueryOptions<void>): NamedQuery<void, [\n], Q>;\nexport declare function defineQuery<Args, Ctx extends readonly unknown[], Q extends AnyQuery>(name: string, build: (args: Args, ...ctx: Ctx) => Q, options?: DefineQueryOptions<Args>): NamedQuery<Args, Ctx, Q>;\nexport declare function defineQuery<Args, Ctx extends readonly unknown[], Q extends AnyQuery>(name: string, validate: QueryValidator<Args>, build: (args: Args, ...ctx: Ctx) => Q, options?: DefineQueryOptions<Args>): NamedQuery<Args, Ctx, Q>;","description":"Define ONE co-located, named query. Keep it next to the component that reads it (a `*.queries.ts`\nfile), so a query lives where its fragments and its component live.\n\nThe returned value is callable on the client (it stamps its result with `name` + args, so the\nsubscription SYNCS) and registerable on the server ({@link registerQueries }). The optional\n`validate` step turns untrusted wire args into the canonical args type — and that type flows to\nboth the call signature and `build`, so the shape is written exactly once. `validate` runs on\nBOTH tiers (it builds the byte-identical authoritative AST on the server, and guards + guarantees\nthe same AST on the client). If the server must DIVERGE from the client, define a second\n`defineQuery` with the same `name` for the server and register that one instead.\n\n`build` may take a second CONTEXT parameter (see {@link QueryBuilder}). Context is off-wire: the\nclient passes its session ctx at the callsite, the server injects its authoritative ctx — so a\nper-user query stays symmetric without ever trusting (or transmitting) a client-supplied identity.\n\n```ts\n// recentComments({ limit }) — validated, no ctx, byte-identical on both tiers\nexport const recentCommentsQuery = defineQuery(\n  \"recentComments\",\n  (raw): { limit: number } => ({ limit: validateFeedLimit(raw) }),\n  ({ limit }) => q.comment.orderBy(\"createdAt\", \"desc\").limit(limit).include(FeedItemFragment),\n);\n\n// myIssues({ limit }, ctx) — ctx-scoped; the wire still carries only { limit }\nexport const myIssuesQuery = defineQuery(\n  \"myIssues\",\n  (raw): { limit: number } => ({ limit: validateLimit(raw) }),\n  ({ limit }, ctx: { user: string }) => q.issue.where.ownerId(ctx.user).limit(limit),\n);\n// client: myIssuesQuery({ limit: 20 }, { user: currentUser() })\n```","source":"packages/client/src/query.ts","line":472,"href":"/reference/typescript/wasm/#symbol-defineQuery"},{"name":"DefineQueryOptions","originalName":"DefineQueryOptions","kind":"InterfaceDeclaration","signature":"/** Options for {@link defineQuery}. */\nexport interface DefineQueryOptions<Args = any> {\n    /** Declare this query realtime-eligible — see {@link RealtimeQueryLabel}. */\n    realtime?: RealtimeQueryLabel<Args>;\n}","description":"Options for {@link defineQuery}.","source":"packages/client/src/query.ts","line":383,"href":"/reference/typescript/wasm/#symbol-DefineQueryOptions"},{"name":"defineRelationships","originalName":"defineRelationships","kind":"FunctionDeclaration","signature":"/** A typed registry of named {@link Relationship}s — `defineRelationships({ issueOwner: rel(...) })`.\n *  A thin identity helper that names the bag and constrains its values; the keys are yours to choose. */\nexport declare function defineRelationships<R extends Record<string, AnyRelationship>>(rels: R): R;","description":"A typed registry of named {@link Relationship}s — `defineRelationships({ issueOwner: rel(...) })`.\nA thin identity helper that names the bag and constrains its values; the keys are yours to choose.","source":"packages/client/src/schema.ts","line":488,"href":"/reference/typescript/wasm/#symbol-defineRelationships"},{"name":"DehydratedQuery","originalName":"DehydratedQuery","kind":"InterfaceDeclaration","signature":"/** One query's SSR snapshot, keyed by its `viewKey` ({@link stableKey} of the AST): the\n *  pre-projected first-paint `rows` plus the `cvMin` watermark they reflect (SSR-DESIGN.md §6.2).\n *  Serializable as-is into the HTML — `rows` are already JSON values (json columns parsed). */\nexport interface DehydratedQuery {\n    rows: unknown[];\n    cvMin: number;\n}","description":"One query's SSR snapshot, keyed by its `viewKey` ({@link stableKey} of the AST): the\npre-projected first-paint `rows` plus the `cvMin` watermark they reflect (SSR-DESIGN.md §6.2).\nSerializable as-is into the HTML — `rows` are already JSON values (json columns parsed).","source":"packages/client/src/store.ts","line":20,"href":"/reference/typescript/wasm/#symbol-DehydratedQuery"},{"name":"DehydratedState","originalName":"DehydratedState","kind":"TypeAliasDeclaration","signature":"/** The whole dehydrated cache: every preloaded query's snapshot, keyed by `viewKey`. The server\n *  builds it with {@link Store.dehydrate}; the browser seeds it with {@link Store.hydrate}. */\nexport type DehydratedState = Record<string, DehydratedQuery>;","description":"The whole dehydrated cache: every preloaded query's snapshot, keyed by `viewKey`. The server\nbuilds it with {@link Store.dehydrate}; the browser seeds it with {@link Store.hydrate}.","source":"packages/client/src/store.ts","line":27,"href":"/reference/typescript/wasm/#symbol-DehydratedState"},{"name":"Dir","originalName":"Dir","kind":"TypeAliasDeclaration","signature":"export type Dir = \"asc\" | \"desc\";","description":"","source":"packages/client/src/ast.ts","line":5,"href":"/reference/typescript/wasm/#symbol-Dir"},{"name":"driveMutationAsync","originalName":"driveMutationAsync","kind":"FunctionDeclaration","signature":"/** Drive a generator mutator ASYNCHRONOUSLY (the server, against the open transaction). Writes are\n *  awaited (harmless: a single interactive Postgres connection serializes statements anyway, and the\n *  daemon backend resolves them instantly), reads (point or query) suspend, and a batch fans out with\n *  `Promise.all`. */\nexport declare function driveMutationAsync(gen: MutationGen, exec: AsyncEffectExec): Promise<void>;","description":"Drive a generator mutator ASYNCHRONOUSLY (the server, against the open transaction). Writes are\nawaited (harmless: a single interactive Postgres connection serializes statements anyway, and the\ndaemon backend resolves them instantly), reads (point or query) suspend, and a batch fans out with\n`Promise.all`.","source":"packages/client/src/mutation-ops.ts","line":257,"href":"/reference/typescript/wasm/#symbol-driveMutationAsync"},{"name":"driveMutationSync","originalName":"driveMutationSync","kind":"FunctionDeclaration","signature":"/** Drive a generator mutator SYNCHRONOUSLY (the client, inside the wasm write transaction). Each\n *  yielded write applies immediately; each read (point or query) is resolved and fed back; a batch\n *  runs in order. */\nexport declare function driveMutationSync(gen: MutationGen, exec: SyncEffectExec): void;","description":"Drive a generator mutator SYNCHRONOUSLY (the client, inside the wasm write transaction). Each\nyielded write applies immediately; each read (point or query) is resolved and fed back; a batch\nruns in order.","source":"packages/client/src/mutation-ops.ts","line":235,"href":"/reference/typescript/wasm/#symbol-driveMutationSync"},{"name":"EnsureQueryOptions","originalName":"EnsureQueryOptions","kind":"InterfaceDeclaration","signature":"export interface EnsureQueryOptions {\n    /** Readiness policy. Defaults to `complete`. */\n    until?: EnsureQueryUntil;\n    /** Cancel this caller's wait. The shared query may stay retained for another waiter/prefetch. */\n    signal?: AbortSignal;\n}","description":"","source":"packages/client/src/ensure.ts","line":22,"href":"/reference/typescript/wasm/#symbol-EnsureQueryOptions"},{"name":"EnsureQueryUntil","originalName":"EnsureQueryUntil","kind":"TypeAliasDeclaration","signature":"/** When an {@link QueryEnsureCache.ensure} call may resolve.\n *\n * - `complete` waits for the server-authoritative result (the default).\n * - `present` resolves as soon as the local view contains a result, while the remote retain keeps\n *   revalidating in the background. An authoritative empty result also resolves it, so a real\n *   not-found query never waits forever.\n *\n * `present` deliberately does not add a `partial` {@link ResultType}: a locally useful answer and\n * server authority are independent facts. While it resolves early, the view's result type remains\n * `unknown` until the server says otherwise. */\nexport type EnsureQueryUntil = \"complete\" | \"present\";","description":"When an {@link QueryEnsureCache.ensure} call may resolve.\n\n- `complete` waits for the server-authoritative result (the default).\n- `present` resolves as soon as the local view contains a result, while the remote retain keeps\n revalidating in the background. An authoritative empty result also resolves it, so a real\n not-found query never waits forever.\n\n`present` deliberately does not add a `partial` {@link ResultType}: a locally useful answer and\nserver authority are independent facts. While it resolves early, the view's result type remains\n`unknown` until the server says otherwise.","source":"packages/client/src/ensure.ts","line":20,"href":"/reference/typescript/wasm/#symbol-EnsureQueryUntil"},{"name":"eq","originalName":"eq","kind":"VariableDeclaration","signature":"export declare const eq: <V>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":26,"href":"/reference/typescript/wasm/#symbol-eq"},{"name":"exists","originalName":"exists","kind":"FunctionDeclaration","signature":"/** `EXISTS` by a named {@link Relationship} — correlation from the rel; the parent row type is the\n *  relationship's parent, so the condition lands on the matching `.where()`. */\nexport declare function exists<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<RowOf<PC>>;\n/** `EXISTS (<correlated subquery>)` — a condition (use inside `where`/`or`/`and`). */\nexport declare function exists<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<R>;","description":"`EXISTS` by a named {@link Relationship} — correlation from the rel; the parent row type is the\nrelationship's parent, so the condition lands on the matching `.where()`.\n`EXISTS (<correlated subquery>)` — a condition (use inside `where`/`or`/`and`).","source":"packages/client/src/query.ts","line":1210,"href":"/reference/typescript/wasm/#symbol-exists"},{"name":"existsNoSync","originalName":"existsNoSync","kind":"FunctionDeclaration","signature":"/**\n * `EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate (`exists_noSync`).\n * Identical to {@link exists} for filtering parent visibility, but stamps the subquery\n * `system: \"permissions\"`, so the engine's normalized serializer prunes its witnesses from the\n * footprint — the permission table's rows are never synced to the client and the client never\n * re-evaluates the gate. Use this when building the **server's** query (the user's API server);\n * the client holds its own un-gated query.\n */\nexport declare function existsNoSync<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<RowOf<PC>>;\nexport declare function existsNoSync<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<R>;","description":"`EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate (`exists_noSync`).\nIdentical to {@link exists} for filtering parent visibility, but stamps the subquery\n`system: \"permissions\"`, so the engine's normalized serializer prunes its witnesses from the\nfootprint — the permission table's rows are never synced to the client and the client never\nre-evaluates the gate. Use this when building the **server's** query (the user's API server);\nthe client holds its own un-gated query.","source":"packages/client/src/query.ts","line":1255,"href":"/reference/typescript/wasm/#symbol-existsNoSync"},{"name":"ExistsOp","originalName":"ExistsOp","kind":"TypeAliasDeclaration","signature":"export type ExistsOp = \"EXISTS\" | \"NOT EXISTS\";","description":"","source":"packages/client/src/ast.ts","line":35,"href":"/reference/typescript/wasm/#symbol-ExistsOp"},{"name":"ExistsOpts","originalName":"ExistsOpts","kind":"InterfaceDeclaration","signature":"/** Options for `exists` / `notExists`. */\nexport interface ExistsOpts {\n    /**\n     * Fold this `EXISTS` as a build-time **scalar** subquery: when the child binds a\n     * statically-unique key, the engine reads it once, inlines the correlation value as a\n     * literal, and deletes the join. **Snapshot semantics** — the inlined value does not\n     * react to later child changes. Defaults to `false` (a live `EXISTS` join).\n     */\n    scalar?: boolean;\n}","description":"Options for `exists` / `notExists`.","source":"packages/client/src/query.ts","line":1173,"href":"/reference/typescript/wasm/#symbol-ExistsOpts"},{"name":"extendSchema","originalName":"extendSchema","kind":"FunctionDeclaration","signature":"/** Extend a generated/synced schema with client-authoritative local-only tables.\n *\n *  This is the ergonomic path for SQL-first apps: keep `schema.gen.ts` fully generated, define\n *  private UI tables in a tiny hand-written file, then hand the combined schema to the browser\n *  client. The added tables MUST be `table(name, { local: true })`: `extendSchema` deliberately\n *  refuses to append ordinary synced tables, because those need to come from daemon introspection\n *  (`rindle schema gen`) so the server and client cannot drift. */\nexport declare function extendSchema<S extends ColsMap, P extends Record<string, string>, const T extends readonly AnyTable[]>(base: Schema<S, P>, opts: {\n    tables: T;\n}): Schema<S & SchemaOf<T>, P & PkMapOf<T>>;","description":"Extend a generated/synced schema with client-authoritative local-only tables.\n\nThis is the ergonomic path for SQL-first apps: keep `schema.gen.ts` fully generated, define\nprivate UI tables in a tiny hand-written file, then hand the combined schema to the browser\nclient. The added tables MUST be `table(name, { local: true })`: `extendSchema` deliberately\nrefuses to append ordinary synced tables, because those need to come from daemon introspection\n(`rindle schema gen`) so the server and client cannot drift.","source":"packages/client/src/schema.ts","line":245,"href":"/reference/typescript/wasm/#symbol-extendSchema"},{"name":"fieldCondition","originalName":"fieldCondition","kind":"FunctionDeclaration","signature":"/** Build a `simple` condition from a field name + (predicate | bare value). */\nexport declare function fieldCondition(field: string, arg: unknown): Condition;","description":"Build a `simple` condition from a field name + (predicate | bare value).","source":"packages/client/src/operators.ts","line":54,"href":"/reference/typescript/wasm/#symbol-fieldCondition"},{"name":"FlatArrayView","originalName":"FlatArrayView","kind":"ClassDeclaration","signature":"export declare class FlatArrayView<R = unknown> implements ArrayView<R> {\n    private readonly _qid;\n    private _schema;\n    private types?;\n    private seeded;\n    private top;\n    private dirty;\n    private cached;\n    private rt;\n    private readonly listeners;\n    private readonly changeListeners;\n    private pendingSegments;\n    constructor(schema?: WireSchema, types?: ViewTypes, qid?: QueryId);\n    get qid(): QueryId;\n    get schema(): WireSchema | null;\n    get resultType(): ResultType;\n    /** Set the query's lifecycle state (the Store routes the backend's per-query signal here).\n     *  Notifies subscribers on a change so a status-bound listener (React `useQueryStatus`) re-reads,\n     *  WITHOUT re-projecting data (it is unchanged). */\n    setResultType(rt: ResultType): void;\n    /** (Re)bind to a schema and clear the tree IN PLACE. The first `hello` (pending → ready)\n     *  and a re-hydrate (gap → new epoch — FLAT-CHANGES-DESIGN.md §2.3) both go through here, so\n     *  the caller's view reference and its subscribers survive a re-subscribe. Does NOT notify —\n     *  the snapshot that follows (`applyChanges`) does, avoiding an empty-then-filled flicker.\n     *  KEEPS any SSR `seeded` rows: they are retired only when the first live snapshot lands\n     *  ({@link retireSeed}, driven by the Store), so `data` shows the seed — not an empty tree —\n     *  across the whole `hello`→first-`snapshot` gap. */\n    reset(schema: WireSchema, types?: ViewTypes): void;\n    /** Install a pre-projected SSR first-paint snapshot (SSR-DESIGN.md §6). The rows are already\n     *  in result shape (json columns parsed, relationships nested), so a view with no live backend\n     *  (the server one-shot Store) reads them directly, and a browser view shows them until its\n     *  first live snapshot lands ({@link retireSeed}). Does NOT notify — it is set at materialize\n     *  time, before any subscriber, and the live snapshot that follows notifies. */\n    seed(rows: readonly R[]): void;\n    /** Retire the SSR first-paint seed — the Store calls this as it folds the maintained tree's first\n     *  live snapshot, so `data` switches from the seed to the live tree with no empty gap between them\n     *  (the seed deliberately survived the earlier `reset`/`hello`). Idempotent. Does NOT notify — the\n     *  snapshot fold it accompanies does; BUT when that fold is empty (a 0-row result, or rows already\n     *  in `top`) it notifies nothing, so the Store forces a {@link notify} on the strength of the `true`\n     *  return here — else the view reads the live tree yet never re-renders (a frozen seed). Returns\n     *  whether a live seed was actually cleared (so the Store knows a forced notify is owed). */\n    retireSeed(): boolean;\n    /** Apply a batch (the hydrate snapshot or one transaction's events) in order, then\n     *  notify subscribers once. Order is significant (FLAT-CHANGES-DESIGN.md §5.4). A no-op\n     *  while pending (changes never precede the `hello` that resets the schema).\n     *\n     *  `enrichRemoves` ⇒ before a removed node is dropped, reconstruct its full subtree and attach it\n     *  to the `remove` op's `node` (in place, so the same event object the Store fans out to its\n     *  change subscribers carries it). Off by default — paid only when a consumer asked for it, and\n     *  only on a real eviction (an rc-decrement that keeps the row leaves `node` absent). A view with\n     *  an attached {@link onChanges} listener ALSO enriches (per-view, no global opt-in), so a\n     *  narrator can resolve a removed row's subs whether or not the store-global counter is set.\n     *\n     *  `deferNotify` ⇒ fold but do NOT notify; the caller is responsible for calling {@link flush}\n     *  later. The Store uses this to fold every view in one commit before notifying any subscriber\n     *  (cross-view-atomic notification — `Store.onCommitBoundary`); standalone use leaves it off, so\n     *  a bare view still fires its subscribers after each applied batch.\n     *\n     *  `phase` tags the {@link onChanges} delivery (`snapshot` for the hydrate, `batch` otherwise); it\n     *  does not affect the fold. Returns whether the batch changed the view (so a deferring caller\n     *  knows it must be flushed). */\n    applyChanges(events: FlatChange[], enrichRemoves?: boolean, deferNotify?: boolean, phase?: ChangePhase): boolean;\n    /** Notify subscribers with the current data. The deferred half of {@link applyChanges} (when\n     *  `deferNotify` was set): the Store calls this at the commit-notify barrier — after every view\n     *  touched by the same commit has folded — so a subscriber that re-reads a sibling view inside\n     *  its callback observes post-commit data, never a torn mid-commit state. */\n    flush(): void;\n    get data(): readonly R[];\n    subscribe(listener: (data: readonly R[]) => void): () => void;\n    onChanges(listener: ViewChangeListener): () => void;\n    /** Net the folded batch and hand the survivors to the change listeners, AFTER the data `notify`\n     *  (the order `Store.subscribeChanges` consumers already observe). A batch that nets to nothing —\n     *  a correctly predicted rebase — makes no call, so a narrator sees only real change. Each listener\n     *  is isolated: a throwing one reports to `note` (the caller re-raises the first) and the rest still\n     *  run, so one bad narration template never starves a sibling listener nor corrupts the view. */\n    private deliverChanges;\n    destroy(): void;\n    private applyAt;\n    private applyOp;\n    private applyAdd;\n    /** Drop one path to `row`. Returns the evicted {@link Node} (its full subtree intact) when the\n     *  last path went away — `null` when another path still holds it (rc decremented, nothing left\n     *  the result). */\n    private applyRemove;\n    private applyEdit;\n    private project;\n    /** Notify data subscribers with the current {@link data}. Normally driven by a fold ({@link\n     *  applyChanges}/{@link flush}); the Store also calls it directly to land a seed retirement whose\n     *  accompanying fold was empty (see {@link retireSeed}). */\n    notify(): void;\n}","description":"","source":"packages/client/src/view.ts","line":348,"href":"/reference/typescript/wasm/#symbol-FlatArrayView"},{"name":"FlatChange","originalName":"FlatChange","kind":"InterfaceDeclaration","signature":"export interface FlatChange {\n    path: PathSeg[];\n    op: FlatOp;\n}","description":"","source":"packages/client/src/types.ts","line":69,"href":"/reference/typescript/wasm/#symbol-FlatChange"},{"name":"FlatOp","originalName":"FlatOp","kind":"TypeAliasDeclaration","signature":"/** A positional change at one level of the view tree. A `remove` ships only the leaving `row`\n *  (the receiver already holds the subtree and locates it by key) — `node` is NEVER on the wire;\n *  it is an OPTIONAL client-side enrichment carrying the full removed subtree, attached by the\n *  ArrayView when a change consumer opts in (`Store.subscribeChanges(_, { removedSubtree: true })`),\n *  so a narrator can resolve a removed row's nested subs just as it can on an `add`. */\nexport type FlatOp = {\n    tag: \"add\";\n    node: WireNode;\n} | {\n    tag: \"remove\";\n    row: WireValue[];\n    node?: WireNode;\n} | {\n    tag: \"edit\";\n    old: WireValue[];\n    new: WireValue[];\n};","description":"A positional change at one level of the view tree. A `remove` ships only the leaving `row`\n(the receiver already holds the subtree and locates it by key) — `node` is NEVER on the wire;\nit is an OPTIONAL client-side enrichment carrying the full removed subtree, attached by the\nArrayView when a change consumer opts in (`Store.subscribeChanges(_, { removedSubtree: true })`),\nso a narrator can resolve a removed row's nested subs just as it can on an `add`.","source":"packages/client/src/types.ts","line":64,"href":"/reference/typescript/wasm/#symbol-FlatOp"},{"name":"Fragment","originalName":"Fragment","kind":"InterfaceDeclaration","signature":"/**\n * A reusable, typed *selection over a table* — Relay's \"fragment\", promoted to a first-class\n * value. **Two verbs** compose a fragment, on one axis — does its data belong to THIS row or to a\n * related one:\n *\n *   - SAME node — `q.include(Frag)`: merge its selection into this node. This is also how you\n *     **root** a fragment onto a base query — `queries.t.where.id(x).include(Frag)`.\n *   - CHILD node — `q.sub(alias, child, corr, Frag)`: nest it under a relationship (`sub`'s 4th arg).\n *\n * A `Fragment` is therefore also a `build` transform (`(q: Query<C>) => Query<C, Rels>`); that\n * call signature is the mechanism by which `sub` accepts a fragment as its build. Prefer\n * `include` to root a fragment (canonical + merged) over calling it directly. It additionally\n * carries its `table` (for {@link FragmentRef}/`useFragment` typing and masking). Composing\n * fragments assembles ONE {@link Ast} → one materialization → one `/query` — the whole point\n * (no request waterfall; design §1).\n */\nexport interface Fragment<C extends AnyCols, Rels = {}, Sel extends string = never, LocalRels = Rels> {\n    (q: Query<C>): Query<C, Rels, false, Sel, LocalRels>;\n    readonly table: TableLike<C>;\n    readonly [FRAGMENT_BRAND]: true;\n}","description":"A reusable, typed *selection over a table* — Relay's \"fragment\", promoted to a first-class\nvalue. **Two verbs** compose a fragment, on one axis — does its data belong to THIS row or to a\nrelated one:\n\n  - SAME node — `q.include(Frag)`: merge its selection into this node. This is also how you\n    **root** a fragment onto a base query — `queries.t.where.id(x).include(Frag)`.\n  - CHILD node — `q.sub(alias, child, corr, Frag)`: nest it under a relationship (`sub`'s 4th arg).\n\nA `Fragment` is therefore also a `build` transform (`(q: Query<C>) => Query<C, Rels>`); that\ncall signature is the mechanism by which `sub` accepts a fragment as its build. Prefer\n`include` to root a fragment (canonical + merged) over calling it directly. It additionally\ncarries its `table` (for {@link FragmentRef}/`useFragment` typing and masking). Composing\nfragments assembles ONE {@link Ast} → one materialization → one `/query` — the whole point\n(no request waterfall; design §1).","source":"packages/client/src/query.ts","line":533,"href":"/reference/typescript/wasm/#symbol-Fragment"},{"name":"fragmentAst","originalName":"fragmentAst","kind":"FunctionDeclaration","signature":"export declare function fragmentAst<F extends Fragment<any, any, any>>(fragment: F): Ast;","description":"","source":"packages/client/src/query.ts","line":651,"href":"/reference/typescript/wasm/#symbol-fragmentAst"},{"name":"FragmentCoverage","originalName":"FragmentCoverage","kind":"InterfaceDeclaration","signature":"export interface FragmentCoverage<Q extends AnyQuery = AnyQuery> {\n    readonly key: string;\n    readonly query: Q;\n}","description":"","source":"packages/client/src/query.ts","line":548,"href":"/reference/typescript/wasm/#symbol-FragmentCoverage"},{"name":"FragmentData","originalName":"FragmentData","kind":"TypeAliasDeclaration","signature":"/**\n * The data returned by `useFragment(fragment, ref)`: the fragment's own selected columns plus\n * immediate relationship values. Relationships whose builder is another fragment surface as\n * opaque {@link FragmentRef}s, so child-owned payload is read only by the child fragment reader.\n */\nexport type FragmentData<F> = F extends Fragment<infer C, unknown, infer Sel, infer LocalRels> ? Projected<C, Sel> & LocalRels : never;","description":"The data returned by `useFragment(fragment, ref)`: the fragment's own selected columns plus\nimmediate relationship values. Relationships whose builder is another fragment surface as\nopaque {@link FragmentRef}s, so child-owned payload is read only by the child fragment reader.","source":"packages/client/src/query.ts","line":544,"href":"/reference/typescript/wasm/#symbol-FragmentData"},{"name":"fragmentKey","originalName":"fragmentKey","kind":"FunctionDeclaration","signature":"export declare function fragmentKey(ref: FragmentRef<any>): string;","description":"","source":"packages/client/src/query.ts","line":605,"href":"/reference/typescript/wasm/#symbol-fragmentKey"},{"name":"FragmentRef","originalName":"FragmentRef","kind":"TypeAliasDeclaration","signature":"/** The opaque token a parent passes to a component that reads {@link FragmentData} for `F`. */\nexport type FragmentRef<F> = F extends Fragment<any, any, any, any> ? LocalFragmentRef<F> : never;","description":"The opaque token a parent passes to a component that reads {@link FragmentData} for `F`.","source":"packages/client/src/query.ts","line":563,"href":"/reference/typescript/wasm/#symbol-FragmentRef"},{"name":"frameResumePoint","originalName":"frameResumePoint","kind":"FunctionDeclaration","signature":"/** The resume point a frame implies — what rides an SSE `id:` line so a reconnecting `EventSource`\n *  hands it straight back as `Last-Event-ID`. `undefined` for frames that are not a position. */\nexport declare function frameResumePoint(frame: StreamFrame): number | undefined;","description":"The resume point a frame implies — what rides an SSE `id:` line so a reconnecting `EventSource`\nhands it straight back as `Last-Event-ID`. `undefined` for frames that are not a position.","source":"packages/client/src/stream.ts","line":51,"href":"/reference/typescript/wasm/#symbol-frameResumePoint"},{"name":"ge","originalName":"ge","kind":"VariableDeclaration","signature":"export declare const ge: <V extends number | string>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":29,"href":"/reference/typescript/wasm/#symbol-ge"},{"name":"gt","originalName":"gt","kind":"VariableDeclaration","signature":"export declare const gt: <V extends number | string>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":28,"href":"/reference/typescript/wasm/#symbol-gt"},{"name":"ilike","originalName":"ilike","kind":"VariableDeclaration","signature":"export declare const ilike: (pattern: string) => Pred<string>;","description":"","source":"packages/client/src/operators.ts","line":34,"href":"/reference/typescript/wasm/#symbol-ilike"},{"name":"initWasm","originalName":"initWasm","kind":"FunctionDeclaration","signature":"/** Initialize the wasm module (idempotent). Call once at startup before `new WasmBackend`\n *  / `createWasmStore`. Browser/bundler: no args (the wasm is fetched). Node: the bytes are\n *  read from the package. Pass `moduleOrPath` to override (a `WebAssembly.Module`, URL, or bytes). */\nexport declare function initWasm(moduleOrPath?: unknown): Promise<void>;","description":"Initialize the wasm module (idempotent). Call once at startup before `new WasmBackend`\n/ `createWasmStore`. Browser/bundler: no args (the wasm is fetched). Node: the bytes are\nread from the package. Pass `moduleOrPath` to override (a `WebAssembly.Module`, URL, or bytes).","source":"packages/wasm/src/index.ts","line":67,"href":"/reference/typescript/wasm/#symbol-initWasm"},{"name":"inList","originalName":"inList","kind":"VariableDeclaration","signature":"export declare const inList: <V>(values: V[]) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":36,"href":"/reference/typescript/wasm/#symbol-inList"},{"name":"Insert","originalName":"Insert","kind":"TypeAliasDeclaration","signature":"/** The insert type of a table def: `Insert<typeof issue>` → `{ id: string; … assignee?: string | null }`.\n *  The whole-table ergonomic form of {@link InsertOf} (the insert-side twin of {@link Row}). */\nexport type Insert<T extends AnyTable> = InsertOf<T[typeof SCHEMA][\"columns\"]>;","description":"The insert type of a table def: `Insert<typeof issue>` → `{ id: string; … assignee?: string | null }`.\nThe whole-table ergonomic form of {@link InsertOf} (the insert-side twin of {@link Row}).","source":"packages/client/src/schema.ts","line":136,"href":"/reference/typescript/wasm/#symbol-Insert"},{"name":"insertCell","originalName":"insertCell","kind":"FunctionDeclaration","signature":"/** The cell a full insert writes for column `c`: the given value, or `null` when a nullable column\n *  is omitted (design 206 §6.2). The caller's completeness check ({@link InsertPlan.required})\n *  guarantees a non-nullable column is present, so its omission never reaches here. */\nexport declare function insertCell(row: Record<string, WireValue>, c: string): WireValue;","description":"The cell a full insert writes for column `c`: the given value, or `null` when a nullable column\nis omitted (design 206 §6.2). The caller's completeness check ({@link InsertPlan.required})\nguarantees a non-nullable column is present, so its omission never reaches here.","source":"packages/client/src/schema.ts","line":528,"href":"/reference/typescript/wasm/#symbol-insertCell"},{"name":"InsertOf","originalName":"InsertOf","kind":"TypeAliasDeclaration","signature":"/** The INSERT shape of a column map: {@link RowOf} with every NULLABLE column made OPTIONAL (`?`) —\n *  it may be omitted and is filled with `null` by both write funnels (design 206 §6.2/§7). `NOT NULL`\n *  columns stay required. The insert-side twin of {@link RowOf}, mirroring Drizzle's `$inferInsert`\n *  vs `$inferSelect` split. */\nexport type InsertOf<C extends AnyCols> = Simplify<{\n    [K in keyof C as InsertOptional<C[K]> extends true ? never : K]: ColT<C[K]>;\n} & {\n    [K in keyof C as InsertOptional<C[K]> extends true ? K : never]?: ColT<C[K]>;\n}>;","description":"The INSERT shape of a column map: {@link RowOf} with every NULLABLE column made OPTIONAL (`?`) —\nit may be omitted and is filled with `null` by both write funnels (design 206 §6.2/§7). `NOT NULL`\ncolumns stay required. The insert-side twin of {@link RowOf}, mirroring Drizzle's `$inferInsert`\nvs `$inferSelect` split.","source":"packages/client/src/schema.ts","line":128,"href":"/reference/typescript/wasm/#symbol-InsertOf"},{"name":"insertPlan","originalName":"insertPlan","kind":"FunctionDeclaration","signature":"/** Derive a table's {@link InsertPlan} from its column markers. */\nexport declare function insertPlan(meta: TableMeta): InsertPlan;","description":"Derive a table's {@link InsertPlan} from its column markers.","source":"packages/client/src/schema.ts","line":519,"href":"/reference/typescript/wasm/#symbol-insertPlan"},{"name":"InsertPlan","originalName":"InsertPlan","kind":"InterfaceDeclaration","signature":"/** A table's insert-completeness plan, derived once from its `Col` markers and shared by BOTH write\n *  funnels — the client `trackingTx` and the server `renderOp` — so their required-sets can't drift\n *  (design 206 §6.1/§6.2). A `NOT NULL` column is `required`; a nullable column (`.nullable()` set\n *  `Col.optional`) may be omitted and is filled with `null` (see {@link insertCell}). PK columns are\n *  never nullable (introspection forces them non-null), so they are always required. */\nexport interface InsertPlan {\n    /** Every column, in wire order. */\n    readonly columns: string[];\n    /** Columns that MUST be present on a full insert — the non-nullable ones. */\n    readonly required: string[];\n    /** The nullable (omittable-to-null) columns, for a fast membership test in the fill. */\n    readonly nullable: ReadonlySet<string>;\n}","description":"A table's insert-completeness plan, derived once from its `Col` markers and shared by BOTH write\nfunnels — the client `trackingTx` and the server `renderOp` — so their required-sets can't drift\n(design 206 §6.1/§6.2). A `NOT NULL` column is `required`; a nullable column (`.nullable()` set\n`Col.optional`) may be omitted and is filled with `null` (see {@link insertCell}). PK columns are\nnever nullable (introspection forces them non-null), so they are always required.","source":"packages/client/src/schema.ts","line":509,"href":"/reference/typescript/wasm/#symbol-InsertPlan"},{"name":"int64","originalName":"int64","kind":"VariableDeclaration","signature":"/** The exact-i64 column plane (design 226, `BIGINT`/`INT8` decltype): typed `bigint` in\n *  application code. The vocabulary exists from Stage C4 so generated schemas can name it;\n *  no exact integer cell enters the browser IVM until Stage E — until then the daemon\n *  refuses IVM queries whose footprint touches the column, and the SQL plane carries it. */\nexport declare const int64: <T extends bigint = bigint>() => ColBuilder<T>;","description":"The exact-i64 column plane (design 226, `BIGINT`/`INT8` decltype): typed `bigint` in\napplication code. The vocabulary exists from Stage C4 so generated schemas can name it;\nno exact integer cell enters the browser IVM until Stage E — until then the daemon\nrefuses IVM queries whose footprint touches the column, and the SQL plane carries it.","source":"packages/client/src/schema.ts","line":54,"href":"/reference/typescript/wasm/#symbol-int64"},{"name":"is","originalName":"is","kind":"VariableDeclaration","signature":"export declare const is: <V>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":38,"href":"/reference/typescript/wasm/#symbol-is"},{"name":"isFragment","originalName":"isFragment","kind":"FunctionDeclaration","signature":"/** Runtime guard: is `v` a {@link Fragment} (a `defineFragment` value, not a plain build fn)? */\nexport declare function isFragment(v: unknown): v is Fragment<AnyCols, unknown, never, unknown>;","description":"Runtime guard: is `v` a {@link Fragment} (a `defineFragment` value, not a plain build fn)?","source":"packages/client/src/query.ts","line":586,"href":"/reference/typescript/wasm/#symbol-isFragment"},{"name":"isFragmentRelationship","originalName":"isFragmentRelationship","kind":"FunctionDeclaration","signature":"export declare function isFragmentRelationship(rel: CorrelatedSubquery): boolean;","description":"","source":"packages/client/src/query.ts","line":601,"href":"/reference/typescript/wasm/#symbol-isFragmentRelationship"},{"name":"isGeneratorMutator","originalName":"isGeneratorMutator","kind":"FunctionDeclaration","signature":"/** True iff `fn` is a generator function (a shared/isomorphic mutator) rather than a plain function —\n *  the driver accepts both forms. Detected structurally (native `GeneratorFunction`). */\nexport declare function isGeneratorMutator(fn: unknown): fn is (...args: never[]) => MutationGen;","description":"True iff `fn` is a generator function (a shared/isomorphic mutator) rather than a plain function —\nthe driver accepts both forms. Detected structurally (native `GeneratorFunction`).","source":"packages/client/src/mutation-ops.ts","line":217,"href":"/reference/typescript/wasm/#symbol-isGeneratorMutator"},{"name":"isLocalTable","originalName":"isLocalTable","kind":"FunctionDeclaration","signature":"/** Whether `table` is a {@link TableMeta.local local-only} table in `schema` (an unknown table\n *  reads as non-local). The single locality predicate the backends key off. BOTH variants —\n *  `true` and `\"session\"` — are local here; the persisted/ephemeral split matters only to the\n *  persistence plane ({@link persistedLocalTableNames}). */\nexport declare function isLocalTable<S extends ColsMap>(schema: Schema<S>, table: string): boolean;","description":"Whether `table` is a {@link TableMeta.locallocal-only} table in `schema` (an unknown table\nreads as non-local). The single locality predicate the backends key off. BOTH variants —\n`true` and `\"session\"` — are local here; the persisted/ephemeral split matters only to the\npersistence plane ({@link persistedLocalTableNames}).","source":"packages/client/src/schema.ts","line":406,"href":"/reference/typescript/wasm/#symbol-isLocalTable"},{"name":"isNot","originalName":"isNot","kind":"VariableDeclaration","signature":"export declare const isNot: <V>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":39,"href":"/reference/typescript/wasm/#symbol-isNot"},{"name":"isNotNull","originalName":"isNotNull","kind":"VariableDeclaration","signature":"/** `IS NOT NULL` — the negation of {@link isNull}; `V` is inferred from the field, like {@link isNull}. */\nexport declare const isNotNull: <V = never>() => Pred<V>;","description":"`IS NOT NULL` — the negation of {@link isNull}; `V` is inferred from the field, like {@link isNull}.","source":"packages/client/src/operators.ts","line":44,"href":"/reference/typescript/wasm/#symbol-isNotNull"},{"name":"isNull","originalName":"isNull","kind":"VariableDeclaration","signature":"/** `IS NULL` — a field-agnostic null check. `V` is inferred from the field's expected `Arg<V>`\n *  (e.g. `where.signedAt(isNull())`), so it fits a column of any type without a cast. */\nexport declare const isNull: <V = never>() => Pred<V>;","description":"`IS NULL` — a field-agnostic null check. `V` is inferred from the field's expected `Arg<V>`\n(e.g. `where.signedAt(isNull())`), so it fits a column of any type without a cast.","source":"packages/client/src/operators.ts","line":42,"href":"/reference/typescript/wasm/#symbol-isNull"},{"name":"isoTx","originalName":"isoTx","kind":"VariableDeclaration","signature":"/** The one shared effect factory (stateless — see {@link IsoTx}). Its methods just BUILD a\n *  {@link MutationOp}, so the single instance serves every schema; the generic {@link IsoTx} view is\n *  applied at the authoring site (a `json<T>` cell is a parsed object here and is stringified by the\n *  funnels, {@link toCell}), hence the cast — the runtime shape is schema-agnostic. */\nexport declare const isoTx: IsoTx;","description":"The one shared effect factory (stateless — see {@link IsoTx}). Its methods just BUILD a\n{@link MutationOp}, so the single instance serves every schema; the generic {@link IsoTx} view is\napplied at the authoring site (a `json<T>` cell is a parsed object here and is stringified by the\nfunnels, {@link toCell }), hence the cast — the runtime shape is schema-agnostic.","source":"packages/client/src/mutation-ops.ts","line":127,"href":"/reference/typescript/wasm/#symbol-isoTx"},{"name":"IsoTx","originalName":"IsoTx","kind":"InterfaceDeclaration","signature":"/** The tier-AGNOSTIC effect factory a generator mutator writes against. Every method just BUILDS an\n *  effect to `yield` — it performs no I/O and holds no state, so the single {@link isoTx} instance is\n *  shared by every mutator on both tiers; only the driver differs. `insert`/`upsert`/`insertIgnore`\n *  require non-nullable columns and permit nullable omissions, which become `null`.\n *  `update`/`delete` require the PK columns; `update` also names the columns to change. */\nexport interface IsoTx<S extends ColsMap = ColsMap, P extends Record<string, string> = PkMap<S>> {\n    /** Insert a row. Omitted nullable columns become `null`; database defaults are not applied. */\n    insert<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Update the row identified by its pk columns (REQUIRED); only the named non-pk columns change. */\n    update<N extends keyof S & string>(table: N, row: UpdateOf<S[N], PkColsOf<S, P, N>>): MutationOp;\n    /** Insert, or replace non-PK columns on PK conflict, with {@link IsoTx.insert}'s omission rules. */\n    upsert<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Insert with {@link IsoTx.insert}'s omission rules, or do nothing on PK conflict. */\n    insertIgnore<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Delete the row identified by its pk columns. */\n    delete<N extends keyof S & string>(table: N, pk: PkOf<S[N], PkColsOf<S, P, N>>): MutationOp;\n    /** Read one row by primary key (read-your-writes). */\n    row<N extends keyof S & string>(table: N, pk: PkOf<S[N], PkColsOf<S, P, N>>): ReadEffect;\n    /** Run a full query (`where`/`orderBy`/`limit`/join) over the state this mutator is mutating —\n     *  read-your-writes, like {@link row} but for arbitrary shapes. Pass a query from the tier-agnostic\n     *  builder, e.g. `tx.query(q.issue.where(\"ownerId\", \"=\", ctx.user))` where `q = newQueryBuilder(schema)`.\n     *  The `yield` evaluates to {@link QueryResultRow}`[]` (cast it — the generator's single next-type is a row). */\n    query(query: QueryArg): QueryEffect;\n    all(effects: readonly YieldEffect[]): BatchEffect;\n}","description":"The tier-AGNOSTIC effect factory a generator mutator writes against. Every method just BUILDS an\neffect to `yield` — it performs no I/O and holds no state, so the single {@link isoTx} instance is\nshared by every mutator on both tiers; only the driver differs. `insert`/`upsert`/`insertIgnore`\nrequire non-nullable columns and permit nullable omissions, which become `null`.\n`update`/`delete` require the PK columns; `update` also names the columns to change.","source":"packages/client/src/mutation-ops.ts","line":102,"href":"/reference/typescript/wasm/#symbol-IsoTx"},{"name":"IsoTxOf","originalName":"IsoTxOf","kind":"TypeAliasDeclaration","signature":"/** Bind a schema to the mutator authoring surface: `const { shared } = defineMutators(schema)`.\n *\n *  The returned `shared` is the schema-typed twin of the bare {@link shared} — its `tx` is an\n *  {@link IsoTx} parameterized by THIS schema, so `tx.insert`/`update`/`upsert`/`insertIgnore`/`delete`\n *  check the table name, every column name, each column's value type, nullable-omit on inserts, and\n *  the exact primary-key columns on `update`/`delete` — all at compile time. It registers identically\n *  to the bare form (same runtime value, still `satisfies ClientRegistry`, still an isomorphic\n *  generator the server drives): only the AUTHORING types tighten. `schema` is read for its TYPE only\n *  (never at runtime). Reads (`yield tx.row(...)`) stay loosely typed — a generator's single\n *  next-type can't carry a per-table row. */\n/** The typed {@link IsoTx} for a given schema — `IsoTxOf<typeof schema>`. Use it to annotate a helper\n *  that a mutator body passes its `tx` to (e.g. `const ensureUser = (tx: IsoTxOf<typeof schema>, …)`),\n *  so the helper gets the same table/column/pk typing the `defineMutators` `shared` callback does. */\nexport type IsoTxOf<Sch extends Schema> = Sch extends Schema<infer S, infer P> ? IsoTx<S, P> : never;","description":"The typed {@link IsoTx} for a given schema — `IsoTxOf<typeof schema>`. Use it to annotate a helper\nthat a mutator body passes its `tx` to (e.g. `const ensureUser = (tx: IsoTxOf<typeof schema>, …)`),\nso the helper gets the same table/column/pk typing the `defineMutators` `shared` callback does.","source":"packages/client/src/mutation-ops.ts","line":200,"href":"/reference/typescript/wasm/#symbol-IsoTxOf"},{"name":"isPred","originalName":"isPred","kind":"FunctionDeclaration","signature":"export declare function isPred(x: unknown): x is Pred<unknown>;","description":"","source":"packages/client/src/operators.ts","line":22,"href":"/reference/typescript/wasm/#symbol-isPred"},{"name":"isRelationship","originalName":"isRelationship","kind":"FunctionDeclaration","signature":"/** Runtime guard: is `v` a {@link Relationship} value (not a table or a plain object)? */\nexport declare function isRelationship(v: unknown): v is AnyRelationship;","description":"Runtime guard: is `v` a {@link Relationship} value (not a table or a plain object)?","source":"packages/client/src/schema.ts","line":493,"href":"/reference/typescript/wasm/#symbol-isRelationship"},{"name":"isReservedTableName","originalName":"isReservedTableName","kind":"FunctionDeclaration","signature":"/** Whether `name` collides with an engine-reserved synthetic prefix ({@link RESERVED_TABLE_PREFIXES}). */\nexport declare function isReservedTableName(name: string): boolean;","description":"Whether `name` collides with an engine-reserved synthetic prefix ({@link RESERVED_TABLE_PREFIXES}).","source":"packages/client/src/schema.ts","line":223,"href":"/reference/typescript/wasm/#symbol-isReservedTableName"},{"name":"json","originalName":"json","kind":"VariableDeclaration","signature":"export declare const json: <T = unknown>() => ColBuilder<T>;","description":"","source":"packages/client/src/schema.ts","line":49,"href":"/reference/typescript/wasm/#symbol-json"},{"name":"KeyedRow","originalName":"KeyedRow","kind":"TypeAliasDeclaration","signature":"/** A keyed row: column name → cell. The ergonomic write shape (validated against the schema at\n *  runtime). JSON columns carry their raw JSON string (a {@link WireValue}), never a parsed object. */\nexport type KeyedRow = Record<string, WireValue>;","description":"A keyed row: column name → cell. The ergonomic write shape (validated against the schema at\nruntime). JSON columns carry their raw JSON string (a {@link WireValue}), never a parsed object.","source":"packages/client/src/mutation-ops.ts","line":13,"href":"/reference/typescript/wasm/#symbol-KeyedRow"},{"name":"le","originalName":"le","kind":"VariableDeclaration","signature":"export declare const le: <V extends number | string>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":31,"href":"/reference/typescript/wasm/#symbol-le"},{"name":"like","originalName":"like","kind":"VariableDeclaration","signature":"export declare const like: (pattern: string) => Pred<string>;","description":"","source":"packages/client/src/operators.ts","line":32,"href":"/reference/typescript/wasm/#symbol-like"},{"name":"LitValue","originalName":"LitValue","kind":"TypeAliasDeclaration","signature":"/** An untagged literal (`null | bool | number | string | array`). Numbers are one f64. */\nexport type LitValue = null | boolean | number | string | LitValue[];","description":"An untagged literal (`null | bool | number | string | array`). Numbers are one f64.","source":"packages/client/src/ast.ts","line":11,"href":"/reference/typescript/wasm/#symbol-LitValue"},{"name":"LMID_QUERY_NAME","originalName":"LMID_QUERY_NAME","kind":"VariableDeclaration","signature":"/** The reserved server-query name every optimistic client subscribes at connect: the\n *  one-row system query `CLIENT_MUTATIONS_TABLE WHERE client_id = <me>`. The server\n *  derives the identity from the connection (args are ignored). */\nexport declare const LMID_QUERY_NAME = \"_rindle/clientLmid\";","description":"The reserved server-query name every optimistic client subscribes at connect: the\none-row system query `CLIENT_MUTATIONS_TABLE WHERE client_id = <me>`. The server\nderives the identity from the connection (args are ignored).","source":"packages/client/src/types.ts","line":287,"href":"/reference/typescript/wasm/#symbol-LMID_QUERY_NAME"},{"name":"localFragmentReadAst","originalName":"localFragmentReadAst","kind":"FunctionDeclaration","signature":"export declare function localFragmentReadAst<F extends Fragment<any, any, any>>(fragment: F, ref: LocalFragmentRef<F>, primaryKeyFor: (table: string) => readonly string[]): Ast;","description":"","source":"packages/client/src/query.ts","line":655,"href":"/reference/typescript/wasm/#symbol-localFragmentReadAst"},{"name":"LocalFragmentRef","originalName":"LocalFragmentRef","kind":"InterfaceDeclaration","signature":"export interface LocalFragmentRef<F extends Fragment<any, any, any, any> = Fragment<any, any, any, any>> {\n    readonly [LOCAL_FRAGMENT_REF_BRAND]: true;\n    readonly source: \"local\";\n    readonly table: string;\n    readonly pk: Readonly<Record<string, LitValue>>;\n    readonly coverage: FragmentCoverage;\n    readonly __fragment?: F;\n}","description":"","source":"packages/client/src/query.ts","line":553,"href":"/reference/typescript/wasm/#symbol-LocalFragmentRef"},{"name":"localQueryReadAst","originalName":"localQueryReadAst","kind":"FunctionDeclaration","signature":"export declare function localQueryReadAst(query: AnyQuery, primaryKeyFor: (table: string) => readonly string[]): Ast;","description":"","source":"packages/client/src/query.ts","line":687,"href":"/reference/typescript/wasm/#symbol-localQueryReadAst"},{"name":"localRootFragmentRefsAst","originalName":"localRootFragmentRefsAst","kind":"FunctionDeclaration","signature":"export declare function localRootFragmentRefsAst<F extends Fragment<any, any, any>>(fragment: F, query: AnyQuery, primaryKeyFor: (table: string) => readonly string[]): Ast;","description":"","source":"packages/client/src/query.ts","line":670,"href":"/reference/typescript/wasm/#symbol-localRootFragmentRefsAst"},{"name":"localSchemaHash","originalName":"localSchemaHash","kind":"FunctionDeclaration","signature":"/** A stable fingerprint of the schema's PERSISTED local tables only — the persistence gate's\n *  `schemaHash` (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §3.3 / P7). Per `local: true` table:\n *  `(name, ordered column names + types + optionality, pk columns)`. Column order is kept (rows are\n *  positional); tables are sorted by name so registration order can't skew it; synced-table AND\n *  `local: \"session\"` changes never move it (reshaping an ephemeral table must not wipe durable\n *  data). The value is the canonical descriptor itself, not a digest — local-table sets are tiny,\n *  and exactness (no collision can ever skip a P7 clear) beats compactness here. */\nexport declare function localSchemaHash<S extends ColsMap>(schema: Schema<S>): string;","description":"A stable fingerprint of the schema's PERSISTED local tables only — the persistence gate's\n`schemaHash` (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §3.3 / P7). Per `local: true` table:\n`(name, ordered column names + types + optionality, pk columns)`. Column order is kept (rows are\npositional); tables are sorted by name so registration order can't skew it; synced-table AND\n`local: \"session\"` changes never move it (reshaping an ephemeral table must not wipe durable\ndata). The value is the canonical descriptor itself, not a digest — local-table sets are tiny,\nand exactness (no collision can ever skip a P7 clear) beats compactness here.","source":"packages/client/src/schema.ts","line":430,"href":"/reference/typescript/wasm/#symbol-localSchemaHash"},{"name":"localTableNames","originalName":"localTableNames","kind":"FunctionDeclaration","signature":"/** The set of local-only table names in `schema` (`201-LOCAL-ONLY-TABLES-DESIGN.md` §4) — BOTH\n *  variants (`true` and `\"session\"`); every locality rule except persistence keys off this set. */\nexport declare function localTableNames<S extends ColsMap>(schema: Schema<S>): Set<string>;","description":"The set of local-only table names in `schema` (`201-LOCAL-ONLY-TABLES-DESIGN.md` §4) — BOTH\nvariants (`true` and `\"session\"`); every locality rule except persistence keys off this set.","source":"packages/client/src/schema.ts","line":412,"href":"/reference/typescript/wasm/#symbol-localTableNames"},{"name":"lt","originalName":"lt","kind":"VariableDeclaration","signature":"export declare const lt: <V extends number | string>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":30,"href":"/reference/typescript/wasm/#symbol-lt"},{"name":"Mutation","originalName":"Mutation","kind":"TypeAliasDeclaration","signature":"export type Mutation = {\n    op: \"add\";\n    table: string;\n    row: WireValue[];\n} | {\n    op: \"remove\";\n    table: string;\n    row: WireValue[];\n} | {\n    op: \"edit\";\n    table: string;\n    old: WireValue[];\n    new: WireValue[];\n};","description":"","source":"packages/client/src/types.ts","line":89,"href":"/reference/typescript/wasm/#symbol-Mutation"},{"name":"MutationEnvelope","originalName":"MutationEnvelope","kind":"InterfaceDeclaration","signature":"/** The upstream named-mutator envelope (OPTIMISTIC-WRITES-DESIGN.md §8.1): the wire\n *  carries the name + JSON args, never code; `mid` totally orders a client's mutations. */\nexport interface MutationEnvelope {\n    clientID: string;\n    mid: number;\n    name: string;\n    args: unknown;\n}","description":"The upstream named-mutator envelope (OPTIMISTIC-WRITES-DESIGN.md §8.1): the wire\ncarries the name + JSON args, never code; `mid` totally orders a client's mutations.","source":"packages/client/src/types.ts","line":236,"href":"/reference/typescript/wasm/#symbol-MutationEnvelope"},{"name":"MutationGen","originalName":"MutationGen","kind":"TypeAliasDeclaration","signature":"/** What a generator mutator IS: `yield tx.<op>()` on every side effect; a `yield tx.row()` expression\n *  evaluates to the row. Neither sync nor async — the tier's driver decides, which is what lets one\n *  body run synchronously on the client and against a live async transaction on the server. */\nexport type MutationGen = Generator<YieldEffect, void, KeyedRow | undefined>;","description":"What a generator mutator IS: `yield tx.<op>()` on every side effect; a `yield tx.row()` expression\nevaluates to the row. Neither sync nor async — the tier's driver decides, which is what lets one\nbody run synchronously on the client and against a live async transaction on the server.","source":"packages/client/src/mutation-ops.ts","line":148,"href":"/reference/typescript/wasm/#symbol-MutationGen"},{"name":"MutationOp","originalName":"MutationOp","kind":"TypeAliasDeclaration","signature":"/** One structured write intent — the discriminated union that mirrors the write half of the client\n *  `MutationTx` 1:1. Keyed (column-name addressed), so it is independent of column order. */\nexport type MutationOp = {\n    kind: \"insert\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"upsert\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"insertIgnore\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"update\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"delete\";\n    table: string;\n    pk: KeyedRow;\n};","description":"One structured write intent — the discriminated union that mirrors the write half of the client\n`MutationTx` 1:1. Keyed (column-name addressed), so it is independent of column order.","source":"packages/client/src/mutation-ops.ts","line":17,"href":"/reference/typescript/wasm/#symbol-MutationOp"},{"name":"MutationOutcomeFrame","originalName":"MutationOutcomeFrame","kind":"InterfaceDeclaration","signature":"/** A room authority's verdict for a NON-applied mutation (RINDLE-REALTIME-QUERY-ENABLEMENT\n *  §3.3, the deopt handshake; Slice H-iv-b server half / H-v client half). Sent on the author's\n *  own socket for every mutation the room did NOT apply, always BEFORE the lmid ack that burns\n *  the `mid` (same-socket ordering only — the ack may reach the client through another path\n *  first, e.g. a replayed lmid snapshot). Applied mutations send NOTHING: silence + lmid\n *  coverage ⇒ applied.\n *\n *  - `kind: \"deopt\"` — the room's §3.3 commit gate refused the routed mutation (or its\n *    environment fell short, e.g. `tx.query`); the mid is burnt in the ROOM ledger with zero\n *    effects and the client re-enqueues the same logical mutation onto the daemon stream.\n *    `name`/`args` are echoed so the frame is SELF-CONTAINED: a client that already retired the\n *    entry (the burnt-mid confirm won the race, or the frame is a replay re-answer) re-invokes\n *    from the frame alone.\n *  - `kind: \"rejected\"` — FINAL (authz/validation): the mid is burnt the same way and the\n *    prediction snaps back on the ordinary lmid release; no re-route.\n *\n *  `reason` may be absent on a re-answered frame whose record was seeded from journal replay\n *  (the verdict is journaled; the reason is not). */\nexport interface MutationOutcomeFrame {\n    mid: number;\n    kind: \"deopt\" | \"rejected\";\n    reason?: string;\n    /** Echoed on DEOPT frames only (self-contained re-invoke — see above). */\n    name?: string;\n    args?: unknown;\n}","description":"A room authority's verdict for a NON-applied mutation (RINDLE-REALTIME-QUERY-ENABLEMENT\n§3.3, the deopt handshake; Slice H-iv-b server half / H-v client half). Sent on the author's\nown socket for every mutation the room did NOT apply, always BEFORE the lmid ack that burns\nthe `mid` (same-socket ordering only — the ack may reach the client through another path\nfirst, e.g. a replayed lmid snapshot). Applied mutations send NOTHING: silence + lmid\ncoverage ⇒ applied.\n\n- `kind: \"deopt\"` — the room's §3.3 commit gate refused the routed mutation (or its\n  environment fell short, e.g. `tx.query`); the mid is burnt in the ROOM ledger with zero\n  effects and the client re-enqueues the same logical mutation onto the daemon stream.\n  `name`/`args` are echoed so the frame is SELF-CONTAINED: a client that already retired the\n  entry (the burnt-mid confirm won the race, or the frame is a replay re-answer) re-invokes\n  from the frame alone.\n- `kind: \"rejected\"` — FINAL (authz/validation): the mid is burnt the same way and the\n  prediction snaps back on the ordinary lmid release; no re-route.\n\n`reason` may be absent on a re-answered frame whose record was seeded from journal replay\n(the verdict is journaled; the reason is not).","source":"packages/client/src/types.ts","line":261,"href":"/reference/typescript/wasm/#symbol-MutationOutcomeFrame"},{"name":"MutatorCtx","originalName":"MutatorCtx","kind":"InterfaceDeclaration","signature":"/** The minimal per-invocation context a shared mutator sees on BOTH tiers: the acting principal. The\n *  server injects its AUTHENTICATED user; the client injects its local user. (The server's own\n *  `MutationContext` is a superset of this.) */\nexport interface MutatorCtx {\n    user: string;\n}","description":"The minimal per-invocation context a shared mutator sees on BOTH tiers: the acting principal. The\nserver injects its AUTHENTICATED user; the client injects its local user. (The server's own\n`MutationContext` is a superset of this.)","source":"packages/client/src/mutation-ops.ts","line":141,"href":"/reference/typescript/wasm/#symbol-MutatorCtx"},{"name":"NamedQuery","originalName":"NamedQuery","kind":"InterfaceDeclaration","signature":"/**\n * A single, co-located NAMED query (see {@link defineQuery}). It is:\n *   - **callable on the client** — `q(args, ctx?)` validates + builds + stamps the result with its\n *     remote subscription identity (`name` + args — NOT ctx), so a component that imports it always\n *     SYNCS. There is no unstamped builder to import by accident.\n *   - **registerable on the server** — it carries its `queryName` and a `resolve` that re-runs the\n *     SAME validator on untrusted wire args and builds the AUTHORITATIVE `Query` from the server's\n *     own ctx ({@link registerQueries `registerQueries`} in `@rindle/api-server`).\n *\n * `Ctx` is the ctx parameter list mirrored from `build` — `[]`, `[ctx: C]`, or `[ctx?: C]`. It is\n * never part of the wire identity.\n */\nexport interface NamedQuery<Args, Ctx extends readonly unknown[], Q extends AnyQuery> {\n    (args: Args, ...ctx: Ctx): Q;\n    /** The wire identity. The daemon leases by this name; client and server MUST agree on it — which\n     *  they do, because both sides import the SAME `defineQuery` value. */\n    readonly queryName: string;\n    /** The §2.1 realtime label, when this query was defined with one ({@link DefineQueryOptions}).\n     *  Absent on unlabeled queries. Carried onto the stamped built Query too, and preserved through\n     *  `registerQueries` on the server. */\n    readonly realtime?: RealtimeQueryLabel<Args>;\n    /** Server-side: validate raw wire args, then build the authoritative `Query` from the server's\n     *  authoritative ctx (forwarded by `registerQueries`). */\n    resolve(rawArgs: unknown, ...ctx: Ctx): Q;\n}","description":"A single, co-located NAMED query (see {@link defineQuery}). It is:\n  - **callable on the client** — `q(args, ctx?)` validates + builds + stamps the result with its\n    remote subscription identity (`name` + args — NOT ctx), so a component that imports it always\n    SYNCS. There is no unstamped builder to import by accident.\n  - **registerable on the server** — it carries its `queryName` and a `resolve` that re-runs the\n    SAME validator on untrusted wire args and builds the AUTHORITATIVE `Query` from the server's\n    own ctx ({@link registerQueries `registerQueries`} in `@rindle/api-server`).\n\n`Ctx` is the ctx parameter list mirrored from `build` — `[]`, `[ctx: C]`, or `[ctx?: C]`. It is\nnever part of the wire identity.","source":"packages/client/src/query.ts","line":425,"href":"/reference/typescript/wasm/#symbol-NamedQuery"},{"name":"NamedRow","originalName":"NamedRow","kind":"TypeAliasDeclaration","signature":"/** A row named against its level's wire columns. */\nexport type NamedRow = Record<string, WireValue>;","description":"A row named against its level's wire columns.","source":"packages/client/src/resolve.ts","line":26,"href":"/reference/typescript/wasm/#symbol-NamedRow"},{"name":"ne","originalName":"ne","kind":"VariableDeclaration","signature":"export declare const ne: <V>(v: V) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":27,"href":"/reference/typescript/wasm/#symbol-ne"},{"name":"newQueryBuilder","originalName":"newQueryBuilder","kind":"FunctionDeclaration","signature":"/** A schema-bound query-builder factory for portable client/server query definitions. SERVER\n *  scope: local-only tables are excluded (a named/remote query may never reference one). */\nexport declare function newQueryBuilder<S extends ColsMap>(schema: Schema<S>): QueryRoot<S>;","description":"A schema-bound query-builder factory for portable client/server query definitions. SERVER\nscope: local-only tables are excluded (a named/remote query may never reference one).","source":"packages/client/src/query.ts","line":1333,"href":"/reference/typescript/wasm/#symbol-newQueryBuilder"},{"name":"NormalizedEvent","originalName":"NormalizedEvent","kind":"TypeAliasDeclaration","signature":"/**\n * A per-query NORMALIZED stream event — the path-free twin of {@link ChangeEvent}. The\n * `hello` carries the flat per-table schemas (no nested view schema, §3); `snapshot`/`batch`\n * carry table-tagged {@link NormalizedOp}s. The `NormalizedSync` layer folds these into the\n * local engine's base tables.\n *\n * `cv` (the global commit version the frame's data reflects — OPTIMISTIC-WRITES-DESIGN.md\n * §8.3/§8.6) is present on sources that speak the optimistic protocol; the plain normalized\n * path may omit it.\n */\nexport type NormalizedEvent = {\n    type: \"hello\";\n    tables: NormalizedTableSchema[];\n    comparatorVersion: number;\n    normalizedFp: string;\n} | {\n    type: \"snapshot\";\n    ops: NormalizedOp[];\n    cv?: number;\n} | {\n    type: \"batch\";\n    ops: NormalizedOp[];\n    cv?: number;\n};","description":"A per-query NORMALIZED stream event — the path-free twin of {@link ChangeEvent}. The\n`hello` carries the flat per-table schemas (no nested view schema, §3); `snapshot`/`batch`\ncarry table-tagged {@link NormalizedOp}s. The `NormalizedSync` layer folds these into the\nlocal engine's base tables.\n\n`cv` (the global commit version the frame's data reflects — OPTIMISTIC-WRITES-DESIGN.md\n§8.3/§8.6) is present on sources that speak the optimistic protocol; the plain normalized\npath may omit it.","source":"packages/client/src/types.ts","line":123,"href":"/reference/typescript/wasm/#symbol-NormalizedEvent"},{"name":"NormalizedOp","originalName":"NormalizedOp","kind":"TypeAliasDeclaration","signature":"/**\n * A table-tagged, path-free row delta — the **normalized** wire payload (the path-free twin\n * of {@link FlatChange}; NORMALIZED-CHANGES-DESIGN.md §3). Rows are positional (bare cells; a\n * json column is its raw JSON string). `op` is the discriminant. Lives here (not in\n * `@rindle/normalized`) so both the protocol (`@rindle/remote`) and the sync layer share one type.\n */\nexport type NormalizedOp = {\n    table: string;\n    op: \"add\";\n    row: WireValue[];\n} | {\n    table: string;\n    op: \"remove\";\n    row: WireValue[];\n} | {\n    table: string;\n    op: \"edit\";\n    old: WireValue[];\n    new: WireValue[];\n};","description":"A table-tagged, path-free row delta — the **normalized** wire payload (the path-free twin\nof {@link FlatChange}; NORMALIZED-CHANGES-DESIGN.md §3). Rows are positional (bare cells; a\njson column is its raw JSON string). `op` is the discriminant. Lives here (not in\n`@rindle/normalized`) so both the protocol (`@rindle/remote`) and the sync layer share one type.","source":"packages/client/src/types.ts","line":100,"href":"/reference/typescript/wasm/#symbol-NormalizedOp"},{"name":"NormalizedSource","originalName":"NormalizedSource","kind":"InterfaceDeclaration","signature":"/**\n * The server side of the **normalized** local-first path (NORMALIZED-CHANGES-DESIGN.md §5/§7):\n * registers queries and pushes each one's normalized footprint stream ({@link NormalizedEvent}s).\n * Both the in-process native (`@rindle/replica`) source and the ws (`@rindle/remote`\n * `RemoteNormalizedSource`) implement it; `@rindle/normalized`'s `NormalizedBackend` consumes one,\n * never knowing which — a sibling seam of {@link Backend} for the normalized composition.\n */\nexport interface NormalizedSource {\n    registerQuery(queryId: QueryId, remote: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Send base-table writes to the server; the authoritative stream flows back. */\n    mutate(mutations: Mutation[]): Promise<void>;\n    onNormalized(handler: (queryId: QueryId, event: NormalizedEvent) => void): void;\n    /** Optional: the backend hands its OWN typed per-table schemas so the source can validate\n     *  each server `hello` against them (column order / PK by name) and reject a schema skew\n     *  rather than silently transposing positional cells (CRIT#4 / §3 \"drift ⇒ re-subscribe\").\n     *  Sources that can't skew (the in-process native source) may omit it. */\n    expectClientSchema?(tables: NormalizedTableSchema[]): void;\n}","description":"The server side of the **normalized** local-first path (NORMALIZED-CHANGES-DESIGN.md §5/§7):\nregisters queries and pushes each one's normalized footprint stream ({@link NormalizedEvent}s).\nBoth the in-process native (`@rindle/replica`) source and the ws (`@rindle/remote`\n`RemoteNormalizedSource`) implement it; `@rindle/normalized`'s `NormalizedBackend` consumes one,\nnever knowing which — a sibling seam of {@link Backend} for the normalized composition.","source":"packages/client/src/types.ts","line":221,"href":"/reference/typescript/wasm/#symbol-NormalizedSource"},{"name":"NormalizedTableSchema","originalName":"NormalizedTableSchema","kind":"InterfaceDeclaration","signature":"/** One base table's flat schema on the normalized `hello` (§3): column names (in order) +\n *  primary-key column indices. Wire rows are positional against `columns`. */\nexport interface NormalizedTableSchema {\n    name: string;\n    columns: string[];\n    primaryKey: number[];\n}","description":"One base table's flat schema on the normalized `hello` (§3): column names (in order) +\nprimary-key column indices. Wire rows are positional against `columns`.","source":"packages/client/src/types.ts","line":107,"href":"/reference/typescript/wasm/#symbol-NormalizedTableSchema"},{"name":"normalizedTableSchemas","originalName":"normalizedTableSchemas","kind":"FunctionDeclaration","signature":"/** The client's per-table flat schema (name + column order + PK indices), the shape a\n *  normalized `hello` advertises (NORMALIZED-CHANGES-DESIGN.md §3). Used to validate a\n *  server hello against the CLIENT's own typed schema so a column-order / PK skew is caught\n *  instead of silently transposing positional cells (CRIT#4). Sorted by name for stable\n *  ordering.\n *\n *  Local-only tables are **omitted** (`201-LOCAL-ONLY-TABLES-DESIGN.md` E1): the client never\n *  claims them to the server, the server never expects/ships them, and they stay out of the schema\n *  fingerprint (`normalizedFp`) so a local table can't skew it vs. the server's. */\nexport declare function normalizedTableSchemas<S extends ColsMap>(schema: Schema<S>): {\n    name: string;\n    columns: string[];\n    primaryKey: number[];\n}[];","description":"The client's per-table flat schema (name + column order + PK indices), the shape a\nnormalized `hello` advertises (NORMALIZED-CHANGES-DESIGN.md §3). Used to validate a\nserver hello against the CLIENT's own typed schema so a column-order / PK skew is caught\ninstead of silently transposing positional cells (CRIT#4). Sorted by name for stable\nordering.\n\nLocal-only tables are **omitted** (`201-LOCAL-ONLY-TABLES-DESIGN.md` E1): the client never\nclaims them to the server, the server never expects/ships them, and they stay out of the schema\nfingerprint (`normalizedFp`) so a local table can't skew it vs. the server's.","source":"packages/client/src/schema.ts","line":550,"href":"/reference/typescript/wasm/#symbol-normalizedTableSchemas"},{"name":"notExists","originalName":"notExists","kind":"FunctionDeclaration","signature":"/** `NOT EXISTS` by a named {@link Relationship}. */\nexport declare function notExists<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<RowOf<PC>>;\n/** `NOT EXISTS (<correlated subquery>)`. */\nexport declare function notExists<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<R>;","description":"`NOT EXISTS` by a named {@link Relationship}.\n`NOT EXISTS (<correlated subquery>)`.","source":"packages/client/src/query.ts","line":1229,"href":"/reference/typescript/wasm/#symbol-notExists"},{"name":"notExistsNoSync","originalName":"notExistsNoSync","kind":"FunctionDeclaration","signature":"/** `NOT EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate — the `NOT EXISTS` form of {@link existsNoSync} (a deny-style permission rule). */\nexport declare function notExistsNoSync<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<RowOf<PC>>;\nexport declare function notExistsNoSync<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<R>;","description":"`NOT EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate — the `NOT EXISTS` form of {@link existsNoSync} (a deny-style permission rule).","source":"packages/client/src/query.ts","line":1270,"href":"/reference/typescript/wasm/#symbol-notExistsNoSync"},{"name":"notIlike","originalName":"notIlike","kind":"VariableDeclaration","signature":"export declare const notIlike: (pattern: string) => Pred<string>;","description":"","source":"packages/client/src/operators.ts","line":35,"href":"/reference/typescript/wasm/#symbol-notIlike"},{"name":"notInList","originalName":"notInList","kind":"VariableDeclaration","signature":"export declare const notInList: <V>(values: V[]) => Pred<V>;","description":"","source":"packages/client/src/operators.ts","line":37,"href":"/reference/typescript/wasm/#symbol-notInList"},{"name":"notLike","originalName":"notLike","kind":"VariableDeclaration","signature":"export declare const notLike: (pattern: string) => Pred<string>;","description":"","source":"packages/client/src/operators.ts","line":33,"href":"/reference/typescript/wasm/#symbol-notLike"},{"name":"number","originalName":"number","kind":"VariableDeclaration","signature":"export declare const number: <T extends number = number>() => ColBuilder<T>;","description":"","source":"packages/client/src/schema.ts","line":47,"href":"/reference/typescript/wasm/#symbol-number"},{"name":"OneShotBackend","originalName":"OneShotBackend","kind":"ClassDeclaration","signature":"/**\n * A no-op live backend for SSR (SSR-DESIGN.md §6.1): it opens no transport and never streams.\n * `registerQuery` is inert, `mutate` rejects, and no `ChangeEvent` is pushed. Every view stays\n * PENDING — reading its SSR {@link Store.seedAssembled seed} — and, lacking `onResultType`,\n * reports `complete` (a backend with no server lifecycle leaves every view authoritative).\n */\nexport declare class OneShotBackend implements Backend {\n    registerQuery(_qid: QueryId, _ast: unknown, _remote?: RemoteQuery): void;\n    unregisterQuery(_qid: QueryId): void;\n    mutate(_mutations: Mutation[]): Promise<void>;\n    onEvent(_handler: (queryId: QueryId, event: ChangeEvent) => void): void;\n}","description":"A no-op live backend for SSR (SSR-DESIGN.md §6.1): it opens no transport and never streams.\n`registerQuery` is inert, `mutate` rejects, and no `ChangeEvent` is pushed. Every view stays\nPENDING — reading its SSR {@link Store.seedAssembledseed} — and, lacking `onResultType`,\nreports `complete` (a backend with no server lifecycle leaves every view authoritative).","source":"packages/client/src/ssr.ts","line":48,"href":"/reference/typescript/wasm/#symbol-OneShotBackend"},{"name":"OneShotQueryFn","originalName":"OneShotQueryFn","kind":"TypeAliasDeclaration","signature":"/** The one-shot read the server Store calls to preload a query. Two topologies inject different\n *  fns (SSR-DESIGN.md §6):\n *\n *   - **Direct to the daemon** (the trusted tier holds the daemon token): use `ast` —\n *     `(i) => daemon.query(i)`.\n *   - **Through the application's API tier** (the authority resolves names → ASTs, the loader never\n *     sends a raw AST): use `name`/`args` — `(i) => fetch('/api/rindle/read', {name: i.name, args: i.args})`.\n *\n *  `ast` is always present (the Store seeds the local view by its `viewKey`); `name`/`args` are\n *  present when the preloaded query came from `defineQuery`. This Store does not authenticate\n *  users or filter rows. The injected function must enforce access: either call the authenticated\n *  API route, or authorize and construct the AST before a privileged direct daemon read. */\nexport type OneShotQueryFn = (input: {\n    ast: unknown;\n    name?: string;\n    args?: unknown;\n    visibilityKey?: string;\n    ttlMs?: number;\n}) => Promise<OneShotResult>;","description":"The one-shot read the server Store calls to preload a query. Two topologies inject different\nfns (SSR-DESIGN.md §6):\n\n - **Direct to the daemon** (the trusted tier holds the daemon token): use `ast` —\n   `(i) => daemon.query(i)`.\n - **Through the application's API tier** (the authority resolves names → ASTs, the loader never\n   sends a raw AST): use `name`/`args` — `(i) => fetch('/api/rindle/read', {name: i.name, args: i.args})`.\n\n`ast` is always present (the Store seeds the local view by its `viewKey`); `name`/`args` are\npresent when the preloaded query came from `defineQuery`. This Store does not authenticate\nusers or filter rows. The injected function must enforce access: either call the authenticated\nAPI route, or authorize and construct the AST before a privileged direct daemon read.","source":"packages/client/src/ssr.ts","line":38,"href":"/reference/typescript/wasm/#symbol-OneShotQueryFn"},{"name":"OneShotResult","originalName":"OneShotResult","kind":"InterfaceDeclaration","signature":"/** An authorized one-shot read result, as far as the server Store needs it: the\n *  assembled rows plus the `cvMin` baseline they reflect. (Matches `@rindle/daemon-client`'s\n *  `QueryOnceOutput`, but `@rindle/client` stays dependency-free — inject the call.) */\nexport interface OneShotResult {\n    rows: AssembledNode[];\n    cvMin?: number;\n}","description":"An authorized one-shot read result, as far as the server Store needs it: the\nassembled rows plus the `cvMin` baseline they reflect. (Matches `@rindle/daemon-client`'s\n`QueryOnceOutput`, but `@rindle/client` stays dependency-free — inject the call.)","source":"packages/client/src/ssr.ts","line":21,"href":"/reference/typescript/wasm/#symbol-OneShotResult"},{"name":"OptimisticSource","originalName":"OptimisticSource","kind":"InterfaceDeclaration","signature":"/**\n * The server side of the OPTIMISTIC path (OPTIMISTIC-WRITES-DESIGN.md §8): the\n * {@link NormalizedSource} stream with `cv`-tagged data frames, plus the connection-level\n * {@link ProgressFrame} channel and the named-mutator upstream. The client buffers data\n * frames by `cv` and applies all `cv ≤ cvMin` as one coherent release (§8.5).\n */\nexport interface OptimisticSource {\n    registerQuery(queryId: QueryId, remote: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Ship one named-mutator invocation upstream (§8.1). Confirmation rides the progress frames. */\n    pushMutation(envelope: MutationEnvelope): Promise<void>;\n    onNormalized(handler: (queryId: QueryId, event: NormalizedEvent) => void): void;\n    onProgress(handler: (frame: ProgressFrame) => void): void;\n    /** Optional: the backend hands its OWN typed per-table schemas so the source validates each\n     *  server `hello` against them and rejects a schema skew (CRIT#4); see {@link NormalizedSource}. */\n    expectClientSchema?(tables: NormalizedTableSchema[]): void;\n    /** Optional: fired when the server restarts (a transport that can detect it, e.g. via a daemon\n     *  boot id). The backend resets its `cv` watermark so the server's reset `cv` sequence is\n     *  accepted rather than dropped as stale. In-process sources never restart and omit it. */\n    onRestart?(handler: () => void): void;\n    /** Optional (Slice H-v): the channel's {@link MutationOutcomeFrame} stream — the room deopt\n     *  handshake's client half. **OUT-OF-BAND BY DESIGN**: the frame carries no `cv` and the source\n     *  MUST dispatch it immediately on arrival, never behind the cv buffer — a deopt has to migrate\n     *  its pending entry BEFORE the buffered lmid release that would otherwise retire it as a\n     *  success (and the §7.3 hold-back trigger, keyed on the entry's confirming domain, would then\n     *  park its staged writes the wrong way). Sources whose authority never deopts (the in-process\n     *  native source, a plain daemon) omit it. */\n    onMutationOutcome?(handler: (frame: MutationOutcomeFrame) => void): void;\n    /** Optional (Slice H-v, the §7.5 rule-3 crash-window closer): fired when the transport\n     *  RE-establishes its session (reconnect → re-`init`), BEFORE any post-reconnect frame is\n     *  processed — the ordering is load-bearing: the re-subscribed lmid stream's fresh snapshot may\n     *  cover a mid whose `mutationOutcome` frame died with the old socket, and once that release\n     *  retires the entry as an apparent success there is nothing left to re-send. The backend\n     *  re-sends this domain's unconfirmed pending envelopes with their ORIGINAL mids, in mid order;\n     *  the source may DEFER their delivery until the session is re-authorized (a room's\n     *  `pushMutation` requires the lease-token subscribe's subject). Idempotent under the domain's\n     *  own ledger — a processed mid dedups silently (silence + lmid coverage ⇒ applied), a\n     *  non-applied mid is re-answered from the authority's recorded-outcome map (resolving even an\n     *  already-retired entry through the handshake's not-found arm). Distinct from\n     *  {@link onRestart} (a NEW server incarnation): a same-incarnation socket drop re-syncs\n     *  without restarting, and envelopes sent into the dead socket are exactly what this recovers.\n     *  In-process sources never drop a session and omit it. */\n    onResync?(handler: () => void): void;\n}","description":"The server side of the OPTIMISTIC path (OPTIMISTIC-WRITES-DESIGN.md §8): the\n{@link NormalizedSource} stream with `cv`-tagged data frames, plus the connection-level\n{@link ProgressFrame} channel and the named-mutator upstream. The client buffers data\nframes by `cv` and applies all `cv ≤ cvMin` as one coherent release (§8.5).","source":"packages/client/src/types.ts","line":303,"href":"/reference/typescript/wasm/#symbol-OptimisticSource"},{"name":"or","originalName":"or","kind":"FunctionDeclaration","signature":"/** At least one child must hold. */\nexport declare function or<R>(...conds: Cond<R>[]): Cond<R>;","description":"At least one child must hold.","source":"packages/client/src/operators.ts","line":71,"href":"/reference/typescript/wasm/#symbol-or"},{"name":"OrderPart","originalName":"OrderPart","kind":"TypeAliasDeclaration","signature":"/** One `(field, direction)` ordering — serializes as the 2-tuple `[\"id\", \"asc\"]`. */\nexport type OrderPart = [\n    field: string,\n    dir: Dir\n];","description":"One `(field, direction)` ordering — serializes as the 2-tuple `[\"id\", \"asc\"]`.","source":"packages/client/src/ast.ts","line":8,"href":"/reference/typescript/wasm/#symbol-OrderPart"},{"name":"PathSeg","originalName":"PathSeg","kind":"InterfaceDeclaration","signature":"export interface PathSeg {\n    rel: number;\n    parentRow: WireValue[];\n}","description":"","source":"packages/client/src/types.ts","line":54,"href":"/reference/typescript/wasm/#symbol-PathSeg"},{"name":"persistedLocalTableNames","originalName":"persistedLocalTableNames","kind":"FunctionDeclaration","signature":"/** The subset of {@link localTableNames} eligible for the persistence plane — `local: true` only.\n *  A `local: \"session\"` table stays outside it: never persisted, never replicated across tabs\n *  (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §5.4). */\nexport declare function persistedLocalTableNames<S extends ColsMap>(schema: Schema<S>): Set<string>;","description":"The subset of {@link localTableNames} eligible for the persistence plane — `local: true` only.\nA `local: \"session\"` table stays outside it: never persisted, never replicated across tabs\n(`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §5.4).","source":"packages/client/src/schema.ts","line":419,"href":"/reference/typescript/wasm/#symbol-persistedLocalTableNames"},{"name":"PkColsOf","originalName":"PkColsOf","kind":"TypeAliasDeclaration","signature":"/** The primary-key column union for table `N` of a schema, read from its `__pk` map `P` and narrowed\n *  to `N`'s actual columns (falling back to all columns when `P` doesn't name `N` — e.g. the loose\n *  default schema). Feeds {@link PkOf}/{@link UpdateOf} in the typed mutator tx. */\nexport type PkColsOf<S extends ColsMap, P extends Record<string, string>, N extends keyof S> = (N extends keyof P ? P[N] : keyof S[N] & string) & keyof S[N] & string;","description":"The primary-key column union for table `N` of a schema, read from its `__pk` map `P` and narrowed\nto `N`'s actual columns (falling back to all columns when `P` doesn't name `N` — e.g. the loose\ndefault schema). Feeds {@link PkOf}/{@link UpdateOf} in the typed mutator tx.","source":"packages/client/src/schema.ts","line":152,"href":"/reference/typescript/wasm/#symbol-PkColsOf"},{"name":"PkMap","originalName":"PkMap","kind":"TypeAliasDeclaration","signature":"/** name → (some subset of its column names): the loose shape a {@link Schema}'s pk-map satisfies. The\n *  fallback when a schema wasn't built through {@link createSchema} — every column could be the pk. */\nexport type PkMap<S extends ColsMap> = {\n    [N in keyof S]: keyof S[N] & string;\n};","description":"name → (some subset of its column names): the loose shape a {@link Schema}'s pk-map satisfies. The\nfallback when a schema wasn't built through {@link createSchema} — every column could be the pk.","source":"packages/client/src/schema.ts","line":203,"href":"/reference/typescript/wasm/#symbol-PkMap"},{"name":"PkMapOf","originalName":"PkMapOf","kind":"TypeAliasDeclaration","signature":"/** name → its primary-key column union, derived from the tables array (the PK captured by the\n *  `primaryKey(...)` builder). Powers the mutator tx's typed `update`/`delete`/`row` pk args. */\nexport type PkMapOf<T extends readonly AnyTable[]> = {\n    [E in T[number] as E[typeof SCHEMA][\"name\"]]: E[typeof SCHEMA][\"primaryKey\"][number];\n};","description":"name → its primary-key column union, derived from the tables array (the PK captured by the\n`primaryKey(...)` builder). Powers the mutator tx's typed `update`/`delete`/`row` pk args.","source":"packages/client/src/schema.ts","line":194,"href":"/reference/typescript/wasm/#symbol-PkMapOf"},{"name":"PkOf","originalName":"PkOf","kind":"TypeAliasDeclaration","signature":"/** The exact PRIMARY-KEY columns of a table (each typed), required — the identity a `delete`/`row`,\n *  and the WHERE half of an `update`, take. `PK` is the table's pk-column union (the schema's `__pk`). */\nexport type PkOf<C extends AnyCols, PK extends string> = {\n    [K in PK & keyof C]: ColT<C[K & keyof C]>;\n};","description":"The exact PRIMARY-KEY columns of a table (each typed), required — the identity a `delete`/`row`,\nand the WHERE half of an `update`, take. `PK` is the table's pk-column union (the schema's `__pk`).","source":"packages/client/src/schema.ts","line":140,"href":"/reference/typescript/wasm/#symbol-PkOf"},{"name":"Pred","originalName":"Pred","kind":"InterfaceDeclaration","signature":"/** A value predicate (an operator applied to a value). `V` is a phantom for type-checking. */\nexport interface Pred<V> {\n    readonly [PRED]: true;\n    readonly op: SimpleOp;\n    readonly value: LitValue;\n    readonly __v?: V;\n}","description":"A value predicate (an operator applied to a value). `V` is a phantom for type-checking.","source":"packages/client/src/operators.ts","line":11,"href":"/reference/typescript/wasm/#symbol-Pred"},{"name":"ProgressFrame","originalName":"ProgressFrame","kind":"InterfaceDeclaration","signature":"/** The connection-level progress frame (§8.6): advances the coherent-apply release point\n *  (`cvMin`). A pure release signal — mutation confirmation does NOT ride it: `lmid` is a\n *  row in {@link CLIENT_MUTATIONS_TABLE}, delivered through the client's own per-client\n *  system query ({@link LMID_QUERY_NAME}) like any data, so it is released by the same\n *  `cvMin` as the commit's effects (transactionally coherent by construction). */\nexport interface ProgressFrame {\n    cvMin: number;\n}","description":"The connection-level progress frame (§8.6): advances the coherent-apply release point\n(`cvMin`). A pure release signal — mutation confirmation does NOT ride it: `lmid` is a\nrow in {@link CLIENT_MUTATIONS_TABLE}, delivered through the client's own per-client\nsystem query ({@link LMID_QUERY_NAME}) like any data, so it is released by the same\n`cvMin` as the commit's effects (transactionally coherent by construction).","source":"packages/client/src/types.ts","line":275,"href":"/reference/typescript/wasm/#symbol-ProgressFrame"},{"name":"queries","originalName":"queries","kind":"FunctionDeclaration","signature":"/** A typed query entry over a schema: `queries(schema).issue.where.closed(false)…`. */\nexport declare function queries<S extends ColsMap>(schema: Schema<S>, onMaterialize?: (query: AnyQuery) => unknown, opts?: QueriesOptions): QueryRoot<S>;","description":"A typed query entry over a schema: `queries(schema).issue.where.closed(false)…`.","source":"packages/client/src/query.ts","line":1297,"href":"/reference/typescript/wasm/#symbol-queries"},{"name":"QueriesOptions","originalName":"QueriesOptions","kind":"InterfaceDeclaration","signature":"/** Scoping for {@link queries} (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5). */\nexport interface QueriesOptions {\n    /** Include {@link TableMeta.local local-only} tables in the builder's root scope. The **local**\n     *  builder (`store.query`) sets this; the **server** builder ({@link newQueryBuilder}) does NOT,\n     *  so naming a local table in a remote/named query is a build error (Q1 / E3 client half). */\n    includeLocal?: boolean;\n}","description":"Scoping for {@link queries} (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5).","source":"packages/client/src/query.ts","line":1289,"href":"/reference/typescript/wasm/#symbol-QueriesOptions"},{"name":"Query","originalName":"Query","kind":"TypeAliasDeclaration","signature":"export type Query<C extends AnyCols, Rels = {}, One extends boolean = false, Sel extends string = never, LocalRels = Rels, Agg = false> = Omit<QueryBase<C, Rels, One, Sel, LocalRels, Agg>, \"where\"> & {\n    where: QueryBase<C, Rels, One, Sel, LocalRels, Agg>[\"where\"] & WhereProxy<C, Rels, One, Sel, LocalRels>;\n} & WhereSugar<C, Rels, One, Sel, LocalRels>;","description":"","source":"packages/client/src/query.ts","line":296,"href":"/reference/typescript/wasm/#symbol-Query"},{"name":"QueryArg","originalName":"QueryArg","kind":"TypeAliasDeclaration","signature":"/** What {@link IsoTx.query} accepts: a query handle whose `.ast()` lowers to the wire {@link Ast} —\n *  exactly what the typed query builder produces (`newQueryBuilder(schema).<table>…`, the tier-agnostic\n *  server-scope builder both tiers can construct because it performs no I/O). Structural so the seam\n *  need not carry the builder's heavy generics. */\nexport type QueryArg = {\n    ast(): Ast;\n};","description":"What {@link IsoTx.query} accepts: a query handle whose `.ast()` lowers to the wire {@link Ast} —\nexactly what the typed query builder produces (`newQueryBuilder(schema).<table>…`, the tier-agnostic\nserver-scope builder both tiers can construct because it performs no I/O). Structural so the seam\nneed not carry the builder's heavy generics.","source":"packages/client/src/mutation-ops.ts","line":84,"href":"/reference/typescript/wasm/#symbol-QueryArg"},{"name":"QueryBuilder","originalName":"QueryBuilder","kind":"TypeAliasDeclaration","signature":"/**\n * Build a `Query` (an `Ast` constructor) from already-validated args, plus an optional CONTEXT — the\n * authenticated principal the query is scoped to. `Ctx` is **off-wire**: the client passes its own\n * session ctx at the callsite, the server injects the AUTHORITATIVE ctx ({@link NamedQuery.resolve}\n * via `registerQueries`), and the wire still carries only `name` + args. Both tiers run the same\n * `build`, so whenever their ctx agrees the AST is byte-identical — and a client can never spoof it,\n * since the server re-derives ctx from its trusted session and ignores anything the client claimed.\n *\n * The ctx is a *tuple* so a query opts into it by how it types `build`'s second parameter — and that\n * shape becomes the call signature verbatim:\n *   - `(args) => Q` — no ctx (`q(args)`).\n *   - `(args, ctx: C) => Q` — ctx REQUIRED (`q(args, ctx)`); for always-authenticated queries.\n *   - `(args, ctx?: C) => Q` — ctx OPTIONAL (`q(args)` or `q(args, ctx)`); sound only when \"no ctx\"\n *     is a real, SYMMETRIC state — i.e. the build yields the SAME broad AST whether ctx is absent or\n *     present-with-no-user (anonymous / SSR), since the server always forwards a ctx (possibly\n *     anonymous). Otherwise type ctx required so the type catches an omitted ctx.\n */\nexport type QueryBuilder<Args, Q extends AnyQuery, Ctx extends readonly unknown[] = [\n]> = (args: Args, ...ctx: Ctx) => Q;","description":"Build a `Query` (an `Ast` constructor) from already-validated args, plus an optional CONTEXT — the\nauthenticated principal the query is scoped to. `Ctx` is **off-wire**: the client passes its own\nsession ctx at the callsite, the server injects the AUTHORITATIVE ctx ({@link NamedQuery.resolve}\nvia `registerQueries`), and the wire still carries only `name` + args. Both tiers run the same\n`build`, so whenever their ctx agrees the AST is byte-identical — and a client can never spoof it,\nsince the server re-derives ctx from its trusted session and ignores anything the client claimed.\n\nThe ctx is a *tuple* so a query opts into it by how it types `build`'s second parameter — and that\nshape becomes the call signature verbatim:\n  - `(args) => Q` — no ctx (`q(args)`).\n  - `(args, ctx: C) => Q` — ctx REQUIRED (`q(args, ctx)`); for always-authenticated queries.\n  - `(args, ctx?: C) => Q` — ctx OPTIONAL (`q(args)` or `q(args, ctx)`); sound only when \"no ctx\"\n    is a real, SYMMETRIC state — i.e. the build yields the SAME broad AST whether ctx is absent or\n    present-with-no-user (anonymous / SSR), since the server always forwards a ctx (possibly\n    anonymous). Otherwise type ctx required so the type catches an omitted ctx.","source":"packages/client/src/query.ts","line":358,"href":"/reference/typescript/wasm/#symbol-QueryBuilder"},{"name":"QueryEffect","originalName":"QueryEffect","kind":"TypeAliasDeclaration","signature":"/** A full-shape read a generator mutator yields — a `where`/`orderBy`/`limit`/join query over the\n *  state this mutator is mutating (read-your-writes, like {@link ReadEffect} but an arbitrary shape).\n *  Evaluates to {@link QueryResultRow}`[]` — ALWAYS an array of the matching rows, in the query's\n *  order, on BOTH tiers (a root `.one()` is not unwrapped here: take `[0]`). The single next-type is\n *  a row, so cast the yield (`(yield tx.query(q)) as unknown as QueryResultRow[]`), same as `all`. */\nexport type QueryEffect = {\n    kind: \"query\";\n    query: QueryArg;\n};","description":"A full-shape read a generator mutator yields — a `where`/`orderBy`/`limit`/join query over the\nstate this mutator is mutating (read-your-writes, like {@link ReadEffect} but an arbitrary shape).\nEvaluates to {@link QueryResultRow}`[]` — ALWAYS an array of the matching rows, in the query's\norder, on BOTH tiers (a root `.one()` is not unwrapped here: take `[0]`). The single next-type is\na row, so cast the yield (`(yield tx.query(q)) as unknown as QueryResultRow[]`), same as `all`.","source":"packages/client/src/mutation-ops.ts","line":91,"href":"/reference/typescript/wasm/#symbol-QueryEffect"},{"name":"QueryEnsureCache","originalName":"QueryEnsureCache","kind":"ClassDeclaration","signature":"/**\n * Deduplicates route/intent preloads and holds their live view through the navigation handoff.\n *\n * The cache materializes the real named query rather than retaining sync coverage alone: that is\n * what makes `until: \"present\"` observable for overlapping queries already satisfied by local\n * normalized rows. Once the server marks the query complete, the entry is kept briefly for a\n * destination component to take its own retain, then released automatically.\n */\nexport declare class QueryEnsureCache<S extends ColsMap> implements QueryEnsurer {\n    private readonly store;\n    private readonly releaseDelayMs;\n    private readonly maxEntries;\n    private readonly entries;\n    private closed;\n    constructor(store: Store<S>, options?: QueryEnsureCacheOptions);\n    /**\n     * Ensure a named query is retained, resolving according to `options.until`.\n     *\n     * Concurrent calls for the same `(name, args, AST)` share one materialized view and one remote\n     * subscription. A `present` call can resolve from local rows while a concurrent `complete` call\n     * continues waiting for server authority.\n     */\n    ensure<Q extends AnyQuery>(query: Q, options?: EnsureQueryOptions): Promise<void>;\n    /** Release every retained preload and reject outstanding waits. Idempotent. */\n    close(): void;\n    /** Number of retained query entries (primarily useful for tests/devtools). */\n    size(): number;\n    private createEntry;\n    private inspect;\n    private isReady;\n    private touch;\n    private scheduleRelease;\n    private trim;\n    private dispose;\n    private queryError;\n    private detachAbort;\n}","description":"Deduplicates route/intent preloads and holds their live view through the navigation handoff.\n\nThe cache materializes the real named query rather than retaining sync coverage alone: that is\nwhat makes `until: \"present\"` observable for overlapping queries already satisfied by local\nnormalized rows. Once the server marks the query complete, the entry is kept briefly for a\ndestination component to take its own retain, then released automatically.","source":"packages/client/src/ensure.ts","line":76,"href":"/reference/typescript/wasm/#symbol-QueryEnsureCache"},{"name":"QueryEnsureCacheOptions","originalName":"QueryEnsureCacheOptions","kind":"InterfaceDeclaration","signature":"export interface QueryEnsureCacheOptions {\n    /** Keep a completed preload alive for this long so the destination can adopt its rows. */\n    releaseDelayMs?: number;\n    /** Bound retained preloads. In-flight waits are never evicted. */\n    maxEntries?: number;\n}","description":"","source":"packages/client/src/ensure.ts","line":29,"href":"/reference/typescript/wasm/#symbol-QueryEnsureCacheOptions"},{"name":"QueryEnsurer","originalName":"QueryEnsurer","kind":"InterfaceDeclaration","signature":"/** The structural surface consumed by framework adapters such as `@rindle/tanstack`. */\nexport interface QueryEnsurer {\n    ensure(query: AnyQuery, options?: EnsureQueryOptions): Promise<void>;\n}","description":"The structural surface consumed by framework adapters such as `@rindle/tanstack`.","source":"packages/client/src/ensure.ts","line":37,"href":"/reference/typescript/wasm/#symbol-QueryEnsurer"},{"name":"queryFromAst","originalName":"queryFromAst","kind":"FunctionDeclaration","signature":"export declare function queryFromAst(ast: Ast): AnyQuery;","description":"","source":"packages/client/src/query.ts","line":694,"href":"/reference/typescript/wasm/#symbol-queryFromAst"},{"name":"QueryId","originalName":"QueryId","kind":"TypeAliasDeclaration","signature":"export type QueryId = number;","description":"","source":"packages/client/src/types.ts","line":128,"href":"/reference/typescript/wasm/#symbol-QueryId"},{"name":"QueryInspect","originalName":"QueryInspect","kind":"InterfaceDeclaration","signature":"/** One live materialized view's read-only summary for a devtools pane (DEBUG-TOOLS-BROWSER-DESIGN\n *  §4.2 — \"surface, not instrument\"). All fields are already held by the {@link Store}; this is the\n *  single read-only accessor over the otherwise-private `views`/`asts` maps. */\nexport interface QueryInspect {\n    /** The Store-assigned query id (also the backend's qid — the Store passes it straight through). */\n    qid: QueryId;\n    /** The query's AST (`Store.asts`), for the inspector's pretty-print / table-derivation. */\n    ast: Ast;\n    /** The view's SERVER-CHANNEL state (`unknown` while loading, `complete` once authoritative). */\n    resultType: ResultType;\n    /** Current materialized row count (`view.data.length`). */\n    rowCount: number;\n    /** A capped peek at the projected rows (reference-stable objects off the live view). */\n    sample: readonly unknown[];\n}","description":"One live materialized view's read-only summary for a devtools pane (DEBUG-TOOLS-BROWSER-DESIGN\n§4.2 — \"surface, not instrument\"). All fields are already held by the {@link Store}; this is the\nsingle read-only accessor over the otherwise-private `views`/`asts` maps.","source":"packages/client/src/store.ts","line":74,"href":"/reference/typescript/wasm/#symbol-QueryInspect"},{"name":"QueryLocalData","originalName":"QueryLocalData","kind":"TypeAliasDeclaration","signature":"export type QueryLocalData<Q extends AnyQuery> = Q extends Query<infer C, any, infer One, infer Sel, infer LocalRels, infer Agg> ? [\n    Agg\n] extends [\n    false\n] ? One extends true ? (Projected<C, Sel> & LocalRels) | null : readonly (Projected<C, Sel> & LocalRels)[] : readonly Agg[] : never;","description":"","source":"packages/client/src/query.ts","line":310,"href":"/reference/typescript/wasm/#symbol-QueryLocalData"},{"name":"QueryResultRow","originalName":"QueryResultRow","kind":"TypeAliasDeclaration","signature":"/** A row returned by a {@link QueryEffect}: column name → cell, plus each materialized relationship\n *  name → its nested row(s) — an array (a plural relationship) or a single row / `null` (a `.one()`\n *  relationship). Recursive. Presented identically on both tiers (a `view.data` row of the same\n *  query). */\nexport type QueryResultRow = {\n    [key: string]: WireValue | QueryResultRow | QueryResultRow[];\n};","description":"A row returned by a {@link QueryEffect}: column name → cell, plus each materialized relationship\nname → its nested row(s) — an array (a plural relationship) or a single row / `null` (a `.one()`\nrelationship). Recursive. Presented identically on both tiers (a `view.data` row of the same\nquery).","source":"packages/client/src/mutation-ops.ts","line":78,"href":"/reference/typescript/wasm/#symbol-QueryResultRow"},{"name":"QueryRoot","originalName":"QueryRoot","kind":"TypeAliasDeclaration","signature":"export type QueryRoot<S extends ColsMap> = {\n    [N in keyof S]: Query<S[N]>;\n};","description":"","source":"packages/client/src/query.ts","line":1286,"href":"/reference/typescript/wasm/#symbol-QueryRoot"},{"name":"QueryValidator","originalName":"QueryValidator","kind":"TypeAliasDeclaration","signature":"/** Turn raw, UNTRUSTED wire args into the canonical, typed args a query is built from. Its return\n *  type IS the query's args type — written once, it flows to both the client call signature and the\n *  `build` step, so there's no second place to restate the shape. */\nexport type QueryValidator<Args> = (rawArgs: unknown) => Args;","description":"Turn raw, UNTRUSTED wire args into the canonical, typed args a query is built from. Its return\ntype IS the query's args type — written once, it flows to both the client call signature and the\n`build` step, so there's no second place to restate the shape.","source":"packages/client/src/query.ts","line":340,"href":"/reference/typescript/wasm/#symbol-QueryValidator"},{"name":"ReadEffect","originalName":"ReadEffect","kind":"TypeAliasDeclaration","signature":"/** A point read a generator mutator yields; the driver resolves it and feeds the row back through\n *  `gen.next(row)`. Read-your-writes on every tier: the client reads its local engine, and both\n *  server backends read the open transaction (the daemon via an interactive mutation session). */\nexport type ReadEffect = {\n    kind: \"row\";\n    table: string;\n    pk: KeyedRow;\n};","description":"A point read a generator mutator yields; the driver resolves it and feeds the row back through\n`gen.next(row)`. Read-your-writes on every tier: the client reads its local engine, and both\nserver backends read the open transaction (the daemon via an interactive mutation session).","source":"packages/client/src/mutation-ops.ts","line":65,"href":"/reference/typescript/wasm/#symbol-ReadEffect"},{"name":"RealtimeQueryLabel","originalName":"RealtimeQueryLabel","kind":"InterfaceDeclaration","signature":"/**\n * The realtime LABEL a named query may declare (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §2.1):\n * which api-server room PROFILE the query wants to be served from, and how the query's args map\n * to that profile's key args. This is the DECLARATION only — the serve decision (covering proof,\n * lease routing) is the server's, and the final room key is minted server-side by the profile's\n * own `key` under authoritative ctx, so a label can never place a query in a room the server\n * didn't derive itself. Both tiers import the SAME `defineQuery` value, so they always agree\n * *which profile* a query belongs to.\n */\nexport interface RealtimeQueryLabel<Args = any> {\n    /** The room profile name — must match a `realtime.rooms` key on the api-server (validated\n     *  loudly at `createRindleApiServer` construction). May not contain `/` (the wire room-key\n     *  delimiter). */\n    readonly room: string;\n    /** Map the query's VALIDATED args to the profile's key args (what the server feeds the\n     *  profile's `key(args)`). Identity when omitted. Must be pure — both tiers may run it. */\n    readonly args?: (queryArgs: Args) => unknown;\n}","description":"The realtime LABEL a named query may declare (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §2.1):\nwhich api-server room PROFILE the query wants to be served from, and how the query's args map\nto that profile's key args. This is the DECLARATION only — the serve decision (covering proof,\nlease routing) is the server's, and the final room key is minted server-side by the profile's\nown `key` under authoritative ctx, so a label can never place a query in a room the server\ndidn't derive itself. Both tiers import the SAME `defineQuery` value, so they always agree\n*which profile* a query belongs to.","source":"packages/client/src/query.ts","line":372,"href":"/reference/typescript/wasm/#symbol-RealtimeQueryLabel"},{"name":"RefinableTable","originalName":"RefinableTable","kind":"TypeAliasDeclaration","signature":"/** A table def acceptable to {@link refineSchema} over `Schema<S>`: its NAME must be one of `S`'s\n *  tables (a def for an unknown table is a compile error at the call site). */\nexport type RefinableTable<S extends ColsMap> = {\n    readonly [SCHEMA]: TableMeta<Extract<keyof S, string>, AnyCols>;\n};","description":"A table def acceptable to {@link refineSchema} over `Schema<S>`: its NAME must be one of `S`'s\ntables (a def for an unknown table is a compile error at the call site).","source":"packages/client/src/schema.ts","line":340,"href":"/reference/typescript/wasm/#symbol-RefinableTable"},{"name":"RefinedCols","originalName":"RefinedCols","kind":"TypeAliasDeclaration","signature":"/** `C` with the columns named in `R` re-typed to their refined `Col`s. */\nexport type RefinedCols<C extends AnyCols, R extends ColRefinements<C>> = {\n    [K in keyof C]: K extends keyof R ? (R[K] extends Col<unknown> ? R[K] : C[K]) : C[K];\n};","description":"`C` with the columns named in `R` re-typed to their refined `Col`s.","source":"packages/client/src/schema.ts","line":308,"href":"/reference/typescript/wasm/#symbol-RefinedCols"},{"name":"RefinedColsMap","originalName":"RefinedColsMap","kind":"TypeAliasDeclaration","signature":"/** `S` with each table named in `T` re-typed to that def's (refined) columns. (The inner\n *  `extends AnyCols` guard is how the checker proves the remapped `SchemaOf<T>[K]` is a column\n *  map while `T` is still generic; it always holds for a concrete `T`.) */\nexport type RefinedColsMap<S extends ColsMap, T extends readonly AnyTable[]> = {\n    [K in keyof S]: K extends keyof SchemaOf<T> ? (SchemaOf<T>[K] extends AnyCols ? SchemaOf<T>[K] : S[K]) : S[K];\n};","description":"`S` with each table named in `T` re-typed to that def's (refined) columns. (The inner\n`extends AnyCols` guard is how the checker proves the remapped `SchemaOf<T>[K]` is a column\nmap while `T` is still generic; it always holds for a concrete `T`.)","source":"packages/client/src/schema.ts","line":347,"href":"/reference/typescript/wasm/#symbol-RefinedColsMap"},{"name":"refineSchema","originalName":"refineSchema","kind":"FunctionDeclaration","signature":"/** Swap {@link refineTable}-narrowed table defs into a generated schema, re-typing those tables for\n *  everything downstream of the schema (`newQueryBuilder`/`queries` roots, store row types).\n *\n *  Runtime-validated identity: each def must name a table already in the schema and match its\n *  runtime shape exactly (same columns, kinds, primary key, and locality) — refinement narrows TS\n *  types, never what's on the wire. Composes with {@link extendSchema} in either order. */\nexport declare function refineSchema<S extends ColsMap, P extends Record<string, string>, const T extends readonly RefinableTable<S>[]>(base: Schema<S, P>, opts: {\n    tables: T;\n}): Schema<RefinedColsMap<S, T>, P>;","description":"Swap {@link refineTable}-narrowed table defs into a generated schema, re-typing those tables for\neverything downstream of the schema (`newQueryBuilder`/`queries` roots, store row types).\n\nRuntime-validated identity: each def must name a table already in the schema and match its\nruntime shape exactly (same columns, kinds, primary key, and locality) — refinement narrows TS\ntypes, never what's on the wire. Composes with {@link extendSchema} in either order.","source":"packages/client/src/schema.ts","line":357,"href":"/reference/typescript/wasm/#symbol-refineSchema"},{"name":"refineTable","originalName":"refineTable","kind":"FunctionDeclaration","signature":"/** Narrow a generated table's column TYPES without touching its runtime shape.\n *\n *  Returns the SAME def, re-typed (identity, after validating that every refined column exists and\n *  keeps its kind) — so conditions built from it, `rel(...)`s anchored on it, and `Row<typeof t>`\n *  all see the narrowed types. Pass the result to {@link refineSchema} so query roots narrow too. */\nexport declare function refineTable<N extends string, C extends AnyCols, R extends ColRefinements<C>>(base: TableDef<N, C>, cols: R): TableDef<N, RefinedCols<C, R>>;","description":"Narrow a generated table's column TYPES without touching its runtime shape.\n\nReturns the SAME def, re-typed (identity, after validating that every refined column exists and\nkeeps its kind) — so conditions built from it, `rel(...)`s anchored on it, and `Row<typeof t>`\nall see the narrowed types. Pass the result to {@link refineSchema} so query roots narrow too.","source":"packages/client/src/schema.ts","line":317,"href":"/reference/typescript/wasm/#symbol-refineTable"},{"name":"rel","originalName":"rel","kind":"FunctionDeclaration","signature":"/**\n * Declare a relationship once: `rel(issue, user, { ownerId: \"id\" })` means `issue.ownerId → user.id`.\n * `mapping` is `{ [parentColumn]: childColumn }` (a composite join is multiple entries). The `parent`\n * table is used only to type-check the keys; pass the result to `sub`/`countAs`/`exists`.\n */\nexport declare function rel<PC extends AnyCols, CC extends AnyCols>(_parent: TableLike<PC>, child: TableLike<CC>, mapping: Partial<Record<keyof PC & string, keyof CC & string>>): Relationship<PC, CC>;","description":"Declare a relationship once: `rel(issue, user, { ownerId: \"id\" })` means `issue.ownerId → user.id`.\n`mapping` is `{ [parentColumn]: childColumn }` (a composite join is multiple entries). The `parent`\ntable is used only to type-check the keys; pass the result to `sub`/`countAs`/`exists`.","source":"packages/client/src/schema.ts","line":476,"href":"/reference/typescript/wasm/#symbol-rel"},{"name":"Relationship","originalName":"Relationship","kind":"InterfaceDeclaration","signature":"/**\n * A reusable, typed JOIN between two tables — the correlation declared once (design §4). Built with\n * {@link rel}; parameterized by the parent columns `PC` (so a `sub` checks the relationship belongs to\n * the query's table) and the child columns `CC` (which flow into the nested result type). Pass it to\n * `sub`/`countAs`/`exists` in place of an explicit `child` + `{ parent, child }` correlation.\n */\nexport interface Relationship<PC extends AnyCols, CC extends AnyCols> {\n    /** The child table the relationship points at. */\n    readonly child: TableLike<CC>;\n    /** Correlation keys: `parent[i]` (a parent column) joins to `child[i]` (a child column). */\n    readonly correlation: {\n        readonly parent: readonly string[];\n        readonly child: readonly string[];\n    };\n    /** Phantom binding the parent columns so `Query<C>.sub(alias, rel)` rejects a rel for another table. */\n    readonly __parent?: PC;\n    readonly [RELATIONSHIP_BRAND]: true;\n}","description":"A reusable, typed JOIN between two tables — the correlation declared once (design §4). Built with\n{@link rel}; parameterized by the parent columns `PC` (so a `sub` checks the relationship belongs to\nthe query's table) and the child columns `CC` (which flow into the nested result type). Pass it to\n`sub`/`countAs`/`exists` in place of an explicit `child` + `{ parent, child }` correlation.","source":"packages/client/src/schema.ts","line":458,"href":"/reference/typescript/wasm/#symbol-Relationship"},{"name":"RemoteQuery","originalName":"RemoteQuery","kind":"InterfaceDeclaration","signature":"/** The network identity for a named query subscription. The local AST remains local; remote\n *  normalized/optimistic sources use only this `(name,args)` pair upstream. */\nexport interface RemoteQuery {\n    name: string;\n    args: unknown;\n}","description":"The network identity for a named query subscription. The local AST remains local; remote\nnormalized/optimistic sources use only this `(name,args)` pair upstream.","source":"packages/client/src/types.ts","line":159,"href":"/reference/typescript/wasm/#symbol-RemoteQuery"},{"name":"RESERVED_TABLE_PREFIXES","originalName":"RESERVED_TABLE_PREFIXES","kind":"VariableDeclaration","signature":"/** Table-name prefixes reserved by the engine for SYNTHETIC tables — `__agg_<fnv>` aggregate\n *  bases (`AGGREGATE-SYNC-DESIGN.md` §3.3) and `_rindle_*` system tables (e.g. the lmid table).\n *  A user table (synced OR local) under one of these would shadow a synthetic source — and since\n *  `registerTable` is idempotent-on-name and base tables register before synthetics, the later\n *  synthetic registration would silently no-op and the agg join would read the user table as the\n *  count (silent corruption, `201-LOCAL-ONLY-TABLES-DESIGN.md` N1). The ban makes that\n *  structurally impossible — checked once, statically, at {@link createSchema}. */\nexport declare const RESERVED_TABLE_PREFIXES: readonly [\n    \"__agg_\",\n    \"_rindle_\"\n];","description":"Table-name prefixes reserved by the engine for SYNTHETIC tables — `__agg_<fnv>` aggregate\nbases (`AGGREGATE-SYNC-DESIGN.md` §3.3) and `_rindle_*` system tables (e.g. the lmid table).\nA user table (synced OR local) under one of these would shadow a synthetic source — and since\n`registerTable` is idempotent-on-name and base tables register before synthetics, the later\nsynthetic registration would silently no-op and the agg join would read the user table as the\ncount (silent corruption, `201-LOCAL-ONLY-TABLES-DESIGN.md` N1). The ban makes that\nstructurally impossible — checked once, statically, at {@link createSchema}.","source":"packages/client/src/schema.ts","line":220,"href":"/reference/typescript/wasm/#symbol-RESERVED_TABLE_PREFIXES"},{"name":"resolveChange","originalName":"resolveChange","kind":"FunctionDeclaration","signature":"/** Lift one `FlatChange` into a {@link ResolvedChange} against the query's `WireSchema`, or `null`\n *  if its path doesn't resolve to a materialized level. */\nexport declare function resolveChange(schema: WireSchema, change: FlatChange): ResolvedChange | null;","description":"Lift one `FlatChange` into a {@link ResolvedChange} against the query's `WireSchema`, or `null`\nif its path doesn't resolve to a materialized level.","source":"packages/client/src/resolve.ts","line":84,"href":"/reference/typescript/wasm/#symbol-resolveChange"},{"name":"ResolvedChange","originalName":"ResolvedChange","kind":"InterfaceDeclaration","signature":"/** One resolved change: a `FlatChange` lifted out of positional/indexed wire form into names,\n *  using the query's `WireSchema` (from `hello`) as the sole position→name source. */\nexport interface ResolvedChange {\n    /** Relationship-alias chain from the query root to the changed level (`[]` ⇒ the root rows). */\n    aliasChain: string[];\n    /** The alias of the changed level (`\"\"` ⇒ root), i.e. the last of `aliasChain`. */\n    alias: string;\n    op: \"add\" | \"remove\" | \"edit\";\n    /** The affected row, named. For `edit` this is the NEW row; see `old` for the prior one. */\n    row: NamedRow;\n    /** The prior row, named (present only for `edit`). */\n    old?: NamedRow;\n    /** The PARENT row (named), for a nested/aggregate change — e.g. the `ticket_type` whose `sold`\n     *  count moved. Taken from the path's last `parentRow`; absent for a root-level change. */\n    parent?: NamedRow;\n    /** Set when the changed level is a `countAs`/aggregate slot. The value is EXACT — read from the\n     *  slot's projected count column (`WireRel.project.col`). */\n    aggregate?: {\n        alias: string;\n        value: WireValue;\n        previous?: WireValue;\n    };\n    /** The raw node whose children a consumer can dig a named sub-row out of (via {@link subRow}). On\n     *  an `add` the engine always ships it; on a `remove` it is present only when the consumer opted\n     *  into the removed subtree (see the `op` mapping below). */\n    node?: WireNode;\n    /** The changed level's `WireSchema` — used by {@link subRow} to resolve a named sub of `node`. */\n    levelSchema: WireSchema;\n}","description":"One resolved change: a `FlatChange` lifted out of positional/indexed wire form into names,\nusing the query's `WireSchema` (from `hello`) as the sole position→name source.","source":"packages/client/src/resolve.ts","line":30,"href":"/reference/typescript/wasm/#symbol-ResolvedChange"},{"name":"ResultType","originalName":"ResultType","kind":"TypeAliasDeclaration","signature":"/** A query's SERVER-CHANNEL state, surfaced on its {@link ArrayView} (FOLDED-MUTATIONS-DESIGN §7 —\n *  formerly conflated with pending-ness, OPTIMISTIC-WRITES-DESIGN.md §6):\n *   - `unknown`  — not hydrated: the server has not produced a first result for this query yet;\n *   - `complete` — the server has answered. STAYS `complete` while a local mutation is pending (the\n *                  prediction is the client's best current answer); reversion on rejection is an\n *                  event (`onRejected`), not a downgrade of completeness;\n *   - `error`    — RESERVED for a future server-side, query-level error signal\n *                  (see `designs/101-QUERY-ERRORS-DESIGN.md`); no longer produced by a pending mutation.\n *  \"Is a prediction pending here?\" is now a separate reactive axis (the backend's `pending(qid)` /\n *  `onPending`), not folded into this type. A backend with no server lifecycle (the in-process\n *  engine) leaves every view `complete`. */\nexport type ResultType = \"unknown\" | \"complete\" | \"error\";","description":"A query's SERVER-CHANNEL state, surfaced on its {@link ArrayView } (FOLDED-MUTATIONS-DESIGN §7 —\nformerly conflated with pending-ness, OPTIMISTIC-WRITES-DESIGN.md §6):\n - `unknown`  — not hydrated: the server has not produced a first result for this query yet;\n - `complete` — the server has answered. STAYS `complete` while a local mutation is pending (the\n                prediction is the client's best current answer); reversion on rejection is an\n                event (`onRejected`), not a downgrade of completeness;\n - `error`    — RESERVED for a future server-side, query-level error signal\n                (see `designs/101-QUERY-ERRORS-DESIGN.md`); no longer produced by a pending mutation.\n\"Is a prediction pending here?\" is now a separate reactive axis (the backend's `pending(qid)` /\n`onPending`), not folded into this type. A backend with no server lifecycle (the in-process\nengine) leaves every view `complete`.","source":"packages/client/src/types.ts","line":155,"href":"/reference/typescript/wasm/#symbol-ResultType"},{"name":"Row","originalName":"Row","kind":"TypeAliasDeclaration","signature":"/** The row type of a table definition: `Row<typeof issue>` → `{ id: string; … }`. The\n *  whole-table ergonomic form of {@link RowOf}, so app code derives its row interfaces from\n *  the schema instead of hand-maintaining a parallel twin. */\nexport type Row<T extends AnyTable> = RowOf<T[typeof SCHEMA][\"columns\"]>;","description":"The row type of a table definition: `Row<typeof issue>` → `{ id: string; … }`. The\nwhole-table ergonomic form of {@link RowOf}, so app code derives its row interfaces from\nthe schema instead of hand-maintaining a parallel twin.","source":"packages/client/src/schema.ts","line":107,"href":"/reference/typescript/wasm/#symbol-Row"},{"name":"RowOf","originalName":"RowOf","kind":"TypeAliasDeclaration","signature":"export type RowOf<C extends AnyCols> = {\n    [K in keyof C]: ColT<C[K]>;\n};","description":"","source":"packages/client/src/schema.ts","line":28,"href":"/reference/typescript/wasm/#symbol-RowOf"},{"name":"rowsEqual","originalName":"rowsEqual","kind":"FunctionDeclaration","signature":"/** Elementwise equality over positional bare-cell rows — THE row comparator for every JS-side\n *  diff (views, aggregate heads, the persistence mirror), exported so no caller grows a drifted\n *  private copy. Per cell: `===` keeps `-0 === 0` (the engine's key semantics treat them equal);\n *  the `Object.is` arm makes a NaN cell equal itself (under `!==` alone, a NaN-bearing row never\n *  matches any copy of itself, so every diff re-emits it as a spurious edit forever). */\nexport declare function rowsEqual(a: WireValue[], b: WireValue[]): boolean;","description":"Elementwise equality over positional bare-cell rows — THE row comparator for every JS-side\ndiff (views, aggregate heads, the persistence mirror), exported so no caller grows a drifted\nprivate copy. Per cell: `===` keeps `-0 === 0` (the engine's key semantics treat them equal);\nthe `Object.is` arm makes a NaN cell equal itself (under `!==` alone, a NaN-bearing row never\nmatches any copy of itself, so every diff re-emits it as a spurious edit forever).","source":"packages/client/src/view.ts","line":196,"href":"/reference/typescript/wasm/#symbol-rowsEqual"},{"name":"Schema","originalName":"Schema","kind":"InterfaceDeclaration","signature":"export interface Schema<S extends ColsMap = ColsMap, P extends Record<string, string> = PkMap<S>> {\n    readonly tables: Readonly<Record<string, TableMeta>>;\n    /** Phantom carrying name→columns for query-root inference (never read at runtime). */\n    readonly __cols: S;\n    /** Phantom carrying name→pk-column-union for the typed mutator tx (never read at runtime). */\n    readonly __pk: P;\n}","description":"","source":"packages/client/src/schema.ts","line":205,"href":"/reference/typescript/wasm/#symbol-Schema"},{"name":"SCHEMA","originalName":"SCHEMA","kind":"VariableDeclaration","signature":"/** Metadata key on a {@link TableDef} (a `unique symbol`, so no column name collides). */\nexport declare const SCHEMA: unique symbol;","description":"Metadata key on a {@link TableDef} (a `unique symbol`, so no column name collides).","source":"packages/client/src/schema.ts","line":57,"href":"/reference/typescript/wasm/#symbol-SCHEMA"},{"name":"SchemaOf","originalName":"SchemaOf","kind":"TypeAliasDeclaration","signature":"/** name → columns, derived from the tables array (for typing `store.query.<table>`). */\nexport type SchemaOf<T extends readonly AnyTable[]> = {\n    [E in T[number] as E[typeof SCHEMA][\"name\"]]: E[typeof SCHEMA][\"columns\"];\n};","description":"name → columns, derived from the tables array (for typing `store.query.<table>`).","source":"packages/client/src/schema.ts","line":188,"href":"/reference/typescript/wasm/#symbol-SchemaOf"},{"name":"ServerDeltaOp","originalName":"ServerDeltaOp","kind":"TypeAliasDeclaration","signature":"/** One base-table row op of a coherent server delta (the §1.3 `D`), bare cells. */\nexport type ServerDeltaOp = {\n    table: string;\n    type: \"add\";\n    row: unknown[];\n} | {\n    table: string;\n    type: \"remove\";\n    row: unknown[];\n} | {\n    table: string;\n    type: \"edit\";\n    row: unknown[];\n    old: unknown[];\n};","description":"One base-table row op of a coherent server delta (the §1.3 `D`), bare cells.","source":"packages/wasm/src/index.ts","line":57,"href":"/reference/typescript/wasm/#symbol-ServerDeltaOp"},{"name":"ServerStore","originalName":"ServerStore","kind":"ClassDeclaration","signature":"/**\n * The server-side Store wrapper (SSR-DESIGN.md §6.2). Wraps a {@link Store} over a\n * {@link OneShotBackend} and adds the loader-phase `preload` plus `dehydrate`. Pass `.store` to\n * the React `<Rindle>` provider for the synchronous render; return `.dehydrate()` from the loader.\n * Create one instance per request, with an authorized read function for that request's principal.\n * Its snapshots seed views; they do not persist synced rows in the browser database.\n */\nexport declare class ServerStore<S extends ColsMap> {\n    readonly store: Store<S>;\n    private readonly schema;\n    private readonly opts;\n    constructor(schema: Schema<S>, opts: ServerStoreOptions);\n    /** Run the one-shot read for `query` and seed its first-paint snapshot (SSR-DESIGN.md §6.2).\n     *  Call once per query in the route loader, before the synchronous render. */\n    preload(query: Query<any, any, any>): Promise<void>;\n    /** The dehydrated first-paint cache for every preloaded query — embed in the HTML, then\n     *  `store.hydrate(...)` it in the browser. */\n    dehydrate(): DehydratedState;\n    /**\n     * Loader-phase convenience over {@link preload} + {@link dehydrate}: preload EVERY query (reads run\n     * concurrently) and return the dehydrated first-paint cache. Composition keeps this to one read per\n     * composed root query — no request waterfall (SSR-DESIGN.md §6.2).\n     *\n     * A failed read produces no seed for that query and calls `onError`, if provided. Other reads\n     * can still supply seeds. The browser must establish its own successful live subscription to\n     * obtain the missing data; hydration alone does not retry this read. Without `onError`, the\n     * preload failure is silent. An `onError` callback that throws rejects the batch.\n     */\n    preloadAll(queries: Array<Query<any, any, any>>, opts?: {\n        onError?: (query: Query<any, any, any>, err: unknown) => void;\n    }): Promise<DehydratedState>;\n}","description":"The server-side Store wrapper (SSR-DESIGN.md §6.2). Wraps a {@link Store} over a\n{@link OneShotBackend} and adds the loader-phase `preload` plus `dehydrate`. Pass `.store` to\nthe React `<Rindle>` provider for the synchronous render; return `.dehydrate()` from the loader.\nCreate one instance per request, with an authorized read function for that request's principal.\nIts snapshots seed views; they do not persist synced rows in the browser database.","source":"packages/client/src/ssr.ts","line":78,"href":"/reference/typescript/wasm/#symbol-ServerStore"},{"name":"ServerStoreOptions","originalName":"ServerStoreOptions","kind":"InterfaceDeclaration","signature":"export interface ServerStoreOptions {\n    /** Performs an authorized one-shot read. See {@link OneShotQueryFn} for access ownership. */\n    query: OneShotQueryFn;\n    /** Optional namespace for query deduplication, forwarded to every preload. Different keys\n     *  prevent pipeline sharing for the same AST. This key does not authorize access or filter rows;\n     *  the query must already contain the required visibility predicates. */\n    visibilityKey?: string;\n    /** Optional idle TTL (ms) the warm pipeline is left at, forwarded to every preload (SSR-DESIGN.md\n     *  §3.4). The TTL is NOT part of the dedup key, so a shared materialization keeps the LONGEST TTL\n     *  any caller requested (max-wins) — `ttlMs` can extend a query's warm-handoff window, never\n     *  shrink it; absent ⇒ the daemon's default idle TTL. */\n    ttlMs?: number;\n}","description":"","source":"packages/client/src/ssr.ts","line":57,"href":"/reference/typescript/wasm/#symbol-ServerStoreOptions"},{"name":"ServerWriteTx","originalName":"ServerWriteTx","kind":"InterfaceDeclaration","signature":"/** The ASYNC server-side write surface a mutator runs against. Semantically the twin of the client's\n *  synchronous `MutationTx` write methods — same names, same keyed-row arguments — but every op is a\n *  Promise. Reads see this transaction's own writes on both Postgres and the daemon; the daemon\n *  opens an interactive transaction when a read is needed. Inserts require every non-nullable\n *  column and fill omitted nullable columns with `null`. Updates and deletes require the PK. */\nexport interface ServerWriteTx {\n    /** Insert a row. Missing required columns and unknown columns throw; omitted nullable\n     *  columns become `null`, rather than using database defaults. */\n    insert(table: string, row: KeyedRow): Promise<void>;\n    /** Update the row identified by the pk columns; only the named non-pk columns change. A missing\n     *  row is a NO-OP. */\n    update(table: string, row: KeyedRow): Promise<void>;\n    /** Insert, or replace non-PK columns on PK conflict, using the same insert shape. */\n    upsert(table: string, row: KeyedRow): Promise<void>;\n    /** Insert with the same nullable-column rules as `insert`, or do nothing on PK conflict. */\n    insertIgnore(table: string, row: KeyedRow): Promise<void>;\n    /** Delete the row identified by the pk columns. A missing row is a NO-OP. */\n    delete(table: string, pk: KeyedRow): Promise<void>;\n    /** Read one row by primary key, through the OPEN transaction on both backends\n     *  (read-your-writes: live on Postgres; via an interactive mutation session on the daemon,\n     *  DAEMON-INTERACTIVE-TXN-DESIGN.md §5.3). */\n    row(table: string, pk: KeyedRow): Promise<KeyedRow | undefined>;\n}","description":"The ASYNC server-side write surface a mutator runs against. Semantically the twin of the client's\nsynchronous `MutationTx` write methods — same names, same keyed-row arguments — but every op is a\nPromise. Reads see this transaction's own writes on both Postgres and the daemon; the daemon\nopens an interactive transaction when a read is needed. Inserts require every non-nullable\ncolumn and fill omitted nullable columns with `null`. Updates and deletes require the PK.","source":"packages/client/src/mutation-ops.ts","line":29,"href":"/reference/typescript/wasm/#symbol-ServerWriteTx"},{"name":"shared","originalName":"shared","kind":"FunctionDeclaration","signature":"/** Co-locate a shared (generator) mutator with the validator for its args — pairing the arg SHAPE\n *  with the body that consumes it at ONE site, so neither tier restates it (the client derives its\n *  callsite type from `Args`; the server parses untrusted args through `.args`). Returns the SAME\n *  generator function with an `args` property attached (`Object.assign` mutates + returns it), so the\n *  registered value is byte-for-byte what the client drove before: {@link isGeneratorMutator} still\n *  detects it and it still `satisfies ClientRegistry`. */\nexport declare function shared<Args, Ctx extends MutatorCtx = MutatorCtx>(args: ArgSchema<Args>, run: SharedMutator<Args, Ctx>): SharedMutatorWithArgs<Args, Ctx>;","description":"Co-locate a shared (generator) mutator with the validator for its args — pairing the arg SHAPE\nwith the body that consumes it at ONE site, so neither tier restates it (the client derives its\ncallsite type from `Args`; the server parses untrusted args through `.args`). Returns the SAME\ngenerator function with an `args` property attached (`Object.assign` mutates + returns it), so the\nregistered value is byte-for-byte what the client drove before: {@link isGeneratorMutator} still\ndetects it and it still `satisfies ClientRegistry`.","source":"packages/client/src/mutation-ops.ts","line":180,"href":"/reference/typescript/wasm/#symbol-shared"},{"name":"SharedMutator","originalName":"SharedMutator","kind":"TypeAliasDeclaration","signature":"/** A generator (isomorphic) mutator, shared verbatim by both tiers: the client trusts typed `args`,\n *  the server parses untrusted args into `Args` before invoking. */\nexport type SharedMutator<Args, Ctx extends MutatorCtx = MutatorCtx> = (tx: IsoTx, args: Args, ctx: Ctx) => MutationGen;","description":"A generator (isomorphic) mutator, shared verbatim by both tiers: the client trusts typed `args`,\nthe server parses untrusted args into `Args` before invoking.","source":"packages/client/src/mutation-ops.ts","line":152,"href":"/reference/typescript/wasm/#symbol-SharedMutator"},{"name":"SharedMutatorWithArgs","originalName":"SharedMutatorWithArgs","kind":"TypeAliasDeclaration","signature":"/** A shared mutator that CARRIES its own arg validator, co-located at the def site (`shared(schema,\n *  gen)`). The client registers it exactly like a bare generator mutator — the `.args` validator is\n *  inert there (typed callsites skip the parse); the server ({@link runSharedMutation}, via the\n *  api-server's `sharedApiMutators`) reads `.args` to parse untrusted wire args before driving the\n *  SAME body. */\nexport type SharedMutatorWithArgs<Args, Ctx extends MutatorCtx = MutatorCtx> = SharedMutator<Args, Ctx> & {\n    args: ArgSchema<Args>;\n};","description":"A shared mutator that CARRIES its own arg validator, co-located at the def site (`shared(schema,\ngen)`). The client registers it exactly like a bare generator mutator — the `.args` validator is\ninert there (typed callsites skip the parse); the server ({@link runSharedMutation }, via the\napi-server's `sharedApiMutators`) reads `.args` to parse untrusted wire args before driving the\nSAME body.","source":"packages/client/src/mutation-ops.ts","line":170,"href":"/reference/typescript/wasm/#symbol-SharedMutatorWithArgs"},{"name":"SimpleOp","originalName":"SimpleOp","kind":"TypeAliasDeclaration","signature":"/** The wire comparison operators (exact strings, `src/ast.rs` `Op`). */\nexport type SimpleOp = \"=\" | \"!=\" | \"<\" | \"<=\" | \">\" | \">=\" | \"IS\" | \"IS NOT\" | \"LIKE\" | \"NOT LIKE\" | \"ILIKE\" | \"NOT ILIKE\" | \"IN\" | \"NOT IN\";","description":"The wire comparison operators (exact strings, `src/ast.rs` `Op`).","source":"packages/client/src/ast.ts","line":19,"href":"/reference/typescript/wasm/#symbol-SimpleOp"},{"name":"SingularArrayView","originalName":"SingularArrayView","kind":"InterfaceDeclaration","signature":"/** What a top-level `.one()` query materializes to: the single row (or `null`), not an array.\n *  A thin adapter over a {@link FlatArrayView} — all the folding is shared; only the result\n *  boundary unwraps (`data[0] ?? null`). Reference identity of the row is preserved. */\nexport interface SingularArrayView<R> {\n    /** The single current row, or `null` when the query matches nothing. */\n    readonly data: R | null;\n    /** The engine query id — see {@link ArrayView.qid}. */\n    readonly qid: QueryId;\n    /** The query's view `WireSchema` — see {@link ArrayView.schema}. */\n    readonly schema: WireSchema | null;\n    /** The query's lifecycle state — see {@link ArrayView.resultType}. */\n    readonly resultType: ResultType;\n    /** Subscribe; fires immediately with the current row, then after each applied batch (and after\n     *  a {@link resultType} change). */\n    subscribe(listener: (data: R | null) => void): () => void;\n    /** Subscribe to the view's folded CHANGE stream — see {@link ArrayView.onChanges}. The changes\n     *  are the same positional `FlatChange`s as the plural view (a `.one()` is just the list capped to\n     *  one), so a narrator resolves them identically. */\n    onChanges(listener: ViewChangeListener): () => void;\n    /** Tear down + stop receiving updates. */\n    destroy(): void;\n}","description":"What a top-level `.one()` query materializes to: the single row (or `null`), not an array.\nA thin adapter over a {@link FlatArrayView} — all the folding is shared; only the result\nboundary unwraps (`data[0] ?? null`). Reference identity of the row is preserved.","source":"packages/client/src/view.ts","line":68,"href":"/reference/typescript/wasm/#symbol-SingularArrayView"},{"name":"SingularView","originalName":"SingularView","kind":"ClassDeclaration","signature":"/** Wrap a plural {@link FlatArrayView} as a {@link SingularArrayView} for a `.one()` query\n *  (the engine caps it to `limit = 1`, so the top list holds at most one node). */\nexport declare class SingularView<R> implements SingularArrayView<R> {\n    private readonly inner;\n    constructor(inner: ArrayView<R>);\n    get data(): R | null;\n    get qid(): QueryId;\n    get schema(): WireSchema | null;\n    get resultType(): ResultType;\n    subscribe(listener: (data: R | null) => void): () => void;\n    onChanges(listener: ViewChangeListener): () => void;\n    destroy(): void;\n}","description":"Wrap a plural {@link FlatArrayView} as a {@link SingularArrayView} for a `.one()` query\n(the engine caps it to `limit = 1`, so the top list holds at most one node).","source":"packages/client/src/view.ts","line":90,"href":"/reference/typescript/wasm/#symbol-SingularView"},{"name":"spliceStreamText","originalName":"spliceStreamText","kind":"FunctionDeclaration","signature":"/**\n * Merge the durable plane with the live tail.\n *\n * `durable` is what the IVM view shows; `produced` is what a subscription has accumulated (the prefix\n * it joined at, plus every `chunk`). Both are prefixes of the same response, so the merge is \"take\n * the longer\" — no diffing, no overlap handling, no ranges.\n *\n * The length comparison is the whole algorithm, which is why a caller MUST seed its accumulator with\n * the text it joined at: a tail carrying only the chunks it received would read as shorter than the\n * durable text and be discarded. `useStreamedText` does that for you.\n */\nexport declare function spliceStreamText(durable: string, produced: string): string;","description":"Merge the durable plane with the live tail.\n\n`durable` is what the IVM view shows; `produced` is what a subscription has accumulated (the prefix\nit joined at, plus every `chunk`). Both are prefixes of the same response, so the merge is \"take\nthe longer\" — no diffing, no overlap handling, no ranges.\n\nThe length comparison is the whole algorithm, which is why a caller MUST seed its accumulator with\nthe text it joined at: a tail carrying only the chunks it received would read as shorter than the\ndurable text and be discarded. `useStreamedText` does that for you.","source":"packages/client/src/stream.ts","line":75,"href":"/reference/typescript/wasm/#symbol-spliceStreamText"},{"name":"stableKey","originalName":"stableKey","kind":"FunctionDeclaration","signature":"export declare function stableKey(value: unknown, seen?: WeakSet<object>): string;","description":"","source":"packages/client/src/key.ts","line":6,"href":"/reference/typescript/wasm/#symbol-stableKey"},{"name":"Store","originalName":"Store","kind":"ClassDeclaration","signature":"export declare class Store<S extends ColsMap> {\n    /** Type-safe query entry: `store.query.issue.where.closed(false).materialize()`. */\n    readonly query: QueryRoot<S>;\n    private readonly schema;\n    private readonly backend;\n    private nextId;\n    private readonly views;\n    private readonly asts;\n    private readonly syncLeases;\n    private readonly seeds;\n    private changeListeners?;\n    private removedSubtreeWanted;\n    private resultTypeListeners?;\n    private readonly hasResultTypeLifecycle;\n    private commitDepth;\n    private readonly pendingFlush;\n    private readonly pendingChanges;\n    constructor(schema: Schema<S>, backend: Backend);\n    /** Materialize any fluent query object. Named queries subscribe remotely by `(name,args)`;\n     *  ad-hoc builder queries are local-only for local-first backends.\n     *\n     *  `opts.onChanges` binds a narrator to this view's DIFF stream ({@link ArrayView.onChanges}) — the\n     *  per-view seam that replaces filtering the store-global {@link subscribeChanges} by `qid`. It is\n     *  wired BEFORE the backend registers the query, so a synchronous backend's first `snapshot` (fired\n     *  inside `registerQuery`, before this returns) is delivered too. */\n    materialize<Q extends Query<any, any, any>>(query: Q, opts?: {\n        onChanges?: ViewChangeListener;\n    }): ReturnType<Q[\"materialize\"]>;\n    /** One-shot AUTHORITATIVE read: materialize `query`, wait until its result is server-authoritative\n     *  ({@link ResultType} `\"complete\"`), read the data once, then destroy the view — resolving with the\n     *  plain result rather than a live subscription. Rejects if the query enters the `\"error\"` state. Use\n     *  it for exports, imports, undo snapshots — anywhere that wants the current answer as a value.\n     *\n     *  A synchronous local-first backend (wasm/replica) has already delivered the first snapshot inside\n     *  {@link materialize}, so the view is `\"complete\"` on entry and this settles on the next microtask\n     *  without ever attaching a listener; a remote backend settles when the first live snapshot lands.\n     *  The query is NEVER left subscribed — the view is destroyed before the promise settles either way.\n     *  (A remote query that never completes leaves the promise pending, exactly as a `resultType` poll\n     *  would; race a timeout at the call site if you need one.) */\n    readOnce<Q extends Query<any, any, any>>(query: Q): Promise<ReturnType<Q[\"materialize\"]>[\"data\"]>;\n    /** True when the backend can retain a remote named query independently from the local\n     *  materialized AST view. React uses this to keep one local view per AST while still sending\n     *  every mounted `(name,args)` lease through the backend. */\n    canRetainRemoteQueries(): boolean;\n    /** Build one local AST view, with remote syncing retained separately through the returned\n     *  handle. This is a lower-level API for UI bindings; ordinary app code should keep using\n     *  `materialize(query)`. */\n    createCachedQueryView<Q extends Query<any, any, any>>(query: Q): CachedQueryView<Q>;\n    /** Retain a named remote query purely for normalized/local-first coverage. This does not\n     *  register or materialize the query AST locally, so React can keep server sync coverage alive\n     *  without subscribing to the broad coverage result tree. */\n    retainSyncQuery<Q extends Query<any, any, any>>(query: Q): SyncQueryLease;\n    /** Apply a batch of mutations (object rows → positional). Resolves when the backend has\n     *  accepted them (local: applied; remote: sent). The resulting view updates flow back via\n     *  the backend's event stream. */\n    write(fn: (tx: WriteTx<S>) => void): Promise<void>;\n    /** Direct-commit write to LOCAL-only tables (`201-LOCAL-ONLY-TABLES-DESIGN.md` §6): the\n     *  client-authoritative path for selection state, draft text, view prefs, scratch rows. It\n     *  bypasses the optimistic pending stack entirely — a local table is untracked, so it never\n     *  rebases, reverts, or waits on a server confirmation (it \"moves on its own\").\n     *\n     *  Rejects a synced/tracked table (M2): a direct write to one would be un-applied on the very\n     *  next server rewind. Local writes also must NOT live inside a replayable mutator (M1) — the\n     *  server runs the mutator from `args` alone and cannot see local tables; use this instead.\n     *  Same keyed `WriteTx` shape as {@link write}. `async` so the no-seam / M2 guards surface as a\n     *  REJECTED promise (the `Promise<void>` contract) rather than a synchronous throw that escapes a\n     *  caller's `.catch` and crashes the event handler / render frame. */\n    writeLocal(fn: (tx: WriteTx<S>) => void): Promise<void>;\n    /** Drain a keyed `WriteTx` callback into positional {@link Mutation}s (shared by\n     *  {@link write} / {@link writeLocal}; json columns stringified, rows in column order). */\n    private collectMutations;\n    /** Seed a query's first-paint snapshot from a `POST /query` response (server side): convert the\n     *  assembled rows to the view's projected shape and stash them by `viewKey`. A view materialized\n     *  for this AST (during the synchronous render) reads the seed; {@link dehydrate} serializes it. */\n    seedAssembled(ast: Ast, rows: AssembledNode[], cvMin: number): void;\n    /** The dehydrated first-paint cache for every preloaded query — embed it in the HTML and pass it\n     *  to {@link hydrate} in the browser (SSR-DESIGN.md §6.2). */\n    dehydrate(): DehydratedState;\n    /** Seed the browser store from the server's {@link dehydrate} output (SSR-DESIGN.md §6.2): each\n     *  view materialized for a hydrated AST shows these rows until its first live `hello` reconciles. */\n    hydrate(state: DehydratedState): void;\n    /** A query's hydrated first-paint snapshot, by `viewKey` — what React's `getServerSnapshot`\n     *  reads so an SSR render (and the matching client hydration pass) sees the seeded rows without\n     *  opening a subscription. */\n    seedSnapshot(viewKey: string): DehydratedQuery | undefined;\n    primaryKeyFor(table: string): readonly string[];\n    /** Convert assembled (nested-by-name) rows (SSR-DESIGN.md §3.3) into the view's projected result\n     *  shape: spread `cols` (parsing json columns), recurse into each relationship by its alias\n     *  (plural → array, `.one()` → object/null, `countAs` → bare scalar). */\n    assembleSnapshot(ast: Ast, rows: AssembledNode[]): unknown[];\n    private assembleNode;\n    private registerMaterialized;\n    private retainRemote;\n    private onEvent;\n    /** Retire a view's SSR seed — from the view (so `data` switches from the seed to the maintained\n     *  tree) AND from the seeds map (so no later mount re-seeds a now-live query) — but ONLY once the\n     *  query is AUTHORITATIVE (`resultType === \"complete\"`). Called BEFORE the fold it accompanies, so\n     *  that fold's notify already reflects the live tree with no empty gap. Idempotent.\n     *\n     *  The gate is the fix for the synchronous optimistic/wasm backend: it fires a query's FIRST snapshot\n     *  from LOCAL, not-yet-synced state while the query is still `unknown` (`registerMaterialized` marks a\n     *  lifecycle-backed remote view `unknown` up front for exactly this), then delivers the authoritative\n     *  rows one event later as a `catchUp` batch — having already flipped the query to `complete`. So the\n     *  seed survives the pre-sync snapshot (`unknown` ⇒ skip) and retires on the catch-up (`complete` ⇒\n     *  retire). A lifecycle-LESS backend (pure wasm, the SSR one-shot, tests) is `complete` from creation,\n     *  so its first snapshot retires the seed exactly as before this gate existed. */\n    private retireSeedIfLive;\n    /** Retire the SSR seed (if authoritative) and fold the accompanying hydration delta — BEFORE the\n     *  fold so its notify already reflects the live tree with no empty gap. The subtlety: a hydration\n     *  can fold NOTHING — a 0-row authoritative result, or one whose rows are already present in `top`\n     *  (a query whose result is fully covered by an already-hydrated sibling: the shared rows dedup to\n     *  zero net base mutations). Then {@link FlatArrayView.applyChanges} notifies nothing, so the\n     *  seed→tree switch would never reach subscribers and the view freezes on the stale seed. Guard\n     *  against that: if the seed retired but the fold was a no-op, force the handoff notify (inline, or\n     *  via the commit-boundary flush). Flash-safe — the forced notify only fires when there was nothing\n     *  to fold, so `data` is already the correct live tree by then. */\n    private foldHydration;\n    /** Fold a batch into its view, then notify now or — inside a commit bracket — defer the view's\n     *  notification to the commit boundary, so all sibling views fold first (cross-view-atomic\n     *  notification; see `commitDepth`). */\n    private applyAndTrack;\n    /** Deliver everything deferred during the just-ended commit, after every affected view has folded\n     *  (cross-view-atomic notification): view subscribers first, then the raw change stream\n     *  (narrators/devtools), each frame in arrival order. A throwing listener does not stop the others\n     *  — the first error is re-raised only once the whole flush completes (mirroring the backend's\n     *  per-query isolation). View subscribers run before change listeners, preserving the per-event\n     *  order that held before coalescing (a view's subscribers fired before its change frame). */\n    private flushCommit;\n    /** Subscribe to the raw per-query {@link ChangeEvent} stream (hello / snapshot / batch) the Store\n     *  routes to its views, tagged by `qid`. Fired AFTER the event is folded — and, for a commit that\n     *  fans out to several queries (the in-process engine's `onCommitBoundary`), after EVERY view in\n     *  that commit has folded — so a listener that re-reads ANY view (its own or a sibling) sees\n     *  post-commit state, never a torn mid-commit one. Frames keep their arrival (engine-dispatch)\n     *  order, one per affected query. This is the supported way to drive change-derived layers\n     *  (e.g. {@link resolveChange} → @rindle/narrator, or a devtools pane) off a live store — attach\n     *  BEFORE `materialize` to catch a synchronous backend's first `hello`+`snapshot`.\n     *  The per-query view `WireSchema` rides the `hello` frame (also readable via `view.schema`).\n     *\n     *  The third listener arg is the post-fold {@link ArrayView} for this `qid` (so a template wanting\n     *  list context — current `data`, `schema`, `resultType` — needn't look it up). It is ALWAYS the\n     *  plural view, even for a top-level `.one()` query: the Store retains the list-shaped view, not the\n     *  SingularView wrapper handed back from `materialize`. `undefined` only if the view is mid-teardown.\n     *\n     *  `opts.removedSubtree` enriches every `remove` op on this stream with the full removed subtree\n     *  ({@link FlatOp.node}), so a consumer can resolve a removed row's nested subs exactly as on an\n     *  `add` (a bare remove carries only the leaving row). It is reconstructed client-side from the\n     *  view — no wire/engine cost — and paid only on real evictions while at least one subscriber asks.\n     *\n     *  Returns a detach function; multiple listeners may attach. */\n    subscribeChanges(listener: (qid: QueryId, ev: ChangeEvent, view?: ArrayView<unknown>) => void, opts?: {\n        removedSubtree?: boolean;\n    }): () => void;\n    /** Subscribe to per-query {@link ResultType} transitions (the server-channel lifecycle the backend\n     *  pushes — `unknown` → `complete`, etc.), tagged by `qid`. Fired only on a CHANGE (never replayed\n     *  on attach; read `view.resultType` for the current value). The supported seam for a status-driven\n     *  layer (a devtools pane). Returns a detach function; multiple listeners may attach. */\n    subscribeResultType(listener: (qid: QueryId, rt: ResultType) => void): () => void;\n    /** A read-only snapshot of every live materialized view (DEBUG-TOOLS-BROWSER-DESIGN §4.2): its\n     *  qid, AST, {@link ResultType}, row count, and a capped row sample. Built fresh on each call from\n     *  the live `views`/`asts` maps — never cached, never mutating. `sampleRows` caps the per-query\n     *  peek (default 50) so a large view doesn't bloat the snapshot. */\n    __inspect(sampleRows?: number): StoreInspect;\n    private columns;\n    /** An object row → a positional cell array in the table's column order (json → string). */\n    private positionalize;\n    /** The per-level column types parallel to the WireSchema, so the view parses json columns. */\n    private viewTypes;\n}","description":"","source":"packages/client/src/store.ts","line":92,"href":"/reference/typescript/wasm/#symbol-Store"},{"name":"StoreInspect","originalName":"StoreInspect","kind":"InterfaceDeclaration","signature":"/** A frozen snapshot of the Store's live query state for a devtools pane ({@link Store.__inspect}). */\nexport interface StoreInspect {\n    queries: QueryInspect[];\n}","description":"A frozen snapshot of the Store's live query state for a devtools pane ({@link Store.__inspect}).","source":"packages/client/src/store.ts","line":88,"href":"/reference/typescript/wasm/#symbol-StoreInspect"},{"name":"STREAM_STATUS_STREAMING","originalName":"STREAM_STATUS_STREAMING","kind":"VariableDeclaration","signature":"/** The value in the mapped status column while a stream is live. */\nexport declare const STREAM_STATUS_STREAMING = \"streaming\";","description":"The value in the mapped status column while a stream is live.","source":"packages/client/src/stream.ts","line":22,"href":"/reference/typescript/wasm/#symbol-STREAM_STATUS_STREAMING"},{"name":"StreamFrame","originalName":"StreamFrame","kind":"TypeAliasDeclaration","signature":"/**\n * One frame of a subscription. A subscription always begins with `open` and always ends with exactly\n * one terminal frame — `end`, `stale`, or `absent` — after which the iterator completes.\n *\n * `stale` and `absent` are the two \"you are on the durable plane now\" answers, and both are SAFE:\n * the store holds everything below `floorSeq` and everything through `durableSeq`, so the reader's\n * IVM view converges without the stream. Neither is an error.\n */\nexport type StreamFrame = \n/** Join accepted. `from` is the (clamped) offset the replay starts at. */\n{\n    type: \"open\";\n    streamId: string;\n    from: number;\n    seq: number;\n    durableSeq: number;\n    ended: boolean;\n}\n/** PRODUCED text — not a durability claim. `text.length === seq - from`, always. */\n | {\n    type: \"chunk\";\n    from: number;\n    seq: number;\n    text: string;\n}\n/** The store now holds the prefix through `seq`. */\n | {\n    type: \"durable\";\n    seq: number;\n}\n/** Sealed. No further frames. */\n | {\n    type: \"end\";\n    seq: number;\n    status: StreamStatus;\n    error?: string;\n}\n/** `from` is below the producer's retained buffer floor (or the subscriber fell too far behind):\n *  read the store. (A raw `EventSource` rejoins automatically on its reconnect; `useStreamedText`\n *  deliberately stays on the durable plane instead — correct, at checkpoint granularity.) */\n | {\n    type: \"stale\";\n    floorSeq: number;\n    durableSeq: number;\n}\n/** The process serving this subscribe is not hosting the stream (wrong instance, already evicted,\n *  or it never existed): the store is the whole truth. */\n | {\n    type: \"absent\";\n};","description":"One frame of a subscription. A subscription always begins with `open` and always ends with exactly\none terminal frame — `end`, `stale`, or `absent` — after which the iterator completes.\n\n`stale` and `absent` are the two \"you are on the durable plane now\" answers, and both are SAFE:\nthe store holds everything below `floorSeq` and everything through `durableSeq`, so the reader's\nIVM view converges without the stream. Neither is an error.","source":"packages/client/src/stream.ts","line":32,"href":"/reference/typescript/wasm/#symbol-StreamFrame"},{"name":"StreamStatus","originalName":"StreamStatus","kind":"TypeAliasDeclaration","signature":"/**\n * How a stream ended.\n * - `complete` — the model finished.\n * - `cancelled` — the reader asked it to stop and the producer honoured it.\n * - `error` — the generation threw.\n * - `interrupted` — the host went away mid-generation. The one status that implies the store may be\n *   short of what was produced.\n */\nexport type StreamStatus = \"complete\" | \"cancelled\" | \"error\" | \"interrupted\";","description":"How a stream ended.\n- `complete` — the model finished.\n- `cancelled` — the reader asked it to stop and the producer honoured it.\n- `error` — the generation threw.\n- `interrupted` — the host went away mid-generation. The one status that implies the store may be\n  short of what was produced.","source":"packages/client/src/stream.ts","line":19,"href":"/reference/typescript/wasm/#symbol-StreamStatus"},{"name":"string","originalName":"string","kind":"VariableDeclaration","signature":"export declare const string: <T extends string = string>() => ColBuilder<T>;","description":"","source":"packages/client/src/schema.ts","line":46,"href":"/reference/typescript/wasm/#symbol-string"},{"name":"subRow","originalName":"subRow","kind":"FunctionDeclaration","signature":"/** Read a named sub-row off a change's `node` by relationship alias (e.g. the `guest` under an\n *  `rsvp`) — the `add` node, or a `remove`'s subtree when the consumer opted into it. The alias →\n *  wire slot mapping comes from the changed level's `WireSchema`. `null` when no node rode along. */\nexport declare function subRow(rc: ResolvedChange, alias: string): NamedRow | null;","description":"Read a named sub-row off a change's `node` by relationship alias (e.g. the `guest` under an\n`rsvp`) — the `add` node, or a `remove`'s subtree when the consumer opted into it. The alias →\nwire slot mapping comes from the changed level's `WireSchema`. `null` when no node rode along.","source":"packages/client/src/resolve.ts","line":128,"href":"/reference/typescript/wasm/#symbol-subRow"},{"name":"SyncEffectExec","originalName":"SyncEffectExec","kind":"InterfaceDeclaration","signature":"/** A tier's SYNCHRONOUS effect executor (the browser wasm engine): apply a write, resolve a read —\n *  both immediate. */\nexport interface SyncEffectExec {\n    apply(op: MutationOp): void;\n    read(table: string, pk: KeyedRow): KeyedRow | undefined;\n    query(q: QueryArg): QueryResultRow[];\n}","description":"A tier's SYNCHRONOUS effect executor (the browser wasm engine): apply a write, resolve a read —\nboth immediate.","source":"packages/client/src/mutation-ops.ts","line":226,"href":"/reference/typescript/wasm/#symbol-SyncEffectExec"},{"name":"SyncQueryLease","originalName":"SyncQueryLease","kind":"InterfaceDeclaration","signature":"export interface SyncQueryLease {\n    readonly resultType: ResultType;\n    subscribe(listener: () => void): () => void;\n    release(): void;\n}","description":"","source":"packages/client/src/store.ts","line":58,"href":"/reference/typescript/wasm/#symbol-SyncQueryLease"},{"name":"table","originalName":"table","kind":"FunctionDeclaration","signature":"/** `table(\"issue\").columns({ id: string(), … }).primaryKey(\"id\")`. Pass `{ local: true }` for a\n *  {@link TableMeta.local local-only} table (`201-LOCAL-ONLY-TABLES-DESIGN.md`). */\nexport declare function table<N extends string>(name: N, opts?: TableOptions): {\n    columns<C extends AnyCols>(cols: C): {\n        primaryKey<K extends keyof C & string>(...keys: K[]): TableDef<N, C, K>;\n    };\n};","description":"`table(\"issue\").columns({ id: string(), … }).primaryKey(\"id\")`. Pass `{ local: true }` for a\n{@link TableMeta.locallocal-only} table (`201-LOCAL-ONLY-TABLES-DESIGN.md`).","source":"packages/client/src/schema.ts","line":160,"href":"/reference/typescript/wasm/#symbol-table"},{"name":"TableDef","originalName":"TableDef","kind":"TypeAliasDeclaration","signature":"export type TableDef<N extends string, C extends AnyCols, PK extends string = string> = {\n    readonly [SCHEMA]: TableMeta<N, C, PK>;\n} & {\n    readonly [K in keyof C]: (arg: Arg<ColT<C[K]>>) => Cond<RowOf<C>>;\n};","description":"","source":"packages/client/src/schema.ts","line":92,"href":"/reference/typescript/wasm/#symbol-TableDef"},{"name":"TableLike","originalName":"TableLike","kind":"TypeAliasDeclaration","signature":"/** Any table, for positions that only read its metadata. The field-factory part of a\n *  `TableDef` is invariant in `C`, so callers constrain on the `[SCHEMA]` meta only — to\n *  which every concrete `TableDef<N, C>` is assignable. */\nexport type TableLike<C extends AnyCols> = {\n    readonly [SCHEMA]: TableMeta<string, C>;\n};","description":"Any table, for positions that only read its metadata. The field-factory part of a\n`TableDef` is invariant in `C`, so callers constrain on the `[SCHEMA]` meta only — to\nwhich every concrete `TableDef<N, C>` is assignable.","source":"packages/client/src/schema.ts","line":101,"href":"/reference/typescript/wasm/#symbol-TableLike"},{"name":"tableMeta","originalName":"tableMeta","kind":"FunctionDeclaration","signature":"/** Read a table's metadata (columns / PK / name). */\nexport declare function tableMeta(t: AnyTable): TableMeta;","description":"Read a table's metadata (columns / PK / name).","source":"packages/client/src/schema.ts","line":183,"href":"/reference/typescript/wasm/#symbol-tableMeta"},{"name":"TableMeta","originalName":"TableMeta","kind":"InterfaceDeclaration","signature":"export interface TableMeta<N extends string = string, C extends AnyCols = AnyCols, PK extends string = string> {\n    readonly name: N;\n    readonly columns: C;\n    readonly primaryKey: readonly PK[];\n    /** A **local-only** table (`201-LOCAL-ONLY-TABLES-DESIGN.md`): client-authoritative,\n     *  never synced/tracked/rebased. The single marker the whole design keys off (§4) — it is\n     *  immutable for the table's lifetime (N2) and never crosses the wire (C2). Absent ⇒ an\n     *  ordinary synced table.\n     *\n     *  `true` ⇒ eligible for the local-persistence plane (durable + cross-tab when the client\n     *  enables `persistLocal`, `207-LOCAL-TABLE-PERSISTENCE-DESIGN.md`). `\"session\"` ⇒ local but\n     *  EPHEMERAL: outside the plane entirely — never persisted, never replicated across tabs,\n     *  per-client-instance state that empties on reload (201's original behavior) even when\n     *  `persistLocal` is on. Every OTHER locality rule (untracked source, M1/M2 guards, E3/Q1\n     *  wire exclusion) treats both variants identically. */\n    readonly local?: boolean | \"session\";\n}","description":"","source":"packages/client/src/schema.ts","line":59,"href":"/reference/typescript/wasm/#symbol-TableMeta"},{"name":"TableOptions","originalName":"TableOptions","kind":"InterfaceDeclaration","signature":"/** Options for {@link table}. */\nexport interface TableOptions {\n    /** Declare a {@link TableMeta.local local-only} table (selection state, draft text, view\n     *  prefs, scratch rows): client-authoritative, never synced or rebased. See\n     *  `201-LOCAL-ONLY-TABLES-DESIGN.md`. Pass `\"session\"` for a local table that must stay\n     *  EPHEMERAL and per-tab even when the client enables `persistLocal` — e.g. selection state\n     *  that should not follow the user across tabs or reloads (207 §5.4). */\n    local?: boolean | \"session\";\n}","description":"Options for {@link table}.","source":"packages/client/src/schema.ts","line":83,"href":"/reference/typescript/wasm/#symbol-TableOptions"},{"name":"tableSpec","originalName":"tableSpec","kind":"FunctionDeclaration","signature":"/** The `SchemaSpec` (`columns` + `primaryKey` indices) the wasm `Db.registerTable` wants. */\nexport declare function tableSpec(meta: TableMeta): {\n    columns: string[];\n    primaryKey: number[];\n};","description":"The `SchemaSpec` (`columns` + `primaryKey` indices) the wasm `Db.registerTable` wants.","source":"packages/client/src/schema.ts","line":498,"href":"/reference/typescript/wasm/#symbol-tableSpec"},{"name":"toCell","originalName":"toCell","kind":"FunctionDeclaration","signature":"/** Encode a keyed-row cell to its wire {@link WireValue} for a column KIND — the one place both write\n *  funnels stringify a `json<T>` object (the typed mutator surface / design 206 §7). An\n *  already-stringified json value (a `string`) or any non-json cell passes through unchanged, so a\n *  mutator may pass EITHER a parsed object OR a JSON string. Mirrors `store.positionalize`. */\nexport declare function toCell(v: WireValue | object, type: ColType): WireValue;","description":"Encode a keyed-row cell to its wire {@link WireValue} for a column KIND — the one place both write\nfunnels stringify a `json<T>` object (the typed mutator surface / design 206 §7). An\nalready-stringified json value (a `string`) or any non-json cell passes through unchanged, so a\nmutator may pass EITHER a parsed object OR a JSON string. Mirrors `store.positionalize`.","source":"packages/client/src/schema.ts","line":536,"href":"/reference/typescript/wasm/#symbol-toCell"},{"name":"UpdateOf","originalName":"UpdateOf","kind":"TypeAliasDeclaration","signature":"/** The UPDATE shape of a table: its {@link PkOf primary-key columns} REQUIRED (they identify the row)\n *  plus every non-pk column OPTIONAL (`?`) and typed — a nullable one stays `T | null` (settable to\n *  null), a `NOT NULL` one is `T`. Omitted non-pk columns are left unchanged. */\nexport type UpdateOf<C extends AnyCols, PK extends string> = Simplify<PkOf<C, PK> & {\n    [K in Exclude<keyof C, PK>]?: ColT<C[K]>;\n}>;","description":"The UPDATE shape of a table: its {@link PkOfprimary-key columns} REQUIRED (they identify the row)\nplus every non-pk column OPTIONAL (`?`) and typed — a nullable one stays `T | null` (settable to\nnull), a `NOT NULL` one is `T`. Omitted non-pk columns are left unchanged.","source":"packages/client/src/schema.ts","line":145,"href":"/reference/typescript/wasm/#symbol-UpdateOf"},{"name":"ValuePosition","originalName":"ValuePosition","kind":"TypeAliasDeclaration","signature":"/** A column reference or a literal — `type`-tagged. */\nexport type ValuePosition = {\n    type: \"column\";\n    name: string;\n} | {\n    type: \"literal\";\n    value: LitValue;\n};","description":"A column reference or a literal — `type`-tagged.","source":"packages/client/src/ast.ts","line":14,"href":"/reference/typescript/wasm/#symbol-ValuePosition"},{"name":"ViewChangeListener","originalName":"ViewChangeListener","kind":"TypeAliasDeclaration","signature":"/** A per-view change listener ({@link ArrayView.onChanges}): the net `FlatChange[]` this view folded,\n *  the {@link ChangePhase} it arrived on, and the view's `WireSchema` (the position→name source for\n *  `resolveChange`). This is the DIFF the data channel ({@link ArrayView.subscribe}) discards — the\n *  seam a narrator drives off. The `schema` is passed (not closed over) because the first `snapshot`\n *  fires synchronously inside `materialize`, before the caller holds the view handle. */\nexport type ViewChangeListener = (changes: FlatChange[], phase: ChangePhase, schema: WireSchema) => void;","description":"A per-view change listener ({@link ArrayView.onChanges}): the net `FlatChange[]` this view folded,\nthe {@link ChangePhase} it arrived on, and the view's `WireSchema` (the position→name source for\n`resolveChange`). This is the DIFF the data channel ({@link ArrayView.subscribe}) discards — the\nseam a narrator drives off. The `schema` is passed (not closed over) because the first `snapshot`\nfires synchronously inside `materialize`, before the caller holds the view handle.","source":"packages/client/src/view.ts","line":30,"href":"/reference/typescript/wasm/#symbol-ViewChangeListener"},{"name":"ViewTypes","originalName":"ViewTypes","kind":"InterfaceDeclaration","signature":"/** Per-level column types (parallel to the WireSchema), used to JSON.parse json columns on\n *  projection. Built by the Store from the typed schema; absent ⇒ no parsing (bare values). */\nexport interface ViewTypes {\n    columnTypes: ColType[];\n    rels: Record<number, ViewTypes>;\n}","description":"Per-level column types (parallel to the WireSchema), used to JSON.parse json columns on\nprojection. Built by the Store from the typed schema; absent ⇒ no parsing (bare values).","source":"packages/client/src/view.ts","line":16,"href":"/reference/typescript/wasm/#symbol-ViewTypes"},{"name":"WasmBackend","originalName":"WasmBackend","kind":"ClassDeclaration","signature":"export declare class WasmBackend<S extends ColsMap> implements Backend {\n    private readonly db;\n    private handler;\n    private boundaryHandler;\n    /** Local-only table names (`201-LOCAL-ONLY-TABLES-DESIGN.md` §4): registered UNTRACKED (so the\n     *  optimistic rewind never reverts them) and the only tables {@link writeLocal} accepts. */\n    private readonly localTables;\n    private readonly dispatchQueue;\n    private draining;\n    constructor(schema: Schema<S>);\n    /** Register an additional base table after construction — for a SYNTHETIC aggregate table\n     *  (`AGGREGATE-SYNC-DESIGN.md` §3.3) that is not in the typed schema. The\n     *  `NormalizedBackend` registers each such `__agg_*` table once, before a query that reads\n     *  it, so the local engine can join to it (the relationship `count` it backs is shipped by\n     *  the server, never recomputed). Always synced (tracked) — synthetic tables are never local. */\n    registerTable(name: string, spec: {\n        columns: string[];\n        primaryKey: number[];\n    }): void;\n    /** Direct-commit a batch of LOCAL-only writes (`201-LOCAL-ONLY-TABLES-DESIGN.md` §6): push them\n     *  straight through the engine on the ordinary delivery path, OUTSIDE any optimistic cycle (a\n     *  local table is untracked, so it never rebases). Rejects a synced/tracked table (M2).\n     *  `onCommitted` fires between the engine commit and subscriber delivery ({@link writeWith}) —\n     *  the post-commit anchor the persistence tap needs (207 §5.1). */\n    writeLocal(mutations: Mutation[], onCommitted?: () => void): void;\n    /** Remove a synthetic aggregate table registered by {@link registerTable}, once the last\n     *  query reading it has been unregistered (`AGGREGATE-SYNC-DESIGN.md` §4): frees the engine\n     *  source + its optimistic baseline so aggregate state is reclaimed, not permanent. Throws\n     *  if a query still reads it (the backend refcounts readers, so it calls this only at 0). */\n    unregisterTable(name: string): void;\n    registerQuery(qid: QueryId, ast: Ast): void;\n    unregisterQuery(qid: QueryId): void;\n    mutate(mutations: Mutation[]): Promise<void>;\n    onEvent(handler: (qid: QueryId, ev: ChangeEvent) => void): void;\n    /** Register the Store's commit-boundary handler ({@link Backend.onCommitBoundary}): `dispatch`\n     *  calls it around each commit's per-query batch delivery so the Store can fold every affected\n     *  view before notifying any subscriber. */\n    onCommitBoundary(handler: (phase: \"begin\" | \"end\") => void): void;\n    /** Deliver one commit's per-query batches. Non-reentrant (#15): if a delivery is already in\n     *  progress (a subscriber re-entered via write()), enqueue and let the active drain pick it\n     *  up FIFO, so each query folds commits in order. Per-query isolated (#11): a view's fold or\n     *  subscriber throwing does NOT drop sibling queries' batches — the first error is re-raised\n     *  only after every query has been delivered.\n     *\n     *  Cross-view-atomic notification: each commit is bracketed with `boundaryHandler(\"begin\"/\"end\")`\n     *  so the Store folds ALL of this commit's views before notifying ANY subscriber (a subscriber\n     *  re-reading a sibling view then sees post-commit data). `begin`/`end` stay balanced even if a\n     *  fold throws (the `finally`), and a re-entrant write enqueued during the `end` flush drains as\n     *  its own bracketed commit in the next loop turn — preserving per-query commit order (#15). */\n    private dispatch;\n    /** Run `f` against a raw staged write txn (with the §4.1 `get` read path), commit, and\n     *  dispatch the resulting batches on the ordinary event stream. Inside an open server\n     *  batch the engine buffers the events into the cycle instead (commit returns `[]`),\n     *  so re-invocations dispatch nothing here — delivery is `serverBatchEnd`'s.\n     *\n     *  `onCommitted` runs after `tx.commit()` returns but before `dispatch` delivers to\n     *  subscribers: a throw from `f` (pre-commit — engine untouched) skips it; a subscriber\n     *  throw re-raised by `dispatch` happens after it. It is the only point where \"the commit\n     *  is applied\" is knowable to a caller that must not confuse the two failure modes. */\n    writeWith(f: (tx: WasmWriteTxn) => void, onCommitted?: () => void): void;\n    /** Open a §1.3 reconcile cycle against the coherent server delta: the engine rewinds every\n     *  tracked table (optimistic layer un-applied, delta folded in, each table's baseline re-forked)\n     *  and starts buffering. Re-invoke the still-pending mutators via {@link writeWith}, then call\n     *  {@link serverBatchEnd}. On error the rebase state is poisoned — discard the backend and\n     *  re-hydrate. */\n    serverBatchBegin(deltas: ServerDeltaOp[]): void;\n    /** Close the cycle: the whole buffered stream (rewind + re-invocations) coalesces to\n     *  the minimal net per query (§3 — a confirmed-correct prediction delivers nothing)\n     *  and dispatches as ONE batch per affected query on the ordinary event stream. */\n    serverBatchEnd(): void;\n}","description":"","source":"packages/wasm/src/index.ts","line":88,"href":"/reference/typescript/wasm/#symbol-WasmBackend"},{"name":"WasmWriteTxn","originalName":"WasmWriteTxn","kind":"InterfaceDeclaration","signature":"/** A raw staged write transaction over the wasm engine — the surface an optimistic client\n *  mutator runs against (`get` reads the live state under this txn's staged overlay, so a\n *  read-dependent mutator sees its own writes; OPTIMISTIC-WRITES-DESIGN.md §4.1). */\nexport interface WasmWriteTxn {\n    add(table: string, row: unknown[]): void;\n    remove(table: string, row: unknown[]): void;\n    edit(table: string, oldRow: unknown[], newRow: unknown[]): void;\n    get(table: string, pk: unknown[]): unknown[] | undefined;\n    /** Run a one-shot query over the state this txn is mutating — the live base plus this\n     *  txn's own staged writes-so-far (read-your-writes; 203-MUTATOR-READS-DESIGN.md §5.2).\n     *  Synchronous (over a lazy read-cache fork of the staged buffer). Returns the query's rows\n     *  as keyed objects with their materialized `related` children nested by name (identical in\n     *  shape to a `view.data` row), in the query's order. */\n    query(ast: Ast): unknown[];\n    commit(): Array<{\n        queryId: number;\n        events: unknown[];\n    }>;\n    rollback(): void;\n}","description":"A raw staged write transaction over the wasm engine — the surface an optimistic client\nmutator runs against (`get` reads the live state under this txn's staged overlay, so a\nread-dependent mutator sees its own writes; OPTIMISTIC-WRITES-DESIGN.md §4.1).","source":"packages/wasm/src/index.ts","line":41,"href":"/reference/typescript/wasm/#symbol-WasmWriteTxn"},{"name":"WireNode","originalName":"WireNode","kind":"InterfaceDeclaration","signature":"export interface WireNode {\n    row: WireValue[];\n    rels: {\n        rel: number;\n        children: WireNode[];\n    }[];\n}","description":"","source":"packages/client/src/types.ts","line":49,"href":"/reference/typescript/wasm/#symbol-WireNode"},{"name":"WireProjection","originalName":"WireProjection","kind":"InterfaceDeclaration","signature":"/** A scalar-projection annotation on a relationship slot (REDUCE-DESIGN.md §9): a\n *  relationship aggregate (`issue { commentCount: count(comments) }`) lives as a singular\n *  one-row relationship whose child is the aggregate row; this tells the receiver to unwrap\n *  it into a scalar field — `commentCount: 5` instead of `commentCount: [{ count: 5 }]`. */\nexport interface WireProjection {\n    /** Which CHILD column to surface as the scalar value (the aggregate column). */\n    col: number;\n    /** The value to emit when the relationship is empty (a childless parent) — the\n     *  aggregate identity (`0` for count, `null` for sum/avg). */\n    identity: WireValue;\n}","description":"A scalar-projection annotation on a relationship slot (REDUCE-DESIGN.md §9): a\nrelationship aggregate (`issue { commentCount: count(comments) }`) lives as a singular\none-row relationship whose child is the aggregate row; this tells the receiver to unwrap\nit into a scalar field — `commentCount: 5` instead of `commentCount: [{ count: 5 }]`.","source":"packages/client/src/types.ts","line":22,"href":"/reference/typescript/wasm/#symbol-WireProjection"},{"name":"WireRel","originalName":"WireRel","kind":"InterfaceDeclaration","signature":"export interface WireRel {\n    name: string;\n    slot: number;\n    /** `null` ⇒ an out-of-view / gating slot (the in-view gate drops `Child`s addressed here). */\n    child: WireSchema | null;\n    /** Non-null ⇒ a scalar-projected relationship aggregate the receiver unwraps to a scalar\n     *  (REDUCE-DESIGN.md §9). Absent/`null` for an ordinary (plural or `.one()`) relationship. */\n    project?: WireProjection | null;\n}","description":"","source":"packages/client/src/types.ts","line":30,"href":"/reference/typescript/wasm/#symbol-WireRel"},{"name":"WireSchema","originalName":"WireSchema","kind":"InterfaceDeclaration","signature":"export interface WireSchema {\n    columns: string[];\n    primaryKey: number[];\n    /** Resolved, PK-completed sort: `[columnIndex, ascending]` pairs (the comparator input). */\n    sort: [\n        number,\n        boolean\n    ][];\n    singular: boolean;\n    relationships: WireRel[];\n}","description":"","source":"packages/client/src/types.ts","line":40,"href":"/reference/typescript/wasm/#symbol-WireSchema"},{"name":"WireValue","originalName":"WireValue","kind":"TypeAliasDeclaration","signature":"/** A bare wire cell. (JSON columns arrive as their raw JSON string.) */\nexport type WireValue = number | string | boolean | null;","description":"A bare wire cell. (JSON columns arrive as their raw JSON string.)","source":"packages/client/src/types.ts","line":9,"href":"/reference/typescript/wasm/#symbol-WireValue"},{"name":"WriteTx","originalName":"WriteTx","kind":"InterfaceDeclaration","signature":"/** The write transaction handed to `store.write(tx => …)`. Rows are objects keyed by column;\n *  the Store positionalizes them (and stringifies json columns) before the backend sees them.\n *\n *  `add` takes an {@link InsertOf} row — a nullable column may be omitted (it is filled with `null`,\n *  design 206 §7). `remove`/`edit` take a full {@link RowOf} row: they identify an EXISTING row, so\n *  every column (nullable ones as their actual `T | null` value) must be present. */\nexport interface WriteTx<S extends ColsMap> {\n    add<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): void;\n    remove<N extends keyof S & string>(table: N, row: RowOf<S[N]>): void;\n    edit<N extends keyof S & string>(table: N, oldRow: RowOf<S[N]>, newRow: RowOf<S[N]>): void;\n}","description":"The write transaction handed to `store.write(tx => …)`. Rows are objects keyed by column;\nthe Store positionalizes them (and stringifies json columns) before the backend sees them.\n\n`add` takes an {@link InsertOf} row — a nullable column may be omitted (it is filled with `null`,\ndesign 206 §7). `remove`/`edit` take a full {@link RowOf} row: they identify an EXISTING row, so\nevery column (nullable ones as their actual `T | null` value) must be present.","source":"packages/client/src/store.ts","line":44,"href":"/reference/typescript/wasm/#symbol-WriteTx"},{"name":"YieldEffect","originalName":"YieldEffect","kind":"TypeAliasDeclaration","signature":"/** Everything a generator mutator may `yield`: a write {@link MutationOp}, a point {@link ReadEffect},\n *  a full-query {@link QueryEffect}, or a {@link BatchEffect} fan-out. */\nexport type YieldEffect = MutationOp | ReadEffect | BatchEffect | QueryEffect;","description":"Everything a generator mutator may `yield`: a write {@link MutationOp}, a point {@link ReadEffect},\na full-query {@link QueryEffect}, or a {@link BatchEffect} fan-out.","source":"packages/client/src/mutation-ops.ts","line":95,"href":"/reference/typescript/wasm/#symbol-YieldEffect"}]}],"supportFiles":[{"source":"packages/affinity/src/index.ts","declarations":[{"name":"TICKET_PREFIX","signature":"/** The token namespace marker — the first dot-segment of every ticket. */\nexport declare const TICKET_PREFIX = \"aff\";"},{"name":"WS_SUBPROTOCOL","signature":"/** The base ws subprotocol offered alongside the `aff.*` ticket; the daemon echoes it on the 101. */\nexport declare const WS_SUBPROTOCOL = \"rindle.v1\";"},{"name":"HEADER_NAME","signature":"/** The api-server → fleet control-plane header carrying the ticket on `/materialize` and `/query`. */\nexport declare const HEADER_NAME = \"Rindle-Affinity\";"},{"name":"Payload","signature":"/**\n * The signed ticket body. Field order here is the canonical mint order — it is exactly the compact\n * JSON that gets base64url-encoded and signed, so it must match the Rust `Payload` struct order.\n */\nexport interface Payload {\n    /** App id the ticket is scoped to. */\n    app: string;\n    /** Placement target id. */\n    mid: string;\n    /** Region code of `mid`. */\n    region: string;\n    /** Subject: the connection identity (clientInstanceId). */\n    sub: string;\n    /** Issued-at, unix seconds (informational). */\n    iat: number;\n    /** Expiry, unix seconds. `verify` rejects once `now > exp`. */\n    exp: number;\n    /** Generation minted under; a fleet-wide bump drains older tickets. */\n    gen: number;\n}"},{"name":"Expect","signature":"/** What {@link verify} holds a ticket against, supplied by the verifier. */\nexport interface Expect {\n    /** The verifier's app id; must equal `payload.app`. */\n    app: string;\n    /** Current wall-clock, unix seconds. `exp < now` ⇒ rejected. */\n    now: number;\n    /** Minimum accepted generation; `gen < minGen` ⇒ rejected. `0` accepts any. */\n    minGen: number;\n}"},{"name":"VerifyError","signature":"/** Why a ticket failed {@link verify}. Every variant is a terminal reject (fall back to re-pin). */\nexport type VerifyError = \"malformed\" | \"bad-signature\" | \"wrong-app\" | \"expired\" | \"stale-generation\";"},{"name":"VerifyResult","signature":"/** {@link verify}'s result: the authenticated payload, or a reason. */\nexport type VerifyResult = {\n    readonly ok: true;\n    readonly payload: Payload;\n} | {\n    readonly ok: false;\n    readonly error: VerifyError;\n};"},{"name":"Key","signature":"type Key = string | Uint8Array;"},{"name":"mint","signature":"/**\n * Mint a ticket over `payload`, signed with `key`. Deterministic (no randomness): the same\n * `(payload, key)` always yields the same token. The compact JSON is built in the fixed field order\n * so the bytes match the Rust crate's `serde_json` compact output.\n */\nexport declare function mint(payload: Payload, key: Key): string;"},{"name":"verify","signature":"/**\n * Verify `token` against `keys` (current first, then rotation-window predecessors) and `expect`.\n * The HMAC is checked (constant-time) over the transmitted base64url payload segment before the\n * payload is parsed, so a tampered payload fails as `bad-signature`, never as a parse of attacker\n * bytes.\n */\nexport declare function verify(token: string, keys: readonly Key[], expect: Expect): VerifyResult;"},{"name":"wsSubprotocolTicket","signature":"/**\n * Extract the `aff.*` ticket from a `Sec-WebSocket-Protocol` header value (a comma list, e.g.\n * `rindle.v1, aff.<…>`). Returns the raw ticket segment for {@link verify}, or `null`. Does not verify.\n */\nexport declare function wsSubprotocolTicket(header: string): string | null;"},{"name":"wsOffersBase","signature":"/** Whether the header offers the base {@link WS_SUBPROTOCOL} — the daemon must echo it on the 101. */\nexport declare function wsOffersBase(header: string): boolean;"},{"name":"headerTicket","signature":"/** Extract the ticket from a {@link HEADER_NAME} value. Returns the raw segment, or `null`. */\nexport declare function headerTicket(value: string): string | null;"}]},{"source":"packages/client/src/ast.ts","declarations":[{"name":"Dir","signature":"export type Dir = \"asc\" | \"desc\";"},{"name":"OrderPart","signature":"/** One `(field, direction)` ordering — serializes as the 2-tuple `[\"id\", \"asc\"]`. */\nexport type OrderPart = [\n    field: string,\n    dir: Dir\n];"},{"name":"LitValue","signature":"/** An untagged literal (`null | bool | number | string | array`). Numbers are one f64. */\nexport type LitValue = null | boolean | number | string | LitValue[];"},{"name":"ValuePosition","signature":"/** A column reference or a literal — `type`-tagged. */\nexport type ValuePosition = {\n    type: \"column\";\n    name: string;\n} | {\n    type: \"literal\";\n    value: LitValue;\n};"},{"name":"SimpleOp","signature":"/** The wire comparison operators (exact strings, `src/ast.rs` `Op`). */\nexport type SimpleOp = \"=\" | \"!=\" | \"<\" | \"<=\" | \">\" | \">=\" | \"IS\" | \"IS NOT\" | \"LIKE\" | \"NOT LIKE\" | \"ILIKE\" | \"NOT ILIKE\" | \"IN\" | \"NOT IN\";"},{"name":"ExistsOp","signature":"export type ExistsOp = \"EXISTS\" | \"NOT EXISTS\";"},{"name":"Condition","signature":"/** The filter tree — `type`-tagged; recursive. There is no generic NOT node (negation is\n *  via the negated operators and `NOT EXISTS`, matching `src/ast.rs` `Condition`). */\nexport type Condition = {\n    type: \"simple\";\n    op: SimpleOp;\n    left: ValuePosition;\n    right: ValuePosition;\n} | {\n    type: \"and\";\n    conditions: Condition[];\n} | {\n    type: \"or\";\n    conditions: Condition[];\n} | {\n    type: \"correlatedSubquery\";\n    related: CorrelatedSubquery;\n    op: ExistsOp;\n    flip?: boolean;\n    scalar?: boolean;\n};"},{"name":"Correlation","signature":"export interface Correlation {\n    parentField: string[];\n    childField: string[];\n}"},{"name":"Bound","signature":"/** A paging lower bound (`Bound`, `src/ast.rs`). `row` is a *partial* wire row — the bound\n *  columns by name (only the sort columns are read by the engine's `Skip` comparator).\n *  `exclusive` ⇒ start *after* the bound row (`Basis::After`); else *at* it (`Basis::At`). */\nexport interface Bound {\n    row: Record<string, LitValue>;\n    exclusive: boolean;\n}"},{"name":"CorrelatedSubquery","signature":"export interface CorrelatedSubquery {\n    correlation: Correlation;\n    subquery: Ast;\n    system?: \"client\" | \"permissions\" | \"test\";\n}"},{"name":"Aggregate","signature":"/** An aggregate over a (correlated) subquery's rows (`REDUCE-DESIGN.md`). v1: `count(*)`.\n *  Set on a `related` subquery (`Ast.aggregate`), it marks that relationship a count\n *  aggregate the builder lowers to a scalar-projected singular relationship (§9). */\nexport type Aggregate = \"count\";"},{"name":"Ast","signature":"/** The query AST. `table` is the only required field; the builder omits empty/false fields\n *  (matching the Rust `skip_serializing_if`), which the deserializer treats as absent. */\nexport interface Ast {\n    table: string;\n    alias?: string;\n    /** Projection (PROJECTION-SUPPORT-DESIGN.md §6). Absent ⇒ select all columns; present ⇒\n     *  project to just these (drives what syncs + what the view reports). Serializes only when\n     *  set, matching the Rust `Ast.select`'s `skip_serializing_if`. */\n    select?: string[];\n    where?: Condition;\n    related?: CorrelatedSubquery[];\n    start?: Bound;\n    limit?: number;\n    one?: boolean;\n    /** Aggregate this (sub)query's rows instead of materializing them (`REDUCE-DESIGN.md`\n     *  §9). `count` on a `related` subquery surfaces a scalar `commentCount` field; the\n     *  builder lowers it to a scalar-projected singular relationship. Absent ⇒ ordinary rows. */\n    aggregate?: Aggregate;\n    /** The {@link Ast.aggregate} value is **precomputed** — supplied as rows of a (synthetic)\n     *  source table rather than reduced from child rows. Set by the normalized client's AST\n     *  rewrite (`AGGREGATE-SYNC-DESIGN.md` §3.3) so the local engine reads the server's count\n     *  with a plain singular join + the same projection instead of a `reduce`. Only meaningful\n     *  with `aggregate`; absent ⇒ `false`. */\n    aggregatePrecomputed?: boolean;\n    /** Top-level `GROUP BY` columns (names), meaningful only alongside a root {@link Ast.aggregate}\n     *  (`REDUCE-DESIGN.md` §8). Empty + `aggregate` set ⇒ a **global** aggregate (one `[count]` row);\n     *  non-empty ⇒ one `[group…, count]` row per distinct value-tuple. Distinct from a relationship\n     *  aggregate's implicit grouping (the correlation child key). Absent on the wire ⇒ empty. */\n    groupBy?: string[];\n    /** `HAVING` — a filter over the **post-aggregation** rows of a root {@link Ast.aggregate}\n     *  (`REDUCE-DESIGN.md` §4: a filter directly above the `reduce`). Its condition addresses the\n     *  aggregate's *output* columns — the {@link Ast.groupBy} columns and the synthetic `count`\n     *  column — not base-table columns (those go in {@link Ast.where}, which filters rows *below* the\n     *  reduce). Absent ⇒ no post-aggregation filter. */\n    having?: Condition;\n    orderBy?: OrderPart[];\n}"}]},{"source":"packages/client/src/operators.ts","declarations":[{"name":"PRED","signature":"declare const PRED: unique symbol;"},{"name":"Pred","signature":"/** A value predicate (an operator applied to a value). `V` is a phantom for type-checking. */\nexport interface Pred<V> {\n    readonly [PRED]: true;\n    readonly op: SimpleOp;\n    readonly value: LitValue;\n    readonly __v?: V;\n}"},{"name":"isPred","signature":"export declare function isPred(x: unknown): x is Pred<unknown>;"},{"name":"eq","signature":"export declare const eq: <V>(v: V) => Pred<V>;"},{"name":"ne","signature":"export declare const ne: <V>(v: V) => Pred<V>;"},{"name":"gt","signature":"export declare const gt: <V extends number | string>(v: V) => Pred<V>;"},{"name":"ge","signature":"export declare const ge: <V extends number | string>(v: V) => Pred<V>;"},{"name":"lt","signature":"export declare const lt: <V extends number | string>(v: V) => Pred<V>;"},{"name":"le","signature":"export declare const le: <V extends number | string>(v: V) => Pred<V>;"},{"name":"like","signature":"export declare const like: (pattern: string) => Pred<string>;"},{"name":"notLike","signature":"export declare const notLike: (pattern: string) => Pred<string>;"},{"name":"ilike","signature":"export declare const ilike: (pattern: string) => Pred<string>;"},{"name":"notIlike","signature":"export declare const notIlike: (pattern: string) => Pred<string>;"},{"name":"inList","signature":"export declare const inList: <V>(values: V[]) => Pred<V>;"},{"name":"notInList","signature":"export declare const notInList: <V>(values: V[]) => Pred<V>;"},{"name":"is","signature":"export declare const is: <V>(v: V) => Pred<V>;"},{"name":"isNot","signature":"export declare const isNot: <V>(v: V) => Pred<V>;"},{"name":"isNull","signature":"/** `IS NULL` — a field-agnostic null check. `V` is inferred from the field's expected `Arg<V>`\n *  (e.g. `where.signedAt(isNull())`), so it fits a column of any type without a cast. */\nexport declare const isNull: <V = never>() => Pred<V>;"},{"name":"isNotNull","signature":"/** `IS NOT NULL` — the negation of {@link isNull}; `V` is inferred from the field, like {@link isNull}. */\nexport declare const isNotNull: <V = never>() => Pred<V>;"},{"name":"Arg","signature":"/** A field argument: its typed predicate, or a bare value (bare = `eq` sugar). */\nexport type Arg<V> = Pred<V> | V;"},{"name":"Cond","signature":"/** A condition over row `R`. The runtime value is the wire {@link Condition}; `R` is a\n *  phantom brand so a condition for one table can't be `.where()`d onto another. */\nexport type Cond<R> = Condition & {\n    readonly __row?: R;\n};"},{"name":"fieldCondition","signature":"/** Build a `simple` condition from a field name + (predicate | bare value). */\nexport declare function fieldCondition(field: string, arg: unknown): Condition;"},{"name":"and","signature":"/** All children must hold. */\nexport declare function and<R>(...conds: Cond<R>[]): Cond<R>;"},{"name":"or","signature":"/** At least one child must hold. */\nexport declare function or<R>(...conds: Cond<R>[]): Cond<R>;"}]},{"source":"packages/client/src/types.ts","declarations":[{"name":"WireValue","signature":"/** A bare wire cell. (JSON columns arrive as their raw JSON string.) */\nexport type WireValue = number | string | boolean | null;"},{"name":"ColType","signature":"/** Declared column type (from the typed schema) — drives the comparator + JSON parsing.\n *  `\"int64\"` is the exact-i64 column plane (design 226): the vocabulary exists from\n *  Stage C4 (codegen can name it), but no exact integer cell crosses this wire — and\n *  `WireValue` gains no `bigint` — until Stage E lands the browser bigint plane; until\n *  then the daemon refuses IVM queries whose footprint touches such a column. */\nexport type ColType = \"string\" | \"number\" | \"boolean\" | \"json\" | \"int64\";"},{"name":"WireProjection","signature":"/** A scalar-projection annotation on a relationship slot (REDUCE-DESIGN.md §9): a\n *  relationship aggregate (`issue { commentCount: count(comments) }`) lives as a singular\n *  one-row relationship whose child is the aggregate row; this tells the receiver to unwrap\n *  it into a scalar field — `commentCount: 5` instead of `commentCount: [{ count: 5 }]`. */\nexport interface WireProjection {\n    /** Which CHILD column to surface as the scalar value (the aggregate column). */\n    col: number;\n    /** The value to emit when the relationship is empty (a childless parent) — the\n     *  aggregate identity (`0` for count, `null` for sum/avg). */\n    identity: WireValue;\n}"},{"name":"WireRel","signature":"export interface WireRel {\n    name: string;\n    slot: number;\n    /** `null` ⇒ an out-of-view / gating slot (the in-view gate drops `Child`s addressed here). */\n    child: WireSchema | null;\n    /** Non-null ⇒ a scalar-projected relationship aggregate the receiver unwraps to a scalar\n     *  (REDUCE-DESIGN.md §9). Absent/`null` for an ordinary (plural or `.one()`) relationship. */\n    project?: WireProjection | null;\n}"},{"name":"WireSchema","signature":"export interface WireSchema {\n    columns: string[];\n    primaryKey: number[];\n    /** Resolved, PK-completed sort: `[columnIndex, ascending]` pairs (the comparator input). */\n    sort: [\n        number,\n        boolean\n    ][];\n    singular: boolean;\n    relationships: WireRel[];\n}"},{"name":"WireNode","signature":"export interface WireNode {\n    row: WireValue[];\n    rels: {\n        rel: number;\n        children: WireNode[];\n    }[];\n}"},{"name":"PathSeg","signature":"export interface PathSeg {\n    rel: number;\n    parentRow: WireValue[];\n}"},{"name":"FlatOp","signature":"/** A positional change at one level of the view tree. A `remove` ships only the leaving `row`\n *  (the receiver already holds the subtree and locates it by key) — `node` is NEVER on the wire;\n *  it is an OPTIONAL client-side enrichment carrying the full removed subtree, attached by the\n *  ArrayView when a change consumer opts in (`Store.subscribeChanges(_, { removedSubtree: true })`),\n *  so a narrator can resolve a removed row's nested subs just as it can on an `add`. */\nexport type FlatOp = {\n    tag: \"add\";\n    node: WireNode;\n} | {\n    tag: \"remove\";\n    row: WireValue[];\n    node?: WireNode;\n} | {\n    tag: \"edit\";\n    old: WireValue[];\n    new: WireValue[];\n};"},{"name":"FlatChange","signature":"export interface FlatChange {\n    path: PathSeg[];\n    op: FlatOp;\n}"},{"name":"ChangeEvent","signature":"/**\n * What a {@link Backend} pushes per query: the handshake (`hello`), the (possibly\n * chunked) hydrate `snapshot`, then incremental `batch`es. The core builds an ArrayView\n * on `hello`, hydrates on `snapshot`, folds on `batch` — identically for any backend.\n */\nexport type ChangeEvent = {\n    type: \"hello\";\n    schema: WireSchema;\n    comparatorVersion: number;\n} | {\n    type: \"snapshot\";\n    adds: FlatChange[];\n    last: boolean;\n} | {\n    type: \"batch\";\n    events: FlatChange[];\n    catchUp?: boolean;\n};"},{"name":"Mutation","signature":"export type Mutation = {\n    op: \"add\";\n    table: string;\n    row: WireValue[];\n} | {\n    op: \"remove\";\n    table: string;\n    row: WireValue[];\n} | {\n    op: \"edit\";\n    table: string;\n    old: WireValue[];\n    new: WireValue[];\n};"},{"name":"NormalizedOp","signature":"/**\n * A table-tagged, path-free row delta — the **normalized** wire payload (the path-free twin\n * of {@link FlatChange}; NORMALIZED-CHANGES-DESIGN.md §3). Rows are positional (bare cells; a\n * json column is its raw JSON string). `op` is the discriminant. Lives here (not in\n * `@rindle/normalized`) so both the protocol (`@rindle/remote`) and the sync layer share one type.\n */\nexport type NormalizedOp = {\n    table: string;\n    op: \"add\";\n    row: WireValue[];\n} | {\n    table: string;\n    op: \"remove\";\n    row: WireValue[];\n} | {\n    table: string;\n    op: \"edit\";\n    old: WireValue[];\n    new: WireValue[];\n};"},{"name":"NormalizedTableSchema","signature":"/** One base table's flat schema on the normalized `hello` (§3): column names (in order) +\n *  primary-key column indices. Wire rows are positional against `columns`. */\nexport interface NormalizedTableSchema {\n    name: string;\n    columns: string[];\n    primaryKey: number[];\n}"},{"name":"NormalizedEvent","signature":"/**\n * A per-query NORMALIZED stream event — the path-free twin of {@link ChangeEvent}. The\n * `hello` carries the flat per-table schemas (no nested view schema, §3); `snapshot`/`batch`\n * carry table-tagged {@link NormalizedOp}s. The `NormalizedSync` layer folds these into the\n * local engine's base tables.\n *\n * `cv` (the global commit version the frame's data reflects — OPTIMISTIC-WRITES-DESIGN.md\n * §8.3/§8.6) is present on sources that speak the optimistic protocol; the plain normalized\n * path may omit it.\n */\nexport type NormalizedEvent = {\n    type: \"hello\";\n    tables: NormalizedTableSchema[];\n    comparatorVersion: number;\n    normalizedFp: string;\n} | {\n    type: \"snapshot\";\n    ops: NormalizedOp[];\n    cv?: number;\n} | {\n    type: \"batch\";\n    ops: NormalizedOp[];\n    cv?: number;\n};"},{"name":"QueryId","signature":"export type QueryId = number;"},{"name":"BackendServerDelta","signature":"/** A dev-only authoritative server delta exposed by backends that can distinguish the upstream\n *  server stream from their local view/IVM stream. Flat remote backends surface clean\n *  {@link ChangeEvent}s; local-first normalized/optimistic backends surface the path-free\n *  {@link NormalizedEvent}s before they are folded into the local engine. */\nexport type BackendServerDelta = {\n    format: \"flat\";\n    event: ChangeEvent;\n} | {\n    format: \"normalized\";\n    event: NormalizedEvent;\n};"},{"name":"BackendDevObserver","signature":"/** Dev-only passive tap over a backend's authoritative server stream. Optional because in-process\n *  backends have no server stream, and older/custom backends may only expose the Store tap. */\nexport interface BackendDevObserver {\n    onServerDelta?(qid: QueryId, ev: BackendServerDelta): void;\n}"},{"name":"ResultType","signature":"/** A query's SERVER-CHANNEL state, surfaced on its {@link ArrayView} (FOLDED-MUTATIONS-DESIGN §7 —\n *  formerly conflated with pending-ness, OPTIMISTIC-WRITES-DESIGN.md §6):\n *   - `unknown`  — not hydrated: the server has not produced a first result for this query yet;\n *   - `complete` — the server has answered. STAYS `complete` while a local mutation is pending (the\n *                  prediction is the client's best current answer); reversion on rejection is an\n *                  event (`onRejected`), not a downgrade of completeness;\n *   - `error`    — RESERVED for a future server-side, query-level error signal\n *                  (see `designs/101-QUERY-ERRORS-DESIGN.md`); no longer produced by a pending mutation.\n *  \"Is a prediction pending here?\" is now a separate reactive axis (the backend's `pending(qid)` /\n *  `onPending`), not folded into this type. A backend with no server lifecycle (the in-process\n *  engine) leaves every view `complete`. */\nexport type ResultType = \"unknown\" | \"complete\" | \"error\";"},{"name":"RemoteQuery","signature":"/** The network identity for a named query subscription. The local AST remains local; remote\n *  normalized/optimistic sources use only this `(name,args)` pair upstream. */\nexport interface RemoteQuery {\n    name: string;\n    args: unknown;\n}"},{"name":"Backend","signature":"/**\n * The seam the core talks to. Backend-agnostic: the same interface for the in-process\n * WASM backend and a remote (network) backend. The core never knows which. A backend\n * pushes a per-query {@link ChangeEvent} stream via {@link Backend.onEvent}; the remote\n * backend additionally owns the epoch/seq/gap protocol and emits only clean, in-order\n * events (so the ArrayView never sees the wire protocol).\n */\nexport interface Backend {\n    registerQuery(queryId: QueryId, ast: unknown, remote?: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Optional split path for local-first backends: retain/release a named remote footprint\n     *  without creating another local materialized view. `localQueryId`, when provided, names\n     *  the local AST view this remote footprint feeds. `ast`, when provided, gives the backend\n     *  the local schema context for sync-only retains that still need aggregate/table setup. */\n    retainRemoteQuery?(queryId: QueryId, remote: RemoteQuery, localQueryId?: QueryId, ast?: Ast): void;\n    releaseRemoteQuery?(queryId: QueryId): void;\n    /** Local: applies now (changes flow back on the stream). Remote: sends to the server. */\n    mutate(mutations: Mutation[]): Promise<void>;\n    /** Optional DIRECT-COMMIT path for LOCAL-only tables (`201-LOCAL-ONLY-TABLES-DESIGN.md` §6):\n     *  applies the writes straight to the engine, OUTSIDE the optimistic pending stack (a local\n     *  table is untracked, so it never rebases). The backend rejects any synced/tracked table (M2).\n     *  Backends with no local-table support (a plain remote sync backend) omit it.\n     *\n     *  `onCommitted` (207 §5.1) runs after the engine commit is applied but BEFORE subscriber\n     *  delivery: a subscriber throwing during delivery re-raises out of this call, and a caller\n     *  that must stay coherent with the engine (the persistence tap) cannot tell that throw from\n     *  a pre-commit rejection — the callback can, because it fires exactly when the commit is in. */\n    writeLocal?(mutations: Mutation[], onCommitted?: () => void): void;\n    onEvent(handler: (queryId: QueryId, event: ChangeEvent) => void): void;\n    /** Optional: the backend pushes per-query {@link ResultType} changes here and the core routes\n     *  each to the matching view (so `view.resultType` tracks it). Backends with no lifecycle (the\n     *  in-process engine) omit it and every view stays `complete`. */\n    onResultType?(handler: (queryId: QueryId, resultType: ResultType) => void): void;\n    /** Optional: brackets one commit's coherent multi-query delivery so the Store can fold every\n     *  affected view BEFORE notifying any subscriber — cross-view-atomic notification. The\n     *  in-process engine derives the whole commit's per-query deltas against one consistent post-\n     *  commit snapshot, then dispatches them one query at a time; without a barrier a subscriber on\n     *  the first-dispatched view, re-reading a sibling view in its callback, would observe that\n     *  sibling's PRE-commit state (it has not folded yet). The backend calls the handler with\n     *  `\"begin\"` before delivering a commit's per-query `batch` events (via {@link onEvent}) and\n     *  `\"end\"` after the last one; between them the Store folds each view but DEFERS its\n     *  notification, firing every affected view's subscribers together at `\"end\"`. Backends with no\n     *  synchronous multi-query commit boundary (a plain remote backend, where each query's frame\n     *  arrives in its own message) omit it — the Store then notifies per event, exactly as before. */\n    onCommitBoundary?(handler: (phase: \"begin\" | \"end\") => void): void;\n    /** Optional dev-only authoritative server stream tap. It is additive, like\n     *  `Store.subscribeChanges`, and must not displace the backend's normal event handler. */\n    __attachDevtoolsServerDeltas?(observer: BackendDevObserver): () => void;\n}"},{"name":"NormalizedSource","signature":"/**\n * The server side of the **normalized** local-first path (NORMALIZED-CHANGES-DESIGN.md §5/§7):\n * registers queries and pushes each one's normalized footprint stream ({@link NormalizedEvent}s).\n * Both the in-process native (`@rindle/replica`) source and the ws (`@rindle/remote`\n * `RemoteNormalizedSource`) implement it; `@rindle/normalized`'s `NormalizedBackend` consumes one,\n * never knowing which — a sibling seam of {@link Backend} for the normalized composition.\n */\nexport interface NormalizedSource {\n    registerQuery(queryId: QueryId, remote: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Send base-table writes to the server; the authoritative stream flows back. */\n    mutate(mutations: Mutation[]): Promise<void>;\n    onNormalized(handler: (queryId: QueryId, event: NormalizedEvent) => void): void;\n    /** Optional: the backend hands its OWN typed per-table schemas so the source can validate\n     *  each server `hello` against them (column order / PK by name) and reject a schema skew\n     *  rather than silently transposing positional cells (CRIT#4 / §3 \"drift ⇒ re-subscribe\").\n     *  Sources that can't skew (the in-process native source) may omit it. */\n    expectClientSchema?(tables: NormalizedTableSchema[]): void;\n}"},{"name":"MutationEnvelope","signature":"/** The upstream named-mutator envelope (OPTIMISTIC-WRITES-DESIGN.md §8.1): the wire\n *  carries the name + JSON args, never code; `mid` totally orders a client's mutations. */\nexport interface MutationEnvelope {\n    clientID: string;\n    mid: number;\n    name: string;\n    args: unknown;\n}"},{"name":"MutationOutcomeFrame","signature":"/** A room authority's verdict for a NON-applied mutation (RINDLE-REALTIME-QUERY-ENABLEMENT\n *  §3.3, the deopt handshake; Slice H-iv-b server half / H-v client half). Sent on the author's\n *  own socket for every mutation the room did NOT apply, always BEFORE the lmid ack that burns\n *  the `mid` (same-socket ordering only — the ack may reach the client through another path\n *  first, e.g. a replayed lmid snapshot). Applied mutations send NOTHING: silence + lmid\n *  coverage ⇒ applied.\n *\n *  - `kind: \"deopt\"` — the room's §3.3 commit gate refused the routed mutation (or its\n *    environment fell short, e.g. `tx.query`); the mid is burnt in the ROOM ledger with zero\n *    effects and the client re-enqueues the same logical mutation onto the daemon stream.\n *    `name`/`args` are echoed so the frame is SELF-CONTAINED: a client that already retired the\n *    entry (the burnt-mid confirm won the race, or the frame is a replay re-answer) re-invokes\n *    from the frame alone.\n *  - `kind: \"rejected\"` — FINAL (authz/validation): the mid is burnt the same way and the\n *    prediction snaps back on the ordinary lmid release; no re-route.\n *\n *  `reason` may be absent on a re-answered frame whose record was seeded from journal replay\n *  (the verdict is journaled; the reason is not). */\nexport interface MutationOutcomeFrame {\n    mid: number;\n    kind: \"deopt\" | \"rejected\";\n    reason?: string;\n    /** Echoed on DEOPT frames only (self-contained re-invoke — see above). */\n    name?: string;\n    args?: unknown;\n}"},{"name":"ProgressFrame","signature":"/** The connection-level progress frame (§8.6): advances the coherent-apply release point\n *  (`cvMin`). A pure release signal — mutation confirmation does NOT ride it: `lmid` is a\n *  row in {@link CLIENT_MUTATIONS_TABLE}, delivered through the client's own per-client\n *  system query ({@link LMID_QUERY_NAME}) like any data, so it is released by the same\n *  `cvMin` as the commit's effects (transactionally coherent by construction). */\nexport interface ProgressFrame {\n    cvMin: number;\n}"},{"name":"CLIENT_MUTATIONS_TABLE","signature":"/** The replicated bookkeeping table carrying each client's high-water mutation id\n *  (`lmid`). Engine-hosted and served like any base table; reserved (never part of a\n *  user schema). Columns: `[client_id, last_mutation_id]`, PK `client_id`. */\nexport declare const CLIENT_MUTATIONS_TABLE = \"_rindle_client_mutations\";"},{"name":"LMID_QUERY_NAME","signature":"/** The reserved server-query name every optimistic client subscribes at connect: the\n *  one-row system query `CLIENT_MUTATIONS_TABLE WHERE client_id = <me>`. The server\n *  derives the identity from the connection (args are ignored). */\nexport declare const LMID_QUERY_NAME = \"_rindle/clientLmid\";"},{"name":"CLIENT_MUTATIONS_SCHEMA","signature":"/** The system table's wire schema — appended to the client's expected schemas so the\n *  lmid query's `hello` passes CRIT#4 validation. */\nexport declare const CLIENT_MUTATIONS_SCHEMA: NormalizedTableSchema;"},{"name":"OptimisticSource","signature":"/**\n * The server side of the OPTIMISTIC path (OPTIMISTIC-WRITES-DESIGN.md §8): the\n * {@link NormalizedSource} stream with `cv`-tagged data frames, plus the connection-level\n * {@link ProgressFrame} channel and the named-mutator upstream. The client buffers data\n * frames by `cv` and applies all `cv ≤ cvMin` as one coherent release (§8.5).\n */\nexport interface OptimisticSource {\n    registerQuery(queryId: QueryId, remote: RemoteQuery): void;\n    unregisterQuery(queryId: QueryId): void;\n    /** Ship one named-mutator invocation upstream (§8.1). Confirmation rides the progress frames. */\n    pushMutation(envelope: MutationEnvelope): Promise<void>;\n    onNormalized(handler: (queryId: QueryId, event: NormalizedEvent) => void): void;\n    onProgress(handler: (frame: ProgressFrame) => void): void;\n    /** Optional: the backend hands its OWN typed per-table schemas so the source validates each\n     *  server `hello` against them and rejects a schema skew (CRIT#4); see {@link NormalizedSource}. */\n    expectClientSchema?(tables: NormalizedTableSchema[]): void;\n    /** Optional: fired when the server restarts (a transport that can detect it, e.g. via a daemon\n     *  boot id). The backend resets its `cv` watermark so the server's reset `cv` sequence is\n     *  accepted rather than dropped as stale. In-process sources never restart and omit it. */\n    onRestart?(handler: () => void): void;\n    /** Optional (Slice H-v): the channel's {@link MutationOutcomeFrame} stream — the room deopt\n     *  handshake's client half. **OUT-OF-BAND BY DESIGN**: the frame carries no `cv` and the source\n     *  MUST dispatch it immediately on arrival, never behind the cv buffer — a deopt has to migrate\n     *  its pending entry BEFORE the buffered lmid release that would otherwise retire it as a\n     *  success (and the §7.3 hold-back trigger, keyed on the entry's confirming domain, would then\n     *  park its staged writes the wrong way). Sources whose authority never deopts (the in-process\n     *  native source, a plain daemon) omit it. */\n    onMutationOutcome?(handler: (frame: MutationOutcomeFrame) => void): void;\n    /** Optional (Slice H-v, the §7.5 rule-3 crash-window closer): fired when the transport\n     *  RE-establishes its session (reconnect → re-`init`), BEFORE any post-reconnect frame is\n     *  processed — the ordering is load-bearing: the re-subscribed lmid stream's fresh snapshot may\n     *  cover a mid whose `mutationOutcome` frame died with the old socket, and once that release\n     *  retires the entry as an apparent success there is nothing left to re-send. The backend\n     *  re-sends this domain's unconfirmed pending envelopes with their ORIGINAL mids, in mid order;\n     *  the source may DEFER their delivery until the session is re-authorized (a room's\n     *  `pushMutation` requires the lease-token subscribe's subject). Idempotent under the domain's\n     *  own ledger — a processed mid dedups silently (silence + lmid coverage ⇒ applied), a\n     *  non-applied mid is re-answered from the authority's recorded-outcome map (resolving even an\n     *  already-retired entry through the handshake's not-found arm). Distinct from\n     *  {@link onRestart} (a NEW server incarnation): a same-incarnation socket drop re-syncs\n     *  without restarting, and envelopes sent into the dead socket are exactly what this recovers.\n     *  In-process sources never drop a session and omit it. */\n    onResync?(handler: () => void): void;\n}"}]},{"source":"packages/client/src/schema.ts","declarations":[{"name":"Col","signature":"/** A column descriptor. `type` drives the comparator + JSON parsing; `__t` is a phantom. A\n *  nullable column is a `Col<T | null>` — that is the ONLY thing nullability changes at the type\n *  level, so `RowOf` (and the field-condition factory) widen automatically.\n *\n *  `optional` is the runtime companion of that phantom: set by {@link ColBuilder.nullable}, it is\n *  what the write funnels read to make a nullable column omittable from an insert (filled with\n *  `null`, design 206 §6.2). It mirrors the engine's `ColumnDef.optional`\n *  (`pragma_table_info.notnull == 0`); absent ⇒ `NOT NULL` / required. */\nexport interface Col<T> {\n    readonly type: ColType;\n    readonly optional?: boolean;\n    readonly __t?: T;\n}"},{"name":"ColT","signature":"export type ColT<X> = X extends Col<infer T> ? T : never;"},{"name":"AnyCols","signature":"export type AnyCols = Record<string, Col<unknown>>;"},{"name":"RowOf","signature":"export type RowOf<C extends AnyCols> = {\n    [K in keyof C]: ColT<C[K]>;\n};"},{"name":"ColBuilder","signature":"/** The chainable form returned by the column factories: a {@link Col} plus `.nullable()`.\n *\n *  `.nullable()` widens the column's value type to `T | null` — its `Row<…>` field becomes\n *  `T | null` — and sets the runtime {@link Col.optional} marker so it may be omitted from an insert\n *  (design 206 §6.2). `rindle schema gen` emits `.nullable()` for every nullable (non-`NOT NULL`) SQL\n *  column; you can also call it by hand on a local-only table's columns. It is idempotent and stays\n *  chainable. */\nexport interface ColBuilder<T> extends Col<T> {\n    nullable(): ColBuilder<T | null>;\n}"},{"name":"string","signature":"export declare const string: <T extends string = string>() => ColBuilder<T>;"},{"name":"number","signature":"export declare const number: <T extends number = number>() => ColBuilder<T>;"},{"name":"boolean","signature":"export declare const boolean: () => ColBuilder<boolean>;"},{"name":"json","signature":"export declare const json: <T = unknown>() => ColBuilder<T>;"},{"name":"int64","signature":"/** The exact-i64 column plane (design 226, `BIGINT`/`INT8` decltype): typed `bigint` in\n *  application code. The vocabulary exists from Stage C4 so generated schemas can name it;\n *  no exact integer cell enters the browser IVM until Stage E — until then the daemon\n *  refuses IVM queries whose footprint touches the column, and the SQL plane carries it. */\nexport declare const int64: <T extends bigint = bigint>() => ColBuilder<T>;"},{"name":"SCHEMA","signature":"/** Metadata key on a {@link TableDef} (a `unique symbol`, so no column name collides). */\nexport declare const SCHEMA: unique symbol;"},{"name":"TableMeta","signature":"export interface TableMeta<N extends string = string, C extends AnyCols = AnyCols, PK extends string = string> {\n    readonly name: N;\n    readonly columns: C;\n    readonly primaryKey: readonly PK[];\n    /** A **local-only** table (`201-LOCAL-ONLY-TABLES-DESIGN.md`): client-authoritative,\n     *  never synced/tracked/rebased. The single marker the whole design keys off (§4) — it is\n     *  immutable for the table's lifetime (N2) and never crosses the wire (C2). Absent ⇒ an\n     *  ordinary synced table.\n     *\n     *  `true` ⇒ eligible for the local-persistence plane (durable + cross-tab when the client\n     *  enables `persistLocal`, `207-LOCAL-TABLE-PERSISTENCE-DESIGN.md`). `\"session\"` ⇒ local but\n     *  EPHEMERAL: outside the plane entirely — never persisted, never replicated across tabs,\n     *  per-client-instance state that empties on reload (201's original behavior) even when\n     *  `persistLocal` is on. Every OTHER locality rule (untracked source, M1/M2 guards, E3/Q1\n     *  wire exclusion) treats both variants identically. */\n    readonly local?: boolean | \"session\";\n}"},{"name":"TableOptions","signature":"/** Options for {@link table}. */\nexport interface TableOptions {\n    /** Declare a {@link TableMeta.local local-only} table (selection state, draft text, view\n     *  prefs, scratch rows): client-authoritative, never synced or rebased. See\n     *  `201-LOCAL-ONLY-TABLES-DESIGN.md`. Pass `\"session\"` for a local table that must stay\n     *  EPHEMERAL and per-tab even when the client enables `persistLocal` — e.g. selection state\n     *  that should not follow the user across tabs or reloads (207 §5.4). */\n    local?: boolean | \"session\";\n}"},{"name":"TableDef","signature":"export type TableDef<N extends string, C extends AnyCols, PK extends string = string> = {\n    readonly [SCHEMA]: TableMeta<N, C, PK>;\n} & {\n    readonly [K in keyof C]: (arg: Arg<ColT<C[K]>>) => Cond<RowOf<C>>;\n};"},{"name":"TableLike","signature":"/** Any table, for positions that only read its metadata. The field-factory part of a\n *  `TableDef` is invariant in `C`, so callers constrain on the `[SCHEMA]` meta only — to\n *  which every concrete `TableDef<N, C>` is assignable. */\nexport type TableLike<C extends AnyCols> = {\n    readonly [SCHEMA]: TableMeta<string, C>;\n};"},{"name":"AnyTable","signature":"export type AnyTable = TableLike<AnyCols>;"},{"name":"Row","signature":"/** The row type of a table definition: `Row<typeof issue>` → `{ id: string; … }`. The\n *  whole-table ergonomic form of {@link RowOf}, so app code derives its row interfaces from\n *  the schema instead of hand-maintaining a parallel twin. */\nexport type Row<T extends AnyTable> = RowOf<T[typeof SCHEMA][\"columns\"]>;"},{"name":"Simplify","signature":"/** Flatten an intersection of mapped types into a single object type (preserving `?`/`readonly`) so\n *  {@link InsertOf} reads as one clean shape in editor hovers, not `A & B`. */\ntype Simplify<T> = {\n    [K in keyof T]: T[K];\n};"},{"name":"IsTop","signature":"/** True for the top types `unknown`/`any` (`unknown extends any` too), where `[null] extends [T]` is\n *  vacuously true and so can't tell a `.nullable()` apart. */\ntype IsTop<T> = unknown extends T ? true : false;"},{"name":"InsertOptional","signature":"/** Whether column `X` may be OMITTED from an insert: it admits `null` at the type level — EXCLUDING\n *  the top types. A bare `json()` is `json<unknown>()`, and `unknown | null` collapses back to\n *  `unknown`, erasing whether `.nullable()` was applied; treating it as required is the safe\n *  direction (a `NOT NULL` json column is never wrongly made optional). Declare `json<T>()` to make a\n *  nullable json column omittable. The runtime companion is `Col.optional` (design 206 §6.2/§7). */\ntype InsertOptional<X> = IsTop<ColT<X>> extends true ? false : [\n    null\n] extends [\n    ColT<X>\n] ? true : false;"},{"name":"InsertOf","signature":"/** The INSERT shape of a column map: {@link RowOf} with every NULLABLE column made OPTIONAL (`?`) —\n *  it may be omitted and is filled with `null` by both write funnels (design 206 §6.2/§7). `NOT NULL`\n *  columns stay required. The insert-side twin of {@link RowOf}, mirroring Drizzle's `$inferInsert`\n *  vs `$inferSelect` split. */\nexport type InsertOf<C extends AnyCols> = Simplify<{\n    [K in keyof C as InsertOptional<C[K]> extends true ? never : K]: ColT<C[K]>;\n} & {\n    [K in keyof C as InsertOptional<C[K]> extends true ? K : never]?: ColT<C[K]>;\n}>;"},{"name":"Insert","signature":"/** The insert type of a table def: `Insert<typeof issue>` → `{ id: string; … assignee?: string | null }`.\n *  The whole-table ergonomic form of {@link InsertOf} (the insert-side twin of {@link Row}). */\nexport type Insert<T extends AnyTable> = InsertOf<T[typeof SCHEMA][\"columns\"]>;"},{"name":"PkOf","signature":"/** The exact PRIMARY-KEY columns of a table (each typed), required — the identity a `delete`/`row`,\n *  and the WHERE half of an `update`, take. `PK` is the table's pk-column union (the schema's `__pk`). */\nexport type PkOf<C extends AnyCols, PK extends string> = {\n    [K in PK & keyof C]: ColT<C[K & keyof C]>;\n};"},{"name":"UpdateOf","signature":"/** The UPDATE shape of a table: its {@link PkOf primary-key columns} REQUIRED (they identify the row)\n *  plus every non-pk column OPTIONAL (`?`) and typed — a nullable one stays `T | null` (settable to\n *  null), a `NOT NULL` one is `T`. Omitted non-pk columns are left unchanged. */\nexport type UpdateOf<C extends AnyCols, PK extends string> = Simplify<PkOf<C, PK> & {\n    [K in Exclude<keyof C, PK>]?: ColT<C[K]>;\n}>;"},{"name":"PkColsOf","signature":"/** The primary-key column union for table `N` of a schema, read from its `__pk` map `P` and narrowed\n *  to `N`'s actual columns (falling back to all columns when `P` doesn't name `N` — e.g. the loose\n *  default schema). Feeds {@link PkOf}/{@link UpdateOf} in the typed mutator tx. */\nexport type PkColsOf<S extends ColsMap, P extends Record<string, string>, N extends keyof S> = (N extends keyof P ? P[N] : keyof S[N] & string) & keyof S[N] & string;"},{"name":"table","signature":"/** `table(\"issue\").columns({ id: string(), … }).primaryKey(\"id\")`. Pass `{ local: true }` for a\n *  {@link TableMeta.local local-only} table (`201-LOCAL-ONLY-TABLES-DESIGN.md`). */\nexport declare function table<N extends string>(name: N, opts?: TableOptions): {\n    columns<C extends AnyCols>(cols: C): {\n        primaryKey<K extends keyof C & string>(...keys: K[]): TableDef<N, C, K>;\n    };\n};"},{"name":"tableMeta","signature":"/** Read a table's metadata (columns / PK / name). */\nexport declare function tableMeta(t: AnyTable): TableMeta;"},{"name":"SchemaOf","signature":"/** name → columns, derived from the tables array (for typing `store.query.<table>`). */\nexport type SchemaOf<T extends readonly AnyTable[]> = {\n    [E in T[number] as E[typeof SCHEMA][\"name\"]]: E[typeof SCHEMA][\"columns\"];\n};"},{"name":"PkMapOf","signature":"/** name → its primary-key column union, derived from the tables array (the PK captured by the\n *  `primaryKey(...)` builder). Powers the mutator tx's typed `update`/`delete`/`row` pk args. */\nexport type PkMapOf<T extends readonly AnyTable[]> = {\n    [E in T[number] as E[typeof SCHEMA][\"name\"]]: E[typeof SCHEMA][\"primaryKey\"][number];\n};"},{"name":"ColsMap","signature":"/** name → columns, the resolved schema map carried in the {@link Schema} type. */\nexport type ColsMap = Record<string, AnyCols>;"},{"name":"PkMap","signature":"/** name → (some subset of its column names): the loose shape a {@link Schema}'s pk-map satisfies. The\n *  fallback when a schema wasn't built through {@link createSchema} — every column could be the pk. */\nexport type PkMap<S extends ColsMap> = {\n    [N in keyof S]: keyof S[N] & string;\n};"},{"name":"Schema","signature":"export interface Schema<S extends ColsMap = ColsMap, P extends Record<string, string> = PkMap<S>> {\n    readonly tables: Readonly<Record<string, TableMeta>>;\n    /** Phantom carrying name→columns for query-root inference (never read at runtime). */\n    readonly __cols: S;\n    /** Phantom carrying name→pk-column-union for the typed mutator tx (never read at runtime). */\n    readonly __pk: P;\n}"},{"name":"RESERVED_TABLE_PREFIXES","signature":"/** Table-name prefixes reserved by the engine for SYNTHETIC tables — `__agg_<fnv>` aggregate\n *  bases (`AGGREGATE-SYNC-DESIGN.md` §3.3) and `_rindle_*` system tables (e.g. the lmid table).\n *  A user table (synced OR local) under one of these would shadow a synthetic source — and since\n *  `registerTable` is idempotent-on-name and base tables register before synthetics, the later\n *  synthetic registration would silently no-op and the agg join would read the user table as the\n *  count (silent corruption, `201-LOCAL-ONLY-TABLES-DESIGN.md` N1). The ban makes that\n *  structurally impossible — checked once, statically, at {@link createSchema}. */\nexport declare const RESERVED_TABLE_PREFIXES: readonly [\n    \"__agg_\",\n    \"_rindle_\"\n];"},{"name":"isReservedTableName","signature":"/** Whether `name` collides with an engine-reserved synthetic prefix ({@link RESERVED_TABLE_PREFIXES}). */\nexport declare function isReservedTableName(name: string): boolean;"},{"name":"createSchema","signature":"export declare function createSchema<const T extends readonly AnyTable[]>(opts: {\n    tables: T;\n}): Schema<SchemaOf<T>, PkMapOf<T>>;"},{"name":"extendSchema","signature":"/** Extend a generated/synced schema with client-authoritative local-only tables.\n *\n *  This is the ergonomic path for SQL-first apps: keep `schema.gen.ts` fully generated, define\n *  private UI tables in a tiny hand-written file, then hand the combined schema to the browser\n *  client. The added tables MUST be `table(name, { local: true })`: `extendSchema` deliberately\n *  refuses to append ordinary synced tables, because those need to come from daemon introspection\n *  (`rindle schema gen`) so the server and client cannot drift. */\nexport declare function extendSchema<S extends ColsMap, P extends Record<string, string>, const T extends readonly AnyTable[]>(base: Schema<S, P>, opts: {\n    tables: T;\n}): Schema<S & SchemaOf<T>, P & PkMapOf<T>>;"},{"name":"ColRefinements","signature":"/** Per-column narrowings for {@link refineTable}: each entry must keep the column's kind and narrow\n *  its TS type (`Col<T2>` with `T2 extends T`) — `json<Meta>()` on a json column, a literal-union\n *  `string<\"a\" | \"b\">()` on a string column. Kind changes are rejected (cross-kind at compile time,\n *  same-phantom kind flips like `string()` on a json column at runtime). */\nexport type ColRefinements<C extends AnyCols> = {\n    readonly [K in keyof C]?: Col<ColT<C[K]>>;\n};"},{"name":"RefinedCols","signature":"/** `C` with the columns named in `R` re-typed to their refined `Col`s. */\nexport type RefinedCols<C extends AnyCols, R extends ColRefinements<C>> = {\n    [K in keyof C]: K extends keyof R ? (R[K] extends Col<unknown> ? R[K] : C[K]) : C[K];\n};"},{"name":"refineTable","signature":"/** Narrow a generated table's column TYPES without touching its runtime shape.\n *\n *  Returns the SAME def, re-typed (identity, after validating that every refined column exists and\n *  keeps its kind) — so conditions built from it, `rel(...)`s anchored on it, and `Row<typeof t>`\n *  all see the narrowed types. Pass the result to {@link refineSchema} so query roots narrow too. */\nexport declare function refineTable<N extends string, C extends AnyCols, R extends ColRefinements<C>>(base: TableDef<N, C>, cols: R): TableDef<N, RefinedCols<C, R>>;"},{"name":"RefinableTable","signature":"/** A table def acceptable to {@link refineSchema} over `Schema<S>`: its NAME must be one of `S`'s\n *  tables (a def for an unknown table is a compile error at the call site). */\nexport type RefinableTable<S extends ColsMap> = {\n    readonly [SCHEMA]: TableMeta<Extract<keyof S, string>, AnyCols>;\n};"},{"name":"RefinedColsMap","signature":"/** `S` with each table named in `T` re-typed to that def's (refined) columns. (The inner\n *  `extends AnyCols` guard is how the checker proves the remapped `SchemaOf<T>[K]` is a column\n *  map while `T` is still generic; it always holds for a concrete `T`.) */\nexport type RefinedColsMap<S extends ColsMap, T extends readonly AnyTable[]> = {\n    [K in keyof S]: K extends keyof SchemaOf<T> ? (SchemaOf<T>[K] extends AnyCols ? SchemaOf<T>[K] : S[K]) : S[K];\n};"},{"name":"refineSchema","signature":"/** Swap {@link refineTable}-narrowed table defs into a generated schema, re-typing those tables for\n *  everything downstream of the schema (`newQueryBuilder`/`queries` roots, store row types).\n *\n *  Runtime-validated identity: each def must name a table already in the schema and match its\n *  runtime shape exactly (same columns, kinds, primary key, and locality) — refinement narrows TS\n *  types, never what's on the wire. Composes with {@link extendSchema} in either order. */\nexport declare function refineSchema<S extends ColsMap, P extends Record<string, string>, const T extends readonly RefinableTable<S>[]>(base: Schema<S, P>, opts: {\n    tables: T;\n}): Schema<RefinedColsMap<S, T>, P>;"},{"name":"isLocalTable","signature":"/** Whether `table` is a {@link TableMeta.local local-only} table in `schema` (an unknown table\n *  reads as non-local). The single locality predicate the backends key off. BOTH variants —\n *  `true` and `\"session\"` — are local here; the persisted/ephemeral split matters only to the\n *  persistence plane ({@link persistedLocalTableNames}). */\nexport declare function isLocalTable<S extends ColsMap>(schema: Schema<S>, table: string): boolean;"},{"name":"localTableNames","signature":"/** The set of local-only table names in `schema` (`201-LOCAL-ONLY-TABLES-DESIGN.md` §4) — BOTH\n *  variants (`true` and `\"session\"`); every locality rule except persistence keys off this set. */\nexport declare function localTableNames<S extends ColsMap>(schema: Schema<S>): Set<string>;"},{"name":"persistedLocalTableNames","signature":"/** The subset of {@link localTableNames} eligible for the persistence plane — `local: true` only.\n *  A `local: \"session\"` table stays outside it: never persisted, never replicated across tabs\n *  (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §5.4). */\nexport declare function persistedLocalTableNames<S extends ColsMap>(schema: Schema<S>): Set<string>;"},{"name":"localSchemaHash","signature":"/** A stable fingerprint of the schema's PERSISTED local tables only — the persistence gate's\n *  `schemaHash` (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §3.3 / P7). Per `local: true` table:\n *  `(name, ordered column names + types + optionality, pk columns)`. Column order is kept (rows are\n *  positional); tables are sorted by name so registration order can't skew it; synced-table AND\n *  `local: \"session\"` changes never move it (reshaping an ephemeral table must not wipe durable\n *  data). The value is the canonical descriptor itself, not a digest — local-table sets are tiny,\n *  and exactness (no collision can ever skip a P7 clear) beats compactness here. */\nexport declare function localSchemaHash<S extends ColsMap>(schema: Schema<S>): string;"},{"name":"RELATIONSHIP_BRAND","signature":"/** Brand on a {@link Relationship} value (a `unique symbol`, distinct from a {@link TableDef}). */\ndeclare const RELATIONSHIP_BRAND: unique symbol;"},{"name":"Relationship","signature":"/**\n * A reusable, typed JOIN between two tables — the correlation declared once (design §4). Built with\n * {@link rel}; parameterized by the parent columns `PC` (so a `sub` checks the relationship belongs to\n * the query's table) and the child columns `CC` (which flow into the nested result type). Pass it to\n * `sub`/`countAs`/`exists` in place of an explicit `child` + `{ parent, child }` correlation.\n */\nexport interface Relationship<PC extends AnyCols, CC extends AnyCols> {\n    /** The child table the relationship points at. */\n    readonly child: TableLike<CC>;\n    /** Correlation keys: `parent[i]` (a parent column) joins to `child[i]` (a child column). */\n    readonly correlation: {\n        readonly parent: readonly string[];\n        readonly child: readonly string[];\n    };\n    /** Phantom binding the parent columns so `Query<C>.sub(alias, rel)` rejects a rel for another table. */\n    readonly __parent?: PC;\n    readonly [RELATIONSHIP_BRAND]: true;\n}"},{"name":"AnyRelationship","signature":"/** Any relationship, for positions that only read its correlation / child table. */\nexport type AnyRelationship = Relationship<AnyCols, AnyCols>;"},{"name":"rel","signature":"/**\n * Declare a relationship once: `rel(issue, user, { ownerId: \"id\" })` means `issue.ownerId → user.id`.\n * `mapping` is `{ [parentColumn]: childColumn }` (a composite join is multiple entries). The `parent`\n * table is used only to type-check the keys; pass the result to `sub`/`countAs`/`exists`.\n */\nexport declare function rel<PC extends AnyCols, CC extends AnyCols>(_parent: TableLike<PC>, child: TableLike<CC>, mapping: Partial<Record<keyof PC & string, keyof CC & string>>): Relationship<PC, CC>;"},{"name":"defineRelationships","signature":"/** A typed registry of named {@link Relationship}s — `defineRelationships({ issueOwner: rel(...) })`.\n *  A thin identity helper that names the bag and constrains its values; the keys are yours to choose. */\nexport declare function defineRelationships<R extends Record<string, AnyRelationship>>(rels: R): R;"},{"name":"isRelationship","signature":"/** Runtime guard: is `v` a {@link Relationship} value (not a table or a plain object)? */\nexport declare function isRelationship(v: unknown): v is AnyRelationship;"},{"name":"tableSpec","signature":"/** The `SchemaSpec` (`columns` + `primaryKey` indices) the wasm `Db.registerTable` wants. */\nexport declare function tableSpec(meta: TableMeta): {\n    columns: string[];\n    primaryKey: number[];\n};"},{"name":"InsertPlan","signature":"/** A table's insert-completeness plan, derived once from its `Col` markers and shared by BOTH write\n *  funnels — the client `trackingTx` and the server `renderOp` — so their required-sets can't drift\n *  (design 206 §6.1/§6.2). A `NOT NULL` column is `required`; a nullable column (`.nullable()` set\n *  `Col.optional`) may be omitted and is filled with `null` (see {@link insertCell}). PK columns are\n *  never nullable (introspection forces them non-null), so they are always required. */\nexport interface InsertPlan {\n    /** Every column, in wire order. */\n    readonly columns: string[];\n    /** Columns that MUST be present on a full insert — the non-nullable ones. */\n    readonly required: string[];\n    /** The nullable (omittable-to-null) columns, for a fast membership test in the fill. */\n    readonly nullable: ReadonlySet<string>;\n}"},{"name":"insertPlan","signature":"/** Derive a table's {@link InsertPlan} from its column markers. */\nexport declare function insertPlan(meta: TableMeta): InsertPlan;"},{"name":"insertCell","signature":"/** The cell a full insert writes for column `c`: the given value, or `null` when a nullable column\n *  is omitted (design 206 §6.2). The caller's completeness check ({@link InsertPlan.required})\n *  guarantees a non-nullable column is present, so its omission never reaches here. */\nexport declare function insertCell(row: Record<string, WireValue>, c: string): WireValue;"},{"name":"toCell","signature":"/** Encode a keyed-row cell to its wire {@link WireValue} for a column KIND — the one place both write\n *  funnels stringify a `json<T>` object (the typed mutator surface / design 206 §7). An\n *  already-stringified json value (a `string`) or any non-json cell passes through unchanged, so a\n *  mutator may pass EITHER a parsed object OR a JSON string. Mirrors `store.positionalize`. */\nexport declare function toCell(v: WireValue | object, type: ColType): WireValue;"},{"name":"normalizedTableSchemas","signature":"/** The client's per-table flat schema (name + column order + PK indices), the shape a\n *  normalized `hello` advertises (NORMALIZED-CHANGES-DESIGN.md §3). Used to validate a\n *  server hello against the CLIENT's own typed schema so a column-order / PK skew is caught\n *  instead of silently transposing positional cells (CRIT#4). Sorted by name for stable\n *  ordering.\n *\n *  Local-only tables are **omitted** (`201-LOCAL-ONLY-TABLES-DESIGN.md` E1): the client never\n *  claims them to the server, the server never expects/ships them, and they stay out of the schema\n *  fingerprint (`normalizedFp`) so a local table can't skew it vs. the server's. */\nexport declare function normalizedTableSchemas<S extends ColsMap>(schema: Schema<S>): {\n    name: string;\n    columns: string[];\n    primaryKey: number[];\n}[];"}]},{"source":"packages/client/src/key.ts","declarations":[{"name":"stableKey","signature":"export declare function stableKey(value: unknown, seen?: WeakSet<object>): string;"}]},{"source":"packages/client/src/compare.ts","declarations":[{"name":"COMPARATOR_VERSION","signature":"/** The `compare_values` / `compare_rows` algorithm-contract version (=== the engine's\n *  `wire_schema::COMPARATOR_VERSION`). A remote subscriber hard-rejects a `hello` whose\n *  `comparatorVersion` differs — the total order is a code contract, not data, so a schema\n *  fingerprint can't cover it. Bump in lockstep with the Rust constant if the order changes.\n *\n *  v2 (design 226 Stage B): the engine's mixed Int/Float comparison became exact instead\n *  of f64-widening. No TS behavior change — every value a client can hold today is an f64\n *  `number`, on which v1 and v2 order identically (the §8 gate keeps int64 cells out of\n *  the browser until Stage E) — but the contract the version names is the engine's. */\nexport declare const COMPARATOR_VERSION = 2;"},{"name":"compareNumber","signature":"/** number compare with `f64::total_cmp` semantics (NaN deterministic & last; -0 < +0). */\nexport declare function compareNumber(a: number, b: number): -1 | 0 | 1;"},{"name":"compareString","signature":"/** UTF-8 bytewise string compare (=== SQLite `BINARY` / Rust `&str` Ord). Correct for\n *  supplementary-plane code points, where JS `<` / `localeCompare` (UTF-16) would disagree. */\nexport declare function compareString(a: string, b: string): -1 | 0 | 1;"},{"name":"compareValue","signature":"/** Compare two bare cells, dispatching on the runtime type (null sorts first). */\nexport declare function compareValue(a: WireValue, b: WireValue): -1 | 0 | 1;"},{"name":"compareRows","signature":"/** Compare two rows by a resolved sort (`[columnIndex, ascending]` pairs). First non-equal\n *  column wins; a descending column negates. */\nexport declare function compareRows(a: WireValue[], b: WireValue[], sort: [\n    number,\n    boolean\n][]): -1 | 0 | 1;"}]},{"source":"packages/client/src/view.ts","declarations":[{"name":"ViewTypes","signature":"/** Per-level column types (parallel to the WireSchema), used to JSON.parse json columns on\n *  projection. Built by the Store from the typed schema; absent ⇒ no parsing (bare values). */\nexport interface ViewTypes {\n    columnTypes: ColType[];\n    rels: Record<number, ViewTypes>;\n}"},{"name":"ChangePhase","signature":"/** The phase of an {@link ArrayView.onChanges} delivery: the initial hydrate `snapshot` vs a later\n *  incremental `batch` — the same distinction a narrator draws (`ChangeEvent` `snapshot`/`batch`). */\nexport type ChangePhase = \"snapshot\" | \"batch\";"},{"name":"ViewChangeListener","signature":"/** A per-view change listener ({@link ArrayView.onChanges}): the net `FlatChange[]` this view folded,\n *  the {@link ChangePhase} it arrived on, and the view's `WireSchema` (the position→name source for\n *  `resolveChange`). This is the DIFF the data channel ({@link ArrayView.subscribe}) discards — the\n *  seam a narrator drives off. The `schema` is passed (not closed over) because the first `snapshot`\n *  fires synchronously inside `materialize`, before the caller holds the view handle. */\nexport type ViewChangeListener = (changes: FlatChange[], phase: ChangePhase, schema: WireSchema) => void;"},{"name":"ArrayView","signature":"/** The public ArrayView contract `materialize()` returns. */\nexport interface ArrayView<R> {\n    /** The current materialized result (reference-stable where data is unchanged). */\n    readonly data: readonly R[];\n    /** The engine query id the Store assigned this view (1:1 with the view). The same `qid` the raw\n     *  change stream ({@link Store.subscribeChanges}) tags each frame with, so a consumer can\n     *  correlate this query with its `ChangeEvent`s (e.g. to bind a narrator) straight off\n     *  `materialize(query).qid` — no separate handle needed. */\n    readonly qid: QueryId;\n    /** The query's view `WireSchema` (the position→name source for {@link resolveChange}), captured\n     *  from its `hello` frame. `null` while PENDING — a remote backend's `hello` arrives async; an\n     *  in-process backend (wasm/replica) populates it synchronously during `materialize`. */\n    readonly schema: WireSchema | null;\n    /** The query's SERVER-CHANNEL state (`unknown` while loading, `complete` once server-authoritative;\n     *  the `error` variant is reserved and currently unproduced). A pending optimistic mutation no\n     *  longer moves this — it is a separate axis (FOLDED-MUTATIONS-DESIGN §7). `complete` for backends\n     *  with no server lifecycle. Changes notify subscribers. */\n    readonly resultType: ResultType;\n    /** Subscribe; fires immediately with the current data, then after each applied batch (and after\n     *  a {@link resultType} change — re-read `resultType` in the listener). */\n    subscribe(listener: (data: readonly R[]) => void): () => void;\n    /** Subscribe to this view's folded CHANGE stream — the `FlatChange[]` it applies, NET of no-op\n     *  cycles (a rebase's balanced `remove`+`add` / edit round-trip cancels, so a correctly predicted\n     *  optimistic write delivers nothing here). Carries the diff {@link subscribe} throws away; the\n     *  per-view seam a narrator rides. Does NOT replay on subscribe — attach via\n     *  `store.materialize(query, { onChanges })` to catch a synchronous backend's first snapshot.\n     *  A view with any change listener also enriches its own `remove` ops with the evicted subtree\n     *  (per-view, no global opt-in). Returns a detach function. */\n    onChanges(listener: ViewChangeListener): () => void;\n    /** Tear down + stop receiving updates. */\n    destroy(): void;\n}"},{"name":"SingularArrayView","signature":"/** What a top-level `.one()` query materializes to: the single row (or `null`), not an array.\n *  A thin adapter over a {@link FlatArrayView} — all the folding is shared; only the result\n *  boundary unwraps (`data[0] ?? null`). Reference identity of the row is preserved. */\nexport interface SingularArrayView<R> {\n    /** The single current row, or `null` when the query matches nothing. */\n    readonly data: R | null;\n    /** The engine query id — see {@link ArrayView.qid}. */\n    readonly qid: QueryId;\n    /** The query's view `WireSchema` — see {@link ArrayView.schema}. */\n    readonly schema: WireSchema | null;\n    /** The query's lifecycle state — see {@link ArrayView.resultType}. */\n    readonly resultType: ResultType;\n    /** Subscribe; fires immediately with the current row, then after each applied batch (and after\n     *  a {@link resultType} change). */\n    subscribe(listener: (data: R | null) => void): () => void;\n    /** Subscribe to the view's folded CHANGE stream — see {@link ArrayView.onChanges}. The changes\n     *  are the same positional `FlatChange`s as the plural view (a `.one()` is just the list capped to\n     *  one), so a narrator resolves them identically. */\n    onChanges(listener: ViewChangeListener): () => void;\n    /** Tear down + stop receiving updates. */\n    destroy(): void;\n}"},{"name":"SingularView","signature":"/** Wrap a plural {@link FlatArrayView} as a {@link SingularArrayView} for a `.one()` query\n *  (the engine caps it to `limit = 1`, so the top list holds at most one node). */\nexport declare class SingularView<R> implements SingularArrayView<R> {\n    private readonly inner;\n    constructor(inner: ArrayView<R>);\n    get data(): R | null;\n    get qid(): QueryId;\n    get schema(): WireSchema | null;\n    get resultType(): ResultType;\n    subscribe(listener: (data: R | null) => void): () => void;\n    onChanges(listener: ViewChangeListener): () => void;\n    destroy(): void;\n}"},{"name":"rowsEqual","signature":"/** Elementwise equality over positional bare-cell rows — THE row comparator for every JS-side\n *  diff (views, aggregate heads, the persistence mirror), exported so no caller grows a drifted\n *  private copy. Per cell: `===` keeps `-0 === 0` (the engine's key semantics treat them equal);\n *  the `Object.is` arm makes a NaN cell equal itself (under `!==` alone, a NaN-bearing row never\n *  matches any copy of itself, so every diff re-emits it as a spurious edit forever). */\nexport declare function rowsEqual(a: WireValue[], b: WireValue[]): boolean;"},{"name":"FlatArrayView","signature":"export declare class FlatArrayView<R = unknown> implements ArrayView<R> {\n    private readonly _qid;\n    private _schema;\n    private types?;\n    private seeded;\n    private top;\n    private dirty;\n    private cached;\n    private rt;\n    private readonly listeners;\n    private readonly changeListeners;\n    private pendingSegments;\n    constructor(schema?: WireSchema, types?: ViewTypes, qid?: QueryId);\n    get qid(): QueryId;\n    get schema(): WireSchema | null;\n    get resultType(): ResultType;\n    /** Set the query's lifecycle state (the Store routes the backend's per-query signal here).\n     *  Notifies subscribers on a change so a status-bound listener (React `useQueryStatus`) re-reads,\n     *  WITHOUT re-projecting data (it is unchanged). */\n    setResultType(rt: ResultType): void;\n    /** (Re)bind to a schema and clear the tree IN PLACE. The first `hello` (pending → ready)\n     *  and a re-hydrate (gap → new epoch — FLAT-CHANGES-DESIGN.md §2.3) both go through here, so\n     *  the caller's view reference and its subscribers survive a re-subscribe. Does NOT notify —\n     *  the snapshot that follows (`applyChanges`) does, avoiding an empty-then-filled flicker.\n     *  KEEPS any SSR `seeded` rows: they are retired only when the first live snapshot lands\n     *  ({@link retireSeed}, driven by the Store), so `data` shows the seed — not an empty tree —\n     *  across the whole `hello`→first-`snapshot` gap. */\n    reset(schema: WireSchema, types?: ViewTypes): void;\n    /** Install a pre-projected SSR first-paint snapshot (SSR-DESIGN.md §6). The rows are already\n     *  in result shape (json columns parsed, relationships nested), so a view with no live backend\n     *  (the server one-shot Store) reads them directly, and a browser view shows them until its\n     *  first live snapshot lands ({@link retireSeed}). Does NOT notify — it is set at materialize\n     *  time, before any subscriber, and the live snapshot that follows notifies. */\n    seed(rows: readonly R[]): void;\n    /** Retire the SSR first-paint seed — the Store calls this as it folds the maintained tree's first\n     *  live snapshot, so `data` switches from the seed to the live tree with no empty gap between them\n     *  (the seed deliberately survived the earlier `reset`/`hello`). Idempotent. Does NOT notify — the\n     *  snapshot fold it accompanies does; BUT when that fold is empty (a 0-row result, or rows already\n     *  in `top`) it notifies nothing, so the Store forces a {@link notify} on the strength of the `true`\n     *  return here — else the view reads the live tree yet never re-renders (a frozen seed). Returns\n     *  whether a live seed was actually cleared (so the Store knows a forced notify is owed). */\n    retireSeed(): boolean;\n    /** Apply a batch (the hydrate snapshot or one transaction's events) in order, then\n     *  notify subscribers once. Order is significant (FLAT-CHANGES-DESIGN.md §5.4). A no-op\n     *  while pending (changes never precede the `hello` that resets the schema).\n     *\n     *  `enrichRemoves` ⇒ before a removed node is dropped, reconstruct its full subtree and attach it\n     *  to the `remove` op's `node` (in place, so the same event object the Store fans out to its\n     *  change subscribers carries it). Off by default — paid only when a consumer asked for it, and\n     *  only on a real eviction (an rc-decrement that keeps the row leaves `node` absent). A view with\n     *  an attached {@link onChanges} listener ALSO enriches (per-view, no global opt-in), so a\n     *  narrator can resolve a removed row's subs whether or not the store-global counter is set.\n     *\n     *  `deferNotify` ⇒ fold but do NOT notify; the caller is responsible for calling {@link flush}\n     *  later. The Store uses this to fold every view in one commit before notifying any subscriber\n     *  (cross-view-atomic notification — `Store.onCommitBoundary`); standalone use leaves it off, so\n     *  a bare view still fires its subscribers after each applied batch.\n     *\n     *  `phase` tags the {@link onChanges} delivery (`snapshot` for the hydrate, `batch` otherwise); it\n     *  does not affect the fold. Returns whether the batch changed the view (so a deferring caller\n     *  knows it must be flushed). */\n    applyChanges(events: FlatChange[], enrichRemoves?: boolean, deferNotify?: boolean, phase?: ChangePhase): boolean;\n    /** Notify subscribers with the current data. The deferred half of {@link applyChanges} (when\n     *  `deferNotify` was set): the Store calls this at the commit-notify barrier — after every view\n     *  touched by the same commit has folded — so a subscriber that re-reads a sibling view inside\n     *  its callback observes post-commit data, never a torn mid-commit state. */\n    flush(): void;\n    get data(): readonly R[];\n    subscribe(listener: (data: readonly R[]) => void): () => void;\n    onChanges(listener: ViewChangeListener): () => void;\n    /** Net the folded batch and hand the survivors to the change listeners, AFTER the data `notify`\n     *  (the order `Store.subscribeChanges` consumers already observe). A batch that nets to nothing —\n     *  a correctly predicted rebase — makes no call, so a narrator sees only real change. Each listener\n     *  is isolated: a throwing one reports to `note` (the caller re-raises the first) and the rest still\n     *  run, so one bad narration template never starves a sibling listener nor corrupts the view. */\n    private deliverChanges;\n    destroy(): void;\n    private applyAt;\n    private applyOp;\n    private applyAdd;\n    /** Drop one path to `row`. Returns the evicted {@link Node} (its full subtree intact) when the\n     *  last path went away — `null` when another path still holds it (rc decremented, nothing left\n     *  the result). */\n    private applyRemove;\n    private applyEdit;\n    private project;\n    /** Notify data subscribers with the current {@link data}. Normally driven by a fold ({@link\n     *  applyChanges}/{@link flush}); the Store also calls it directly to land a seed retirement whose\n     *  accompanying fold was empty (see {@link retireSeed}). */\n    notify(): void;\n}"}]},{"source":"packages/client/src/query.ts","declarations":[{"name":"FieldFn","signature":"type FieldFn<C extends AnyCols, K extends keyof C, Rels, One extends boolean, Sel extends string, LocalRels> = (arg: Arg<ColT<C[K]>>) => Query<C, Rels, One, Sel, LocalRels>;"},{"name":"WhereProxy","signature":"/** `where.closed(false)`, `where.priority(gt(3))`. */\ntype WhereProxy<C extends AnyCols, Rels, One extends boolean, Sel extends string, LocalRels> = {\n    [K in keyof C]: FieldFn<C, K, Rels, One, Sel, LocalRels>;\n};"},{"name":"WhereSugar","signature":"/** `whereClosed(false)`, `wherePriority(gt(3))`. */\ntype WhereSugar<C extends AnyCols, Rels, One extends boolean, Sel extends string, LocalRels> = {\n    [K in keyof C as `where${Capitalize<string & K>}`]: FieldFn<C, K, Rels, One, Sel, LocalRels>;\n};"},{"name":"MaterializedView","signature":"/** What `materialize()` returns: singular (`R | null`) for a top-level `.one()`, else plural. */\ntype MaterializedView<R, One extends boolean> = One extends true ? SingularArrayView<R> : ArrayView<R>;"},{"name":"Projected","signature":"/**\n * The result row type of a projection (masking, FRAGMENT-COMPOSITION-DESIGN.md §6 / §10.6).\n * `Sel` is the union of columns named via `select(...)`. With nothing selected (`Sel = never`)\n * it stays the full {@link RowOf} — the \"no `select` ⇒ all columns\" convention, kept and made\n * type-honest. Once any column is selected, the row is **masked** to exactly those columns, so a\n * component (its fragment) can read only what it declared. `Pick` only ever *removes* fields, so\n * narrowing is always sound versus a runtime row that may still carry more.\n */\ntype Projected<C extends AnyCols, Sel extends string> = [\n    Sel\n] extends [\n    never\n] ? RowOf<C> : Pick<RowOf<C>, Sel & keyof C>;"},{"name":"AggAcc","signature":"/**\n * The accumulating result row of a top-level aggregate (REDUCE-DESIGN.md §8). `Agg` is `false`\n * until {@link QueryBase.count}/{@link QueryBase.groupBy} reshapes the query; then it is the\n * group-by columns intersected with the synthetic `{ count: number }`. {@link AggAcc} treats the\n * `false` state as `{}` so the intersections in `count`/`groupBy` compose either way.\n */\ntype AggAcc<Agg> = [\n    Agg\n] extends [\n    false\n] ? {} : Agg;"},{"name":"HavingProxy","signature":"/** `having`'s field binder: one accessor per aggregate-OUTPUT column (the group-by columns plus the\n *  synthetic numeric `count`), each producing a {@link Cond} over that aggregate row. It is the only\n *  way to name `count` in a predicate (it lives on no base table); compose several with `and`/`or`. */\ntype HavingProxy<Row> = {\n    [K in keyof Row & string]: (arg: Arg<Row[K]>) => Cond<Row>;\n};"},{"name":"AggregateAlias","signature":"/** The `countAs` relationship aliases of a query — the {@link Rels} keys whose value is the scalar\n *  `number` a count aggregate surfaces. These are the only aliases {@link QueryBase.having}'s\n *  parent-by-child-aggregate overload accepts (a plain `sub` alias carries a row object, not a\n *  number, so it is rejected). */\ntype AggregateAlias<Rels> = {\n    [K in keyof Rels]: Rels[K] extends number ? K & string : never;\n}[keyof Rels];"},{"name":"ResultRow","signature":"/** What a query materializes: the post-aggregation row once reshaped by {@link QueryBase.count}\n *  (`Agg`), else the projected base row plus its relationship values. */\ntype ResultRow<C extends AnyCols, Rels, Sel extends string, Agg> = [\n    Agg\n] extends [\n    false\n] ? Projected<C, Sel> & Rels : Agg;"},{"name":"FragmentEdge","signature":"type FragmentEdge<C extends AnyCols, Rels, Sel extends string, LocalRels> = (q: Query<C, Rels, false, Sel, LocalRels>) => Query<C, Rels, boolean, Sel, LocalRels>;"},{"name":"QueryBase","signature":"interface QueryBase<C extends AnyCols, Rels, One extends boolean, Sel extends string, LocalRels, Agg = false> {\n    /** Present when this local query came from `defineQuery`; used as the remote identity. */\n    readonly name?: string;\n    /** Present when this local query came from `defineQuery`; sent with `name` upstream. */\n    readonly args?: unknown;\n    /** Present when this local query came from a realtime-labeled `defineQuery`\n     *  (RINDLE-REALTIME-QUERY-ENABLEMENT §2.1). Declaration metadata only — it never joins the\n     *  wire identity and never changes the AST. */\n    readonly realtime?: RealtimeQueryLabel;\n    /** Condition form — consumes `or()`/`and()`/`exists()`/field conditions (AND-ed across calls).\n     *  Filters over the FULL column set (`RowOf<C>`), independent of what's `select`ed/masked. */\n    where(cond: Cond<RowOf<C>>): Query<C, Rels, One, Sel, LocalRels>;\n    orderBy<K extends keyof C>(col: K, dir: Dir): Query<C, Rels, One, Sel, LocalRels>;\n    /** Project a subset of columns (PROJECTION-SUPPORT-DESIGN.md §6, masking §6/§10.6). Chainable\n     *  (each call unions into `Sel`); omit to select all. Drives what the server syncs, what the\n     *  view reports, AND — once any column is named — narrows the result row TYPE to exactly the\n     *  selection (masking). `where`/`orderBy`/`start`/`sub` still see the full column set. */\n    select<K extends keyof C & string>(...cols: K[]): Query<C, Rels, One, Sel | K, LocalRels>;\n    limit(n: number): Query<C, Rels, One, Sel, LocalRels>;\n    /** Cursor paging: start at (or, with `exclusive`, after) the partial `cursor` row over the\n     *  sort columns. Lowers to a `Skip` in the engine. */\n    start(cursor: Partial<RowOf<C>>, opts?: {\n        exclusive?: boolean;\n    }): Query<C, Rels, One, Sel, LocalRels>;\n    /** Return a single row: `materialize()` yields a {@link SingularArrayView} (`data: R | null`)\n     *  and the engine caps the query to `limit = 1`. */\n    one(): Query<C, Rels, true, Sel, LocalRels>;\n    /** **Merge** a {@link Fragment} into THIS node — Relay's \"spread on the same type\" (§5). The\n     *  fragment must be over the same table (enforced in the result type: a fragment over a different\n     *  table yields `never`, plus a runtime throw). Unions the projection (`Sel | FSel`), folds in the\n     *  fragment's nested relationships (`Rels & FRels`), and merges any same-`alias` edge recursively\n     *  — canonically, so `include` order doesn't matter (§10.5). Two fragments that spread the same\n     *  alias with a conflicting row-set (correlation/where/orderBy/…) **throw** (§10.2); an included\n     *  fragment may **not** add a root `where`/`orderBy`/`limit` (§10.3). This is also the single-shot\n     *  way to ROOT a fragment onto a base query (`queries.issue.where.id(x).include(IssueCard)`) — the\n     *  loader's composed root — equivalent to applying the fragment, but canonicalized.\n     *\n     *  The fragment's columns are a *separate* inferred parameter `FC` (not the class `C`) so that\n     *  `include` keeps `C` out of any contravariant position — preserving `Query<Concrete>`'s\n     *  assignability to `Query<AnyCols>` (needed by `Store<ColsMap>`/`QueryRoot`). Same-table is then\n     *  checked as the mutual-assignability of `C` and `FC` in the return type. */\n    include<FC extends AnyCols, FRels = {}, FSel extends string = never, FLocalRels = FRels>(fragment: Fragment<FC, FRels, FSel, FLocalRels>): [\n        C\n    ] extends [\n        FC\n    ] ? ([\n        FC\n    ] extends [\n        C\n    ] ? Query<C, Rels & FRels, One, Sel | FSel, LocalRels & FLocalRels> : never) : never;\n    /** Nest a child fragment as an opaque local-read ref. The coverage query still composes the\n     *  child's full AST at runtime; the React-facing fragment data exposes only refs at this\n     *  boundary so the child component owns its local subscription. */\n    sub<A extends string, CC extends AnyCols, CRels = {}, CSel extends string = never, CLocalRels = CRels, F extends Fragment<CC, CRels, CSel, CLocalRels> = Fragment<CC, CRels, CSel, CLocalRels>>(alias: A, child: TableLike<CC>, corr: {\n        parent: Array<keyof C & string>;\n        child: Array<keyof CC & string>;\n    }, build: F, edge: FragmentEdge<CC, CRels, CSel, CLocalRels>): Query<C, Rels & {\n        [P in A]: Array<Projected<CC, CSel> & CRels>;\n    }, One, Sel, LocalRels & {\n        [P in A]: Array<FragmentRef<F>>;\n    }>;\n    sub<A extends string, CC extends AnyCols, CRels = {}, CSel extends string = never, CLocalRels = CRels, F extends Fragment<CC, CRels, CSel, CLocalRels> = Fragment<CC, CRels, CSel, CLocalRels>>(alias: A, child: TableLike<CC>, corr: {\n        parent: Array<keyof C & string>;\n        child: Array<keyof CC & string>;\n    }, build: F): Query<C, Rels & {\n        [P in A]: Array<Projected<CC, CSel> & CRels>;\n    }, One, Sel, LocalRels & {\n        [P in A]: Array<FragmentRef<F>>;\n    }>;\n    /** Relationship-value form of the fragment-ref overload above. */\n    sub<A extends string, CC extends AnyCols, CRels = {}, CSel extends string = never, CLocalRels = CRels, F extends Fragment<CC, CRels, CSel, CLocalRels> = Fragment<CC, CRels, CSel, CLocalRels>>(alias: A, relationship: Relationship<C, CC>, build: F, edge: FragmentEdge<CC, CRels, CSel, CLocalRels>): Query<C, Rels & {\n        [P in A]: Array<Projected<CC, CSel> & CRels>;\n    }, One, Sel, LocalRels & {\n        [P in A]: Array<FragmentRef<F>>;\n    }>;\n    /** Relationship-value form of the fragment-ref overload above. */\n    sub<A extends string, CC extends AnyCols, CRels = {}, CSel extends string = never, CLocalRels = CRels, F extends Fragment<CC, CRels, CSel, CLocalRels> = Fragment<CC, CRels, CSel, CLocalRels>>(alias: A, relationship: Relationship<C, CC>, build: F): Query<C, Rels & {\n        [P in A]: Array<Projected<CC, CSel> & CRels>;\n    }, One, Sel, LocalRels & {\n        [P in A]: Array<FragmentRef<F>>;\n    }>;\n    /** Nest a child by EXPLICIT correlation (no schema relationship). `alias` is the result key.\n     *  The child's own projection (`CSel`) masks the nested row, so a fragment spread here\n     *  contributes exactly the columns it declared. */\n    sub<A extends string, CC extends AnyCols, CRels = {}, CSel extends string = never>(alias: A, child: TableLike<CC>, corr: {\n        parent: Array<keyof C & string>;\n        child: Array<keyof CC & string>;\n    }, build?: (q: Query<CC>) => Query<CC, CRels, boolean, CSel>): Query<C, Rels & {\n        [P in A]: Array<Projected<CC, CSel> & CRels>;\n    }, One, Sel, LocalRels & {\n        [P in A]: Array<Projected<CC, CSel> & CRels>;\n    }>;\n    /** Nest a child by a named {@link Relationship} (`rel(parent, child, {...})`) — the correlation comes\n     *  from the relationship, so no `{ parent, child }` keys are restated. The relationship must belong to\n     *  THIS table (its parent columns are checked against `C`). `alias` is still the result key. */\n    sub<A extends string, CC extends AnyCols, CRels = {}, CSel extends string = never>(alias: A, relationship: Relationship<C, CC>, build?: (q: Query<CC>) => Query<CC, CRels, boolean, CSel>): Query<C, Rels & {\n        [P in A]: Array<Projected<CC, CSel> & CRels>;\n    }, One, Sel, LocalRels & {\n        [P in A]: Array<Projected<CC, CSel> & CRels>;\n    }>;\n    /** Add a **relationship aggregate** — `issue.countAs(\"commentCount\", comment, …)`\n     *  (`REDUCE-DESIGN.md` §9). Like {@link sub} (explicit correlation, optional child\n     *  `build` for a filtered `count(child WHERE …)`), but the relationship surfaces a single\n     *  scalar `count(*)` of the correlated child rows named `alias` — so the result key is a\n     *  `number`, not an array; an empty (childless) parent reads `0`. */\n    countAs<A extends string, CC extends AnyCols>(alias: A, child: TableLike<CC>, corr: {\n        parent: Array<keyof C & string>;\n        child: Array<keyof CC & string>;\n    }, build?: (q: Query<CC>) => Query<CC, unknown>): Query<C, Rels & {\n        [P in A]: number;\n    }, One, Sel, LocalRels & {\n        [P in A]: number;\n    }>;\n    /** `countAs` by a named {@link Relationship} — like the explicit form, but the correlation comes from\n     *  `rel(...)` instead of being restated. */\n    countAs<A extends string, CC extends AnyCols>(alias: A, relationship: Relationship<C, CC>, build?: (q: Query<CC>) => Query<CC, unknown>): Query<C, Rels & {\n        [P in A]: number;\n    }, One, Sel, LocalRels & {\n        [P in A]: number;\n    }>;\n    /** Reshape this query into a top-level `count(*)` aggregate (`REDUCE-DESIGN.md` §8) — the SQL\n     *  `SELECT count(*) FROM table [GROUP BY …] [HAVING …]`. Without {@link groupBy} it is a GLOBAL\n     *  count (one `{ count }` row, value `0` even on empty input); with it, one `{ …group, count }`\n     *  row per distinct group. The result row becomes the aggregate's OUTPUT — the group-by columns\n     *  plus a numeric `count` — so chain {@link having} to filter it. Distinct from {@link countAs}\n     *  (a child-relationship scalar attached to the parent row); this reshapes the query ITSELF. The\n     *  engine rejects pairing a root aggregate with `select`/`sub`/`countAs`/`orderBy`/`limit`/`one`. */\n    count(): Query<C, Rels, One, Sel, LocalRels, AggAcc<Agg> & {\n        count: number;\n    }>;\n    /** Add a top-level `GROUP BY` column (chain for a compound key); only meaningful with\n     *  {@link count}. Each grouped column joins the aggregate result row, keyed + sorted by the\n     *  group key. */\n    groupBy<K extends keyof C & string>(col: K): Query<C, Rels, One, Sel, LocalRels, AggAcc<Agg> & Pick<RowOf<C>, K>>;\n    /** `HAVING (…)` — filter the **post-aggregation** rows of a {@link count} query (`REDUCE-DESIGN.md`\n     *  §4: a filter directly above the reduce). `build` receives a field binder over the aggregate's\n     *  OUTPUT columns — the {@link groupBy} columns and the synthetic `count` — and returns a\n     *  {@link Cond}; compose several with `and`/`or`. E.g.\n     *  `.groupBy(\"status\").count().having((h) => h.count(gt(3)))`. Distinct from {@link where}, which\n     *  filters base rows BELOW the reduce. */\n    having(build: (h: HavingProxy<AggAcc<Agg>>) => Cond<AggAcc<Agg>>): Query<C, Rels, One, Sel, LocalRels, Agg>;\n    /** `HAVING count(child) <op> n` — filter THIS parent by a child relationship aggregate's count\n     *  (`PARENT-AGGREGATE-FILTER-DESIGN.md`). `alias` must name a {@link countAs} relationship already\n     *  on this query; this drops parents whose child count fails `<op> val`, maintained incrementally\n     *  (a child add/remove crossing the threshold adds/removes the parent). The display `countAs` is\n     *  untouched — a survivor still shows its real count. Distinct from the {@link having} overload\n     *  above, which filters a top-level {@link count}'s own output rows.\n     *\n     *  **v1: high-pass predicates only** — predicates *false* at count 0 (`>`, `>=`/`=`/`!=` for\n     *  `n ≥ 1`). A childless parent forms no group, so the engine rejects (at build) a predicate *true*\n     *  at count 0 (`<=`, `< n` for `n ≥ 1`, `= 0`, `>= 0`); those need row-widening (deferred). */\n    having<A extends AggregateAlias<Rels>>(alias: A, op: SimpleOp, val: number): Query<C, Rels, One, Sel, LocalRels, Agg>;\n    /** The compiled Zero-wire AST (what a backend's `query` consumes). */\n    ast(): Ast;\n    /** Materialize into a live, typed view. Wired by the Store/backend. A top-level `.one()`\n     *  yields a {@link SingularArrayView}; otherwise an {@link ArrayView}. The row is the aggregate\n     *  output once {@link count} reshaped the query, else masked to the projection ({@link Projected})\n     *  — full {@link RowOf} until a column is `select`ed. */\n    materialize(): MaterializedView<ResultRow<C, Rels, Sel, Agg>, One>;\n}"},{"name":"Query","signature":"export type Query<C extends AnyCols, Rels = {}, One extends boolean = false, Sel extends string = never, LocalRels = Rels, Agg = false> = Omit<QueryBase<C, Rels, One, Sel, LocalRels, Agg>, \"where\"> & {\n    where: QueryBase<C, Rels, One, Sel, LocalRels, Agg>[\"where\"] & WhereProxy<C, Rels, One, Sel, LocalRels>;\n} & WhereSugar<C, Rels, One, Sel, LocalRels>;"},{"name":"AnyQuery","signature":"export type AnyQuery = Query<any, any, any, any, any, any>;"},{"name":"QueryLocalData","signature":"export type QueryLocalData<Q extends AnyQuery> = Q extends Query<infer C, any, infer One, infer Sel, infer LocalRels, infer Agg> ? [\n    Agg\n] extends [\n    false\n] ? One extends true ? (Projected<C, Sel> & LocalRels) | null : readonly (Projected<C, Sel> & LocalRels)[] : readonly Agg[] : never;"},{"name":"QueryValidator","signature":"/** Turn raw, UNTRUSTED wire args into the canonical, typed args a query is built from. Its return\n *  type IS the query's args type — written once, it flows to both the client call signature and the\n *  `build` step, so there's no second place to restate the shape. */\nexport type QueryValidator<Args> = (rawArgs: unknown) => Args;"},{"name":"QueryBuilder","signature":"/**\n * Build a `Query` (an `Ast` constructor) from already-validated args, plus an optional CONTEXT — the\n * authenticated principal the query is scoped to. `Ctx` is **off-wire**: the client passes its own\n * session ctx at the callsite, the server injects the AUTHORITATIVE ctx ({@link NamedQuery.resolve}\n * via `registerQueries`), and the wire still carries only `name` + args. Both tiers run the same\n * `build`, so whenever their ctx agrees the AST is byte-identical — and a client can never spoof it,\n * since the server re-derives ctx from its trusted session and ignores anything the client claimed.\n *\n * The ctx is a *tuple* so a query opts into it by how it types `build`'s second parameter — and that\n * shape becomes the call signature verbatim:\n *   - `(args) => Q` — no ctx (`q(args)`).\n *   - `(args, ctx: C) => Q` — ctx REQUIRED (`q(args, ctx)`); for always-authenticated queries.\n *   - `(args, ctx?: C) => Q` — ctx OPTIONAL (`q(args)` or `q(args, ctx)`); sound only when \"no ctx\"\n *     is a real, SYMMETRIC state — i.e. the build yields the SAME broad AST whether ctx is absent or\n *     present-with-no-user (anonymous / SSR), since the server always forwards a ctx (possibly\n *     anonymous). Otherwise type ctx required so the type catches an omitted ctx.\n */\nexport type QueryBuilder<Args, Q extends AnyQuery, Ctx extends readonly unknown[] = [\n]> = (args: Args, ...ctx: Ctx) => Q;"},{"name":"RealtimeQueryLabel","signature":"/**\n * The realtime LABEL a named query may declare (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §2.1):\n * which api-server room PROFILE the query wants to be served from, and how the query's args map\n * to that profile's key args. This is the DECLARATION only — the serve decision (covering proof,\n * lease routing) is the server's, and the final room key is minted server-side by the profile's\n * own `key` under authoritative ctx, so a label can never place a query in a room the server\n * didn't derive itself. Both tiers import the SAME `defineQuery` value, so they always agree\n * *which profile* a query belongs to.\n */\nexport interface RealtimeQueryLabel<Args = any> {\n    /** The room profile name — must match a `realtime.rooms` key on the api-server (validated\n     *  loudly at `createRindleApiServer` construction). May not contain `/` (the wire room-key\n     *  delimiter). */\n    readonly room: string;\n    /** Map the query's VALIDATED args to the profile's key args (what the server feeds the\n     *  profile's `key(args)`). Identity when omitted. Must be pure — both tiers may run it. */\n    readonly args?: (queryArgs: Args) => unknown;\n}"},{"name":"DefineQueryOptions","signature":"/** Options for {@link defineQuery}. */\nexport interface DefineQueryOptions<Args = any> {\n    /** Declare this query realtime-eligible — see {@link RealtimeQueryLabel}. */\n    realtime?: RealtimeQueryLabel<Args>;\n}"},{"name":"NamedQuery","signature":"/**\n * A single, co-located NAMED query (see {@link defineQuery}). It is:\n *   - **callable on the client** — `q(args, ctx?)` validates + builds + stamps the result with its\n *     remote subscription identity (`name` + args — NOT ctx), so a component that imports it always\n *     SYNCS. There is no unstamped builder to import by accident.\n *   - **registerable on the server** — it carries its `queryName` and a `resolve` that re-runs the\n *     SAME validator on untrusted wire args and builds the AUTHORITATIVE `Query` from the server's\n *     own ctx ({@link registerQueries `registerQueries`} in `@rindle/api-server`).\n *\n * `Ctx` is the ctx parameter list mirrored from `build` — `[]`, `[ctx: C]`, or `[ctx?: C]`. It is\n * never part of the wire identity.\n */\nexport interface NamedQuery<Args, Ctx extends readonly unknown[], Q extends AnyQuery> {\n    (args: Args, ...ctx: Ctx): Q;\n    /** The wire identity. The daemon leases by this name; client and server MUST agree on it — which\n     *  they do, because both sides import the SAME `defineQuery` value. */\n    readonly queryName: string;\n    /** The §2.1 realtime label, when this query was defined with one ({@link DefineQueryOptions}).\n     *  Absent on unlabeled queries. Carried onto the stamped built Query too, and preserved through\n     *  `registerQueries` on the server. */\n    readonly realtime?: RealtimeQueryLabel<Args>;\n    /** Server-side: validate raw wire args, then build the authoritative `Query` from the server's\n     *  authoritative ctx (forwarded by `registerQueries`). */\n    resolve(rawArgs: unknown, ...ctx: Ctx): Q;\n}"},{"name":"defineQuery","signature":"/**\n * Define ONE co-located, named query. Keep it next to the component that reads it (a `*.queries.ts`\n * file), so a query lives where its fragments and its component live.\n *\n * The returned value is callable on the client (it stamps its result with `name` + args, so the\n * subscription SYNCS) and registerable on the server ({@link registerQueries}). The optional\n * `validate` step turns untrusted wire args into the canonical args type — and that type flows to\n * both the call signature and `build`, so the shape is written exactly once. `validate` runs on\n * BOTH tiers (it builds the byte-identical authoritative AST on the server, and guards + guarantees\n * the same AST on the client). If the server must DIVERGE from the client, define a second\n * `defineQuery` with the same `name` for the server and register that one instead.\n *\n * `build` may take a second CONTEXT parameter (see {@link QueryBuilder}). Context is off-wire: the\n * client passes its session ctx at the callsite, the server injects its authoritative ctx — so a\n * per-user query stays symmetric without ever trusting (or transmitting) a client-supplied identity.\n *\n * ```ts\n * // recentComments({ limit }) — validated, no ctx, byte-identical on both tiers\n * export const recentCommentsQuery = defineQuery(\n *   \"recentComments\",\n *   (raw): { limit: number } => ({ limit: validateFeedLimit(raw) }),\n *   ({ limit }) => q.comment.orderBy(\"createdAt\", \"desc\").limit(limit).include(FeedItemFragment),\n * );\n *\n * // myIssues({ limit }, ctx) — ctx-scoped; the wire still carries only { limit }\n * export const myIssuesQuery = defineQuery(\n *   \"myIssues\",\n *   (raw): { limit: number } => ({ limit: validateLimit(raw) }),\n *   ({ limit }, ctx: { user: string }) => q.issue.where.ownerId(ctx.user).limit(limit),\n * );\n * // client: myIssuesQuery({ limit: 20 }, { user: currentUser() })\n * ```\n */\nexport declare function defineQuery<Q extends AnyQuery>(name: string, build: () => Q, options?: DefineQueryOptions<void>): NamedQuery<void, [\n], Q>;\nexport declare function defineQuery<Args, Ctx extends readonly unknown[], Q extends AnyQuery>(name: string, build: (args: Args, ...ctx: Ctx) => Q, options?: DefineQueryOptions<Args>): NamedQuery<Args, Ctx, Q>;\nexport declare function defineQuery<Args, Ctx extends readonly unknown[], Q extends AnyQuery>(name: string, validate: QueryValidator<Args>, build: (args: Args, ...ctx: Ctx) => Q, options?: DefineQueryOptions<Args>): NamedQuery<Args, Ctx, Q>;"},{"name":"FRAGMENT_BRAND","signature":"declare const FRAGMENT_BRAND: unique symbol;"},{"name":"LOCAL_FRAGMENT_REF_BRAND","signature":"declare const LOCAL_FRAGMENT_REF_BRAND: unique symbol;"},{"name":"Fragment","signature":"/**\n * A reusable, typed *selection over a table* — Relay's \"fragment\", promoted to a first-class\n * value. **Two verbs** compose a fragment, on one axis — does its data belong to THIS row or to a\n * related one:\n *\n *   - SAME node — `q.include(Frag)`: merge its selection into this node. This is also how you\n *     **root** a fragment onto a base query — `queries.t.where.id(x).include(Frag)`.\n *   - CHILD node — `q.sub(alias, child, corr, Frag)`: nest it under a relationship (`sub`'s 4th arg).\n *\n * A `Fragment` is therefore also a `build` transform (`(q: Query<C>) => Query<C, Rels>`); that\n * call signature is the mechanism by which `sub` accepts a fragment as its build. Prefer\n * `include` to root a fragment (canonical + merged) over calling it directly. It additionally\n * carries its `table` (for {@link FragmentRef}/`useFragment` typing and masking). Composing\n * fragments assembles ONE {@link Ast} → one materialization → one `/query` — the whole point\n * (no request waterfall; design §1).\n */\nexport interface Fragment<C extends AnyCols, Rels = {}, Sel extends string = never, LocalRels = Rels> {\n    (q: Query<C>): Query<C, Rels, false, Sel, LocalRels>;\n    readonly table: TableLike<C>;\n    readonly [FRAGMENT_BRAND]: true;\n}"},{"name":"FragmentData","signature":"/**\n * The data returned by `useFragment(fragment, ref)`: the fragment's own selected columns plus\n * immediate relationship values. Relationships whose builder is another fragment surface as\n * opaque {@link FragmentRef}s, so child-owned payload is read only by the child fragment reader.\n */\nexport type FragmentData<F> = F extends Fragment<infer C, unknown, infer Sel, infer LocalRels> ? Projected<C, Sel> & LocalRels : never;"},{"name":"FragmentCoverage","signature":"export interface FragmentCoverage<Q extends AnyQuery = AnyQuery> {\n    readonly key: string;\n    readonly query: Q;\n}"},{"name":"LocalFragmentRef","signature":"export interface LocalFragmentRef<F extends Fragment<any, any, any, any> = Fragment<any, any, any, any>> {\n    readonly [LOCAL_FRAGMENT_REF_BRAND]: true;\n    readonly source: \"local\";\n    readonly table: string;\n    readonly pk: Readonly<Record<string, LitValue>>;\n    readonly coverage: FragmentCoverage;\n    readonly __fragment?: F;\n}"},{"name":"FragmentRef","signature":"/** The opaque token a parent passes to a component that reads {@link FragmentData} for `F`. */\nexport type FragmentRef<F> = F extends Fragment<any, any, any, any> ? LocalFragmentRef<F> : never;"},{"name":"defineFragment","signature":"/**\n * Define a co-located, composable {@link Fragment}: a named selection over `table`. The returned\n * value is callable (the `build` transform), so it threads through the existing `sub`/`Rels`\n * spine — no GraphQL, no codegen, no schema change (design §3).\n *\n * ```ts\n * const UserAvatar = defineFragment(schema.user, (f) => f.select(\"id\", \"name\", \"avatarUrl\"));\n * const CommentRow = defineFragment(schema.comment, (f) =>\n *   f.select(\"id\", \"body\", \"authorId\")\n *    .sub(\"author\", schema.user, { parent: [\"authorId\"], child: [\"id\"] }, UserAvatar));\n * ```\n */\nexport declare function defineFragment<C extends AnyCols, Rels = {}, Sel extends string = never, LocalRels = Rels>(table: TableLike<C>, build: (q: Query<C>) => Query<C, Rels, boolean, Sel, LocalRels>): Fragment<C, Rels, Sel, LocalRels>;"},{"name":"isFragment","signature":"/** Runtime guard: is `v` a {@link Fragment} (a `defineFragment` value, not a plain build fn)? */\nexport declare function isFragment(v: unknown): v is Fragment<AnyCols, unknown, never, unknown>;"},{"name":"isFragmentRelationship","signature":"export declare function isFragmentRelationship(rel: CorrelatedSubquery): boolean;"},{"name":"fragmentKey","signature":"export declare function fragmentKey(ref: FragmentRef<any>): string;"},{"name":"createLocalFragmentRef","signature":"export declare function createLocalFragmentRef<F extends Fragment<any, any, any>>(fragment: F, pk: Record<string, LitValue>, coverage: FragmentCoverage): LocalFragmentRef<F>;"},{"name":"createLocalFragmentRefForTable","signature":"export declare function createLocalFragmentRefForTable<F extends Fragment<any, any, any>>(table: string, pk: Record<string, LitValue>, coverage: FragmentCoverage): LocalFragmentRef<F>;"},{"name":"createRootFragmentRef","signature":"export declare function createRootFragmentRef<F extends Fragment<any, any, any>, Q extends AnyQuery>(fragment: F, query: Q, coverageKey?: string): LocalFragmentRef<F>;"},{"name":"fragmentAst","signature":"export declare function fragmentAst<F extends Fragment<any, any, any>>(fragment: F): Ast;"},{"name":"localFragmentReadAst","signature":"export declare function localFragmentReadAst<F extends Fragment<any, any, any>>(fragment: F, ref: LocalFragmentRef<F>, primaryKeyFor: (table: string) => readonly string[]): Ast;"},{"name":"localRootFragmentRefsAst","signature":"export declare function localRootFragmentRefsAst<F extends Fragment<any, any, any>>(fragment: F, query: AnyQuery, primaryKeyFor: (table: string) => readonly string[]): Ast;"},{"name":"localQueryReadAst","signature":"export declare function localQueryReadAst(query: AnyQuery, primaryKeyFor: (table: string) => readonly string[]): Ast;"},{"name":"queryFromAst","signature":"export declare function queryFromAst(ast: Ast): AnyQuery;"},{"name":"assertNoLocalTables","signature":"/** Throw if `ast` references a local-only table ANYWHERE — the complete form of the {@link queries}\n *  root guard (Q1 / E3 client half). The root proxy `get` only sees the table accessed off the\n *  builder root; a local table reached through a relationship / `sub` / `countAs` / `exists` CHILD is\n *  passed as a value and never touches the proxy, so it is caught here instead: at `.ast()` for a\n *  server-scope builder, and again as an SSR backstop in `ServerStore.preload`. A server/named query\n *  may never name a local table (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5). */\nexport declare function assertNoLocalTables<S extends ColsMap>(ast: Ast, schema: Schema<S>): void;"},{"name":"ExistsOpts","signature":"/** Options for `exists` / `notExists`. */\nexport interface ExistsOpts {\n    /**\n     * Fold this `EXISTS` as a build-time **scalar** subquery: when the child binds a\n     * statically-unique key, the engine reads it once, inlines the correlation value as a\n     * literal, and deletes the join. **Snapshot semantics** — the inlined value does not\n     * react to later child changes. Defaults to `false` (a live `EXISTS` join).\n     */\n    scalar?: boolean;\n}"},{"name":"exists","signature":"/** `EXISTS` by a named {@link Relationship} — correlation from the rel; the parent row type is the\n *  relationship's parent, so the condition lands on the matching `.where()`. */\nexport declare function exists<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<RowOf<PC>>;\n/** `EXISTS (<correlated subquery>)` — a condition (use inside `where`/`or`/`and`). */\nexport declare function exists<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<R>;"},{"name":"notExists","signature":"/** `NOT EXISTS` by a named {@link Relationship}. */\nexport declare function notExists<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<RowOf<PC>>;\n/** `NOT EXISTS (<correlated subquery>)`. */\nexport declare function notExists<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>, opts?: ExistsOpts): Cond<R>;"},{"name":"existsNoSync","signature":"/**\n * `EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate (`exists_noSync`).\n * Identical to {@link exists} for filtering parent visibility, but stamps the subquery\n * `system: \"permissions\"`, so the engine's normalized serializer prunes its witnesses from the\n * footprint — the permission table's rows are never synced to the client and the client never\n * re-evaluates the gate. Use this when building the **server's** query (the user's API server);\n * the client holds its own un-gated query.\n */\nexport declare function existsNoSync<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<RowOf<PC>>;\nexport declare function existsNoSync<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<R>;"},{"name":"notExistsNoSync","signature":"/** `NOT EXISTS (<correlated subquery>)` as a **server-only, non-syncing** gate — the `NOT EXISTS` form of {@link existsNoSync} (a deny-style permission rule). */\nexport declare function notExistsNoSync<PC extends AnyCols, CC extends AnyCols>(relationship: Relationship<PC, CC>, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<RowOf<PC>>;\nexport declare function notExistsNoSync<CC extends AnyCols, R = unknown>(child: TableLike<CC>, corr: {\n    parent: Array<keyof R & string>;\n    child: Array<keyof CC & string>;\n}, build?: (q: Query<CC>) => Query<CC, unknown>): Cond<R>;"},{"name":"QueryRoot","signature":"export type QueryRoot<S extends ColsMap> = {\n    [N in keyof S]: Query<S[N]>;\n};"},{"name":"QueriesOptions","signature":"/** Scoping for {@link queries} (`201-LOCAL-ONLY-TABLES-DESIGN.md` §5). */\nexport interface QueriesOptions {\n    /** Include {@link TableMeta.local local-only} tables in the builder's root scope. The **local**\n     *  builder (`store.query`) sets this; the **server** builder ({@link newQueryBuilder}) does NOT,\n     *  so naming a local table in a remote/named query is a build error (Q1 / E3 client half). */\n    includeLocal?: boolean;\n}"},{"name":"queries","signature":"/** A typed query entry over a schema: `queries(schema).issue.where.closed(false)…`. */\nexport declare function queries<S extends ColsMap>(schema: Schema<S>, onMaterialize?: (query: AnyQuery) => unknown, opts?: QueriesOptions): QueryRoot<S>;"},{"name":"newQueryBuilder","signature":"/** A schema-bound query-builder factory for portable client/server query definitions. SERVER\n *  scope: local-only tables are excluded (a named/remote query may never reference one). */\nexport declare function newQueryBuilder<S extends ColsMap>(schema: Schema<S>): QueryRoot<S>;"}]},{"source":"packages/client/src/store.ts","declarations":[{"name":"DehydratedQuery","signature":"/** One query's SSR snapshot, keyed by its `viewKey` ({@link stableKey} of the AST): the\n *  pre-projected first-paint `rows` plus the `cvMin` watermark they reflect (SSR-DESIGN.md §6.2).\n *  Serializable as-is into the HTML — `rows` are already JSON values (json columns parsed). */\nexport interface DehydratedQuery {\n    rows: unknown[];\n    cvMin: number;\n}"},{"name":"DehydratedState","signature":"/** The whole dehydrated cache: every preloaded query's snapshot, keyed by `viewKey`. The server\n *  builds it with {@link Store.dehydrate}; the browser seeds it with {@link Store.hydrate}. */\nexport type DehydratedState = Record<string, DehydratedQuery>;"},{"name":"AssembledNode","signature":"/** A single assembled (nested-by-name) row from `POST /query` (SSR-DESIGN.md §3.3): the cells\n *  under `cols`, each in-view relationship inlined by its alias (a nested array / object, or a\n *  scalar for a `countAs` aggregate). {@link Store.assembleSnapshot} converts these to the\n *  view's projected result shape. */\nexport interface AssembledNode {\n    cols: Record<string, WireValue>;\n    [rel: string]: unknown;\n}"},{"name":"WriteTx","signature":"/** The write transaction handed to `store.write(tx => …)`. Rows are objects keyed by column;\n *  the Store positionalizes them (and stringifies json columns) before the backend sees them.\n *\n *  `add` takes an {@link InsertOf} row — a nullable column may be omitted (it is filled with `null`,\n *  design 206 §7). `remove`/`edit` take a full {@link RowOf} row: they identify an EXISTING row, so\n *  every column (nullable ones as their actual `T | null` value) must be present. */\nexport interface WriteTx<S extends ColsMap> {\n    add<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): void;\n    remove<N extends keyof S & string>(table: N, row: RowOf<S[N]>): void;\n    edit<N extends keyof S & string>(table: N, oldRow: RowOf<S[N]>, newRow: RowOf<S[N]>): void;\n}"},{"name":"CachedQueryView","signature":"export interface CachedQueryView<Q extends Query<any, any, any>> {\n    readonly view: ReturnType<Q[\"materialize\"]>;\n    /** Retain this query's named remote footprint and release it later. Ad-hoc local queries\n     *  return a no-op release function. */\n    retain(query: Q): () => void;\n    destroy(): void;\n}"},{"name":"SyncQueryLease","signature":"export interface SyncQueryLease {\n    readonly resultType: ResultType;\n    subscribe(listener: () => void): () => void;\n    release(): void;\n}"},{"name":"QueryInspect","signature":"/** One live materialized view's read-only summary for a devtools pane (DEBUG-TOOLS-BROWSER-DESIGN\n *  §4.2 — \"surface, not instrument\"). All fields are already held by the {@link Store}; this is the\n *  single read-only accessor over the otherwise-private `views`/`asts` maps. */\nexport interface QueryInspect {\n    /** The Store-assigned query id (also the backend's qid — the Store passes it straight through). */\n    qid: QueryId;\n    /** The query's AST (`Store.asts`), for the inspector's pretty-print / table-derivation. */\n    ast: Ast;\n    /** The view's SERVER-CHANNEL state (`unknown` while loading, `complete` once authoritative). */\n    resultType: ResultType;\n    /** Current materialized row count (`view.data.length`). */\n    rowCount: number;\n    /** A capped peek at the projected rows (reference-stable objects off the live view). */\n    sample: readonly unknown[];\n}"},{"name":"StoreInspect","signature":"/** A frozen snapshot of the Store's live query state for a devtools pane ({@link Store.__inspect}). */\nexport interface StoreInspect {\n    queries: QueryInspect[];\n}"},{"name":"Store","signature":"export declare class Store<S extends ColsMap> {\n    /** Type-safe query entry: `store.query.issue.where.closed(false).materialize()`. */\n    readonly query: QueryRoot<S>;\n    private readonly schema;\n    private readonly backend;\n    private nextId;\n    private readonly views;\n    private readonly asts;\n    private readonly syncLeases;\n    private readonly seeds;\n    private changeListeners?;\n    private removedSubtreeWanted;\n    private resultTypeListeners?;\n    private readonly hasResultTypeLifecycle;\n    private commitDepth;\n    private readonly pendingFlush;\n    private readonly pendingChanges;\n    constructor(schema: Schema<S>, backend: Backend);\n    /** Materialize any fluent query object. Named queries subscribe remotely by `(name,args)`;\n     *  ad-hoc builder queries are local-only for local-first backends.\n     *\n     *  `opts.onChanges` binds a narrator to this view's DIFF stream ({@link ArrayView.onChanges}) — the\n     *  per-view seam that replaces filtering the store-global {@link subscribeChanges} by `qid`. It is\n     *  wired BEFORE the backend registers the query, so a synchronous backend's first `snapshot` (fired\n     *  inside `registerQuery`, before this returns) is delivered too. */\n    materialize<Q extends Query<any, any, any>>(query: Q, opts?: {\n        onChanges?: ViewChangeListener;\n    }): ReturnType<Q[\"materialize\"]>;\n    /** One-shot AUTHORITATIVE read: materialize `query`, wait until its result is server-authoritative\n     *  ({@link ResultType} `\"complete\"`), read the data once, then destroy the view — resolving with the\n     *  plain result rather than a live subscription. Rejects if the query enters the `\"error\"` state. Use\n     *  it for exports, imports, undo snapshots — anywhere that wants the current answer as a value.\n     *\n     *  A synchronous local-first backend (wasm/replica) has already delivered the first snapshot inside\n     *  {@link materialize}, so the view is `\"complete\"` on entry and this settles on the next microtask\n     *  without ever attaching a listener; a remote backend settles when the first live snapshot lands.\n     *  The query is NEVER left subscribed — the view is destroyed before the promise settles either way.\n     *  (A remote query that never completes leaves the promise pending, exactly as a `resultType` poll\n     *  would; race a timeout at the call site if you need one.) */\n    readOnce<Q extends Query<any, any, any>>(query: Q): Promise<ReturnType<Q[\"materialize\"]>[\"data\"]>;\n    /** True when the backend can retain a remote named query independently from the local\n     *  materialized AST view. React uses this to keep one local view per AST while still sending\n     *  every mounted `(name,args)` lease through the backend. */\n    canRetainRemoteQueries(): boolean;\n    /** Build one local AST view, with remote syncing retained separately through the returned\n     *  handle. This is a lower-level API for UI bindings; ordinary app code should keep using\n     *  `materialize(query)`. */\n    createCachedQueryView<Q extends Query<any, any, any>>(query: Q): CachedQueryView<Q>;\n    /** Retain a named remote query purely for normalized/local-first coverage. This does not\n     *  register or materialize the query AST locally, so React can keep server sync coverage alive\n     *  without subscribing to the broad coverage result tree. */\n    retainSyncQuery<Q extends Query<any, any, any>>(query: Q): SyncQueryLease;\n    /** Apply a batch of mutations (object rows → positional). Resolves when the backend has\n     *  accepted them (local: applied; remote: sent). The resulting view updates flow back via\n     *  the backend's event stream. */\n    write(fn: (tx: WriteTx<S>) => void): Promise<void>;\n    /** Direct-commit write to LOCAL-only tables (`201-LOCAL-ONLY-TABLES-DESIGN.md` §6): the\n     *  client-authoritative path for selection state, draft text, view prefs, scratch rows. It\n     *  bypasses the optimistic pending stack entirely — a local table is untracked, so it never\n     *  rebases, reverts, or waits on a server confirmation (it \"moves on its own\").\n     *\n     *  Rejects a synced/tracked table (M2): a direct write to one would be un-applied on the very\n     *  next server rewind. Local writes also must NOT live inside a replayable mutator (M1) — the\n     *  server runs the mutator from `args` alone and cannot see local tables; use this instead.\n     *  Same keyed `WriteTx` shape as {@link write}. `async` so the no-seam / M2 guards surface as a\n     *  REJECTED promise (the `Promise<void>` contract) rather than a synchronous throw that escapes a\n     *  caller's `.catch` and crashes the event handler / render frame. */\n    writeLocal(fn: (tx: WriteTx<S>) => void): Promise<void>;\n    /** Drain a keyed `WriteTx` callback into positional {@link Mutation}s (shared by\n     *  {@link write} / {@link writeLocal}; json columns stringified, rows in column order). */\n    private collectMutations;\n    /** Seed a query's first-paint snapshot from a `POST /query` response (server side): convert the\n     *  assembled rows to the view's projected shape and stash them by `viewKey`. A view materialized\n     *  for this AST (during the synchronous render) reads the seed; {@link dehydrate} serializes it. */\n    seedAssembled(ast: Ast, rows: AssembledNode[], cvMin: number): void;\n    /** The dehydrated first-paint cache for every preloaded query — embed it in the HTML and pass it\n     *  to {@link hydrate} in the browser (SSR-DESIGN.md §6.2). */\n    dehydrate(): DehydratedState;\n    /** Seed the browser store from the server's {@link dehydrate} output (SSR-DESIGN.md §6.2): each\n     *  view materialized for a hydrated AST shows these rows until its first live `hello` reconciles. */\n    hydrate(state: DehydratedState): void;\n    /** A query's hydrated first-paint snapshot, by `viewKey` — what React's `getServerSnapshot`\n     *  reads so an SSR render (and the matching client hydration pass) sees the seeded rows without\n     *  opening a subscription. */\n    seedSnapshot(viewKey: string): DehydratedQuery | undefined;\n    primaryKeyFor(table: string): readonly string[];\n    /** Convert assembled (nested-by-name) rows (SSR-DESIGN.md §3.3) into the view's projected result\n     *  shape: spread `cols` (parsing json columns), recurse into each relationship by its alias\n     *  (plural → array, `.one()` → object/null, `countAs` → bare scalar). */\n    assembleSnapshot(ast: Ast, rows: AssembledNode[]): unknown[];\n    private assembleNode;\n    private registerMaterialized;\n    private retainRemote;\n    private onEvent;\n    /** Retire a view's SSR seed — from the view (so `data` switches from the seed to the maintained\n     *  tree) AND from the seeds map (so no later mount re-seeds a now-live query) — but ONLY once the\n     *  query is AUTHORITATIVE (`resultType === \"complete\"`). Called BEFORE the fold it accompanies, so\n     *  that fold's notify already reflects the live tree with no empty gap. Idempotent.\n     *\n     *  The gate is the fix for the synchronous optimistic/wasm backend: it fires a query's FIRST snapshot\n     *  from LOCAL, not-yet-synced state while the query is still `unknown` (`registerMaterialized` marks a\n     *  lifecycle-backed remote view `unknown` up front for exactly this), then delivers the authoritative\n     *  rows one event later as a `catchUp` batch — having already flipped the query to `complete`. So the\n     *  seed survives the pre-sync snapshot (`unknown` ⇒ skip) and retires on the catch-up (`complete` ⇒\n     *  retire). A lifecycle-LESS backend (pure wasm, the SSR one-shot, tests) is `complete` from creation,\n     *  so its first snapshot retires the seed exactly as before this gate existed. */\n    private retireSeedIfLive;\n    /** Retire the SSR seed (if authoritative) and fold the accompanying hydration delta — BEFORE the\n     *  fold so its notify already reflects the live tree with no empty gap. The subtlety: a hydration\n     *  can fold NOTHING — a 0-row authoritative result, or one whose rows are already present in `top`\n     *  (a query whose result is fully covered by an already-hydrated sibling: the shared rows dedup to\n     *  zero net base mutations). Then {@link FlatArrayView.applyChanges} notifies nothing, so the\n     *  seed→tree switch would never reach subscribers and the view freezes on the stale seed. Guard\n     *  against that: if the seed retired but the fold was a no-op, force the handoff notify (inline, or\n     *  via the commit-boundary flush). Flash-safe — the forced notify only fires when there was nothing\n     *  to fold, so `data` is already the correct live tree by then. */\n    private foldHydration;\n    /** Fold a batch into its view, then notify now or — inside a commit bracket — defer the view's\n     *  notification to the commit boundary, so all sibling views fold first (cross-view-atomic\n     *  notification; see `commitDepth`). */\n    private applyAndTrack;\n    /** Deliver everything deferred during the just-ended commit, after every affected view has folded\n     *  (cross-view-atomic notification): view subscribers first, then the raw change stream\n     *  (narrators/devtools), each frame in arrival order. A throwing listener does not stop the others\n     *  — the first error is re-raised only once the whole flush completes (mirroring the backend's\n     *  per-query isolation). View subscribers run before change listeners, preserving the per-event\n     *  order that held before coalescing (a view's subscribers fired before its change frame). */\n    private flushCommit;\n    /** Subscribe to the raw per-query {@link ChangeEvent} stream (hello / snapshot / batch) the Store\n     *  routes to its views, tagged by `qid`. Fired AFTER the event is folded — and, for a commit that\n     *  fans out to several queries (the in-process engine's `onCommitBoundary`), after EVERY view in\n     *  that commit has folded — so a listener that re-reads ANY view (its own or a sibling) sees\n     *  post-commit state, never a torn mid-commit one. Frames keep their arrival (engine-dispatch)\n     *  order, one per affected query. This is the supported way to drive change-derived layers\n     *  (e.g. {@link resolveChange} → @rindle/narrator, or a devtools pane) off a live store — attach\n     *  BEFORE `materialize` to catch a synchronous backend's first `hello`+`snapshot`.\n     *  The per-query view `WireSchema` rides the `hello` frame (also readable via `view.schema`).\n     *\n     *  The third listener arg is the post-fold {@link ArrayView} for this `qid` (so a template wanting\n     *  list context — current `data`, `schema`, `resultType` — needn't look it up). It is ALWAYS the\n     *  plural view, even for a top-level `.one()` query: the Store retains the list-shaped view, not the\n     *  SingularView wrapper handed back from `materialize`. `undefined` only if the view is mid-teardown.\n     *\n     *  `opts.removedSubtree` enriches every `remove` op on this stream with the full removed subtree\n     *  ({@link FlatOp.node}), so a consumer can resolve a removed row's nested subs exactly as on an\n     *  `add` (a bare remove carries only the leaving row). It is reconstructed client-side from the\n     *  view — no wire/engine cost — and paid only on real evictions while at least one subscriber asks.\n     *\n     *  Returns a detach function; multiple listeners may attach. */\n    subscribeChanges(listener: (qid: QueryId, ev: ChangeEvent, view?: ArrayView<unknown>) => void, opts?: {\n        removedSubtree?: boolean;\n    }): () => void;\n    /** Subscribe to per-query {@link ResultType} transitions (the server-channel lifecycle the backend\n     *  pushes — `unknown` → `complete`, etc.), tagged by `qid`. Fired only on a CHANGE (never replayed\n     *  on attach; read `view.resultType` for the current value). The supported seam for a status-driven\n     *  layer (a devtools pane). Returns a detach function; multiple listeners may attach. */\n    subscribeResultType(listener: (qid: QueryId, rt: ResultType) => void): () => void;\n    /** A read-only snapshot of every live materialized view (DEBUG-TOOLS-BROWSER-DESIGN §4.2): its\n     *  qid, AST, {@link ResultType}, row count, and a capped row sample. Built fresh on each call from\n     *  the live `views`/`asts` maps — never cached, never mutating. `sampleRows` caps the per-query\n     *  peek (default 50) so a large view doesn't bloat the snapshot. */\n    __inspect(sampleRows?: number): StoreInspect;\n    private columns;\n    /** An object row → a positional cell array in the table's column order (json → string). */\n    private positionalize;\n    /** The per-level column types parallel to the WireSchema, so the view parses json columns. */\n    private viewTypes;\n}"}]},{"source":"packages/client/src/ensure.ts","declarations":[{"name":"EnsureQueryUntil","signature":"/** When an {@link QueryEnsureCache.ensure} call may resolve.\n *\n * - `complete` waits for the server-authoritative result (the default).\n * - `present` resolves as soon as the local view contains a result, while the remote retain keeps\n *   revalidating in the background. An authoritative empty result also resolves it, so a real\n *   not-found query never waits forever.\n *\n * `present` deliberately does not add a `partial` {@link ResultType}: a locally useful answer and\n * server authority are independent facts. While it resolves early, the view's result type remains\n * `unknown` until the server says otherwise. */\nexport type EnsureQueryUntil = \"complete\" | \"present\";"},{"name":"EnsureQueryOptions","signature":"export interface EnsureQueryOptions {\n    /** Readiness policy. Defaults to `complete`. */\n    until?: EnsureQueryUntil;\n    /** Cancel this caller's wait. The shared query may stay retained for another waiter/prefetch. */\n    signal?: AbortSignal;\n}"},{"name":"QueryEnsureCacheOptions","signature":"export interface QueryEnsureCacheOptions {\n    /** Keep a completed preload alive for this long so the destination can adopt its rows. */\n    releaseDelayMs?: number;\n    /** Bound retained preloads. In-flight waits are never evicted. */\n    maxEntries?: number;\n}"},{"name":"QueryEnsurer","signature":"/** The structural surface consumed by framework adapters such as `@rindle/tanstack`. */\nexport interface QueryEnsurer {\n    ensure(query: AnyQuery, options?: EnsureQueryOptions): Promise<void>;\n}"},{"name":"QueryEnsureCache","signature":"/**\n * Deduplicates route/intent preloads and holds their live view through the navigation handoff.\n *\n * The cache materializes the real named query rather than retaining sync coverage alone: that is\n * what makes `until: \"present\"` observable for overlapping queries already satisfied by local\n * normalized rows. Once the server marks the query complete, the entry is kept briefly for a\n * destination component to take its own retain, then released automatically.\n */\nexport declare class QueryEnsureCache<S extends ColsMap> implements QueryEnsurer {\n    private readonly store;\n    private readonly releaseDelayMs;\n    private readonly maxEntries;\n    private readonly entries;\n    private closed;\n    constructor(store: Store<S>, options?: QueryEnsureCacheOptions);\n    /**\n     * Ensure a named query is retained, resolving according to `options.until`.\n     *\n     * Concurrent calls for the same `(name, args, AST)` share one materialized view and one remote\n     * subscription. A `present` call can resolve from local rows while a concurrent `complete` call\n     * continues waiting for server authority.\n     */\n    ensure<Q extends AnyQuery>(query: Q, options?: EnsureQueryOptions): Promise<void>;\n    /** Release every retained preload and reject outstanding waits. Idempotent. */\n    close(): void;\n    /** Number of retained query entries (primarily useful for tests/devtools). */\n    size(): number;\n    private createEntry;\n    private inspect;\n    private isReady;\n    private touch;\n    private scheduleRelease;\n    private trim;\n    private dispose;\n    private queryError;\n    private detachAbort;\n}"}]},{"source":"packages/client/src/ssr.ts","declarations":[{"name":"OneShotResult","signature":"/** An authorized one-shot read result, as far as the server Store needs it: the\n *  assembled rows plus the `cvMin` baseline they reflect. (Matches `@rindle/daemon-client`'s\n *  `QueryOnceOutput`, but `@rindle/client` stays dependency-free — inject the call.) */\nexport interface OneShotResult {\n    rows: AssembledNode[];\n    cvMin?: number;\n}"},{"name":"OneShotQueryFn","signature":"/** The one-shot read the server Store calls to preload a query. Two topologies inject different\n *  fns (SSR-DESIGN.md §6):\n *\n *   - **Direct to the daemon** (the trusted tier holds the daemon token): use `ast` —\n *     `(i) => daemon.query(i)`.\n *   - **Through the application's API tier** (the authority resolves names → ASTs, the loader never\n *     sends a raw AST): use `name`/`args` — `(i) => fetch('/api/rindle/read', {name: i.name, args: i.args})`.\n *\n *  `ast` is always present (the Store seeds the local view by its `viewKey`); `name`/`args` are\n *  present when the preloaded query came from `defineQuery`. This Store does not authenticate\n *  users or filter rows. The injected function must enforce access: either call the authenticated\n *  API route, or authorize and construct the AST before a privileged direct daemon read. */\nexport type OneShotQueryFn = (input: {\n    ast: unknown;\n    name?: string;\n    args?: unknown;\n    visibilityKey?: string;\n    ttlMs?: number;\n}) => Promise<OneShotResult>;"},{"name":"OneShotBackend","signature":"/**\n * A no-op live backend for SSR (SSR-DESIGN.md §6.1): it opens no transport and never streams.\n * `registerQuery` is inert, `mutate` rejects, and no `ChangeEvent` is pushed. Every view stays\n * PENDING — reading its SSR {@link Store.seedAssembled seed} — and, lacking `onResultType`,\n * reports `complete` (a backend with no server lifecycle leaves every view authoritative).\n */\nexport declare class OneShotBackend implements Backend {\n    registerQuery(_qid: QueryId, _ast: unknown, _remote?: RemoteQuery): void;\n    unregisterQuery(_qid: QueryId): void;\n    mutate(_mutations: Mutation[]): Promise<void>;\n    onEvent(_handler: (queryId: QueryId, event: ChangeEvent) => void): void;\n}"},{"name":"ServerStoreOptions","signature":"export interface ServerStoreOptions {\n    /** Performs an authorized one-shot read. See {@link OneShotQueryFn} for access ownership. */\n    query: OneShotQueryFn;\n    /** Optional namespace for query deduplication, forwarded to every preload. Different keys\n     *  prevent pipeline sharing for the same AST. This key does not authorize access or filter rows;\n     *  the query must already contain the required visibility predicates. */\n    visibilityKey?: string;\n    /** Optional idle TTL (ms) the warm pipeline is left at, forwarded to every preload (SSR-DESIGN.md\n     *  §3.4). The TTL is NOT part of the dedup key, so a shared materialization keeps the LONGEST TTL\n     *  any caller requested (max-wins) — `ttlMs` can extend a query's warm-handoff window, never\n     *  shrink it; absent ⇒ the daemon's default idle TTL. */\n    ttlMs?: number;\n}"},{"name":"ServerStore","signature":"/**\n * The server-side Store wrapper (SSR-DESIGN.md §6.2). Wraps a {@link Store} over a\n * {@link OneShotBackend} and adds the loader-phase `preload` plus `dehydrate`. Pass `.store` to\n * the React `<Rindle>` provider for the synchronous render; return `.dehydrate()` from the loader.\n * Create one instance per request, with an authorized read function for that request's principal.\n * Its snapshots seed views; they do not persist synced rows in the browser database.\n */\nexport declare class ServerStore<S extends ColsMap> {\n    readonly store: Store<S>;\n    private readonly schema;\n    private readonly opts;\n    constructor(schema: Schema<S>, opts: ServerStoreOptions);\n    /** Run the one-shot read for `query` and seed its first-paint snapshot (SSR-DESIGN.md §6.2).\n     *  Call once per query in the route loader, before the synchronous render. */\n    preload(query: Query<any, any, any>): Promise<void>;\n    /** The dehydrated first-paint cache for every preloaded query — embed in the HTML, then\n     *  `store.hydrate(...)` it in the browser. */\n    dehydrate(): DehydratedState;\n    /**\n     * Loader-phase convenience over {@link preload} + {@link dehydrate}: preload EVERY query (reads run\n     * concurrently) and return the dehydrated first-paint cache. Composition keeps this to one read per\n     * composed root query — no request waterfall (SSR-DESIGN.md §6.2).\n     *\n     * A failed read produces no seed for that query and calls `onError`, if provided. Other reads\n     * can still supply seeds. The browser must establish its own successful live subscription to\n     * obtain the missing data; hydration alone does not retry this read. Without `onError`, the\n     * preload failure is silent. An `onError` callback that throws rejects the batch.\n     */\n    preloadAll(queries: Array<Query<any, any, any>>, opts?: {\n        onError?: (query: Query<any, any, any>, err: unknown) => void;\n    }): Promise<DehydratedState>;\n}"},{"name":"createServerStore","signature":"/** Construct a {@link ServerStore} — the one-shot REST Store for server-side rendering. */\nexport declare function createServerStore<S extends ColsMap>(schema: Schema<S>, opts: ServerStoreOptions): ServerStore<S>;"}]},{"source":"packages/client/src/resolve.ts","declarations":[{"name":"NamedRow","signature":"/** A row named against its level's wire columns. */\nexport type NamedRow = Record<string, WireValue>;"},{"name":"ResolvedChange","signature":"/** One resolved change: a `FlatChange` lifted out of positional/indexed wire form into names,\n *  using the query's `WireSchema` (from `hello`) as the sole position→name source. */\nexport interface ResolvedChange {\n    /** Relationship-alias chain from the query root to the changed level (`[]` ⇒ the root rows). */\n    aliasChain: string[];\n    /** The alias of the changed level (`\"\"` ⇒ root), i.e. the last of `aliasChain`. */\n    alias: string;\n    op: \"add\" | \"remove\" | \"edit\";\n    /** The affected row, named. For `edit` this is the NEW row; see `old` for the prior one. */\n    row: NamedRow;\n    /** The prior row, named (present only for `edit`). */\n    old?: NamedRow;\n    /** The PARENT row (named), for a nested/aggregate change — e.g. the `ticket_type` whose `sold`\n     *  count moved. Taken from the path's last `parentRow`; absent for a root-level change. */\n    parent?: NamedRow;\n    /** Set when the changed level is a `countAs`/aggregate slot. The value is EXACT — read from the\n     *  slot's projected count column (`WireRel.project.col`). */\n    aggregate?: {\n        alias: string;\n        value: WireValue;\n        previous?: WireValue;\n    };\n    /** The raw node whose children a consumer can dig a named sub-row out of (via {@link subRow}). On\n     *  an `add` the engine always ships it; on a `remove` it is present only when the consumer opted\n     *  into the removed subtree (see the `op` mapping below). */\n    node?: WireNode;\n    /** The changed level's `WireSchema` — used by {@link subRow} to resolve a named sub of `node`. */\n    levelSchema: WireSchema;\n}"},{"name":"resolveChange","signature":"/** Lift one `FlatChange` into a {@link ResolvedChange} against the query's `WireSchema`, or `null`\n *  if its path doesn't resolve to a materialized level. */\nexport declare function resolveChange(schema: WireSchema, change: FlatChange): ResolvedChange | null;"},{"name":"subRow","signature":"/** Read a named sub-row off a change's `node` by relationship alias (e.g. the `guest` under an\n *  `rsvp`) — the `add` node, or a `remove`'s subtree when the consumer opted into it. The alias →\n *  wire slot mapping comes from the changed level's `WireSchema`. `null` when no node rode along. */\nexport declare function subRow(rc: ResolvedChange, alias: string): NamedRow | null;"}]},{"source":"packages/client/src/mutation-ops.ts","declarations":[{"name":"KeyedRow","signature":"/** A keyed row: column name → cell. The ergonomic write shape (validated against the schema at\n *  runtime). JSON columns carry their raw JSON string (a {@link WireValue}), never a parsed object. */\nexport type KeyedRow = Record<string, WireValue>;"},{"name":"MutationOp","signature":"/** One structured write intent — the discriminated union that mirrors the write half of the client\n *  `MutationTx` 1:1. Keyed (column-name addressed), so it is independent of column order. */\nexport type MutationOp = {\n    kind: \"insert\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"upsert\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"insertIgnore\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"update\";\n    table: string;\n    row: KeyedRow;\n} | {\n    kind: \"delete\";\n    table: string;\n    pk: KeyedRow;\n};"},{"name":"ServerWriteTx","signature":"/** The ASYNC server-side write surface a mutator runs against. Semantically the twin of the client's\n *  synchronous `MutationTx` write methods — same names, same keyed-row arguments — but every op is a\n *  Promise. Reads see this transaction's own writes on both Postgres and the daemon; the daemon\n *  opens an interactive transaction when a read is needed. Inserts require every non-nullable\n *  column and fill omitted nullable columns with `null`. Updates and deletes require the PK. */\nexport interface ServerWriteTx {\n    /** Insert a row. Missing required columns and unknown columns throw; omitted nullable\n     *  columns become `null`, rather than using database defaults. */\n    insert(table: string, row: KeyedRow): Promise<void>;\n    /** Update the row identified by the pk columns; only the named non-pk columns change. A missing\n     *  row is a NO-OP. */\n    update(table: string, row: KeyedRow): Promise<void>;\n    /** Insert, or replace non-PK columns on PK conflict, using the same insert shape. */\n    upsert(table: string, row: KeyedRow): Promise<void>;\n    /** Insert with the same nullable-column rules as `insert`, or do nothing on PK conflict. */\n    insertIgnore(table: string, row: KeyedRow): Promise<void>;\n    /** Delete the row identified by the pk columns. A missing row is a NO-OP. */\n    delete(table: string, pk: KeyedRow): Promise<void>;\n    /** Read one row by primary key, through the OPEN transaction on both backends\n     *  (read-your-writes: live on Postgres; via an interactive mutation session on the daemon,\n     *  DAEMON-INTERACTIVE-TXN-DESIGN.md §5.3). */\n    row(table: string, pk: KeyedRow): Promise<KeyedRow | undefined>;\n}"},{"name":"ReadEffect","signature":"/** A point read a generator mutator yields; the driver resolves it and feeds the row back through\n *  `gen.next(row)`. Read-your-writes on every tier: the client reads its local engine, and both\n *  server backends read the open transaction (the daemon via an interactive mutation session). */\nexport type ReadEffect = {\n    kind: \"row\";\n    table: string;\n    pk: KeyedRow;\n};"},{"name":"BatchEffect","signature":"/** A fan-out a generator mutator yields: run several effects \"together\". The server driver resolves\n *  them with `Promise.all`; the client driver runs them in array order (already synchronous). Results\n *  return in the same order on both tiers. Each result has its effect's shape: a row, query rows,\n *  `undefined` for a write, or an array for a nested batch. Cast the yielded result to that shape;\n *  the generator's declared next-type covers only point reads. */\nexport type BatchEffect = {\n    kind: \"all\";\n    effects: readonly YieldEffect[];\n};"},{"name":"QueryResultRow","signature":"/** A row returned by a {@link QueryEffect}: column name → cell, plus each materialized relationship\n *  name → its nested row(s) — an array (a plural relationship) or a single row / `null` (a `.one()`\n *  relationship). Recursive. Presented identically on both tiers (a `view.data` row of the same\n *  query). */\nexport type QueryResultRow = {\n    [key: string]: WireValue | QueryResultRow | QueryResultRow[];\n};"},{"name":"QueryArg","signature":"/** What {@link IsoTx.query} accepts: a query handle whose `.ast()` lowers to the wire {@link Ast} —\n *  exactly what the typed query builder produces (`newQueryBuilder(schema).<table>…`, the tier-agnostic\n *  server-scope builder both tiers can construct because it performs no I/O). Structural so the seam\n *  need not carry the builder's heavy generics. */\nexport type QueryArg = {\n    ast(): Ast;\n};"},{"name":"QueryEffect","signature":"/** A full-shape read a generator mutator yields — a `where`/`orderBy`/`limit`/join query over the\n *  state this mutator is mutating (read-your-writes, like {@link ReadEffect} but an arbitrary shape).\n *  Evaluates to {@link QueryResultRow}`[]` — ALWAYS an array of the matching rows, in the query's\n *  order, on BOTH tiers (a root `.one()` is not unwrapped here: take `[0]`). The single next-type is\n *  a row, so cast the yield (`(yield tx.query(q)) as unknown as QueryResultRow[]`), same as `all`. */\nexport type QueryEffect = {\n    kind: \"query\";\n    query: QueryArg;\n};"},{"name":"YieldEffect","signature":"/** Everything a generator mutator may `yield`: a write {@link MutationOp}, a point {@link ReadEffect},\n *  a full-query {@link QueryEffect}, or a {@link BatchEffect} fan-out. */\nexport type YieldEffect = MutationOp | ReadEffect | BatchEffect | QueryEffect;"},{"name":"IsoTx","signature":"/** The tier-AGNOSTIC effect factory a generator mutator writes against. Every method just BUILDS an\n *  effect to `yield` — it performs no I/O and holds no state, so the single {@link isoTx} instance is\n *  shared by every mutator on both tiers; only the driver differs. `insert`/`upsert`/`insertIgnore`\n *  require non-nullable columns and permit nullable omissions, which become `null`.\n *  `update`/`delete` require the PK columns; `update` also names the columns to change. */\nexport interface IsoTx<S extends ColsMap = ColsMap, P extends Record<string, string> = PkMap<S>> {\n    /** Insert a row. Omitted nullable columns become `null`; database defaults are not applied. */\n    insert<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Update the row identified by its pk columns (REQUIRED); only the named non-pk columns change. */\n    update<N extends keyof S & string>(table: N, row: UpdateOf<S[N], PkColsOf<S, P, N>>): MutationOp;\n    /** Insert, or replace non-PK columns on PK conflict, with {@link IsoTx.insert}'s omission rules. */\n    upsert<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Insert with {@link IsoTx.insert}'s omission rules, or do nothing on PK conflict. */\n    insertIgnore<N extends keyof S & string>(table: N, row: InsertOf<S[N]>): MutationOp;\n    /** Delete the row identified by its pk columns. */\n    delete<N extends keyof S & string>(table: N, pk: PkOf<S[N], PkColsOf<S, P, N>>): MutationOp;\n    /** Read one row by primary key (read-your-writes). */\n    row<N extends keyof S & string>(table: N, pk: PkOf<S[N], PkColsOf<S, P, N>>): ReadEffect;\n    /** Run a full query (`where`/`orderBy`/`limit`/join) over the state this mutator is mutating —\n     *  read-your-writes, like {@link row} but for arbitrary shapes. Pass a query from the tier-agnostic\n     *  builder, e.g. `tx.query(q.issue.where(\"ownerId\", \"=\", ctx.user))` where `q = newQueryBuilder(schema)`.\n     *  The `yield` evaluates to {@link QueryResultRow}`[]` (cast it — the generator's single next-type is a row). */\n    query(query: QueryArg): QueryEffect;\n    all(effects: readonly YieldEffect[]): BatchEffect;\n}"},{"name":"isoTx","signature":"/** The one shared effect factory (stateless — see {@link IsoTx}). Its methods just BUILD a\n *  {@link MutationOp}, so the single instance serves every schema; the generic {@link IsoTx} view is\n *  applied at the authoring site (a `json<T>` cell is a parsed object here and is stringified by the\n *  funnels, {@link toCell}), hence the cast — the runtime shape is schema-agnostic. */\nexport declare const isoTx: IsoTx;"},{"name":"MutatorCtx","signature":"/** The minimal per-invocation context a shared mutator sees on BOTH tiers: the acting principal. The\n *  server injects its AUTHENTICATED user; the client injects its local user. (The server's own\n *  `MutationContext` is a superset of this.) */\nexport interface MutatorCtx {\n    user: string;\n}"},{"name":"MutationGen","signature":"/** What a generator mutator IS: `yield tx.<op>()` on every side effect; a `yield tx.row()` expression\n *  evaluates to the row. Neither sync nor async — the tier's driver decides, which is what lets one\n *  body run synchronously on the client and against a live async transaction on the server. */\nexport type MutationGen = Generator<YieldEffect, void, KeyedRow | undefined>;"},{"name":"SharedMutator","signature":"/** A generator (isomorphic) mutator, shared verbatim by both tiers: the client trusts typed `args`,\n *  the server parses untrusted args into `Args` before invoking. */\nexport type SharedMutator<Args, Ctx extends MutatorCtx = MutatorCtx> = (tx: IsoTx, args: Args, ctx: Ctx) => MutationGen;"},{"name":"ArgSchema","signature":"/** The minimal arg validator a shared mutator can carry so the SERVER can parse UNTRUSTED wire args\n *  before driving it (the client trusts its typed callsites and never calls this). Structural on\n *  purpose — a zod schema satisfies it as-is — so `@rindle/client` stays validator-library-agnostic. */\nexport interface ArgSchema<Args> {\n    parse(raw: unknown): Args;\n}"},{"name":"SharedMutatorWithArgs","signature":"/** A shared mutator that CARRIES its own arg validator, co-located at the def site (`shared(schema,\n *  gen)`). The client registers it exactly like a bare generator mutator — the `.args` validator is\n *  inert there (typed callsites skip the parse); the server ({@link runSharedMutation}, via the\n *  api-server's `sharedApiMutators`) reads `.args` to parse untrusted wire args before driving the\n *  SAME body. */\nexport type SharedMutatorWithArgs<Args, Ctx extends MutatorCtx = MutatorCtx> = SharedMutator<Args, Ctx> & {\n    args: ArgSchema<Args>;\n};"},{"name":"shared","signature":"/** Co-locate a shared (generator) mutator with the validator for its args — pairing the arg SHAPE\n *  with the body that consumes it at ONE site, so neither tier restates it (the client derives its\n *  callsite type from `Args`; the server parses untrusted args through `.args`). Returns the SAME\n *  generator function with an `args` property attached (`Object.assign` mutates + returns it), so the\n *  registered value is byte-for-byte what the client drove before: {@link isGeneratorMutator} still\n *  detects it and it still `satisfies ClientRegistry`. */\nexport declare function shared<Args, Ctx extends MutatorCtx = MutatorCtx>(args: ArgSchema<Args>, run: SharedMutator<Args, Ctx>): SharedMutatorWithArgs<Args, Ctx>;"},{"name":"IsoTxOf","signature":"/** Bind a schema to the mutator authoring surface: `const { shared } = defineMutators(schema)`.\n *\n *  The returned `shared` is the schema-typed twin of the bare {@link shared} — its `tx` is an\n *  {@link IsoTx} parameterized by THIS schema, so `tx.insert`/`update`/`upsert`/`insertIgnore`/`delete`\n *  check the table name, every column name, each column's value type, nullable-omit on inserts, and\n *  the exact primary-key columns on `update`/`delete` — all at compile time. It registers identically\n *  to the bare form (same runtime value, still `satisfies ClientRegistry`, still an isomorphic\n *  generator the server drives): only the AUTHORING types tighten. `schema` is read for its TYPE only\n *  (never at runtime). Reads (`yield tx.row(...)`) stay loosely typed — a generator's single\n *  next-type can't carry a per-table row. */\n/** The typed {@link IsoTx} for a given schema — `IsoTxOf<typeof schema>`. Use it to annotate a helper\n *  that a mutator body passes its `tx` to (e.g. `const ensureUser = (tx: IsoTxOf<typeof schema>, …)`),\n *  so the helper gets the same table/column/pk typing the `defineMutators` `shared` callback does. */\nexport type IsoTxOf<Sch extends Schema> = Sch extends Schema<infer S, infer P> ? IsoTx<S, P> : never;"},{"name":"defineMutators","signature":"export declare function defineMutators<S extends ColsMap, P extends Record<string, string>>(_schema: Schema<S, P>): {\n    shared<Args, Ctx extends MutatorCtx = MutatorCtx>(args: ArgSchema<Args>, run: (tx: IsoTx<S, P>, args: Args, ctx: Ctx) => MutationGen): SharedMutatorWithArgs<Args, Ctx>;\n};"},{"name":"isGeneratorMutator","signature":"/** True iff `fn` is a generator function (a shared/isomorphic mutator) rather than a plain function —\n *  the driver accepts both forms. Detected structurally (native `GeneratorFunction`). */\nexport declare function isGeneratorMutator(fn: unknown): fn is (...args: never[]) => MutationGen;"},{"name":"SyncEffectExec","signature":"/** A tier's SYNCHRONOUS effect executor (the browser wasm engine): apply a write, resolve a read —\n *  both immediate. */\nexport interface SyncEffectExec {\n    apply(op: MutationOp): void;\n    read(table: string, pk: KeyedRow): KeyedRow | undefined;\n    query(q: QueryArg): QueryResultRow[];\n}"},{"name":"driveMutationSync","signature":"/** Drive a generator mutator SYNCHRONOUSLY (the client, inside the wasm write transaction). Each\n *  yielded write applies immediately; each read (point or query) is resolved and fed back; a batch\n *  runs in order. */\nexport declare function driveMutationSync(gen: MutationGen, exec: SyncEffectExec): void;"},{"name":"AsyncEffectExec","signature":"/** A tier's ASYNCHRONOUS effect executor (the server transaction): every op is a Promise. */\nexport interface AsyncEffectExec {\n    apply(op: MutationOp): Promise<void>;\n    read(table: string, pk: KeyedRow): Promise<KeyedRow | undefined>;\n    query(q: QueryArg): Promise<QueryResultRow[]>;\n}"},{"name":"driveMutationAsync","signature":"/** Drive a generator mutator ASYNCHRONOUSLY (the server, against the open transaction). Writes are\n *  awaited (harmless: a single interactive Postgres connection serializes statements anyway, and the\n *  daemon backend resolves them instantly), reads (point or query) suspend, and a batch fans out with\n *  `Promise.all`. */\nexport declare function driveMutationAsync(gen: MutationGen, exec: AsyncEffectExec): Promise<void>;"}]},{"source":"packages/client/src/stream.ts","declarations":[{"name":"StreamStatus","signature":"/**\n * How a stream ended.\n * - `complete` — the model finished.\n * - `cancelled` — the reader asked it to stop and the producer honoured it.\n * - `error` — the generation threw.\n * - `interrupted` — the host went away mid-generation. The one status that implies the store may be\n *   short of what was produced.\n */\nexport type StreamStatus = \"complete\" | \"cancelled\" | \"error\" | \"interrupted\";"},{"name":"STREAM_STATUS_STREAMING","signature":"/** The value in the mapped status column while a stream is live. */\nexport declare const STREAM_STATUS_STREAMING = \"streaming\";"},{"name":"StreamFrame","signature":"/**\n * One frame of a subscription. A subscription always begins with `open` and always ends with exactly\n * one terminal frame — `end`, `stale`, or `absent` — after which the iterator completes.\n *\n * `stale` and `absent` are the two \"you are on the durable plane now\" answers, and both are SAFE:\n * the store holds everything below `floorSeq` and everything through `durableSeq`, so the reader's\n * IVM view converges without the stream. Neither is an error.\n */\nexport type StreamFrame = \n/** Join accepted. `from` is the (clamped) offset the replay starts at. */\n{\n    type: \"open\";\n    streamId: string;\n    from: number;\n    seq: number;\n    durableSeq: number;\n    ended: boolean;\n}\n/** PRODUCED text — not a durability claim. `text.length === seq - from`, always. */\n | {\n    type: \"chunk\";\n    from: number;\n    seq: number;\n    text: string;\n}\n/** The store now holds the prefix through `seq`. */\n | {\n    type: \"durable\";\n    seq: number;\n}\n/** Sealed. No further frames. */\n | {\n    type: \"end\";\n    seq: number;\n    status: StreamStatus;\n    error?: string;\n}\n/** `from` is below the producer's retained buffer floor (or the subscriber fell too far behind):\n *  read the store. (A raw `EventSource` rejoins automatically on its reconnect; `useStreamedText`\n *  deliberately stays on the durable plane instead — correct, at checkpoint granularity.) */\n | {\n    type: \"stale\";\n    floorSeq: number;\n    durableSeq: number;\n}\n/** The process serving this subscribe is not hosting the stream (wrong instance, already evicted,\n *  or it never existed): the store is the whole truth. */\n | {\n    type: \"absent\";\n};"},{"name":"frameResumePoint","signature":"/** The resume point a frame implies — what rides an SSE `id:` line so a reconnecting `EventSource`\n *  hands it straight back as `Last-Event-ID`. `undefined` for frames that are not a position. */\nexport declare function frameResumePoint(frame: StreamFrame): number | undefined;"},{"name":"spliceStreamText","signature":"/**\n * Merge the durable plane with the live tail.\n *\n * `durable` is what the IVM view shows; `produced` is what a subscription has accumulated (the prefix\n * it joined at, plus every `chunk`). Both are prefixes of the same response, so the merge is \"take\n * the longer\" — no diffing, no overlap handling, no ranges.\n *\n * The length comparison is the whole algorithm, which is why a caller MUST seed its accumulator with\n * the text it joined at: a tail carrying only the chunks it received would read as shorter than the\n * durable text and be discarded. `useStreamedText` does that for you.\n */\nexport declare function spliceStreamText(durable: string, produced: string): string;"},{"name":"assembleDurableText","signature":"/**\n * The durable half of the splice for the mapped-table layout: the compacted `body` followed by\n * whatever chunk rows have not been folded into it yet.\n *\n * Chunks are ALWAYS the suffix after `body` — the closing checkpoint rewrites `body` and drops the\n * chunks it absorbed in ONE transaction — so a reader never observes a torn state where a chunk both\n * is and is not in the body.\n */\nexport declare function assembleDurableText(message: {\n    body?: string | null;\n} | null | undefined, chunks?: ReadonlyArray<{\n    seq: number;\n    text: string;\n}>): string;"}]},{"source":"packages/client/src/index.ts","declarations":[]},{"source":"packages/daemon-client/src/index.ts","declarations":[{"name":"WireValue","signature":"export type WireValue = number | string | boolean | null;"},{"name":"StreamMode","signature":"export type StreamMode = \"flat\" | \"normalized\";"},{"name":"MaterializationPolicy","signature":"export type MaterializationPolicy = {\n    kind: \"pinned\";\n    name?: string;\n} | {\n    kind: \"whileSubscribed\";\n    idleTtlMs?: number;\n};"},{"name":"MaterializeInput","signature":"export interface MaterializeInput {\n    ast: unknown;\n    mode?: StreamMode;\n    policy?: MaterializationPolicy;\n    subject?: string;\n    leaseTtlMs?: number;\n    maxSubscribers?: number;\n    metadata?: Record<string, unknown>;\n    /** The browser's opaque follower-affinity ticket (FOLLOWER-AFFINITY-DESIGN.md §3), forwarded by\n     *  the api-server. {@link HttpRindleDaemonClient} lifts it into the `Rindle-Affinity` request\n     *  HEADER (never the body) so the fleet edge routes this `/materialize` to the follower the\n     *  browser's ws is pinned to (§4) — both legs co-locate on one follower. Placement, not\n     *  authorization: the follower verifies it, the api-server forwards it opaquely. Absent ⇒ no\n     *  affinity (single daemon / affinity off), byte-identical to today. */\n    affinity?: string;\n}"},{"name":"MaterializeOutput","signature":"export interface MaterializeOutput {\n    materializationId: string;\n    queryKey?: string;\n    leaseToken: string;\n    reused?: boolean;\n    /** Fresh follower-placement ticket returned by an affinity-enabled daemon. A machine client\n     *  opening a separate ws for this follower-local lease (for example a room upstream) offers it\n     *  as a subprotocol so the fleet edge routes that socket back to the minting follower. */\n    affinity?: string;\n}"},{"name":"DematerializeInput","signature":"export interface DematerializeInput {\n    materializationId?: string;\n    queryKey?: string;\n    name?: string;\n}"},{"name":"DematerializeOutput","signature":"export interface DematerializeOutput {\n    removed: boolean;\n}"},{"name":"SqlStatement","signature":"export interface SqlStatement {\n    sql: string;\n    params?: WireValue[];\n}"},{"name":"WriteProducer","signature":"/** A foreign (non-client) writer's durable identity: a stable, low-cardinality `id` plus that\n *  producer's own gapless sequence — the same `(producer, sequence)` model Kafka uses.\n *\n *  The daemon stores ONE row per producer and overwrites it in place, so the dedup state is\n *  bounded by how many producers you have, not by how much you write. The contract that buys:\n *  number a producer's writes `1, 2, 3, …` and send them **in order**. `seq <= last` is absorbed\n *  (`applied: false`, nothing runs), `seq == last + 1` applies, and anything beyond is a `409`\n *  gap. Express concurrency with several producer ids, not by fanning out under one — and keep\n *  ids stable and few, because a fresh id per process re-introduces unbounded growth. */\nexport interface WriteProducer {\n    id: string;\n    seq: number;\n}"},{"name":"SqlTxn","signature":"export interface SqlTxn {\n    /** A foreign write's dedup watermark. Mutually exclusive with `clientID`/`mid` — supplying\n     *  both is a `400`, because a silent precedence rule is what let the two write authorities\n     *  disagree about which receipt they stored. */\n    producer?: WriteProducer;\n    clientID?: string;\n    mid?: number;\n    statements: SqlStatement[];\n}"},{"name":"SqlTxnOutput","signature":"export interface SqlTxnOutput {\n    applied?: boolean;\n    cv?: number;\n    txId?: number | string;\n    /** Replicator-master commit identity (the public mutation SQL facade calls this `cursor`). */\n    cursor?: string;\n    /** Flat convenience mirror of this client's entry in `lmidAdvances`. */\n    lmid?: number;\n    lmidAdvances?: Array<{\n        clientID: string;\n        lmid: number;\n    }>;\n}"},{"name":"SqlRead","signature":"/** A raw read: one `SELECT` and its positional parameters. The read counterpart to {@link SqlTxn}\n *  — no idempotency/mutation fields (reads are idempotent).\n *\n *  `consistency` / `routingKey` are **client-tier routing directives**: `consistency` is consumed\n *  by {@link SplitDaemonClient}, `routingKey` by the read router. They ride along the wire (the\n *  router is reached through an `HttpRindleDaemonClient`, so `routingKey` must) but the daemon\n *  itself ignores them and reads only `sql` + `params`. `consistency` defaults to `\"eventual\"`\n *  (route to a replica, scaling reads off the write-master); set `\"strong\"` to route to the master\n *  for read-your-writes after a write to the same data. `routingKey` co-locates a replica read on a\n *  chosen follower (e.g. by tenant); absent, the router places it by the SQL text. */\nexport interface SqlRead {\n    sql: string;\n    params?: WireValue[];\n    consistency?: \"eventual\" | \"strong\";\n    routingKey?: string;\n}"},{"name":"SqlReadOutput","signature":"/** The `/execute-sql-read` response: result columns in order and each row as a bare cell array\n *  (NOT keyed objects — the daemon keeps per-cell object construction off the write-master; zip\n *  `cols` with each row client-side if you want objects). Lossless for duplicate/aliased columns. */\nexport interface SqlReadOutput {\n    cols: string[];\n    rows: WireValue[][];\n}"},{"name":"RowChangeTxn","signature":"export type RowChangeTxn = {\n    source: string;\n    offset: string;\n    changes: Array<{\n        table: string;\n        op: \"add\";\n        row: WireValue[];\n    } | {\n        table: string;\n        op: \"remove\";\n        old: WireValue[];\n    } | {\n        table: string;\n        op: \"edit\";\n        old: WireValue[];\n        row: WireValue[];\n    }>;\n    /** The room write-behind extensions (RINDLE-REALTIME §5.3, each opt-in by\n     *  presence): the placement fence (`doc` + `epoch` — a stale epoch gets a\n     *  `409 {error:\"fenced\"}`), the §8.3 batch identity (`batchHash` — same id +\n     *  different body is a loud 500), and the CAS preconditions (`cas: true` — a miss\n     *  gets a `409 {error:\"conflict\", conflicts}` with authoritative images, nothing\n     *  applied). Plain change sources send none and are byte-compatible unchanged. */\n    doc?: string;\n    epoch?: number;\n    batchHash?: string;\n    cas?: boolean;\n};"},{"name":"RowChangeTxnOutput","signature":"export interface RowChangeTxnOutput {\n    /** `false` = the `(source, offset)` keyset absorbed a replay. */\n    applied?: boolean;\n    cv?: number;\n}"},{"name":"ClaimRoomEpochInput","signature":"/** `/claim-room-epoch` (RINDLE-REALTIME §2.5): bump + return the placement epoch. */\nexport interface ClaimRoomEpochInput {\n    doc: string;\n}"},{"name":"ClaimRoomEpochOutput","signature":"export interface ClaimRoomEpochOutput {\n    epoch: number;\n}"},{"name":"RoomLmidsInput","signature":"/** `/room-lmids` (§3.3): the domain-scoped ledger's lmid per client under `doc` — the\n *  room's boot probe. `doc` scopes the read to `_rindle_room_client_mutations` (§7.1), so a\n *  client's room stream never aliases its slow-path daemon stream. */\nexport interface RoomLmidsInput {\n    doc: string;\n    clients: string[];\n}"},{"name":"RoomLmidsOutput","signature":"export interface RoomLmidsOutput {\n    lmids: Record<string, number>;\n}"},{"name":"MutationSessionBegin","signature":"/** `/mutate-session/begin` (DAEMON-INTERACTIVE-TXN-DESIGN.md §4.1): open an interactive write\n *  transaction on the master, held open across round trips under the daemon-owned deadline.\n *  Client-attributed sessions (`clientID` + `mid`) get mid dedup/gap resolution UP FRONT — an\n *  absorbed replay opens no session and the caller must skip the mutator. `statements` is the\n *  accumulated write prefix to replay into the fresh transaction (sound: nothing before the\n *  first read observed DB state); `query` rides the begin so a one-read mutator pays exactly\n *  one extra round trip over the batch path. */\nexport interface MutationSessionBegin {\n    clientID?: string;\n    mid?: number;\n    /** A foreign session's dedup watermark; see {@link WriteProducer}. Mutually exclusive with\n     *  `clientID`/`mid`. */\n    producer?: WriteProducer;\n    statements?: SqlStatement[];\n    query?: SqlStatement;\n}"},{"name":"MutationSessionBeginOutput","signature":"export interface MutationSessionBeginOutput {\n    /** Present iff a session opened. */\n    sessionId?: string;\n    /** The `query` read's result, when one rode the begin (`{cols, rows}`, bare cell arrays). */\n    read?: SqlReadOutput;\n    /** True when mid/producer-watermark dedup absorbed the envelope at begin: NO session opened, the\n     *  mutator must not run — the remaining fields are the authoritative replay output, the same\n     *  shape {@link RindleDaemonClient.executeSqlTxn} answers for a deduped mid. */\n    absorbed?: boolean;\n    applied?: boolean;\n    lmid?: number;\n    lmidAdvances?: Array<{\n        clientID: string;\n        lmid: number;\n    }>;\n}"},{"name":"MutationSessionExec","signature":"export interface MutationSessionExec {\n    sessionId: string;\n    statements: SqlStatement[];\n}"},{"name":"MutationSessionQuery","signature":"/** A read through the open transaction (read-your-writes) — flat `{sessionId, sql, params}`,\n *  answered in the `/execute-sql-read` shape. */\nexport interface MutationSessionQuery {\n    sessionId: string;\n    sql: string;\n    params?: WireValue[];\n}"},{"name":"MutationSessionRef","signature":"export interface MutationSessionRef {\n    sessionId: string;\n}"},{"name":"MutationRejection","signature":"export interface MutationRejection {\n    clientID: string;\n    mid: number;\n    reason?: string;\n}"},{"name":"MutationRejectionOutput","signature":"export interface MutationRejectionOutput {\n    cv?: number;\n    lmid?: number;\n}"},{"name":"MigrateInput","signature":"/** One pure migration file: either ordered DDL statements or ordered DML statements. The opaque\n *  `id` is the journaled idempotency key. `checksum` is the canonical SHA-256 content identity\n *  sent by current deploy tooling; it is required for data migrations and optional only for\n *  compatibility with legacy private DDL callers. `overrideHash` is an operator-reviewed checksum\n *  for the content this migration originally applied with. DDL may be additive or destructive,\n *  while `RENAME` and raw `blob` remain unsupported. */\nexport interface MigrateInput {\n    id: string;\n    checksum?: string;\n    overrideHash?: string;\n    statements: string[];\n}"},{"name":"MigrateOutput","signature":"/** The `/migrate` response: `applied` is false when `id` was already journaled (an idempotent\n *  replay ran nothing); `hashOverridden` reports that the supplied override matched the journaled\n *  content identity; `schemaVersion` is the version the daemon will report AFTER it serves the new\n *  shape (the latest applied migration id, `DRIZZLE-MIGRATIONS-DESIGN.md` §5.3). `restarting` is\n *  true when the daemon is self-restarting to re-introspect (a supervised daemon with\n *  `RINDLE_RESTART_ON_MIGRATE`) — the caller should wait for it to come back before its next call. */\nexport interface MigrateOutput {\n    applied: boolean;\n    hashOverridden?: boolean;\n    schemaVersion?: string;\n    restarting?: boolean;\n}"},{"name":"MigrateResultItem","signature":"/** One entry in a {@link MigrateBatchOutput}: the migration `id`, whether this apply ran it\n *  (false = the `id` was already journaled, an idempotent no-op), and whether its override matched\n *  the journaled content identity. */\nexport interface MigrateResultItem {\n    id: string;\n    applied: boolean;\n    hashOverridden?: boolean;\n    schemaVersion?: string;\n}"},{"name":"MigrateBatchOutput","signature":"/** The response to the ARRAY form of `/migrate` ({@link HttpRindleDaemonClient.migrateBatch}): a\n *  whole ordered set applied in one round-trip so a supervised daemon self-restarts ONCE for the\n *  set instead of once per migration. `results` are the migrations processed before any failure, in\n *  order; `applied` counts the newly-applied ones; `schemaVersion` is the latest applied id;\n *  `restarting` is true when the daemon is self-restarting to re-introspect (wait for it before the\n *  next call). On a failed migration `error`/`failedId` name it — the batch stops there, earlier\n *  migrations are committed (forward-only), and the daemon does NOT restart: fix forward and\n *  re-send. Unlike the single-migration form, this always arrives as HTTP 200; inspect `error`. */\nexport interface MigrateBatchOutput {\n    results: MigrateResultItem[];\n    applied: number;\n    schemaVersion?: string;\n    restarting?: boolean;\n    error?: string;\n    errorCode?: string;\n    failedId?: string;\n}"},{"name":"QueryOnceInput","signature":"/** The SSR one-shot read (`SSR-DESIGN.md` §3). Materialize-or-reuse the query, read its current\n *  view ONCE, return it assembled; registers no subscriber. `visibilityKey`/`ttlMs` are optional. */\nexport interface QueryOnceInput {\n    ast: unknown;\n    visibilityKey?: string;\n    ttlMs?: number;\n    /** The browser's opaque follower-affinity ticket — see {@link MaterializeInput.affinity}. Lifted\n     *  into the `Rindle-Affinity` header so an SSR / one-shot read co-locates on the same pinned\n     *  follower the browser's ws is (or will be) on. */\n    affinity?: string;\n}"},{"name":"QueryOnceOutput","signature":"/** The `POST /query` response: assembled `rows` (nested by name, ready to hydrate without an\n *  engine), the `cvMin` baseline they reflect, the per-query `schema` hello, and `queryKey`. */\nexport interface QueryOnceOutput {\n    queryKey?: string;\n    cvMin?: number;\n    bootId?: string;\n    schema?: unknown;\n    rows: Array<{\n        cols: Record<string, WireValue>;\n        [rel: string]: unknown;\n    }>;\n}"},{"name":"SchemaColumn","signature":"/** One column in a {@link SchemaTable}: its name and the daemon's `ColType` wire name. */\nexport interface SchemaColumn {\n    name: string;\n    /** The daemon's `ColType` wire name. Because the daemon only ever *introspects* the SQLite file\n     *  and affinity is lossy, this is `\"string\"` or `\"number\"` in practice — a column's app-level\n     *  `\"boolean\"`/`\"json\"` intent is not recoverable from the file (`DRIZZLE-MIGRATIONS-DESIGN.md`\n     *  §6.2). The full vocabulary is `\"string\" | \"number\" | \"boolean\" | \"json\"`. */\n    type: string;\n    /** `true` when the column is nullable (introspected `pragma_table_info.notnull == 0`); the\n     *  generated column becomes `.nullable()`, typing it `T | null`. PK columns are always `false`\n     *  (row identity). Absent on older daemons ⇒ treat as non-nullable. See design 206. */\n    nullable?: boolean;\n}"},{"name":"SchemaTable","signature":"/** One base table in the daemon's introspected schema: its name, ordered columns, and PK columns. */\nexport interface SchemaTable {\n    name: string;\n    columns: SchemaColumn[];\n    primaryKey: string[];\n}"},{"name":"SchemaOutput","signature":"/** The daemon's introspected base-table schema (`GET /schema`) — the input to client-schema\n *  codegen (`DRIZZLE-MIGRATIONS-DESIGN.md` §6.2). Tables are sorted by name and the daemon's own\n *  bookkeeping tables (`_rindle_*`) are excluded. */\nexport interface SchemaOutput {\n    tables: SchemaTable[];\n}"},{"name":"RindleDaemonClient","signature":"export interface RindleDaemonClient {\n    materialize(input: MaterializeInput): Promise<MaterializeOutput>;\n    dematerialize(input: DematerializeInput): Promise<DematerializeOutput>;\n    executeSqlTxn(input: SqlTxn): Promise<SqlTxnOutput>;\n    /** Raw SQL read (a single `SELECT` + params) against the latest committed snapshot, returning\n     *  `{ cols, rows }` (bare row arrays). The read counterpart to {@link executeSqlTxn}. Under\n     *  {@link SplitDaemonClient} this defaults to a replica (`consistency:\"eventual\"`); pass\n     *  `consistency:\"strong\"` for read-your-writes on the master. */\n    executeSqlRead(input: SqlRead): Promise<SqlReadOutput>;\n    applyRowChangeTxn(input: RowChangeTxn): Promise<RowChangeTxnOutput>;\n    rejectMutation(input: MutationRejection): Promise<MutationRejectionOutput>;\n    /** SSR one-shot read (`SSR-DESIGN.md` §3): the current assembled view, no subscription. */\n    query(input: QueryOnceInput): Promise<QueryOnceOutput>;\n    /** Apply one schema migration through the daemon's controlled DDL channel + journal it\n     *  (`DRIZZLE-MIGRATIONS-DESIGN.md` §5.1). Idempotent by `id`. The new shape is served only after\n     *  the daemon is bounced (migrate-at-bounce, §5.2) — this applies DDL to the file but does not\n     *  re-introspect the running engine. Drive it from a migration runner, not the request path. */\n    migrate(input: MigrateInput): Promise<MigrateOutput>;\n    /** Open an interactive mutation session (DAEMON-INTERACTIVE-TXN-DESIGN.md §4) — the write\n     *  transaction a read-bearing mutator lazily upgrades onto. Optional as a group with the four\n     *  ops below: only the daemon's control plane serves sessions (master-only — a follower's\n     *  write-fence rejects begin); a client that lacks them forces the legacy committed-state\n     *  read path. Session ops against a finished/expired session reject with a\n     *  {@link DaemonHttpError} whose `status` is 410 — treat it as infra (retry the envelope;\n     *  begin-time dedup absorbs a committed outcome). */\n    beginMutationSession?(input: MutationSessionBegin): Promise<MutationSessionBeginOutput>;\n    execInMutationSession?(input: MutationSessionExec): Promise<unknown>;\n    queryInMutationSession?(input: MutationSessionQuery): Promise<SqlReadOutput>;\n    commitMutationSession?(input: MutationSessionRef): Promise<SqlTxnOutput>;\n    rollbackMutationSession?(input: MutationSessionRef): Promise<unknown>;\n    /** Claim the next placement epoch for a room's doc (RINDLE-REALTIME §2.5). Optional:\n     *  only daemons serving as a room write authority implement it; the API server's\n     *  room host refuses loudly when its configured client lacks it. */\n    claimRoomEpoch?(input: ClaimRoomEpochInput): Promise<ClaimRoomEpochOutput>;\n    /** The room's boot probe (§3.3). Optional, same contract as {@link claimRoomEpoch}. */\n    roomLmids?(input: RoomLmidsInput): Promise<RoomLmidsOutput>;\n}"},{"name":"HttpRindleDaemonClientPaths","signature":"export interface HttpRindleDaemonClientPaths {\n    materialize: string;\n    dematerialize: string;\n    executeSqlTxn: string;\n    executeSqlRead: string;\n    applyRowChangeTxn: string;\n    rejectMutation: string;\n    query: string;\n    migrate: string;\n    schema: string;\n    claimRoomEpoch: string;\n    roomLmids: string;\n    mutateSessionBegin: string;\n    mutateSessionExec: string;\n    mutateSessionQuery: string;\n    mutateSessionCommit: string;\n    mutateSessionRollback: string;\n}"},{"name":"HeaderValue","signature":"export type HeaderValue = string | undefined;"},{"name":"HeadersInput","signature":"export type HeadersInput = Record<string, HeaderValue>;"},{"name":"HeadersFactory","signature":"export type HeadersFactory = () => HeadersInput | PromiseLike<HeadersInput>;"},{"name":"FetchResponseLike","signature":"export interface FetchResponseLike {\n    ok: boolean;\n    status: number;\n    statusText: string;\n    text(): Promise<string>;\n    /** Optional response headers — the real `fetch` Response exposes these. Used to read the\n     *  daemon's `Rindle-Boot-Id` (see {@link HttpRindleDaemonClientOptions.onBootId}). */\n    headers?: {\n        get(name: string): string | null;\n    };\n}"},{"name":"FetchLike","signature":"export type FetchLike = (input: string, init: {\n    method: string;\n    headers: Record<string, string>;\n    body: string;\n}) => Promise<FetchResponseLike>;"},{"name":"HttpRindleDaemonClientOptions","signature":"export interface HttpRindleDaemonClientOptions {\n    baseUrl: string;\n    fetch?: FetchLike;\n    headers?: HeadersInput | HeadersFactory;\n    paths?: Partial<HttpRindleDaemonClientPaths>;\n    /** Fired with the daemon's boot id on the first control-plane response and again whenever it\n     *  CHANGES — i.e. the daemon restarted (it keeps no durable lease/materialization state). Use\n     *  it to re-assert pins / re-materialize. Treat every call as \"(re)assert now\"; it rides\n     *  responses you already make (e.g. an ingester's writes), so no polling is needed. Must not\n     *  throw or reject — handle your own errors (e.g. `onBootId: () => server.assertPins().catch(log)`). */\n    onBootId?: (bootId: string) => void;\n}"},{"name":"DaemonHttpError","signature":"export declare class DaemonHttpError extends Error {\n    readonly status: number;\n    readonly statusText: string;\n    readonly body: string;\n    constructor(status: number, statusText: string, body: string);\n}"},{"name":"HttpRindleDaemonClient","signature":"export declare class HttpRindleDaemonClient implements RindleDaemonClient {\n    private readonly baseUrl;\n    private readonly fetchImpl;\n    private readonly headers?;\n    private readonly paths;\n    private readonly onBootId?;\n    private lastBootId?;\n    constructor(opts: HttpRindleDaemonClientOptions);\n    materialize(input: MaterializeInput): Promise<MaterializeOutput>;\n    dematerialize(input: DematerializeInput): Promise<DematerializeOutput>;\n    executeSqlTxn(input: SqlTxn): Promise<SqlTxnOutput>;\n    executeSqlRead(input: SqlRead): Promise<SqlReadOutput>;\n    applyRowChangeTxn(input: RowChangeTxn): Promise<RowChangeTxnOutput>;\n    claimRoomEpoch(input: ClaimRoomEpochInput): Promise<ClaimRoomEpochOutput>;\n    roomLmids(input: RoomLmidsInput): Promise<RoomLmidsOutput>;\n    rejectMutation(input: MutationRejection): Promise<MutationRejectionOutput>;\n    beginMutationSession(input: MutationSessionBegin): Promise<MutationSessionBeginOutput>;\n    execInMutationSession(input: MutationSessionExec): Promise<unknown>;\n    queryInMutationSession(input: MutationSessionQuery): Promise<SqlReadOutput>;\n    commitMutationSession(input: MutationSessionRef): Promise<SqlTxnOutput>;\n    rollbackMutationSession(input: MutationSessionRef): Promise<unknown>;\n    query(input: QueryOnceInput): Promise<QueryOnceOutput>;\n    migrate(input: MigrateInput): Promise<MigrateOutput>;\n    /** Apply an ordered SET of migrations in one round-trip — the array form of {@link migrate}. The\n     *  daemon applies them in order (stopping at the first failure) and, when supervised, self-restarts\n     *  ONCE for the whole set. Drive it from a migration runner (`rindle migrate apply` does). See\n     *  {@link MigrateBatchOutput} — inspect its `error` field rather than relying on the HTTP status. */\n    migrateBatch(inputs: MigrateInput[]): Promise<MigrateBatchOutput>;\n    /** The daemon's introspected base-table schema for client-schema codegen\n     *  (`DRIZZLE-MIGRATIONS-DESIGN.md` §6.2). Read-only `GET /schema`, bearer-auth'd when the daemon\n     *  has a token configured. Deliberately NOT on {@link RindleDaemonClient}: schema codegen is a\n     *  dev/CI concern, not part of the runtime control-plane contract a router/splitter satisfies. */\n    schema(): Promise<SchemaOutput>;\n    private post;\n    /** A bearer-auth'd GET (the read-only `/schema`, `/version`-style routes). Carries no request\n     *  body — `defaultFetch` strips the placeholder before the real fetch (WHATWG fetch rejects a\n     *  GET body). */\n    private get;\n    /** Notice the daemon's boot id on any response; fire `onBootId` on the first one and on every\n     *  change (a restart). Updates `lastBootId` BEFORE the hook so a re-assert it triggers (which\n     *  POSTs again, same boot id) does not re-fire — no recursion. */\n    private observeBootId;\n    private resolveHeaders;\n}"}]},{"source":"packages/sql-client/src/types.ts","declarations":[{"name":"SqlValue","signature":"/** A value accepted by Rindle SQL's v1 client. Binary values are deliberately unsupported. */\nexport type SqlValue = null | string | number | bigint | boolean;"},{"name":"SqlArgs","signature":"export type SqlArgs = readonly SqlValue[] | Readonly<Record<string, SqlValue>>;"},{"name":"Statement","signature":"export interface Statement {\n    sql: string;\n    args?: SqlArgs;\n    wantRows?: boolean;\n}"},{"name":"Column","signature":"export interface Column {\n    name: string;\n    decltype: string | null;\n}"},{"name":"StatementResult","signature":"export interface StatementResult {\n    columns: Column[];\n    rows: SqlValue[][];\n    rowsAffected: number;\n    lastInsertRowid: string | null;\n    rowsRead: number | null;\n    rowsWritten: number | null;\n}"},{"name":"RoutingMetadata","signature":"export interface RoutingMetadata {\n    servedBy: \"master\" | \"follower\" | \"standalone\";\n    appliedLagMs: number | null;\n    fenceFallback: boolean;\n}"},{"name":"ExecuteResult","signature":"export interface ExecuteResult {\n    result: StatementResult;\n    commitCursor: string | null;\n    routing: RoutingMetadata;\n}"},{"name":"BatchResult","signature":"export interface BatchResult {\n    results: StatementResult[];\n    commitCursor: string | null;\n    routing: RoutingMetadata;\n}"},{"name":"MigrationInput","signature":"export interface MigrationInput {\n    id: string;\n    checksum: string;\n    statements: string[];\n}"},{"name":"MigrationResult","signature":"export interface MigrationResult {\n    applied: boolean;\n    commitCursor: string;\n}"},{"name":"ReadConsistency","signature":"export type ReadConsistency = \"session\" | \"strong\" | \"eventual\";"},{"name":"IntMode","signature":"export type IntMode = \"bigint\" | \"number\" | \"string\";"},{"name":"RetryScope","signature":"export type RetryScope = \"request\" | \"transaction\" | \"closure\" | \"never\";"},{"name":"TransactionState","signature":"export type TransactionState = \"open\" | \"closed\" | \"unknown\";"},{"name":"OperationOptions","signature":"export interface OperationOptions {\n    signal?: AbortSignal;\n}"},{"name":"ExecuteOptions","signature":"export interface ExecuteOptions extends OperationOptions {\n    consistency?: ReadConsistency;\n    sessionCursor?: string | null;\n}"},{"name":"BatchOptions","signature":"export type BatchOptions = ExecuteOptions;"},{"name":"TransactionOptions","signature":"export interface TransactionOptions extends OperationOptions {\n    readOnly?: boolean;\n    isolation?: \"serializable\" | \"snapshot\";\n    consistency?: ReadConsistency;\n    sessionCursor?: string | null;\n}"},{"name":"MutationIdentity","signature":"/** The optimistic mutation whose effects a mutation-aware SQL transaction commits. `mid` is the\n *  requested mutation id; `lmid` is server-owned state and therefore only appears in receipts. */\nexport interface MutationIdentity {\n    clientId: string;\n    mid: number;\n}"},{"name":"MutationReceipt","signature":"/** The authoritative outcome of a mutation commit or lmid-only rejection. */\nexport interface MutationReceipt {\n    applied: boolean;\n    lmid: number;\n    commitCursor: string | null;\n}"},{"name":"MutationRows","signature":"/** Positional rows returned by a read inside an open mutation transaction. */\nexport interface MutationRows {\n    columns: string[];\n    rows: SqlValue[][];\n}"},{"name":"ExecuteMutationInput","signature":"export interface ExecuteMutationInput extends MutationIdentity {\n    /** May be empty: an accepted no-op must still advance lmid and retire the prediction. */\n    statements: Statement[];\n}"},{"name":"BeginMutationInput","signature":"export interface BeginMutationInput extends MutationIdentity {\n    /** A pure-write prefix accumulated before the mutator's first read. */\n    statements?: Statement[];\n    /** Optional first read, coalesced with begin to preserve the mutation fast path. */\n    query?: Statement | string;\n}"},{"name":"RejectMutationInput","signature":"export interface RejectMutationInput extends MutationIdentity {\n    reason?: string;\n}"},{"name":"SqlMutationTransaction","signature":"export interface SqlMutationTransaction {\n    execute(statement: Statement | string, options?: OperationOptions): Promise<void>;\n    batch(statements: Statement[], options?: OperationOptions): Promise<void>;\n    query(statement: Statement | string, options?: OperationOptions): Promise<MutationRows>;\n    commit(options?: OperationOptions): Promise<MutationReceipt>;\n    rollback(options?: OperationOptions): Promise<void>;\n}"},{"name":"BeginMutationResult","signature":"/** Begin-time mid dedup can absorb a replay without opening a transaction; callers must skip the\n *  mutator body in that branch. */\nexport type BeginMutationResult = {\n    absorbed: true;\n    receipt: MutationReceipt;\n} | {\n    absorbed: false;\n    transaction: SqlMutationTransaction;\n    read?: MutationRows;\n};"},{"name":"RetryOptions","signature":"export interface RetryOptions extends TransactionOptions {\n    /** Total closure attempts, including the first. Defaults to 5. */\n    maxAttempts?: number;\n    /** Initial closure-retry delay. Defaults to 10ms. */\n    baseDelayMs?: number;\n    /** Maximum closure-retry delay. Defaults to 250ms. */\n    maxDelayMs?: number;\n}"},{"name":"Fetch","signature":"/** Portable subset of the WHATWG fetch signature used by the client. Keeping the input to the\n *  URL forms we actually emit avoids leaking the DOM-only `RequestInfo` alias into Node/Worker\n *  consumers that compile this package from source. */\nexport type Fetch = (input: string | URL, init?: RequestInit) => Promise<Response>;"},{"name":"ClientOptions","signature":"export interface ClientOptions {\n    url: string;\n    authToken: string;\n    consistency?: ReadConsistency;\n    sessionCursor?: string | null;\n    intMode?: IntMode;\n    /** Test/service-binding seam. The default is the runtime's global fetch. */\n    fetch?: Fetch;\n}"},{"name":"SqlTransaction","signature":"export interface SqlTransaction {\n    execute(statement: Statement | string, options?: OperationOptions): Promise<StatementResult>;\n    batch(statements: Statement[], options?: OperationOptions): Promise<StatementResult[]>;\n    commit(options?: OperationOptions): Promise<{\n        commitCursor: string | null;\n    }>;\n    rollback(options?: OperationOptions): Promise<void>;\n}"},{"name":"SqlSession","signature":"export interface SqlSession {\n    execute(statement: Statement | string, options?: ExecuteOptions): Promise<ExecuteResult>;\n    batch(statements: Statement[], options?: BatchOptions): Promise<BatchResult>;\n    begin(options?: TransactionOptions): Promise<SqlTransaction>;\n    withTransaction<T>(fn: (tx: SqlTransaction) => Promise<T>, options?: TransactionOptions): Promise<T>;\n    withTransactionRetry<T>(fn: (tx: SqlTransaction) => Promise<T>, options?: RetryOptions): Promise<T>;\n    /** One-round-trip optimistic mutation commit (effects + lmid in the same atomic unit). */\n    executeMutation(input: ExecuteMutationInput, options?: OperationOptions): Promise<MutationReceipt>;\n    /** Open an interactive optimistic mutation transaction, or absorb a replay before it runs. */\n    beginMutation(input: BeginMutationInput, options?: OperationOptions): Promise<BeginMutationResult>;\n    /** Process a business/pre-flight rejection as an lmid-only commit. */\n    rejectMutation(input: RejectMutationInput, options?: OperationOptions): Promise<MutationReceipt>;\n    executeDdl(sql: string, options?: OperationOptions): Promise<ExecuteResult>;\n    migrate(input: MigrationInput, options?: OperationOptions): Promise<MigrationResult>;\n    executeMultiple(sql: string, options?: OperationOptions): Promise<void>;\n    session(cursor?: string | null): SqlSession;\n    getSessionCursor(): string | null;\n    resetSessionCursor(): void;\n    ping(options?: OperationOptions): Promise<void>;\n}"},{"name":"SqlClient","signature":"export interface SqlClient extends SqlSession {\n    close(): void;\n}"},{"name":"WireI64","signature":"export interface WireI64 {\n    $rindle: \"i64\";\n    value: string;\n}"},{"name":"WireFloat","signature":"export interface WireFloat {\n    $rindle: \"float\";\n    value: \"Infinity\" | \"-Infinity\";\n}"},{"name":"WireSqlValue","signature":"export type WireSqlValue = null | string | number | WireI64 | WireFloat;"},{"name":"WireArgs","signature":"export type WireArgs = WireSqlValue[] | Record<string, WireSqlValue>;"},{"name":"WireStatement","signature":"export interface WireStatement {\n    sql: string;\n    args?: WireArgs;\n    want_rows?: boolean;\n}"},{"name":"WireColumn","signature":"export interface WireColumn {\n    name: string;\n    decltype: string | null;\n}"},{"name":"WireStatementResult","signature":"export interface WireStatementResult {\n    columns: WireColumn[];\n    rows: WireSqlValue[][];\n    rows_affected: number;\n    last_insert_rowid: string | null;\n    rows_read: number | null;\n    rows_written: number | null;\n}"},{"name":"WireRoutingMetadata","signature":"export interface WireRoutingMetadata {\n    served_by: \"master\" | \"follower\" | \"standalone\";\n    applied_lag_ms: number | null;\n    fence_fallback: boolean;\n}"},{"name":"WireExecuteResponse","signature":"export interface WireExecuteResponse {\n    result: WireStatementResult;\n    commit_cursor: string | null;\n    routing: WireRoutingMetadata;\n}"},{"name":"WireBatchResponse","signature":"export interface WireBatchResponse {\n    results: WireStatementResult[];\n    commit_cursor: string | null;\n    routing: WireRoutingMetadata;\n}"}]},{"source":"packages/sql-client/src/errors.ts","declarations":[{"name":"RindleSqlErrorOptions","signature":"export interface RindleSqlErrorOptions {\n    code: string;\n    message: string;\n    sqliteCode?: number;\n    retryScope?: RetryScope;\n    transactionState?: TransactionState;\n    status?: number;\n    requestId?: string;\n    statementIndex?: number;\n    partialResults?: StatementResult[];\n    cause?: unknown;\n}"},{"name":"RindleSqlError","signature":"/** Stable error surfaced for both server envelopes and client-side contract refusals. */\nexport declare class RindleSqlError extends Error {\n    readonly code: string;\n    readonly sqliteCode: number | undefined;\n    readonly retryScope: RetryScope;\n    readonly transactionState: TransactionState | undefined;\n    readonly status: number | undefined;\n    readonly requestId: string | undefined;\n    readonly statementIndex: number | undefined;\n    readonly partialResults: StatementResult[] | undefined;\n    constructor(options: RindleSqlErrorOptions);\n}"},{"name":"isRindleSqlError","signature":"export declare function isRindleSqlError(error: unknown): error is RindleSqlError;"},{"name":"valueUnsupported","signature":"export declare function valueUnsupported(message: string): RindleSqlError;"},{"name":"protocolError","signature":"export declare function protocolError(message: string, cause?: unknown): RindleSqlError;"}]},{"source":"packages/sql-client/src/id.ts","declarations":[{"name":"newIdempotencyKey","signature":"/** Runtime-portable one-shot idempotency key; its wire format is intentionally centralized here. */\nexport declare function newIdempotencyKey(): string;"},{"name":"newRequestId","signature":"/** One canonical design-225 logical request id backed by 128 cryptographically random bits. */\nexport declare function newRequestId(): string;"}]},{"source":"packages/sql-client/src/value.ts","declarations":[{"name":"encodeSqlValue","signature":"/** Encode one public SDK value into the frozen v1 tagged JSON representation. */\nexport declare function encodeSqlValue(value: SqlValue): WireSqlValue;"},{"name":"decodeSqlValue","signature":"/** Decode one frozen v1 tagged JSON value using the client's integer policy. */\nexport declare function decodeSqlValue(value: unknown, intMode?: IntMode): SqlValue;"},{"name":"encodeArgs","signature":"export declare function encodeArgs(args: SqlArgs): WireArgs;"},{"name":"encodeStatement","signature":"export declare function encodeStatement(statement: Statement | string): WireStatement;"}]},{"source":"packages/sql-client/src/client.ts","declarations":[{"name":"createSqlClient","signature":"export declare function createSqlClient(options: ClientOptions): SqlClient;"}]},{"source":"packages/sql-client/src/index.ts","declarations":[]},{"source":"packages/query-compiler/src/ast.ts","declarations":[]},{"source":"packages/query-compiler/src/catalog.ts","declarations":[{"name":"Cardinality","signature":"/** Whether a relationship yields a single child object (`one`) or an array (`many`). */\nexport type Cardinality = \"one\" | \"many\";"},{"name":"ColumnType","signature":"/**\n * Per-column type detail the Postgres compiler needs for value-model↔native-type\n * reconciliation (§6.2). Mirrors z2s's `ServerColumnSchema`: the raw Postgres type name\n * plus the two flags the cast switch branches on. The extension over what\n * `rindle-pg-source` derives today (§7, review decision 2): enums and arrays are carried\n * distinctly instead of collapsing into a text fallback.\n *\n * - `type` — the native Postgres type name: `\"int4\"`, `\"text\"`, `\"bool\"`, `\"float8\"`,\n *   `\"numeric\"`, `\"timestamptz\"`, `\"timestamp\"`, `\"date\"`, `\"timetz\"`, `\"time\"`, `\"uuid\"`,\n *   `\"json\"`/`\"jsonb\"`, or an **enum type name** (paired with `isEnum: true`).\n * - `isEnum` — `type` names a Postgres enum ⇒ cast via `$N::text::\"<type>\"`.\n * - `isArray` — the column is an array ⇒ unnest via `jsonb_array_elements_text`.\n *\n * The SQLite oracle dialect ignores this entirely: it binds native values (no casts).\n */\nexport interface ColumnType {\n    type: string;\n    isEnum: boolean;\n    isArray: boolean;\n}"},{"name":"TableSchema","signature":"/**\n * Per-table metadata the compiler needs beyond the `Ast`:\n * - `columns` — the projected column list, **in projection order** (the order\n *   `json_object`/`jsonb_build_object` enumerates), matching the View's `Schema`.\n * - `primaryKey` — the PK columns, for ordering-completion (§8): the compiler appends the\n *   full PK to every `orderBy` at every level for a total order, exactly as the engine's\n *   builder does (`rindle::complete_ordering`).\n * - `columnTypes` — per-column native type detail, keyed by column name (§6.2; Postgres\n *   dialect only).\n * - `relationships` — declared relationships → cardinality. This is the one structural\n *   fact not carried by the `Ast` (the relationship *shape* — correlation keys, nesting,\n *   where/order/limit — lives in the `Ast`'s `related` subqueries).\n */\nexport interface TableSchema {\n    columns: string[];\n    primaryKey: string[];\n    columnTypes: Record<string, ColumnType>;\n    relationships: Record<string, Cardinality>;\n}"},{"name":"Catalog","signature":"/**\n * The catalog: every table the compiler may reference, keyed by table name. Produced\n * statically by `rindle pg prepare` from an ephemeral migration-built Postgres (§7,\n * Phase B); hand-authored for tests. A pure input — the compiler never touches a database\n * to obtain it.\n */\nexport interface Catalog {\n    tables: Record<string, TableSchema>;\n}"}]},{"source":"packages/query-compiler/src/dialect.ts","declarations":[{"name":"LitScalar","signature":"/** A scalar value bindable as a parameter (an array filter value is split into scalars). */\nexport type LitScalar = null | boolean | number | string;"},{"name":"Dialect","signature":"export interface Dialect {\n    readonly name: \"postgres\" | \"sqlite\";\n    /** `json_object('k', v, …)` | `jsonb_build_object('k', v, …)`. `parts` are the flat\n     *  `'key', valueExpr` fragments, in order. */\n    objectBuild(parts: string[]): string;\n    /** The array aggregate over `elem` with `orderSql` (e.g. ` ORDER BY __o0 ASC`) inside:\n     *  `json_group_array(elem ORDER BY …)` | `jsonb_agg(elem ORDER BY …)`. */\n    groupArray(elem: string, orderSql: string): string;\n    /** The empty-array default for the `COALESCE` wrapper: `'[]'` | `'[]'::jsonb`. */\n    readonly emptyArray: string;\n    /** Re-assert the JSON subtype on a value round-tripped through a subquery's `AS` column\n     *  (`json(x)` in SQLite; identity in Postgres, where `jsonb` is a real type). */\n    reassertJson(x: string): string;\n    /** The truthy/falsy constants for empty `AND`/`OR` folding and boolean keyword positions:\n     *  `1`/`0` | `TRUE`/`FALSE`. */\n    readonly trueLit: string;\n    readonly falseLit: string;\n    /** An `ORDER BY` direction with the engine's null-low ordering made explicit where the\n     *  dialect default differs (§8): SQLite is null-low by default (`ASC`/`DESC`); Postgres's\n     *  default is the opposite, so it must emit `ASC NULLS FIRST` / `DESC NULLS LAST`. */\n    orderDir(dir: Dir): string;\n    /** Project a stored column into the value model's representation for the result JSON.\n     *  Identity in SQLite; the outbound half of §6.2 in Postgres (e.g. timestamptz → epoch-ms). */\n    projectColumn(colRef: string, col: ColumnType | null): string;\n    /** Bind a scalar filter/paging value as a parameter: push onto `params`, return the\n     *  placeholder SQL. `col` is the compared column's type when known (drives the Postgres\n     *  `::text::<type>` casts, §6.2); `null` ⇒ infer from the JS type. SQLite ignores `col`\n     *  and `isComparison` — it binds natives. */\n    bindValue(params: unknown[], value: LitScalar, col: ColumnType | null, isComparison: boolean): string;\n    /** Double-quote an identifier, doubling embedded `\"`. Identical across dialects (kept on\n     *  the seam for uniformity). */\n    quoteIdent(name: string): string;\n}"},{"name":"sqliteDialect","signature":"/**\n * The SQLite dialect — the daemon backend's session-read target (DAEMON-INTERACTIVE-TXN §5.4)\n * and the offline differential oracle (§9). It binds native values as parameters (no\n * `::text::<type>` casts — SQLite is the canonical store, so there is no driver seam to pin\n * and no second representation to reconcile), relies on SQLite's null-low default ordering\n * (which matches the engine's `null < everything`), and re-asserts the `json()` subtype where\n * objects round-trip through a subquery column. Matches `rindle-d2s`'s raw SQL shapes so the\n * two agree modulo parameterization; the executing connection must run\n * `PRAGMA case_sensitive_like = ON` (every daemon cluster connection does — `open_wal2`).\n */\nexport declare const sqliteDialect: Dialect;"}]},{"source":"packages/query-compiler/src/pg-types.ts","declarations":[{"name":"formatTypeForLookup","signature":"/** Strips args (the `(32)` in `char(32)`) and lowercases — mono's `formatTypeForLookup`.\n *  Every predicate normalizes through this, so `VARCHAR(255)` / `UUID` classify correctly. */\nexport declare function formatTypeForLookup(pgType: string): string;"},{"name":"isPgNumberType","signature":"export declare function isPgNumberType(pgType: string): boolean;"},{"name":"isPgNativeStringType","signature":"export declare function isPgNativeStringType(pgType: string): boolean;"},{"name":"isPgTextRepresentedType","signature":"export declare function isPgTextRepresentedType(pgType: string): boolean;"},{"name":"isPgStringType","signature":"export declare function isPgStringType(pgType: string): boolean;"},{"name":"isTemporalType","signature":"/** A temporal type projected as epoch-ms (outbound) and reconciled via `to_timestamp`/interval\n *  (inbound). Everything else projects raw. */\nexport declare function isTemporalType(pgType: string): boolean;"},{"name":"needsTimeOfDayNormalization","signature":"/**\n * Whether an outbound temporal projection needs the `mod 1 day` normalization. **Deliberately\n * narrower than z2s's `selectIdent`**, which (via a switch fall-through) also normalizes\n * `timestamptz` — that would collapse a full timestamp to time-of-day. The design (§6.2) is\n * explicit that `timestamptz` projects as plain epoch-ms and only the offset-bearing\n * *time-of-day* types are modular-normalized; the §9 parity harness against the engine's value\n * model is the check that keeps this honest.\n */\nexport declare function needsTimeOfDayNormalization(pgType: string): boolean;"}]},{"source":"packages/query-compiler/src/postgres.ts","declarations":[{"name":"postgresDialect","signature":"/**\n * The Postgres dialect — the BYO-Postgres server-mutator read target. Emits `(sql, params)`\n * with `$N::text::<type>` parameters and never imports a driver (Invariant 7).\n */\nexport declare const postgresDialect: Dialect;"}]},{"source":"packages/query-compiler/src/complete-ordering.ts","declarations":[{"name":"completeOrdering","signature":"export declare function completeOrdering(ast: Ast, getPk: (table: string) => string[]): void;"}]},{"source":"packages/query-compiler/src/errors.ts","declarations":[{"name":"CompileError","signature":"export declare class CompileError extends Error {\n    constructor(message: string);\n}"},{"name":"unknownTable","signature":"/** A referenced table is not in the catalog. */\nexport declare function unknownTable(table: string): CompileError;"},{"name":"unknownRelationship","signature":"/** A `related`/EXISTS relationship's cardinality is not declared in the catalog. */\nexport declare function unknownRelationship(table: string, rel: string): CompileError;"},{"name":"missingAlias","signature":"/** A `related` subquery is missing an alias (every child must be named). */\nexport declare function missingAlias(table: string): CompileError;"},{"name":"unsupported","signature":"/** An AST feature the compiler does not lower in the position it appears — rejected loudly\n *  rather than emitting silently-wrong SQL (e.g. a `start` paging bound inside EXISTS). */\nexport declare function unsupported(what: string): CompileError;"}]},{"source":"packages/query-compiler/src/reject.ts","declarations":[{"name":"rejectUnsupported","signature":"export declare function rejectUnsupported(ast: Ast): void;"}]},{"source":"packages/query-compiler/src/walker.ts","declarations":[{"name":"Compiled","signature":"export interface Compiled {\n    sql: string;\n    params: unknown[];\n}"},{"name":"compileWith","signature":"/** Compile `ast` against `catalog` for `dialect`. `singular` ⇒ a `.one()` root (single\n *  object or `null`); else a plural root (a JSON array). Pure: mutates only a clone. */\nexport declare function compileWith(ast: Ast, catalog: Catalog, dialect: Dialect, singular: boolean): Compiled;"}]},{"source":"packages/query-compiler/src/index.ts","declarations":[{"name":"DialectName","signature":"/** Which SQL dialect to emit. Both are product targets: `postgres` for the BYO-PG backend,\n *  `sqlite` for the daemon backend's session reads (and the offline oracle, §9). */\nexport type DialectName = \"postgres\" | \"sqlite\";"},{"name":"CompileOptions","signature":"export interface CompileOptions {\n    dialect: DialectName;\n}"},{"name":"CompiledQuery","signature":"/**\n * A compiled query: one SQL `SELECT` plus its positional bound parameters. `sql` returns a\n * single row with a single column `\"rindle_result\"` — the whole nested result as JSON\n * (`jsonb` on Postgres, `json` text on SQLite). No runtime value is ever interpolated into\n * `sql`; every filter/paging value is a bound parameter (Invariant 4).\n */\nexport interface CompiledQuery {\n    sql: string;\n    /** In order: `$1..$n` for Postgres, `?` for SQLite. */\n    params: unknown[];\n}"},{"name":"compile","signature":"/**\n * Compile `ast` against `catalog` into `{ sql, params }` (§4). A pure function of its\n * inputs — no database access (Invariant 2). The root is **singular** when `ast.one` is set\n * (a single JSON object or `null`), else **plural** (a JSON array).\n */\nexport declare function compile(ast: Ast, catalog: Catalog, opts: CompileOptions): CompiledQuery;"}]},{"source":"packages/api-server/src/rooms.ts","declarations":[{"name":"RoomProfile","signature":"/**\n * One NAMED room profile (§2.1). Rooms are document-scoped, not query-scoped: a profile is what\n * stands up and feeds a room — the flat `resolveFootprint` promoted to a named, reusable unit.\n * Labeled queries opt into a profile; the wire room key for a named profile is minted SERVER-side\n * as `\"<profile>/<key>\"`, and `/room-boot` splits it back to resolve the footprint.\n */\nexport interface RoomProfile<User = unknown> {\n    /** Derive the profile-local room key from the (label-mapped) query args. Runs server-side under\n     *  authoritative inputs — the client learns the key from the lease, it never computes one. */\n    key: (args: any) => string;\n    /** Build the room's canonical footprint — the replica boundary the room loads and follows —\n     *  from the profile-local doc key (this profile's `key` output; what `/room-boot` receives\n     *  after the prefix split). MUST be unwindowed (§2.3): no `limit`/`start`/`one` anywhere in the\n     *  AST — enforced loudly at construction when statically resolvable, and again at every boot.\n     *  Should be a TOTAL builder over any key (a shape constructor, not an authorizer). */\n    footprint: (docKey: string, ctx: ApiContext<User>) => MaybePromise<ApiQueryResult>;\n    /** Loaded-but-never-room-written tables (§2.2 — the \"followed\" set: real external writers, the\n     *  daemon stays write-authoritative for them). Must be a subset of the footprint's tables; the\n     *  room's writable scope is footprint minus context. Defaults to `[]`. */\n    context?: readonly string[];\n}"},{"name":"queryResultToAst","signature":"export declare function queryResultToAst(result: ApiQueryResult): Ast;"},{"name":"ROOM_DOC_SEPARATOR","signature":"/** The wire room-key delimiter: a named profile's doc is `\"<profile>/<key>\"`; a doc with no known\n *  profile prefix belongs to the legacy anonymous profile (`resolveFootprint`, bare-key form). */\nexport declare const ROOM_DOC_SEPARATOR = \"/\";"},{"name":"mintRoomDoc","signature":"/** Mint the wire room doc for a named profile (the lease path — G-iv-b — mints these). */\nexport declare function mintRoomDoc(profile: string, key: string): string;"},{"name":"splitRoomDoc","signature":"/** Split a wire room doc at the FIRST separator. `undefined` for a bare doc (no separator, or an\n *  empty would-be profile name). The CALLER decides whether the prefix actually names a profile —\n *  a legacy doc may itself contain `/`, and then falls through to the legacy resolver whole. */\nexport declare function splitRoomDoc(doc: string): {\n    profile: string;\n    key: string;\n} | undefined;"},{"name":"assertUnwindowedFootprint","signature":"/**\n * §2.3 \"profile footprints are unwindowed\", enforced: throw loudly (with the offending AST path)\n * if `limit` / `start` (cursor paging — the skip lowering) / `one` appears ANYWHERE in the\n * footprint tree — the root, a related subquery, or an EXISTS child. A window computed over an\n * unwindowed superset equals the window over the full store, which is what makes room-serving of\n * windowed *queries* sound; a windowed *footprint* would silently break that, so it is rejected\n * by construction. Windows belong on the labeled queries a room serves, never on the footprint.\n */\nexport declare function assertUnwindowedFootprint(ast: Ast, profile: string): void;"},{"name":"FootprintScan","signature":"export interface FootprintScan {\n    tables: Set<string>;\n    joinKeys: Map<string, Set<string>>;\n}"},{"name":"scanFootprint","signature":"/** Walk the footprint: every base table it draws rows from, and — per table — the correlation\n *  (join-key) columns every related/EXISTS edge binds on it. These are §3.2's routing metadata\n *  and slice H's \"room mutators never write join keys\" enforcement input; G-iv-b ships them to\n *  the room engine as part of the RoomTableSpec compilation ({@link compileRoomTableSpecs}). */\nexport declare function scanFootprint(ast: Ast): FootprintScan;"},{"name":"RoomTableSpec","signature":"/**\n * One footprint table's spec on the lease wire (`QueryLeaseResponse.realtime.tables`): the §2.2\n * owned/followed split plus §3.2's per-table routing metadata, compiled from the RESOLVED\n * footprint AST at lease time (so key-dependent and non-static profiles compile too).\n *\n * `writable`:\n * - `none` — a context table (§2.2 \"followed\"): loaded by the room, never room-written; the\n *   daemon stays write-authoritative.\n * - `predicate` — a writable table. `where` is the ROW-LOCAL part of the footprint's predicate\n *   for this table (simple column-vs-literal conditions composed with and/or); an ABSENT `where`\n *   means no row-local constraint — every row the room holds for this table is in the writable\n *   scope. `joinKeyCols` are the correlation columns the footprint binds on this table (slice\n *   H's \"room mutators never write join keys\" enforcement input).\n *\n * Dropping the non-row-local parts (correlated/EXISTS conditions, column-vs-column comparisons)\n * only ever WIDENS the predicate, which is sound here: the room only relays rows the footprint\n * materialized, so the held-row set — not this predicate — is the real outer bound; `where` is a\n * row-local refinement of it, and a wider refinement can never mark a held footprint row\n * non-writable that the full predicate would have allowed. (An OR with any non-row-local\n * disjunct is dropped WHOLE — keeping only some disjuncts would narrow, which is not sound.)\n *\n * `footprintWhere` (H-iii — the lease-wire flip): the EXACT footprint-membership predicate,\n * identical to {@link RoomScopeSpec.footprintWhere} (ONE compiler feeds both wires — the lease's\n * table specs and the boot wire's scopes are now the SAME objects). The client's §3 router\n * consumes it for the pk-membership read proof; it is advisory routing metadata, never a\n * credential (the room gate re-proves engine-side, H-iv).\n */\nexport type RoomTableSpec = {\n    table: string;\n    footprintWhere?: Condition;\n    writable: {\n        kind: \"none\";\n    } | {\n        kind: \"predicate\";\n        where?: Condition;\n        joinKeyCols: string[];\n    };\n};"},{"name":"RoomScopeSpec","signature":"/**\n * One footprint table's FULL scope spec (slice H-iv-b): byte-compatible with\n * `rindle-room-core`'s `TableScopeSpec` (scope.rs), the wasm room's `enableWritesV2` input. It\n * rides the boot wire (`RoomBootResponse.scopes`); since slice H-iii the LEASE wire's\n * {@link RoomTableSpec} carries `footprintWhere` too (the client-side routing proof), so the two\n * shapes are now structurally IDENTICAL — kept as two names because they are two wires with two\n * consumers (the room gate vs the client router).\n *\n * `footprintWhere` is computed for EVERY footprint table — context (`kind: \"none\"`) ones\n * included, because the gate proves ABSENT READS on any readable table with it (§3.1: an absent\n * read is covered only when the footprint predicate is decidable from the pk columns alone and\n * evaluates true on the read key). ABSENT (no exact membership predicate exists) ⇒ no absent\n * read on that table is provable — the room gate fails closed to a deopt.\n *\n * **`footprintWhere` is EXACT-only — the opposite discipline from the writable `where`.** The\n * writable side ships the WIDENING extraction ({@link tablePredicate}) and that is sound (the\n * held-row set is the real outer bound). The absent-read proof points the other way: it uses\n * `footprintWhere` to conclude \"a row with this pk would have been IN the footprint, so the\n * room's absence is truth's absence\" — a WIDENED predicate over-claims exactly there (a root\n * `where` mixing pk-column conjuncts with a dropped EXISTS, or a correlated child whose own\n * `where` reads only its pk, would prove an absence the dropped part can contradict). So\n * `footprintWhere` is emitted ONLY when the membership predicate is exact\n * ({@link exactMembershipPredicate}): every node reading the table is the footprint ROOT (a\n * child node's implicit correlation to its parent is itself a dropped, non-row-local constraint)\n * and the root's `where` extraction dropped nothing. An unconstrained exact root (the whole\n * table rides the footprint) emits the vacuous-true `{type:\"and\",conditions:[]}` — the gate's\n * combinator pins empty-AND = true — so whole-table footprints keep provable absent reads.\n * Child/correlated tables get NO `footprintWhere` and their absent reads deopt (fail closed);\n * propagating a parent constraint through a pk-covering correlation is a future refinement.\n */\nexport type RoomScopeSpec = {\n    table: string;\n    footprintWhere?: Condition;\n    writable: RoomTableSpec[\"writable\"];\n};"},{"name":"compileRoomScopeSpecs","signature":"/** Compile the per-table {@link RoomScopeSpec}s from a RESOLVED footprint AST + the profile's\n *  context set — the ONE compiler both wires derive from (the boot wire ships it whole; the\n *  lease wire serializes the {@link RoomTableSpec} projection via {@link compileRoomTableSpecs}).\n *  Deterministic output order (tables sorted by name). */\nexport declare function compileRoomScopeSpecs(footprint: Ast, context: ReadonlySet<string>): RoomScopeSpec[];"},{"name":"compileRoomTableSpecs","signature":"/** Compile the per-table {@link RoomTableSpec}s from a RESOLVED footprint AST + the profile's\n *  context set — since H-iii the lease wire carries `footprintWhere` exactly where the boot wire\n *  does, so this IS {@link compileRoomScopeSpecs} (one compiler, two wires; the identity is\n *  pinned by serve-proof.test.ts). Kept as a named entry point for the lease call site. */\nexport declare function compileRoomTableSpecs(footprint: Ast, context: ReadonlySet<string>): RoomTableSpec[];"},{"name":"PROBE_DOC_KEY","signature":"/** The symbolic doc key construction-time validation resolves each footprint with. A profile\n *  footprint should be a TOTAL builder over any key; one that throws on this key (or is async /\n *  ctx-dependent) simply defers its unwindowed check to boot, with a loud warning. */\nexport declare const PROBE_DOC_KEY = \"__rindle-room-profile-probe__\";"},{"name":"CompileRoomProfilesInput","signature":"export interface CompileRoomProfilesInput<User> {\n    rooms: Record<string, RoomProfile<User>> | undefined;\n    /** The typed schema, when configured — enables the context-table existence check. */\n    schema: Schema | undefined;\n    /** Loud-diagnostics sink (defaults to `console.warn`); injectable for tests. */\n    warn?: (message: string) => void;\n}"},{"name":"compileRoomProfiles","signature":"/**\n * Compile + validate the named room profiles — §2.3 \"loud at registration\". Rules enforced here:\n * the profile name is wire-key-safe (no `/`); (b) the footprint is UNWINDOWED (throw, with the\n * offending AST path); (c) context tables exist in the schema and are a subset of the footprint's\n * tables (throw); (d) per-table join-key columns are derived and RECORDED on the compiled profile\n * (a loud WARNING when the footprint isn't statically resolvable and they can't be).\n */\nexport declare function compileRoomProfiles<User>(input: CompileRoomProfilesInput<User>): Map<string, CompiledRoomProfile<User>>;"},{"name":"queryRealtimeLabel","signature":"/** The realtime label a registered query carries (stamped by `registerQueries` from its\n *  `defineQuery` options), or `undefined` for an unlabeled query. The lease path uses this to\n *  derive `(room profile, args mapping)` for a named query. */\nexport declare function queryRealtimeLabel(query: ApiQuery<any, any> | undefined): RealtimeQueryLabel | undefined;"},{"name":"assertLabeledProfilesExist","signature":"/** Rule (a) of the §2.3 \"loud at registration\" checks: every labeled registered query must name\n *  an existing room profile — a label pointing at nothing is config drift that would otherwise\n *  surface as a query that silently never room-serves. */\nexport declare function assertLabeledProfilesExist<User>(queries: Record<string, ApiQuery<User, any>> | undefined, profiles: ReadonlyMap<string, CompiledRoomProfile<User>>): void;"}]},{"source":"packages/api-server/src/streams.ts","declarations":[{"name":"StreamCommitInput","signature":"/** What a checkpoint hands the durable plane when the app supplies its own {@link StreamCommit}. */\nexport type StreamCommitInput = \n/** The pointer is marked live. The app's own mutator created the row (it owns `chatId`, `role`,\n *  the model name…); this only flips it to `streaming`. */\n{\n    kind: \"open\";\n    streamId: string;\n    meta: unknown;\n    hostId?: string;\n    startedAt: number;\n}\n/** A prefix advance carrying ONLY its own slice. `text.length === seq - from`, and `from` is the\n *  last append the PLANE saw confirmed — so appends are contiguous in the fault-free run, but an\n *  append that committed while its ack was lost makes the next one RE-COVER (its `from` lags what\n *  the app already applied). See {@link StreamCommit} for the two ways to stay idempotent. */\n | {\n    kind: \"append\";\n    streamId: string;\n    from: number;\n    seq: number;\n    text: string;\n}\n/** The seal. `body` is the producer's retained text and `bodyFrom` its absolute start offset:\n *  `bodyFrom === 0` — and `body` is the WHOLE response — unless the app opted into trimming via\n *  `retainChars` (`commit` mode only). A compacting app requires `bodyFrom === 0` and writes\n *  `body` wholesale; a non-compacting app appends the outstanding tail —\n *  `body.slice(from - bodyFrom)` — as a final chunk. `seq === bodyFrom + body.length`, always. */\n | {\n    kind: \"close\";\n    streamId: string;\n    from: number;\n    seq: number;\n    body: string;\n    bodyFrom: number;\n    status: StreamStatus;\n    error?: string;\n};"},{"name":"StreamCommit","signature":"/** The escape hatch: persist the checkpoint however the app likes. Retried on throw (§3.3), so it\n *  must be idempotent under a repeated `(from, seq)` — AND under a RE-COVER: an append whose write\n *  committed but whose ack was lost leaves the plane believing less than the store holds, so the\n *  next append's `(from, seq)` can OVERLAP text already applied. Apply only the unseen suffix\n *  (`text.slice(applied - from)` when `applied > from`), or better, return `{seq: applied}` — the\n *  authoritative applied length — and the plane resynchronizes instead of re-covering at all.\n *  Return `{cancelRequested: true}` to tell the producer the reader asked it to stop (§6). */\nexport type StreamCommit = (input: StreamCommitInput) => Promise<void | {\n    cancelRequested?: boolean;\n    seq?: number;\n}>;"},{"name":"StreamColumns","signature":"/** Which columns of the app's own tables the plane reads and writes. Every entry has a default\n *  except `cancel`, `error`, and `host`, which are opt-in BY NAMING: the plane never emits SQL\n *  against a column the app did not ask it to use. */\nexport interface StreamColumns {\n    /** The message row's primary key, matched against `streamId`. Default `id`. */\n    key?: string;\n    /** The compacted response text. Default `body`. */\n    body?: string;\n    /** {@link STREAM_STATUS_STREAMING} then a {@link StreamStatus}. Default `status`. */\n    status?: string;\n    /** Total durable length — `length(body) + Σ chunk lengths`. The CAS column (§3.2). Default `seq`. */\n    seq?: string;\n    /** Opt-in (§6): a truthy value here stops the generation at the next checkpoint. No default —\n     *  naming it is what turns cancellation on. */\n    cancel?: string;\n    /** Opt-in: where a failed generation's message is recorded. No default. */\n    error?: string;\n    /** Opt-in: where the open write records this producer's identity ({@link RindleStreamOptions.hostId}).\n     *  Naming it upgrades the row-level single-flight guard from check-then-act to a true\n     *  compare-and-swap — the open write turns conditional and a read-back names the winner (§5.1) —\n     *  and gives multi-instance subscribe routing a column to read (§4). No default. */\n    host?: string;\n    /** Chunk primary key; the plane writes the deterministic `\"<streamId>:<seq>\"`. Default `id`. */\n    chunkKey?: string;\n    /** Chunk → message reference. Default `streamId`. */\n    chunkStream?: string;\n    /** The chunk's END offset — the ordering key. Default `seq`. */\n    chunkSeq?: string;\n    /** The chunk's slice of the response. Default `text`. */\n    chunkText?: string;\n}"},{"name":"StreamTables","signature":"/**\n * The app's tables (§5). The app authors and migrates BOTH — the message row is unambiguously\n * app-owned (it has `chatId`, `role`, token counts) and the chunk row must be reachable from the\n * app's own query as a `related` subquery, which a Rindle system table would make awkward. The plane\n * only needs to be told where things live. Use {@link streamChunkTableDdl} for the chunk table's\n * migration.\n *\n * The message table carries WHATEVER ELSE the app wants; the plane's hard requirements are only:\n *\n * | mapped column | requirement | why |\n * | --- | --- | --- |\n * | `key`    | UNIQUE (normally the pk) | every checkpoint targets one row by it |\n * | `seq`    | integer, **NOT NULL DEFAULT 0** | the CAS column — nothing matches NULL (§3.2) |\n * | `body`   | text, empty at open | compaction overwrites it with the whole response |\n * | `status` | text accepting `streaming`/`complete`/`cancelled`/`error`/`interrupted` | a CHECK\n *              constraint that omits one of these turns a seal into an infra failure |\n * | `cancel` | truthy-readable, if mapped | read on the checkpoint round-trip (§6) |\n * | `error`  | nullable text, if mapped | compaction writes `NULL` when there is no error |\n * | `host`   | text, if mapped | written at open with the producer's token; the read-back decides the open race (§5.1) |\n *\n * `body` is PLANE-OWNED and always a bare string. Rich content (an array of content blocks, tool\n * calls, attachments) belongs in SIBLING columns the app's own mutators write — `flush()` orders the\n * text before them. For genuinely multi-block streaming, point `message` at a per-BLOCK table\n * instead: `streamId` is just an app key, so one stream per block needs nothing from this plane.\n */\nexport interface StreamTables {\n    /** The app's message table. Must already contain the row when {@link StreamPlane.open} runs. */\n    message: string;\n    /** The append-only chunk table. */\n    chunks: string;\n    columns?: StreamColumns;\n}"},{"name":"StreamCheckpointTarget","signature":"export type StreamCheckpointTarget = {\n    tables: StreamTables;\n} | {\n    commit: StreamCommit;\n};"},{"name":"StreamCheckpointPolicy","signature":"/** When a checkpoint fires — the FIRST of these wins (§3.1). Checkpoints are serialized, so a slow\n *  store degrades to fewer, larger checkpoints, never to a queue of them. */\nexport interface StreamCheckpointPolicy {\n    /** Produced-but-uncommitted characters that force a checkpoint. Default 512. */\n    chars?: number;\n    /** Milliseconds since the last checkpoint that force one. Default 750. */\n    intervalMs?: number;\n    /** Retries for a failing commit before the slice is left for the next trigger. Default 3. */\n    retries?: number;\n}"},{"name":"AuthorizeStreamInput","signature":"export interface AuthorizeStreamInput<User> {\n    user: User;\n    streamId: string;\n    /** Where the subscriber claims to be. */\n    from: number;\n    /** The `meta` this stream was opened with — `undefined` when the stream is not hosted here, which\n     *  is precisely when the app must decide from `streamId` and its own durable state. */\n    meta: unknown;\n    request?: unknown;\n}"},{"name":"StreamRelay","signature":"/**\n * Optional cross-process transport for the LIVE plane\n * (designs-implemented/LM-STREAM-RELAY-DESIGN.md). Both methods are independently optional; which\n * ones you implement is which topology you built — an addressing adapter (a Durable Object named by\n * `streamId`, `fly-replay`) implements only `attach`; a broadcast adapter (Redis pub/sub, NATS)\n * mirrors with `publish` and subscribes with `attach`; a log adapter (Redis Streams, Kafka) appends\n * and replays. Never consulted for the durable plane — checkpoints are unaffected by any of this.\n *\n * The plane does not trust what `attach` yields: frames are run through the conform pass\n * ({@link StreamRelayConform}) and any contract violation downgrades the subscription to `stale`,\n * which already means \"you are on the durable plane now\". A broken relay costs a reader smooth\n * tokens, never corrupted text — and can never reach the producer.\n */\nexport interface StreamRelay {\n    /** Producer side: every frame this process's producer fans out (`chunk`, `durable`, and the\n     *  terminal `end`), mirrored outward. MUST NOT block; a throw or rejected promise is caught and\n     *  routed to {@link RindleStreamOptions.onRelayError} — a relay outage may cost the live leg,\n     *  never the generation. Returned promises are observed but never awaited. */\n    publish?(streamId: string, frame: StreamFrame): void | PromiseLike<void>;\n    /** Subscriber side: this process is not hosting `streamId`. Return a frame source, or `undefined`\n     *  for `absent` — exactly the no-relay answer. Consulted only AFTER `authorize` has passed, and\n     *  only on a live-plane miss (a local stream always wins). The plane closes the source\n     *  (`return()`) when the reader disconnects. An adapter that cannot serve `from` (pub/sub has no\n     *  history) yields `stale` and stops — the reader converges on the durable plane (§5). */\n    attach?(streamId: string, from: number): Promise<AsyncIterable<StreamFrame> | undefined>;\n}"},{"name":"StreamRelayErrorInfo","signature":"export interface StreamRelayErrorInfo {\n    streamId: string;\n    /** Where it failed: mirroring a frame out (`publish`), dialing the adapter (`attach`), or\n     *  consuming/conforming its frames (`frames`). */\n    phase: \"publish\" | \"attach\" | \"frames\";\n}"},{"name":"RindleStreamOptions","signature":"export interface RindleStreamOptions<User> {\n    /** Where checkpoints land: the app's tables (the default path) or a raw `commit` callback. */\n    checkpoint: StreamCheckpointTarget;\n    /** REQUIRED. Subscribing to a stream is reading someone's chat, so there is no default-allow.\n     *  Runs BEFORE existence is checked, so a denial cannot be used to probe for stream ids. */\n    authorize: Authorizer<AuthorizeStreamInput<User>>;\n    policy?: StreamCheckpointPolicy;\n    /** This process's identity — it must be UNIQUE per producer process, because the open CAS trusts\n     *  it to distinguish rivals (§5.1). In `tables` mode, map {@link StreamColumns.host} and the open\n     *  write persists it on the message row (so the app can route later subscribers to the hosting\n     *  instance, §4) and uses it as the single-flight token; setting it WITHOUT a mapped `host` column\n     *  is refused at construction. In `commit` mode it rides the `open` input. When a `host` column is\n     *  mapped and no hostId is given, a random per-plane token is used — the CAS still holds, routing\n     *  just has no stable name to read. */\n    hostId?: string;\n    /** Slack retained BELOW `durableSeq` so a client whose IVM view lags a checkpoint can still join\n     *  without a `stale` round trip. Text at or above `durableSeq` is never trimmed. Default 64 KiB.\n     *  `commit`-mode only — REFUSED (a construction-time `TypeError`) in `tables` mode, where\n     *  compaction needs the whole produced text at close (§3.4), so the buffer is retained in full. */\n    retainChars?: number;\n    /** How long a sealed stream stays joinable before eviction. Default 30s. */\n    lingerMs?: number;\n    /** Per-subscriber frame queue cap; overflow drops that subscriber with `stale` (§4). Default 1024.\n     *  Relayed readers reuse the same bound: a slow reader on a relayed stream costs itself the live\n     *  leg exactly as a local one does. */\n    maxQueuedFrames?: number;\n    /** A checkpoint that exhausted its retries. The stream keeps streaming — this is a durability\n     *  stall, not a stream stall — so the error must not vanish. Absent ⇒ `console.error`. */\n    onCheckpointError?: (err: unknown, info: {\n        streamId: string;\n        from: number;\n        seq: number;\n    }) => void;\n    /** Cross-process transport for the live plane ({@link StreamRelay}). Without one, a subscriber\n     *  that lands on a process not hosting its stream gets `absent` and reads the durable plane at\n     *  checkpoint granularity — correct, just chunky. */\n    relay?: StreamRelay;\n    /** Bound on `relay.attach`: a hung adapter yields `absent`, not a hung HTTP request. An\n     *  addressing adapter MAY deliberately spend this window waiting out a subscribe that races its\n     *  own kick. Default 2000. */\n    relayAttachTimeoutMs?: number;\n    /** A diagnostic, never a control path: relay failures (a throwing or rejecting `publish`, a failed\n     *  or timed-out `attach`, a conform violation in the frames) land here, wrapped so a throwing hook\n     *  cannot reach the plane. The reader-facing outcome is always the same legal `absent`/`stale`.\n     *  Absent ⇒ `console.error`. */\n    onRelayError?: (err: unknown, info: StreamRelayErrorInfo) => void;\n}"},{"name":"OpenStreamInput","signature":"export interface OpenStreamInput<User> {\n    user: User;\n    /** The app's message-row id: the durable pointer AND the live plane's key. The row must already\n     *  exist (the app's own mutator wrote it, alongside the user's prompt) with `seq = 0`. */\n    streamId: string;\n    /** Opaque app payload, passed through to a `commit` callback. Unused in `tables` mode. */\n    meta?: unknown;\n    request?: unknown;\n}"},{"name":"StreamHandle","signature":"/** The producer's handle (§2). One writer per stream, by construction. */\nexport interface StreamHandle {\n    readonly streamId: string;\n    /** Total produced code units. */\n    readonly seq: number;\n    /** Total code units the store has committed. Never exceeds {@link seq} (contract P). */\n    readonly durableSeq: number;\n    /** True once a checkpoint round-trip has seen the reader's cancel flag (§6). `pump` stops on it;\n     *  a hand-rolled generation loop should check it. */\n    readonly cancelled: boolean;\n    /** Append a delta: fanned to subscribers synchronously, checkpointed on policy. */\n    push(text: string): void;\n    /** Force a checkpoint and resolve once the store holds every character produced so far. This is\n     *  the ORDERING primitive: `await flush()` before writing a discrete row (a tool call, a stop\n     *  reason) so the text precedes it in the store (§1). Rejects if the checkpoint cannot commit. */\n    flush(): Promise<number>;\n    /** Drain a delta iterable into the stream (the shape every LLM SDK's text stream already has),\n     *  stopping early — and closing the iterator, which aborts the underlying request — once the\n     *  reader has cancelled. */\n    pump(deltas: AsyncIterable<string>): Promise<void>;\n    /** Seal the stream: `cancelled` if the reader asked it to stop, else `complete`. In `tables` mode\n     *  this is the compaction (§3.4) — it writes the whole body and drops the chunk rows in one\n     *  transaction, so it also REPAIRS any checkpoint that failed along the way. */\n    close(): Promise<void>;\n    /** Seal `error` at whatever was produced. Never throws for the reason it is sealing. */\n    fail(error: unknown): Promise<void>;\n}"},{"name":"SubscribeStreamInput","signature":"export interface SubscribeStreamInput<User> {\n    user: User;\n    streamId: string;\n    /** \"I already have this many characters\" — from the client's IVM view, or a `Last-Event-ID`.\n     *  A non-negative integer; default 0. */\n    from?: number;\n    request?: unknown;\n}"},{"name":"StreamSubscription","signature":"export interface StreamSubscription {\n    readonly streamId: string;\n    /** Terminates after exactly one of `end` / `stale` / `absent`. */\n    readonly frames: AsyncIterable<StreamFrame>;\n    /** Detach early (a disconnected client). Idempotent. */\n    close(): void;\n}"},{"name":"ResolvedStreamColumns","signature":"/** Every mapped column, defaults applied. `cancel`/`error` stay `undefined` unless named. */\nexport interface ResolvedStreamColumns {\n    key: string;\n    body: string;\n    status: string;\n    seq: string;\n    cancel?: string;\n    error?: string;\n    host?: string;\n    chunkKey: string;\n    chunkStream: string;\n    chunkSeq: string;\n    chunkText: string;\n}"},{"name":"resolveStreamColumns","signature":"export declare function resolveStreamColumns(columns: StreamColumns | undefined): ResolvedStreamColumns;"},{"name":"streamChunkId","signature":"/** The chunk row's deterministic id: a replayed checkpoint collides with itself and is absorbed by\n *  `ON CONFLICT DO NOTHING` — idempotency without an envelope or a dedup ledger (§3.3). */\nexport declare function streamChunkId(streamId: string, seq: number): string;"},{"name":"streamChunkTableDdl","signature":"/**\n * The chunk table's DDL, for the app's migration. The app owns the message table (this only states\n * the three columns the plane needs on it); the chunk table is entirely protocol-shaped, so it is\n * generated rather than hand-written.\n */\nexport declare function streamChunkTableDdl(tables: StreamTables, dialect: SqlDialect): string[];"},{"name":"StreamRelayConform","signature":"/**\n * One frame source arriving over a relay, conformed to the CP §4 contract\n * (designs-implemented/LM-STREAM-RELAY-DESIGN.md §4).\n *\n * An adapter is app code talking to Redis or a socket, and its frames feed `spliceStreamText` on a\n * browser — so the plane does not trust them. This pass enforces the frame invariants against the\n * prefix actually delivered and downgrades EVERY violation to a legal `stale` and nothing else:\n * `stale` already means \"you are on the durable plane now, the store is the whole truth\", so a\n * broken relay costs a reader smooth tokens, never corrupted text — and cannot wedge a producer.\n *\n * Replayed spans (a reconnecting adapter re-delivering what it already sent) are ABSORBED rather\n * than punished — deduping against the delivered prefix is what makes reconnect-replay safe without\n * every adapter hand-rolling it. Spans that overlap the prefix but extend past it pass through\n * whole: the client splices at the frame's own offset, so an exact overlap re-covers and appends.\n *\n * Pure state, no I/O, no plane: `feed` maps one incoming frame to 0-2 outgoing frames (a missing\n * `open` is synthesized at the join offset); `end`/`fail` close out a source that finished or threw\n * without a terminal. After a terminal, every method returns `[]`.\n */\nexport declare class StreamRelayConform {\n    private readonly streamId;\n    /** The requested join offset — the synthesized `open`'s position, and where the prefix starts. */\n    private readonly from;\n    private readonly onViolation;\n    /** End of the delivered prefix. */\n    private pos;\n    private lastDurable;\n    private opened;\n    private done;\n    constructor(streamId: string, from: number, onViolation?: (reason: string) => void);\n    feed(frame: StreamFrame): StreamFrame[];\n    /** The source completed without a terminal (a truncated relay): the reader falls back. */\n    end(): StreamFrame[];\n    /** The source threw mid-iteration, or the plane is dropping a reader that stopped draining:\n     *  a bare `stale` at the delivered position. */\n    fail(): StreamFrame[];\n    /** A synthesized join, for an adapter that (correctly, in broadcast mode) never mirrors the\n     *  per-subscriber `open`: positioned at the requested offset, which the reader asked from because\n     *  its durable view already holds it. */\n    private synthOpen;\n    private terminate;\n    private violate;\n}"},{"name":"StreamSqlSink","signature":"/** What the plane needs from the api-server to write a checkpoint: the backend's OUTSIDE-transaction\n *  SQL surface (`batch` is one transaction on every backend) and its dialect. Deliberately narrow so\n *  `streams.ts` never imports the server (no cycle). */\nexport interface StreamSqlSink {\n    readonly dialect: SqlDialect;\n    readonly sql: ServerSql;\n}"},{"name":"StreamPlane","signature":"export declare class StreamPlane<User> {\n    readonly chars: number;\n    readonly intervalMs: number;\n    readonly retries: number;\n    readonly retainChars: number;\n    readonly lingerMs: number;\n    readonly maxQueuedFrames: number;\n    readonly relayAttachTimeoutMs: number;\n    private readonly live;\n    /** Live relayed subscriptions, so teardown ({@link closeSync}) releases their drivers too. */\n    private readonly relayed;\n    private readonly opts;\n    private readonly sink;\n    private readonly mapped;\n    private readonly tables;\n    /** The open CAS token (§5.1): `hostId`, or a random per-plane stand-in when only the CAS — not\n     *  routing — needs it. */\n    private readonly openToken;\n    constructor(opts: RindleStreamOptions<User>, sink?: StreamSqlSink);\n    /** Open a stream on an EXISTING message row (§5): the app's own mutator wrote it, alongside the\n     *  user's prompt, so the pointer is already durable and every client's query already shows the\n     *  message. This verifies it and flips it to `streaming`. */\n    open(input: OpenStreamInput<User>): Promise<StreamHandle>;\n    /**\n     * The read-only precondition on the app's message row, checked ONCE per `open` (§5.1). Read-only on\n     * purpose: it is a decision about the app's data, so re-deciding it per write attempt would let a\n     * lost ack turn a success into a refusal.\n     *\n     * The `streaming` check is the **single-flight guard**, and it lives at the ROW rather than in this\n     * process's map because the thing it defends against is distributed: the kick that starts a\n     * generation is an at-least-once effect (a retried mutation envelope re-runs its post-commit code,\n     * §10.5), so a second kick can land on another instance, where the in-memory map is empty. Two\n     * producers on one `streamId` would interleave: both CAS the same length, one stalls, and whichever\n     * closes last overwrites the body with ITS buffer. Cheap to refuse; expensive to debug.\n     *\n     * This probe alone is check-then-act — it and the open write are separate round trips, so two\n     * SIMULTANEOUS kicks can both pass it. Mapping a `host` column closes that window: the open write\n     * turns conditional and {@link verifyOpenWinner}'s read-back names the winner.\n     */\n    private assertOpenable;\n    subscribe(input: SubscribeStreamInput<User>): Promise<StreamSubscription>;\n    /** The subscribe-miss leg (LM-STREAM-RELAY §3): ask the app's relay for the frames of a stream\n     *  this process is not hosting. `undefined` — no relay, no `attach`, the adapter declined, timed\n     *  out, or threw — is `absent`, exactly today's answer. */\n    private attachRelay;\n    /** `attach`, bounded by {@link RindleStreamOptions.relayAttachTimeoutMs}: a hung adapter yields\n     *  `absent`, not a hung HTTP request. A source that resolves after the deadline is closed, not\n     *  leaked. */\n    private boundedAttach;\n    /** Wrap an adapter's frame source as a plane subscription: conform every frame (LM-STREAM-RELAY\n     *  §4), bound the reader with the same queue cap as a local one (§7), and tear the adapter down\n     *  when either side lets go. The driver never throws into the plane: adapter failures become one\n     *  `stale`. */\n    private relaySubscription;\n    /** Mirror one producer frame outward (LM-STREAM-RELAY §3). Never blocks or breaks the producer:\n     *  a throw or rejected promise is reported and swallowed — a relay outage may cost relayed\n     *  readers the live leg, never the generation or its checkpoints. */\n    publishRelay(streamId: string, frame: StreamFrame): void;\n    reportRelayError(err: unknown, info: StreamRelayErrorInfo): void;\n    /** Seal every live stream `interrupted`. In mapped-table mode the seal IS the compaction, so a\n     *  graceful drain loses nothing PRODUCED; the status still says the response was cut short rather\n     *  than claiming completion (§5). Wire it to SIGTERM. */\n    drainStreams(): Promise<void>;\n    /** Teardown: drop readers and timers WITHOUT a durable write (that is `drainStreams`). */\n    closeSync(): void;\n    /** A sealed stream stays joinable for the linger window, so a subscribe that races the last token\n     *  still gets `end` (and the tail it missed) rather than a bare `absent`. */\n    retire(streamId: string): void;\n    reportCheckpointError(err: unknown, info: {\n        streamId: string;\n        from: number;\n        seq: number;\n    }): void;\n    /** Drive ONE checkpoint, retrying on failure. Every statement it emits is idempotent under replay\n     *  — the chunk insert dedups on its deterministic id, the length CAS refuses to apply twice, the\n     *  compaction is a whole-row overwrite — so \"retry until it sticks\" needs no dedup ledger and no\n     *  `lmid` (§3.3). */\n    commit(input: StreamCommitInput): Promise<{\n        cancelRequested?: boolean;\n        seq?: number;\n    } | void>;\n    private commitOnce;\n    /** The read-back half of the open CAS, run only when a `host` column is mapped. The probe in\n     *  `assertOpenable` and the open write are separate round trips, so bare check-then-act leaves a\n     *  window where two simultaneous kicks both pass the probe; the conditional `markStreaming`\n     *  matches nothing when a rival got there first, and whichever token the row now holds names the\n     *  winner — a true CAS with no row counts needed. A replayed open (lost ack) reads back its OWN\n     *  token and proceeds. */\n    private verifyOpenWinner;\n    /** The post-append read-back (§3.2): the row's authoritative length — which both CONFIRMS an\n     *  append (the guarded batch reports no row count) and absorbs a committed-but-ack-lost one —\n     *  plus the reader's cancel flag when mapped (§6), riding the same indexed point read. This read\n     *  is LOAD-BEARING: a failure here fails the append attempt (retried, then stalled), because\n     *  claiming durability the store did not confirm is the one dishonesty this plane refuses. */\n    private readAppendState;\n    /** The store's word on how much is durable — for resynchronizing after a FAILED append, where a\n     *  lost ack may have left the store ahead of the plane. `undefined` in `commit` mode (no readable\n     *  authority) or when the read itself fails (the next attempt retries the resync too). */\n    probeDurableSeq(streamId: string): Promise<number | undefined>;\n}"},{"name":"StreamOpenRefused","signature":"/** The open probe's verdict: the message row is missing or already advanced. Not retried — it is a\n *  settled statement about the app's data, and retrying re-asks a question already answered. */\nexport declare class StreamOpenRefused extends Error {\n    constructor(message: string);\n}"},{"name":"StreamForbidden","signature":"/** Refused by {@link RindleStreamOptions.authorize}. Distinct from the api-server's own\n *  `RindleApiError` so this module stays importable without the server (no cycle); the server\n *  translates it to a 403 at the handler seam. */\nexport declare class StreamForbidden extends Error {\n    readonly streamId: string;\n    constructor(streamId: string);\n}"},{"name":"STREAM_SSE_HEADERS","signature":"/** Headers for the SSE response. `x-accel-buffering` is the nginx-family opt-out — without it a\n *  buffering proxy holds the tokens and hands the user a paragraph at a time. */\nexport declare const STREAM_SSE_HEADERS: Record<string, string>;"},{"name":"streamRequestFromHttp","signature":"/** Pull a subscribe request out of a fetch-style GET: `?streamId=…&from=…`, with `Last-Event-ID`\n *  winning over an explicit `from` (a reconnecting `EventSource` knows better than its own URL —\n *  the URL is the ORIGINAL join point, the header is where it actually got to). */\nexport declare function streamRequestFromHttp(req: {\n    url: string;\n    headers: {\n        get(name: string): string | null;\n    };\n}): {\n    streamId: string;\n    from: number;\n};"},{"name":"streamFramesToSse","signature":"/**\n * Encode a subscription as an SSE body. Each positional frame carries `id: <seq>`, so a browser\n * `EventSource` that drops the connection resumes at exactly the right offset with no application\n * code — its own `Last-Event-ID` header is the `from` of the next subscribe ({@link\n * streamRequestFromHttp}).\n *\n * The reader must close the `EventSource` on the `end` frame: `EventSource` reconnects on ANY close,\n * including a clean one.\n */\nexport declare function streamFramesToSse(sub: StreamSubscription, opts?: {\n    keepAliveMs?: number;\n}): ReadableStream<Uint8Array>;"}]},{"source":"packages/room/src/token.ts","declarations":[{"name":"RoomTokenPayload","signature":"/**\n * The room's **self-authorizing signed lease token** (RINDLE-REALTIME-DESIGN.md §10.1).\n *\n * The API server is the authority (§4): it authenticates the user, resolves the named\n * query to an approved AST, and signs this token. The token then IS the lease — the\n * room materializes on first presentation, so no pre-placement `/materialize` control\n * call ever touches it (the §10.1 inversion; on the DO shell the Worker verifies the\n * same signature statelessly before `get(id)`).\n *\n * Shape: `rt1.<base64url(payload)>.<base64url(hmac-sha256(prefix.payload))>` with\n * payload `{ v: 1, doc, ast, sub, iat, exp, kid }`:\n *\n * - `doc` — the room/document id the token authorizes (a token for one room presented\n *   to another is refused);\n * - `ast` — the approved wire `Ast` (the client never composes this; §4's \"ASTs never\n *   cross the public wire\" holds because the token is opaque TO THE CLIENT — it carries\n *   it, it cannot mint or alter it);\n * - `sub` — the subject (user id): the revocation key (§4.1);\n * - `iat`/`exp` — issued-at / expiry, ms epoch. Renewal is re-authorization: clients\n *   obtain a fresh token through the API server, never extend this one. `iat` is what\n *   lets a revocation refuse pre-revocation tokens while a genuine re-grant (a newer\n *   token) passes immediately;\n * - `kid` — which shared secret signed it (rotation).\n *\n * HMAC via WebCrypto (`crypto.subtle`) so the exact same code verifies in Node (the\n * test shell) and in a Cloudflare Worker/DO (P4) — no `node:crypto` import.\n */\nexport interface RoomTokenPayload {\n    v: 1;\n    doc: string;\n    ast: unknown;\n    sub: string;\n    iat: number;\n    exp: number;\n    kid: string;\n    /** A short fingerprint of the room's compiled scope specs at mint time\n     *  ({@link scopeSpecsHash}). Advisory, not a credential: the room's §3.3 gate is the\n     *  contract regardless. It lets the shell detect SCOPE SKEW — a room profile edited\n     *  while a room is already live arms the gate with the OLD specs (a one-shot at boot)\n     *  while fresh leases prove against the NEW ones, so every routed write silently\n     *  deopt-loops. Optional so a pre-stamp api-server / older token still verifies. */\n    scopesHash?: string;\n}"},{"name":"MintRoomTokenOptions","signature":"export interface MintRoomTokenOptions {\n    doc: string;\n    ast: unknown;\n    /** The subject (user id) this token authorizes — the §4.1 revocation key. */\n    sub: string;\n    /** Key id + its secret (utf-8; give every room the same `keys` map). */\n    kid: string;\n    key: string;\n    /** Expiry, ms from `now`. Keep short (minutes) — the §4.1 TTL backstop. */\n    ttlMs: number;\n    /** Mint time; defaults to `Date.now()`. Injectable for tests. */\n    now?: number;\n    /** The room's {@link scopeSpecsHash} for the profile this lease serves — stamped so the\n     *  shell can flag scope skew (see {@link RoomTokenPayload.scopesHash}). Omit to not stamp. */\n    scopesHash?: string;\n}"},{"name":"scopeSpecsHash","signature":"/** A stable short fingerprint of the compiled scope specs — the scope-skew tripwire.\n *  NOT security (the gate re-proves every write): FNV-1a-32 over the {@link canonicalJson}\n *  form, 8 hex chars. Both the api-server (stamping the lease token) and the room shell\n *  (hashing the boot-wire scopes it armed the gate with) run this over the SAME compiler\n *  output, so an unchanged profile ⇒ equal hash and a profile edited under a live room ⇒\n *  mismatch. A collision only costs a missed diagnostic, never correctness. Accepts either\n *  wire's spec array (`RoomScopeSpec[]` / `RoomTableSpec[]` — structurally identical). */\nexport declare function scopeSpecsHash(specs: readonly unknown[]): string;"},{"name":"mintRoomToken","signature":"/** Sign a room lease token. This runs on the API-server side (or a test playing it). */\nexport declare function mintRoomToken(opts: MintRoomTokenOptions): Promise<string>;"},{"name":"RoomTokenError","signature":"/** Why a token was refused. The `reason` is terse and safe to echo in a queryError. */\nexport declare class RoomTokenError extends Error {\n    readonly reason: string;\n    constructor(reason: string);\n}"},{"name":"VerifyRoomTokenOptions","signature":"export interface VerifyRoomTokenOptions {\n    /** The room's own doc id — a token for any other doc is refused. */\n    doc: string;\n    /** kid → shared secret. Unknown kids are refused (never \"try them all\"). */\n    keys: Record<string, string>;\n    /** Verification time; defaults to `Date.now()`. Injectable for tests. */\n    now?: number;\n}"},{"name":"verifyRoomToken","signature":"/**\n * Verify a token's signature and claims; returns the payload (with the approved AST)\n * or throws {@link RoomTokenError}. Signature is checked FIRST — no claim is trusted\n * (not even `kid`'s existence beyond the key lookup) before the MAC passes.\n */\nexport declare function verifyRoomToken(token: string, opts: VerifyRoomTokenOptions): Promise<RoomTokenPayload>;"}]},{"source":"packages/api-server/src/index.ts","declarations":[{"name":"DEFAULT_RINDLE_API_ROUTES","signature":"export declare const DEFAULT_RINDLE_API_ROUTES: {\n    readonly query: \"/api/rindle/query\";\n    readonly read: \"/api/rindle/read\";\n    readonly mutate: \"/api/rindle/mutate\";\n    readonly applyRowChangeTxn: \"/api/rindle/apply-row-change-txn\";\n    readonly claimRoomEpoch: \"/api/rindle/claim-room-epoch\";\n    readonly roomLmids: \"/api/rindle/room-lmids\";\n    readonly roomBoot: \"/api/rindle/room-boot\";\n    readonly stream: \"/api/rindle/stream\";\n};"},{"name":"MaybePromise","signature":"export type MaybePromise<T> = T | PromiseLike<T>;"},{"name":"ApiContext","signature":"/** Request context supplied by the application after authentication. The HTTP adapter or trusted\n *  caller owns `user`; do not populate it from an unverified request body. */\nexport interface ApiContext<User> {\n    user: User;\n    request?: unknown;\n}"},{"name":"ApiQueryResult","signature":"export type ApiQueryResult = Ast | Query<any, any, any>;"},{"name":"ApiQuery","signature":"export type ApiQuery<User, Args> = (ctx: ApiContext<User>, args: Args) => MaybePromise<ApiQueryResult>;"},{"name":"ApiQueries","signature":"export type ApiQueries<User> = Record<string, ApiQuery<User, any>>;"},{"name":"RunQueryInput","signature":"export interface RunQueryInput<User> {\n    user: User;\n    name: string;\n    args: unknown;\n    query: ApiQuery<User, any>;\n    context: ApiContext<User>;\n}"},{"name":"RunQuery","signature":"export type RunQuery<User> = (input: RunQueryInput<User>) => MaybePromise<ApiQueryResult>;"},{"name":"AuthorizeQueryInput","signature":"export interface AuthorizeQueryInput<User> {\n    user: User;\n    name: string;\n    args: unknown;\n    context: ApiContext<User>;\n}"},{"name":"AuthorizeMutationInput","signature":"export interface AuthorizeMutationInput<User> {\n    user: User;\n    envelope: MutationEnvelope;\n    context: ApiContext<User>;\n}"},{"name":"Authorizer","signature":"/** An optional request gate. Return `false` or throw to deny; `true` and `undefined` allow.\n *  This gate does not add row predicates or replace access checks inside a mutator. */\nexport type Authorizer<T> = (input: T) => MaybePromise<boolean | void>;"},{"name":"MutationContext","signature":"export interface MutationContext<User> {\n    user: User;\n    envelope: MutationEnvelope;\n    daemon: RindleDaemonClient;\n    request?: unknown;\n}"},{"name":"ServerSql","signature":"/** A deliberately narrow raw-SQL facade exposed by the API server. On {@link ServerMutationTx}\n *  it is bound to the open mutation transaction; on {@link MutationScope} each call runs in its\n *  own transaction outside the mutation boundary. Column aliases should be unique: positional\n *  driver rows are keyed by column name, so a duplicate alias is represented by its last value. */\nexport interface ServerSql {\n    /** Queue/execute one statement. A transaction-bound call commits with the surrounding mutation. */\n    execute(sql: string, params?: readonly WireValue[]): Promise<void>;\n    /** Queue/execute an ordered statement batch. An empty batch is a no-op. On an\n     *  outside-transaction surface ({@link MutationScope.sql}, `backend.outsideSql`) the batch MUST\n     *  execute as ONE atomic transaction — all statements or none. Every built-in backend does (the\n     *  daemon's `execute-sql-txn`, the sql-client's `/v1/sql/batch`, the Postgres plugger's\n     *  BEGIN/COMMIT); a custom backend that loops statements without a transaction silently breaks\n     *  the stream plane's chunk+CAS and compaction invariants, which ride single `batch` calls. */\n    batch(statements: readonly SqlStatement[]): Promise<void>;\n    /** Run a read and return rows keyed by their column names. */\n    query<Row = Record<string, unknown>>(sql: string, params?: readonly WireValue[]): Promise<Row[]>;\n}"},{"name":"SqlMutationTx","signature":"/** The raw-SQL escape hatch for relational/authority statements a keyed op can't express — an\n *  owner-gated cascade, a `NOT EXISTS` dedup. Prefer `tx.sql`; `exec` remains the synchronous\n *  compatibility shorthand for a queued `tx.sql.execute`, and `statements` is the raw write list. */\nexport interface SqlMutationTx {\n    readonly sql: ServerSql;\n    exec(sql: string, params?: WireValue[]): void;\n    readonly statements: readonly SqlStatement[];\n}"},{"name":"ServerMutationTx","signature":"/** The write handle a server mutator runs against — the ASYNC twin of the client's `MutationTx`. It\n *  is both the isomorphic {@link ServerWriteTx} logical surface (insert/update/upsert/insertIgnore/\n *  delete/row, rendered to dialect SQL) AND the legacy {@link SqlMutationTx} raw escape hatch. Both\n *  implementations run reads through the OPEN transaction (read-your-writes): Postgres executes\n *  everything live; the SQL-client and daemon adapters accumulate writes and lazily upgrade to an\n *  interactive mutation session at the first read (DAEMON-INTERACTIVE-TXN-DESIGN.md §5). */\nexport interface ServerMutationTx extends ServerWriteTx, SqlMutationTx {\n    /** Run a full query (a fluent `Query` or its wire `Ast`) INSIDE the open transaction —\n     *  read-your-writes, like {@link ServerWriteTx.row} but for arbitrary shapes. Returns the\n     *  parsed nested result tree: an array for a plural root, an object or `null` for a `.one()`\n     *  root, with cells in their raw SQLite storage-class representations (the same vocabulary\n     *  `row` speaks). Remote SQLite backends: compiled by `@rindle/query-compiler`'s sqlite dialect\n     *  (bind params, NO casts — §5.4) and executed through the mutation session. Postgres: lands with\n     *  the read-compiler catalog integration (POSTGRES-READ-COMPILER-DESIGN.md Phase B). */\n    query(q: Ast | Query<any, any, any>): Promise<unknown>;\n}"},{"name":"ApiMutatorResult","signature":"export type ApiMutatorResult = void | SqlStatement[] | SqlTxn;"},{"name":"ApiMutator","signature":"/** A server mutator: a plain async function against the live {@link ServerMutationTx}. Two ways to\n *  write one (MUTATORS-ISOMORPHIC): drive it directly (the raw escape hatch — an owner-gated cascade,\n *  a `NOT EXISTS` dedup — plus a returned `SqlStatement[]`/`SqlTxn`), OR delegate to a SHARED generator\n *  (the SAME body the client predicts) via {@link runSharedMutation}, keeping only the server-only\n *  authority (arg parse, principal, policy) in the wrapper. */\nexport type ApiMutator<User, Args> = (tx: ServerMutationTx, args: Args, ctx: MutationContext<User>) => MaybePromise<ApiMutatorResult>;"},{"name":"MutationRejected","signature":"/** Thrown by {@link MutationScope.transact} when the transacted body BUSINESS-rejects: the data\n *  rolled back and `lmid` advanced alone (§2.4). Catch it to COMPENSATE an outside-tx side effect\n *  (refund the charge), then rethrow or return — the mutation's protocol outcome is already sealed\n *  as rejected, so a post-reject throw can't change it. A DB/infra failure is NOT this — it\n *  propagates as the raw driver error (the client retries; `lmid` did not advance). */\nexport declare class MutationRejected extends Error {\n    readonly reason: string;\n    constructor(reason: string);\n}"},{"name":"MutationScope","signature":"/** The per-mutation server handle a {@link ScopedMutator} runs against. Code before {@link transact}\n *  runs OUTSIDE the transaction; code after a clean `transact` runs AFTER the commit. The\n *  `lmid`-always-advances invariant is the HARNESS's, not the author's: {@link RindleApiServer.pushMutation}\n *  seals the response from this handle's recorded outcome, so an early return, a never-called\n *  `transact`, or a swallowed {@link MutationRejected} still advances `lmid` and never wedges the\n *  client's pending queue. */\nexport interface MutationScope {\n    /** Raw SQL OUTSIDE the mutation transaction. Every call commits independently and therefore may\n     *  be observed even if {@link transact} later rejects or fails. Calls may also repeat when an\n     *  envelope is retried, so outside writes need their own idempotency key/unique constraint. */\n    readonly sql: ServerSql;\n    /** Open the ONE atomic write transaction and drive `body` inside it, committing (stamping `lmid`\n     *  co-transactionally) on a clean return. MAY be called at most once — a second call throws.\n     *\n     *  Two forms:\n     *   - `transact(sharedMutator, args, ctx)` — drive a SHARED (generator) mutator (the same body the\n     *     client predicts); pass the already-parsed `args` and the server `ctx` (fold server-only\n     *     values like a charge id into `ctx` here).\n     *   - `transact(run)` — a raw callback receiving the live {@link ServerMutationTx} (the escape\n     *     hatch: `tx.exec`, logical writes, read-your-writes reads).\n     *\n     *  A THROW from the body that is not a {@link BackendError} is a BUSINESS rejection: the data rolls\n     *  back, `lmid` advances alone, and this method throws {@link MutationRejected} (so surrounding\n     *  code can compensate). A {@link BackendError} is INFRA: it propagates (the client retries).\n     *\n     *  **The callback form RETURNS ITS BODY'S VALUE**, and only on the committed path — a rejection\n     *  throws, so there is never a value to act on for a transaction that rolled back. That is what\n     *  lets a post-commit effect be decided by a TRANSACTIONAL read instead of a second, racy one\n     *  afterwards:\n     *\n     *  ```ts\n     *  const kick = await scope.transact(async (tx) => {\n     *    const prior = await tx.row(\"message\", { id: a.assistantMessageId });\n     *    if (prior) return undefined;                 // a replayed envelope — do NOT re-fire the effect\n     *    tx.insert(\"message\", …);\n     *    return { streamId: a.assistantMessageId, history: await readHistory(tx, a.chatId) };\n     *  });\n     *  if (kick) void startGeneration(kick);          // committed, and decided against committed state\n     *  ```\n     *\n     *  A tx-form mutator cannot do this: its return value is already the logical-write channel\n     *  ({@link ApiMutatorResult}). A post-commit effect chosen by a transactional read is exactly what\n     *  the scoped form is for. */\n    transact<T>(run: (tx: ServerMutationTx) => T | Promise<T>): Promise<T>;\n    transact<A, C extends MutatorCtx>(mutator: SharedMutator<A, C>, args: A, ctx: C): Promise<void>;\n}"},{"name":"ScopedMutator","signature":"/** A SCOPED server mutator (WORK-OUTSIDE-TX): server-only code, ONE `scope.transact`, optional\n *  post-commit code. Register it by wrapping in {@link scoped} — the tag the api-server routes on to\n *  hand it a {@link MutationScope} instead of running its whole body inside the transaction. */\nexport type ScopedMutator<User, Args> = (scope: MutationScope, args: Args, ctx: MutationContext<User>) => void | Promise<void>;"},{"name":"ScopedApiMutator","signature":"/** A {@link ScopedMutator} tagged by {@link scoped} so the harness invokes it with a\n *  {@link MutationScope}. Typed as a BRANDED tx-form {@link ApiMutator} purely so it registers in the\n *  `mutators` record without widening it to a union (which would break contextual inference for every\n *  plain tx-form entry). Its true runtime shape is `(scope, args, ctx)`; the tag — not the type —\n *  routes it, and it is never actually called as a tx-form mutator. */\nexport type ScopedApiMutator<User, Args> = ApiMutator<User, Args> & {\n    readonly __rindleScoped: true;\n};"},{"name":"scoped","signature":"/** Mark a mutator as SCOPED so the api-server gives it a {@link MutationScope} (author-controlled tx\n *  boundary via `scope.transact`) rather than running its whole body inside the transaction. Register\n *  it alongside the tx-form mutators — it wins by key like any override:\n *\n *  ```ts\n *  mutators: defineApiMutators({\n *    ...sharedApiMutators(sharedMutators, sharedCtx),        // tx-form (common case)\n *    createOrder: scoped(async (scope, raw, ctx) => {        // needs outside-tx work\n *      const args = createOrder.args.parse(raw);\n *      const chargeId = await stripe.charge(args.amount, { idempotencyKey: ctx.envelope.mid }); // outside tx\n *      try {\n *        await scope.transact(createOrder, args, { ...sharedCtx(ctx), chargeId });              // inside tx\n *      } catch (e) {\n *        await stripe.refund(chargeId);                       // compensate — the write rejected\n *        throw e;\n *      }\n *      await sendReceipt(ctx.user);                           // after commit\n *    }),\n *  }),\n *  ```\n */\nexport declare function scoped<User, Args>(fn: ScopedMutator<User, Args>): ScopedApiMutator<User, Args>;"},{"name":"ApiMutators","signature":"export type ApiMutators<User> = Record<string, ApiMutator<User, any>>;"},{"name":"QueryLeaseRequest","signature":"export interface QueryLeaseRequest<User> {\n    user: User;\n    name: string;\n    args: unknown;\n    request?: unknown;\n    /** The browser's stable `clientId` (sent on the query POST) — the anonymous routing-key fallback\n     *  when there is no authenticated subject and no session cookie (READ-ROUTER-DESIGN.md §1.5/§2.2).\n     *  A routing HINT only, never authorization. */\n    clientId?: string;\n    /** The browser's opaque follower-affinity ticket (FOLLOWER-AFFINITY-DESIGN.md §3), read off the\n     *  query POST and forwarded opaquely on `materialize` so the fleet edge selects the follower\n     *  the browser's ws is pinned to (§2, §4) — both legs co-locate. The api-server does NOT verify\n     *  it (the fleet does); it holds no signing key. Absent ⇒ single daemon / affinity off. */\n    affinity?: string;\n}"},{"name":"QueryLeaseRealtime","signature":"/**\n * The room-serve block on a query lease (RINDLE-REALTIME-QUERY-ENABLEMENT §2.1 step 5 / §2.4,\n * slice G-iv-b): present when the named query carries a realtime label naming a configured room\n * profile (302 §5 — declared, not derived; no coverage proof). The G-v client uses it to open the\n * room transport for THIS query beside — never instead of — its daemon session.\n *\n * It is a dedicated block on purpose: the ROOM ws is a SEPARATE connection this query opens beside\n * its daemon session (never a migration of the daemon session — the daemon ws host is fixed and\n * placed by the affinity ticket). A room-served lease's top-level fields are byte-identical to the\n * daemon-served ones.\n */\nexport interface QueryLeaseRealtime {\n    /** The client store's gate/domain key for this room source (`connectSource`) AND the string the\n     *  wasm engine's `parse_source_key` accepts: any string other than the reserved `\"daemon\"`\n     *  parses as a room source, and the established convention is `\"room:\" + doc`\n     *  (e.g. `room:document/doc:d1`). */\n    sourceKey: string;\n    /** Where the client opens the ROOM ws for this query (from `realtime.locateRoom`) — its OWN\n     *  connection, distinct from the daemon session's fixed ws host. */\n    wsEndpoint: string;\n    /** The room's self-authorizing signed lease (`@rindle/room/token`): the APPROVED query AST +\n     *  doc + subject, HMAC-signed with `realtime.roomTokenKey` so the room shell's\n     *  `downstream.tokenKeys` ring verifies it. The room materializes on first presentation. */\n    roomToken: string;\n    /** Token expiry (ms epoch) — the client's renewal clock (renewal = a fresh lease). */\n    exp: number;\n    /** The wire room doc (`\"<profile>/<key>\"`, minted server-side — never client-derived). */\n    doc: string;\n    /** Per-footprint-table specs: the §2.2 owned/followed split + §3.2 routing metadata. Since\n     *  H-iii each spec also carries `footprintWhere` — the same exact membership predicate the boot\n     *  wire ships the room gate (one compiler, `compileRoomScopeSpecs`) — feeding the client's §3\n     *  prove-or-slow-path router. Advisory routing metadata, never a credential (§3.2). */\n    tables: RoomTableSpec[];\n}"},{"name":"QueryLeaseLifecycleLease","signature":"/**\n * One minted SYSTEM-STREAM lease on a query lease's `lifecycle` block (RINDLE-REALTIME-QUERY-\n * ENABLEMENT §4, Slice I-iii): an ordinary daemon materialization over one of the four\n * `_rindle_*` lifecycle system tables (registered by the daemon's `enable_realtime_lifecycle` —\n * `rust/rindle-replica/src/mutations.rs`), attachable by the EXISTING client subscribe path\n * (present `leaseToken` on a `subscribe` frame, exactly like the primary lease). The identity\n * fields (`scope`/`doc`/`clientId`) document the minted AST's predicate — the client keys its\n * retains and its release-time row filters on them.\n */\nexport interface QueryLeaseLifecycleLease {\n    /** Which system table this lease's subscription serves. */\n    table: string;\n    leaseToken: string;\n    /** DOORBELL only: the §4.1 occupancy scope — the wire room doc (`\"<profile>/<key>\"`). */\n    scope?: string;\n    /** FENCE entries only: the room doc the predicate is scoped to. */\n    doc?: string;\n    /** FENCE ledger/outcome entries: present iff the predicate was ALSO client-scoped (the lease\n     *  request carried `clientId`). Absent ⇒ doc-only predicate — the client filters to its own\n     *  rows regardless (defense in depth). */\n    clientId?: string;\n}"},{"name":"QueryLeaseLifecycle","signature":"/** The §4 lifecycle block on a query lease (Slice I-iii): present only when BOTH the realtime\n *  `lifecycle` config is on AND the query is realtime-labeled. `doorbell` rides EVERY labeled\n *  lease (occupancy is counted whether or not the query is room-served — the 1→2 upgrade trigger\n *  needs solo watchers subscribed BEFORE any room exists, §4.1); `fence` rides only a ROOM-SERVED\n *  lease (the §4.2/§7.1/§3.3 downgrade surfaces are meaningful only where a room domain exists).\n *  The §4.2 fence VALUE (`finalFlushSeq`) is deliberately NOT here — it arrives with the I-v\n *  downgrade response; I-iii only stands up the streams. */\nexport interface QueryLeaseLifecycle {\n    doorbell: QueryLeaseLifecycleLease;\n    fence?: QueryLeaseLifecycleLease[];\n}"},{"name":"QueryLeaseRealtimeFence","signature":"/** The §4.2 downgrade fence on a query lease (Slice I-v): rides a labeled reply whose §4.1\n *  occupancy gate CLOSED (so there is NO `realtime` block) when the server could drain the room.\n *  A SIBLING of `realtime`, never nested inside it — block-ABSENCE is the downgrade signal, and\n *  the fence rides alongside that absence. Its `finalFlushSeq` is the room's last COMMITTED flush\n *  seq; the client's frozen room ghost holds visible until the daemon plane has provably absorbed\n *  it (`_rindle_room_watermark(doc) ≥ finalFlushSeq`). Absent from every non-downgrade reply. */\nexport interface QueryLeaseRealtimeFence {\n    /** The retiring room source's gate/domain key — `\"room:\" + doc`, matching what the room-served\n     *  lease's {@link QueryLeaseRealtime.sourceKey} carried. */\n    sourceKey: string;\n    doc: string;\n    finalFlushSeq: number;\n}"},{"name":"QueryLeaseResponse","signature":"export interface QueryLeaseResponse {\n    leaseToken: string;\n    materializationId: string;\n    queryKey?: string;\n    reused?: boolean;\n    /** The public daemon/fleet WebSocket endpoint. With the unified `rindle` connection this is\n     *  derived from the same ingress URL (or `rindle.wsUrl`) so a browser can open its transport from\n     *  this lease and needs no application-authored runtime-config route. */\n    wsEndpoint?: string;\n    /** Fresh opaque follower-placement ticket minted with this follower-local lease. The optimistic\n     *  client offers it on the WebSocket opened at {@link wsEndpoint}, pinning both legs to the same\n     *  follower even though the first connection is created only after this response. */\n    affinity?: string;\n    /** The room-serve block (G-iv-b) — see {@link QueryLeaseRealtime}. Absent ⇒ the lease is\n     *  byte-identical to the legacy daemon-served shape. */\n    realtime?: QueryLeaseRealtime;\n    /** The §4.2 downgrade fence (Slice I-v) — see {@link QueryLeaseRealtimeFence}. Present only on a\n     *  labeled reply whose occupancy gate closed AND `realtime.lifecycle.drainRoom` could drain the\n     *  room; absent otherwise (including on every room-served reply). */\n    realtimeFence?: QueryLeaseRealtimeFence;\n    /** The §4 lifecycle system-stream block (Slice I-iii) — see {@link QueryLeaseLifecycle}.\n     *  Minted ONLY under the opt-in `realtime.lifecycle` config; absent ⇒ byte-identical to the\n     *  pre-lifecycle response. */\n    lifecycle?: QueryLeaseLifecycle;\n}"},{"name":"QueryReadRequest","signature":"/** A one-shot SSR read of a named query (SSR-DESIGN.md §6): same `(name, args)` surface as a lease,\n *  but the daemon serializes the current view ONCE and registers no subscriber. */\nexport interface QueryReadRequest<User> {\n    user: User;\n    name: string;\n    args: unknown;\n    request?: unknown;\n    /** The browser's stable `clientId` — the anonymous routing-key fallback (see\n     *  {@link QueryLeaseRequest.clientId}). Lets the SSR read co-locate on the follower the booting\n     *  client's first subscribe will hit (READ-ROUTER-DESIGN.md §2.4). */\n    clientId?: string;\n    /** The browser's opaque follower-affinity ticket — see {@link QueryLeaseRequest.affinity}.\n     *  Forwarded on the one-shot `query` so an SSR read lands on the same pinned follower. */\n    affinity?: string;\n}"},{"name":"QueryReadResponse","signature":"/** The assembled (nested-by-name) first-paint snapshot the server-side Store seeds + dehydrates\n *  (SSR-DESIGN.md §3.3). `rows` hydrate without an engine; `cvMin` is their watermark baseline. */\nexport interface QueryReadResponse {\n    rows: Array<{\n        cols: Record<string, unknown>;\n        [rel: string]: unknown;\n    }>;\n    cvMin?: number;\n    queryKey?: string;\n}"},{"name":"MutationRunInput","signature":"/** The context a {@link MutationBackend} needs to run one mutation inside its transaction. */\nexport interface MutationRunInput {\n    envelope: MutationEnvelope;\n    /** Schema-derived render metadata (from {@link RindleApiServerOptions.schema}). A logical op on a\n     *  table absent here throws loudly — never a silent dropped write. `{}` when no schema is set. */\n    render: RenderIndex;\n    /** Invoke the (authorized) mutator against the backend-provided tx. A THROW that is NOT a\n     *  {@link BackendError} is a BUSINESS rejection (roll the data back, then advance `lmid` alone,\n     *  §2.4); a {@link BackendError} (a DB-layer failure) is INFRA and rejects the returned promise. */\n    run(tx: ServerMutationTx): Promise<void>;\n}"},{"name":"MutationOutcome","signature":"/** The result of {@link MutationBackend.runMutation}: either the data+lmid committed together, or a\n *  business rejection whose data was rolled back but whose `lmid` still advanced (§2.4). */\nexport type MutationOutcome = {\n    accepted: true;\n    output: SqlTxnOutput;\n} | {\n    accepted: false;\n    reason: string;\n    output?: unknown;\n};"},{"name":"MutationBackend","signature":"/**\n * Where a mutation runs and who stamps `lmid` — the seam that makes the mutator authoring surface\n * backend-agnostic (`BYO-POSTGRES-LMID-CONTRACT-DESIGN.md` §6; MUTATORS-ISOMORPHIC plan). Three\n * implementations ship: {@link sqlBackend} is the preferred managed-SQL path; {@link daemonBackend}\n * keeps the private control-plane compatibility path; and {@link postgresBackend} runs a real\n * interactive PG transaction with confirmation riding the CDC loop down.\n *\n * The load-bearing invariant is that a mutation ALWAYS advances the client's `last_mutation_id`:\n * - `runMutation` runs the mutator inside the backend's transaction; on success it advances `lmid`\n *   to `envelope.mid` in the SAME atomic unit (OPTIMISTIC-WRITES-DESIGN.md §8.2); on a BUSINESS\n *   rejection it rolls the data back but STILL advances `lmid` (§2.4 — else the client's pending\n *   queue never drains and the optimistic stack wedges).\n * - `reject` is the pre-flight path (unknown mutator, failed authorization): NO data, `lmid` alone.\n * - An infrastructure failure THROWS from `runMutation` — never a user rejection (the client\n *   retries; mid dedup absorbs any applied prefix).\n */\nexport interface MutationBackend {\n    /** The SQL dialect this backend renders logical ops to (drives placeholder style). */\n    readonly dialect: SqlDialect;\n    /** Optional raw-SQL surface outside the mutation transaction. Built-in backends provide it;\n     *  custom backends may omit it, in which case `scope.sql` fails as an infrastructure error. */\n    readonly outsideSql?: ServerSql;\n    runMutation(input: MutationRunInput): Promise<MutationOutcome>;\n    reject(input: {\n        envelope: MutationEnvelope;\n        reason: string;\n    }): Promise<unknown>;\n}"},{"name":"PushMutationRequest","signature":"export interface PushMutationRequest<User> {\n    user: User;\n    envelope: MutationEnvelope;\n    request?: unknown;\n}"},{"name":"PushMutationsRequest","signature":"export interface PushMutationsRequest<User> {\n    user: User;\n    envelopes: MutationEnvelope[];\n    request?: unknown;\n}"},{"name":"PushMutationResponse","signature":"export type PushMutationResponse = {\n    accepted: true;\n    rejected: false;\n    output: SqlTxnOutput;\n} | {\n    accepted: false;\n    rejected: true;\n    reason: string;\n    output?: unknown;\n};"},{"name":"RindleApiRoutes","signature":"export interface RindleApiRoutes {\n    query: string;\n    read: string;\n    mutate: string;\n    applyRowChangeTxn: string;\n    claimRoomEpoch: string;\n    roomLmids: string;\n    roomBoot: string;\n    stream: string;\n}"},{"name":"RoomHostResponse","signature":"/** A room-host reply the transport writes VERBATIM (`status` + JSON `body`): the\n *  daemon's fence/conflict/identity semantics ride specific statuses and body shapes\n *  the room's `httpAuthority` decodes, so this endpoint trio can't run through the\n *  throw-on-error result shapes the viewer endpoints use. */\nexport interface RoomHostResponse {\n    status: number;\n    body: unknown;\n}"},{"name":"PinnedQuery","signature":"/** A named query to keep permanently materialized (warm with zero subscribers). */\nexport interface PinnedQuery {\n    name: string;\n    args?: unknown;\n}"},{"name":"PinFanout","signature":"/** The explicit fleet pin fan-out seam (READ-ROUTER-DESIGN.md §4.2). The api-server resolves each\n *  pin's authoritative AST under `pinUser` and hands the ready {@link MaterializeInput}s here; the\n *  implementation (the read router) fans EACH across all live followers. Distinct, on purpose, from\n *  a per-viewer `materialize` (which routes ONE) — a pin-assert always sprays ALL. */\nexport interface PinFanout {\n    assertPins(pins: readonly MaterializeInput[]): Promise<void>;\n}"},{"name":"RoomBootFlush","signature":"/** The room-boot flush leg (enablement §5): where the placed room's write-behind lands and what\n *  credential it presents. `urls` are the trio's ROUTE PATHS (root-relative — the shell resolves\n *  them against the boot call's origin), so an app that overrides `routes` needs no out-of-band\n *  sync; `headers` ride every flush call verbatim (`httpAuthority`'s `headers`). */\nexport interface RoomBootFlush {\n    urls: {\n        apply: string;\n        claim: string;\n        lmids: string;\n    };\n    headers: Record<string, string>;\n}"},{"name":"RoomBootResponse","signature":"/** The `/room-boot` response (RINDLE-REALTIME-DESIGN.md §10.1 — the DO shell's cold-boot\n *  callback): the claimed placement epoch, the room's upstream footprint lease, and the flush\n *  leg. A cold room boots inert and serves nothing until this returns. */\nexport interface RoomBootResponse {\n    epoch: number;\n    upstreamLeaseToken: string;\n    /** Where the room opens its upstream subscription (a routed deploy's follower). Absent ⇒ the\n     *  shell's statically configured rindled ws endpoint. */\n    upstreamWsEndpoint?: string;\n    /** Fresh opaque follower-placement ticket minted alongside `upstreamLeaseToken`. The DO offers\n     *  it with `rindle.v1` on the separate upstream ws so a static fleet endpoint replays to the\n     *  exact follower holding that local lease. Absent when daemon affinity is off. */\n    upstreamAffinity?: string;\n    /** Per-footprint-table scope specs (H-iv-b), compiled from the resolved footprint AST + the\n     *  profile's context set (the legacy anonymous profile compiles with an empty context set):\n     *  what the shell hands the wasm room's `enableWritesV2` — the §3.3 commit gate. Optional\n     *  only for wire compatibility with pre-H-iv-b servers; a shell that doesn't receive them\n     *  enables the v1 table-granular write plane exactly as before. */\n    scopes?: RoomScopeSpec[];\n    flush: RoomBootFlush;\n}"},{"name":"RindleRealtimeOptions","signature":"export interface RindleRealtimeOptions<User> {\n    /** The boot shell secret (§10.1 — a host binding, never client-derived). Authenticates the\n     *  room's `Authorization: Bearer` on `/room-boot` (the default {@link authorizeBoot}) and keys\n     *  the DEFAULT epoch-bound flush credential. */\n    shellSecret: string;\n    /** NAMED room profiles (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §2.1): profile name → key\n     *  derivation + canonical unwindowed footprint + read-only context tables. The wire room key\n     *  for a named profile is `\"<profile>/<key>\"`; `/room-boot` splits it and resolves the\n     *  profile's footprint with the bare key. Compiled + validated LOUDLY at construction (§2.3):\n     *  a windowed footprint, a context table missing from the schema/footprint, or a registered\n     *  query whose realtime label names a missing profile all throw from `createRindleApiServer`. */\n    rooms?: Record<string, RoomProfile<User>>;\n    /** doc → the room's approved upstream footprint (§3.1) — an `Ast` or fluent `Query`. MAY\n     *  delegate to the named-query registry internally; throw `RindleApiError(\"not-found\", …, 404)`\n     *  for a doc that shouldn't exist. The §9 footprint budget belongs here — it runs once per\n     *  placement, at lease mint.\n     *  @deprecated Prefer named {@link rooms} profiles (RINDLE-REALTIME-QUERY-ENABLEMENT §2.1).\n     *  This bare form remains as the single-profile LEGACY alias — the anonymous/default profile:\n     *  a doc with no known `\"<profile>/\"` prefix resolves here, byte-identically to before named\n     *  profiles existed (and with none of their construction/boot-time validation). */\n    resolveFootprint?: (doc: string, ctx: ApiContext<User>) => MaybePromise<ApiQueryResult>;\n    /** Gates the flush trio — `authorizeRoom`, relocated. Default: verify the default flush\n     *  credential from the {@link ROOM_FLUSH_CREDENTIAL_HEADER} request header — which requires the\n     *  transport to pass its incoming request as `context.request` (Fetch `Request` and node\n     *  `IncomingMessage` shapes are both understood). */\n    authorize?: Authorizer<ApiContext<User>>;\n    /** Gates `/room-boot`. Default: constant-time `Authorization: Bearer` check against\n     *  {@link shellSecret} (same `context.request` requirement as {@link authorize}). */\n    authorizeBoot?: Authorizer<ApiContext<User>>;\n    /** Mint the flush headers a placed room presents on every flush call. Default:\n     *  {@link mintRoomFlushCredential} under {@link ROOM_FLUSH_CREDENTIAL_HEADER}. Override this\n     *  and {@link authorize} TOGETHER — they are the two ends of one credential. */\n    mintFlushHeaders?: (input: {\n        doc: string;\n        epoch: number;\n    }) => MaybePromise<Record<string, string>>;\n    /** Lease TTL for the room's upstream footprint materialization (defaults to the server-wide\n     *  `leaseTtlMs`, else the daemon's default). */\n    upstreamLeaseTtlMs?: number;\n    /** Static endpoint where rooms open their upstream subscription. In a follower fleet this is the\n     *  fleet ws URL; `/room-boot` pairs it with the materialization's fresh placement ticket so the\n     *  room lands on the exact follower holding its lease. Absent ⇒ no explicit upstream (the Node\n     *  room shell may use its own default; the shipped DO shell requires this endpoint). */\n    upstreamWsEndpoint?: string;\n    /** Locate (or place) the room serving `doc` and return the ROOM ws endpoint a room-served\n     *  lease's client should open (G-iv-b; on the DO shell this is the Worker's room URL). The\n     *  endpoint rides the lease's dedicated `realtime.wsEndpoint` — its OWN connection, distinct from\n     *  the daemon session's fixed ws host. Absent ⇒ room-serving is OFF: labeled queries serve from\n     *  the daemon exactly as today (fail-open). */\n    locateRoom?: (doc: string) => MaybePromise<{\n        wsEndpoint: string;\n    }>;\n    /** The room lease token signing key (`@rindle/room/token`): `kid` + secret, matching an entry\n     *  in the room shell's `downstream.tokenKeys` ring. Required for room-serving (without it a\n     *  labeled query fail-opens to the daemon with a one-time warning). A separate secret from\n     *  `shellSecret` on purpose — the shell's ring is the client-token trust domain, the shell\n     *  secret is the boot/flush trust domain. */\n    roomTokenKey?: {\n        kid: string;\n        secret: string;\n    };\n    /** Room lease token TTL, ms (default 5 minutes — the §4.1 short-TTL backstop; renewal is a\n     *  fresh lease through this server, never an extension). */\n    roomTokenTtlMs?: number;\n    /** Loud-diagnostics sink for the realtime layer (profile compilation warnings + the one-time\n     *  per-(query, profile) \"not room-served\" serve-decision warnings). Defaults to\n     *  `console.warn`; injectable for tests. */\n    warn?: (message: string) => void;\n    /** The §4 upgrade/downgrade lifecycle plane (RINDLE-REALTIME-QUERY-ENABLEMENT §4, Slice\n     *  I-iii): PRESENCE of this block is the opt-in — every realtime-labeled lease then\n     *  additionally mints the doorbell system lease (occupancy, §4.1) and every ROOM-SERVED lease\n     *  the fence bundle (watermark + ledger + outcomes, §4.2/§7.1/§3.3) — see\n     *  {@link QueryLeaseLifecycle}. Requires the daemon to have run `enable_realtime_lifecycle`\n     *  (the four `_rindle_*` system tables must be registered or the minted materializations fail\n     *  — which fail-opens with a one-time warning, never blocking the lease). Absent ⇒ the lease\n     *  response is byte-identical to pre-lifecycle. */\n    lifecycle?: RindleRealtimeLifecycleOptions;\n}"},{"name":"RindleRealtimeLifecycleOptions","signature":"/** {@link RindleRealtimeOptions.lifecycle}. PRESENCE of the block is the opt-in switch (I-iii);\n *  the fields below are the Slice I-iv occupancy knobs (§4.1, decisions D4/D6/D7). All optional —\n *  `lifecycle: {}` gets the designed defaults. */\nexport interface RindleRealtimeLifecycleOptions {\n    /** D6 (§4.1): the occupancy threshold for room-serving. A labeled lease whose scope counts\n     *  FEWER than this many distinct unexpired sessions (the caller's own included) ships WITHOUT\n     *  the realtime block — served from the daemon, indistinguishable from an uncovered query —\n     *  but WITH the doorbell, so the 1→2 transition wakes it (that is the point: solo docs never\n     *  cost room infrastructure). Default **2** (the design's 1→2 trigger). Set `1` to room-serve\n     *  solo viewers (the pre-I-iv behavior under lifecycle config). */\n    minSessions?: number;\n    /** The §9.1 hysteresis window, ms (default **120_000**). Two consumers: (a) the lazy sweep\n     *  (D4) keeps expired session rows lingering at least this long past expiry — Slice I-v's\n     *  downgrade decision (\"no other unexpired row AND the newest other row expired > graceMs\n     *  ago\") is read FROM those rows, so they must survive to be read; (b) this slice's gate\n     *  applies the same hysteresis upward: a scope with an other-session row expired ≤ graceMs\n     *  ago keeps room-serving through the window (see `lifecycleOccupancy` — no flap on one\n     *  client's brief lapse). §9.1-tunable: raise it for docs where collaborators churn slowly. */\n    graceMs?: number;\n    /** TTL of an occupancy session row, ms — `expires_at = now + sessionTtlMs` on every labeled\n     *  lease mint/renewal (D7: session identity = the request's `clientId`; two tabs are two\n     *  sessions iff their clientIds differ). Default = the server's `leaseTtlMs`, else 5 minutes —\n     *  matching the room-token renewal cadence (`roomTokenTtlMs`, renewed 30s early), so a\n     *  room-attached client's renewals keep its row unexpired; a daemon-attached solo client's row\n     *  MAY lapse (it has no renewal timer) and is refreshed by its next doorbell-triggered\n     *  re-lease — occupancy converges through the doorbell itself. */\n    sessionTtlMs?: number;\n    /** The §4.2 downgrade drain hook (Slice I-v). When the occupancy gate CLOSES for a labeled\n     *  lease whose scope PLAUSIBLY hosted a room (an other-session row still lingers — never a\n     *  never-shared solo doc), the api-server calls this to drain the room's pending write-behind\n     *  and learn its last COMMITTED `flush_seq`, then rides the value back on the lease as the\n     *  {@link QueryLeaseRealtimeFence}. The deployment wires it to the room shell's / DO's `/drain`\n     *  control. Absent ⇒ no fence is attached (the client hits its loud legacy downgrade path);\n     *  a throw fails OPEN to the same (a downgrade never blocks the lease). Concurrent drains across\n     *  api-server instances are fine — `/drain` is idempotent. */\n    drainRoom?: (doc: string) => Promise<{\n        finalFlushSeq: number;\n    }>;\n}"},{"name":"ROOM_FLUSH_CREDENTIAL_HEADER","signature":"export declare const ROOM_FLUSH_CREDENTIAL_HEADER = \"x-rindle-room-credential\";"},{"name":"RoomFlushCredentialPayload","signature":"export interface RoomFlushCredentialPayload {\n    v: 1;\n    doc: string;\n    epoch: number;\n    iat: number;\n}"},{"name":"mintRoomFlushCredential","signature":"/** Sign the default epoch-bound flush credential (`/room-boot` mints one per placement). */\nexport declare function mintRoomFlushCredential(opts: {\n    shellSecret: string;\n    doc: string;\n    epoch: number;\n    /** Mint time; defaults to `Date.now()`. Injectable for tests. */\n    now?: number;\n}): Promise<string>;"},{"name":"verifyRoomFlushCredential","signature":"/** Verify a flush credential's MAC, then its claims; returns the payload or throws. The MAC is\n *  checked FIRST — no claim is trusted before it passes. */\nexport declare function verifyRoomFlushCredential(credential: string, shellSecret: string): Promise<RoomFlushCredentialPayload>;"},{"name":"RindleDatabaseOptions","signature":"/** Database connection used by the API server's managed SQL path.\n *\n *  `intMode` defaults to `\"number\"` because logical Rindle rows use the JSON-safe {@link WireValue}\n *  vocabulary — `\"bigint\"` does not survive `JSON.stringify`, and `\"string\"` silently retypes every\n *  integer, breaking arithmetic in mutator bodies. The cost is a HARD BOUND: a mutator read of an\n *  integer outside ±(2^53 − 1) rejects that mutation rather than silently rounding it. Tables with\n *  keys beyond that range (snowflake ids, and so on) must override `intMode` and have their mutators\n *  handle the resulting type. Commit receipts are unaffected — they never decode row values. */\nexport type RindleDatabaseOptions = Pick<SqlClientOptions, \"url\" | \"authToken\" | \"fetch\" | \"intMode\">;"},{"name":"RindleConnectionOptions","signature":"/** The unified fleet connection — one URL, one key. A Rindle is BOTH layers at once: the SQL\n *  database below and the sync/IVM control plane above, served by a single ingress that routes\n *  each request to the right tier. This option derives both from that one origin: the SQL layer\n *  ({@link RindleApiServerOptions.database}) at `url` with `token`, and the control-plane client\n *  ({@link RindleApiServerOptions.daemon}) at the same `url` — so an application configures \"a\n *  rindle\", not two subsystems.\n *\n *  The derived control-plane client sends the same bearer. A unified ingress is an explicitly\n *  merged customer API-server trust tier: it routes SQL to the master and control requests to a\n *  follower, while the browser still receives neither credential. Deployments that keep those\n *  trust tiers separate pass an explicit {@link RindleApiServerOptions.daemon}; explicit fields\n *  always win over this derivation. */\nexport interface RindleConnectionOptions {\n    /** The single ingress origin. Defaults to `$RINDLE_URL` — exported by `rindle dev` whenever\n     *  the rendered topology collapsed read+write onto one ingress. */\n    url?: string;\n    /** Public subscription WebSocket endpoint returned on query leases. Defaults to {@link url} with\n     *  `http:` → `ws:` / `https:` → `wss:`. Override when HTTP and WebSocket ingress differ. */\n    wsUrl?: string;\n    /** The server-side bearer for both legs of the unified ingress. Defaults to\n     *  `$RINDLE_DATABASE_TOKEN` (also a `rindle dev` export); required through one of those channels\n     *  unless both legs are configured explicitly. It never reaches the browser. */\n    token?: string;\n}"},{"name":"RindleApiServerOptions","signature":"export interface RindleApiServerOptions<User> {\n    /** The sync/IVM control-plane client (leases, materialization, rooms). Optional once\n     *  {@link rindle} is configured — the api-server then derives an HTTP client against the single\n     *  ingress. Pass one explicitly for a tokened production fleet, a split/routed deployment, or a\n     *  custom transport; an explicit client wins over the derivation. */\n    daemon?: RindleDaemonClient;\n    /** The unified connection (one URL, one key) that derives {@link daemon} and {@link database}\n     *  from the fleet's single ingress. `rindle: {}` resolves both halves from the `rindle dev`\n     *  environment. Any explicitly configured `daemon` / `database` / `sql` / `backend` field takes\n     *  precedence over its derived counterpart. */\n    rindle?: RindleConnectionOptions;\n    /** Preferred managed setup. The API server constructs and owns its SQL client; authoritative\n     *  mutators, `tx.sql`, and `scope.sql` use it, while `daemon` remains only the lease/query/\n     *  materialization/room control plane. Mutually exclusive with {@link sql} unless `backend`\n     *  explicitly replaces both. */\n    database?: RindleDatabaseOptions;\n    /** Advanced injection/test seam for an already-created SQL session. Most applications should\n     *  configure {@link database} and never import `createSqlClient`. When present (and `backend` is\n     *  absent), authoritative mutators run through {@link sqlBackend}. */\n    sql?: SqlSession;\n    /** Where mutations are applied and `lmid` is stamped ({@link MutationBackend}). Default:\n     *  managed `sqlBackend` when `database` or `sql` is configured, otherwise the compatibility\n     *  `daemonBackend(daemon)`. Pass `postgresBackend(...)` when Postgres is the source of truth. */\n    backend?: MutationBackend;\n    /** The typed schema (`createSchema`/`refineSchema`). Required only when a mutator uses the LOGICAL\n     *  write vocabulary (`tx.insert`/`update`/`upsert`/`insertIgnore`/`delete`/`row`) — it drives the\n     *  dialect SQL renderer (column order, pk, quoting). A logical op with no schema configured throws\n     *  loudly. Pure raw-`tx.exec` mutators do not need it. */\n    schema?: Schema;\n    queries?: ApiQueries<User>;\n    runQuery?: RunQuery<User>;\n    mutators?: ApiMutators<User>;\n    /** Optional gate before resolving a named query, for leases and one-shot reads. If omitted,\n     *  no gate runs. The query definition still owns row visibility predicates. */\n    authorizeQuery?: Authorizer<AuthorizeQueryInput<User>>;\n    /** Optional gate before mutation execution. If omitted, no gate runs. Mutators still own\n     *  row-level checks and business rules inside their authoritative transaction. */\n    authorizeMutation?: Authorizer<AuthorizeMutationInput<User>>;\n    /** Rindle Realtime (RINDLE-REALTIME-ENABLEMENT-DESIGN.md §3.1): the ONE named opt-in.\n     *  Presence activates the room flush trio AND `/room-boot`; absence keeps every room\n     *  endpoint 403. Takes precedence over the deprecated {@link authorizeRoom}. */\n    realtime?: RindleRealtimeOptions<User>;\n    /** The LM stream plane (LM-STREAM-CHECKPOINT-DESIGN.md): the ONE named opt-in for streaming a\n     *  model response live while the durable store only ever sees coarse checkpoints. Presence\n     *  activates {@link RindleApiServer.openStream}/{@link RindleApiServer.subscribeStream} and\n     *  `/stream`; absence keeps them 403. */\n    streams?: RindleStreamOptions<User>;\n    /** The room write-authority gate (§5.3.1): validates the caller is a placed room —\n     *  the epoch-bound flush credential rides `context.request`, and what it means is\n     *  the app's to define. The room endpoints are DISABLED (403) until this is set:\n     *  hosting a write authority is an explicit opt-in, never a default.\n     *  @deprecated Use {@link realtime} (its `authorize`) — this bare form gates the\n     *  flush trio but never activates `/room-boot`. When both are set, `realtime` wins. */\n    authorizeRoom?: Authorizer<ApiContext<User>>;\n    routes?: Partial<RindleApiRoutes>;\n    mode?: StreamMode;\n    materializationPolicy?: MaterializationPolicy | ((input: QueryLeaseRequest<User>) => MaybePromise<MaterializationPolicy>);\n    leaseTtlMs?: number;\n    /** Idle TTL (ms) the warm pipeline a one-shot SSR {@link RindleApiServer.readQuery read} leaves\n     *  behind is held at (SSR-DESIGN.md §3.4) — it must comfortably cover page-load + client-boot +\n     *  the follow-up live `subscribe` so the browser lands on a still-warm pipeline (the warm\n     *  handoff). The TTL is NOT part of the dedup key (max-wins), so it only ever extends a shared\n     *  query's window. Absent ⇒ the daemon's default idle TTL. */\n    readIdleTtlMs?: number;\n    subject?: string | ((input: QueryLeaseRequest<User>) => MaybePromise<string | undefined>);\n    /** The ANONYMOUS routing key forwarded to the read router (READ-ROUTER-DESIGN.md §2.2) — used by\n     *  HRW placement when there is no authenticated `subject`. The router keys on `subject ?? this`;\n     *  the resolved value rides `metadata.routingKey` to the daemon. Default: the browser-supplied\n     *  `clientId` (from the query POST body). NOTE: the default cannot co-locate an ANONYMOUS SSR read\n     *  with the booting client — an SSR server can't see the browser's localStorage `clientId`, so the\n     *  two legs compute different keys and §2.4's warm handoff misses (still correct — just an extra\n     *  first-touch materialize). For anonymous SSR co-location, set this to read a server-set session\n     *  cookie from `input.request` (it rides the SSR request AND every browser request). A routing\n     *  HINT only — never authorization. Ignored by a single (unrouted) daemon, which has nothing to\n     *  route. */\n    routingKey?: string | ((input: QueryLeaseRequest<User>) => MaybePromise<string | undefined>);\n    /** The EXPLICIT fleet pin fan-out — when set, {@link RindleApiServer.assertPins} fans each\n     *  resolved pin across ALL live followers through it (a fleet control action over the machine\n     *  list — FOLLOWER-AFFINITY-DESIGN.md §11) instead of materializing each pin once on the (single)\n     *  daemon. A per-viewer `materialize` always routes ONE; a pin-assert always fans ALL — never\n     *  inferred from `policy.kind`. Absent ⇒ single-daemon behavior (one materialize per pin). */\n    pinFanout?: PinFanout;\n    /** Named queries to keep permanently materialized via {@link RindleApiServer.assertPins}.\n     *  Each is materialized with a `pinned` policy (survives zero subscribers) so late joiners\n     *  attach to an already-warm result. Pins are viewer-independent — resolved with `pinUser`. */\n    pinnedQueries?: PinnedQuery[];\n    /** The user context pins resolve under (pins are shared, so they should not depend on a\n     *  per-viewer identity). Defaults to `undefined`. */\n    pinUser?: User;\n    /** Surfaced when a SCOPED mutator ({@link scoped}) throws from code that runs AFTER `scope.transact`\n     *  has already sealed the protocol outcome — a post-commit effect, or a compensation handler running\n     *  after a business rejection. The outcome is fixed (this callback CANNOT change the client's\n     *  response or the `lmid` advance), but the throw must not vanish: a failed refund is real money.\n     *  Absent ⇒ the error is logged to `console.error`. */\n    onScopeError?: (err: unknown, info: {\n        phase: \"committed\" | \"rejected\";\n        envelope: MutationEnvelope;\n    }) => void;\n}"},{"name":"RindleApiServer","signature":"export interface RindleApiServer<User> {\n    readonly routes: RindleApiRoutes;\n    /** Close the SQL client created from {@link RindleApiServerOptions.database}, and drop every live\n     *  stream's readers and timers WITHOUT a durable write (that is {@link drainStreams}). Injected\n     *  SQL sessions and custom backends remain caller-owned. Idempotent. */\n    close(): void;\n    /** Open an LM stream (LM-STREAM-CHECKPOINT §2): commits the durable POINTER row, then hands back\n     *  the producer handle. A resolved handle means the message already exists for every client's\n     *  query — so a subscriber that arrives before the first token has something to attach to.\n     *  Throws 403 unless {@link RindleApiServerOptions.streams} is configured. */\n    openStream(input: OpenStreamInput<User>): Promise<StreamHandle>;\n    /** Attach a reader at `from` — the same call serves a first-touch subscriber (`from: 0`), a late\n     *  joiner (`from` = the seq its IVM view shows), and a reconnect (`from` = `Last-Event-ID`).\n     *  Terminates with `end`, or with `stale`/`absent` when the client should fall back to the\n     *  durable plane (both are ordinary answers, never errors). */\n    subscribeStream(input: SubscribeStreamInput<User>): Promise<StreamSubscription>;\n    /** Parse a default `{streamId, from?}` subscribe body and run {@link subscribeStream}. For the\n     *  GET + `EventSource` shape, use {@link streamResponse} (or build the body with\n     *  `streamRequestFromHttp(request)` yourself). */\n    handleStreamJson(body: unknown, context: ApiContext<User>): Promise<StreamSubscription>;\n    /** The subscribe route in ONE call: parse a GET (`?streamId=…&from=…`, with `Last-Event-ID`\n     *  winning), authorize + subscribe, and encode the SSE response. A refusal comes back as a JSON\n     *  error `Response` (403 for denied or unconfigured) rather than a throw, so the route body is a\n     *  single expression after authentication. For custom transports, compose\n     *  `streamRequestFromHttp` + {@link subscribeStream} + `streamFramesToSse` instead. */\n    streamResponse(request: {\n        url: string;\n        headers: {\n            get(name: string): string | null;\n        };\n    }, context: ApiContext<User> & {\n        keepAliveMs?: number;\n    }): Promise<Response>;\n    /** Checkpoint every live stream's outstanding tail, then seal it `interrupted`\n     *  (LM-STREAM-CHECKPOINT §5). Wire it to SIGTERM: without it a rolling deploy drops each\n     *  response's un-checkpointed tail and strands rows saying `streaming` forever. */\n    drainStreams(): Promise<void>;\n    createQueryLease(input: QueryLeaseRequest<User>): Promise<QueryLeaseResponse>;\n    /** (Re-)materialize every `pinnedQueries` entry with a pinned policy. Idempotent — the daemon\n     *  dedupes by canonical query, so a re-assert reuses the existing materialization. Call it at\n     *  startup and whenever the daemon restarts (e.g. from the daemon-client `onBootId` hook), since\n     *  the daemon holds no durable materialization state. No-op when `pinnedQueries` is empty. */\n    assertPins(): Promise<void>;\n    pushMutation(input: PushMutationRequest<User>): Promise<PushMutationResponse>;\n    /** Apply an in-order batch (the client mutation queue's flush). Envelopes run strictly\n     *  sequentially; a rejection still advances the daemon's lmid, so later envelopes in the\n     *  batch stay contiguous and keep applying. A daemon ERROR throws for the whole batch —\n     *  the client retries it and the daemon's mid dedup absorbs the already-applied prefix. */\n    pushMutations(input: PushMutationsRequest<User>): Promise<PushMutationResponse[]>;\n    /** One-shot SSR read (SSR-DESIGN.md §6): resolve `(name, args)` → AST (same authority path as a\n     *  lease, `authorizeQuery` enforced), have the daemon serialize the current view once, and return\n     *  the assembled rows for the loader to seed + dehydrate. Registers NO subscriber — a dropped\n     *  render leaks nothing; the pipeline self-reclaims after the idle TTL ({@link\n     *  RindleApiServerOptions.readIdleTtlMs}) unless the browser's follow-up `subscribe` lands first. */\n    readQuery(input: QueryReadRequest<User>): Promise<QueryReadResponse>;\n    handleQueryJson(body: unknown, context: ApiContext<User>): Promise<QueryLeaseResponse>;\n    /** Parse a default `{name, args}` read body and run {@link readQuery}. */\n    handleReadJson(body: unknown, context: ApiContext<User>): Promise<QueryReadResponse>;\n    /** Accepts `{envelope}` (one) or `{envelopes: [...]}` (an in-order batch → array reply). */\n    handleMutateJson(body: unknown, context: ApiContext<User>): Promise<PushMutationResponse | PushMutationResponse[]>;\n    /** The room's flush (§5.3.1): gate on `authorizeRoom`, forward the txn to the write\n     *  authority, and pass the store's verdict through VERBATIM — `200 {applied, cv}`,\n     *  `409 {error:\"fenced\"|\"conflict\", …}`, or the loud identity `500`. Write\n     *  `status` + `body` as-is; the room's `httpAuthority` decodes them. */\n    handleApplyRowChangeTxnJson(body: unknown, context: ApiContext<User>): Promise<RoomHostResponse>;\n    /** Claim the next placement epoch for a doc (§2.5), same gate + envelope. */\n    handleClaimRoomEpochJson(body: unknown, context: ApiContext<User>): Promise<RoomHostResponse>;\n    /** The room's boot probe (§3.3), same gate + envelope. */\n    handleRoomLmidsJson(body: unknown, context: ApiContext<User>): Promise<RoomHostResponse>;\n    /** The DO shell's cold-boot callback (§10.1; enablement §3.1): authenticate the shell\n     *  secret, resolve the doc's footprint, claim the placement epoch, mint the upstream\n     *  lease and the flush leg. 403 until {@link RindleApiServerOptions.realtime} is set. */\n    handleRoomBootJson(body: unknown, context: ApiContext<User>): Promise<RoomHostResponse>;\n}"},{"name":"RindleApiErrorCode","signature":"export type RindleApiErrorCode = \"bad-request\" | \"forbidden\" | \"not-found\" | \"rejected\";"},{"name":"RindleApiError","signature":"export declare class RindleApiError extends Error {\n    readonly code: RindleApiErrorCode;\n    readonly status: number;\n    constructor(code: RindleApiErrorCode, message: string, status: number);\n}"},{"name":"SplitDaemonClient","signature":"/**\n * A read/write-split `RindleDaemonClient` (READ-ROUTER-DESIGN.md §2.1). Writes\n * (`executeSqlTxn` / `rejectMutation` / `applyRowChangeTxn` / `migrate`) go to the single\n * write-master, UNCHANGED and never through the router; reads (`materialize` / `query` /\n * `dematerialize`, and raw `executeSqlRead`) go to the read router. Raw reads default to a replica\n * (`consistency:\"eventual\"`) so they scale off the write-master; pass `consistency:\"strong\"` on a\n * read to route it to the master for read-your-writes after a write to the same data. Hand one of\n * these to {@link createRindleApiServer} as `daemon` to point the reads leg at the router while\n * writes stay on the master — no placement logic enters the api-server.\n *\n * ```ts\n * const daemon = new SplitDaemonClient(\n *   new HttpRindleDaemonClient({ baseUrl: MASTER_URL, headers: writeAuth }),  // writes → master\n *   new HttpRindleDaemonClient({ baseUrl: ROUTER_URL, headers: routerAuth }), // reads  → router\n * );\n * ```\n */\nexport declare class SplitDaemonClient implements RindleDaemonClient {\n    private readonly writes;\n    private readonly reads;\n    constructor(writes: RindleDaemonClient, reads: RindleDaemonClient);\n    executeSqlTxn(input: SqlTxn): Promise<SqlTxnOutput>;\n    executeSqlRead(input: SqlRead): Promise<SqlReadOutput>;\n    rejectMutation(input: MutationRejection): Promise<MutationRejectionOutput>;\n    beginMutationSession(input: MutationSessionBegin): Promise<MutationSessionBeginOutput>;\n    execInMutationSession(input: MutationSessionExec): Promise<unknown>;\n    queryInMutationSession(input: MutationSessionQuery): Promise<SqlReadOutput>;\n    commitMutationSession(input: MutationSessionRef): Promise<SqlTxnOutput>;\n    rollbackMutationSession(input: MutationSessionRef): Promise<unknown>;\n    applyRowChangeTxn(input: RowChangeTxn): Promise<RowChangeTxnOutput>;\n    claimRoomEpoch(input: ClaimRoomEpochInput): Promise<ClaimRoomEpochOutput>;\n    roomLmids(input: RoomLmidsInput): Promise<RoomLmidsOutput>;\n    migrate(input: MigrateInput): Promise<MigrateOutput>;\n    materialize(input: MaterializeInput): Promise<MaterializeOutput>;\n    query(input: QueryOnceInput): Promise<QueryOnceOutput>;\n    dematerialize(input: DematerializeInput): Promise<DematerializeOutput>;\n}"},{"name":"SqlDialect","signature":"/** A SQL dialect for the logical mutation renderer. */\nexport interface SqlDialect {\n    readonly name: \"sqlite\" | \"postgres\";\n    /** Render the i-th (1-based) bind placeholder. sqlite: `?`; postgres: `$i`. */\n    placeholder(oneBased: number): string;\n    /** Optional value coercion hook (e.g. a future SQLite `0/1` boolean). Default: identity. */\n    encodeValue?(v: WireValue, type: ColType): WireValue;\n}"},{"name":"sqliteDialect","signature":"export declare const sqliteDialect: SqlDialect;"},{"name":"postgresDialect","signature":"export declare const postgresDialect: SqlDialect;"},{"name":"TableRenderMeta","signature":"/** Per-table metadata the renderer needs (all reachable from a `TableMeta`). */\nexport interface TableRenderMeta {\n    /** Columns in schema (wire) order — the stable INSERT column list + completeness check. */\n    columns: string[];\n    /** Primary-key column NAMES — the WHERE / ON CONFLICT target / SET partition. */\n    pkNames: string[];\n    /** Column name → declared type (only consulted by {@link SqlDialect.encodeValue}). */\n    types: Record<string, ColType>;\n    /** Columns a full insert must name — the non-nullable ones (design 206 §6.2). */\n    required: string[];\n    /** The nullable (omittable-to-null) columns — an omitted one binds `NULL` (design 206 §6.2). */\n    nullable: ReadonlySet<string>;\n}"},{"name":"RenderIndex","signature":"export type RenderIndex = Record<string, TableRenderMeta>;"},{"name":"buildRenderIndex","signature":"/** Build the {@link RenderIndex} from a typed schema (`schema.tables[name]` is a `TableMeta`). */\nexport declare function buildRenderIndex(schema: Schema): RenderIndex;"},{"name":"renderOp","signature":"/** Render one {@link MutationOp} to a `{sql, params}` for the dialect, or `null` for a no-op (an\n *  `update` whose row names only pk columns — nothing to SET, matching the client's no-op edit). */\nexport declare function renderOp(op: MutationOp, meta: TableRenderMeta, dialect: SqlDialect): SqlStatement | null;"},{"name":"renderPointRead","signature":"/** Render a point read (`tx.row`) — `SELECT <cols> FROM \"T\" WHERE <pk>` — for read-your-writes. */\nexport declare function renderPointRead(table: string, pk: KeyedRow, meta: TableRenderMeta, dialect: SqlDialect): SqlStatement;"},{"name":"BackendError","signature":"/** Thrown (wrapping the driver error) by a server tx's DB calls, so the seam can tell an INFRA\n *  failure (retry) from a mutator-body throw (business rejection). */\nexport declare class BackendError extends Error {\n    readonly driverError: unknown;\n    constructor(driverError: unknown);\n}"},{"name":"daemonBackend","signature":"/** Legacy/private-plane adapter. Kept for existing deployments; its mutation policy is shared with\n * {@link sqlBackend}, so the two transports cannot drift. */\nexport declare function daemonBackend(daemon: RindleDaemonClient): MutationBackend;"},{"name":"sqlBackend","signature":"/** Run API-server mutators through `@rindle/sql-client`'s explicit mutation facade. Query leases,\n * SSR reads and room control continue to use `daemon`; only authoritative mutation execution moves\n * to the versioned SQL transport. */\nexport declare function sqlBackend(sql: SqlSession): MutationBackend;"},{"name":"PgQuery","signature":"/** The query surface a {@link PostgresPlugger} transaction exposes. `exec` runs one statement;\n *  `query` returns rows keyed by column name (read-your-own-writes inside the txn). */\nexport interface PgQuery {\n    exec(sql: string, params?: unknown[]): Promise<void>;\n    query(sql: string, params?: unknown[]): Promise<Array<Record<string, unknown>>>;\n}"},{"name":"PostgresPlugger","signature":"/** The thin driver adapter that keeps `pg` / `postgres.js` out of this package's dependencies\n *  (`BYO-POSTGRES-LMID-CONTRACT-DESIGN.md` §6.2): run `fn` inside ONE transaction — commit on\n *  resolve, roll back on throw. {@link pgPoolPlugger} adapts a node-postgres `Pool`. */\nexport interface PostgresPlugger {\n    transaction<T>(fn: (q: PgQuery) => Promise<T>): Promise<T>;\n}"},{"name":"PostgresBackendOptions","signature":"export interface PostgresBackendOptions {\n    /** Rewrite each MUTATOR statement's SQL before it runs (never the lmid upsert). The intended\n     *  use is dialect bridging for a dual-topology app whose mutators are written SQLite-style:\n     *  pass {@link questionToDollarParams} to convert `?` placeholders to `$1..$n`. */\n    rewriteSql?: (sql: string) => string;\n}"},{"name":"postgresBackend","signature":"/**\n * The BYO-Postgres {@link MutationBackend} (`BYO-POSTGRES-LMID-CONTRACT-DESIGN.md` §6.3): one PG\n * transaction runs the mutator's statements and ALWAYS upserts `_rindle_client_mutations` —\n * the upsert sits outside any acceptance guard by construction, so the §2.4 footgun (a rejection\n * that forgets to advance `lmid` and wedges the client's pending queue) cannot be written.\n *\n * Confirmation does NOT come from this call's response: the lmid row rides the same PG commit\n * through CDC → relay → follower and reaches the client in the same coherent release as the\n * data (§8.2 relocated upstream). A rejection's `reason` still returns on the HTTP reply, but\n * nothing rejection-shaped travels the replication path — the optimistic prediction snaps back\n * when the advanced `lmid` arrives.\n */\nexport declare function postgresBackend(plugger: PostgresPlugger, opts?: PostgresBackendOptions): MutationBackend;"},{"name":"PgPoolLike","signature":"/** The slice of a node-postgres `Pool` the plugger needs — structural, so `pg` stays a\n *  dependency of the APP, never of this package. */\nexport interface PgPoolLike {\n    connect(): Promise<{\n        query(sql: string, params?: unknown[]): Promise<{\n            rows: Array<Record<string, unknown>>;\n        }>;\n        release(err?: unknown): void;\n    }>;\n}"},{"name":"pgPoolPlugger","signature":"/** Adapt a node-postgres `Pool` (or anything pool-shaped) to a {@link PostgresPlugger}:\n *  one client per transaction, `BEGIN`/`COMMIT` bracketing, `ROLLBACK` + rethrow on failure. */\nexport declare function pgPoolPlugger(pool: PgPoolLike): PostgresPlugger;"},{"name":"questionToDollarParams","signature":"/**\n * Rewrite SQLite-style `?` positional placeholders to Postgres `$1..$n`, for mutators written\n * once and run against either backend (pass as {@link PostgresBackendOptions.rewriteSql}).\n * Skips `'…'` string literals (with `''` escapes), `\"…\"` quoted identifiers, `--` line comments,\n * and non-nested C-style block comments. Do not mix `?` and `$n` styles in one statement.\n */\nexport declare function questionToDollarParams(sql: string): string;"},{"name":"defineApiQueries","signature":"export declare function defineApiQueries<User, Q extends ApiQueries<User>>(queries: Q): Q;"},{"name":"registerQueries","signature":"/**\n * Register a list of co-located client {@link NamedQuery `defineQuery`} values as the server's query\n * surface — the bulk, no-boilerplate counterpart to {@link defineApiQueries}. Each query already\n * carries its wire `name` and a `resolve` that re-runs its validator on the UNTRUSTED wire args and\n * builds the authoritative `Query`, so the server just imports every co-located query and hands the\n * list here. The same validated args build a byte-identical AST on both tiers.\n *\n * The query's AUTHORITATIVE {@link ApiContext} is forwarded as `resolve`'s ctx — so a context-scoped\n * `defineQuery` (e.g. \"my issues\") is built from the server's trusted principal, never the client's.\n * A context-free query simply ignores the extra argument.\n *\n * Use {@link defineApiQueries} instead (or in addition) only when the server must DIVERGE from the\n * client — define a server-specific `defineQuery` with the same name and register that.\n *\n * ```ts\n * queries: registerQueries<User>([issuesPageQuery, issueDetailQuery, recentCommentsQuery, usersQuery]),\n * ```\n */\nexport declare function registerQueries<User>(queries: readonly NamedQuery<any, any, any>[]): ApiQueries<User>;"},{"name":"defineApiMutators","signature":"export declare function defineApiMutators<User, M extends ApiMutators<User>>(mutators: M): M;"},{"name":"sharedApiMutators","signature":"/**\n * Bulk-register a SHARED (generator) mutator registry as server mutators — the mutator twin of\n * {@link registerQueries} (which does the same for co-located `defineQuery` values). Each shared\n * mutator carries its own arg validator (`shared(schema, gen)`), so this wraps every one with the\n * UNIVERSAL server triad and nothing else: parse the UNTRUSTED wire args (its `.args`), map the server\n * {@link MutationContext} to the shared {@link MutatorCtx} principal, and drive the SAME body the\n * client predicts ({@link runSharedMutation}). The point is that a shared mutator whose server run\n * adds NO authority beyond that triad needs no hand-written wrapper.\n *\n * Server-only AUTHORITY the client cannot predict (a title guard, an owner-gated cascade, a\n * `NOT EXISTS` dedup) stays an explicit {@link ApiMutator} that OVERRIDES the auto-wrapped default —\n * spread this first, then the overrides win by key:\n *\n * ```ts\n * mutators: defineApiMutators({\n *   ...sharedApiMutators(sharedMutators, (ctx) => ({ user: requireUser(ctx.user) })),\n *   createIssue: withTitleGuard(sharedMutators.createIssue), // + server-only policy\n *   deleteIssue: async (tx, raw, ctx) => { ... },            // raw owner-gated cascade\n * }),\n * ```\n */\nexport declare function sharedApiMutators<User>(registry: Record<string, SharedMutatorWithArgs<any>>, principal: (ctx: MutationContext<User>) => MutatorCtx): ApiMutators<User>;"},{"name":"guardMutator","signature":"/**\n * Wrap a SHARED (generator) mutator with a row-level ACCESS GUARD — the multi-tenant authz twin of\n * {@link sharedApiMutators}. It parses the untrusted wire args, derives the {@link MutatorCtx}\n * principal (the SAME mapping you pass to `sharedApiMutators`), evaluates `predicate` against the OPEN\n * mutation txn (so it can READ the rows the write depends on), and throws `forbidden` (403 — the\n * client's optimistic write snaps back) when access is denied; otherwise it drives the SAME body the\n * client predicts ({@link runSharedMutation}). Use it for the entries that need server-only authority\n * the client cannot predict, OVERRIDING the auto-wrapped default (spread `sharedApiMutators(...)`\n * first, then the guarded overrides win by key):\n *\n * ```ts\n * const principal = (ctx) => ({ user: requireUser(ctx.user) });\n * mutators: defineApiMutators({\n *   ...sharedApiMutators(sharedMutators, principal),\n *   updateSlide: guardMutator(sharedMutators.updateSlide, principal,\n *     async (tx, a, { user }) =>\n *       (await tx.query(q.slide.where.id(a.slideId).where(editableBy(user)).one())) != null,\n *     { message: \"not permitted to edit this slide\" }),\n * }),\n * ```\n *\n * The predicate keeps the shared body READ-FREE, so the client's `.folded` hot paths (drag/keystroke)\n * still fold — the read is server-side only. Return `false` to deny (→ the default or `opts.message`\n * forbidden); return `true`/nothing to allow. To reject with a different status/message (a business\n * rejection, a not-found), throw a {@link RindleApiError} from inside the predicate instead. `principal`\n * runs before the predicate, so it too may throw `forbidden` for an anonymous caller.\n */\nexport declare function guardMutator<User, Args>(gen: SharedMutatorWithArgs<Args>, principal: (ctx: MutationContext<User>) => MutatorCtx, predicate: (tx: ServerMutationTx, args: Args, ctx: MutatorCtx) => boolean | void | Promise<boolean | void>, opts?: {\n    message?: string;\n}): ApiMutator<User, unknown>;"},{"name":"ShapeExemplar","signature":"/** One exemplar invocation for {@link dumpQueryShapes} — the `args`/`user` a query is built with.\n *  Literal values never matter to the dump (shapes are deduped with literals stripped); what an\n *  exemplar buys is BRANCH coverage, so supply one per code path a query function can take\n *  (an optional filter present/absent, each enum axis, …). */\nexport interface ShapeExemplar<User = unknown> {\n    args?: unknown;\n    user?: User;\n}"},{"name":"QueryShapesDoc","signature":"/** The query-shapes document `rindle indices suggest` consumes: the app's synced tables (name +\n *  primary key) and one wire AST per structurally distinct shape a registered query can build. */\nexport interface QueryShapesDoc {\n    tables: Array<{\n        name: string;\n        primaryKey: string[];\n    }>;\n    queries: Array<{\n        name: string;\n        ast: Ast;\n    }>;\n}"},{"name":"dumpQueryShapes","signature":"/**\n * Dump every registered named query's wire AST — feeder 1 (\"exemplar enumeration\") of\n * `rindle indices suggest` (docs/INDEXING.md applied mechanically to the query set).\n *\n * Because named queries are FUNCTIONS of `(args, ctx)`, one query can build structurally\n * different ASTs on different args; each exemplar invocation contributes its shape, and shapes\n * that differ only in literal values (a limit, a filter string) dedupe to one entry. A query\n * with no configured exemplars is invoked once with no args. The registry is the app's whole\n * server-side query surface, so the resulting document is the complete static shape set —\n * modulo arg-value-dependent branches, which need an exemplar (or runtime shape recording) to\n * surface.\n */\nexport declare function dumpQueryShapes<User>(opts: {\n    schema: Schema;\n    queries: ApiQueries<User>;\n    exemplars?: Partial<Record<string, ReadonlyArray<ShapeExemplar<User>>>>;\n}): Promise<QueryShapesDoc>;"},{"name":"createRindleApiServer","signature":"export declare function createRindleApiServer<User = unknown>(options: RindleApiServerOptions<User>): RindleApiServer<User>;"},{"name":"runSharedMutation","signature":"/** Run a SHARED generator mutator (the SAME body the client predicts) against a live server\n *  transaction (MUTATORS-ISOMORPHIC): bind the tier-agnostic {@link isoTx} factory and drive it —\n *  each yielded logical op renders + runs against `tx` (dialect SQL, per backend), each `tx.row`\n *  suspends for read-your-writes, and `tx.all` fans out. A server mutator uses this to delegate its\n *  write body after parsing untrusted args and applying its server-only authority (principal, policy).\n *  A mutator-body throw remains a business rejection; a DB failure propagates as infra. */\nexport declare function runSharedMutation<Args, Ctx extends MutatorCtx>(mutator: SharedMutator<Args, Ctx>, args: Args, ctx: Ctx, tx: ServerMutationTx): Promise<void>;"}]},{"source":"packages/cli/src/platform.ts","declarations":[{"name":"Libc","signature":"export type Libc = \"gnu\" | \"musl\";"},{"name":"Binary","signature":"/** A native binary shipped by the Rindle development toolchain. */\nexport type Binary = \"rindle\" | \"rindled\" | \"rindle-replicator\" | \"rindle-dev-edge\";"},{"name":"platformKey","signature":"/**\n * The package-name suffix identifying a build target for the current (or given) host:\n * `darwin-{arm64,x64}`, `linux-{x64,arm64}-{gnu,musl}`, `win32-x64-msvc`. Throws\n * `UnsupportedPlatformError` for a host we don't publish binaries for.\n */\nexport declare function platformKey(platform?: NodeJS.Platform, arch?: string, libc?: Libc): string;"},{"name":"platformPackageName","signature":"/** The npm package name carrying the binaries for `key` (default: the current host's key). */\nexport declare function platformPackageName(key?: string): string;"},{"name":"binaryName","signature":"/** The on-disk filename of `bin` inside a platform package (`rindle` / `rindled.exe`). */\nexport declare function binaryName(bin: Binary, platform?: NodeJS.Platform): string;"},{"name":"UnsupportedPlatformError","signature":"export declare class UnsupportedPlatformError extends Error {\n    constructor(platform: string, arch: string);\n}"}]},{"source":"packages/cli/src/index.ts","declarations":[{"name":"binaryPath","signature":"/**\n * Absolute path to a native Rindle toolchain binary for the current platform.\n *\n * Resolution order:\n *  1. The binary's explicit `*_BINARY_PATH` override.\n *  2. `RINDLE_BIN_DIR` — a directory holding the co-located toolchain. Point it at\n *     `target/release` after building the four binary crates and one env var lights up the fleet.\n *  3. The matching `@rindle/cli-<key>` optional dependency that npm/pnpm installed.\n *\n * Throws `UnsupportedPlatformError` for an un-targeted host, or a descriptive Error if the\n * platform package isn't installed (e.g. installed with `--no-optional`, or on a host the last\n * publish didn't target) and no override is set.\n */\nexport declare function binaryPath(bin: Binary): string;"},{"name":"rindleBinaryPath","signature":"/** Absolute path to the `rindle` CLI binary for the current platform. See {@link binaryPath}. */\nexport declare function rindleBinaryPath(): string;"},{"name":"rindledBinaryPath","signature":"/** Absolute path to the `rindled` daemon binary for the current platform. See {@link binaryPath}. */\nexport declare function rindledBinaryPath(): string;"},{"name":"spawnBinary","signature":"/** Spawn `bin` with `args`, inheriting stdio by default. A thin wrapper over `child_process.spawn`. */\nexport declare function spawnBinary(bin: Binary, args?: string[], options?: SpawnOptions): ChildProcess;"},{"name":"spawnRindle","signature":"/** Spawn the `rindle` CLI with `args`. See {@link spawnBinary}. */\nexport declare function spawnRindle(args?: string[], options?: SpawnOptions): ChildProcess;"},{"name":"spawnRindled","signature":"/** Spawn the `rindled` daemon with `args`, for embedding it in a Node supervisor. See {@link spawnBinary}. */\nexport declare function spawnRindled(args?: string[], options?: SpawnOptions): ChildProcess;"}]},{"source":"packages/devtools/src/ast.ts","declarations":[{"name":"collectTables","signature":"/** Every base table this query can read: the root, each `related` subquery, and any correlated\n *  subquery in the `where` tree (recursively). Mirrors the optimistic backend's `queryTables`\n *  derivation (DEBUG-TOOLS-BROWSER-DESIGN §4.2 — a `count(comments)` subquery names `comment`, so a\n *  comment mutation flips this query's pending axis). */\nexport declare function collectTables(ast: Ast, into?: Set<string>): Set<string>;"},{"name":"summarizeAst","signature":"/** A compact, one-line description of a query AST for the inspector header — best-effort and\n *  truncation-friendly (the full AST is available for a collapsible pretty-print alongside). */\nexport declare function summarizeAst(ast: Ast): string;"}]},{"source":"packages/devtools/src/types.ts","declarations":[{"name":"FoldInspect","signature":"/** One folded entry's debounce window — mirror of `@rindle/optimistic`'s `FoldInspect`. */\nexport interface FoldInspect {\n    foldKey: string;\n    debounceMs: number;\n    maxWaitMs?: number;\n    deferAcrossWrites: boolean;\n    flushed: boolean;\n}"},{"name":"PendingInspect","signature":"/** One pending mutation — mirror of `@rindle/optimistic`'s `PendingInspect`. */\nexport interface PendingInspect {\n    key: string;\n    mid: number | null;\n    name: string;\n    args: unknown;\n    tables: string[];\n    fold?: FoldInspect;\n}"},{"name":"OptimisticInspect","signature":"/** A snapshot of the optimistic loop — mirror of `@rindle/optimistic`'s `OptimisticInspect`. */\nexport interface OptimisticInspect {\n    pending: PendingInspect[];\n    confirmedLmid: number;\n    nextMid: number;\n    appliedCv: number;\n    bufferedFrames: number;\n    pendingTables: string[];\n}"},{"name":"DevtoolsStore","signature":"/** The Store surface the core reads (a structural subset of `@rindle/client`'s `Store`). The delta\n *  + resultType taps are the SUPPORTED app-facing seams (no private devtools back door). */\nexport interface DevtoolsStore {\n    subscribeChanges(listener: (qid: QueryId, ev: ChangeEvent) => void): () => void;\n    subscribeResultType(listener: (qid: QueryId, rt: ResultType) => void): () => void;\n    __inspect(sampleRows?: number): StoreInspect;\n}"},{"name":"DevtoolsBackend","signature":"/** Optional backend-side devtools capabilities. `__inspect` is present on `OptimisticBackend`;\n *  `__attachDevtoolsServerDeltas` is present on backends that can surface authoritative server\n *  frames separately from the Store's post-apply view stream. */\nexport interface DevtoolsBackend {\n    __inspect?(): OptimisticInspect;\n    __attachDevtoolsServerDeltas?(observer: BackendDevObserver): () => void;\n}"},{"name":"DevtoolsTarget","signature":"/** What {@link attachDevtools} binds to: a `createRindleClient` app, or any `{ store, backend }`. */\nexport interface DevtoolsTarget {\n    store: DevtoolsStore;\n    /** Narrowed to {@link DevtoolsBackend} at runtime when it carries `__inspect` (capability probe). */\n    backend?: unknown;\n}"},{"name":"MutationState","signature":"/** A mutation's place in the fork/rebase lifecycle (DEBUG-TOOLS-BROWSER-DESIGN §4.1). */\nexport type MutationState = \"pending\" | \"confirmed\" | \"dropped\";"},{"name":"TimelineEntry","signature":"/** One row of the mutation timeline — the optimistic loop made visible. */\nexport interface TimelineEntry {\n    /** Stable identity across snapshots: the pending key (`m:<mid>` once a mid is dealt, else\n     *  `f:<foldKey>` while a fold debounces). Retained after the entry settles. */\n    id: string;\n    /** The wire mutation id, or `null` for a still-folding entry. */\n    mid: number | null;\n    name: string;\n    args: unknown;\n    /** Tables the mutator touched (its pending-axis footprint). */\n    tables: string[];\n    state: MutationState;\n    /** True for a debounced/folded write; `fold` carries its window while it is live. */\n    folded: boolean;\n    fold?: FoldInspect;\n    /** Devtools-clock ms at first observation (invoke). */\n    invokedAt: number;\n    /** Devtools-clock ms when it left the pending stack (confirmed or dropped). */\n    settledAt?: number;\n    /** Heuristic (§4.1): view churn coincided with this mutation's confirmation — a POSSIBLE\n     *  snap-back (the optimistic prediction diverged from the authoritative server result). Labeled\n     *  \"possible\" because unrelated server data released in the same coherent batch also shows churn;\n     *  a precise signal needs a reconcile-boundary event (a future engine seam). */\n    reconciledWithChurn: boolean;\n    /** qids of live queries whose tables this mutation touches (computed against the current views). */\n    affectedQueries: number[];\n}"},{"name":"QueryEntry","signature":"/** One materialized view in the queries inspector (DEBUG-TOOLS-BROWSER-DESIGN §4.2). */\nexport interface QueryEntry {\n    qid: number;\n    ast: Ast;\n    /** The root table (`ast.table`). */\n    table: string;\n    /** A one-line human summary of the AST (table, filters, order, limit, relationships). */\n    summary: string;\n    /** Every base table the query reads (root + correlated subqueries). */\n    tables: string[];\n    resultType: ResultType;\n    rowCount: number;\n    sample: readonly unknown[];\n    /** Does any pending mutation touch this query's tables? (the §7.2 pending axis). */\n    pending: boolean;\n}"},{"name":"DeltaKind","signature":"/** The kind of a delta-stream row. `child` is an Add/Remove/Edit addressed at a NESTED path\n *  (`depth > 0`) — rindle's relationship-level change (DEBUG-TOOLS-BROWSER-DESIGN §4.3). */\nexport type DeltaKind = \"hello\" | \"snapshot\" | \"add\" | \"remove\" | \"edit\";"},{"name":"DeltaEntry","signature":"/** One entry of the live delta stream — the IVM change primitive made visible (§4.3). */\nexport interface DeltaEntry {\n    seq: number;\n    at: number;\n    qid: number;\n    kind: DeltaKind;\n    /** Nesting depth of the change path: 0 = top-level row, >0 = a child (relationship) change. */\n    depth: number;\n    /** A compact, human-readable description of the change. */\n    label: string;\n}"},{"name":"DevtoolsState","signature":"/** The whole devtools snapshot a panel renders. Reference-stable arrays between updates where the\n *  underlying data did not change is NOT guaranteed — panels should treat each `getState()` as fresh. */\nexport interface DevtoolsState {\n    /** Newest-last mutation timeline (capped). */\n    timeline: TimelineEntry[];\n    /** Every live materialized view. */\n    queries: QueryEntry[];\n    /** Newest-last delta stream ring (capped). */\n    deltas: DeltaEntry[];\n    /** The raw optimistic-loop snapshot, when the backend exposes one (a \"loop\" summary line). */\n    optimistic?: OptimisticInspect;\n    capabilities: {\n        optimistic: boolean;\n    };\n}"},{"name":"DevtoolsCoreOptions","signature":"/** Construction options for {@link DevtoolsCore}. */\nexport interface DevtoolsCoreOptions {\n    /** Max timeline rows retained (oldest settled rows drop first). Default 200. */\n    timelineCap?: number;\n    /** Max delta-stream rows retained. Default 500. */\n    deltaCap?: number;\n    /** Per-query row sample size pulled from the store. Default 25. */\n    sampleRows?: number;\n    /** Safety-net poll interval (ms) that catches state moves with no event — a fold's debounced\n     *  flush, or a pending flip on an already-`complete` query. Default 0 (off); {@link attachDevtools}\n     *  turns it on. */\n    pollMs?: number;\n    /** Coalesce event-driven recomputes onto a microtask. Default true; tests pass `false` and drive\n     *  recomputes explicitly via {@link DevtoolsCore.refresh}. */\n    autoFlush?: boolean;\n    /** Injectable clock (ms). Default `Date.now`; tests inject a deterministic counter. */\n    now?: () => number;\n}"}]},{"source":"packages/devtools/src/core.ts","declarations":[{"name":"DevtoolsCore","signature":"export declare class DevtoolsCore {\n    private readonly store;\n    private readonly backend?;\n    private readonly detachStore;\n    private readonly detachServerDeltas?;\n    private readonly hasServerDeltaTap;\n    private readonly timelineCap;\n    private readonly deltaCap;\n    private readonly sampleRows;\n    private readonly autoFlush;\n    private readonly now;\n    private readonly pollHandle?;\n    private readonly timeline;\n    private readonly order;\n    /** The pending keys seen at the previous recompute — the diff basis for lifecycle transitions. */\n    private prevPendingKeys;\n    private deltas;\n    private deltaSeq;\n    /** Set by a `batch` delta, consumed by the next recompute: did view churn coincide with a\n     *  confirmation this turn? (the §4.1 snap-back heuristic). */\n    private churnSeen;\n    private queries;\n    private optimistic?;\n    private readonly listeners;\n    private dirty;\n    private flushScheduled;\n    private snapshot;\n    /** Optional deregistration from the global hub (set by {@link attachDevtools}). */\n    onDetach?: () => void;\n    constructor(target: DevtoolsTarget, opts?: DevtoolsCoreOptions);\n    /** The current read-model. Reference-stable between updates (rebuilt only on recompute), so it is\n     *  safe to feed a `useSyncExternalStore`-style binding. */\n    getState(): DevtoolsState;\n    /** Subscribe to updates; fires immediately with the current state, then after each recompute. */\n    subscribe(listener: () => void): () => void;\n    /** Force a synchronous recompute (also used by the safety-net poll and by tests). */\n    refresh(): void;\n    /** Clear the delta stream ring (a panel \"clear\" affordance). */\n    clearDeltas(): void;\n    /** Drop every SETTLED timeline row (confirmed/dropped), keeping live pending ones + the deltas. */\n    clearHistory(): void;\n    /** Detach from the client: stop the poll, drop the store tap, deregister from the global hub. */\n    detach(): void;\n    private attachServerDeltas;\n    private onStoreDelta;\n    private onServerDelta;\n    private onResultType;\n    private markDirty;\n    private flush;\n    private recompute;\n    /** Reconstruct the fork/rebase lifecycle by diffing this pending snapshot against the previous\n     *  one (DEBUG-TOOLS-BROWSER-DESIGN §4.1): new keys → invoked; vanished keys → confirmed (mid ≤\n     *  confirmedLmid) or dropped; a fold's `f:<foldKey>` → `m:<mid>` transition is linked, not double\n     *  counted. */\n    private reconcileTimeline;\n    private rebuildQueries;\n    private pushServerDelta;\n    private pushChangeDelta;\n    private pushNormalizedDelta;\n    private appendDelta;\n    private addEntry;\n    private renameEntry;\n}"}]},{"source":"packages/devtools/src/global.ts","declarations":[{"name":"DevtoolsHub","signature":"/** The discovery surface a panel binds to: the set of attached cores + a change subscription. */\nexport interface DevtoolsHub {\n    readonly version: number;\n    readonly cores: readonly DevtoolsCore[];\n    /** Fires whenever a core attaches or detaches (so a panel can pick one up). */\n    subscribe(listener: () => void): () => void;\n    /** Register a core; returns its deregistration function. */\n    register(core: DevtoolsCore): () => void;\n}"},{"name":"getDevtoolsHub","signature":"/** Get (creating on first use) the global devtools hub. A panel calls this to discover attached\n *  clients; it is safe to call before any `attachDevtools`. */\nexport declare function getDevtoolsHub(): DevtoolsHub;"},{"name":"getDevtoolsCore","signature":"/** The most recently attached core, or `undefined` — the common single-app convenience a panel uses. */\nexport declare function getDevtoolsCore(): DevtoolsCore | undefined;"},{"name":"attachDevtools","signature":"/** Attach a devtools pane to a running client (DEBUG-TOOLS-BROWSER-DESIGN §6.2). Call this ONLY in a\n *  dev build (e.g. behind `import.meta.env.DEV` with a dynamic `import(\"@rindle/devtools\")`) so the\n *  pane, its core, and this registration tree-shake out of production. Returns the {@link DevtoolsCore}\n *  (also discoverable via {@link getDevtoolsHub}); call `core.detach()` to unwind. */\nexport declare function attachDevtools(target: DevtoolsTarget, opts?: DevtoolsCoreOptions): DevtoolsCore;"}]},{"source":"packages/devtools/src/index.ts","declarations":[]},{"source":"packages/narrator/src/narrator.ts","declarations":[{"name":"Salience","signature":"export type Salience = \"alert\" | \"info\" | \"ambient\";"},{"name":"NarrateContext","signature":"/** Context a template may interpolate — e.g. a human label for the subscription's subject. */\nexport interface NarrateContext {\n    /** A human name for what the query is scoped to (\"the Smith wedding\"). */\n    subject?: string;\n    [k: string]: unknown;\n}"},{"name":"TemplateCtx","signature":"export interface TemplateCtx {\n    row: NamedRow;\n    old?: NamedRow;\n    /** The parent row, for an aggregate/nested change (e.g. the `ticket_type` behind a `sold` count). */\n    parent?: NamedRow;\n    /** Resolve a named sub-row of the change (only populated on `add`). */\n    sub: (alias: string) => NamedRow | null;\n    aggregate?: ResolvedChange[\"aggregate\"];\n    context: NarrateContext;\n}"},{"name":"Template","signature":"export type Template = (ctx: TemplateCtx) => string | null;"},{"name":"RelatedNarrator","signature":"/** Handlers for changes to ONE nested relationship (keyed by its alias in {@link QueryNarrator.related}),\n *  by op — plus an optional salience override for that relationship's events. A nested template reads\n *  `row` (the nested row), `old`, and `parent` (its immediate container — the deck for a slide, the\n *  slide for a component). */\nexport interface RelatedNarrator {\n    /** Override the query's default salience for events on this relationship (else inherits it). */\n    salience?: Salience;\n    add?: Template;\n    remove?: Template;\n    edit?: Template;\n}"},{"name":"QueryNarrator","signature":"export interface QueryNarrator {\n    /** Default importance of this query's events; an op handler may override via the return tuple. */\n    salience: Salience;\n    /** Handlers for changes at the ROOT level, by op. */\n    root?: Partial<Record<\"add\" | \"remove\" | \"edit\", Template>>;\n    /** Handlers for changes to a NESTED relationship, keyed by op — so ONE materialized view narrates\n     *  its whole tree: e.g. a deck's title at the root, slide edits under `slides`, component adds under\n     *  `components`. Key by the relationship's LEAF alias (`components`) for the common case, or by the\n     *  FULL dotted alias-chain from the root (`slides.components`) to disambiguate two relationships that\n     *  share a leaf alias at different tree positions (e.g. `slides.components` vs `appendix.components`).\n     *  A dotted key wins over a leaf key when both match; a bare leaf key still matches at any depth. */\n    related?: Record<string, RelatedNarrator>;\n    /** Handlers for an aggregate slot (`countAs`), keyed by the count's alias. */\n    counts?: Record<string, Template>;\n}"},{"name":"NarratorRegistry","signature":"/** A registry of {@link QueryNarrator}s, keyed by `defineQuery` name. Supplied by the app. */\nexport type NarratorRegistry = Record<string, QueryNarrator>;"},{"name":"SemanticEvent","signature":"/** One rendered semantic event. `text === null` was suppressed by its template (too ambient). */\nexport interface SemanticEvent {\n    query: string;\n    phase: \"snapshot\" | \"batch\";\n    salience: Salience;\n    resolved: ResolvedChange;\n    text: string | null;\n}"},{"name":"Narrator","signature":"export interface Narrator {\n    /** Resolve + render a `FlatChange[]` for a named query into semantic events. `schema` is the\n     *  query's `WireSchema`, captured from its `hello` frame (or read off `view.schema`) — the\n     *  position→name source. */\n    narrate(query: string, schema: WireSchema, changes: FlatChange[], phase: \"snapshot\" | \"batch\", ctx?: NarrateContext): SemanticEvent[];\n    /** Format a batch of rendered events for an agent prompt (salience-marked, suppressions dropped). */\n    digest(events: SemanticEvent[]): string;\n}"},{"name":"SALIENCE_MARK","signature":"/** Per-salience glyph for a rendered line. */\nexport declare const SALIENCE_MARK: Record<Salience, string>;"},{"name":"salienceRank","signature":"/** Order salience high→low. */\nexport declare const salienceRank: (s: Salience) => number;"},{"name":"createNarrator","signature":"/** Build a narrator over an app-supplied {@link NarratorRegistry}. Resolution is driven entirely by\n *  the per-query `WireSchema` passed to {@link Narrator.narrate}, so the narrator holds no schema\n *  state of its own. */\nexport declare function createNarrator(narrators: NarratorRegistry): Narrator;"}]},{"source":"packages/narrator/src/index.ts","declarations":[]},{"source":"packages/react/src/stream.ts","declarations":[{"name":"DEFAULT_STREAM_ENDPOINT","signature":"/** Where {@link useStreamedText} subscribes by default — `DEFAULT_RINDLE_API_ROUTES.stream`, mirrored\n *  here rather than imported so the browser never pulls `@rindle/api-server`. */\nexport declare const DEFAULT_STREAM_ENDPOINT = \"/api/rindle/stream\";"},{"name":"StreamTransport","signature":"/**\n * How the live plane is reached. The default ({@link eventSourceTransport}) is SSE, which is what the\n * api-server's `streamFramesToSse` serves and what gets `Last-Event-ID` resume for free. Supply your\n * own for a WebSocket, a fetch-stream, or a test.\n */\nexport interface StreamTransport {\n    /** Attach at `url` and call `onFrame` per decoded frame. MUST return a detach function; it may be\n     *  called more than once and must tolerate that. `onFrame` may be called synchronously. */\n    subscribe(url: string, onFrame: (frame: StreamFrame) => void): () => void;\n}"},{"name":"UseStreamedTextInput","signature":"export interface UseStreamedTextInput {\n    /** The stream's id — the message row's key. Changing it drops the old tail and rejoins. */\n    streamId: string;\n    /** What the IVM view shows: `assembleDurableText(message, message.chunks)`. Read from a ref\n     *  internally (TRAP 1), so it may change every checkpoint without disturbing the connection. */\n    durable: string;\n    /** Whether a producer is still running — the app's own read of its status column (typically\n     *  `status === \"streaming\" || status === \"pending\"`). The live leg attaches only while true. */\n    live: boolean;\n}"},{"name":"UseStreamedTextOptions","signature":"export interface UseStreamedTextOptions {\n    /** Default {@link DEFAULT_STREAM_ENDPOINT}. `streamId` and `from` are appended as query params. */\n    endpoint?: string;\n    /** Default {@link eventSourceTransport}. Read at subscribe time, NOT a dependency — an inline\n     *  literal would otherwise reconnect on every render. */\n    transport?: StreamTransport;\n    /** A frame that could not be decoded, or a transport-level error. The durable plane is unaffected,\n     *  so this is a diagnostic, not a failure. */\n    onError?: (err: unknown) => void;\n}"},{"name":"streamSubscribeUrl","signature":"/** `<endpoint>?streamId=…&from=…`. `from` is the join offset; a reconnecting `EventSource` overrides\n *  it with its own `Last-Event-ID` header, which the server prefers. */\nexport declare function streamSubscribeUrl(endpoint: string, streamId: string, from: number): string;"},{"name":"eventSourceTransport","signature":"/** The default SSE transport. Absent `EventSource` (SSR, an older runtime, a test without jsdom) it\n *  attaches nothing and the reader stays on the durable plane — correct, just chunkier. */\nexport declare function eventSourceTransport(onError?: (err: unknown) => void): StreamTransport;"},{"name":"useStreamedText","signature":"/**\n * The response text as it should be rendered right now: the durable prefix spliced with the live\n * tail.\n *\n * ```tsx\n * const data = useFragment(MessageFragment, message);\n * const text = useStreamedText({\n *   streamId: data.id,\n *   durable: assembleDurableText(data, data.chunks),\n *   live: data.status === \"streaming\" || data.status === \"pending\",\n * });\n * ```\n *\n * The value is monotone in practice — it only grows while a stream runs — and when the closing\n * checkpoint compacts the chunks into the body it returns the identical string, so there is no\n * flicker at the handoff.\n */\nexport declare function useStreamedText({ streamId, durable, live }: UseStreamedTextInput, options?: UseStreamedTextOptions): string;"}]},{"source":"packages/react/src/index.ts","declarations":[{"name":"AnyFragment","signature":"type AnyFragment = Fragment<any, any, any, any>;"},{"name":"QueryData","signature":"export type QueryData<Q extends AnyQuery> = ReturnType<Q[\"materialize\"]>[\"data\"];"},{"name":"RootData","signature":"export type RootData<Q extends AnyQuery> = QueryLocalData<Q>;"},{"name":"RootRefData","signature":"export type RootRefData<Q extends AnyQuery, F extends Fragment<any, any, any, any>> = QueryData<Q> extends readonly unknown[] ? readonly FragmentRef<F>[] : FragmentRef<F> | null;"},{"name":"RootDetails","signature":"export interface RootDetails {\n    readonly status: ResultType;\n}"},{"name":"RootResult","signature":"export type RootResult<Q extends AnyQuery> = readonly [\n    data: RootData<Q>,\n    details: RootDetails\n];"},{"name":"RootRefResult","signature":"export type RootRefResult<Q extends AnyQuery, F extends Fragment<any, any, any, any>> = readonly [\n    data: RootRefData<Q, F>,\n    details: RootDetails\n];"},{"name":"RindleProps","signature":"export interface RindleProps<S extends ColsMap = ColsMap> {\n    store: Store<S>;\n    /** Default grace window (ms) for every query in this tree — how long a view + its server lease are\n     *  kept warm after the last subscriber unmounts. Defaults to 2s; see {@link QueryReleaseOptions}\n     *  for why, and for the per-call-site override. Treat as a constant: changing it rebuilds the\n     *  caches and tears down every live view. */\n    releaseDelayMs?: number;\n    children?: ReactNode;\n}"},{"name":"QueryLease","signature":"interface QueryLease {\n    id: number;\n    viewKey: string;\n}"},{"name":"SyncLease","signature":"interface SyncLease {\n    id: number;\n    coverageKey: string;\n    /** Resolved grace window for THIS lease (see {@link QueryReleaseOptions}). */\n    releaseDelayMs: number;\n}"},{"name":"QueryCacheOptions","signature":"interface QueryCacheOptions {\n    releaseDelayMs?: number;\n}"},{"name":"QueryReleaseOptions","signature":"/**\n * Per-call-site override for how long a query is kept warm after its LAST subscriber unmounts.\n *\n * The default (2s, or whatever `<Rindle releaseDelayMs>` sets) exists so a changed filter/limit can\n * re-materialize from the still-warm local base while the replacement server lease streams its first\n * answer — it's what keeps navigation from flashing empty. That grace window is wrong for queries you\n * KNOW you will never come back to, the canonical case being typeahead search: every keystroke is a\n * distinct query, so a 2s window leaves one dead view + server subscription open per character typed.\n * Pass `0` there to tear down on unmount:\n *\n * ```tsx\n * const results = useQuery(searchIssues(term), { releaseDelayMs: 0 });\n * ```\n *\n * Treat the value as a constant per call site — changing it re-leases the query (drops the old lease\n * and takes a fresh one), which is wasted work if it changes every render.\n *\n * The rule for a query several components share with DIFFERENT delays is a DEADLINE, not a duration:\n * every release stamps `now + that lease's delay`, and the query stays warm until the latest deadline\n * any of its leases asked for (max-wins over what REMAINS, matching the SSR preload TTL rule in\n * `@rindle/client`'s `ssr.ts`). Two consequences worth internalizing:\n *\n *   - The clock starts when a subscriber LEAVES, never when it arrives — a mounted reader is never\n *     timed out, however long it stays.\n *   - A deadline expires on its own, so a later lease inherits at most the RESIDUE of an older window,\n *     never a fresh copy of it. Unmount a 2s reader, remount a `releaseDelayMs: 0` one 1.9s later and\n *     drop it: teardown lands at the original 2s mark, not 1.9s past it.\n *\n * Only meaningful against a backend that can retain remote queries. A local-only store (the SSR seed\n * over `OneShotBackend`, or a store with no remote leg) always tears its views down on release, so\n * there is no window to shorten.\n */\nexport interface QueryReleaseOptions {\n    /** ms to keep this query warm after the last subscriber unmounts. `0` = release immediately.\n     *  Defaults to the provider's `releaseDelayMs` (2s). */\n    releaseDelayMs?: number;\n}"},{"name":"RindleContextValue","signature":"declare class RindleContextValue {\n    readonly store: Store<ColsMap>;\n    readonly cache: QueryCache;\n    readonly syncCache: SyncQueryCache;\n    constructor(store: Store<ColsMap>, releaseDelayMs: number);\n}"},{"name":"Rindle","signature":"export declare function Rindle<S extends ColsMap>({ store, releaseDelayMs, children }: RindleProps<S>): import(\"react\").FunctionComponentElement<import(\"react\").ProviderProps<RindleContextValue | null>>;"},{"name":"RindleProvider","signature":"export declare const RindleProvider: typeof Rindle;"},{"name":"useRindleStore","signature":"export declare function useRindleStore<S extends ColsMap = ColsMap>(): Store<S>;"},{"name":"RindleSSRProps","signature":"export interface RindleSSRProps<S extends ColsMap = ColsMap> {\n    /** The app schema — used to build the transport-less seed {@link Store} that backs the server\n     *  render and the matching client hydration pass. */\n    schema: Schema<S>;\n    /** The dehydrated first-paint cache from the route loader (`ServerStore.dehydrate()`), embedded in\n     *  the HTML. Read on BOTH the server render and the client's first (hydration) render. */\n    ssrState: DehydratedState;\n    /** Boots the live (wasm-backed) client in the BROWSER — the app's `bootClient`. Called once, after\n     *  hydration, and must resolve to the live optimistic store. Never invoked during the server\n     *  render (SSR seeds are a first-paint concern only). */\n    boot: () => Promise<{\n        store: Store<S>;\n    }>;\n    children?: ReactNode;\n}"},{"name":"RindleSSR","signature":"/**\n * The SSR→SPA store handoff (SSR-DESIGN.md §6.1). Renders `<Rindle>` with a store that swaps from a\n * transport-less SSR seed to the live engine WITHOUT changing a single `useQuery` caller — bind the\n * app's `schema` + `bootClient` and drop it in above the tree:\n *\n *   - Server render + browser HYDRATION: a seed {@link Store} over a {@link OneShotBackend}, hydrated\n *     from `ssrState`. `useQuery` reads its seed via `getServerSnapshot`, so the server and the\n *     client's first render produce identical markup with NO engine on either side — first paint is\n *     the server-rendered data, never a \"Starting…\" splash that would break hydration.\n *   - After hydration: `boot()` starts the wasm IVM engine (browser only), its views are seeded from\n *     the SAME snapshot (so the swap shows the SSR rows with no flash), and the live `subscribe`\n *     reconciles — the page is now a live SPA.\n *\n * Framework-agnostic of the app: everything but `schema`/`boot`/`ssrState` is owned here (previously\n * hand-rolled per app as `src/RindleApp.tsx`).\n */\nexport declare function RindleSSR<S extends ColsMap>({ schema, ssrState, boot, children }: RindleSSRProps<S>): import(\"react\").FunctionComponentElement<RindleProps<S>>;"},{"name":"useQuery","signature":"export declare function useQuery<Q extends AnyQuery>(query: Q, opts?: QueryReleaseOptions): QueryData<Q>;"},{"name":"useQueryStatus","signature":"/** The SERVER-CHANNEL state of a query's view (`@rindle/client` {@link ResultType}): `unknown` while\n *  it loads (not yet server-authoritative), `complete` once the server has answered. A pending\n *  optimistic mutation no longer moves this — that is a separate axis now (FOLDED-MUTATIONS-DESIGN\n *  §7); the `error` variant is reserved and currently unproduced. Shares the same cached/leased view\n *  as {@link useQuery} (so reading both for one query is one subscription), and re-renders only when\n *  the status changes. */\nexport declare function useQueryStatus(query: AnyQuery, opts?: QueryReleaseOptions): ResultType;"},{"name":"useSyncQuery","signature":"/** Retain a named server query for normalized/local-first sync coverage without subscribing React\n *  to that query's broad result tree. The returned value is lifecycle state only; it is `unknown`\n *  until the backend reports that the retained coverage has hydrated. */\nexport declare function useSyncQuery(query: AnyQuery, opts?: QueryReleaseOptions): ResultType;"},{"name":"useRoot","signature":"/** Run a named root query and expose its local React-facing data. Fragment child relationships are\n *  refs, so child components can keep owning their own local reads. Passing a root fragment as the\n *  final argument switches the result to opaque root refs for that fragment. */\nexport declare function useRoot<Q extends AnyQuery>(query: Q): RootResult<Q>;\nexport declare function useRoot<Q extends AnyQuery, F extends AnyFragment>(query: Q, fragment: F): RootRefResult<Q, F>;\nexport declare function useRoot<Q extends AnyQuery>(query: NamedQuery<void, [\n], Q>): RootResult<Q>;\nexport declare function useRoot<Q extends AnyQuery, F extends AnyFragment>(query: NamedQuery<void, [\n], Q>, fragment: F): RootRefResult<Q, F>;\nexport declare function useRoot<Args, Ctx extends readonly unknown[], Q extends AnyQuery>(query: NamedQuery<Args, Ctx, Q>, args: Args, ...ctx: Ctx): RootResult<Q>;\nexport declare function useRoot<Args, Ctx extends readonly unknown[], Q extends AnyQuery, F extends AnyFragment>(query: NamedQuery<Args, Ctx, Q>, args: Args, ...ctxAndFragment: [\n    ...ctx: Ctx,\n    fragment: F\n]): RootRefResult<Q, F>;"},{"name":"useFragment","signature":"/**\n * Read a {@link Fragment}'s local data from an opaque ref.\n *\n * The query boundary calls {@link useRoot} with a fragment argument to retain the full named\n * coverage query and receive root refs. Descendants call `useFragment` with those refs (or child\n * refs returned by a parent fragment read) to open narrow local-only reads for the fields their\n * fragment owns.\n *\n * `ref` is an opaque token created by {@link useRoot} or returned from another local fragment read.\n * The hook opens a narrow local-only query for this exact fragment and keeps the root coverage\n * lease retained while mounted. Passing a legacy projected data object is unsupported.\n */\nexport declare function useFragment<F extends Fragment<any, any, any, any>>(fragment: F, ref: FragmentRef<F> | null | undefined, opts?: QueryReleaseOptions): FragmentData<F> | null;"},{"name":"Frag","signature":"/**\n * Render-prop sugar over {@link useFragment}: does the `null` check once. `from` is a fragment ref\n * (or null/undefined — an absent to-one relationship, an emptied `.one()`, or a row deleted out from\n * under a live read); when the row is present `children(data)` renders, otherwise `fallback` (default\n * nothing). Keeps the per-row subscription isolation — a child-only edit re-renders just this read.\n */\nexport declare function Frag<F extends AnyFragment>({ of, from, fallback, releaseDelayMs, children }: {\n    of: F;\n    from: FragmentRef<F> | null | undefined;\n    fallback?: ReactNode;\n    /** Per-call-site grace window — see {@link QueryReleaseOptions}. */\n    releaseDelayMs?: number;\n    children: (data: FragmentData<F>) => ReactNode;\n}): ReactNode;"},{"name":"SyncQueryCache","signature":"export declare class SyncQueryCache {\n    private readonly entries;\n    private nextLeaseId;\n    private readonly store;\n    private readonly defaultReleaseDelayMs;\n    constructor(store: Store<ColsMap>, opts?: QueryCacheOptions);\n    /** `releaseDelayMs` overrides the cache default for THIS lease only (see\n     *  {@link QueryReleaseOptions}) — `0` asks for no warm window of its own, though an unexpired\n     *  deadline from an earlier lease on this coverage still applies. */\n    retain(coverageKey: string, query: AnyQuery, releaseDelayMs?: number): SyncLease;\n    release(lease: SyncLease): void;\n    subscribe(coverageKey: string, listener: () => void): () => void;\n    resultType(coverageKey: string): ResultType;\n    size(): number;\n    private createHandle;\n    private resolveDelay;\n    /** Arm (or re-arm) the teardown for `entry.releaseDeadline`. Because the deadline is an ABSOLUTE\n     *  instant, re-arming is idempotent — a later release recomputes the same wake-up time instead of\n     *  restarting the window. */\n    private scheduleRelease;\n    private finalizeRelease;\n}"},{"name":"QueryCache","signature":"export declare class QueryCache {\n    private readonly entries;\n    private nextLeaseId;\n    private readonly store;\n    private readonly defaultReleaseDelayMs;\n    constructor(store: Store<ColsMap>, opts?: QueryCacheOptions);\n    /** `releaseDelayMs` overrides the cache default for THIS lease only (see\n     *  {@link QueryReleaseOptions}). Ignored for a local-only store, whose views are always torn down\n     *  on release. */\n    retain<Q extends AnyQuery>(viewKey: string, query: Q, releaseDelayMs?: number): QueryLease;\n    release(lease: QueryLease): void;\n    subscribe(viewKey: string, listener: () => void): () => void;\n    snapshot(viewKey: string, one: boolean): unknown;\n    /** A query's current {@link ResultType} (from its view), or `unknown` before it is retained. */\n    resultType(viewKey: string): ResultType;\n    /** The SSR/hydration snapshot for `viewKey` — the store's preloaded/dehydrated seed, read\n     *  WITHOUT retaining (the server never opens a subscription). Falls back to empty so a\n     *  non-preloaded query renders like an unhydrated one. */\n    serverSnapshot(viewKey: string, one: boolean): unknown;\n    /** The SSR {@link ResultType}: `complete` when a seed exists (server-authoritative first paint),\n     *  else `unknown`. */\n    serverResultType(viewKey: string): ResultType;\n    size(): number;\n    private createSplitEntry;\n    private createSplitLease;\n    private createMaterializedEntry;\n    private createMaterializedLease;\n    private chooseCanonical;\n    private setCanonical;\n    private resolveDelay;\n    /** Hand back every deferred remote lease and cancel the pending teardown, WITHOUT touching\n     *  `entry.releaseDeadline`. Called when a retain revives the entry: the new lease covers the query,\n     *  so the deferred ones are redundant, and the timer armed for an idle entry is stale. The deadline\n     *  is not — it is an outstanding claim, and dropping it here would let a remount silently refresh a\n     *  window that must only ever decay. */\n    private flushPendingReleases;\n    /** Arm (or re-arm) the teardown for `entry.releaseDeadline`. Because the deadline is an ABSOLUTE\n     *  instant, re-arming is idempotent — a later release recomputes the same wake-up time instead of\n     *  restarting the window. */\n    private scheduleSplitRelease;\n    private finalizeSplitRelease;\n}"},{"name":"queryCacheKey","signature":"export declare function queryCacheKey(query: AnyQuery): string;"}]},{"source":"packages/narrator-react/src/index.ts","declarations":[{"name":"UseNarrationOptions","signature":"/** Options for {@link useNarration}. */\nexport interface UseNarrationOptions {\n    /** The registry key for this query's templates. Defaults to a named query's `name`; pass it for an\n     *  ad-hoc (unnamed) query, e.g. `{ as: \"deckSlides\" }`. */\n    as?: string;\n    /** Context handed to every template (e.g. a human subject label). */\n    ctx?: NarrateContext;\n    /** Which delivery phases to narrate. Default `[\"batch\"]` — the initial `snapshot` is the current\n     *  state (not a change), so \"tell me what CHANGED\" ignores it. Pass `[\"snapshot\", \"batch\"]` to also\n     *  narrate the initial rows. */\n    phases?: ChangePhase[];\n    /** Cap the retained event buffer; oldest drop first. Default 200. */\n    max?: number;\n}"},{"name":"Narration","signature":"/** A stable handle over a query's live narration buffer. */\nexport interface Narration {\n    /** Drain the events accumulated since the last call, then clear — call this when you hand context\n     *  to an agent (e.g. on chat send). */\n    take(): SemanticEvent[];\n    /** Discard the buffer without returning it. */\n    clear(): void;\n}"},{"name":"useNarration","signature":"/** Narrate a live query's change stream into buffered {@link SemanticEvent}s — the agent-facing twin\n *  of `useQuery`. It drives off the view's OWN `onChanges` channel (net of no-op rebase cycles, so a\n *  correctly predicted optimistic write narrates nothing) and needs no store-global qid filter.\n *\n *  The returned handle is STABLE and does NOT re-render on each change — narration feeds an agent,\n *  not the DOM. Drain it with `take()` at the moment you send context. Pass a STABLE `registry` (a\n *  module const): a fresh object each render re-subscribes the view. */\nexport declare function useNarration<Q extends AnyQuery>(query: Q, registry: NarratorRegistry, opts?: UseNarrationOptions): Narration;"}]},{"source":"packages/normalized/src/sync.ts","declarations":[{"name":"PkCols","signature":"/** Per-table primary-key column indices (into a positional row) — how `(table, pk)` is keyed. */\nexport type PkCols = Record<string, number[]>;"},{"name":"ColCounts","signature":"/** Per-table FULL column count — the width of a base/union row. Needed to scatter a projected\n *  (narrower) wire row into the shared positional layout (PROJECTION-SUPPORT-DESIGN.md §5.3). */\nexport type ColCounts = Record<string, number>;"},{"name":"UnionCell","signature":"/** A union-row cell: a present wire value, or `ABSENT` (`undefined`) when the column is not\n *  present on the shared row. */\ntype UnionCell = WireValue | undefined;"},{"name":"NormalizedSync","signature":"export declare class NormalizedSync {\n    private readonly pkCols;\n    /** Per-table full width, for scattering projected rows. Empty ⇒ projection unsupported\n     *  (every query must be `'*'`), which is the pre-projection behavior. */\n    private readonly colCounts;\n    /** `(table, pk)` key → the one shared base entry. */\n    private readonly base;\n    /** queryId → the set of `(table, pk)` keys that query currently footprints. */\n    private readonly qfoot;\n    /** queryId → (table → the base ColIds it contributes for that table, in the order its wire\n     *  rows are positional against — its `required_cols` for the table, §4.1). A query spans\n     *  multiple base tables (root + related/EXISTS children), each projected independently; a\n     *  table absent from the inner map ⇒ that query syncs it `'*'` (all columns, full width). */\n    private readonly qcols;\n    constructor(pkCols: PkCols, colCounts?: ColCounts);\n    /**\n     * Register a query's projection for one base table (PROJECTION-SUPPORT-DESIGN.md §4.1): the\n     * base ColIds it contributes for `table`, in the order that table's wire rows are positional\n     * against. Omit a table (or never call) for a `'*'` table — it then contributes every column\n     * and its rows are full width. Must be called before the query's first batch.\n     *\n     * A `cols[i] < 0` entry is a DROP sentinel: wire column `i` is an EXPANDED server column the\n     * client doesn't have (the server side of an `expand-then-contract` migration), so its cell is\n     * discarded rather than scattered. The query still contributes only its real (`>= 0`) ColIds.\n     */\n    registerProjection(queryId: QueryId, table: string, cols: number[]): void;\n    /**\n     * Drop a query's projection for one table, reverting it to `'*'` (full presence, rows scattered\n     * verbatim). The inverse of {@link registerProjection}; a no-op if none was registered. Needed\n     * because `qcols` persists across re-hydrate epochs: if a live subscription's hello narrows from\n     * an EXPANDED layout (a `-1`-bearing map) back to an exact full-width one, the stale map must be\n     * cleared or it would mis-scatter the now-exact rows. A no-op for an unprojected (`'*'`) table.\n     */\n    unregisterProjection(queryId: QueryId, table: string): void;\n    /**\n     * Register a table's primary-key columns after construction — for a **synthetic aggregate\n     * table** (`AGGREGATE-SYNC-DESIGN.md` §3.3): a relationship `count` is synced as a\n     * server-authoritative `__agg_*` base table that is not in the client's typed schema, so\n     * the backend registers it here (and on the local engine) as queries that use it arrive.\n     * Idempotent — re-registering the same table (a second query over the same aggregate)\n     * is a no-op. Once registered, its rows refcount/GC exactly like any base table.\n     */\n    registerTable(table: string, primaryKey: number[]): void;\n    /**\n     * The inverse of {@link registerTable} for a synthetic aggregate table whose last\n     * referencing query is gone (`AGGREGATE-SYNC-DESIGN.md` §4): drop its primary-key\n     * registration so the table is unknown again. A balanced stream has already GC'd its rows\n     * at the `1→0` transition (via {@link dropQuery}); defensively this also sweeps any residual\n     * base rows + per-query footprint entries for the table, so a later re-registration of the\n     * same name starts clean. A no-op for an unregistered table.\n     */\n    unregisterTable(table: string): void;\n    /**\n     * Apply one query's normalized batch (its hydrate snapshot or one transaction's ops) and\n     * return the NET base-table mutations to commit to the wasm `Db` in a single transaction.\n     * Cross-query refcount + per-query dedup + column union (§4, §5):\n     * - `add`: counted into this query's footprint once; on the base `0→1` transition the row\n     *   enters at this query's projection; on a `1→N` transition the query's columns are merged\n     *   into the shared union (widen) and an `edit` is forwarded if the union changed.\n     * - `remove`: on the base `N→0` transition the row leaves; on `N→M>0` the union is recomputed\n     *   from the remaining queries and an `edit` narrows the shared row.\n     * - `edit`: column-merge this query's cells into the shared union; forward once (idempotent\n     *   across queries — same source row, same values).\n     */\n    applyBatch(queryId: QueryId, ops: NormalizedOp[]): Mutation[];\n    /**\n     * Re-hydrate one query under a new epoch (§5.3): the server re-sent `queryId`'s whole\n     * footprint as seq-0 `add`s. Diff the new footprint against the query's current one —\n     * rows only in the old set leave (refcount out, GC/narrow), rows only in the new set enter\n     * (refcount in / widen), and an intersecting row whose value changed during the gap is an\n     * edit. Only `queryId`'s references move; other queries' counts are untouched. Returns the\n     * net mutations to commit.\n     */\n    rehydrate(queryId: QueryId, snapshot: NormalizedOp[]): Mutation[];\n    /**\n     * Drop a query (§5.1): decrement its footprint's refcounts, GC each row at the last\n     * reference (or narrow the union if others remain), and forget the query. `O(footprint)`,\n     * no per-row scan. Returns the net mutations. (The caller also tells the server to\n     * deregister the stream.)\n     */\n    dropQuery(queryId: QueryId): Mutation[];\n    /** The number of distinct base rows currently synced into the local store. */\n    baseSize(): number;\n    /** How many queries currently reference `(table, row)` (0 if absent). The lookup keys by PK,\n     *  so a projected `row` need only carry its PK columns at the base positions. */\n    refCount(table: string, row: UnionCell[]): number;\n    /**\n     * The synced (server-authoritative) row currently held for `(table, pkCells)`, or\n     * `undefined` if no query references it. `pkCells` are the primary-key cells in\n     * `primaryKey` order (NOT a full row) — the same key the cross-query refcount uses.\n     *\n     * The optimistic aggregate overlay (`AGGREGATE-SYNC-DESIGN.md` §4) reads the server's\n     * `__agg` count cell through this so it can compute `displayed = server_base ⊕ delta`\n     * from the authoritative base rather than re-deriving it from the local engine's head\n     * (which already carries the optimistic layer — a torn read).\n     */\n    baseRow(table: string, pkCells: WireValue[]): (WireValue | undefined)[] | undefined;\n    private footOf;\n    /** Scatter a query's (possibly narrower) wire row for `table` into the shared full-width\n     *  positional layout. No registered projection for `(queryId, table)` ⇒ a `'*'` table whose\n     *  row is already full width (returned as-is). Otherwise allocate a full-width row of\n     *  `ABSENT` and place `row[i]` at `cols[i]`. */\n    private scatter;\n    /** Column-merge `incoming`'s present cells over `e.row` (a widen / pure-value change) and\n     *  forward a single `edit` if the union changed. Both rows are full width. */\n    private mergeInto;\n    private add;\n    private remove;\n    private removeKey;\n    private edit;\n    /** The columns present on a `table` row footprinted by `queries`: the union of their\n     *  projections for that table. `null` ⇒ all columns present (some referencing query syncs\n     *  the table `'*'`), so the row is full. */\n    private presentCols;\n    private key;\n}"}]},{"source":"packages/normalized/src/agg-table.ts","declarations":[{"name":"aggTableName","signature":"/** The synthetic base-table name for a relationship `count` aggregate — the byte-exact twin\n *  of Rust `agg_table_name` (`normalize.rs` §3.1). A content hash of the aggregate definition\n *  (child table, kind, group key = correlation **child** fields, child `where`); the parent\n *  correlation field is excluded. Same definition ⇒ same name (cross-query sharing); a\n *  different filter ⇒ a different name (no `(table, pk)` collision). */\nexport declare function aggTableName(csq: CorrelatedSubquery): string;"},{"name":"aggTableSchemas","signature":"/** Every synthetic aggregate table `ast` surfaces (recursively, a nested aggregate under a\n *  materialized relationship included), as flat table schemas — the twin of Rust\n *  `agg_table_schemas`. Columns `[childField…, \"count\"]`; PK = the leading group columns. */\nexport declare function aggTableSchemas(ast: Ast, isLocal?: (table: string) => boolean): NormalizedTableSchema[];"},{"name":"rewriteAggregates","signature":"/** Rewrite an AST for the LOCAL engine: each relationship `count` becomes a precomputed,\n *  source-backed singular relationship over its synthetic table — read the server's count\n *  with a plain join + the same scalar projection (`aggregatePrecomputed`), never a `reduce`\n *  (which would recount the already-aggregated rows). Non-aggregate relationships recurse\n *  (a nested aggregate is rewritten too); the parent's frame is otherwise untouched, so the\n *  view-schema slot order is preserved. Returns a new AST; the input is not mutated.\n *\n *  The `where` tree is rewritten the SAME way (`PARENT-AGGREGATE-FILTER-DESIGN.md` §3): a\n *  `having_count` parent gate lowers to an EXISTS whose subquery CLONES the display `count_as`\n *  and adds a post-aggregation `HAVING`. That is a relationship `count` like any other, so §3's\n *  premise — the client never recomputes a count, it lacks the child rows — applies to it too;\n *  left un-rewritten the gate would reduce over child rows the server (rightly) does not sync\n *  and every parent would fail it. `agg_table_name` hashes neither `alias` nor `having`, so the\n *  gate resolves to the SAME `__agg_*` table the display `count_as` already registers and syncs:\n *  the rewrite costs no extra table, no extra rows, and reads a count the server already sent.\n *  Its counterpart is the server pruning the gate's witnesses from the footprint (Rust\n *  `table_tree`) — that prune is only sound BECAUSE of this rewrite, so ship this side first. */\nexport declare function rewriteAggregates(ast: Ast, isLocal?: (table: string) => boolean): Ast;"}]},{"source":"packages/wasm/src/index.ts","declarations":[{"name":"WasmWriteTxn","signature":"/** A raw staged write transaction over the wasm engine — the surface an optimistic client\n *  mutator runs against (`get` reads the live state under this txn's staged overlay, so a\n *  read-dependent mutator sees its own writes; OPTIMISTIC-WRITES-DESIGN.md §4.1). */\nexport interface WasmWriteTxn {\n    add(table: string, row: unknown[]): void;\n    remove(table: string, row: unknown[]): void;\n    edit(table: string, oldRow: unknown[], newRow: unknown[]): void;\n    get(table: string, pk: unknown[]): unknown[] | undefined;\n    /** Run a one-shot query over the state this txn is mutating — the live base plus this\n     *  txn's own staged writes-so-far (read-your-writes; 203-MUTATOR-READS-DESIGN.md §5.2).\n     *  Synchronous (over a lazy read-cache fork of the staged buffer). Returns the query's rows\n     *  as keyed objects with their materialized `related` children nested by name (identical in\n     *  shape to a `view.data` row), in the query's order. */\n    query(ast: Ast): unknown[];\n    commit(): Array<{\n        queryId: number;\n        events: unknown[];\n    }>;\n    rollback(): void;\n}"},{"name":"ServerDeltaOp","signature":"/** One base-table row op of a coherent server delta (the §1.3 `D`), bare cells. */\nexport type ServerDeltaOp = {\n    table: string;\n    type: \"add\";\n    row: unknown[];\n} | {\n    table: string;\n    type: \"remove\";\n    row: unknown[];\n} | {\n    table: string;\n    type: \"edit\";\n    row: unknown[];\n    old: unknown[];\n};"},{"name":"initWasm","signature":"/** Initialize the wasm module (idempotent). Call once at startup before `new WasmBackend`\n *  / `createWasmStore`. Browser/bundler: no args (the wasm is fetched). Node: the bytes are\n *  read from the package. Pass `moduleOrPath` to override (a `WebAssembly.Module`, URL, or bytes). */\nexport declare function initWasm(moduleOrPath?: unknown): Promise<void>;"},{"name":"WasmBackend","signature":"export declare class WasmBackend<S extends ColsMap> implements Backend {\n    private readonly db;\n    private handler;\n    private boundaryHandler;\n    /** Local-only table names (`201-LOCAL-ONLY-TABLES-DESIGN.md` §4): registered UNTRACKED (so the\n     *  optimistic rewind never reverts them) and the only tables {@link writeLocal} accepts. */\n    private readonly localTables;\n    private readonly dispatchQueue;\n    private draining;\n    constructor(schema: Schema<S>);\n    /** Register an additional base table after construction — for a SYNTHETIC aggregate table\n     *  (`AGGREGATE-SYNC-DESIGN.md` §3.3) that is not in the typed schema. The\n     *  `NormalizedBackend` registers each such `__agg_*` table once, before a query that reads\n     *  it, so the local engine can join to it (the relationship `count` it backs is shipped by\n     *  the server, never recomputed). Always synced (tracked) — synthetic tables are never local. */\n    registerTable(name: string, spec: {\n        columns: string[];\n        primaryKey: number[];\n    }): void;\n    /** Direct-commit a batch of LOCAL-only writes (`201-LOCAL-ONLY-TABLES-DESIGN.md` §6): push them\n     *  straight through the engine on the ordinary delivery path, OUTSIDE any optimistic cycle (a\n     *  local table is untracked, so it never rebases). Rejects a synced/tracked table (M2).\n     *  `onCommitted` fires between the engine commit and subscriber delivery ({@link writeWith}) —\n     *  the post-commit anchor the persistence tap needs (207 §5.1). */\n    writeLocal(mutations: Mutation[], onCommitted?: () => void): void;\n    /** Remove a synthetic aggregate table registered by {@link registerTable}, once the last\n     *  query reading it has been unregistered (`AGGREGATE-SYNC-DESIGN.md` §4): frees the engine\n     *  source + its optimistic baseline so aggregate state is reclaimed, not permanent. Throws\n     *  if a query still reads it (the backend refcounts readers, so it calls this only at 0). */\n    unregisterTable(name: string): void;\n    registerQuery(qid: QueryId, ast: Ast): void;\n    unregisterQuery(qid: QueryId): void;\n    mutate(mutations: Mutation[]): Promise<void>;\n    onEvent(handler: (qid: QueryId, ev: ChangeEvent) => void): void;\n    /** Register the Store's commit-boundary handler ({@link Backend.onCommitBoundary}): `dispatch`\n     *  calls it around each commit's per-query batch delivery so the Store can fold every affected\n     *  view before notifying any subscriber. */\n    onCommitBoundary(handler: (phase: \"begin\" | \"end\") => void): void;\n    /** Deliver one commit's per-query batches. Non-reentrant (#15): if a delivery is already in\n     *  progress (a subscriber re-entered via write()), enqueue and let the active drain pick it\n     *  up FIFO, so each query folds commits in order. Per-query isolated (#11): a view's fold or\n     *  subscriber throwing does NOT drop sibling queries' batches — the first error is re-raised\n     *  only after every query has been delivered.\n     *\n     *  Cross-view-atomic notification: each commit is bracketed with `boundaryHandler(\"begin\"/\"end\")`\n     *  so the Store folds ALL of this commit's views before notifying ANY subscriber (a subscriber\n     *  re-reading a sibling view then sees post-commit data). `begin`/`end` stay balanced even if a\n     *  fold throws (the `finally`), and a re-entrant write enqueued during the `end` flush drains as\n     *  its own bracketed commit in the next loop turn — preserving per-query commit order (#15). */\n    private dispatch;\n    /** Run `f` against a raw staged write txn (with the §4.1 `get` read path), commit, and\n     *  dispatch the resulting batches on the ordinary event stream. Inside an open server\n     *  batch the engine buffers the events into the cycle instead (commit returns `[]`),\n     *  so re-invocations dispatch nothing here — delivery is `serverBatchEnd`'s.\n     *\n     *  `onCommitted` runs after `tx.commit()` returns but before `dispatch` delivers to\n     *  subscribers: a throw from `f` (pre-commit — engine untouched) skips it; a subscriber\n     *  throw re-raised by `dispatch` happens after it. It is the only point where \"the commit\n     *  is applied\" is knowable to a caller that must not confuse the two failure modes. */\n    writeWith(f: (tx: WasmWriteTxn) => void, onCommitted?: () => void): void;\n    /** Open a §1.3 reconcile cycle against the coherent server delta: the engine rewinds every\n     *  tracked table (optimistic layer un-applied, delta folded in, each table's baseline re-forked)\n     *  and starts buffering. Re-invoke the still-pending mutators via {@link writeWith}, then call\n     *  {@link serverBatchEnd}. On error the rebase state is poisoned — discard the backend and\n     *  re-hydrate. */\n    serverBatchBegin(deltas: ServerDeltaOp[]): void;\n    /** Close the cycle: the whole buffered stream (rewind + re-invocations) coalesces to\n     *  the minimal net per query (§3 — a confirmed-correct prediction delivers nothing)\n     *  and dispatches as ONE batch per affected query on the ordinary event stream. */\n    serverBatchEnd(): void;\n}"},{"name":"createWasmStore","signature":"/** Convenience: init the wasm + return a ready local {@link Store}. */\nexport declare function createWasmStore<S extends ColsMap>(schema: Schema<S>): Promise<Store<S>>;"}]},{"source":"packages/normalized/src/backend.ts","declarations":[{"name":"NormalizedBackend","signature":"export declare class NormalizedBackend<S extends ColsMap> implements Backend {\n    private readonly local;\n    private readonly sync;\n    private readonly source;\n    private handler;\n    /** The Store's commit-boundary handler ({@link Backend.onCommitBoundary}), forwarded from the\n     *  local engine's `dispatch` brackets so the Store folds every affected view before notifying any\n     *  subscriber (cross-view-atomic notification). A normalized batch becomes net base mutations\n     *  applied to the local engine in one commit, which fans to every view reading those rows — this\n     *  carries that commit's boundary up so all those views notify together. */\n    private boundaryHandler;\n    private readonly devObservers;\n    private readonly remoteSubs;\n    private readonly localToRemote;\n    private readonly remoteRetainToLocal;\n    private readonly sourceToRemote;\n    private readonly resultTypes;\n    private readonly hydrated;\n    /** Local qids that are JUST hydrating on the in-flight `onNormalized` snapshot — set only for the\n     *  duration of its `local.mutate`, so the local-event forwarder stamps their fold `catchUp`: the\n     *  whole first result set arrives as a `batch` (we hydrate the view by mutating the embedded engine,\n     *  which speaks in batches — there is no second `snapshot`), and `catchUp` is the flag that tells the\n     *  Store this batch IS hydration (retire the SSR seed, phase it as a snapshot for narration). The\n     *  optimistic backend does the identical thing across its reconcile cycle. `null` outside a hydrate. */\n    private catchUpQids;\n    private resultTypeHandler;\n    /** The client's OWN typed per-table schemas (for CRIT#4 validation), fixed at construction. */\n    private readonly clientTables;\n    /** Synthetic aggregate tables (`__agg_*`) registered so far, by name (§3.3). Per aggregate\n     *  DEFINITION (not per query), so two queries over the same count share one table. */\n    private readonly synthetic;\n    /** table → (column name → base ColId), for mapping a projected hello to base positions. */\n    private readonly colIndex;\n    /** table → full column count, to detect whether a hello's table is projected. */\n    private readonly colCounts;\n    /** Synthetic table name → how many registered queries reference it. Materialized on `0→1`,\n     *  reclaimed (engine source + refcount layer) on `1→0` — so aggregate state is not permanent (§4). */\n    private readonly syntheticRefs;\n    /** queryId → the synthetic tables it referenced at registration, to decrement on teardown. */\n    private readonly queryAggTables;\n    constructor(schema: Schema<S>, source: NormalizedSource);\n    registerQuery(qid: QueryId, ast: Ast, remote?: RemoteQuery): void;\n    /** Register every synthetic aggregate table `ast` needs that we haven't seen yet: on the\n     *  local engine (so it can join to it), on `NormalizedSync` (so its rows refcount/GC by\n     *  group key), and into the source's expected-schema set (so the server's `hello` — which\n     *  advertises the same table — passes CRIT#4 validation, the client deriving the schema\n     *  identically). Idempotent across queries that share an aggregate definition. */\n    private ensureSyntheticTables;\n    /** Decrement each synthetic table query `qid` referenced; remove the ones that reach 0 (no\n     *  reader left) from the engine + refcount layer — aggregate state reclaimed, not permanent\n     *  (§4). Runs AFTER `local.unregisterQuery(qid)` so the source has no live connection when\n     *  `unregisterTable` frees it. */\n    private releaseSyntheticTables;\n    unregisterQuery(qid: QueryId): void;\n    retainRemoteQuery(qid: QueryId, remote: RemoteQuery, localQueryId?: QueryId, ast?: Ast): void;\n    releaseRemoteQuery(qid: QueryId): void;\n    /** Writes are authoritative-only here: send to the server, the stream reconciles locally.\n     *  (Optimistic local apply + rebase is Slice 6.) */\n    mutate(mutations: Mutation[]): Promise<void>;\n    onEvent(handler: (qid: QueryId, ev: ChangeEvent) => void): void;\n    onCommitBoundary(handler: (phase: \"begin\" | \"end\") => void): void;\n    onResultType(handler: (qid: QueryId, rt: ResultType) => void): void;\n    __attachDevtoolsServerDeltas(observer: BackendDevObserver): () => void;\n    private onNormalized;\n    private emitServerDelta;\n    private localQidsForSource;\n    private retainRemote;\n    private releaseRemote;\n    private markSubHydrated;\n    private hasRemoteDependency;\n    private setResultType;\n    private recomputeResultType;\n}"},{"name":"createNormalizedStore","signature":"/** A local-first {@link Store} whose base tables are fed by a server's normalized stream.\n *  The returned Store is the ordinary `@rindle/client` Store — `store.query…materialize()` and\n *  `store.write(…)` work as always; only the backend composition differs. */\nexport declare function createNormalizedStore<S extends ColsMap>(schema: Schema<S>, source: NormalizedSource): Store<S>;"}]},{"source":"packages/normalized/src/index.ts","declarations":[]},{"source":"packages/optimistic/src/agg-overlay.ts","declarations":[{"name":"AggDef","signature":"/** One aggregate's definition, derived from the original AST — everything needed to compute a\n *  per-group delta from the child table's pending mutations. */\nexport interface AggDef {\n    /** The synthetic table name (`__agg_*`) the delta is applied to. */\n    aggTable: string;\n    /** The child table whose mutations drive the count (e.g. `\"comment\"`). */\n    childTable: string;\n    /** The child column names (schema order) — resolves the group key + filter columns. */\n    childColumns: string[];\n    /** Indices into a positional child row of the correlation child fields = the group key. */\n    groupKeyCols: number[];\n    /** The child `where`, if any (already baked into the server count; re-evaluated locally\n     *  to decide a pending child's membership). */\n    where?: Condition;\n    /** §6.2: whether the optimistic delta is computable — the `where` references only the\n     *  child's own columns + literals over scalar ops. Unevaluable ⇒ no delta (server value). */\n    evaluable: boolean;\n}"},{"name":"collectAggDefs","signature":"/** Collect every aggregate's `AggDef` from `ast` (recursively — a nested aggregate under a\n *  materialized relationship included), resolving child columns via `getColumns(table)`. The\n *  twin of `aggTableSchemas` (`@rindle/normalized`) but carrying the delta-computation fields. */\nexport declare function collectAggDefs(ast: Ast, getColumns: (table: string) => string[] | undefined, isLocal?: (table: string) => boolean): AggDef[];"},{"name":"isEvaluable","signature":"/** §6.2 static gate: a condition is locally evaluable iff every leaf compares the child's own\n *  columns / literals with a scalar op. A `correlatedSubquery` (a join the client may not hold)\n *  or a column outside the child schema makes the whole aggregate unevaluable. */\nexport declare function isEvaluable(cond: Condition, childColumns: string[]): boolean;"},{"name":"evalCondition","signature":"/** Evaluate an EVALUABLE condition against a positional child row (SQL-ish three-valued logic\n *  collapsed to a boolean — an unknown comparison is `false`, i.e. the row is not a member).\n *  Only the grammar `isEvaluable` admits reaches here. */\nexport declare function evalCondition(cond: Condition, row: WireValue[], childColumns: string[]): boolean;"},{"name":"ChildOp","signature":"/** One observed child-table op (the wire shape the collector feeds the overlay). */\nexport interface ChildOp {\n    table: string;\n    kind: \"add\" | \"remove\" | \"edit\";\n    row: WireValue[];\n    /** The pre-image (edit only). */\n    old?: WireValue[];\n}"},{"name":"DeltaEntry","signature":"/** One group's accumulated optimistic delta. */\nexport interface DeltaEntry {\n    aggTable: string;\n    def: AggDef;\n    /** The group-key cells (PK of the synthetic row). */\n    cells: WireValue[];\n    /** The net optimistic count delta for this group over the pending child mutations. */\n    n: number;\n}"},{"name":"AggOverlay","signature":"/** The stateful accumulator: holds the aggregate definitions and the per-group pending delta.\n *  Engine-agnostic — the backend feeds it observed child ops and reads back the entries to\n *  reconcile against the `__agg` head rows. */\nexport declare class AggOverlay {\n    /** By synthetic table name. Sharing a definition across queries is automatic (idempotent\n     *  {@link register}); the backend refcounts readers and calls {@link unregister} when the\n     *  last query over an aggregate is gone, so a definition is reclaimed with its table — not\n     *  kept for the backend's life. */\n    private readonly defs;\n    /** Child table → the defs it feeds, for O(1) dispatch in `observe`. */\n    private readonly byChild;\n    /** `aggTable\\0JSON(groupCells)` → the group's accumulated delta. */\n    private readonly delta;\n    /** Register aggregate definitions (idempotent per synthetic table name). */\n    register(defs: AggDef[]): void;\n    /** Forget an aggregate definition (its synthetic table is being removed because the last\n     *  query reading it was unregistered — `AGGREGATE-SYNC-DESIGN.md` §4). Drops the def, its\n     *  child-dispatch entry, and any accumulated delta for it. The inverse of the per-table half\n     *  of {@link register}; a no-op for an unknown table. */\n    unregister(aggTable: string): void;\n    /** Does any aggregate count rows of `table`? (cheap collector guard) */\n    hasChild(table: string): boolean;\n    /** Any aggregate definitions at all? */\n    get hasDefs(): boolean;\n    /** Drop all accumulated deltas — called at the start of a reconcile cycle rebuild, where the\n     *  delta is recomputed from scratch off the (confirm-filtered) pending set. */\n    reset(): void;\n    /** Fold one observed child op into the per-group delta, for every EVALUABLE aggregate over\n     *  that child table. (Unevaluable defs contribute nothing — §6.2 server-value fallback.) */\n    observe(op: ChildOp): void;\n    private bump;\n    /** The current non-trivial deltas to reconcile against the `__agg` head rows. */\n    entries(): DeltaEntry[];\n    /** Forget groups whose delta has returned to 0 (their head row was reverted to the server\n     *  value by the reconcile that observed the 0) — keeps the map bounded between releases. */\n    pruneZeros(): void;\n}"}]},{"source":"packages/optimistic/src/system-streams.ts","declarations":[{"name":"SCOPE_SESSIONS_TABLE","signature":"/** §4.1 occupancy: `(scope, client_id, expires_at)`, PK `(scope, client_id)`. The row delta IS\n *  the upgrade doorbell (Slice I-iv reacts; I-iii only folds the map). */\nexport declare const SCOPE_SESSIONS_TABLE = \"_rindle_scope_sessions\";"},{"name":"ROOM_WATERMARK_TABLE","signature":"/** §4.2 downgrade fence: `(doc, flush_seq)`, PK `doc` — monotone, co-committed per room flush. */\nexport declare const ROOM_WATERMARK_TABLE = \"_rindle_room_watermark\";"},{"name":"ROOM_CLIENT_MUTATIONS_TABLE","signature":"/** §7.1 domain-scoped room ledger: `(doc, client_id, last_mutation_id)`, PK `(doc, client_id)` —\n *  the FIRST daemon-carried room-lmid path (the named invariant's enforcement point). */\nexport declare const ROOM_CLIENT_MUTATIONS_TABLE = \"_rindle_room_client_mutations\";"},{"name":"ROOM_MUTATION_OUTCOMES_TABLE","signature":"/** §3.3 durable outcome rows: `(doc, client_id, mid, kind, reason, name, args)`, PK\n *  `(doc, client_id, mid)` — the H-iv-b `mutationOutcome` frame's durable twin (Slice I-ii\n *  co-commits one per NON-applied mid; an absent row under a covering lmid means `applied`). */\nexport declare const ROOM_MUTATION_OUTCOMES_TABLE = \"_rindle_room_mutation_outcomes\";"},{"name":"SCOPE_SESSIONS_SCHEMA","signature":"/** The four wire schemas, mirroring the daemon DDL column-for-column (order and PK by name are\n *  what `validateAgainstClientSchema` checks at each system hello — CRIT#4). Appended to the\n *  backend's expected-schema base unconditionally: extra CLIENT-side entries are inert (validation\n *  only checks tables a server actually advertises), so a client that never receives a lifecycle\n *  block behaves byte-identically. */\nexport declare const SCOPE_SESSIONS_SCHEMA: NormalizedTableSchema;"},{"name":"ROOM_WATERMARK_SCHEMA","signature":"export declare const ROOM_WATERMARK_SCHEMA: NormalizedTableSchema;"},{"name":"ROOM_CLIENT_MUTATIONS_SCHEMA","signature":"export declare const ROOM_CLIENT_MUTATIONS_SCHEMA: NormalizedTableSchema;"},{"name":"ROOM_MUTATION_OUTCOMES_SCHEMA","signature":"export declare const ROOM_MUTATION_OUTCOMES_SCHEMA: NormalizedTableSchema;"},{"name":"LIFECYCLE_TABLE_SCHEMAS","signature":"export declare const LIFECYCLE_TABLE_SCHEMAS: readonly NormalizedTableSchema[];"},{"name":"SystemStreamTable","signature":"/** The tables a system retain may serve — the fold category discriminant. */\nexport type SystemStreamTable = typeof SCOPE_SESSIONS_TABLE | typeof ROOM_WATERMARK_TABLE | typeof ROOM_CLIENT_MUTATIONS_TABLE | typeof ROOM_MUTATION_OUTCOMES_TABLE;"},{"name":"SystemStreamSpec","signature":"/** What a system retain declares about itself (`OptimisticBackend.retainSystemQuery`): which\n *  system table its frames carry, and the scope/doc its minted predicate was scoped to. The fold\n *  filters rows against this spec (AND against the client's own `clientID`) as DEFENSE IN DEPTH —\n *  the server predicate is the tight path, but a server that couldn't scope (no `clientId` on the\n *  lease request) legitimately delivers other clients' rows, and a confused server must never\n *  invent verdicts for us. */\nexport interface SystemStreamSpec {\n    table: SystemStreamTable;\n    /** The §4.1 occupancy scope the doorbell was minted for (`_rindle_scope_sessions` only). */\n    scope?: string;\n    /** The room doc the fence entry was minted for (the three room tables). */\n    doc?: string;\n}"},{"name":"LIFECYCLE_QUERY_NAME","signature":"/** The reserved name system retains subscribe under (never an app query — see the module doc).\n *  Its `args` carry the {@link SystemStreamSpec} identity fields PLUS the parent labeled query's\n *  `(name, args)`, so a RE-resolution (reconnect / gate overflow) can re-lease the parent and pick\n *  the matching lifecycle entry — renewal-as-reauthorization, the room-token precedent. */\nexport declare const LIFECYCLE_QUERY_NAME = \"_rindle/lifecycle\";"},{"name":"roomDomainKey","signature":"/** The domain/gate key a room doc's daemon-carried confirms fold into — the SAME key the lease\n *  wire mints for the room source (`api-server: sourceKey = \"room:\" + doc`), so a daemon-carried\n *  lmid and a live room socket's lmid stream land on ONE watermark entry. */\nexport declare function roomDomainKey(doc: string): string;"},{"name":"OutcomeRow","signature":"/** One outcome row, decoded (positional per {@link ROOM_MUTATION_OUTCOMES_SCHEMA}). */\nexport interface OutcomeRow {\n    doc: string;\n    clientId: string;\n    mid: number;\n    kind: \"deopt\" | \"rejected\";\n    reason?: string;\n    name?: string;\n    args?: unknown;\n}"},{"name":"decodeOutcomeRow","signature":"/** Decode one `_rindle_room_mutation_outcomes` wire row; `undefined` for a malformed one (fail\n *  CLOSED into \"not a verdict\" — a garbled row must not invent a deopt/rejection; the absent-row\n *  default of the covering lmid then treats the mid as applied, which is I-ii's sound default). */\nexport declare function decodeOutcomeRow(row: readonly WireValue[]): OutcomeRow | undefined;"}]},{"source":"packages/optimistic/src/backend.ts","declarations":[{"name":"MutationTx","signature":"/** The write handle a client mutator runs against (the client `MutationTx`, §4.2):\n *  reads see the current base + this transaction's own staged writes (§4.1).\n *\n *  Prefer the KEYED methods (`insert`/`update`/`upsert`/`delete`/`row`) — named columns,\n *  schema-checked. The positional methods (`get`/`add`/`remove`/`edit`) are the raw wire\n *  shape: bare cells in schema column order, `pk` cells in `primaryKey` order. */\nexport interface MutationTx {\n    /** Read one row by primary key (e.g. `tx.row(\"issue\", { id: 1 })`). */\n    row(table: string, pk: KeyedRow): KeyedRow | undefined;\n    /** Insert a FULL row (every column named; missing or unknown columns throw). */\n    insert(table: string, row: KeyedRow): void;\n    /** Update the row identified by the pk columns; only the named non-pk columns change.\n     *  A missing row is a NO-OP (rebase-friendly: the row may have vanished upstream). */\n    update(table: string, row: KeyedRow): void;\n    /** Insert, or fully replace when the pk already exists (a FULL row, like `insert`). */\n    upsert(table: string, row: KeyedRow): void;\n    /** Insert a FULL row, or do nothing if the pk already exists (the isomorphic form of the classic\n     *  `if (!tx.row(pk)) tx.insert(row)` upsert-if-absent; renders `ON CONFLICT DO NOTHING` server-side). */\n    insertIgnore(table: string, row: KeyedRow): void;\n    /** Delete the row identified by the pk columns. A missing row is a NO-OP. */\n    delete(table: string, pk: KeyedRow): void;\n    /** Run a one-shot read query (`where`/`orderBy`/`limit`/join) over the state this\n     *  mutator is mutating — it sees this transaction's own writes-so-far, the same\n     *  read-your-writes contract as `get`/`row` (§4.1; 203-MUTATOR-READS-DESIGN.md §5.2).\n     *  Synchronous; returns the matching rows in the query's order, each with its materialized\n     *  relationship children nested by name (presented identically to a `view.data` row). Pass\n     *  a query from the typed builder, e.g. `tx.query(q.issue.where(\"owner\", \"=\", me))`.\n     *  Refused inside a FOLDED mutator (a reading mutator is non-absorbing, §9.1). */\n    query(query: QueryArg): QueryResultRow[];\n    get(table: string, pk: WireValue[]): WireValue[] | undefined;\n    add(table: string, row: WireValue[]): void;\n    remove(table: string, row: WireValue[]): void;\n    edit(table: string, oldRow: WireValue[], newRow: WireValue[]): void;\n}"},{"name":"ClientMutator","signature":"/** A client mutator: optimistic, deterministic, replayable — a pure function of `(base, args)` (§5:\n *  no clock, no randomness; it is RE-INVOKED on every rebase). Either shape is accepted:\n *  - a plain synchronous function `(tx, args) => void` (client-only), OR\n *  - a shared GENERATOR `(tx, args, ctx) => MutationGen` (the isomorphic form: the SAME body the API\n *    server runs against a live async transaction — MUTATORS-ISOMORPHIC). The driver detects which. */\nexport type ClientMutator = ((tx: MutationTx, args: never) => void) | ((tx: IsoTx, args: never, ctx: MutatorCtx) => MutationGen);"},{"name":"ClientRegistry","signature":"/** The client registry (§4.2) — one of the two registries; the server's authoritative\n *  twin shares names (and possibly code), never the wire. */\nexport type ClientRegistry = Record<string, ClientMutator>;"},{"name":"WriteRecord","signature":"/** One captured write, pk-granular (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §3.2 #1: \"the\n *  writers already receive `(table, row)`... this is pure capture, no semantic change\"). `row` is\n *  the post-write image (positional wire cells, schema column order); `undefined` for a `remove` —\n *  no row survives it, and `row === undefined` stays the remove marker.\n *\n *  `oldRow` is the PRE-IMAGE, captured for a `remove` AND an `edit` (H-ii): the full-width row\n *  read via `tx.get` immediately BEFORE the write staged — read-your-writes, so a write to the\n *  same pk earlier in the SAME invocation shows through — falling back to the caller's asserted\n *  old row when the pk is not txn-visible (a raw remove/edit of an absent row; incl. the\n *  pk-MOVING raw edit, whose record is keyed by the NEW pk yet whose pre-image is the caller's\n *  OLD row). A captured remove/edit thus always carries a full-width pre-image — with ONE\n *  exception: a record that collapses to a (re-)insert has none, see the matrix.\n *\n *  Coalescing within one invocation is last-write-wins per pk on `row` (the final image matches\n *  the engine head's own semantics for that pk) with `oldRow` pinned to the TXN-ENTRY BASE — the\n *  H-ii matrix:\n *    - edit-after-add / edit-after-remove: the record collapses to a (re-)insert — post-image\n *      only, NO `oldRow` (the pk did not pre-exist this invocation's base; presence hold-back\n *      uses `row`).\n *    - edit-after-edit: keeps the FIRST pre-image (the txn-entry base — the chain nets to ONE\n *      edit from the base to the final image).\n *    - remove-after-edit / remove-after-remove: keeps the ORIGINAL pre-image (the first write's\n *      captured base), NOT the edited transient — the net effect is a remove of the row the\n *      external world last knew.\n *    - remove-after-add: keeps the txn-visible pre-image (the transient added row — the pk had\n *      no base, and this is the only truthful full-width row there is; G-iii pinned it).\n *    - add-after-remove (a re-insert): drops `oldRow` (presence hold-back uses `row`).\n *  Across rebase re-invocations the write-set is union-never-shrink ({@link mergeWriteSet}): a\n *  re-run that no-ops keeps the prior record — and its pre-image — intact. */\nexport interface WriteRecord {\n    table: string;\n    pk: WireValue[];\n    row: WireValue[] | undefined;\n    oldRow?: WireValue[];\n}"},{"name":"WriteSet","signature":"/** The pk-granular write-set captured over ONE mutator invocation: table → pk-key (a stable-JSON\n *  encoding of the pk cells, {@link stableJson}) → that pk's write, LAST-WRITE-WINS within the\n *  invocation — an add-then-edit or edit-then-edit of the SAME pk collapses to its final image,\n *  matching the engine head's own semantics for that pk. Chosen (over a flat array) because the\n *  later routing proof needs \"is pk P in the writable scope\" / \"did we already see this pk in this\n *  invocation\" as cheap lookups, and rebase re-invocation needs to MERGE a fresh write-set into an\n *  accumulated one ({@link mergeWriteSet}) — both are Map operations, not scans.\n *\n *  `touched` (the pre-existing table-granular `Set<string>` the pending axis reads, §7.2) is\n *  exactly `new Set(writeSet.keys())` — derived from this, never separately populated, so the two\n *  can never drift. */\nexport type WriteSet = Map<string, Map<string, WriteRecord>>;"},{"name":"ReadOutcome","signature":"/** Whether a recorded point read (`tx.get`/`tx.row`) found a row. */\nexport type ReadOutcome = \"present\" | \"absent\";"},{"name":"ReadRecord","signature":"/** One recorded point read, pk-granular (§3.2 #2). Recording-mode only — see {@link ReadLog}.\n *  Since H-ii this covers BOTH the public reads (`tx.get`/`tx.row`) and the keyed writers'\n *  internal pre-existence probes (§3.2 #3 — see the `rawGet` note in {@link trackingTx}). */\nexport interface ReadRecord {\n    table: string;\n    pk: WireValue[];\n    outcome: ReadOutcome;\n}"},{"name":"ReadLog","signature":"/** The read-log captured over ONE mutator invocation when recording is armed (RINDLE-REALTIME-\n *  QUERY-ENABLEMENT-DESIGN.md §3.2 #2): every point read (`reads` — the public `tx.get`/`tx.row`\n *  and, since H-ii, the keyed writers' internal pre-existence probes) plus every resolved query AST\n *  (`queries`, from `tx.query`). A SIBLING of the folded read TRAP (`FoldReadError` below) — the\n *  trap arms on the folded path and throws before any read completes (recording never runs there);\n *  recording arms on the ordinary (non-folded) prediction run and never throws. Pure capture for\n *  devtools/inspection (the §3 routing derivation it once fed was removed by\n *  302-ROOM-STORE-SEPARATION-DESIGN.md §5 — mutators DECLARE their domain now). */\nexport interface ReadLog {\n    reads: ReadRecord[];\n    queries: Ast[];\n}"},{"name":"FoldClock","signature":"/** A virtual-clock seam for fold debounce timers and elapsed-time checks (FOLDED-MUTATIONS-DESIGN §9): the\n *  oracle injects a deterministic scheduler; production defaults to real timers + `Date.now`. */\nexport interface FoldClock {\n    setTimeout(cb: () => void, ms: number): unknown;\n    clearTimeout(handle: unknown): void;\n    now(): number;\n}"},{"name":"FoldOptions","signature":"/** Options for a folded call site (FOLDED-MUTATIONS-DESIGN §3). `key` is the identity half of the\n *  fold key (combined with the mutator name); the rest tune the debounce policy. */\nexport interface FoldOptions {\n    /** The identity half of the fold key (typically the targeted primary key). Required. */\n    key: unknown;\n    /** Trailing debounce: the flush fires this long after the LAST invoke for `key`. Default 120ms. */\n    debounceMs?: number;\n    /** Elapsed-time threshold checked on each invocation. Once reached, that invocation flushes\n     *  immediately. This does not arm a separate timer: without another invocation, the trailing\n     *  debounce still controls the flush. Omit to use only the trailing debounce. */\n    maxWaitMs?: number;\n    /** For a declared room route, use this value for both `debounceMs` and `maxWaitMs`.\n     *  The domain policy selects the route on the window's first invocation; it stays fixed\n     *  for that window. `0` flushes each invocation. Omit to use the ordinary fold options.\n     *  This does not detect collaborators or infer a route from the writes. */\n    roomDebounceMs?: number;\n    /** Keep deferring across overlapping non-fold writes for maximum economy, accepting the §4.2\n     *  read-dependent reorder snap. Default `false` (flush-on-enqueue — correct-and-boring). */\n    deferAcrossWrites?: boolean;\n}"},{"name":"FoldHandle","signature":"/** A folded mutation window. `flush()` assigns its mutation ID and queues the latest arguments\n *  for delivery. `mid` resolves with that ID at flush; it does not wait for server acceptance\n *  or confirming-stream progress. Each call in the same window shares this promise. */\nexport interface FoldHandle {\n    flush(): void;\n    readonly mid: Promise<number>;\n}"},{"name":"ScopeSessionsEvent","signature":"/** One I-iv doorbell event ({@link OptimisticBackend.onScopeSessions}, §4.1): a release folded\n *  scope-session rows for `scope`, and `others` is the count of OTHER clients' unexpired sessions\n *  there — {@link OptimisticBackend.otherScopeSessions} evaluated at fold time (the same one rule,\n *  on the injectable {@link FoldClock}, so a virtual-clock harness gets deterministic verdicts).\n *  The consumer (client.ts) triggers its one debounced re-lease on the 0→≥1 transition; expired\n *  and own-clientID rows never count, so a solo client's own row can never ring its own bell. */\nexport interface ScopeSessionsEvent {\n    scope: string;\n    others: number;\n}"},{"name":"DowngradeStuckEvent","signature":"/** The I-v stuck-downgrade event ({@link OptimisticBackend.onDowngradeStuck}): the ghost's fence\n *  is satisfied but these SENT room-domain mids never resolved (an entry that never reached the\n *  room — sent-but-undelivered when the socket died — is undecidable in general, §7.5). The ghost\n *  HOLDS (fail LOUD, never silent; no timeout-retire is invented) and the mids are surfaced once,\n *  actionably. */\nexport interface DowngradeStuckEvent {\n    sourceKey: string;\n    doc: string;\n    mids: number[];\n}"},{"name":"OptimisticBackendOptions","signature":"export interface OptimisticBackendOptions {\n    /** Stable per-client identity for the upstream envelopes (§8.1). */\n    clientID: string;\n    /** Supplies a shared mutator's local `ctx.user` on every run, including reconciliation.\n     *  Keep the principal stable for this client's lifetime; recreate the client on account changes.\n     *  The server obtains its own authenticated principal. Defaults to the empty string. Plain\n     *  client-only mutators ignore this option. */\n    user?: () => string;\n    /** Buffered-frame ceiling before the §8.5 escape (drop + re-hydrate). */\n    bufferCap?: number;\n    /** Virtual-clock seam for the fold debounce timers (FOLDED-MUTATIONS-DESIGN §9). Defaults to\n     *  real `setTimeout`/`clearTimeout`/`Date.now`; the fold oracle injects a deterministic clock. */\n    clock?: FoldClock;\n    /** The DECLARED confirming stream per mutation (302 §5: declared, not derived — there is no\n     *  routing proof). A policy returning a string pins that domain verbatim: the mutation stages\n     *  onto that room's namespaced tables and ships on its channel. Returning `undefined` (or\n     *  configuring no policy) means `\"daemon\"`. The client layer builds this from the app's declared\n     *  realtime mutators + the currently attached rooms; a misdeclaration fails SOFT (302 §5.1) —\n     *  the write lands on the other authority's tables and the view simply stops feeling instant\n     *  until the echo relays it. */\n    domainPolicy?: (name: string, args: unknown) => string | undefined;\n    /** A FINAL (authz/validation) mutation rejection's reason surface — the room plane's twin of the\n     *  HTTP mutate route's `onRejected` (H-v; the H-iv-b `mutationOutcome {kind:\"rejected\"}` frame).\n     *  The prediction's snap-back is NOT this callback's job: the room burns the mid and its lmid\n     *  release drops the entry exactly as a daemon-path rejection does (processed-as-no-op) — this\n     *  is where the REASON reaches the app, same contract as the queue's callback. Also invoked when\n     *  a DEOPT's fresh re-invocation (the already-retired arm) throws — that mutation is dead on the\n     *  current base with no stream left to confirm it, the closest thing to a rejection there is. */\n    onRejected?: (envelope: MutationEnvelope, reason: string) => void;\n}"},{"name":"FoldInspect","signature":"/** One folded entry's debounce window, for the timeline's fold drill-down (§4.1). */\nexport interface FoldInspect {\n    /** The fold key (`${name}\\0${identityJSON}`) collapsing same-key invokes into one entry. */\n    foldKey: string;\n    debounceMs: number;\n    maxWaitMs?: number;\n    deferAcrossWrites: boolean;\n    /** Whether the window has flushed (a real `mid` was dealt); an un-flushed fold has `mid == null`. */\n    flushed: boolean;\n}"},{"name":"PendingInspect","signature":"/** One pending mutation, as the timeline sees it (DEBUG-TOOLS-BROWSER-DESIGN §4.1). */\nexport interface PendingInspect {\n    /** Stable identity across snapshots: `m:<mid>` once a mid is assigned, else `f:<foldKey>` for an\n     *  un-flushed folded entry (the mid is dealt at flush, FOLDED-MUTATIONS-DESIGN §4.1). */\n    key: string;\n    /** The wire mutation id, or `null` for an un-flushed fold. */\n    mid: number | null;\n    name: string;\n    args: unknown;\n    /** Tables this mutator touched at its last (re)invocation — the pending-axis basis (§7.2). */\n    tables: string[];\n    /** The pk-granular write-set captured at this entry's LAST invocation (RINDLE-REALTIME-QUERY-\n     *  ENABLEMENT-DESIGN.md §3.2 #1), flattened from the {@link WriteSet} map for inspection — one\n     *  entry per `(table, pk)` currently held. Pure capture; no routing consumer yet. */\n    writes: WriteRecord[];\n    /** The read-log captured at this entry's LAST *recorded* invocation (§3.2 #2). Empty for a\n     *  folded entry — the read TRAP arms there, not recording (see {@link PendingMutation.reads}). */\n    reads: ReadLog;\n    /** Present iff this entry is a folded (debounced) write. */\n    fold?: FoldInspect;\n}"},{"name":"OptimisticInspect","signature":"/** A read-only snapshot of the optimistic loop ({@link OptimisticBackend.__inspect}). */\nexport interface OptimisticInspect {\n    /** The pending stack in array order (assigned mids ascending, un-flushed folds interleaved by\n     *  creation — the re-invoke order is derived from this in `runReconcileCycle`). */\n    pending: PendingInspect[];\n    /** High-water confirmed mid: an entry with `mid <= confirmedLmid` has been confirmed/dropped. */\n    confirmedLmid: number;\n    /** The next mid to be dealt (so `nextMid - 1` is the highest issued). */\n    nextMid: number;\n    /** The applied coherent-release watermark (`cvMin`, §8.6). */\n    appliedCv: number;\n    /** Frames still buffered awaiting their release point (§8.5) — a backpressure gauge. */\n    bufferedFrames: number;\n    /** Every table some pending mutation currently touches (the coarse pending indicator set, §7.2). */\n    pendingTables: string[];\n}"},{"name":"OptimisticBackend","signature":"export declare class OptimisticBackend<S extends ColsMap> implements Backend {\n    private readonly local;\n    private readonly sync;\n    private readonly source;\n    private readonly registry;\n    private readonly clientID;\n    /** The acting principal provider for a shared mutator's `ctx.user` (§ shared mutators). */\n    private readonly user;\n    private readonly bufferCap;\n    /** Column order + pk indices per table, for the keyed `MutationTx` methods. */\n    private readonly specs;\n    /** Local-only table names (`201-LOCAL-ONLY-TABLES-DESIGN.md` §4). Drives: the agg-rewrite gate\n     *  (L1 — a local-child count stays a native reduce), the mutator guard (M1 — a replayable\n     *  mutator may not read/write one), and `writeLocal` (M2 — it accepts ONLY these). */\n    private readonly localTables;\n    /** Each table's full column count (union-row width) + column-name → base ColId — to learn a\n     *  projected query's per-table projection off its `hello` and register it with the sync layer,\n     *  so it scatters that query's narrower rows into the shared union (PROJECTION-SUPPORT-DESIGN\n     *  §5.2). Without this a projected query's short rows reach the wasm `Db` un-scattered and fail\n     *  its width check. */\n    private readonly colCounts;\n    private readonly colIndex;\n    /** Per-table pk column indices — held so `connectSource` can build a fresh per-source\n     *  `NormalizedSync` with the same layout the daemon's uses. */\n    private readonly pkCols;\n    /** The client's OWN typed per-table schemas + the reserved lmid table — the fixed base\n     *  of the expected-schema set (CRIT#4 validation). Synthetic agg tables are appended as\n     *  queries arrive (`ensureSyntheticTables`). */\n    private readonly clientTablesBase;\n    /** Synthetic aggregate tables (`__agg_*`) registered so far, by name (AGGREGATE-SYNC-DESIGN\n     *  §3.3). Per aggregate DEFINITION (not per query), so two queries over the same count\n     *  share one table. */\n    private readonly synthetic;\n    /** Synthetic table name → how many registered LOCAL queries reference it. A table is\n     *  materialized on the `0→1` transition and reclaimed (engine source + baseline + refcount\n     *  layer + overlay def) on `1→0` — so aggregate state is not permanent (§4). */\n    private readonly syntheticRefs;\n    /** Local qid → the synthetic tables it referenced at registration, to decrement on teardown. */\n    private readonly queryAggTables;\n    /** The optimistic aggregate overlay (§4–§6): the per-aggregate definitions + the per-group\n     *  pending delta `displayed = server_base ⊕ local_pending_delta` is applied from. */\n    private readonly overlay;\n    private handler;\n    private catchUpQids;\n    /** Newly-hydrated qids whose reconcile ACTUALLY emitted a (catch-up-stamped) batch — recorded by the\n     *  local-event forwarder alongside {@link catchUpQids}. After the reconcile, any newly-hydrated qid\n     *  NOT in here folded nothing (0 rows, or its result already present via a sibling → 0 net muts, or\n     *  the reconcile was skipped), so `onProgress` sends it an explicit empty catch-up — else its SSR\n     *  seed would never retire (the view freezes). Non-null only for the reconcile's duration. */\n    private catchUpEmitted;\n    /** The Store's commit-boundary handler ({@link Backend.onCommitBoundary}), forwarded from the\n     *  local engine's `dispatch` brackets so the Store folds every affected view before notifying any\n     *  subscriber (cross-view-atomic notification). All this backend's data deltas originate from the\n     *  local engine, so its commit brackets are this backend's commit brackets. */\n    private boundaryHandler;\n    private readonly devObservers;\n    private pendingMutations;\n    /** The next mid to deal, PER DOMAIN (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §7.1): a client\n     *  writing through room + daemon concurrently must not alias one lmid counter. Seeded with the\n     *  `\"daemon\"` stream at 1; a domain absent from the map starts at 1. In the single-domain\n     *  configuration only `\"daemon\"` is ever touched, so the sequence is byte-for-byte as before. */\n    private nextMid;\n    /** The client-global deal counter behind {@link PendingMutation.seq}: one sequence across ALL\n     *  domains, bumped whenever any domain's mid is dealt. The replay order (mids are per-domain and\n     *  incomparable across domains — see the `seq` field doc). */\n    private dealSeq;\n    /** The explicit confirming-stream override (§7.1/§3) — see\n     *  {@link OptimisticBackendOptions.domainPolicy}. `undefined` from it ⇒ H-iii derivation. */\n    private readonly domainPolicy;\n    /** The final-rejection reason surface ({@link OptimisticBackendOptions.onRejected}). */\n    private readonly rejectedHandler;\n    /** Processed `(domain, mid)` outcome frames (H-v) — the deopt handshake's idempotence guard: a\n     *  duplicate frame (the original plus a reconnect re-send's re-answer, or two re-answers across\n     *  two reconnects) must not double-invoke. Needed precisely because a deopt frame can arrive for\n     *  an ALREADY-RETIRED mid (the replay gotcha) — \"no matching entry\" alone cannot distinguish\n     *  \"handle it fresh\" from \"already handled\". Per-domain FIFO, capped like the shell's\n     *  recorded-outcome map ({@link MAX_PROCESSED_OUTCOMES_PER_DOMAIN}); past the cap a duplicate of\n     *  an evicted mid would be re-processed — the same bounded-window trade the shell makes, and it\n     *  takes 512 interleaving non-applied outcomes on one domain to open it. */\n    private readonly outcomesProcessed;\n    /** THE room-table registry (302 §2 — one source per table): per connected room `sourceKey`, the\n     *  wire-table → engine-table map for the tables that room OWNS (its writable scope). Written by\n     *  {@link registerRoomTables} (same breath as the engine registration); read by the gate's\n     *  release rename/filter, the mutator staging map, the view swap ({@link processSwapIns}), and\n     *  the client's `__realtimeInspect` bookkeeping. The record outlives a downgrade's disconnect —\n     *  the ghost's views still read the engine tables — and drops at {@link dropGhost} (or the last\n     *  clean release via {@link unregisterRoomTables}). */\n    private readonly roomTables;\n    /** Local view qids currently REGISTERED on a room's namespaced tables (302 §4 swap-in), →\n     *  their sourceKey. Set by {@link processSwapIns}; cleared by the swap-back ({@link dropGhost})\n     *  and view teardown. The original AST stays in {@link asts} throughout — the swap re-registers\n     *  only the ENGINE query. */\n    private readonly roomSwappedViews;\n    /** Room subs whose FIRST snapshot released in the current release — their views swap onto the\n     *  room tables at the release tail ({@link processSwapIns}), strictly AFTER the reconcile folded\n     *  the snapshot into those tables (swapping earlier would hydrate the view EMPTY, a flash). */\n    private readonly pendingSwapIns;\n    /** The live fold entries, by fold key `${name}\\0${identityJSON}` — at most one per key\n     *  (FOLDED-MUTATIONS-DESIGN §8). Insertion order is creation order (the drain/flush tiebreak). */\n    private readonly folds;\n    /** The fold debounce clock (real timers by default; the oracle injects a virtual one). */\n    private readonly clock;\n    /** The high-water confirmed mutation id, PER DOMAIN (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md\n     *  §7.2 per-domain confirm-drop): an entry with `mid <= watermark[entry.domain]` has been\n     *  confirmed. The `\"daemon\"` domain is folded from the lmid system query's RELEASED ops\n     *  (lmid-as-data) — never from a frame; a room domain will fold from its own lmid stream (later\n     *  slice). Seeded with `\"daemon\"` at 0; the daemon scalar `confirmedLmid` (devtools) is\n     *  `watermark.get(\"daemon\")`. */\n    private watermark;\n    /** The per-source coherence gates (§5.1), by source key. Seeded with the daemon gate at\n     *  construction; a room channel attaches later (`connectSource`). Single-domain: one entry,\n     *  and every gate-generalized path degenerates to the old single-buffer code. NOT the same\n     *  space as {@link watermark}/{@link nextMid}: a DOMAIN can confirm with no gate connected\n     *  (the `__testRelease` seam); a gate's `key` names the domain its lmid stream folds into. */\n    private readonly gates;\n    /** The daemon's gate — the always-present channel (constructor-attached). The devtools\n     *  scalars (`__inspect`) read it directly; its `sync` IS {@link sync} (the agg overlay and\n     *  synthetic tables are daemon-tracked by design). */\n    private readonly daemonGate;\n    /** System retains by source qid ({@link retainSystemQuery}): a subscription with NO store view\n     *  and NO user-visible table — its frames buffer on its gate exactly like {@link LMID_QID}'s and\n     *  fold at RELEASE time ({@link foldSystemFrames}), never entering the sync layer or the local\n     *  engine. The spec names which system table the qid serves and the scope/doc it was minted for\n     *  (the fold's row filter). Empty on every non-lifecycle client — every partition below is then\n     *  a structural no-op and the release path is byte-identical to before. */\n    private readonly systemQids;\n    /** The §4.2 fence state: room doc → highest `flush_seq` delivered through the daemon plane\n     *  (monotone max-fold; a remove never regresses it). Slice I-v's ghost-drop consumer — I-iii\n     *  only maintains + exposes it (`__inspectDomains().lifecycle`). */\n    private readonly roomWatermarks;\n    /** The §4.1 occupancy state: scope → (client_id → expires_at) from the doorbell stream. Slice\n     *  I-iv's doorbell consumer (the 1→2 re-lease reaction) — I-iii only maintains + exposes it.\n     *  A snapshot REPLACES the scope's map (authoritative re-hydrate); a batch folds add/edit/remove\n     *  incrementally (the age-out sweep's deletes arrive as removes). */\n    private readonly scopeSessions;\n    /** The I-iv doorbell event sink ({@link onScopeSessions}) — fired once per scope a release's\n     *  scope-session fold touched, AFTER the whole release applied. Default no-op: a client that\n     *  never registers (no lifecycle plane) pays nothing. */\n    private scopeSessionsHandler;\n    /** Deferred old-channel row GC for in-flight upgrade retargets ({@link retargetRemoteQuery}):\n     *  sub sourceQid → the channel it left. The rows the OLD gate's sync holds for the qid stay\n     *  visible (merge: daemon tier) until the sub's first snapshot RELEASES on its new room channel\n     *  ({@link flushRetargetGc}) — dropping them at retarget time would emit net removes ahead of\n     *  the room's re-adds, the flicker the two-phase cutover exists to avoid. Doubles as the\n     *  wrong-channel GRACE window in {@link onFrame}: a frame already in flight from the old\n     *  channel when the sub moved is stale, not a wiring bug. Empty on every non-upgrade client —\n     *  every consultation below is then a structural no-op. */\n    private readonly pendingRetargetGc;\n    /** The §4.2 GHOSTS (Slice I-v): demoted room sources awaiting their watermark fence, by\n     *  sourceKey. Written only by {@link demoteRoomSource}; evaluated after every release\n     *  ({@link evaluateGhosts}) and dropped by {@link dropGhost} once the fence clears with no\n     *  sent room-domain pending left. Empty on every non-downgrade client — the per-release\n     *  evaluation is then a structural no-op. */\n    private readonly ghosts;\n    /** The I-v stuck-downgrade surface ({@link onDowngradeStuck}) — fired AT MOST ONCE per ghost\n     *  when its fence is satisfied but sent room-domain mids remain unresolved (§7.5: they retire\n     *  only through outcome resolution; the ghost holds rather than inventing a timeout-retire).\n     *  Default no-op. */\n    private downgradeStuckHandler;\n    private readonly asts;\n    /** Per query: the base tables its result can draw from (from the AST tree). */\n    private readonly queryTables;\n    private readonly remoteSubs;\n    private readonly sourceToRemote;\n    private readonly localToRemote;\n    private readonly remoteRetainToLocal;\n    private readonly resultTypes;\n    /** Local view qids that are server-authoritative: a query with no remote sub (purely local) is\n     *  hydrated on registration; a remote query is hydrated when its sub's first snapshot releases.\n     *  An un-hydrated query reports `unknown` (still loading) — the basis of `resultType`. */\n    private readonly hydrated;\n    private resultTypeHandler;\n    /** The pending AXIS (§7.2), split off `ResultType`: per query, whether any pending mutation\n     *  touches its tables. Cached so `onPending` fires only on transitions (invoke ↔ confirm). */\n    private readonly pendingState;\n    private pendingHandler;\n    /** The local-persistence write-through tap (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §5.1):\n     *  {@link writeLocal} invokes it post-commit; {@link applyLocalReplica} deliberately does not. */\n    private localWriteObserver;\n    constructor(schema: Schema<S>, source: OptimisticSource, registry: ClientRegistry, opts: OptimisticBackendOptions);\n    /** Wire one authority channel into its own coherence gate (§5.1): every frame the channel\n     *  delivers buffers on THIS gate's cv timeline, its progress frames release THIS buffer, its\n     *  restart resets THIS gate alone, and its reserved lmid stream folds into `watermark[key]`.\n     *  Validates each server hello against our OWN typed schema → reject a schema skew (CRIT#4);\n     *  the reserved lmid table is part of the expected set so the system query's hello passes, and\n     *  synthetic agg tables join the set as queries register them. */\n    private attachGate;\n    /** Attach a SECOND authority channel (§5.1) — the seam Slice G's room upgrade calls with the\n     *  ws-backed room feed. Rooms speak the daemon protocol verbatim (§2.4: the client cannot tell\n     *  a room from the daemon), so the argument is a full {@link OptimisticSource} — exactly what\n     *  `@rindle/remote` builds from `{roomUrl, leaseToken}`. The channel buffers/releases on its\n     *  own cv timeline (an independent §5.1 gate: coherent within, eventual across) and its\n     *  reserved lmid stream folds into `watermark[sourceKey]` — so `sourceKey` must equal the\n     *  `domainPolicy` name for the mutations this authority confirms. The converse is NOT required:\n     *  a domain may exist with no connected gate (`__testRelease` drives confirms gate-less); the\n     *  live production path stays daemon-only until G calls this. */\n    connectSource(sourceKey: string, source: OptimisticSource): void;\n    /** Register the tables room `sourceKey` OWNS (its writable scope — 302 §2): each wire table\n     *  gets its own namespaced ENGINE table (`{@link roomEngineTable}`), an ordinary tracked table\n     *  whose sole authority is the room channel. From here on the channel's released deltas rename\n     *  into these tables (wire tables outside the map are DROPPED — context stays daemon-owned,\n     *  302 §6), room-domain mutators stage onto them, and a room-homed view swaps onto them once\n     *  the room sub hydrates ({@link processSwapIns}). Idempotent per (sourceKey, table); a wire\n     *  table unknown to the schema is skipped (nothing to hold rows for). */\n    registerRoomTables(sourceKey: string, tables: readonly string[]): void;\n    /** The wire-table → engine-table map for room `sourceKey`'s owned tables (empty when none) —\n     *  the client's idempotence check and `__realtimeInspect` read THIS record (one source of\n     *  truth; the client keeps no shadow copy). */\n    roomTablesFor(sourceKey: string): ReadonlyMap<string, string>;\n    /** `channel` (G-iii registration-time routing) names the authority channel the remote sub\n     *  registers on — a `connectSource`d gate key; default `\"daemon\"` (every existing caller is\n     *  byte-identical). Slice G-v threads the lease's `realtime.sourceKey` here. Validated FIRST\n     *  (like the E3 check below): a bad channel must throw before any per-query state is recorded. */\n    registerQuery(qid: QueryId, ast: Ast, remote?: RemoteQuery, channel?: string): void;\n    /** Register every synthetic aggregate table `ast` needs that we haven't seen yet: on the\n     *  local engine (which auto-tracks it for the optimistic rebase loop), on `NormalizedSync`\n     *  (so its rows refcount/GC by group key), and into the source's expected-schema set (so\n     *  the server's `hello` — which advertises the same table — passes CRIT#4 validation).\n     *  Idempotent across queries that share an aggregate definition. */\n    private ensureSyntheticTables;\n    /** Decrement the refcount of every synthetic table query `qid` referenced; for each one that\n     *  reaches 0 (no live reader left), remove it from the engine, the refcount layer, and the\n     *  overlay — so aggregate state is reclaimed, not permanent (§4). Must run AFTER\n     *  `local.unregisterQuery(qid)` so the engine source has no live connection when\n     *  `unregisterTable` frees it (the engine refuses otherwise). */\n    private releaseSyntheticTables;\n    unregisterQuery(qid: QueryId): void;\n    /** `channel` as in {@link registerQuery} (G-iii): the gate the remote sub registers on; default\n     *  `\"daemon\"`. This is the split-retain seam G-v's resolve-then-register drives — resolve the\n     *  lease, learn `realtime.sourceKey`, `connectSource` it, then retain the query on that channel.\n     *  Validated FIRST so a bad channel throws before any synthetic-table refcount moves. */\n    retainRemoteQuery(qid: QueryId, remote: RemoteQuery, localQueryId?: QueryId, ast?: Ast, channel?: string): void;\n    releaseRemoteQuery(qid: QueryId): void;\n    /** The Slice I-iv upgrade retarget (§4.1 \"Retarget\" / the doorbell reaction): move a LIVE\n     *  (name, args) sub — every retain of it and every local view it feeds, wholesale — from the\n     *  channel it lives on onto `sourceKey`'s (already-`connectSource`d, already-promoted) room\n     *  channel, WITHOUT the view ever dropping its rows. Returns the sub's wire `sourceQid` (the\n     *  identity the client's renewal loop re-subscribes with).\n     *\n     *  Why a dedicated primitive: the one-channel-per-(name,args) invariant ({@link retainRemote}'s\n     *  loud throw) is correct — a sub's frames must never split across two cv timelines — so the\n     *  upgrade cannot simply retain a second sub on the room and release the daemon one; and the\n     *  naive release-then-retain order GCs the daemon sync's rows synchronously (net removes emit,\n     *  the view flashes empty) a full ws round trip before the room's seq-0 snapshot refills it.\n     *  The cutover is therefore TWO-PHASE around the room's first release:\n     *\n     *   1. NOW (here): unsubscribe the old channel's wire sub, sweep its still-buffered frames for\n     *      this qid (their cv timeline continues without the sub — the hello-supersession\n     *      precedent), flip `sub.channel`, re-arm `sub.hydrated` (the room's own snapshot is the\n     *      cutover point), and register on the room source (its resolver presents the handed\n     *      roomToken). The old gate's SYNC rows are deliberately NOT dropped: they keep the view's\n     *      plain tables populated through the window — the view still reads them until the swap.\n     *   2. AT THE ROOM'S FIRST RELEASED SNAPSHOT: the reconcile folds the snapshot into the room's\n     *      namespaced tables, the release tail SWAPS every local view onto them (302 §4.1,\n     *      {@link processSwapIns} — the accepted-flash boundary), and {@link flushRetargetGc}'s\n     *      deferred `dropQuery`+reconcile on the OLD gate then GCs the plain-table rows the sub\n     *      alone referenced — invisible to the swapped views.\n     *\n     *  Idempotent per target channel: a sub already on `sourceKey` returns immediately (the\n     *  double-doorbell / re-entrancy guard — one retarget per (query, sourceKey)). Validates before\n     *  mutating: a throw here leaves the sub fully daemon-attached (the client's fail-open). */\n    retargetRemoteQuery(remote: RemoteQuery, sourceKey: string): QueryId;\n    /** Phase 2 of {@link retargetRemoteQuery}, run at the end of every gate release: once a\n     *  retargeted sub's first snapshot has RELEASED on its new channel (`sub.hydrated` re-armed at\n     *  retarget, re-set by {@link markSubHydrated} inside this very release), drop the qid's rows\n     *  from the OLD gate's sync and reconcile them out — after the room's rows are already applied,\n     *  so the winner flip is value-equal (net-zero; see the phase table above). A sub torn down\n     *  mid-window was already swept by `releaseRemoteQuery`/`unregisterQuery` (which delete the\n     *  record); a vanished record here is pruned defensively. */\n    private flushRetargetGc;\n    /** The I-v downgrade orchestration primitive (§4.2/§7.4, re-expressed by 302 §4.2 as the\n     *  SWAP-BACK GATE): retire room `sourceKey` behind the watermark fence. The caller has ALREADY\n     *  retargeted every live sub off the channel ({@link retargetRemoteQuery} room→daemon —\n     *  validated loudly below) and holds the fence from the api-server's downgrade response\n     *  (`finalFlushSeq` = the room's last COMMITTED flush seq; `doc` keys the §4.2 watermark fold,\n     *  {@link roomWatermarks}). Steps, in order:\n     *\n     *   1. **Disconnect** the channel ({@link disconnectSource}): handlers detached, gate + buffer\n     *      dropped. `nextMid`/`watermark`/processed-outcomes for the domain are KEPT FOREVER (§7.1:\n     *      an assigned mid pins its domain; a later re-upgrade of the same doc continues the\n     *      sequence — {@link connectSource} attaches a fresh gate and the lmid snapshot max-folds\n     *      into the surviving watermark). Disconnecting BEFORE the daemon sub's first release is\n     *      load-bearing: it makes {@link flushRetargetGc}'s deferred old-channel GC a no-op (gate\n     *      gone ⇒ record deleted, nothing dropped). The room's namespaced tables — and the views\n     *      swapped onto them — deliberately stay: frozen at the room's last state, they keep the\n     *      document visible while the falling-back follower may still lack the final flush.\n     *      Swapping back earlier would show its pre-flush images — the regression §4.2 prevents.\n     *   2. **Ghost + first evaluation**: the record joins {@link ghosts} and is evaluated once\n     *      immediately — `finalFlushSeq === 0` (a never-flushed room) with no room-domain pending\n     *      drops on the spot, the single-daemon first-frame case.\n     *\n     *  In-flight discipline (§7.5): entries with `mid !== null` on `sourceKey` stay PINNED (rule\n     *  2 — never re-route a sent mutation); their resolution arrives via the daemon-carried\n     *  ledger+outcome folds (I-iii) and blocks the drop until then. Idempotent per sourceKey (a\n     *  second labeled query sharing the room demotes into the existing ghost). */\n    demoteRoomSource(sourceKey: string, doc: string, finalFlushSeq: number): void;\n    /** Detach one connected room channel (Slice I-v step 3): the source's handlers are replaced\n     *  with no-ops (the {@link OptimisticSource} handler seam is single-registration, so this IS\n     *  the detach — a late frame from a dying socket can no longer touch any bookkeeping), its\n     *  reserved lmid sub is unregistered, and the gate — buffer, per-source sync, cv watermark —\n     *  is dropped from {@link gates}. The DOMAIN state deliberately survives forever:\n     *  `nextMid[sourceKey]`, `watermark[sourceKey]`, and the processed-outcome set are untouched\n     *  (§7.1 — an assigned mid pins its domain; a re-upgrade must continue, never restart, the mid\n     *  sequence; {@link connectSource} then attaches a fresh gate whose lmid snapshot max-folds\n     *  into the surviving watermark via {@link foldConfirm}). Closing the underlying transport is\n     *  the caller's job. Idempotent (a missing gate is a no-op). */\n    disconnectSource(sourceKey: string): void;\n    /** Register the I-v stuck-downgrade sink — see {@link DowngradeStuckEvent}. One handler (a\n     *  later registration replaces it, the {@link onScopeSessions} convention); client.ts maps it\n     *  onto the loud anomaly surface. */\n    onDowngradeStuck(handler: (event: DowngradeStuckEvent) => void): void;\n    /** The I-v ghost-drop watcher (§4.2), run after every applied release ({@link applyRelease} —\n     *  the seam where {@link roomWatermarks} has just folded and the confirm-drop has just run) and\n     *  once at demote time. For each ghost: the fence must be satisfied\n     *  (`roomWatermarks[doc] ≥ finalFlushSeq`; 0 is trivially satisfied) AND no SENT room-domain\n     *  pending may remain (§7.5 — such entries resolve only through the daemon-carried\n     *  outcome/ledger folds; an entry that never reached the room is undecidable, so the ghost\n     *  HOLDS and the stuck event fires exactly once, naming the mids). Both satisfied ⇒\n     *  {@link dropGhost}. */\n    private evaluateGhosts;\n    /** Drop one cleared ghost — the 302 §4.2 SWAP-BACK: under the fence the daemon tables are\n     *  value-equal-or-ahead of the room's final state, so (1) every view swapped onto the room's\n     *  namespaced tables re-registers on its ORIGINAL (daemon-table) AST — visually a no-op, the\n     *  Store folds the re-hello as an in-place reset; (2) the namespaced tables unregister (no\n     *  reader is left after the swap); (3) ONE daemon reconcile re-invokes the pending set so any\n     *  entry whose writes had staged onto the now-gone room tables re-stages onto the daemon tables\n     *  (its domain policy stopped naming the dead room when the client dropped it). The whole drop\n     *  runs under one commit boundary so the swap and the re-staged predictions notify as ONE step.\n     *  After this, a FUTURE upgrade of the same doc registers again from scratch. */\n    private dropGhost;\n    /** Unregister room `sourceKey`'s namespaced engine tables and drop the {@link roomTables}\n     *  record. Callers must have no view registered on them (the engine refuses otherwise —\n     *  loud by design). No-op for an unknown sourceKey. */\n    unregisterRoomTables(sourceKey: string): void;\n    /** Retain one minted SYSTEM subscription (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §4, Slice\n     *  I-iii): a wire sub with NO store view and NO user-visible table. Registered through the same\n     *  {@link RemoteSub} bookkeeping as any remote retain — so qid→channel ownership, the overflow\n     *  re-subscribe, and refcounted release all work unchanged — but with an EMPTY `localQids` set\n     *  (no hydration/resultType coupling) and a {@link systemQids} record telling the release path\n     *  which system table this qid's frames carry (`spec.table`) and which scope/doc it was minted\n     *  for (the fold's row filter). Its frames then buffer on the channel's gate exactly like\n     *  {@link LMID_QID}'s and fold at RELEASE time in {@link foldSystemFrames} — riding the SAME\n     *  buffered cv path as the data they co-committed with (fence coherence: an out-of-band\n     *  shortcut would break I-ii's co-commit ordering guarantee).\n     *\n     *  `channel` defaults to `\"daemon\"` — the system tables live in the DAEMON store (that is the\n     *  point: outcome/ledger/watermark rows must be readable with no room socket alive, §7.1\n     *  \"load-bearing for §7.5\"). Idempotence per (table, scope/doc) is the CALLER's job (client.ts\n     *  keys its retains on exactly that); a duplicate retain of the SAME remote identity refcounts\n     *  like any sub. */\n    retainSystemQuery(retainQid: QueryId, remote: RemoteQuery, spec: SystemStreamSpec, channel?: string): void;\n    /** Release a {@link retainSystemQuery} retain. Refcounted like any sub; the LAST release\n     *  unregisters from the owning channel, sweeps its buffered frames, and drops the\n     *  {@link systemQids} record. The folded lifecycle STATE (`roomWatermarks`/`scopeSessions`/\n     *  processed outcomes) deliberately survives — the fence is monotone truth about the store, not\n     *  about the subscription (a re-retained fence must not forget a cleared watermark). */\n    releaseSystemQuery(retainQid: QueryId): void;\n    /** Raw CRUD has no optimistic story (§9 replaces it with named mutators). Register a\n     *  mutator — even a trivial one — and `invoke` it. */\n    mutate(_mutations: Mutation[]): Promise<void>;\n    /** Direct-commit a batch of LOCAL-only writes (`201-LOCAL-ONLY-TABLES-DESIGN.md` §6 / M2):\n     *  straight to the local engine, OUTSIDE the optimistic pending stack — a local table is\n     *  untracked, so it never rebases, reverts, or waits on a confirmation. Rejects a synced/tracked\n     *  table (the local engine's `writeLocal` is the chokepoint). Reconcile is synchronous and\n     *  non-reentrant (A5), so a local write can never interleave with an open server cycle.\n     *\n     *  Fires the {@link onLocalWrite} observer AFTER the engine commit but BEFORE subscriber\n     *  delivery — i.e. for exactly the batches that passed the M2 guard and committed (the\n     *  persistence layer's write-through tap, `207-LOCAL-TABLE-PERSISTENCE-DESIGN.md` §5.1). A\n     *  subscriber throwing during delivery re-raises out of this call, but only after the tap has\n     *  seen the batch: a committed write can never be invisible to the persistence plane. */\n    writeLocal(mutations: Mutation[]): void;\n    /** The write-through tap for the local-persistence layer (207 §5.1): `observer` sees every\n     *  {@link writeLocal} batch post-commit. One observer (the layer); a later registration\n     *  replaces it. The observer must not throw — a persistence failure degrades durability, never\n     *  the write path (P9); the layer catches internally. */\n    onLocalWrite(observer: (mutations: Mutation[]) => void): void;\n    /** Apply a REPLICATED local batch (a restore snapshot / a leader `commit` — 207 §5.1): delegates\n     *  to the engine's `writeLocal`, so the M2 locality guard still fires (P8 — a corrupt record\n     *  naming a synced table dies loudly here), but does NOT invoke the {@link onLocalWrite}\n     *  observer — the echo guard is structural, so the persistence layer can never re-enter itself.\n     *  `onCommitted` fires post-commit pre-delivery (same anchor as {@link writeLocal}'s tap): the\n     *  layer updates its mirror there, so a subscriber throw can never desync mirror from engine. */\n    applyLocalReplica(mutations: Mutation[], onCommitted?: () => void): void;\n    onEvent(handler: (qid: QueryId, ev: ChangeEvent) => void): void;\n    onCommitBoundary(handler: (phase: \"begin\" | \"end\") => void): void;\n    /** Bracket a multi-step optimistic apply as ONE notification commit (cross-view-atomic\n     *  notification — {@link Backend.onCommitBoundary}). `invoke`/`invokeFolded` apply the prediction\n     *  and then reconcile the `__agg` head in TWO `this.local` commits, but they are two halves of one\n     *  logical mutation: a relationship-`count` view and the data view it counts must update together.\n     *  The Store's `commitDepth` is a counter, so each inner commit's own `begin`/`end` nests under this\n     *  outer pair and the Store flushes every affected view (data AND count) once, together, at the\n     *  outer `end` — a subscriber re-reading a sibling view then sees post-commit data, never a torn\n     *  half. Balanced on throw (the prediction mutator may reject) via the `finally`, so a thrown\n     *  prediction never wedges the Store in deferred mode. */\n    private inOneCommit;\n    /** Run one client mutator against the staged `tx`, accepting BOTH forms (§ shared mutators):\n     *  a plain sync function runs as-is; a shared GENERATOR is driven synchronously — every yielded\n     *  write applies to the wasm txn now, every `tx.row` read is resolved against the same staged\n     *  state (read-your-writes), the SAME body the API server drives asynchronously. `ctx.user` is\n     *  the acting principal (re-read per invoke, stable across a rebase re-invoke). */\n    private runMutator;\n    /** Deal the next wire mid from `domain`'s ledger (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md\n     *  §7.1) and advance that counter. A domain absent from the map starts at 1. Per-domain, so a\n     *  client writing through room + daemon concurrently keeps two gapless, non-aliasing sequences.\n     *  The client-global `seq` is stamped in the same breath — the ONE cross-domain total order\n     *  (confirmation order is per-domain; replay order is client-global). Bundled here so no call\n     *  site can deal a mid without its seq. ONE caller discards the seq deliberately: the H-v deopt\n     *  flip ({@link handleMutationOutcome}) keeps the entry's ORIGINAL seq — its replay position —\n     *  and takes only the fresh mid (the dealSeq bump is harmless: seq consumers order, never\n     *  count). */\n    private dealMid;\n    /** The declared confirming stream for one invocation: the `domainPolicy`'s verdict, `\"daemon\"`\n     *  when it abstains. Resolved BEFORE the prediction runs — the domain picks the staging map\n     *  (a room domain stages its owned tables onto the room's namespaced twins). */\n    private resolveDomain;\n    /** The staging table map for a `domain`-routed prediction ({@link trackingTx}'s `stage`):\n     *  wire table → the room's namespaced engine table for the tables the room owns; identity for\n     *  everything else (including the whole map for the daemon domain). */\n    private stagingMap;\n    /** The PLAIN (daemon-homed) engine AST for `ast` — aggregate relationships rewritten to their\n     *  synthetic `__agg_*` reads, no room renames. The ONE form every non-swapped engine\n     *  registration uses ({@link registerQuery}, {@link dropGhost}'s swap-back) and the base the\n     *  swap-in renames ({@link processSwapIns}). */\n    private plainEngineAst;\n    /** Mutator names the cross-authority warn below already fired for (once per name). */\n    private readonly warnedCrossAuthority;\n    /** 302 §5.1 dev-time guard: a room-DECLARED mutator wrote tables the room does not own. Those\n     *  writes staged onto the PLAIN daemon tables (the staging map covers only owned tables), but\n     *  the entry confirms on the ROOM stream — and only the room's OWNED tables flush back to the\n     *  daemon, so nothing upstream ever echoes them: once the room confirm retires the entry, the\n     *  next release's whole-store rewind reverts them for good. The first-party room shell refuses\n     *  such a mutation (the §3.3 deopt/reject backstop re-routes it to the daemon), so this warns\n     *  for the shapes where that backstop may be absent (a BYO relay) — loud, once, soft (§5.1:\n     *  misdeclarations never throw). */\n    private warnCrossAuthorityWrites;\n    /** Run the named client mutator optimistically: the prediction applies to the live\n     *  engine now (affected views update synchronously), `(mid, name, args)` joins the\n     *  pending stack, and the envelope ships upstream. Returns the assigned `mid`. */\n    invoke(name: string, args: unknown): number;\n    /** {@link invoke} with an optional PINNED confirming domain (H-v): the deopt handshake's\n     *  already-retired arm re-invokes the frame's echoed `(name, args)` as a FRESH invocation pinned\n     *  to `\"daemon\"` — an honest re-prediction on the current base, never derived (`pin` bypasses\n     *  {@link resolveDomain} entirely, so the router never runs and no Q6 counter moves). Every\n     *  other step is `invoke` verbatim: prediction now, capture, drainOverlapping, mid dealt from\n     *  the pinned domain's ledger, envelope on its channel. */\n    private invokeWith;\n    /** Run a FOLDED invoke (FOLDED-MUTATIONS-DESIGN §8): apply the prediction to the live engine now\n     *  (like `invoke`), but collapse a run of same-key invokes into ONE pending entry whose `args`\n     *  are overwritten in place, debounce the server write, and ship only the last value. The `mid`\n     *  is assigned at flush, not here (§4.1) — so the return is a {@link FoldHandle}, not a mid. */\n    invokeFolded(name: string, opts: FoldOptions, args: unknown): FoldHandle;\n    /** Flush-on-enqueue (§4.2): for each outstanding fold whose touched tables overlap `tables`,\n     *  assign its mid NOW and ship it — in creation (insertion) order, so the wire stays gapless. A\n     *  `deferAcrossWrites` fold opts out (it keeps deferring, accepting the read-dependent snap). The\n     *  incoming write's own fold key (if any) is skipped — it is being folded into, not flushed. */\n    private drainOverlapping;\n    /** Flush one fold (§8): deal its `mid` from `nextMid` (SEND order — never reserved, so gapless\n     *  by construction), stamp the entry, ship the envelope with the LATEST args, resolve the handle.\n     *  The entry stays on `pendingMutations` (now with a real mid) until the lmid release confirms it. */\n    private flushFold;\n    /** The transport a `domain`-confirmed mutation ships on (§7.5 sent-pins-domain: only the\n     *  domain's own authority can confirm it, so its channel is the only correct transport). A\n     *  domain with NO connected gate ships on the daemon channel — the gate-less configurations\n     *  (`__testRelease`-driven tests) and today's entire live path resolve `\"daemon\"` anyway. */\n    private channelFor;\n    /** The gate a channel-keyed retain registers through (G-iii registration-time routing). The\n     *  channel MUST already be connected (`connectSource`; the daemon is constructor-attached) —\n     *  loud by design: a typo'd or not-yet-connected sourceKey must throw at retain time, never\n     *  silently register on the daemon and split the query's frames across channels. */\n    private requireGate;\n    /** The channel that owns `sourceQid` — {@link RemoteSub.channel}, the ONE source of truth for\n     *  qid routing (G-iii). `undefined` when no sub owns the qid (a harness-delivered raw feed, or\n     *  a just-released sub): such frames buffer on whatever gate they arrive at. */\n    private channelOf;\n    /** Record `(domain, mid)` as processed; `false` if it already was (a duplicate frame —\n     *  ignore it). FIFO-capped per domain ({@link MAX_PROCESSED_OUTCOMES_PER_DOMAIN}). */\n    private markOutcomeProcessed;\n    /** One `mutationOutcome` frame from `domain`'s channel (H-v — the §3.3 handshake's client\n     *  half). The frame arrives OUT-OF-BAND (see {@link attachGate}); the state machine:\n     *\n     *  1. `mid` never issued on `domain` ⇒ ignore (a confused/foreign frame must not invent work).\n     *  2. `(domain, mid)` already processed ⇒ ignore — idempotence under duplicate frames (the\n     *     original + a re-send's re-answer; a deopt for a mid whose entry ALREADY FLIPPED also\n     *     lands here harmlessly on its second frame).\n     *  3. `kind:\"rejected\"` ⇒ FINAL. Surface the reason through {@link rejectedHandler} (room-plane\n     *     parity with the HTTP queue's callback) and STOP — the drop + snap-back is the EXISTING\n     *     failed-mutation machinery: the room burnt the mid, its lmid release retires the entry\n     *     per-domain and the reconcile rewinds the prediction, exactly the daemon path's\n     *     processed-as-no-op rejection. No new drop path.\n     *  4. `kind:\"deopt\"`, entry found (pending `(domain, mid)`) ⇒ FLIP IN PLACE: `domain` becomes\n     *     `\"daemon\"`, a fresh daemon mid is dealt and the envelope ships NOW on the daemon channel\n     *     (\"deal-and-send-now\" — the conforming §3.3 re-enqueue: there is no flush machinery for\n     *     non-fold entries, so the design's \"mid: null until the daemon flush\" is satisfied\n     *     momentarily inside this call). THE ENTRY'S `seq` IS KEPT — settled (§5.3, commit\n     *     68141096): `seq` is the client-global REPLAY order; re-sequencing would move the entry's\n     *     overlay position and change read-dependent SIBLINGS' replay base. Everything else stays\n     *     (writes/reads/touched/touchedSources/writeSources — union-never-shrink), the prediction\n     *     stays applied (the entry never leaves `pendingMutations`, so no rewind fires), and the\n     *     router does NOT re-run nor does `drainOverlapping` (§3.3 re-enqueues, never re-derives;\n     *     any open overlapping fold was invoked later and flushes later with a larger mid).\n     *  5. `kind:\"deopt\"`, entry NOT found ⇒ the burnt-mid confirm won the race, or the frame is a\n     *     replay re-answer for an entry a previous session retired (the replay gotcha): re-invoke\n     *     the frame's echoed `name`/`args` as a FRESH invocation PINNED to `\"daemon\"` — an honest\n     *     re-prediction on the current base, never a derived route ({@link invokeWith}). A frame\n     *     without `name` (not self-contained) has nothing to re-invoke and is dropped; a re-invoke\n     *     that THROWS (the base moved from under it) is surfaced through {@link rejectedHandler} —\n     *     the mutation is dead with no stream left to confirm it.\n     *\n     *  A `\"deopt\"` bump joins the Q6 routing counters either way (`routing.reasons.deopt`) —\n     *  derived-and-deopted routes are visible beside derived successes. */\n    private handleMutationOutcome;\n    /** §7.5 rule 3 (H-v): re-send `domain`'s unconfirmed pending envelopes with their ORIGINAL\n     *  mids, in mid order, on the domain's own channel. Folds with `mid === null` are excluded —\n     *  nothing was ever sent for them (the flush deals their mid). Envelopes are reconstructed from\n     *  the pending entries exactly as `invoke` shipped them (`clientID`/`mid`/`name`/`args` —\n     *  entries carry everything the wire needs). Idempotent under the domain's ledger: an APPLIED\n     *  mid dedups silently and its lmid coverage retires the entry; a NON-APPLIED mid is re-answered\n     *  from the shell's recorded-outcome map into {@link handleMutationOutcome}. Confirmed entries\n     *  are already gone from `pendingMutations`, so no filter against the watermark is needed. */\n    private resendPending;\n    /** Drain every outstanding fold immediately (FOLDED-MUTATIONS-DESIGN §3): the explicit\n     *  `app.flushFolds()` and the `beforeunload`/`close` hook. Creation (insertion) order. */\n    flushFolds(): void;\n    /** A `trackingTx` op collector that records only the ops over a tracked aggregate's child\n     *  table (the others can't move any count). Applied to the overlay by the caller AFTER the\n     *  mutator succeeds, so a throwing mutator (whose staged write is discarded) leaves no delta. */\n    private opCollector;\n    /** Push the optimistic per-group delta onto the `__agg` head rows (§4):\n     *  `target = server_base ⊕ delta`. A head-only write to the (tracked) synthetic table, so it\n     *  joins the optimistic layer and is rewound/rebuilt by the reconcile cycle like any\n     *  prediction. `server_base` is read from `NormalizedSync` (the authoritative base) — NOT\n     *  from head, which already carries the optimistic layer (a torn read). Works standalone (an\n     *  ordinary delivery) and inside an open cycle (the write buffers into it). */\n    private reconcileAggHead;\n    /** The SERVER CHANNEL's state for a query (§7): `unknown` while not hydrated, else `complete`.\n     *  A pending local mutation no longer moves it — see {@link pending}. */\n    resultType(qid: QueryId): ResultType;\n    onResultType(handler: (qid: QueryId, rt: ResultType) => void): void;\n    __attachDevtoolsServerDeltas(observer: BackendDevObserver): () => void;\n    /** Whether any pending mutation (folded or not) touches this query's tables — \"is a prediction\n     *  pending here?\" (FOLDED-MUTATIONS-DESIGN §7.2). Orthogonal to {@link resultType}; this is the\n     *  same `queryTables ∩ pending.touched` computation that used to be smuggled into `unknown`. */\n    pending(qid: QueryId): boolean;\n    /** Reactive pending axis (§7.2): fires when a query's pending-ness flips (invoke ↔ confirm), so a\n     *  \"saving…\" affordance clears on its own when `lmid` catches up. */\n    onPending(handler: (qid: QueryId, pending: boolean) => void): void;\n    /** The coarse, table-level pending indicator set (§7.2): every table some pending mutation touched. */\n    pendingTables(): Set<string>;\n    /** A read-only snapshot of the optimistic loop for a devtools pane (DEBUG-TOOLS-BROWSER-DESIGN\n     *  §4.1). Built fresh per call from state the backend already holds — no new instrumentation, no\n     *  mutation. Only ever called by `@rindle/devtools` (imported in dev). */\n    __inspect(): OptimisticInspect;\n    /** Test-only per-domain ledger snapshot (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §7.1/§8.5).\n     *  Kept separate from {@link __inspect} so the devtools `OptimisticInspect` mirror stays byte-for-\n     *  byte identical (daemon-scalar-only). Exposes the per-domain `nextMid`/`watermark` maps plus each\n     *  pending entry's confirming domain — the axes the §8.5 ledger-isolation assertion checks. */\n    __inspectDomains(): {\n        nextMid: Record<string, number>;\n        watermark: Record<string, number>;\n        /** Per connected CHANNEL (§5.1): its release watermark + buffered-frame depth — the axis the\n         *  gate-isolation assertions read (one source's laggy cvMin must never move the other's). */\n        gates: Record<string, {\n            appliedCv: number;\n            bufferedFrames: number;\n        }>;\n        /** Per connected/registered room: its wire-table → engine-table map (302 §2) and which local\n         *  view qids are currently swapped onto it (302 §4). */\n        roomTables: Record<string, Record<string, string>>;\n        swappedViews: Record<number, string>;\n        /** The §4 lifecycle plane's folded state (Slice I-iii introspection): the per-doc §4.2 fence\n         *  value (`roomWatermarks`, I-v's ghost-drop input), the per-scope §4.1 occupancy map\n         *  (`scopeSessions`: scope → client_id → expires_at, I-iv's doorbell input), and the live\n         *  I-v ghosts (demoted room sources still awaiting their swap-back fence). */\n        lifecycle: {\n            roomWatermarks: Record<string, number>;\n            scopeSessions: Record<string, Record<string, number>>;\n            ghosts: Record<string, {\n                doc: string;\n                finalFlushSeq: number;\n            }>;\n        };\n        pending: {\n            mid: number | null;\n            seq: number | null;\n            name: string;\n            domain: string;\n        }[];\n    };\n    /** Recompute the pending axis for every query and fire `onPending` on transitions only. Called\n     *  from the two points that move the pending set: invoke/invokeFolded (add) and the confirm-drop\n     *  (remove) — exactly where `:359`/`:468` used to flip ResultType (§7.3). */\n    private refreshPending;\n    private onFrame;\n    private emitServerDelta;\n    private localQidsForSource;\n    /** One gate's release (§5.1 release gate): compute the coherent delta from THIS gate's cv-buffer,\n     *  then apply it against the gate's source/domain. Split into {@link computeRelease} (buffer →\n     *  delta, lmid → watermark) and {@link applyRelease} (per-source confirm-drop + reconcile) —\n     *  N independent gates all feed the ONE apply half; {@link __testRelease} drives it directly. */\n    private onGateProgress;\n    /** Compute one coherent release from ONE gate's cv-buffer (§5.1) — gate-scoped: its buffer, its\n     *  cvMin timeline. Take every buffered frame at `cv ≤ cvMin`, in (cv, arrival) order, and fold\n     *  it: the lmid system-query frame advances `watermark[gate.key]` (via {@link foldLmidOps} — the\n     *  daemon stream folds \"daemon\", a room stream folds its own domain); data frames fold through\n     *  this SOURCE's cross-query refcount into ONE net base delta — the §1.3 `D`. Returns that delta\n     *  plus the set of local views this release JUST hydrated (so their reconcile batch phases as a\n     *  `snapshot`). Mutates the gate's buffer/`appliedCv`, hydration, and the gate's domain\n     *  watermark; the pending set and the reconcile are {@link applyRelease}'s job. */\n    private computeRelease;\n    /** Apply one released delta against `sourceKey`'s domain (§7.2 per-domain confirm-drop + the §1.3\n     *  reconcile cycle). `watermarkUpdate`, when given, advances `watermark[sourceKey]` first — the\n     *  hook a per-source lmid confirm rides on (the daemon path folds its watermark in\n     *  {@link computeRelease} and passes `undefined`). Then: drop every pending entry its OWN domain's\n     *  watermark now covers (a room confirm can never retire a daemon entry, and vice-versa — the §7.1\n     *  ledger-collision fix), and run the reconcile cycle against `sourceKey` when the base delta or the\n     *  pending set changed. `newlyHydrated` stamps the initial-hydration batch as a catch-up. */\n    private applyRelease;\n    /** Test-only per-source release seam (RINDLE-REALTIME-QUERY-ENABLEMENT-DESIGN.md §7.2/§8.5): drive\n     *  {@link applyRelease} for `sourceKey` directly — an explicit `watermarkUpdate` (a simulated lmid\n     *  confirm for that domain) and `deltas` (a coherent base delta), with no real gate. Lets a harness\n     *  exercise a room-domain confirm before the real second lmid stream / per-source gate is wired\n     *  (E-iii-b/c). The `__`-prefix marks it a test hook, alongside {@link __inspect}. */\n    __testRelease(sourceKey: string, deltas: Mutation[], watermarkUpdate?: number): void;\n    /** Swap every view of each just-hydrated ROOM sub onto the room's namespaced tables (302 §4.1):\n     *  re-register the local engine query with the AST's room-owned table references renamed\n     *  ({@link remapAstTables}); the Store folds the re-hello as an in-place reset, so the caller's\n     *  view reference survives and subscribers see ONE transition. Runs at the applyRelease tail —\n     *  the reconcile has already folded the sub's snapshot into the room tables, so the swapped\n     *  view hydrates straight to the room state (swapping earlier would flash it empty). The\n     *  ORIGINAL ast stays in {@link asts}; the swap-back ({@link dropGhost}) re-registers it.\n     *\n     *  This is the accepted-flash boundary (302 §4.1/§7.1): the room's copy may be behind the\n     *  daemon rows the view showed a moment ago — accepted by decision, revisit on a real\n     *  two-region deploy. */\n    private processSwapIns;\n    /** Fold `domain`'s lmid system query's released ops (lmid-as-data): the one row's\n     *  `last_mutation_id` cell is this client's confirmed high-water mid in that domain — it advances\n     *  `watermark[domain]` and, on a fresh session ahead of our issued mids, `nextMid[domain]`. The\n     *  daemon stream folds `\"daemon\"`; a room stream folds its own `\"room:doc:X\"`; the daemon-carried\n     *  §7.1 ledger rows fold through the same {@link foldConfirm} core (Slice I-iii). */\n    private foldLmidOps;\n    /** THE one confirm fold (§7.1/§7.2): advance `watermark[domain]` to `lmid` (monotone max) and,\n     *  on a fresh session ahead of our issued mids, adopt `nextMid[domain]`. Shared verbatim by the\n     *  per-channel lmid system query ({@link foldLmidOps}) and the daemon-carried room-ledger rows\n     *  ({@link foldSystemFrames} — one core so the two paths cannot drift). */\n    private foldConfirm;\n    /** Fold one release's SYSTEM frames in a FIXED category order — the order is STRUCTURAL (one\n     *  function, categories in sequence), because it is the client half of THE NAMED INVARIANT\n     *  (§3.3's shipped note; documented above {@link handleMutationOutcome}): **never retire a\n     *  room-domain entry off a daemon-carried lmid without outcome resolution.**\n     *\n     *    1. **outcome rows** (`_rindle_room_mutation_outcomes`) — each row for OUR clientID is\n     *       synthesized into a {@link MutationOutcomeFrame} and routed through\n     *       {@link handleMutationOutcome}, the SAME H-v state machine the room socket's frames use\n     *       (one verdict path: frames and rows cannot drift). A deopt flips its pending entry to\n     *       the daemon IN PLACE (keep-seq, deal-and-send-now); a rejection surfaces + stays for the\n     *       ordinary burnt-mid retire; a duplicate (frame already seen, or the row re-delivered) is\n     *       absorbed by the processed set — which doubles as the resolved-verdict memory across\n     *       releases (per-domain FIFO, {@link MAX_PROCESSED_OUTCOMES_PER_DOMAIN}, mirroring the\n     *       shell's recorded-outcome cap).\n     *    2. **room-ledger rows** (`_rindle_room_client_mutations`) — the FIRST daemon-carried\n     *       room-lmid path: OUR row's `last_mutation_id` folds into `watermark[room:<doc>]` via\n     *       {@link foldConfirm}. Because step 1 ALREADY resolved every non-applied verdict this\n     *       release carries (and earlier releases' verdicts were resolved at their own release),\n     *       the confirm-drop that follows in {@link applyRelease} retires only entries whose\n     *       outcome is resolution-by-absence — which I-ii's co-commit atomicity defines as APPLIED\n     *       (a room flush co-commits the ledger row and every non-applied mid's outcome row in ONE\n     *       daemon transaction, so a covering lmid without a row IS the applied verdict).\n     *       Processing this category before step 1 is the violation, in two proven directions\n     *       (each run break→fail→revert against `test/system_streams.test.ts`): (a) the ledger's\n     *       fresh-session `nextMid` ADOPTION must not run before historical outcome rows are\n     *       judged — adopted-first, a previous session's retained deopt row passes the\n     *       \"never-issued\" guard and spuriously re-invokes a mutation that session already handled\n     *       (a double-apply); (b) the RETIRE must not precede resolution — it does not BECAUSE the\n     *       confirm-drop runs in {@link applyRelease}, strictly after this whole function. That\n     *       deferral is load-bearing: an \"optimization\" retiring inline with the watermark fold\n     *       retires a deopted entry as a silent success (the exact lost-write H-v exists to\n     *       prevent) and mis-attributes a rejected row's reason.\n     *    3. **watermark rows** (`_rindle_room_watermark`) — the §4.2 fence value, max-folded per\n     *       doc ({@link roomWatermarks}); I-v's ghost-drop consumer, no reaction here.\n     *    4. **scope-session rows** (`_rindle_scope_sessions`) — the §4.1 occupancy map\n     *       ({@link scopeSessions}); I-iv's doorbell consumer, no reaction here.\n     *\n     *  Ordinary data ops fold AFTER all of these (the caller's main loop) — outcome/ledger state\n     *  must be in place before {@link applyRelease}'s confirm-drop + reconcile consume the release.\n     *  Every row is filtered against the retain's {@link SystemStreamSpec} scope/doc AND (for the\n     *  client-keyed tables) our own `clientID` — defense in depth: the server predicate may have\n     *  been minted doc-only (no `clientId` at lease time), so other clients' rows are expected and\n     *  must be ignored, and a row for a doc this retain was not minted for is never folded.\n     *\n     *  Returns the scopes category 4 touched (snapshot or ops) — the I-iv doorbell events' input;\n     *  `null` when none (every non-lifecycle release). The events themselves fire from\n     *  `onGateProgress` AFTER the release applies, never from inside the fold. */\n    private foldSystemFrames;\n    /** The I-iv occupancy count — THE one rule (§4.1/D7): unexpired (`expires_at >` the fold\n     *  clock's now) sessions under `scope` from OTHER clientIDs. Shared by the doorbell events\n     *  ({@link onGateProgress}) and the client's registration-time check (a doorbell that folded\n     *  BEFORE a candidate registered must still be able to trigger it) so the two can never\n     *  disagree. Own-clientID rows never count — a solo client cannot ring its own bell — and\n     *  expiry is judged on the injectable {@link FoldClock} (deterministic in a virtual-clock\n     *  harness, the folded-oracle discipline). */\n    otherScopeSessions(scope: string): number;\n    /** Register the I-iv doorbell event sink — see {@link ScopeSessionsEvent}. One handler (a later\n     *  registration replaces it, the {@link onLocalWrite} convention); client.ts is the consumer. */\n    onScopeSessions(handler: (event: ScopeSessionsEvent) => void): void;\n    /** One §1.3 reconcile cycle: rewind the optimistic layer and fold the coherent SERVER\n     *  delta into BOTH head AND the `sync` baseline (`serverBatchBegin`), re-invoke every\n     *  still-pending mutator to re-stage the optimistic layer (the rewind un-applied it), then\n     *  deliver the coalesced result (`serverBatchEnd`). This is the engine's only sync-moving\n     *  boundary — `onProgress` releases and `unregisterQuery`'s GC both go through here so head\n     *  and sync never diverge (the §1.2 invariant; CRIT#2). */\n    private runReconcileCycle;\n    /** ONE channel's authority restarted (a new boot id): it lost all materialization + `cv` state\n     *  and its `cv` sequence reset, so previously-released `cv`s no longer bound the new stream. The\n     *  source has already re-subscribed every query (reconnect → resync); drop THIS gate's buffer\n     *  and `cv` watermark so the fresh, low-`cv` snapshots are RELEASED instead of dropped as stale\n     *  (`onFrame`/`computeRelease` gate on `appliedCv`). The OTHER gates are untouched — an\n     *  authority restart is per-channel (§5.1). Pending optimistic mutations stay put — they\n     *  re-apply on the next reconcile, and the channel's lmid system query's fresh snapshot restores\n     *  its domain's confirmation watermark. */\n    private resetGate;\n    /** The §8.5 escape: ONE gate's buffer outgrew its cap (a pinned `cvMin` under churn on that\n     *  channel). Drop everything it buffered and re-register every query on that source — the fresh\n     *  snapshots arrive as ordinary frames and the next release re-hydrates via the footprint diff\n     *  (the §5.3 path); still-pending optimism re-applies in that cycle. The other gates' buffers\n     *  and subscriptions are untouched. */\n    private overflow;\n    private setResultType;\n    /** Recompute a query's server-channel state from hydration alone (§7): a pending mutation no\n     *  longer affects it. Used when a remote sub attaches to or hydrates a local view. */\n    private recomputeResultType;\n    /** A remote sub's first snapshot landed: mark it (and every local view it feeds) hydrated, then\n     *  lift those views out of `unknown` (loading). A ROOM sub's hydration additionally queues the\n     *  302 §4.1 swap-in — performed at the applyRelease TAIL ({@link processSwapIns}), once the\n     *  reconcile has folded this snapshot into the room tables. Idempotent — a re-hydrate snapshot\n     *  re-marks harmlessly; a source qid with no sub (the lmid system query) is a no-op. */\n    private markSubHydrated;\n    /** `channel` (G-iii registration-time routing): the gate the sub registers on — the qid's\n     *  ownership is fixed HERE, at retain time (no lazy claim; `onFrame` only asserts it). Default\n     *  `\"daemon\"`, so every channel-less caller is byte-identical to before. */\n    private retainRemote;\n    private releaseRemote;\n    private addServerDependencyTables;\n}"},{"name":"roomEngineTable","signature":"/** The namespaced ENGINE table backing wire `table` for room `sourceKey` (302 §2: `room_deck` ≠\n *  `deck` — one authority per table). `@` appears in no schema table name — ENFORCED by\n *  `createSchema`/`extendSchema`'s addTableMeta ban (packages/client/src/schema.ts), so the name\n *  cannot collide with a real table. */\nexport declare function roomEngineTable(table: string, sourceKey: string): string;"},{"name":"remapAstTables","signature":"/** Rename every TABLE reference in a query AST through `map` (302 §2 point 3 — the room-homed\n *  view's rewrite): the root `table`, every `related` subquery, every `correlatedSubquery`\n *  (EXISTS) condition — walking the KNOWN wire-AST shape, never a blind key scan: `start.row` is\n *  keyed by COLUMN name (a schema column literally named `table` must keep its bound value), and\n *  the same goes for any future column-keyed record. Tables absent from the map keep their name —\n *  that is the client-side join across kinds (a room table joined to daemon-owned context,\n *  201-style). Structural clone; the input AST is never mutated. */\nexport declare function remapAstTables(ast: Ast, map: ReadonlyMap<string, string>): Ast;"}]},{"source":"packages/remote/src/normalized.ts","declarations":[{"name":"normalizedFp","signature":"/** A `tables` set's content fingerprint — FNV-1a 64 over the canonical, length-prefixed byte\n *  stream of `rindle-replica::normalize_protocol::normalized_fp` (PK resolved to column NAMES),\n *  as 16-char lowercase hex (=== the Rust hex). `tables` MUST be sorted by name (the server's\n *  `NormalizedPublisher` guarantees it) so the fingerprint is order-stable. */\nexport declare function normalizedFp(tables: NormalizedTableSchema[]): string;"},{"name":"NormalizedHello","signature":"/** The slim normalized handshake (§3), sent once before any {@link NormalizedBatch}. */\nexport interface NormalizedHello {\n    epoch: number;\n    comparatorVersion: number;\n    tables: NormalizedTableSchema[];\n    normalizedFp: string;\n}"},{"name":"NormalizedBatch","signature":"/** One committed transaction's normalized ops (or the seq-0 hydrate snapshot). `cv` (the\n *  global commit version the frame reflects) is stamped by optimistic-protocol servers and\n *  rides through to the `NormalizedEvent` (OPTIMISTIC-WRITES-DESIGN.md §8.3). */\nexport interface NormalizedBatch {\n    epoch: number;\n    seq: number;\n    normalizedFp: string;\n    ops: NormalizedOp[];\n    cv?: number;\n}"},{"name":"NormalizedSubscriber","signature":"/** Receiver side: validates a normalized frame stream (comparator at `hello`; per batch —\n *  epoch match, fingerprint match, strict in-order seq) and emits clean `NormalizedEvent`s.\n *  It does NOT fold (the `NormalizedSync` layer does). Mirrors the flat {@link Subscriber}. */\nexport declare class NormalizedSubscriber {\n    readonly epoch: number;\n    readonly normalizedFp: string;\n    private readonly emit;\n    private phase;\n    private lastSeq;\n    /**\n     * @param hello         the server's normalized handshake.\n     * @param emit          clean-event sink (the `NormalizedSync` fold).\n     * @param clientTables  the CLIENT's own typed per-table schemas (all tables). When given,\n     *   each table the hello advertises is validated by NAME against it (column order + PK\n     *   indices). The hello's `tables` is a per-query SUBSET (the query's table tree), so this\n     *   checks each advertised table rather than one global fingerprint. A mismatch (routine\n     *   deployment / schema skew) is rejected here — without it, positional rows aligned to the\n     *   SERVER's column order are stored verbatim under the CLIENT's order, silently swapping\n     *   cells and mis-keying the refcount/GC (CRIT#4 / §3 \"drift ⇒ re-subscribe\").\n     */\n    constructor(hello: NormalizedHello, emit: (ev: NormalizedEvent) => void, clientTables?: NormalizedTableSchema[]);\n    /** Apply one normalized batch (or the seq-0 snapshot). Returns `\"duplicate\"` for an\n     *  already-applied seq; throws {@link ProtocolError} on a gap / epoch / fp mismatch (the\n     *  caller re-hydrates under a new epoch). */\n    apply(batch: NormalizedBatch): \"applied\" | \"duplicate\";\n}"}]},{"source":"packages/remote/src/protocol.ts","declarations":[{"name":"Fnv","signature":"export declare class Fnv {\n    h: bigint;\n    private byte;\n    u8(v: number): void;\n    /** A `u32` little-endian (matching Rust `v.to_le_bytes()`). */\n    u32(v: number): void;\n    /** A length-prefixed string: `u32(byteLen)` then the UTF-8 bytes (disambiguates joins). */\n    s(str: string): void;\n}"},{"name":"schemaFp","signature":"/** A `WireSchema`'s content fingerprint — FNV-1a 64 over the canonical, length-prefixed byte\n *  stream of `src/wire_schema.rs`, rendered as 16-char lowercase hex (=== Rust `SchemaFp`\n *  `Display`). A string (not a JS number) so the full 64 bits survive JSON without precision loss. */\nexport declare function schemaFp(ws: WireSchema): string;"},{"name":"Hello","signature":"/** The subscription handshake, sent once before any {@link Batch}. */\nexport interface Hello {\n    epoch: number;\n    comparatorVersion: number;\n    schema: WireSchema;\n    schemaFp: string;\n}"},{"name":"Batch","signature":"/** One transaction's flat changes (or the seq-0 hydrate snapshot). `events` apply in order. */\nexport interface Batch {\n    epoch: number;\n    seq: number;\n    schemaFp: string;\n    events: FlatChange[];\n}"},{"name":"SubscribeClientMsg","signature":"/** The multiplexed wire messages (many queries over one connection, tagged by `queryId`).\n *  `subscribe.mode` selects the serializer (default flat); a normalized subscription gets\n *  `nhello`/`nbatch` back instead of `hello`/`batch` (NORMALIZED-CHANGES-DESIGN.md §6).\n *  Embedded servers receive `{name,args}`. Daemon/serverless deployments can instead receive an\n *  opaque `leaseToken` that the app API server minted after auth + named-query resolution.\n *\n *  The OPTIMISTIC path (OPTIMISTIC-WRITES-DESIGN.md §8) adds `init` (the connection\n *  identifies its stable clientID, so progress frames can carry that client's `lmid`) and\n *  `pushMutation` (one named-mutator envelope up); the server answers with the normalized\n *  frames (`cv`-stamped) plus connection-level `progress` frames. */\nexport type SubscribeClientMsg = {\n    t: \"subscribe\";\n    queryId: number;\n    name: string;\n    args: unknown;\n    mode?: \"flat\" | \"normalized\";\n} | {\n    t: \"subscribe\";\n    queryId: number;\n    leaseToken: string;\n    mode?: \"flat\" | \"normalized\";\n};"},{"name":"ClientMsg","signature":"export type ClientMsg = {\n    t: \"init\";\n    clientID: string;\n} | SubscribeClientMsg | {\n    t: \"unsubscribe\";\n    queryId: number;\n} | {\n    t: \"mutate\";\n    mutations: Mutation[];\n} | {\n    t: \"pushMutation\";\n    envelope: MutationEnvelope;\n};"},{"name":"ServerMsg","signature":"export type ServerMsg = {\n    t: \"hello\";\n    queryId: number;\n    hello: Hello;\n} | {\n    t: \"batch\";\n    queryId: number;\n    batch: Batch;\n} | {\n    t: \"nhello\";\n    queryId: number;\n    hello: NormalizedHello;\n    bootId?: string;\n} | {\n    t: \"nbatch\";\n    queryId: number;\n    batch: NormalizedBatch;\n} | {\n    t: \"queryError\";\n    queryId: number;\n    message: string;\n    code?: string;\n    retryable?: boolean;\n    retryAfterMs?: number;\n} | {\n    t: \"progress\";\n    frame: ProgressFrame;\n} | {\n    t: \"affinity\";\n    ticket: string;\n} | {\n    t: \"mutationOutcome\";\n    mid: number;\n    kind: \"deopt\" | \"rejected\";\n    reason?: string;\n    name?: string;\n    args?: unknown;\n} | {\n    t: \"error\";\n    queryId?: number;\n    message: string;\n};"},{"name":"Publisher","signature":"/** Sender side: stamps batches with the subscription `epoch` + `schemaFp` and drives the\n *  gap-free seq. The hydrate snapshot is seq 0; increments are seq 1, 2, …. An empty\n *  transaction emits no batch and consumes no seq (so a gap always means a lost batch). */\nexport declare class Publisher {\n    readonly epoch: number;\n    readonly schema: WireSchema;\n    readonly schemaFp: string;\n    private nextSeq;\n    constructor(epoch: number, schema: WireSchema);\n    hello(): Hello;\n    /** The hydrate snapshot (seq 0). Always emitted, even when empty, so the receiver learns it. */\n    snapshot(events: FlatChange[]): Batch;\n    /** One transaction's events — `null` for an empty transaction (no batch, no seq consumed). */\n    commit(events: FlatChange[]): Batch | null;\n    private emit;\n}"},{"name":"ProtocolErrorKind","signature":"export type ProtocolErrorKind = \"comparator-mismatch\" | \"epoch-mismatch\" | \"schema-mismatch\" | \"gap\";"},{"name":"ProtocolError","signature":"/** A protocol violation. All but a duplicate (handled silently) are unrecoverable for the\n *  current subscription — the RemoteBackend re-hydrates under a new epoch. */\nexport declare class ProtocolError extends Error {\n    readonly kind: ProtocolErrorKind;\n    constructor(kind: ProtocolErrorKind, message: string);\n}"},{"name":"Subscriber","signature":"/** Receiver side: validates a frame stream (comparator at `hello`; per batch — epoch match,\n *  schema-fp match, strict in-order seq) and emits the clean `hello`/`snapshot`/`batch`\n *  `ChangeEvent`s. It does NOT fold (the core `ArrayView` does) — the §2.2 split. */\nexport declare class Subscriber {\n    readonly epoch: number;\n    readonly schemaFp: string;\n    private readonly emit;\n    private phase;\n    private lastSeq;\n    constructor(hello: Hello, emit: (ev: ChangeEvent) => void);\n    /** Apply one incremental batch (or the seq-0 snapshot). Returns `\"duplicate\"` for an\n     *  already-applied seq (discarded — rc ops are not idempotent); throws {@link ProtocolError}\n     *  on a gap / epoch / schema mismatch (the caller re-hydrates). */\n    apply(batch: Batch): \"applied\" | \"duplicate\";\n}"}]},{"source":"packages/remote/src/subscribe.ts","declarations":[{"name":"SubscribeMode","signature":"export type SubscribeMode = \"flat\" | \"normalized\";"},{"name":"SubscribeRequest","signature":"export interface SubscribeRequest {\n    queryId: QueryId;\n    remote: RemoteQuery;\n    mode: SubscribeMode;\n}"},{"name":"SubscribeTarget","signature":"export type SubscribeTarget = {\n    name: string;\n    args: unknown;\n    leaseToken?: never;\n    wsEndpoint?: never;\n} | {\n    leaseToken: string;\n    wsEndpoint?: string;\n    name?: never;\n    args?: never;\n};"},{"name":"SubscribeResolver","signature":"export type SubscribeResolver = (request: SubscribeRequest) => SubscribeTarget | PromiseLike<SubscribeTarget>;"},{"name":"RawMutationSender","signature":"export type RawMutationSender = (mutations: Mutation[]) => void | PromiseLike<void>;"},{"name":"MutationEnvelopeSender","signature":"export type MutationEnvelopeSender = (envelope: MutationEnvelope) => void | PromiseLike<void>;"},{"name":"defaultSubscribeTarget","signature":"export declare function defaultSubscribeTarget(request: SubscribeRequest): SubscribeTarget;"},{"name":"subscribeMessage","signature":"export declare function subscribeMessage(request: SubscribeRequest, target: SubscribeTarget): SubscribeClientMsg;"},{"name":"isThenable","signature":"export declare function isThenable<T>(value: T | PromiseLike<T>): value is PromiseLike<T>;"}]},{"source":"packages/remote/src/transport.ts","declarations":[{"name":"Transport","signature":"export interface Transport {\n    /** Send a message up to the server. */\n    send(msg: ClientMsg): void;\n    /** Register the single handler for incoming server messages. */\n    onMessage(handler: (msg: ServerMsg) => void): void;\n    /** Register a handler fired after the connection is RE-established (not the first open) — the\n     *  source uses it to re-`init` + re-subscribe so a dropped/restarted daemon heals. Optional:\n     *  transports without reconnect (mocks, in-process) may omit it. */\n    onReconnect?(handler: () => void): void;\n    /** Register a handler fired when the connection is SUSTAINEDLY down — repeated reconnects to the\n     *  same endpoint have failed (a dead/removed follower, READ-ROUTER-DESIGN.md §3). The source uses\n     *  it to re-lease: the router returns a (possibly new) `wsEndpoint`, and a changed one migrates the\n     *  whole session off the dead node. Optional: transports without failover (mocks, in-process,\n     *  fixed endpoints) may omit it. */\n    onDown?(handler: () => void): void;\n    /** Tear down the connection. */\n    close(): void;\n}"},{"name":"WsTransport","signature":"/** A `Transport` over a `WebSocket` (text JSON frames). Messages sent before the socket\n *  opens are buffered and flushed on open (so `registerQuery`/`mutate` can be called eagerly).\n *  Reconnects with capped exponential backoff: if the socket drops (e.g. the daemon restarted)\n *  it reopens and fires `onReconnect` so the source rebuilds its subscriptions. */\nexport declare class WsTransport implements Transport {\n    private readonly url;\n    /** Reads the subprotocols to offer at each (re)connect — in affinity mode, `[\"rindle.v1\", \"aff.…\"]`\n     *  with the CURRENT ticket (FOLLOWER-AFFINITY-DESIGN.md §5). Undefined ⇒ offer none (today's\n     *  single-daemon behavior, byte-identical). Evaluated per connect so a reconnect presents the\n     *  freshest (or freshly cleared) ticket. */\n    private readonly subprotocols?;\n    private ws;\n    private handler;\n    private reconnectHandler;\n    private downHandler;\n    /** Buffered as PRE-SERIALIZED frames: serialization happens at `send` time so an\n     *  unserializable message (a `bigint` query arg — `JSON.stringify` throws on bigint)\n     *  throws typed INTO ITS CALLER instead of detonating later inside the socket's\n     *  `open` listener, where it would strand every frame queued behind it. */\n    private readonly pending;\n    private open;\n    private everOpened;\n    private closedByUser;\n    private attempt;\n    private reconnectTimer;\n    /** Failed reconnect attempts after which the connection is declared \"down\" (fires `onDown`). */\n    private readonly downThreshold;\n    /** True once `onDown` has fired for the CURRENT down episode; reset on the next successful open\n     *  so a later outage fires again (but a single episode fires `onDown` exactly once — no re-lease\n     *  storm while a follower is gone). */\n    private downFired;\n    constructor(url: string, opts?: {\n        downThreshold?: number;\n        subprotocols?: () => string[];\n    });\n    private connect;\n    private scheduleReconnect;\n    send(msg: ClientMsg): void;\n    onMessage(handler: (msg: ServerMsg) => void): void;\n    onReconnect(handler: () => void): void;\n    onDown(handler: () => void): void;\n    close(): void;\n}"}]},{"source":"packages/remote/src/query-error.ts","declarations":[{"name":"QueryErrorFields","signature":"/** The wire shape of a `queryError` frame (the optional fields ride 101 §4's reason shape). */\nexport interface QueryErrorFields {\n    message: string;\n    /** A machine code (`\"shed\"`, `\"faulted\"`, …); absent from older servers. */\n    code?: string;\n    /** True ⇒ schedule a re-subscribe; absent/false ⇒ terminal (today's behavior). */\n    retryable?: boolean;\n    /** The server's suggested floor for the first retry delay. */\n    retryAfterMs?: number;\n}"},{"name":"retryDelayMs","signature":"/** The `attempt`-th (0-based) re-subscribe delay: exponential from the server's suggested\n *  `retryAfterMs` (or 500 ms when it suggests none), capped at 30 s, with up-to-25 % upward\n *  jitter so a shed follower's re-admission gate is not hit by a thundering herd of\n *  synchronized retries. Never returns less than the server's suggestion — the floor is\n *  honored exactly, and the server picked it knowing its own re-admission rate. */\nexport declare function retryDelayMs(attempt: number, retryAfterMs: number | undefined): number;"}]},{"source":"packages/remote/src/backend.ts","declarations":[{"name":"RemoteBackendOptions","signature":"export interface RemoteBackendOptions {\n    /** Resolve the upstream subscribe target. Defaults to embedded-server `{name,args}`. */\n    resolveSubscribe?: SubscribeResolver;\n    /** Override raw authoritative writes, e.g. POST them to an app API server. */\n    sendMutation?: RawMutationSender;\n}"},{"name":"RemoteBackend","signature":"export declare class RemoteBackend implements Backend {\n    private readonly transport;\n    private readonly resolveSubscribe;\n    private readonly sendMutation?;\n    private handler;\n    private readonly devObservers;\n    private readonly subs;\n    constructor(transport: Transport, opts?: RemoteBackendOptions);\n    registerQuery(qid: QueryId, _ast: unknown, remote?: RemoteQuery): void;\n    unregisterQuery(qid: QueryId): void;\n    /** Eventually-consistent: the mutation is sent; the resulting batches arrive async on the\n     *  stream. The promise resolves once sent (the §2.3 write asymmetry, named not leaked). */\n    mutate(mutations: Mutation[]): Promise<void>;\n    onEvent(handler: (qid: QueryId, ev: ChangeEvent) => void): void;\n    __attachDevtoolsServerDeltas(observer: BackendDevObserver): () => void;\n    private subscribe;\n    private onServerMsg;\n    /** Route a `queryError` by its 101 §5 classification: retryable ⇒ keep the QState (and the\n     *  rows already folded downstream — 101 §6) and re-subscribe after a jittered backoff\n     *  honoring `retryAfterMs`; terminal (or pre-classification servers) ⇒ drop the\n     *  subscription, exactly as before (FOLLOWER-LAG-SHED §6.3). */\n    private onQueryError;\n    private openSubscriber;\n    private applyBatch;\n    private emitServerEvent;\n}"},{"name":"createRemoteStore","signature":"/** Convenience: a `Store` backed by a remote server, over a ws URL or a custom transport. */\nexport declare function createRemoteStore<S extends ColsMap>(schema: Schema<S>, urlOrTransport: string | Transport, opts?: RemoteBackendOptions): Store<S>;"}]},{"source":"packages/remote/src/affinity.ts","declarations":[{"name":"WS_SUBPROTOCOL","signature":"/** The base ws subprotocol the browser offers alongside its `aff.*` ticket; the fleet follower\n *  echoes it on the 101 (a strict browser closes a socket whose selected subprotocol it never\n *  offered, so the base is always offered in affinity mode). Inlined — NOT imported from\n *  `@rindle/affinity`'s `WS_SUBPROTOCOL` — to keep that crate's `node:crypto` out of the browser\n *  bundle (the same duplicate-to-stay-bundle-clean discipline the lease wire types use). Keep the\n *  two spellings in lock-step. */\nexport declare const WS_SUBPROTOCOL = \"rindle.v1\";"},{"name":"AffinityTicketStore","signature":"/** A mutable holder for the current opaque affinity ticket, shared by the transport, the source,\n *  and the lease POST (see the module header). */\nexport interface AffinityTicketStore {\n    /** The ticket to offer on the next ws handshake, or undefined — ticketless, so the edge\n     *  anycasts + mints a fresh one. A persisted/previous-connection ticket may be returned here\n     *  even while it is NOT yet safe for a lease; see {@link leaseTicket}. */\n    get(): string | undefined;\n    /** Record a freshly minted/refreshed ticket (from a connection's `{t:\"affinity\"}` frame). */\n    set(ticket: string): void;\n    /** Drop the ticket so the next connect goes ticketless (the pinned follower is gone, §8). */\n    clear(): void;\n    /** Mark the held ticket handshake-only until this connection emits a fresh mint frame. Called\n     *  before the first connection and every reconnect, after the held ticket was already selected\n     *  for the ws subprotocol offer. This prevents a restored/rotated/expired persisted ticket from\n     *  racing an HTTP lease onto an independently-anycast follower. */\n    connectionPending(): void;\n    /** Resolve with a ticket minted/refreshed on the CURRENT connection, or the next one\n     *  {@link set}. A persisted ticket deliberately does not resolve this wait. */\n    waitForTicket(): Promise<string>;\n    /** Obtain the current connection's ticket for an HTTP lease. The first missing-ticket wait is\n     *  bounded; its timeout removes the waiter and latches ticketless fallback, so later leases\n     *  return immediately until a mint frame arrives. Concurrent callers share the one timer.\n     *  `timedOut` is true only for that transition, allowing one warning per fallback episode. */\n    leaseTicket(timeoutMs: number): Promise<{\n        ticket?: string;\n        timedOut: boolean;\n    }>;\n}"},{"name":"TicketPersistence","signature":"/** Where a store persists the ticket across reloads. The browser backs this with sessionStorage\n *  (per-TAB, so two tabs can pin two regions — design §13); tests pass none (pure in-memory). */\nexport interface TicketPersistence {\n    load(): string | undefined;\n    save(ticket: string): void;\n    clear(): void;\n}"},{"name":"createAffinityTicketStore","signature":"/** Build an {@link AffinityTicketStore}, optionally persisted. Pure/in-memory when `persist` is\n *  omitted. */\nexport declare function createAffinityTicketStore(persist?: TicketPersistence): AffinityTicketStore;"},{"name":"offerSubprotocols","signature":"/** The subprotocol list to offer for one connection: the base protocol always, plus the held ticket\n *  (already an `aff.<…>` token) when one exists. */\nexport declare function offerSubprotocols(store: AffinityTicketStore): string[];"}]},{"source":"packages/remote/src/remote-source.ts","declarations":[{"name":"RemoteNormalizedSourceOptions","signature":"export interface RemoteNormalizedSourceOptions {\n    /** Resolve the upstream subscribe target. Defaults to embedded-server `{name,args}`. */\n    resolveSubscribe?: SubscribeResolver;\n    /** Override raw authoritative writes, e.g. POST them to an app API server. */\n    sendMutation?: RawMutationSender;\n}"},{"name":"RemoteNormalizedSource","signature":"export declare class RemoteNormalizedSource implements NormalizedSource {\n    private readonly transport;\n    private readonly resolveSubscribe;\n    private readonly sendMutation?;\n    private handler;\n    private readonly subs;\n    /** The client's own typed per-table schemas, for hello validation (CRIT#4); set by the backend. */\n    private clientTables;\n    constructor(transport: Transport, opts?: RemoteNormalizedSourceOptions);\n    expectClientSchema(tables: NormalizedTableSchema[]): void;\n    registerQuery(qid: QueryId, remote: RemoteQuery): void;\n    unregisterQuery(qid: QueryId): void;\n    mutate(mutations: Mutation[]): Promise<void>;\n    onNormalized(handler: (qid: QueryId, ev: NormalizedEvent) => void): void;\n    private subscribe;\n    private onServerMsg;\n    /** Route a `queryError` by its 101 §5 classification: retryable ⇒ keep the QState (and the\n     *  rows already folded downstream — 101 §6) and re-subscribe after a jittered backoff\n     *  honoring `retryAfterMs`; terminal (or pre-classification servers) ⇒ drop the\n     *  subscription, exactly as before (FOLLOWER-LAG-SHED §6.3). */\n    private onQueryError;\n    private openSubscriber;\n    private applyBatch;\n}"},{"name":"createRemoteNormalizedSource","signature":"/** Convenience: a `RemoteNormalizedSource` over a ws URL or a custom transport. */\nexport declare function createRemoteNormalizedSource(urlOrTransport: string | Transport, opts?: RemoteNormalizedSourceOptions): RemoteNormalizedSource;"}]},{"source":"packages/remote/src/optimistic-source.ts","declarations":[{"name":"TransportFactory","signature":"/** Build a transport to a follower's public ws endpoint (READ-ROUTER-DESIGN.md §2.3). Default\n *  `(endpoint) => new WsTransport(endpoint)`. */\nexport type TransportFactory = (endpoint: string) => Transport;"},{"name":"RemoteOptimisticConnection","signature":"/** How the source obtains its transport:\n *  - a pre-built {@link Transport} (or `{ transport }`) — FIXED: no endpoint migration, `wsEndpoint`\n *    on leases is ignored (in-process / tests / a single static daemon);\n *  - `{ factory, endpoint? }` — REPLACEABLE: transports are built on demand. An initial `endpoint`\n *    (a static `wsUrl` or an SSR-injected bootstrap) opens eagerly; otherwise the first lease's\n *    `wsEndpoint` opens it lazily, and a later lease naming a DIFFERENT endpoint migrates the whole\n *    session there. */\nexport type RemoteOptimisticConnection = Transport | {\n    transport: Transport;\n} | {\n    factory: TransportFactory;\n    endpoint?: string;\n};"},{"name":"RemoteOptimisticSourceOptions","signature":"export interface RemoteOptimisticSourceOptions {\n    /** Resolve the upstream subscribe target. Defaults to embedded-server `{name,args}`. */\n    resolveSubscribe?: SubscribeResolver;\n    /** Override named-mutator delivery, e.g. POST envelopes to the app API server. */\n    pushMutation?: MutationEnvelopeSender;\n    /** Follower-affinity mode (FOLLOWER-AFFINITY-DESIGN.md §3): the shared ticket store. When set, the\n     *  source records the follower's minted ticket from the `{t:\"affinity\"}` frame and CLEARS it on a\n     *  sustained outage so the next (ticketless) reconnect anycasts to a live follower and re-pins\n     *  (§8). Absent ⇒ affinity off (today's behavior). */\n    affinity?: AffinityTicketStore | (() => AffinityTicketStore | undefined);\n}"},{"name":"RemoteOptimisticSource","signature":"export declare class RemoteOptimisticSource implements OptimisticSource {\n    /** The CURRENT transport (undefined in pure-lazy mode until the first lease opens one). */\n    private transport;\n    /** The ws endpoint the current transport points at (undefined for a fixed transport). */\n    private currentEndpoint;\n    /** Builds a transport for an endpoint; undefined ⇒ fixed transport (no migration). */\n    private readonly transportFactory;\n    private readonly clientID;\n    private readonly resolveSubscribe;\n    private readonly pushMutationSender?;\n    /** Resolve the current affinity ticket store. A thunk lets the one-call client turn affinity on\n     *  after its first pure-lazy lease returns a placement ticket, before it opens the socket. */\n    private readonly affinityStore;\n    private handler;\n    private progressHandler;\n    private restartHandler;\n    private outcomeHandler;\n    private resyncHandler;\n    /** Set by {@link resync} when this is a LEASE-AUTH session (some sub presented a `leaseToken`):\n     *  transport pushes queue in {@link pendingPushes} until the first authenticated re-subscribe's\n     *  hello re-establishes the socket's subject, then flush (see QState.authed). Never set on a\n     *  token-less (embedded/rindled) session — its pushes need no subject and go straight out. */\n    private awaitingAuthedHello;\n    /** Envelopes held while {@link awaitingAuthedHello} (H-v §7.5 rule 3). Every entry corresponds\n     *  to a still-pending backend mutation (the re-send reconstructs from pending entries; app\n     *  invokes in the window are pending by definition), so a superseding resync may CLEAR this —\n     *  its own re-send regenerates whatever still matters. */\n    private pendingPushes;\n    private readonly subs;\n    /** Queries whose subscribe is waiting for a transport to exist — endpoint-less subscribes issued\n     *  in pure-lazy mode before any lease opens a transport (the lmid system query is registered by\n     *  the backend at construction). Flushed when a transport comes up. */\n    private readonly deferred;\n    /** One warning per source when an APP lease resolves without a `wsEndpoint` in pure-lazy mode —\n     *  nothing will ever open the transport, which is otherwise silent (views just stay empty). */\n    private warnedEndpointlessLease;\n    /** The daemon's boot id (from each `nhello`); a change means it restarted. */\n    private lastBootId;\n    /** The client's own typed per-table schemas, for hello validation (CRIT#4); set by the backend. */\n    private clientTables;\n    /** Once true (set by {@link close}), in-flight lease resolutions are inert — they must not open a\n     *  new transport or send after teardown. */\n    private closed;\n    /** True once any lease has carried a routed `wsEndpoint`. Gates onDown re-leasing so a single\n     *  UNROUTED daemon keeps its pre-router behavior (recover via reconnect→resync only), not an extra\n     *  lease POST during an outage. */\n    private sawRoutedEndpoint;\n    /** Bumped at the start of every re-subscribe-all pass. A migrate triggered mid-pass starts a new\n     *  pass (higher generation); the outer pass then aborts instead of re-subscribing queries twice. */\n    private resubscribeGen;\n    constructor(connection: RemoteOptimisticConnection, clientID: string, opts?: RemoteOptimisticSourceOptions);\n    /** Wire a transport's handlers (no `init`). */\n    private attach;\n    /** Make `transport` the current one, announce identity, and (re)subscribe anything deferred. */\n    private bringUp;\n    /** Build + bring up a fresh transport to `endpoint` (replaceable mode only). */\n    private openEndpoint;\n    /** Migrate the whole session to a new follower (§2.3): build the new transport, tear the old one\n     *  down, and re-subscribe EVERY active query there (re-leasing — the old tokens are\n     *  follower-local and invalid on the new node). */\n    private migrate;\n    /** Re-subscribe every live query on the current transport (each re-resolves its lease). A\n     *  re-subscribe can synchronously trigger a `migrate` (lease names a new endpoint), whose own\n     *  re-subscribe pass supersedes this one — the generation check then aborts this pass so a query\n     *  is never re-subscribed (and re-leased) twice. */\n    private resubscribeAll;\n    /** Flush subscribes deferred until a transport existed (e.g. the lmid query in pure-lazy mode). */\n    private flushDeferred;\n    /** The current follower's ws is sustainedly down — re-lease every query. The router returns a\n     *  (possibly new) `wsEndpoint`: a changed one migrates the session; an unchanged one re-subscribes\n     *  over the reconnecting transport (READ-ROUTER-DESIGN.md §3). No-op for an UNROUTED daemon (no\n     *  lease ever carried a `wsEndpoint`) — there is nowhere to move, so we keep the pre-router\n     *  behavior and let the transport's own reconnect→resync recover. */\n    private onDown;\n    /** Tear down the current transport and make any in-flight lease resolution inert (a late lease\n     *  must NOT open a new transport after the consumer closed the client). */\n    close(): void;\n    /** Register a handler fired when the DAEMON restarts (a new boot id) — the backend resets its\n     *  `cv` watermark so the new daemon's reset `cv` sequence is accepted instead of dropped. */\n    onRestart(handler: () => void): void;\n    expectClientSchema(tables: NormalizedTableSchema[]): void;\n    registerQuery(qid: QueryId, remote: RemoteQuery): void;\n    unregisterQuery(qid: QueryId): void;\n    pushMutation(envelope: MutationEnvelope): Promise<void>;\n    onNormalized(handler: (qid: QueryId, ev: NormalizedEvent) => void): void;\n    onProgress(handler: (frame: ProgressFrame) => void): void;\n    /** The room deopt handshake's verdict stream (H-v). Dispatched OUT-OF-BAND on arrival — see\n     *  {@link onServerMsg}'s `mutationOutcome` arm for why it must never wait behind the cv buffer. */\n    onMutationOutcome(handler: (frame: MutationOutcomeFrame) => void): void;\n    /** Fired once per re-established session, SYNCHRONOUSLY inside {@link resync} — before any\n     *  post-reconnect frame can release (the §7.5 rule-3 window: a replayed lmid snapshot must not\n     *  retire an entry whose outcome frame died with the old socket before the re-send captured\n     *  it). The backend re-sends the domain's unconfirmed pending envelopes with their original\n     *  mids; on a lease-auth session their DELIVERY is deferred until the first token hello\n     *  re-authenticates the socket ({@link pendingPushes}). */\n    onResync(handler: () => void): void;\n    private subscribe;\n    private onServerMsg;\n    /** On reconnect: re-announce identity, fire the `onResync` re-send, and re-subscribe every live\n     *  query (each re-resolves its lease, so a restarted daemon re-materializes + re-leases on the\n     *  transiently). The re-send fires HERE — synchronously, before any post-reconnect frame can be\n     *  processed — because the §7.5 rule-3 window closes fast: the re-subscribed lmid stream's\n     *  fresh snapshot may cover a mid whose outcome frame died with the OLD socket, and once the\n     *  release retires that entry as an apparent success there is nothing left to re-send (the\n     *  lost-deopt write would silently vanish). Firing now captures the in-flight set intact; on a\n     *  lease-auth session the envelopes themselves are HELD ({@link pendingPushes}) until the first\n     *  token re-subscribe's hello re-authenticates the socket, then flush in order — so the shell's\n     *  subject gate never refuses them, and its re-answer (a recorded outcome for any non-applied\n     *  mid) resolves even an already-retired entry via the handshake's not-found arm. */\n    private resync;\n    /** Track the daemon's boot id; a change (after the first) means it restarted — fire onRestart. */\n    private observeBootId;\n    /** Route a `queryError` by its 101 §5 classification: retryable ⇒ keep the QState (and the\n     *  rows already folded downstream — 101 §6) and re-subscribe after a jittered backoff\n     *  honoring `retryAfterMs`; terminal (or pre-classification servers) ⇒ drop the\n     *  subscription, exactly as before. Fixes the stranded-client gap: a worker fault's or a\n     *  shedding follower's error now heals end-to-end (FOLLOWER-LAG-SHED §6.3). */\n    private onQueryError;\n    private openSubscriber;\n    private applyBatch;\n}"},{"name":"createRemoteOptimisticSource","signature":"/** Convenience: a `RemoteOptimisticSource` over a ws URL or a custom transport. A URL becomes a\n *  replaceable connection seeded at that endpoint (so a routed lease can still migrate it); a\n *  pre-built transport stays fixed. */\nexport declare function createRemoteOptimisticSource(urlOrTransport: string | Transport, clientID: string, opts?: RemoteOptimisticSourceOptions): RemoteOptimisticSource;"}]},{"source":"packages/remote/src/mutation-queue.ts","declarations":[{"name":"PushOutcome","signature":"/** One envelope's outcome from the API server's mutate endpoint. */\nexport interface PushOutcome {\n    accepted: boolean;\n    reason?: string;\n}"},{"name":"QueuedMutationSenderOptions","signature":"export interface QueuedMutationSenderOptions {\n    /** Deliver one in-order batch; resolve once the daemon durably processed it (i.e. the\n     *  API server awaited its daemon call before responding). Throw to have the SAME batch\n     *  retried. Return per-envelope outcomes, or void when everything was accepted. */\n    send: (envelopes: MutationEnvelope[]) => Promise<PushOutcome[] | void>;\n    /** A policy rejection for one envelope (never retried; the prediction snaps back via the\n     *  lmid release — this callback is where the reason reaches the app). */\n    onRejected?: (envelope: MutationEnvelope, reason: string) => void;\n    /** A failed flush attempt, before its retry. The ONLY surface for a transport/authority\n     *  failure: `send` throwing is otherwise absorbed by the retry loop, so a queue built without\n     *  this hook fails perfectly silently while head-of-line blocking every later mutation. */\n    onError?: (err: unknown, attempt: number) => void;\n    /** Backoff before retry `attempt` (1-based). Default: 200ms · 2^(attempt-1), capped at 5s. */\n    retryDelayMs?: (attempt: number) => number;\n    /** Max envelopes per flush. Default 32. */\n    maxBatch?: number;\n}"},{"name":"createQueuedMutationSender","signature":"/** A `MutationEnvelopeSender` (the `pushMutation` option of `RemoteOptimisticSource`) that\n *  queues envelopes and delivers them as confirmed, in-order batches. */\nexport declare function createQueuedMutationSender(opts: QueuedMutationSenderOptions): MutationEnvelopeSender;"}]},{"source":"packages/remote/src/index.ts","declarations":[]},{"source":"packages/optimistic/src/client-id.ts","declarations":[{"name":"resetTabInstanceForTests","signature":"/** Test-only: reset the per-load instance counter to simulate a fresh page load. Deliberately NOT\n *  re-exported from the package barrel. */\nexport declare function resetTabInstanceForTests(): void;"},{"name":"resetStableClientID","signature":"/** Clear the persisted client identity so the next page load starts a fresh mid/lmid stream.\n *  Intended for dev recovery after out-of-band server state loss, not for normal operation. */\nexport declare function resetStableClientID(): void;"},{"name":"sessionTicketPersistence","signature":"/** A sessionStorage-backed {@link TicketPersistence} for the affinity ticket — per-tab, survives a\n *  reload (see {@link AFFINITY_TICKET_KEY}). Every access tolerates web storage being absent (SSR,\n *  private mode): the store then behaves as pure in-memory, re-anycasting on each fresh load. */\nexport declare function sessionTicketPersistence(): TicketPersistence;"},{"name":"stableClientID","signature":"/** The connection's stable clientID. A per-origin base (localStorage) keeps one logical identity\n *  across reloads; a per-tab suffix (sessionStorage) gives each tab its OWN mid/lmid stream; a\n *  per-load instance suffix keeps two clients constructed in ONE tab from sharing that stream. Falls\n *  back to a fresh random id when web storage is unavailable.\n *\n *  Note: an explicit \"duplicate tab\" copies sessionStorage, so the clone briefly shares its source's\n *  suffix until reloaded — the one residual case of the shared-clientID collision. */\nexport declare function stableClientID(): string;"}]},{"source":"packages/optimistic/src/local-persist.ts","declarations":[{"name":"PersistLocalOptions","signature":"export interface PersistLocalOptions {\n    /** The storage identity (§3.2): one IDB database per (origin, user). NOT the mutator principal —\n     *  this is fixed for the client's lifetime; an anonymous mode passes its own sentinel (`\"anon\"`). */\n    user: string;\n    /** Call `navigator.storage.persist()` to resist eviction (§3.2). Default false — it can prompt. */\n    requestPersistentStorage?: boolean;\n    /** Reports storage-operation failures without rejecting local writes. Default `console.error`.\n     *  Missing browser APIs can warn and disable a feature instead; this hook does not receive\n     *  every channel failure. Persistence and cross-tab delivery remain best effort. */\n    onError?: (e: Error) => void;\n    /** Test seam: a fake IDB/locks/channel environment. Defaults to the browser globals. */\n    env?: PersistEnv;\n}"},{"name":"LocalPersistence","signature":"/** The attached layer's handle. `createRindleClient` awaits {@link ready} before returning (§5.2). */\nexport interface LocalPersistence {\n    /** Resolves after the initial restore attempt. It can resolve in a degraded mode when browser\n     *  storage is unavailable or an operation fails; it is not a durability guarantee. */\n    readonly ready: Promise<void>;\n    /** Best-effort final persist/forward (the `pagehide` hook, §9): re-posts unacked ops (any\n     *  role), then a leader drains its persist queue and retries P9-degraded batches. */\n    flush(): Promise<void>;\n    /** Release leadership (or abandon the queued lock request), close the channel + IDB (P10).\n     *  A leader DRAINS its queued persist steps first (they carry already-committed writes) and\n     *  releases the lock only after the last one lands; a follower re-posts its unacked ops. */\n    close(): void;\n    /** Introspection for tests/devtools: current role. */\n    role(): \"leader\" | \"follower\";\n}"},{"name":"deleteLocalPersistence","signature":"/** Delete a user's local-persistence database — the sanctioned LOGOUT hook (§3.2). Never called\n *  implicitly; the old database otherwise remains on disk (fast re-login, and a privacy decision\n *  the app owns). Close this tab's live client for `user` first; a SIBLING tab's connection is\n *  released automatically (it closes on `versionchange` and degrades to broadcast-only), so a\n *  multi-tab logout completes instead of parking behind the other tab forever. */\nexport declare function deleteLocalPersistence(user: string, env?: PersistEnv): Promise<void>;"},{"name":"attachLocalPersistence","signature":"/** Attach the persistence layer to a backend (standalone form — `createRindleClient` calls this\n *  for you). The observer is wired SYNCHRONOUSLY, but the mirror starts empty: attach before the\n *  first `writeLocal` (§5.2, a v1 constraint `createRindleClient` satisfies by construction).\n *  Await `handle.ready` before first render if the app wants restored rows at first paint. */\nexport declare function attachLocalPersistence<S extends ColsMap>(backend: OptimisticBackend<S>, schema: Schema<S>, opts: PersistLocalOptions): LocalPersistence;"},{"name":"PersistDb","signature":"/** The narrow storage surface the layer needs (§3.1): two fixed stores, `rows` + `meta`. Each\n *  method is one atomic IDB transaction; a resolved promise means the txn COMPLETED — the P1\n *  (\"persist-then-broadcast\") anchor. */\nexport interface PersistDb {\n    getMeta(): Promise<PersistMeta | undefined>;\n    putMeta(meta: PersistMeta): Promise<void>;\n    getAllRows(): Promise<StoredRow[]>;\n    /** Apply one commit batch atomically: `row === null` deletes, else puts. */\n    putBatch(batch: RowState[]): Promise<void>;\n    /** The P7 gate: clear `rows` and write `meta` in ONE transaction (never a half state). */\n    reset(meta: PersistMeta): Promise<void>;\n    /** Delete specific records (the leader's stale-table sweep, §3.1). */\n    deleteRows(keys: Array<{\n        table: string;\n        pkKey: string;\n    }>): Promise<void>;\n    close(): void;\n}"},{"name":"PersistChannel","signature":"export interface PersistChannel {\n    post(msg: unknown): void;\n    onMessage(handler: (msg: unknown) => void): void;\n    close(): void;\n}"},{"name":"PersistEnv","signature":"export interface PersistEnv {\n    /** Open (creating if needed) the database. Resolves `null` when storage is unavailable —\n     *  the layer degrades to broadcast-only (§3.2). */\n    openDatabase(name: string): Promise<PersistDb | null>;\n    deleteDatabase(name: string): Promise<void>;\n    /** Open the tab-coherence channel; `null` when BroadcastChannel is unavailable (single-tab). */\n    createChannel(name: string): PersistChannel | null;\n    /** Queue for the exclusive leadership lock (§4.1): `onAcquired`'s promise HOLDS the lock until\n     *  it resolves; `signal` aborts a still-queued request. When Web Locks are unavailable, grant\n     *  immediately ONLY if the runtime is provably single-context (no channel) — see\n     *  {@link leaderElectionUnavailable}. */\n    requestLock(name: string, signal: AbortSignal, onAcquired: () => Promise<void>): void;\n    /** The runtime has tabs (a channel) but NO exclusive lock (Firefox <96, Safari 15.1–15.3,\n     *  Node): every context would self-promote into concurrent leaders over one database — P2\n     *  violated, permanent divergence. When set, the layer runs INERT: local tables still work,\n     *  session-scoped (the 201 baseline), with no persistence and no cross-tab replication. */\n    leaderElectionUnavailable?: boolean;\n    /** `navigator.storage.persist()` (§3.2), best-effort. */\n    requestPersistentStorage?(): void;\n}"},{"name":"PersistMeta","signature":"export interface PersistMeta {\n    schemaHash: string;\n    epoch: number;\n}"},{"name":"StoredRow","signature":"export interface StoredRow {\n    table: string;\n    pkKey: string;\n    row: WireValue[];\n}"},{"name":"RowState","signature":"/** The replication unit everywhere (§4.3): idempotent full-row state. `row: null` = tombstone\n *  (live protocol only — removes DELETE the IDB record; there are no persisted tombstones). */\nexport interface RowState {\n    table: string;\n    pkKey: string;\n    row: WireValue[] | null;\n}"},{"name":"defaultEnv","signature":"/** The real-browser environment: IndexedDB + BroadcastChannel + `navigator.locks`, each reached\n *  structurally and each degrading gracefully when absent (§3.2). */\nexport declare function defaultEnv(): PersistEnv;"}]},{"source":"packages/optimistic/src/client.ts","declarations":[{"name":"HeadersInit","signature":"export type HeadersInit = Record<string, string>;"},{"name":"RealtimeLeaseTableSpec","signature":"/** One footprint table's spec on the lease wire (mirror of the api-server's `RoomTableSpec`).\n *  `footprintWhere` (H-iii lease-wire flip) is the EXACT footprint-membership predicate from the\n *  ONE unified compiler (`compileRoomScopeSpecs` — the same output the boot wire ships the room\n *  gate): present only for an exact footprint ROOT (lossless row-local extraction; the vacuous-true\n *  empty AND for an unconstrained one), ABSENT for child/correlated tables. It feeds the §3\n *  router's pk-membership read proof (`OptimisticBackend`'s routing table) — never authorization. */\nexport interface RealtimeLeaseTableSpec {\n    table: string;\n    footprintWhere?: Condition;\n    writable: {\n        kind: \"none\";\n    } | {\n        kind: \"predicate\";\n        where?: Condition;\n        joinKeyCols: string[];\n    };\n}"},{"name":"RealtimeLeaseBlock","signature":"/** The room-serve block on a query lease (mirror of the api-server's `QueryLeaseRealtime`). */\nexport interface RealtimeLeaseBlock {\n    /** The store's gate/domain key for this room source (`connectSource`) — `\"room:<profile>/<key>\"`. */\n    sourceKey: string;\n    /** Where the ROOM ws opens — the lease's DEDICATED field. Never confuse it with the TOP-LEVEL\n     *  `wsEndpoint` (the read-router's whole-DAEMON-session migration signal). */\n    wsEndpoint: string;\n    /** The room shell's self-authorizing signed lease (seals the APPROVED query AST) — presented as\n     *  the room subscribe's `leaseToken`. */\n    roomToken: string;\n    /** Token expiry (ms epoch) — the renewal clock (renewal = a fresh lease through the app route). */\n    exp: number;\n    doc: string;\n    tables: RealtimeLeaseTableSpec[];\n}"},{"name":"LifecycleLeaseEntry","signature":"/** One minted SYSTEM-STREAM lease on the `lifecycle` block (mirror of the api-server's\n *  `QueryLeaseLifecycleLease`; Slice I-iii): an ordinary daemon materialization over one of the\n *  four `_rindle_*` lifecycle tables, presented on the wire exactly like the primary lease\n *  (subscribe-with-`leaseToken`). The identity fields document the minted predicate — this client\n *  keys its retains (idempotence per (table, scope/doc/clientId)) and the backend keys its\n *  release-time row filters on them. */\nexport interface LifecycleLeaseEntry {\n    table: string;\n    leaseToken: string;\n    wsEndpoint?: string;\n    /** DOORBELL only: the §4.1 occupancy scope (= the wire room doc, `\"<profile>/<key>\"`). */\n    scope?: string;\n    /** FENCE entries only: the room doc. */\n    doc?: string;\n    /** FENCE ledger/outcomes when the server could client-scope the predicate. */\n    clientId?: string;\n}"},{"name":"LifecycleLeaseBlock","signature":"/** The §4 lifecycle block on a query lease (mirror of the api-server's `QueryLeaseLifecycle`):\n *  `doorbell` on every labeled lease under the opt-in server config, `fence` (watermark + ledger\n *  + outcomes) only when the lease is ALSO room-served. Absent ⇒ this client behaves exactly as\n *  today — the whole plane is inert-until-fed. */\nexport interface LifecycleLeaseBlock {\n    doorbell: LifecycleLeaseEntry;\n    fence?: LifecycleLeaseEntry[];\n}"},{"name":"RealtimeFenceBlock","signature":"/** The §4.2 downgrade fence block on a query lease (mirror of the api-server's\n *  `QueryLeaseRealtimeFence`, Slice I-v): rides a labeled reply whose occupancy gate CLOSED\n *  (no `realtime` block) when the server could drain the room — `finalFlushSeq` is the room's\n *  last COMMITTED flush seq, the value the client's ghost holds against\n *  (`_rindle_room_watermark(doc) ≥ finalFlushSeq` through the daemon plane). A room-attached\n *  query receiving it runs the GRACEFUL downgrade dance instead of the loud legacy anomaly. */\nexport interface RealtimeFenceBlock {\n    /** The retiring room source's gate/domain key (`\"room:\" + doc`). */\n    sourceKey: string;\n    doc: string;\n    finalFlushSeq: number;\n}"},{"name":"RealtimeAnomalyKind","signature":"export type RealtimeAnomalyKind = \n/** A re-lease (renewal / reconnect re-resolution) came back WITHOUT a realtime block AND\n *  without a §4.2 fence — the query is no longer room-served but the server gave nothing to\n *  downgrade behind (a legacy/pre-I-v server, or `lifecycle.drainRoom` unconfigured). Surfaced\n *  loudly; a reply WITH a `realtimeFence` takes the graceful I-v dance instead. */\n\"downgrade\"\n/** The I-v ghost is STUCK (§7.5): its watermark fence cleared but sent room-domain mids never\n *  resolved (sent-but-undelivered when the socket died — undecidable in general). The ghost\n *  holds — no timeout-retire is invented — and the mids are named once, actionably. */\n | \"downgrade-stuck\"\n/** A lease named a DIFFERENT `sourceKey` than the query's live room sub — surfaced loudly, no\n *  re-attach. Deliberately NOT composed from demote+upgrade (deferred to §7.6's rare-case\n *  follow-up): a sourceKey-change reply carries a realtime block for the NEW room but NO\n *  fence for the OLD one, and without `finalFlushSeq` the old slice cannot be ghosted soundly. */\n | \"source-key-changed\"\n/** The lease POST failed or the room attach threw. The initial-materialize case fails OPEN to\n *  the daemon path (indistinguishable from an unlabeled query's recovery). */\n | \"lease-failed\";"},{"name":"RealtimeAnomaly","signature":"/** A loud realtime lease anomaly (always ALSO `console.error`'d). */\nexport interface RealtimeAnomaly {\n    kind: RealtimeAnomalyKind;\n    name: string;\n    args: unknown;\n    message: string;\n}"},{"name":"RealtimeClientOptions","signature":"/** Rindle Realtime client knobs (Slice G-v). All optional — an app with no labeled queries never\n *  touches any of this. */\nexport interface RealtimeClientOptions {\n    /** The DECLARED room mutators (302 §5: declared, not derived). A mutator named here routes to\n     *  the attached room — it stages onto the room's own tables and ships on the room socket —\n     *  whenever exactly ONE room is attached; solo (no room) it takes the ordinary daemon path,\n     *  and with several rooms attached it routes daemon too (explicit multi-room binding is a\n     *  later slice). Every mutator NOT named here is a daemon mutator. A misdeclaration fails\n     *  SOFT (302 §5.1): the write lands on the other authority's tables, so the view just stops\n     *  feeling instant until the echo relays it — never a divergence. An explicit top-level\n     *  `domainPolicy` overrides this entirely. */\n    mutators?: readonly string[];\n    /** Build the ROOM ws transport for a lease's `realtime.wsEndpoint`. Default\n     *  `(endpoint) => new WsTransport(endpoint)`. Injectable for tests / custom ws impls. */\n    transport?: (endpoint: string) => Transport;\n    /** Loud anomaly surface — see {@link RealtimeAnomaly}. Every anomaly is also `console.error`'d. */\n    onAnomaly?: (anomaly: RealtimeAnomaly) => void;\n    /** How long before a room lease's `exp` the proactive token renewal fires (default 30s). The\n     *  renewal is a FRESH lease through the app query route (renewal-as-reauthorization), and the\n     *  live room sub proactively re-subscribes with the fresh token so the shell's TTL backstop\n     *  never fires on a healthy session. */\n    renewMarginMs?: number;\n}"},{"name":"RealtimeInspect","signature":"/** Read-only realtime bookkeeping snapshot ({@link RindleClient.__realtimeInspect}) — test/devtools\n *  introspection, mirroring the backend's `__inspect` convention. */\nexport interface RealtimeInspect {\n    rooms: Record<string, {\n        wsEndpoint: string;\n        /** The room's OWNED tables (302 §2): wire table → its namespaced engine table — read back\n         *  from the BACKEND's registry (`backend.roomTablesFor`, the one source of truth; the\n         *  client keeps no shadow copy). */\n        promoted: Record<string, string>;\n        /** Live room-retained queries on this room, by remote key. */\n        queries: Record<string, {\n            name: string;\n            sourceQid: QueryId;\n            exp: number;\n            refCount: number;\n        }>;\n    }>;\n}"},{"name":"RindleClientOptions","signature":"export interface RindleClientOptions<S extends ColsMap, R extends ClientRegistry> {\n    schema: Schema<S>;\n    /** The PREDICTED mutators (the API server holds the authoritative twins by name). */\n    mutators: R;\n    /** The acting principal for a shared (generator) mutator's `ctx.user` — the local identity the\n     *  optimistic prediction writes under (the server injects its OWN authenticated user for the\n     *  authoritative run). Re-read on each run, including replay. Keep this identity stable for\n     *  the client's lifetime and recreate the client on account changes. */\n    user?: () => string;\n    /** The app API server: named queries resolve to leases here, mutations push here. */\n    api: {\n        url: string;\n        routes?: {\n            query?: string;\n            mutate?: string;\n        };\n        /** Extra headers per request (auth). A function is re-evaluated per call. */\n        headers?: HeadersInit | (() => HeadersInit | Promise<HeadersInit>);\n        fetch?: typeof fetch;\n    };\n    /** Optional subscription transport override. Omit it in the normal unified setup: the first\n     *  query lease carries `wsEndpoint` + a fresh affinity ticket and opens the transport lazily.\n     *  - `{ wsUrl }` — a static endpoint (single daemon), opened eagerly; in a routed deploy this is\n     *    the SSR-injected bootstrap endpoint (READ-ROUTER-DESIGN.md §2.4). A routed lease naming a\n     *    different follower migrates the connection there.\n     *  - `{ wsUrl }` omitted (or this whole option omitted) — pure-lazy: the first lease's\n     *    `wsEndpoint` opens the connection (a\n     *    routed SPA with no SSR bootstrap).\n     *  - `{ transport }` — a pre-built transport (tests / in-process); fixed, no migration.\n     *\n     *  With a fixed `wsUrl`, set `affinity: true` to opt into FOLLOWER-AFFINITY mode (design §2).\n     *  With no daemon option, a lease that returns an affinity ticket enables the same mode\n     *  automatically before opening its socket. The ticket is persisted per-tab and forwarded on\n     *  later leases so both legs pin the same nearby follower. Ignored for `{ transport }`. */\n    daemon?: {\n        wsUrl?: string;\n        affinity?: boolean;\n    } | {\n        transport: Transport;\n    };\n    /** Stable client identity. Default: a per-origin base (localStorage) plus per-tab and per-instance\n     *  suffixes, so each tab — and each client instance within a tab — gets its own mid sequence yet a\n     *  reload keeps it; falls back to a fresh random id when web storage is unavailable. Pass a value\n     *  to override. */\n    clientID?: string;\n    /** A policy rejection's reason (the prediction's snap-back rides the lmid release). Fires for\n     *  BOTH planes since H-v: the HTTP mutate route's per-envelope rejections AND a room's\n     *  `mutationOutcome {kind:\"rejected\"}` frames — one surface, whichever authority said no. */\n    onRejected?: (envelope: MutationEnvelope, reason: string) => void;\n    /** A failed mutate FLUSH — the transport/authority leg, not a policy verdict: the batch is\n     *  retried with backoff and nothing has been confirmed yet, so the pending mutations stay\n     *  predicted and the queue is head-of-line blocked until it succeeds. Fires once per attempt.\n     *  This is the twin of {@link onRejected}: `onRejected` is \"the authority said no\" (final,\n     *  lmid already advanced), this is \"the authority never answered\" (retrying).\n     *\n     *  LOUD by contract — every attempt reaching this hook is ALSO `console.error`'d (backed off\n     *  to attempts 1, 2, 4, 8, … so a long outage doesn't flood the console), because an\n     *  indefinitely retried flush is indistinguishable from a hung app if it stays silent. */\n    onMutationError?: (err: unknown, attempt: number) => void;\n    /** Persist `local: true` tables across reloads and keep them live-coherent across tabs\n     *  (`207-LOCAL-TABLE-PERSISTENCE-DESIGN.md`). `user` is the storage identity (§3.2) — one IDB\n     *  database per (origin, user); pass a sentinel like `\"anon\"` for a signed-out mode. When set,\n     *  `createRindleClient` awaits the initial restore attempt before returning. Storage failures\n     *  can leave tables empty while local writes remain usable. Close the old client before calling\n     *  `deleteLocalPersistence(user)` at logout; deletion is never implicit.\n     *  Per-table opt-out: declare `table(name, { local: \"session\" })` for local state that must stay\n     *  ephemeral and per-tab (e.g. selection) even with persistence on (§5.4). */\n    persistLocal?: PersistLocalOptions;\n    queue?: {\n        maxBatch?: number;\n        retryDelayMs?: (attempt: number) => number;\n    };\n    /** Explicitly selects a mutation's confirming stream. Its domain supplies the mutation ID,\n     *  transport, and confirmation watermark. Returning `undefined` selects `\"daemon\"`.\n     *  If this policy is omitted, `realtime.mutators` supplies the declared room routing policy;\n     *  without either declaration, mutations route to the daemon. Routes are not inferred from\n     *  reads or writes. A room deopt can re-enqueue the mutation on the daemon stream. */\n    domainPolicy?: (name: string, args: unknown) => string | undefined;\n    /** Rindle Realtime client knobs (G-v resolve-then-register) — see {@link RealtimeClientOptions}. */\n    realtime?: RealtimeClientOptions;\n    /** Development-only recovery knobs. Keep off in production: a mutation gap means state loss\n     *  or two writers sharing a clientID, and should be investigated. */\n    dev?: {\n        /** On a mutation-gap response, clear the persisted clientID and hard reload the page. This\n         *  recovers from dev DB wipes while making the reset visible to the developer. */\n        resetOnMutationGap?: boolean;\n    };\n}"},{"name":"RindleClient","signature":"export interface RindleClient<S extends ColsMap, R extends ClientRegistry> {\n    store: Store<S>;\n    backend: OptimisticBackend<S>;\n    /** Retain a named query for navigation/prefetch. By default waits for server authority; pass\n     *  `{ until: \"present\" }` to continue as soon as the local view has a result. */\n    ensure<Q extends AnyQuery>(query: Q, options?: EnsureQueryOptions): Promise<void>;\n    /** Call `mutate.foo(args)` for a normal optimistic write, or `mutate.foo.folded(opts, args)` for a\n     *  debounced, last-value-wins folded write (FOLDED-MUTATIONS-DESIGN §3). */\n    mutate: {\n        [K in keyof R]: MutateFn<Parameters<R[K]>[1]>;\n    };\n    /** Assign IDs and enqueue every outstanding fold immediately. Also called on\n     *  `beforeunload`/`pagehide` as a best-effort flush; neither path confirms delivery. */\n    flushFolds(): void;\n    clientID: string;\n    /** Release retained prefetch queries, transports, and lifecycle listeners; close local persistence.\n     *  Flushes folded arguments into the queue first; does not await server confirmation. */\n    close(): void;\n    /** Read-only realtime bookkeeping snapshot (rooms, promoted tables + their client-held\n     *  `joinKeyCols`, live room queries) — the `__inspect`-convention test/devtools hook. */\n    __realtimeInspect(): RealtimeInspect;\n}"},{"name":"createRindleClient","signature":"/** Create a synced application client over the local WASM engine. Connects named query leases,\n *  WebSocket subscriptions, and the optimistic mutation queue to the application's API routes.\n *  Await construction before using the store; when configured, it awaits the local-table restore\n *  attempt as well. Construction does not mean remote queries are synchronized: retain queries\n *  or use `ensure` for the required readiness boundary.\n *\n *  Keep one client per application session. Call `close()` when the session ends, and create a\n *  new client when its authenticated principal changes. The application server owns authorization.\n */\nexport declare function createRindleClient<S extends ColsMap, R extends ClientRegistry>(opts: RindleClientOptions<S, R>): Promise<RindleClient<S, R>>;"}]},{"source":"packages/optimistic/src/index.ts","declarations":[{"name":"MutateFn","signature":"/** One entry of the {@link createOptimisticStore} `mutate` facade: call it for a normal optimistic\n *  write (returns the `mid`), or `.folded(opts, args)` for a debounced, last-value-wins folded write\n *  (returns a {@link FoldHandle} — the `mid` is assigned at flush, FOLDED-MUTATIONS-DESIGN §3). */\nexport type MutateFn<Args> = ((args: Args) => number) & {\n    folded(opts: FoldOptions, args: Args): FoldHandle;\n};"},{"name":"createOptimisticStore","signature":"/** A {@link Store} over an {@link OptimisticBackend}, plus the named-mutator entry\n *  (`mutate.createIssue(args)` — the §9 dream shape) and the §6 lifecycle surface. */\nexport declare function createOptimisticStore<S extends ColsMap, R extends ClientRegistry>(schema: Schema<S>, source: OptimisticSource, registry: R, opts: OptimisticBackendOptions): {\n    store: Store<S>;\n    backend: OptimisticBackend<S>;\n    mutate: {\n        [K in keyof R]: MutateFn<Parameters<R[K]>[1]>;\n    };\n};"}]},{"source":"packages/react-devtools/src/index.ts","declarations":[{"name":"RindleDevtoolsProps","signature":"export interface RindleDevtoolsProps {\n    /** Bind to a specific core. Omit to auto-discover the most recently attached client via the\n     *  global hub (the common case). */\n    core?: DevtoolsCore;\n    /** Open the panel on first mount. Default false (starts as the launcher button). */\n    defaultOpen?: boolean;\n}"},{"name":"RindleDevtools","signature":"/** The floating Rindle devtools panel. Renders just a launcher until a client is attached via\n *  `attachDevtools(app)`. */\nexport declare function RindleDevtools({ core: explicit, defaultOpen }: RindleDevtoolsProps): ReactNode;"}]},{"source":"rust/rindle-replica-node/src/index.ts","declarations":[{"name":"ReplicaBackend","signature":"/** The in-process, SQLite-backed native backend. Each instance owns its own replica (a\n *  temporary WAL database). Registers every schema table on construction. This wrapper has no\n *  database-path option and does not persist application data across process restarts. */\nexport declare class ReplicaBackend<S extends ColsMap> implements Backend {\n    private readonly db;\n    private handler;\n    private boundaryHandler;\n    private readonly dispatchQueue;\n    private draining;\n    constructor(schema: Schema<S>);\n    registerQuery(qid: QueryId, ast: Ast): void;\n    unregisterQuery(qid: QueryId): void;\n    mutate(mutations: Mutation[]): Promise<void>;\n    onEvent(handler: (qid: QueryId, ev: ChangeEvent) => void): void;\n    /** Register the Store's commit-boundary handler ({@link Backend.onCommitBoundary}): `dispatch`\n     *  calls it around each commit's per-query batch delivery so the Store can fold every affected\n     *  view before notifying any subscriber. */\n    onCommitBoundary(handler: (phase: \"begin\" | \"end\") => void): void;\n    /** Deliver one commit's per-query batches — a faithful mirror of `WasmBackend.dispatch`.\n     *  Non-reentrant: if a delivery is already in progress (a subscriber re-entered via `write()`),\n     *  enqueue and let the active drain pick it up FIFO, so each query folds commits in order.\n     *  Per-query isolated: a view's fold or subscriber throwing does NOT drop sibling queries'\n     *  batches — the first error is re-raised only after every query has been delivered.\n     *\n     *  Cross-view-atomic notification: each commit is bracketed with `boundaryHandler(\"begin\"/\"end\")`\n     *  so the Store folds ALL of this commit's views before notifying ANY subscriber (a subscriber\n     *  re-reading a sibling view then sees post-commit data). `begin`/`end` stay balanced even if a\n     *  fold throws (the `finally`), and a re-entrant write enqueued during the `end` flush drains as\n     *  its own bracketed commit in the next loop turn. */\n    private dispatch;\n}"},{"name":"createReplicaStore","signature":"/** Create a local {@link Store} over a fresh temporary SQLite database. The schema creates the\n *  tables; there is no file-path or restart-persistence option. Destroy materialized views when\n *  finished. The native replica's temporary files are removed when its handle is finalized. */\nexport declare function createReplicaStore<S extends ColsMap>(schema: Schema<S>): Store<S>;"}]},{"source":"packages/room/src/wasm.ts","declarations":[{"name":"initRoomWasm","signature":"/** Initialize the room wasm module (idempotent). Call once before `WasmRoom.open`.\n *  Node: bytes are read from the package. Browser/bundler: the wasm is fetched. Pass\n *  `moduleOrPath` to override (a `WebAssembly.Module`, URL, or bytes). */\nexport declare function initRoomWasm(moduleOrPath?: unknown): Promise<void>;"}]},{"source":"packages/room/src/mutation-tx.ts","declarations":[{"name":"WireValue","signature":"/** A bare wire cell (the client stack's `WireValue`). */\nexport type WireValue = number | string | boolean | null;"},{"name":"KeyedRow","signature":"/** A row keyed by column name. */\nexport type KeyedRow = Record<string, WireValue>;"},{"name":"MutationTx","signature":"/** The §4.2 write handle. Keyed methods are schema-checked; positional methods are the\n *  raw wire shape (cells in schema column order, pk cells in `primaryKey` order).\n *  `query` is not available in room mutators yet (it throws) — typed so a client\n *  registry that uses it still registers, and fails loudly at run time. */\nexport interface MutationTx {\n    /** Read one row by primary key (e.g. `tx.row(\"issue\", { id: 1 })`). */\n    row(table: string, pk: KeyedRow): KeyedRow | undefined;\n    /** Insert a FULL row (every column named; missing or unknown columns throw). */\n    insert(table: string, row: KeyedRow): void;\n    /** Update the row identified by the pk columns; only the named non-pk columns\n     *  change. A missing row is a NO-OP (rebase-friendly). */\n    update(table: string, row: KeyedRow): void;\n    /** Insert, or fully replace when the pk already exists (a FULL row, like insert). */\n    upsert(table: string, row: KeyedRow): void;\n    /** Delete the row identified by the pk columns. A missing row is a NO-OP. */\n    delete(table: string, pk: KeyedRow): void;\n    /** NOT SUPPORTED in room mutators yet — throws. (Typed to accept the client\n     *  builder's queries so shared registries typecheck.) */\n    query(query: {\n        ast(): unknown;\n    }): never;\n    get(table: string, pk: WireValue[]): WireValue[] | undefined;\n    add(table: string, row: WireValue[]): void;\n    remove(table: string, row: WireValue[]): void;\n    edit(table: string, oldRow: WireValue[], newRow: (WireValue | undefined)[]): void;\n}"},{"name":"RoomMutatorCtx","signature":"/** The ambient authorization context a room mutator runs under (managed-writes design\n *  §3.2). Shell-stamped from the connection's DO-verified lease token — NEVER\n *  client-supplied — so per-row/per-field rules checked against it are trustworthy.\n *  The shape deliberately matches the shared-generator drivers' `ctx.user`, so one\n *  registry body runs identically in all three homes (client / api-server / room). */\nexport interface RoomMutatorCtx {\n    /** The authenticated subject (the lease token's `sub`). `\"\"` on replay of an entry\n     *  journaled before the identity plane — treat as unauthenticated. */\n    user: string;\n}"},{"name":"RoomMutator","signature":"/** A room mutator: deterministic, replayable — re-invoked on journal replay against\n *  the freshly re-subscribed base (§3.3), so the same purity rules as a client\n *  mutator apply (no clock, no randomness, a pure function of `(base, args, ctx)`).\n *  An auth check against `ctx` re-runs on replay against the freshly rebuilt base —\n *  a mutation that passed before a crash can replay as rejected if the permission\n *  row changed in between; that is §3.3's intended rebase behavior. */\nexport type RoomMutator = (tx: MutationTx, args: never, ctx: RoomMutatorCtx) => void;"},{"name":"environmentShortfall","signature":"/**\n * Tag an error as an ENVIRONMENT shortfall (H-iv-b): the room lacks a capability the\n * mutation needs (today: `tx.query`), which is a verdict about the ROOM, not the\n * mutation — the shell classifies it as a DEOPT (the client re-routes the mutation to\n * the daemon stream, where the capability exists) instead of a FINAL rejection (which\n * would drop the mutation). Contrast a validation/authz throw: re-routing can't help\n * those, so they stay `rejected`.\n */\nexport declare function environmentShortfall(message: string): Error;"},{"name":"isEnvironmentShortfall","signature":"/** Whether `e` was tagged by {@link environmentShortfall}. */\nexport declare function isEnvironmentShortfall(e: unknown): boolean;"},{"name":"assertSyncMutatorReturn","signature":"/**\n * Guard against the two mutator shapes that would corrupt silently instead of failing loudly.\n * A `shared(...)` GENERATOR registered verbatim returns an un-iterated generator — zero writes,\n * acked as applied (data loss); an ASYNC mutator runs synchronously only to its first `await`,\n * so later writes land OUTSIDE the committed transaction. Both shells call this on the\n * mutator's return value inside their try/reject path, so either shape becomes an explicit\n * rejection with a pointed message. (An adapter that DRIVES a shared generator registry against\n * the room tx is future work — managed-writes design §8.)\n */\nexport declare function assertSyncMutatorReturn(returned: unknown, name: string): void;"},{"name":"TableShape","signature":"/** One table's positional shape, parsed from the upstream hello. */\nexport interface TableShape {\n    columns: string[];\n    /** Indices into `columns`. */\n    primaryKey: number[];\n}"},{"name":"mutationTx","signature":"/** Build the MutationTx for one open wasm transaction. Valid only while that\n *  transaction is open — the shell creates one per mutation and never retains it. */\nexport declare function mutationTx(room: WasmRoom, shapes: Map<string, TableShape>): MutationTx;"}]},{"source":"packages/room/src/journal.ts","declarations":[{"name":"RoomJournalEntry","signature":"/** One journaled mutation: the wire envelope plus its recorded outcome. Replay applies\n *  the OUTCOME — a non-applied (`rejected`/`deopt`) entry consumes its mid without\n *  running the mutator. */\nexport interface RoomJournalEntry {\n    clientID: string;\n    mid: number;\n    name: string;\n    args: unknown;\n    /** The connection's authenticated subject at push time (the lease token's `sub`,\n     *  shell-stamped — managed-writes §3.3): recovery is re-invocation, so identity is\n     *  an input that must survive the crash. `\"\"` = an entry journaled before the\n     *  identity plane existed (mutators see it as unauthenticated). */\n    sub: string;\n    /** The recorded verdict (H-iv-b): `\"applied\"` replays by RE-INVOKING the mutator\n     *  (§3.3 — and against a moved base the re-invocation may legitimately reject or\n     *  DEOPT; the journal record is never rewritten, the shell's recorded-outcome map\n     *  reflects what the replaying incarnation produced); `\"rejected\"` (final — authz /\n     *  validation / unknown mutator) and `\"deopt\"` (the §3.3 commit gate refused; the\n     *  client was told to re-route the mutation) both replay as a consumed-mid-no-effect\n     *  WITHOUT running anything — re-judging a deopt could invent effects the client\n     *  already re-routed elsewhere. Absent = a legacy pre-H-iv-b entry: read through\n     *  {@link journalEntryOutcome}. */\n    outcome?: \"applied\" | \"rejected\" | \"deopt\";\n    /** Legacy pre-H-iv-b flag, superseded by {@link outcome} but still WRITTEN (`true`)\n     *  alongside BOTH non-applied outcomes: a legacy reader replays either kind as a\n     *  consumed-mid-no-effect, which is exactly right. */\n    rejected?: boolean;\n}"},{"name":"journalEntryOutcome","signature":"/** The ONE reading rule for an entry's verdict across journal generations: `outcome`\n *  when present, else the legacy `rejected` flag, else applied. */\nexport declare function journalEntryOutcome(entry: RoomJournalEntry): \"applied\" | \"rejected\" | \"deopt\";"},{"name":"RoomFlushRecord","signature":"/** One journaled flush batch: the room's flush-stream position, the placement epoch it\n *  was built under, and the EXACT `/apply-row-change-txn` body string — resubmitted\n *  verbatim, never rebuilt (§5.3 step 4). */\nexport interface RoomFlushRecord {\n    seq: number;\n    epoch: number;\n    body: string;\n}"},{"name":"RoomJournal","signature":"export interface RoomJournal {\n    /** Append `entries` durably, in order. Resolving is the ack gate (§8.1): the shell\n     *  advances lmid rows only after this resolves. A rejection is fatal to the\n     *  incarnation — an ack that might not survive must never be sent. */\n    append(entries: RoomJournalEntry[]): Promise<void>;\n    /** Every entry ever appended, in append order — the boot-time replay source. */\n    replay(): Promise<RoomJournalEntry[]>;\n    /** Journal one built flush batch, BEFORE its first send. Same durability contract\n     *  as `append`: a rejection is fatal (an unjournaled batch must never reach the\n     *  wire — a retry could otherwise rebuild different bytes under the same id). */\n    appendFlush(record: RoomFlushRecord): Promise<void>;\n    /** The authority settled flush `seq` (committed, deduped, or dead) — drop it. */\n    confirmFlush(seq: number): Promise<void>;\n    /** Unconfirmed flush records in seq order, plus the highest seq ever appended\n     *  (0 = none) — the boot-time resubmission source and the seq seed. */\n    replayFlushes(): Promise<{\n        records: RoomFlushRecord[];\n        maxSeq: number;\n    }>;\n}"},{"name":"memoryJournal","signature":"/** An in-process journal: survives incarnations within one shell process (and, handed\n *  to a second shell, a simulated process crash — the T2 harness). Not durable beyond\n *  the process, by definition. */\nexport declare function memoryJournal(): RoomJournal;"}]},{"source":"packages/room/src/authority.ts","declarations":[{"name":"AuthorityConflict","signature":"/** One CAS rejection in the authority's `409 conflict` body: the row's authoritative\n *  current image (`null` = absent), keyed by table + pk cells. */\nexport interface AuthorityConflict {\n    table: string;\n    pk: unknown[];\n    current: unknown[] | null;\n}"},{"name":"AuthorityApplyResult","signature":"/** The apply outcome. Anything else — network failure, a 5xx — is a **throw**: plain\n *  errors retry (same body, same id; dedup absorbs a landed retry), errors marked\n *  `fatal: true` (an identity mismatch — same id, different body — or a malformed\n *  refusal) kill the incarnation loudly instead. */\nexport type AuthorityApplyResult = {\n    kind: \"ok\";\n    applied: boolean;\n    cv?: number;\n} | {\n    kind: \"conflict\";\n    conflicts: AuthorityConflict[];\n} | {\n    kind: \"fenced\";\n    currentEpoch?: number;\n};"},{"name":"RoomAuthority","signature":"export interface RoomAuthority {\n    /** Claim the placement epoch for `doc` (§2.5) — once per shell process, at boot,\n     *  AFTER resubmitting the previous incarnation's unconfirmed batches (their recorded\n     *  epochs must still be current to land). */\n    claimEpoch(doc: string): Promise<number>;\n    /** The authority's ledger lmid per client (0 = none) — the boot probe that lets\n     *  journal replay absorb already-durable mutations as dedup. */\n    lmids(doc: string, clients: string[]): Promise<Record<string, number>>;\n    /** Apply one batch: `body` is the exact journaled `/apply-row-change-txn` body\n     *  string, sent verbatim. */\n    applyRowChangeTxn(body: string): Promise<AuthorityApplyResult>;\n}"},{"name":"FatalAuthorityError","signature":"/** An apply error the shell must NOT retry (retrying cannot help; something is wrong\n *  with the batch or the room, not the network). */\nexport interface FatalAuthorityError extends Error {\n    fatal: true;\n}"},{"name":"fatalAuthorityError","signature":"export declare function fatalAuthorityError(message: string): FatalAuthorityError;"},{"name":"HttpAuthorityOptions","signature":"export interface HttpAuthorityOptions {\n    /** The API server's apply endpoint (e.g. `http://…/api/rindle/apply-row-change-txn`). */\n    applyUrl: string;\n    /** The epoch-claim endpoint (e.g. `http://…/api/rindle/claim-room-epoch`). */\n    claimUrl: string;\n    /** The lmid-probe endpoint (e.g. `http://…/api/rindle/room-lmids`). */\n    lmidsUrl: string;\n    /** Extra headers on every call — the epoch-bound flush credential rides here. */\n    headers?: Record<string, string>;\n    fetch?: typeof fetch;\n}"},{"name":"httpAuthority","signature":"/** The HTTP [`RoomAuthority`]: the API-server host as the room's sole counterpart\n *  (§5.3.1). Maps `409 {error:\"fenced\"}` / `409 {error:\"conflict\"}` to their results,\n *  a `500` mentioning a batch-identity mismatch to a fatal error, and anything else\n *  non-OK to a retryable throw. */\nexport declare function httpAuthority(opts: HttpAuthorityOptions): RoomAuthority;"}]},{"source":"packages/room/src/shell.ts","declarations":[{"name":"UpstreamOptions","signature":"/** The upstream half of the shell's config: where rindled lives and what to follow. */\nexport interface UpstreamOptions {\n    /** rindled's public subscription plane, e.g. `ws://127.0.0.1:7601`. */\n    wsUrl: string;\n    /** rindled's private control plane, e.g. `http://127.0.0.1:7600` (lease minting). */\n    controlUrl: string;\n    /** Bearer token for the control plane (required unless rindled runs unauthenticated). */\n    authToken?: string;\n    /** The document footprint — a wire `Ast` (§3.1). What this room follows and serves from. */\n    footprintAst: unknown;\n    /** Lease TTL passed to `/materialize` (rindled's default when omitted). */\n    leaseTtlMs?: number;\n    /** The `init` clientID on the upstream socket (diagnostic identity). */\n    clientId?: string;\n}"},{"name":"DownstreamOptions","signature":"/** The downstream half: how clients are authorized and served (§4/§10.1). */\nexport interface DownstreamOptions {\n    /** This room's document id — lease tokens for any other doc are refused. */\n    docId: string;\n    /** Token key ring: `kid` → shared secret (the API server signs with the same ring). */\n    tokenKeys: Record<string, string>;\n    /** Idle grace before an unsubscribed query's pipeline is reclaimed (default 30s). */\n    idleTtlMs?: number;\n    /** Lease-expiry / idle-sweep cadence (default 1s). */\n    sweepIntervalMs?: number;\n    /** How long a revocation keeps refusing pre-revocation tokens (default 30min — set\n     *  it ≥ the longest token TTL the API server mints). */\n    revocationWindowMs?: number;\n    /** The room's private control plane (`POST /revoke`, `GET /stats`). Omit to run\n     *  without one (no revocation surface). */\n    control?: {\n        authToken: string;\n        port?: number;\n    };\n    /** The write plane (§5.1). Omit to run read-only (writes are refused). */\n    writes?: WritesOptions;\n    /** Per-socket downstream send budget in bytes (§9; default 4 MiB). A socket whose\n     *  queued bytes would exceed it is terminated with a gap — re-subscribing is the\n     *  repair. */\n    sendBudgetBytes?: number;\n}"},{"name":"RoomScopeSpec","signature":"/** One table's §3.3 scope spec (H-iv-b): an element of the api-server's\n *  `RoomBootResponse.scopes`, passed VERBATIM to the wasm room's `enableWritesV2`.\n *  Structurally identical to `@rindle/api-server`'s `RoomScopeSpec` (declared locally —\n *  the shell must not depend on the api-server package; TS structural typing keeps the\n *  two in lockstep at the host's threading site). */\nexport interface RoomScopeSpec {\n    table: string;\n    /** The footprint's row-local predicate for this table (a wire `Condition`) — drives\n     *  the commit gate's absent-read proof. Absent ⇒ absent reads on this table always\n     *  deopt (fail closed). */\n    footprintWhere?: unknown;\n    writable: {\n        kind: \"none\";\n    } | {\n        kind: \"predicate\";\n        where?: unknown;\n        joinKeyCols: string[];\n    };\n}"},{"name":"WritesOptions","signature":"/** The §5.1 write plane: the room's own mutator registry over its owned tables. */\nexport interface WritesOptions {\n    /** The server registry (§4.2): named mutators run against the shared head. PLAIN\n     *  synchronous `(tx, args, ctx)` functions only — a `shared(...)` GENERATOR registry\n     *  does NOT register verbatim (nothing drives it here; the shell rejects a mutator\n     *  that returns a generator/promise — see `assertSyncMutatorReturn`). */\n    mutators: Record<string, RoomMutator>;\n    /** §3.2's owned set — the only tables mutators may write. Must all be in the\n     *  upstream footprint; followed tables and the ledger are never writable. */\n    ownedTables: string[];\n    /** The §3.3 per-table scope specs from the boot wire (`RoomBootResponse.scopes` —\n     *  H-iv-b). Present ⇒ the write plane enables in v2 GATED mode (`enableWritesV2`):\n     *  staged writes validate against the writable predicates, join-key edits refuse,\n     *  absent reads must prove against `footprintWhere`, context (`kind:\"none\"`) tables\n     *  become txGet-READABLE, and a violating commit returns a structured DEOPT instead\n     *  of applying. The scopes' writable tables must be a SUBSET of {@link ownedTables}\n     *  (the host's own declaration) — a wider server scope throws at construction, so a\n     *  self-hoster's owned set can never be extended from the wire. Absent ⇒ the v1\n     *  table-granular write plane, byte-identical to before. */\n    scopes?: RoomScopeSpec[];\n    /** The durable sidecar an ack means (§8.1). Defaults to `memoryJournal()` — the\n     *  \"survives nothing beyond the process\" class; hosts bring their own. */\n    journal?: RoomJournal;\n    /** The journal group-commit window (default 5ms): mutations arriving within it\n     *  share one append, and their acks ride one ledger commit. */\n    groupCommitMs?: number;\n    /** The write authority (§5.3.1) — the API server's `/apply-row-change-txn` host\n     *  (or the P3 gate's mock). Omit to run journal-only (P2 semantics: nothing is\n     *  ever durable upstream). With an authority, the shell claims a placement epoch\n     *  at boot, probes durable lmids before replay, and write-behinds on the flush\n     *  cadence (§5.3). */\n    authority?: RoomAuthority;\n    /** The flush debounce (§5.3; default 250ms, within the design's ≤1s budget). */\n    flushDebounceMs?: number;\n    /** Flush immediately once this many keys are dirty (default 512). */\n    flushDirtyMax?: number;\n}"},{"name":"RoomShellOptions","signature":"export interface RoomShellOptions {\n    upstream: UpstreamOptions;\n    downstream: DownstreamOptions;\n    /** Downstream ws port (default 0 = ephemeral; bound on 127.0.0.1). */\n    port?: number;\n    /** Diagnostic sink (default: silent). */\n    log?: (line: string) => void;\n}"},{"name":"RoomShell","signature":"export interface RoomShell {\n    /** The bound downstream port. */\n    readonly port: number;\n    /** The bound control-plane port (0 when no control plane was configured). */\n    readonly controlPort: number;\n    /** Resolves when the CURRENT incarnation is live (seq-0 snapshot applied);\n     *  immediately if it already is. */\n    awaitLive(): Promise<void>;\n    /** The last-applied upstream commit version, if live. */\n    cv(): number | undefined;\n    /** The upstream subscription epoch of the current incarnation, if any. */\n    upstreamEpoch(): number | undefined;\n    /** This incarnation's downstream bootId (rotates on every re-subscribe). */\n    bootId(): string;\n    /** Fire the write-behind flush now (instead of the debounce) and await its\n     *  settlement — deterministic flushing for tests and drain-before-close. No-op\n     *  without an authority. */\n    flushNow(): Promise<void>;\n    close(): Promise<void>;\n}"},{"name":"createRoomShell","signature":"/** Boot a room shell: init the wasm, mint the upstream lease, connect the upstream leg,\n *  and serve the downstream ws (+ the private control plane, if configured). Returns\n *  once the ports are bound and the upstream connection is underway — await\n *  `shell.awaitLive()` for the seed. */\nexport declare function createRoomShell(opts: RoomShellOptions): Promise<RoomShell>;"}]},{"source":"packages/room/src/index.ts","declarations":[]},{"source":"packages/sql-client/src/drizzle.ts","declarations":[{"name":"rindleBigint","signature":"/**\n * The exact-i64 column for Drizzle schemas (design 226 §7.2). Three promises,\n * lined up with the column contract: generated DDL says `BIGINT` (the opt-in\n * exact int64 declaration), bind/predicate values are JS `bigint`, and selected\n * values infer as JS `bigint`. Drizzle's own `integer()` remains the\n * number/date/boolean surface and still emits `INTEGER` (the safe-range f64\n * plane).\n *\n * Caveat (§7.2): decltype dispatch fires only for **direct column references**.\n * SQLite reports no decltype for expression results, so `max(big_id)` or\n * `big_id + 1` falls into the safe-number arm and is a typed\n * `VALUE_UNSUPPORTED` past the round-trip bound — never a rounded number. For\n * exact expression results, use the native client with `intMode: \"bigint\"`.\n */\nexport declare const rindleBigint: {\n    (): import(\"drizzle-orm/sqlite-core\").SQLiteCustomColumnBuilder<{\n        name: \"\";\n        dataType: \"custom\";\n        columnType: \"SQLiteCustomColumn\";\n        data: bigint;\n        driverParam: bigint;\n        enumValues: undefined;\n    }>;\n    <TConfig extends Record<string, any>>(fieldConfig?: TConfig | undefined): import(\"drizzle-orm/sqlite-core\").SQLiteCustomColumnBuilder<{\n        name: \"\";\n        dataType: \"custom\";\n        columnType: \"SQLiteCustomColumn\";\n        data: bigint;\n        driverParam: bigint;\n        enumValues: undefined;\n    }>;\n    <TName extends string>(dbName: TName, fieldConfig?: unknown): import(\"drizzle-orm/sqlite-core\").SQLiteCustomColumnBuilder<{\n        name: TName;\n        dataType: \"custom\";\n        columnType: \"SQLiteCustomColumn\";\n        data: bigint;\n        driverParam: bigint;\n        enumValues: undefined;\n    }>;\n};"},{"name":"DrizzleStatement","signature":"/** The small, structural statement shape consumed by drizzle-orm/libsql. */\nexport interface DrizzleStatement {\n    sql: string;\n    args?: DrizzleArgs;\n}"},{"name":"DrizzleArgs","signature":"export type DrizzleArgs = readonly unknown[] | Readonly<Record<string, unknown>>;"},{"name":"DrizzleInputStatement","signature":"export type DrizzleInputStatement = string | DrizzleStatement | readonly [\n    sql: string,\n    args?: DrizzleArgs\n];"},{"name":"DrizzleTransactionMode","signature":"export type DrizzleTransactionMode = \"write\" | \"read\" | \"deferred\";"},{"name":"DrizzleValue","signature":"export type DrizzleValue = Exclude<SqlValue, boolean>;"},{"name":"DrizzleRow","signature":"export type DrizzleRow = DrizzleValue[] & Record<string, DrizzleValue>;"},{"name":"DrizzleResultSet","signature":"export interface DrizzleResultSet {\n    columns: string[];\n    columnTypes: string[];\n    rows: DrizzleRow[];\n    rowsAffected: number;\n    lastInsertRowid: bigint | undefined;\n    toJSON(): unknown;\n}"},{"name":"DrizzleTransaction","signature":"export interface DrizzleTransaction {\n    readonly closed: boolean;\n    execute(statement: DrizzleInputStatement): Promise<DrizzleResultSet>;\n    batch(statements: DrizzleInputStatement[]): Promise<DrizzleResultSet[]>;\n    executeMultiple(sql: string): Promise<void>;\n    commit(): Promise<void>;\n    rollback(): Promise<void>;\n    close(): void;\n}"},{"name":"DrizzleClient","signature":"export interface DrizzleClient {\n    readonly protocol: string;\n    readonly closed: boolean;\n    execute(statement: DrizzleInputStatement, args?: DrizzleArgs): Promise<DrizzleResultSet>;\n    batch(statements: DrizzleInputStatement[], mode?: DrizzleTransactionMode): Promise<DrizzleResultSet[]>;\n    /** Present for structural Client typing; Drizzle's libSQL migrator is deliberately unsupported. */\n    migrate(statements: DrizzleInputStatement[]): Promise<DrizzleResultSet[]>;\n    transaction(mode?: DrizzleTransactionMode): Promise<DrizzleTransaction>;\n    executeMultiple(sql: string): Promise<void>;\n    /** Embedded-replica sync is deliberately unsupported. */\n    sync(): Promise<never>;\n    reconnect(): void;\n    close(): void;\n    /** Escape hatch for Rindle-specific operations and session-cursor persistence. */\n    readonly rindle: SqlClient;\n}"},{"name":"toDrizzleResultSet","signature":"/** Convert Rindle's lossless positional result into libSQL's positional + named hybrid rows. */\nexport declare function toDrizzleResultSet(result: StatementResult): DrizzleResultSet;"},{"name":"createDrizzleClient","signature":"/** Create the structural libSQL-client facade used by drizzle-orm/libsql. */\nexport declare function createDrizzleClient(options: ClientOptions | SqlClient): DrizzleClient;"}]},{"source":"packages/tanstack/src/index.ts","declarations":[{"name":"RINDLE_LOADER_DATA_KEY","signature":"/** The loader-data field serialized by TanStack Start and consumed by {@link Provider}. */\nexport declare const RINDLE_LOADER_DATA_KEY: \"rindle\";"},{"name":"RindleLoaderContext","signature":"/** The stable subset of TanStack's loader context exposed to route query factories. TanStack passes\n *  a richer object at runtime; keeping this structural avoids coupling the adapter to a generated\n *  router's route-tree generics while still contextually typing the common fields. */\nexport interface RindleLoaderContext {\n    abortController: AbortController;\n    preload: boolean;\n    params: Record<string, string>;\n    deps: Record<string, unknown>;\n    context: unknown;\n    location: unknown;\n    cause: \"preload\" | \"enter\" | \"stay\";\n}"},{"name":"RindleLoaderData","signature":"export interface RindleLoaderData {\n    rindle: DehydratedState;\n}"},{"name":"RindleTanStackClient","signature":"export interface RindleTanStackClient<S extends ColsMap> extends QueryEnsurer {\n    store: Store<S>;\n}"},{"name":"RindleTanStackOptions","signature":"export interface RindleTanStackOptions<S extends ColsMap> {\n    schema: Schema<S>;\n    /** Browser-only lazy client boot. The adapter calls it at most once and shares that client\n     *  between route loaders and the provider. It is never called during SSR. */\n    boot: () => Promise<RindleTanStackClient<S>>;\n    /** Server-side named-query preload. A dynamic implementation keeps server authority code out of\n     *  the browser bundle; the full loader context is forwarded for request-scoped auth/policy. */\n    preload: (queries: readonly AnyQuery[], context: RindleLoaderContext) => Promise<DehydratedState>;\n}"},{"name":"QueryList","signature":"type QueryList = AnyQuery | readonly AnyQuery[];"},{"name":"RindleRouteLoaderOptions","signature":"export interface RindleRouteLoaderOptions<Context extends RindleLoaderContext = RindleLoaderContext> {\n    /** Query (or queries) that blocks client route entry and is always included in the SSR seed. */\n    query?: (context: Context) => QueryList;\n    /** Additional queries needed for SSR first paint but not worth blocking client navigation on. */\n    ssr?: (context: Context) => QueryList;\n    /** Client readiness policy for `query`. Defaults to local-first `present`; set `complete` when\n     *  route entry must wait for a server-authoritative result. */\n    until?: EnsureQueryUntil;\n}"},{"name":"RindleRouteLoader","signature":"export interface RindleRouteLoader<Context extends RindleLoaderContext = RindleLoaderContext> {\n    handler(context: Context): Promise<RindleLoaderData>;\n    /** Re-entry must not commit a stale match while its Rindle query is being warmed. */\n    staleReloadMode: \"blocking\";\n}"},{"name":"RindleProviderProps","signature":"export interface RindleProviderProps {\n    children?: ReactNode;\n}"},{"name":"RindleTanStackIntegration","signature":"export interface RindleTanStackIntegration<S extends ColsMap> {\n    loader<Context extends RindleLoaderContext = RindleLoaderContext>(options: RindleRouteLoaderOptions<Context>): RindleRouteLoader<Context>;\n    Provider(props: RindleProviderProps): ReturnType<typeof createElement>;\n}"},{"name":"createRindleTanStack","signature":"/**\n * Bind one Rindle client/server pair to TanStack Router. The returned `loader` is used by routes;\n * `Provider` replaces the app's manual `useMatches()` dehydration merge plus `<RindleSSR>` glue.\n */\nexport declare function createRindleTanStack<S extends ColsMap>(options: RindleTanStackOptions<S>): RindleTanStackIntegration<S>;"},{"name":"mergeRindleLoaderData","signature":"/** Merge the serialized Rindle slice from every matched route. Exported for custom providers/tests. */\nexport declare function mergeRindleLoaderData(loaderData: readonly unknown[]): DehydratedState;"}]},{"source":"packages/room/pkg/rindle_room.d.ts","declarations":[{"name":"WasmRoom","signature":"/* tslint:disable */\n/* eslint-disable */\n/**\n * One room instance: the upstream-fed base store plus its downstream serving state\n * (materialized queries deduped by `QueryKey`, subscribers addressed by the host's\n * opaque keys) and — once [`enableWrites`](Self::enable_writes) runs — the §5.1\n * write plane, with **at most one mutation transaction open at a time** (the room is\n * an actor; the host serializes mutations onto it).\n */\nexport class WasmRoom {\n    private constructor();\n    free(): void;\n    [Symbol.dispose](): void;\n    /**\n     * Advance the ledger rows for journal-committed mutations — **the ack** (§5.1\n     * step 4; call once the journal append resolves). `entries_json` is a JSON array\n     * of `{clientID, mid}`. Returns `{\"headCv\": n}` — drain\n     * [`commitAll`](Self::commit_all) to ship the lmid frames — or `{\"headCv\": null}`\n     * when everything was already covered.\n     */\n    ack(entries_json: string): string;\n    /**\n     * The ledger row's current value for `clientID` (0 if none) — what the wire has\n     * confirmed.\n     */\n    ackedLmid(client_id: string): number;\n    /**\n     * The highest mid applied to the head for `clientID` (0 if none) — the dedup\n     * watermark; diagnostics and the crash-replay tests read it.\n     */\n    appliedMid(client_id: string): number;\n    /**\n     * Apply one upstream `nbatch` frame's `batch` object (JSON text). Returns a status\n     * object (JSON text): `{applied: \"snapshot\", rows}` | `{applied: \"live\", ops}` |\n     * `{applied: \"duplicate\"}` | `{applied: \"staleEpoch\", expected, got}`. Throws when\n     * the frame is garbage or the apply poisons the store — in both cases the host\n     * tears down and re-subscribes under a new epoch (§3.4); there is no repair call.\n     *\n     * After a `live`/`snapshot` apply, drain the fan-out with\n     * [`commitAll`](Self::commit_all).\n     */\n    apply(batch_json: string): string;\n    /**\n     * Build the §5.3 net-effect batch from the dirty entries + ledger co-edits.\n     * Returns `undefined` when there is nothing to flush, else JSON text\n     * `{changes, batchHash, lmids}`: `changes` is the `/apply-row-change-txn`\n     * `changes[]` array (ingest shape, old-images = the CAS base chain), `batchHash`\n     * the batch identity computed over its canonical bytes, `lmids` the\n     * `{clientID, mid}` advances the batch covers. At most one flush may be in\n     * flight — resolve with [`flushOk`](Self::flush_ok) or\n     * [`flushConflict`](Self::flush_conflict); retries resubmit the SAME journaled\n     * body, never a rebuilt one.\n     */\n    beginFlush(): string | undefined;\n    /**\n     * Open the transaction for `(clientID, mid)`. Returns `{\"begin\": \"tx\"}` (run the\n     * mutator, then [`commitMutation`](Self::commit_mutation) or\n     * [`rejectMutation`](Self::reject_mutation)) or `{\"begin\": \"dedup\"}` (an absorbed\n     * redelivery — send nothing). Throws on a mid gap with the exact\n     * `mutation gap for …` message the client's recovery keys on — forward it on an\n     * `error` frame. At most one transaction may be open.\n     *\n     * `name`/`args_json` (optional, Slice I-ii) are the wire envelope's mutator name\n     * and JSON-text args: should this mid end non-applied, its durable outcome row\n     * echoes them on a DEOPT (self-contained re-invoke, mirroring the H-iv-b frame).\n     * Omitting them degrades deopt rows to NULL name/args, nothing else.\n     */\n    beginMutation(client_id: string, mid: number, name?: string | null, args_json?: string | null): string;\n    /**\n     * Drain every materialized query once and return the fan-out as JSON text:\n     * `[{sub, batch}, …]` — one entry per attached subscriber per query with a\n     * non-empty net delta, each `batch` stamped with that subscriber's own epoch/seq.\n     * Empty array when nothing changed (or the store is no longer live — a dead\n     * incarnation must not ship a torn frame).\n     */\n    commitAll(): string;\n    /**\n     * Apply the open transaction to the head as one local commit: dirty entries are\n     * captured, the applied watermark advances, and every attached query sees the ops.\n     * Returns `{\"headCv\": n}` — drain [`commitAll`](Self::commit_all) and fan out NOW\n     * (§5.1 step 2: data fanout is never gated on durability), then journal the\n     * envelope and [`ack`](Self::ack) once the append commits. Throws only when the\n     * commit tears the head (store poisoned — tear down).\n     *\n     * Under [`enableWritesV2`](Self::enable_writes_v2) the §3.3 commit gate runs\n     * first; a containment violation returns `{\"deopt\": {reason, table, pk, …}}`\n     * instead (`reason`: `\"writeOutOfScope\"` (+ `op`) | `\"joinKeyChanged\"`\n     * (+ `column`) | `\"absentReadUnproven\"`): **nothing was applied**, the tx is\n     * consumed and the mid burnt exactly like [`rejectMutation`](Self::reject_mutation)\n     * (do NOT call it too) — journal the envelope as rejected and [`ack`](Self::ack)\n     * as usual, answering the client with a deopt. Under the v1 enable the return is\n     * always `{\"headCv\": n}`, byte-identical to before.\n     */\n    commitMutation(): string;\n    /**\n     * The last-applied upstream commit version (`undefined` before the seq-0 snapshot).\n     * This is the journal cursor's `cv` half — persist `(epoch, cv)` to resume (§3.3).\n     */\n    cv(): number | undefined;\n    /**\n     * How many `(table, pk)` keys are dirty (§5.3 — P3's flush input).\n     */\n    dirtyLen(): number;\n    /**\n     * The highest mid the write authority has committed for `clientID` (0 if none) —\n     * §8.1's `durable` level.\n     */\n    durableLmid(client_id: string): number;\n    /**\n     * Enable the §5.1 write plane over a live store: `owned_json` is a JSON array of\n     * the tables mutators may write (§3.2's owned set — must all be in the upstream\n     * hello). Registers the `_rindle_client_mutations` ledger; call once, right after\n     * the seq-0 snapshot applies and before serving. Idempotence is deliberate-ly NOT\n     * provided: enabling twice is a shell bug and throws.\n     */\n    enableWrites(owned_json: string): void;\n    /**\n     * Enable the write plane with per-table **scope specs** — the §3.3 room commit\n     * gate (H-iv-a). `specs_json` is a JSON array of\n     * `{ table, footprintWhere?, writable }` where `writable` is the lease block's\n     * `RoomTableSpec.writable` shape (`{kind:\"none\"}` for a context table,\n     * `{kind:\"predicate\", where?, joinKeyCols}` for a writable one) and\n     * `footprintWhere` is the footprint's row-local wire `Condition` for the table\n     * (drives the absent-read proof). Predicates compile NOW, loudly — a malformed or\n     * non-row-local spec (e.g. a `correlatedSubquery`) throws and nothing is enabled.\n     * With the gate armed, [`commitMutation`](Self::commit_mutation) can return a\n     * `{\"deopt\": …}` verdict. Same once-only/live-store rules as\n     * [`enableWrites`](Self::enable_writes), which remains the legacy table-granular\n     * entry (its gate proves nothing and never deopts).\n     */\n    enableWritesV2(specs_json: string): void;\n    /**\n     * The upstream subscription epoch this store was opened under.\n     */\n    epoch(): number;\n    /**\n     * The authority rejected the in-flight batch on CAS (§5.4 `flush_conflict`):\n     * `conflicts_json` is its `409` body's `conflicts` array —\n     * `[{table, pk, current}]`, `current: null` for an absent row. Each conflicted\n     * key converges to the authority's image (the local net effect is dropped);\n     * everything else stays dirty and retries next flush. Returns\n     * `{\"headCv\": n | null}` — drain [`commitAll`](Self::commit_all) after a\n     * non-null cv to ship the corrective frames.\n     */\n    flushConflict(conflicts_json: string): string;\n    /**\n     * Whether a §5.3 flush is in flight (diagnostics; the shell also guards).\n     */\n    flushInFlight(): boolean;\n    /**\n     * The authority committed the in-flight batch (§5.3 step 6): consumed entries\n     * retire (or re-base onto the image just written, if re-dirtied mid-flight),\n     * durable watermarks advance, `pending ≤` them retires. Returns\n     * `{\"retired\": n, \"dirty\": n}` — a non-zero `dirty` means writes landed during\n     * the flight; schedule the next flush.\n     */\n    flushOk(): string;\n    /**\n     * The room's own commit order — what downstream frames are stamped with and what\n     * the shell's `progress {cvMin}` release points are computed from. Advances on\n     * every upstream apply and every local commit (see `RoomStore::head_cv`).\n     */\n    headCv(): number;\n    /**\n     * Baseline present and not poisoned — the store is serving.\n     */\n    isLive(): boolean;\n    /**\n     * A failed apply left this incarnation dead (§3.4): tear down, re-subscribe.\n     */\n    isPoisoned(): boolean;\n    /**\n     * Subscribe `sub` to the reserved per-client lmid query (`_rindle/clientLmid`):\n     * the room composes the `_rindle_client_mutations WHERE client_id = <clientID>`\n     * AST itself — identity comes from the connection's `init`, never client args.\n     * Same return shape and envelope rules as [`subscribe`](Self::subscribe).\n     */\n    lmidSubscribe(sub: string, epoch: number, client_id: string, now_ms: number): string;\n    /**\n     * How many downstream queries are currently materialized (post-dedup).\n     */\n    materializationCount(): number;\n    /**\n     * Open the room's base store from the upstream `nhello` frame's `hello` object\n     * (JSON text). `idle_ttl_ms` is the downstream retention grace: a materialized\n     * query with no subscribers for that long is reclaimed by [`sweep`](Self::sweep).\n     * Rejects malformed hellos loudly — nothing is constructed.\n     */\n    static open(hello_json: string, idle_ttl_ms: number): WasmRoom;\n    /**\n     * Applied-but-not-retired mutations (everything, until P3's write-behind).\n     */\n    pendingLen(): number;\n    /**\n     * Drop the open transaction's staged ops and consume its mid anyway — the reject\n     * path (unknown mutator, mutator threw, staging refusal, a replayed non-applied\n     * journal entry). The stream stays contiguous; the eventual [`ack`](Self::ack)\n     * advances the ledger with no effects, snapping the author's prediction back.\n     *\n     * `kind` (`\"rejected\"` (default) | `\"deopt\"`) + `reason` are the shell's H-iv-b\n     * classification of the verdict: the outcome is RECORDED (Slice I-ii) and its\n     * durable row rides the next flush beside the covering lmid co-edit — one\n     * authority transaction, so a post-downgrade client resolving through the daemon\n     * never reads a burnt non-applied mid as applied. A deopt row echoes the\n     * [`beginMutation`](Self::begin_mutation) envelope's `name`/`args`.\n     */\n    rejectMutation(kind?: string | null, reason?: string | null): void;\n    /**\n     * Seed the durable watermarks from the write authority's ledger — the boot probe\n     * (§3.3; T2's committed-before-crash row). Call after [`enableWrites`] and\n     * **before** the journal replay: seeded mids replay as dedup instead of\n     * re-invoking. `seeds_json` is a JSON array of `{clientID, lmid}`. Returns\n     * `{\"headCv\": n | null}` — the ledger rows ride a local commit so the client's\n     * lmid slice confirms them.\n     *\n     * [`enableWrites`]: Self::enable_writes\n     */\n    seedDurable(seeds_json: string): string;\n    /**\n     * Materialize-on-presentation (§10.1): attach subscriber `sub` (the host's opaque\n     * routing key) at `epoch` to the query for this approved wire `Ast` (JSON text) —\n     * reusing the pipeline on a `QueryKey` hit. Returns\n     * `{queryKey, reused, hello, snapshot}` (JSON text): send `nhello(hello)` then\n     * `nbatch(snapshot)` (its `seq` is 0), then this subscriber's entries from each\n     * [`commitAll`](Self::commit_all). Re-subscribing an existing `sub` replaces its\n     * envelope — pass the bumped `epoch`, exactly as before.\n     */\n    subscribe(sub: string, epoch: number, ast_json: string, now_ms: number): string;\n    /**\n     * How many downstream subscribers are currently attached.\n     */\n    subscriberCount(): number;\n    /**\n     * Reclaim downstream queries idle past their grace window, on the host's clock.\n     * Returns how many were destroyed.\n     */\n    sweep(now_ms: number): number;\n    /**\n     * Stage an add of a full-width row (JSON-array text). Clean refusal (throw, head\n     * untouched) when the key exists, the table is not owned, or the width is wrong —\n     * catch it and reject the mutation.\n     */\n    txAdd(table: string, row_json: string): void;\n    /**\n     * Stage an edit to a full-width row (JSON-array text) keyed by its pk cells. The\n     * shell resolves partial updates against [`txGet`](Self::tx_get) first — only\n     * concrete cells cross this boundary (JSON has no `undefined`). The pk must not\n     * change; the row must exist.\n     */\n    txEdit(table: string, row_json: string): void;\n    /**\n     * The effective row for `pk_json` (a JSON array of pk cells, `primaryKey` order):\n     * the live head under this transaction's own staged writes — read-your-writes for\n     * read-dependent mutators, and what the keyed `update`/`delete`/`upsert` layers\n     * probe before composing their writes. Returns the row as JSON-array text, or\n     * `undefined` when absent.\n     */\n    txGet(table: string, pk_json: string): string | undefined;\n    /**\n     * Stage a remove of the row keyed `pk_json` (JSON array of pk cells). The change\n     * is composed from the effective row; a missing key is a clean refusal (the keyed\n     * `delete` layer no-ops before calling this).\n     */\n    txRemove(table: string, pk_json: string): void;\n    /**\n     * Detach subscriber `sub` (unsubscribe, socket close, lease expiry, revocation —\n     * the host decides why). Idempotent: returns whether it was attached. Its query\n     * stays materialized for `idle_ttl_ms` (a quick re-subscribe is cheap), then\n     * [`sweep`](Self::sweep) reclaims it.\n     */\n    unsubscribe(sub: string, now_ms: number): boolean;\n}"},{"name":"__rindle_room_wasm_start","signature":"export function __rindle_room_wasm_start(): void;"},{"name":"InitInput","signature":"export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;"},{"name":"InitOutput","signature":"export interface InitOutput {\n    readonly memory: WebAssembly.Memory;\n    readonly __rindle_room_wasm_start: () => void;\n    readonly __wbg_wasmroom_free: (a: number, b: number) => void;\n    readonly wasmroom_ack: (a: number, b: number, c: number) => [\n        number,\n        number,\n        number,\n        number\n    ];\n    readonly wasmroom_ackedLmid: (a: number, b: number, c: number) => number;\n    readonly wasmroom_appliedMid: (a: number, b: number, c: number) => number;\n    readonly wasmroom_apply: (a: number, b: number, c: number) => [\n        number,\n        number,\n        number,\n        number\n    ];\n    readonly wasmroom_beginFlush: (a: number) => [\n        number,\n        number,\n        number,\n        number\n    ];\n    readonly wasmroom_beginMutation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [\n        number,\n        number,\n        number,\n        number\n    ];\n    readonly wasmroom_commitAll: (a: number) => [\n        number,\n        number\n    ];\n    readonly wasmroom_commitMutation: (a: number) => [\n        number,\n        number,\n        number,\n        number\n    ];\n    readonly wasmroom_cv: (a: number) => [\n        number,\n        number\n    ];\n    readonly wasmroom_dirtyLen: (a: number) => number;\n    readonly wasmroom_durableLmid: (a: number, b: number, c: number) => number;\n    readonly wasmroom_enableWrites: (a: number, b: number, c: number) => [\n        number,\n        number\n    ];\n    readonly wasmroom_enableWritesV2: (a: number, b: number, c: number) => [\n        number,\n        number\n    ];\n    readonly wasmroom_epoch: (a: number) => number;\n    readonly wasmroom_flushConflict: (a: number, b: number, c: number) => [\n        number,\n        number,\n        number,\n        number\n    ];\n    readonly wasmroom_flushInFlight: (a: number) => number;\n    readonly wasmroom_flushOk: (a: number) => [\n        number,\n        number,\n        number,\n        number\n    ];\n    readonly wasmroom_headCv: (a: number) => number;\n    readonly wasmroom_isLive: (a: number) => number;\n    readonly wasmroom_isPoisoned: (a: number) => number;\n    readonly wasmroom_lmidSubscribe: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [\n        number,\n        number,\n        number,\n        number\n    ];\n    readonly wasmroom_materializationCount: (a: number) => number;\n    readonly wasmroom_open: (a: number, b: number, c: number) => [\n        number,\n        number,\n        number\n    ];\n    readonly wasmroom_pendingLen: (a: number) => number;\n    readonly wasmroom_rejectMutation: (a: number, b: number, c: number, d: number, e: number) => [\n        number,\n        number\n    ];\n    readonly wasmroom_seedDurable: (a: number, b: number, c: number) => [\n        number,\n        number,\n        number,\n        number\n    ];\n    readonly wasmroom_subscribe: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [\n        number,\n        number,\n        number,\n        number\n    ];\n    readonly wasmroom_subscriberCount: (a: number) => number;\n    readonly wasmroom_sweep: (a: number, b: number) => [\n        number,\n        number,\n        number\n    ];\n    readonly wasmroom_txAdd: (a: number, b: number, c: number, d: number, e: number) => [\n        number,\n        number\n    ];\n    readonly wasmroom_txEdit: (a: number, b: number, c: number, d: number, e: number) => [\n        number,\n        number\n    ];\n    readonly wasmroom_txGet: (a: number, b: number, c: number, d: number, e: number) => [\n        number,\n        number,\n        number,\n        number\n    ];\n    readonly wasmroom_txRemove: (a: number, b: number, c: number, d: number, e: number) => [\n        number,\n        number\n    ];\n    readonly wasmroom_unsubscribe: (a: number, b: number, c: number, d: number) => [\n        number,\n        number,\n        number\n    ];\n    readonly __wbindgen_free: (a: number, b: number, c: number) => void;\n    readonly __wbindgen_malloc: (a: number, b: number) => number;\n    readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;\n    readonly __wbindgen_externrefs: WebAssembly.Table;\n    readonly __externref_table_dealloc: (a: number) => void;\n    readonly __wbindgen_start: () => void;\n}"},{"name":"SyncInitInput","signature":"export type SyncInitInput = BufferSource | WebAssembly.Module;"},{"name":"initSync","signature":"/**\n * Instantiates the given `module`, which can either be bytes or\n * a precompiled `WebAssembly.Module`.\n *\n * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.\n *\n * @returns {InitOutput}\n */\nexport function initSync(module: {\n    module: SyncInitInput;\n} | SyncInitInput): InitOutput;"},{"name":"__wbg_init","signature":"/**\n * If `module_or_path` is {RequestInfo} or {URL}, makes a request and\n * for everything else, calls `WebAssembly.instantiate` directly.\n *\n * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.\n *\n * @returns {Promise<InitOutput>}\n */\nexport default function __wbg_init(module_or_path?: {\n    module_or_path: InitInput | Promise<InitInput>;\n} | InitInput | Promise<InitInput>): Promise<InitOutput>;"}]}]}