@mastra/core 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +236 -0
- package/dist/agent/agent.d.ts +6 -0
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/{chunk-VJWRJWSC.cjs → chunk-2X66GWF5.cjs} +94 -16
- package/dist/chunk-2X66GWF5.cjs.map +1 -0
- package/dist/{chunk-YM6245EM.js → chunk-6OXW5E2O.js} +3 -3
- package/dist/{chunk-YM6245EM.js.map → chunk-6OXW5E2O.js.map} +1 -1
- package/dist/{chunk-XWZAKKFT.cjs → chunk-6QBN6MZY.cjs} +14 -14
- package/dist/{chunk-XWZAKKFT.cjs.map → chunk-6QBN6MZY.cjs.map} +1 -1
- package/dist/{chunk-AYHSPIT6.cjs → chunk-7UAJ6LMR.cjs} +820 -259
- package/dist/chunk-7UAJ6LMR.cjs.map +1 -0
- package/dist/{chunk-RZNHRIM7.cjs → chunk-A72NTLFT.cjs} +5 -5
- package/dist/{chunk-RZNHRIM7.cjs.map → chunk-A72NTLFT.cjs.map} +1 -1
- package/dist/{chunk-EEU5NHHU.js → chunk-DFCRXDVK.js} +3 -3
- package/dist/{chunk-EEU5NHHU.js.map → chunk-DFCRXDVK.js.map} +1 -1
- package/dist/{chunk-5K45E5VE.js → chunk-GPJGPARM.js} +3 -2
- package/dist/chunk-GPJGPARM.js.map +1 -0
- package/dist/{chunk-LNKS4TJ6.cjs → chunk-HB6T4554.cjs} +8 -7
- package/dist/chunk-HB6T4554.cjs.map +1 -0
- package/dist/{chunk-DGS2KGDI.js → chunk-KUXNBWN7.js} +6 -5
- package/dist/chunk-KUXNBWN7.js.map +1 -0
- package/dist/{chunk-IHDE4CJV.js → chunk-QSHV7GPT.js} +89 -12
- package/dist/chunk-QSHV7GPT.js.map +1 -0
- package/dist/{chunk-3U3XFMGJ.cjs → chunk-QTAS3HND.cjs} +13 -8
- package/dist/chunk-QTAS3HND.cjs.map +1 -0
- package/dist/{chunk-RHKNKJNM.js → chunk-QWTB53GS.js} +4 -4
- package/dist/{chunk-RHKNKJNM.js.map → chunk-QWTB53GS.js.map} +1 -1
- package/dist/{chunk-4WG5K4CK.js → chunk-R4N65TLG.js} +7 -7
- package/dist/{chunk-4WG5K4CK.js.map → chunk-R4N65TLG.js.map} +1 -1
- package/dist/{chunk-5VQPSWPG.cjs → chunk-RABITNTG.cjs} +48 -48
- package/dist/{chunk-5VQPSWPG.cjs.map → chunk-RABITNTG.cjs.map} +1 -1
- package/dist/{chunk-TVPANHLE.cjs → chunk-SBOHDNIZ.cjs} +3 -2
- package/dist/chunk-SBOHDNIZ.cjs.map +1 -0
- package/dist/{chunk-MWGGSA5Q.js → chunk-T6GAM3SQ.js} +10 -5
- package/dist/chunk-T6GAM3SQ.js.map +1 -0
- package/dist/{chunk-TL2TTA4X.cjs → chunk-YQG7NBPR.cjs} +9 -9
- package/dist/{chunk-TL2TTA4X.cjs.map → chunk-YQG7NBPR.cjs.map} +1 -1
- package/dist/{chunk-XB3DA67Q.js → chunk-ZSBM2SVU.js} +818 -259
- package/dist/chunk-ZSBM2SVU.js.map +1 -0
- package/dist/datasets/experiment/scorer.d.ts.map +1 -1
- package/dist/datasets/index.cjs +17 -17
- package/dist/datasets/index.js +2 -2
- package/dist/evals/index.cjs +20 -20
- package/dist/evals/index.js +3 -3
- package/dist/evals/scoreTraces/index.cjs +7 -6
- package/dist/evals/scoreTraces/index.cjs.map +1 -1
- package/dist/evals/scoreTraces/index.js +4 -3
- package/dist/evals/scoreTraces/index.js.map +1 -1
- package/dist/evals/scoreTraces/scoreTracesWorkflow.d.ts.map +1 -1
- package/dist/harness/harness.d.ts +21 -1
- package/dist/harness/harness.d.ts.map +1 -1
- package/dist/harness/index.cjs +422 -5
- package/dist/harness/index.cjs.map +1 -1
- package/dist/harness/index.d.ts +2 -1
- package/dist/harness/index.d.ts.map +1 -1
- package/dist/harness/index.js +418 -3
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/types.d.ts +151 -0
- package/dist/harness/types.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/loop/index.cjs +12 -12
- package/dist/loop/index.js +1 -1
- package/dist/loop/test-utils/tools.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-loop/index.d.ts.map +1 -1
- package/dist/mastra/hooks.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +14 -14
- package/dist/memory/index.js +1 -1
- package/dist/processor-provider/index.cjs +10 -10
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +45 -41
- package/dist/processors/index.js +1 -1
- package/dist/processors/processors/index.d.ts +1 -0
- package/dist/processors/processors/index.d.ts.map +1 -1
- package/dist/processors/processors/workspace-instructions.d.ts +50 -0
- package/dist/processors/processors/workspace-instructions.d.ts.map +1 -0
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/storage/constants.cjs +56 -56
- package/dist/storage/constants.d.ts.map +1 -1
- package/dist/storage/constants.js +1 -1
- package/dist/storage/index.cjs +160 -160
- package/dist/storage/index.js +2 -2
- package/dist/storage/types.d.ts +2 -0
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/compat/prepare-tools.d.ts.map +1 -1
- package/dist/stream/base/output.d.ts.map +1 -1
- package/dist/stream/index.cjs +8 -8
- package/dist/stream/index.js +1 -1
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/vector/index.cjs +7 -7
- package/dist/vector/index.js +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +25 -25
- package/dist/workflows/index.js +1 -1
- package/dist/workspace/constants/index.d.ts +2 -0
- package/dist/workspace/constants/index.d.ts.map +1 -1
- package/dist/workspace/errors.d.ts +1 -1
- package/dist/workspace/errors.d.ts.map +1 -1
- package/dist/workspace/filesystem/composite-filesystem.d.ts +4 -1
- package/dist/workspace/filesystem/composite-filesystem.d.ts.map +1 -1
- package/dist/workspace/filesystem/file-write-lock.d.ts +35 -0
- package/dist/workspace/filesystem/file-write-lock.d.ts.map +1 -0
- package/dist/workspace/filesystem/filesystem.d.ts +5 -1
- package/dist/workspace/filesystem/filesystem.d.ts.map +1 -1
- package/dist/workspace/filesystem/index.d.ts +1 -0
- package/dist/workspace/filesystem/index.d.ts.map +1 -1
- package/dist/workspace/filesystem/local-filesystem.d.ts +17 -1
- package/dist/workspace/filesystem/local-filesystem.d.ts.map +1 -1
- package/dist/workspace/index.cjs +72 -64
- package/dist/workspace/index.d.ts +3 -2
- package/dist/workspace/index.d.ts.map +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/lifecycle.d.ts +1 -9
- package/dist/workspace/lifecycle.d.ts.map +1 -1
- package/dist/workspace/sandbox/index.d.ts +2 -0
- package/dist/workspace/sandbox/index.d.ts.map +1 -1
- package/dist/workspace/sandbox/local-process-manager.d.ts +18 -0
- package/dist/workspace/sandbox/local-process-manager.d.ts.map +1 -0
- package/dist/workspace/sandbox/local-sandbox.d.ts +49 -35
- package/dist/workspace/sandbox/local-sandbox.d.ts.map +1 -1
- package/dist/workspace/sandbox/mastra-sandbox.d.ts +45 -11
- package/dist/workspace/sandbox/mastra-sandbox.d.ts.map +1 -1
- package/dist/workspace/sandbox/native-sandbox/bubblewrap.d.ts +2 -3
- package/dist/workspace/sandbox/native-sandbox/bubblewrap.d.ts.map +1 -1
- package/dist/workspace/sandbox/native-sandbox/seatbelt.d.ts +2 -3
- package/dist/workspace/sandbox/native-sandbox/seatbelt.d.ts.map +1 -1
- package/dist/workspace/sandbox/native-sandbox/wrapper.d.ts +4 -5
- package/dist/workspace/sandbox/native-sandbox/wrapper.d.ts.map +1 -1
- package/dist/workspace/sandbox/process-manager/index.d.ts +4 -0
- package/dist/workspace/sandbox/process-manager/index.d.ts.map +1 -0
- package/dist/workspace/sandbox/process-manager/process-handle.d.ts +107 -0
- package/dist/workspace/sandbox/process-manager/process-handle.d.ts.map +1 -0
- package/dist/workspace/sandbox/process-manager/process-manager.d.ts +59 -0
- package/dist/workspace/sandbox/process-manager/process-manager.d.ts.map +1 -0
- package/dist/workspace/sandbox/process-manager/types.d.ts +24 -0
- package/dist/workspace/sandbox/process-manager/types.d.ts.map +1 -0
- package/dist/workspace/sandbox/sandbox.d.ts +38 -2
- package/dist/workspace/sandbox/sandbox.d.ts.map +1 -1
- package/dist/workspace/sandbox/types.d.ts +9 -2
- package/dist/workspace/sandbox/types.d.ts.map +1 -1
- package/dist/workspace/sandbox/utils.d.ts +7 -0
- package/dist/workspace/sandbox/utils.d.ts.map +1 -0
- package/dist/workspace/tools/execute-command.d.ts +53 -2
- package/dist/workspace/tools/execute-command.d.ts.map +1 -1
- package/dist/workspace/tools/get-process-output.d.ts +6 -0
- package/dist/workspace/tools/get-process-output.d.ts.map +1 -0
- package/dist/workspace/tools/index.d.ts +4 -1
- package/dist/workspace/tools/index.d.ts.map +1 -1
- package/dist/workspace/tools/kill-process.d.ts +4 -0
- package/dist/workspace/tools/kill-process.d.ts.map +1 -0
- package/dist/workspace/tools/output-helpers.d.ts +21 -0
- package/dist/workspace/tools/output-helpers.d.ts.map +1 -0
- package/dist/workspace/tools/tools.d.ts.map +1 -1
- package/dist/workspace/types.d.ts +31 -0
- package/dist/workspace/types.d.ts.map +1 -1
- package/dist/workspace/utils.d.ts +11 -0
- package/dist/workspace/utils.d.ts.map +1 -0
- package/dist/workspace/workspace.d.ts +36 -0
- package/dist/workspace/workspace.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/chunk-3U3XFMGJ.cjs.map +0 -1
- package/dist/chunk-5K45E5VE.js.map +0 -1
- package/dist/chunk-AYHSPIT6.cjs.map +0 -1
- package/dist/chunk-DGS2KGDI.js.map +0 -1
- package/dist/chunk-IHDE4CJV.js.map +0 -1
- package/dist/chunk-LNKS4TJ6.cjs.map +0 -1
- package/dist/chunk-MWGGSA5Q.js.map +0 -1
- package/dist/chunk-TVPANHLE.cjs.map +0 -1
- package/dist/chunk-VJWRJWSC.cjs.map +0 -1
- package/dist/chunk-XB3DA67Q.js.map +0 -1
- package/dist/docs/SKILL.md +0 -301
- package/dist/docs/assets/SOURCE_MAP.json +0 -1413
- package/dist/docs/references/docs-agents-adding-voice.md +0 -353
- package/dist/docs/references/docs-agents-agent-approval.md +0 -377
- package/dist/docs/references/docs-agents-agent-memory.md +0 -212
- package/dist/docs/references/docs-agents-guardrails.md +0 -382
- package/dist/docs/references/docs-agents-network-approval.md +0 -275
- package/dist/docs/references/docs-agents-networks.md +0 -290
- package/dist/docs/references/docs-agents-overview.md +0 -309
- package/dist/docs/references/docs-agents-processors.md +0 -632
- package/dist/docs/references/docs-agents-structured-output.md +0 -271
- package/dist/docs/references/docs-agents-using-tools.md +0 -214
- package/dist/docs/references/docs-evals-custom-scorers.md +0 -519
- package/dist/docs/references/docs-evals-overview.md +0 -146
- package/dist/docs/references/docs-evals-running-in-ci.md +0 -106
- package/dist/docs/references/docs-mcp-overview.md +0 -370
- package/dist/docs/references/docs-mcp-publishing-mcp-server.md +0 -95
- package/dist/docs/references/docs-memory-memory-processors.md +0 -316
- package/dist/docs/references/docs-memory-observational-memory.md +0 -246
- package/dist/docs/references/docs-memory-overview.md +0 -45
- package/dist/docs/references/docs-memory-semantic-recall.md +0 -272
- package/dist/docs/references/docs-memory-storage.md +0 -261
- package/dist/docs/references/docs-memory-working-memory.md +0 -400
- package/dist/docs/references/docs-observability-datasets-overview.md +0 -188
- package/dist/docs/references/docs-observability-datasets-running-experiments.md +0 -266
- package/dist/docs/references/docs-observability-logging.md +0 -99
- package/dist/docs/references/docs-observability-overview.md +0 -70
- package/dist/docs/references/docs-observability-tracing-bridges-otel.md +0 -209
- package/dist/docs/references/docs-observability-tracing-exporters-arize.md +0 -274
- package/dist/docs/references/docs-observability-tracing-exporters-braintrust.md +0 -111
- package/dist/docs/references/docs-observability-tracing-exporters-cloud.md +0 -129
- package/dist/docs/references/docs-observability-tracing-exporters-datadog.md +0 -187
- package/dist/docs/references/docs-observability-tracing-exporters-default.md +0 -211
- package/dist/docs/references/docs-observability-tracing-exporters-laminar.md +0 -100
- package/dist/docs/references/docs-observability-tracing-exporters-langfuse.md +0 -217
- package/dist/docs/references/docs-observability-tracing-exporters-langsmith.md +0 -202
- package/dist/docs/references/docs-observability-tracing-exporters-otel.md +0 -479
- package/dist/docs/references/docs-observability-tracing-exporters-posthog.md +0 -148
- package/dist/docs/references/docs-observability-tracing-overview.md +0 -1114
- package/dist/docs/references/docs-rag-chunking-and-embedding.md +0 -183
- package/dist/docs/references/docs-rag-graph-rag.md +0 -215
- package/dist/docs/references/docs-rag-overview.md +0 -72
- package/dist/docs/references/docs-rag-retrieval.md +0 -521
- package/dist/docs/references/docs-rag-vector-databases.md +0 -648
- package/dist/docs/references/docs-server-auth-auth0.md +0 -222
- package/dist/docs/references/docs-server-auth-clerk.md +0 -132
- package/dist/docs/references/docs-server-auth-composite-auth.md +0 -234
- package/dist/docs/references/docs-server-auth-custom-auth-provider.md +0 -513
- package/dist/docs/references/docs-server-auth-firebase.md +0 -272
- package/dist/docs/references/docs-server-auth-jwt.md +0 -110
- package/dist/docs/references/docs-server-auth-simple-auth.md +0 -178
- package/dist/docs/references/docs-server-auth-supabase.md +0 -117
- package/dist/docs/references/docs-server-auth-workos.md +0 -190
- package/dist/docs/references/docs-server-custom-adapters.md +0 -374
- package/dist/docs/references/docs-server-custom-api-routes.md +0 -267
- package/dist/docs/references/docs-server-mastra-client.md +0 -243
- package/dist/docs/references/docs-server-mastra-server.md +0 -71
- package/dist/docs/references/docs-server-middleware.md +0 -228
- package/dist/docs/references/docs-server-request-context.md +0 -478
- package/dist/docs/references/docs-streaming-events.md +0 -247
- package/dist/docs/references/docs-streaming-tool-streaming.md +0 -178
- package/dist/docs/references/docs-streaming-workflow-streaming.md +0 -109
- package/dist/docs/references/docs-voice-overview.md +0 -979
- package/dist/docs/references/docs-voice-speech-to-speech.md +0 -103
- package/dist/docs/references/docs-voice-speech-to-text.md +0 -80
- package/dist/docs/references/docs-voice-text-to-speech.md +0 -84
- package/dist/docs/references/docs-workflows-agents-and-tools.md +0 -170
- package/dist/docs/references/docs-workflows-control-flow.md +0 -823
- package/dist/docs/references/docs-workflows-error-handling.md +0 -360
- package/dist/docs/references/docs-workflows-human-in-the-loop.md +0 -213
- package/dist/docs/references/docs-workflows-overview.md +0 -372
- package/dist/docs/references/docs-workflows-snapshots.md +0 -238
- package/dist/docs/references/docs-workflows-suspend-and-resume.md +0 -205
- package/dist/docs/references/docs-workflows-time-travel.md +0 -309
- package/dist/docs/references/docs-workflows-workflow-state.md +0 -181
- package/dist/docs/references/docs-workspace-filesystem.md +0 -162
- package/dist/docs/references/docs-workspace-overview.md +0 -239
- package/dist/docs/references/docs-workspace-sandbox.md +0 -63
- package/dist/docs/references/docs-workspace-search.md +0 -219
- package/dist/docs/references/docs-workspace-skills.md +0 -126
- package/dist/docs/references/guides-agent-frameworks-ai-sdk.md +0 -140
- package/dist/docs/references/reference-agents-agent.md +0 -142
- package/dist/docs/references/reference-agents-generate.md +0 -174
- package/dist/docs/references/reference-agents-generateLegacy.md +0 -176
- package/dist/docs/references/reference-agents-getDefaultGenerateOptions.md +0 -36
- package/dist/docs/references/reference-agents-getDefaultOptions.md +0 -34
- package/dist/docs/references/reference-agents-getDefaultStreamOptions.md +0 -36
- package/dist/docs/references/reference-agents-getDescription.md +0 -21
- package/dist/docs/references/reference-agents-getInstructions.md +0 -34
- package/dist/docs/references/reference-agents-getLLM.md +0 -37
- package/dist/docs/references/reference-agents-getMemory.md +0 -34
- package/dist/docs/references/reference-agents-getModel.md +0 -34
- package/dist/docs/references/reference-agents-getTools.md +0 -29
- package/dist/docs/references/reference-agents-getVoice.md +0 -34
- package/dist/docs/references/reference-agents-listAgents.md +0 -35
- package/dist/docs/references/reference-agents-listScorers.md +0 -34
- package/dist/docs/references/reference-agents-listTools.md +0 -34
- package/dist/docs/references/reference-agents-listWorkflows.md +0 -34
- package/dist/docs/references/reference-agents-network.md +0 -134
- package/dist/docs/references/reference-ai-sdk-chat-route.md +0 -82
- package/dist/docs/references/reference-ai-sdk-network-route.md +0 -74
- package/dist/docs/references/reference-ai-sdk-to-ai-sdk-stream.md +0 -232
- package/dist/docs/references/reference-ai-sdk-with-mastra.md +0 -59
- package/dist/docs/references/reference-ai-sdk-workflow-route.md +0 -79
- package/dist/docs/references/reference-auth-auth0.md +0 -73
- package/dist/docs/references/reference-auth-clerk.md +0 -36
- package/dist/docs/references/reference-auth-firebase.md +0 -80
- package/dist/docs/references/reference-auth-jwt.md +0 -26
- package/dist/docs/references/reference-auth-supabase.md +0 -33
- package/dist/docs/references/reference-auth-workos.md +0 -84
- package/dist/docs/references/reference-client-js-agents.md +0 -438
- package/dist/docs/references/reference-configuration.md +0 -749
- package/dist/docs/references/reference-core-addGateway.md +0 -42
- package/dist/docs/references/reference-core-getAgent.md +0 -21
- package/dist/docs/references/reference-core-getAgentById.md +0 -21
- package/dist/docs/references/reference-core-getDeployer.md +0 -22
- package/dist/docs/references/reference-core-getGateway.md +0 -38
- package/dist/docs/references/reference-core-getGatewayById.md +0 -41
- package/dist/docs/references/reference-core-getLogger.md +0 -22
- package/dist/docs/references/reference-core-getMCPServer.md +0 -45
- package/dist/docs/references/reference-core-getMCPServerById.md +0 -53
- package/dist/docs/references/reference-core-getMemory.md +0 -50
- package/dist/docs/references/reference-core-getScorer.md +0 -54
- package/dist/docs/references/reference-core-getScorerById.md +0 -54
- package/dist/docs/references/reference-core-getServer.md +0 -22
- package/dist/docs/references/reference-core-getStorage.md +0 -22
- package/dist/docs/references/reference-core-getStoredAgentById.md +0 -89
- package/dist/docs/references/reference-core-getTelemetry.md +0 -22
- package/dist/docs/references/reference-core-getVector.md +0 -22
- package/dist/docs/references/reference-core-getWorkflow.md +0 -40
- package/dist/docs/references/reference-core-listAgents.md +0 -21
- package/dist/docs/references/reference-core-listGateways.md +0 -40
- package/dist/docs/references/reference-core-listLogs.md +0 -38
- package/dist/docs/references/reference-core-listLogsByRunId.md +0 -36
- package/dist/docs/references/reference-core-listMCPServers.md +0 -51
- package/dist/docs/references/reference-core-listMemory.md +0 -56
- package/dist/docs/references/reference-core-listScorers.md +0 -29
- package/dist/docs/references/reference-core-listStoredAgents.md +0 -93
- package/dist/docs/references/reference-core-listVectors.md +0 -22
- package/dist/docs/references/reference-core-listWorkflows.md +0 -21
- package/dist/docs/references/reference-core-mastra-class.md +0 -66
- package/dist/docs/references/reference-core-mastra-model-gateway.md +0 -153
- package/dist/docs/references/reference-core-setLogger.md +0 -26
- package/dist/docs/references/reference-core-setStorage.md +0 -27
- package/dist/docs/references/reference-datasets-addItem.md +0 -35
- package/dist/docs/references/reference-datasets-addItems.md +0 -33
- package/dist/docs/references/reference-datasets-compareExperiments.md +0 -48
- package/dist/docs/references/reference-datasets-create.md +0 -49
- package/dist/docs/references/reference-datasets-dataset.md +0 -78
- package/dist/docs/references/reference-datasets-datasets-manager.md +0 -84
- package/dist/docs/references/reference-datasets-delete.md +0 -23
- package/dist/docs/references/reference-datasets-deleteExperiment.md +0 -25
- package/dist/docs/references/reference-datasets-deleteItem.md +0 -25
- package/dist/docs/references/reference-datasets-deleteItems.md +0 -27
- package/dist/docs/references/reference-datasets-get.md +0 -29
- package/dist/docs/references/reference-datasets-getDetails.md +0 -45
- package/dist/docs/references/reference-datasets-getExperiment.md +0 -28
- package/dist/docs/references/reference-datasets-getItem.md +0 -31
- package/dist/docs/references/reference-datasets-getItemHistory.md +0 -29
- package/dist/docs/references/reference-datasets-list.md +0 -29
- package/dist/docs/references/reference-datasets-listExperimentResults.md +0 -37
- package/dist/docs/references/reference-datasets-listExperiments.md +0 -31
- package/dist/docs/references/reference-datasets-listItems.md +0 -44
- package/dist/docs/references/reference-datasets-listVersions.md +0 -31
- package/dist/docs/references/reference-datasets-startExperiment.md +0 -60
- package/dist/docs/references/reference-datasets-startExperimentAsync.md +0 -41
- package/dist/docs/references/reference-datasets-update.md +0 -46
- package/dist/docs/references/reference-datasets-updateItem.md +0 -36
- package/dist/docs/references/reference-evals-answer-relevancy.md +0 -105
- package/dist/docs/references/reference-evals-answer-similarity.md +0 -99
- package/dist/docs/references/reference-evals-bias.md +0 -120
- package/dist/docs/references/reference-evals-completeness.md +0 -137
- package/dist/docs/references/reference-evals-content-similarity.md +0 -101
- package/dist/docs/references/reference-evals-context-precision.md +0 -196
- package/dist/docs/references/reference-evals-create-scorer.md +0 -270
- package/dist/docs/references/reference-evals-faithfulness.md +0 -114
- package/dist/docs/references/reference-evals-hallucination.md +0 -220
- package/dist/docs/references/reference-evals-keyword-coverage.md +0 -128
- package/dist/docs/references/reference-evals-mastra-scorer.md +0 -123
- package/dist/docs/references/reference-evals-run-evals.md +0 -138
- package/dist/docs/references/reference-evals-scorer-utils.md +0 -330
- package/dist/docs/references/reference-evals-textual-difference.md +0 -113
- package/dist/docs/references/reference-evals-tone-consistency.md +0 -119
- package/dist/docs/references/reference-evals-toxicity.md +0 -123
- package/dist/docs/references/reference-harness-harness-class.md +0 -645
- package/dist/docs/references/reference-logging-pino-logger.md +0 -117
- package/dist/docs/references/reference-memory-deleteMessages.md +0 -40
- package/dist/docs/references/reference-memory-memory-class.md +0 -147
- package/dist/docs/references/reference-memory-observational-memory.md +0 -565
- package/dist/docs/references/reference-observability-tracing-bridges-otel.md +0 -131
- package/dist/docs/references/reference-observability-tracing-configuration.md +0 -178
- package/dist/docs/references/reference-observability-tracing-exporters-console-exporter.md +0 -138
- package/dist/docs/references/reference-observability-tracing-exporters-datadog.md +0 -116
- package/dist/docs/references/reference-observability-tracing-instances.md +0 -109
- package/dist/docs/references/reference-observability-tracing-interfaces.md +0 -749
- package/dist/docs/references/reference-observability-tracing-processors-sensitive-data-filter.md +0 -144
- package/dist/docs/references/reference-observability-tracing-spans.md +0 -224
- package/dist/docs/references/reference-processors-batch-parts-processor.md +0 -61
- package/dist/docs/references/reference-processors-language-detector.md +0 -81
- package/dist/docs/references/reference-processors-message-history-processor.md +0 -85
- package/dist/docs/references/reference-processors-moderation-processor.md +0 -104
- package/dist/docs/references/reference-processors-pii-detector.md +0 -107
- package/dist/docs/references/reference-processors-processor-interface.md +0 -525
- package/dist/docs/references/reference-processors-prompt-injection-detector.md +0 -71
- package/dist/docs/references/reference-processors-semantic-recall-processor.md +0 -123
- package/dist/docs/references/reference-processors-system-prompt-scrubber.md +0 -80
- package/dist/docs/references/reference-processors-token-limiter-processor.md +0 -113
- package/dist/docs/references/reference-processors-tool-call-filter.md +0 -85
- package/dist/docs/references/reference-processors-tool-search-processor.md +0 -113
- package/dist/docs/references/reference-processors-unicode-normalizer.md +0 -62
- package/dist/docs/references/reference-processors-working-memory-processor.md +0 -154
- package/dist/docs/references/reference-rag-database-config.md +0 -264
- package/dist/docs/references/reference-rag-embeddings.md +0 -92
- package/dist/docs/references/reference-server-mastra-server.md +0 -298
- package/dist/docs/references/reference-server-register-api-route.md +0 -249
- package/dist/docs/references/reference-storage-cloudflare-d1.md +0 -218
- package/dist/docs/references/reference-storage-composite.md +0 -235
- package/dist/docs/references/reference-storage-lance.md +0 -131
- package/dist/docs/references/reference-storage-libsql.md +0 -135
- package/dist/docs/references/reference-storage-mongodb.md +0 -262
- package/dist/docs/references/reference-storage-mssql.md +0 -155
- package/dist/docs/references/reference-storage-overview.md +0 -121
- package/dist/docs/references/reference-storage-postgresql.md +0 -529
- package/dist/docs/references/reference-storage-upstash.md +0 -160
- package/dist/docs/references/reference-streaming-ChunkType.md +0 -292
- package/dist/docs/references/reference-streaming-agents-MastraModelOutput.md +0 -182
- package/dist/docs/references/reference-streaming-agents-streamLegacy.md +0 -142
- package/dist/docs/references/reference-streaming-workflows-observeStream.md +0 -42
- package/dist/docs/references/reference-streaming-workflows-resumeStream.md +0 -61
- package/dist/docs/references/reference-streaming-workflows-stream.md +0 -88
- package/dist/docs/references/reference-streaming-workflows-timeTravelStream.md +0 -142
- package/dist/docs/references/reference-templates-overview.md +0 -194
- package/dist/docs/references/reference-tools-create-tool.md +0 -237
- package/dist/docs/references/reference-tools-graph-rag-tool.md +0 -185
- package/dist/docs/references/reference-tools-mcp-client.md +0 -962
- package/dist/docs/references/reference-tools-mcp-server.md +0 -1275
- package/dist/docs/references/reference-tools-vector-query-tool.md +0 -459
- package/dist/docs/references/reference-vectors-libsql.md +0 -305
- package/dist/docs/references/reference-vectors-mongodb.md +0 -295
- package/dist/docs/references/reference-vectors-pg.md +0 -408
- package/dist/docs/references/reference-vectors-upstash.md +0 -294
- package/dist/docs/references/reference-voice-composite-voice.md +0 -121
- package/dist/docs/references/reference-voice-mastra-voice.md +0 -313
- package/dist/docs/references/reference-voice-voice.addInstructions.md +0 -56
- package/dist/docs/references/reference-voice-voice.addTools.md +0 -67
- package/dist/docs/references/reference-voice-voice.connect.md +0 -94
- package/dist/docs/references/reference-voice-voice.events.md +0 -37
- package/dist/docs/references/reference-voice-voice.listen.md +0 -164
- package/dist/docs/references/reference-voice-voice.on.md +0 -111
- package/dist/docs/references/reference-voice-voice.speak.md +0 -157
- package/dist/docs/references/reference-workflows-run-methods-cancel.md +0 -86
- package/dist/docs/references/reference-workflows-run-methods-restart.md +0 -33
- package/dist/docs/references/reference-workflows-run-methods-resume.md +0 -59
- package/dist/docs/references/reference-workflows-run-methods-start.md +0 -58
- package/dist/docs/references/reference-workflows-run-methods-startAsync.md +0 -67
- package/dist/docs/references/reference-workflows-run-methods-timeTravel.md +0 -142
- package/dist/docs/references/reference-workflows-run.md +0 -59
- package/dist/docs/references/reference-workflows-step.md +0 -119
- package/dist/docs/references/reference-workflows-workflow-methods-branch.md +0 -25
- package/dist/docs/references/reference-workflows-workflow-methods-commit.md +0 -17
- package/dist/docs/references/reference-workflows-workflow-methods-create-run.md +0 -63
- package/dist/docs/references/reference-workflows-workflow-methods-dountil.md +0 -25
- package/dist/docs/references/reference-workflows-workflow-methods-dowhile.md +0 -25
- package/dist/docs/references/reference-workflows-workflow-methods-foreach.md +0 -118
- package/dist/docs/references/reference-workflows-workflow-methods-map.md +0 -93
- package/dist/docs/references/reference-workflows-workflow-methods-parallel.md +0 -21
- package/dist/docs/references/reference-workflows-workflow-methods-sleep.md +0 -35
- package/dist/docs/references/reference-workflows-workflow-methods-sleepUntil.md +0 -35
- package/dist/docs/references/reference-workflows-workflow-methods-then.md +0 -21
- package/dist/docs/references/reference-workflows-workflow.md +0 -157
- package/dist/docs/references/reference-workspace-filesystem.md +0 -202
- package/dist/docs/references/reference-workspace-local-filesystem.md +0 -327
- package/dist/docs/references/reference-workspace-local-sandbox.md +0 -285
- package/dist/docs/references/reference-workspace-sandbox.md +0 -81
- package/dist/docs/references/reference-workspace-workspace-class.md +0 -226
- package/dist/docs/references/reference.md +0 -276
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,241 @@
|
|
|
1
1
|
# @mastra/core
|
|
2
2
|
|
|
3
|
+
## 1.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added `getObservationalMemoryRecord()` method to the `Harness` class. Fixes #13392. ([#13395](https://github.com/mastra-ai/mastra/pull/13395))
|
|
8
|
+
|
|
9
|
+
This provides public access to the full `ObservationalMemoryRecord` for the current thread, including `activeObservations`, `generationCount`, and `observationTokenCount`. Previously, accessing raw observation text required bypassing the Harness abstraction by reaching into private storage internals.
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
const record = await harness.getObservationalMemoryRecord();
|
|
13
|
+
if (record) {
|
|
14
|
+
console.log(record.activeObservations);
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- Added `Workspace.setToolsConfig()` method for dynamically updating per-tool configuration at runtime without recreating the workspace instance. Passing `undefined` re-enables all tools. ([#13439](https://github.com/mastra-ai/mastra/pull/13439))
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
const workspace = new Workspace({ filesystem, sandbox });
|
|
22
|
+
|
|
23
|
+
// Disable write tools (e.g., in plan/read-only mode)
|
|
24
|
+
workspace.setToolsConfig({
|
|
25
|
+
mastra_workspace_write_file: { enabled: false },
|
|
26
|
+
mastra_workspace_edit_file: { enabled: false },
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// Re-enable all tools
|
|
30
|
+
workspace.setToolsConfig(undefined);
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- Added `HarnessDisplayState` so any UI can read a single state snapshot instead of handling 35+ individual events. ([#13427](https://github.com/mastra-ai/mastra/pull/13427))
|
|
34
|
+
|
|
35
|
+
**Why:** Previously, every UI (TUI, web, desktop) had to subscribe to dozens of granular Harness events and independently reconstruct what to display. This led to duplicated state tracking and inconsistencies across UI implementations. Now the Harness maintains a single canonical display state that any UI can read.
|
|
36
|
+
|
|
37
|
+
**Before:** UIs subscribed to raw events and built up display state locally:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
harness.subscribe((event) => {
|
|
41
|
+
if (event.type === 'agent_start') localState.isRunning = true;
|
|
42
|
+
if (event.type === 'agent_end') localState.isRunning = false;
|
|
43
|
+
if (event.type === 'tool_start') localState.tools.set(event.toolCallId, ...);
|
|
44
|
+
// ... 30+ more event types to handle
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**After:** UIs read a single snapshot from the Harness:
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import type { HarnessDisplayState } from '@mastra/core/harness';
|
|
52
|
+
|
|
53
|
+
harness.subscribe(event => {
|
|
54
|
+
const ds: HarnessDisplayState = harness.getDisplayState();
|
|
55
|
+
// ds.isRunning, ds.tokenUsage, ds.omProgress, ds.activeTools, etc.
|
|
56
|
+
renderUI(ds);
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- Prompt blocks can now define their own variables schema (`requestContextSchema`), allowing you to create reusable prompt blocks with typed variable placeholders. The server now correctly computes and returns draft/published status for prompt blocks. Existing databases are automatically migrated when upgrading. ([#13351](https://github.com/mastra-ai/mastra/pull/13351))
|
|
61
|
+
|
|
62
|
+
- **Workspace instruction improvements** ([#13304](https://github.com/mastra-ai/mastra/pull/13304))
|
|
63
|
+
- Added `Workspace.getInstructions()`: agents now receive accurate workspace context that distinguishes sandbox-accessible paths from workspace-only paths.
|
|
64
|
+
- Added `WorkspaceInstructionsProcessor`: workspace context is injected directly into the agent system message instead of embedded in tool descriptions.
|
|
65
|
+
- Deprecated `Workspace.getPathContext()` in favour of `getInstructions()`.
|
|
66
|
+
|
|
67
|
+
Added `instructions` option to `LocalFilesystem` and `LocalSandbox`. Pass a string to fully replace default instructions, or a function to extend them with access to the current `requestContext` for per-request customization (e.g. by tenant or locale).
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
const filesystem = new LocalFilesystem({
|
|
71
|
+
basePath: './workspace',
|
|
72
|
+
instructions: ({ defaultInstructions, requestContext }) => {
|
|
73
|
+
const locale = requestContext?.get('locale') ?? 'en';
|
|
74
|
+
return `${defaultInstructions}\nLocale: ${locale}`;
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
- Added background process management to workspace sandboxes. ([#13293](https://github.com/mastra-ai/mastra/pull/13293))
|
|
80
|
+
|
|
81
|
+
You can now spawn, monitor, and manage long-running background processes (dev servers, watchers, REPLs) inside sandbox environments.
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
// Spawn a background process
|
|
85
|
+
const handle = await sandbox.processes.spawn('node server.js');
|
|
86
|
+
|
|
87
|
+
// Stream output and wait for exit
|
|
88
|
+
const result = await handle.wait({
|
|
89
|
+
onStdout: data => console.log(data),
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// List and manage running processes
|
|
93
|
+
const procs = await sandbox.processes.list();
|
|
94
|
+
await sandbox.processes.kill(handle.pid);
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
- `SandboxProcessManager` abstract base class with `spawn()`, `list()`, `get(pid)`, `kill(pid)`
|
|
98
|
+
- `ProcessHandle` base class with stdout/stderr accumulation, streaming callbacks, and `wait()`
|
|
99
|
+
- `LocalProcessManager` implementation wrapping Node.js `child_process`
|
|
100
|
+
- Node.js stream interop via `handle.reader` / `handle.writer`
|
|
101
|
+
- Default `executeCommand` implementation built on process manager (spawn + wait)
|
|
102
|
+
|
|
103
|
+
- Added workspace tools for background process management and improved sandbox execution UI. ([#13309](https://github.com/mastra-ai/mastra/pull/13309))
|
|
104
|
+
- `execute_command` now supports `background: true` to spawn long-running processes and return a PID
|
|
105
|
+
- New `get_process_output` tool to check output/status of background processes (supports `wait` to block until exit)
|
|
106
|
+
- New `kill_process` tool to terminate background processes
|
|
107
|
+
- Output truncation helpers with configurable tail lines
|
|
108
|
+
- Sandbox execution badge UI: terminal-style output display with streaming, exit codes, killed status, and workspace metadata
|
|
109
|
+
|
|
110
|
+
### Patch Changes
|
|
111
|
+
|
|
112
|
+
- Fixed agents-as-tools failing with OpenAI when using the model router. The auto-injected `resumeData` field (from `z.any()`) produced a JSON Schema without a `type` key, which OpenAI rejects. Tool schemas are now post-processed to ensure all properties have valid type information. ([#13326](https://github.com/mastra-ai/mastra/pull/13326))
|
|
113
|
+
|
|
114
|
+
- Fixed `stopWhen` callback receiving empty `toolResults` on steps. `step.toolResults` now correctly reflects the tool results present in `step.content`. ([#13319](https://github.com/mastra-ai/mastra/pull/13319))
|
|
115
|
+
|
|
116
|
+
- Added `hasJudge` metadata to scorer records so the studio can distinguish code-based scorers (e.g., textual-difference, content-similarity) from LLM-based scorers. This metadata is now included in all four score-saving paths: `runEvals`, scorer hooks, trace scoring, and dataset experiments. ([#13386](https://github.com/mastra-ai/mastra/pull/13386))
|
|
117
|
+
|
|
118
|
+
- Fixed a bug where custom output processors could not emit stream events during final output processing. The `writer` object was always `undefined` when passed to output processors in the finish phase, preventing use cases like streaming moderation updates or custom UI events back to the client. ([#13454](https://github.com/mastra-ai/mastra/pull/13454))
|
|
119
|
+
|
|
120
|
+
- Added per-file write locking to workspace tools (edit_file, write_file, ast_edit, delete). Concurrent tool calls targeting the same file are now serialized, preventing race conditions where parallel edits could silently overwrite each other. ([#13302](https://github.com/mastra-ai/mastra/pull/13302))
|
|
121
|
+
|
|
122
|
+
## 1.7.0-alpha.0
|
|
123
|
+
|
|
124
|
+
### Minor Changes
|
|
125
|
+
|
|
126
|
+
- Added `getObservationalMemoryRecord()` method to the `Harness` class. Fixes #13392. ([#13395](https://github.com/mastra-ai/mastra/pull/13395))
|
|
127
|
+
|
|
128
|
+
This provides public access to the full `ObservationalMemoryRecord` for the current thread, including `activeObservations`, `generationCount`, and `observationTokenCount`. Previously, accessing raw observation text required bypassing the Harness abstraction by reaching into private storage internals.
|
|
129
|
+
|
|
130
|
+
```typescript
|
|
131
|
+
const record = await harness.getObservationalMemoryRecord();
|
|
132
|
+
if (record) {
|
|
133
|
+
console.log(record.activeObservations);
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
- Added `Workspace.setToolsConfig()` method for dynamically updating per-tool configuration at runtime without recreating the workspace instance. Passing `undefined` re-enables all tools. ([#13439](https://github.com/mastra-ai/mastra/pull/13439))
|
|
138
|
+
|
|
139
|
+
```ts
|
|
140
|
+
const workspace = new Workspace({ filesystem, sandbox });
|
|
141
|
+
|
|
142
|
+
// Disable write tools (e.g., in plan/read-only mode)
|
|
143
|
+
workspace.setToolsConfig({
|
|
144
|
+
mastra_workspace_write_file: { enabled: false },
|
|
145
|
+
mastra_workspace_edit_file: { enabled: false },
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
// Re-enable all tools
|
|
149
|
+
workspace.setToolsConfig(undefined);
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
- Added `HarnessDisplayState` so any UI can read a single state snapshot instead of handling 35+ individual events. ([#13427](https://github.com/mastra-ai/mastra/pull/13427))
|
|
153
|
+
|
|
154
|
+
**Why:** Previously, every UI (TUI, web, desktop) had to subscribe to dozens of granular Harness events and independently reconstruct what to display. This led to duplicated state tracking and inconsistencies across UI implementations. Now the Harness maintains a single canonical display state that any UI can read.
|
|
155
|
+
|
|
156
|
+
**Before:** UIs subscribed to raw events and built up display state locally:
|
|
157
|
+
|
|
158
|
+
```ts
|
|
159
|
+
harness.subscribe((event) => {
|
|
160
|
+
if (event.type === 'agent_start') localState.isRunning = true;
|
|
161
|
+
if (event.type === 'agent_end') localState.isRunning = false;
|
|
162
|
+
if (event.type === 'tool_start') localState.tools.set(event.toolCallId, ...);
|
|
163
|
+
// ... 30+ more event types to handle
|
|
164
|
+
});
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**After:** UIs read a single snapshot from the Harness:
|
|
168
|
+
|
|
169
|
+
```ts
|
|
170
|
+
import type { HarnessDisplayState } from '@mastra/core/harness';
|
|
171
|
+
|
|
172
|
+
harness.subscribe(event => {
|
|
173
|
+
const ds: HarnessDisplayState = harness.getDisplayState();
|
|
174
|
+
// ds.isRunning, ds.tokenUsage, ds.omProgress, ds.activeTools, etc.
|
|
175
|
+
renderUI(ds);
|
|
176
|
+
});
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
- Prompt blocks can now define their own variables schema (`requestContextSchema`), allowing you to create reusable prompt blocks with typed variable placeholders. The server now correctly computes and returns draft/published status for prompt blocks. Existing databases are automatically migrated when upgrading. ([#13351](https://github.com/mastra-ai/mastra/pull/13351))
|
|
180
|
+
|
|
181
|
+
- **Workspace instruction improvements** ([#13304](https://github.com/mastra-ai/mastra/pull/13304))
|
|
182
|
+
- Added `Workspace.getInstructions()`: agents now receive accurate workspace context that distinguishes sandbox-accessible paths from workspace-only paths.
|
|
183
|
+
- Added `WorkspaceInstructionsProcessor`: workspace context is injected directly into the agent system message instead of embedded in tool descriptions.
|
|
184
|
+
- Deprecated `Workspace.getPathContext()` in favour of `getInstructions()`.
|
|
185
|
+
|
|
186
|
+
Added `instructions` option to `LocalFilesystem` and `LocalSandbox`. Pass a string to fully replace default instructions, or a function to extend them with access to the current `requestContext` for per-request customization (e.g. by tenant or locale).
|
|
187
|
+
|
|
188
|
+
```typescript
|
|
189
|
+
const filesystem = new LocalFilesystem({
|
|
190
|
+
basePath: './workspace',
|
|
191
|
+
instructions: ({ defaultInstructions, requestContext }) => {
|
|
192
|
+
const locale = requestContext?.get('locale') ?? 'en';
|
|
193
|
+
return `${defaultInstructions}\nLocale: ${locale}`;
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
- Added background process management to workspace sandboxes. ([#13293](https://github.com/mastra-ai/mastra/pull/13293))
|
|
199
|
+
|
|
200
|
+
You can now spawn, monitor, and manage long-running background processes (dev servers, watchers, REPLs) inside sandbox environments.
|
|
201
|
+
|
|
202
|
+
```typescript
|
|
203
|
+
// Spawn a background process
|
|
204
|
+
const handle = await sandbox.processes.spawn('node server.js');
|
|
205
|
+
|
|
206
|
+
// Stream output and wait for exit
|
|
207
|
+
const result = await handle.wait({
|
|
208
|
+
onStdout: data => console.log(data),
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
// List and manage running processes
|
|
212
|
+
const procs = await sandbox.processes.list();
|
|
213
|
+
await sandbox.processes.kill(handle.pid);
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
- `SandboxProcessManager` abstract base class with `spawn()`, `list()`, `get(pid)`, `kill(pid)`
|
|
217
|
+
- `ProcessHandle` base class with stdout/stderr accumulation, streaming callbacks, and `wait()`
|
|
218
|
+
- `LocalProcessManager` implementation wrapping Node.js `child_process`
|
|
219
|
+
- Node.js stream interop via `handle.reader` / `handle.writer`
|
|
220
|
+
- Default `executeCommand` implementation built on process manager (spawn + wait)
|
|
221
|
+
|
|
222
|
+
- Added workspace tools for background process management and improved sandbox execution UI. ([#13309](https://github.com/mastra-ai/mastra/pull/13309))
|
|
223
|
+
- `execute_command` now supports `background: true` to spawn long-running processes and return a PID
|
|
224
|
+
- New `get_process_output` tool to check output/status of background processes (supports `wait` to block until exit)
|
|
225
|
+
- New `kill_process` tool to terminate background processes
|
|
226
|
+
- Output truncation helpers with configurable tail lines
|
|
227
|
+
- Sandbox execution badge UI: terminal-style output display with streaming, exit codes, killed status, and workspace metadata
|
|
228
|
+
|
|
229
|
+
### Patch Changes
|
|
230
|
+
|
|
231
|
+
- Fixed agents-as-tools failing with OpenAI when using the model router. The auto-injected `resumeData` field (from `z.any()`) produced a JSON Schema without a `type` key, which OpenAI rejects. Tool schemas are now post-processed to ensure all properties have valid type information. ([#13326](https://github.com/mastra-ai/mastra/pull/13326))
|
|
232
|
+
|
|
233
|
+
- Fixed `stopWhen` callback receiving empty `toolResults` on steps. `step.toolResults` now correctly reflects the tool results present in `step.content`. ([#13319](https://github.com/mastra-ai/mastra/pull/13319))
|
|
234
|
+
|
|
235
|
+
- Added `hasJudge` metadata to scorer records so the studio can distinguish code-based scorers (e.g., textual-difference, content-similarity) from LLM-based scorers. This metadata is now included in all four score-saving paths: `runEvals`, scorer hooks, trace scoring, and dataset experiments. ([#13386](https://github.com/mastra-ai/mastra/pull/13386))
|
|
236
|
+
|
|
237
|
+
- Added per-file write locking to workspace tools (edit_file, write_file, ast_edit, delete). Concurrent tool calls targeting the same file are now serialized, preventing race conditions where parallel edits could silently overwrite each other. ([#13302](https://github.com/mastra-ai/mastra/pull/13302))
|
|
238
|
+
|
|
3
239
|
## 1.6.0
|
|
4
240
|
|
|
5
241
|
### Minor Changes
|
package/dist/agent/agent.d.ts
CHANGED
|
@@ -85,6 +85,12 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
85
85
|
* @internal
|
|
86
86
|
*/
|
|
87
87
|
private getSkillsProcessors;
|
|
88
|
+
/**
|
|
89
|
+
* Gets the workspace-instructions processors to add when the workspace has a
|
|
90
|
+
* filesystem or sandbox (i.e. something to describe).
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
private getWorkspaceInstructionsProcessors;
|
|
88
94
|
/**
|
|
89
95
|
* Returns the agents configured for this agent, resolving function-based agents if necessary.
|
|
90
96
|
* Used in multi-agent collaboration scenarios where this agent can delegate to other agents.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/agent/agent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAY,SAAS,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGnF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAe,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,KAAK,EAGV,aAAa,EACb,YAAY,EAEb,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,KAAK,EACV,mBAAmB,EAEnB,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1E,OAAO,KAAK,EACV,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAAE,cAAc,EAAgD,MAAM,oBAAoB,CAAC;AAElG,OAAO,KAAK,EAA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AAM,SAAS,SAAS,GACpB,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,GACf,mBAAmB,SAAS,SAAS,GACnC,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,GAC5B,OAAO,CACd,CAAC,kCAAkC,CAAC,CAAC;KACvC,CACF;IAcD;;;OAGG;IACH,4BAA4B,CAC1B,mBAAmB,EACf,OAAO,GACP;QAAE,KAAK,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAC;QAAC,YAAY,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;KAAE,GACrF,SAAS,GACZ;QACD,cAAc,EAAE,OAAO,CAAC;QACxB,KAAK,CAAC,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAC;QAC3C,YAAY,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;KACxC;IAgBD;;;OAGG;IACG,wBAAwB,CAC5B,cAAc,EAAE,cAAc,EAC9B,YAAY,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,GACrC,OAAO,CAAC,MAAM,CAAC;CAqBnB"}
|
package/dist/agent/index.cjs
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2X66GWF5_cjs = require('../chunk-2X66GWF5.cjs');
|
|
4
4
|
var chunkDB7U2C5B_cjs = require('../chunk-DB7U2C5B.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "Agent", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunk2X66GWF5_cjs.Agent; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "TripWire", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk2X66GWF5_cjs.TripWire; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "isSupportedLanguageModel", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunk2X66GWF5_cjs.isSupportedLanguageModel; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "resolveThreadIdFromArgs", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunk2X66GWF5_cjs.resolveThreadIdFromArgs; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "supportedLanguageModelSpecifications", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk2X66GWF5_cjs.supportedLanguageModelSpecifications; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "tryGenerateWithJsonFallback", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunk2X66GWF5_cjs.tryGenerateWithJsonFallback; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "tryStreamWithJsonFallback", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunk2X66GWF5_cjs.tryStreamWithJsonFallback; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "MessageList", {
|
|
37
37
|
enumerable: true,
|
package/dist/agent/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Agent, TripWire, isSupportedLanguageModel, resolveThreadIdFromArgs, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-
|
|
1
|
+
export { Agent, TripWire, isSupportedLanguageModel, resolveThreadIdFromArgs, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-QSHV7GPT.js';
|
|
2
2
|
export { MessageList, TypeDetector, aiV5ModelMessageToV2PromptMessage, convertMessages } from '../chunk-IC5OUWKJ.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkRQ56ZSIR_cjs = require('./chunk-RQ56ZSIR.cjs');
|
|
4
4
|
var chunkZCBG4ZQT_cjs = require('./chunk-ZCBG4ZQT.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunk7UAJ6LMR_cjs = require('./chunk-7UAJ6LMR.cjs');
|
|
6
|
+
var chunkYQG7NBPR_cjs = require('./chunk-YQG7NBPR.cjs');
|
|
7
7
|
var chunkDB7U2C5B_cjs = require('./chunk-DB7U2C5B.cjs');
|
|
8
8
|
var chunkZIEQA3YP_cjs = require('./chunk-ZIEQA3YP.cjs');
|
|
9
9
|
var chunkPM3UIIBK_cjs = require('./chunk-PM3UIIBK.cjs');
|
|
@@ -651,6 +651,37 @@ function isProviderTool(tool2) {
|
|
|
651
651
|
function getProviderToolName(providerId) {
|
|
652
652
|
return providerId.split(".").slice(1).join(".");
|
|
653
653
|
}
|
|
654
|
+
function fixTypelessProperties(schema) {
|
|
655
|
+
if (typeof schema !== "object" || schema === null) return schema;
|
|
656
|
+
const result = { ...schema };
|
|
657
|
+
if (result.properties && typeof result.properties === "object" && !Array.isArray(result.properties)) {
|
|
658
|
+
result.properties = Object.fromEntries(
|
|
659
|
+
Object.entries(result.properties).map(([key, value]) => {
|
|
660
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
661
|
+
return [key, value];
|
|
662
|
+
}
|
|
663
|
+
const propSchema = value;
|
|
664
|
+
const hasType = "type" in propSchema;
|
|
665
|
+
const hasRef = "$ref" in propSchema;
|
|
666
|
+
const hasAnyOf = "anyOf" in propSchema;
|
|
667
|
+
const hasOneOf = "oneOf" in propSchema;
|
|
668
|
+
const hasAllOf = "allOf" in propSchema;
|
|
669
|
+
if (!hasType && !hasRef && !hasAnyOf && !hasOneOf && !hasAllOf) {
|
|
670
|
+
return [key, { ...propSchema, type: ["string", "number", "integer", "boolean", "object", "array", "null"] }];
|
|
671
|
+
}
|
|
672
|
+
return [key, fixTypelessProperties(propSchema)];
|
|
673
|
+
})
|
|
674
|
+
);
|
|
675
|
+
}
|
|
676
|
+
if (result.items) {
|
|
677
|
+
if (Array.isArray(result.items)) {
|
|
678
|
+
result.items = result.items.map((item) => fixTypelessProperties(item));
|
|
679
|
+
} else if (typeof result.items === "object") {
|
|
680
|
+
result.items = fixTypelessProperties(result.items);
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
return result;
|
|
684
|
+
}
|
|
654
685
|
function prepareToolsAndToolChoice({
|
|
655
686
|
tools,
|
|
656
687
|
toolChoice,
|
|
@@ -696,7 +727,7 @@ function prepareToolsAndToolChoice({
|
|
|
696
727
|
type: "function",
|
|
697
728
|
name,
|
|
698
729
|
description: sdkTool.description,
|
|
699
|
-
inputSchema: chunkPM3UIIBK_cjs.asSchema(sdkTool.inputSchema).jsonSchema,
|
|
730
|
+
inputSchema: fixTypelessProperties(chunkPM3UIIBK_cjs.asSchema(sdkTool.inputSchema).jsonSchema),
|
|
700
731
|
providerOptions: sdkTool.providerOptions
|
|
701
732
|
};
|
|
702
733
|
case "provider-defined": {
|
|
@@ -3081,10 +3112,18 @@ var MastraModelOutput = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
3081
3112
|
if (self.processorRunner && !self.#options.isLLMExecutionStep) {
|
|
3082
3113
|
const lastStep = self.#bufferedSteps[self.#bufferedSteps.length - 1];
|
|
3083
3114
|
const originalText = lastStep?.text || "";
|
|
3115
|
+
const outputResultWriter = {
|
|
3116
|
+
custom: async (data) => {
|
|
3117
|
+
self.#emitChunk(data);
|
|
3118
|
+
controller.enqueue(data);
|
|
3119
|
+
}
|
|
3120
|
+
};
|
|
3084
3121
|
self.messageList = await self.processorRunner.runOutputProcessors(
|
|
3085
3122
|
self.messageList,
|
|
3086
3123
|
options.tracingContext,
|
|
3087
|
-
self.#options.requestContext
|
|
3124
|
+
self.#options.requestContext,
|
|
3125
|
+
0,
|
|
3126
|
+
outputResultWriter
|
|
3088
3127
|
);
|
|
3089
3128
|
const responseMessages = self.messageList.get.response.aiV4.core();
|
|
3090
3129
|
const lastResponseMessage = responseMessages[responseMessages.length - 1];
|
|
@@ -12676,6 +12715,7 @@ function createAgenticLoopWorkflow(params) {
|
|
|
12676
12715
|
);
|
|
12677
12716
|
const currentContent = allContent.slice(previousContentLength);
|
|
12678
12717
|
previousContentLength = allContent.length;
|
|
12718
|
+
const toolResultParts = currentContent.filter((part) => part.type === "tool-result");
|
|
12679
12719
|
const currentStep = {
|
|
12680
12720
|
content: currentContent,
|
|
12681
12721
|
usage: typedInputData.output.usage || { inputTokens: 0, outputTokens: 0, totalTokens: 0 },
|
|
@@ -12693,12 +12733,16 @@ function createAgenticLoopWorkflow(params) {
|
|
|
12693
12733
|
reasoningText: typedInputData.output.reasoningText || "",
|
|
12694
12734
|
files: typedInputData.output.files || [],
|
|
12695
12735
|
toolCalls: typedInputData.output.toolCalls || [],
|
|
12696
|
-
toolResults:
|
|
12736
|
+
toolResults: toolResultParts,
|
|
12697
12737
|
sources: typedInputData.output.sources || [],
|
|
12698
12738
|
staticToolCalls: typedInputData.output.staticToolCalls || [],
|
|
12699
12739
|
dynamicToolCalls: typedInputData.output.dynamicToolCalls || [],
|
|
12700
|
-
staticToolResults:
|
|
12701
|
-
|
|
12740
|
+
staticToolResults: toolResultParts.filter(
|
|
12741
|
+
(part) => part.dynamic === false
|
|
12742
|
+
),
|
|
12743
|
+
dynamicToolResults: toolResultParts.filter(
|
|
12744
|
+
(part) => part.dynamic === true
|
|
12745
|
+
),
|
|
12702
12746
|
providerMetadata: typedInputData.metadata?.providerMetadata
|
|
12703
12747
|
};
|
|
12704
12748
|
accumulatedSteps.push(currentStep);
|
|
@@ -16391,7 +16435,7 @@ ${skillInstructions}`;
|
|
|
16391
16435
|
message: `Reference file "${referencePath}" not found in skill "${skillName}". Available references: ${availableRefs.join(", ") || "none"}`
|
|
16392
16436
|
};
|
|
16393
16437
|
}
|
|
16394
|
-
const result =
|
|
16438
|
+
const result = chunk7UAJ6LMR_cjs.extractLines(fullContent, startLine, endLine);
|
|
16395
16439
|
return {
|
|
16396
16440
|
success: true,
|
|
16397
16441
|
content: result.content,
|
|
@@ -16437,7 +16481,7 @@ ${skillInstructions}`;
|
|
|
16437
16481
|
message: `Script file "${scriptPath}" not found in skill "${skillName}". Available scripts: ${availableScripts.join(", ") || "none"}`
|
|
16438
16482
|
};
|
|
16439
16483
|
}
|
|
16440
|
-
const result =
|
|
16484
|
+
const result = chunk7UAJ6LMR_cjs.extractLines(fullContent, startLine, endLine);
|
|
16441
16485
|
return {
|
|
16442
16486
|
success: true,
|
|
16443
16487
|
content: result.content,
|
|
@@ -16606,6 +16650,23 @@ ${skillInstructions}`;
|
|
|
16606
16650
|
}
|
|
16607
16651
|
};
|
|
16608
16652
|
|
|
16653
|
+
// src/processors/processors/workspace-instructions.ts
|
|
16654
|
+
var WorkspaceInstructionsProcessor = class {
|
|
16655
|
+
id = "workspace-instructions-processor";
|
|
16656
|
+
name = "Workspace Instructions Processor";
|
|
16657
|
+
_workspace;
|
|
16658
|
+
constructor(opts) {
|
|
16659
|
+
this._workspace = opts.workspace;
|
|
16660
|
+
}
|
|
16661
|
+
async processInputStep({ messageList, requestContext }) {
|
|
16662
|
+
const instructions = this._workspace.getInstructions({ requestContext });
|
|
16663
|
+
if (instructions) {
|
|
16664
|
+
messageList.addSystem({ role: "system", content: instructions });
|
|
16665
|
+
}
|
|
16666
|
+
return { messageList };
|
|
16667
|
+
}
|
|
16668
|
+
};
|
|
16669
|
+
|
|
16609
16670
|
// src/agent/agent-legacy.ts
|
|
16610
16671
|
var import_fast_deep_equal = chunk6SZKM6EC_cjs.__toESM(require_fast_deep_equal(), 1);
|
|
16611
16672
|
var AgentLegacyHandler = class {
|
|
@@ -18372,6 +18433,21 @@ var Agent = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
18372
18433
|
}
|
|
18373
18434
|
return [new SkillsProcessor({ workspace, format: this.#skillsFormat })];
|
|
18374
18435
|
}
|
|
18436
|
+
/**
|
|
18437
|
+
* Gets the workspace-instructions processors to add when the workspace has a
|
|
18438
|
+
* filesystem or sandbox (i.e. something to describe).
|
|
18439
|
+
* @internal
|
|
18440
|
+
*/
|
|
18441
|
+
async getWorkspaceInstructionsProcessors(configuredProcessors, requestContext) {
|
|
18442
|
+
const workspace = await this.getWorkspace({ requestContext: requestContext || new chunkVDKWYUGC_cjs.RequestContext() });
|
|
18443
|
+
if (!workspace) return [];
|
|
18444
|
+
if (!workspace.filesystem && !workspace.sandbox) return [];
|
|
18445
|
+
const hasProcessor = configuredProcessors.some(
|
|
18446
|
+
(p) => !isProcessorWorkflow(p) && "id" in p && p.id === "workspace-instructions-processor"
|
|
18447
|
+
);
|
|
18448
|
+
if (hasProcessor) return [];
|
|
18449
|
+
return [new WorkspaceInstructionsProcessor({ workspace })];
|
|
18450
|
+
}
|
|
18375
18451
|
/**
|
|
18376
18452
|
* Validates the request context against the agent's requestContextSchema.
|
|
18377
18453
|
* Throws an error if validation fails.
|
|
@@ -18527,8 +18603,9 @@ ${errorMessages}`,
|
|
|
18527
18603
|
const configuredProcessors = configuredProcessorOverrides ? configuredProcessorOverrides : this.#inputProcessors ? typeof this.#inputProcessors === "function" ? await this.#inputProcessors({ requestContext: requestContext || new chunkVDKWYUGC_cjs.RequestContext() }) : this.#inputProcessors : [];
|
|
18528
18604
|
const memory = await this.getMemory({ requestContext: requestContext || new chunkVDKWYUGC_cjs.RequestContext() });
|
|
18529
18605
|
const memoryProcessors = memory ? await memory.getInputProcessors(configuredProcessors, requestContext) : [];
|
|
18606
|
+
const workspaceProcessors = await this.getWorkspaceInstructionsProcessors(configuredProcessors, requestContext);
|
|
18530
18607
|
const skillsProcessors = await this.getSkillsProcessors(configuredProcessors, requestContext);
|
|
18531
|
-
const allProcessors = [...memoryProcessors, ...skillsProcessors, ...configuredProcessors];
|
|
18608
|
+
const allProcessors = [...memoryProcessors, ...workspaceProcessors, ...skillsProcessors, ...configuredProcessors];
|
|
18532
18609
|
return this.combineProcessorsIntoWorkflow(allProcessors, `${this.id}-input-processor`);
|
|
18533
18610
|
}
|
|
18534
18611
|
/**
|
|
@@ -19572,7 +19649,7 @@ ${errorMessages}`,
|
|
|
19572
19649
|
if (!workspace) {
|
|
19573
19650
|
return convertedWorkspaceTools;
|
|
19574
19651
|
}
|
|
19575
|
-
const workspaceTools =
|
|
19652
|
+
const workspaceTools = chunk7UAJ6LMR_cjs.createWorkspaceTools(workspace);
|
|
19576
19653
|
if (Object.keys(workspaceTools).length > 0) {
|
|
19577
19654
|
this.logger.debug(`[Agent:${this.name}] - Adding workspace tools: ${Object.keys(workspaceTools).join(", ")}`, {
|
|
19578
19655
|
runId
|
|
@@ -19611,7 +19688,7 @@ ${errorMessages}`,
|
|
|
19611
19688
|
processorStates
|
|
19612
19689
|
}) {
|
|
19613
19690
|
let tripwire;
|
|
19614
|
-
if (inputProcessorOverrides?.length || this.#inputProcessors || this.#memory) {
|
|
19691
|
+
if (inputProcessorOverrides?.length || this.#inputProcessors || this.#memory || this.#workspace || this.#mastra?.getWorkspace()) {
|
|
19615
19692
|
const runner = await this.getProcessorRunner({
|
|
19616
19693
|
requestContext,
|
|
19617
19694
|
inputProcessorOverrides,
|
|
@@ -23464,7 +23541,7 @@ var ToolSearchProcessor = class {
|
|
|
23464
23541
|
minScore: options.search?.minScore ?? 0
|
|
23465
23542
|
};
|
|
23466
23543
|
this.ttl = options.ttl ?? 36e5;
|
|
23467
|
-
this.bm25Index = new
|
|
23544
|
+
this.bm25Index = new chunk7UAJ6LMR_cjs.BM25Index({}, TOOL_SEARCH_TOKENIZE_OPTIONS);
|
|
23468
23545
|
this.indexTools();
|
|
23469
23546
|
if (this.ttl > 0) {
|
|
23470
23547
|
this.scheduleCleanup();
|
|
@@ -25139,7 +25216,7 @@ var MockMemory = class extends MastraMemory {
|
|
|
25139
25216
|
} = {}) {
|
|
25140
25217
|
super({
|
|
25141
25218
|
name: "mock",
|
|
25142
|
-
storage: storage || new
|
|
25219
|
+
storage: storage || new chunkYQG7NBPR_cjs.InMemoryStore(),
|
|
25143
25220
|
options: {
|
|
25144
25221
|
workingMemory: enableWorkingMemory ? { enabled: true, template: workingMemoryTemplate } : void 0,
|
|
25145
25222
|
lastMessages: enableMessageHistory ? 10 : void 0
|
|
@@ -25396,6 +25473,7 @@ exports.WORKING_MEMORY_START_TAG = WORKING_MEMORY_START_TAG;
|
|
|
25396
25473
|
exports.Workflow = Workflow;
|
|
25397
25474
|
exports.WorkflowRunOutput = WorkflowRunOutput;
|
|
25398
25475
|
exports.WorkingMemory = WorkingMemory;
|
|
25476
|
+
exports.WorkspaceInstructionsProcessor = WorkspaceInstructionsProcessor;
|
|
25399
25477
|
exports.augmentWithInit = augmentWithInit;
|
|
25400
25478
|
exports.cleanStepResult = cleanStepResult;
|
|
25401
25479
|
exports.cloneStep = cloneStep;
|
|
@@ -25446,5 +25524,5 @@ exports.validateStepRequestContext = validateStepRequestContext;
|
|
|
25446
25524
|
exports.validateStepResumeData = validateStepResumeData;
|
|
25447
25525
|
exports.validateStepStateData = validateStepStateData;
|
|
25448
25526
|
exports.validateStepSuspendData = validateStepSuspendData;
|
|
25449
|
-
//# sourceMappingURL=chunk-
|
|
25450
|
-
//# sourceMappingURL=chunk-
|
|
25527
|
+
//# sourceMappingURL=chunk-2X66GWF5.cjs.map
|
|
25528
|
+
//# sourceMappingURL=chunk-2X66GWF5.cjs.map
|