@mastra/libsql 1.15.0 → 1.15.1-alpha.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @mastra/libsql
2
2
 
3
+ ## 1.15.1-alpha.0
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), [`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)]:
12
+ - @mastra/core@1.50.0-alpha.3
13
+
3
14
  ## 1.15.0
4
15
 
5
16
  ### Minor Changes
@@ -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: "1.15.0"
6
+ version: "1.15.1-alpha.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.15.0",
2
+ "version": "1.15.1-alpha.0",
3
3
  "package": "@mastra/libsql",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -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 `VercelSandbox` are alternative cloud sandbox providers, pick whichever matches your runtime.
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 & Resume](https://mastra.ai/docs/workflows/suspend-and-resume)
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. \`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.
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 \`false\` to opt out of automatic scheduled notification dispatch.
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 \[Sub-agent versioning]\(/docs/editor/overview#sub-agent-versioning) for details.
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 \`new DefaultStorage({ config: { url: "file:memory.db" } })\` if not provided.
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 \`false\` to disable vector operations.
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 \`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.
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 \`{ enabled: boolean; template?: string; schema?: ZodObject\<any> | JSONSchema7; scope?: 'thread' | 'resource' }\` or \`{ enabled: boolean }\` to disable.
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 \`true\` for defaults, or pass a config object to customize token budgets, models, and scope. See \[Observational Memory reference]\(/reference/memory/observational-memory) for configuration details.
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 \`domains\` will use this storage's domains as fallbacks.
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 \`editor\` and \`default\` storage.
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 \`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.
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 \`: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.
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. \`memory\`, \`observability\`). Maps that domain's retention-eligible table keys to their policies.
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 \`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'\`).
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 \`done: false\`.
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 \`done: false\`.
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 \`done: false\`.
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),