@mastra/spanner 1.12.1 → 1.12.2-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.
Files changed (34) hide show
  1. package/dist/docs/SKILL.md +1 -1
  2. package/dist/docs/assets/SOURCE_MAP.json +17 -17
  3. package/dist/docs/references/integrations-databases-spanner.md +2 -2
  4. package/dist/index.cjs +9 -2
  5. package/dist/index.js +9 -2
  6. package/package.json +7 -6
  7. package/dist/index.cjs.map +0 -1
  8. package/dist/index.d.ts.map +0 -1
  9. package/dist/index.js.map +0 -1
  10. package/dist/storage/db/index.d.ts.map +0 -1
  11. package/dist/storage/db/run-fencing.d.ts.map +0 -1
  12. package/dist/storage/db/utils.d.ts.map +0 -1
  13. package/dist/storage/domains/agents/index.d.ts.map +0 -1
  14. package/dist/storage/domains/background-tasks/index.d.ts.map +0 -1
  15. package/dist/storage/domains/blobs/index.d.ts.map +0 -1
  16. package/dist/storage/domains/channels/index.d.ts.map +0 -1
  17. package/dist/storage/domains/datasets/index.d.ts.map +0 -1
  18. package/dist/storage/domains/experiments/index.d.ts.map +0 -1
  19. package/dist/storage/domains/favorites/index.d.ts.map +0 -1
  20. package/dist/storage/domains/mcp-clients/index.d.ts.map +0 -1
  21. package/dist/storage/domains/mcp-servers/index.d.ts.map +0 -1
  22. package/dist/storage/domains/memory/index.d.ts.map +0 -1
  23. package/dist/storage/domains/observability/index.d.ts.map +0 -1
  24. package/dist/storage/domains/observability/metrics.d.ts.map +0 -1
  25. package/dist/storage/domains/prompt-blocks/index.d.ts.map +0 -1
  26. package/dist/storage/domains/schedules/index.d.ts.map +0 -1
  27. package/dist/storage/domains/scorer-definitions/index.d.ts.map +0 -1
  28. package/dist/storage/domains/scores/index.d.ts.map +0 -1
  29. package/dist/storage/domains/skills/index.d.ts.map +0 -1
  30. package/dist/storage/domains/utils.d.ts.map +0 -1
  31. package/dist/storage/domains/workflow-definitions/index.d.ts.map +0 -1
  32. package/dist/storage/domains/workflows/index.d.ts.map +0 -1
  33. package/dist/storage/domains/workspaces/index.d.ts.map +0 -1
  34. package/dist/storage/index.d.ts.map +0 -1
@@ -3,7 +3,7 @@ name: mastra-spanner
3
3
  description: Documentation for @mastra/spanner. Use when working with @mastra/spanner APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/spanner"
6
- version: "1.12.1"
6
+ version: "1.12.2-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.12.1",
2
+ "version": "1.12.2-alpha.1",
3
3
  "package": "@mastra/spanner",
