@mastra/core 0.5.0-alpha.6 → 0.5.0-alpha.8
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/dist/{chunk-NTEKFUXY.js → chunk-QAZ2ONKM.js} +10 -2
- package/dist/{chunk-OTU2RYEQ.js → chunk-RRJB4TCC.js} +1 -1
- package/dist/{chunk-UZBCMAM6.js → chunk-SF5GHHOQ.js} +1 -1
- package/dist/index.cjs +4 -1
- package/dist/index.js +2 -2
- package/dist/mastra/index.cjs +4 -1
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +10 -2
- package/dist/memory/index.js +1 -1
- package/dist/storage/libsql/index.cjs +10 -2
- package/dist/storage/libsql/index.js +1 -1
- package/package.json +1 -1
|
@@ -97,6 +97,9 @@ var LibSQLStore = class extends MastraStorage {
|
|
|
97
97
|
if (typeof v === `undefined`) {
|
|
98
98
|
return null;
|
|
99
99
|
}
|
|
100
|
+
if (v instanceof Date) {
|
|
101
|
+
return v.toISOString();
|
|
102
|
+
}
|
|
100
103
|
return typeof v === "object" ? JSON.stringify(v) : v;
|
|
101
104
|
});
|
|
102
105
|
const placeholders = values.map(() => "?").join(", ");
|
|
@@ -107,7 +110,12 @@ var LibSQLStore = class extends MastraStorage {
|
|
|
107
110
|
}
|
|
108
111
|
async insert({ tableName, record }) {
|
|
109
112
|
try {
|
|
110
|
-
await this.client.execute(
|
|
113
|
+
await this.client.execute(
|
|
114
|
+
this.prepareStatement({
|
|
115
|
+
tableName,
|
|
116
|
+
record
|
|
117
|
+
})
|
|
118
|
+
);
|
|
111
119
|
} catch (error) {
|
|
112
120
|
this.logger.error(`Error upserting into table ${tableName}: ${error}`);
|
|
113
121
|
throw error;
|
|
@@ -137,7 +145,7 @@ var LibSQLStore = class extends MastraStorage {
|
|
|
137
145
|
const parsed = Object.fromEntries(
|
|
138
146
|
Object.entries(row || {}).map(([k, v]) => {
|
|
139
147
|
try {
|
|
140
|
-
return [k, typeof v === "string" ? JSON.parse(v) : v];
|
|
148
|
+
return [k, typeof v === "string" ? v.startsWith("{") || v.startsWith("[") ? JSON.parse(v) : v : v];
|
|
141
149
|
} catch {
|
|
142
150
|
return [k, v];
|
|
143
151
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LibSQLVector } from './chunk-4DD2PP2R.js';
|
|
2
|
-
import { LibSQLStore } from './chunk-
|
|
2
|
+
import { LibSQLStore } from './chunk-QAZ2ONKM.js';
|
|
3
3
|
import { deepMerge } from './chunk-HBHPTMAC.js';
|
|
4
4
|
import { MastraBase } from './chunk-4VHCCQ7P.js';
|
|
5
5
|
import { existsSync } from 'fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LibSQLStore } from './chunk-
|
|
1
|
+
import { LibSQLStore } from './chunk-QAZ2ONKM.js';
|
|
2
2
|
import { InstrumentClass, OTLPTraceExporter, Telemetry } from './chunk-W5HVJX45.js';
|
|
3
3
|
import { createLogger, LogLevel, noopLogger } from './chunk-3JSTLSIP.js';
|
|
4
4
|
import { __decoratorStart, __decorateElement, __runInitializers } from './chunk-C6A6W6XS.js';
|
package/dist/index.cjs
CHANGED
|
@@ -3333,6 +3333,9 @@ var LibSQLStore = class extends MastraStorage {
|
|
|
3333
3333
|
if (typeof v === `undefined`) {
|
|
3334
3334
|
return null;
|
|
3335
3335
|
}
|
|
3336
|
+
if (v instanceof Date) {
|
|
3337
|
+
return v.toISOString();
|
|
3338
|
+
}
|
|
3336
3339
|
return typeof v === "object" ? JSON.stringify(v) : v;
|
|
3337
3340
|
});
|
|
3338
3341
|
const placeholders = values.map(() => "?").join(", ");
|
|
@@ -3387,7 +3390,7 @@ var LibSQLStore = class extends MastraStorage {
|
|
|
3387
3390
|
const row = result.rows[0];
|
|
3388
3391
|
const parsed = Object.fromEntries(Object.entries(row || {}).map(([k, v]) => {
|
|
3389
3392
|
try {
|
|
3390
|
-
return [k, typeof v === "string" ? JSON.parse(v) : v];
|
|
3393
|
+
return [k, typeof v === "string" ? v.startsWith("{") || v.startsWith("[") ? JSON.parse(v) : v : v];
|
|
3391
3394
|
} catch {
|
|
3392
3395
|
return [k, v];
|
|
3393
3396
|
}
|
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import { MastraTTS } from './chunk-CLJYFFOS.js';
|
|
|
2
2
|
import { Workflow } from './chunk-KBSR2LLT.js';
|
|
3
3
|
export { Step, WhenConditionReturnValue, createStep, getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isErrorEvent, isFinalState, isTransitionEvent, isVariableReference, mergeChildValue, recursivelyCheckForFinalState, updateStepInHierarchy } from './chunk-KBSR2LLT.js';
|
|
4
4
|
import { Integration, OpenAPIToolset } from './chunk-PNZK456O.js';
|
|
5
|
-
export { Mastra } from './chunk-
|
|
6
|
-
import { MastraMemory } from './chunk-
|
|
5
|
+
export { Mastra } from './chunk-SF5GHHOQ.js';
|
|
6
|
+
import { MastraMemory } from './chunk-RRJB4TCC.js';
|
|
7
7
|
import { MastraVector } from './chunk-QLYZGX5Z.js';
|
|
8
8
|
export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from './chunk-QABMKXI3.js';
|
|
9
9
|
import { MastraStorage } from './chunk-7TZAPEAT.js';
|
package/dist/mastra/index.cjs
CHANGED
|
@@ -657,6 +657,9 @@ var LibSQLStore = class extends MastraStorage {
|
|
|
657
657
|
if (typeof v === `undefined`) {
|
|
658
658
|
return null;
|
|
659
659
|
}
|
|
660
|
+
if (v instanceof Date) {
|
|
661
|
+
return v.toISOString();
|
|
662
|
+
}
|
|
660
663
|
return typeof v === "object" ? JSON.stringify(v) : v;
|
|
661
664
|
});
|
|
662
665
|
const placeholders = values.map(() => "?").join(", ");
|
|
@@ -711,7 +714,7 @@ var LibSQLStore = class extends MastraStorage {
|
|
|
711
714
|
const row = result.rows[0];
|
|
712
715
|
const parsed = Object.fromEntries(Object.entries(row || {}).map(([k, v]) => {
|
|
713
716
|
try {
|
|
714
|
-
return [k, typeof v === "string" ? JSON.parse(v) : v];
|
|
717
|
+
return [k, typeof v === "string" ? v.startsWith("{") || v.startsWith("[") ? JSON.parse(v) : v : v];
|
|
715
718
|
} catch {
|
|
716
719
|
return [k, v];
|
|
717
720
|
}
|
package/dist/mastra/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Mastra } from '../chunk-
|
|
1
|
+
export { Mastra } from '../chunk-SF5GHHOQ.js';
|
package/dist/memory/index.cjs
CHANGED
|
@@ -463,6 +463,9 @@ var LibSQLStore = class extends MastraStorage {
|
|
|
463
463
|
if (typeof v === `undefined`) {
|
|
464
464
|
return null;
|
|
465
465
|
}
|
|
466
|
+
if (v instanceof Date) {
|
|
467
|
+
return v.toISOString();
|
|
468
|
+
}
|
|
466
469
|
return typeof v === "object" ? JSON.stringify(v) : v;
|
|
467
470
|
});
|
|
468
471
|
const placeholders = values.map(() => "?").join(", ");
|
|
@@ -473,7 +476,12 @@ var LibSQLStore = class extends MastraStorage {
|
|
|
473
476
|
}
|
|
474
477
|
async insert({ tableName, record }) {
|
|
475
478
|
try {
|
|
476
|
-
await this.client.execute(
|
|
479
|
+
await this.client.execute(
|
|
480
|
+
this.prepareStatement({
|
|
481
|
+
tableName,
|
|
482
|
+
record
|
|
483
|
+
})
|
|
484
|
+
);
|
|
477
485
|
} catch (error) {
|
|
478
486
|
this.logger.error(`Error upserting into table ${tableName}: ${error}`);
|
|
479
487
|
throw error;
|
|
@@ -503,7 +511,7 @@ var LibSQLStore = class extends MastraStorage {
|
|
|
503
511
|
const parsed = Object.fromEntries(
|
|
504
512
|
Object.entries(row || {}).map(([k, v]) => {
|
|
505
513
|
try {
|
|
506
|
-
return [k, typeof v === "string" ? JSON.parse(v) : v];
|
|
514
|
+
return [k, typeof v === "string" ? v.startsWith("{") || v.startsWith("[") ? JSON.parse(v) : v : v];
|
|
507
515
|
} catch {
|
|
508
516
|
return [k, v];
|
|
509
517
|
}
|
package/dist/memory/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MastraMemory } from '../chunk-
|
|
1
|
+
export { MastraMemory } from '../chunk-RRJB4TCC.js';
|
|
@@ -458,6 +458,9 @@ var LibSQLStore = class extends MastraStorage {
|
|
|
458
458
|
if (typeof v === `undefined`) {
|
|
459
459
|
return null;
|
|
460
460
|
}
|
|
461
|
+
if (v instanceof Date) {
|
|
462
|
+
return v.toISOString();
|
|
463
|
+
}
|
|
461
464
|
return typeof v === "object" ? JSON.stringify(v) : v;
|
|
462
465
|
});
|
|
463
466
|
const placeholders = values.map(() => "?").join(", ");
|
|
@@ -468,7 +471,12 @@ var LibSQLStore = class extends MastraStorage {
|
|
|
468
471
|
}
|
|
469
472
|
async insert({ tableName, record }) {
|
|
470
473
|
try {
|
|
471
|
-
await this.client.execute(
|
|
474
|
+
await this.client.execute(
|
|
475
|
+
this.prepareStatement({
|
|
476
|
+
tableName,
|
|
477
|
+
record
|
|
478
|
+
})
|
|
479
|
+
);
|
|
472
480
|
} catch (error) {
|
|
473
481
|
this.logger.error(`Error upserting into table ${tableName}: ${error}`);
|
|
474
482
|
throw error;
|
|
@@ -498,7 +506,7 @@ var LibSQLStore = class extends MastraStorage {
|
|
|
498
506
|
const parsed = Object.fromEntries(
|
|
499
507
|
Object.entries(row || {}).map(([k, v]) => {
|
|
500
508
|
try {
|
|
501
|
-
return [k, typeof v === "string" ? JSON.parse(v) : v];
|
|
509
|
+
return [k, typeof v === "string" ? v.startsWith("{") || v.startsWith("[") ? JSON.parse(v) : v : v];
|
|
502
510
|
} catch {
|
|
503
511
|
return [k, v];
|
|
504
512
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { LibSQLStore as DefaultStorage, LibSQLStore } from '../../chunk-
|
|
1
|
+
export { LibSQLStore as DefaultStorage, LibSQLStore } from '../../chunk-QAZ2ONKM.js';
|