clay-server 3.8.0-beta.1 → 3.8.0-beta.3
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/lib/builtin-mates.js +14 -14
- package/lib/mates.js +2 -6
- package/lib/project-mate-interaction.js +7 -7
- package/lib/project-session-pair.js +84 -4
- package/lib/project-sessions.js +1 -1
- package/lib/project-user-mention.js +4 -4
- package/lib/project-worker-proposal.js +1 -1
- package/lib/project.js +4 -3
- package/lib/public/css/avatar-imprints.css +46 -0
- package/lib/public/css/icon-strip.css +3 -3
- package/lib/public/css/pane.css +1 -7
- package/lib/public/css/profile.css +123 -95
- package/lib/public/css/session-actions.css +40 -9
- package/lib/public/css/user-settings.css +1 -1
- package/lib/public/index.html +2 -2
- package/lib/public/modules/app-cursors.js +2 -2
- package/lib/public/modules/app-dm.js +1 -8
- package/lib/public/modules/app-messages.js +2 -2
- package/lib/public/modules/app-projects.js +7 -6
- package/lib/public/modules/app-rate-limit.js +0 -1
- package/lib/public/modules/app-rendering.js +0 -3
- package/lib/public/modules/avatar-imprint.js +134 -0
- package/lib/public/modules/avatar.js +25 -19
- package/lib/public/modules/debate.js +10 -5
- package/lib/public/modules/mate-sidebar.js +2 -2
- package/lib/public/modules/mention.js +26 -16
- package/lib/public/modules/profile.js +73 -190
- package/lib/public/modules/session-actions.js +5 -3
- package/lib/public/modules/sidebar-mates.js +5 -4
- package/lib/public/modules/sidebar-sessions.js +1 -1
- package/lib/public/modules/split-pair-ui.js +2 -8
- package/lib/public/style.css +1 -0
- package/lib/server-auth.js +2 -2
- package/lib/server-dm.js +8 -8
- package/lib/server-mates.js +3 -3
- package/lib/server-settings.js +2 -2
- package/lib/server.js +5 -4
- package/lib/session-pair-mcp-server.js +16 -1
- package/lib/users.js +4 -4
- package/package.json +1 -1
package/lib/server.js
CHANGED
|
@@ -355,7 +355,7 @@ function createServer(opts) {
|
|
|
355
355
|
// origin. External sites still cannot frame Clay; frame-ancestors below
|
|
356
356
|
// is the modern equivalent for browsers that honor CSP.
|
|
357
357
|
"X-Frame-Options": "SAMEORIGIN",
|
|
358
|
-
"Content-Security-Policy": "default-src 'self'; frame-ancestors 'self'; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://esm.sh; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; img-src * data: blob:; connect-src 'self' ws: wss: https://cdn.jsdelivr.net https://esm.sh https://api.
|
|
358
|
+
"Content-Security-Policy": "default-src 'self'; frame-ancestors 'self'; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://esm.sh; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; img-src * data: blob:; connect-src 'self' ws: wss: https://cdn.jsdelivr.net https://esm.sh https://api.open-meteo.com https://ipapi.co; font-src 'self' data: https://fonts.gstatic.com https://cdn.jsdelivr.net;",
|
|
359
359
|
};
|
|
360
360
|
if (tlsOptions) {
|
|
361
361
|
securityHeaders["Strict-Transport-Security"] = "max-age=31536000; includeSubDomains";
|
|
@@ -1418,8 +1418,9 @@ function createServer(opts) {
|
|
|
1418
1418
|
id: u.id,
|
|
1419
1419
|
displayName: p.name || u.displayName || u.username,
|
|
1420
1420
|
username: u.username,
|
|
1421
|
-
avatarStyle: p.avatarStyle || "
|
|
1421
|
+
avatarStyle: p.avatarStyle || "imprint",
|
|
1422
1422
|
avatarSeed: p.avatarSeed || u.username,
|
|
1423
|
+
avatarColor: p.avatarColor || "#5857fc",
|
|
1423
1424
|
avatarCustom: p.avatarCustom || "",
|
|
1424
1425
|
});
|
|
1425
1426
|
});
|
|
@@ -1451,9 +1452,9 @@ function createServer(opts) {
|
|
|
1451
1452
|
displayName: p.name || u.displayName || u.username,
|
|
1452
1453
|
username: u.username,
|
|
1453
1454
|
role: u.role,
|
|
1454
|
-
avatarStyle: p.avatarStyle || "
|
|
1455
|
+
avatarStyle: p.avatarStyle || "imprint",
|
|
1455
1456
|
avatarSeed: p.avatarSeed || u.username,
|
|
1456
|
-
avatarColor: p.avatarColor || "#
|
|
1457
|
+
avatarColor: p.avatarColor || "#5857fc",
|
|
1457
1458
|
avatarCustom: p.avatarCustom || "",
|
|
1458
1459
|
};
|
|
1459
1460
|
});
|
|
@@ -6,11 +6,14 @@ function getToolDefs(handlers) {
|
|
|
6
6
|
return [
|
|
7
7
|
{
|
|
8
8
|
name: "send_to_partner",
|
|
9
|
-
description: "Delegate one concrete task to the
|
|
9
|
+
description: "Delegate one concrete task to the Worker. If this session has no pair yet, Clay creates a real Worker session and opens it visibly in the right pane before starting the task. 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." },
|
|
13
13
|
timeoutSeconds: { type: "number", description: "Maximum wait in seconds, from 1 to 900. Defaults to 300." },
|
|
14
|
+
workerVendor: { type: "string", description: "Optional Worker vendor to use only when creating a new pair. Defaults to a suitable installed vendor." },
|
|
15
|
+
workerModel: { type: "string", description: "Optional Worker model to use only when creating a new pair." },
|
|
16
|
+
workerEffort: { type: "string", description: "Optional Worker reasoning effort to use only when creating a new pair." },
|
|
14
17
|
}, ["message"]),
|
|
15
18
|
handler: function (args) { return handlers.send(args || {}); },
|
|
16
19
|
},
|
|
@@ -22,6 +25,18 @@ function getToolDefs(handlers) {
|
|
|
22
25
|
}),
|
|
23
26
|
handler: function (args) { return handlers.read(args || {}); },
|
|
24
27
|
},
|
|
28
|
+
{
|
|
29
|
+
name: "interrupt_partner",
|
|
30
|
+
description: "Interrupt the Worker's current task. Use this when the task is going in the wrong direction, needs to be reprioritized, or must stop before the next instruction. The Worker returns any partial result to you for review.",
|
|
31
|
+
inputSchema: buildShape({}),
|
|
32
|
+
handler: function (args) { return handlers.interrupt(args || {}); },
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "close_partner",
|
|
36
|
+
description: "Close the visible Worker pane and dissolve the Driver/Worker pair while preserving both session histories. If the Worker is still running, Clay interrupts it before closing the pair.",
|
|
37
|
+
inputSchema: buildShape({}),
|
|
38
|
+
handler: function (args) { return handlers.close(args || {}); },
|
|
39
|
+
},
|
|
25
40
|
];
|
|
26
41
|
}
|
|
27
42
|
|
package/lib/users.js
CHANGED
|
@@ -81,8 +81,8 @@ function createUser(opts) {
|
|
|
81
81
|
profile: opts.profile || {
|
|
82
82
|
name: opts.displayName || opts.username,
|
|
83
83
|
lang: "en-US",
|
|
84
|
-
avatarColor: "#
|
|
85
|
-
avatarStyle: "
|
|
84
|
+
avatarColor: "#5857fc",
|
|
85
|
+
avatarStyle: "imprint",
|
|
86
86
|
avatarSeed: crypto.randomBytes(4).toString("hex"),
|
|
87
87
|
},
|
|
88
88
|
};
|
|
@@ -315,8 +315,8 @@ function createUserWithoutPin(opts) {
|
|
|
315
315
|
profile: opts.profile || {
|
|
316
316
|
name: opts.displayName || opts.username,
|
|
317
317
|
lang: "en-US",
|
|
318
|
-
avatarColor: "#
|
|
319
|
-
avatarStyle: "
|
|
318
|
+
avatarColor: "#5857fc",
|
|
319
|
+
avatarStyle: "imprint",
|
|
320
320
|
avatarSeed: crypto.randomBytes(4).toString("hex"),
|
|
321
321
|
},
|
|
322
322
|
};
|
package/package.json
CHANGED