/** * Pure builders for the signal-intake boundary's event-log events — the pre-decision acceptance fact * at the process edge (did a scanner's POSTed signal get in, and why not), distinct from the * post-decision `signal.outcome`. {@link buildSignalDispositionEvent} maps a per-signal disposition * (accepted/rejected/expired/superseded) onto the `signal.*` family; {@link buildSignalRejectedEvent} * covers a whole-request reject (unknown scanner, oversized batch) at request grain; and * {@link buildScaffoldErrorEvent} maps a scaffold `/errors` POST onto `scaffold.tick_error` / * `scaffold.tick_timeout`. * * Pure `(input) => EmittableEvent`; the route emits the result through `emitEvent`'s guard, so a * throwing build or a telemetry failure can never disturb request handling. Free-text — a reject * reason, a scaffold exception message — rides the `redact` slot, never an attribute. */ import { EVENT_NAME } from "../../utils/event-catalog.js"; import type { EmittableEvent } from "../../actions/event-derivation.js"; import type { PerSignalStatus } from "./types.js"; /** The four per-signal disposition catalog names this bridge emits. */ type SignalDispositionName = typeof EVENT_NAME.signalAccepted | typeof EVENT_NAME.signalRejected | typeof EVENT_NAME.signalExpired | typeof EVENT_NAME.signalSuperseded; /** The scanner identity the route pins onto every intake event. */ export interface IntakeEventContext { /** The `scanner_id` from the POST body — present even when it resolves to no registry entry. */ scannerId: string; /** The resolved scanner name; absent when the id is unknown. */ scannerName?: string; /** Strategy wallet from the registry entry; omitted/empty → not stamped. */ wallet?: string; } /** Map one per-signal disposition to its `signal.*` event-log record. */ export declare function buildSignalDispositionEvent(status: PerSignalStatus, asset: string, ctx: IntakeEventContext, tickId?: string): EmittableEvent; /** * Build the request-level `signal.rejected` event — the whole POST was refused before any per-signal * work (an unknown `scanner_id` or an oversized batch), so it carries a coded reason and no asset. */ export declare function buildSignalRejectedEvent(reasonCode: string, ctx: IntakeEventContext): EmittableEvent; /** The scanner-side failure types the scaffold POSTs to `/errors` (see the scaffold tick loop). */ type ScaffoldErrorName = typeof EVENT_NAME.scaffoldTickError | typeof EVENT_NAME.scaffoldTickTimeout; /** * Map one scaffold `/errors` POST onto its `scaffold.*` event (both `warn`). A `type: "timeout"` body * is a tick that blew its wall-clock budget; anything else (a Python exception, `state_persist_failed`, * or `mcp_error` — every MCP call failed and scan() produced nothing, `error_type` = the dominant * class) is a `tick_error` whose failure class rides `senpi.scaffold.error_type`. The raw message * rides `redact`. */ export declare function buildScaffoldErrorEvent(error: Record, ctx: IntakeEventContext): EmittableEvent; export {}; //# sourceMappingURL=intake-events.d.ts.map