import { type JsonValue } from "@decionis/agent-safe-pipeline"; import { z } from "zod"; export declare const ACCEPTANCE_PLAN_VERSION = "agent-safe.acceptance-plan/1"; /** At most this many writes of each kind, so one run's evidence stays one document. */ export declare const MAX_PLAN_WRITES = 16; /** One write the run sends: its method, its path with any query, and its JSON body. */ export declare const PlanWriteSchema: z.ZodObject<{ name: z.ZodString; method: z.ZodEnum<{ POST: "POST"; PUT: "PUT"; PATCH: "PATCH"; DELETE: "DELETE"; }>; path: z.ZodString; body: z.ZodOptional>>; }, z.core.$strict>; /** A write the operator expects refused, at a resource the operator says may change. */ export declare const ProhibitedWriteSchema: z.ZodObject<{ name: z.ZodString; method: z.ZodEnum<{ POST: "POST"; PUT: "PUT"; PATCH: "PATCH"; DELETE: "DELETE"; }>; path: z.ZodString; body: z.ZodOptional>>; canary: z.ZodString; }, z.core.$strict>; export declare const AcceptancePlanSchema: z.ZodObject<{ version: z.ZodLiteral<"agent-safe.acceptance-plan/1">; gateway: z.ZodString; expires_at: z.ZodString; permitted: z.ZodDefault; path: z.ZodString; body: z.ZodOptional>>; }, z.core.$strict>>>; prohibited: z.ZodDefault; path: z.ZodString; body: z.ZodOptional>>; canary: z.ZodString; }, z.core.$strict>>>; origins: z.ZodDefault>>; providers: z.ZodDefault; path: z.ZodString; body: z.ZodOptional>>; canary: z.ZodString; }, z.core.$strict>; }, z.core.$strict>>>; mcp: z.ZodDefault>>; metadata: z.ZodDefault; }, z.core.$strict>; export type AcceptancePlan = z.infer; export type PlanWrite = z.infer; export type ProhibitedWrite = z.infer; /** A plan refused as written: the first problem, by field. */ export declare class AcceptancePlanError extends Error { readonly detail: string; constructor(detail: string); } /** The plan, checked; refused with the first problem by its field. */ export declare function parseAcceptancePlan(value: unknown): AcceptancePlan; /** `sha256:` over the plan's RFC 8785 form: what a report says it ran. */ export declare function planDigest(plan: AcceptancePlan): string; /** * A write's path and query as the gateway's listener reads them: parsed as a * URL, so a character a client percent-encodes on the way is compared encoded. */ export declare function splitTarget(target: string): { readonly path: string; readonly search: string; }; /** A write's body as it is sent: JSON, or nothing. */ export declare function writeBody(write: { readonly body?: JsonValue | undefined; }): Buffer; /** A gateway's base URL with no trailing `/`, so a route under it is joined once. */ export declare function withoutTrailingSlashes(url: string): string; //# sourceMappingURL=AcceptancePlan.d.ts.map