/** Governance posture tiers — ordered from most to least trusted. * Each tier defines default constraints that override delegation grants. */ export type PostureTier = 'full_trust' | 'standard' | 'cautious' | 'restricted' | 'quarantine'; /** Default constraints applied per posture tier */ export interface PostureConstraints { /** Maximum spend per action (null = delegation limit applies) */ maxSpendPerAction?: number | null; /** Maximum delegation depth allowed */ maxDelegationDepth?: number; /** Scopes explicitly blocked at this posture */ blockedScopes?: string[]; /** Whether irreversible actions are allowed */ allowIrreversible?: boolean; /** Whether escalation grants are honored */ allowEscalation?: boolean; /** Minimum fidelity score required */ minFidelityScore?: number; } /** Default constraints for each posture tier */ export declare const DEFAULT_POSTURE_CONSTRAINTS: Record; /** Agent's governance posture state. The SDK only defines the shape; * the state machine that mutates it lives in the gateway. */ export interface GovernancePosture { /** Current posture tier */ tier: PostureTier; /** When this posture was last changed */ changedAt: string; /** Who changed it — 'system' for auto-downgrade, principal DID for manual */ changedBy: string; /** Consecutive behavioral failure count (resets on success) */ consecutiveFailures: number; /** Total behavioral failures since last posture change */ failuresSinceChange: number; /** History of posture changes (audit trail) */ history: PostureChange[]; } export interface PostureChange { from: PostureTier; to: PostureTier; reason: string; changedBy: string; changedAt: string; } /** Downgrade thresholds — how many consecutive failures trigger each level. * Default policy values live in the gateway alongside the state machine. */ export interface PostureDowngradePolicy { /** Consecutive failures to go from full_trust → standard */ fullToStandard: number; /** Consecutive failures to go from standard → cautious */ standardToCautious: number; /** Consecutive failures to go from cautious → restricted */ cautiousToRestricted: number; /** Consecutive failures to go from restricted → quarantine */ restrictedToQuarantine: number; } /** Get the constraints for a given posture tier */ export declare function getPostureConstraints(tier: PostureTier, custom?: Partial>>): PostureConstraints; /** Check if a scope is blocked at the current posture tier */ export declare function isScopeBlocked(tier: PostureTier, scope: string): boolean; /** Compare two posture tiers. Returns negative if a < b, 0 if equal, positive if a > b */ export declare function comparePostureTiers(a: PostureTier, b: PostureTier): number; export declare function createInitialPosture(_tier?: PostureTier): GovernancePosture; export declare function recordBehavioralFailure(_posture: GovernancePosture, _reason: string, _policy?: PostureDowngradePolicy): GovernancePosture; export declare function recordBehavioralSuccess(_posture: GovernancePosture): GovernancePosture; export declare function upgradePosture(_posture: GovernancePosture, _principalDid: string, _reason: string): GovernancePosture; //# sourceMappingURL=governance-posture.d.ts.map