@mastra/libsql 0.0.0-workflow-timeout-issue-20260220185702 → 0.0.0-workflow-graph-crash-20260527191009

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +1085 -3
  2. package/LICENSE.md +15 -0
  3. package/dist/docs/SKILL.md +18 -19
  4. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  5. package/dist/docs/references/docs-agent-builder-deploying.md +121 -0
  6. package/dist/docs/references/docs-agent-builder-overview.md +97 -0
  7. package/dist/docs/references/docs-agents-agent-approval.md +336 -202
  8. package/dist/docs/references/docs-agents-networks.md +107 -215
  9. package/dist/docs/references/docs-memory-memory-processors.md +86 -88
  10. package/dist/docs/references/docs-memory-message-history.md +71 -63
  11. package/dist/docs/references/docs-memory-multi-user-threads.md +206 -0
  12. package/dist/docs/references/docs-memory-overview.md +221 -24
  13. package/dist/docs/references/docs-memory-semantic-recall.md +162 -75
  14. package/dist/docs/references/docs-memory-storage.md +72 -73
  15. package/dist/docs/references/docs-memory-working-memory.md +62 -62
  16. package/dist/docs/references/docs-rag-retrieval.md +132 -135
  17. package/dist/docs/references/docs-workflows-snapshots.md +31 -31
  18. package/dist/docs/references/guides-agent-frameworks-ai-sdk.md +36 -36
  19. package/dist/docs/references/reference-core-getMemory.md +15 -16
  20. package/dist/docs/references/reference-core-listMemory.md +17 -18
  21. package/dist/docs/references/reference-core-mastra-class.md +37 -27
  22. package/dist/docs/references/reference-memory-memory-class.md +41 -43
  23. package/dist/docs/references/reference-storage-composite.md +65 -55
  24. package/dist/docs/references/reference-storage-dynamodb.md +36 -36
  25. package/dist/docs/references/reference-storage-libsql.md +27 -27
  26. package/dist/docs/references/reference-vectors-libsql.md +72 -72
  27. package/dist/index.cjs +7896 -3257
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.js +7888 -3259
  30. package/dist/index.js.map +1 -1
  31. package/dist/storage/db/index.d.ts +14 -1
  32. package/dist/storage/db/index.d.ts.map +1 -1
  33. package/dist/storage/db/utils.d.ts +16 -0
  34. package/dist/storage/db/utils.d.ts.map +1 -1
  35. package/dist/storage/domains/agents/index.d.ts.map +1 -1
  36. package/dist/storage/domains/background-tasks/index.d.ts +18 -0
  37. package/dist/storage/domains/background-tasks/index.d.ts.map +1 -0
  38. package/dist/storage/domains/blobs/index.d.ts +17 -0
  39. package/dist/storage/domains/blobs/index.d.ts.map +1 -0
  40. package/dist/storage/domains/channels/index.d.ts +20 -0
  41. package/dist/storage/domains/channels/index.d.ts.map +1 -0
  42. package/dist/storage/domains/datasets/index.d.ts +43 -0
  43. package/dist/storage/domains/datasets/index.d.ts.map +1 -0
  44. package/dist/storage/domains/experiments/index.d.ts +31 -0
  45. package/dist/storage/domains/experiments/index.d.ts.map +1 -0
  46. package/dist/storage/domains/favorites/index.d.ts +17 -0
  47. package/dist/storage/domains/favorites/index.d.ts.map +1 -0
  48. package/dist/storage/domains/mcp-clients/index.d.ts.map +1 -1
  49. package/dist/storage/domains/mcp-servers/index.d.ts +26 -0
  50. package/dist/storage/domains/mcp-servers/index.d.ts.map +1 -0
  51. package/dist/storage/domains/memory/index.d.ts +7 -3
  52. package/dist/storage/domains/memory/index.d.ts.map +1 -1
  53. package/dist/storage/domains/observability/index.d.ts +2 -1
  54. package/dist/storage/domains/observability/index.d.ts.map +1 -1
  55. package/dist/storage/domains/prompt-blocks/index.d.ts.map +1 -1
  56. package/dist/storage/domains/schedules/index.d.ts +19 -0
  57. package/dist/storage/domains/schedules/index.d.ts.map +1 -0
  58. package/dist/storage/domains/scorer-definitions/index.d.ts.map +1 -1
  59. package/dist/storage/domains/skills/index.d.ts +26 -0
  60. package/dist/storage/domains/skills/index.d.ts.map +1 -0
  61. package/dist/storage/domains/workflows/index.d.ts +1 -0
  62. package/dist/storage/domains/workflows/index.d.ts.map +1 -1
  63. package/dist/storage/domains/workspaces/index.d.ts +26 -0
  64. package/dist/storage/domains/workspaces/index.d.ts.map +1 -0
  65. package/dist/storage/index.d.ts +38 -1
  66. package/dist/storage/index.d.ts.map +1 -1
  67. package/dist/vector/index.d.ts +14 -1
  68. package/dist/vector/index.d.ts.map +1 -1
  69. package/package.json +12 -12
  70. package/dist/docs/references/docs-agents-agent-memory.md +0 -212
  71. package/dist/docs/references/docs-agents-network-approval.md +0 -275
  72. package/dist/docs/references/docs-observability-overview.md +0 -70
  73. package/dist/docs/references/docs-observability-tracing-exporters-default.md +0 -211
