ai 6.0.0-beta.64 → 6.0.0-beta.65

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,11 @@
1
1
  # ai
2
2
 
3
+ ## 6.0.0-beta.65
4
+
5
+ ### Patch Changes
6
+
7
+ - dce4e7b: chore(agent): rename system to instructions
8
+
3
9
  ## 6.0.0-beta.64
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -2470,9 +2470,9 @@ type ToolLoopAgentSettings<TOOLS extends ToolSet = {}, OUTPUT extends Output = n
2470
2470
  */
2471
2471
  id?: string;
2472
2472
  /**
2473
- * The system prompt to use.
2473
+ * The instructions for the agent.
2474
2474
  */
2475
- system?: string;
2475
+ instructions?: string;
2476
2476
  /**
2477
2477
  The language model to use.
2478
2478
  */
@@ -2506,10 +2506,6 @@ type ToolLoopAgentSettings<TOOLS extends ToolSet = {}, OUTPUT extends Output = n
2506
2506
  */
2507
2507
  experimental_output?: OUTPUT;
2508
2508
  /**
2509
- * @deprecated Use `prepareStep` instead.
2510
- */
2511
- experimental_prepareStep?: PrepareStepFunction<NoInfer<TOOLS>>;
2512
- /**
2513
2509
  Optional function that you can use to provide different settings for a step.
2514
2510
  */
2515
2511
  prepareStep?: PrepareStepFunction<NoInfer<TOOLS>>;
package/dist/index.d.ts CHANGED
@@ -2470,9 +2470,9 @@ type ToolLoopAgentSettings<TOOLS extends ToolSet = {}, OUTPUT extends Output = n
2470
2470
  */
2471
2471
  id?: string;
2472
2472
  /**
2473
- * The system prompt to use.
2473
+ * The instructions for the agent.
2474
2474
  */
2475
- system?: string;
2475
+ instructions?: string;
2476
2476
  /**
2477
2477
  The language model to use.
2478
2478
  */
@@ -2506,10 +2506,6 @@ type ToolLoopAgentSettings<TOOLS extends ToolSet = {}, OUTPUT extends Output = n
2506
2506
  */
2507
2507
  experimental_output?: OUTPUT;
2508
2508
  /**
2509
- * @deprecated Use `prepareStep` instead.
2510
- */
2511
- experimental_prepareStep?: PrepareStepFunction<NoInfer<TOOLS>>;
2512
- /**
2513
2509
  Optional function that you can use to provide different settings for a step.
2514
2510
  */
2515
2511
  prepareStep?: PrepareStepFunction<NoInfer<TOOLS>>;
package/dist/index.js CHANGED
@@ -873,7 +873,7 @@ function detectMediaType({
873
873
  var import_provider_utils2 = require("@ai-sdk/provider-utils");
874
874
 
875
875
  // src/version.ts
876
- var VERSION = true ? "6.0.0-beta.64" : "0.0.0-test";
876
+ var VERSION = true ? "6.0.0-beta.65" : "0.0.0-test";
877
877
 
878
878
  // src/util/download/download.ts
879
879
  var download = async ({ url }) => {
@@ -6345,10 +6345,11 @@ var ToolLoopAgent = class {
6345
6345
  * Generates an output from the agent (non-streaming).
6346
6346
  */
6347
6347
  async generate(options) {
6348
- var _a17;
6348
+ const { instructions, stopWhen, ...settings } = this.settings;
6349
6349
  return generateText({
6350
- ...this.settings,
6351
- stopWhen: (_a17 = this.settings.stopWhen) != null ? _a17 : stepCountIs(20),
6350
+ ...settings,
6351
+ system: instructions,
6352
+ stopWhen: stopWhen != null ? stopWhen : stepCountIs(20),
6352
6353
  ...options
6353
6354
  });
6354
6355
  }
@@ -6356,10 +6357,11 @@ var ToolLoopAgent = class {
6356
6357
  * Streams an output from the agent (streaming).
6357
6358
  */
6358
6359
  stream(options) {
6359
- var _a17;
6360
+ const { instructions, stopWhen, ...settings } = this.settings;
6360
6361
  return streamText({
6361
- ...this.settings,
6362
- stopWhen: (_a17 = this.settings.stopWhen) != null ? _a17 : stepCountIs(20),
6362
+ ...settings,
6363
+ system: instructions,
6364
+ stopWhen: stopWhen != null ? stopWhen : stepCountIs(20),
6363
6365
  ...options
6364
6366
  });
6365
6367
  }