import type { JsonValue } from "@decionis/agent-safe-pipeline"; /** A running demo authority: where it listens, the key it accepts, and how to stop it. */ export interface DemoAuthorityHandle { readonly baseUrl: string; readonly apiKey: string; stop(): Promise; } /** The synthetic policy's two ceilings, in minor units. */ export declare const DEMO_AUTONOMOUS_LIMIT_MINOR = 10000; export declare const DEMO_HUMAN_LIMIT_MINOR = 100000; /** The request shape the policy reads; the double validates the whole contract before it is called. */ export interface DemoPolicyRequest { readonly action: { readonly type: string; readonly parameters: Readonly>; }; readonly context: Readonly>; } /** * The amount an HTTP body names, in minor units, or null when it names none. * `amountMinor` and `amount_minor` are integers already; `amount` is in major * units and is read to two places without floating arithmetic. */ export declare function amountMinorOf(body: JsonValue | undefined): number | null; /** * The demo policy: what the local authority decides. It is synthetic and * says nothing about any real policy. A body the gateway could not read is * escalated, because a policy cannot allow what it cannot see; a `DELETE` * is escalated as destructive; an amount above the autonomous ceiling is * escalated and one above the human ceiling is blocked; anything else is * allowed. */ export declare function demoPolicy(request: DemoPolicyRequest): "ALLOW" | "ESCALATE" | "BLOCK"; /** * Starts the loopback double of the Decionis routes with the demo policy. * The double is the pipeline's testing entry and is loaded only here, only * when the demo authority was chosen, so a production process never loads * it; the configuration refuses the choice in production before this runs. */ export declare function startDemoAuthority(): Promise; //# sourceMappingURL=DemoAuthority.d.ts.map