package/LICENSE.md CHANGED
@@ -1,3 +1,18 @@
1
+ Portions of this software are licensed as follows:
2
+
3
+ - All content that resides under any directory named "ee/" within this
4
+ repository, including but not limited to:
5
+ - `packages/core/src/auth/ee/`
6
+ - `packages/server/src/server/auth/ee/`
7
+ is licensed under the license defined in `ee/LICENSE`.
8
+
9
+ - All third-party components incorporated into the Mastra Software are
10
+ licensed under the original license provided by the owner of the
11
+ applicable component.
12
+
13
+ - Content outside of the above-mentioned directories or restrictions is
14
+ available under the "Apache License 2.0" as defined below.
15
+
1
16
  # Apache License 2.0
2
17
 
3
18
  Copyright (c) 2025 Kepler Software, Inc.
@@ -3,7 +3,7 @@ name: mastra-libsql
3
3
  description: Documentation for @mastra/libsql. Use when working with @mastra/libsql APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/libsql"
6
- version: "0.0.0-workflow-timeout-issue-20260220185702"
6
+ version: "0.0.0-workflow-graph-crash-20260527191009"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -16,19 +16,18 @@ Read the individual reference documents for detailed explanations and code examp
16
16
 
17
17
  ### Docs
18
18
 
19
- - [Agent Approval](references/docs-agents-agent-approval.md) - Learn how to require approvals, suspend tool execution, and automatically resume suspended tools while keeping humans in control of agent workflows.
20
- - [Agent Memory](references/docs-agents-agent-memory.md) - Learn how to add memory to agents to store message history and maintain context across interactions.
21
- - [Network Approval](references/docs-agents-network-approval.md) - Learn how to require approvals, suspend execution, and resume suspended networks while keeping humans in control of agent network workflows.
22
- - [Agent Networks](references/docs-agents-networks.md) - Learn how to coordinate multiple agents, workflows, and tools using agent networks for complex, non-deterministic task execution.
23
- - [Memory Processors](references/docs-memory-memory-processors.md) - Learn how to use memory processors in Mastra to filter, trim, and transform messages before they're sent to the language model to manage context window limits.
24
- - [Message History](references/docs-memory-message-history.md) - Learn how to configure message history in Mastra to store recent messages from the current conversation.
19
+ - [Deploying](references/docs-agent-builder-deploying.md) - Swap local Agent Builder primitives for cloud-backed storage, filesystems, sandboxes, an EE license, auth, and a public channel URL for production.
20
+ - [Agent Builder overview](references/docs-agent-builder-overview.md) - Let teammates create, configure, and operate Mastra agents from a browser, with admin-pinned defaults, RBAC, and channel integrations.
21
+ - [Agent approval](references/docs-agents-agent-approval.md) - Learn how to require approvals, suspend tool execution, and automatically resume suspended tools while keeping humans in control of agent workflows.
22
+ - [Agent networks](references/docs-agents-networks.md) - Coordinate multiple agents, workflows, and tools using agent networks for complex, non-deterministic task execution.
23
+ - [Memory processors](references/docs-memory-memory-processors.md) - Learn how to use memory processors in Mastra to filter, trim, and transform messages before they're sent to the language model to manage context window limits.
24
+ - [Message history](references/docs-memory-message-history.md) - Learn how to configure message history in Mastra to store recent messages from the current conversation.
25
+ - [Multi-user threads](references/docs-memory-multi-user-threads.md) - Share one Mastra thread between multiple users by carrying speaker identity in the message body.
25
26
  - [Memory overview](references/docs-memory-overview.md) - Learn how Mastra's memory system works with working memory, message history, semantic recall, and observational memory.
