clay-server 3.7.0 → 3.8.0-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.
Files changed (40) hide show
  1. package/lib/builtin-mates.js +14 -14
  2. package/lib/mates.js +2 -6
  3. package/lib/os-users.js +17 -1
  4. package/lib/project-http.js +34 -1
  5. package/lib/project-image.js +87 -1
  6. package/lib/project-mate-interaction.js +7 -7
  7. package/lib/project-sessions.js +1 -1
  8. package/lib/project-user-mention.js +4 -4
  9. package/lib/project.js +6 -4
  10. package/lib/public/css/avatar-imprints.css +46 -0
  11. package/lib/public/css/generated-images.css +242 -0
  12. package/lib/public/css/icon-strip.css +3 -3
  13. package/lib/public/css/profile.css +123 -95
  14. package/lib/public/css/session-actions.css +40 -9
  15. package/lib/public/css/user-settings.css +1 -1
  16. package/lib/public/index.html +3 -3
  17. package/lib/public/modules/app-cursors.js +2 -2
  18. package/lib/public/modules/app-dm.js +1 -8
  19. package/lib/public/modules/app-messages.js +2 -2
  20. package/lib/public/modules/app-projects.js +7 -6
  21. package/lib/public/modules/app-rate-limit.js +0 -1
  22. package/lib/public/modules/app-rendering.js +0 -3
  23. package/lib/public/modules/avatar-imprint.js +134 -0
  24. package/lib/public/modules/avatar.js +25 -19
  25. package/lib/public/modules/debate.js +10 -5
  26. package/lib/public/modules/generated-images.js +211 -2
  27. package/lib/public/modules/mate-sidebar.js +2 -2
  28. package/lib/public/modules/mention.js +26 -16
  29. package/lib/public/modules/profile.js +73 -190
  30. package/lib/public/modules/session-actions.js +5 -3
  31. package/lib/public/modules/sidebar-mates.js +5 -4
  32. package/lib/public/modules/sidebar-sessions.js +1 -1
  33. package/lib/public/style.css +2 -1
  34. package/lib/server-auth.js +2 -2
  35. package/lib/server-dm.js +8 -8
  36. package/lib/server-mates.js +3 -3
  37. package/lib/server-settings.js +2 -2
  38. package/lib/server.js +5 -4
  39. package/lib/users.js +4 -4
  40. package/package.json +1 -1
package/lib/server-dm.js CHANGED
@@ -28,9 +28,9 @@ function attachDm(ctx) {
28
28
  id: otherUser.id,
29
29
  displayName: p.name || otherUser.displayName || otherUser.username,
30
30
  username: otherUser.username,
31
- avatarStyle: p.avatarStyle || "thumbs",
31
+ avatarStyle: p.avatarStyle || "imprint",
32
32
  avatarSeed: p.avatarSeed || otherUser.username,
33
- avatarColor: p.avatarColor || "#7c3aed",
33
+ avatarColor: p.avatarColor || "#5857fc",
34
34
  avatarCustom: p.avatarCustom || "",
35
35
  };
36
36
  }
@@ -69,9 +69,9 @@ function attachDm(ctx) {
69
69
  id: mate.id,
70
70
  displayName: mp.displayName || mate.name || "New Mate",
71
71
  username: mate.id,
72
- avatarStyle: mp.avatarStyle || "bottts",
72
+ avatarStyle: mp.avatarStyle || "imprint",
73
73
  avatarSeed: mp.avatarSeed || mate.id,
74
- avatarColor: mp.avatarColor || "#6c5ce7",
74
+ avatarColor: mp.avatarColor || "#5857fc",
75
75
  avatarCustom: mp.avatarCustom || "",
76
76
  isMate: true,
77
77
  primary: !!mate.primary,
@@ -94,9 +94,9 @@ function attachDm(ctx) {
94
94
  id: targetUser.id,
95
95
  displayName: tp.name || targetUser.displayName || targetUser.username,
96
96
  username: targetUser.username,
97
- avatarStyle: tp.avatarStyle || "thumbs",
97
+ avatarStyle: tp.avatarStyle || "imprint",
98
98
  avatarSeed: tp.avatarSeed || targetUser.username,
99
- avatarColor: tp.avatarColor || "#7c3aed",
99
+ avatarColor: tp.avatarColor || "#5857fc",
100
100
  avatarCustom: tp.avatarCustom || "",
101
101
  } : null,
102
102
  }));
@@ -191,9 +191,9 @@ function attachDm(ctx) {
191
191
  displayName: p.name || u.displayName || u.username,
192
192
  username: u.username,
193
193
  role: u.role,
194
- avatarStyle: p.avatarStyle || "thumbs",
194
+ avatarStyle: p.avatarStyle || "imprint",
195
195
  avatarSeed: p.avatarSeed || u.username,
196
- avatarColor: p.avatarColor || "#7c3aed",
196
+ avatarColor: p.avatarColor || "#5857fc",
197
197
  avatarCustom: p.avatarCustom || "",
198
198
  };
