@mastra/core 1.23.0-alpha.5 → 1.23.0-alpha.7
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 +14 -0
- package/dist/agent/agent.d.ts +13 -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/agent/workflows/prepare-stream/index.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/map-results-step.d.ts +2 -1
- package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
- package/dist/browser/index.cjs +2 -2
- package/dist/browser/index.js +1 -1
- package/dist/channels/index.cjs +4 -4
- package/dist/channels/index.js +1 -1
- package/dist/{chunk-XFLQVMNH.cjs → chunk-2COMJWSP.cjs} +18 -18
- package/dist/{chunk-XFLQVMNH.cjs.map → chunk-2COMJWSP.cjs.map} +1 -1
- package/dist/{chunk-I6XSSR4Z.js → chunk-2DOJSEKM.js} +20 -14
- package/dist/chunk-2DOJSEKM.js.map +1 -0
- package/dist/{chunk-Z63F3XHK.js → chunk-37G434JU.js} +3 -3
- package/dist/{chunk-Z63F3XHK.js.map → chunk-37G434JU.js.map} +1 -1
- package/dist/{chunk-VO6R5RZT.js → chunk-3PX4NVO4.js} +5 -5
- package/dist/{chunk-VO6R5RZT.js.map → chunk-3PX4NVO4.js.map} +1 -1
- package/dist/{chunk-QIJFD7ZC.js → chunk-4GR73476.js} +3 -3
- package/dist/{chunk-QIJFD7ZC.js.map → chunk-4GR73476.js.map} +1 -1
- package/dist/{chunk-QRK2HWHI.js → chunk-7R6CUMCQ.js} +7 -7
- package/dist/{chunk-QRK2HWHI.js.map → chunk-7R6CUMCQ.js.map} +1 -1
- package/dist/{chunk-TKH2A57J.cjs → chunk-AC4BKIH4.cjs} +185 -185
- package/dist/{chunk-TKH2A57J.cjs.map → chunk-AC4BKIH4.cjs.map} +1 -1
- package/dist/{chunk-UENWRQLR.cjs → chunk-AESXHP7M.cjs} +5 -5
- package/dist/{chunk-UENWRQLR.cjs.map → chunk-AESXHP7M.cjs.map} +1 -1
- package/dist/{chunk-YR7XRMDN.cjs → chunk-DUKZTMIA.cjs} +6 -6
- package/dist/{chunk-YR7XRMDN.cjs.map → chunk-DUKZTMIA.cjs.map} +1 -1
- package/dist/{chunk-HWAEQSOO.js → chunk-EBLC3SZU.js} +10 -10
- package/dist/{chunk-HWAEQSOO.js.map → chunk-EBLC3SZU.js.map} +1 -1
- package/dist/{chunk-Z34TVGNZ.js → chunk-EC7FJWDQ.js} +4 -4
- package/dist/{chunk-Z34TVGNZ.js.map → chunk-EC7FJWDQ.js.map} +1 -1
- package/dist/{chunk-ZHYPWNWS.js → chunk-EFX7OKPD.js} +4 -4
- package/dist/{chunk-ZHYPWNWS.js.map → chunk-EFX7OKPD.js.map} +1 -1
- package/dist/{chunk-QYQSXRFZ.js → chunk-FEUHTHXS.js} +35 -10
- package/dist/chunk-FEUHTHXS.js.map +1 -0
- package/dist/{chunk-L2MCWEEX.js → chunk-H4DMZG2G.js} +3 -3
- package/dist/{chunk-L2MCWEEX.js.map → chunk-H4DMZG2G.js.map} +1 -1
- package/dist/{chunk-V7AX2MSJ.cjs → chunk-J2R537Z7.cjs} +32 -26
- package/dist/chunk-J2R537Z7.cjs.map +1 -0
- package/dist/{chunk-EXORPYDN.js → chunk-JI4PAFKP.js} +3 -3
- package/dist/{chunk-EXORPYDN.js.map → chunk-JI4PAFKP.js.map} +1 -1
- package/dist/{chunk-JJFGNYVY.cjs → chunk-KYH7NFDR.cjs} +7 -7
- package/dist/{chunk-JJFGNYVY.cjs.map → chunk-KYH7NFDR.cjs.map} +1 -1
- package/dist/{chunk-JNXWDPCZ.js → chunk-N4QQVYW3.js} +4 -4
- package/dist/{chunk-JNXWDPCZ.js.map → chunk-N4QQVYW3.js.map} +1 -1
- package/dist/{chunk-XZCYFQ4N.cjs → chunk-OFMVPJGK.cjs} +51 -51
- package/dist/{chunk-XZCYFQ4N.cjs.map → chunk-OFMVPJGK.cjs.map} +1 -1
- package/dist/{chunk-ZUN5CMDY.cjs → chunk-OROK2RQF.cjs} +84 -84
- package/dist/{chunk-ZUN5CMDY.cjs.map → chunk-OROK2RQF.cjs.map} +1 -1
- package/dist/{chunk-7DONY7OL.cjs → chunk-R37UG42A.cjs} +3 -3
- package/dist/{chunk-7DONY7OL.cjs.map → chunk-R37UG42A.cjs.map} +1 -1
- package/dist/{chunk-FSHOQBGF.cjs → chunk-RN6YQCOU.cjs} +9 -9
- package/dist/{chunk-FSHOQBGF.cjs.map → chunk-RN6YQCOU.cjs.map} +1 -1
- package/dist/{chunk-6UQKQBIB.js → chunk-UKYZDPXL.js} +3 -3
- package/dist/{chunk-6UQKQBIB.js.map → chunk-UKYZDPXL.js.map} +1 -1
- package/dist/{chunk-7STIIXEL.cjs → chunk-VDZYHVUM.cjs} +3 -3
- package/dist/{chunk-7STIIXEL.cjs.map → chunk-VDZYHVUM.cjs.map} +1 -1
- package/dist/{chunk-4W26D7S6.cjs → chunk-WTRV3KTS.cjs} +7 -7
- package/dist/{chunk-4W26D7S6.cjs.map → chunk-WTRV3KTS.cjs.map} +1 -1
- package/dist/{chunk-Z67JQNEH.cjs → chunk-X4JUECE7.cjs} +9 -9
- package/dist/{chunk-Z67JQNEH.cjs.map → chunk-X4JUECE7.cjs.map} +1 -1
- package/dist/{chunk-DO4JBKMT.cjs → chunk-ZGOY2O3K.cjs} +74 -49
- package/dist/chunk-ZGOY2O3K.cjs.map +1 -0
- package/dist/{chunk-TG46FM6X.js → chunk-ZZK7VFFA.js} +3 -3
- package/dist/{chunk-TG46FM6X.js.map → chunk-ZZK7VFFA.js.map} +1 -1
- package/dist/datasets/index.cjs +17 -17
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +242 -242
- package/dist/evals/index.cjs +5 -5
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +3 -3
- package/dist/evals/scoreTraces/index.js +1 -1
- package/dist/harness/harness.d.ts +2 -0
- package/dist/harness/harness.d.ts.map +1 -1
- package/dist/harness/index.cjs +20 -9
- package/dist/harness/index.cjs.map +1 -1
- package/dist/harness/index.js +17 -6
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/types.d.ts +8 -0
- package/dist/harness/types.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +20 -20
- package/dist/llm/index.js +5 -5
- package/dist/llm/model/provider-types.generated.d.ts +6 -3
- package/dist/loop/index.cjs +14 -14
- package/dist/loop/index.js +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.js +1 -1
- package/dist/mastra-GK6QM5DQ.js +3 -0
- package/dist/{mastra-O4WWP6N5.js.map → mastra-GK6QM5DQ.js.map} +1 -1
- package/dist/mastra-KE4XLMI2.cjs +12 -0
- package/dist/{mastra-VHS7LVQG.cjs.map → mastra-KE4XLMI2.cjs.map} +1 -1
- package/dist/memory/index.cjs +17 -17
- package/dist/memory/index.js +1 -1
- package/dist/models-dev-CT6FMRSU.js +3 -0
- package/dist/{models-dev-4W7JQVWR.js.map → models-dev-CT6FMRSU.js.map} +1 -1
- package/dist/models-dev-UJDAX4F3.cjs +12 -0
- package/dist/{models-dev-3IPTEPRM.cjs.map → models-dev-UJDAX4F3.cjs.map} +1 -1
- package/dist/netlify-ECN64HAF.js +3 -0
- package/dist/{netlify-FZBGNFDI.js.map → netlify-ECN64HAF.js.map} +1 -1
- package/dist/netlify-ML4C3IKP.cjs +12 -0
- package/dist/{netlify-XT32D45G.cjs.map → netlify-ML4C3IKP.cjs.map} +1 -1
- package/dist/processor-provider/index.cjs +10 -10
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +44 -44
- package/dist/processors/index.js +1 -1
- package/dist/provider-registry-6FR6AKYW.js +3 -0
- package/dist/{provider-registry-AWL2JDVF.js.map → provider-registry-6FR6AKYW.js.map} +1 -1
- package/dist/provider-registry-DRMNUKIF.cjs +40 -0
- package/dist/{provider-registry-X5PBSJ2G.cjs.map → provider-registry-DRMNUKIF.cjs.map} +1 -1
- package/dist/provider-registry.json +12 -6
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/storage/index.cjs +74 -74
- package/dist/storage/index.js +1 -1
- package/dist/stream/index.cjs +8 -8
- package/dist/stream/index.js +1 -1
- package/dist/test-utils/llm-mock.cjs +4 -4
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/utils.cjs +25 -25
- package/dist/utils.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/handlers/entry.d.ts.map +1 -1
- package/dist/workflows/index.cjs +24 -24
- package/dist/workflows/index.js +1 -1
- package/package.json +4 -4
- package/src/llm/model/provider-types.generated.d.ts +6 -3
- package/dist/chunk-DO4JBKMT.cjs.map +0 -1
- package/dist/chunk-I6XSSR4Z.js.map +0 -1
- package/dist/chunk-QYQSXRFZ.js.map +0 -1
- package/dist/chunk-V7AX2MSJ.cjs.map +0 -1
- package/dist/mastra-O4WWP6N5.js +0 -3
- package/dist/mastra-VHS7LVQG.cjs +0 -12
- package/dist/models-dev-3IPTEPRM.cjs +0 -12
- package/dist/models-dev-4W7JQVWR.js +0 -3
- package/dist/netlify-FZBGNFDI.js +0 -3
- package/dist/netlify-XT32D45G.cjs +0 -12
- package/dist/provider-registry-AWL2JDVF.js +0 -3
- package/dist/provider-registry-X5PBSJ2G.cjs +0 -40
|
@@ -1,20 +1,20 @@
|
|
|
1
|
+
import { PUBSUB_SYMBOL, STREAM_FORMAT_SYMBOL } from './chunk-2QXNHEDL.js';
|
|
1
2
|
import { createWorkspaceTools, createSkillTools, getTiktoken, BM25Index } from './chunk-EG3UGEUZ.js';
|
|
2
3
|
import { DefaultVoice } from './chunk-72EQLBZY.js';
|
|
3
|
-
import {
|
|
4
|
-
import { InMemoryStore } from './chunk-L2MCWEEX.js';
|
|
4
|
+
import { InMemoryStore } from './chunk-H4DMZG2G.js';
|
|
5
5
|
import { MessageList, coreContentToString, DefaultGeneratedFile, DefaultGeneratedFileWithType, sanitizeToolName } from './chunk-DRKIN7BQ.js';
|
|
6
6
|
import { parsePartialJson, isDeepEqualData, stepCountIs } from './chunk-2PHG443D.js';
|
|
7
7
|
import { generateId, APICallError, tool, asSchema } from './chunk-6PALJNKG.js';
|
|
8
|
-
import { noopLogger } from './chunk-C77V6J36.js';
|
|
9
8
|
import { EventEmitterPubSub } from './chunk-X2HAI3OX.js';
|
|
10
9
|
import { executeHook } from './chunk-L54GIUCB.js';
|
|
11
|
-
import { resolveModelConfig, ModelRouterEmbeddingModel, ModelRouterLanguageModel } from './chunk-
|
|
12
|
-
import { MastraLLMV1 } from './chunk-
|
|
13
|
-
import {
|
|
10
|
+
import { resolveModelConfig, ModelRouterEmbeddingModel, ModelRouterLanguageModel } from './chunk-7R6CUMCQ.js';
|
|
11
|
+
import { MastraLLMV1 } from './chunk-N4QQVYW3.js';
|
|
12
|
+
import { noopLogger } from './chunk-C77V6J36.js';
|
|
13
|
+
import { removeUndefinedValues, safeStringify, ensureToolProperties, makeCoreTool, createMastraProxy, deepMerge, generateEmptyFromSchema, selectFields, ensureSerializable, delay } from './chunk-37G434JU.js';
|
|
14
|
+
import { resolveObservabilityContext, createObservabilityContext, wrapMastra } from './chunk-ZHMULBPD.js';
|
|
14
15
|
import { ToolStream } from './chunk-DD2VNRQM.js';
|
|
15
16
|
import { createTool, Tool, isMastraTool, isProviderTool, getProviderToolName, isProviderDefinedTool } from './chunk-JTIQYXE2.js';
|
|
16
17
|
import { toStandardSchema, standardSchemaToJSONSchema, isStandardSchemaWithJSON } from './chunk-6SRTDZ7S.js';
|
|
17
|
-
import { resolveObservabilityContext, createObservabilityContext, wrapMastra } from './chunk-ZHMULBPD.js';
|
|
18
18
|
import { EntityType, getRootExportSpan, getOrCreateSpan, executeWithContext, executeWithContextSync } from './chunk-BMS7MLQV.js';
|
|
19
19
|
import { RequestContext, MASTRA_THREAD_ID_KEY, MASTRA_RESOURCE_ID_KEY } from './chunk-JGOH7RWL.js';
|
|
20
20
|
import { MastraError, getErrorFromUnknown } from './chunk-FJEVLHJT.js';
|
|
@@ -7862,6 +7862,7 @@ async function executeEntry(engine, params) {
|
|
|
7862
7862
|
execResults = await engine.executeParallel({
|
|
7863
7863
|
workflowId,
|
|
7864
7864
|
runId,
|
|
7865
|
+
resourceId,
|
|
7865
7866
|
entry,
|
|
7866
7867
|
prevStep,
|
|
7867
7868
|
stepResults,
|
|
@@ -7957,6 +7958,7 @@ async function executeEntry(engine, params) {
|
|
|
7957
7958
|
execResults = await engine.executeConditional({
|
|
7958
7959
|
workflowId,
|
|
7959
7960
|
runId,
|
|
7961
|
+
resourceId,
|
|
7960
7962
|
entry,
|
|
7961
7963
|
prevOutput,
|
|
7962
7964
|
stepResults,
|
|
@@ -7977,6 +7979,7 @@ async function executeEntry(engine, params) {
|
|
|
7977
7979
|
execResults = await engine.executeLoop({
|
|
7978
7980
|
workflowId,
|
|
7979
7981
|
runId,
|
|
7982
|
+
resourceId,
|
|
7980
7983
|
entry,
|
|
7981
7984
|
prevStep,
|
|
7982
7985
|
prevOutput,
|
|
@@ -7998,6 +8001,7 @@ async function executeEntry(engine, params) {
|
|
|
7998
8001
|
execResults = await engine.executeForeach({
|
|
7999
8002
|
workflowId,
|
|
8000
8003
|
runId,
|
|
8004
|
+
resourceId,
|
|
8001
8005
|
entry,
|
|
8002
8006
|
prevStep,
|
|
8003
8007
|
prevOutput,
|
|
@@ -19753,6 +19757,7 @@ function createMapResultsStep({
|
|
|
19753
19757
|
capabilities,
|
|
19754
19758
|
options,
|
|
19755
19759
|
resourceId,
|
|
19760
|
+
threadId: threadIdFromArgs,
|
|
19756
19761
|
runId,
|
|
19757
19762
|
requestContext,
|
|
19758
19763
|
memory,
|
|
@@ -19771,7 +19776,7 @@ function createMapResultsStep({
|
|
|
19771
19776
|
tools: toolsData.convertedTools,
|
|
19772
19777
|
toolChoice: options.toolChoice,
|
|
19773
19778
|
thread: memoryData.thread,
|
|
19774
|
-
threadId: memoryData.thread?.id,
|
|
19779
|
+
threadId: memoryData.thread?.id ?? threadIdFromArgs,
|
|
19775
19780
|
resourceId,
|
|
19776
19781
|
requestContext,
|
|
19777
19782
|
onStepFinish: async (props) => {
|
|
@@ -20308,6 +20313,7 @@ function createPrepareStreamWorkflow({
|
|
|
20308
20313
|
capabilities,
|
|
20309
20314
|
options,
|
|
20310
20315
|
resourceId,
|
|
20316
|
+
threadId: threadFromArgs?.id,
|
|
20311
20317
|
runId,
|
|
20312
20318
|
requestContext,
|
|
20313
20319
|
memory,
|
|
@@ -20519,6 +20525,23 @@ var Agent = class extends MastraBase {
|
|
|
20519
20525
|
get browser() {
|
|
20520
20526
|
return this.#browser;
|
|
20521
20527
|
}
|
|
20528
|
+
/**
|
|
20529
|
+
* Sets or updates the browser instance for this agent.
|
|
20530
|
+
* This allows hot-swapping browser configuration without recreating the agent.
|
|
20531
|
+
* Browser tools will be automatically updated on the next execution.
|
|
20532
|
+
*
|
|
20533
|
+
* @param browser - The new browser instance, or undefined to disable browser tools
|
|
20534
|
+
*/
|
|
20535
|
+
setBrowser(browser) {
|
|
20536
|
+
this.#browser = browser;
|
|
20537
|
+
}
|
|
20538
|
+
/**
|
|
20539
|
+
* Returns true if this agent was configured with its own browser instance.
|
|
20540
|
+
* Used by Harness to avoid overwriting agent-level browser configuration.
|
|
20541
|
+
*/
|
|
20542
|
+
hasOwnBrowser() {
|
|
20543
|
+
return Boolean(this.#browser);
|
|
20544
|
+
}
|
|
20522
20545
|
/**
|
|
20523
20546
|
* Gets the skills processors to add to input processors when workspace has skills.
|
|
20524
20547
|
* @internal
|
|
@@ -24004,6 +24027,8 @@ ${effectiveInstructions}`;
|
|
|
24004
24027
|
requestContext,
|
|
24005
24028
|
structuredOutput,
|
|
24006
24029
|
overrideScorers,
|
|
24030
|
+
threadId,
|
|
24031
|
+
resourceId,
|
|
24007
24032
|
...observabilityContext
|
|
24008
24033
|
});
|
|
24009
24034
|
agentSpan?.end({
|
|
@@ -29066,5 +29091,5 @@ var MockMemory = class extends MastraMemory {
|
|
|
29066
29091
|
};
|
|
29067
29092
|
|
|
29068
29093
|
export { Agent, AgentChannels, AgentsMDInjector, BaseProcessor, BatchPartsProcessor, ChatChannelProcessor, ChunkFrom, DefaultExecutionEngine, ExecutionEngine, FilePartSchema, ImagePartSchema, LanguageDetector, MastraAgentNetworkStream, MastraMemory, MastraModelOutput, MastraScorer, MastraStateAdapter, MemoryProcessor, MessageContentSchema, MessageHistory, MessagePartSchema, MockMemory, ModerationProcessor, PIIDetector, ProcessorInputPhaseSchema, ProcessorInputStepPhaseSchema, ProcessorMessageContentSchema, ProcessorMessageSchema, ProcessorOutputResultPhaseSchema, ProcessorOutputStepPhaseSchema, ProcessorOutputStreamPhaseSchema, ProcessorRunner, ProcessorState, ProcessorStepInputSchema, ProcessorStepOutputSchema, ProcessorStepSchema, PromptInjectionDetector, ReasoningPartSchema, Run, SYSTEM_REMINDER_END_TAG, SYSTEM_REMINDER_START_TAG, SemanticRecall, SkillSearchProcessor, SkillsProcessor, SourcePartSchema, StepStartPartSchema, StructuredOutputProcessor, SystemPromptScrubber, TextPartSchema, TokenLimiterProcessor, ToolCallFilter, ToolInvocationPartSchema, ToolSearchProcessor, TripWire, UnicodeNormalizer, WORKING_MEMORY_END_TAG, WORKING_MEMORY_START_TAG, Workflow, WorkflowRunOutput, WorkingMemory, WorkspaceInstructionsProcessor, augmentWithInit, cleanStepResult, cloneStep, cloneWorkflow, convertFullStreamChunkToMastra, convertFullStreamChunkToUIMessageStream, convertMastraChunkToAISDKv5, createDeprecationProxy, createScorer, createStep, createTimeTravelExecutionParams, createWorkflow, extractWorkingMemoryContent, extractWorkingMemoryTags, formatCheckFeedback, formatCompletionFeedback, formatStreamCompletionFeedback, formatValidationFeedback, forwardAgentStreamChunk, generateFinalResult, generateStructuredFinalResult, getResumeLabelsByStepId, getStepIds, getStepResult, getThreadOMMetadata, globalEmbeddingCache, hydrateSerializedStepErrors, isObservationalMemoryEnabled, isProcessor, isProcessorWorkflow, isSupportedLanguageModel, loop, mapVariable, memoryDefaultOptions, parseMemoryRequestContext, removeSystemReminderTags, removeWorkingMemoryTags, resolveThreadIdFromArgs, runChecks, runCompletionScorers, runCountDeprecationMessage, runDefaultCompletionCheck, runStreamCompletionScorers, runValidation, setThreadOMMetadata, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback, validateStepInput, validateStepRequestContext, validateStepResumeData, validateStepStateData, validateStepSuspendData };
|
|
29069
|
-
//# sourceMappingURL=chunk-
|
|
29070
|
-
//# sourceMappingURL=chunk-
|
|
29094
|
+
//# sourceMappingURL=chunk-FEUHTHXS.js.map
|
|
29095
|
+
//# sourceMappingURL=chunk-FEUHTHXS.js.map
|