26
- - [Semantic Recall](references/docs-memory-semantic-recall.md) - Learn how to use semantic recall in Mastra to retrieve relevant messages from past conversations using vector search and embeddings.
27
- - [Storage](references/docs-memory-storage.md) - Configure storage for Mastra's memory system to persist conversations, workflows, and traces.
28
- - [Working Memory](references/docs-memory-working-memory.md) - Learn how to configure working memory in Mastra to store persistent user data, preferences.
29
- - [Observability Overview](references/docs-observability-overview.md) - Monitor and debug applications with Mastra's Observability features.
30
- - [Default Exporter](references/docs-observability-tracing-exporters-default.md) - Store traces locally for development and debugging
31
- - [Retrieval, Semantic Search, Reranking](references/docs-rag-retrieval.md) - Guide on retrieval processes in Mastra's RAG systems, including semantic search, filtering, and re-ranking.
27
+ - [Semantic recall](references/docs-memory-semantic-recall.md) - Learn how to use semantic recall in Mastra to retrieve relevant messages from past conversations using vector search and embeddings.
28
+ - [Storage](references/docs-memory-storage.md) - Configure storage for Mastra to persist conversations and other runtime state.
29
+ - [Working memory](references/docs-memory-working-memory.md) - Learn how to configure working memory in Mastra to store persistent user data, preferences.
30
+ - [Retrieval, semantic search, reranking](references/docs-rag-retrieval.md) - Guide on retrieval processes in Mastra's RAG systems, including semantic search, filtering, and re-ranking.
32
31
  - [Snapshots](references/docs-workflows-snapshots.md) - Learn how to save and resume workflow execution state with snapshots in Mastra
33
32
 
34
33
  ### Guides
@@ -39,12 +38,12 @@ Read the individual reference documents for detailed explanations and code examp
39
38
 
40
39
  - [Reference: Mastra.getMemory()](references/reference-core-getMemory.md) - Documentation for the `Mastra.getMemory()` method in Mastra, which retrieves a registered memory instance by its registry key.
41
40
  - [Reference: Mastra.listMemory()](references/reference-core-listMemory.md) - Documentation for the `Mastra.listMemory()` method in Mastra, which returns all registered memory instances.
