@mastra/mysql 0.17.2-alpha.2 → 0.17.2

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.
@@ -305,6 +305,16 @@ export declare function legacyKnowledgeTablesToDrop(snapshot: {
305
305
  }): string[];
306
306
  /** Message for the error an adapter throws on `incompatible-reset-required`. */
307
307
  export declare function knowledgePagesResetMessage(reason: string): string;
308
+ /**
309
+ * A list cursor the store cannot decode (malformed, or from another store or version). Defined
310
+ * here so every adapter can throw it on any core version; core re-exports it from
311
+ * `@mastra/core/storage`. Recognise it by `name`.
312
+ * @experimental
313
+ */
314
+ export declare class KnowledgeInvalidCursorError extends Error {
315
+ readonly cursor: string;
316
+ constructor(cursor: string);
317
+ }
308
318
  /**
309
319
  * The page-store runtime pieces adapters take from `@mastra/core/storage`. They are loaded through
310
320
  * `createKnowledgePagesCoreLoader` instead of static imports so adapters keep loading on cores
@@ -3,7 +3,7 @@ name: mastra-mysql
3
3
  description: Documentation for @mastra/mysql. Use when working with @mastra/mysql APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/mysql"
6
- version: "0.17.2-alpha.2"
6
+ version: "0.17.2"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.17.2-alpha.2",
2
+ "version": "0.17.2",
3
3
  "package": "@mastra/mysql",
4
4
  "exports": {
5
5
  "AgentsMySQL": {
@@ -25,47 +25,47 @@
25
25
  "MCPClientsMySQL": {
26
26
  "types": "dist/storage/domains/mcp-clients/index.d.ts",
27
27
  "implementation": "dist/index.js",
28
- "line": 6073
28
+ "line": 6087
29
29
  },
30
30
  "MCPServersMySQL": {
31
31
  "types": "dist/storage/domains/mcp-servers/index.d.ts",
32
32
  "implementation": "dist/index.js",
33
- "line": 6546
33
+ "line": 6560
34
34
  },
35
35
  "MemoryMySQL": {
36
36
  "types": "dist/storage/domains/memory/index.d.ts",
37
37
  "implementation": "dist/index.js",
38
- "line": 7309
38
+ "line": 7323
39
39
  },
40
40
  "MySQLStore": {
41
41
  "types": "dist/storage/index.d.ts",
42
42
  "implementation": "dist/index.js",
43
- "line": 13612
43
+ "line": 13626
44
44
  },
45
45
  "ObservabilityMySQL": {
46
46
  "types": "dist/storage/domains/observability/index.d.ts",
47
47
  "implementation": "dist/index.js",
48
- "line": 9424
48
+ "line": 9438
49
49
  },
50
50
  "PromptBlocksMySQL": {
51
51
  "types": "dist/storage/domains/prompt-blocks/index.d.ts",
52
52
  "implementation": "dist/index.js",
53
- "line": 9943
53
+ "line": 9957
54
54
  },
55
55
  "ScorerDefinitionsMySQL": {
56
56
  "types": "dist/storage/domains/scorer-definitions/index.d.ts",
57
57
  "implementation": "dist/index.js",
58
- "line": 10701
58
+ "line": 10715
59
59
  },
60
60
  "ScoresMySQL": {
61
61
  "types": "dist/storage/domains/scores/index.d.ts",
62
62
  "implementation": "dist/index.js",
63
- "line": 11188
63
+ "line": 11202
64
64
  },
65
65
  "SkillsMySQL": {
66
66
  "types": "dist/storage/domains/skills/index.d.ts",
67
67
  "implementation": "dist/index.js",
68
- "line": 11485
68
+ "line": 11499
69
69
  },
70
70
  "StoreOperationsMySQL": {
71
71
  "types": "dist/storage/domains/operations/index.d.ts",
@@ -75,12 +75,12 @@
75
75
  "WorkflowsMySQL": {
76
76
  "types": "dist/storage/domains/workflows/index.d.ts",
77
77
  "implementation": "dist/index.js",
78
- "line": 12453
78
+ "line": 12467
79
79
  },
80
80
  "WorkspacesMySQL": {
81
81
  "types": "dist/storage/domains/workspaces/index.d.ts",
82
82
  "implementation": "dist/index.js",
83
- "line": 13016
83
+ "line": 13030
84
84
  }
85
85
  },
86
86
  "modules": {}
package/dist/index.cjs CHANGED
@@ -4297,6 +4297,20 @@ function legacyKnowledgeTablesToDrop(snapshot) {
4297
4297
  const drop = /* @__PURE__ */ new Set([...legacy, ...reused]);
