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

    Module flowguard

    FlowGuard API

    Deterministic, fail-closed workflow engine for AI-assisted software delivery within OpenCode. FlowGuard enforces governed development workflows with hash-chained audit trails, policy-bound decision enforcement, and evidence-first compliance.

    Entry Point Purpose
    @flowguard/core Types, config, policy, audit, archive — the core API
    @flowguard/core/integration OpenCode tool definitions + audit plugin
    @flowguard/core/integration/tools Individual tool definitions
    import { executeTicket, FlowGuardPolicy, REGULATED_POLICY } from '@flowguard/core';
    
    • solo — automatic approval, no human gates
    • team — human-gated at review points
    • team-ci — CI auto-approve, degrades to team without CI context
    • regulated — mandatory four-eyes, evidence completeness enforcement

    Fail-closed: ambiguity blocks, never guesses. Deterministic: same state + input = same result. Evidence-first: every phase produces verifiable artifacts. Policy-bound: every decision traced to a policy version.

    Public API for the FlowGuard runtime package.

    This barrel exports the stable public surface. Internal modules (adapters, individual collectors, machine topology, rail executors) are available via direct imports for tests and internal tooling.

    Consumer entry points:

    • @flowguard/core — this file (types, config, audit, archive)
    • @flowguard/core/integration — OpenCode tool definitions + audit plugin

    v2

    Classes

    PolicyConfigurationError
    ProfileRegistry
    BlockedReasonRegistry

    Interfaces

    EvidenceSlotStatus
    FourEyesStatus
    CompletenessSummary
    CompletenessReport
    EventVerification
    ChainVerification
    TimelineEntry
    SessionTimeline
    ComplianceCheck
    ComplianceSummary
    TransitionDetail
    ToolCallDetail
    ErrorDetail
    LifecycleDetail
    ChainedAuditEvent
    AuditPolicy
    FlowGuardPolicy
    RepoSignals
    ProfileDetectionInput
    FlowGuardProfile
    BlockedReason
    FormattedBlock
    FlowGuardLogger
    LogEntry
    NextAction
    TransitionRecord
    RailOk
    RailBlocked
    RailContext
    IterationResult

    Type Aliases

    ArchiveFindingCode
    ArchiveFindingSeverity
    ArchiveFinding
    ArchiveManifest
    ArchiveVerification
    AuditFilter
    AuditEventKind
    TypedDetail
    FlowGuardConfig
    LogLevel
    BlockedCategory
    LogSink
    Command
    EvalResult
    RailResult
    ConvergenceResult
    ArchitectureDecision
    ArchitectureDecision
    BindingInfo
    BindingInfo
    ErrorInfo
    ErrorInfo
    ActorInfo
    ImplEvidence
    ImplEvidence
    ImplReviewResult
    ImplReviewResult
    PlanEvidence
    PlanEvidence
    PlanRecord
    PlanRecord
    SelfReviewLoop
    SelfReviewLoop
    PolicySnapshot
    CheckId
    CheckId
    RevisionDelta
    RevisionDelta
    LoopVerdict
    LoopVerdict
    AdrStatus
    AdrStatus
    ReviewDecision
    ReviewDecision
    TicketEvidence
    TicketEvidence
    ValidationResult
    ValidationResult
    Phase
    Event
    Transition
    SessionState

    Variables

    ARCHIVE_MANIFEST_SCHEMA_VERSION
    ArchiveFindingCodeSchema
    ArchiveFindingSchema
    ArchiveManifestSchema
    ArchiveVerificationSchema
    GENESIS_HASH
    FlowGuardConfigSchema
    DEFAULT_CONFIG
    SOLO_POLICY
    TEAM_POLICY
    REGULATED_POLICY
    baselineProfile
    javaProfile
    angularProfile
    typescriptProfile
    defaultProfileRegistry
    defaultReasonRegistry
    FlowGuardAuditPlugin
    Command
    ACTION_CODES
    REQUIRED_ADR_SECTIONS
    ActorInfoSchema
    PolicySnapshotSchema
    Phase
    Event
    Transition
    SessionState

    Functions

    verifyArchive
    evaluateCompleteness
    verifyEvent
    verifyChain
    getLastChainHash
    bySession
    byPhase
    byPhases
    byActor
    byKind
    byEvent
    byTimeRange
    byDetail
    allOf
    anyOf
    not
    filterEvents
    sessionEvents
    transitionEvents
    toolCallEvents
    errorEvents
    distinctSessions
    countByKind
    countByPhase
    timeSpan
    generateTimeline
    generateComplianceSummary
    computeChainHash
    createTransitionEvent
    createToolCallEvent
    createErrorEvent
    createLifecycleEvent
    summarizeArgs
    resolvePolicy
    policyModes
    createPolicySnapshot
    blocked
    createLogger
    createNoopLogger
    isCommandAllowed
    evaluate
    resolveNextAction
    validateAdrSections

    References

    status → status
    hydrate → hydrate
    ticket → ticket
    plan → plan
    decision → decision
    implement → implement
    validate → validate
    review → review
    abort_session → abort_session
    archive → archive
    architecture → architecture