@mastra/mysql 0.3.2 → 0.3.3-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/mysql
2
2
 
3
+ ## 0.3.3-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed `listExperiments` in the MySQL store ignoring `targetType`, `targetId`, `agentVersion`, and `status` filters. Queries now correctly narrow on these fields, matching the behavior of the other stores (Postgres, LibSQL, Spanner, in-memory). ([#18769](https://github.com/mastra-ai/mastra/pull/18769))
8
+
9
+ Also persisted `agentVersion` on experiment rows in the MySQL store. The column existed in the schema but `createExperiment` never wrote it and `getExperimentById`/`listExperiments` never returned it, so filtering by `agentVersion` would have matched nothing on rows created by this backend. New experiments now round-trip `agentVersion` end-to-end. Existing tables gain the column via the `init()` backfill.
10
+
11
+ - Updated dependencies [[`6a61846`](https://github.com/mastra-ai/mastra/commit/6a61846eeda29fb714549b70f1bee2bf6b141c44)]:
12
+ - @mastra/core@1.49.0-alpha.4
13
+
3
14
  ## 0.3.2
4
15
 
5
16
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -3116,7 +3116,7 @@ var ExperimentsMySQL = class _ExperimentsMySQL extends storage.ExperimentsStorag
3116
3116
  await this.operations.alterTable({
3117
3117
  tableName: storage.TABLE_EXPERIMENTS,
3118
3118
  schema: storage.EXPERIMENTS_SCHEMA,
3119
- ifNotExists: ["organizationId", "projectId"]
3119
+ ifNotExists: ["agentVersion", "organizationId", "projectId"]
3120
3120
  });
3121
3121
  await this.operations.alterTable({
3122
3122
  tableName: storage.TABLE_EXPERIMENT_RESULTS,
@@ -3135,6 +3135,7 @@ var ExperimentsMySQL = class _ExperimentsMySQL extends storage.ExperimentsStorag
3135
3135
  id: row.id,
3136
3136
  datasetId: row.datasetId ?? null,
3137
3137
  datasetVersion: row.datasetVersion ?? null,
3138
+ agentVersion: row.agentVersion ?? null,
3138
3139
  organizationId: row.organizationId ?? null,
3139
3140
  projectId: row.projectId ?? null,
3140
3141
  targetType: row.targetType,
@@ -3184,6 +3185,7 @@ var ExperimentsMySQL = class _ExperimentsMySQL extends storage.ExperimentsStorag
3184
3185
  id,
3185
3186
  datasetId: input.datasetId ?? null,
3186
3187
  datasetVersion: input.datasetVersion ?? null,
3188
+ agentVersion: input.agentVersion ?? null,
3187
3189
  organizationId: input.organizationId ?? null,
3188
3190
  projectId: input.projectId ?? null,
3189
3191
  targetType: input.targetType,
@@ -3206,6 +3208,7 @@ var ExperimentsMySQL = class _ExperimentsMySQL extends storage.ExperimentsStorag
3206
3208
  id,
3207
3209
  datasetId: input.datasetId,
3208
3210
  datasetVersion: input.datasetVersion,
3211
+ agentVersion: input.agentVersion ?? null,
3209
3212
  organizationId: input.organizationId ?? null,
3210
3213
  projectId: input.projectId ?? null,
3211
3214
  targetType: input.targetType,
@@ -3302,6 +3305,22 @@ var ExperimentsMySQL = class _ExperimentsMySQL extends storage.ExperimentsStorag
3302
3305
  conditions.push(`${quoteIdentifier("datasetId", "column name")} = ?`);
3303
3306
  params.push(args.datasetId);
3304
3307
  }
3308
+ if (args.targetType) {
3309
+ conditions.push(`${quoteIdentifier("targetType", "column name")} = ?`);
3310
+ params.push(args.targetType);
3311
+ }
3312
+ if (args.targetId) {
3313
+ conditions.push(`${quoteIdentifier("targetId", "column name")} = ?`);
3314
+ params.push(args.targetId);
3315
+ }
3316
+ if (args.agentVersion) {
3317
+ conditions.push(`${quoteIdentifier("agentVersion", "column name")} = ?`);
3318
+ params.push(args.agentVersion);
3319
+ }
3320
+ if (args.status) {
3321
+ conditions.push(`${quoteIdentifier("status", "column name")} = ?`);
3322
+ params.push(args.status);
3323
+ }
3305
3324
  if (args.filters) {
3306
3325
  const { organizationId, projectId } = args.filters;
3307
3326
  if (organizationId !== void 0) {