import { type Operation } from "effection"; import { type CesrParser } from "../../../cesr/mod.js"; import type { AgentCue } from "../core/cues.js"; import { Deck } from "../core/deck.js"; import { Kevery } from "../core/eventing.js"; import { BasicReplyRouteHandler, Revery, Router } from "../core/routing.js"; import { Exchanger } from "./exchanging.js"; import type { Habery } from "./habbing.js"; import { type TeveryLike, type VerifierLike } from "./parsering.js"; /** * Shared message-routing component for one `Habery`. * * KERIpy correspondence: * - this is the nearest local correlate to the reactor/doer bundle that owns * parser ingress, `Revery`, `Kevery`, and the reply router * * Ownership model: * - `Reactor` owns transient ingress bytes plus the parser and dispatch seams * - the shared cue deck is injected so higher-level hosts can preserve the * KERIpy shared-cues mental model * - durable event/reply state still lives in the `Habery` database, not in * this component */ export declare class Reactor { readonly hby: Habery; readonly cues: Deck; readonly ingress: Deck; readonly router: Router; readonly revery: Revery; readonly replyRoutes: BasicReplyRouteHandler; readonly kevery: Kevery; readonly exchanger: Exchanger; readonly parser: CesrParser; readonly local: boolean; readonly vdr: VdrRuntimeServices; constructor(hby: Habery, { cues, local, vdr, }?: { cues?: Deck; local?: boolean; vdr?: VdrRuntimeServices; }); /** * Queue one CESR/KERI message byte sequence for later parsing. * * This is the transient ingress seam used by both local synthetic messages * and remotely fetched OOBI artifacts. */ ingest(bytes: Uint8Array): void; /** * Parse and dispatch one already-collected CESR/KERI byte chunk immediately. * * This keeps the parser lifecycle owned by `Reactor` while letting higher * level hosts choose whether one ingress source should be treated as local or * remote without creating a second parser/router stack. */ processChunk(chunk: Uint8Array, { local }?: { local?: boolean; }): void; /** * Parse and dispatch one complete CESR/KERI record. * * Mailbox SSE entries are delivered as bounded records rather than an * open-ended stream. A fresh parser plus terminal flush lets body-only * records emit without waiting for a later chunk while keeping the shared * streaming parser untouched for long-lived ingress. */ processCompleteChunk(chunk: Uint8Array, { local }?: { local?: boolean; }): void; private dispatchParsedFrames; /** * Drain one bounded message-processing pass. * * This mirrors the KERIpy pattern where a doer owns the long-lived loop but * delegates the actual work to a plain drain helper. */ processOnce(): void; /** * Run one bounded escrow-processing pass. * * Current scope: * - KEL escrows through `Kevery.processEscrows()` * - reply escrows through `Revery.processEscrowReply()` */ processEscrowsOnce(): void; /** * Continuous message doer for command hosts that keep the runtime alive. * * This is the Effection equivalent of a KERIpy `msgDo`: drain ingress, yield * to the scheduler, and repeat indefinitely. */ msgDo(): Operation; /** * Continuous escrow doer for the long-lived runtime host. * * KERIpy correspondence: * - mirrors the dedicated `escrowDo` loop rather than folding escrow * processing into parser ingress */ escrowDo(): Operation; } /** Registry DB owner seam; Phase 3 supplies the concrete `Reger`. */ export type RegerRuntimeService = object; /** TEL state processor seam; Phase 5 supplies the concrete `Tevery`. */ export type TeveryRuntimeService = TeveryLike; /** Credential verifier seam; Phase 4/10 supplies the concrete verifier. */ export type VerifierRuntimeService = VerifierLike; /** Registry operation seam; Phase 6 supplies the concrete `Regery`. */ export type RegeryRuntimeService = object; /** VDR services accepted by `Reactor` and the shared `AgentRuntime`. */ export interface VdrRuntimeServices { reger?: RegerRuntimeService | null; tvy?: TeveryRuntimeService | null; vry?: VerifierRuntimeService | null; rgy?: RegeryRuntimeService | null; } //# sourceMappingURL=reactor.d.ts.map