@mastra/core
Version:
45 lines • 3.81 kB
TypeScript
/**
* Typed {@link RunScopeKey} registry for the agentic loop + execution workflows.
*
* The agentic engine runs as evented workflow steps. Step input/output schemas
* cross the wire (storage snapshots, `UnixSocketPubSub` frames), so they MUST
* stay JSON-safe — see `serialization-invariants.test.ts`. Non-serializable
* runtime state (live class instances, function closures, abort controllers,
* stream transports) lives on the per-run `RunScope` held by `Mastra` instead.
*
* Each key here mirrors one slot on the legacy `StreamInternal` (`_internal`)
* bag. During the migration, `loop.ts` hydrates the scope from `_internal`
* before any step runs; step factories then prefer `scope.get(KEY)` and fall
* back to `_internal` for the rare test path that constructs a step factory
* directly without going through `loop()`.
*/
import type { IdGenerator, ToolSet } from '../_types/@internal_ai-sdk-v5/dist/index.d.ts';
import type { SaveQueueManager } from '../agent/save-queue/index.js';
import type { CreatedAgentSignal } from '../agent/signals.js';
import type { AgentBackgroundConfig, BackgroundTaskManager, BackgroundTaskManagerConfig } from '../background-tasks/index.js';
import type { MastraMemory, MemoryConfigInternal } from '../memory/index.js';
import type { StreamTransportRef } from '../stream/types.js';
import type { ToolPayloadTransformPolicy } from '../tools/index.js';
import type { Workspace } from '../workspace/workspace.js';
export declare const NOW_KEY: import("../mastra/run-scope").RunScopeKey<() => number>;
export declare const GENERATE_ID_KEY: import("../mastra/run-scope").RunScopeKey<IdGenerator>;
export declare const CURRENT_DATE_KEY: import("../mastra/run-scope").RunScopeKey<() => Date>;
export declare const SAVE_QUEUE_MANAGER_KEY: import("../mastra/run-scope").RunScopeKey<SaveQueueManager>;
export declare const MEMORY_KEY: import("../mastra/run-scope").RunScopeKey<MastraMemory>;
export declare const MEMORY_CONFIG_KEY: import("../mastra/run-scope").RunScopeKey<MemoryConfigInternal>;
export declare const THREAD_ID_KEY: import("../mastra/run-scope").RunScopeKey<string>;
export declare const RESOURCE_ID_KEY: import("../mastra/run-scope").RunScopeKey<string>;
export declare const THREAD_EXISTS_KEY: import("../mastra/run-scope").RunScopeKey<boolean>;
export declare const STEP_TOOLS_KEY: import("../mastra/run-scope").RunScopeKey<ToolSet>;
export declare const STEP_ACTIVE_TOOLS_KEY: import("../mastra/run-scope").RunScopeKey<string[]>;
export declare const STEP_WORKSPACE_KEY: import("../mastra/run-scope").RunScopeKey<Workspace<import("../workspace").WorkspaceFilesystem | undefined, import("../workspace").WorkspaceSandbox | undefined, undefined>>;
export declare const DELEGATION_BAILED_KEY: import("../mastra/run-scope").RunScopeKey<boolean>;
export declare const TRANSPORT_REF_KEY: import("../mastra/run-scope").RunScopeKey<StreamTransportRef>;
export declare const BACKGROUND_TASK_MANAGER_KEY: import("../mastra/run-scope").RunScopeKey<BackgroundTaskManager>;
export declare const AGENT_BACKGROUND_CONFIG_KEY: import("../mastra/run-scope").RunScopeKey<AgentBackgroundConfig>;
export declare const BACKGROUND_TASK_MANAGER_CONFIG_KEY: import("../mastra/run-scope").RunScopeKey<BackgroundTaskManagerConfig>;
export declare const SKIP_BG_TASK_WAIT_KEY: import("../mastra/run-scope").RunScopeKey<boolean>;
export declare const DRAIN_PENDING_SIGNALS_KEY: import("../mastra/run-scope").RunScopeKey<(runId: string, scope?: "pending" | "pre-run") => CreatedAgentSignal[]>;
export declare const INITIAL_SIGNAL_ECHOES_KEY: import("../mastra/run-scope").RunScopeKey<CreatedAgentSignal[]>;
export declare const TOOL_PAYLOAD_TRANSFORM_KEY: import("../mastra/run-scope").RunScopeKey<ToolPayloadTransformPolicy>;
//# sourceMappingURL=run-scope-keys.d.ts.map