@mastra/libsql 1.19.0-alpha.1 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/datasets/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAUL,eAAe,EAMhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,cAAc,EACd,cAAc,EAEd,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAUnD,qBAAa,cAAe,SAAQ,eAAe;;gBAIrC,MAAM,EAAE,kBAAkB;IAOhC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA4ErB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;YAM5B,qBAAqB;IAenC,OAAO,CAAC,mBAAmB;IAuB3B,OAAO,CAAC,gBAAgB;IAqBxB,OAAO,CAAC,oBAAoB;IAuB5B,OAAO,CAAC,0BAA0B;IAW5B,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;IAqEhE,cAAc,CAAC,EACnB,EAAE,EACF,OAAO,GACR,EAAE;QACD,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,CAAC,EAAE,qBAAqB,CAAC;KACjC,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;cAqBjB,gBAAgB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;IA8F5E,aAAa,CAAC,EAAE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provider for Mastra - includes both vector and db storage capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -31,10 +31,10 @@
31
31
  "tsx": "^4.23.1",
32
32
  "typescript": "^6.0.3",
33
33
  "vitest": "4.1.10",
34
- "@internal/storage-test-utils": "0.0.115",
35
- "@internal/lint": "0.0.119",
36
- "@internal/types-builder": "0.0.94",
37
- "@mastra/core": "1.56.0-alpha.4"
34
+ "@internal/types-builder": "0.0.95",
35
+ "@internal/lint": "0.0.120",
36
+ "@mastra/core": "1.56.0",
37
+ "@internal/storage-test-utils": "0.0.116"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@mastra/core": ">=1.51.0-0 <2.0.0-0"
@@ -1,124 +0,0 @@
1
- > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
-
3
- # Deploying
4
-
5
- > **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.
6
-
7
- 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.
8
-
9
- ## What a production deployment needs
10
-
11
- 1. **EE license**: A valid `MASTRA_EE_LICENSE` so the server will start with the Builder enabled.
12
- 2. **Hosted storage**: A shared store for agents, skills, runs, and memory.
13
- 3. **Shared workspace filesystem**: Survives across instances. `local` is single-node only.
14
- 4. **Cloud sandbox**: Runs agent commands safely. `local` is unsafe in shared environments.
15
- 5. **Auth and RBAC**: Gates the Builder UI and `/agent-builder/*` routes.
16
- 6. **Public base URL for channels**: Slack and other channel providers need a reachable URL.
17
-
18
- ## EE license
19
-
20
- 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.
21
-
22
- ## Storage
23
-
24
- Replace the file-backed LibSQL store with a hosted backend. LibSQL Cloud, PostgreSQL, and any other Mastra storage adapter all work.
25
-
26
- ```typescript
27
- import { Mastra } from '@mastra/core/mastra'
28
- import { LibSQLStore } from '@mastra/libsql'
29
-
30
- new Mastra({
31
- storage: new LibSQLStore({
32
- id: 'mastra-storage',
33
- url: process.env.DATABASE_URL!,
34
- authToken: process.env.DATABASE_AUTH_TOKEN,
35
- }),
36
- })
37
- ```
38
-
39
- ## Workspace filesystem and sandbox
40
-
41
- `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.
42
-
43
- **npm**:
44
-
45
- ```bash
46
- npm install @mastra/s3 @mastra/e2b
47
- ```
48
-
49
- **pnpm**:
50
-
51
- ```bash
52
- pnpm add @mastra/s3 @mastra/e2b
53
- ```
54
-
55
- **Yarn**:
56
-
57
- ```bash
58
- yarn add @mastra/s3 @mastra/e2b
59
- ```
60
-
61
- **Bun**:
62
-
63
- ```bash
64
- bun add @mastra/s3 @mastra/e2b
65
- ```
66
-
67
- ```typescript
68
- import { Mastra } from '@mastra/core/mastra'
69
- import { MastraEditor } from '@mastra/editor'
70
- import { s3FilesystemProvider } from '@mastra/s3'
71
- import { e2bSandboxProvider } from '@mastra/e2b'
72
-
73
- new Mastra({
74
- editor: new MastraEditor({
75
- filesystems: { [s3FilesystemProvider.id]: s3FilesystemProvider },
76
- sandboxes: { [e2bSandboxProvider.id]: e2bSandboxProvider },
77
- builder: {
78
- enabled: true,
79
- configuration: {
80
- agent: {
81
- workspace: {
82
- type: 'inline',
83
- config: {
84
- name: 'builder-workspace',
85
- filesystem: {
86
- provider: s3FilesystemProvider.id,
87
- config: {
88
- bucket: process.env.S3_BUCKET!,
89
- region: process.env.S3_REGION!,
90
- },
91
- },
92
- sandbox: {
93
- provider: e2bSandboxProvider.id,
94
- config: { apiKey: process.env.E2B_API_KEY! },
95
- },
96
- },
97
- },
98
- },
99
- },
100
- },
101
- }),
102
- })
103
- ```
104
-
105
- `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.
106
-
107
- `DockerSandbox`, `VercelSandbox`, and `VercelServerlessSandbox` are alternative cloud sandbox providers. Pick whichever matches your runtime.
108
-
109
- > **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.
110
-
111
- ## Auth and RBAC
112
-
113
- 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.
114
-
115
- See [Access control](https://mastra.ai/docs/agent-builder/access-control) for the required role permissions and a WorkOS quickstart.
116
-
117
- ## Public URL for channels
118
-
119
- 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.
120
-
121
- ## Related
122
-
123
- - [Access control](https://mastra.ai/docs/agent-builder/access-control): Auth and RBAC setup.
124
- - [Channels](https://mastra.ai/docs/agent-builder/channels): Slack `baseUrl` and channel-specific setup.
@@ -1,114 +0,0 @@
1
- > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
-
3
- # Agent Builder overview
4
-
5
- > **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.
6
-
7
- 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.
8
-
9
- > **📹 Watch:** Watch [Mastra Agent Builder overview](https://www.youtube.com/watch?v=AbdgIu4Z07I) to see how teams create and configure agents from the UI.
10
-
11
- - [**Configuration**](https://mastra.ai/docs/agent-builder/configuration): Toggle UI sections and pin admin-controlled defaults for every new agent.
12
- - [**Model policy**](https://mastra.ai/docs/agent-builder/model-policy): Restrict which providers and models the Builder exposes, and pin a default.
13
- - [**Memory**](https://mastra.ai/docs/agent-builder/memory): Configure the default memory shape for every Builder-created agent.
14
- - [**Workspace**](https://mastra.ai/docs/agent-builder/workspace): Configure the default filesystem, sandbox, and skills workspace for Builder-created agents.
15
- - [**Browser**](https://mastra.ai/docs/agent-builder/browser): Register browser providers and pin a default browser configuration.
16
- - [**Access control**](https://mastra.ai/docs/agent-builder/access-control): Gate the Builder behind Mastra RBAC roles and permissions.
17
- - [**Channels**](https://mastra.ai/docs/agent-builder/channels): Connect Builder-created agents to Slack and other channels.
18
- - [**Tool providers**](https://mastra.ai/docs/agent-builder/integrations): Connect Builder-created agents to third-party apps through OAuth-backed tool providers.
19
- - [**Skill registries**](https://mastra.ai/docs/agent-builder/skill-registries): Browse and install community skills from opt-in registries.
20
- - [**Deploying**](https://mastra.ai/docs/agent-builder/deploying): Swap local primitives for cloud-backed storage, filesystems, and sandboxes.
21
-
22
- 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).
23
-
24
- ## Prerequisites
25
-
26
- The Agent Builder requires:
27
-
28
- - An existing Mastra project (Follow the [installation guide](https://mastra.ai/guides/getting-started/quickstart) to set up a new project)
29
- - **Storage**: A `@mastra/core` storage adapter on the `Mastra` instance. Agents, memory, and workspace state all persist through `Mastra.storage`.
30
- - **A builder agent**: Register a `builderAgent` 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.
31
- - **Model credentials**: `createBuilderAgent()` uses an OpenAI model by default, which requires `OPENAI_API_KEY`. To use a different provider, pass a `model` override to `createBuilderAgent({ model })` and set that provider's credentials instead.
32
-
33
- ## Get started
34
-
35
- Install `@mastra/editor` alongside a storage adapter. This example uses `@mastra/libsql`:
36
-
37
- **npm**:
38
-
39
- ```bash
40
- npm install @mastra/editor @mastra/libsql
41
- ```
42
-
43
- **pnpm**:
44
-
45
- ```bash
46
- pnpm add @mastra/editor @mastra/libsql
47
- ```
48
-
49
- **Yarn**:
50
-
51
- ```bash
52
- yarn add @mastra/editor @mastra/libsql
53
- ```
54
-
55
- **Bun**:
56
-
57
- ```bash
58
- bun add @mastra/editor @mastra/libsql
59
- ```
60
-
61
- The example below defines a storage adapter and registers a builder agent, plus enables the editor as explained in the prerequisites:
62
-
63
- ```typescript
64
- import { Mastra } from '@mastra/core/mastra'
65
- import { MastraEditor } from '@mastra/editor'
66
- import { createBuilderAgent } from '@mastra/editor/ee'
67
- import { LibSQLStore } from '@mastra/libsql'
68
-
69
- export const mastra = new Mastra({
70
- storage: new LibSQLStore({ id: 'mastra-storage', url: 'file:./mastra.db' }),
71
- agents: { builderAgent: createBuilderAgent() },
72
- editor: new MastraEditor({
73
- builder: {
74
- enabled: true,
75
- configuration: {
76
- agent: {
77
- memory: { observationalMemory: true },
78
- },
79
- },
80
- },
81
- }),
82
- })
83
- ```
84
-
85
- Start Mastra's development server:
86
-
87
- ```bash
88
- npx mastra dev
89
- ```
90
-
91
- For Agent Builder development, you can also use `mastra factory dev`, which uses the same dev runtime and flags as `mastra dev` and writes to the same `.mastra/output` directory. Both commands share a dev lock and can't run simultaneously in the same project. See the [CLI reference](https://mastra.ai/reference/cli/mastra) for details.
92
-
93
- The Agent Builder is mounted at `http://localhost:4111/agent-builder`.
94
-
95
- ## Disabling the Builder
96
-
97
- Set `enabled: false` to keep the config in place but turn the surface off:
98
-
99
- ```typescript
100
- new MastraEditor({
101
- builder: {
102
- enabled: false,
103
- },
104
- })
105
- ```
106
-
107
- Omitting the `builder` field has the same effect.
108
-
109
- ## Next steps
110
-
111
- - [Configuration](https://mastra.ai/docs/agent-builder/configuration): Toggle Builder surfaces and pin defaults for new agents.
112
- - [Access control](https://mastra.ai/docs/agent-builder/access-control): Gate the Builder with authentication and role-based access control.
113
- - [Deploying](https://mastra.ai/docs/agent-builder/deploying): Replace local development primitives with production-ready storage, filesystems, and sandboxes.
114
- - 📹 [Mastra Agent Builder workshop](https://www.youtube.com/watch?v=p2p_wb-rUPg\&t=666s)