fix(deps): update dependency @mastra/libsql to v1#49
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
0f31af0 to
c8a1017
Compare
671d98a to
293792e
Compare
7f9d8cf to
630398d
Compare
2dcdb6d to
50800d9
Compare
cf57051 to
15c191d
Compare
bf2f144 to
f2d02c9
Compare
1aaa8d0 to
dd0fbef
Compare
5551cef to
56a2887
Compare
0efc669 to
f32ad51
Compare
f32ad51 to
cbd2103
Compare
12381f2 to
0ce1ac7
Compare
457860f to
fa2481f
Compare
fa2481f to
93ab440
Compare
a936250 to
e1dc812
Compare
e1dc812 to
5789634
Compare
3256f3d to
ab51a5a
Compare
76a5b30 to
eea95c2
Compare
eea95c2 to
55cb13b
Compare
55cb13b to
8982ec4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.12.0→^1.0.0Release Notes
mastra-ai/mastra (@mastra/libsql)
v1.15.0Compare Source
Minor Changes
Added storage retention support to libSQL. When you set a
retentionconfig,LibSQLStorecan prune old rows from every growth-table domain:memory(threads, messages, resources bycreatedAt),threadState(byupdatedAt),observability(spans bystartedAt),scores(bycreatedAt),workflows(run snapshots byupdatedAt),backgroundTasks(bycompletedAt, so in-flight tasks are never pruned),experiments(whole runs bycompletedAt, results cascade with their parent),notificationsandharnesssessions (bycreatedAt), andschedulesfire history (byactual_fire_at). (#18733)Deletes run in batches so they stay safe on large tables. Anchor-column indexes are created lazily on the first
prune()call — never at init — so deployments that don't configure retention pay no extra index overhead.prune()only deletes rows; reclaiming disk (for example aVACUUMon self-hosted libSQL) is left to you to run in a maintenance window.Patch Changes
Added optional tenancy arguments to
getDataset,updateDataset, anddeleteDataset. (#18750)You can now pass
organizationIdandprojectIdto scope dataset reads, updates, and deletes to a specific tenant. Reads and updates against a dataset in a different tenant throwDATASET_NOT_FOUND(surfaced as a 404 over HTTP). Deletes silently no-op on a tenancy mismatch — matching the existing "delete non-existent id is a no-op" semantics so cross-tenant existence is never leaked via error timing or status.Example
Pushed remaining dataset read filters and pagination down to storage. (#18710)
DatasetsManager.list({ filters })now acceptstargetType,targetIds(overlap/union semantics), andname(substring, case-insensitive) in addition to the existing tenancy and candidate filters. Filtering is pushed down to the storage layer so callers no longer have to post-filter results.Storage adapters must also be upgraded to the versions listed below to honor the new filters. If a caller is on this version of
@mastra/corebut on an older storage adapter, the newtargetType/targetIds/namefilter keys are silently ignored by the adapter — no runtime error, but the filter has no effect and every dataset in the tenancy is returned.Dataset.listItems({ version, search, page, perPage })now appliessearchand pagination at the storage layer whenversionis provided alongside any of those. Previously they were silently dropped wheneverversionwas set. The return shape is unchanged: passing onlyversionstill returns a bareDatasetItem[]snapshot; passingsearch,page, orperPage(with or withoutversion) returns the paginated{ items, pagination }shape. The bare-array branch is marked@deprecated; prefer passingpage/perPageto always receive the paginated shape.Fixed a double-encoding bug where
createDatasetstoredtargetIdsandscorerIdsas JSON-encoded strings instead of arrays. This caused the newlistDatasets({ filters: { targetIds } })overlap query to never match. (#18710)Existing rows written before this fix are still double-encoded and will not be matched by the new
targetIdsfilter. They self-heal on the nextupdateDatasetcall. Deployments with a long tail of pre-existing datasets should run a one-time backfill (re-encodingtargetIdsandscorerIdson affected rows) rather than rely on incidental writes; this can be tracked as a follow-up if needed.Tenancy-scope experiments
getByIdanddelete*onExperimentsStorage. (#18770)ExperimentsStorage.getExperimentById,getExperimentResultById,deleteExperiment, anddeleteExperimentResultsused to key on the primary id alone, so any caller who knew the id could read or delete the row regardless of tenant. All four now accept an optionalfilters: { organizationId?, projectId? }argument that is enforced on every adapter (inmemory, libsql, pg, mysql, mongodb, spanner):get*returnsnullat the storage layer.delete*is a silent no-op.WHEREon the DELETE, an atomic gate + delete inside a transaction, or a scoped subquery for the results cascade). A concurrent tenant swap of the same id between a pre-check and the DELETE cannot let a scoped delete hit another tenant's row.Both behaviors match how a missing id already responds, so existence does not leak through error timing or messages.
The same atomic-DML pattern is also applied to
DatasetsStorage.deleteDatasetacross all 5 store adapters, closing a TOCTOU window between the pre-check and the parent DELETE that was introduced when tenancy filters were originally added.Dataset.getExperimentand the shared experiment-ownership gate onDatasetnow forward the dataset's tenancy scope to storage, so experiment reads and downstream mutations (list results, update result, delete experiment) reached through a dataset handle are automatically scoped to the owning tenant.Legacy calls that omit
filtersare unchanged, so this is fully backwards-compatible.Fixed a cross-tenant data-access issue on datasets by scoping
DatasetsManager.getandDatasetsManager.deleteto tenancy filters. (#18750)Previously
get({ id })anddelete({ id })looked up a dataset by its primary key alone. Any caller who knew a dataset id could read or delete it regardless of whichorganizationId/projectIdit belonged to. This is now closed at the storage layer via a scoped SQL predicate (option (a) — no fetch-then-assert).What changed
DatasetsManager.getandDatasetsManager.deleteaccept optionalorganizationIdandprojectId.Datasethandle and forwarded to every downstream storage call (getDetails,update,addItem, item batch ops,startExperimentAsync).getDatasetById,deleteDataset) gained an optionalfilters?: DatasetTenancyFiltersarg.AddDatasetItemInput,UpdateDatasetItemInput,BatchInsertItemsInput,BatchDeleteItemsInput) andUpdateDatasetInputaccept optionalfiltersfor the internal existence check.Behavior
getthrows NOT_FOUND (returns null at the storage layer) anddeleteis a silent no-op — matching how a missing id already behaves, so existence does not leak through error timing or messages.Example
Add optional
batchId,datasetId, anddatasetItemIdfields to persisted scores so saved baseline scores can be grouped as one scoring pass and joined back to the dataset items they came from. (#18331)scoreTrace()accepts top-levelbatchId,datasetId, anddatasetItemIdwhen persisting a score for a stored trace.ScoreRowDataand score save payloads now include nullablebatchId,datasetId, anddatasetItemId.Added optional
organizationIdandprojectIdfields to scores for multi-tenant isolation. Scores can now be saved with tenancy metadata and thelistScoresBy*methods accept afiltersoption to scope results by organization and project. (#18331)projectIdidentifies the project scope, separate fromresourceIdwhich continues to mean the agent memory resource.Raise
@mastra/corepeer floor to>=1.49.0-0on all storage adapters so the tenancy-related named exports the adapters now consume are guaranteed to exist at install time. (#18861)Scoped
getDatasetByIdanddeleteDatasetto tenancy filters when the caller passesorganizationId/projectId. (#18750)The adapters now push the tenancy predicate into the SQL/query when the new optional
filtersargument is present. Legacy calls that omit tenancy are unchanged. On mismatch,getDatasetByIdreturnsnullanddeleteDatasetis a silent no-op — the cascade delete (dataset items and versions) is gated by a scoped parent pre-check, so cross-tenant data is never touched.Added optional
organizationIdandprojectIdquery parameters to the dataset routes. (#18750)GET /datasets/:datasetId,PATCH /datasets/:datasetId, andDELETE /datasets/:datasetIdnow accept optional tenancy query parameters. When provided, they are forwarded tomastra.datasets.get/.deleteand the operation returns 404 if the dataset does not belong to the requested tenant. Requests that omit the query parameters keep their existing behavior.Example
Updated dependencies [
700619b,0f69865,9250acd,0c3d4bc,cc440a3,6a61846,215f9b0,17369b2,c64c2a8,bcae929,ea6327b,3439fa8,85107f2,b33822e,06e2680,06ff9e0,d5c11e3,7f5e1ff,ff80671,b8375c1,dab1257,1240f05,705ff39,e6fbd5b,215f9b0,24c10d3,24c10d3,24c10d3,6f2026c,24c10d3,215f9b0,215f9b0,003f35d,f890eda,1340fb7]:v1.14.3Compare Source
Patch Changes
Fixed buffered observation extraction metadata so stored OM chunks keep extracted values and extraction failures across memory storage adapters. (#18655)
Updated dependencies [
b9a2961,b33c77d,1274eb3,cdd5f93,1274eb3,0ac14ce,9566d27,8be63b0,1009f77,1b8728a,23c31de,0368766,6f578ac,345eecc,1917c53,c01012f,705ba98,95857bc,e62c108,2866f04,ee14cae,e84e791,c2f0b7f,213feb8,58e287b,e420b3c,be875ed,9eefdc0,bfbbb01,7d112ca]:v1.14.2Compare Source
Patch Changes
Fixed
persistWorkflowSnapshotresetting a workflow run'screatedAton every re-persist. The default execution engine re-persists a run's snapshot on every step, socreatedAtdrifted to the last activity time and jumped forward on suspend/resume. Re-persisting now preserves the originalcreatedAtand only advancesupdatedAt, solistWorkflowRunsordering, fromDate/toDate filters, and the creation time shown in Studio stay correct. (#18004)Updated dependencies [
86623c1,023766f,0200e75,7c9dd77,7f9ae70,a0509c7,06e0d63,bf3fe49,01caf93,438a971,9990965,77518cc,fbeda0c,8a68844,bb2a13b,24ceaea,a73cd1a,c0ffa3c,462a769,0504bf5,0b5cc47,87f38a3,d5fa3cd,fe98ef2,6ccf67b,793ea0f,825d8de,507a5c4,5afe423,307573b,79b3626,c2c1d7b,86623c1,1505c07,f328049,e545228,3eb852e,ffa09e7,8c9f1c0,461a7c5,4211472,9e45902,5c0df77,e940f09]:v1.14.1Compare Source
Patch Changes
Added multi-tenant scoping columns (
organizationId,projectId) to the experiments domain so experiment records and per-item results inherit the tenancy bucket of their parent dataset. (#18388)Experiment,ExperimentResult,CreateExperimentInput, andAddExperimentResultInputnow carry optionalorganizationId/projectIdfields.ListExperimentsInputandListExperimentResultsInputgain afilters: ExperimentTenancyFiltersblock (mirrorsDatasetTenancyFilters) for scoping queries within a(organizationId, projectId)bucket. Tenancy is hydrated from the parent dataset oncreateExperimentand denormalized onto eachExperimentResultfor efficient tenancy-scoped queries.The corresponding columns are also added to the
mastra_experimentsandmastra_experiment_resultstable schemas. Existing rows backfill tonull, matching the rest of the dataset-tenancy surface.This release also clarifies the
targetTypecontract via JSDoc:CreateDatasetInput.targetTyperemains optional. Datasets without aTargetTypeare not experiment-eligible — the experiment runner requires a non-nullCreateExperimentInput.targetTypeto resolve an executor.Experiment.targetType/CreateExperimentInput.targetTypestay required. An experiment by definition replays inputs against a specific target.No behavior change for existing OSS-created experiments; the new fields are additive and optional.
Example:
Persist and filter dataset tenancy + candidate identity in storage adapters. (#18314)
createDatasetnow persistsorganizationId,projectId,candidateKey, andcandidateId.listDatasetsandlistItemsaccept matching tenancy filters. Dataset items inheritorganizationId/projectIdfrom their parent dataset on insert, update, delete, and batch insert/delete — items are never settable per call (item tenancy follows dataset tenancy).All new columns are nullable and added retroactively via each adapter's existing column-migration path; no breaking DDL. Existing rows continue to read and write fine; new writes can choose to stamp tenancy.
Fixed:
mastra buildoutput no longer hangs on the first storage-touching request when an app usesLibSQLStore,PostgresStore, orMySQLStorewith observational memory.mastra devwas unaffected; only the bundledmastra startoutput deadlocked. No code changes orbundler.externalsworkaround required on the app side after upgrading. (#18302)Added storage for item-level tool mocks. Dataset items persist their
toolMocksand experiment results persist theirtoolMockReport, so mocks and run diagnostics survive across sessions. (#18036)Updated dependencies [
5bd72d2,1cc9ee1,417baae,65f255a,74955f9,30ebaf0,5704634,5c4e9a4,4a88c6e,417baae,74955f9,74955f9,25961e3,6a1428a,87a17ef,e11ff30,7794d71,9d2c946,c0eda2b,7b29f33,c0eda2b,b13925b,f1ec385,e14986f,24912b1,bf94ec6,a29f371,7686216,74955f9,073f910,0be490f,0be490f,ebbe1d3,974f614,3818814,975c59a,1f97ce5,74955f9,7f51548,64f58c0,74955f9,ebbe1d3,d95f394,417baae,8e25a78,417baae,f3f0c9d,a5b22d3,31be1cf,417baae,74955f9,74955f9]:v1.14.0Compare Source
Minor Changes
Patch Changes
7c0d868,d9d2273,b04369d,8f3c262]:v1.13.2Compare Source
v1.13.0Compare Source
Minor Changes
Added LibSQL storage support for durable harness sessions. (#17712)
Add
ThreadStateLibSQL, the LibSQL implementation of the newThreadStateStoragedomain. It persists per-thread, per-type state (e.g. the agent task list undertype: "task") in themastra_thread_statetable, keyed by(threadId, type). Composing a LibSQL store wires this domain automatically, so an agent's task list now survives a process restart. (#17820)Patch Changes
dependencies updates: (#17148)
@libsql/client@^0.17.3↗︎ (from^0.15.15, independencies)Fixed concurrent writes silently disappearing when using LibSQL with a local (
file:) database. (#16796)LibSQL backs a local database with a single connection. When one operation held an interactive write transaction (for example, persisting workflow snapshots) and another operation wrote at the same time (for example, creating a dataset experiment), the second write could be swept into the open transaction and rolled back — so it appeared to succeed but never persisted. This surfaced as concurrent agent/workflow runs losing unrelated records.
Writes on a LibSQL client are now serialized, so a write issued during an in-flight transaction no longer interleaves with it.
Updated dependencies [
d468acb,575f815,34839c1,053735a,306909a,5191af8,43bd3d4,e6fa79e,904bcdf,7f5ee1d,1e9aab5,2bccba4,bf8eb6d,e9be4e7,493a328,d53cfc2,65799d4,c268c89,34839c1,014e00f,029a414,d468acb,b147b29,d371ac1,2bccba4,0c72f03,cf182b7,3b45ea9,a049c2a,f084be1,b147b29,2a96528,f2ab060,5d302c8,34839c1,a952852,2656d9c,63e3fe1,1d4ce8d,8c68372]:v1.12.1Compare Source
Patch Changes
Added LibSQL support for the notifications storage domain so notification signals can persist thread-scoped inbox records. (#17241)
Fixed LibSQL memory cleanup so in-memory stores initialize their tables before clearing data. This prevents reset flows from failing with missing table errors such as mastra_resources. (#17532)
Updated dependencies [
c973db4,552285e,77e686c,ece8dba,e751af2,e2a8380,be3f1cd,a34d9db]:v1.12.0Compare Source
Minor Changes
Added the
tool_provider_connectionsstorage domain. Stored agents can now persist per-agent ToolProvider config that round-trips on read/write/create. Runtime connection resolution (per-author, shared, caller-supplied) ships in a follow-up PR. (#17247)What you can do
Example
Additive — existing stored agents continue to work unchanged. The runtime that consumes this domain ships in a follow-up PR.
PR 1 of 3 split from #17224.
Patch Changes
Added a public
close()method toLibSQLStorethat releases SQLite file handles and cleans up the WAL/shm sidecar files. Previously these handles stayed open until the process exited, which on Windows causedEBUSYerrors when removing the storage directory after shutdown.Mastra.shutdown()now callsclose()automatically, so you no longer need to reach into private fields. (#17306)Updated dependencies [
fa63872,d779de3,1750c97,9283971,f07b646,d8838ae,40f9297,19a8658,850af77,0f0d1ba,a18775a,1baf2d1,8c31bcd,0e32507,95b14cd,07c3de7,0bf2d93,7b0d34c,a659a77,aa36be2,3332be9,212c635,d8838ae,9aa5a73,f73c789,8bd16da,c8630f8,94dfef6,47f71dc,50ceae2,a122f79,8cdde58,3a081c1,49f8abc,847ff1e,0c1ed1d,259d409,9e16c68,cefca33,d00e8c5,36fa7e2,87e9774,65a72e7,fe9eacd,4c02027,0f77241,849efb9,92ff509,3fce5e7,a763592,db79c86,6855012,80c7737,7fef31c,7fef31c,3f1cf47]:v1.11.1Compare Source
Patch Changes
Fixed scheduler performance and correctness issues that could cause excessive Postgres CPU and noisy failed runs. (#16805)
(status, next_fire_at)onmastra_schedulesand(schedule_id, actual_fire_at)onmastra_schedule_triggers. Without these the scheduler performed a full sequential scan on every tick.scheduler.enabledis set explicitly), so deployments without scheduled workflows no longer poll the database at all.startWorkers(). Accessingmastra.schedulerbeforestartWorkers()runs throws a descriptive error instead of returning a half-initialized instance.Updated dependencies [
452036a,c272d50,27fd1b7,5ba7253,5556cc1,f73980d,5499303,a702009,9aee493,d8692af,1a9cc60,8cdb86c,8534d79, [eda90c5](https://redirect.github.com/mConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.