@tangle-network/agent-app 0.60.238 → 0.60.239

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.
@@ -587,7 +587,7 @@ var SandboxRunError = class extends Error {
587
587
  };
588
588
  var DEFAULT_TIMEOUT_MS = 5 * 6e4;
589
589
  var TASK_LIMIT = 2e4;
590
- var SANDBOX_RUN_DESCRIPTION = "Run work that needs a computer in this workspace's sandbox: executing code or scripts, reading or converting PDFs, spreadsheets and archives, filling forms with the installed toolkits, or editing many files. Describe the whole task and the result you need; the sandbox agent does it and returns its answer. Takes seconds to minutes, so use it only when the answer needs the computer.";
590
+ var SANDBOX_RUN_DESCRIPTION = "Run work that needs a computer in this workspace's sandbox: executing code or scripts, reading or converting PDFs, spreadsheets and archives, filling forms with the installed toolkits, or editing many files. Describe the member's requirements, file paths and exact field names, not model-written code; the sandbox agent writes and runs the code and returns its answer. Takes seconds to minutes, so use it only when the answer needs the computer.";
591
591
  function sandboxPromptRunner(shell, prompt = {}) {
592
592
  return (box, task, { signal, timeoutMs, trace, span }) => runSandboxPrompt(shell, box, task, {
593
593
  ...prompt,
@@ -611,7 +611,7 @@ function createSandboxRunTool(options) {
611
611
  description: options.description ?? SANDBOX_RUN_DESCRIPTION,
612
612
  inputSchema: {
613
613
  type: "object",
614
- properties: { task: { type: "string", description: "The complete task for the sandbox agent, with the result you need back." } },
614
+ properties: { task: { type: "string", description: "The member requirements, file paths and exact output field names. The sandbox agent writes and runs the code." } },
615
615
  required: ["task"],
616
616
  additionalProperties: false
617
617
  },
@@ -647,7 +647,13 @@ function createSandboxRunTool(options) {
647
647
  emit("box_ready", { ms: Date.now() - started });
648
648
  let answer;
649
649
  try {
650
- answer = await capped(runTask(box, task, {
650
+ const prefix = options.memberRequest === void 0 ? "" : `The member's request (verbatim):
651
+ ${options.memberRequest}
652
+
653
+ Your part of it:
654
+ `;
655
+ const boxTask = prefix + task.slice(0, Math.max(0, TASK_LIMIT - prefix.length));
656
+ answer = await capped(runTask(box, boxTask, {
651
657
  signal,
652
658
  timeoutMs: Math.max(1, timeoutMs - (Date.now() - started)),
653
659
  emit,
@@ -3838,4 +3844,4 @@ export {
3838
3844
  deleteSecret,
3839
3845
  mintSandboxScopedToken
3840
3846
  };
3841
- //# sourceMappingURL=chunk-K7SKQ7GY.js.map
3847
+ //# sourceMappingURL=chunk-GNWGP3PA.js.map