4
4
  "exports": {
5
5
  "AgentsSpanner": {
@@ -30,82 +30,82 @@
30
30
  "ExperimentsSpanner": {
31
31
  "types": "dist/storage/domains/experiments/index.d.ts",
32
32
  "implementation": "dist/index.js",
33
- "line": 4284
33
+ "line": 4293
34
34
  },
35
35
  "FavoritesSpanner": {
36
36
  "types": "dist/storage/domains/favorites/index.d.ts",
37
37
  "implementation": "dist/index.js",
38
- "line": 5222
38
+ "line": 5231
39
39
  },
40
40
  "MCPClientsSpanner": {
41
41
  "types": "dist/storage/domains/mcp-clients/index.d.ts",
42
42
  "implementation": "dist/index.js",
43
- "line": 5555
43
+ "line": 5564
44
44
  },
45
45
  "MCPServersSpanner": {
46
46
  "types": "dist/storage/domains/mcp-servers/index.d.ts",
47
47
  "implementation": "dist/index.js",
48
- "line": 6139
48
+ "line": 6148
49
49
  },
50
50
  "MemorySpanner": {
51
51
  "types": "dist/storage/domains/memory/index.d.ts",
52
52
  "implementation": "dist/index.js",
53
- "line": 6835
53
+ "line": 6844
54
54
  },
55
55
  "ObservabilitySpanner": {
56
56
  "types": "dist/storage/domains/observability/index.d.ts",
57
57
  "implementation": "dist/index.js",
58
- "line": 9188
58
+ "line": 9197
59
59
  },
60
60
  "PromptBlocksSpanner": {
61
61
  "types": "dist/storage/domains/prompt-blocks/index.d.ts",
62
62
  "implementation": "dist/index.js",
63
- "line": 9793
63
+ "line": 9802
64
64
  },
65
65
  "SPANNER_DOMAIN_KEYS": {
66
66
  "types": "dist/storage/index.d.ts",
67
67
  "implementation": "dist/index.js",
68
- "line": 13937
68
+ "line": 13946
69
69
  },
70
70
  "SchedulesSpanner": {
71
71
  "types": "dist/storage/domains/schedules/index.d.ts",
72
72
  "implementation": "dist/index.js",
73
- "line": 10432
73
+ "line": 10441
74
74
  },
75
75
  "ScorerDefinitionsSpanner": {
76
76
  "types": "dist/storage/domains/scorer-definitions/index.d.ts",
77
77
  "implementation": "dist/index.js",
78
- "line": 10893
78
+ "line": 10902
79
79
  },
80
80
  "ScoresSpanner": {
81
81
  "types": "dist/storage/domains/scores/index.d.ts",
82
82
  "implementation": "dist/index.js",
83
- "line": 11506
83
+ "line": 11515
84
84
  },
85
85
  "SkillsSpanner": {
86
86
  "types": "dist/storage/domains/skills/index.d.ts",
87
87
  "implementation": "dist/index.js",
88
- "line": 11774
88
+ "line": 11783
89
89
  },
90
90
  "SpannerStore": {
91
91
  "types": "dist/storage/index.d.ts",
92
92
  "implementation": "dist/index.js",
93
- "line": 13976
93
+ "line": 13985
94
94
  },
95
95
  "WorkflowDefinitionsSpanner": {
96
96
  "types": "dist/storage/domains/workflow-definitions/index.d.ts",
97
97
  "implementation": "dist/index.js",
98
- "line": 12418
98
+ "line": 12427
99
99
  },
100
100
  "WorkflowsSpanner": {
101
101
  "types": "dist/storage/domains/workflows/index.d.ts",
102
102
  "implementation": "dist/index.js",
103
- "line": 12623
103
+ "line": 12632
104
104
  },
105
105
  "WorkspacesSpanner": {
106
106
  "types": "dist/storage/domains/workspaces/index.d.ts",
107
107
  "implementation": "dist/index.js",
108
- "line": 13326
108
+ "line": 13335
109
109
  }
110
110
  },
111
111
  "modules": {}
@@ -45,7 +45,7 @@ const storage = new SpannerStore({
45
45
  })
46
46
  ```
47
47
 
48
- The instance and database must already exist. The adapter creates the required tables on first use, so the credentials provided to the Spanner client need permission to run schema changes (or run `storage.init()` once during a deploy step with elevated credentials).
48
+ The instance and database must already exist. The adapter creates the required tables on first use, which means the credentials provided to the Spanner client need permission to run schema changes (or run `storage.init()` once during a deploy step with elevated credentials).
49
49
 
50
50
  ## Parameters
51
51
 
@@ -190,7 +190,7 @@ A few behaviors differ from other relational adapters:
190
190
  - Identifiers are quoted with backticks.
191
191
  - DDL is applied through `database.updateSchema(...)`, which is asynchronous (long-running operation).
192
192
  - `NULLS FIRST/LAST` isn't supported. Ordering with NULL handling is emulated through an `IS NULL` ordering key.
193
- - JSON containment isn't supported natively. `listTraces` `metadata` and `scope` filters compile to per-key `JSON_VALUE(...) = @v` equality checks, and `tags` filters compile to `EXISTS` over `JSON_QUERY_ARRAY(...)`. This differs from Postgres' `@>` containment operator (which can match nested structure in a single index scan): most one-shot lookups still work but deeply nested structural matches aren't expressible.
193
+ - JSON containment isn't supported natively. `listTraces` `metadata` and `scope` filters compile to per-key `JSON_VALUE(...) = @v` equality checks, and `tags` filters compile to `EXISTS` over `JSON_QUERY_ARRAY(...)`. This differs from Postgres' `@>` containment operator (which can match nested structure in a single index scan): most one-shot lookups still work but nested structural matches aren't expressible.
194
194
 
195
195
  ### Direct database access
196
196
 
package/dist/index.cjs CHANGED
@@ -3855,6 +3855,15 @@ var DatasetsSpanner = class DatasetsSpanner extends _mastra_core_storage.Dataset
3855
3855
  hasMore: false
3856
3856
  }
3857
3857
  };
3858
+ if (perPage === 0) return {
3859
+ items: [],
3860
+ pagination: {
3861
+ total,
3862
+ page,
3863
+ perPage: perPageForResponse,
3864
+ hasMore: true
3865
+ }
3866
+ };
3858
3867
  const limit = perPageInput === false ? total : perPage;
3859
3868
  const [rows] = await this.database.run({
3860
3869
  sql: `SELECT ${ITEM_SELECT_COLUMNS} FROM ${tableName} ${whereSql}
@@ -14149,5 +14158,3 @@ exports.SpannerStore = SpannerStore;
14149
14158
  exports.WorkflowDefinitionsSpanner = WorkflowDefinitionsSpanner;
14150
14159
  exports.WorkflowsSpanner = WorkflowsSpanner;
14151
14160
  exports.WorkspacesSpanner = WorkspacesSpanner;
14152
-
14153
- //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -3854,6 +3854,15 @@ var DatasetsSpanner = class DatasetsSpanner extends DatasetsStorage {
3854
3854
  hasMore: false
3855
3855
  }
