clay-server 2.27.0-beta.8 → 2.27.0

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 (72) hide show
  1. package/README.md +10 -0
  2. package/lib/daemon-projects.js +164 -0
  3. package/lib/daemon.js +13 -126
  4. package/lib/mates-identity.js +132 -0
  5. package/lib/mates-knowledge.js +113 -0
  6. package/lib/mates-prompts.js +398 -0
  7. package/lib/mates.js +40 -599
  8. package/lib/project-connection.js +2 -0
  9. package/lib/project-debate.js +19 -12
  10. package/lib/project-http.js +4 -2
  11. package/lib/project-loop.js +110 -48
  12. package/lib/project-mate-interaction.js +4 -0
  13. package/lib/project-notifications.js +210 -0
  14. package/lib/project-sessions.js +5 -2
  15. package/lib/project-user-message.js +2 -1
  16. package/lib/project.js +26 -2
  17. package/lib/public/app.js +1193 -8521
  18. package/lib/public/css/command-palette.css +14 -0
  19. package/lib/public/css/loop.css +301 -0
  20. package/lib/public/css/notifications-center.css +190 -0
  21. package/lib/public/css/rewind.css +6 -0
  22. package/lib/public/index.html +89 -35
  23. package/lib/public/modules/app-connection.js +160 -0
  24. package/lib/public/modules/app-cursors.js +473 -0
  25. package/lib/public/modules/app-debate-ui.js +389 -0
  26. package/lib/public/modules/app-dm.js +627 -0
  27. package/lib/public/modules/app-favicon.js +212 -0
  28. package/lib/public/modules/app-header.js +229 -0
  29. package/lib/public/modules/app-home-hub.js +600 -0
  30. package/lib/public/modules/app-loop-ui.js +589 -0
  31. package/lib/public/modules/app-loop-wizard.js +439 -0
  32. package/lib/public/modules/app-messages.js +1560 -0
  33. package/lib/public/modules/app-misc.js +299 -0
  34. package/lib/public/modules/app-notifications.js +372 -0
  35. package/lib/public/modules/app-panels.js +888 -0
  36. package/lib/public/modules/app-projects.js +798 -0
  37. package/lib/public/modules/app-rate-limit.js +451 -0
  38. package/lib/public/modules/app-rendering.js +597 -0
  39. package/lib/public/modules/app-skills-install.js +234 -0
  40. package/lib/public/modules/command-palette.js +27 -4
  41. package/lib/public/modules/input.js +31 -20
  42. package/lib/public/modules/scheduler-config.js +1532 -0
  43. package/lib/public/modules/scheduler-history.js +79 -0
  44. package/lib/public/modules/scheduler.js +33 -1554
  45. package/lib/public/modules/session-search.js +13 -1
  46. package/lib/public/modules/sidebar-mates.js +812 -0
  47. package/lib/public/modules/sidebar-mobile.js +1269 -0
  48. package/lib/public/modules/sidebar-projects.js +1449 -0
  49. package/lib/public/modules/sidebar-sessions.js +986 -0
  50. package/lib/public/modules/sidebar.js +232 -4591
  51. package/lib/public/modules/store.js +27 -0
  52. package/lib/public/modules/ws-ref.js +7 -0
  53. package/lib/public/style.css +1 -0
  54. package/lib/sdk-bridge.js +96 -717
  55. package/lib/sdk-message-processor.js +587 -0
  56. package/lib/sdk-message-queue.js +42 -0
  57. package/lib/sdk-skill-discovery.js +131 -0
  58. package/lib/server-admin.js +712 -0
  59. package/lib/server-auth.js +737 -0
  60. package/lib/server-dm.js +221 -0
  61. package/lib/server-mates.js +281 -0
  62. package/lib/server-palette.js +110 -0
  63. package/lib/server-settings.js +479 -0
  64. package/lib/server-skills.js +280 -0
  65. package/lib/server.js +246 -2755
  66. package/lib/sessions.js +11 -4
  67. package/lib/users-auth.js +146 -0
  68. package/lib/users-permissions.js +118 -0
  69. package/lib/users-preferences.js +210 -0
  70. package/lib/users.js +48 -398
  71. package/lib/ws-schema.js +498 -0
  72. package/package.json +1 -1
