import { type Posture } from "../config/posture.js"; import type { CommandSpec, PlanContext, ProbeAction } from "../internals/plan.js"; import { plan } from "../internals/plan.js"; import type { Runner } from "../internals/proc.js"; import type { Check } from "../internals/verify.js"; import { type OrgPolicy } from "../org-policy/schema.js"; import type { Platform } from "../platform/base.js"; import { type TrustDetectorName } from "./detectors.js"; import { type NormalizedTrustFinding, type RawScannerOccurrence, type TrustPolicyDisposition } from "./evidence.js"; import { type PackageTrustSource, type TrustSource } from "./fetch.js"; import type { SkillSpectorImageApproval } from "./images.js"; import { type TrustFileInventory, type TrustInventoryBuildOptions } from "./inventory.js"; import { type SandboxSmokeShape } from "./smoke.js"; export declare const TRUST_SKIP_DIRS: Set; export declare const INCOMING_MCP_CONFIG_FILES: Set; export interface ScanTrustTreeOptions { env?: NodeJS.ProcessEnv; internalScopes?: readonly string[]; platform?: Platform; posture?: Posture; mcpPolicy?: OrgPolicy["mcp"]; requiredDetectors?: readonly TrustDetectorName[]; detectors?: readonly TrustDetectorName[]; precomputedDetectorSarif?: Readonly>>; run?: Runner; sandboxSmokeShape?: SandboxSmokeShape; skillspectorImageApprovals?: readonly SkillSpectorImageApproval[]; progress?: (message: string) => void; inventoryFactory?: (root: string, options?: TrustInventoryBuildOptions) => TrustFileInventory; } export interface TrustScanResult { checks: Check[]; analyzersRun: string[]; /** One row per analyzer emission, before de-duplication or policy. */ rawOccurrences?: RawScannerOccurrence[]; /** AIH's contextual, de-duplicated interpretation of the raw rows. */ normalizedFindings?: NormalizedTrustFinding[]; /** Policy level for each normalized finding; never an install/profile verdict. */ policyDispositions?: TrustPolicyDisposition[]; } type ScannableTrustSource = TrustSource | PackageTrustSource; interface TrustScanPlanOptions { cleanupQuarantine?: boolean; sandboxSmokeShape?: (root: string) => SandboxSmokeShape | undefined; } export declare function collectFilesUnder(root: string, accept: (absolutePath: string) => boolean, skipDirs?: ReadonlySet): string[]; export declare function trustSourceOriginChecks(ctx: PlanContext, source: ScannableTrustSource): Check[]; export declare function scanTrustTree(root: string, options?: ScanTrustTreeOptions): Promise; export declare function scanTrustTreeWithAnalyzers(root: string, options?: ScanTrustTreeOptions): Promise; export declare function scanOptionsFromContext(ctx: PlanContext, base?: ScanTrustTreeOptions): ScanTrustTreeOptions; export declare function trustScanProbes(source: ScannableTrustSource, options?: ScanTrustTreeOptions, ctx?: PlanContext): Promise; export declare function trustScanPlanForSource(ctx: PlanContext, source: ScannableTrustSource, options?: TrustScanPlanOptions): Promise>; export declare const trustScanCommand: CommandSpec; export {};