3856
3856
  };
3857
+ if (perPage === 0) return {
3858
+ items: [],
3859
+ pagination: {
3860
+ total,
3861
+ page,
3862
+ perPage: perPageForResponse,
3863
+ hasMore: true
3864
+ }
3865
+ };
3857
3866
  const limit = perPageInput === false ? total : perPage;
3858
3867
  const [rows] = await this.database.run({
3859
3868
  sql: `SELECT ${ITEM_SELECT_COLUMNS} FROM ${tableName} ${whereSql}
@@ -14128,5 +14137,3 @@ var SpannerStore = class extends MastraCompositeStore {
14128
14137
  }
14129
14138
  };
14130
14139
  export { AgentsSpanner, BackgroundTasksSpanner, BlobsSpanner, ChannelsSpanner, DatasetsSpanner, ExperimentsSpanner, FavoritesSpanner, MCPClientsSpanner, MCPServersSpanner, MemorySpanner, ObservabilitySpanner, PromptBlocksSpanner, SPANNER_DOMAIN_KEYS, SchedulesSpanner, ScorerDefinitionsSpanner, ScoresSpanner, SkillsSpanner, SpannerStore, WorkflowDefinitionsSpanner, WorkflowsSpanner, WorkspacesSpanner };
14131
-
14132
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/spanner",
3
- "version": "1.12.1",
3
+ "version": "1.12.2-alpha.1",
4
4
  "description": "Google Cloud Spanner provider for Mastra - db storage capabilities (GoogleSQL dialect)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,16 +30,17 @@
30
30
  "tsx": "^4.23.15",
31
31
  "typescript": "^7.0.2",
32
32
  "vitest": "5.1.0",
33
- "@internal/lint": "0.0.150",
34
- "@internal/storage-test-utils": "0.0.146",
35
- "@internal/types-builder": "0.0.125",
36
- "@mastra/core": "1.84.0"
33
+ "@internal/storage-test-utils": "0.0.147",
34
+ "@internal/lint": "0.0.151",
35
+ "@internal/types-builder": "0.0.126",
36
+ "@mastra/core": "1.86.0-alpha.8"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@mastra/core": ">=1.76.0-0 <2.0.0-0"
40
40
  },
41
41
  "files": [
42
- "dist"
42
+ "dist",
43
+ "!dist/**/*.d.*ts.map"
43
44
  ],
44
45
  "homepage": "https://mastra.ai",
45
46
  "repository": {