UNPKG

@mastra/core

Version:
32 lines 2.04 kB
import type { ToolSet } from '../../../_types/@internal_ai-sdk-v5/dist/index.d.ts'; import type { ModelLoopStreamArgs } from '../../../llm/model/model.loop.types.js'; import type { ProcessorState } from '../../../processors/runner.js'; import type { MessageList } from '../../message-list/index.js'; import type { CreatedAgentSignal } from '../../signals.js'; /** * Typed {@link RunScope} keys for values shared between the steps of a single * `createPrepareStreamWorkflow` factory invocation. * * The evented workflow engine serializes step outputs (JSON.stringify/parse via * the storage layer and via the pubsub transport), which would strip class * instances, `Map`s, and closures. We keep these values off the wire by parking * them on a per-run scope held by the parent `Mastra` instance. Step `execute` * bodies read and write through these keys; step outputs themselves return only * JSON-safe markers (see each step's `outputSchema`). * * Keys live next to their consumers — not in the `mastra` layer — so domain * types do not leak upward. */ export declare const MESSAGE_LIST_KEY: import("../../../mastra/run-scope").RunScopeKey<MessageList>; export declare const CONVERTED_TOOLS_KEY: import("../../../mastra/run-scope").RunScopeKey<Record<string, any>>; export declare const PROCESSOR_STATES_KEY: import("../../../mastra/run-scope").RunScopeKey<Map<string, ProcessorState<undefined>>>; export declare const INITIAL_SIGNAL_ECHOES_KEY: import("../../../mastra/run-scope").RunScopeKey<CreatedAgentSignal[]>; /** * Loop options carry the per-call `OUTPUT` generic. We expose a single shared * symbol so the producing step (`map-results-step`) and the consumer * (`stream-step`) target the same slot; the `OUTPUT` parameter is widened to * `unknown` at the key and narrowed at the read site where the factory * generic is in scope. */ export declare const LOOP_OPTIONS_KEY: import("../../../mastra/run-scope").RunScopeKey<ModelLoopStreamArgs<ToolSet, unknown>>; //# sourceMappingURL=run-scope-keys.d.ts.map