/** * Exact host/OS evidence gating for workspace sandbox claims. * * A host version string or a static feature flag is not evidence. Sandboxed * execution is enabled only when every field of the running target matches an * approved, checked-in probe result. Missing and stale cells fail closed. */ export declare const HOST_PROBE_HOSTS: readonly ["pi", "codex", "claude", "opencode", "grok", "hermes"]; export type HostProbeHost = (typeof HOST_PROBE_HOSTS)[number]; export declare const HOST_PROBE_OSES: readonly ["macos", "linux", "windows"]; export type HostProbeOs = (typeof HOST_PROBE_OSES)[number]; export declare const HOST_PROBE_VERSION = "tfws-probe:v1"; export type HostProbeClassification = "sandboxed-single-root" | "sandboxed-multi-root" | "resolve-only" | "unsupported"; export interface HostProbeTarget { host: HostProbeHost; hostVersion: string; hostBinarySha256: string; os: HostProbeOs; osVersion: string; osBuild: string; arch: "arm64" | "x64"; sandboxMechanismVersion: string; backendId: string; backendCapabilityVersion: string; backendCapabilitiesSha256: string; baselinePolicyId: string; } export interface HostProbeDecision { owner: string; status: "approved" | "rejected"; reason: string; } export interface HostProbeEvidence { /** Repository-relative, redacted raw probe result. */ path: string; sha256: string; } export interface HostSupportCell { target: HostProbeTarget; classification: HostProbeClassification; agent: HostProbeEvidence; script: HostProbeEvidence; fileBroker: HostProbeEvidence; decision: HostProbeDecision; } export interface HostSupportBaseline { schemaVersion: 1; baselineId: string; cells: HostSupportCell[]; } export declare const PROCESS_SANDBOX_EVIDENCE_CHECKS: readonly ["exactCwd", "readInsideReadOnly", "writeInsideReadOnlyDenied", "readInsideReadWrite", "writeInsideReadWrite", "siblingScopeDenied", "outsideScopeDenied", "symlinkEscapeDenied", "ambientUserDataDenied", "privateTempEnforced", "descendantEnforcement", "abortDescendantCleanup", "networkPolicyEnforced", "credentialIsolationEnforced", "baselineRuntimeUsable", "resolverOpenPathSwapDenied", "exactMetadataNoFollow", "unsupportedPolicyFailsClosed"]; export declare const FILE_BROKER_EVIDENCE_CHECKS: readonly ["readInsideReadOnly", "writeInsideReadOnlyDenied", "readInsideReadWrite", "writeInsideReadWrite", "siblingScopeDenied", "outsideScopeDenied", "symlinkEscapeDenied", "brokeredReadNoFollow", "brokeredWriteNoFollow", "fingerprintNoFollow", "resolverOpenPathSwapDenied", "abortCleanup", "exactMetadataNoFollow", "unsupportedPolicyFailsClosed"]; export type ProcessSandboxEvidenceCheck = (typeof PROCESS_SANDBOX_EVIDENCE_CHECKS)[number]; export type FileBrokerEvidenceCheck = (typeof FILE_BROKER_EVIDENCE_CHECKS)[number]; export interface HostProbeSuiteEvidence { pass: boolean; checks: Record; } export interface HostProbeResult { target: HostProbeTarget; classification: HostProbeClassification; agent: HostProbeSuiteEvidence; script: HostProbeSuiteEvidence; fileBroker: HostProbeSuiteEvidence; } export interface HostProbeEvidenceBundle { schemaVersion: 1; probeVersion: string; results: HostProbeResult[]; } declare const VERIFIED_HOST_SUPPORT_BASELINE: unique symbol; declare const VERIFIED_SANDBOX_HOST_APPROVAL: unique symbol; export interface VerifiedHostSupportBaseline extends HostSupportBaseline { readonly [VERIFIED_HOST_SUPPORT_BASELINE]: true; } /** Process-local authorization minted only for an exact approved evidence cell. */ export interface VerifiedSandboxHostApproval { readonly [VERIFIED_SANDBOX_HOST_APPROVAL]: true; readonly baselineId: string; readonly target: HostProbeTarget; readonly classification: "sandboxed-single-root" | "sandboxed-multi-root"; } export interface HostSupportBaselineLoadOptions { repositoryRoot: string; /** Repository-relative baseline path. */ baselinePath?: string; maxEvidenceBytes?: number; } export type HostSupportMatch = { ok: true; cell: HostSupportCell; approval: VerifiedSandboxHostApproval; } | { ok: false; reason: string; }; export declare function hostProbeTargetsEqual(left: HostProbeTarget, right: HostProbeTarget): boolean; export declare function isExactHostProbeTarget(value: unknown): value is HostProbeTarget; /** Validate trusted baseline data before it can authorize a sandbox claim. */ export declare function validateHostSupportBaseline(value: unknown): string[]; /** Load and verify the checked-in finite allowlist plus every evidence body it * relies on. Matcher authorization accepts only the process-local branded * snapshot returned here; shape-correct caller data is never authority. */ export declare function loadVerifiedHostSupportBaseline(options: HostSupportBaselineLoadOptions): VerifiedHostSupportBaseline; /** * Match a live target against the finite approved evidence set. * * Only a sandboxed classification with an approved owner decision is a match. * Resolve-only/unsupported cells remain useful audit evidence but never enable * a sandboxed bridge. */ export declare function matchSandboxedHostTarget(baseline: HostSupportBaseline, target: HostProbeTarget): HostSupportMatch; /** Shape-correct, cloned, or deserialized approval objects are not authority. */ export declare function isVerifiedSandboxHostApproval(value: unknown): value is VerifiedSandboxHostApproval; export {}; //# sourceMappingURL=baseline.d.ts.map