clay-server 4.3.1-beta.1 → 4.3.1-beta.2
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.
|
@@ -162,6 +162,15 @@ function attachPairLifecycle(ctx) {
|
|
|
162
162
|
return null;
|
|
163
163
|
}
|
|
164
164
|
function partnerStatus(caller, args) {
|
|
165
|
+
var group = caller && store.groupForMember(caller.localId);
|
|
166
|
+
var roles = splitRoles.normalizePair(group && group.pair, group && group.members);
|
|
167
|
+
if ((!args || args.workerId == null) && roles.ok && roles.kind !== "adhoc" && roles.workerIds.length > 1) {
|
|
168
|
+
var workers = roles.workerIds.map(function (workerId) {
|
|
169
|
+
return partnerStatus(caller, { workerId: workerId });
|
|
170
|
+
});
|
|
171
|
+
return { driverId: caller.localId, workerIds: roles.workerIds.slice(), workers: workers,
|
|
172
|
+
instruction: "Pass the selected workerId to targeted partner tools. Call partner_status without workerId to rediscover current Workers." };
|
|
173
|
+
}
|
|
165
174
|
var resolved = resolveDriverPair(caller, args, { readOnly: true });
|
|
166
175
|
var worker = resolved.worker;
|
|
167
176
|
var blocked = turnControl.blockedReason(caller) || replaceBlockedReason(worker);
|
|
@@ -13,6 +13,11 @@ function attachSessionPairPrompt(ctx) {
|
|
|
13
13
|
var result = "";
|
|
14
14
|
if (group && group.pair && group.pair.driverId === session.localId) {
|
|
15
15
|
result = prompts.DRIVER_CORE + " " + ctx.workerProposal().getSystemPrompt(session);
|
|
16
|
+
if (roles && roles.driver === session) {
|
|
17
|
+
result += " Current configured Worker handles: " + roles.workers.map(function (worker) {
|
|
18
|
+
return "workerId=" + worker.localId + " (" + (worker.title || "Worker") + ")";
|
|
19
|
+
}).join(", ") + ". Call partner_status without workerId to rediscover current Workers; pass workerId for targeted operations.";
|
|
20
|
+
}
|
|
16
21
|
if (driverOrchestration.isHighTierDriverSession(session, ctx.sm)) result += " " + prompts.DRIVER_DELEGATION;
|
|
17
22
|
} else if (!group && !ctx.isMate && driverEligibility.isEligibleDriverSession(session, ctx.sm) &&
|
|
18
23
|
driverOrchestration.isHighTierDriverSession(session, ctx.sm)) {
|
|
@@ -36,6 +36,8 @@ function attachProposalRunner(ctx) {
|
|
|
36
36
|
} else {
|
|
37
37
|
followup = "[Split Worker execution failed]\nThe existing Split Worker may still be reusable. Inspect partner_status and send a narrower follow-up with send_to_partner when the Worker and pair still exist; do not replace it merely because its task or transport failed. Retry replacement only when the replacement transaction reports that no new Worker was created and the failure is explicitly safe to retry.\n\n" + (result.error || result.response || "Unknown Split Worker error.");
|
|
38
38
|
}
|
|
39
|
+
followup += "\n\nWorker handle for this execution: workerId=" + proposal.workerId +
|
|
40
|
+
". Use this workerId for follow-up operations while it remains configured. Call partner_status without workerId to discover current Worker handles after replacement or reconnect.";
|
|
39
41
|
await resumeDriver(session, followup);
|
|
40
42
|
}
|
|
41
43
|
|
|
@@ -463,7 +463,7 @@ function attachWorkerProposal(ctx) {
|
|
|
463
463
|
|
|
464
464
|
function getSystemPrompt(session) {
|
|
465
465
|
if (creationProposal.canMountProposal(session) && !isEligible(session)) {
|
|
466
|
-
return "This Driver may configure one additional Split Worker through propose_worker. With two Workers, pass workerId to every targeted partner, queue, interrupt, replacement, close, permission, and status operation. Give each Worker independent file ownership and bounded work. Do not assign simultaneous overlapping file edits unless the work is explicitly separated, such as by distinct paths or worktrees.";
|
|
466
|
+
return "This Driver may configure one additional Split Worker through propose_worker. With two Workers, pass workerId to every targeted partner, queue, interrupt, replacement, close, permission, and targeted status operation. Call partner_status without workerId to discover current Worker handles. Give each Worker independent file ownership and bounded work. Do not assign simultaneous overlapping file edits unless the work is explicitly separated, such as by distinct paths or worktrees.";
|
|
467
467
|
}
|
|
468
468
|
if (!isEligible(session) || !driverOrchestration.isHighTierDriverSession(session, sm)) return "";
|
|
469
469
|
return "For implementation-heavy work, use propose_worker before substantial execution. Work is implementation-heavy when it spans multiple modules, crosses client/server/data boundaries, requires a migration, or contains independent investigation and execution. Do not skip delegation merely because you can implement it yourself; preserve the Driver for decomposition, runtime selection, judgment, review, and integration. The user's explicit request to work directly takes precedence, and work that must remain sequential in this session stays here. Recommend an exact available vendor, model, and effort, and give a concise recommendationRationale explaining why all three fit the task. Clay always records and shows the runtime configuration card. In full-access mode Clay may auto-accept that exact validated recommendation; otherwise it waits for the user's explicit choice. After posting, end the turn. If accepted, Clay creates the exact Driver/Split Worker pair and delegates the proposed task once. If declined, continue in this Driver session. Do not call send_to_partner while unpaired.";
|
package/lib/public/css/pane.css
CHANGED
|
@@ -73,13 +73,11 @@ body.pane-mode #input-area {
|
|
|
73
73
|
display: flex;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
/*
|
|
77
|
-
|
|
78
|
-
equal-height execution surfaces on the right. Legacy/ad-hoc two-pane
|
|
79
|
-
splits keep the ordinary equal columns below. */
|
|
76
|
+
/* Keep the same equal columns when adding a second Worker; only the
|
|
77
|
+
Worker column divides into two equal-height execution surfaces. */
|
|
80
78
|
#split-host:has(.split-pane-role-worker:nth-of-type(3)) {
|
|
81
79
|
display: grid;
|
|
82
|
-
grid-template-columns:
|
|
80
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
83
81
|
grid-template-rows: repeat(2, minmax(0, 1fr));
|
|
84
82
|
gap: 1px;
|
|
85
83
|
background: var(--border-subtle);
|
|
@@ -63,8 +63,8 @@ function getToolDefs(handlers, options) {
|
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
name: "partner_status",
|
|
66
|
-
description: "Bounded capacity and continuity report for your Split Worker, for deciding reuse against replacement: context tokens used and the ratio of its window, current task and activity, vendor/model/effort, history size and idle time, whether it is safe to replace right now, and your own recorded results for earlier Worker generations. Returns no transcript. Prefer this over reading turns when you only need to decide.",
|
|
67
|
-
inputSchema: buildShape({ workerId: { type: "number", description: "Optional exact Worker session id
|
|
66
|
+
description: "Bounded capacity and continuity report for your Split Worker, for deciding reuse against replacement: context tokens used and the ratio of its window, current task and activity, vendor/model/effort, history size and idle time, whether it is safe to replace right now, and your own recorded results for earlier Worker generations. Returns no transcript. Prefer this over reading turns when you only need to decide. Omit workerId to discover all configured Workers and their current numeric handles; pass workerId for one Worker.",
|
|
67
|
+
inputSchema: buildShape({ workerId: { type: "number", description: "Optional exact Worker session id. Omit to list all configured Workers and their current handles." } }),
|
|
68
68
|
handler: function (args) { return handlers.status(args || {}); },
|
|
69
69
|
},
|
|
70
70
|
{
|
package/package.json
CHANGED