4298
4298
  return [...RETIRED_KNOWLEDGE_TABLE_NAMES, ...[...KNOWLEDGE_TABLE_NAMES].reverse()].filter((name) => drop.has(name));
4299
4299
  }
4300
+ /**
4301
+ * A list cursor the store cannot decode (malformed, or from another store or version). Defined
4302
+ * here so every adapter can throw it on any core version; core re-exports it from
4303
+ * `@mastra/core/storage`. Recognise it by `name`.
4304
+ * @experimental
4305
+ */
4306
+ var KnowledgeInvalidCursorError = class extends Error {
4307
+ cursor;
4308
+ constructor(cursor) {
4309
+ super("Invalid Knowledge cursor: this store cannot decode it");
4310
+ this.cursor = cursor;
4311
+ this.name = "KnowledgeInvalidCursorError";
4312
+ }
4313
+ };
4300
4314
  const KNOWLEDGE_PAGES_CORE_FUNCTIONS = [
4301
4315
  "assertKnowledgePageDescriptionWithinBound",
4302
4316
  "assertKnowledgeNoteTextWithinBound",
@@ -4590,7 +4604,7 @@ function decodeCursor(cursor, length) {
4590
4604
  const parsed = JSON.parse(Buffer.from(cursor, "base64url").toString("utf8"));
4591
4605
  if (Array.isArray(parsed) && parsed.length === length && parsed.every((item) => typeof item === "string")) return parsed;
4592
4606
  } catch {}
4593
- throw new Error("Invalid Knowledge cursor");
4607
+ throw new KnowledgeInvalidCursorError(cursor);
4594
4608
  }
4595
4609
  function isRetryableRace(error) {
4596
4610
  for (let current = error; current && typeof current === "object"; current = current.cause) {
package/dist/index.js CHANGED
@@ -4296,6 +4296,20 @@ function legacyKnowledgeTablesToDrop(snapshot) {
4296
4296
  const drop = /* @__PURE__ */ new Set([...legacy, ...reused]);
4297
4297
  return [...RETIRED_KNOWLEDGE_TABLE_NAMES, ...[...KNOWLEDGE_TABLE_NAMES].reverse()].filter((name) => drop.has(name));
4298
4298
  }
4299
+ /**
4300
+ * A list cursor the store cannot decode (malformed, or from another store or version). Defined
4301
+ * here so every adapter can throw it on any core version; core re-exports it from
4302
+ * `@mastra/core/storage`. Recognise it by `name`.
4303
+ * @experimental
4304
+ */
4305
+ var KnowledgeInvalidCursorError = class extends Error {
4306
+ cursor;
4307
+ constructor(cursor) {
4308
+ super("Invalid Knowledge cursor: this store cannot decode it");
4309
+ this.cursor = cursor;
4310
+ this.name = "KnowledgeInvalidCursorError";
4311
+ }
4312
+ };
4299
4313
  const KNOWLEDGE_PAGES_CORE_FUNCTIONS = [
4300
4314
  "assertKnowledgePageDescriptionWithinBound",
4301
4315
  "assertKnowledgeNoteTextWithinBound",
@@ -4589,7 +4603,7 @@ function decodeCursor(cursor, length) {
4589
4603
  const parsed = JSON.parse(Buffer.from(cursor, "base64url").toString("utf8"));
4590
4604
  if (Array.isArray(parsed) && parsed.length === length && parsed.every((item) => typeof item === "string")) return parsed;
4591
4605
  } catch {}
4592
- throw new Error("Invalid Knowledge cursor");
4606
+ throw new KnowledgeInvalidCursorError(cursor);
4593
4607
  }
4594
4608
  function isRetryableRace(error) {
4595
4609
  for (let current = error; current && typeof current === "object"; current = current.cause) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mysql",
3
- "version": "0.17.2-alpha.2",
3
+ "version": "0.17.2",
4
4
  "description": "MySQL provider for Mastra - db storage capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -31,10 +31,10 @@
31
31
  "typescript": "^7.0.2",
32
32
  "vitest": "5.1.0",
33
33
  "@internal/core": "0.1.4",
34
- "@internal/lint": "0.0.151",
35
- "@internal/storage-test-utils": "0.0.147",
36
- "@internal/types-builder": "0.0.126",
37
- "@mastra/core": "1.86.0-alpha.8"
34
+ "@internal/lint": "0.0.152",
35
+ "@internal/storage-test-utils": "0.0.148",
36
+ "@internal/types-builder": "0.0.127",
37
+ "@mastra/core": "1.86.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@mastra/core": ">=1.76.0-0 <2.0.0-0"