IFClite TypeScript API
    Preparing search index...

    Interface FlowHost

    interface FlowHost {
        ai?: FlowAiService;
        automation?: SessionAutomationHost;
        bcfWrites?: BcfWriteGateway;
        bim: BimContext;
        defaultModelId?: string;
        grants?: readonly Capability[];
        networkGrants?: readonly Capability[];
        networkTransport?: FetchTransport;
        review?: {
            snapshot(
                request: {
                    maxFindings?: unknown;
                    modelIds?: unknown;
                    savedAnalysisRuns?: unknown;
                    savedValidationReports?: unknown;
                    sources?: unknown;
                },
            ): | Promise<
                {
                    bounds: {
                        clippedTextFields: number;
                        knownFindings: number
                        | null;
                        knownFindingsScope: "retained-current-contexts";
                        nativeCoverageComplete: boolean;
                        omittedFindings: number | null;
                        presentationComplete: boolean;
                        rowLimit: number;
                        textLimit: number;
                    };
                    cards: CoordinationCard<ReviewMessage>[];
                    coverage: {
                        runId: string;
                        specifications: ReviewSpecificationCoverage[];
                    }[];
                    findings: ReviewFinding<ReviewMessage>[];
                    latestAttempt:
                        | {
                            proof: ReviewRunProvenance
                            | null;
                            refusal?:
                                | "capture-bound"
                                | "aborted"
                                | "source-unavailable"
                                | "work-bound"
                                | "target-changed"
                                | "scope"
                                | "sensitive-input"
                                | "producer-pending"
                                | "producer-failed";
                            state: | "failed"
                            | "refused"
                            | "pending"
                            | "succeeded"
                            | "aborted"
                            | "superseded";
                        }
                        | null;
                    provenance: ReviewRunProvenance[];
                    retention: | {
                        captureRefusal: "capture-bound"
                        | null;
                        inventoryOmitted: boolean;
                        limit: number;
                        omittedHistoricalRuns: null;
                        policy: "latest-successful-native-context";
                    }
                    | null;
                    runs: FindingRun<ReviewMessage>[];
                    sources: {
                        refusal?:
                            | "capture-bound"
                            | "aborted"
                            | "source-unavailable"
                            | "work-bound"
                            | "target-changed"
                            | "scope"
                            | "sensitive-input"
                            | "producer-pending"
                            | "producer-failed";
                        source: FindingSourceKind;
                        state: string;
                    }[];
                    totals: ReviewTotals;
                },
            >
            | Promise<
                | {
                    bindings: {
                        format: string;
                        id: string;
                        refusal: string
                        | null;
                        state: string;
                    }[];
                    bounds: {
                        clippedTextFields: number;
                        knownFindings: number
                        | null;
                        knownFindingsScope: "supplied-historical-records";
                        nativeCoverageComplete: boolean;
                        omittedFindings: number | null;
                        presentationComplete: boolean;
                        rowLimit: number;
                        textLimit: number;
                    };
                    cards: CoordinationCard<ReviewMessage>[];
                    coverage: never[];
                    findings: ReviewFinding<ReviewMessage>[];
                    latestAttempt: null;
                    origin: "imported";
                    provenance: never[];
                    records: {
                        format: string;
                        value: SavedValidationReport | SavedAnalysisRun;
                    }[];
                    retention: null;
                    runs: FindingRun<ReviewMessage>[];
                    sources: { refusal: string; source: FindingSourceKind; state: string }[];
                    totals: ReviewTotals;
                }
                | {
                    bindings: {
                        format: string;
                        id: string;
                        refusal: string
                        | null;
                        state: string;
                    }[];
                    bounds: {
                        clippedTextFields: number;
                        knownFindings: number
                        | null;
                        knownFindingsScope: "supplied-historical-records";
                        nativeCoverageComplete: boolean;
                        omittedFindings: number | null;
                        presentationComplete: boolean;
                        rowLimit: number;
                        textLimit: number;
                    };
                    cards: CoordinationCard<ReviewMessage>[];
                    coverage: never[];
                    findings: ReviewFinding<ReviewMessage>[];
                    latestAttempt: null;
                    origin: "imported";
                    provenance: never[];
                    records: (
                        | { format: string; value: SavedAnalysisRun }
                        | { format: string; value: SavedValidationReport }
                    )[];
                    retention: null;
                    runs: FindingRun<ReviewMessage>[];
                    sources: { source: FindingSourceKind; state: string }[];
                    totals: ReviewTotals;
                },
            >;
        };
        validationCapture?: {
            abandon(
                token: ReviewCaptureToken | null,
                reason?: "aborted" | "producer-failed",
            ): void;
            begin(
                definition: string,
                signal?: AbortSignal,
            ): Promise<ReviewCaptureToken | null>;
            finish(token: ReviewCaptureToken | null, report: ValidationReport): void;
        };
        idsAccessor?(): IFCDataAccessor;
        openModel?(bytes: Uint8Array, name: string): Promise<{ modelId: string }>;
        tables?(modelId?: string): TableAccess | undefined;
    }
    Index

    The host's AI model service for ai.* nodes (@ifc-lite/flow-nodes/ai). The host owns the provider, credentials, the run's root budget and its receipts; a host that offers it lists the ai backend feature.

    bcfWrites?: BcfWriteGateway

    Durable path for bcf.* writes (see bcf-write-gateway.ts). A host that supplies it records each write's intent and receipt and refuses to resend one with an unknown outcome; without it, writes go straight to the server and an unknown outcome is reported, never retried.

    defaultModelId?: string

    Model to query when a node does not name one.

    grants?: readonly Capability[]

    Capabilities granted to the running graph. undefined means "trusted caller, no gate" (the CLI running a local file); the viewer always passes the grants the user accepted.

    networkGrants?: readonly Capability[]

    The graph's own declared network.ai, network.fetch:<host> and secret.read:<NAME> capabilities — ALWAYS populated by every caller (CLI, MCP, viewer), independent of grants/the trust gate above. Real network access and secret reads are the one place "trusted local caller" does not mean "unrestricted": a request still needs the graph to have written down which host it may reach, so HttpRequest (and bim.network.fetch in the sandbox) always check the actual host against this list rather than relying on grants being undefined to skip the check entirely.

    networkTransport?: FetchTransport

    Transport for http.request; fetch when absent. Only changes how bytes move — the grant check against networkGrants always runs first.

    review?: {
        snapshot(
            request: {
                maxFindings?: unknown;
                modelIds?: unknown;
                savedAnalysisRuns?: unknown;
                savedValidationReports?: unknown;
                sources?: unknown;
            },
        ): | Promise<
            {
                bounds: {
                    clippedTextFields: number;
                    knownFindings: number
                    | null;
                    knownFindingsScope: "retained-current-contexts";
                    nativeCoverageComplete: boolean;
                    omittedFindings: number | null;
                    presentationComplete: boolean;
                    rowLimit: number;
                    textLimit: number;
                };
                cards: CoordinationCard<ReviewMessage>[];
                coverage: {
                    runId: string;
                    specifications: ReviewSpecificationCoverage[];
                }[];
                findings: ReviewFinding<ReviewMessage>[];
                latestAttempt:
                    | {
                        proof: ReviewRunProvenance
                        | null;
                        refusal?:
                            | "capture-bound"
                            | "aborted"
                            | "source-unavailable"
                            | "work-bound"
                            | "target-changed"
                            | "scope"
                            | "sensitive-input"
                            | "producer-pending"
                            | "producer-failed";
                        state: | "failed"
                        | "refused"
                        | "pending"
                        | "succeeded"
                        | "aborted"
                        | "superseded";
                    }
                    | null;
                provenance: ReviewRunProvenance[];
                retention: | {
                    captureRefusal: "capture-bound"
                    | null;
                    inventoryOmitted: boolean;
                    limit: number;
                    omittedHistoricalRuns: null;
                    policy: "latest-successful-native-context";
                }
                | null;
                runs: FindingRun<ReviewMessage>[];
                sources: {
                    refusal?:
                        | "capture-bound"
                        | "aborted"
                        | "source-unavailable"
                        | "work-bound"
                        | "target-changed"
                        | "scope"
                        | "sensitive-input"
                        | "producer-pending"
                        | "producer-failed";
                    source: FindingSourceKind;
                    state: string;
                }[];
                totals: ReviewTotals;
            },
        >
        | Promise<
            | {
                bindings: {
                    format: string;
                    id: string;
                    refusal: string
                    | null;
                    state: string;
                }[];
                bounds: {
                    clippedTextFields: number;
                    knownFindings: number
                    | null;
                    knownFindingsScope: "supplied-historical-records";
                    nativeCoverageComplete: boolean;
                    omittedFindings: number | null;
                    presentationComplete: boolean;
                    rowLimit: number;
                    textLimit: number;
                };
                cards: CoordinationCard<ReviewMessage>[];
                coverage: never[];
                findings: ReviewFinding<ReviewMessage>[];
                latestAttempt: null;
                origin: "imported";
                provenance: never[];
                records: {
                    format: string;
                    value: SavedValidationReport | SavedAnalysisRun;
                }[];
                retention: null;
                runs: FindingRun<ReviewMessage>[];
                sources: { refusal: string; source: FindingSourceKind; state: string }[];
                totals: ReviewTotals;
            }
            | {
                bindings: {
                    format: string;
                    id: string;
                    refusal: string
                    | null;
                    state: string;
                }[];
                bounds: {
                    clippedTextFields: number;
                    knownFindings: number
                    | null;
                    knownFindingsScope: "supplied-historical-records";
                    nativeCoverageComplete: boolean;
                    omittedFindings: number | null;
                    presentationComplete: boolean;
                    rowLimit: number;
                    textLimit: number;
                };
                cards: CoordinationCard<ReviewMessage>[];
                coverage: never[];
                findings: ReviewFinding<ReviewMessage>[];
                latestAttempt: null;
                origin: "imported";
                provenance: never[];
                records: (
                    | { format: string; value: SavedAnalysisRun }
                    | { format: string; value: SavedValidationReport }
                )[];
                retention: null;
                runs: FindingRun<ReviewMessage>[];
                sources: { source: FindingSourceKind; state: string }[];
                totals: ReviewTotals;
            },
        >;
    }

    Actual host-native findings. An absent provider is explicitly unsupported.

    validationCapture?: {
        abandon(
            token: ReviewCaptureToken | null,
            reason?: "aborted" | "producer-failed",
        ): void;
        begin(
            definition: string,
            signal?: AbortSignal,
        ): Promise<ReviewCaptureToken | null>;
        finish(token: ReviewCaptureToken | null, report: ValidationReport): void;
    }

    Producer-start provenance capture; optional so existing hosts retain their IDS behavior.

    • An @ifc-lite/ids IFCDataAccessor over the active model, for ids.validate. Hosts that hold the parsed store (CLI, MCP) offer it; without it ids.validate fails with a clear message.

      Returns IFCDataAccessor

    • Open bytes (an IFC file named name) as a model through the host's own load path, resolving to the id the loaded model answers to in bim. Backs model.openFromSource; a host that can do this lists the openModel backend feature. The viewer adds the model to the federation; a headless host (one model per BimContext) makes it the model bim and defaultModelId answer for from then on.

      Parameters

      • bytes: Uint8Array
      • name: string

      Returns Promise<{ modelId: string }>

    • See TableAccess. modelId defaults to defaultModelId.

      Parameters

      • OptionalmodelId: string

      Returns TableAccess | undefined