clay-server 2.33.1 → 2.34.0-beta.10
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/ask-user-mcp-server.js +120 -0
- package/lib/config.js +9 -13
- package/lib/daemon.js +116 -55
- package/lib/mate-datastore.js +359 -0
- package/lib/mates.js +2 -2
- package/lib/os-users.js +70 -37
- package/lib/project-connection.js +16 -9
- package/lib/project-http.js +3 -4
- package/lib/project-image.js +3 -2
- package/lib/project-mate-datastore.js +232 -0
- package/lib/project-sessions.js +110 -7
- package/lib/project-user-message.js +4 -3
- package/lib/project.js +126 -10
- package/lib/public/app.js +2 -0
- package/lib/public/css/mates.css +228 -11
- package/lib/public/css/messages.css +23 -0
- package/lib/public/css/mobile-nav.css +0 -14
- package/lib/public/css/notifications-center.css +80 -0
- package/lib/public/css/sidebar.css +326 -101
- package/lib/public/index.html +24 -29
- package/lib/public/modules/app-dm.js +0 -2
- package/lib/public/modules/app-messages.js +23 -0
- package/lib/public/modules/app-rendering.js +0 -2
- package/lib/public/modules/diff.js +21 -7
- package/lib/public/modules/mate-datastore-ui.js +280 -0
- package/lib/public/modules/mate-sidebar.js +3 -9
- package/lib/public/modules/mate-wizard.js +15 -15
- package/lib/public/modules/sidebar-mobile.js +10 -20
- package/lib/public/modules/sidebar-sessions.js +490 -113
- package/lib/public/modules/sidebar.js +8 -6
- package/lib/public/modules/tools.js +115 -18
- package/lib/public/sw.js +1 -1
- package/lib/sdk-bridge.js +56 -41
- package/lib/sdk-message-processor.js +21 -4
- package/lib/server.js +28 -72
- package/lib/sessions.js +157 -20
- package/lib/updater.js +2 -2
- package/lib/users.js +2 -2
- package/lib/ws-schema.js +16 -0
- package/lib/yoke/adapters/claude-worker.js +114 -2
- package/lib/yoke/adapters/claude.js +56 -5
- package/lib/yoke/adapters/codex.js +350 -58
- package/lib/yoke/index.js +93 -48
- package/lib/yoke/instructions.js +0 -1
- package/lib/yoke/mcp-bridge-server.js +14 -6
- package/package.json +1 -2
- package/lib/yoke/adapters/gemini.js +0 -709
package/lib/project.js
CHANGED
|
@@ -9,7 +9,7 @@ var { createNotesManager } = require("./notes");
|
|
|
9
9
|
var { fetchLatestVersion, fetchVersion, isNewer } = require("./updater");
|
|
10
10
|
var { execFileSync, spawn } = require("child_process");
|
|
11
11
|
var usersModule = require("./users");
|
|
12
|
-
var { resolveOsUserInfo, fsAsUser } = require("./os-users");
|
|
12
|
+
var { resolveOsUserInfo, fsAsUser, grantProjectAccess } = require("./os-users");
|
|
13
13
|
var crisisSafety = require("./crisis-safety");
|
|
14
14
|
var matesModule = require("./mates");
|
|
15
15
|
var sessionSearch = require("./session-search");
|
|
@@ -27,6 +27,7 @@ var { attachSessions } = require("./project-sessions");
|
|
|
27
27
|
var { attachUserMessage } = require("./project-user-message");
|
|
28
28
|
var { attachConnection } = require("./project-connection");
|
|
29
29
|
var { attachMcp } = require("./project-mcp");
|
|
30
|
+
var { attachMateDatastore } = require("./project-mate-datastore");
|
|
30
31
|
var { createLocalMcp } = require("./mcp-local");
|
|
31
32
|
var { attachEmail: attachEmailModule } = require("./project-email");
|
|
32
33
|
// project-notifications is attached globally in server.js, passed via opts.notificationsModule
|
|
@@ -159,9 +160,10 @@ function createProjectContext(opts) {
|
|
|
159
160
|
var serverTls = opts.tls || false;
|
|
160
161
|
var serverAuthToken = opts.authToken || null;
|
|
161
162
|
var latestVersion = null;
|
|
163
|
+
var sessionTitleMigrationScheduled = false;
|
|
162
164
|
|
|
163
165
|
// --- YOKE adapters (multi-vendor, lazy init) ---
|
|
164
|
-
var _yokeState = yoke.createAdapters({ cwd: cwd });
|
|
166
|
+
var _yokeState = yoke.createAdapters({ cwd: cwd, slug: slug });
|
|
165
167
|
var adapters = _yokeState.adapters;
|
|
166
168
|
var defaultVendor = adapters.claude ? "claude" : Object.keys(adapters)[0] || "claude";
|
|
167
169
|
var adapter = adapters[defaultVendor] || null;
|
|
@@ -186,6 +188,14 @@ function createProjectContext(opts) {
|
|
|
186
188
|
return user.linuxUser;
|
|
187
189
|
}
|
|
188
190
|
|
|
191
|
+
function ensureProjectAccessForSession(session) {
|
|
192
|
+
var linuxUser = getLinuxUserForSession(session);
|
|
193
|
+
if (linuxUser) {
|
|
194
|
+
grantProjectAccess(cwd, linuxUser);
|
|
195
|
+
}
|
|
196
|
+
return linuxUser;
|
|
197
|
+
}
|
|
198
|
+
|
|
189
199
|
function getLinuxUserForWs(ws) {
|
|
190
200
|
if (!osUsers) return null;
|
|
191
201
|
if (!ws._clayUser || !ws._clayUser.linuxUser) return null;
|
|
@@ -457,6 +467,19 @@ function createProjectContext(opts) {
|
|
|
457
467
|
},
|
|
458
468
|
});
|
|
459
469
|
|
|
470
|
+
// --- Mate datastore (Mate projects only) ---
|
|
471
|
+
var _mateDatastore = attachMateDatastore({
|
|
472
|
+
cwd: cwd,
|
|
473
|
+
slug: slug,
|
|
474
|
+
isMate: isMate,
|
|
475
|
+
send: send,
|
|
476
|
+
sendTo: sendTo,
|
|
477
|
+
clients: clients,
|
|
478
|
+
getSessionForWs: getSessionForWs,
|
|
479
|
+
usersModule: usersModule,
|
|
480
|
+
getProjectOwnerId: function () { return projectOwnerId; },
|
|
481
|
+
});
|
|
482
|
+
|
|
460
483
|
// --- MCP tool servers (created via YOKE adapter) ---
|
|
461
484
|
var mcpServers = (function () {
|
|
462
485
|
var servers = {};
|
|
@@ -482,6 +505,63 @@ function createProjectContext(opts) {
|
|
|
482
505
|
console.error("[project] Failed to create debate MCP server:", e.message);
|
|
483
506
|
}
|
|
484
507
|
|
|
508
|
+
// Ask-user MCP server (mates only)
|
|
509
|
+
if (isMate) {
|
|
510
|
+
try {
|
|
511
|
+
var askUserMcp = require("./ask-user-mcp-server");
|
|
512
|
+
var askUserToolDefs = askUserMcp.getToolDefs(function onAsk(input) {
|
|
513
|
+
// Stateless: the tool's job is to *post* the question card.
|
|
514
|
+
// We do NOT hold a promise open waiting for the user. When the
|
|
515
|
+
// user answers, the answer is injected as a fresh user message
|
|
516
|
+
// on the next turn (see project-sessions.js ask_user_response).
|
|
517
|
+
// This avoids HTTP long-poll timeouts on the MCP bridge and
|
|
518
|
+
// matches the natural multi-turn agent loop.
|
|
519
|
+
var session = sm.getActiveSession();
|
|
520
|
+
if (!session) {
|
|
521
|
+
// No active session means we have no way to show a card or
|
|
522
|
+
// route the answer. Fail closed rather than pretend success.
|
|
523
|
+
return Promise.resolve({
|
|
524
|
+
content: [{ type: "text", text: "Error: no active session in " + slug + "; cannot display question card." }],
|
|
525
|
+
isError: true,
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
if (session.loop && session.loop.active && session.loop.role !== "crafting") {
|
|
529
|
+
return Promise.resolve({
|
|
530
|
+
content: [{ type: "text", text: "Error: Autonomous mode. Make your own decision." }],
|
|
531
|
+
isError: true,
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
var toolId = "ask_" + Date.now() + "_" + crypto.randomUUID().slice(0, 8);
|
|
536
|
+
// Track for UI card lifecycle + answer routing. No resolve function.
|
|
537
|
+
session.pendingAskUser[toolId] = {
|
|
538
|
+
input: input,
|
|
539
|
+
mode: "mcp",
|
|
540
|
+
sessionId: session.localId,
|
|
541
|
+
postedAt: Date.now(),
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
sm.sendAndRecord(session, {
|
|
545
|
+
type: "tool_executing",
|
|
546
|
+
id: toolId,
|
|
547
|
+
name: "AskUserQuestion",
|
|
548
|
+
input: input,
|
|
549
|
+
});
|
|
550
|
+
|
|
551
|
+
return Promise.resolve({
|
|
552
|
+
content: [{
|
|
553
|
+
type: "text",
|
|
554
|
+
text: "The question card has been posted to the user. End this turn now without further commentary; the user's answer will arrive as the next user message.",
|
|
555
|
+
}],
|
|
556
|
+
});
|
|
557
|
+
});
|
|
558
|
+
var askUserMcpConfig = adapter.createToolServer({ name: "clay-ask-user", version: "1.0.0", tools: askUserToolDefs });
|
|
559
|
+
if (askUserMcpConfig) servers[askUserMcpConfig.name || "clay-ask-user"] = askUserMcpConfig;
|
|
560
|
+
} catch (e) {
|
|
561
|
+
console.error("[project] Failed to create ask-user MCP server:", e.message);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
|
|
485
565
|
// Browser MCP server (main project only, not mates)
|
|
486
566
|
if (!isMate) {
|
|
487
567
|
try {
|
|
@@ -537,6 +617,15 @@ function createProjectContext(opts) {
|
|
|
537
617
|
console.error("[project] Failed to create email MCP server:", e.message);
|
|
538
618
|
}
|
|
539
619
|
|
|
620
|
+
if (isMate) {
|
|
621
|
+
try {
|
|
622
|
+
var datastoreMcp = _mateDatastore.createMcpServer();
|
|
623
|
+
if (datastoreMcp) servers[datastoreMcp.name || "clay-datastore"] = datastoreMcp;
|
|
624
|
+
} catch (e) {
|
|
625
|
+
console.error("[project] Failed to create datastore MCP server:", e.message);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
|
|
540
629
|
return Object.keys(servers).length > 0 ? servers : undefined;
|
|
541
630
|
})();
|
|
542
631
|
|
|
@@ -719,7 +808,7 @@ function createProjectContext(opts) {
|
|
|
719
808
|
session.isProcessing = true;
|
|
720
809
|
onProcessingChanged();
|
|
721
810
|
sendToSession(session.localId, { type: "status", status: "processing" });
|
|
722
|
-
sdk.startQuery(session, text, null,
|
|
811
|
+
sdk.startQuery(session, text, null, ensureProjectAccessForSession(session));
|
|
723
812
|
sm.broadcastSessionList();
|
|
724
813
|
}, schedDelay),
|
|
725
814
|
};
|
|
@@ -878,6 +967,9 @@ function createProjectContext(opts) {
|
|
|
878
967
|
// --- MCP bridge (remote MCP servers via extension) ---
|
|
879
968
|
if (_mcp.handleMcpMessage(ws, msg)) return;
|
|
880
969
|
|
|
970
|
+
// --- Mate datastore ---
|
|
971
|
+
if (_mateDatastore.handleMateDatastoreMessage(ws, msg)) return;
|
|
972
|
+
|
|
881
973
|
// --- Knowledge file management (delegated to project-knowledge.js) ---
|
|
882
974
|
if (_knowledge.handleKnowledgeMessage(ws, msg)) return;
|
|
883
975
|
|
|
@@ -1050,6 +1142,7 @@ function createProjectContext(opts) {
|
|
|
1050
1142
|
pushModule: pushModule,
|
|
1051
1143
|
getSessionForWs: getSessionForWs,
|
|
1052
1144
|
getLinuxUserForSession: getLinuxUserForSession,
|
|
1145
|
+
ensureProjectAccessForSession: ensureProjectAccessForSession,
|
|
1053
1146
|
getOsUserInfoForWs: getOsUserInfoForWs,
|
|
1054
1147
|
hydrateImageRefs: hydrateImageRefs,
|
|
1055
1148
|
onProcessingChanged: onProcessingChanged,
|
|
@@ -1098,6 +1191,7 @@ function createProjectContext(opts) {
|
|
|
1098
1191
|
matesModule: matesModule,
|
|
1099
1192
|
getSessionForWs: getSessionForWs,
|
|
1100
1193
|
getLinuxUserForSession: getLinuxUserForSession,
|
|
1194
|
+
ensureProjectAccessForSession: ensureProjectAccessForSession,
|
|
1101
1195
|
getOsUserInfoForWs: getOsUserInfoForWs,
|
|
1102
1196
|
hydrateImageRefs: hydrateImageRefs,
|
|
1103
1197
|
saveImageFile: saveImageFile,
|
|
@@ -1292,12 +1386,31 @@ function createProjectContext(opts) {
|
|
|
1292
1386
|
getLatestVersion: function () { return latestVersion; },
|
|
1293
1387
|
getTitle: function () { return title; },
|
|
1294
1388
|
getProject: function () { return project; },
|
|
1389
|
+
// Exposed so the first websocket connection can lazily warm up the
|
|
1390
|
+
// adapters for this project (see project-connection handleConnection).
|
|
1391
|
+
warmup: function () {
|
|
1392
|
+
sdk.warmup();
|
|
1393
|
+
sdk.startIdleReaper();
|
|
1394
|
+
if (!osUsers && !sessionTitleMigrationScheduled) {
|
|
1395
|
+
sessionTitleMigrationScheduled = true;
|
|
1396
|
+
setTimeout(function () {
|
|
1397
|
+
try {
|
|
1398
|
+
sm.migrateSessionTitles(adapter, cwd);
|
|
1399
|
+
} catch (e) {
|
|
1400
|
+
console.error("[project] Session title migration failed for " + slug + ":", e && e.message ? e.message : e);
|
|
1401
|
+
}
|
|
1402
|
+
}, 5000);
|
|
1403
|
+
}
|
|
1404
|
+
},
|
|
1295
1405
|
});
|
|
1296
1406
|
|
|
1297
1407
|
// --- Destroy ---
|
|
1298
1408
|
function destroy() {
|
|
1299
1409
|
_loop.stopTimer();
|
|
1300
1410
|
_email.destroy();
|
|
1411
|
+
if (_mateDatastore && typeof _mateDatastore.closeAllDatastores === "function") {
|
|
1412
|
+
try { _mateDatastore.closeAllDatastores(); } catch (e) {}
|
|
1413
|
+
}
|
|
1301
1414
|
stopFileWatch();
|
|
1302
1415
|
stopAllDirWatches();
|
|
1303
1416
|
// Abort all active sessions and clean up mention sessions
|
|
@@ -1347,6 +1460,15 @@ function createProjectContext(opts) {
|
|
|
1347
1460
|
var tmpDir = path.join(os.tmpdir(), "clay-" + cwdHash);
|
|
1348
1461
|
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
1349
1462
|
} catch (e) {}
|
|
1463
|
+
|
|
1464
|
+
var codexShutdown = Promise.resolve(true);
|
|
1465
|
+
if (adapters && adapters.codex && typeof adapters.codex.shutdown === "function") {
|
|
1466
|
+
codexShutdown = adapters.codex.shutdown().catch(function(err) {
|
|
1467
|
+
console.error("[project] Codex shutdown failed for " + slug + ":", err && err.message ? err.message : err);
|
|
1468
|
+
return false;
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1471
|
+
return codexShutdown;
|
|
1350
1472
|
}
|
|
1351
1473
|
|
|
1352
1474
|
// --- Status info ---
|
|
@@ -1494,15 +1616,9 @@ function createProjectContext(opts) {
|
|
|
1494
1616
|
broadcastClientCount();
|
|
1495
1617
|
broadcastPresence();
|
|
1496
1618
|
},
|
|
1497
|
-
warmup: function () {
|
|
1498
|
-
sdk.warmup();
|
|
1499
|
-
sdk.startIdleReaper();
|
|
1500
|
-
// Migrate existing relay session titles to SDK format (one-time, async)
|
|
1501
|
-
sm.migrateSessionTitles(adapter, cwd);
|
|
1502
|
-
},
|
|
1503
1619
|
destroy: function () {
|
|
1504
1620
|
sdk.stopIdleReaper();
|
|
1505
|
-
destroy();
|
|
1621
|
+
return destroy();
|
|
1506
1622
|
},
|
|
1507
1623
|
};
|
|
1508
1624
|
}
|
package/lib/public/app.js
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
openMobileSheet, setMobileSheetMateData, refreshMobileChatSheet
|
|
19
19
|
} from './modules/sidebar-mobile.js';
|
|
20
20
|
import { initMateSidebar, showMateSidebar, hideMateSidebar, renderMateSessionList, updateMateSidebarProfile, handleMateSearchResults } from './modules/mate-sidebar.js';
|
|
21
|
+
import { initMateDatastoreUI } from './modules/mate-datastore-ui.js';
|
|
21
22
|
import { initMateKnowledge, requestKnowledgeList, renderKnowledgeList, handleKnowledgeContent, hideKnowledge } from './modules/mate-knowledge.js';
|
|
22
23
|
import { initMateMemory, renderMemoryList, hideMemory } from './modules/mate-memory.js';
|
|
23
24
|
import { initRewind, setRewindMode, showRewindModal, clearPendingRewindUuid, addRewindButton, onRewindComplete, onRewindError } from './modules/rewind.js';
|
|
@@ -405,6 +406,7 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
|
|
|
405
406
|
initSidebar(sidebarCtx);
|
|
406
407
|
var wsGetter = function () { return _getWsRef(); };
|
|
407
408
|
initMateSidebar(wsGetter);
|
|
409
|
+
initMateDatastoreUI(wsGetter);
|
|
408
410
|
initMateKnowledge(wsGetter);
|
|
409
411
|
initMateMemory(wsGetter, { onShow: function () { hideKnowledge(); hideNotes(); } });
|
|
410
412
|
initMateWizard(
|
package/lib/public/css/mates.css
CHANGED
|
@@ -410,18 +410,18 @@
|
|
|
410
410
|
line-height: 1.4;
|
|
411
411
|
}
|
|
412
412
|
|
|
413
|
-
/* Step 4:
|
|
414
|
-
.mate-
|
|
413
|
+
/* Step 4: Vendor options */
|
|
414
|
+
.mate-vendor-option-list {
|
|
415
415
|
display: flex;
|
|
416
416
|
flex-direction: column;
|
|
417
|
-
gap:
|
|
417
|
+
gap: 10px;
|
|
418
418
|
}
|
|
419
|
-
.mate-
|
|
419
|
+
.mate-vendor-option-btn {
|
|
420
420
|
display: flex;
|
|
421
|
-
flex-direction:
|
|
421
|
+
flex-direction: row;
|
|
422
422
|
align-items: flex-start;
|
|
423
|
-
gap:
|
|
424
|
-
padding:
|
|
423
|
+
gap: 14px;
|
|
424
|
+
padding: 14px 16px;
|
|
425
425
|
background: var(--input-bg, #1a1a2e);
|
|
426
426
|
border: 2px solid var(--border, #333);
|
|
427
427
|
border-radius: 10px;
|
|
@@ -430,21 +430,36 @@
|
|
|
430
430
|
text-align: left;
|
|
431
431
|
color: var(--text, #fff);
|
|
432
432
|
font-family: inherit;
|
|
433
|
+
width: 100%;
|
|
433
434
|
}
|
|
434
|
-
.mate-
|
|
435
|
+
.mate-vendor-option-btn:hover {
|
|
435
436
|
border-color: var(--text-dimmer, #6272a4);
|
|
436
437
|
}
|
|
437
|
-
.mate-
|
|
438
|
+
.mate-vendor-option-btn.active {
|
|
438
439
|
border-color: var(--accent, #6c5ce7);
|
|
439
440
|
background: var(--accent-bg, rgba(108,92,231,0.12));
|
|
440
441
|
}
|
|
441
|
-
.mate-
|
|
442
|
+
.mate-vendor-option-icon {
|
|
443
|
+
width: 36px;
|
|
444
|
+
height: 36px;
|
|
445
|
+
border-radius: 8px;
|
|
446
|
+
flex-shrink: 0;
|
|
447
|
+
object-fit: cover;
|
|
448
|
+
}
|
|
449
|
+
.mate-vendor-option-text {
|
|
450
|
+
display: flex;
|
|
451
|
+
flex-direction: column;
|
|
452
|
+
gap: 4px;
|
|
453
|
+
min-width: 0;
|
|
454
|
+
}
|
|
455
|
+
.mate-vendor-option-title {
|
|
442
456
|
font-weight: 600;
|
|
443
457
|
font-size: 14px;
|
|
444
458
|
}
|
|
445
|
-
.mate-
|
|
459
|
+
.mate-vendor-option-desc {
|
|
446
460
|
font-size: 12px;
|
|
447
461
|
color: var(--text-muted, #9ea8c7);
|
|
462
|
+
line-height: 1.4;
|
|
448
463
|
}
|
|
449
464
|
|
|
450
465
|
/* Footer */
|
|
@@ -1884,6 +1899,11 @@ body.mate-dm-active #layout.sidebar-collapsed .mate-collapsed-info {
|
|
|
1884
1899
|
height: 16px;
|
|
1885
1900
|
}
|
|
1886
1901
|
|
|
1902
|
+
.mate-sidebar-actions button.active {
|
|
1903
|
+
background: var(--bg-hover, rgba(255,255,255,0.1));
|
|
1904
|
+
color: var(--text-primary, #fff);
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1887
1907
|
.mate-session-list {
|
|
1888
1908
|
flex: 1;
|
|
1889
1909
|
overflow-y: auto;
|
|
@@ -1990,6 +2010,203 @@ body.mate-dm-active #layout.sidebar-collapsed .mate-collapsed-info {
|
|
|
1990
2010
|
#mate-search-session-btn.active {
|
|
1991
2011
|
color: var(--accent);
|
|
1992
2012
|
}
|
|
2013
|
+
|
|
2014
|
+
/* Mate datastore inspector */
|
|
2015
|
+
#mate-datastore-panel {
|
|
2016
|
+
position: absolute;
|
|
2017
|
+
inset: 0;
|
|
2018
|
+
z-index: 40;
|
|
2019
|
+
background: var(--bg);
|
|
2020
|
+
display: flex;
|
|
2021
|
+
flex-direction: column;
|
|
2022
|
+
overflow: hidden;
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
#mate-datastore-panel.hidden {
|
|
2026
|
+
display: none !important;
|
|
2027
|
+
}
|
|
2028
|
+
|
|
2029
|
+
#main-column.mate-datastore-open > .title-bar-content,
|
|
2030
|
+
#main-column.mate-datastore-open > .dm-header-bar,
|
|
2031
|
+
#main-column.mate-datastore-open > #main-panels {
|
|
2032
|
+
display: none !important;
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
.mate-datastore-top-bar {
|
|
2036
|
+
display: flex;
|
|
2037
|
+
align-items: center;
|
|
2038
|
+
justify-content: space-between;
|
|
2039
|
+
height: 48px;
|
|
2040
|
+
padding: 0 16px;
|
|
2041
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
2042
|
+
flex-shrink: 0;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
.mate-datastore-top-title {
|
|
2046
|
+
display: flex;
|
|
2047
|
+
align-items: center;
|
|
2048
|
+
gap: 6px;
|
|
2049
|
+
font-weight: 700;
|
|
2050
|
+
font-size: 15px;
|
|
2051
|
+
color: var(--text);
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
.mate-datastore-top-title .lucide {
|
|
2055
|
+
width: 14px;
|
|
2056
|
+
height: 14px;
|
|
2057
|
+
color: var(--accent);
|
|
2058
|
+
opacity: 0.85;
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
.mate-datastore-top-actions {
|
|
2062
|
+
display: flex;
|
|
2063
|
+
align-items: center;
|
|
2064
|
+
gap: 8px;
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
.mate-db-status {
|
|
2068
|
+
padding: 10px 14px 0;
|
|
2069
|
+
font-size: 12px;
|
|
2070
|
+
color: var(--text-secondary, #8e8e8e);
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
.mate-db-status[data-kind="error"] {
|
|
2074
|
+
color: var(--error, #ff6b6b);
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
.mate-db-status[data-kind="warn"] {
|
|
2078
|
+
color: var(--warning, #f5a524);
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
.mate-db-status[data-kind="ok"] {
|
|
2082
|
+
color: var(--success, #36b37e);
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
.mate-db-layout {
|
|
2086
|
+
display: grid;
|
|
2087
|
+
grid-template-columns: 220px minmax(0, 1fr);
|
|
2088
|
+
gap: 10px;
|
|
2089
|
+
padding: 12px 10px 10px;
|
|
2090
|
+
min-height: 0;
|
|
2091
|
+
flex: 1;
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
.mate-db-table-column,
|
|
2095
|
+
.mate-db-detail {
|
|
2096
|
+
min-height: 0;
|
|
2097
|
+
display: flex;
|
|
2098
|
+
flex-direction: column;
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
.mate-db-table-list {
|
|
2102
|
+
overflow-y: auto;
|
|
2103
|
+
border: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
|
|
2104
|
+
border-radius: 12px;
|
|
2105
|
+
background: var(--sidebar-bg, rgba(255,255,255,0.03));
|
|
2106
|
+
padding: 6px;
|
|
2107
|
+
flex: 1;
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2110
|
+
.mate-db-table-item {
|
|
2111
|
+
width: 100%;
|
|
2112
|
+
display: flex;
|
|
2113
|
+
justify-content: space-between;
|
|
2114
|
+
gap: 6px;
|
|
2115
|
+
padding: 8px 10px;
|
|
2116
|
+
border: none;
|
|
2117
|
+
background: transparent;
|
|
2118
|
+
color: var(--text-secondary, #aaa);
|
|
2119
|
+
border-radius: 8px;
|
|
2120
|
+
text-align: left;
|
|
2121
|
+
cursor: pointer;
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
.mate-db-table-item:hover,
|
|
2125
|
+
.mate-db-table-item.active {
|
|
2126
|
+
background: var(--sidebar-active, rgba(255,255,255,0.08));
|
|
2127
|
+
color: var(--text, #fff);
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
.mate-db-table-item-name {
|
|
2131
|
+
overflow: hidden;
|
|
2132
|
+
text-overflow: ellipsis;
|
|
2133
|
+
white-space: nowrap;
|
|
2134
|
+
min-width: 0;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
.mate-db-table-item-type {
|
|
2138
|
+
font-size: 10px;
|
|
2139
|
+
text-transform: uppercase;
|
|
2140
|
+
letter-spacing: 0.05em;
|
|
2141
|
+
opacity: 0.7;
|
|
2142
|
+
flex-shrink: 0;
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
.mate-db-empty {
|
|
2146
|
+
padding: 16px 10px;
|
|
2147
|
+
color: var(--text-secondary, #8e8e8e);
|
|
2148
|
+
font-size: 12px;
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
.mate-db-section-title {
|
|
2152
|
+
font-size: 11px;
|
|
2153
|
+
font-weight: 700;
|
|
2154
|
+
text-transform: uppercase;
|
|
2155
|
+
letter-spacing: 0.08em;
|
|
2156
|
+
color: var(--text-muted, #9aa0a6);
|
|
2157
|
+
margin: 0 0 6px;
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2160
|
+
.mate-db-detail {
|
|
2161
|
+
gap: 8px;
|
|
2162
|
+
min-width: 0;
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
.mate-db-table-schema,
|
|
2166
|
+
.mate-db-result {
|
|
2167
|
+
margin: 0;
|
|
2168
|
+
padding: 10px;
|
|
2169
|
+
border-radius: 10px;
|
|
2170
|
+
border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
|
|
2171
|
+
background: var(--bg-alt, rgba(255,255,255,0.03));
|
|
2172
|
+
color: var(--text-secondary, #b8b8b8);
|
|
2173
|
+
font-size: 11px;
|
|
2174
|
+
line-height: 1.5;
|
|
2175
|
+
overflow: auto;
|
|
2176
|
+
white-space: pre-wrap;
|
|
2177
|
+
word-break: break-word;
|
|
2178
|
+
min-height: 0;
|
|
2179
|
+
}
|
|
2180
|
+
|
|
2181
|
+
.mate-db-table-schema {
|
|
2182
|
+
max-height: 180px;
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
@media (max-width: 900px) {
|
|
2186
|
+
.mate-db-layout {
|
|
2187
|
+
grid-template-columns: 1fr;
|
|
2188
|
+
}
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
body.mate-dm-active .mate-datastore-top-bar {
|
|
2192
|
+
background: var(--mate-color);
|
|
2193
|
+
color: #fff;
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
body.mate-dm-active .mate-datastore-top-title,
|
|
2197
|
+
body.mate-dm-active .mate-datastore-top-title .lucide {
|
|
2198
|
+
color: #fff;
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
body.mate-dm-active .mate-datastore-top-bar .scheduler-close-btn {
|
|
2202
|
+
color: rgba(255, 255, 255, 0.85);
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
body.mate-dm-active .mate-datastore-top-bar .scheduler-close-btn:hover {
|
|
2206
|
+
color: #fff;
|
|
2207
|
+
background: rgba(255, 255, 255, 0.15);
|
|
2208
|
+
}
|
|
2209
|
+
|
|
1993
2210
|
.mate-session-item.search-match {
|
|
1994
2211
|
background: var(--accent-12, rgba(108, 92, 231, 0.12));
|
|
1995
2212
|
}
|
|
@@ -1233,6 +1233,29 @@ pre.mermaid-error {
|
|
|
1233
1233
|
.plan-card-body strong { font-weight: 600; }
|
|
1234
1234
|
.plan-card-body blockquote { border-left: 3px solid var(--border); padding-left: 12px; color: var(--text-muted); margin: 8px 0; }
|
|
1235
1235
|
|
|
1236
|
+
.todo-widget.todo-widget-plan .todo-header {
|
|
1237
|
+
background: linear-gradient(180deg, rgba(var(--overlay-rgb), 0.04), rgba(var(--overlay-rgb), 0.015));
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
.todo-widget.todo-widget-plan .todo-header-icon,
|
|
1241
|
+
.todo-widget.todo-widget-plan .todo-header-title {
|
|
1242
|
+
color: var(--accent);
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
.todo-widget.todo-widget-plan .todo-header-count {
|
|
1246
|
+
color: var(--text-muted);
|
|
1247
|
+
font-weight: 500;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
.todo-widget.todo-widget-plan .todo-item.pending .todo-item-icon {
|
|
1251
|
+
opacity: 0.75;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
.todo-widget.todo-widget-plan .todo-item.in-progress .todo-item-text {
|
|
1255
|
+
color: var(--text);
|
|
1256
|
+
font-weight: 500;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1236
1259
|
/* --- Plan permission (ExitPlanMode) --- */
|
|
1237
1260
|
.plan-permission-header {
|
|
1238
1261
|
background: var(--success-8) !important;
|
|
@@ -526,20 +526,6 @@
|
|
|
526
526
|
white-space: nowrap;
|
|
527
527
|
}
|
|
528
528
|
|
|
529
|
-
.mobile-session-bookmark {
|
|
530
|
-
display: inline-flex;
|
|
531
|
-
align-items: center;
|
|
532
|
-
color: var(--accent, #ff7b54);
|
|
533
|
-
flex-shrink: 0;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
.mobile-session-bookmark .lucide,
|
|
537
|
-
.mobile-session-bookmark svg {
|
|
538
|
-
width: 13px;
|
|
539
|
-
height: 13px;
|
|
540
|
-
display: block;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
529
|
.mobile-session-processing {
|
|
544
530
|
width: 7px;
|
|
545
531
|
height: 7px;
|
|
@@ -307,6 +307,86 @@
|
|
|
307
307
|
.notif-banner-update-now:hover { opacity: 0.85; }
|
|
308
308
|
.notif-banner-update-now:disabled { opacity: 0.6; cursor: default; }
|
|
309
309
|
|
|
310
|
+
.light-theme .notif-banner-clear-all {
|
|
311
|
+
background:
|
|
312
|
+
linear-gradient(180deg, rgba(255,255,255,0.54), rgba(255,255,255,0.28)),
|
|
313
|
+
rgba(248,250,255,0.22);
|
|
314
|
+
backdrop-filter: blur(10px) saturate(1.08);
|
|
315
|
+
-webkit-backdrop-filter: blur(10px) saturate(1.08);
|
|
316
|
+
border-color: rgba(255,255,255,0.52);
|
|
317
|
+
color: rgba(36, 45, 66, 0.72);
|
|
318
|
+
box-shadow:
|
|
319
|
+
inset 0 1px 0 rgba(255,255,255,0.78),
|
|
320
|
+
0 8px 22px rgba(31, 41, 55, 0.07);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.light-theme .notif-banner-clear-all:hover {
|
|
324
|
+
color: rgba(22, 29, 45, 0.92);
|
|
325
|
+
background:
|
|
326
|
+
linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.34)),
|
|
327
|
+
rgba(248,250,255,0.26);
|
|
328
|
+
border-color: rgba(255,255,255,0.6);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.light-theme .notif-banner {
|
|
332
|
+
background:
|
|
333
|
+
linear-gradient(180deg, rgba(255,255,255,0.58), rgba(255,255,255,0.22)),
|
|
334
|
+
rgba(248,250,255,0.2);
|
|
335
|
+
backdrop-filter: blur(12px) saturate(1.05);
|
|
336
|
+
-webkit-backdrop-filter: blur(12px) saturate(1.05);
|
|
337
|
+
border: 1px solid rgba(255,255,255,0.5);
|
|
338
|
+
box-shadow:
|
|
339
|
+
inset 0 1px 0 rgba(255,255,255,0.72),
|
|
340
|
+
0 10px 30px rgba(31, 41, 55, 0.09);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.light-theme .notif-banner:hover {
|
|
344
|
+
border-color: rgba(255,255,255,0.62);
|
|
345
|
+
box-shadow:
|
|
346
|
+
inset 0 1px 0 rgba(255,255,255,0.8),
|
|
347
|
+
0 12px 34px rgba(31, 41, 55, 0.11);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.light-theme .notif-banner-icon {
|
|
351
|
+
background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(246,249,255,0.36));
|
|
352
|
+
border-color: rgba(255,255,255,0.52);
|
|
353
|
+
color: var(--text-secondary);
|
|
354
|
+
box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.light-theme .notif-banner-project {
|
|
358
|
+
color: rgba(50, 62, 86, 0.74);
|
|
359
|
+
text-shadow: 0 1px 0 rgba(255,255,255,0.72);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.light-theme .notif-banner-title {
|
|
363
|
+
color: rgba(18, 24, 38, 0.95);
|
|
364
|
+
text-shadow: 0 1px 0 rgba(255,255,255,0.72);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.light-theme .notif-banner-text {
|
|
368
|
+
color: rgba(61, 73, 96, 0.76);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.light-theme .notif-banner-update .notif-banner-project,
|
|
372
|
+
.light-theme .notif-banner-auth .notif-banner-project {
|
|
373
|
+
color: rgba(50, 62, 86, 0.74);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.light-theme .notif-banner-auth .notif-banner-title,
|
|
377
|
+
.light-theme .notif-banner-update .notif-banner-title {
|
|
378
|
+
text-shadow: 0 1px 0 rgba(255,255,255,0.76);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.light-theme .notif-banner-close,
|
|
382
|
+
.light-theme .notif-banner-close:hover {
|
|
383
|
+
background: rgba(244, 246, 250, 0.98);
|
|
384
|
+
color: rgba(44, 52, 68, 0.88);
|
|
385
|
+
box-shadow:
|
|
386
|
+
0 2px 6px rgba(31, 41, 55, 0.12),
|
|
387
|
+
inset 0 1px 0 rgba(255,255,255,0.88);
|
|
388
|
+
}
|
|
389
|
+
|
|
310
390
|
/* ========================================================
|
|
311
391
|
Mobile
|
|
312
392
|
======================================================== */
|