@mastra/mysql 0.7.0 → 0.7.1-alpha.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 CHANGED
@@ -1,5 +1,35 @@
1
1
  # @mastra/mysql
2
2
 
3
+ ## 0.7.1-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Added a `durable` option to stored agents so agents created through the Agents API can run with durable execution — no code deployment required. ([#21715](https://github.com/mastra-ai/mastra/pull/21715))
8
+
9
+ ```typescript
10
+ await mastraClient.createStoredAgent({
11
+ id: 'helper',
12
+ name: 'Helper',
13
+ instructions: 'You are a helpful assistant.',
14
+ model: { provider: 'openai', name: 'gpt-5' },
15
+ durable: true,
16
+ });
17
+ ```
18
+
19
+ Pass `true` for defaults, or `{ maxSteps, cleanupTimeoutMs }` to tune the durable loop. Cache and pubsub are inherited from the server's Mastra instance, so configure distributed backends there for durability across replicas. Automatic recovery is still configured in code via `recovery.durableAgents`.
20
+
21
+ - Updated dependencies [[`6223446`](https://github.com/mastra-ai/mastra/commit/6223446ddce6166e96e0ba5e00d628b615dee8ca), [`583e235`](https://github.com/mastra-ai/mastra/commit/583e23519c13af16c1746f9c49722d011216611b), [`a77f8d4`](https://github.com/mastra-ai/mastra/commit/a77f8d4740d2178a74c41e4bf678b4fcd8fa0bb2), [`40d358e`](https://github.com/mastra-ai/mastra/commit/40d358e29d55543803e64b49241122f598ffabc7), [`e80cd7e`](https://github.com/mastra-ai/mastra/commit/e80cd7e7683e7d732e1cc6784bcac1d2640d2ce3), [`20504b2`](https://github.com/mastra-ai/mastra/commit/20504b2ecebd0e077acda3d457ab57480a98ed3e)]:
22
+ - @mastra/core@1.60.0-alpha.11
23
+
24
+ ## 0.7.1-alpha.0
25
+
26
+ ### Patch Changes
27
+
28
+ - Fix the alterTable existing-column probe reading the wrong information_schema field casing. MySQL returns result fields with uppercase keys through mysql2, so the probe's existing-column set was always empty and every warm boot re-ran 107 ALTER TABLE ADD COLUMN statements that failed with ER_DUP_FIELDNAME and were silently swallowed, taking metadata locks on production tables for nothing. The probe now reads whichever key casing is present. Measured on docker mysql:9.7: warm init drops from 326 to 109 client-server round trips and issues zero ALTER statements. ([#21633](https://github.com/mastra-ai/mastra/pull/21633))
29
+
30
+ - Updated dependencies [[`940bf5c`](https://github.com/mastra-ai/mastra/commit/940bf5ccf04f2c9ebd8a1390431733222a03b1cd)]:
31
+ - @mastra/core@1.60.0-alpha.7
32
+
3
33
  ## 0.7.0
4
34
 
5
35
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -582,7 +582,7 @@ var StoreOperationsMySQL = class extends _mastra_core_storage.StoreOperations {
582
582
  params.push(db);
583
583
  }
584
584
  const [rows] = await this.pool.execute(sql, params);
585
- const existing = new Set((rows || []).map((row) => String(row.column_name).toLowerCase()));
585
+ const existing = new Set((rows || []).map((row) => String(row.column_name ?? row.COLUMN_NAME).toLowerCase()));
586
586
  for (const columnName of ifNotExists) {
587
587
  if (existing.has(columnName.toLowerCase())) continue;
588
588
  const column = schema[columnName];
@@ -760,7 +760,8 @@ var AgentsMySQL = class AgentsMySQL extends _mastra_core_storage.AgentsStorage {
760
760
  "requestContextSchema",
761
761
  "workspace",
762
762
  "skills",
763
- "skillsFormat"
763
+ "skillsFormat",
764
+ "durable"
764
765
  ]
765
766
  });
766
767
  await this.createDefaultIndexes();
@@ -1052,6 +1053,7 @@ var AgentsMySQL = class AgentsMySQL extends _mastra_core_storage.AgentsStorage {
1052
1053
  workspace: input.workspace ?? null,
1053
1054
  skills: input.skills ?? null,
1054
1055
  skillsFormat: input.skillsFormat ?? null,
1056
+ durable: input.durable ?? null,
1055
1057
  changedFields: input.changedFields ?? null,
1056
1058
  changeMessage: input.changeMessage ?? null,
1057
1059
  createdAt: now
@@ -1267,6 +1269,7 @@ var AgentsMySQL = class AgentsMySQL extends _mastra_core_storage.AgentsStorage {
1267
1269
  workspace: this.safeParseJSON(row.workspace),
1268
1270
  skills: this.safeParseJSON(row.skills),
1269
1271
  skillsFormat: row.skillsFormat,
1272
+ durable: this.safeParseJSON(row.durable),
1270
1273
  changedFields: this.safeParseJSON(row.changedFields),
1271
1274
  changeMessage: row.changeMessage ?? void 0,
1272
1275
  createdAt: row.createdAt instanceof Date ? row.createdAt : new Date(row.createdAt)