@frockbot/plugin-subagents 0.3.8 → 0.3.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frockbot/plugin-subagents",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -27,8 +27,8 @@
27
27
  "typecheck": "tsc --noEmit -p tsconfig.json"
28
28
  },
29
29
  "dependencies": {
30
- "@frockbot/kernel-agent-loop": "0.3.8",
31
- "@frockbot/kernel-contracts": "0.3.8",
30
+ "@frockbot/kernel-agent-loop": "0.3.9",
31
+ "@frockbot/kernel-contracts": "0.3.9",
32
32
  "cordis": "4.0.0-rc.8"
33
33
  },
34
34
  "devDependencies": {
package/src/agent.test.ts CHANGED
@@ -404,7 +404,7 @@ describe("the lifecycle tools", () => {
404
404
  expect(result.content).toContain("It changed on Tuesday.");
405
405
  });
406
406
 
407
- test("a blocking dispatch that did not settle says it is still running, by id", async () => {
407
+ test("a blocking dispatch that did not settle is honest that it only dispatched", async () => {
408
408
  const result = await tool(() =>
409
409
  Promise.resolve({ status: "dispatched", taskId: "tk-1", model: "m" }),
410
410
  ).execute(
@@ -416,7 +416,11 @@ describe("the lifecycle tools", () => {
416
416
  context(),
417
417
  );
418
418
  expect(result.isError).toBe(false);
419
- expect(result.content).toContain("still running, id tk-1");
419
+ expect(result.content).toContain("did not finish inside the wait, id tk-1");
420
+ // The Turn is told to answer, not to go looking: this wording is what
421
+ // stopped the model calling task_check and then task_resume on it.
422
+ expect(result.content).toContain("do not poll for it");
423
+ expect(result.content).toContain("Answer the User now");
420
424
  });
421
425
  });
422
426
 
package/src/agent.ts CHANGED
@@ -519,7 +519,11 @@ export function createTaskTool(
519
519
  "It runs as its own Turn and cannot see this conversation.",
520
520
  decoded.background
521
521
  ? DO_NOT_POLL
522
- : `It is still running, id ${outcome.taskId}; it continues in the background and ${DO_NOT_POLL.charAt(0).toLowerCase()}${DO_NOT_POLL.slice(1)}`,
522
+ : // The wait ran out before the child settled. Say that, rather
523
+ // than something that reads like a call still worth checking:
524
+ // the previous wording sent the model into task_check and
525
+ // task_resume for a task it had already been told to leave.
526
+ `It did not finish inside the wait, id ${outcome.taskId}; it continues in the background and ${DO_NOT_POLL.charAt(0).toLowerCase()}${DO_NOT_POLL.slice(1)} Answer the User now with what you have, and say the work is still running.`,
523
527
  ].join(" "),
524
528
  isError: false,
525
529
  };