@mastra/dsql 1.3.3 → 1.3.4-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/LICENSE.md +6 -4
- package/dist/index.cjs +16 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -5
- package/dist/index.js.map +1 -1
- package/dist/shared/config.d.ts.map +1 -1
- package/dist/shared/retry.d.ts +7 -7
- package/dist/shared/retry.d.ts.map +1 -1
- package/dist/storage/client.d.ts.map +1 -1
- package/dist/storage/db/index.d.ts.map +1 -1
- package/dist/storage/domains/agents/index.d.ts.map +1 -1
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/observability/index.d.ts.map +1 -1
- package/dist/storage/domains/scores/index.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/performance-indexes/performance-test.d.ts.map +1 -1
- package/package.json +8 -9
- package/CHANGELOG.md +0 -542
package/LICENSE.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
Portions of this software are licensed as follows:
|
|
2
2
|
|
|
3
|
-
- All content that resides under any directory named
|
|
3
|
+
- All content that resides under any directory named `ee/` within this
|
|
4
4
|
repository, including but not limited to:
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
|
|
5
|
+
- `@mastra/core/auth/ee`
|
|
6
|
+
- `@mastra/core/agent-builder/ee`
|
|
7
|
+
- `@mastra/editor/ee`
|
|
8
|
+
|
|
9
|
+
is licensed under the license defined in [`ee/LICENSE`](https://github.com/mastra-ai/mastra/blob/main/ee/LICENSE).
|
|
8
10
|
|
|
9
11
|
- All third-party components incorporated into the Mastra Software are
|
|
10
12
|
licensed under the original license provided by the owner of the
|
package/dist/index.cjs
CHANGED
|
@@ -1823,6 +1823,13 @@ var AgentsDSQL = class AgentsDSQL extends _mastra_core_storage.AgentsStorage {
|
|
|
1823
1823
|
function inPlaceholders(count, startIndex = 1) {
|
|
1824
1824
|
return Array.from({ length: count }, (_, i) => `$${i + startIndex}`).join(", ");
|
|
1825
1825
|
}
|
|
1826
|
+
/**
|
|
1827
|
+
* Bind dates as UTC strings because node-postgres serializes Date parameters
|
|
1828
|
+
* for TIMESTAMP columns using the process's local timezone.
|
|
1829
|
+
*/
|
|
1830
|
+
function toUtcISOString(date) {
|
|
1831
|
+
return date.toISOString();
|
|
1832
|
+
}
|
|
1826
1833
|
var MemoryDSQL = class MemoryDSQL extends _mastra_core_storage.MemoryStorage {
|
|
1827
1834
|
supportsPartialThreadUpdate = true;
|
|
1828
1835
|
#db;
|
|
@@ -2051,6 +2058,8 @@ var MemoryDSQL = class MemoryDSQL extends _mastra_core_storage.MemoryStorage {
|
|
|
2051
2058
|
indexName: _mastra_core_storage.TABLE_THREADS,
|
|
2052
2059
|
schemaName: getSchemaName(this.#schema)
|
|
2053
2060
|
});
|
|
2061
|
+
const createdAt = toUtcISOString(thread.createdAt);
|
|
2062
|
+
const updatedAt = toUtcISOString(thread.updatedAt);
|
|
2054
2063
|
await withRetry(async () => {
|
|
2055
2064
|
await this.#db.client.none(`INSERT INTO ${tableName} (
|
|
2056
2065
|
id,
|
|
@@ -2074,10 +2083,10 @@ var MemoryDSQL = class MemoryDSQL extends _mastra_core_storage.MemoryStorage {
|
|
|
2074
2083
|
thread.resourceId,
|
|
2075
2084
|
thread.title,
|
|
2076
2085
|
thread.metadata ? JSON.stringify(thread.metadata) : null,
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2086
|
+
createdAt,
|
|
2087
|
+
createdAt,
|
|
2088
|
+
updatedAt,
|
|
2089
|
+
updatedAt
|
|
2081
2090
|
]);
|
|
2082
2091
|
}, { onRetry: (error, attempt, delay) => {
|
|
2083
2092
|
this.logger?.warn?.(`saveThread retry ${attempt} for ${thread.id} after ${delay}ms: ${error.message}`);
|
|
@@ -2642,7 +2651,9 @@ var MemoryDSQL = class MemoryDSQL extends _mastra_core_storage.MemoryStorage {
|
|
|
2642
2651
|
tableName: _mastra_core_storage.TABLE_RESOURCES,
|
|
2643
2652
|
record: {
|
|
2644
2653
|
...resource,
|
|
2645
|
-
metadata: JSON.stringify(resource.metadata)
|
|
2654
|
+
metadata: JSON.stringify(resource.metadata),
|
|
2655
|
+
createdAt: toUtcISOString(resource.createdAt),
|
|
2656
|
+
updatedAt: toUtcISOString(resource.updatedAt)
|
|
2646
2657
|
}
|
|
2647
2658
|
});
|
|
2648
2659
|
return resource;
|