agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
23 lines (22 loc) • 923 B
TypeScript
/**
* writeBeats — persist extracted beats to the memory store.
*
* Reads from scope: `newBeats`, `identity`
* Writes to store: one MemoryEntry<NarrativeBeat> per beat via `putMany`
*
* Parallels `writeMessages` — same shape, but the payload is beats
* rather than raw messages. Uses `store.putMany` so N beats from a
* single turn become 1 round-trip on network-backed adapters
* (Redis / DynamoDB / Postgres).
*/
import type { TypedScope } from 'footprintjs';
import type { MemoryStore } from '../store/index.js';
import type { ExtractBeatsState } from './extractBeats.js';
export interface WriteBeatsConfig {
/** The store to persist to. Typically the same store as the pipeline's read side. */
readonly store: MemoryStore;
}
/**
* Build the `writeBeats` stage function.
*/
export declare function writeBeats(config: WriteBeatsConfig): (scope: TypedScope<ExtractBeatsState>) => Promise<void>;