@mastra/core 1.1.0-alpha.0 → 1.1.0-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/CHANGELOG.md +26 -0
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/{chunk-Z3XVFOTH.js → chunk-64LMKFD3.js} +4 -4
- package/dist/{chunk-Z3XVFOTH.js.map → chunk-64LMKFD3.js.map} +1 -1
- package/dist/{chunk-WBJMSOYD.cjs → chunk-66462UTX.cjs} +192 -140
- package/dist/chunk-66462UTX.cjs.map +1 -0
- package/dist/{chunk-N2FELMHU.cjs → chunk-BKUNHQZ4.cjs} +57 -24
- package/dist/chunk-BKUNHQZ4.cjs.map +1 -0
- package/dist/{chunk-DXTYXWYM.cjs → chunk-C6YO523J.cjs} +7 -7
- package/dist/{chunk-DXTYXWYM.cjs.map → chunk-C6YO523J.cjs.map} +1 -1
- package/dist/{chunk-OZFBUMI3.cjs → chunk-EZWVMAC6.cjs} +7 -7
- package/dist/{chunk-OZFBUMI3.cjs.map → chunk-EZWVMAC6.cjs.map} +1 -1
- package/dist/{chunk-ACEGVEZF.js → chunk-H4C5NORS.js} +66 -46
- package/dist/chunk-H4C5NORS.js.map +1 -0
- package/dist/{chunk-5VWOGZLE.js → chunk-HKD4NSHR.js} +49 -16
- package/dist/chunk-HKD4NSHR.js.map +1 -0
- package/dist/{chunk-3CXWVB55.cjs → chunk-IKS5Z56O.cjs} +39 -36
- package/dist/{chunk-3CXWVB55.cjs.map → chunk-IKS5Z56O.cjs.map} +1 -1
- package/dist/{chunk-YETWOFQL.js → chunk-KPIJA2R5.js} +21 -31
- package/dist/chunk-KPIJA2R5.js.map +1 -0
- package/dist/{chunk-XSRROONT.cjs → chunk-LMNHODU4.cjs} +5 -5
- package/dist/{chunk-XSRROONT.cjs.map → chunk-LMNHODU4.cjs.map} +1 -1
- package/dist/{chunk-ZZCLGEMJ.js → chunk-NVRAVZZM.js} +192 -139
- package/dist/chunk-NVRAVZZM.js.map +1 -0
- package/dist/{chunk-6FHHT22W.cjs → chunk-O7II2PSR.cjs} +44 -44
- package/dist/{chunk-6FHHT22W.cjs.map → chunk-O7II2PSR.cjs.map} +1 -1
- package/dist/{chunk-ARMHYWF5.js → chunk-QT56V3PE.js} +4 -4
- package/dist/{chunk-ARMHYWF5.js.map → chunk-QT56V3PE.js.map} +1 -1
- package/dist/{chunk-TV4DA7RI.cjs → chunk-RIPKI7ON.cjs} +21 -31
- package/dist/chunk-RIPKI7ON.cjs.map +1 -0
- package/dist/{chunk-5BEYS33K.js → chunk-RQGER4J4.js} +3 -3
- package/dist/{chunk-5BEYS33K.js.map → chunk-RQGER4J4.js.map} +1 -1
- package/dist/{chunk-REH5FX2O.js → chunk-SFICZTYL.js} +28 -25
- package/dist/chunk-SFICZTYL.js.map +1 -0
- package/dist/{chunk-CEYA6FNF.js → chunk-SJUNV5AS.js} +3 -3
- package/dist/{chunk-CEYA6FNF.js.map → chunk-SJUNV5AS.js.map} +1 -1
- package/dist/{chunk-ETSBNSRY.cjs → chunk-TO7IB5JE.cjs} +17 -9
- package/dist/chunk-TO7IB5JE.cjs.map +1 -0
- package/dist/{chunk-QGVPEZ5T.js → chunk-UJRSZGKO.js} +16 -8
- package/dist/chunk-UJRSZGKO.js.map +1 -0
- package/dist/{chunk-RFTFSXJY.cjs → chunk-YSFYUEEG.cjs} +72 -52
- package/dist/chunk-YSFYUEEG.cjs.map +1 -0
- package/dist/docs/README.md +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/SOURCE_MAP.json +271 -271
- package/dist/docs/agents/01-overview.md +2 -2
- package/dist/docs/evals/01-overview.md +5 -5
- package/dist/docs/mcp/01-overview.md +2 -2
- package/dist/docs/observability/01-overview.md +1 -1
- package/dist/docs/observability/03-overview.md +3 -3
- package/dist/docs/rag/01-overview.md +1 -1
- package/dist/docs/tools-mcp/01-mcp-overview.md +2 -2
- package/dist/docs/voice/01-overview.md +1 -1
- package/dist/docs/workflows/01-overview.md +5 -5
- package/dist/docs/workspace/01-overview.md +32 -29
- package/dist/docs/workspace/02-filesystem.md +13 -0
- package/dist/docs/workspace/03-sandbox.md +11 -4
- package/dist/docs/workspace/05-search.md +1 -1
- package/dist/docs/workspace/06-reference.md +304 -12
- package/dist/evals/index.cjs +20 -20
- package/dist/evals/index.js +3 -3
- package/dist/evals/scoreTraces/index.cjs +5 -5
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +9 -9
- package/dist/llm/index.js +2 -2
- package/dist/llm/model/provider-types.generated.d.ts +6 -2
- package/dist/loop/index.cjs +12 -12
- package/dist/loop/index.js +1 -1
- package/dist/loop/network/index.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.ts +3 -3
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +11 -11
- package/dist/memory/index.js +1 -1
- package/dist/processors/index.cjs +40 -40
- package/dist/processors/index.js +1 -1
- package/dist/provider-registry-JZ6QRIVL.cjs +40 -0
- package/dist/{provider-registry-63ZEAPKK.cjs.map → provider-registry-JZ6QRIVL.cjs.map} +1 -1
- package/dist/provider-registry-SQTJTKSM.js +3 -0
- package/dist/{provider-registry-4RA5NQGH.js.map → provider-registry-SQTJTKSM.js.map} +1 -1
- package/dist/provider-registry.json +14 -6
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/storage/constants.cjs +16 -16
- package/dist/storage/constants.d.ts.map +1 -1
- package/dist/storage/constants.js +1 -1
- package/dist/storage/domains/agents/base.d.ts +17 -23
- package/dist/storage/domains/agents/base.d.ts.map +1 -1
- package/dist/storage/domains/agents/inmemory.d.ts +1 -1
- package/dist/storage/domains/agents/inmemory.d.ts.map +1 -1
- package/dist/storage/index.cjs +101 -101
- package/dist/storage/index.js +2 -2
- package/dist/storage/types.d.ts +53 -37
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/stream/index.cjs +8 -8
- package/dist/stream/index.js +1 -1
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/vector/index.cjs +7 -7
- package/dist/vector/index.js +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +24 -24
- package/dist/workflows/index.js +1 -1
- package/dist/workspace/index.cjs +32 -32
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/skills/schemas.d.ts +17 -47
- package/dist/workspace/skills/schemas.d.ts.map +1 -1
- package/dist/workspace/skills/types.d.ts +4 -4
- package/dist/workspace/skills/types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/llm/model/provider-types.generated.d.ts +6 -2
- package/dist/chunk-5VWOGZLE.js.map +0 -1
- package/dist/chunk-ACEGVEZF.js.map +0 -1
- package/dist/chunk-ETSBNSRY.cjs.map +0 -1
- package/dist/chunk-N2FELMHU.cjs.map +0 -1
- package/dist/chunk-QGVPEZ5T.js.map +0 -1
- package/dist/chunk-REH5FX2O.js.map +0 -1
- package/dist/chunk-RFTFSXJY.cjs.map +0 -1
- package/dist/chunk-TV4DA7RI.cjs.map +0 -1
- package/dist/chunk-WBJMSOYD.cjs.map +0 -1
- package/dist/chunk-YETWOFQL.js.map +0 -1
- package/dist/chunk-ZZCLGEMJ.js.map +0 -1
- package/dist/provider-registry-4RA5NQGH.js +0 -3
- package/dist/provider-registry-63ZEAPKK.cjs +0 -40
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkIUODLQMU_cjs = require('./chunk-IUODLQMU.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkRIPKI7ON_cjs = require('./chunk-RIPKI7ON.cjs');
|
|
5
5
|
var chunk7ALOYTDY_cjs = require('./chunk-7ALOYTDY.cjs');
|
|
6
6
|
var chunk4U7ZLI36_cjs = require('./chunk-4U7ZLI36.cjs');
|
|
7
7
|
var chunkC4WWWQHT_cjs = require('./chunk-C4WWWQHT.cjs');
|
|
@@ -144,12 +144,12 @@ var AgentsStorage = class extends StorageDomain {
|
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
/**
|
|
147
|
-
* Retrieves an agent by its unique identifier, resolving from the active version
|
|
147
|
+
* Retrieves an agent by its unique identifier, resolving config from the active version.
|
|
148
148
|
* This is the preferred method for fetching stored agents as it ensures the returned
|
|
149
149
|
* configuration matches the active version.
|
|
150
150
|
*
|
|
151
151
|
* @param id - The unique identifier of the agent
|
|
152
|
-
* @returns The agent
|
|
152
|
+
* @returns The resolved agent (metadata + version config), or null if not found
|
|
153
153
|
*/
|
|
154
154
|
async getAgentByIdResolved({ id }) {
|
|
155
155
|
const agent = await this.getAgentById({ id });
|
|
@@ -159,10 +159,18 @@ var AgentsStorage = class extends StorageDomain {
|
|
|
159
159
|
if (agent.activeVersionId) {
|
|
160
160
|
const activeVersion = await this.getVersion(agent.activeVersionId);
|
|
161
161
|
if (activeVersion) {
|
|
162
|
+
const {
|
|
163
|
+
id: _versionId,
|
|
164
|
+
agentId: _agentId,
|
|
165
|
+
versionNumber: _versionNumber,
|
|
166
|
+
changedFields: _changedFields,
|
|
167
|
+
changeMessage: _changeMessage,
|
|
168
|
+
createdAt: _createdAt,
|
|
169
|
+
...snapshotConfig
|
|
170
|
+
} = activeVersion;
|
|
162
171
|
return {
|
|
163
|
-
...
|
|
164
|
-
|
|
165
|
-
activeVersionId: agent.activeVersionId
|
|
172
|
+
...agent,
|
|
173
|
+
...snapshotConfig
|
|
166
174
|
};
|
|
167
175
|
}
|
|
168
176
|
}
|
|
@@ -170,7 +178,7 @@ var AgentsStorage = class extends StorageDomain {
|
|
|
170
178
|
}
|
|
171
179
|
/**
|
|
172
180
|
* Lists all agents with version resolution.
|
|
173
|
-
* For each agent that has an activeVersionId, the config is resolved from the version
|
|
181
|
+
* For each agent that has an activeVersionId, the config is resolved from the version.
|
|
174
182
|
*
|
|
175
183
|
* @param args - Pagination and ordering options
|
|
176
184
|
* @returns Paginated list of resolved agents
|
|
@@ -182,11 +190,18 @@ var AgentsStorage = class extends StorageDomain {
|
|
|
182
190
|
if (agent.activeVersionId) {
|
|
183
191
|
const activeVersion = await this.getVersion(agent.activeVersionId);
|
|
184
192
|
if (activeVersion) {
|
|
193
|
+
const {
|
|
194
|
+
id: _versionId,
|
|
195
|
+
agentId: _agentId,
|
|
196
|
+
versionNumber: _versionNumber,
|
|
197
|
+
changedFields: _changedFields,
|
|
198
|
+
changeMessage: _changeMessage,
|
|
199
|
+
createdAt: _createdAt,
|
|
200
|
+
...snapshotConfig
|
|
201
|
+
} = activeVersion;
|
|
185
202
|
return {
|
|
186
|
-
...
|
|
187
|
-
|
|
188
|
-
id: agent.id,
|
|
189
|
-
activeVersionId: agent.activeVersionId
|
|
203
|
+
...agent,
|
|
204
|
+
...snapshotConfig
|
|
190
205
|
};
|
|
191
206
|
}
|
|
192
207
|
}
|
|
@@ -247,11 +262,28 @@ var InMemoryAgentsStorage = class extends AgentsStorage {
|
|
|
247
262
|
}
|
|
248
263
|
const now = /* @__PURE__ */ new Date();
|
|
249
264
|
const newAgent = {
|
|
250
|
-
|
|
265
|
+
id: agent.id,
|
|
266
|
+
status: "draft",
|
|
267
|
+
activeVersionId: void 0,
|
|
268
|
+
authorId: agent.authorId,
|
|
269
|
+
metadata: agent.metadata,
|
|
251
270
|
createdAt: now,
|
|
252
271
|
updatedAt: now
|
|
253
272
|
};
|
|
254
273
|
this.db.agents.set(agent.id, newAgent);
|
|
274
|
+
const { id: _id, authorId: _authorId, metadata: _metadata, ...snapshotConfig } = agent;
|
|
275
|
+
const versionId = crypto.randomUUID();
|
|
276
|
+
await this.createVersion({
|
|
277
|
+
id: versionId,
|
|
278
|
+
agentId: agent.id,
|
|
279
|
+
versionNumber: 1,
|
|
280
|
+
...snapshotConfig,
|
|
281
|
+
changedFields: Object.keys(snapshotConfig),
|
|
282
|
+
changeMessage: "Initial version"
|
|
283
|
+
});
|
|
284
|
+
newAgent.activeVersionId = versionId;
|
|
285
|
+
newAgent.status = "published";
|
|
286
|
+
this.db.agents.set(agent.id, newAgent);
|
|
255
287
|
return { ...newAgent };
|
|
256
288
|
}
|
|
257
289
|
async updateAgent({ id, ...updates }) {
|
|
@@ -262,28 +294,16 @@ var InMemoryAgentsStorage = class extends AgentsStorage {
|
|
|
262
294
|
}
|
|
263
295
|
const updatedAgent = {
|
|
264
296
|
...existingAgent,
|
|
265
|
-
...updates.
|
|
266
|
-
...updates.
|
|
267
|
-
...updates.instructions !== void 0 && { instructions: updates.instructions },
|
|
268
|
-
...updates.model !== void 0 && { model: updates.model },
|
|
269
|
-
...updates.tools !== void 0 && { tools: updates.tools },
|
|
270
|
-
...updates.defaultOptions !== void 0 && {
|
|
271
|
-
defaultOptions: updates.defaultOptions
|
|
272
|
-
},
|
|
273
|
-
...updates.workflows !== void 0 && { workflows: updates.workflows },
|
|
274
|
-
...updates.agents !== void 0 && { agents: updates.agents },
|
|
275
|
-
...updates.inputProcessors !== void 0 && { inputProcessors: updates.inputProcessors },
|
|
276
|
-
...updates.outputProcessors !== void 0 && { outputProcessors: updates.outputProcessors },
|
|
277
|
-
...updates.memory !== void 0 && { memory: updates.memory },
|
|
278
|
-
...updates.scorers !== void 0 && { scorers: updates.scorers },
|
|
297
|
+
...updates.authorId !== void 0 && { authorId: updates.authorId },
|
|
298
|
+
...updates.activeVersionId !== void 0 && { activeVersionId: updates.activeVersionId },
|
|
279
299
|
...updates.metadata !== void 0 && {
|
|
280
300
|
metadata: { ...existingAgent.metadata, ...updates.metadata }
|
|
281
301
|
},
|
|
282
|
-
...updates.ownerId !== void 0 && { ownerId: updates.ownerId },
|
|
283
|
-
...updates.activeVersionId !== void 0 && { activeVersionId: updates.activeVersionId },
|
|
284
|
-
...updates.integrationTools !== void 0 && { integrationTools: updates.integrationTools },
|
|
285
302
|
updatedAt: /* @__PURE__ */ new Date()
|
|
286
303
|
};
|
|
304
|
+
if (updates.activeVersionId !== void 0) {
|
|
305
|
+
updatedAgent.status = "published";
|
|
306
|
+
}
|
|
287
307
|
this.db.agents.set(id, updatedAgent);
|
|
288
308
|
return { ...updatedAgent };
|
|
289
309
|
}
|
|
@@ -293,7 +313,7 @@ var InMemoryAgentsStorage = class extends AgentsStorage {
|
|
|
293
313
|
await this.deleteVersionsByAgentId(id);
|
|
294
314
|
}
|
|
295
315
|
async listAgents(args) {
|
|
296
|
-
const { page = 0, perPage: perPageInput, orderBy,
|
|
316
|
+
const { page = 0, perPage: perPageInput, orderBy, authorId, metadata } = args || {};
|
|
297
317
|
const { field, direction } = this.parseOrderBy(orderBy);
|
|
298
318
|
this.logger.debug(`InMemoryAgentsStorage: listAgents called`);
|
|
299
319
|
const perPage = normalizePerPage(perPageInput, 100);
|
|
@@ -305,8 +325,8 @@ var InMemoryAgentsStorage = class extends AgentsStorage {
|
|
|
305
325
|
throw new Error("page value too large");
|
|
306
326
|
}
|
|
307
327
|
let agents = Array.from(this.db.agents.values());
|
|
308
|
-
if (
|
|
309
|
-
agents = agents.filter((agent) => agent.
|
|
328
|
+
if (authorId !== void 0) {
|
|
329
|
+
agents = agents.filter((agent) => agent.authorId === authorId);
|
|
310
330
|
}
|
|
311
331
|
if (metadata && Object.keys(metadata).length > 0) {
|
|
312
332
|
agents = agents.filter((agent) => {
|
|
@@ -427,21 +447,12 @@ var InMemoryAgentsStorage = class extends AgentsStorage {
|
|
|
427
447
|
// Private Helper Methods
|
|
428
448
|
// ==========================================================================
|
|
429
449
|
/**
|
|
430
|
-
* Deep copy
|
|
450
|
+
* Deep copy a thin agent record to prevent external mutation of stored data
|
|
431
451
|
*/
|
|
432
452
|
deepCopyAgent(agent) {
|
|
433
453
|
return {
|
|
434
454
|
...agent,
|
|
435
|
-
metadata: agent.metadata ? { ...agent.metadata } : agent.metadata
|
|
436
|
-
model: { ...agent.model },
|
|
437
|
-
tools: agent.tools ? [...agent.tools] : agent.tools,
|
|
438
|
-
defaultOptions: agent.defaultOptions ? { ...agent.defaultOptions } : agent.defaultOptions,
|
|
439
|
-
workflows: agent.workflows ? [...agent.workflows] : agent.workflows,
|
|
440
|
-
agents: agent.agents ? [...agent.agents] : agent.agents,
|
|
441
|
-
integrationTools: agent.integrationTools ? [...agent.integrationTools] : agent.integrationTools,
|
|
442
|
-
inputProcessors: agent.inputProcessors ? agent.inputProcessors.map((p) => ({ ...p })) : agent.inputProcessors,
|
|
443
|
-
outputProcessors: agent.outputProcessors ? agent.outputProcessors.map((p) => ({ ...p })) : agent.outputProcessors,
|
|
444
|
-
scorers: agent.scorers ? { ...agent.scorers } : agent.scorers
|
|
455
|
+
metadata: agent.metadata ? { ...agent.metadata } : agent.metadata
|
|
445
456
|
};
|
|
446
457
|
}
|
|
447
458
|
/**
|
|
@@ -450,7 +461,16 @@ var InMemoryAgentsStorage = class extends AgentsStorage {
|
|
|
450
461
|
deepCopyVersion(version) {
|
|
451
462
|
return {
|
|
452
463
|
...version,
|
|
453
|
-
|
|
464
|
+
model: { ...version.model },
|
|
465
|
+
tools: version.tools ? [...version.tools] : version.tools,
|
|
466
|
+
defaultOptions: version.defaultOptions ? { ...version.defaultOptions } : version.defaultOptions,
|
|
467
|
+
workflows: version.workflows ? [...version.workflows] : version.workflows,
|
|
468
|
+
agents: version.agents ? [...version.agents] : version.agents,
|
|
469
|
+
integrationTools: version.integrationTools ? [...version.integrationTools] : version.integrationTools,
|
|
470
|
+
inputProcessors: version.inputProcessors ? version.inputProcessors.map((p) => ({ ...p })) : version.inputProcessors,
|
|
471
|
+
outputProcessors: version.outputProcessors ? version.outputProcessors.map((p) => ({ ...p })) : version.outputProcessors,
|
|
472
|
+
memory: version.memory ? { ...version.memory } : version.memory,
|
|
473
|
+
scorers: version.scorers ? { ...version.scorers } : version.scorers,
|
|
454
474
|
changedFields: version.changedFields ? [...version.changedFields] : version.changedFields
|
|
455
475
|
};
|
|
456
476
|
}
|
|
@@ -518,7 +538,7 @@ function safelyParseJSON(input) {
|
|
|
518
538
|
}
|
|
519
539
|
function transformRow(row, tableName, options = {}) {
|
|
520
540
|
const { preferredTimestampFields = {}, convertTimestamps = false, nullValuePattern, fieldMappings = {} } = options;
|
|
521
|
-
const tableSchema =
|
|
541
|
+
const tableSchema = chunkRIPKI7ON_cjs.TABLE_SCHEMAS[tableName];
|
|
522
542
|
const result = {};
|
|
523
543
|
for (const [key, columnSchema] of Object.entries(tableSchema)) {
|
|
524
544
|
const sourceKey = fieldMappings[key] ?? key;
|
|
@@ -549,7 +569,7 @@ function transformRow(row, tableName, options = {}) {
|
|
|
549
569
|
return result;
|
|
550
570
|
}
|
|
551
571
|
function transformScoreRow(row, options = {}) {
|
|
552
|
-
return transformRow(row,
|
|
572
|
+
return transformRow(row, chunkRIPKI7ON_cjs.TABLE_SCORERS, options);
|
|
553
573
|
}
|
|
554
574
|
function toUpperSnakeCase(str) {
|
|
555
575
|
return str.replace(/([a-z])([A-Z])/g, "$1_$2").replace(/([A-Z])([A-Z][a-z])/g, "$1_$2").toUpperCase().replace(/[^A-Z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
@@ -1563,7 +1583,7 @@ var ObservabilityInMemory = class extends ObservabilityStorage {
|
|
|
1563
1583
|
};
|
|
1564
1584
|
}
|
|
1565
1585
|
async listTraces(args) {
|
|
1566
|
-
const { filters, pagination, orderBy } =
|
|
1586
|
+
const { filters, pagination, orderBy } = chunkRIPKI7ON_cjs.listTracesArgsSchema.parse(args);
|
|
1567
1587
|
const matchingRootSpans = [];
|
|
1568
1588
|
for (const [, traceEntry] of this.db.traces) {
|
|
1569
1589
|
if (!traceEntry.rootSpan) continue;
|
|
@@ -1592,7 +1612,7 @@ var ObservabilityInMemory = class extends ObservabilityStorage {
|
|
|
1592
1612
|
const end = start + perPage;
|
|
1593
1613
|
const paged = matchingRootSpans.slice(start, end);
|
|
1594
1614
|
return {
|
|
1595
|
-
spans:
|
|
1615
|
+
spans: chunkRIPKI7ON_cjs.toTraceSpans(paged),
|
|
1596
1616
|
pagination: { total, page, perPage, hasMore: end < total }
|
|
1597
1617
|
};
|
|
1598
1618
|
}
|
|
@@ -2277,7 +2297,7 @@ var StoreOperationsInMemory = class extends StoreOperations {
|
|
|
2277
2297
|
async insert({ tableName, record }) {
|
|
2278
2298
|
const table = this.data[tableName];
|
|
2279
2299
|
let key = record.id;
|
|
2280
|
-
if ([
|
|
2300
|
+
if ([chunkRIPKI7ON_cjs.TABLE_WORKFLOW_SNAPSHOT].includes(tableName) && !record.id && record.run_id) {
|
|
2281
2301
|
key = record.workflow_name ? `${record.workflow_name}-${record.run_id}` : record.run_id;
|
|
2282
2302
|
record.id = key;
|
|
2283
2303
|
} else if (!record.id) {
|
|
@@ -2290,7 +2310,7 @@ var StoreOperationsInMemory = class extends StoreOperations {
|
|
|
2290
2310
|
const table = this.data[tableName];
|
|
2291
2311
|
for (const record of records) {
|
|
2292
2312
|
let key = record.id;
|
|
2293
|
-
if ([
|
|
2313
|
+
if ([chunkRIPKI7ON_cjs.TABLE_WORKFLOW_SNAPSHOT].includes(tableName) && !record.id && record.run_id) {
|
|
2294
2314
|
key = record.run_id;
|
|
2295
2315
|
record.id = key;
|
|
2296
2316
|
} else if (!record.id) {
|
|
@@ -2365,5 +2385,5 @@ exports.safelyParseJSON = safelyParseJSON;
|
|
|
2365
2385
|
exports.serializeDate = serializeDate;
|
|
2366
2386
|
exports.transformRow = transformRow;
|
|
2367
2387
|
exports.transformScoreRow = transformScoreRow;
|
|
2368
|
-
//# sourceMappingURL=chunk-
|
|
2369
|
-
//# sourceMappingURL=chunk-
|
|
2388
|
+
//# sourceMappingURL=chunk-YSFYUEEG.cjs.map
|
|
2389
|
+
//# sourceMappingURL=chunk-YSFYUEEG.cjs.map
|