/** State declaration, record, template and consumer response schemas. */ import { z } from 'zod'; /** One addressed subject: the conversation-target scope plus the (kind, key) within it. */ export declare const stateSubject: z.ZodObject<{ target_kind: z.ZodEnum<{ tool: "tool"; agent: "agent"; }>; target_name: z.ZodString; kind: z.ZodString; key: z.ZodString; }, z.core.$strip>; export type StateSubject = z.infer; /** One absolute write-regime rule composed over the attachments: `{path, regime}`, permissive. */ export declare const stateRegime: z.ZodRecord; /** * One row of `GET /api/states` — a served declaration (`list_states` dumps every * `StateDeclaration`) plus `updated_at` (the row's last-write timestamp, ISO or * `null`). The list carries no record count; the `Records` column reads * `getStateStats` lazily per row. */ export declare const stateListItem: z.ZodObject<{ default_subject_kind: z.ZodString; description: z.ZodDefault; effective_schema: z.ZodDefault, z.ZodNull]>>; name: z.ZodString; regimes: z.ZodDefault>, z.ZodNull]>>; retention_days: z.ZodDefault>; schema: z.ZodOptional; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodRecord]>>; subject_kinds: z.ZodArray; updated_at: z.ZodDefault>; }, z.core.$strict>; export type StateListItem = z.infer; export declare const stateList: z.ZodArray; effective_schema: z.ZodDefault, z.ZodNull]>>; name: z.ZodString; regimes: z.ZodDefault>, z.ZodNull]>>; retention_days: z.ZodDefault>; schema: z.ZodOptional; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodRecord]>>; subject_kinds: z.ZodArray; updated_at: z.ZodDefault>; }, z.core.$strict>>; /** One template attachment on a state: where the fragment lands + its param/declaration values. */ export declare const stateAttachment: z.ZodObject<{ template: z.ZodString; path: z.ZodArray; parameters: z.ZodDefault>; declarations: z.ZodDefault>; }, z.core.$strip>; export type StateAttachment = z.infer; export declare const stateAttachmentList: z.ZodArray; parameters: z.ZodDefault>; declarations: z.ZodDefault>; }, z.core.$strip>>; /** `GET /api/states/{name}` — the declaration (with effective schema + regimes) plus attachments. */ export declare const stateDetail: z.ZodObject<{ default_subject_kind: z.ZodString; description: z.ZodDefault; effective_schema: z.ZodDefault, z.ZodNull]>>; name: z.ZodString; regimes: z.ZodDefault>, z.ZodNull]>>; retention_days: z.ZodDefault>; schema: z.ZodOptional; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodRecord]>>; subject_kinds: z.ZodArray; updated_at: z.ZodDefault>; attachments: z.ZodDefault; parameters: z.ZodDefault>; declarations: z.ZodDefault>; }, z.core.$strip>>>; }, z.core.$strict>; export type StateDetail = z.infer; /** * `GET /api/states/{name}/stats` — `records` (total documents), `per_field` (the count * of records carrying each base-schema property), `per_kind` (records per subject kind) * and `consumers` (the count of listable consumers). The Records tab shows `records`; * the states list reads it lazily for its Records column. */ export declare const stateStats: z.ZodObject<{ records: z.ZodNumber; per_field: z.ZodDefault>; per_kind: z.ZodDefault>; consumers: z.ZodDefault; }, z.core.$strip>; export type StateStats = z.infer; /** * One row of `GET /api/state-templates`. The template document plus the two derived columns * the Templates tab shows: `attached_to` (how many states attach it — a delete is refused * while > 0) and `shipped_default` (a platform-shipped template). Both are server-derived * columns; the document fields are verbatim. */ export declare const stateTemplateListItem: z.ZodObject<{ declarations: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; schema: z.ZodRecord; }, z.core.$strict>, z.ZodNull]>>; description: z.ZodDefault; kind: z.ZodDefault>; name: z.ZodString; parameters: z.ZodDefault>; reconcile: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>; orphans: z.ZodObject<{ content: z.ZodOptional; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>; resolutions: z.ZodObject<{ content: z.ZodOptional; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>; }, z.core.$strict>, z.ZodNull]>>; regimes: z.ZodDefault>>; schema: z.ZodOptional; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodRecord]>>; template_jq: z.ZodDefault; jq: z.ZodObject<{ content: z.ZodOptional; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>; params: z.ZodDefault>; purpose: z.ZodEnum<{ input: "input"; update: "update"; }>; reads: z.ZodDefault>>; writes: z.ZodDefault>>; }, z.core.$strict>>, z.ZodNull]>>; trace: z.ZodDefault>; attached_to: z.ZodDefault; shipped_default: z.ZodDefault; }, z.core.$strict>; export type StateTemplateListItem = z.infer; export declare const stateTemplateList: z.ZodArray; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; schema: z.ZodRecord; }, z.core.$strict>, z.ZodNull]>>; description: z.ZodDefault; kind: z.ZodDefault>; name: z.ZodString; parameters: z.ZodDefault>; reconcile: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>; orphans: z.ZodObject<{ content: z.ZodOptional; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>; resolutions: z.ZodObject<{ content: z.ZodOptional; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>; }, z.core.$strict>, z.ZodNull]>>; regimes: z.ZodDefault>>; schema: z.ZodOptional; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodRecord]>>; template_jq: z.ZodDefault; jq: z.ZodObject<{ content: z.ZodOptional; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>; params: z.ZodDefault>; purpose: z.ZodEnum<{ input: "input"; update: "update"; }>; reads: z.ZodDefault>>; writes: z.ZodDefault>>; }, z.core.$strict>>, z.ZodNull]>>; trace: z.ZodDefault>; attached_to: z.ZodDefault; shipped_default: z.ZodDefault; }, z.core.$strict>>; /** A read record: the state, its subject, the document + monotonic seq, and any fold. */ export declare const stateRecord: z.ZodObject<{ state: z.ZodString; subject: z.ZodObject<{ target_kind: z.ZodEnum<{ tool: "tool"; agent: "agent"; }>; target_name: z.ZodString; kind: z.ZodString; key: z.ZodString; }, z.core.$strip>; data: z.ZodDefault>; seq: z.ZodNumber; canonical_subject: z.ZodObject<{ target_kind: z.ZodEnum<{ tool: "tool"; agent: "agent"; }>; target_name: z.ZodString; kind: z.ZodString; key: z.ZodString; }, z.core.$strip>; folded_from: z.ZodDefault; target_name: z.ZodString; kind: z.ZodString; key: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>; export type StateRecord = z.infer; /** The outcome of an `apply` (a delta batch): whether it applied + the resulting doc. */ export declare const applyResult: z.ZodObject<{ applied: z.ZodBoolean; data: z.ZodDefault>>; seq: z.ZodDefault>; skipped: z.ZodDefault>>; }, z.core.$strip>; export type ApplyResult = z.infer; /** * `GET …/template-jq/{name}` — the evaluated template jq's `name`, its `purpose`, and * its `value` (the `input` jq's read). GET evaluates ONLY an `input`-purpose jq; a GET * on an `update`-purpose name is refused with 422, so the result's purpose is always * `input`. */ export declare const templateJqResult: z.ZodObject<{ name: z.ZodString; purpose: z.ZodLiteral<"input">; value: z.ZodUnknown; }, z.core.$strip>; export type TemplateJqResult = z.infer; /** * `POST …/template-jq/{name}` — the applied template jq's outcome. The jq lands an op * batch through the same `apply` chokepoint as a delta, so `applied`/`data`/`seq`/`skipped` * carry that outcome. */ export declare const templateJqApplyResult: z.ZodObject<{ name: z.ZodString; applied: z.ZodBoolean; data: z.ZodDefault>>; seq: z.ZodDefault>; skipped: z.ZodDefault>>; }, z.core.$strip>; export type TemplateJqApplyResult = z.infer; /** * One paged subject row: the addressed `subject` plus its record's last-write * `updated_at` — epoch seconds (the store's `extract(epoch FROM updated_at)`), served * raw (no `mode="json"` dump), and `NOT NULL` on every record, so a plain number. */ export declare const subjectRow: z.ZodObject<{ subject: z.ZodObject<{ target_kind: z.ZodEnum<{ tool: "tool"; agent: "agent"; }>; target_name: z.ZodString; kind: z.ZodString; key: z.ZodString; }, z.core.$strip>; updated_at: z.ZodNumber; }, z.core.$strip>; export type SubjectRow = z.infer; /** * `GET /api/states/{name}/subjects` — a keyset page of subject rows (optionally of one * `kind`): the matched `subjects` plus the `next_cursor` a "Load more" carries back * (`null` at the end). */ export declare const subjectPage: z.ZodObject<{ subjects: z.ZodArray; target_name: z.ZodString; kind: z.ZodString; key: z.ZodString; }, z.core.$strip>; updated_at: z.ZodNumber; }, z.core.$strip>>; next_cursor: z.ZodDefault>; }, z.core.$strip>; export type SubjectPage = z.infer; /** * `POST /api/states/{name}/records/search` — a keyset page of the subject rows whose * document contains the filters (a JSONB containment match). Each hit's `subject` opens * the record page; `next_cursor` pages the rest. */ export declare const recordSearchPage: z.ZodObject<{ matches: z.ZodArray; target_name: z.ZodString; kind: z.ZodString; key: z.ZodString; }, z.core.$strip>; updated_at: z.ZodNumber; }, z.core.$strip>>; next_cursor: z.ZodDefault>; }, z.core.$strip>; export type RecordSearchPage = z.infer; /** A WriteEntry's origin completed by the platform chokepoint (mirrors CompletedOrigin). */ export declare const completedOrigin: z.ZodObject<{ consumer: z.ZodDefault>; meta: z.ZodDefault>>; run_id: z.ZodDefault>; op_id: z.ZodDefault>; door: z.ZodString; actor: z.ZodDefault>; turn_id: z.ZodDefault>; inbound_id: z.ZodDefault>; }, z.core.$strip>; export type CompletedOrigin = z.infer; /** One row of a subject's audit trail (mirrors WriteEntry). `paths` are absolute. */ export declare const writeEntry: z.ZodObject<{ seq: z.ZodNumber; at: z.ZodString; origin: z.ZodObject<{ consumer: z.ZodDefault>; meta: z.ZodDefault>>; run_id: z.ZodDefault>; op_id: z.ZodDefault>; door: z.ZodString; actor: z.ZodDefault>; turn_id: z.ZodDefault>; inbound_id: z.ZodDefault>; }, z.core.$strip>; paths: z.ZodDefault>>>; }, z.core.$strip>; export type WriteEntry = z.infer; /** `GET /api/states/{name}/records/.../writes` — a keyset page of the audit trail. */ export declare const writesPage: z.ZodObject<{ items: z.ZodArray>; meta: z.ZodDefault>>; run_id: z.ZodDefault>; op_id: z.ZodDefault>; door: z.ZodString; actor: z.ZodDefault>; turn_id: z.ZodDefault>; inbound_id: z.ZodDefault>; }, z.core.$strip>; paths: z.ZodDefault>>>; }, z.core.$strip>>; next_cursor: z.ZodDefault>; }, z.core.$strip>; export type WritesPage = z.infer; /** Where the Studio opens a consumer (mirrors ConsumerLink): a token+search OR plugin path. */ export declare const consumerLink: z.ZodObject<{ token: z.ZodDefault>; plugin_path: z.ZodDefault>; search: z.ZodDefault>>; }, z.core.$strip>; export type ConsumerLink = z.infer; /** * One thing that binds a state (mirrors ConsumerRow): its `kind` (flow / hook / schedule * / agent), `name`, human `detail` and optional `link`. `unavailable` marks a consumer * family that cannot be listed on this deployment (e.g. no scheduling backend), surfaced * as a muted line — never swallowed. */ export declare const consumerRow: z.ZodObject<{ kind: z.ZodString; name: z.ZodDefault>; detail: z.ZodDefault>; link: z.ZodDefault>; plugin_path: z.ZodDefault>; search: z.ZodDefault>>; }, z.core.$strip>>>; unavailable: z.ZodDefault>; }, z.core.$strip>; export type ConsumerRow = z.infer; /** `GET /api/states/{name}/consumers` — the union of every registered lister's rows. */ export declare const stateConsumers: z.ZodArray>; detail: z.ZodDefault>; link: z.ZodDefault>; plugin_path: z.ZodDefault>; search: z.ZodDefault>>; }, z.core.$strip>>>; unavailable: z.ZodDefault>; }, z.core.$strip>>; export type StateConsumers = z.infer; /** `DELETE /api/states/{name}` — the removed state. */ export declare const stateDeleted: z.ZodObject<{ name: z.ZodString; deleted: z.ZodLiteral; }, z.core.$strip>; /** `PUT /api/states/{name}/attachments/{template}` — the template now attached to the state. */ export declare const stateAttached: z.ZodObject<{ attached: z.ZodLiteral; state: z.ZodString; template: z.ZodString; }, z.core.$strip>; export type StateAttached = z.infer; /** `PATCH /api/states/{name}/attachments/{template}` — the attachment whose declarations were rewritten. */ export declare const stateAttachmentUpdated: z.ZodObject<{ updated: z.ZodLiteral; state: z.ZodString; template: z.ZodString; }, z.core.$strip>; export type StateAttachmentUpdated = z.infer; /** `DELETE /api/states/{name}/attachments/{template}` — the template detached from the state. */ export declare const stateDetached: z.ZodObject<{ detached: z.ZodLiteral; state: z.ZodString; template: z.ZodString; }, z.core.$strip>; export type StateDetached = z.infer; /** * `POST /api/states/{name}/records/.../fold` — the fold report: the `mode`, the * `{kind, key}` of the folded `from` and surviving `into` subjects, whether the fold * was `already` in place, and how many records were `flattened` into the survivor. */ export declare const stateFoldReport: z.ZodObject<{ mode: z.ZodEnum<{ switch: "switch"; merge: "merge"; }>; from: z.ZodObject<{ kind: z.ZodString; key: z.ZodString; }, z.core.$strip>; into: z.ZodObject<{ kind: z.ZodString; key: z.ZodString; }, z.core.$strip>; already: z.ZodBoolean; flattened: z.ZodDefault; }, z.core.$strip>; export type StateFoldReport = z.infer; /** `DELETE /api/state-templates/{name}` — the removed template document. */ export declare const stateTemplateDeleted: z.ZodObject<{ name: z.ZodString; deleted: z.ZodLiteral; }, z.core.$strip>; /** `DELETE /api/states/{name}/records/...` — the erased record marker. */ export declare const recordErased: z.ZodObject<{ erased: z.ZodLiteral; }, z.core.$strip>; /** * `POST /api/state-retention/prune` — the retention sweep's per-state deleted counts * (`{}` when nothing expired); the UI sums the values for its total. */ export declare const stateRetentionPruned: z.ZodObject<{ pruned: z.ZodDefault>; }, z.core.$strip>; export type StateRetentionPruned = z.infer; //# sourceMappingURL=states.d.ts.map