import type { TwinStream } from '../twin-fetch.js'; import { type LiveReads } from './access.js'; import type { LiveDecl, LiveEngine, LivePublish } from './types.js'; /** What the ingest reads and writes of the World, bound by the pack's fetch to its service and root. */ export type LiveWorld = LiveReads & { /** a bookkeeping subject written (or, with `deleted: true`, deleted) at the World's time */ record(type: string, id: string, fields: Record, operation: string): Promise; putBlob(key: string, bytes: Uint8Array): Promise; removeBlob(key: string): Promise; now(): string; }; export type LiveIngestOptions = { /** the World this ingest's recordings are kept in (its service and root): one publisher per stream within it */ world: string; decls: ReadonlyArray; engines: Record>; readOnly: boolean; /** the handler contract's context a hook runs over, opened at the moment it runs */ open(decl: LiveDecl, ask: LivePublish): Promise; /** runs a hook and the writes it causes as the vendor's own move, one correlation */ run(fn: () => Promise): Promise; store: LiveWorld; log?(line: string): void; }; export declare function liveIngest(options: LiveIngestOptions): TwinStream;