@mastra/dynamodb 0.0.0-rag-chunk-extract-llm-option-20250926183645 → 0.0.0-roamin-openaivoice-speak-options-passing-20250926163614
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 +3 -7
- package/dist/entities/index.d.ts +0 -15
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/score.d.ts +0 -15
- package/dist/entities/score.d.ts.map +1 -1
- package/dist/index.cjs +24 -92
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -92
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/score/index.d.ts +0 -8
- package/dist/storage/domains/score/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +0 -9
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
# @mastra/dynamodb
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-roamin-openaivoice-speak-options-passing-20250926163614
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
- Dynamodb support fetch scores by trace and span id ([#8154](https://github.com/mastra-ai/mastra/pull/8154))
|
|
10
|
-
|
|
11
|
-
- Updated dependencies [[`dc099b4`](https://github.com/mastra-ai/mastra/commit/dc099b40fb31147ba3f362f98d991892033c4c67), [`504438b`](https://github.com/mastra-ai/mastra/commit/504438b961bde211071186bba63a842c4e3db879), [`b342a68`](https://github.com/mastra-ai/mastra/commit/b342a68e1399cf1ece9ba11bda112db89d21118c), [`303a9c0`](https://github.com/mastra-ai/mastra/commit/303a9c0d7dd58795915979f06a0512359e4532fb), [`370f8a6`](https://github.com/mastra-ai/mastra/commit/370f8a6480faec70fef18d72e5f7538f27004301), [`809eea0`](https://github.com/mastra-ai/mastra/commit/809eea092fa80c3f69b9eaf078d843b57fd2a88e), [`623ffaf`](https://github.com/mastra-ai/mastra/commit/623ffaf2d969e11e99a0224633cf7b5a0815c857), [`9fc1613`](https://github.com/mastra-ai/mastra/commit/9fc16136400186648880fd990119ac15f7c02ee4), [`61f62aa`](https://github.com/mastra-ai/mastra/commit/61f62aa31bc88fe4ddf8da6240dbcfbeb07358bd), [`db1891a`](https://github.com/mastra-ai/mastra/commit/db1891a4707443720b7cd8a260dc7e1d49b3609c), [`3e292ba`](https://github.com/mastra-ai/mastra/commit/3e292ba00837886d5d68a34cbc0d9b703c991883), [`418c136`](https://github.com/mastra-ai/mastra/commit/418c1366843d88e491bca3f87763899ce855ca29), [`c84b7d0`](https://github.com/mastra-ai/mastra/commit/c84b7d093c4657772140cbfd2b15ef72f3315ed5)]:
|
|
12
|
-
- @mastra/core@0.0.0-rag-chunk-extract-llm-option-20250926183645
|
|
7
|
+
- Updated dependencies [[`dc099b4`](https://github.com/mastra-ai/mastra/commit/dc099b40fb31147ba3f362f98d991892033c4c67), [`b342a68`](https://github.com/mastra-ai/mastra/commit/b342a68e1399cf1ece9ba11bda112db89d21118c), [`303a9c0`](https://github.com/mastra-ai/mastra/commit/303a9c0d7dd58795915979f06a0512359e4532fb), [`370f8a6`](https://github.com/mastra-ai/mastra/commit/370f8a6480faec70fef18d72e5f7538f27004301), [`809eea0`](https://github.com/mastra-ai/mastra/commit/809eea092fa80c3f69b9eaf078d843b57fd2a88e), [`623ffaf`](https://github.com/mastra-ai/mastra/commit/623ffaf2d969e11e99a0224633cf7b5a0815c857), [`9fc1613`](https://github.com/mastra-ai/mastra/commit/9fc16136400186648880fd990119ac15f7c02ee4), [`61f62aa`](https://github.com/mastra-ai/mastra/commit/61f62aa31bc88fe4ddf8da6240dbcfbeb07358bd), [`db1891a`](https://github.com/mastra-ai/mastra/commit/db1891a4707443720b7cd8a260dc7e1d49b3609c), [`3e292ba`](https://github.com/mastra-ai/mastra/commit/3e292ba00837886d5d68a34cbc0d9b703c991883), [`418c136`](https://github.com/mastra-ai/mastra/commit/418c1366843d88e491bca3f87763899ce855ca29), [`c84b7d0`](https://github.com/mastra-ai/mastra/commit/c84b7d093c4657772140cbfd2b15ef72f3315ed5)]:
|
|
8
|
+
- @mastra/core@0.0.0-roamin-openaivoice-speak-options-passing-20250926163614
|
|
13
9
|
|
|
14
10
|
## 0.15.3
|
|
15
11
|
|
package/dist/entities/index.d.ts
CHANGED
|
@@ -534,10 +534,6 @@ export declare function getElectroDbService(client: DynamoDBDocumentClient, tabl
|
|
|
534
534
|
type: "string";
|
|
535
535
|
required: false;
|
|
536
536
|
};
|
|
537
|
-
spanId: {
|
|
538
|
-
type: "string";
|
|
539
|
-
required: false;
|
|
540
|
-
};
|
|
541
537
|
runId: {
|
|
542
538
|
type: "string";
|
|
543
539
|
required: true;
|
|
@@ -744,17 +740,6 @@ export declare function getElectroDbService(client: DynamoDBDocumentClient, tabl
|
|
|
744
740
|
composite: "createdAt"[];
|
|
745
741
|
};
|
|
746
742
|
};
|
|
747
|
-
bySpan: {
|
|
748
|
-
index: string;
|
|
749
|
-
pk: {
|
|
750
|
-
field: string;
|
|
751
|
-
composite: ("entity" | "traceId" | "spanId")[];
|
|
752
|
-
};
|
|
753
|
-
sk: {
|
|
754
|
-
field: string;
|
|
755
|
-
composite: "createdAt"[];
|
|
756
|
-
};
|
|
757
|
-
};
|
|
758
743
|
};
|
|
759
744
|
}>;
|
|
760
745
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgBpF"}
|
package/dist/entities/score.d.ts
CHANGED
|
@@ -18,10 +18,6 @@ export declare const scoreEntity: Entity<string, string, string, {
|
|
|
18
18
|
type: "string";
|
|
19
19
|
required: false;
|
|
20
20
|
};
|
|
21
|
-
spanId: {
|
|
22
|
-
type: "string";
|
|
23
|
-
required: false;
|
|
24
|
-
};
|
|
25
21
|
runId: {
|
|
26
22
|
type: "string";
|
|
27
23
|
required: true;
|
|
@@ -228,17 +224,6 @@ export declare const scoreEntity: Entity<string, string, string, {
|
|
|
228
224
|
composite: "createdAt"[];
|
|
229
225
|
};
|
|
230
226
|
};
|
|
231
|
-
bySpan: {
|
|
232
|
-
index: string;
|
|
233
|
-
pk: {
|
|
234
|
-
field: string;
|
|
235
|
-
composite: ("entity" | "traceId" | "spanId")[];
|
|
236
|
-
};
|
|
237
|
-
sk: {
|
|
238
|
-
field: string;
|
|
239
|
-
composite: "createdAt"[];
|
|
240
|
-
};
|
|
241
|
-
};
|
|
242
227
|
};
|
|
243
228
|
}>;
|
|
244
229
|
//# sourceMappingURL=score.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"score.d.ts","sourceRoot":"","sources":["../../src/entities/score.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"score.d.ts","sourceRoot":"","sources":["../../src/entities/score.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;0BA+BJ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BA8CN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;;;;;0BAoBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkExB,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -6,7 +6,6 @@ var error = require('@mastra/core/error');
|
|
|
6
6
|
var storage = require('@mastra/core/storage');
|
|
7
7
|
var electrodb = require('electrodb');
|
|
8
8
|
var agent = require('@mastra/core/agent');
|
|
9
|
-
var scores = require('@mastra/core/scores');
|
|
10
9
|
|
|
11
10
|
// src/storage/index.ts
|
|
12
11
|
|
|
@@ -373,10 +372,6 @@ var scoreEntity = new electrodb.Entity({
|
|
|
373
372
|
type: "string",
|
|
374
373
|
required: false
|
|
375
374
|
},
|
|
376
|
-
spanId: {
|
|
377
|
-
type: "string",
|
|
378
|
-
required: false
|
|
379
|
-
},
|
|
380
375
|
runId: {
|
|
381
376
|
type: "string",
|
|
382
377
|
required: true
|
|
@@ -663,11 +658,6 @@ var scoreEntity = new electrodb.Entity({
|
|
|
663
658
|
index: "gsi6",
|
|
664
659
|
pk: { field: "gsi6pk", composite: ["entity", "threadId"] },
|
|
665
660
|
sk: { field: "gsi6sk", composite: ["createdAt"] }
|
|
666
|
-
},
|
|
667
|
-
bySpan: {
|
|
668
|
-
index: "gsi7",
|
|
669
|
-
pk: { field: "gsi7pk", composite: ["entity", "traceId", "spanId"] },
|
|
670
|
-
sk: { field: "gsi7sk", composite: ["createdAt"] }
|
|
671
661
|
}
|
|
672
662
|
}
|
|
673
663
|
});
|
|
@@ -2188,47 +2178,34 @@ var ScoresStorageDynamoDB = class extends storage.ScoresStorage {
|
|
|
2188
2178
|
}
|
|
2189
2179
|
}
|
|
2190
2180
|
async saveScore(score) {
|
|
2191
|
-
|
|
2192
|
-
try {
|
|
2193
|
-
validatedScore = scores.saveScorePayloadSchema.parse(score);
|
|
2194
|
-
} catch (error$1) {
|
|
2195
|
-
throw new error.MastraError(
|
|
2196
|
-
{
|
|
2197
|
-
id: "STORAGE_DYNAMODB_STORE_SAVE_SCORE_FAILED",
|
|
2198
|
-
domain: error.ErrorDomain.STORAGE,
|
|
2199
|
-
category: error.ErrorCategory.THIRD_PARTY
|
|
2200
|
-
},
|
|
2201
|
-
error$1
|
|
2202
|
-
);
|
|
2203
|
-
}
|
|
2181
|
+
this.logger.debug("Saving score", { scorerId: score.scorerId, runId: score.runId });
|
|
2204
2182
|
const now = /* @__PURE__ */ new Date();
|
|
2205
2183
|
const scoreId = `score-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
2206
2184
|
const scoreData = {
|
|
2207
2185
|
entity: "score",
|
|
2208
2186
|
id: scoreId,
|
|
2209
|
-
scorerId:
|
|
2210
|
-
traceId:
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
threadId: validatedScore.threadId || "",
|
|
2187
|
+
scorerId: score.scorerId,
|
|
2188
|
+
traceId: score.traceId || "",
|
|
2189
|
+
runId: score.runId,
|
|
2190
|
+
scorer: typeof score.scorer === "string" ? score.scorer : JSON.stringify(score.scorer),
|
|
2191
|
+
preprocessStepResult: typeof score.preprocessStepResult === "string" ? score.preprocessStepResult : JSON.stringify(score.preprocessStepResult),
|
|
2192
|
+
analyzeStepResult: typeof score.analyzeStepResult === "string" ? score.analyzeStepResult : JSON.stringify(score.analyzeStepResult),
|
|
2193
|
+
score: score.score,
|
|
2194
|
+
reason: score.reason,
|
|
2195
|
+
preprocessPrompt: score.preprocessPrompt,
|
|
2196
|
+
generateScorePrompt: score.generateScorePrompt,
|
|
2197
|
+
analyzePrompt: score.analyzePrompt,
|
|
2198
|
+
reasonPrompt: score.reasonPrompt,
|
|
2199
|
+
input: typeof score.input === "string" ? score.input : JSON.stringify(score.input),
|
|
2200
|
+
output: typeof score.output === "string" ? score.output : JSON.stringify(score.output),
|
|
2201
|
+
additionalContext: typeof score.additionalContext === "string" ? score.additionalContext : JSON.stringify(score.additionalContext),
|
|
2202
|
+
runtimeContext: typeof score.runtimeContext === "string" ? score.runtimeContext : JSON.stringify(score.runtimeContext),
|
|
2203
|
+
entityType: score.entityType,
|
|
2204
|
+
entityData: typeof score.entity === "string" ? score.entity : JSON.stringify(score.entity),
|
|
2205
|
+
entityId: score.entityId,
|
|
2206
|
+
source: score.source,
|
|
2207
|
+
resourceId: score.resourceId || "",
|
|
2208
|
+
threadId: score.threadId || "",
|
|
2232
2209
|
createdAt: now.toISOString(),
|
|
2233
2210
|
updatedAt: now.toISOString()
|
|
2234
2211
|
};
|
|
@@ -2381,43 +2358,6 @@ var ScoresStorageDynamoDB = class extends storage.ScoresStorage {
|
|
|
2381
2358
|
);
|
|
2382
2359
|
}
|
|
2383
2360
|
}
|
|
2384
|
-
async getScoresBySpan({
|
|
2385
|
-
traceId,
|
|
2386
|
-
spanId,
|
|
2387
|
-
pagination
|
|
2388
|
-
}) {
|
|
2389
|
-
this.logger.debug("Getting scores by span", { traceId, spanId, pagination });
|
|
2390
|
-
try {
|
|
2391
|
-
const query = this.service.entities.score.query.bySpan({ entity: "score", traceId, spanId });
|
|
2392
|
-
const results = await query.go();
|
|
2393
|
-
const allScores = results.data.map((data) => this.parseScoreData(data));
|
|
2394
|
-
allScores.sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime());
|
|
2395
|
-
const startIndex = pagination.page * pagination.perPage;
|
|
2396
|
-
const endIndex = startIndex + pagination.perPage;
|
|
2397
|
-
const paginatedScores = allScores.slice(startIndex, endIndex);
|
|
2398
|
-
const total = allScores.length;
|
|
2399
|
-
const hasMore = endIndex < total;
|
|
2400
|
-
return {
|
|
2401
|
-
scores: paginatedScores,
|
|
2402
|
-
pagination: {
|
|
2403
|
-
total,
|
|
2404
|
-
page: pagination.page,
|
|
2405
|
-
perPage: pagination.perPage,
|
|
2406
|
-
hasMore
|
|
2407
|
-
}
|
|
2408
|
-
};
|
|
2409
|
-
} catch (error$1) {
|
|
2410
|
-
throw new error.MastraError(
|
|
2411
|
-
{
|
|
2412
|
-
id: "STORAGE_DYNAMODB_STORE_GET_SCORES_BY_SPAN_FAILED",
|
|
2413
|
-
domain: error.ErrorDomain.STORAGE,
|
|
2414
|
-
category: error.ErrorCategory.THIRD_PARTY,
|
|
2415
|
-
details: { traceId, spanId, page: pagination.page, perPage: pagination.perPage }
|
|
2416
|
-
},
|
|
2417
|
-
error$1
|
|
2418
|
-
);
|
|
2419
|
-
}
|
|
2420
|
-
}
|
|
2421
2361
|
};
|
|
2422
2362
|
var TracesStorageDynamoDB = class extends storage.TracesStorage {
|
|
2423
2363
|
service;
|
|
@@ -2931,8 +2871,7 @@ var DynamoDBStore = class extends storage.MastraStorage {
|
|
|
2931
2871
|
resourceWorkingMemory: true,
|
|
2932
2872
|
hasColumn: false,
|
|
2933
2873
|
createTable: false,
|
|
2934
|
-
deleteMessages: false
|
|
2935
|
-
getScoresBySpan: true
|
|
2874
|
+
deleteMessages: false
|
|
2936
2875
|
};
|
|
2937
2876
|
}
|
|
2938
2877
|
/**
|
|
@@ -3191,13 +3130,6 @@ var DynamoDBStore = class extends storage.MastraStorage {
|
|
|
3191
3130
|
}) {
|
|
3192
3131
|
return this.stores.scores.getScoresByScorerId({ scorerId, source, entityId, entityType, pagination });
|
|
3193
3132
|
}
|
|
3194
|
-
async getScoresBySpan({
|
|
3195
|
-
traceId,
|
|
3196
|
-
spanId,
|
|
3197
|
-
pagination
|
|
3198
|
-
}) {
|
|
3199
|
-
return this.stores.scores.getScoresBySpan({ traceId, spanId, pagination });
|
|
3200
|
-
}
|
|
3201
3133
|
};
|
|
3202
3134
|
|
|
3203
3135
|
exports.DynamoDBStore = DynamoDBStore;
|