42
- - [Reference: Mastra Class](references/reference-core-mastra-class.md) - Documentation for the `Mastra` class in Mastra, the core entry point for managing agents, workflows, MCP servers, and server endpoints.
43
- - [Reference: Memory Class](references/reference-memory-memory-class.md) - Documentation for the `Memory` class in Mastra, which provides a robust system for managing conversation history and thread-based message storage.
44
- - [Reference: Composite Storage](references/reference-storage-composite.md) - Documentation for combining multiple storage backends in Mastra.
45
- - [Reference: DynamoDB Storage](references/reference-storage-dynamodb.md) - Documentation for the DynamoDB storage implementation in Mastra, using a single-table design with ElectroDB.
46
- - [Reference: libSQL Storage](references/reference-storage-libsql.md) - Documentation for the libSQL storage implementation in Mastra.
47
- - [Reference: libSQL Vector Store](references/reference-vectors-libsql.md) - Documentation for the LibSQLVector class in Mastra, which provides vector search using libSQL with vector extensions.
41
+ - [Reference: Mastra class](references/reference-core-mastra-class.md) - Documentation for the `Mastra` class in Mastra, the core entry point for managing agents, workflows, MCP servers, and server endpoints.
42
+ - [Reference: Memory class](references/reference-memory-memory-class.md) - Documentation for the `Memory` class in Mastra, which provides a robust system for managing conversation history and thread-based message storage.
43
+ - [Reference: Composite storage](references/reference-storage-composite.md) - Documentation for combining multiple storage backends in Mastra.
44
+ - [Reference: DynamoDB storage](references/reference-storage-dynamodb.md) - Documentation for the DynamoDB storage implementation in Mastra, using a single-table design with ElectroDB.
45
+ - [Reference: libSQL storage](references/reference-storage-libsql.md) - Documentation for the libSQL storage implementation in Mastra.
46
+ - [Reference: libSQL vector store](references/reference-vectors-libsql.md) - Documentation for the LibSQLVector class in Mastra, which provides vector search using libSQL with vector extensions.
48
47
 
49
48
 
50
49
  Read [assets/SOURCE_MAP.json](assets/SOURCE_MAP.json) for source code references.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.0-workflow-timeout-issue-20260220185702",
2
+ "version": "0.0.0-workflow-graph-crash-20260527191009",
3
3
  "package": "@mastra/libsql",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -0,0 +1,121 @@
