clay-server 3.3.1 → 3.3.2-beta.1

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.
@@ -383,7 +383,7 @@ function attachSessionPair(ctx) {
383
383
  var group = store.groupForMember(session.localId);
384
384
  var pairPrompt = "";
385
385
  if (group && group.pair && group.pair.driverId === session.localId) {
386
- pairPrompt = "You are the Driver in a two-agent pair. The tools send_to_partner and read_partner are provided directly to you. Use send_to_partner to delegate concrete bounded work to the Worker. If a non-waiting delegation finishes later, Clay pushes the result back and resumes you automatically; use read_partner only when you need an interim status check. Integrate and verify the final outcome. Do not search the project for implementations of these tools, and do not delegate work that must be performed sequentially in this same session.";
386
+ pairPrompt = "You are the Driver in a two-agent pair. The tools send_to_partner and read_partner are provided directly to you. Use send_to_partner to delegate concrete bounded work to the Worker. A completed Worker turn leaves the Worker session available for more work. If review or user feedback requires corrections to the Worker's implementation, delegate a follow-up turn to that Worker instead of editing the Worker-owned files yourself. If send_to_partner reports that the Worker is no longer available, create a replacement with spawn_sessions and delegate the remaining implementation rather than taking it over. If a non-waiting delegation finishes later, Clay pushes the result back and resumes you automatically; use read_partner only when you need an interim status check. Integrate and verify the final outcome. Do not search the project for implementations of these tools, and do not delegate work that must be performed sequentially in this same session.";
387
387
  }
388
388
  return [pairPrompt, workerProposal.getSystemPrompt(session)].filter(Boolean).join("\n\n");
389
389
  }
@@ -219,11 +219,11 @@ function attachWorkerProposal(ctx) {
219
219
  });
220
220
  var followup;
221
221
  if (result.status === "complete") {
222
- followup = "[Worker execution completed]\nReview the Worker's result, verify the implementation, and integrate any remaining changes.\n\n" + (result.response || "The Worker completed without a text summary.");
222
+ followup = "[Worker execution completed]\nReview and verify the Worker's result. The Worker session remains available: if the implementation needs corrections or additional edits, send a follow-up with send_to_partner instead of taking over the Worker-owned files yourself. If that Worker is no longer available, create a replacement with spawn_sessions for the remaining implementation.\n\n" + (result.response || "The Worker completed without a text summary.");
223
223
  } else if (result.status === "running") {
224
224
  followup = "[Worker execution is still running]\nUse read_partner to inspect progress before completing the task.";
225
225
  } else {
226
- followup = "[Worker execution failed]\nInspect the failure and decide whether to fix it here or delegate a narrower follow-up.\n\n" + (result.error || result.response || "Unknown Worker error.");
226
+ followup = "[Worker execution failed]\nInspect the failure and delegate a narrower follow-up to the Worker when implementation work remains.\n\n" + (result.error || result.response || "Unknown Worker error.");
227
227
  }
228
228
  await resumeDriver(session, followup);
229
229
  }
@@ -6,7 +6,7 @@ function getToolDefs(handlers) {
6
6
  return [
7
7
  {
8
8
  name: "send_to_partner",
9
- description: "Delegate one concrete task to the other session in this split. The partner works visibly in its own pane. Detached completions are pushed back automatically. A delegated turn cannot delegate back, so keep orchestration one hop deep.",
9
+ description: "Delegate one concrete task to the other session in this split. The partner works visibly in its own pane. A completed turn does not end the Worker session: reuse the same Worker for follow-up implementation and corrections instead of taking over its work. Detached completions are pushed back automatically. A delegated turn cannot delegate back, so keep orchestration one hop deep.",
10
10
  inputSchema: buildShape({
11
11
  message: { type: "string", description: "The complete task or question for the partner." },
12
12
  wait: { type: "boolean", description: "Wait for the partner's turn to finish. Defaults to true." },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clay-server",
3
- "version": "3.3.1",
3
+ "version": "3.3.2-beta.1",
4
4
  "description": "Self-hosted team workspace for Claude Code and Codex. Multi-user, browser-based, with persistent AI mates.",
5
5
  "bin": {
6
6
  "clay-server": "./bin/cli.js",