UNPKG

@mastra/core

Version:
23 lines • 1.21 kB
/** * Removes the model request/history snapshots that agent `step-start`, * `step-finish` and `finish` chunks carry (full prompt, file parts, message * history, cumulative steps). Used for copies of chunks that are fanned out to * other subscribers, which don't need those fields. Only the given chunk is * inspected; callers decide which nested chunks to pass in. Returns the same * reference when nothing was removed. */ export declare function stripModelSnapshots<T>(chunk: T): T; /** * Removes model request/history snapshots from agent chunks before a progress * chunk is published to pubsub. Nested agent chunks arrive wrapped in * `tool-output` / `workflow-step-output` payloads, so only those wrappers are * unwrapped, and only agent-origin chunks are stripped — data a tool writes * itself (`from: 'USER'`) is published as-is. */ export declare function slimProgressChunk<T>(chunk: T, depth?: number): T; /** * Like {@link slimProgressChunk}, but only for the agent chunks nested in a * `tool-output` / `workflow-step-output` chunk; any other chunk is returned as-is. */ export declare function slimNestedAgentChunks<T>(chunk: T): T; //# sourceMappingURL=strip-model-snapshots.d.ts.map