clay-server 5.1.0-beta.1 → 5.1.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/LICENSES/README.md +4 -0
- package/LICENSES/dicebear-avatars.md +16 -0
- package/bin/cli.js +9 -91
- package/lib/builtin-mates.js +7 -7
- package/lib/daemon-project-access.js +7 -1
- package/lib/daemon-settings.js +11 -0
- package/lib/daemon.js +10 -37
- package/lib/dicebear-avatar.js +62 -0
- package/lib/knowledge-db-service.js +175 -0
- package/lib/knowledge-db-validation.js +0 -0
- package/lib/knowledge-document-index.js +49 -0
- package/lib/knowledge-draft-store.js +56 -0
- package/lib/knowledge-file-store.js +199 -0
- package/lib/knowledge-markdown.js +128 -0
- package/lib/linear-store.js +35 -8
- package/lib/mate-identity-file.js +39 -0
- package/lib/mate-knowledge-mcp-server.js +29 -6
- package/lib/mate-knowledge-service.js +23 -2
- package/lib/mate-knowledge-sync.js +37 -22
- package/lib/mate-ready-creation.js +2 -1
- package/lib/mate-workspace-color.js +4 -0
- package/lib/mates-identity.js +4 -4
- package/lib/mates-prompts.js +4 -3
- package/lib/mates.js +30 -11
- package/lib/os-users.js +5 -16
- package/lib/project-connection.js +36 -9
- package/lib/project-debate-proposal.js +6 -0
- package/lib/project-debate-workspace.js +43 -0
- package/lib/project-debate.js +4 -2
- package/lib/project-filesystem.js +21 -39
- package/lib/project-knowledge.js +315 -136
- package/lib/project-mate-creation-proposal.js +1 -0
- package/lib/project-mate-interaction.js +7 -6
- package/lib/project-server-settings.js +31 -0
- package/lib/project-sessions.js +92 -182
- package/lib/project-user-knowledge.js +60 -0
- package/lib/project.js +62 -21
- package/lib/public/app.js +79 -71
- package/lib/public/clay-studio-wordmark-bold.svg +20 -0
- package/lib/public/css/clay-workspace.css +105 -0
- package/lib/public/css/debates-workbench.css +47 -0
- package/lib/public/css/home-debate-live.css +26 -0
- package/lib/public/css/home-hub.css +3 -1
- package/lib/public/css/home-mate-model-picker.css +15 -131
- package/lib/public/css/home-mate-settings.css +168 -16
- package/lib/public/css/icon-strip.css +249 -32
- package/lib/public/css/input.css +3 -1
- package/lib/public/css/mate-conversation.css +176 -0
- package/lib/public/css/mate-knowledge-workbench.css +118 -0
- package/lib/public/css/mate-workspace-color.css +16 -0
- package/lib/public/css/mates.css +28 -28
- package/lib/public/css/menus.css +3 -0
- package/lib/public/css/messages.css +1 -114
- package/lib/public/css/mobile-nav.css +16 -16
- package/lib/public/css/overlays.css +15 -0
- package/lib/public/css/project-logs.css +7 -0
- package/lib/public/css/project-mate-creation.css +105 -0
- package/lib/public/css/project-settings-modal.css +56 -0
- package/lib/public/css/right-workbench.css +3 -3
- package/lib/public/css/server-settings-system.css +125 -0
- package/lib/public/css/session-folders.css +80 -21
- package/lib/public/css/session-github.css +25 -16
- package/lib/public/css/settings-ui.css +247 -22
- package/lib/public/css/shared-browser.css +7 -3
- package/lib/public/css/sidebar.css +183 -107
- package/lib/public/css/title-bar.css +156 -1
- package/lib/public/css/worker-delegation.css +47 -0
- package/lib/public/css/worker-proposal.css +72 -150
- package/lib/public/css/you.css +74 -0
- package/lib/public/index.html +206 -548
- package/lib/public/modules/account-island.js +232 -0
- package/lib/public/modules/admin-settings-email.js +197 -0
- package/lib/public/modules/admin-settings-invitations.js +183 -0
- package/lib/public/modules/admin-settings-projects.js +198 -0
- package/lib/public/modules/admin-settings-ui.js +100 -0
- package/lib/public/modules/admin-settings-users.js +331 -0
- package/lib/public/modules/admin.js +19 -949
- package/lib/public/modules/app-cursors.js +19 -43
- package/lib/public/modules/app-debate-ui.js +4 -3
- package/lib/public/modules/app-dm.js +0 -2
- package/lib/public/modules/app-header.js +106 -0
- package/lib/public/modules/app-message-router.js +12 -3
- package/lib/public/modules/app-messages.js +47 -61
- package/lib/public/modules/app-notifications.js +4 -7
- package/lib/public/modules/app-projects.js +5 -38
- package/lib/public/modules/app-rate-limit.js +70 -12
- package/lib/public/modules/app-rendering.js +12 -13
- package/lib/public/modules/avatar.js +30 -9
- package/lib/public/modules/chat-render-runtime.js +16 -4
- package/lib/public/modules/command-palette.js +2 -15
- package/lib/public/modules/context-sources.js +27 -18
- package/lib/public/modules/cursor-sharing-preference.js +3 -3
- package/lib/public/modules/debate-controls.js +299 -0
- package/lib/public/modules/debate.js +2 -0
- package/lib/public/modules/debates-workbench.js +339 -0
- package/lib/public/modules/default-ai.js +88 -65
- package/lib/public/modules/header-tui-font.js +10 -20
- package/lib/public/modules/home-debate-controls.js +18 -289
- package/lib/public/modules/home-mate-avatar-editor.js +228 -0
- package/lib/public/modules/home-mate-color-picker.js +66 -0
- package/lib/public/modules/home-mate-creation.js +1 -1
- package/lib/public/modules/home-mate-instructions.js +90 -0
- package/lib/public/modules/home-mate-model-picker.js +80 -271
- package/lib/public/modules/home-mate-profile-editor.js +72 -0
- package/lib/public/modules/home-mate-settings.js +118 -125
- package/lib/public/modules/home-shell.js +3 -0
- package/lib/public/modules/home-surface-boot.js +1 -9
- package/lib/public/modules/icon-strip-tooltip.js +95 -0
- package/lib/public/modules/knowledge-db-edit-state.js +35 -0
- package/lib/public/modules/knowledge-db-workbench.js +234 -0
- package/lib/public/modules/knowledge-history-state.js +55 -0
- package/lib/public/modules/knowledge-markdown-editor.js +57 -0
- package/lib/public/modules/knowledge-preview-links.js +70 -0
- package/lib/public/modules/knowledge-workbench-shell.js +21 -0
- package/lib/public/modules/linear-settings.js +3 -2
- package/lib/public/modules/markdown.js +5 -6
- package/lib/public/modules/mate-knowledge-workbench-state.js +174 -0
- package/lib/public/modules/mate-knowledge-workbench.js +500 -0
- package/lib/public/modules/mate-knowledge.js +11 -3
- package/lib/public/modules/mate-management.js +54 -10
- package/lib/public/modules/mate-sidebar.js +11 -1
- package/lib/public/modules/mate-workspace-color.js +33 -0
- package/lib/public/modules/mention.js +5 -13
- package/lib/public/modules/notification-settings.js +81 -0
- package/lib/public/modules/notifications.js +44 -28
- package/lib/public/modules/personal-settings-dialog.js +51 -0
- package/lib/public/modules/profile.js +66 -24
- package/lib/public/modules/project-chat-identity.js +79 -0
- package/lib/public/modules/project-debate-planning-workspace.js +250 -0
- package/lib/public/modules/project-debate-workspace.js +185 -0
- package/lib/public/modules/project-header-identity.js +127 -0
- package/lib/public/modules/project-logs-render.js +9 -4
- package/lib/public/modules/project-mate-creation-workspace.js +414 -0
- package/lib/public/modules/project-mate-navigation.js +238 -0
- package/lib/public/modules/project-session-navigation.js +29 -0
- package/lib/public/modules/project-settings-environment.js +106 -0
- package/lib/public/modules/project-settings.js +72 -628
- package/lib/public/modules/project-switcher.js +6 -8
- package/lib/public/modules/projects-hub-view.js +5 -6
- package/lib/public/modules/projects-hub.js +2 -6
- package/lib/public/modules/qrcode.js +27 -8
- package/lib/public/modules/search-clay-chat.js +8 -11
- package/lib/public/modules/server-settings-controls.js +316 -0
- package/lib/public/modules/server-settings-environment.js +194 -0
- package/lib/public/modules/server-settings-navigation.js +39 -0
- package/lib/public/modules/server-settings-state.js +54 -0
- package/lib/public/modules/server-settings.js +116 -788
- package/lib/public/modules/server-storage-settings.js +84 -0
- package/lib/public/modules/session-activity-tooltip.js +12 -0
- package/lib/public/modules/session-create-form.js +86 -14
- package/lib/public/modules/session-create.js +50 -7
- package/lib/public/modules/session-github.js +2 -1
- package/lib/public/modules/session-list-visibility.js +41 -0
- package/lib/public/modules/session-presence-ui.js +3 -0
- package/lib/public/modules/session-title-marquee.js +51 -0
- package/lib/public/modules/settings-env-values.js +34 -0
- package/lib/public/modules/settings-select.js +121 -0
- package/lib/public/modules/shared-browser.js +22 -12
- package/lib/public/modules/sidebar-mates.js +3 -50
- package/lib/public/modules/sidebar-mobile.js +63 -60
- package/lib/public/modules/sidebar-projects.js +84 -97
- package/lib/public/modules/sidebar-session-folders-ui.js +2 -2
- package/lib/public/modules/sidebar-session-hierarchy.js +149 -70
- package/lib/public/modules/sidebar-sessions.js +49 -50
- package/lib/public/modules/sidebar.js +11 -13
- package/lib/public/modules/stt-picker.js +14 -5
- package/lib/public/modules/terminal-prefs.js +22 -0
- package/lib/public/modules/theme.js +88 -52
- package/lib/public/modules/thinking-lifecycle.js +7 -6
- package/lib/public/modules/tool-palette-order.js +4 -3
- package/lib/public/modules/tool-palette.js +13 -3
- package/lib/public/modules/tools.js +22 -22
- package/lib/public/modules/user-settings-account.js +318 -0
- package/lib/public/modules/user-settings-appearance.js +55 -0
- package/lib/public/modules/user-settings-editors.js +24 -0
- package/lib/public/modules/user-settings-integrations.js +104 -0
- package/lib/public/modules/user-settings-layout.js +80 -0
- package/lib/public/modules/user-settings-preferences.js +48 -0
- package/lib/public/modules/user-settings-profile.js +53 -0
- package/lib/public/modules/user-settings-themes.js +38 -0
- package/lib/public/modules/user-settings-voice.js +75 -0
- package/lib/public/modules/user-settings.js +53 -480
- package/lib/public/modules/worker-proposal.js +42 -8
- package/lib/public/modules/worker-runtime-picker.js +115 -0
- package/lib/public/modules/you-activity.js +121 -0
- package/lib/public/modules/you.js +251 -0
- package/lib/public/style.css +20 -8
- package/lib/public/vendor/codemirror/LICENSE +21 -0
- package/lib/public/vendor/codemirror/codemirror.css +344 -0
- package/lib/public/vendor/codemirror/codemirror.js +9884 -0
- package/lib/public/vendor/codemirror/continuelist.js +101 -0
- package/lib/public/vendor/codemirror/markdown.js +886 -0
- package/lib/public/vendor/codemirror/show-hint.css +37 -0
- package/lib/public/vendor/codemirror/show-hint.js +523 -0
- package/lib/sdk-bridge.js +15 -3
- package/lib/sdk-message-processor.js +16 -4
- package/lib/sdk-quota-snapshot.js +37 -0
- package/lib/server-admin.js +11 -0
- package/lib/server-appearance-settings.js +71 -0
- package/lib/server-home-chat-events.js +1 -1
- package/lib/server-home-chat.js +25 -3
- package/lib/server-home-debate-planning.js +4 -1
- package/lib/server-home-debates.js +2 -0
- package/lib/server-home-mate-creation.js +4 -1
- package/lib/server-linear.js +14 -8
- package/lib/server-mate-instructions.js +44 -0
- package/lib/server-mates.js +14 -4
- package/lib/server-notification-settings.js +67 -0
- package/lib/server-palette.js +1 -1
- package/lib/server-settings.js +69 -1
- package/lib/server-storage.js +57 -0
- package/lib/server-user-knowledge.js +119 -0
- package/lib/server.js +31 -3
- package/lib/session-visibility.js +7 -2
- package/lib/sessions.js +35 -10
- package/lib/startup-projects.js +40 -0
- package/lib/storage-native-walk.js +85 -0
- package/lib/storage-usage.js +144 -0
- package/lib/user-knowledge-service.js +167 -0
- package/lib/users-permissions.js +7 -0
- package/lib/users-preferences.js +0 -74
- package/lib/users-project-mate-filter-preferences.js +39 -0
- package/lib/users.js +6 -4
- package/lib/workspace-query-access.js +4 -1
- package/lib/ws-schema.js +52 -4
- package/lib/yoke/acp-process-manager.js +2 -2
- package/lib/yoke/adapters/codex.js +12 -52
- package/lib/yoke/codex-app-server.js +2 -2
- package/lib/yoke/codex-model-catalog.js +52 -0
- package/lib/yoke/codex-rate-limits.js +26 -0
- package/package.json +12 -3
|
@@ -15,6 +15,8 @@ var backgroundTasks = require("../codex-background-tasks");
|
|
|
15
15
|
var codexUserInput = require("../codex-user-input");
|
|
16
16
|
var createTurnStop = require("../codex-turn-stop").createTurnStop;
|
|
17
17
|
var idleRecovery = require("../codex-idle-recovery");
|
|
18
|
+
var modelCatalog = require("../codex-model-catalog");
|
|
19
|
+
var normalizeQuotaSnapshot = require("../codex-rate-limits").normalizeSnapshot;
|
|
18
20
|
|
|
19
21
|
// --- Reasoning defaults ---
|
|
20
22
|
// Reasoning summaries are the only readable thinking channel Codex offers:
|
|
@@ -30,7 +32,6 @@ var idleRecovery = require("../codex-idle-recovery");
|
|
|
30
32
|
// Everything here is overridable via adapterOptions.CODEX.config.
|
|
31
33
|
var CODEX_REASONING_DEFAULTS = {
|
|
32
34
|
model_reasoning_summary: "detailed",
|
|
33
|
-
model_supports_reasoning_summaries: true,
|
|
34
35
|
};
|
|
35
36
|
var DEFAULT_CODEX_MODEL = "gpt-6-astra";
|
|
36
37
|
var CODEX_QUERY_BOUND_TOOL_CAPABILITY = { mode: "dynamic", resume: "session-mcp-recovery" };
|
|
@@ -295,30 +296,7 @@ function flattenEvent(notification, state) {
|
|
|
295
296
|
// Rate limits from Codex account
|
|
296
297
|
if (method === "account/rateLimits/updated") {
|
|
297
298
|
var rl = params.rateLimits;
|
|
298
|
-
if (rl)
|
|
299
|
-
var windows = [
|
|
300
|
-
{ key: "primary", type: "five_hour" },
|
|
301
|
-
{ key: "secondary", type: "seven_day" },
|
|
302
|
-
];
|
|
303
|
-
for (var wi = 0; wi < windows.length; wi++) {
|
|
304
|
-
var w = rl[windows[wi].key];
|
|
305
|
-
if (!w) continue;
|
|
306
|
-
var utilization = (w.usedPercent || 0) / 100;
|
|
307
|
-
var status = "allowed";
|
|
308
|
-
if (w.usedPercent >= 100) status = "rejected";
|
|
309
|
-
else if (w.usedPercent >= 80) status = "allowed_warning";
|
|
310
|
-
events.push({
|
|
311
|
-
yokeType: "rate_limit",
|
|
312
|
-
rateLimitInfo: {
|
|
313
|
-
status: status,
|
|
314
|
-
resetsAt: w.resetsAt || null,
|
|
315
|
-
rateLimitType: windows[wi].type,
|
|
316
|
-
utilization: utilization,
|
|
317
|
-
isUsingOverage: false,
|
|
318
|
-
},
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
}
|
|
299
|
+
if (rl) events.push(normalizeQuotaSnapshot(rl));
|
|
322
300
|
return events;
|
|
323
301
|
}
|
|
324
302
|
|
|
@@ -777,7 +755,7 @@ function flattenEvent(notification, state) {
|
|
|
777
755
|
}
|
|
778
756
|
|
|
779
757
|
// Unknown event type - pass through
|
|
780
|
-
console.log("[yoke/codex]
|
|
758
|
+
console.log("[yoke/codex] Unhandled event:", method);
|
|
781
759
|
events.push({
|
|
782
760
|
yokeType: "runtime_specific",
|
|
783
761
|
vendor: "codex",
|
|
@@ -1459,22 +1437,8 @@ function createCodexAdapter(opts) {
|
|
|
1459
1437
|
var _createAppServer = (opts && opts.createAppServer) || function(serverOpts) {
|
|
1460
1438
|
return new CodexAppServer(null, serverOpts);
|
|
1461
1439
|
};
|
|
1462
|
-
//
|
|
1463
|
-
|
|
1464
|
-
// slow/failed `initialize` leaves the picker empty and the chip shows the
|
|
1465
|
-
// previous vendor's model.
|
|
1466
|
-
// Kept in sync with what `model/list` reports for the bundled codex build
|
|
1467
|
-
// (0.153.4). Models the CLI no longer offers are rejected at turn/start, so
|
|
1468
|
-
// listing them would only surface a runtime failure in the model picker.
|
|
1469
|
-
var CODEX_MODELS = [
|
|
1470
|
-
"gpt-6-astra",
|
|
1471
|
-
"gpt-5.6-sol",
|
|
1472
|
-
"gpt-5.6-terra",
|
|
1473
|
-
"gpt-5.6-luna",
|
|
1474
|
-
"gpt-5.5",
|
|
1475
|
-
"gpt-5.2",
|
|
1476
|
-
];
|
|
1477
|
-
var _cachedModels = CODEX_MODELS.slice();
|
|
1440
|
+
// Keep the picker available before initialization and during offline recovery.
|
|
1441
|
+
var _cachedModels = modelCatalog.fallback();
|
|
1478
1442
|
var _appServer = null;
|
|
1479
1443
|
var _backgroundTaskResetListeners = [];
|
|
1480
1444
|
|
|
@@ -1921,9 +1885,7 @@ function createCodexAdapter(opts) {
|
|
|
1921
1885
|
throw createShutdownError();
|
|
1922
1886
|
}
|
|
1923
1887
|
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
_cachedModels = CODEX_MODELS.slice();
|
|
1888
|
+
_cachedModels = await modelCatalog.load(_appServer);
|
|
1927
1889
|
|
|
1928
1890
|
// Register foreign vendor roots with Codex so automatic skill
|
|
1929
1891
|
// triggering and skills/list use the same merged inventory.
|
|
@@ -1990,8 +1952,8 @@ function createCodexAdapter(opts) {
|
|
|
1990
1952
|
},
|
|
1991
1953
|
|
|
1992
1954
|
supportedModels: function() {
|
|
1993
|
-
//
|
|
1994
|
-
return Promise.resolve(
|
|
1955
|
+
// Never start a process merely to populate a picker.
|
|
1956
|
+
return Promise.resolve(_cachedModels.length ? _cachedModels.slice() : modelCatalog.fallback());
|
|
1995
1957
|
},
|
|
1996
1958
|
|
|
1997
1959
|
createToolServer: function(def) {
|
|
@@ -2150,12 +2112,10 @@ function createCodexAdapter(opts) {
|
|
|
2150
2112
|
throw new Error("Codex requires a mapped Linux user while OS-user isolation is enabled");
|
|
2151
2113
|
}
|
|
2152
2114
|
var models = await adapter.supportedModels();
|
|
2153
|
-
var
|
|
2154
|
-
: (opts && models.indexOf(opts.model) !== -1 ? opts.model : models[0]);
|
|
2155
|
-
if (!model) throw new Error("No supported Codex title model is available");
|
|
2115
|
+
var selection = modelCatalog.selectTitleModel(models, opts && opts.model);
|
|
2156
2116
|
return require("../title-query").generateTitle(adapter, messages, opts, {
|
|
2157
|
-
model: model,
|
|
2158
|
-
effort:
|
|
2117
|
+
model: selection.model,
|
|
2118
|
+
effort: selection.effort,
|
|
2159
2119
|
ephemeral: true,
|
|
2160
2120
|
adapterOptions: { CODEX: { sandboxMode: "read-only", approvalPolicy: "never" } },
|
|
2161
2121
|
});
|
|
@@ -174,7 +174,7 @@ CodexAppServer.prototype.start = function() {
|
|
|
174
174
|
|
|
175
175
|
var spawnSpec = buildSpawnSpec(self.executablePath, args, self.opts);
|
|
176
176
|
var userSuffix = self.opts.osUserInfo ? " as " + self.opts.osUserInfo.user : "";
|
|
177
|
-
console.log("[codex-app-server] Spawning" + userSuffix + ":", spawnSpec.command, spawnSpec.args.
|
|
177
|
+
console.log("[codex-app-server] Spawning" + userSuffix + ":", spawnSpec.command, "(" + spawnSpec.args.length + " arguments; values omitted)");
|
|
178
178
|
|
|
179
179
|
self.proc = spawn(spawnSpec.command, spawnSpec.args, spawnSpec.options);
|
|
180
180
|
|
|
@@ -218,7 +218,7 @@ CodexAppServer.prototype.start = function() {
|
|
|
218
218
|
var msg = JSON.parse(line);
|
|
219
219
|
self._handleMessage(msg);
|
|
220
220
|
} catch (e) {
|
|
221
|
-
console.error("[codex-app-server] Failed to parse
|
|
221
|
+
console.error("[codex-app-server] Failed to parse protocol message (content omitted)");
|
|
222
222
|
}
|
|
223
223
|
});
|
|
224
224
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Runtime catalogs are scoped to the adapter's OS user and provider configuration.
|
|
2
|
+
var FALLBACK = ["gpt-6-astra", "gpt-6.1-sol", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.2"];
|
|
3
|
+
|
|
4
|
+
function fallback() {
|
|
5
|
+
return FALLBACK.slice();
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
async function load(server) {
|
|
9
|
+
var models = [];
|
|
10
|
+
var seen = new Set();
|
|
11
|
+
var cursors = new Set();
|
|
12
|
+
var cursor = null;
|
|
13
|
+
var deadline = Date.now() + 3000;
|
|
14
|
+
try {
|
|
15
|
+
for (var page = 0; page < 4; page++) {
|
|
16
|
+
var remaining = deadline - Date.now();
|
|
17
|
+
if (remaining <= 0) return fallback();
|
|
18
|
+
var result = await server.send("model/list", { limit: 100, includeHidden: false, cursor: cursor }, remaining);
|
|
19
|
+
if (!result || !Array.isArray(result.data)) return fallback();
|
|
20
|
+
result.data.forEach(function (entry) {
|
|
21
|
+
if (!entry || entry.hidden || typeof entry.model !== "string" || !entry.model || seen.has(entry.model)) return;
|
|
22
|
+
seen.add(entry.model);
|
|
23
|
+
var model = { value: entry.model, displayName: entry.displayName || entry.model, description: entry.description || "" };
|
|
24
|
+
if (Array.isArray(entry.supportedReasoningEfforts)) {
|
|
25
|
+
model.supportedEffortLevels = entry.supportedReasoningEfforts.map(function (option) { return option.reasoningEffort; }).filter(function (effort) { return typeof effort === "string" && effort.length > 0; });
|
|
26
|
+
}
|
|
27
|
+
models.push(model);
|
|
28
|
+
});
|
|
29
|
+
cursor = result.nextCursor;
|
|
30
|
+
if (!cursor) return models.length ? models : fallback();
|
|
31
|
+
if (cursors.has(cursor)) return fallback();
|
|
32
|
+
cursors.add(cursor);
|
|
33
|
+
}
|
|
34
|
+
} catch (error) {
|
|
35
|
+
// Catalog failure must not prevent existing conversations from starting.
|
|
36
|
+
}
|
|
37
|
+
return fallback();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function selectTitleModel(models, sessionModel) {
|
|
41
|
+
var entries = models.map(function (entry) {
|
|
42
|
+
return typeof entry === "string" ? { value: entry } : entry;
|
|
43
|
+
}).filter(function (entry) { return entry && typeof entry.value === "string" && entry.value.trim(); });
|
|
44
|
+
var selected = entries.find(function (entry) { return entry.value === "gpt-5.6-luna"; })
|
|
45
|
+
|| entries.find(function (entry) { return entry.value === sessionModel; }) || entries[0];
|
|
46
|
+
if (!selected) throw new Error("No supported Codex title model is available");
|
|
47
|
+
var efforts = selected.supportedEffortLevels;
|
|
48
|
+
var effort = Array.isArray(efforts) ? (efforts.indexOf("low") !== -1 ? "low" : efforts[0]) : "low";
|
|
49
|
+
return { model: selected.value, effort: effort };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
module.exports = { fallback: fallback, load: load, selectTitleModel: selectTitleModel };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Account quota snapshots describe usage, never whether a turn was rejected.
|
|
2
|
+
function normalizeSnapshot(rateLimits) {
|
|
3
|
+
var windows = [];
|
|
4
|
+
["primary", "secondary"].forEach(function (key) {
|
|
5
|
+
var window = rateLimits[key];
|
|
6
|
+
if (!window || window.windowDurationMins === 0) return;
|
|
7
|
+
var duration = window.windowDurationMins;
|
|
8
|
+
var used = window.usedPercent;
|
|
9
|
+
windows.push({
|
|
10
|
+
key: key,
|
|
11
|
+
windowDurationMins: Number.isFinite(duration) && duration > 0 ? duration : null,
|
|
12
|
+
usedPercent: Number.isFinite(used) && used >= 0 ? used : null,
|
|
13
|
+
resetsAt: Number.isFinite(window.resetsAt) && window.resetsAt > 0 ? window.resetsAt : null,
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
return {
|
|
17
|
+
yokeType: "rate_limit",
|
|
18
|
+
rateLimitInfo: {
|
|
19
|
+
source: "account_snapshot",
|
|
20
|
+
limitId: rateLimits.limitId || "codex",
|
|
21
|
+
windows: windows,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
module.exports = { normalizeSnapshot: normalizeSnapshot };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clay-server",
|
|
3
|
-
"version": "5.1.0-beta.
|
|
3
|
+
"version": "5.1.0-beta.3",
|
|
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"
|
|
@@ -47,11 +47,20 @@
|
|
|
47
47
|
"homepage": "https://github.com/chadbyte/clay#readme",
|
|
48
48
|
"author": "Chad",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@anthropic-ai/claude-agent-sdk": "^0.3.
|
|
50
|
+
"@anthropic-ai/claude-agent-sdk": "^0.3.296",
|
|
51
|
+
"@dicebear/adventurer": "9.4.3",
|
|
52
|
+
"@dicebear/bottts": "9.4.3",
|
|
53
|
+
"@dicebear/core": "9.4.3",
|
|
54
|
+
"@dicebear/fun-emoji": "9.4.3",
|
|
55
|
+
"@dicebear/icons": "9.4.3",
|
|
56
|
+
"@dicebear/micah": "9.4.3",
|
|
57
|
+
"@dicebear/pixel-art": "9.4.3",
|
|
58
|
+
"@dicebear/thumbs": "9.4.3",
|
|
51
59
|
"@lydell/node-pty": "^1.2.0-beta.3",
|
|
52
60
|
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
53
|
-
"@openai/codex": "^0.
|
|
61
|
+
"@openai/codex": "^0.162.1",
|
|
54
62
|
"@seald-io/nedb": "^4.1.2",
|
|
63
|
+
"codemirror": "^5.65.21",
|
|
55
64
|
"imapflow": "^1.7.8",
|
|
56
65
|
"ipaddr.js": "^2.5.0",
|
|
57
66
|
"nodemailer": "^9.1.1",
|