@bitsinfra/fusee
    Preparing search index...

    Interface OpenOptions

    interface OpenOptions {
        address?: string;
        archiveHistory?: boolean;
        checkpointInterval?: Duration;
        codec?: Codec;
        dir?: string;
        driver?: "native" | "macrotask";
        durability?: "local" | "memory" | "server" | "replicated";
        flush?: "fullfsync" | "fsync" | "fdatasync" | "dsync";
        http?: string;
        inlineFlush?: boolean;
        keepHistory?: boolean;
        module?: string | URL;
        onExhausted?: "fail" | "pause";
        parkAfter?: Duration;
        peers?: string[];
        profile?: "dev" | "production";
        recordStacks?: boolean;
        replicaId?: number;
        replicaMetrics?: ReplicaMetrics;
        retention?: Duration;
        segmentBytes?: number;
        serializer?: Serializer;
        shards?: number;
        telemetry?: Telemetry;
        workers?: number;
        workflows?: readonly WorkflowDefinition<any, any>[];
    }
    Index
    address?: string

    Server socket, e.g. 127.0.0.1:7600 or unix:/path/to/socket.

    archiveHistory?: boolean

    Archive full journals on disk after hot retention expires.

    checkpointInterval?: Duration
    codec?: Codec

    Payload encryption, e.g. aesGcm({ k1: key }).

    dir?: string
    driver?: "native" | "macrotask"

    "native" (default on Node): a libuv handle runs the engine's turns back to back in one event-loop callback, each entered so that Node drains process.nextTick callbacks and microtasks when it returns, as a macrotask would. "macrotask" (always on Bun): each turn is its own event-loop callback.

    durability?: "local" | "memory" | "server" | "replicated"
    flush?: "fullfsync" | "fsync" | "fdatasync" | "dsync"

    Override the flush call. Default: F_FULLFSYNC on macOS, fdatasync on Linux.

    http?: string

    Serve the HTTP API and UI here once open ("off": never). Under the dev profile the default is FUSEE_HTTP, else 127.0.0.1:7601, else a free port.

    inlineFlush?: boolean

    Flush on the JavaScript thread when nothing else is pending (default true). False sends every flush to the log thread, so the event loop never waits for the disk.

    keepHistory?: boolean

    Keep finished runs' whole journals (audit, inspect, export, reset).

    module?: string | URL

    With workers: the ES module (a path or file URL) each worker imports. Its default export (or register) is called with the worker's engine and registers workflows on it with engine.workflow(name, fn).

    onExhausted?: "fail" | "pause"

    What a step does when its retries run out, for every step whose retry policy does not say: "pause" pauses its run until run.resume(). Default "fail".

    parkAfter?: Duration
    peers?: string[]
    profile?: "dev" | "production"

    "dev" (or FUSEE_PROFILE=dev, which fusee dev sets; never inferred): says so on stderr, keeps every run's history, flushes with fsync rather than F_FULLFSYNC on macOS (a process crash loses nothing; power loss may), and serves the UI.

    recordStacks?: boolean

    Failures record their stack trace (default true).

    replicaId?: number

    Member index in peers for replicated mode.

    replicaMetrics?: ReplicaMetrics
    retention?: Duration
    segmentBytes?: number
    serializer?: Serializer

    How payloads become JSON and back: rich from @bitsinfra/fusee/rich keeps dates, maps, sets and bigints.

    shards?: number
    telemetry?: Telemetry

    OpenTelemetry spans and metrics, e.g. openTelemetry(await import("@opentelemetry/api")).

    workers?: number

    Run workflow code on this many worker threads (local or memory durability). Each worker owns a set of shards (shard s belongs to worker s % workers), loads module to register its own copy of the workflows, and appends to the one shared log; this thread routes each call to the worker that owns the workflow ID's shard. A new directory gets one shard per worker unless shards says otherwise; there are at most as many workers as shards. Values crossing to a worker (query arguments and answers) are copied with the structured clone algorithm.

    workflows?: readonly WorkflowDefinition<any, any>[]

    Workflow definitions this engine runs (workflow(name, fn)).