import { type EpAuthzMode } from "./endpoint-subjects.js"; import type { EpClass } from "./endpoint-envelope.js"; /** True iff `s` is a bounded reverse-DNS URN — the shared form for cluster type URNs and * trait URNs (§13.7: `ai.cotal.guarded`, `com.acme.deploy`). */ export declare function isReverseDnsUrn(s: string): boolean; /** The pre-effect authorization trait (§13.6 "Guard checkpoint"): the command MUST NOT * effect until the guard endpoint named by the trait value answered allow. */ export declare const TRAIT_GUARDED = "ai.cotal.guarded"; /** The payment trait (§13.10): the command MUST verify an independently verifiable payment * proof in the `auth` slot before effect — never a bare "settled" assertion. */ export declare const TRAIT_PRICED = "ai.cotal.priced"; /** This revision governs EXACTLY these two (§13.7); everything else is vocabulary. Defined * HERE (the cluster layer both the trait verifiers and the registrar depend on) so the * trusted registration writer can pin the canonical set STRUCTURALLY — a caller-supplied * governed set was the subset-narrowing escape the panel rejected. */ export declare const GOVERNED_TRAIT_URNS: readonly string[]; /** The declared admission ceiling for a journal-class command's submissions: what the canonicalizer * refuses BEFORE deciding. It lives in the digest-verified registered surface rather than in a * constant so that two conforming implementations cannot decide the same bytes differently and * durably, and so a caller can see what will be refused before submitting. */ export interface EpAdmissionCeiling { maxBytes: number; maxDepth: number; maxItems: number; } /** One command's REGISTERED declaration (§13.7): everything the serve boundary enforces about * it comes from here, out of digest-verified bytes. `modes` is present exactly when * `targeted` — a targeted command admits ONLY its declared modes, an untargeted command * admits ONLY the untargeted form (default-deny both ways, §13.2/§13.7). */ export interface ClusterCommand { name: string; class: EpClass; targeted: boolean; modes?: EpAuthzMode[]; capability: string; /** CLOSURE digests of the input/output schema bundles (§13.7: what `op` pins). */ inputDigest: string; outputDigest: string; traits?: string[]; /** The ACTION COMPOSITE marker. Present only as `true`; absence means "not an action". It is a * command marker and NOT a class — an action command's submissions are `journal`, * but the marker is what makes `goalId` a MUST on the envelope. */ action?: true; /** Declared iff the command is `journal`-class, which is what makes it accept submissions: the * marker is irrelevant here, and the canonicalizer reads the ceiling from this field, never * from a constant. */ admissionCeiling?: EpAdmissionCeiling; /** The acceptance-relative readiness bound, iff the command declares bounded readiness (§13.6). * Persisted into the acceptance because it is goal state, not the request's decision deadline. */ readinessDeadlineMs?: number; } /** The §13.7 cluster document: `{ urn, revision, attributes[], commands[], events[] }`. * Attributes and events are carried opaquely in P1 (their consuming machinery is the record * and journal contracts); commands are fully parsed — they are the serve authority. */ export interface ClusterDocument { urn: string; revision: number; attributes: unknown[]; commands: ClusterCommand[]; events: unknown[]; } /** Parse a cluster document at its consuming boundary. Violations are `contract-invalid` * (a malformed contract ARTIFACT, §13.7's registration-time class — a reader of registered * state converts this to its own loud failure). */ export declare function parseClusterDocument(raw: unknown): ClusterDocument; /** The §13.7 closure MANIFEST `{ v: 1, root: , members: […] }`. * A closure digest is the artifact digest of THIS document, never of the root cluster document * ("two digests, never conflated", §13.7): a reader fetches the manifest at the registered * closure digest, then fetches the root at `manifest.root`. */ export interface ClusterManifest { root: string; members: string[]; } /** Verify fetched MANIFEST bytes against the registered closure digest and parse them (§13.7: * the closure digest identifies the manifest, not the root document). P1 pins single-document * clusters, so `members` MUST be empty — a non-empty closure needs the D8 multi-artifact * loader and fails loud until then, never silently under-verified. */ export declare function verifyClusterManifest(closureDigest: string, manifest: unknown): ClusterManifest; /** Verify fetched ROOT cluster-document bytes against the manifest's `root` artifact digest and * parse the command surface — the second half of the §13.7 two-digest read; a document that * does not hash to `root` fails loud, never parses. */ export declare function verifyClusterRoot(rootDigest: string, document: unknown): ClusterDocument; /** The authoritative describe answer's descriptor: identity plus the served clusters, each * inline (`document`) or by digest (§13.7). Derived from VERIFIED registered bytes by * {@link deriveDescriptor} — never hand-authored. */ export interface DescribeDescriptor { endpoint: string; owner: string; endpointType?: string; protocol: { v: 1; }; clusters: { digest: string; commands: string[]; document?: Record; }[]; } /** Derive the instance's AUTHORITATIVE descriptor from its registered identity and VERIFIED * cluster documents — the FULL registered surface (SPEC §13.9: the instance credential binds * its registered command set; caller-specific authorization is projected only in the * response-time describe answer, §13.7, never baked into the registration). Every cluster * advertises exactly its verified commands and carries its verified document inline. Deep- * frozen: discovery is a projection of registered bytes, and no later mutation can change what * describe publishes. */ export declare function deriveDescriptor(identity: { endpoint: string; owner: string; endpointType?: string; }, clusters: { digest: string; document: ClusterDocument; raw: Record; }[]): DescribeDescriptor; //# sourceMappingURL=endpoint-cluster.d.ts.map