Member Junction
    Preparing search index...

    PROCESSOR (executor) seam — does the work for a single record and returns its outcome. Concrete processors wrap an Action, an Agent (via Execute Agent), an Infer-&-Write-Back step, or a plain function.

    interface IRecordProcessor {
        DefaultDryRunSampleSize?: number;
        FailRunOnRecordError?: boolean;
        BuildRunSummary?(
            context: ProcessorRunSummaryContext,
        ): { ResultSummary?: unknown; WouldRefuse?: string };
        ComputeBasisHash?(
            record: RecordRef,
            context: RecordProcessorContext,
        ): Promise<string>;
        Preflight?(context: RecordProcessorContext): Promise<void>;
        PrepareOutputMapping?(
            mapping: Record<string, unknown>,
        ): { HasUnmappedWrites?: boolean; OutputMapping?: Record<string, unknown> };
        ProcessBatch?(
            records: RecordRef[],
            context: RecordProcessorContext,
        ): Promise<Map<string, RecordResult> | RecordResult[]>;
        ProcessRecord(
            record: RecordRef,
            context: RecordProcessorContext,
        ): Promise<RecordResult>;
    }

    Implemented by

    Index

    Properties

    DefaultDryRunSampleSize?: number

    Optional default dry-run sample cap for this processor when none is explicitly configured.

    FailRunOnRecordError?: boolean

    When true, a run that completed with one or more failed records ends with status Failed.

    Methods

    • Optional run-level readiness check, called ONCE before the first batch. Throw to refuse the whole run with a clear, actionable message (e.g. "this model needs training") instead of failing every record one by one until the error-rate circuit breaker trips. The run is still recorded (status Failed, the thrown message as its ErrorMessage) so history stays honest, but no record is processed. Processors without a run-level prerequisite simply omit it.

      Parameters

      Returns Promise<void>

    • Optional hook to enrich output mapping configuration and report whether the processor has unmapped writes.

      Parameters

      • mapping: Record<string, unknown>

      Returns { HasUnmappedWrites?: boolean; OutputMapping?: Record<string, unknown> }