/** * PEAC Policy Kit * * Deterministic policy evaluation for Control Abstraction Layer (CAL) semantics. * * Features: * - File-based policy format (YAML or JSON) * - First-match-wins rule semantics * - Subject matching by type, labels, and ID patterns * - Purpose and licensing mode matching * - No scripting, no dynamic code * - Deterministic, auditable, side-effect free * * @example * ```typescript * import { loadPolicy, evaluate } from '@peac/policy-kit'; * * const policy = loadPolicy('peac-policy.yaml'); * * const result = evaluate(policy, { * subject: { type: 'human', labels: ['subscribed'] }, * purpose: 'crawl', * licensing_mode: 'subscription', * }); * * console.log(result.decision); // 'allow' | 'deny' | 'review' * ``` * * @packageDocumentation */ export { POLICY_VERSION, type SubjectType, type ControlPurpose, type ControlLicensingMode, type ControlDecision, type SubjectMatcher, type PolicyRule, type PolicyDefaults, type PolicyDocument, type EvaluationContext, type EvaluationResult, type RateLimitConfig, parseRateLimit, formatRateLimit, type DecisionRequirements, type ProfileParameter, type ProfileDefinition, type PolicyConstraints, type EnforcementProfileId, type EnforcementProfile, SubjectMatcherSchema, PolicyRuleSchema, PolicyDefaultsSchema, PolicyDocumentSchema, RateLimitConfigSchema, DecisionRequirementsSchema, ProfileParameterSchema, ProfileDefinitionSchema, PolicyConstraintsSchema, EnforcementProfileSchema, } from './types'; export { loadPolicy, parsePolicy, parsePolicyDocument, validatePolicy, policyFileExists, createExamplePolicy, serializePolicyYaml, serializePolicyJson, PolicyLoadError, PolicyValidationError, } from './loader'; export { parsePolicyDocument as loadPolicyDocument } from './loader'; export { evaluate, explainMatches, findEffectiveRule, isAllowed, isDenied, requiresReview, evaluateBatch, } from './evaluate'; export { PEAC_PROTOCOL_VERSION, compilePeacTxt, compileRobotsSnippet, compileAiprefTemplates, renderPolicyMarkdown, type CompileOptions, type AiprefTemplate, } from './compiler'; export { PROFILES, PROFILE_IDS, type ProfileId } from './generated/profiles'; export { listProfiles, hasProfile, loadProfile, getProfile, validateProfileParams, customizeProfile, getAllProfiles, getProfileSummary, ProfileError, type ValidationResult, type ValidationError, type ValidationWarning, type CustomizeResult, } from './profiles'; export { enforceDecision, requiresChallenge, getChallengeHeader, enforceForHttp, type EnforcementContext, type EnforcementResult, enforcePurposeDecision, getPurposeDecisionStatusCode, // Low-level: (decision, purposeValid) -> status type PurposeEnforcementContext, type PurposeEnforcementResult, } from './enforce'; export { STRICT_PROFILE, BALANCED_PROFILE, OPEN_PROFILE, ENFORCEMENT_PROFILES, ENFORCEMENT_PROFILE_IDS, DEFAULT_ENFORCEMENT_PROFILE, getEnforcementProfile, isEnforcementProfileId, getDefaultEnforcementProfile, evaluatePurpose, getPurposeStatusCode, getRetryAfter, type PurposeEvaluationResult, } from './enforcement-profiles'; //# sourceMappingURL=index.d.ts.map