clay-server 2.11.0-beta.2 → 2.11.0-beta.4
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/daemon.js +11 -1
- package/lib/project.js +14 -3
- package/lib/public/app.js +19 -5
- package/lib/public/css/admin.css +50 -10
- package/lib/public/css/server-settings.css +30 -2
- package/lib/public/index.html +92 -63
- package/lib/public/modules/admin.js +4 -5
- package/lib/public/modules/notifications.js +3 -1
- package/lib/public/modules/project-settings.js +36 -168
- package/lib/public/modules/server-settings.js +78 -189
- package/lib/public/modules/settings-defaults.js +243 -0
- package/lib/server.js +3 -0
- package/lib/updater.js +38 -11
- package/package.json +1 -1
package/lib/daemon.js
CHANGED
|
@@ -355,8 +355,17 @@ var relay = createServer({
|
|
|
355
355
|
keepAwake: !!config.keepAwake,
|
|
356
356
|
pinEnabled: !!config.pinHash,
|
|
357
357
|
platform: process.platform,
|
|
358
|
+
hostname: os2.hostname(),
|
|
359
|
+
lanIp: lanIp || null,
|
|
360
|
+
updateChannel: config.updateChannel || "stable",
|
|
358
361
|
};
|
|
359
362
|
},
|
|
363
|
+
onSetUpdateChannel: function (channel) {
|
|
364
|
+
config.updateChannel = channel === "beta" ? "beta" : "stable";
|
|
365
|
+
saveConfig(config);
|
|
366
|
+
console.log("[daemon] Update channel:", config.updateChannel, "(web)");
|
|
367
|
+
return { ok: true, updateChannel: config.updateChannel };
|
|
368
|
+
},
|
|
360
369
|
onSetPin: function (pin) {
|
|
361
370
|
if (pin) {
|
|
362
371
|
config.pinHash = generateAuthToken(pin);
|
|
@@ -595,11 +604,12 @@ var ipc = createIPCServer(socketPath(), function (msg) {
|
|
|
595
604
|
|
|
596
605
|
// Production: fetch latest via npx, then spawn updated daemon
|
|
597
606
|
var { execSync: execSyncUpd, spawn: spawnUpd } = require("child_process");
|
|
607
|
+
var updTag = config.updateChannel === "beta" ? "beta" : "latest";
|
|
598
608
|
var updDaemonScript;
|
|
599
609
|
try {
|
|
600
610
|
// npx downloads the package and puts a bin symlink; `which` prints its path
|
|
601
611
|
var binPath = execSyncUpd(
|
|
602
|
-
"npx --yes --package=clay-server@
|
|
612
|
+
"npx --yes --package=clay-server@" + updTag + " -- which clay-server",
|
|
603
613
|
{ stdio: ["ignore", "pipe", "pipe"], timeout: 120000, encoding: "utf8" }
|
|
604
614
|
).trim();
|
|
605
615
|
// Resolve symlink to get the actual package directory
|
package/lib/project.js
CHANGED
|
@@ -6,7 +6,7 @@ var { createSessionManager } = require("./sessions");
|
|
|
6
6
|
var { createSDKBridge } = require("./sdk-bridge");
|
|
7
7
|
var { createTerminalManager } = require("./terminal-manager");
|
|
8
8
|
var { createNotesManager } = require("./notes");
|
|
9
|
-
var { fetchLatestVersion, isNewer } = require("./updater");
|
|
9
|
+
var { fetchLatestVersion, fetchVersion, isNewer } = require("./updater");
|
|
10
10
|
var { execFileSync, spawn } = require("child_process");
|
|
11
11
|
var { createLoopRegistry } = require("./scheduler");
|
|
12
12
|
var usersModule = require("./users");
|
|
@@ -108,6 +108,7 @@ function createProjectContext(opts) {
|
|
|
108
108
|
var getScheduleCount = opts.getScheduleCount || function () { return 0; };
|
|
109
109
|
var onProcessingChanged = opts.onProcessingChanged || function () {};
|
|
110
110
|
var onPresenceChange = opts.onPresenceChange || function () {};
|
|
111
|
+
var updateChannel = opts.updateChannel || "stable";
|
|
111
112
|
var latestVersion = null;
|
|
112
113
|
|
|
113
114
|
// --- Per-project clients ---
|
|
@@ -947,7 +948,7 @@ function createProjectContext(opts) {
|
|
|
947
948
|
var nm = createNotesManager({ cwd: cwd, send: send, sendTo: sendTo });
|
|
948
949
|
|
|
949
950
|
// Check for updates in background
|
|
950
|
-
|
|
951
|
+
fetchVersion(updateChannel).then(function (v) {
|
|
951
952
|
if (v && isNewer(v, currentVersion)) {
|
|
952
953
|
latestVersion = v;
|
|
953
954
|
send({ type: "update_available", version: v });
|
|
@@ -1315,9 +1316,19 @@ function createProjectContext(opts) {
|
|
|
1315
1316
|
return;
|
|
1316
1317
|
}
|
|
1317
1318
|
|
|
1319
|
+
if (msg.type === "set_update_channel") {
|
|
1320
|
+
if (usersModule.isMultiUser() && (!ws._clayUser || ws._clayUser.role !== "admin")) return;
|
|
1321
|
+
var newChannel = msg.channel === "beta" ? "beta" : "stable";
|
|
1322
|
+
updateChannel = newChannel;
|
|
1323
|
+
if (typeof opts.onSetUpdateChannel === "function") {
|
|
1324
|
+
opts.onSetUpdateChannel(newChannel);
|
|
1325
|
+
}
|
|
1326
|
+
return;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1318
1329
|
if (msg.type === "check_update") {
|
|
1319
1330
|
if (usersModule.isMultiUser() && (!ws._clayUser || ws._clayUser.role !== "admin")) return;
|
|
1320
|
-
|
|
1331
|
+
fetchVersion(updateChannel).then(function (v) {
|
|
1321
1332
|
if (v && isNewer(v, currentVersion)) {
|
|
1322
1333
|
latestVersion = v;
|
|
1323
1334
|
sendTo(ws, { type: "update_available", version: v });
|
package/lib/public/app.js
CHANGED
|
@@ -1162,9 +1162,11 @@ import { initAdmin, checkAdminAccess } from './modules/admin.js';
|
|
|
1162
1162
|
|
|
1163
1163
|
var confirmCallback = null;
|
|
1164
1164
|
|
|
1165
|
-
function showConfirm(text, onConfirm) {
|
|
1165
|
+
function showConfirm(text, onConfirm, okLabel, destructive) {
|
|
1166
1166
|
confirmText.textContent = text;
|
|
1167
1167
|
confirmCallback = onConfirm;
|
|
1168
|
+
confirmOk.textContent = okLabel || "Delete";
|
|
1169
|
+
confirmOk.className = "confirm-btn " + (destructive === false ? "confirm-ok" : "confirm-delete");
|
|
1168
1170
|
confirmModal.classList.remove("hidden");
|
|
1169
1171
|
}
|
|
1170
1172
|
|
|
@@ -2108,10 +2110,12 @@ import { initAdmin, checkAdminAccess } from './modules/admin.js';
|
|
|
2108
2110
|
if (!btn) return;
|
|
2109
2111
|
var msgEl = btn.closest("[data-uuid]");
|
|
2110
2112
|
if (!msgEl || !msgEl.dataset.uuid) return;
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
ws
|
|
2114
|
-
|
|
2113
|
+
var forkUuid = msgEl.dataset.uuid;
|
|
2114
|
+
showConfirm("Fork session from this message?", function() {
|
|
2115
|
+
if (ws && ws.readyState === 1) {
|
|
2116
|
+
ws.send(JSON.stringify({ type: "fork_session", uuid: forkUuid }));
|
|
2117
|
+
}
|
|
2118
|
+
}, "Fork", false);
|
|
2115
2119
|
});
|
|
2116
2120
|
|
|
2117
2121
|
function scrollToBottom() {
|
|
@@ -2919,6 +2923,12 @@ import { initAdmin, checkAdminAccess } from './modules/admin.js';
|
|
|
2919
2923
|
updResetBtn.innerHTML = '<i data-lucide="download"></i> Update now';
|
|
2920
2924
|
updResetBtn.disabled = false;
|
|
2921
2925
|
}
|
|
2926
|
+
// Update manual command based on version (beta vs stable)
|
|
2927
|
+
var updManualCmd = $("update-manual-cmd");
|
|
2928
|
+
if (updManualCmd) {
|
|
2929
|
+
var updTag = msg.version.indexOf("-beta") !== -1 ? "beta" : "latest";
|
|
2930
|
+
updManualCmd.textContent = "npx clay-server@" + updTag;
|
|
2931
|
+
}
|
|
2922
2932
|
refreshIcons();
|
|
2923
2933
|
}
|
|
2924
2934
|
// Update the settings check-for-updates button
|
|
@@ -3920,6 +3930,8 @@ import { initAdmin, checkAdminAccess } from './modules/admin.js';
|
|
|
3920
3930
|
get currentMode() { return currentMode; },
|
|
3921
3931
|
get currentEffort() { return currentEffort; },
|
|
3922
3932
|
get currentBetas() { return currentBetas; },
|
|
3933
|
+
get currentThinking() { return currentThinking; },
|
|
3934
|
+
get currentThinkingBudget() { return currentThinkingBudget; },
|
|
3923
3935
|
setContextView: setContextView,
|
|
3924
3936
|
applyContextView: applyContextView,
|
|
3925
3937
|
});
|
|
@@ -3933,6 +3945,8 @@ import { initAdmin, checkAdminAccess } from './modules/admin.js';
|
|
|
3933
3945
|
get currentMode() { return currentMode; },
|
|
3934
3946
|
get currentEffort() { return currentEffort; },
|
|
3935
3947
|
get currentBetas() { return currentBetas; },
|
|
3948
|
+
get currentThinking() { return currentThinking; },
|
|
3949
|
+
get currentThinkingBudget() { return currentThinkingBudget; },
|
|
3936
3950
|
}, getEmojiCategories());
|
|
3937
3951
|
|
|
3938
3952
|
// --- QR code ---
|
package/lib/public/css/admin.css
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
display: flex;
|
|
24
24
|
align-items: center;
|
|
25
25
|
justify-content: space-between;
|
|
26
|
-
|
|
26
|
+
padding: 8px 16px;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.admin-section-header h3 {
|
|
@@ -49,6 +49,11 @@
|
|
|
49
49
|
transition: opacity 0.15s;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
.admin-action-btn svg {
|
|
53
|
+
width: 14px;
|
|
54
|
+
height: 14px;
|
|
55
|
+
}
|
|
56
|
+
|
|
52
57
|
.admin-action-btn:hover {
|
|
53
58
|
opacity: 0.9;
|
|
54
59
|
}
|
|
@@ -64,7 +69,7 @@
|
|
|
64
69
|
display: flex;
|
|
65
70
|
align-items: center;
|
|
66
71
|
justify-content: space-between;
|
|
67
|
-
padding: 10px
|
|
72
|
+
padding: 10px 16px;
|
|
68
73
|
border-radius: 10px;
|
|
69
74
|
transition: background 0.1s;
|
|
70
75
|
}
|
|
@@ -124,6 +129,11 @@
|
|
|
124
129
|
transition: color 0.15s, background 0.15s;
|
|
125
130
|
}
|
|
126
131
|
|
|
132
|
+
.admin-remove-btn svg {
|
|
133
|
+
width: 16px;
|
|
134
|
+
height: 16px;
|
|
135
|
+
}
|
|
136
|
+
|
|
127
137
|
.admin-remove-btn:hover {
|
|
128
138
|
color: #e5534b;
|
|
129
139
|
background: rgba(229, 83, 75, 0.1);
|
|
@@ -140,7 +150,7 @@
|
|
|
140
150
|
display: flex;
|
|
141
151
|
align-items: center;
|
|
142
152
|
justify-content: space-between;
|
|
143
|
-
padding: 10px
|
|
153
|
+
padding: 10px 16px;
|
|
144
154
|
border-radius: 10px;
|
|
145
155
|
}
|
|
146
156
|
|
|
@@ -178,6 +188,11 @@
|
|
|
178
188
|
align-items: center;
|
|
179
189
|
}
|
|
180
190
|
|
|
191
|
+
.admin-copy-link-btn svg {
|
|
192
|
+
width: 14px;
|
|
193
|
+
height: 14px;
|
|
194
|
+
}
|
|
195
|
+
|
|
181
196
|
.admin-copy-link-btn:hover {
|
|
182
197
|
color: var(--accent);
|
|
183
198
|
background: var(--accent-8);
|
|
@@ -200,6 +215,11 @@
|
|
|
200
215
|
align-items: center;
|
|
201
216
|
}
|
|
202
217
|
|
|
218
|
+
.admin-revoke-btn svg {
|
|
219
|
+
width: 14px;
|
|
220
|
+
height: 14px;
|
|
221
|
+
}
|
|
222
|
+
|
|
203
223
|
.admin-revoke-btn:hover {
|
|
204
224
|
color: #ef4444;
|
|
205
225
|
background: rgba(239, 68, 68, 0.1);
|
|
@@ -216,7 +236,7 @@
|
|
|
216
236
|
display: flex;
|
|
217
237
|
align-items: center;
|
|
218
238
|
justify-content: space-between;
|
|
219
|
-
padding: 10px
|
|
239
|
+
padding: 10px 16px;
|
|
220
240
|
border-radius: 10px;
|
|
221
241
|
}
|
|
222
242
|
|
|
@@ -274,6 +294,11 @@
|
|
|
274
294
|
align-items: center;
|
|
275
295
|
}
|
|
276
296
|
|
|
297
|
+
.admin-manage-users-btn svg {
|
|
298
|
+
width: 16px;
|
|
299
|
+
height: 16px;
|
|
300
|
+
}
|
|
301
|
+
|
|
277
302
|
.admin-manage-users-btn:hover {
|
|
278
303
|
color: var(--accent);
|
|
279
304
|
background: var(--accent-8);
|
|
@@ -327,6 +352,11 @@
|
|
|
327
352
|
display: flex;
|
|
328
353
|
}
|
|
329
354
|
|
|
355
|
+
.admin-modal-close svg {
|
|
356
|
+
width: 16px;
|
|
357
|
+
height: 16px;
|
|
358
|
+
}
|
|
359
|
+
|
|
330
360
|
.admin-modal-close:hover {
|
|
331
361
|
color: var(--text);
|
|
332
362
|
}
|
|
@@ -442,18 +472,18 @@
|
|
|
442
472
|
|
|
443
473
|
/* --- SMTP Configuration Form --- */
|
|
444
474
|
.admin-smtp-form {
|
|
445
|
-
padding:
|
|
475
|
+
padding: 8px 0;
|
|
446
476
|
}
|
|
447
477
|
|
|
448
478
|
.admin-smtp-status {
|
|
449
479
|
display: flex;
|
|
450
480
|
align-items: center;
|
|
451
481
|
gap: 8px;
|
|
452
|
-
padding:
|
|
482
|
+
padding: 10px 16px;
|
|
453
483
|
border-radius: 8px;
|
|
454
484
|
font-size: 13px;
|
|
455
485
|
font-weight: 500;
|
|
456
|
-
margin
|
|
486
|
+
margin: 0 16px 16px;
|
|
457
487
|
}
|
|
458
488
|
|
|
459
489
|
.admin-smtp-status svg {
|
|
@@ -480,7 +510,7 @@
|
|
|
480
510
|
margin-bottom: 16px;
|
|
481
511
|
}
|
|
482
512
|
|
|
483
|
-
.admin-smtp-row label {
|
|
513
|
+
.admin-smtp-row > label:not(.admin-smtp-toggle) {
|
|
484
514
|
display: block;
|
|
485
515
|
font-size: 12px;
|
|
486
516
|
font-weight: 600;
|
|
@@ -516,17 +546,27 @@
|
|
|
516
546
|
.admin-smtp-toggle {
|
|
517
547
|
display: flex;
|
|
518
548
|
align-items: center;
|
|
519
|
-
gap:
|
|
549
|
+
gap: 10px;
|
|
520
550
|
font-size: 13px;
|
|
551
|
+
font-weight: 400;
|
|
552
|
+
text-transform: none;
|
|
553
|
+
letter-spacing: normal;
|
|
521
554
|
color: var(--text);
|
|
522
555
|
cursor: pointer;
|
|
523
|
-
|
|
556
|
+
margin-top: 6px;
|
|
524
557
|
}
|
|
525
558
|
|
|
526
559
|
.admin-smtp-toggle input[type="checkbox"] {
|
|
527
560
|
accent-color: var(--accent);
|
|
528
561
|
width: 16px;
|
|
529
562
|
height: 16px;
|
|
563
|
+
flex-shrink: 0;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.admin-smtp-row-otp {
|
|
567
|
+
margin-top: 4px;
|
|
568
|
+
padding-top: 12px;
|
|
569
|
+
border-top: 1px solid var(--border);
|
|
530
570
|
}
|
|
531
571
|
|
|
532
572
|
.admin-smtp-actions {
|
|
@@ -79,8 +79,7 @@
|
|
|
79
79
|
font-size: 12px;
|
|
80
80
|
font-weight: 700;
|
|
81
81
|
color: var(--text-muted);
|
|
82
|
-
|
|
83
|
-
letter-spacing: 0.05em;
|
|
82
|
+
letter-spacing: 0.02em;
|
|
84
83
|
padding: 0 10px 10px;
|
|
85
84
|
border-bottom: 1px solid var(--border-subtle);
|
|
86
85
|
margin-bottom: 8px;
|
|
@@ -480,6 +479,35 @@
|
|
|
480
479
|
color: #fff;
|
|
481
480
|
}
|
|
482
481
|
|
|
482
|
+
.settings-budget-row {
|
|
483
|
+
display: flex;
|
|
484
|
+
align-items: center;
|
|
485
|
+
gap: 10px;
|
|
486
|
+
margin-top: 12px;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.settings-budget-label {
|
|
490
|
+
font-size: 12px;
|
|
491
|
+
color: var(--text-muted);
|
|
492
|
+
white-space: nowrap;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.settings-budget-input {
|
|
496
|
+
width: 90px;
|
|
497
|
+
padding: 5px 8px;
|
|
498
|
+
border: 1px solid var(--border);
|
|
499
|
+
border-radius: 6px;
|
|
500
|
+
background: var(--bg);
|
|
501
|
+
color: var(--text);
|
|
502
|
+
font-size: 13px;
|
|
503
|
+
font-family: inherit;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.settings-budget-input:focus {
|
|
507
|
+
border-color: var(--accent);
|
|
508
|
+
outline: none;
|
|
509
|
+
}
|
|
510
|
+
|
|
483
511
|
/* --- PIN input --- */
|
|
484
512
|
.settings-pin-input-row {
|
|
485
513
|
display: flex;
|
package/lib/public/index.html
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<button id="update-pill" class="top-bar-pill pill-success"><i data-lucide="arrow-up-circle"></i> <span id="update-version"></span></button>
|
|
37
37
|
<div id="update-popover" class="top-bar-popover">
|
|
38
38
|
<div class="popover-row"><button id="update-now" class="popover-action popover-action-primary"><i data-lucide="download"></i> Update now</button></div>
|
|
39
|
-
<div class="popover-row"><div class="popover-label">Or run manually:</div><div class="popover-cmd"><code>npx clay-server@latest</code><button class="popover-copy" title="Copy"><i data-lucide="copy"></i></button></div></div>
|
|
39
|
+
<div class="popover-row"><div class="popover-label">Or run manually:</div><div class="popover-cmd"><code id="update-manual-cmd">npx clay-server@latest</code><button class="popover-copy" title="Copy"><i data-lucide="copy"></i></button></div></div>
|
|
40
40
|
</div>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
@@ -403,13 +403,13 @@
|
|
|
403
403
|
<div class="project-settings-nav-inner">
|
|
404
404
|
<div class="server-settings-nav-header" id="ps-nav-title">-</div>
|
|
405
405
|
<div class="server-settings-nav-items">
|
|
406
|
-
<div class="settings-nav-category">
|
|
406
|
+
<div class="settings-nav-category">General</div>
|
|
407
407
|
<button class="settings-nav-item active" data-section="profile"><span>Profile</span></button>
|
|
408
|
-
<button class="settings-nav-item" data-section="defaults"><span>Model
|
|
408
|
+
<button class="settings-nav-item" data-section="defaults"><span>Model</span></button>
|
|
409
409
|
<div class="settings-nav-separator"></div>
|
|
410
|
-
<div class="settings-nav-category">
|
|
411
|
-
<button class="settings-nav-item" data-section="instructions"><span>
|
|
412
|
-
<button class="settings-nav-item" data-section="environment"><span>Environment
|
|
410
|
+
<div class="settings-nav-category">Config</div>
|
|
411
|
+
<button class="settings-nav-item" data-section="instructions"><span>Instructions</span></button>
|
|
412
|
+
<button class="settings-nav-item" data-section="environment"><span>Environment</span></button>
|
|
413
413
|
</div>
|
|
414
414
|
</div>
|
|
415
415
|
</div>
|
|
@@ -446,7 +446,7 @@
|
|
|
446
446
|
</div>
|
|
447
447
|
<!-- Defaults -->
|
|
448
448
|
<div class="ps-section" data-section="defaults">
|
|
449
|
-
<h2>Model
|
|
449
|
+
<h2>Model</h2>
|
|
450
450
|
<p class="ps-section-desc">Configure which model to use and how Claude behaves during sessions.</p>
|
|
451
451
|
<div class="settings-card">
|
|
452
452
|
<div class="settings-field">
|
|
@@ -482,6 +482,17 @@
|
|
|
482
482
|
<div class="settings-btn-group" id="ps-effort-bar"></div>
|
|
483
483
|
</div>
|
|
484
484
|
</div>
|
|
485
|
+
<div class="settings-card" id="ps-thinking-card">
|
|
486
|
+
<div class="settings-field">
|
|
487
|
+
<label class="settings-label">Thinking</label>
|
|
488
|
+
<div class="settings-hint">Controls whether Claude shows its reasoning process. Budget mode lets you set a token limit.</div>
|
|
489
|
+
<div class="settings-btn-group" id="ps-thinking-bar"></div>
|
|
490
|
+
<div id="ps-thinking-budget-row" class="settings-budget-row" style="display:none">
|
|
491
|
+
<label class="settings-budget-label">Budget tokens</label>
|
|
492
|
+
<input id="ps-thinking-budget" type="number" class="settings-budget-input" min="1024" max="128000" step="1024" value="10000">
|
|
493
|
+
</div>
|
|
494
|
+
</div>
|
|
495
|
+
</div>
|
|
485
496
|
</div>
|
|
486
497
|
<!-- Instructions -->
|
|
487
498
|
<div class="ps-section" data-section="instructions">
|
|
@@ -500,7 +511,7 @@
|
|
|
500
511
|
</div>
|
|
501
512
|
<!-- Environment -->
|
|
502
513
|
<div class="ps-section" data-section="environment">
|
|
503
|
-
<h2>Environment
|
|
514
|
+
<h2>Environment</h2>
|
|
504
515
|
<p class="ps-section-desc">Store API keys, tokens, and config for this project. Paste a <code>.env</code> file to import multiple variables at once.</p>
|
|
505
516
|
<div class="settings-hint ps-env-notice hidden" id="ps-env-override-notice">
|
|
506
517
|
<i data-lucide="info"></i> A <code>.envrc</code> file exists in the project directory and will take precedence over these settings.
|
|
@@ -621,45 +632,50 @@
|
|
|
621
632
|
<optgroup label="General">
|
|
622
633
|
<option value="overview" selected>Status</option>
|
|
623
634
|
<option value="notifications">Notifications</option>
|
|
635
|
+
<option value="security">Security</option>
|
|
636
|
+
</optgroup>
|
|
637
|
+
<optgroup label="Defaults">
|
|
638
|
+
<option value="models">Model</option>
|
|
624
639
|
</optgroup>
|
|
625
|
-
<optgroup label="
|
|
626
|
-
<option value="
|
|
627
|
-
<option value="
|
|
628
|
-
<option value="environment">Environment Variables</option>
|
|
640
|
+
<optgroup label="Config">
|
|
641
|
+
<option value="claudemd">Instructions</option>
|
|
642
|
+
<option value="environment">Environment</option>
|
|
629
643
|
</optgroup>
|
|
630
644
|
<optgroup label="Admin" class="settings-admin-only">
|
|
631
645
|
<option value="admin-users">Users</option>
|
|
632
646
|
<option value="admin-invites">Invites</option>
|
|
633
647
|
<option value="admin-projects">Projects</option>
|
|
634
|
-
<option value="admin-smtp">Email
|
|
648
|
+
<option value="admin-smtp">Email</option>
|
|
635
649
|
</optgroup>
|
|
636
650
|
<optgroup label="Server">
|
|
637
|
-
<option value="
|
|
638
|
-
<option value="restart">Restart
|
|
639
|
-
<option value="shutdown">Shutdown
|
|
651
|
+
<option value="keep-awake" class="hidden" id="settings-keep-awake-opt">Keep Awake</option>
|
|
652
|
+
<option value="restart">Restart</option>
|
|
653
|
+
<option value="shutdown">Shutdown</option>
|
|
640
654
|
</optgroup>
|
|
641
655
|
</select>
|
|
642
656
|
<div class="server-settings-nav-items">
|
|
643
657
|
<div class="settings-nav-category">General</div>
|
|
644
658
|
<button class="settings-nav-item active" data-section="overview"><span>Status</span></button>
|
|
645
659
|
<button class="settings-nav-item" data-section="notifications"><span>Notifications</span></button>
|
|
660
|
+
<button class="settings-nav-item" data-section="security"><span>Security</span></button>
|
|
646
661
|
<div class="settings-nav-separator"></div>
|
|
647
|
-
<div class="settings-nav-category">
|
|
648
|
-
<button class="settings-nav-item" data-section="models"><span>Model
|
|
649
|
-
<
|
|
650
|
-
<
|
|
662
|
+
<div class="settings-nav-category">Defaults</div>
|
|
663
|
+
<button class="settings-nav-item" data-section="models"><span>Model</span></button>
|
|
664
|
+
<div class="settings-nav-separator"></div>
|
|
665
|
+
<div class="settings-nav-category">Config</div>
|
|
666
|
+
<button class="settings-nav-item" data-section="claudemd"><span>Instructions</span></button>
|
|
667
|
+
<button class="settings-nav-item" data-section="environment"><span>Environment</span></button>
|
|
651
668
|
<div class="settings-nav-separator settings-admin-only"></div>
|
|
652
669
|
<div class="settings-nav-category settings-admin-only">Admin</div>
|
|
653
670
|
<button class="settings-nav-item settings-admin-only" data-section="admin-users"><span>Users</span></button>
|
|
654
671
|
<button class="settings-nav-item settings-admin-only" data-section="admin-invites"><span>Invites</span></button>
|
|
655
672
|
<button class="settings-nav-item settings-admin-only" data-section="admin-projects"><span>Projects</span></button>
|
|
656
|
-
<button class="settings-nav-item settings-admin-only" data-section="admin-smtp"><span>Email
|
|
673
|
+
<button class="settings-nav-item settings-admin-only" data-section="admin-smtp"><span>Email</span></button>
|
|
657
674
|
<div class="settings-nav-separator"></div>
|
|
658
675
|
<div class="settings-nav-category">Server</div>
|
|
659
|
-
<button class="settings-nav-item" data-section="
|
|
660
|
-
<
|
|
661
|
-
<button class="settings-nav-item" data-section="
|
|
662
|
-
<button class="settings-nav-item settings-nav-danger" data-section="shutdown"><span>Shutdown Server</span></button>
|
|
676
|
+
<button class="settings-nav-item hidden" data-section="keep-awake" id="settings-keep-awake-nav"><span>Keep Awake</span></button>
|
|
677
|
+
<button class="settings-nav-item" data-section="restart"><span>Restart</span></button>
|
|
678
|
+
<button class="settings-nav-item settings-nav-danger" data-section="shutdown"><span>Shutdown</span></button>
|
|
663
679
|
</div>
|
|
664
680
|
</div>
|
|
665
681
|
</div>
|
|
@@ -669,18 +685,23 @@
|
|
|
669
685
|
<h2>Status</h2>
|
|
670
686
|
<div class="settings-card">
|
|
671
687
|
<div class="settings-field">
|
|
672
|
-
<label class="settings-label">
|
|
673
|
-
<div class="settings-value" id="settings-
|
|
674
|
-
|
|
675
|
-
<div class="settings-field">
|
|
676
|
-
<label class="settings-label">Working Directory</label>
|
|
677
|
-
<div class="settings-value settings-mono" id="settings-project-cwd">-</div>
|
|
688
|
+
<label class="settings-label">Host</label>
|
|
689
|
+
<div class="settings-value" id="settings-hostname">-</div>
|
|
690
|
+
<div class="settings-value settings-mono" id="settings-lan-ip" style="font-size:12px;color:var(--text-muted)"></div>
|
|
678
691
|
</div>
|
|
679
692
|
<div class="settings-field">
|
|
680
693
|
<label class="settings-label">Server Version</label>
|
|
681
694
|
<div class="settings-value" id="settings-server-version">-</div>
|
|
682
695
|
<button class="settings-btn-sm settings-btn-update" id="settings-update-check"><i data-lucide="refresh-cw"></i> Check for updates</button>
|
|
683
696
|
</div>
|
|
697
|
+
<label class="settings-toggle-row">
|
|
698
|
+
<div>
|
|
699
|
+
<span class="settings-label">Early Access</span>
|
|
700
|
+
<div class="settings-hint">Receive pre-release updates before they reach the stable channel.</div>
|
|
701
|
+
</div>
|
|
702
|
+
<input type="checkbox" id="settings-update-channel">
|
|
703
|
+
<span class="toggle-track"><span class="toggle-thumb"></span></span>
|
|
704
|
+
</label>
|
|
684
705
|
<div class="settings-field-row">
|
|
685
706
|
<label class="settings-label">Port</label>
|
|
686
707
|
<span class="settings-value settings-mono" id="settings-port">-</span>
|
|
@@ -690,7 +711,14 @@
|
|
|
690
711
|
<span class="settings-value settings-badge" id="settings-tls">-</span>
|
|
691
712
|
</div>
|
|
692
713
|
<div class="settings-field-row">
|
|
693
|
-
<
|
|
714
|
+
<div>
|
|
715
|
+
<label class="settings-label">Skip Permissions</label>
|
|
716
|
+
<div class="settings-hint">Auto-approves all tool executions. Restart with <code style="font-size:12px">--dangerously-skip-permissions</code> to enable.</div>
|
|
717
|
+
</div>
|
|
718
|
+
<span class="settings-value settings-badge" id="settings-skip-perms">Disabled</span>
|
|
719
|
+
</div>
|
|
720
|
+
<div class="settings-field-row">
|
|
721
|
+
<label class="settings-label">Debug</label>
|
|
694
722
|
<span class="settings-value settings-badge" id="settings-debug">-</span>
|
|
695
723
|
</div>
|
|
696
724
|
</div>
|
|
@@ -727,25 +755,15 @@
|
|
|
727
755
|
<span class="settings-value settings-mono" id="settings-project-slug">-</span>
|
|
728
756
|
</div>
|
|
729
757
|
</div>
|
|
730
|
-
<div class="settings-card hidden" id="settings-keep-awake-card">
|
|
731
|
-
<label class="settings-toggle-row">
|
|
732
|
-
<div>
|
|
733
|
-
<span class="settings-label">Keep Awake</span>
|
|
734
|
-
<div class="settings-hint">Prevent the system from sleeping while the server is running (macOS only).</div>
|
|
735
|
-
</div>
|
|
736
|
-
<input type="checkbox" id="settings-keep-awake">
|
|
737
|
-
<span class="toggle-track"><span class="toggle-thumb"></span></span>
|
|
738
|
-
</label>
|
|
739
|
-
</div>
|
|
740
758
|
</div>
|
|
741
759
|
<div class="server-settings-section" data-section="models">
|
|
742
|
-
<h2>Model
|
|
760
|
+
<h2>Model</h2>
|
|
743
761
|
<p class="settings-hint" style="margin-bottom: 20px;">Configure which model to use and how Claude behaves during sessions.</p>
|
|
744
762
|
<div class="settings-card">
|
|
745
763
|
<div class="settings-field">
|
|
746
764
|
<label class="settings-label">Model</label>
|
|
747
765
|
<div class="settings-hint">Choose the Claude model to use. Larger models are slower but more capable.</div>
|
|
748
|
-
<div id="
|
|
766
|
+
<div id="ss-model-list" class="settings-model-list"></div>
|
|
749
767
|
</div>
|
|
750
768
|
</div>
|
|
751
769
|
<div class="settings-card" id="ss-beta-card" style="display:none">
|
|
@@ -775,23 +793,20 @@
|
|
|
775
793
|
<div class="settings-btn-group" id="ss-effort-bar"></div>
|
|
776
794
|
</div>
|
|
777
795
|
</div>
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
<div>
|
|
784
|
-
<label class="settings-label">
|
|
785
|
-
<
|
|
786
|
-
<div class="settings-hint">This setting cannot be changed here. Stop the server and restart with the flag below.</div>
|
|
787
|
-
<div class="settings-hint settings-copyable-wrap">
|
|
788
|
-
<span class="settings-copyable" id="skip-perms-cmd" data-copy="npx clay-server --dangerously-skip-permissions"><code>npx clay-server --dangerously-skip-permissions</code><button class="settings-copy-btn" type="button" title="Copy">⧉</button></span>
|
|
789
|
-
</div>
|
|
796
|
+
<div class="settings-card" id="ss-thinking-card">
|
|
797
|
+
<div class="settings-field">
|
|
798
|
+
<label class="settings-label">Thinking</label>
|
|
799
|
+
<div class="settings-hint">Controls whether Claude shows its reasoning process. Budget mode lets you set a token limit.</div>
|
|
800
|
+
<div class="settings-btn-group" id="ss-thinking-bar"></div>
|
|
801
|
+
<div id="ss-thinking-budget-row" class="settings-budget-row" style="display:none">
|
|
802
|
+
<label class="settings-budget-label">Budget tokens</label>
|
|
803
|
+
<input id="ss-thinking-budget" type="number" class="settings-budget-input" min="1024" max="128000" step="1024" value="10000">
|
|
790
804
|
</div>
|
|
791
|
-
<span class="settings-value settings-badge" id="settings-skip-perms">Disabled</span>
|
|
792
805
|
</div>
|
|
793
806
|
</div>
|
|
794
|
-
|
|
807
|
+
</div>
|
|
808
|
+
<div class="server-settings-section" data-section="security">
|
|
809
|
+
<h2>Security</h2>
|
|
795
810
|
<div class="settings-card">
|
|
796
811
|
<div class="settings-field-row">
|
|
797
812
|
<div>
|
|
@@ -869,7 +884,7 @@
|
|
|
869
884
|
</div>
|
|
870
885
|
</div>
|
|
871
886
|
<div class="server-settings-section" data-section="environment">
|
|
872
|
-
<h2>
|
|
887
|
+
<h2>Environment</h2>
|
|
873
888
|
<p class="settings-hint" style="margin-bottom: 16px;">Define environment variables shared across all projects. Project-level variables take precedence over shared ones.</p>
|
|
874
889
|
<div class="ps-env-header">
|
|
875
890
|
<button class="settings-btn-sm" id="ss-env-add-btn"><i data-lucide="plus"></i> Add Variable</button>
|
|
@@ -879,22 +894,35 @@
|
|
|
879
894
|
<!-- rows rendered by JS -->
|
|
880
895
|
</div>
|
|
881
896
|
</div>
|
|
897
|
+
<div class="server-settings-section hidden" data-section="keep-awake" id="settings-keep-awake-section">
|
|
898
|
+
<h2>Keep Awake</h2>
|
|
899
|
+
<div class="settings-card">
|
|
900
|
+
<label class="settings-toggle-row">
|
|
901
|
+
<div>
|
|
902
|
+
<span class="settings-label">Keep Awake</span>
|
|
903
|
+
<div class="settings-hint">Prevent the system from sleeping while the server is running (macOS only).</div>
|
|
904
|
+
</div>
|
|
905
|
+
<input type="checkbox" id="settings-keep-awake">
|
|
906
|
+
<span class="toggle-track"><span class="toggle-thumb"></span></span>
|
|
907
|
+
</label>
|
|
908
|
+
</div>
|
|
909
|
+
</div>
|
|
882
910
|
<div class="server-settings-section" data-section="restart">
|
|
883
|
-
<h2>Restart
|
|
911
|
+
<h2>Restart</h2>
|
|
884
912
|
<p class="settings-hint" style="margin-bottom: 16px;">Restart the Clay daemon process. All active sessions will be briefly interrupted and clients will automatically reconnect.</p>
|
|
885
913
|
<div class="settings-card">
|
|
886
914
|
<div class="settings-field">
|
|
887
915
|
<label class="settings-label">Restart Daemon</label>
|
|
888
916
|
<div class="settings-hint">Spawns a new daemon process and gracefully shuts down the current one.</div>
|
|
889
917
|
<div style="margin-top: 12px;">
|
|
890
|
-
<button class="settings-btn-sm" id="settings-restart-btn"><i data-lucide="refresh-cw" style="width:14px;height:14px;vertical-align:-2px;margin-right:4px;"></i>Restart
|
|
918
|
+
<button class="settings-btn-sm" id="settings-restart-btn"><i data-lucide="refresh-cw" style="width:14px;height:14px;vertical-align:-2px;margin-right:4px;"></i>Restart</button>
|
|
891
919
|
</div>
|
|
892
920
|
<div class="settings-hint settings-restart-error hidden" id="settings-restart-error" style="margin-top: 8px;"></div>
|
|
893
921
|
</div>
|
|
894
922
|
</div>
|
|
895
923
|
</div>
|
|
896
924
|
<div class="server-settings-section" data-section="shutdown">
|
|
897
|
-
<h2>Shutdown
|
|
925
|
+
<h2>Shutdown</h2>
|
|
898
926
|
<div class="settings-danger-zone">
|
|
899
927
|
<div class="settings-danger-icon"><i data-lucide="alert-triangle"></i></div>
|
|
900
928
|
<div class="settings-danger-body">
|
|
@@ -928,7 +956,8 @@
|
|
|
928
956
|
<div class="settings-card" id="admin-projects-body"></div>
|
|
929
957
|
</div>
|
|
930
958
|
<div class="server-settings-section settings-admin-only" data-section="admin-smtp">
|
|
931
|
-
<h2>Email
|
|
959
|
+
<h2>Email</h2>
|
|
960
|
+
<p class="settings-hint" style="margin-bottom: 20px;">Configure SMTP to send invite links and one-time login codes via email. Without SMTP, users log in with a PIN instead.</p>
|
|
932
961
|
<div class="settings-card" id="admin-smtp-body"></div>
|
|
933
962
|
</div>
|
|
934
963
|
|