@@ -201,12 +201,26 @@
201
201
  gap: 2px;
202
202
  }
203
203
 
204
+ .cmd-palette-item-title-row {
205
+ display: flex;
206
+ align-items: center;
207
+ gap: 8px;
208
+ }
209
+
204
210
  .cmd-palette-item-title {
205
211
  font-size: 13px;
206
212
  color: var(--text);
207
213
  white-space: nowrap;
208
214
  overflow: hidden;
209
215
  text-overflow: ellipsis;
216
+ min-width: 0;
217
+ }
218
+
219
+ .cmd-palette-item-date {
220
+ font-size: 11px;
221
+ color: var(--text-dimmer);
222
+ white-space: nowrap;
223
+ flex-shrink: 0;
210
224
  }
211
225
 
212
226
  .cmd-palette-item-meta {
@@ -1,4 +1,7 @@
1
1
  /* Ralph Loop */
2
+ #ralph-input-task-section.hidden,
3
+ #ralph-input-prompt-section.hidden,
4
+ #ralph-input-judge-section.hidden { display: none; }
2
5
  .loop-banner {
3
6
  display: flex;
4
7
  align-items: center;
@@ -826,6 +829,58 @@
826
829
  font-size: 12px;
827
830
  }
828
831
 
832
+ /* Footer (combo run button) */
833
+ .ralph-preview-footer {
834
+ display: flex;
835
+ align-items: center;
836
+ justify-content: flex-end;
837
+ padding: 12px 20px;
838
+ border-top: 1px solid var(--border, #333);
839
+ flex-shrink: 0;
840
+ }
841
+ .ralph-run-combo {
842
+ display: inline-flex;
843
+ align-items: center;
844
+ gap: 0;
845
+ background: var(--accent, #6c5ce7);
846
+ color: #fff;
847
+ border: none;
848
+ border-radius: 8px;
849
+ padding: 0;
850
+ cursor: pointer;
851
+ font-family: inherit;
852
+ font-size: 13px;
853
+ font-weight: 600;
854
+ overflow: hidden;
855
+ transition: opacity 0.15s;
856
+ }
857
+ .ralph-run-combo:hover { opacity: 0.9; }
858
+ .ralph-run-combo:disabled { opacity: 0.4; cursor: not-allowed; }
859
+ .ralph-run-combo-label {
860
+ padding: 7px 12px;
861
+ white-space: nowrap;
862
+ }
863
+ .ralph-run-combo-sep {
864
+ width: 1px;
865
+ height: 20px;
866
+ background: rgba(255,255,255,0.3);
867
+ flex-shrink: 0;
868
+ }
869
+ .ralph-run-combo-input {
870
+ width: 52px;
871
+ padding: 4px 2px 4px 8px;
872
+ background: rgba(255,255,255,0.15);
873
+ border: 1px solid rgba(255,255,255,0.3);
874
+ border-radius: 4px;
875
+ color: #fff;
876
+ font-family: inherit;
877
+ font-size: 13px;
878
+ font-weight: 600;
879
+ text-align: center;
880
+ outline: none;
881
+ margin-right: 8px;
882
+ }
883
+
829
884
  /* Ralph Sticky (title-bar island, mirrors #todo-sticky pattern) */
830
885
  #ralph-sticky {
831
886
  position: relative;
@@ -920,3 +975,249 @@
920
975
  }
921
976
  #ralph-sticky .ralph-sticky-stop { color: var(--text-muted); }
922
977
  #ralph-sticky .ralph-sticky-stop:hover { color: var(--accent); background: rgba(var(--overlay-rgb), 0.06); }
978
+
979
+ /* Sticky bar iteration input */
980
+ .ralph-sticky-iter {
981
+ width: 48px;
982
+ padding: 2px 4px;
983
+ font-size: 11px;
984
+ text-align: center;
985
+ margin: 0 4px;
986
+ }
987
+
988
+ /* ========================================================
989
+ Step 2: Loop mode cards
990
+ ======================================================== */
991
+ .ralph-mode-choice {
992
+ display: flex;
993
+ gap: 12px;
994
+ margin-top: 12px;
995
+ }
996
+ .ralph-mode-card {
997
+ flex: 1;
998
+ display: flex;
999
+ flex-direction: column;
1000
+ align-items: center;
1001
+ gap: 8px;
1002
+ padding: 18px 12px;
1003
+ border: 1.5px solid var(--border);
1004
+ border-radius: 10px;
1005
+ background: none;
1006
+ color: var(--text-muted);
1007
+ cursor: pointer;
1008
+ font-family: inherit;
1009
+ transition: border-color 0.15s, color 0.15s, background 0.15s;
1010
+ }
1011
+ .ralph-mode-card:hover {
1012
+ border-color: var(--text-secondary);
1013
+ color: var(--text);
1014
+ }
1015
+ .ralph-mode-card.active {
1016
+ border-color: var(--accent);
1017
+ color: var(--accent);
1018
+ background: color-mix(in srgb, var(--accent, #6c5ce7) 6%, transparent);
1019
+ }
1020
+ .ralph-mode-card-icon {
1021
+ display: flex;
1022
+ align-items: center;
1023
+ justify-content: center;
1024
+ }
1025
+ .ralph-mode-card-icon .lucide {
1026
+ width: 24px;
1027
+ height: 24px;
1028
+ }
1029
+ .ralph-mode-card-title {
1030
+ font-weight: 600;
1031
+ font-size: 13px;
1032
+ }
1033
+ .ralph-mode-card-sub {
1034
+ font-size: 11px;
1035
+ opacity: 0.6;
1036
+ font-weight: 400;
1037
+ }
1038
+
1039
+ /* Mode preview area (above cards) */
1040
+ .ralph-mode-preview {
1041
+ background: var(--input-bg);
1042
+ border: 1px solid var(--border);
1043
+ border-radius: 8px;
1044
+ padding: 14px 16px 10px;
1045
+ margin-bottom: 12px;
1046
+ }
1047
+ .ralph-mode-preview .ralph-intro-diagram {
1048
+ padding: 10px 12px 4px;
1049
+ }
1050
+ .ralph-mode-preview-text {
1051
+ margin: 8px 0 0;
1052
+ font-size: 12px;
1053
+ line-height: 1.5;
1054
+ color: var(--text-secondary);
1055
+ }
1056
+
1057
+ /* ========================================================
1058
+ Step 3: Authorship rows
1059
+ ======================================================== */
1060
+ .ralph-authorship-rows {
1061
+ display: flex;
1062
+ flex-direction: column;
1063
+ gap: 10px;
1064
+ margin-top: 14px;
1065
+ }
1066
+ .ralph-authorship-row {
1067
+ display: flex;
1068
+ align-items: center;
1069
+ justify-content: space-between;
1070
+ padding: 10px 14px;
1071
+ border: 1px solid var(--border);
1072
+ border-radius: 8px;
1073
+ background: var(--input-bg);
1074
+ }
1075
+ .ralph-authorship-info {
1076
+ display: flex;
1077
+ flex-direction: column;
1078
+ gap: 2px;
1079
+ }
1080
+ .ralph-authorship-label {
1081
+ font-weight: 600;
1082
+ font-size: 13px;
1083
+ color: var(--text);
1084
+ font-family: 'Roboto Mono', var(--font-mono, monospace);
1085
+ }
1086
+ .ralph-authorship-desc {
1087
+ font-size: 11px;
1088
+ color: var(--text-muted);
1089
+ line-height: 1.3;
1090
+ }
1091
+ .ralph-authorship-toggle {
1092
+ display: flex;
1093
+ gap: 0;
1094
+ border: 1px solid var(--border);
1095
+ border-radius: 6px;
1096
+ overflow: hidden;
1097
+ }
1098
+ .ralph-authorship-toggle .config-segment-btn {
1099
+ padding: 5px 14px;
1100
+ font-size: 12px;
1101
+ font-weight: 500;
1102
+ border: none;
1103
+ background: none;
1104
+ color: var(--text-muted);
1105
+ cursor: pointer;
1106
+ font-family: inherit;
1107
+ transition: background 0.15s, color 0.15s;
1108
+ }
1109
+ .ralph-authorship-toggle .config-segment-btn:hover {
1110
+ color: var(--text);
1111
+ }
1112
+ .ralph-authorship-toggle .config-segment-btn.active {
1113
+ background: var(--accent);
1114
+ color: #fff;
1115
+ }
1116
+
1117
+ /* ========================================================
1118
+ Execution modal (one-time Ready popup)
1119
+ ======================================================== */
1120
+ #ralph-exec-modal {
1121
+ position: fixed;
1122
+ inset: 0;
1123
+ z-index: 310;
1124
+ display: flex;
1125
+ align-items: center;
1126
+ justify-content: center;
1127
+ }
1128
+ #ralph-exec-modal.hidden { display: none; }
1129
+
1130
+ .ralph-exec-backdrop {
1131
+ position: absolute;
1132
+ inset: 0;
1133
+ background: rgba(var(--shadow-rgb, 0,0,0), 0.5);
1134
+ }
1135
+ .ralph-exec-dialog {
1136
+ position: relative;
1137
+ width: 380px;
1138
+ max-width: 90vw;
1139
+ background: var(--bg-alt, #0d0d1a);
1140
+ border: 1px solid var(--border);
1141
+ border-radius: 12px;
1142
+ box-shadow: 0 8px 32px rgba(var(--shadow-rgb, 0,0,0), 0.5);
1143
+ overflow: hidden;
1144
+ }
1145
+ .ralph-exec-header {
1146
+ display: flex;
1147
+ align-items: center;
1148
+ justify-content: space-between;
1149
+ padding: 14px 16px;
1150
+ border-bottom: 1px solid var(--border);
1151
+ }
1152
+ .ralph-exec-title {
1153
+ font-weight: 600;
1154
+ font-size: 15px;
1155
+ color: var(--text);
1156
+ }
1157
+ .ralph-exec-close-btn {
1158
+ background: none;
1159
+ border: none;
1160
+ color: var(--text-secondary);
1161
+ font-size: 20px;
1162
+ cursor: pointer;
1163
+ padding: 0 4px;
1164
+ line-height: 1;
1165
+ }
1166
+ .ralph-exec-close-btn:hover { color: var(--text); }
1167
+ .ralph-exec-body { padding: 16px; }
1168
+ .ralph-exec-files {
1169
+ display: flex;
1170
+ flex-direction: column;
1171
+ gap: 8px;
1172
+ margin-bottom: 16px;
1173
+ }
1174
+ .ralph-exec-file-row {
1175
+ display: flex;
1176
+ align-items: center;
1177
+ gap: 8px;
1178
+ font-size: 13px;
1179
+ color: var(--text);
1180
+ font-family: 'Roboto Mono', var(--font-mono, monospace);
1181
+ }
1182
+ .ralph-exec-check {
1183
+ width: 18px;
1184
+ height: 18px;
1185
+ display: flex;
1186
+ align-items: center;
1187
+ justify-content: center;
1188
+ }
1189
+ .ralph-exec-check .lucide { width: 14px; height: 14px; }
1190
+ .ralph-exec-check.ready { color: var(--success, #22c55e); }
1191
+ .ralph-exec-check.pending { color: var(--text-muted); }
1192
+ .ralph-exec-preview-btn {
1193
+ margin-left: auto;
1194
+ padding: 3px 10px;
1195
+ border: 1px solid var(--border);
1196
+ border-radius: 4px;
1197
+ background: none;
1198
+ color: var(--text-secondary);
1199
+ font-size: 11px;
1200
+ font-family: inherit;
1201
+ cursor: pointer;
1202
+ transition: border-color 0.15s, color 0.15s;
1203
+ }
1204
+ .ralph-exec-preview-btn:hover {
1205
+ border-color: var(--text-secondary);
1206
+ color: var(--text);
1207
+ }
1208
+ .ralph-exec-iter-row {
1209
+ display: flex;
1210
+ align-items: center;
1211
+ justify-content: space-between;
1212
+ padding-top: 14px;
1213
+ border-top: 1px solid var(--border);
1214
+ font-size: 13px;
1215
+ color: var(--text-secondary);
1216
+ }
1217
+ .ralph-exec-iter-label { font-weight: 500; }
1218
+ .ralph-exec-footer {
1219
+ display: flex;
1220
+ justify-content: space-between;
1221
+ padding: 12px 16px;
1222
+ border-top: 1px solid var(--border);
1223
+ }
@@ -0,0 +1,190 @@
1
+ /* Notification Center - Banners + Dropdown */
2
+
3
+ /* ========================================================
4
+ Bell button (topbar) - inherits .top-bar-actions button styles
5
+ ======================================================== */
6
+ #notif-center-btn {
7
+ position: relative;
8
+ }
9
+
10
+ .notif-badge {
11
+ position: absolute;
12
+ top: -3px;
13
+ right: -3px;
14
+ background: var(--error, #e53935);
15
+ color: #fff;
16
+ font-size: 9px;
17
+ font-weight: 700;
18
+ min-width: 15px;
19
+ height: 15px;
20
+ line-height: 15px;
21
+ border-radius: 8px;
22
+ text-align: center;
23
+ padding: 0 3px;
24
+ pointer-events: none;
25
+ font-family: inherit;
26
+ }
27
+ .notif-badge.hidden { display: none; }
28
+
29
+ /* ========================================================
30
+ Banner container (fixed top-right, stacks down)
31
+ ======================================================== */
32
+ .notif-banner-container {
33
+ position: fixed;
34
+ top: 48px;
35
+ right: 8px;
36
+ z-index: 9999;
37
+ display: flex;
38
+ flex-direction: column;
39
+ gap: 6px;
40
+ pointer-events: none;
41
+ width: 340px;
42
+ }
43
+
44
+ /* Individual banner (frosted glass) */
45
+ .notif-banner {
46
+ display: flex;
47
+ align-items: center;
48
+ gap: 10px;
49
+ padding: 10px 14px;
50
+ background: color-mix(in srgb, var(--bg-alt, #1a1a2e) 75%, transparent);
51
+ backdrop-filter: blur(20px);
52
+ -webkit-backdrop-filter: blur(20px);
53
+ border: 1px solid var(--border, #333);
54
+ border-radius: 12px;
55
+ box-shadow: 0 4px 20px rgba(var(--shadow-rgb, 0,0,0), 0.25);
56
+ pointer-events: auto;
57
+ cursor: pointer;
58
+ opacity: 0;
59
+ transform: translateY(-100%);
60
+ transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
61
+ }
62
+ .notif-banner.show {
63
+ opacity: 1;
64
+ transform: translateY(0);
65
+ }
66
+ .notif-banner.hide {
67
+ opacity: 0;
68
+ transform: translateY(-100%);
69
+ }
70
+
71
+ .notif-banner-icon {
72
+ flex-shrink: 0;
73
+ width: 32px;
74
+ height: 32px;
75
+ display: flex;
76
+ align-items: center;
77
+ justify-content: center;
78
+ background: rgba(var(--overlay-rgb, 0,0,0), 0.06);
79
+ border-radius: 8px;
80
+ color: var(--text-muted);
81
+ }
82
+ .notif-banner-icon .lucide { width: 16px; height: 16px; }
83
+ .notif-banner-emoji { font-size: 18px; line-height: 1; }
84
+
85
+ .notif-banner-body {
86
+ flex: 1;
87
+ min-width: 0;
88
+ }
89
+ .notif-banner-project {
90
+ font-size: 11px;
91
+ font-weight: 600;
92
+ color: var(--text-dimmer);
93
+ text-transform: uppercase;
94
+ letter-spacing: 0.3px;
95
+ margin-bottom: 2px;
96
+ }
97
+ .notif-banner-title {
98
+ font-weight: 600;
99
+ font-size: 13px;
100
+ color: var(--text);
101
+ line-height: 1.3;
102
+ }
103
+ .notif-banner-text {
104
+ font-size: 12px;
105
+ color: var(--text-muted);
106
+ margin-top: 1px;
107
+ overflow: hidden;
108
+ text-overflow: ellipsis;
109
+ white-space: nowrap;
110
+ }
111
+
112
+ /* Permission banner actions */
113
+ .notif-banner-actions {
114
+ display: flex;
115
+ align-items: center;
116
+ gap: 6px;
117
+ margin-top: 8px;
118
+ }
119
+ .notif-banner-allow, .notif-banner-always, .notif-banner-deny, .notif-banner-goto {
120
+ padding: 4px 10px;
121
+ border-radius: 6px;
122
+ font-size: 11px;
123
+ font-weight: 600;
124
+ font-family: inherit;
125
+ cursor: pointer;
126
+ border: none;
127
+ transition: opacity 0.15s, background 0.15s;
128
+ }
129
+ .notif-banner-allow {
130
+ background: var(--accent, #6c5ce7);
131
+ color: #fff;
132
+ }
133
+ .notif-banner-allow:hover { opacity: 0.85; }
134
+ .notif-banner-always {
135
+ background: none;
136
+ border: 1px solid var(--border, #333);
137
+ color: var(--text-secondary);
138
+ }
139
+ .notif-banner-always:hover { color: var(--text); border-color: var(--text-secondary); }
140
+ .notif-banner-deny {
141
+ background: none;
142
+ color: var(--text-muted);
143
+ }
144
+ .notif-banner-deny:hover { color: var(--text); }
145
+ .notif-banner-goto {
146
+ display: flex;
147
+ align-items: center;
148
+ justify-content: center;
149
+ padding: 4px;
150
+ margin-left: auto;
151
+ background: none;
152
+ color: var(--text-dimmer);
153
+ }
154
+ .notif-banner-goto:hover { color: var(--text); }
155
+ .notif-banner-goto .lucide { width: 13px; height: 13px; }
156
+
157
+ /* Banner close button */
158
+ .notif-banner-close {
159
+ display: flex;
160
+ align-items: center;
161
+ justify-content: center;
162
+ width: 22px;
163
+ height: 22px;
164
+ background: none;
165
+ border: none;
166
+ color: var(--text-dimmer);
167
+ cursor: pointer;
168
+ border-radius: 4px;
169
+ flex-shrink: 0;
170
+ opacity: 0;
171
+ transition: opacity 0.1s, color 0.15s, background 0.15s;
172
+ }
173
+ .notif-banner:hover .notif-banner-close { opacity: 1; }
174
+ .notif-banner-close:hover {
175
+ color: var(--text);
176
+ background: rgba(var(--overlay-rgb, 0,0,0), 0.08);
177
+ }
178
+ .notif-banner-close .lucide { width: 12px; height: 12px; }
179
+
180
+ /* ========================================================
181
+ Mobile
182
+ ======================================================== */
183
+ @media (max-width: 768px) {
184
+ .notif-banner-container {
185
+ right: 8px;
186
+ left: 8px;
187
+ width: auto;
188
+ }
189
+ .notif-banner-close { opacity: 1; }
190
+ }
@@ -122,6 +122,12 @@
122
122
  transition: color 0.15s;
123
123
  }
124
124
 
125
+ .rewind-timeline-marker .marker-date {
126
+ font-size: 10px;
127
+ color: var(--text-dimmer);
128
+ white-space: nowrap;
129
+ flex-shrink: 0;
130
+ }
125
131
  .rewind-timeline-marker .marker-text {
126
132
  font-size: 11px;
127
133
  color: var(--text-muted);