@mastra/mcp-docs-server 1.2.5-alpha.1 → 1.2.5-alpha.5
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/.docs/docs/agent-builder/deploying.md +1 -1
- package/.docs/docs/agent-controller/overview.md +1 -1
- package/.docs/docs/agent-controller/session.md +1 -1
- package/.docs/docs/agents/overview.md +1 -1
- package/.docs/docs/agents/processors.md +1 -1
- package/.docs/docs/agents/supervisor-agents.md +3 -3
- package/.docs/docs/agents/using-tools.md +1 -1
- package/.docs/docs/{agents → long-running-agents}/background-tasks.md +2 -2
- package/.docs/docs/{agents → long-running-agents}/durable-agents.md +2 -2
- package/.docs/docs/{agents → long-running-agents}/goals.md +1 -1
- package/.docs/docs/{agents → long-running-agents}/heartbeats.md +5 -5
- package/.docs/docs/{agents → long-running-agents}/signal-providers.md +4 -4
- package/.docs/docs/memory/working-memory.md +1 -1
- package/.docs/docs/observability/config.md +1 -2
- package/.docs/docs/server/pubsub.md +2 -2
- package/.docs/docs/voice/overview.md +3 -3
- package/.docs/docs/voice/speech-to-speech.md +81 -1
- package/.docs/docs/voice/speech-to-text.md +19 -1
- package/.docs/docs/voice/text-to-speech.md +21 -1
- package/.docs/docs/workflows/control-flow.md +1 -1
- package/.docs/docs/workflows/error-handling.md +1 -1
- package/.docs/docs/workflows/human-in-the-loop.md +1 -1
- package/.docs/docs/workflows/overview.md +1 -1
- package/.docs/docs/workflows/snapshots.md +1 -1
- package/.docs/docs/workflows/suspend-and-resume.md +1 -1
- package/.docs/docs/workflows/time-travel.md +1 -1
- package/.docs/docs/workflows/workflow-state.md +1 -1
- package/.docs/guides/build-your-ui/copilotkit/channels.md +76 -0
- package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +174 -0
- package/.docs/guides/build-your-ui/copilotkit/overview.md +411 -0
- package/.docs/guides/concepts/streaming.md +1 -1
- package/.docs/guides/deployment/vercel.md +1 -2
- package/.docs/guides/guide/signal-provider.md +5 -5
- package/.docs/models/environment-variables.md +1 -0
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/alibaba-cn.md +2 -1
- package/.docs/models/providers/friendli.md +1 -2
- package/.docs/models/providers/nvidia.md +3 -2
- package/.docs/models/providers/tencent-token-plan.md +7 -7
- package/.docs/models/providers/tencent-tokenhub.md +5 -4
- package/.docs/models/providers.md +1 -0
- package/.docs/reference/acp/acp-agent.md +5 -5
- package/.docs/reference/acp/create-acp-tool.md +5 -5
- package/.docs/reference/agent-controller/agent-controller-class.md +27 -27
- package/.docs/reference/agents/agent.md +34 -34
- package/.docs/reference/agents/channels.md +19 -19
- package/.docs/reference/agents/createSkill.md +2 -2
- package/.docs/reference/agents/durable-agent.md +22 -22
- package/.docs/reference/agents/generate.md +10 -10
- package/.docs/reference/agents/generateLegacy.md +12 -12
- package/.docs/reference/agents/getMetadata.md +1 -1
- package/.docs/reference/agents/getVoice.md +1 -1
- package/.docs/reference/agents/inngest-agent.md +9 -9
- package/.docs/reference/agents/network.md +1 -1
- package/.docs/reference/ai-sdk/chat-route.md +4 -4
- package/.docs/reference/ai-sdk/handle-chat-stream.md +6 -6
- package/.docs/reference/ai-sdk/handle-network-stream.md +3 -3
- package/.docs/reference/ai-sdk/handle-workflow-stream.md +1 -1
- package/.docs/reference/ai-sdk/network-route.md +4 -4
- package/.docs/reference/ai-sdk/to-ai-sdk-messages.md +1 -1
- package/.docs/reference/ai-sdk/to-ai-sdk-stream.md +1 -1
- package/.docs/reference/ai-sdk/with-mastra.md +2 -2
- package/.docs/reference/ai-sdk/workflow-route.md +2 -2
- package/.docs/reference/ai-sdk/workflow-snapshot-to-stream.md +1 -1
- package/.docs/reference/auth/google.md +10 -10
- package/.docs/reference/auth/okta.md +11 -11
- package/.docs/reference/auth/workos.md +3 -3
- package/.docs/reference/channels/slack-provider.md +15 -15
- package/.docs/reference/cli/mastra.md +145 -0
- package/.docs/reference/client-js/agents.md +9 -9
- package/.docs/reference/client-js/mastra-client.md +5 -5
- package/.docs/reference/client-js/responses.md +3 -3
- package/.docs/reference/configuration.md +1 -1
- package/.docs/reference/core/getAgentById.md +3 -3
- package/.docs/reference/core/getWorkflow.md +1 -1
- package/.docs/reference/core/listWorkflows.md +1 -1
- package/.docs/reference/core/mastra-class.md +3 -3
- package/.docs/reference/core/removeWorkspace.md +2 -2
- package/.docs/reference/datasets/compareExperiments.md +1 -1
- package/.docs/reference/datasets/getItemHistory.md +1 -1
- package/.docs/reference/datasets/list.md +5 -5
- package/.docs/reference/datasets/listExperimentResults.md +4 -4
- package/.docs/reference/datasets/listExperiments.md +4 -4
- package/.docs/reference/datasets/listItems.md +5 -5
- package/.docs/reference/datasets/listVersions.md +3 -3
- package/.docs/reference/datasets/startExperiment.md +8 -8
- package/.docs/reference/datasets/startExperimentAsync.md +1 -1
- package/.docs/reference/editor/agent-builder/agent-builder-options.md +4 -4
- package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +7 -7
- package/.docs/reference/editor/agent-builder/builder-models.md +4 -4
- package/.docs/reference/editor/blob-store-provider.md +2 -2
- package/.docs/reference/editor/browser-provider.md +2 -2
- package/.docs/reference/editor/filesystem-provider.md +2 -2
- package/.docs/reference/editor/mastra-editor.md +2 -2
- package/.docs/reference/editor/processor-provider.md +4 -4
- package/.docs/reference/editor/sandbox-provider.md +2 -2
- package/.docs/reference/editor/storage-browser-ref.md +2 -2
- package/.docs/reference/editor/storage-workspace-ref.md +7 -7
- package/.docs/reference/evals/create-scorer.md +8 -8
- package/.docs/reference/evals/rubric.md +1 -1
- package/.docs/reference/evals/run-evals.md +7 -7
- package/.docs/reference/evals/trajectory-accuracy.md +1 -1
- package/.docs/reference/index.md +2 -2
- package/.docs/reference/logging/pino-logger.md +4 -4
- package/.docs/reference/memory/cloneThread.md +35 -4
- package/.docs/reference/memory/memory-class.md +5 -5
- package/.docs/reference/memory/observational-memory.md +43 -43
- package/.docs/reference/memory/recall.md +4 -4
- package/.docs/reference/memory/serialized-memory-config.md +6 -6
- package/.docs/reference/observability/tracing/configuration.md +4 -4
- package/.docs/reference/processors/language-detector.md +1 -1
- package/.docs/reference/processors/moderation-processor.md +1 -1
- package/.docs/reference/processors/pii-detector.md +1 -1
- package/.docs/reference/processors/processor-interface.md +20 -20
- package/.docs/reference/processors/prompt-injection-detector.md +1 -1
- package/.docs/reference/processors/response-cache.md +6 -6
- package/.docs/reference/processors/unicode-normalizer.md +1 -1
- package/.docs/reference/pubsub/base.md +7 -7
- package/.docs/reference/pubsub/caching-pubsub.md +1 -1
- package/.docs/reference/pubsub/event-emitter.md +2 -2
- package/.docs/reference/pubsub/google-cloud-pubsub.md +1 -1
- package/.docs/reference/pubsub/lease-provider.md +3 -3
- package/.docs/reference/pubsub/redis-streams.md +6 -6
- package/.docs/reference/pubsub/unix-socket-pubsub.md +1 -1
- package/.docs/reference/rag/chunk.md +2 -2
- package/.docs/reference/server/create-route.md +3 -3
- package/.docs/reference/server/express-adapter.md +4 -4
- package/.docs/reference/server/fastify-adapter.md +4 -4
- package/.docs/reference/server/hono-adapter.md +4 -4
- package/.docs/reference/server/koa-adapter.md +4 -4
- package/.docs/reference/server/mastra-server.md +1 -1
- package/.docs/reference/server/nestjs-adapter.md +3 -3
- package/.docs/reference/server/register-api-route.md +3 -3
- package/.docs/reference/signals/create-notification-inbox-tool.md +3 -3
- package/.docs/reference/signals/signal-provider.md +7 -7
- package/.docs/reference/signals/webhook-signal-provider.md +2 -2
- package/.docs/reference/storage/clickhouse.md +7 -7
- package/.docs/reference/storage/composite.md +2 -2
- package/.docs/reference/storage/duckdb.md +1 -1
- package/.docs/reference/storage/dynamodb.md +1 -1
- package/.docs/reference/storage/libsql.md +1 -1
- package/.docs/reference/storage/postgresql.md +2 -2
- package/.docs/reference/storage/redis.md +2 -2
- package/.docs/reference/storage/retention.md +5 -5
- package/.docs/reference/storage/spanner.md +6 -6
- package/.docs/reference/streaming/ChunkType.md +3 -3
- package/.docs/reference/streaming/agents/stream.md +14 -14
- package/.docs/reference/streaming/agents/streamLegacy.md +10 -10
- package/.docs/reference/streaming/agents/streamUntilIdle.md +1 -1
- package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
- package/.docs/reference/templates/overview.md +1 -140
- package/.docs/reference/tools/brightdata.md +4 -4
- package/.docs/reference/tools/create-code-mode.md +5 -5
- package/.docs/reference/tools/create-tool.md +15 -15
- package/.docs/reference/tools/graph-rag-tool.md +1 -1
- package/.docs/reference/tools/mcp-client.md +2 -2
- package/.docs/reference/tools/mcp-server.md +12 -12
- package/.docs/reference/tools/perplexity.md +3 -3
- package/.docs/reference/tools/tavily.md +1 -1
- package/.docs/reference/tools/vector-query-tool.md +1 -1
- package/.docs/reference/vectors/chroma.md +1 -1
- package/.docs/reference/vectors/mongodb.md +1 -1
- package/.docs/reference/vectors/pg.md +1 -1
- package/.docs/reference/vectors/s3vectors.md +4 -4
- package/.docs/reference/voice/google-gemini-live.md +3 -3
- package/.docs/reference/voice/inworld-realtime.md +12 -12
- package/.docs/reference/voice/inworld.md +2 -2
- package/.docs/reference/voice/voice.on.md +1 -1
- package/.docs/reference/workflows/run-methods/resume.md +1 -1
- package/.docs/reference/workflows/run-methods/timeTravel.md +1 -1
- package/.docs/reference/workspace/agentcore-runtime-sandbox.md +4 -4
- package/.docs/reference/workspace/agentfs-filesystem.md +1 -1
- package/.docs/reference/workspace/apple-container-sandbox.md +5 -5
- package/.docs/reference/workspace/archil-filesystem.md +5 -5
- package/.docs/reference/workspace/blaxel-sandbox.md +1 -1
- package/.docs/reference/workspace/daytona-sandbox.md +1 -1
- package/.docs/reference/workspace/docker-sandbox.md +2 -2
- package/.docs/reference/workspace/e2b-sandbox.md +2 -2
- package/.docs/reference/workspace/files-sdk-filesystem.md +1 -1
- package/.docs/reference/workspace/filesystem.md +1 -1
- package/.docs/reference/workspace/local-filesystem.md +3 -3
- package/.docs/reference/workspace/local-sandbox.md +1 -1
- package/.docs/reference/workspace/mesa-filesystem.md +3 -3
- package/.docs/reference/workspace/modal-sandbox.md +1 -1
- package/.docs/reference/workspace/railway-sandbox.md +1 -1
- package/.docs/reference/workspace/s3-filesystem.md +4 -4
- package/.docs/reference/workspace/sandbox.md +1 -1
- package/.docs/reference/workspace/{vercel-microvm-sandbox.md → vercel-sandbox.md} +21 -15
- package/.docs/reference/workspace/{vercel.md → vercel-serverless.md} +21 -14
- package/.docs/reference/workspace/workspace-class.md +15 -15
- package/CHANGELOG.md +15 -0
- package/package.json +4 -4
- package/.docs/docs/agents/adding-voice.md +0 -383
- package/.docs/docs/community/contributing-templates.md +0 -5
- package/.docs/docs/community/discord.md +0 -11
- package/.docs/guides/build-your-ui/copilotkit.md +0 -291
- package/LICENSE.md +0 -30
- /package/.docs/docs/{community/licensing.md → license.md} +0 -0
- /package/.docs/docs/{agents → long-running-agents}/signals.md +0 -0
|
@@ -34,7 +34,7 @@ const response = await agent.generate('How can I reset my password?')
|
|
|
34
34
|
|
|
35
35
|
## Parameters
|
|
36
36
|
|
|
37
|
-
**id** (`string`): The ID of the agent to retrieve. Mastra first searches registered agents by
|
|
37
|
+
**id** (`string`): The ID of the agent to retrieve. Mastra first searches registered agents by agent.id. If none match, it uses this value as the agent registry key and calls getAgent().
|
|
38
38
|
|
|
39
39
|
**version** (`{ versionId: string } | { status?: 'draft' | 'published' }`): Optional version selector for retrieving a versioned agent. When provided, the method returns a promise.
|
|
40
40
|
|
|
@@ -44,9 +44,9 @@ const response = await agent.generate('How can I reset my password?')
|
|
|
44
44
|
|
|
45
45
|
## Returns
|
|
46
46
|
|
|
47
|
-
**agent** (`TAgents[TAgentName]`): The agent instance with the specified ID when
|
|
47
|
+
**agent** (`TAgents[TAgentName]`): The agent instance with the specified ID when version is omitted.
|
|
48
48
|
|
|
49
|
-
**agent** (`Promise<TAgents[TAgentName]>`): A promise that resolves to the versioned agent instance when
|
|
49
|
+
**agent** (`Promise<TAgents[TAgentName]>`): A promise that resolves to the versioned agent instance when version is provided.
|
|
50
50
|
|
|
51
51
|
Throws a `MastraError` when no agent is found by ID or registry key.
|
|
52
52
|
|
|
@@ -33,7 +33,7 @@ If you need to retrieve a workflow by its `id` property instead of its registrat
|
|
|
33
33
|
|
|
34
34
|
**id** (`TWorkflowId extends keyof TWorkflows`): The ID of the workflow to retrieve. Must be a valid workflow ID that exists in the Mastra configuration.
|
|
35
35
|
|
|
36
|
-
**options** (`{ serialized?: boolean }`): Optional configuration object. When
|
|
36
|
+
**options** (`{ serialized?: boolean }`): Optional configuration object. When serialized is true, returns only the workflow name instead of the full workflow instance.
|
|
37
37
|
|
|
38
38
|
## Returns
|
|
39
39
|
|
|
@@ -12,7 +12,7 @@ mastra.listWorkflows()
|
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
15
|
-
**options** (`{ serialized?: boolean }`): Optional configuration object. When
|
|
15
|
+
**options** (`{ serialized?: boolean }`): Optional configuration object. When serialized is true, returns simplified workflow objects with only the name property instead of full workflow instances.
|
|
16
16
|
|
|
17
17
|
## Returns
|
|
18
18
|
|
|
@@ -69,7 +69,7 @@ Visit the [Configuration reference](https://mastra.ai/reference/configuration) f
|
|
|
69
69
|
|
|
70
70
|
**observability** (`ObservabilityEntrypoint`): Observability configuration for tracing and monitoring
|
|
71
71
|
|
|
72
|
-
**environment** (`string`): Deployment environment name (e.g.
|
|
72
|
+
**environment** (`string`): Deployment environment name (e.g. production, staging, development). When set, automatically attached to all observability signals so they can be filtered by environment without passing tracingOptions.metadata.environment on each call. Falls back to process.env.NODE\_ENV when unset; left undefined if neither is set. Per-call tracingOptions.metadata.environment always takes precedence.
|
|
73
73
|
|
|
74
74
|
**deployer** (`MastraDeployer`): An instance of a MastraDeployer for managing deployments.
|
|
75
75
|
|
|
@@ -91,13 +91,13 @@ Visit the [Configuration reference](https://mastra.ai/reference/configuration) f
|
|
|
91
91
|
|
|
92
92
|
**notifications.dispatch** (`NotificationDispatchConfig`): Scheduled dispatch configuration for deferred notifications and notification summaries. Dispatch is enabled by default.
|
|
93
93
|
|
|
94
|
-
**notifications.dispatch.enabled** (`boolean`): Set to
|
|
94
|
+
**notifications.dispatch.enabled** (`boolean`): Set to false to opt out of automatic scheduled notification dispatch.
|
|
95
95
|
|
|
96
96
|
**notifications.dispatch.cron** (`string`): Cron schedule used by the internal notification dispatcher workflow.
|
|
97
97
|
|
|
98
98
|
**notifications.dispatch.batchSize** (`number`): Maximum number of due notification records to process per dispatch run.
|
|
99
99
|
|
|
100
|
-
**versions** (`VersionOverrides`): Global version overrides for sub-agent delegation. When a supervisor agent delegates to a sub-agent, these overrides determine which stored version of that sub-agent to use instead of the code-defined default. Requires the editor package to be configured. See
|
|
100
|
+
**versions** (`VersionOverrides`): Global version overrides for sub-agent delegation. When a supervisor agent delegates to a sub-agent, these overrides determine which stored version of that sub-agent to use instead of the code-defined default. Requires the editor package to be configured. See Sub-agent versioning for details.
|
|
101
101
|
|
|
102
102
|
**versions.agents** (`Record<string, VersionSelector>`): A map of agent IDs to their version selectors. Each selector can target a specific version by ID or by publication status.
|
|
103
103
|
|
|
@@ -14,11 +14,11 @@ await mastra.removeWorkspace('workspace-123', { destroy: true })
|
|
|
14
14
|
|
|
15
15
|
**id** (`string`): The ID of the workspace to remove.
|
|
16
16
|
|
|
17
|
-
**options** (`{ destroy?: boolean }`): Optional cleanup behavior. Set
|
|
17
|
+
**options** (`{ destroy?: boolean }`): Optional cleanup behavior. Set destroy to true to call workspace.destroy() before removing the workspace.
|
|
18
18
|
|
|
19
19
|
## Returns
|
|
20
20
|
|
|
21
|
-
**removed** (`Promise<boolean>`):
|
|
21
|
+
**removed** (`Promise<boolean>`): true when a workspace was removed. false when no workspace exists for the ID.
|
|
22
22
|
|
|
23
23
|
When `destroy` is `true` and `workspace.destroy()` throws, the call rejects with that error and the workspace remains registered so the caller can retry cleanup.
|
|
24
24
|
|
|
@@ -40,7 +40,7 @@ for (const item of comparison.items) {
|
|
|
40
40
|
|
|
41
41
|
**experimentIds** (`string[]`): Array of experiment IDs to compare. Must contain at least 2.
|
|
42
42
|
|
|
43
|
-
**baselineId** (`string`): ID of the baseline experiment. Defaults to the first ID in
|
|
43
|
+
**baselineId** (`string`): ID of the baseline experiment. Defaults to the first ID in experimentIds.
|
|
44
44
|
|
|
45
45
|
## Returns
|
|
46
46
|
|
|
@@ -38,7 +38,7 @@ for (const row of history) {
|
|
|
38
38
|
|
|
39
39
|
**result.datasetVersion** (`number`): Dataset version for this row.
|
|
40
40
|
|
|
41
|
-
**result.validTo** (`number | null`): Version at which this row was superseded, or
|
|
41
|
+
**result.validTo** (`number | null`): Version at which this row was superseded, or null if still current.
|
|
42
42
|
|
|
43
43
|
**result.isDeleted** (`boolean`): Whether this row represents a deletion.
|
|
44
44
|
|
|
@@ -36,9 +36,9 @@ const forAgents = await mastra.datasets.list({
|
|
|
36
36
|
|
|
37
37
|
## Parameters
|
|
38
38
|
|
|
39
|
-
**page** (`number`): Page number. Defaults to
|
|
39
|
+
**page** (`number`): Page number. Defaults to 0.
|
|
40
40
|
|
|
41
|
-
**perPage** (`number`): Number of datasets per page. Defaults to
|
|
41
|
+
**perPage** (`number`): Number of datasets per page. Defaults to 20.
|
|
42
42
|
|
|
43
43
|
**filters** (`object`): Optional filters applied at the storage layer.
|
|
44
44
|
|
|
@@ -52,9 +52,9 @@ const forAgents = await mastra.datasets.list({
|
|
|
52
52
|
|
|
53
53
|
**filters.targetType** (`'agent' | 'workflow' | 'scorer' | 'processor'`): Restrict to datasets targeting this component type.
|
|
54
54
|
|
|
55
|
-
**filters.targetIds** (`string[]`): Restrict to datasets whose
|
|
55
|
+
**filters.targetIds** (`string[]`): Restrict to datasets whose targetIds intersect this list (any-overlap match). Empty array is treated as no filter.
|
|
56
56
|
|
|
57
|
-
**filters.name** (`string`): Case-insensitive substring match on dataset
|
|
57
|
+
**filters.name** (`string`): Case-insensitive substring match on dataset name. Empty string is treated as no filter.
|
|
58
58
|
|
|
59
59
|
## Returns
|
|
60
60
|
|
|
@@ -62,4 +62,4 @@ const forAgents = await mastra.datasets.list({
|
|
|
62
62
|
|
|
63
63
|
**result.datasets** (`DatasetRecord[]`): Array of dataset records. See dataset.getDetails() for the record shape.
|
|
64
64
|
|
|
65
|
-
**result.pagination** (`PaginationInfo`): Pagination metadata with
|
|
65
|
+
**result.pagination** (`PaginationInfo`): Pagination metadata with total, page, perPage, and hasMore.
|
|
@@ -48,11 +48,11 @@ for (const result of results) {
|
|
|
48
48
|
|
|
49
49
|
**status** (`'needs-review' | 'reviewed' | 'complete'`): Restrict results to this per-result review status.
|
|
50
50
|
|
|
51
|
-
**filters** (`ExperimentTenancyFilters`): Multi-tenant scoping filters (
|
|
51
|
+
**filters** (`ExperimentTenancyFilters`): Multi-tenant scoping filters (organizationId, projectId). Forwarded to the storage layer.
|
|
52
52
|
|
|
53
|
-
**page** (`number`): Page number. Defaults to
|
|
53
|
+
**page** (`number`): Page number. Defaults to 0.
|
|
54
54
|
|
|
55
|
-
**perPage** (`number`): Number of results per page. Defaults to
|
|
55
|
+
**perPage** (`number`): Number of results per page. Defaults to 20.
|
|
56
56
|
|
|
57
57
|
## Returns
|
|
58
58
|
|
|
@@ -86,4 +86,4 @@ for (const result of results) {
|
|
|
86
86
|
|
|
87
87
|
**result.results.createdAt** (`Date`): When the result record was created.
|
|
88
88
|
|
|
89
|
-
**result.pagination** (`PaginationInfo`): Pagination metadata with
|
|
89
|
+
**result.pagination** (`PaginationInfo`): Pagination metadata with total, page, perPage, and hasMore.
|
|
@@ -43,11 +43,11 @@ for (const exp of experiments) {
|
|
|
43
43
|
|
|
44
44
|
**status** (`'pending' | 'running' | 'completed' | 'failed'`): Restrict results to experiments in this status.
|
|
45
45
|
|
|
46
|
-
**filters** (`ExperimentTenancyFilters`): Multi-tenant scoping filters (
|
|
46
|
+
**filters** (`ExperimentTenancyFilters`): Multi-tenant scoping filters (organizationId, projectId). Forwarded to the storage layer.
|
|
47
47
|
|
|
48
|
-
**page** (`number`): Page number. Defaults to
|
|
48
|
+
**page** (`number`): Page number. Defaults to 0.
|
|
49
49
|
|
|
50
|
-
**perPage** (`number`): Number of experiments per page. Defaults to
|
|
50
|
+
**perPage** (`number`): Number of experiments per page. Defaults to 20.
|
|
51
51
|
|
|
52
52
|
## Returns
|
|
53
53
|
|
|
@@ -89,4 +89,4 @@ for (const exp of experiments) {
|
|
|
89
89
|
|
|
90
90
|
**result.experiments.updatedAt** (`Date`): When the experiment record was last updated.
|
|
91
91
|
|
|
92
|
-
**result.pagination** (`PaginationInfo`): Pagination metadata with
|
|
92
|
+
**result.pagination** (`PaginationInfo`): Pagination metadata with total, page, perPage, and hasMore.
|
|
@@ -33,11 +33,11 @@ const versionedItems = await dataset.listItems({ version: 2 })
|
|
|
33
33
|
|
|
34
34
|
## Parameters
|
|
35
35
|
|
|
36
|
-
**version** (`number`): Dataset version to list items at. When passed on its own, returns every item at that version as a bare
|
|
36
|
+
**version** (`number`): Dataset version to list items at. When passed on its own, returns every item at that version as a bare DatasetItem\[] snapshot. Passing search / page / perPage alongside version switches to the paginated shape.
|
|
37
37
|
|
|
38
|
-
**page** (`number`): Page number for pagination. Defaults to
|
|
38
|
+
**page** (`number`): Page number for pagination. Defaults to 0.
|
|
39
39
|
|
|
40
|
-
**perPage** (`number`): Number of items per page. Defaults to
|
|
40
|
+
**perPage** (`number`): Number of items per page. Defaults to 20.
|
|
41
41
|
|
|
42
42
|
**search** (`string`): Search string to filter items.
|
|
43
43
|
|
|
@@ -45,7 +45,7 @@ const versionedItems = await dataset.listItems({ version: 2 })
|
|
|
45
45
|
|
|
46
46
|
When only `version` is provided (no `search`, `page`, or `perPage`):
|
|
47
47
|
|
|
48
|
-
**result** (`Promise<DatasetItem[]>`): Bare array of every item at the specified dataset version. This shape is retained for backwards compatibility and is deprecated — pass
|
|
48
|
+
**result** (`Promise<DatasetItem[]>`): Bare array of every item at the specified dataset version. This shape is retained for backwards compatibility and is deprecated — pass page / perPage (or search) to always receive the paginated shape below.
|
|
49
49
|
|
|
50
50
|
In all other cases (no arguments, or `search` / `page` / `perPage` provided with or without `version`):
|
|
51
51
|
|
|
@@ -59,6 +59,6 @@ In all other cases (no arguments, or `search` / `page` / `perPage` provided with
|
|
|
59
59
|
|
|
60
60
|
**result.pagination.page** (`number`): Current page number.
|
|
61
61
|
|
|
62
|
-
**result.pagination.perPage** (`number | false`): Items per page, or
|
|
62
|
+
**result.pagination.perPage** (`number | false`): Items per page, or false if unpaginated.
|
|
63
63
|
|
|
64
64
|
**result.pagination.hasMore** (`boolean`): Whether more pages are available.
|
|
@@ -26,9 +26,9 @@ for (const version of versions) {
|
|
|
26
26
|
|
|
27
27
|
## Parameters
|
|
28
28
|
|
|
29
|
-
**page** (`number`): Page number. Defaults to
|
|
29
|
+
**page** (`number`): Page number. Defaults to 0.
|
|
30
30
|
|
|
31
|
-
**perPage** (`number`): Number of versions per page. Defaults to
|
|
31
|
+
**perPage** (`number`): Number of versions per page. Defaults to 20.
|
|
32
32
|
|
|
33
33
|
## Returns
|
|
34
34
|
|
|
@@ -50,6 +50,6 @@ for (const version of versions) {
|
|
|
50
50
|
|
|
51
51
|
**result.pagination.page** (`number`): Current page number.
|
|
52
52
|
|
|
53
|
-
**result.pagination.perPage** (`number | false`): Versions per page, or
|
|
53
|
+
**result.pagination.perPage** (`number | false`): Versions per page, or false if unpaginated.
|
|
54
54
|
|
|
55
55
|
**result.pagination.hasMore** (`boolean`): Whether more pages are available.
|
|
@@ -57,11 +57,11 @@ console.log(`Status: ${summary2.status}`)
|
|
|
57
57
|
|
|
58
58
|
## Parameters
|
|
59
59
|
|
|
60
|
-
**targetType** (`'agent' | 'workflow' | 'scorer'`): Type of registered target to run items against. Use with
|
|
60
|
+
**targetType** (`'agent' | 'workflow' | 'scorer'`): Type of registered target to run items against. Use with targetId.
|
|
61
61
|
|
|
62
|
-
**targetId** (`string`): ID of the registered target. Use with
|
|
62
|
+
**targetId** (`string`): ID of the registered target. Use with targetType.
|
|
63
63
|
|
|
64
|
-
**scorers** (`(MastraScorer | string)[] | AgentScorerConfig | WorkflowScorerConfig`): Scorers to evaluate each result. Accepts a flat array of
|
|
64
|
+
**scorers** (`(MastraScorer | string)[] | AgentScorerConfig | WorkflowScorerConfig`): Scorers to evaluate each result. Accepts a flat array of MastraScorer instances or registered scorer IDs, or the same categorised config shape used by runEvals (AgentScorerConfig / WorkflowScorerConfig). Trajectory scorers (type: "trajectory") automatically receive a pre-extracted Trajectory as their output regardless of which form is used. For workflow targets, per-step scorers can be passed via scorers: { steps: { stepId: \[...] } } and run against each step's output; their results carry the originating stepId and keep targetScope: "span" (matching runEvals).
|
|
65
65
|
|
|
66
66
|
**name** (`string`): Display name for the experiment.
|
|
67
67
|
|
|
@@ -71,13 +71,13 @@ console.log(`Status: ${summary2.status}`)
|
|
|
71
71
|
|
|
72
72
|
**version** (`number`): Pin to a specific dataset version. Defaults to the latest version.
|
|
73
73
|
|
|
74
|
-
**maxConcurrency** (`number`): Maximum concurrent item executions. Defaults to
|
|
74
|
+
**maxConcurrency** (`number`): Maximum concurrent item executions. Defaults to 5.
|
|
75
75
|
|
|
76
76
|
**signal** (`AbortSignal`): AbortSignal for cancelling the experiment.
|
|
77
77
|
|
|
78
78
|
**itemTimeout** (`number`): Per-item execution timeout in milliseconds.
|
|
79
79
|
|
|
80
|
-
**maxRetries** (`number`): Maximum retries per item on failure. Defaults to
|
|
80
|
+
**maxRetries** (`number`): Maximum retries per item on failure. Defaults to 0 (no retries). Abort errors are never retried.
|
|
81
81
|
|
|
82
82
|
## Returns
|
|
83
83
|
|
|
@@ -95,7 +95,7 @@ console.log(`Status: ${summary2.status}`)
|
|
|
95
95
|
|
|
96
96
|
**result.skippedCount** (`number`): Number of items skipped (e.g., due to abort).
|
|
97
97
|
|
|
98
|
-
**result.completedWithErrors** (`boolean`):
|
|
98
|
+
**result.completedWithErrors** (`boolean`): true if the run completed but some items failed.
|
|
99
99
|
|
|
100
100
|
**result.startedAt** (`Date`): When the experiment started.
|
|
101
101
|
|
|
@@ -109,7 +109,7 @@ console.log(`Status: ${summary2.status}`)
|
|
|
109
109
|
|
|
110
110
|
**result.results.input** (`unknown`): Input data passed to the target.
|
|
111
111
|
|
|
112
|
-
**result.results.output** (`unknown | null`): Output from the target, or
|
|
112
|
+
**result.results.output** (`unknown | null`): Output from the target, or null if failed.
|
|
113
113
|
|
|
114
114
|
**result.results.groundTruth** (`unknown | null`): Expected output from the dataset item.
|
|
115
115
|
|
|
@@ -127,7 +127,7 @@ console.log(`Status: ${summary2.status}`)
|
|
|
127
127
|
|
|
128
128
|
**result.results.scores.scorerName** (`string`): Display name of the scorer.
|
|
129
129
|
|
|
130
|
-
**result.results.scores.score** (`number | null`): Computed score, or
|
|
130
|
+
**result.results.scores.score** (`number | null`): Computed score, or null if the scorer failed.
|
|
131
131
|
|
|
132
132
|
**result.results.scores.reason** (`string | null`): Reason/explanation for the score.
|
|
133
133
|
|
|
@@ -41,7 +41,7 @@ Takes the same `StartExperimentConfig` as [`dataset.startExperiment()`](https://
|
|
|
41
41
|
|
|
42
42
|
**result.experimentId** (`string`): Unique ID of the created experiment.
|
|
43
43
|
|
|
44
|
-
**result.status** (`'pending'`): Always
|
|
44
|
+
**result.status** (`'pending'`): Always 'pending' since the experiment hasn't started executing yet.
|
|
45
45
|
|
|
46
46
|
## Related
|
|
47
47
|
|
|
@@ -38,9 +38,9 @@ new MastraEditor({
|
|
|
38
38
|
|
|
39
39
|
## Properties
|
|
40
40
|
|
|
41
|
-
**enabled** (`boolean`): Master switch. When false, the Builder UI is disabled and
|
|
41
|
+
**enabled** (`boolean`): Master switch. When false, the Builder UI is disabled and MastraEditor.resolveBuilder() returns undefined. (Default: `true`)
|
|
42
42
|
|
|
43
|
-
**features** (`{ agent?: AgentFeatures }`): UI toggles. Each key on
|
|
43
|
+
**features** (`{ agent?: AgentFeatures }`): UI toggles. Each key on features.agent defaults to true when omitted.
|
|
44
44
|
|
|
45
45
|
**features.agent.tools** (`boolean`): Show the tools tab in the agent editor.
|
|
46
46
|
|
|
@@ -54,7 +54,7 @@ new MastraEditor({
|
|
|
54
54
|
|
|
55
55
|
**features.agent.model** (`boolean`): Show the model picker in the agent editor. When false, the admin-pinned default model applies.
|
|
56
56
|
|
|
57
|
-
**features.agent.browser** (`boolean`): Show the browser tab. Resolves to true only when a valid browser provider is registered on
|
|
57
|
+
**features.agent.browser** (`boolean`): Show the browser tab. Resolves to true only when a valid browser provider is registered on MastraEditor.browsers; otherwise it is downgraded to false and a warning is logged.
|
|
58
58
|
|
|
59
59
|
**features.agent.avatarUpload** (`boolean`): Allow end users to upload an avatar for stored agents.
|
|
60
60
|
|
|
@@ -66,7 +66,7 @@ new MastraEditor({
|
|
|
66
66
|
|
|
67
67
|
**registries.skillsSh** (`{ enabled: boolean }`): Enable the skills.sh registry. When enabled, the Builder shows registry browse UI for skills.sh skills.
|
|
68
68
|
|
|
69
|
-
**registries.skillsSh.enabled** (`boolean`): Set to
|
|
69
|
+
**registries.skillsSh.enabled** (`boolean`): Set to true to opt in. Defaults to false.
|
|
70
70
|
|
|
71
71
|
## Related
|
|
72
72
|
|
|
@@ -45,29 +45,29 @@ new MastraEditor({
|
|
|
45
45
|
|
|
46
46
|
## Properties
|
|
47
47
|
|
|
48
|
-
**memory** (`SerializedMemoryConfig`): Default memory configuration for new agents. Pass
|
|
48
|
+
**memory** (`SerializedMemoryConfig`): Default memory configuration for new agents. Pass { observationalMemory: true } to enable long-lived fact extraction. Requires Mastra.storage. See the SerializedMemoryConfig reference for the full schema.
|
|
49
49
|
|
|
50
|
-
**workspace** (`StorageWorkspaceRef`): Default workspace reference for new agents. Pass
|
|
50
|
+
**workspace** (`StorageWorkspaceRef`): Default workspace reference for new agents. Pass { type: 'inline', config } to embed a snapshot, or { type: 'id', workspaceId } to point at a workspace registered on Mastra.workspace. See the StorageWorkspaceRef reference for both variants.
|
|
51
51
|
|
|
52
|
-
**browser** (`StorageBrowserRef`): Default browser configuration for new agents. Pass
|
|
52
|
+
**browser** (`StorageBrowserRef`): Default browser configuration for new agents. Pass { type: 'inline', config: { provider } } to attach a registered browser provider. See the StorageBrowserRef reference for the full schema.
|
|
53
53
|
|
|
54
54
|
**models** (`{ allowed?: ProviderModelEntry[]; default?: DefaultModelEntry }`): Model allowlist and default applied to every Builder-created agent. See the BuilderModels reference for the full schema and validation rules.
|
|
55
55
|
|
|
56
56
|
**models.allowed** (`ProviderModelEntry[]`): Allowlist of providers and models. Omit to allow every registered model. ProviderModelEntry is a discriminated union (known providers vs. custom).
|
|
57
57
|
|
|
58
|
-
**models.default** (`DefaultModelEntry`): Pre-selected model on new-agent create. Required when the model picker is hidden. DefaultModelEntry requires
|
|
58
|
+
**models.default** (`DefaultModelEntry`): Pre-selected model on new-agent create. Required when the model picker is hidden. DefaultModelEntry requires provider and modelId, with an optional kind.
|
|
59
59
|
|
|
60
60
|
**tools** (`{ allowed?: string[] }`): Allowlist of tool IDs visible in the Builder tools picker. Unknown IDs are dropped and surfaced as warnings.
|
|
61
61
|
|
|
62
|
-
**tools.allowed** (`string[]`): Allowlist of
|
|
62
|
+
**tools.allowed** (`string[]`): Allowlist of tool.id values. Omit for unrestricted, pass \[] to lock the picker down, pass \[...ids] to restrict to the listed tools.
|
|
63
63
|
|
|
64
64
|
**agents** (`{ allowed?: string[] }`): Allowlist of agent IDs visible in the Builder sub-agents picker. Unknown IDs are dropped and surfaced as warnings.
|
|
65
65
|
|
|
66
|
-
**agents.allowed** (`string[]`): Allowlist of
|
|
66
|
+
**agents.allowed** (`string[]`): Allowlist of Agent.id values. Omit for unrestricted, pass \[] to lock the picker down, pass \[...ids] to restrict to the listed agents.
|
|
67
67
|
|
|
68
68
|
**workflows** (`{ allowed?: string[] }`): Allowlist of workflow IDs visible in the Builder workflows picker. Unknown IDs are dropped and surfaced as warnings.
|
|
69
69
|
|
|
70
|
-
**workflows.allowed** (`string[]`): Allowlist of
|
|
70
|
+
**workflows.allowed** (`string[]`): Allowlist of workflow\.id values. Omit for unrestricted, pass \[] to lock the picker down, pass \[...ids] to restrict to the listed workflows.
|
|
71
71
|
|
|
72
72
|
## Related
|
|
73
73
|
|
|
@@ -33,7 +33,7 @@ new MastraEditor({
|
|
|
33
33
|
|
|
34
34
|
**allowed** (`ProviderModelEntry[]`): Allowlist of providers and models. Omit to allow every registered model. When non-empty, only the listed entries are selectable in the Builder.
|
|
35
35
|
|
|
36
|
-
**allowed.provider** (`Provider`): Provider id from the generated provider registry (for example,
|
|
36
|
+
**allowed.provider** (`Provider`): Provider id from the generated provider registry (for example, openai, anthropic).
|
|
37
37
|
|
|
38
38
|
**allowed.modelId** (`ModelForProvider<Provider>`): Specific model id for that provider. Omit to allow every model under the provider.
|
|
39
39
|
|
|
@@ -43,13 +43,13 @@ new MastraEditor({
|
|
|
43
43
|
|
|
44
44
|
**allowed.modelId** (`string`): Specific model id under the custom provider. Omit to allow every model under it.
|
|
45
45
|
|
|
46
|
-
**default** (`DefaultModelEntry`): Pre-selected model on new-agent create. Same shape as
|
|
46
|
+
**default** (`DefaultModelEntry`): Pre-selected model on new-agent create. Same shape as ProviderModelEntry, but modelId is required. Must satisfy the allowed list when set.
|
|
47
47
|
|
|
48
|
-
**default.provider** (`Provider | string`): Provider id. Use a
|
|
48
|
+
**default.provider** (`Provider | string`): Provider id. Use a Provider literal for known providers, or any string with kind: 'custom'.
|
|
49
49
|
|
|
50
50
|
**default.modelId** (`string`): Required model id. Points at a specific model, not a whole provider.
|
|
51
51
|
|
|
52
|
-
**default.kind** (`'custom'`): Set to
|
|
52
|
+
**default.kind** (`'custom'`): Set to custom when targeting a provider that isn't in the generated registry.
|
|
53
53
|
|
|
54
54
|
## Validation rules
|
|
55
55
|
|
|
@@ -21,7 +21,7 @@ new MastraEditor({
|
|
|
21
21
|
|
|
22
22
|
## Properties
|
|
23
23
|
|
|
24
|
-
**id** (`string`): Unique provider identifier (for example,
|
|
24
|
+
**id** (`string`): Unique provider identifier (for example, "storage", "s3").
|
|
25
25
|
|
|
26
26
|
**name** (`string`): Human-readable name for UI display.
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ new MastraEditor({
|
|
|
29
29
|
|
|
30
30
|
**configSchema** (`Record<string, unknown>`): JSON Schema describing provider-specific configuration. Used by the UI to render config forms.
|
|
31
31
|
|
|
32
|
-
**createBlobStore** (`(config: TConfig) => BlobStore | Promise<BlobStore>`): Create a runtime
|
|
32
|
+
**createBlobStore** (`(config: TConfig) => BlobStore | Promise<BlobStore>`): Create a runtime BlobStore instance from the stored config. Called when the editor resolves a blob store via MastraEditor.resolveBlobStore(providerId, config).
|
|
33
33
|
|
|
34
34
|
## Implementing a provider
|
|
35
35
|
|
|
@@ -21,7 +21,7 @@ new MastraEditor({
|
|
|
21
21
|
|
|
22
22
|
## Properties
|
|
23
23
|
|
|
24
|
-
**id** (`string`): Unique provider identifier (for example,
|
|
24
|
+
**id** (`string`): Unique provider identifier (for example, "stagehand"). Must match StorageBrowserConfig.provider on every stored agent that uses this provider.
|
|
25
25
|
|
|
26
26
|
**name** (`string`): Human-readable name for UI display.
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ new MastraEditor({
|
|
|
29
29
|
|
|
30
30
|
**configSchema** (`Record<string, unknown>`): JSON Schema describing provider-specific configuration. Used by the UI to render config forms.
|
|
31
31
|
|
|
32
|
-
**createBrowser** (`(config: TConfig) => MastraBrowser | Promise<MastraBrowser>`): Create a runtime
|
|
32
|
+
**createBrowser** (`(config: TConfig) => MastraBrowser | Promise<MastraBrowser>`): Create a runtime MastraBrowser instance from the stored config. Called once per agent hydration; the resulting instance is cached alongside the agent.
|
|
33
33
|
|
|
34
34
|
## Implementing a provider
|
|
35
35
|
|
|
@@ -21,7 +21,7 @@ new MastraEditor({
|
|
|
21
21
|
|
|
22
22
|
## Properties
|
|
23
23
|
|
|
24
|
-
**id** (`string`): Unique provider identifier (for example,
|
|
24
|
+
**id** (`string`): Unique provider identifier (for example, "local", "s3"). Must match StorageFilesystemConfig.provider on every stored workspace that uses this provider.
|
|
25
25
|
|
|
26
26
|
**name** (`string`): Human-readable name for UI display.
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ new MastraEditor({
|
|
|
29
29
|
|
|
30
30
|
**configSchema** (`Record<string, unknown>`): JSON Schema describing provider-specific configuration. Used by the UI to render config forms.
|
|
31
31
|
|
|
32
|
-
**createFilesystem** (`(config: TConfig) => WorkspaceFilesystem | Promise<WorkspaceFilesystem>`): Create a runtime
|
|
32
|
+
**createFilesystem** (`(config: TConfig) => WorkspaceFilesystem | Promise<WorkspaceFilesystem>`): Create a runtime WorkspaceFilesystem instance from the stored config. Called at workspace hydration time.
|
|
33
33
|
|
|
34
34
|
## Implementing a provider
|
|
35
35
|
|
|
@@ -41,9 +41,9 @@ export const mastra = new Mastra({
|
|
|
41
41
|
|
|
42
42
|
**blobStores** (`Record<string, BlobStoreProvider>`): Blob storage providers for binary data (for example, S3). Falls back to the Mastra storage blob store if no provider is specified. (Default: `{}`)
|
|
43
43
|
|
|
44
|
-
**browsers** (`Record<string, BrowserProvider>`): Browser providers for agent browser access (for example, Stagehand). No built-ins — required when
|
|
44
|
+
**browsers** (`Record<string, BrowserProvider>`): Browser providers for agent browser access (for example, Stagehand). No built-ins — required when builder.features.agent.browser is enabled. See the BrowserProvider reference for the provider interface. (Default: `{}`)
|
|
45
45
|
|
|
46
|
-
**builder** (`AgentBuilderOptions`): Agent Builder configuration. See the AgentBuilderOptions reference. Omit or set
|
|
46
|
+
**builder** (`AgentBuilderOptions`): Agent Builder configuration. See the AgentBuilderOptions reference. Omit or set enabled: false to disable the Builder.
|
|
47
47
|
|
|
48
48
|
**source** (`'code' | 'db'`): Where agent overrides are stored. With 'db', overrides live in the configured storage backend and Studio shows the save and publish flow. With 'code', overrides live as per-agent JSON files on disk (routed through a local FilesystemStore) and Studio shows filesystem actions. See the Editor overview for the difference. (Default: `'db'`)
|
|
49
49
|
|
|
@@ -26,17 +26,17 @@ new MastraEditor({
|
|
|
26
26
|
|
|
27
27
|
**info** (`ProcessorProviderInfo`): Metadata about the provider.
|
|
28
28
|
|
|
29
|
-
**info.id** (`string`): Unique identifier (for example,
|
|
29
|
+
**info.id** (`string`): Unique identifier (for example, "moderation", "token-limiter").
|
|
30
30
|
|
|
31
31
|
**info.name** (`string`): Human-readable name.
|
|
32
32
|
|
|
33
33
|
**info.description** (`string`): Short description of the provider.
|
|
34
34
|
|
|
35
|
-
**configSchema** (`ZodSchema`): Zod schema describing the configuration this provider accepts. Used by the UI to render a form. The validated config object is passed to
|
|
35
|
+
**configSchema** (`ZodSchema`): Zod schema describing the configuration this provider accepts. Used by the UI to render a form. The validated config object is passed to createProcessor().
|
|
36
36
|
|
|
37
|
-
**availablePhases** (`ProcessorPhase[]`): Phases this provider's processors support. One or more of
|
|
37
|
+
**availablePhases** (`ProcessorPhase[]`): Phases this provider's processors support. One or more of 'processInput', 'processInputStep', 'processOutputStream', 'processOutputResult', 'processOutputStep'.
|
|
38
38
|
|
|
39
|
-
**createProcessor** (`(config: Record<string, unknown>) => Processor`): Create a
|
|
39
|
+
**createProcessor** (`(config: Record<string, unknown>) => Processor`): Create a Processor instance from the validated configuration. Called during agent hydration to resolve stored processor configs into live instances.
|
|
40
40
|
|
|
41
41
|
## Implementing a provider
|
|
42
42
|
|
|
@@ -21,7 +21,7 @@ new MastraEditor({
|
|
|
21
21
|
|
|
22
22
|
## Properties
|
|
23
23
|
|
|
24
|
-
**id** (`string`): Unique provider identifier (for example,
|
|
24
|
+
**id** (`string`): Unique provider identifier (for example, "local", "e2b"). Must match StorageSandboxConfig.provider on every stored workspace that uses this provider.
|
|
25
25
|
|
|
26
26
|
**name** (`string`): Human-readable name for UI display.
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ new MastraEditor({
|
|
|
29
29
|
|
|
30
30
|
**configSchema** (`Record<string, unknown>`): JSON Schema describing provider-specific configuration. Used by the UI to render config forms.
|
|
31
31
|
|
|
32
|
-
**createSandbox** (`(config: TConfig) => WorkspaceSandbox | Promise<WorkspaceSandbox>`): Create a runtime
|
|
32
|
+
**createSandbox** (`(config: TConfig) => WorkspaceSandbox | Promise<WorkspaceSandbox>`): Create a runtime WorkspaceSandbox instance from the stored config. Called at workspace hydration time.
|
|
33
33
|
|
|
34
34
|
## Implementing a provider
|
|
35
35
|
|
|
@@ -42,7 +42,7 @@ A `{ type: 'id' }` variant for browsers isn't available — they're always inlin
|
|
|
42
42
|
|
|
43
43
|
## Properties
|
|
44
44
|
|
|
45
|
-
**type** (`'inline'`): Discriminant. Must be the literal
|
|
45
|
+
**type** (`'inline'`): Discriminant. Must be the literal "inline".
|
|
46
46
|
|
|
47
47
|
**config** (`StorageBrowserConfig`): Provider id and per-instance browser configuration. See the section below.
|
|
48
48
|
|
|
@@ -50,7 +50,7 @@ A `{ type: 'id' }` variant for browsers isn't available — they're always inlin
|
|
|
50
50
|
|
|
51
51
|
The shape embedded under `config`. Defined in `@mastra/core/storage`.
|
|
52
52
|
|
|
53
|
-
**provider** (`string`): Provider identifier (for example,
|
|
53
|
+
**provider** (`string`): Provider identifier (for example, "stagehand"). Must match a BrowserProvider.id registered on MastraEditor.browsers. There are no built-in providers.
|
|
54
54
|
|
|
55
55
|
**headless** (`boolean`): Run the browser in headless mode (no visible UI). (Default: `true`)
|
|
56
56
|
|
|
@@ -47,17 +47,17 @@ new MastraEditor({
|
|
|
47
47
|
|
|
48
48
|
## Variants
|
|
49
49
|
|
|
50
|
-
**{ type: 'id'; workspaceId: string }** (`IdRef`): Reference a workspace registered on the Mastra runtime via
|
|
50
|
+
**{ type: 'id'; workspaceId: string }** (`IdRef`): Reference a workspace registered on the Mastra runtime via new Mastra({ workspace }) or mastra.addWorkspace(). The id is the join key between admin config, stored agent record, and hydration.
|
|
51
51
|
|
|
52
|
-
**{ type: 'id'; workspaceId: string }.type** (`'id'`): Discriminant. Must be the literal
|
|
52
|
+
**{ type: 'id'; workspaceId: string }.type** (`'id'`): Discriminant. Must be the literal "id".
|
|
53
53
|
|
|
54
54
|
**{ type: 'id'; workspaceId: string }.workspaceId** (`string`): Id of a workspace registered on the Mastra runtime. Used by the Builder to snapshot, persist, and later hydrate the workspace.
|
|
55
55
|
|
|
56
|
-
**{ type: 'inline'; config: StorageWorkspaceSnapshotType }** (`InlineRef`): Embed a workspace snapshot directly. The Builder derives a deterministic id of the form
|
|
56
|
+
**{ type: 'inline'; config: StorageWorkspaceSnapshotType }** (`InlineRef`): Embed a workspace snapshot directly. The Builder derives a deterministic id of the form inline-\<sha256(config)\[:12]> and persists the snapshot, so identical inline configs are deduplicated across agents.
|
|
57
57
|
|
|
58
|
-
**{ type: 'inline'; config: StorageWorkspaceSnapshotType }.type** (`'inline'`): Discriminant. Must be the literal
|
|
58
|
+
**{ type: 'inline'; config: StorageWorkspaceSnapshotType }.type** (`'inline'`): Discriminant. Must be the literal "inline".
|
|
59
59
|
|
|
60
|
-
**{ type: 'inline'; config: StorageWorkspaceSnapshotType }.config** (`StorageWorkspaceSnapshotType`): Serialized workspace configuration (filesystem, sandbox, mounts, search, skills, tools). See the
|
|
60
|
+
**{ type: 'inline'; config: StorageWorkspaceSnapshotType }.config** (`StorageWorkspaceSnapshotType`): Serialized workspace configuration (filesystem, sandbox, mounts, search, skills, tools). See the StorageWorkspaceSnapshotType section below for the field list.
|
|
61
61
|
|
|
62
62
|
## `StorageWorkspaceSnapshotType`
|
|
63
63
|
|
|
@@ -67,9 +67,9 @@ The shape embedded under `{ type: 'inline', config }`. Defined in `@mastra/core/
|
|
|
67
67
|
|
|
68
68
|
**description** (`string`): Purpose description shown in the workspace listing.
|
|
69
69
|
|
|
70
|
-
**filesystem** (`StorageFilesystemConfig`): Primary filesystem configuration.
|
|
70
|
+
**filesystem** (`StorageFilesystemConfig`): Primary filesystem configuration. provider must match an id registered on MastraEditor.filesystems (built-in: local).
|
|
71
71
|
|
|
72
|
-
**sandbox** (`StorageSandboxConfig`): Sandbox configuration.
|
|
72
|
+
**sandbox** (`StorageSandboxConfig`): Sandbox configuration. provider must match an id registered on MastraEditor.sandboxes (built-in: local).
|
|
73
73
|
|
|
74
74
|
**mounts** (`Record<string, StorageFilesystemConfig>`): Additional filesystems mounted on the workspace, keyed by mount path.
|
|
75
75
|
|