FlowGuard API - v1.2.0-rc.2
    Preparing search index...

    Function verifyArchive

    • Verify an archived session's integrity.

      Checks:

      1. Archive manifest exists and is valid
      2. All files listed in manifest exist in session dir
      3. No unexpected files in session dir (not in manifest)
      4. File digests match
      5. Content digest matches
      6. Archive .sha256 sidecar matches (if available)
      7. Discovery snapshots present (if state has discoveryDigest)
      8. Session state file present
      9. Audit chain integrity (strict in regulated mode, legacy-tolerant otherwise)

      Parameters

      • fingerprint: string

        Workspace fingerprint.

      • sessionId: string

        Session ID to verify.

      Returns Promise<
          {
              passed: boolean;
              findings: {
                  code: | "missing_manifest"
                  | "manifest_parse_error"
                  | "missing_file"
                  | "unexpected_file"
                  | "file_digest_mismatch"
                  | "content_digest_mismatch"
                  | "archive_checksum_missing"
                  | "archive_checksum_mismatch"
                  | "audit_chain_invalid"
                  | "snapshot_missing"
                  | "state_missing";
                  severity: "error"
                  | "info"
                  | "warning";
                  message: string;
                  file?: string;
              }[];
              manifest: | {
                  schemaVersion: "archive-manifest.v1";
                  createdAt: string;
                  sessionId: string;
                  fingerprint: string;
                  policyMode: string;
                  profileId: string;
                  discoveryDigest: string
                  | null;
                  includedFiles: string[];
                  fileDigests: Record<string, string>;
                  contentDigest: string;
                  redactionMode?: "none" | "basic" | "strict";
                  rawIncluded?: boolean;
                  redactedArtifacts?: string[];
                  excludedFiles?: string[];
                  riskFlags?: string[];
              }
              | null;
              verifiedAt: string;
          },
      >

      Structured verification result with findings.