@mastra/agent-builder 0.1.1 → 0.2.0-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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @mastra/agent-builder
|
|
2
2
|
|
|
3
|
+
## 0.2.0-alpha.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Update structuredOutput to use response format by default with an opt in to json prompt injection. ([#8557](https://github.com/mastra-ai/mastra/pull/8557))
|
|
8
|
+
Replaced internal usage of output with structuredOutput.
|
|
9
|
+
|
|
10
|
+
- Update peer dependencies to match core package version bump (0.21.0) ([#8557](https://github.com/mastra-ai/mastra/pull/8557))
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Update peer dependencies to match core package version bump (0.21.0) ([#8619](https://github.com/mastra-ai/mastra/pull/8619))
|
|
15
|
+
|
|
16
|
+
- Update peer dependencies to match core package version bump (0.21.0) ([#8626](https://github.com/mastra-ai/mastra/pull/8626))
|
|
17
|
+
|
|
18
|
+
- Update peer dependencies to match core package version bump (0.21.0) ([#8686](https://github.com/mastra-ai/mastra/pull/8686))
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [[`2288200`](https://github.com/mastra-ai/mastra/commit/22882001be465d960a88f2c7f9ff1502787eefe8), [`f368e7b`](https://github.com/mastra-ai/mastra/commit/f368e7b19436a14e5771c46810e5ae93a2faf2e9), [`b5a66b7`](https://github.com/mastra-ai/mastra/commit/b5a66b748a14fc8b3f63b04642ddb9621fbcc9e0), [`2ddb851`](https://github.com/mastra-ai/mastra/commit/2ddb8519c4b6f1d31be10ffd33b41d2b649a04ff), [`7b1ef57`](https://github.com/mastra-ai/mastra/commit/7b1ef57fc071c2aa2a2e32905b18cd88719c5a39), [`228228b`](https://github.com/mastra-ai/mastra/commit/228228b0b1de9291cb8887587f5cea1a8757ebad), [`b5a66b7`](https://github.com/mastra-ai/mastra/commit/b5a66b748a14fc8b3f63b04642ddb9621fbcc9e0), [`ee68e82`](https://github.com/mastra-ai/mastra/commit/ee68e8289ea4408d29849e899bc6e78b3bd4e843), [`228228b`](https://github.com/mastra-ai/mastra/commit/228228b0b1de9291cb8887587f5cea1a8757ebad), [`ea33930`](https://github.com/mastra-ai/mastra/commit/ea339301e82d6318257720d811b043014ee44064), [`b5a66b7`](https://github.com/mastra-ai/mastra/commit/b5a66b748a14fc8b3f63b04642ddb9621fbcc9e0), [`7b1ef57`](https://github.com/mastra-ai/mastra/commit/7b1ef57fc071c2aa2a2e32905b18cd88719c5a39), [`135d6f2`](https://github.com/mastra-ai/mastra/commit/135d6f22a326ed1dffff858700669dff09d2c9eb), [`59d036d`](https://github.com/mastra-ai/mastra/commit/59d036d4c2706b430b0e3f1f1e0ee853ce16ca04)]:
|
|
21
|
+
- @mastra/memory@0.15.7-alpha.0
|
|
22
|
+
- @mastra/core@0.21.0-alpha.0
|
|
23
|
+
|
|
3
24
|
## 0.1.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Agent } from '@mastra/core/agent';
|
|
1
|
+
import { Agent, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '@mastra/core/agent';
|
|
2
2
|
import { Memory } from '@mastra/memory';
|
|
3
3
|
import { TokenLimiter } from '@mastra/memory/processors';
|
|
4
4
|
import { exec as exec$1, execFile as execFile$1, spawn as spawn$1 } from 'child_process';
|
|
@@ -3469,8 +3469,10 @@ Return the actual exported names of the units, as well as the file names.`,
|
|
|
3469
3469
|
networks: z.array(z.object({ name: z.string(), file: z.string() })).optional(),
|
|
3470
3470
|
other: z.array(z.object({ name: z.string(), file: z.string() })).optional()
|
|
3471
3471
|
});
|
|
3472
|
-
const result = isV2 ? await agent
|
|
3473
|
-
|
|
3472
|
+
const result = isV2 ? await tryGenerateWithJsonFallback(agent, prompt, {
|
|
3473
|
+
structuredOutput: {
|
|
3474
|
+
schema: output
|
|
3475
|
+
},
|
|
3474
3476
|
maxSteps: 100
|
|
3475
3477
|
}) : await agent.generateLegacy(prompt, {
|
|
3476
3478
|
experimental_output: output,
|
|
@@ -4460,8 +4462,10 @@ Start by running validateCode with all validation types to get a complete pictur
|
|
|
4460
4462
|
Previous iterations may have fixed some issues, so start by re-running validateCode to see the current state, then fix any remaining issues.`;
|
|
4461
4463
|
const isV2 = model.specificationVersion === "v2";
|
|
4462
4464
|
const output = z.object({ success: z.boolean() });
|
|
4463
|
-
const result = isV2 ? await validationAgent
|
|
4464
|
-
|
|
4465
|
+
const result = isV2 ? await tryStreamWithJsonFallback(validationAgent, iterationPrompt, {
|
|
4466
|
+
structuredOutput: {
|
|
4467
|
+
schema: output
|
|
4468
|
+
}
|
|
4465
4469
|
}) : await validationAgent.streamLegacy(iterationPrompt, {
|
|
4466
4470
|
experimental_output: output
|
|
4467
4471
|
});
|