import { type JsonValue } from "@decionis/agent-safe-pipeline"; import type { FailurePolicy, GatewayConfig, GatewayMode } from "../gateway/GatewayConfig.js"; /** The contract of the document: versioned, so a reader holding one knows what it covers. */ export declare const DEPLOYMENT_FINGERPRINT_CONTRACT = "agent-safe.deployment-fingerprint/1"; /** What a secret-derived value is written as in the digested configuration. */ export declare const REDACTED = "[REDACTED]"; /** One row of the route table: what it matches, the action, and how a decision about it is enforced. */ export interface FingerprintRoute { readonly methods: readonly string[]; readonly path: string; readonly action: string | null; /** The gateway's mode for a governed row; `PASSTHROUGH` or `REFUSE` where nothing is asked. */ readonly mode: GatewayMode | "PASSTHROUGH" | "REFUSE"; /** What a governed row does when the authority cannot answer; null where nothing is asked. */ readonly failure_policy: FailurePolicy | null; } /** * `agent-safe.deployment-fingerprint/1`: what one running gateway is, from * what it was configured with and nothing it observed, so the same * configuration under the same build always yields the same document. A * report of what was tested here (an acceptance run) can name its digest as * the condition it holds under: any change to a field below is a different * deployment. */ export interface DeploymentFingerprintDocument { readonly fingerprint: typeof DEPLOYMENT_FINGERPRINT_CONTRACT; /** The runtime's version, and the image digest the orchestrator declared for it (`supplied`), or null. */ readonly runtime: { readonly version: string; readonly image_digest: string | null; }; /** `sha256:` over the RFC 8785 form of the effective configuration, every secret-derived value redacted. */ readonly configuration_digest: string; /** * The digest of the action space this gateway loaded, as `agentsafe actions * manifest --gateway --digest` prints it for the same configuration; null * when no manifest describes it: the gateway governs nothing, or more than * one manifest lists. */ readonly action_manifest_digest: string | null; /** The route table, in the order the gateway tries it. */ readonly routes: readonly FingerprintRoute[]; /** Who the gateway says acts: the actor it names, the header a caller names itself in, the subject's issuer. */ readonly principals: { readonly actor: string; readonly header: string | null; readonly subject_issuer: string | null; }; /** Whose identity reaches the upstream: the caller's, or a credential the gateway holds; and its own token. */ readonly upstream_identity: { readonly mode: "CALLER" | "GATEWAY_CREDENTIAL"; readonly header: string | null; readonly gateway_token: boolean; }; readonly authority: { readonly kind: GatewayConfig["authority"]["kind"]; readonly endpoint: string; readonly tenant: string; }; /** The declared systems of record the agent zone must not reach directly, as `name=host:port`. */ readonly containment: readonly string[]; } export interface DeploymentFingerprint { readonly document: DeploymentFingerprintDocument; /** `sha256:` over the document's RFC 8785 form. */ readonly digest: string; } export interface FingerprintRuntime { readonly version: string; readonly imageDigest: string | null; } /** * The effective configuration as the fingerprint digests it: every setting, * but never where it came from, which does not change what the gateway does. * The configuration holds no secret value, only the names of secrets and the * files they are read from; the tenant keys' digests are the one value derived * from a secret, so each is written as `[REDACTED]`, and a rotation that keeps * their number changes nothing. */ export declare function redactedConfiguration(config: GatewayConfig): JsonValue; /** The fingerprint of a gateway built from this configuration under this runtime. Nothing is sent anywhere. */ export declare function deploymentFingerprint(config: GatewayConfig, runtime: FingerprintRuntime): DeploymentFingerprint; /** * The fields of two fingerprints that differ, by name, in document order; * none when they are the same deployment. */ export declare function changedFields(before: DeploymentFingerprintDocument, after: DeploymentFingerprintDocument): readonly string[]; //# sourceMappingURL=DeploymentFingerprint.d.ts.map