@mastra/libsql 1.15.0 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-agent-builder-deploying.md +1 -1
- package/dist/docs/references/docs-agents-agent-approval.md +2 -0
- package/dist/docs/references/docs-memory-working-memory.md +1 -1
- package/dist/docs/references/docs-workflows-snapshots.md +1 -1
- package/dist/docs/references/reference-core-mastra-class.md +3 -3
- package/dist/docs/references/reference-memory-memory-class.md +5 -5
- package/dist/docs/references/reference-storage-composite.md +2 -2
- package/dist/docs/references/reference-storage-dynamodb.md +1 -1
- package/dist/docs/references/reference-storage-libsql.md +1 -1
- package/dist/docs/references/reference-storage-retention.md +5 -5
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/schedules/index.d.ts.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @mastra/libsql
|
|
2
2
|
|
|
3
|
+
## 1.15.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Update `@mastra/core` peer dependency for the unified schedules API ([#18874](https://github.com/mastra-ai/mastra/pull/18874))
|
|
8
|
+
|
|
9
|
+
- Schedule rows persisted with the legacy `target.type: 'heartbeat'` are now normalized to `target.type: 'agent'` when read, so existing agent schedules keep firing after the heartbeats-to-schedules rename in `@mastra/core`. ([#18874](https://github.com/mastra-ai/mastra/pull/18874))
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`b291760`](https://github.com/mastra-ai/mastra/commit/b291760df9d6c7e4fc72606c8f0a4af2cf6e946c), [`3ffb8b7`](https://github.com/mastra-ai/mastra/commit/3ffb8b720e90f5e6977129ec1f6707d43c2bebe0), [`6ef59fe`](https://github.com/mastra-ai/mastra/commit/6ef59fef1da52ed8da5fbb2a892c71cf4fb6c739), [`4039488`](https://github.com/mastra-ai/mastra/commit/403948898af7293198d9e8b3e7fb47f623c78b94), [`29b7ea6`](https://github.com/mastra-ai/mastra/commit/29b7ea64e72b5523d5bdcbd34ee03d2b854d54e1), [`b2c9d70`](https://github.com/mastra-ai/mastra/commit/b2c9d70757207fb01a9069549e69b6f0d73a6636), [`a51c63d`](https://github.com/mastra-ai/mastra/commit/a51c63d8ee639e4daeba2a0be093efa6a1b5e52f), [`252f63d`](https://github.com/mastra-ai/mastra/commit/252f63d8fec723955adb2202be2f01a75ad0e69c), [`5ea76a7`](https://github.com/mastra-ai/mastra/commit/5ea76a723d966c72da9aa3ab30ae20276e049765), [`6445560`](https://github.com/mastra-ai/mastra/commit/6445560327045d20b239585fc63fed72e9ce36ec), [`e2b9f33`](https://github.com/mastra-ai/mastra/commit/e2b9f33456fd638eca555f9466c6519d8d049666), [`10959d5`](https://github.com/mastra-ai/mastra/commit/10959d509d824f682d40ff96e05ee044aec3b0e5), [`c547a77`](https://github.com/mastra-ai/mastra/commit/c547a7729bdf64dfc2df29c965046c0712a18f10), [`a0085fa`](https://github.com/mastra-ai/mastra/commit/a0085fa0934e52c37c8c8b3d75a6bb5cd199af36), [`a2ba369`](https://github.com/mastra-ai/mastra/commit/a2ba369e796dfab610f41c6875965b488272fa55), [`ffc3c17`](https://github.com/mastra-ai/mastra/commit/ffc3c17274ea17c11aa6f73d3140649cd7fc8abc), [`81542c1`](https://github.com/mastra-ai/mastra/commit/81542c1835c35bc32f2ce4fa9136ee11993cd299), [`3908e53`](https://github.com/mastra-ai/mastra/commit/3908e53ce04bbea04f5e0c097d7aa298c35fabee), [`cb24ce7`](https://github.com/mastra-ai/mastra/commit/cb24ce76bd16ca88eb6a963f6277f8780e703029), [`02705fd`](https://github.com/mastra-ai/mastra/commit/02705fd2f5a9062210d64ea061adeeb10dc9452e), [`ae51e81`](https://github.com/mastra-ai/mastra/commit/ae51e818825582d42500338dfc1929a082eff0ba), [`6f304ef`](https://github.com/mastra-ai/mastra/commit/6f304ef319e99725e884bdb8d3193c001b6e5964), [`5f9858f`](https://github.com/mastra-ai/mastra/commit/5f9858f791f1137ca7d52d23559fb4568f7a9026)]:
|
|
12
|
+
- @mastra/core@1.50.0
|
|
13
|
+
|
|
14
|
+
## 1.15.1-alpha.0
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Update `@mastra/core` peer dependency for the unified schedules API ([#18874](https://github.com/mastra-ai/mastra/pull/18874))
|
|
19
|
+
|
|
20
|
+
- Schedule rows persisted with the legacy `target.type: 'heartbeat'` are now normalized to `target.type: 'agent'` when read, so existing agent schedules keep firing after the heartbeats-to-schedules rename in `@mastra/core`. ([#18874](https://github.com/mastra-ai/mastra/pull/18874))
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [[`b291760`](https://github.com/mastra-ai/mastra/commit/b291760df9d6c7e4fc72606c8f0a4af2cf6e946c), [`29b7ea6`](https://github.com/mastra-ai/mastra/commit/29b7ea64e72b5523d5bdcbd34ee03d2b854d54e1), [`10959d5`](https://github.com/mastra-ai/mastra/commit/10959d509d824f682d40ff96e05ee044aec3b0e5), [`ffc3c17`](https://github.com/mastra-ai/mastra/commit/ffc3c17274ea17c11aa6f73d3140649cd7fc8abc), [`3908e53`](https://github.com/mastra-ai/mastra/commit/3908e53ce04bbea04f5e0c097d7aa298c35fabee)]:
|
|
23
|
+
- @mastra/core@1.50.0-alpha.3
|
|
24
|
+
|
|
3
25
|
## 1.15.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -103,7 +103,7 @@ new Mastra({
|
|
|
103
103
|
|
|
104
104
|
`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.
|
|
105
105
|
|
|
106
|
-
`DockerSandbox` and `
|
|
106
|
+
`DockerSandbox`, `VercelSandbox`, and `VercelServerlessSandbox` are alternative cloud sandbox providers. Pick whichever matches your runtime.
|
|
107
107
|
|
|
108
108
|
> **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.
|
|
109
109
|
|
|
@@ -49,6 +49,8 @@ for await (const chunk of stream.fullStream) {
|
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
> **Note:** Agent approval uses snapshots to capture request state. Configure a [storage provider](https://mastra.ai/docs/memory/storage) on your Mastra instance or you'll see a "snapshot not found" error.
|
|
52
|
+
>
|
|
53
|
+
> Snapshots for agent runs are minimal resume artifacts: they hold only what's needed to resume the suspended run and are deleted once the run finishes. Use [tracing](https://mastra.ai/docs/observability/overview) for the execution record and [memory](https://mastra.ai/docs/memory/overview) for the conversation history.
|
|
52
54
|
|
|
53
55
|
## How approval works
|
|
54
56
|
|
|
@@ -399,7 +399,7 @@ const response = await agent.generate('What do you know about me?', {
|
|
|
399
399
|
|
|
400
400
|
## Opt in to state signals (experimental)
|
|
401
401
|
|
|
402
|
-
By default, working memory reaches the model as part of the system message. You can opt into delivering it as a [state signal](https://mastra.ai/docs/agents/signals) instead by setting `useStateSignals: true`:
|
|
402
|
+
By default, working memory reaches the model as part of the system message. You can opt into delivering it as a [state signal](https://mastra.ai/docs/long-running-agents/signals) instead by setting `useStateSignals: true`:
|
|
403
403
|
|
|
404
404
|
```typescript
|
|
405
405
|
const memory = new Memory({
|
|
@@ -235,6 +235,6 @@ if (result.status === 'suspended') {
|
|
|
235
235
|
## Related
|
|
236
236
|
|
|
237
237
|
- [Control Flow](https://mastra.ai/docs/workflows/control-flow)
|
|
238
|
-
- [Suspend
|
|
238
|
+
- [Suspend and Resume](https://mastra.ai/docs/workflows/suspend-and-resume)
|
|
239
239
|
- [Time Travel](https://mastra.ai/docs/workflows/time-travel)
|
|
240
240
|
- [Human-in-the-loop](https://mastra.ai/docs/workflows/human-in-the-loop)
|
|
@@ -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
|
|
|
@@ -29,23 +29,23 @@ export const agent = new Agent({
|
|
|
29
29
|
|
|
30
30
|
## Constructor parameters
|
|
31
31
|
|
|
32
|
-
**storage** (`MastraCompositeStore`): Storage implementation for persisting memory data. Defaults to
|
|
32
|
+
**storage** (`MastraCompositeStore`): Storage implementation for persisting memory data. Defaults to new DefaultStorage({ config: { url: "file:memory.db" } }) if not provided.
|
|
33
33
|
|
|
34
|
-
**vector** (`MastraVector | false`): Vector store for semantic search capabilities. Set to
|
|
34
|
+
**vector** (`MastraVector | false`): Vector store for semantic search capabilities. Set to false to disable vector operations.
|
|
35
35
|
|
|
36
36
|
**embedder** (`EmbeddingModel<string> | EmbeddingModelV2<string>`): Embedder instance for vector embeddings. Required when semantic recall is enabled.
|
|
37
37
|
|
|
38
38
|
**options** (`MemoryConfig`): Memory configuration options.
|
|
39
39
|
|
|
40
|
-
**options.lastMessages** (`number | false`): Number of most recent messages to include in context. Set to
|
|
40
|
+
**options.lastMessages** (`number | false`): Number of most recent messages to include in context. Set to false to disable loading conversation history into context. Use Number.MAX\_SAFE\_INTEGER to retrieve all messages with no limit. To prevent saving new messages, use the readOnly option instead.
|
|
41
41
|
|
|
42
42
|
**options.readOnly** (`boolean`): When true, prevents memory from saving new messages and provides working memory as read-only context (without the updateWorkingMemory tool). Useful for read-only operations like previews, internal routing agents, or sub agents that should reference but not modify memory.
|
|
43
43
|
|
|
44
44
|
**options.semanticRecall** (`boolean | { topK: number; messageRange: number | { before: number; after: number }; scope?: 'thread' | 'resource' }`): Enable semantic search in message history. Can be a boolean or an object with configuration options. When enabled, requires both vector store and embedder to be configured. Default topK is 4, default messageRange is {before: 1, after: 1}.
|
|
45
45
|
|
|
46
|
-
**options.workingMemory** (`WorkingMemory`): Configuration for working memory feature. Can be
|
|
46
|
+
**options.workingMemory** (`WorkingMemory`): Configuration for working memory feature. Can be { enabled: boolean; template?: string; schema?: ZodObject\<any> | JSONSchema7; scope?: 'thread' | 'resource' } or { enabled: boolean } to disable.
|
|
47
47
|
|
|
48
|
-
**options.observationalMemory** (`boolean | ObservationalMemoryOptions`): Enable Observational Memory for long-context agentic memory. Set to
|
|
48
|
+
**options.observationalMemory** (`boolean | ObservationalMemoryOptions`): Enable Observational Memory for long-context agentic memory. Set to true for defaults, or pass a config object to customize token budgets, models, and scope. See Observational Memory reference for configuration details.
|
|
49
49
|
|
|
50
50
|
**options.generateTitle** (`boolean | { model: DynamicArgument<MastraLanguageModel>; instructions?: DynamicArgument<string> }`): Controls automatic thread title generation from the user's first message. Can be a boolean or an object with custom model and instructions.
|
|
51
51
|
|
|
@@ -128,11 +128,11 @@ export const mastra = new Mastra({
|
|
|
128
128
|
|
|
129
129
|
**id** (`string`): Unique identifier for this storage instance.
|
|
130
130
|
|
|
131
|
-
**default** (`MastraCompositeStore`): Default storage adapter. Domains not explicitly specified in
|
|
131
|
+
**default** (`MastraCompositeStore`): Default storage adapter. Domains not explicitly specified in domains will use this storage's domains as fallbacks.
|
|
132
132
|
|
|
133
133
|
**disableInit** (`boolean`): When true, automatic initialization is disabled. You must call init() explicitly.
|
|
134
134
|
|
|
135
|
-
**domains** (`object`): Individual domain overrides. Each domain can come from a different storage adapter. These take precedence over both
|
|
135
|
+
**domains** (`object`): Individual domain overrides. Each domain can come from a different storage adapter. These take precedence over both editor and default storage.
|
|
136
136
|
|
|
137
137
|
**domains.memory** (`MemoryStorage`): Storage for threads, messages, and resources.
|
|
138
138
|
|
|
@@ -118,7 +118,7 @@ For local development, you can use [DynamoDB Local](https://docs.aws.amazon.com/
|
|
|
118
118
|
|
|
119
119
|
**config.endpoint** (`string`): Custom endpoint for DynamoDB (e.g., 'http\://localhost:8000' for local development).
|
|
120
120
|
|
|
121
|
-
**config.credentials** (`object`): AWS credentials object with
|
|
121
|
+
**config.credentials** (`object`): AWS credentials object with accessKeyId and secretAccessKey. If not provided, the AWS SDK will attempt to source credentials from environment variables, IAM roles (e.g., for EC2/Lambda), or the shared AWS credentials file.
|
|
122
122
|
|
|
123
123
|
**config.ttl** (`object`): TTL (Time To Live) configuration for automatic data expiration. Configure per entity type: thread, message, trace, eval, workflow\_snapshot, resource, score. Each entity config includes: enabled (boolean), attributeName (string, default: 'ttl'), defaultTtlSeconds (number).
|
|
124
124
|
|
|
@@ -91,7 +91,7 @@ storage: new LibSQLStore({
|
|
|
91
91
|
|
|
92
92
|
## Options
|
|
93
93
|
|
|
94
|
-
**url** (`string`): Database URL. Use
|
|
94
|
+
**url** (`string`): Database URL. Use :memory: for in-memory database, file:filename.db for a file database, or a libSQL connection string (e.g., libsql://your-database.turso.io) for remote storage.
|
|
95
95
|
|
|
96
96
|
**authToken** (`string`): Authentication token for remote libSQL databases.
|
|
97
97
|
|
|
@@ -55,11 +55,11 @@ Set the `retention` field on the store config.
|
|
|
55
55
|
|
|
56
56
|
**retention** (`RetentionConfig`): Per-domain, per-table age policies. Unset domains and tables are kept forever.
|
|
57
57
|
|
|
58
|
-
**retention.\[domain]** (`Record<TableKey, TableRetentionPolicy>`): A real storage domain key (e.g.
|
|
58
|
+
**retention.\[domain]** (`Record<TableKey, TableRetentionPolicy>`): A real storage domain key (e.g. memory, observability). Maps that domain's retention-eligible table keys to their policies.
|
|
59
59
|
|
|
60
60
|
### TableRetentionPolicy
|
|
61
61
|
|
|
62
|
-
**maxAge** (`Duration`): Maximum age to keep rows. Rows whose anchor timestamp is strictly older than
|
|
62
|
+
**maxAge** (`Duration`): Maximum age to keep rows. Rows whose anchor timestamp is strictly older than Date.now() - maxAge are eligible for deletion. A number is milliseconds, or a string with a unit suffix: ms, s, m, h, d, w (e.g. '30d', '12h').
|
|
63
63
|
|
|
64
64
|
**batchSize** (`number`): Rows deleted per batch. Each batch is its own transaction, which bounds lock duration and WAL growth on large tables. (Default: `1000`)
|
|
65
65
|
|
|
@@ -122,13 +122,13 @@ Returns: `Promise<PruneResult[]>`
|
|
|
122
122
|
|
|
123
123
|
##### PruneOptions
|
|
124
124
|
|
|
125
|
-
**maxBatches** (`number`): Maximum delete batches per table per call. When reached, that table's result is returned with
|
|
125
|
+
**maxBatches** (`number`): Maximum delete batches per table per call. When reached, that table's result is returned with done: false.
|
|
126
126
|
|
|
127
|
-
**maxRows** (`number`): Maximum rows deleted per table per call. When reached, that table's result is returned with
|
|
127
|
+
**maxRows** (`number`): Maximum rows deleted per table per call. When reached, that table's result is returned with done: false.
|
|
128
128
|
|
|
129
129
|
**pauseMs** (`number`): Delay in milliseconds between batches, to avoid starving live traffic.
|
|
130
130
|
|
|
131
|
-
**signal** (`AbortSignal`): Cooperative cancellation. The batch loop checks it between batches and stops cleanly, returning partial results with
|
|
131
|
+
**signal** (`AbortSignal`): Cooperative cancellation. The batch loop checks it between batches and stops cleanly, returning partial results with done: false.
|
|
132
132
|
|
|
133
133
|
##### PruneResult
|
|
134
134
|
|
package/dist/index.cjs
CHANGED
|
@@ -10355,7 +10355,7 @@ function rowToSchedule(row) {
|
|
|
10355
10355
|
}
|
|
10356
10356
|
const schedule = {
|
|
10357
10357
|
id: String(row.id),
|
|
10358
|
-
target,
|
|
10358
|
+
target: storage.normalizeScheduleTarget(target),
|
|
10359
10359
|
cron: String(row.cron),
|
|
10360
10360
|
status: String(row.status),
|
|
10361
10361
|
nextFireAt: toNumber(row.next_fire_at),
|