import type { Pagination } from '../pagination/index.js'; export declare const AI_AGENT_STATUSES: readonly ["active", "disabled"]; export declare const REVIEW_POLICY_NAME_MAX_LENGTH = 120; export declare const REVIEW_POLICY_PROMPT_MAX_LENGTH = 10000; export declare const BUILT_IN_SECURITY_SCAN_NAME = "Superblocks Security Scan"; export declare const SUPERBLOCKS_SECURITY_AGENT_NAME = "Superblocks Security Agent"; export declare const REVIEW_POLICY_TYPES: readonly ["built_in_security_scan", "security_agent"]; export declare const REVIEW_POLICY_SOURCES: readonly ["admin_configured", "superblocks_managed"]; export declare const REVIEW_POLICY_TRIGGERS: readonly ["before_deploy", "after_checkpoint", "manual"]; export declare const REVIEW_POLICY_EXECUTION_CONTEXTS: readonly ["edit_mode_app", "superblocks_sabs_built_assets", "superblocks_sabs_dependency_metadata", "superblocks_sabs_source_snapshot"]; export declare const REVIEW_POLICY_RUNTIMES: readonly ["superblocks_dev_server_agent", "superblocks_sabs"]; export declare const REVIEW_POLICY_MODES: readonly ["advisory", "blocking"]; export declare const REVIEW_POLICY_RUNNER_TYPES: readonly ["built_in_security_scan", "llm_security_agent"]; export declare const REVIEW_FINDING_SOURCE_PHASES: readonly ["built_asset", "dependency", "edit_mode_app", "iac", "image", "source"]; export declare const REVIEW_FINDING_CATEGORIES: readonly ["external_policy", "misconfiguration", "security_agent", "secret", "sensitive_data", "static_analysis", "vulnerability"]; export declare const REVIEW_FINDING_SEVERITIES: readonly ["critical", "high", "medium", "low", "info"]; /** Severities that pause publish for "Publish anyway" in any policy mode. Info auto-publishes. */ export declare const ADVISORY_HOLD_FINDING_SEVERITIES: readonly ["critical", "high", "medium", "low"]; /** Severities that hard-block publish when a policy is in blocking mode (ENG-5334 / APPS-5406). */ export declare const BLOCKING_FINDING_SEVERITIES: readonly ["critical", "high"]; export declare const REVIEW_FINDING_CONFIDENCES: readonly ["high", "medium", "low"]; export declare const REVIEW_FINDING_SUPPRESSION_STATUSES: readonly ["active", "expired", "revoked"]; export declare const REVIEW_RUN_STATUSES: readonly ["queued", "running", "passed", "findings", "blocked", "errored", "timed_out", "canceled", "stale"]; export declare const REVIEW_RUN_DECISIONS: readonly ["allowed", "advisory_allowed", "blocked", "error_blocked", "not_applicable"]; export declare const REVIEW_RUN_TRIGGERED_BYS: readonly ["system", "user"]; export type AiAgentStatus = (typeof AI_AGENT_STATUSES)[number]; export type ReviewPolicyStatus = AiAgentStatus; export type ReviewPolicyType = (typeof REVIEW_POLICY_TYPES)[number]; export type ReviewPolicySource = (typeof REVIEW_POLICY_SOURCES)[number]; export type ReviewPolicyTrigger = (typeof REVIEW_POLICY_TRIGGERS)[number]; export type ReviewPolicyExecutionContext = (typeof REVIEW_POLICY_EXECUTION_CONTEXTS)[number]; export type ReviewPolicyRuntime = (typeof REVIEW_POLICY_RUNTIMES)[number]; export type ReviewPolicyMode = (typeof REVIEW_POLICY_MODES)[number]; export type ReviewPolicyRunnerType = (typeof REVIEW_POLICY_RUNNER_TYPES)[number]; export type ReviewFindingSourcePhase = (typeof REVIEW_FINDING_SOURCE_PHASES)[number]; export type ReviewFindingCategory = (typeof REVIEW_FINDING_CATEGORIES)[number]; export type ReviewFindingSeverity = (typeof REVIEW_FINDING_SEVERITIES)[number]; export type AdvisoryHoldFindingSeverity = (typeof ADVISORY_HOLD_FINDING_SEVERITIES)[number]; export type BlockingFindingSeverity = (typeof BLOCKING_FINDING_SEVERITIES)[number]; export type ReviewFindingConfidence = (typeof REVIEW_FINDING_CONFIDENCES)[number]; /** True when a finding severity pauses publish until the user acknowledges with "Publish anyway". */ export declare function isAdvisoryHoldFindingSeverity(severity: string): severity is AdvisoryHoldFindingSeverity; /** True when a finding severity hard-blocks publish under blocking-mode policy gates. */ export declare function isBlockingFindingSeverity(severity: string): severity is BlockingFindingSeverity; export type ReviewFindingSuppressionStatus = (typeof REVIEW_FINDING_SUPPRESSION_STATUSES)[number]; export type ReviewRunStatus = (typeof REVIEW_RUN_STATUSES)[number]; export type ReviewRunDecision = (typeof REVIEW_RUN_DECISIONS)[number]; export type ReviewRunTriggeredBy = (typeof REVIEW_RUN_TRIGGERED_BYS)[number]; export type ReviewPolicyScopeType = 'all_apps' | 'limited'; export type ReviewPolicyScopeDto = { type: 'all_apps'; } | { type: 'limited'; applicationIds: string[]; }; export type ReviewPolicyScopeInput = { type: 'all_apps'; } | { type: 'limited'; applicationIds: string[]; }; export interface ReviewPolicyLastRunDto { id: string; status: ReviewRunStatus; created: string; findingsCount: number; } export declare const REVIEW_POLICY_STAGES: readonly ["development", "publish", "production"]; export type ReviewPolicyStage = (typeof REVIEW_POLICY_STAGES)[number]; export declare const REVIEW_POLICY_DOMAINS: readonly ["security"]; export type ReviewPolicyDomain = (typeof REVIEW_POLICY_DOMAINS)[number]; /** * Maps a concrete policy type onto its product domain. Every type today is * security; add branches (and REVIEW_POLICY_DOMAINS values) when non-security * policies ship. Do not invent UI-only domain labels. */ export declare function reviewPolicyDomainForType(_policyType: ReviewPolicyType): ReviewPolicyDomain; export interface ReviewPolicyDto { id: string; organizationId: string; aiAgentId: string; activeVersionId: string; versionNumber: number; policyType: ReviewPolicyType; source: ReviewPolicySource; name: string; status: AiAgentStatus; mode: ReviewPolicyMode; scope: ReviewPolicyScopeDto; stage: ReviewPolicyStage; domain: ReviewPolicyDomain; lastRun: ReviewPolicyLastRunDto | null; freshPendingApprovalRunCount: number; createdBy: string | null; created: string; } export interface ReviewPolicyDetailDto extends ReviewPolicyDto { prompt: string; } export interface ReviewPolicyRunDto { id: string; applicationId: string; applicationName: string | null; applicationCommitId: string; applicationCommitMessage: string | null; policyId: string; policyName: string; policyVersionNumber: number; findingsCount: number; profileId: string; status: ReviewRunStatus; decision: ReviewRunDecision | null; decisionReason: string | null; hasFreshPendingApproval: boolean; triggeredBy: ReviewRunTriggeredBy | null; triggeringUserName: string | null; startedAt: string | null; completedAt: string | null; created: string; errorCode: string | null; errorMessage: string | null; } export interface ReviewFindingDto { id: string; sourceTool: string; sourceRuleId: string | null; sourcePolicyId: string | null; sourcePhase: ReviewFindingSourcePhase | null; category: ReviewFindingCategory; findingType: string | null; severity: ReviewFindingSeverity; confidence: ReviewFindingConfidence | null; blocking: boolean; blockingReason: string | null; title: string; humanSummary: string | null; technicalSummary: string | null; evidence: Record; locations: unknown[]; remediationHint: Record; clarkRemediable: boolean; adminOnly: boolean; created: string; } export interface ReviewPolicyRunFindingAggregatesDto { blockingCount: number; nonBlockingCount: number; severityCounts: Partial>; } export interface ReviewPolicyRunReportDto { aggregates: ReviewPolicyRunFindingAggregatesDto; findings: Pagination; policy: ReviewPolicyDto; run: ReviewPolicyRunDto; } export interface ApplicationPolicyRunFindingsDto { findings: Pagination; } export declare const REVIEW_POLICY_RUN_FINDING_ORDERS: readonly ["asc", "desc"]; export type ReviewPolicyRunFindingOrder = (typeof REVIEW_POLICY_RUN_FINDING_ORDERS)[number]; export declare const DEFAULT_REVIEW_POLICY_RUN_FINDING_ORDER: ReviewPolicyRunFindingOrder; export declare const DEFAULT_REVIEW_POLICY_RUN_FINDINGS_LIMIT = 50; export declare const MAX_REVIEW_POLICY_RUN_FINDINGS_LIMIT = 100; export declare const REVIEW_POLICY_RUN_SORTS: readonly ["applicationName", "findingsCount", "startedAt", "status"]; export type ReviewPolicyRunSort = (typeof REVIEW_POLICY_RUN_SORTS)[number]; export declare const DEFAULT_REVIEW_POLICY_RUN_SORT: ReviewPolicyRunSort; export declare const REVIEW_POLICY_RUN_ORDERS: readonly ["asc", "desc"]; export type ReviewPolicyRunOrder = (typeof REVIEW_POLICY_RUN_ORDERS)[number]; export declare const DEFAULT_REVIEW_POLICY_RUN_ORDER: ReviewPolicyRunOrder; export declare const DEFAULT_REVIEW_POLICY_RUNS_LIMIT = 20; export declare const MAX_REVIEW_POLICY_RUNS_LIMIT = 100; export type ReviewPolicyRunsDto = Pagination; export declare const REVIEW_POLICY_SUMMARY_WINDOWS: readonly ["24h", "7d", "30d"]; export type ReviewPolicySummaryWindow = (typeof REVIEW_POLICY_SUMMARY_WINDOWS)[number]; export declare const DEFAULT_REVIEW_POLICY_SUMMARY_WINDOW: ReviewPolicySummaryWindow; export interface ReviewPolicySummaryDto { activePolicies: number; totalRuns: number; findings: number; passRate: number; window: ReviewPolicySummaryWindow; } export type CreateReviewPolicyBody = { policyType: 'built_in_security_scan'; mode?: ReviewPolicyMode; scope?: ReviewPolicyScopeInput; } | { policyType: 'security_agent'; source: 'superblocks_managed'; mode?: ReviewPolicyMode; scope?: ReviewPolicyScopeInput; } | { policyType: 'security_agent'; mode: ReviewPolicyMode; name: string; prompt: string; scope?: ReviewPolicyScopeInput; }; export type UpdateReviewPolicyBody = { status: AiAgentStatus; }; export type UpdateReviewPolicyConfigBody = { activeVersionId: string; policyType: 'built_in_security_scan'; mode: ReviewPolicyMode; scope?: ReviewPolicyScopeInput; } | { activeVersionId: string; policyType: 'security_agent'; source: 'superblocks_managed'; mode: ReviewPolicyMode; scope?: ReviewPolicyScopeInput; } | { activeVersionId: string; policyType: 'security_agent'; mode: ReviewPolicyMode; name: string; prompt: string; scope?: ReviewPolicyScopeInput; }; //# sourceMappingURL=index.d.ts.map