@mastra/dsql 1.5.5 → 1.5.6-alpha.0
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/index.cjs +11 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/agents/index.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1299,6 +1299,11 @@ var AgentsDSQL = class AgentsDSQL extends AgentsStorage {
|
|
|
1299
1299
|
tableName: TABLE_AGENT_VERSIONS,
|
|
1300
1300
|
schema: TABLE_SCHEMAS[TABLE_AGENT_VERSIONS]
|
|
1301
1301
|
});
|
|
1302
|
+
await this.#db.alterTable({
|
|
1303
|
+
tableName: TABLE_AGENT_VERSIONS,
|
|
1304
|
+
schema: TABLE_SCHEMAS[TABLE_AGENT_VERSIONS],
|
|
1305
|
+
ifNotExists: ["modelList"]
|
|
1306
|
+
});
|
|
1302
1307
|
await this.createDefaultIndexes();
|
|
1303
1308
|
await this.createCustomIndexes();
|
|
1304
1309
|
}
|
|
@@ -1572,21 +1577,22 @@ var AgentsDSQL = class AgentsDSQL extends AgentsStorage {
|
|
|
1572
1577
|
const nowIso = now.toISOString();
|
|
1573
1578
|
await withRetry(() => this.#db.client.none(`INSERT INTO ${tableName} (
|
|
1574
1579
|
id, "agentId", "versionNumber",
|
|
1575
|
-
name, description, instructions, model, tools,
|
|
1580
|
+
name, description, instructions, model, "modelList", tools,
|
|
1576
1581
|
"defaultOptions", workflows, agents, "integrationTools",
|
|
1577
1582
|
"inputProcessors", "outputProcessors", memory, scorers,
|
|
1578
1583
|
"mcpClients", "requestContextSchema", workspace, skills, "skillsFormat",
|
|
1579
1584
|
durable,
|
|
1580
1585
|
"changedFields", "changeMessage",
|
|
1581
1586
|
"createdAt", "createdAtZ"
|
|
1582
|
-
) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26)`, [
|
|
1587
|
+
) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27)`, [
|
|
1583
1588
|
input.id,
|
|
1584
1589
|
input.agentId,
|
|
1585
1590
|
input.versionNumber,
|
|
1586
1591
|
input.name,
|
|
1587
1592
|
input.description ?? null,
|
|
1588
|
-
this.serializeInstructions(input.instructions),
|
|
1589
|
-
JSON.stringify(input.model),
|
|
1593
|
+
this.serializeInstructions(input.instructions) ?? "",
|
|
1594
|
+
JSON.stringify(input.model ?? {}),
|
|
1595
|
+
input.modelList ? JSON.stringify(input.modelList) : null,
|
|
1590
1596
|
input.tools ? JSON.stringify(input.tools) : null,
|
|
1591
1597
|
input.defaultOptions ? JSON.stringify(input.defaultOptions) : null,
|
|
1592
1598
|
input.workflows ? JSON.stringify(input.workflows) : null,
|
|
@@ -1799,6 +1805,7 @@ var AgentsDSQL = class AgentsDSQL extends AgentsStorage {
|
|
|
1799
1805
|
description: row.description,
|
|
1800
1806
|
instructions: this.deserializeInstructions(row.instructions),
|
|
1801
1807
|
model: this.parseJson(row.model, "model"),
|
|
1808
|
+
modelList: this.parseJson(row.modelList, "modelList"),
|
|
1802
1809
|
tools: this.parseJson(row.tools, "tools"),
|
|
1803
1810
|
defaultOptions: this.parseJson(row.defaultOptions, "defaultOptions"),
|
|
1804
1811
|
workflows: this.parseJson(row.workflows, "workflows"),
|