@bitsinfra/fusee
    Preparing search index...

    Interface InvocationHandlerOptions

    interface InvocationHandlerOptions {
        address: string;
        archiveHistory?: boolean;
        checkpointInterval?: Duration;
        codec?: Codec;
        dir?: string;
        driver?: "native" | "macrotask";
        flush?: "fullfsync" | "fsync" | "fdatasync" | "dsync";
        http?: string;
        inlineFlush?: boolean;
        keepHistory?: boolean;
        onExhausted?: "fail" | "pause";
        parkAfter?: Duration;
        peers?: string[];
        profile?: "dev" | "production";
        recordStacks?: boolean;
        register: (engine: Engine) => void | Promise<void>;
        replicaId?: number;
        replicaMetrics?: ReplicaMetrics;
        retention?: Duration;
        secret?: string | Uint8Array<ArrayBufferLike>;
        segmentBytes?: number;
        serializer?: Serializer;
        shards?: number;
        telemetry?: Telemetry;
        workflows?: readonly WorkflowDefinition<any, any>[];
    }

    Hierarchy

    • Omit<OpenOptions, "durability" | "address" | "workers" | "module">
      • InvocationHandlerOptions
    Index
    address: string

    The server, with this worker's connection options: host:port?ca=...&token-file=....

    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.

    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).

    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).

    register: (engine: Engine) => void | Promise<void>

    Registers the workflows on each invocation's fresh engine.

    replicaId?: number

    Member index in peers for replicated mode.

    replicaMetrics?: ReplicaMetrics
    retention?: Duration
    secret?: string | Uint8Array<ArrayBufferLike>

    The endpoint's signing secret (the server's --invoke-secret-file). Leave it out only behind mutual TLS or on a network only the server reaches.

    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")).

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

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