import type { LifecycleStateResult } from '../lifecycle-state/types.js'; import { type PauseStateExplanation, type PauseStateInput } from './types.js'; /** Thrown when the INPUT is malformed, never as a verdict. * * The line this module draws: a record that is well formed but fails a check is a * disposition and feeds the verdict. A caller who passes a non-array, a cause with no * `cause_id`, two causes sharing one `cause_id` or a resolver that answers off the * vocabulary has made a programming error, and a programming error is not a finding about * anybody's authority. Same split, and same shape, as `LifecycleStateError`. */ export declare class SuspensionCauseError extends Error { readonly code: string; constructor(code: string, message: string); } /** The signed preimage of a cause or release record: every member except `signature` and * `record_id`, canonicalized under RFC 8785 by this SDK's own canonicalizer. * * `record_id` is excluded because where a record carries one it is a content address over * these very bytes and cannot be inside its own preimage. `src/v2/instruction-provenance` * already excludes its `receipt_id` on the same reasoning, so this is the SDK's existing * convention rather than a new one. Every other member signs, including members this * module does not read, so an extension cannot be added to a record after signing. */ export declare function suspensionRecordPreimage(record: Readonly>): string; /** * Evaluate a set of lifecycle causes against one authority artifact at one instant, with * the audit trail behind the answer. * * `evaluatePauseState` is the same computation returning only `state`. Use this one when * you have to record why each record did or did not move the answer. * * WHAT THE VERDICT MEANS, AND WHAT IT DOES NOT. This module looked at causes and releases. * It did not verify a chain, did not resolve a revocation and did not read a time facet. * So a `valid` verdict here means exactly "no cause holds this artifact paused at this * instant" and NOTHING MORE. It is not a statement that the artifact confers authority. * Compose it with a chain result through `composeChainAndPause` before anything treats the * artifact as exercisable, and read that function's doc comment for why the order is not * negotiable. * * Proposed. Concept source: aeoess/agent-authority-lifecycle, invariant L8 and invariant * candidate CAND-05. */ export declare function explainPauseState(input: PauseStateInput): PauseStateExplanation; /** * Evaluate a set of lifecycle causes against one authority artifact at one instant. * * The result's `outstanding` member is the remaining cause set. NEVER A COUNT AND NEVER A * BOOLEAN: that member being a list is the whole of CAND-05 in one field. An * implementation holding a single suspended flag conforms to every word of invariant L8, * which says nothing about arity, and still gets a regulatory suspension lapsing while an * unrelated internal restriction stands exactly backwards, because the first effective * release looks to it like a full restoration. * * See `explainPauseState` for the same computation with the per-record audit trail, and * `composeChainAndPause` for what a `valid` verdict here does and does not entitle a * caller to conclude. * * Proposed. Concept source: aeoess/agent-authority-lifecycle, invariant L8 and invariant * candidate CAND-05. */ export declare function evaluatePauseState(input: PauseStateInput): LifecycleStateResult; /** * Compose a chain result and a pause state into one lifecycle answer, chain first. * * A RELEASE NEVER CLEARS A REVOCATION THAT HAPPENED MEANWHILE. That is the rule this * function exists to make unavoidable, and `OPEN-QUESTIONS.md` states it directly: lifting * one suspension should not clear another, "bypass a revocation that happened while the * agent was suspended, or recreate rights that changed in the meantime". A grant revoked * during its suspension is invalid once every cause has been lifted, because draft-03 * section 3.5 says verbatim "Revocation is irreversible" and a release record is a later * record about the causes, not about the chain. It never reaches the chain result. * * So: when `chain` is anything other than `valid`, `chain` is returned UNCHANGED and the * pause state is not reported. When `chain` is `valid`, the pause state is the answer. * * Both arguments come from the six-value lifecycle vocabulary. Get `chain` from * `mapAuthorityValidationToLifecycle` over a real `AuthorityValidationResult`, which * leaves the draft-03 four-value result untouched, and `pause` from `evaluatePauseState`. * A caller wanting both raw results side by side has `CompositeAuthorityResult`. * * WHAT THIS DOES NOT DECIDE. The reverse ordering: a revoked or indeterminate chain with * causes still outstanding. This function reports the chain, which is a choice of what to * report first and not a claim that the causes stopped mattering. No published text and no * proposed text settles it, and the fixture that exercises this area deliberately presents * no such vector. Recorded as an open question rather than papered over. * * Proposed. */ export declare function composeChainAndPause(chain: LifecycleStateResult, pause: LifecycleStateResult): LifecycleStateResult; //# sourceMappingURL=evaluate.d.ts.map