import type { PostureVerifyInput } from './posture-receipt.js'; export declare const PROFILE_ENFORCING_ATOMIC_V1: "ENFORCING_ATOMIC_V1"; /** * ENFORCING_ATOMIC_V2 (roadmap 1167) — V1 plus a VERIFIED credential boundary. * * WHY A NEW NAME RATHER THAN A STRICTER _V1. with-coderifts.ts:228 states the * rule this package learned from its own 10.0.0 and 12.0.0 releases: "The next * tightening MUST be `_V2`; adding a condition to `_V1` reintroduces the defect * this type exists to remove." A caller who wrote `_V1` keeps exactly the * contract they asked for; the stricter check costs them nothing. * * WHAT V2's credential_boundary PROVES: * A signed `cr.posture.receipt.v1` verified against a caller-supplied key * (registry or pinned PEM) asserts `verdict: 'PASS'` — the credential * boundary was read back out of the live catalog at `measured_at`, that * reading is inside the caller's freshness window, and the receipt is bound * to this `deployment_id`. * * WHAT IT DOES NOT PROVE, and this list is the point rather than a caveat: * · NOT a tuple the CALLER did not name. executor_id, adapter_id, target_uri * and policy_hash ARE now bound (AUDIT P1 / RES-3) — but each only when the * construction configures it. The earlier text here said the producer does * not sign those fields; re-measured 2026-08-29 against capability-demo * demo/src/posture.js, the issuer spreads them into the SIGNED canonical * body whenever they carry real content, so binding them is backed by the * producer rather than asserted over it. What has NOT changed is the rule * underneath: a field nobody configured is reported in the verifier's * `not_bound` list, never defaulted into looking checked. * · NOT an expiry. The receipt carries `measured_at` and no `expires_at`, so * the age check is a FRESHNESS window the CALLER supplies via `maxAgeMs`. * A guard-side default would present our policy as the receipt's statement. * · NOT executor behaviour. Same honest limit as every other invariant here: * construction demands wiring, and a read-back at `measured_at` is a fact * about that moment, not about the write that happens afterwards. */ export declare const PROFILE_ENFORCING_ATOMIC_V2: "ENFORCING_ATOMIC_V2"; /** * The unsuffixed wire value stays pinned to V1 FOREVER (with-coderifts.ts:231-233). * Re-pointing it at V2 would silently move every existing caller — the migration * the versioned names exist to refuse. */ export declare const GUARD_ATOMIC_WIRE_VALUE: "ENFORCING_ATOMIC"; export type AtomicProfileSpelling = 'ENFORCING_ATOMIC' | 'ENFORCING_ATOMIC_V1' | 'ENFORCING_ATOMIC_V2'; export declare const ATOMIC_PROFILE_UNSATISFIED: "ATOMIC_PROFILE_UNSATISFIED"; export type AtomicOutcome = 'AUTHORIZED_COMMITTED' | 'REFUSED' | 'INDETERMINATE'; /** Frozen invariant names — adding one is ATOMIC_V2, not an edit here. */ export declare const ATOMIC_INVARIANTS: readonly ["verified_receipt", "verified_grant_v2", "exact_executor", "exact_target", "after_payload_hash", "fresh_nonce", "nonce_consumed_once", "target_CAS", "read_back", "executor_attestation", "credential_boundary"]; export type MutatorRegister = { registerMutator: (name: string) => MutatorRegister; has: (name: string) => boolean; list: () => readonly string[]; }; export declare function createMutatorRegister(): MutatorRegister; export declare function isEnforcingAtomic(profile: unknown): profile is AtomicProfileSpelling; /** V2 only. The unsuffixed alias is V1 and must never answer true here. */ export declare function isEnforcingAtomicV2(profile: unknown): boolean; export type AtomicConstructionInput = { executionGrant?: { enabled?: boolean; resolveStateNonce?: unknown; grantVersion?: string; } | null; executorId?: string; adapterId?: string; targetUri?: string; /** * MEASURED: executorId/adapterId/targetUri already existed here; policyHash * did not exist anywhere in this package — its only mention was the comment * above saying it was not bound. Added so the tuple can be STATED, not so it * can be assumed: leaving it unset binds nothing, and says so. */ policyHash?: string; executorAttestation?: { registry?: unknown; } | null; mutatorRegister?: MutatorRegister | null; casAdapter?: unknown; readBack?: unknown; credentialBoundary?: unknown; /** V2 ONLY. Ignored on V1, whose credential_boundary check is frozen. */ profile?: AtomicProfileSpelling; }; /** * V2 caller-supplied freshness window must be finite, positive, and ≤ 24h. * A larger value is not a freshness check (the receipt has no expires_at). */ export declare const ATOMIC_V2_MAX_AGE_MS_CAP = 86400000; /** * V2 credential_boundary input. A bare `true` is deliberately NOT assignable. */ export type VerifiedCredentialBoundary = { postureReceipt: string; registry?: PostureVerifyInput['registry']; pinnedKeyPem?: string; deploymentId?: string; maxAgeMs?: number; now?: () => number; }; export declare const CREDENTIAL_BOUNDARY_BARE_REJECTED: string; export declare function atomicConstructionProblems(input: AtomicConstructionInput): string[]; export declare function throwAtomicUnsatisfied(problems: string[]): never; /** * Per-call outcome union. Host-claimed commit never AUTHORIZED_COMMITTED. * * Every required boolean below is supplied by the host. The guard classifies * the conjunction; it does not independently observe or attest the events. */ export declare function atomicOutcome(input: { /** * Supplied by the host. The guard classifies this assertion; it does not * independently observe or attest the underlying event. */ receiptVerified: boolean; /** * Supplied by the host. The guard classifies this assertion; it does not * independently observe or attest the underlying event. */ grantV2Valid: boolean; /** * Supplied by the host. The guard classifies this assertion; it does not * independently observe or attest the underlying event. */ executorMatch: boolean; /** * Supplied by the host. The guard classifies this assertion; it does not * independently observe or attest the underlying event. */ targetMatch: boolean; /** * Supplied by the host. The guard classifies this assertion; it does not * independently observe or attest the underlying event. */ nonceFresh: boolean; /** * Supplied by the host. The guard classifies this assertion; it does not * independently observe or attest the underlying event. * The executor is a remote party; the guard never witnesses nonce consumption. */ nonceConsumedOnce: boolean; /** * Supplied by the host. The guard classifies this assertion; it does not * independently observe or attest the underlying event. */ casCommitted: boolean; /** * Supplied by the host. The guard classifies this assertion; it does not * independently observe or attest the underlying event. */ readBackOk: boolean; /** * Supplied by the host. The guard classifies this assertion; it does not * independently observe or attest the underlying event. */ executorAttested: boolean; /** * Supplied by the host. The guard classifies this assertion; it does not * independently observe or attest the underlying event. * Construction can inspect the mutator register; this classifier input is * still host-supplied, not re-read here. */ mutatorRegistered: boolean; authUnavailable?: boolean; nonceStoreUnavailable?: boolean; readBackUnavailable?: boolean; signerUnavailableAfterCommit?: boolean; }): AtomicOutcome; //# sourceMappingURL=atomic-profile.d.ts.map