@mastra/mcp-docs-server 1.2.4 → 1.2.5-alpha.3
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 +2 -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/kenari.md +95 -0
- package/.docs/models/providers/nvidia.md +2 -3
- package/.docs/models/providers/tencent-token-plan.md +7 -7
- package/.docs/models/providers/tencent-tokenhub.md +5 -4
- package/.docs/models/providers.md +2 -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 +5 -5
- 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
|
@@ -59,19 +59,19 @@ The constructor accepts an `MCPServerConfig` object with the following propertie
|
|
|
59
59
|
|
|
60
60
|
**version** (`string`): The semantic version of your server (e.g., '1.0.0').
|
|
61
61
|
|
|
62
|
-
**tools** (`ToolsInput`): An object where keys are tool names and values are Mastra tool definitions (created with
|
|
62
|
+
**tools** (`ToolsInput`): An object where keys are tool names and values are Mastra tool definitions (created with createTool or Vercel AI SDK). These tools will be directly exposed.
|
|
63
63
|
|
|
64
|
-
**agents** (`Record<string, Agent>`): An object where keys are agent identifiers and values are Mastra Agent instances. Each agent will be automatically converted into a tool named
|
|
64
|
+
**agents** (`Record<string, Agent>`): An object where keys are agent identifiers and values are Mastra Agent instances. Each agent will be automatically converted into a tool named ask\_\<agentIdentifier>. The agent \*\*must\*\* have a non-empty description string property defined in its constructor configuration. This description will be used in the tool's description. If an agent's description is missing or empty, an error will be thrown during MCPServer initialization.
|
|
65
65
|
|
|
66
|
-
**workflows** (`Record<string, Workflow>`): An object where keys are workflow identifiers and values are Mastra Workflow instances. Each workflow is converted into a tool named
|
|
66
|
+
**workflows** (`Record<string, Workflow>`): An object where keys are workflow identifiers and values are Mastra Workflow instances. Each workflow is converted into a tool named run\_\<workflowKey>. The workflow's inputSchema becomes the tool's input schema. The workflow \*\*must\*\* have a non-empty description string property, which is used for the tool's description. If a workflow's description is missing or empty, an error will be thrown. The tool executes the workflow by calling workflow\.createRun() followed by run.start({ inputData: \<tool\_input> }). If a tool name derived from an agent or workflow (e.g., ask\_myAgent or run\_myWorkflow) collides with an explicitly defined tool name or another derived name, the explicitly defined tool takes precedence, and a warning is logged. Agents/workflows leading to subsequent collisions are skipped.
|
|
67
67
|
|
|
68
68
|
**description** (`string`): Optional description of what the MCP server does.
|
|
69
69
|
|
|
70
70
|
**instructions** (`string`): Optional instructions describing how to use the server and its features.
|
|
71
71
|
|
|
72
|
-
**mapAuthInfoToUser** (`({ authInfo, extra, requestContext }) => unknown | null | undefined | Promise<unknown | null | undefined>`): Maps MCP transport auth data from
|
|
72
|
+
**mapAuthInfoToUser** (`({ authInfo, extra, requestContext }) => unknown | null | undefined | Promise<unknown | null | undefined>`): Maps MCP transport auth data from extra.authInfo into the user value used by Mastra FGA checks. Use this when an OAuth-protected MCP server is registered on a Mastra instance with an FGA provider.
|
|
73
73
|
|
|
74
|
-
**fga** (`{ resourceMapping?: Partial<Record<'tool' | 'tools', { fgaResourceType: string; deriveId?: ({ user, resourceId, requestContext }) => string | undefined }>>; permissionMapping?: Record<string, string> }`): Overrides resource and permission mappings for this MCP server's
|
|
74
|
+
**fga** (`{ resourceMapping?: Partial<Record<'tool' | 'tools', { fgaResourceType: string; deriveId?: ({ user, resourceId, requestContext }) => string | undefined }>>; permissionMapping?: Record<string, string> }`): Overrides resource and permission mappings for this MCP server's tools/list and tools/call FGA checks. Use this when MCP authorization should be scoped differently from internal agent or workflow tool execution.
|
|
75
75
|
|
|
76
76
|
**repository** (`Repository`): Optional repository information for the server's source code.
|
|
77
77
|
|
|
@@ -89,7 +89,7 @@ The constructor accepts an `MCPServerConfig` object with the following propertie
|
|
|
89
89
|
|
|
90
90
|
**prompts** (`MCPServerPrompts`): An object defining how the server should handle MCP prompts. See Prompt Handling section for details.
|
|
91
91
|
|
|
92
|
-
**appResources** (`AppResources`): A map of
|
|
92
|
+
**appResources** (`AppResources`): A map of ui:// URIs to app resource configurations. Each entry defines an interactive HTML UI served via the MCP Apps extension (SEP-1865). See the MCP Apps section for details.
|
|
93
93
|
|
|
94
94
|
## Exposing agents as tools
|
|
95
95
|
|
|
@@ -422,13 +422,13 @@ Here are the details for the values needed by the `startHTTP` method:
|
|
|
422
422
|
|
|
423
423
|
The `StreamableHTTPServerTransportOptions` object allows you to customize the behavior of the HTTP transport. Here are the available options:
|
|
424
424
|
|
|
425
|
-
**serverless** (`boolean`): If
|
|
425
|
+
**serverless** (`boolean`): If true, runs in stateless mode without session management. Each request is handled independently with a fresh server instance. Essential for serverless environments (Cloudflare Workers, Supabase Edge Functions, Vercel Edge, etc.) where sessions cannot persist between invocations. Defaults to false.
|
|
426
426
|
|
|
427
|
-
**sessionIdGenerator** (`(() => string) | undefined`): A function that generates a unique session ID. This should be a cryptographically secure, globally unique string. Return
|
|
427
|
+
**sessionIdGenerator** (`(() => string) | undefined`): A function that generates a unique session ID. This should be a cryptographically secure, globally unique string. Return undefined to disable session management.
|
|
428
428
|
|
|
429
429
|
**onsessioninitialized** (`(sessionId: string) => void`): A callback that is invoked when a new session is initialized. This is useful for tracking active MCP sessions.
|
|
430
430
|
|
|
431
|
-
**enableJsonResponse** (`boolean`): If
|
|
431
|
+
**enableJsonResponse** (`boolean`): If true, the server will return plain JSON responses instead of using Server-Sent Events (SSE) for streaming. Defaults to false.
|
|
432
432
|
|
|
433
433
|
**eventStore** (`EventStore`): An event store for message resumability. Providing this enables clients to reconnect and resume message streams.
|
|
434
434
|
|
|
@@ -1350,7 +1350,7 @@ The `appResources` option lets you serve interactive HTML UIs from your MCP serv
|
|
|
1350
1350
|
|
|
1351
1351
|
### `AppResources` type
|
|
1352
1352
|
|
|
1353
|
-
**Key (URI)** (`string`): A
|
|
1353
|
+
**Key (URI)** (`string`): A ui:// URI that identifies the app resource (e.g., ui://calculator/main).
|
|
1354
1354
|
|
|
1355
1355
|
Each value is an `AppResource` object:
|
|
1356
1356
|
|
|
@@ -1358,9 +1358,9 @@ Each value is an `AppResource` object:
|
|
|
1358
1358
|
|
|
1359
1359
|
**description** (`string`): Optional description of the UI resource.
|
|
1360
1360
|
|
|
1361
|
-
**html** (`string`): Inline HTML content for the UI. Provide either
|
|
1361
|
+
**html** (`string`): Inline HTML content for the UI. Provide either html or htmlPath.
|
|
1362
1362
|
|
|
1363
|
-
**htmlPath** (`string`): Path to an HTML file. Resolved at server startup. Provide either
|
|
1363
|
+
**htmlPath** (`string`): Path to an HTML file. Resolved at server startup. Provide either html or htmlPath.
|
|
1364
1364
|
|
|
1365
1365
|
**meta** (`McpUiResourceMeta`): UI resource metadata (CSP, permissions, rendering preferences) from the official ext-apps SDK.
|
|
1366
1366
|
|
|
@@ -56,11 +56,11 @@ const searchTool = createPerplexitySearchTool({ apiKey: 'pplx-...' })
|
|
|
56
56
|
|
|
57
57
|
All factory functions accept a `PerplexityClientOptions` object:
|
|
58
58
|
|
|
59
|
-
**apiKey** (`string`): Perplexity API key. Falls back to the
|
|
59
|
+
**apiKey** (`string`): Perplexity API key. Falls back to the PERPLEXITY\_API\_KEY then PPLX\_API\_KEY environment variables.
|
|
60
60
|
|
|
61
61
|
**baseUrl** (`string`): Override the API base URL. (Default: `'https://api.perplexity.ai'`)
|
|
62
62
|
|
|
63
|
-
**fetch** (`typeof fetch`): Custom
|
|
63
|
+
**fetch** (`typeof fetch`): Custom fetch implementation. Useful for tests, retries, or instrumentation.
|
|
64
64
|
|
|
65
65
|
## Methods
|
|
66
66
|
|
|
@@ -97,7 +97,7 @@ const searchTool = createPerplexitySearchTool()
|
|
|
97
97
|
|
|
98
98
|
**maxResults** (`number`): Maximum number of results to return (1-20).
|
|
99
99
|
|
|
100
|
-
**searchDomainFilter** (`string[]`): Restrict (or exclude) results by domain. Prefix a domain with
|
|
100
|
+
**searchDomainFilter** (`string[]`): Restrict (or exclude) results by domain. Prefix a domain with - to exclude it (for example, -pinterest.com). Do not mix allow- and deny-list entries in the same call.
|
|
101
101
|
|
|
102
102
|
**searchRecencyFilter** (`'hour' | 'day' | 'week' | 'month' | 'year'`): Only return results from within the given recency window.
|
|
103
103
|
|
|
@@ -57,7 +57,7 @@ By default, all tools read `TAVILY_API_KEY` from the environment. You can pass `
|
|
|
57
57
|
|
|
58
58
|
All factory functions accept `TavilyClientOptions` from `@tavily/core`:
|
|
59
59
|
|
|
60
|
-
**apiKey** (`string`): Tavily API key. Falls back to the
|
|
60
|
+
**apiKey** (`string`): Tavily API key. Falls back to the TAVILY\_API\_KEY environment variable.
|
|
61
61
|
|
|
62
62
|
**clientSource** (`string`): Attribution string sent with each request. (Default: `'mastra'`)
|
|
63
63
|
|
|
@@ -71,7 +71,7 @@ const queryTool = createVectorQueryTool({
|
|
|
71
71
|
|
|
72
72
|
**providerOptions** (`Record<string, Record<string, any>>`): Provider-specific options for the embedding model (e.g., outputDimensionality). \*\*Important\*\*: Only works with AI SDK EmbeddingModelV2 models. For V1 models, configure options when creating the model itself.
|
|
73
73
|
|
|
74
|
-
**vectorStore** (`MastraVector | VectorStoreResolver`): Direct vector store instance or a resolver function for dynamic selection. Use a function for multi-tenant applications where the vector store is selected based on request context. When provided,
|
|
74
|
+
**vectorStore** (`MastraVector | VectorStoreResolver`): Direct vector store instance or a resolver function for dynamic selection. Use a function for multi-tenant applications where the vector store is selected based on request context. When provided, vectorStoreName becomes optional.
|
|
75
75
|
|
|
76
76
|
## Returns
|
|
77
77
|
|
|
@@ -129,7 +129,7 @@ You can also provide the shape of your metadata to a `get` call for type inferen
|
|
|
129
129
|
|
|
130
130
|
**limit** (`number`): The maximum number of records to return (Default: `100`)
|
|
131
131
|
|
|
132
|
-
**offset** (`number`): Offset for returning records. Use with
|
|
132
|
+
**offset** (`number`): Offset for returning records. Use with limit to paginate results.
|
|
133
133
|
|
|
134
134
|
### `listIndexes()`
|
|
135
135
|
|
|
@@ -103,7 +103,7 @@ Searches for similar vectors with optional metadata filtering.
|
|
|
103
103
|
|
|
104
104
|
**topK** (`number`): Number of results to return (Default: `10`)
|
|
105
105
|
|
|
106
|
-
**filter** (`Record<string, any>`): Metadata filters (applies to the
|
|
106
|
+
**filter** (`Record<string, any>`): Metadata filters (applies to the metadata field)
|
|
107
107
|
|
|
108
108
|
**documentFilter** (`Record<string, any>`): Filters on original document fields (not just metadata)
|
|
109
109
|
|
|
@@ -28,7 +28,7 @@ The PgVector class provides vector search using [PostgreSQL](https://www.postgre
|
|
|
28
28
|
|
|
29
29
|
**pgPoolOptions** (`PoolConfig`): Additional pg pool configuration options
|
|
30
30
|
|
|
31
|
-
**disableInit** (`boolean`): When true, automatic DDL (schema, extension, table, and index creation) inside
|
|
31
|
+
**disableInit** (`boolean`): When true, automatic DDL (schema, extension, table, and index creation) inside createIndex is skipped. Useful for CI/CD pipelines where schema and indexes are managed separately and the runtime database role lacks DDL privileges. Can also be enabled with the MASTRA\_DISABLE\_STORAGE\_INIT environment variable. (Default: `false`)
|
|
32
32
|
|
|
33
33
|
## Constructor examples
|
|
34
34
|
|
|
@@ -88,9 +88,9 @@ await store.disconnect()
|
|
|
88
88
|
|
|
89
89
|
**vectorBucketName** (`string`): Target S3 Vectors vector bucket name.
|
|
90
90
|
|
|
91
|
-
**clientConfig** (`S3VectorsClientConfig`): AWS SDK v3 client options (e.g.,
|
|
91
|
+
**clientConfig** (`S3VectorsClientConfig`): AWS SDK v3 client options (e.g., region, credentials).
|
|
92
92
|
|
|
93
|
-
**nonFilterableMetadataKeys** (`string[]`): Metadata keys that should NOT be filterable (applied to the index at creation time). Use this for large text fields like
|
|
93
|
+
**nonFilterableMetadataKeys** (`string[]`): Metadata keys that should NOT be filterable (applied to the index at creation time). Use this for large text fields like content.
|
|
94
94
|
|
|
95
95
|
## Methods
|
|
96
96
|
|
|
@@ -102,7 +102,7 @@ Creates a new vector index in the configured vector bucket. If the index already
|
|
|
102
102
|
|
|
103
103
|
**dimension** (`number`): Vector dimension (must match your embedding model)
|
|
104
104
|
|
|
105
|
-
**metric** (`'cosine' | 'euclidean'`): Distance metric for similarity search.
|
|
105
|
+
**metric** (`'cosine' | 'euclidean'`): Distance metric for similarity search. dotproduct is not supported by S3 Vectors. (Default: `cosine`)
|
|
106
106
|
|
|
107
107
|
### `upsert()`
|
|
108
108
|
|
|
@@ -126,7 +126,7 @@ Searches for nearest neighbors with optional metadata filtering.
|
|
|
126
126
|
|
|
127
127
|
**topK** (`number`): Number of results to return (Default: `10`)
|
|
128
128
|
|
|
129
|
-
**filter** (`S3VectorsFilter`): JSON-based metadata filter supporting
|
|
129
|
+
**filter** (`S3VectorsFilter`): JSON-based metadata filter supporting $and, $or, $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $exists.
|
|
130
130
|
|
|
131
131
|
**includeVector** (`boolean`): Whether to include vectors in the results (Default: `false`)
|
|
132
132
|
|
|
@@ -162,7 +162,7 @@ await voice.sendContext([
|
|
|
162
162
|
await voice.send(micStream)
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
**turns** (`IncrementalTurn[]`): Prior conversation turns to seed into the session. Each turn has a
|
|
165
|
+
**turns** (`IncrementalTurn[]`): Prior conversation turns to seed into the session. Each turn has a role ("user" or "assistant") and content string. Both roles are supported on newer models (e.g. gemini-2.5-flash-native-audio-preview-12-2025). Some older models only accept user-role turns.
|
|
166
166
|
|
|
167
167
|
**options** (`object`): Optional configuration.
|
|
168
168
|
|
|
@@ -266,9 +266,9 @@ The GeminiLiveVoice class emits the following events:
|
|
|
266
266
|
|
|
267
267
|
**speaking** (`event`): Emitted with audio metadata. Callback receives { audioData?: Int16Array, sampleRate?: number }.
|
|
268
268
|
|
|
269
|
-
**writing** (`event`): Emitted when transcribed text is available. Callback receives { text: string, role: 'assistant' | 'user' }. On native-audio models the assistant transcript is driven by the server's
|
|
269
|
+
**writing** (`event`): Emitted when transcribed text is available. Callback receives { text: string, role: 'assistant' | 'user' }. On native-audio models the assistant transcript is driven by the server's output\_audio\_transcription channel rather than modelTurn.parts.text.
|
|
270
270
|
|
|
271
|
-
**thinking** (`event`): Emitted on native-audio models with the model's chain-of-thought / reasoning text from
|
|
271
|
+
**thinking** (`event`): Emitted on native-audio models with the model's chain-of-thought / reasoning text from modelTurn.parts.text. Callback receives { text: string }. Does not fire on non-native-audio models, where modelTurn.parts.text is the spoken response and is emitted as writing instead.
|
|
272
272
|
|
|
273
273
|
**session** (`event`): Emitted on session state changes. Callback receives { state: 'connecting' | 'connected' | 'disconnected' | 'disconnecting' | 'updated', config?: object }.
|
|
274
274
|
|
|
@@ -68,7 +68,7 @@ voice.close()
|
|
|
68
68
|
|
|
69
69
|
**speaker** (`string`): Default voice ID for speech synthesis. Any voice from Inworld's catalog is accepted. (Default: `'Sarah'`)
|
|
70
70
|
|
|
71
|
-
**sessionId** (`string`): Client-generated session key surfaced as the URL
|
|
71
|
+
**sessionId** (`string`): Client-generated session key surfaced as the URL key parameter. A timestamp-based key is generated automatically when omitted. (Default: `'voice-{Date.now()}'`)
|
|
72
72
|
|
|
73
73
|
**instructions** (`string`): System prompt sent with the initial session.update.
|
|
74
74
|
|
|
@@ -76,9 +76,9 @@ voice.close()
|
|
|
76
76
|
|
|
77
77
|
**debug** (`boolean`): Log raw server events. (Default: `false`)
|
|
78
78
|
|
|
79
|
-
**providerData** (`InworldProviderData`): Typed Inworld extension config (stt, tts, memory, backchannel, responsiveness, plus user\_id and metadata). Sent under session.providerData on every session.update. Composes with any session.providerData set via the
|
|
79
|
+
**providerData** (`InworldProviderData`): Typed Inworld extension config (stt, tts, memory, backchannel, responsiveness, plus user\_id and metadata). Sent under session.providerData on every session.update. Composes with any session.providerData set via the session field; the constructor option wins on key collisions.
|
|
80
80
|
|
|
81
|
-
**connectTimeoutMs** (`number`): Max time
|
|
81
|
+
**connectTimeoutMs** (`number`): Max time connect() will wait for both the WebSocket handshake and the initial session.updated round-trip. A pre-open error or close on the WebSocket — or this timeout expiring — surfaces as a rejected promise instead of an uncaught socket error. (Default: `15000`)
|
|
82
82
|
|
|
83
83
|
### `session` (typed knobs)
|
|
84
84
|
|
|
@@ -86,21 +86,21 @@ Use the typed `session` field for documented Inworld realtime options. Fields co
|
|
|
86
86
|
|
|
87
87
|
**output\_modalities** (`Array<"text" | "audio">`): Modalities the model should produce.
|
|
88
88
|
|
|
89
|
-
**audio.output.voice** (`string`): Voice catalog ID. When omitted, the constructor
|
|
89
|
+
**audio.output.voice** (`string`): Voice catalog ID. When omitted, the constructor speaker is used.
|
|
90
90
|
|
|
91
91
|
**audio.output.speed** (`number`): Playback speed multiplier for synthesized audio (0.25 to 1.5).
|
|
92
92
|
|
|
93
93
|
**audio.output.model** (`string`): Inworld TTS model (e.g. "inworld-tts-2").
|
|
94
94
|
|
|
95
|
-
**audio.output.format** (`InworldAudioFormat`): Output audio encoding. A codec string (e.g. "audio/pcm", "audio/pcmu", "audio/pcma", "audio/float32") or an object
|
|
95
|
+
**audio.output.format** (`InworldAudioFormat`): Output audio encoding. A codec string (e.g. "audio/pcm", "audio/pcmu", "audio/pcma", "audio/float32") or an object { type, rate? }. rate (Hz) applies to audio/pcm and audio/float32 (default 24000); audio/pcmu and audio/pcma are fixed at 8 kHz.
|
|
96
96
|
|
|
97
|
-
**audio.input.format** (`InworldAudioFormat`): Input audio encoding sent to the server. Same shape as
|
|
97
|
+
**audio.input.format** (`InworldAudioFormat`): Input audio encoding sent to the server. Same shape as audio.output.format — a codec string or { type, rate? } object.
|
|
98
98
|
|
|
99
99
|
**audio.input.noise\_reduction** (`{ type: "near_field" | "far_field" }`): Input noise-reduction mode applied before transcription and VAD.
|
|
100
100
|
|
|
101
|
-
**audio.input.transcription** (`{ model?: string; language?: string; prompt?: string }`): Server-side transcription for incoming user audio. Defaults to
|
|
101
|
+
**audio.input.transcription** (`{ model?: string; language?: string; prompt?: string }`): Server-side transcription for incoming user audio. Defaults to { model: "inworld/inworld-stt-1" }. prompt biases transcription with vocabulary, spelling, or style hints. Supply your own object to override; set to null to disable user-side transcription.
|
|
102
102
|
|
|
103
|
-
**audio.input.turn\_detection** (`InworldTurnDetection | null`): Voice activity / turn detection. Defaults to
|
|
103
|
+
**audio.input.turn\_detection** (`InworldTurnDetection | null`): Voice activity / turn detection. Defaults to { type: "semantic\_vad", eagerness: "medium", create\_response: true, interrupt\_response: true }. Supply your own object to override; set to null to disable turn detection entirely. The eagerness field controls how quickly semantic VAD ends a user turn — low waits for clearer pauses (more interruption-resistant), high ends turns sooner (snappier, more prone to cutting users off). Default medium balances both. idle\_timeout\_ms (server\_vad only) sets the idle window before the server commits a turn.
|
|
104
104
|
|
|
105
105
|
**tool\_choice** (`string | { type: "function"; name: string } | { type: "mcp"; server_label: string }`): Tool selection strategy. Use the mcp variant to route tool calls through a configured Inworld MCP server.
|
|
106
106
|
|
|
@@ -279,11 +279,11 @@ The `InworldRealtimeVoice` class emits the following events:
|
|
|
279
279
|
|
|
280
280
|
**writing** (`event`): Emitted as transcribed text becomes available. Callback receives { text: string, response\_id: string, role: "assistant" | "user", voiceProfile? }. Deduplicated across audio-transcript and text deltas in the same response so a single response only emits one stream. On user events, voiceProfile is present when providerData.stt.voice\_profile is enabled.
|
|
281
281
|
|
|
282
|
-
**speech-started** (`event`): Raw
|
|
282
|
+
**speech-started** (`event`): Raw input\_audio\_buffer.speech\_started VAD edge from the server.
|
|
283
283
|
|
|
284
|
-
**speech-stopped** (`event`): Raw
|
|
284
|
+
**speech-stopped** (`event`): Raw input\_audio\_buffer.speech\_stopped VAD edge from the server.
|
|
285
285
|
|
|
286
|
-
**interrupted** (`event`): Synthetic client-side signal: emitted once per in-flight
|
|
286
|
+
**interrupted** (`event`): Synthetic client-side signal: emitted once per in-flight response\_id when the user starts speaking. Use this to stop main response playback on barge-in. Callback receives { response\_id: string }. Only carries main-response ids — never back-channel ids — so stopping the matching speaker stream leaves backchannel streams playing (back-channels are meant to overlap user speech and are never cancelled by barge-in).
|
|
287
287
|
|
|
288
288
|
**turn-suggestion** (`event`): Smart-turn endpointing hint for a buffered user utterance. Callback receives { item\_id, utterance\_index, probability, trailing\_silence\_ms?, audio\_duration\_ms?, inference\_ms? }.
|
|
289
289
|
|
|
@@ -303,7 +303,7 @@ The `InworldRealtimeVoice` class emits the following events:
|
|
|
303
303
|
|
|
304
304
|
**memory** (`event`): Emitted with Inworld's rolling summary and facts state, deduplicated by version. Requires providerData.memory.enabled. Callback receives InworldMemoryState.
|
|
305
305
|
|
|
306
|
-
**backchannel** (`event`): Emitted with a PassThrough stream of back-channel PCM audio (short acknowledgements while the user speaks). Each stream's
|
|
306
|
+
**backchannel** (`event`): Emitted with a PassThrough stream of back-channel PCM audio (short acknowledgements while the user speaks). Each stream's .id is a backchannel\_id that never appears in interrupted, so play these on a separate track that barge-in does not stop. Requires providerData.backchannel.enabled.
|
|
307
307
|
|
|
308
308
|
**backchannel.done** (`event`): Emitted when a back-channel finishes. Callback receives { backchannel\_id: string, phrase? }.
|
|
309
309
|
|
|
@@ -84,9 +84,9 @@ const audioStream = await voice.speak('Hello, world!', {
|
|
|
84
84
|
|
|
85
85
|
**options.speakingRate** (`number`): Adjust the speaking rate.
|
|
86
86
|
|
|
87
|
-
**options.temperature** (`number`): Controls voice variability. Honored on
|
|
87
|
+
**options.temperature** (`number`): Controls voice variability. Honored on inworld-tts-1.5-\* models; ignored by inworld-tts-2.
|
|
88
88
|
|
|
89
|
-
**options.deliveryMode** (`'STABLE' | 'BALANCED' | 'CREATIVE'`): Steering control for delivery style. Only honored by
|
|
89
|
+
**options.deliveryMode** (`'STABLE' | 'BALANCED' | 'CREATIVE'`): Steering control for delivery style. Only honored by inworld-tts-2.
|
|
90
90
|
|
|
91
91
|
**options.language** (`string`): BCP-47 language code for this request. Auto-detected when omitted.
|
|
92
92
|
|
|
@@ -50,7 +50,7 @@ voice.on('error', ({ message, code, details }) => {
|
|
|
50
50
|
|
|
51
51
|
## Parameters
|
|
52
52
|
|
|
53
|
-
**event** (`string`): Name of the event to listen for. See the
|
|
53
|
+
**event** (`string`): Name of the event to listen for. See the Voice Events documentation for a list of available events.
|
|
54
54
|
|
|
55
55
|
**callback** (`function`): Callback function that will be called when the event occurs. The callback signature depends on the specific event.
|
|
56
56
|
|
|
@@ -28,7 +28,7 @@ if (result.status === 'suspended') {
|
|
|
28
28
|
|
|
29
29
|
**retryCount** (`number`): Optional retry count for nested workflow execution
|
|
30
30
|
|
|
31
|
-
**forEachIndex** (`number`): Target a specific iteration of a suspended
|
|
31
|
+
**forEachIndex** (`number`): Target a specific iteration of a suspended .foreach() step. Pass the zero-based index of the iteration you want to resume; other iterations remain suspended. Omit this field to resume all suspended iterations of the step with the same resumeData.
|
|
32
32
|
|
|
33
33
|
**tracingContext** (`TracingContext`): Tracing context for creating child spans and adding metadata. Automatically injected when using Mastra's tracing system.
|
|
34
34
|
|
|
@@ -159,4 +159,4 @@ const result = await run.timeTravel({
|
|
|
159
159
|
- [Workflows overview](https://mastra.ai/docs/workflows/overview)
|
|
160
160
|
- [Workflow.createRun()](https://mastra.ai/reference/workflows/workflow-methods/create-run)
|
|
161
161
|
- [Snapshots](https://mastra.ai/docs/workflows/snapshots)
|
|
162
|
-
- [Suspend
|
|
162
|
+
- [Suspend and Resume](https://mastra.ai/docs/workflows/suspend-and-resume)
|
|
@@ -94,13 +94,13 @@ if (!result?.success) {
|
|
|
94
94
|
|
|
95
95
|
**commandTimeout** (`number`): Default command timeout in milliseconds. (Default: `300000`)
|
|
96
96
|
|
|
97
|
-
**stopSessionOnLifecycle** (`boolean`): Whether
|
|
97
|
+
**stopSessionOnLifecycle** (`boolean`): Whether stop() and destroy() should call StopRuntimeSession. Defaults to false because AgentCore Runtime sessions are often shared with agent invocations outside the sandbox instance. (Default: `false`)
|
|
98
98
|
|
|
99
|
-
**stopClientToken** (`string`): Client token used when
|
|
99
|
+
**stopClientToken** (`string`): Client token used when StopRuntimeSession is called. (Default: `Generated UUID`)
|
|
100
100
|
|
|
101
101
|
**client** (`BedrockAgentCoreClient`): Preconfigured AWS SDK client. Use this for custom credentials, retry behavior, or tests.
|
|
102
102
|
|
|
103
|
-
**instructions** (`string | ((opts) => string)`): Custom instructions that override the default instructions returned by
|
|
103
|
+
**instructions** (`string | ((opts) => string)`): Custom instructions that override the default instructions returned by getInstructions(). Pass a string to replace the defaults, or a function to extend them.
|
|
104
104
|
|
|
105
105
|
## Properties
|
|
106
106
|
|
|
@@ -110,7 +110,7 @@ if (!result?.success) {
|
|
|
110
110
|
|
|
111
111
|
**provider** (`'agentcore'`): Provider type identifier.
|
|
112
112
|
|
|
113
|
-
**status** (`ProviderStatus`): Current lifecycle status:
|
|
113
|
+
**status** (`ProviderStatus`): Current lifecycle status: 'pending', 'starting', 'running', 'stopping', 'stopped', 'destroying', 'destroyed', or 'error'.
|
|
114
114
|
|
|
115
115
|
**runtimeSessionId** (`string`): AgentCore Runtime session ID used for command execution.
|
|
116
116
|
|
|
@@ -86,7 +86,7 @@ const filesystem = new AgentFSFilesystem({
|
|
|
86
86
|
|
|
87
87
|
You must provide at least one of `agentId`, `path`, or `agent`.
|
|
88
88
|
|
|
89
|
-
**agentId** (`string`): Agent ID — creates database at
|
|
89
|
+
**agentId** (`string`): Agent ID — creates database at .agentfs/\<agentId>.db
|
|
90
90
|
|
|
91
91
|
**path** (`string`): Explicit database file path (alternative to agentId)
|
|
92
92
|
|
|
@@ -73,7 +73,7 @@ console.log(response.text)
|
|
|
73
73
|
|
|
74
74
|
**id** (`string`): Unique identifier for this sandbox instance. (Default: `Auto-generated`)
|
|
75
75
|
|
|
76
|
-
**name** (`string`): Apple container name passed to
|
|
76
|
+
**name** (`string`): Apple container name passed to container run --name. Characters outside \[a-zA-Z0-9\_.-] are replaced with - and the result is prefixed if it would not start with an alphanumeric character. (Default: `` The sandbox `id` ``)
|
|
77
77
|
|
|
78
78
|
**image** (`string`): OCI image to use for the container. (Default: `'node:22-slim'`)
|
|
79
79
|
|
|
@@ -83,13 +83,13 @@ console.log(response.text)
|
|
|
83
83
|
|
|
84
84
|
**volumes** (`Record<string, string>`): Host-to-container bind mounts. Keys are host paths, values are container paths.
|
|
85
85
|
|
|
86
|
-
**mounts** (`string[]`): Raw
|
|
86
|
+
**mounts** (`string[]`): Raw container run --mount specs.
|
|
87
87
|
|
|
88
88
|
**network** (`string`): Apple container network attachment spec.
|
|
89
89
|
|
|
90
|
-
**publishedPorts** (`string[]`): Port publish specs passed as
|
|
90
|
+
**publishedPorts** (`string[]`): Port publish specs passed as --publish.
|
|
91
91
|
|
|
92
|
-
**publishedSockets** (`string[]`): Socket publish specs passed as
|
|
92
|
+
**publishedSockets** (`string[]`): Socket publish specs passed as --publish-socket.
|
|
93
93
|
|
|
94
94
|
**cpus** (`number | string`): Number of CPUs to allocate.
|
|
95
95
|
|
|
@@ -115,7 +115,7 @@ console.log(response.text)
|
|
|
115
115
|
|
|
116
116
|
**capDrop** (`string[]`): Linux capabilities to drop.
|
|
117
117
|
|
|
118
|
-
**tmpfs** (`string[]`): tmpfs destination paths passed as
|
|
118
|
+
**tmpfs** (`string[]`): tmpfs destination paths passed as --tmpfs, for example /tmp.
|
|
119
119
|
|
|
120
120
|
**dns** (`string[]`): DNS nameserver IPs.
|
|
121
121
|
|
|
@@ -95,17 +95,17 @@ const filesystem = new ArchilFilesystem({
|
|
|
95
95
|
|
|
96
96
|
## Constructor parameters
|
|
97
97
|
|
|
98
|
-
**diskId** (`string`): Existing Archil disk ID (e.g. "dsk-0123456789abcdef"). Mutually exclusive with
|
|
98
|
+
**diskId** (`string`): Existing Archil disk ID (e.g. "dsk-0123456789abcdef"). Mutually exclusive with createDiskOptions.
|
|
99
99
|
|
|
100
|
-
**createDiskOptions** (`CreateDiskRequest`): Options for creating a new disk on init. Mutually exclusive with
|
|
100
|
+
**createDiskOptions** (`CreateDiskRequest`): Options for creating a new disk on init. Mutually exclusive with diskId.
|
|
101
101
|
|
|
102
|
-
**apiKey** (`string`): Archil API key. Falls back to
|
|
102
|
+
**apiKey** (`string`): Archil API key. Falls back to ARCHIL\_API\_KEY environment variable.
|
|
103
103
|
|
|
104
|
-
**region** (`string`): Archil region (e.g. "aws-us-east-1"). Falls back to
|
|
104
|
+
**region** (`string`): Archil region (e.g. "aws-us-east-1"). Falls back to ARCHIL\_REGION environment variable.
|
|
105
105
|
|
|
106
106
|
**baseUrl** (`string`): Custom Archil control-plane URL (for testing or self-hosted deployments).
|
|
107
107
|
|
|
108
|
-
**s3BaseUrl** (`string`): Custom S3-compatible API URL. Falls back to
|
|
108
|
+
**s3BaseUrl** (`string`): Custom S3-compatible API URL. Falls back to ARCHIL\_S3\_BASE\_URL environment variable.
|
|
109
109
|
|
|
110
110
|
**id** (`string`): Unique identifier for this filesystem instance. (Default: `Auto-generated`)
|
|
111
111
|
|
|
@@ -101,7 +101,7 @@ const workspace = new Workspace({
|
|
|
101
101
|
|
|
102
102
|
**instance** (`SandboxInstance`): The underlying Blaxel SandboxInstance for direct access to Blaxel APIs. Throws SandboxNotReadyError if the sandbox has not been started.
|
|
103
103
|
|
|
104
|
-
**processes** (`BlaxelProcessManager`): Background process manager. See
|
|
104
|
+
**processes** (`BlaxelProcessManager`): Background process manager. See SandboxProcessManager reference.
|
|
105
105
|
|
|
106
106
|
## Background processes
|
|
107
107
|
|
|
@@ -321,7 +321,7 @@ const workspace = new Workspace({
|
|
|
321
321
|
|
|
322
322
|
**instance** (`Sandbox`): The underlying Daytona Sandbox instance. Throws SandboxNotReadyError if the sandbox has not been started.
|
|
323
323
|
|
|
324
|
-
**processes** (`DaytonaProcessManager`): Background process manager. See
|
|
324
|
+
**processes** (`DaytonaProcessManager`): Background process manager. See SandboxProcessManager reference.
|
|
325
325
|
|
|
326
326
|
## Background processes
|
|
327
327
|
|
|
@@ -61,7 +61,7 @@ const agent = new Agent({
|
|
|
61
61
|
|
|
62
62
|
**id** (`string`): Unique identifier for this sandbox instance. Used for label-based reconnection. (Default: `Auto-generated`)
|
|
63
63
|
|
|
64
|
-
**name** (`string`): Container display name passed to Docker as
|
|
64
|
+
**name** (`string`): Container display name passed to Docker as --name. Characters outside \[a-zA-Z0-9\_.-] are replaced with - and the result is prefixed if it would not start with an alphanumeric character. (Default: `` The sandbox `id` ``)
|
|
65
65
|
|
|
66
66
|
**image** (`string`): Docker image to use for the container. (Default: `'node:22-slim'`)
|
|
67
67
|
|
|
@@ -121,7 +121,7 @@ const agent = new Agent({
|
|
|
121
121
|
|
|
122
122
|
**container** (`Container`): The underlying dockerode Container instance. Throws SandboxNotReadyError if the sandbox has not been started.
|
|
123
123
|
|
|
124
|
-
**processes** (`DockerProcessManager`): Background process manager. See
|
|
124
|
+
**processes** (`DockerProcessManager`): Background process manager. See SandboxProcessManager reference.
|
|
125
125
|
|
|
126
126
|
## Background processes
|
|
127
127
|
|
|
@@ -76,7 +76,7 @@ const agent = new Agent({
|
|
|
76
76
|
|
|
77
77
|
**metadata** (`Record<string, unknown>`): Custom metadata attached to the sandbox instance.
|
|
78
78
|
|
|
79
|
-
**instructions** (`string | ((opts: { defaultInstructions: string; requestContext?: RequestContext }) => string)`): Custom instructions returned by
|
|
79
|
+
**instructions** (`string | ((opts: { defaultInstructions: string; requestContext?: RequestContext }) => string)`): Custom instructions returned by getInstructions(). A string fully replaces the defaults; a function receives the defaults and can extend or customize them per-request. Pass an empty string to suppress instructions entirely.
|
|
80
80
|
|
|
81
81
|
## Properties
|
|
82
82
|
|
|
@@ -88,7 +88,7 @@ const agent = new Agent({
|
|
|
88
88
|
|
|
89
89
|
**status** (`ProviderStatus`): 'pending' | 'initializing' | 'ready' | 'starting' | 'running' | 'stopping' | 'stopped' | 'destroying' | 'destroyed' | 'error'
|
|
90
90
|
|
|
91
|
-
**processes** (`E2BProcessManager`): Background process manager. See
|
|
91
|
+
**processes** (`E2BProcessManager`): Background process manager. See SandboxProcessManager reference.
|
|
92
92
|
|
|
93
93
|
## Background processes
|
|
94
94
|
|
|
@@ -105,7 +105,7 @@ All write operations (`writeFile`, `appendFile`, `deleteFile`, `copyFile`, `move
|
|
|
105
105
|
|
|
106
106
|
## Constructor parameters
|
|
107
107
|
|
|
108
|
-
**files** (`Files`): A pre-configured FilesSDK
|
|
108
|
+
**files** (`Files`): A pre-configured FilesSDK Files instance bound to the adapter and credentials you want to use.
|
|
109
109
|
|
|
110
110
|
**id** (`string`): Unique identifier for this filesystem instance. (Default: `Auto-generated`)
|
|
111
111
|
|
|
@@ -263,7 +263,7 @@ const instructions = filesystem.getInstructions?.()
|
|
|
263
263
|
|
|
264
264
|
**Parameters:**
|
|
265
265
|
|
|
266
|
-
**opts.requestContext** (`RequestContext`): Forwarded to the
|
|
266
|
+
**opts.requestContext** (`RequestContext`): Forwarded to the instructions function if one was provided in the constructor.
|
|
267
267
|
|
|
268
268
|
**Returns:** `string`
|
|
269
269
|
|
|
@@ -38,9 +38,9 @@ const response = await agent.generate('List all files in the workspace')
|
|
|
38
38
|
|
|
39
39
|
**id** (`string`): Unique identifier for this filesystem instance (Default: `Auto-generated`)
|
|
40
40
|
|
|
41
|
-
**contained** (`boolean`): When true, all file operations are restricted to stay within basePath. Prevents path traversal attacks and symlink escapes. See
|
|
41
|
+
**contained** (`boolean`): When true, all file operations are restricted to stay within basePath. Prevents path traversal attacks and symlink escapes. See containment. (Default: `true`)
|
|
42
42
|
|
|
43
|
-
**allowedPaths** (`string[]`): Additional directories the agent can access outside of
|
|
43
|
+
**allowedPaths** (`string[]`): Additional directories the agent can access outside of basePath. (Default: `[]`)
|
|
44
44
|
|
|
45
45
|
**instructions** (`string | ((opts: { defaultInstructions: string; requestContext?: RequestContext }) => string)`): Custom instructions that override the default instructions returned by getInstructions(). Pass a string to fully replace them, or a function to extend them with access to the current requestContext for per-request customization.
|
|
46
46
|
|
|
@@ -302,7 +302,7 @@ const instructions = filesystem.getInstructions({ requestContext })
|
|
|
302
302
|
|
|
303
303
|
**Parameters:**
|
|
304
304
|
|
|
305
|
-
**opts.requestContext** (`RequestContext`): Forwarded to the
|
|
305
|
+
**opts.requestContext** (`RequestContext`): Forwarded to the instructions function if one was provided in the constructor.
|
|
306
306
|
|
|
307
307
|
**Returns:** `string`
|
|
308
308
|
|
|
@@ -84,7 +84,7 @@ Configuration options for native OS sandboxing (used with `isolation: 'seatbelt'
|
|
|
84
84
|
|
|
85
85
|
**workingDirectory** (`string`): The configured working directory
|
|
86
86
|
|
|
87
|
-
**processes** (`LocalProcessManager`): Background process manager. See
|
|
87
|
+
**processes** (`LocalProcessManager`): Background process manager. See SandboxProcessManager reference.
|
|
88
88
|
|
|
89
89
|
## Path Resolution
|
|
90
90
|
|
|
@@ -65,7 +65,7 @@ const agent = new Agent({
|
|
|
65
65
|
|
|
66
66
|
## Constructor parameters
|
|
67
67
|
|
|
68
|
-
**apiKey** (`string`): Mesa API key. Falls back to
|
|
68
|
+
**apiKey** (`string`): Mesa API key. Falls back to MESA\_API\_KEY when omitted.
|
|
69
69
|
|
|
70
70
|
**org** (`string`): Mesa org slug. When omitted, the Mesa SDK resolves the default org.
|
|
71
71
|
|
|
@@ -81,9 +81,9 @@ const agent = new Agent({
|
|
|
81
81
|
|
|
82
82
|
**id** (`string`): Filesystem instance identifier.
|
|
83
83
|
|
|
84
|
-
**name** (`string`): Provider name (
|
|
84
|
+
**name** (`string`): Provider name ('MesaFilesystem').
|
|
85
85
|
|
|
86
|
-
**provider** (`string`): Provider identifier (
|
|
86
|
+
**provider** (`string`): Provider identifier ('mesa').
|
|
87
87
|
|
|
88
88
|
**readOnly** (`boolean | undefined`): Whether write operations are blocked.
|
|
89
89
|
|
|
@@ -114,7 +114,7 @@ Get your credentials from the [Modal dashboard](https://modal.com/settings/token
|
|
|
114
114
|
|
|
115
115
|
**modal** (`Sandbox`): The underlying Modal Sandbox instance. Throws SandboxNotReadyError if the sandbox has not been started.
|
|
116
116
|
|
|
117
|
-
**processes** (`ModalProcessManager`): Background process manager. See
|
|
117
|
+
**processes** (`ModalProcessManager`): Background process manager. See SandboxProcessManager reference.
|
|
118
118
|
|
|
119
119
|
## Sandbox lifecycle
|
|
120
120
|
|
|
@@ -188,7 +188,7 @@ const result = await sandbox.executeCommand('cat', ['/tmp/state.txt'])
|
|
|
188
188
|
|
|
189
189
|
**railway** (`Sandbox`): The underlying Railway Sandbox instance for direct SDK access. Throws SandboxNotReadyError if the sandbox has not been started.
|
|
190
190
|
|
|
191
|
-
**processes** (`RailwayProcessManager`): Background process manager. See
|
|
191
|
+
**processes** (`RailwayProcessManager`): Background process manager. See SandboxProcessManager reference.
|
|
192
192
|
|
|
193
193
|
## Methods
|
|
194
194
|
|
|
@@ -164,13 +164,13 @@ Tigris uses virtual-hosted-style addressing, so `forcePathStyle` must be set to
|
|
|
164
164
|
|
|
165
165
|
**region** (`string`): AWS region (use 'auto' for R2)
|
|
166
166
|
|
|
167
|
-
**credentials** (`AwsCredentialIdentity | AwsCredentialIdentityProvider`): AWS credentials or credential provider function. Accepts static credentials or a provider that auto-refreshes (e.g.
|
|
167
|
+
**credentials** (`AwsCredentialIdentity | AwsCredentialIdentityProvider`): AWS credentials or credential provider function. Accepts static credentials or a provider that auto-refreshes (e.g. fromNodeProviderChain() from @aws-sdk/credential-providers). Takes precedence over accessKeyId/secretAccessKey/sessionToken. When all credential options are omitted, the SDK default credential provider chain is used.
|
|
168
168
|
|
|
169
|
-
**accessKeyId** (`string`): AWS access key ID. When omitted along with
|
|
169
|
+
**accessKeyId** (`string`): AWS access key ID. When omitted along with secretAccessKey and credentials, the SDK default credential provider chain is used.
|
|
170
170
|
|
|
171
|
-
**secretAccessKey** (`string`): AWS secret access key. When omitted along with
|
|
171
|
+
**secretAccessKey** (`string`): AWS secret access key. When omitted along with accessKeyId and credentials, the SDK default credential provider chain is used.
|
|
172
172
|
|
|
173
|
-
**sessionToken** (`string`): AWS session token for static temporary credentials. Use with
|
|
173
|
+
**sessionToken** (`string`): AWS session token for static temporary credentials. Use with accessKeyId/secretAccessKey only when passing a complete temporary credential set manually. For auto-refreshing SSO, AssumeRole, or container credentials, use the credentials provider parameter or the SDK default credential provider chain.
|
|
174
174
|
|
|
175
175
|
**endpoint** (`string`): Custom endpoint URL for S3-compatible storage (R2, MinIO, Tigris, etc.)
|
|
176
176
|
|