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

    Function generateComplianceSummary

    • Generate a compliance summary for a session.

      Checks:

      1. Session has lifecycle:session_created event
      2. Session reached COMPLETE phase (or was explicitly aborted)
      3. No unresolved errors
      4. Human review gates were honored (PLAN_REVIEW, EVIDENCE_REVIEW)
      5. Validation phase was executed
      6. Chain integrity (if verification provided)

      Parameters

      • events: Readonly<
            {
                id: string;
                sessionId: string;
                phase: string;
                event: string;
                timestamp: string;
                actor: string;
                detail: Record<string, unknown>;
                actorInfo?: Readonly<
                    {
                        id: string;
                        email: string
                        | null;
                        displayName?: string | null;
                        source: "unknown" | "env" | "git" | "claim" | "oidc";
                        assurance: "best_effort" | "claim_validated" | "idp_verified";
                        verificationMeta?: Readonly<
                            {
                                issuer: string;
                                audience: string[];
                                keyId: string;
                                algorithm: string;
                                verifiedAt: string;
                            },
                        >;
                    },
                >;
                prevHash?: string;
                chainHash?: string;
            },
        >[]

        All audit events (multi-session OK).

      • sessionId: string

        The session to check.

      • chainVerification: ChainVerification | null

        Optional chain verification result.

      • now: string

        Current timestamp for the report.

      Returns ComplianceSummary