199
199
  });
@@ -152,7 +152,7 @@ function attachMates(ctx) {
152
152
  displayName: bDef2.displayName,
153
153
  bio: bDef2.bio,
154
154
  avatarCustom: bDef2.avatarCustom || "",
155
- avatarStyle: bDef2.avatarStyle || "bottts",
155
+ avatarStyle: bDef2.avatarStyle || "imprint",
156
156
  avatarColor: bDef2.avatarColor || "",
157
157
  });
158
158
  }
@@ -186,7 +186,7 @@ function attachMates(ctx) {
186
186
  displayName: bDef3.displayName,
187
187
  bio: bDef3.bio,
188
188
  avatarCustom: bDef3.avatarCustom || "",
189
- avatarStyle: bDef3.avatarStyle || "bottts",
189
+ avatarStyle: bDef3.avatarStyle || "imprint",
190
190
  avatarColor: bDef3.avatarColor || "",
191
191
  });
192
192
  }
@@ -227,7 +227,7 @@ function attachMates(ctx) {
227
227
  for (var abkR = 0; abkR < missingKeysR.length; abkR++) {
228
228
  var bDefR = builtinDefsR.getBuiltinByKey(missingKeysR[abkR]);
229
229
  if (bDefR) {
230
- availableBuiltinsR.push({ key: bDefR.key, displayName: bDefR.displayName, bio: bDefR.bio, avatarCustom: bDefR.avatarCustom || "", avatarStyle: bDefR.avatarStyle || "bottts", avatarColor: bDefR.avatarColor || "" });
230
+ availableBuiltinsR.push({ key: bDefR.key, displayName: bDefR.displayName, bio: bDefR.bio, avatarCustom: bDefR.avatarCustom || "", avatarStyle: bDefR.avatarStyle || "imprint", avatarColor: bDefR.avatarColor || "" });
231
231
  }
232
232
  }
233
233
  ws.send(JSON.stringify({ type: "mate_created", mate: newMate, projectSlug: readdSlug, availableBuiltins: availableBuiltinsR, dmFavorites: updatedFavsR }));
@@ -21,7 +21,7 @@ function attachSettings(ctx) {
21
21
  res.end('{"error":"unauthorized"}');
22
22
  return true;
23
23
  }
24
- var profile = mu.profile || { name: "", lang: "en-US", avatarColor: "#7c3aed", avatarStyle: "thumbs", avatarSeed: "", avatarCustom: "" };
24
+ var profile = mu.profile || { name: "", lang: "en-US", avatarColor: "#5857fc", avatarStyle: "imprint", avatarSeed: "", avatarCustom: "" };
25
25
  profile.username = mu.username;
26
26
  profile.userId = mu.id;
27
27
  profile.role = mu.role;
@@ -35,7 +35,7 @@ function attachSettings(ctx) {
35
35
  res.end(JSON.stringify(profile));
36
36
  return true;
37
37
  }
38
- var profile = { name: "", lang: "en-US", avatarColor: "#7c3aed", avatarStyle: "thumbs", avatarSeed: "", avatarCustom: "" };
38
+ var profile = { name: "", lang: "en-US", avatarColor: "#5857fc", avatarStyle: "imprint", avatarSeed: "", avatarCustom: "" };
39
39
  try {
40
40
  var raw = fs.readFileSync(profilePath, "utf8");
41
41
  var saved = JSON.parse(raw);
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.dicebear.com https://api.open-meteo.com https://ipapi.co; font-src 'self' data: https://fonts.gstatic.com https://cdn.jsdelivr.net;",
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 || "thumbs",
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 || "thumbs",
1455
+ avatarStyle: p.avatarStyle || "imprint",
1455
1456
  avatarSeed: p.avatarSeed || u.username,
1456
- avatarColor: p.avatarColor || "#7c3aed",
1457
+ avatarColor: p.avatarColor || "#5857fc",
1457
1458
  avatarCustom: p.avatarCustom || "",
1458
1459
  };
1459
1460
  });
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: "#7c3aed",
85
- avatarStyle: "thumbs",
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: "#7c3aed",
319
- avatarStyle: "thumbs",
318
+ avatarColor: "#5857fc",
319
+ avatarStyle: "imprint",
320
320
  avatarSeed: crypto.randomBytes(4).toString("hex"),
321
321
  },
322
322
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clay-server",
3
- "version": "3.7.0",
3
+ "version": "3.8.0-beta.2",
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",