1
+ # Deploying
2
+
3
+ > **Note:** The Agent Builder is part of the Mastra Enterprise Edition. Production deployments require a valid EE license. [Contact sales](https://mastra.ai/contact) for more information.
4
+
5
+ Production deployments swap the local primitives in the Quickstart for cloud-backed equivalents. The shape of the `Mastra` and `MastraEditor` config doesn't change — only the providers behind it.
6
+
7
+ ## What a production deployment needs
8
+
9
+ 1. **EE license** — a valid `MASTRA_EE_LICENSE` so the server will start with the Builder enabled.
10
+ 2. **Hosted storage** — a shared store for agents, skills, runs, and memory.
11
+ 3. **Shared workspace filesystem** — survives across instances; `local` is single-node only.
12
+ 4. **Cloud sandbox** — runs agent commands safely; `local` is unsafe in shared environments.
13
+ 5. **Auth and RBAC** — gates the Builder UI and `/agent-builder/*` routes.
14
+ 6. **Public base URL for channels** — Slack and other channel providers need a reachable URL.
15
+
16
+ ## EE license
17
+
18
+ Set `MASTRA_EE_LICENSE` in the deployment environment. The server refuses to start when `builder.enabled` is truthy without a valid license. Treat the license key as a secret.
19
+
20
+ ## Storage
21
+
22
+ Replace the file-backed LibSQL store with a hosted backend. LibSQL Cloud, PostgreSQL, and any other Mastra storage adapter all work.
23
+
24
+ ```typescript
25
+ import { Mastra } from '@mastra/core/mastra'
26
+ import { LibSQLStore } from '@mastra/libsql'
27
+
28
+ new Mastra({
29
+ storage: new LibSQLStore({
30
+ url: process.env.DATABASE_URL!,
31
+ authToken: process.env.DATABASE_AUTH_TOKEN,
32
+ }),
33
+ })
34
+ ```
35
+
36
+ ## Workspace filesystem and sandbox
37
+
38
+ `local` filesystem works only on the node that owns the directory. For multi-instance deployments, register cloud filesystem and sandbox providers on `MastraEditor` and reference them by id in the inline workspace config.
39
+
40
+ **npm**:
41
+
42
+ ```bash
43
+ npm install @mastra/s3 @mastra/e2b
44
+ ```
45
+
46
+ **pnpm**:
47
+
48
+ ```bash
49
+ pnpm add @mastra/s3 @mastra/e2b
50
+ ```
51
+
52
+ **Yarn**:
53
+
54
+ ```bash
55
+ yarn add @mastra/s3 @mastra/e2b
56
+ ```
57
+
58
+ **Bun**:
59
+
60
+ ```bash
61
+ bun add @mastra/s3 @mastra/e2b
62
+ ```
63
+
64
+ ```typescript
65
+ import { Mastra } from '@mastra/core/mastra'
66
+ import { MastraEditor } from '@mastra/editor'
67
+ import { s3FilesystemProvider } from '@mastra/s3'
68
+ import { e2bSandboxProvider } from '@mastra/e2b'
69
+
70
+ new Mastra({
71
+ editor: new MastraEditor({
72
+ filesystems: { [s3FilesystemProvider.id]: s3FilesystemProvider },
73
+ sandboxes: { [e2bSandboxProvider.id]: e2bSandboxProvider },
74
+ builder: {
75
+ enabled: true,
76
+ configuration: {
77
+ agent: {
78
+ workspace: {
79
+ type: 'inline',
80
+ config: {
81
+ name: 'builder-workspace',
82
+ filesystem: {
83
+ provider: s3FilesystemProvider.id,
84
+ config: {
85
+ bucket: process.env.S3_BUCKET!,
86
+ region: process.env.S3_REGION!,
87
+ },
88
+ },
89
+ sandbox: {
90
+ provider: e2bSandboxProvider.id,
91
+ config: { apiKey: process.env.E2B_API_KEY! },
92
+ },
93
+ },
94
+ },
95
+ },
96
+ },
97
+ },
98
+ }),
99
+ })
100
+ ```
101
+
102
+ `S3Filesystem` uses the default AWS credential chain (environment variables, `~/.aws` config, IAM roles, EC2 instance profile). For long-running deployments, use a credential provider function so credentials refresh automatically.
103
+
104
+ `DockerSandbox` and `VercelSandbox` are alternative cloud sandbox providers — pick whichever matches your runtime.
105
+
106
+ > **Warning:** A local sandbox can't run commands safely in a shared environment. Always register a cloud sandbox provider and reference it in the workspace config before deploying.
107
+
108
+ ## Auth and RBAC
109
+
110
+ A production deployment without authentication exposes the Builder to the public internet. Register a `Mastra.server.auth` provider (for example, WorkOS or your own provider) and a `Mastra.server.rbac` provider to gate access.
111
+
112
+ See [Access control](https://mastra.ai/docs/agent-builder/access-control) for the required role permissions and a WorkOS quickstart.
113
+
114
+ ## Public URL for channels
115
+
116
+ Slack needs to reach your server through a public URL. Pass `baseUrl` to `SlackProvider` with the deployed URL (no trailing slash). See [Channels](https://mastra.ai/docs/agent-builder/channels) for the full setup.
117
+
118
+ ## Related
119
+
120
+ - [Access control](https://mastra.ai/docs/agent-builder/access-control) — auth and RBAC setup.
121
+ - [Channels](https://mastra.ai/docs/agent-builder/channels) — Slack `baseUrl` and channel-specific setup.
@@ -0,0 +1,97 @@
1
+ # Agent Builder overview
2
+
3
+ > **Note:** The Agent Builder is part of the Mastra Enterprise Edition. Production deployments require a valid EE license. [Contact sales](https://mastra.ai/contact) for more information.
4
+
5
+ The Agent Builder lets you build, configure, and operate Mastra agents all within the UI. It runs inside your Mastra server, persists everything to `Mastra.storage`, and supports multi-tenant agent workflows with RBAC and channel integrations.
6
+
7
+ - [**Configuration**](https://mastra.ai/docs/agent-builder/configuration): Toggle UI sections and pin admin-controlled defaults for every new agent.
8
+ - [**Model policy**](https://mastra.ai/docs/agent-builder/model-policy): Restrict which providers and models the Builder exposes, and pin a default.
9
+ - [**Memory**](https://mastra.ai/docs/agent-builder/memory): Configure the default memory shape for every Builder-created agent.
10
+ - [**Access control**](https://mastra.ai/docs/agent-builder/access-control): Gate the Builder behind Mastra RBAC roles and permissions.
11
+ - [**Channels**](https://mastra.ai/docs/agent-builder/channels): Connect Builder-created agents to Slack and other channels.
12
+ - [**Skill registries**](https://mastra.ai/docs/agent-builder/skill-registries): Browse and install community skills from opt-in registries.
13
+ - [**Deploying**](https://mastra.ai/docs/agent-builder/deploying): Swap local primitives for cloud-backed storage, filesystems, and sandboxes.
14
+
15
+ For building agents entirely in code, see the [Agents overview](https://mastra.ai/docs/agents/overview). For editing code-defined agents through Studio, see the [Editor overview](https://mastra.ai/docs/editor/overview).
16
+
17
+ ## Get started
18
+
19
+ Install `@mastra/editor` alongside a storage adapter:
20
+
21
+ **npm**:
22
+
23
+ ```bash
24
+ npm install @mastra/editor @mastra/libsql
25
+ ```
26
+
27
+ **pnpm**:
28
+
29
+ ```bash
30
+ pnpm add @mastra/editor @mastra/libsql
31
+ ```
32
+
33
+ **Yarn**:
34
+
35
+ ```bash
36
+ yarn add @mastra/editor @mastra/libsql
37
+ ```
38
+
39
+ **Bun**:
40
+
41
+ ```bash
42
+ bun add @mastra/editor @mastra/libsql
43
+ ```
44
+
45
+ Wire the Agent Builder onto a `Mastra` instance:
46
+
47
+ ```typescript
48
+ import { Mastra } from '@mastra/core/mastra'
49
+ import { MastraEditor } from '@mastra/editor'
50
+ import { createBuilderAgent } from '@mastra/editor/ee'
51
+ import { LibSQLStore } from '@mastra/libsql'
52
+
53
+ export const mastra = new Mastra({
54
+ storage: new LibSQLStore({ url: 'file:./mastra.db' }),
55
+ agents: { builderAgent: createBuilderAgent() },
56
+ editor: new MastraEditor({
57
+ builder: {
58
+ enabled: true,
59
+ configuration: {
60
+ agent: {
61
+ memory: { observationalMemory: true },
62
+ },
63
+ },
64
+ },
65
+ }),
66
+ })
67
+ ```
68
+
69
+ Start the dev server:
70
+
71
+ ```bash
72
+ npx mastra dev
73
+ ```
74
+
75
+ The Agent Builder is mounted at `http://localhost:4111/agent-builder`.
76
+
77
+ ## Prerequisites
78
+
79
+ The Agent Builder requires:
80
+
81
+ - **Storage**: An `@mastra/core` storage adapter on the `Mastra` instance. Agents, memory, and workspace state all persist through `Mastra.storage`.
82
+ - **The Builder agent**: Register a Builder agent created with the `createBuilderAgent()` factory from `@mastra/editor/ee` on `Mastra.agents`. The chat-based editor invokes it through the same `Mastra.getAgent(id)` lookup as any other agent. Without this registration, the chat-based editor returns 404.
83
+ - **`OPENAI_API_KEY`**: The Builder agent created by `createBuilderAgent()` runs on an OpenAI model, so an `OPENAI_API_KEY` environment variable is required.
84
+
85
+ ## Disabling the Builder
86
+
87
+ Set `enabled: false` to keep the config in place but turn the surface off:
88
+
89
+ ```typescript
90
+ new MastraEditor({
91
+ builder: {
92
+ enabled: false,
93
+ },
94
+ })
95
+ ```
96
+
97
+ Omitting the `builder` field has the same effect.