@deepagents/experimental 7.4.0 → 7.5.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/README.md CHANGED
@@ -59,6 +59,9 @@ across workers and restarts that resume the same approval. A `toolApproval`
59
59
  map overrides `needsApproval` for the listed tools; unlisted tools keep their
60
60
  own rules. A callback controls every tool call, including tools added by the
61
61
  runtime. The runtime stores approvals and resumes turns after a decision.
62
+ `defineAgent()` also accepts the AI SDK `stopWhen`, which ends the agent loop of
63
+ a turn, for example `[hasToolCall('notify'), isStepCount(6)]`. Without it, a
64
+ turn uses the default of `agent()` in `@deepagents/context`.
62
65
 
63
66
  If the provider interrupts a response, the runtime retains partial output
64
67
  and marks the turn `failed` without automatically retrying it. Compaction
package/dist/index.js CHANGED
@@ -3121,6 +3121,7 @@ var AgentTurnExecutor = class {
3121
3121
  chatId: turn.chatId,
3122
3122
  userId: turn.userId
3123
3123
  });
3124
+ await using _turnSandbox = sandbox.sandbox;
3124
3125
  const agentSkills = await this.#skillsFor(
3125
3126
  turn,
3126
3127
  declaration.name,