Prometheus Entity Management API
    Preparing search index...

    Options for createHtmxSseServer.

    interface HtmxSseServerOptions {
        autoRender?: boolean;
        heartbeatIntervalMs?: number;
        ir: EntityGraphIR;
        mutationHandler?: (
            req: IncomingMessage,
            res: ServerResponse,
            pathname: string,
            body: string,
        ) => boolean | Promise<boolean>;
        renderers?: Record<string, FragmentRenderer<Record<string, unknown>>>;
        swapStrategy?: string;
    }
    Index
    autoRender?: boolean

    When true (default), entity types without a registered renderer get an automatic <dl> field-list fragment. Set to false for strict mode.

    heartbeatIntervalMs?: number

    How long (ms) before the SSE connection is considered dead and the client is removed. Defaults to 30 000 (30 s). Set to 0 to disable.

    Parsed SDL IR describing the entity schema. Use parseSdl / parseSdlJson from @prometheus-ags/entity-graph-sdl.

    mutationHandler?: (
        req: IncomingMessage,
        res: ServerResponse,
        pathname: string,
        body: string,
    ) => boolean | Promise<boolean>

    Optional request handler for HTMX-triggered mutations (POST/PATCH/DELETE). Called before the built-in fallback (404). Return true if your handler handled the request, false to fall through.

    renderers?: Record<string, FragmentRenderer<Record<string, unknown>>>

    Fragment renderers keyed by entity type name (case-sensitive, matches SDL). At least one renderer must be registered; unknown types fall back to a JSON-in-pre auto-renderer when autoRender is true.

    swapStrategy?: string

    HTMX OOB swap strategy used in the morph event payload. Defaults to "morph" (idiomorph). Pass "outerHTML" for plain swap.