clay-server 5.2.0-beta.10 → 5.2.0-beta.11
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/README.md +0 -4
- package/lib/clay-product-control-tools.js +1 -0
- package/lib/clay-product-control.js +14 -11
- package/lib/clay-vendor-usage.js +44 -0
- package/lib/github-star-count.js +147 -0
- package/lib/notes-checklist.js +43 -1
- package/lib/notes.js +2 -1
- package/lib/project-session-notes.js +33 -8
- package/lib/project-sessions.js +63 -24
- package/lib/project-start-protocol.js +29 -0
- package/lib/project-vendor-login.js +2 -0
- package/lib/project.js +3 -0
- package/lib/public/app.js +25 -17
- package/lib/public/css/contextual-clay.css +1 -1
- package/lib/public/css/filebrowser.css +1 -1
- package/lib/public/css/mate-loading-scene.css +21 -0
- package/lib/public/css/overlays.css +64 -256
- package/lib/public/css/project-mate-creation.css +5 -6
- package/lib/public/css/project-start.css +108 -0
- package/lib/public/css/projects-hub.css +53 -14
- package/lib/public/css/settings-shell.css +103 -0
- package/lib/public/css/sidebar.css +7 -0
- package/lib/public/css/title-bar.css +79 -0
- package/lib/public/index.html +50 -63
- package/lib/public/modules/admin-settings-invitations.js +2 -2
- package/lib/public/modules/admin-settings-projects.js +2 -2
- package/lib/public/modules/admin-settings-ui.js +20 -4
- package/lib/public/modules/admin-settings-users.js +4 -4
- package/lib/public/modules/app-home-hub.js +2 -1
- package/lib/public/modules/app-messages.js +10 -2
- package/lib/public/modules/app-projects.js +1 -407
- package/lib/public/modules/app-rate-limit.js +12 -1
- package/lib/public/modules/clay-tool-presentation.js +1 -0
- package/lib/public/modules/contextual-clay.js +3 -1
- package/lib/public/modules/github-star.js +66 -0
- package/lib/public/modules/mate-loading-scene.js +17 -0
- package/lib/public/modules/profile.js +11 -3
- package/lib/public/modules/project-mate-creation-workspace.js +13 -4
- package/lib/public/modules/project-session-visibility-settings.js +19 -16
- package/lib/public/modules/project-settings.js +119 -129
- package/lib/public/modules/project-start-dialog.js +130 -0
- package/lib/public/modules/project-start-folder-state.js +78 -0
- package/lib/public/modules/project-start-folder-view.js +190 -0
- package/lib/public/modules/project-start-forms.js +66 -0
- package/lib/public/modules/project-start-path.js +60 -0
- package/lib/public/modules/project-start-state.js +54 -0
- package/lib/public/modules/project-start-submit.js +67 -0
- package/lib/public/modules/projects-hub-view.js +33 -14
- package/lib/public/modules/projects-hub.js +10 -6
- package/lib/public/modules/server-settings.js +36 -91
- package/lib/public/modules/settings-project-target.js +56 -0
- package/lib/public/modules/settings-select.js +1 -1
- package/lib/public/modules/settings-shell-registry.js +88 -0
- package/lib/public/modules/settings-shell-view.js +104 -0
- package/lib/public/modules/settings-shell.js +342 -0
- package/lib/public/modules/sidebar-mobile.js +8 -30
- package/lib/public/modules/sidebar-projects.js +2 -1
- package/lib/public/modules/theme.js +10 -2
- package/lib/public/modules/user-settings-layout.js +8 -33
- package/lib/public/modules/user-settings-profile.js +1 -1
- package/lib/public/modules/user-settings.js +18 -85
- package/lib/public/modules/vendor-usage-format.js +93 -0
- package/lib/public/modules/vendor-usage-list.js +45 -0
- package/lib/public/modules/vendor-usage-model.js +215 -0
- package/lib/public/modules/vendor-usage-overview.js +312 -0
- package/lib/public/style.css +10 -7
- package/lib/public/welcome-art/conversation-desk.png +0 -0
- package/lib/public/welcome-art/mate-clay.png +0 -0
- package/lib/public/welcome-art/project-clay.png +0 -0
- package/lib/sdk-bridge.js +6 -1
- package/lib/sdk-message-processor.js +9 -1
- package/lib/sdk-quota-snapshot.js +20 -2
- package/lib/server-github-stars.js +39 -0
- package/lib/server-global-ws.js +21 -17
- package/lib/server.js +4 -0
- package/lib/session-notes-mcp-server.js +26 -4
- package/lib/session-notes-writes.js +88 -0
- package/lib/session-visibility.js +20 -8
- package/lib/sessions.js +2 -0
- package/lib/vendor-usage-acp-readers.js +97 -0
- package/lib/vendor-usage-capabilities.js +88 -0
- package/lib/vendor-usage-http-readers.js +214 -0
- package/lib/vendor-usage-metrics.js +47 -0
- package/lib/vendor-usage-native-readers.js +106 -0
- package/lib/vendor-usage-overview.js +406 -0
- package/lib/vendor-usage-service.js +281 -0
- package/lib/ws-schema.js +4 -2
- package/lib/yoke/adapters/claude.js +12 -0
- package/lib/yoke/adapters/codex-query-contract.js +1 -0
- package/lib/yoke/adapters/codex.js +45 -12
- package/lib/yoke/claude-hook-installer.js +1 -0
- package/lib/yoke/codex-dynamic-tool-names.js +80 -0
- package/lib/yoke/codex-model-catalog.js +37 -3
- package/lib/yoke/muse-services.js +16 -3
- package/lib/yoke/providers/claude-model-descriptions.js +22 -2
- package/lib/yoke/vendor-registry.js +6 -2
- package/package.json +2 -1
- package/lib/public/modules/server-settings-navigation.js +0 -39
|
@@ -13,10 +13,23 @@ function attach(adapter) {
|
|
|
13
13
|
env: Object.assign({}, process.env),
|
|
14
14
|
});
|
|
15
15
|
runtime.fail = function() { runtime.close().catch(function(error) { adapter.lastCloseError = error; }); };
|
|
16
|
+
// An abort signal (a timeout or a cancelled caller) closes the runtime so
|
|
17
|
+
// the spawned `muse serve` does not outlive the request.
|
|
18
|
+
var signal = options.signal, onAbort = null, aborted = null;
|
|
19
|
+
if (signal) {
|
|
20
|
+
aborted = new Promise(function(resolve, reject) {
|
|
21
|
+
onAbort = function() { runtime.close().catch(function(error) { adapter.lastCloseError = error; }); reject(new Error("The Muse request was cancelled.")); };
|
|
22
|
+
if (signal.aborted) onAbort(); else signal.addEventListener("abort", onAbort, { once: true });
|
|
23
|
+
});
|
|
24
|
+
aborted.catch(function() {});
|
|
25
|
+
}
|
|
16
26
|
try {
|
|
17
|
-
var spawned = await runtime.initialize();
|
|
18
|
-
return await operation(runtime, spawned);
|
|
19
|
-
} finally {
|
|
27
|
+
var spawned = await (aborted ? Promise.race([runtime.initialize(), aborted]) : runtime.initialize());
|
|
28
|
+
return await (aborted ? Promise.race([operation(runtime, spawned), aborted]) : operation(runtime, spawned));
|
|
29
|
+
} finally {
|
|
30
|
+
if (signal && onAbort) signal.removeEventListener("abort", onAbort);
|
|
31
|
+
await runtime.close();
|
|
32
|
+
}
|
|
20
33
|
}
|
|
21
34
|
adapter.listSessionPage = function(options) {
|
|
22
35
|
options = options || {};
|
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
// Preserve existing model descriptions and beta availability at the provider boundary.
|
|
2
|
-
|
|
2
|
+
// SDK rows normally carry their own description; these apply only when absent.
|
|
3
|
+
// Family wording from https://platform.claude.com/docs/en/about-claude/models/overview (verified 2026-10-17).
|
|
4
|
+
var DESCRIPTIONS = {
|
|
5
|
+
default: "Automatically selects the best model for the task.",
|
|
6
|
+
fable: "For demanding reasoning and long-horizon agentic work.",
|
|
7
|
+
sonnet: "The best combination of speed and intelligence.",
|
|
8
|
+
haiku: "For high-volume, latency-sensitive tasks such as classification, extraction, and routing.",
|
|
9
|
+
opus: "For long-running agentic coding and knowledge work.",
|
|
10
|
+
};
|
|
11
|
+
// Claude Sonnet 5 and Sonnet 5.5 have a 1M-token window by default and need no
|
|
12
|
+
// context-1m beta (verified 2026-10-17). Only these documented IDs are matched;
|
|
13
|
+
// unlisted future versions keep the existing toggle. Sonnet 4.6 keeps it too:
|
|
14
|
+
// Claude Code still treats its 1M window as an opt-in variant.
|
|
15
|
+
// https://platform.claude.com/docs/en/build-with-claude/context-windows
|
|
16
|
+
// https://code.claude.com/docs/en/model-config
|
|
17
|
+
var DEFAULT_ONE_MILLION_SONNET = /sonnet-5(?:-5)?(?:$|[^0-9-])/;
|
|
18
|
+
|
|
3
19
|
function describe(entry) {
|
|
4
20
|
var model = typeof entry === "string" ? { value: entry, displayName: entry } : Object.assign({}, entry);
|
|
5
21
|
var name = String(model.value || "").toLowerCase();
|
|
6
|
-
if (model.supportsBetaContext === undefined)
|
|
22
|
+
if (model.supportsBetaContext === undefined) {
|
|
23
|
+
// Prefer the runtime's resolved wire ID so an alias row is judged by its real model.
|
|
24
|
+
var target = String(model.resolvedModel || model.value || "").toLowerCase();
|
|
25
|
+
model.supportsBetaContext = target.indexOf("sonnet") !== -1 && !DEFAULT_ONE_MILLION_SONNET.test(target);
|
|
26
|
+
}
|
|
7
27
|
if (!model.description) {
|
|
8
28
|
var family = Object.keys(DESCRIPTIONS).find(function(key) { return name.indexOf(key) !== -1; });
|
|
9
29
|
if (family) model.description = DESCRIPTIONS[family];
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// Canonical effort ordering used to clamp a level onto a vendor that does
|
|
6
6
|
// not support it (e.g. codex "minimal" -> claude "low", claude "max" ->
|
|
7
7
|
// codex "xhigh").
|
|
8
|
-
var EFFORT_ORDER = ["minimal", "low", "medium", "high", "xhigh", "max"];
|
|
8
|
+
var EFFORT_ORDER = ["minimal", "low", "medium", "high", "xhigh", "max", "ultra"];
|
|
9
9
|
|
|
10
10
|
// sessionBoundTools gates whether per-session MCP tool mounting reaches a vendor's process.
|
|
11
11
|
var VENDOR_REGISTRY = {
|
|
@@ -62,7 +62,11 @@ var VENDOR_REGISTRY = {
|
|
|
62
62
|
binaryName: "codex",
|
|
63
63
|
avatar: "/codex-avatar.png",
|
|
64
64
|
sessionModes: ["gui"],
|
|
65
|
-
|
|
65
|
+
// Fallback only; runtime model/list rows carry each model's own efforts.
|
|
66
|
+
// Codex 0.162.1 presets and https://learn.chatgpt.com/docs/models
|
|
67
|
+
// (verified 2026-10-17) offer ultra on gpt-6.1-sol, gpt-6-astra, gpt-6-sol,
|
|
68
|
+
// gpt-5.6-sol and gpt-5.6-terra.
|
|
69
|
+
effortLevels: ["low", "medium", "high", "xhigh", "max", "ultra"],
|
|
66
70
|
osUserIsolation: true,
|
|
67
71
|
sessionBoundTools: false,
|
|
68
72
|
usageDashboard: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clay-server",
|
|
3
|
-
"version": "5.2.0-beta.
|
|
3
|
+
"version": "5.2.0-beta.11",
|
|
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"
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"bin/",
|
|
16
16
|
"lib/",
|
|
17
|
+
"!lib/public/welcome-art/*prompt*.txt",
|
|
17
18
|
"LICENSES/"
|
|
18
19
|
],
|
|
19
20
|
"keywords": [
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export var SERVER_SETTINGS_PAGES = [
|
|
2
|
-
{ id: 'overview', category: 'Service', label: 'Overview' },
|
|
3
|
-
{ id: 'network', category: 'Service', label: 'Network' },
|
|
4
|
-
{ id: 'storage', category: 'Service', label: 'Storage' },
|
|
5
|
-
{ id: 'security', category: 'Administration', label: 'Access & security' },
|
|
6
|
-
{ id: 'admin-users', category: 'Administration', label: 'Users', multiUser: true },
|
|
7
|
-
{ id: 'admin-projects', category: 'Administration', label: 'Project access', multiUser: true },
|
|
8
|
-
{ id: 'admin-smtp', category: 'Administration', label: 'Email delivery', multiUser: true },
|
|
9
|
-
{ id: 'environment', category: 'Agent configuration', label: 'Environment' },
|
|
10
|
-
{ id: 'operations', category: 'Maintenance', label: 'Operations' }
|
|
11
|
-
];
|
|
12
|
-
|
|
13
|
-
export function renderSettingsNavigation(multiUser, selectPage) {
|
|
14
|
-
var nav = document.getElementById('settings-page-nav');
|
|
15
|
-
var mobile = document.getElementById('settings-nav-dropdown');
|
|
16
|
-
nav.replaceChildren(); mobile.replaceChildren();
|
|
17
|
-
var category; var group;
|
|
18
|
-
SERVER_SETTINGS_PAGES.forEach(function (page) {
|
|
19
|
-
if (page.multiUser && !multiUser) return;
|
|
20
|
-
if (category !== page.category) {
|
|
21
|
-
category = page.category;
|
|
22
|
-
var heading = document.createElement('div'); heading.className = 'settings-nav-category'; heading.textContent = category; nav.appendChild(heading);
|
|
23
|
-
group = document.createElement('optgroup'); group.label = category; mobile.appendChild(group);
|
|
24
|
-
}
|
|
25
|
-
var button = document.createElement('button'); button.type = 'button'; button.className = 'settings-nav-item'; button.dataset.section = page.id; button.textContent = page.label;
|
|
26
|
-
button.onclick = function () { selectPage(page.id, true); }; nav.appendChild(button);
|
|
27
|
-
var option = document.createElement('option'); option.value = page.id; option.textContent = page.label; group.appendChild(option);
|
|
28
|
-
});
|
|
29
|
-
mobile.onchange = function () { selectPage(this.value, true); };
|
|
30
|
-
nav.onkeydown = function (event) {
|
|
31
|
-
if (['ArrowUp', 'ArrowDown', 'Home', 'End'].indexOf(event.key) < 0) return;
|
|
32
|
-
var items = Array.from(nav.querySelectorAll('button'));
|
|
33
|
-
var index = items.indexOf(document.activeElement);
|
|
34
|
-
if (index < 0) return;
|
|
35
|
-
event.preventDefault();
|
|
36
|
-
index = event.key === 'Home' ? 0 : event.key === 'End' ? items.length - 1 : (index + (event.key === 'ArrowDown' ? 1 : -1) + items.length) % items.length;
|
|
37
|
-
items[index].focus();
|
|
38
|
-
};
|
|
39
|
-
}
|