@mmmbuto/nexuscrew 0.8.0 → 0.8.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/README.md +66 -60
- package/bin/nexuscrew.js +10 -4
- package/frontend/dist/assets/index-BFyPeZsL.js +90 -0
- package/frontend/dist/assets/index-COsoJxXQ.css +32 -0
- package/frontend/dist/assets/qr-scanner-worker.min-D85Z9gVD.js +98 -0
- package/frontend/dist/index.html +2 -2
- package/frontend/dist/version.json +1 -1
- package/lib/cli/commands.js +314 -110
- package/lib/cli/doctor.js +1 -1
- package/lib/cli/init.js +40 -10
- package/lib/cli/pidfile.js +2 -2
- package/lib/cli/service.js +0 -5
- package/lib/decks/store.js +8 -2
- package/lib/files/routes.js +3 -1
- package/lib/fleet/builtin.js +15 -5
- package/lib/fleet/managed.js +278 -107
- package/lib/mcp/server.js +24 -5
- package/lib/nodes/commands.js +27 -12
- package/lib/nodes/peering.js +116 -0
- package/lib/nodes/store.js +91 -24
- package/lib/nodes/topology-cache.js +75 -0
- package/lib/nodes/tunnel.js +22 -7
- package/lib/proxy/federation.js +263 -0
- package/lib/proxy/node-proxy.js +21 -8
- package/lib/server.js +91 -7
- package/lib/settings/routes.js +221 -5
- package/package.json +2 -2
- package/frontend/dist/assets/index-BBOgTCoO.css +0 -32
- package/frontend/dist/assets/index-DQrDBogT.js +0 -83
package/lib/settings/routes.js
CHANGED
|
@@ -44,17 +44,19 @@ const express = require('express');
|
|
|
44
44
|
|
|
45
45
|
const nodesStore = require('../nodes/store.js');
|
|
46
46
|
const nodesCmds = require('../nodes/commands.js');
|
|
47
|
+
const nodesTunnel = require('../nodes/tunnel.js');
|
|
48
|
+
const peering = require('../nodes/peering.js');
|
|
47
49
|
const { rotateToken } = require('../auth/token.js');
|
|
48
50
|
const { generateService, installService, installPath: svcInstallPath } = require('../cli/service.js');
|
|
49
51
|
const { detectPlatform, nodeBin, repoRoot, uid } = require('../cli/platform.js');
|
|
50
|
-
const { isServiceRunning, readRoles } = require('../cli/commands.js');
|
|
52
|
+
const { isServiceRunning, readRoles, bootState } = require('../cli/commands.js');
|
|
51
53
|
const { configJsonPath } = require('../config.js');
|
|
52
54
|
const VERSION = require('../../package.json').version;
|
|
53
55
|
|
|
54
56
|
// Whitelist chiavi scrivibili di config.json via API (lista chiusa dal task B2).
|
|
55
57
|
const CONFIG_KEYS = new Set(['roles', 'port', 'wizardDone']);
|
|
56
58
|
const ROLE_KEYS = new Set(['client', 'node']);
|
|
57
|
-
const ADD_KEYS = new Set(['name', 'ssh', 'remotePort', 'localPort', 'keyPath']);
|
|
59
|
+
const ADD_KEYS = new Set(['name', 'ssh', 'sshPort', 'remotePort', 'localPort', 'keyPath']);
|
|
58
60
|
const NODE_ROLE_KEYS = new Set(['enabled', 'rendezvousSsh', 'publishedPort', 'keyPath']);
|
|
59
61
|
|
|
60
62
|
// Cintura §4b(3): rimozione ricorsiva di ogni chiave `token` da QUALUNQUE payload
|
|
@@ -137,6 +139,8 @@ function settingsRoutes(deps = {}) {
|
|
|
137
139
|
const configPath = cfg.configPath || configJsonPath();
|
|
138
140
|
const nodesPath = deps.nodesPath || cfg.nodesPath || nodesStore.defaultNodesPath(home);
|
|
139
141
|
const tokenPath = cfg.tokenPath || path.join(configDir, 'token');
|
|
142
|
+
const invitesPath = cfg.invitesPath || peering.defaultInvitesPath(home);
|
|
143
|
+
const pendingPath = cfg.pendingPairingsPath || peering.defaultPendingPath(home);
|
|
140
144
|
const platform = seams.platform || detectPlatform();
|
|
141
145
|
|
|
142
146
|
const r = express.Router();
|
|
@@ -174,6 +178,7 @@ function settingsRoutes(deps = {}) {
|
|
|
174
178
|
const service = {
|
|
175
179
|
installed: fs.existsSync(svcPath),
|
|
176
180
|
active: isServiceRunning({ platform, execImpl: seams.execImpl, uid: seams.uid, home }),
|
|
181
|
+
boot: bootState({ platform, execImpl: seams.execImpl, uid: seams.uid, home }).enabled,
|
|
177
182
|
};
|
|
178
183
|
const out = {
|
|
179
184
|
roles: readRoles(configPath),
|
|
@@ -267,6 +272,120 @@ function settingsRoutes(deps = {}) {
|
|
|
267
272
|
} catch (e) { send(res, 500, { error: String(e.message || e) }); }
|
|
268
273
|
});
|
|
269
274
|
|
|
275
|
+
// One-time PWA pairing capability. It is not the UI bearer token and is
|
|
276
|
+
// persisted hashed, 0600, for ten minutes only.
|
|
277
|
+
r.post('/peering/invite', mutGate, (_req, res) => {
|
|
278
|
+
try {
|
|
279
|
+
const st = nodesStore.loadOrInitStore(nodesPath);
|
|
280
|
+
send(res, 200, peering.createInvite({
|
|
281
|
+
invitesPath, instanceId: st.nodeId, port: cfg.port, label: os.hostname(),
|
|
282
|
+
}));
|
|
283
|
+
} catch (e) { send(res, 500, { error: String(e.message || e) }); }
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
// Hydra join: add once from the PWA. A provisional -L reaches the invite
|
|
287
|
+
// endpoint, then the negotiated -R makes the same SSH link reciprocal.
|
|
288
|
+
r.post('/nodes/pair', mutGate, async (req, res) => {
|
|
289
|
+
const b = req.body || {};
|
|
290
|
+
if (!validName(b.name) || !nodesStore.parseSshTarget(b.ssh)) {
|
|
291
|
+
return send(res, 400, { error: 'name o alias SSH non valido' });
|
|
292
|
+
}
|
|
293
|
+
const pair = peering.parsePairingUrl(b.pairingUrl);
|
|
294
|
+
if (!pair) return send(res, 400, { error: 'link di pairing non valido' });
|
|
295
|
+
if (b.sshPort !== undefined && !nodesStore.isPort(b.sshPort)) return send(res, 400, { error: 'sshPort non valida' });
|
|
296
|
+
if (b.identityFile !== undefined && !nodesStore.isAbsPath(b.identityFile)) return send(res, 400, { error: 'identityFile non valido' });
|
|
297
|
+
let provisionalPort = null;
|
|
298
|
+
let rollbackCredential = null;
|
|
299
|
+
let created = false;
|
|
300
|
+
try {
|
|
301
|
+
let st = nodesStore.loadOrInitStore(nodesPath);
|
|
302
|
+
const localPort = nodesCmds.assignLocalPort(st);
|
|
303
|
+
provisionalPort = localPort;
|
|
304
|
+
const acceptToken = crypto.randomBytes(32).toString('base64url');
|
|
305
|
+
st = nodesStore.addNode(st, {
|
|
306
|
+
name: b.name, ssh: b.ssh, sshPort: b.sshPort,
|
|
307
|
+
remotePort: pair.port, localPort, identityFile: b.identityFile,
|
|
308
|
+
transport: 'auto', autostart: true, visibility: 'network',
|
|
309
|
+
direction: 'outbound', acceptToken,
|
|
310
|
+
});
|
|
311
|
+
nodesStore.atomicWriteStore(nodesPath, st);
|
|
312
|
+
created = true;
|
|
313
|
+
const node = nodesStore.getNode(st, b.name);
|
|
314
|
+
const started = nodesTunnel.startForward({
|
|
315
|
+
home, node, localAppPort: cfg.port,
|
|
316
|
+
spawnImpl: seams.spawnImpl, spawnSyncImpl: seams.spawnSyncImpl,
|
|
317
|
+
sshBin: seams.sshBin, logFd: seams.logFd,
|
|
318
|
+
});
|
|
319
|
+
if (!started.started && started.reason !== 'already running') throw new Error(started.reason || 'tunnel start failed');
|
|
320
|
+
if (typeof seams.pairDelay === 'function') await seams.pairDelay();
|
|
321
|
+
else await new Promise((resolve) => setTimeout(resolve, 900));
|
|
322
|
+
const fetchImpl = seams.fetchImpl || fetch;
|
|
323
|
+
const jr = await fetchImpl(`http://127.0.0.1:${localPort}/pair/join`, {
|
|
324
|
+
method: 'POST', headers: { 'content-type': 'application/json' },
|
|
325
|
+
body: JSON.stringify({
|
|
326
|
+
invite: pair.invite,
|
|
327
|
+
instanceId: st.nodeId,
|
|
328
|
+
name: String(b.localName || os.hostname()).toLowerCase().replace(/[^a-z0-9-]+/g, '-').replace(/^-|-$/g, '').slice(0, 32) || 'node',
|
|
329
|
+
port: cfg.port,
|
|
330
|
+
acceptToken,
|
|
331
|
+
}),
|
|
332
|
+
});
|
|
333
|
+
const joined = await jr.json().catch(() => ({}));
|
|
334
|
+
if (!jr.ok || !nodesStore.validToken(joined.credential) || !nodesStore.isPort(joined.reversePort)
|
|
335
|
+
|| !nodesStore.NODE_ID_RE.test(joined.instanceId)) throw new Error(joined.error || `pairing HTTP ${jr.status}`);
|
|
336
|
+
rollbackCredential = joined.credential;
|
|
337
|
+
st = nodesStore.loadOrInitStore(nodesPath);
|
|
338
|
+
st = nodesStore.updateNode(st, b.name, {
|
|
339
|
+
token: joined.credential, nodeId: joined.instanceId, reversePort: joined.reversePort,
|
|
340
|
+
});
|
|
341
|
+
nodesStore.atomicWriteStore(nodesPath, st);
|
|
342
|
+
nodesTunnel.stopTunnel({ home, name: b.name });
|
|
343
|
+
const finalStart = nodesTunnel.startForward({
|
|
344
|
+
home, node: nodesStore.getNode(st, b.name), localAppPort: cfg.port,
|
|
345
|
+
spawnImpl: seams.spawnImpl, spawnSyncImpl: seams.spawnSyncImpl,
|
|
346
|
+
sshBin: seams.sshBin, logFd: seams.logFd,
|
|
347
|
+
});
|
|
348
|
+
if (!finalStart.started && finalStart.reason !== 'already running') throw new Error(finalStart.reason || 'final tunnel start failed');
|
|
349
|
+
if (typeof seams.pairDelay === 'function') await seams.pairDelay();
|
|
350
|
+
else await new Promise((resolve) => setTimeout(resolve, 900));
|
|
351
|
+
let confirmed = null;
|
|
352
|
+
for (let attempt = 0; attempt < 3; attempt += 1) {
|
|
353
|
+
try {
|
|
354
|
+
confirmed = await fetchImpl(`http://127.0.0.1:${localPort}/pair/confirm`, {
|
|
355
|
+
method: 'POST', headers: { 'content-type': 'application/json' },
|
|
356
|
+
body: JSON.stringify({ credential: joined.credential }),
|
|
357
|
+
});
|
|
358
|
+
if (confirmed.ok) break;
|
|
359
|
+
} catch (_) {}
|
|
360
|
+
await new Promise((resolve) => setTimeout(resolve, 400 * (attempt + 1)));
|
|
361
|
+
}
|
|
362
|
+
if (!confirmed || !confirmed.ok) {
|
|
363
|
+
const x = confirmed ? await confirmed.json().catch(() => ({})) : {};
|
|
364
|
+
throw new Error(x.error || `pair confirm HTTP ${confirmed ? confirmed.status : 'unreachable'}`);
|
|
365
|
+
}
|
|
366
|
+
send(res, 200, { paired: true, name: b.name, instanceId: joined.instanceId, transport: 'auto' });
|
|
367
|
+
} catch (e) {
|
|
368
|
+
if (rollbackCredential && provisionalPort) {
|
|
369
|
+
try {
|
|
370
|
+
const fetchImpl = seams.fetchImpl || fetch;
|
|
371
|
+
await fetchImpl(`http://127.0.0.1:${provisionalPort}/pair/cancel`, {
|
|
372
|
+
method: 'POST', headers: { 'content-type': 'application/json' },
|
|
373
|
+
body: JSON.stringify({ instanceId: (nodesStore.loadStore(nodesPath) || {}).nodeId, credential: rollbackCredential }),
|
|
374
|
+
});
|
|
375
|
+
} catch (_) {}
|
|
376
|
+
}
|
|
377
|
+
try {
|
|
378
|
+
const st = nodesStore.loadStore(nodesPath);
|
|
379
|
+
const n = st && nodesStore.getNode(st, b.name);
|
|
380
|
+
if (n && created) {
|
|
381
|
+
nodesTunnel.stopTunnel({ home, name: b.name });
|
|
382
|
+
nodesStore.atomicWriteStore(nodesPath, nodesStore.removeNode(st, b.name));
|
|
383
|
+
}
|
|
384
|
+
} catch (_) {}
|
|
385
|
+
send(res, 502, { error: String(e.message || e) });
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
|
|
270
389
|
// --- POST /nodes — nodes add (riusa nodesCmds.nodesAdd) --------------------
|
|
271
390
|
r.post('/nodes', mutGate, (req, res) => {
|
|
272
391
|
try {
|
|
@@ -275,10 +394,13 @@ function settingsRoutes(deps = {}) {
|
|
|
275
394
|
return send(res, 400, { error: 'body deve essere un oggetto JSON' });
|
|
276
395
|
}
|
|
277
396
|
for (const k of Object.keys(b)) {
|
|
278
|
-
if (!ADD_KEYS.has(k)) return send(res, 400, { error: `chiave non ammessa: "${k}" (schema: name, ssh, remotePort?, localPort?, keyPath?)` });
|
|
397
|
+
if (!ADD_KEYS.has(k)) return send(res, 400, { error: `chiave non ammessa: "${k}" (schema: name, ssh, sshPort?, remotePort?, localPort?, keyPath?)` });
|
|
279
398
|
}
|
|
280
399
|
if (!validName(b.name)) return send(res, 400, { error: 'name non valido (^[a-z0-9-]{1,32}$)' });
|
|
281
400
|
if (!nodesStore.parseSsh(b.ssh)) return send(res, 400, { error: 'ssh non valido (atteso user@host strict)' });
|
|
401
|
+
if (b.sshPort !== undefined && !nodesStore.isPort(b.sshPort)) {
|
|
402
|
+
return send(res, 400, { error: 'sshPort deve essere un intero 1..65535' });
|
|
403
|
+
}
|
|
282
404
|
if (b.remotePort !== undefined && !nodesStore.isPort(b.remotePort)) {
|
|
283
405
|
return send(res, 400, { error: 'remotePort deve essere un intero 1..65535' });
|
|
284
406
|
}
|
|
@@ -292,13 +414,14 @@ function settingsRoutes(deps = {}) {
|
|
|
292
414
|
const cap = capture();
|
|
293
415
|
const out = nodesCmds.nodesAdd({
|
|
294
416
|
...cliOpts(cap),
|
|
295
|
-
name: b.name, ssh: b.ssh,
|
|
417
|
+
name: b.name, ssh: b.ssh, sshPort: b.sshPort,
|
|
296
418
|
remotePort: b.remotePort, localPort: b.localPort, key: b.keyPath,
|
|
297
419
|
});
|
|
298
420
|
if (out.code === 0) {
|
|
299
421
|
return send(res, 200, {
|
|
300
422
|
added: true,
|
|
301
423
|
name: out.name,
|
|
424
|
+
sshPort: out.sshPort,
|
|
302
425
|
remotePort: out.remotePort,
|
|
303
426
|
localPort: out.localPort,
|
|
304
427
|
// La riga authorized_keys NON e' un segreto: pubkey con restrict/permitopen.
|
|
@@ -376,6 +499,20 @@ function settingsRoutes(deps = {}) {
|
|
|
376
499
|
r.post('/nodes/:name/up', mutGate, lifecycleHandler('up'));
|
|
377
500
|
r.post('/nodes/:name/down', mutGate, lifecycleHandler('down'));
|
|
378
501
|
r.post('/nodes/:name/restart', mutGate, lifecycleHandler('restart'));
|
|
502
|
+
r.patch('/nodes/:name/visibility', mutGate, (req, res) => {
|
|
503
|
+
try {
|
|
504
|
+
const name = String(req.params.name || '');
|
|
505
|
+
const visibility = req.body && req.body.visibility;
|
|
506
|
+
const selected = (req.body && req.body.selected) || [];
|
|
507
|
+
if (!validName(name) || !['network', 'relay-only', 'selected'].includes(visibility)) {
|
|
508
|
+
return send(res, 400, { error: 'visibility non valida' });
|
|
509
|
+
}
|
|
510
|
+
let st = nodesStore.loadOrInitStore(nodesPath);
|
|
511
|
+
st = nodesStore.updateNode(st, name, { visibility, selected: visibility === 'selected' ? selected : [] });
|
|
512
|
+
nodesStore.atomicWriteStore(nodesPath, st);
|
|
513
|
+
send(res, 200, { saved: true, name, visibility });
|
|
514
|
+
} catch (e) { send(res, 400, { error: String(e.message || e) }); }
|
|
515
|
+
});
|
|
379
516
|
|
|
380
517
|
// --- POST /node-role — node on/off (rendezvous config) ---------------------
|
|
381
518
|
r.post('/node-role', mutGate, (req, res) => {
|
|
@@ -432,6 +569,9 @@ function settingsRoutes(deps = {}) {
|
|
|
432
569
|
// dall'API (la UI avvisa di riavviare a mano).
|
|
433
570
|
r.post('/service/regenerate', mutGate, (_req, res) => {
|
|
434
571
|
try {
|
|
572
|
+
if (!bootState({ platform, execImpl: seams.execImpl, uid: seams.uid, home }).enabled) {
|
|
573
|
+
return send(res, 409, { error: 'boot non abilitato: usa `nexuscrew boot`' });
|
|
574
|
+
}
|
|
435
575
|
const { cfg: fileCfg } = readConfigFile(configPath);
|
|
436
576
|
const port = nodesStore.isPort(fileCfg.port) ? fileCfg.port : cfg.port;
|
|
437
577
|
const ctx = {
|
|
@@ -470,4 +610,80 @@ function settingsRoutes(deps = {}) {
|
|
|
470
610
|
return r;
|
|
471
611
|
}
|
|
472
612
|
|
|
473
|
-
|
|
613
|
+
// Public only because the one-time invite itself is the capability. The route
|
|
614
|
+
// exposes no generic API and creates a scoped peer credential, never a UI token.
|
|
615
|
+
function publicPeeringRoutes(deps = {}) {
|
|
616
|
+
const cfg = deps.cfg || {};
|
|
617
|
+
const home = cfg.home || os.homedir();
|
|
618
|
+
const nodesPath = deps.nodesPath || cfg.nodesPath || nodesStore.defaultNodesPath(home);
|
|
619
|
+
const invitesPath = cfg.invitesPath || peering.defaultInvitesPath(home);
|
|
620
|
+
const pendingPath = cfg.pendingPairingsPath || peering.defaultPendingPath(home);
|
|
621
|
+
const r = express.Router();
|
|
622
|
+
const attempts = new Map();
|
|
623
|
+
r.use(express.json({ limit: '8kb' }));
|
|
624
|
+
r.post('/join', (req, res) => {
|
|
625
|
+
const key = String(req.socket && req.socket.remoteAddress || 'local');
|
|
626
|
+
const now = Date.now();
|
|
627
|
+
const recent = (attempts.get(key) || []).filter((x) => now - x < 60_000);
|
|
628
|
+
recent.push(now); attempts.set(key, recent);
|
|
629
|
+
if (recent.length > 10) return res.status(429).json({ error: 'troppi tentativi di pairing' });
|
|
630
|
+
const b = req.body || {};
|
|
631
|
+
if (!nodesStore.validToken(b.invite) || !nodesStore.NODE_ID_RE.test(b.instanceId)
|
|
632
|
+
|| !validPeerName(b.name) || !nodesStore.isPort(b.port) || !nodesStore.validToken(b.acceptToken)) {
|
|
633
|
+
return res.status(400).json({ error: 'pairing request non valida' });
|
|
634
|
+
}
|
|
635
|
+
if (!peering.consumeInvite({ invitesPath, invite: b.invite })) return res.status(410).json({ error: 'invito scaduto o gia usato' });
|
|
636
|
+
try {
|
|
637
|
+
const st = nodesStore.loadOrInitStore(nodesPath);
|
|
638
|
+
if (st.nodeId === b.instanceId || st.nodes.some((n) => n.nodeId === b.instanceId)) return res.status(409).json({ error: 'peer duplicato' });
|
|
639
|
+
let name = b.name;
|
|
640
|
+
for (let i = 2; nodesStore.getNode(st, name); i += 1) name = `${b.name.slice(0, 28)}-${i}`;
|
|
641
|
+
const reversePort = peering.allocateReversePort(st.nodes);
|
|
642
|
+
const credential = peering.createPending({ pendingPath, data: {
|
|
643
|
+
name, remotePort: b.port, reversePort, instanceId: b.instanceId, acceptToken: b.acceptToken,
|
|
644
|
+
} });
|
|
645
|
+
res.json({ paired: true, instanceId: st.nodeId, reversePort, credential });
|
|
646
|
+
} catch (e) { res.status(500).json({ error: String(e.message || e) }); }
|
|
647
|
+
});
|
|
648
|
+
r.post('/confirm', (req, res) => {
|
|
649
|
+
const b = req.body || {};
|
|
650
|
+
if (!nodesStore.validToken(b.credential)) return res.status(400).json({ error: 'confirm non valido' });
|
|
651
|
+
const pending = peering.consumePending({ pendingPath, credential: b.credential });
|
|
652
|
+
if (!pending) {
|
|
653
|
+
const st = nodesStore.loadStore(nodesPath);
|
|
654
|
+
if (st && st.nodes.some((n) => n.acceptToken && peering.safeEqual(n.acceptToken, b.credential))) return res.json({ confirmed: true, idempotent: true });
|
|
655
|
+
return res.status(410).json({ error: 'pairing pending scaduto o gia usato' });
|
|
656
|
+
}
|
|
657
|
+
try {
|
|
658
|
+
let st = nodesStore.loadOrInitStore(nodesPath);
|
|
659
|
+
if (st.nodeId === pending.instanceId || st.nodes.some((n) => n.nodeId === pending.instanceId)) return res.status(409).json({ error: 'peer duplicato' });
|
|
660
|
+
st = nodesStore.addNode(st, {
|
|
661
|
+
name: pending.name, remotePort: pending.remotePort, localPort: pending.reversePort,
|
|
662
|
+
direction: 'inbound', transport: 'inbound', autostart: true,
|
|
663
|
+
visibility: 'network', nodeId: pending.instanceId,
|
|
664
|
+
token: pending.acceptToken, acceptToken: b.credential,
|
|
665
|
+
});
|
|
666
|
+
nodesStore.atomicWriteStore(nodesPath, st);
|
|
667
|
+
res.json({ confirmed: true });
|
|
668
|
+
} catch (e) { res.status(500).json({ error: String(e.message || e) }); }
|
|
669
|
+
});
|
|
670
|
+
r.post('/cancel', (req, res) => {
|
|
671
|
+
const b = req.body || {};
|
|
672
|
+
if (!nodesStore.NODE_ID_RE.test(b.instanceId) || !nodesStore.validToken(b.credential)) return res.status(400).json({ error: 'cancel non valido' });
|
|
673
|
+
try {
|
|
674
|
+
const pending = peering.consumePending({ pendingPath, credential: b.credential });
|
|
675
|
+
if (!pending || pending.instanceId !== b.instanceId) {
|
|
676
|
+
const st = nodesStore.loadStore(nodesPath);
|
|
677
|
+
const peer = st && st.nodes.find((n) => n.nodeId === b.instanceId && n.acceptToken && peering.safeEqual(n.acceptToken, b.credential));
|
|
678
|
+
if (!peer) return res.status(404).json({ error: 'pair non trovato' });
|
|
679
|
+
nodesStore.atomicWriteStore(nodesPath, nodesStore.removeNode(st, peer.name));
|
|
680
|
+
}
|
|
681
|
+
res.json({ cancelled: true });
|
|
682
|
+
} catch (e) { res.status(500).json({ error: String(e.message || e) }); }
|
|
683
|
+
});
|
|
684
|
+
return r;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
function validPeerName(name) { return typeof name === 'string' && nodesStore.NODE_NAME_RE.test(name); }
|
|
688
|
+
|
|
689
|
+
module.exports = { settingsRoutes, publicPeeringRoutes, deepScrubTokens };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mmmbuto/nexuscrew",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Faithful browser tmux client — attach to live sessions over a real PTY, localhost-only, mobile-easy",
|
|
5
5
|
"main": "lib/server.js",
|
|
6
6
|
"bin": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
],
|
|
62
62
|
"repository": {
|
|
63
63
|
"type": "git",
|
|
64
|
-
"url": "https://github.com/DioNanos/nexuscrew"
|
|
64
|
+
"url": "git+https://github.com/DioNanos/nexuscrew.git"
|
|
65
65
|
},
|
|
66
66
|
"author": "DioNanos",
|
|
67
67
|
"license": "Apache-2.0",
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
.nc-icon{display:block;flex:0 0 auto}.nc-sheet-head{display:flex;align-items:center;justify-content:space-between}.nc-sheet-state{font-size:12px;opacity:.6}.nc-sheet-label{font-size:12px;opacity:.7;text-transform:uppercase;letter-spacing:.5px}.nc-engines{display:grid;grid-template-columns:1fr 1fr;gap:6px}.nc-engine{display:flex;align-items:center;gap:6px;padding:7px 9px;border:1px solid #1c241c;border-radius:8px;font-size:12px;cursor:pointer;background:#0a0e0a}.nc-engine.sel{border-color:#2e7d32;background:#14200f}.nc-engine input{accent-color:#2e7d32}.nc-check{display:flex;align-items:center;gap:8px;font-size:13px;cursor:pointer}.nc-check input{accent-color:#2e7d32}.nc-note{font-size:11px;color:#e0b020;opacity:.9}.nc-engine-id{opacity:.55;font-size:.85em}.nc-sheet-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;background:#0000008c;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box}.nc-sheet{width:100%;max-width:380px;background:#0e140e;color:#cfe;border:1px solid #243;border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:12px;box-shadow:0 12px 40px #00000080}.nc-sheet-head{display:flex;align-items:center}.nc-sheet-head b{font-size:16px;color:#d8ffe8}.nc-field{display:flex;flex-direction:column;gap:4px;font-size:12px;opacity:.8}.nc-field input,.nc-field select{padding:9px 10px;font:14px/1.2 inherit;background:#0a0e0a;color:#cfe;border:1px solid #243;border-radius:8px}.nc-field input:focus,.nc-field select:focus{outline:none;border-color:#2e7d32}.nc-err{color:#f88;font-size:12px}.nc-sheet-actions{display:flex;justify-content:flex-end;gap:8px}.nc-btn{border:none;border-radius:8px;padding:8px 16px;font-size:13px;cursor:pointer}.nc-btn.ghost{background:none;border:1px solid #243;color:#9fd}.nc-btn.primary{background:#2e7d32;color:#fff}.nc-btn.primary:active{background:#255028}.nc-btn:disabled{opacity:.5;cursor:default}.nc-cwd-row{display:flex;gap:6px;align-items:stretch}.nc-cwd-row input{flex:1}.nc-cwd-browse{white-space:nowrap;padding:0 10px}.nc-fs{border:1px solid #23331c;border-radius:8px;margin:2px 0 6px;overflow:hidden;background:#0c130a}.nc-fs-path{font-size:.78rem;opacity:.7;padding:6px 8px;border-bottom:1px solid #1a2614;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left}.nc-fs-list{max-height:190px;overflow-y:auto;display:flex;flex-direction:column}.nc-fs-item{text-align:left;background:none;border:none;color:inherit;padding:6px 10px;cursor:pointer;font-size:.9rem}.nc-fs-item:hover{background:#16220f}.nc-fs-nav{opacity:.8}.nc-fs-empty{padding:8px 10px;opacity:.5}.nc-home{display:flex;flex-direction:column;gap:12px;padding:18px 14px 10px;color:#cfe;max-width:560px;margin:0 auto;min-height:100dvh;box-sizing:border-box}.nc-home-head{position:relative}.nc-wordmark{font-size:26px;font-weight:700;letter-spacing:.5px;color:#d8ffe8}.nc-cursor{display:inline-block;width:12px;height:22px;margin-left:6px;background:#0c6;vertical-align:-2px;animation:nc-blink 1.1s steps(1) infinite}@keyframes nc-blink{50%{opacity:0}}@media (prefers-reduced-motion: reduce){.nc-cursor{animation:none}}.nc-home-sub{margin-top:4px;font-size:13px;opacity:.65}.nc-head-actions{position:absolute;top:0;right:0;display:inline-flex;gap:6px}.nc-refresh{display:inline-flex;align-items:center;justify-content:center;background:none;border:1px solid #243;color:#9fd;border-radius:8px;min-width:40px;min-height:40px}.nc-filter{padding:10px 12px;font:16px/1.2 inherit;background:#0e140e;color:#cfe;border:1px solid #243;border-radius:8px}.nc-filter:focus{outline:none;border-color:#2e7d32}.nc-session-list{display:flex;flex-direction:column;gap:8px}.nc-session{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid #1c241c;background:#0e140e;color:#cfe;border-radius:10px;text-align:left;min-height:56px}.nc-session:active{background:#14200f;border-color:#2e7d32}.nc-session .dot{flex:0 0 auto;width:9px;height:9px;border-radius:50%;background:#355}.nc-session .dot.on{background:#0c6;box-shadow:0 0 6px #0c68}.nc-session-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.nc-session-main b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.nc-session-main small{opacity:.55;font-size:12px}.nc-badge{flex:0 0 auto;background:#2e7d32;color:#fff;border-radius:10px;padding:1px 8px;font-size:12px;line-height:18px}.nc-err{color:#f88;font-size:13px;padding:4px 2px}.nc-empty{opacity:.5;padding:18px 4px;font-size:13px}.nc-home-foot{margin-top:auto;padding-top:14px;display:flex;justify-content:space-between;gap:8px;font-size:11px;opacity:.4}.nc-group{display:flex;flex-direction:column;gap:8px}.nc-group-title{font-size:11px;opacity:.55;text-transform:uppercase;letter-spacing:.5px;padding:6px 2px 2px}.nc-mcard{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid #1c241c;background:#0e140e;color:#cfe;border-radius:12px;min-height:56px}.nc-mcard-main{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:12px;background:none;border:none;color:inherit;cursor:pointer;padding:0;text-align:left}.nc-mcard-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.nc-mcard-text b{font-size:14px;color:#d8ffe8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nc-mcard-text small{font-size:12px;opacity:.6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dot.warn{background:#e0b020;box-shadow:0 0 6px #e0b02088}.nc-group-title.nc-node-title{display:flex;align-items:center;gap:6px}.nc-group-title.nc-node-title .dot{flex:0 0 auto;width:8px;height:8px;border-radius:50%;background:#355}.nc-group-title.nc-node-title .dot.on{background:#0c6;box-shadow:0 0 6px #0c68}.nc-mcard .dot{flex:0 0 auto;width:9px;height:9px;border-radius:50%;background:#355}.nc-mcard .dot.on{background:#0c6;box-shadow:0 0 6px #0c68}.nc-rel{flex:0 0 auto;font-size:11px;opacity:.45}.nc-power,.nc-menu{flex:0 0 auto;background:none;border:1px solid #243;color:#9fd;border-radius:8px;min-width:38px;min-height:38px;font-size:17px;cursor:pointer}.nc-power:active,.nc-menu:active{border-color:#2e7d32}.nc-fab{position:fixed;right:18px;bottom:18px;z-index:20;width:54px;height:54px;border-radius:50%;background:#2e7d32;color:#fff;border:none;font-size:28px;line-height:1;cursor:pointer;box-shadow:0 6px 18px #00000073}.nc-fab:active{background:#255028}.nc-lang{display:inline-flex;align-items:center;gap:2px}.nc-act{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#ffffff0d;border:1px solid rgba(255,255,255,.22);color:#9aa89a;cursor:pointer;flex:0 0 auto;font-size:15px;line-height:1}.nc-act.power.on{color:#0c6;border-color:#00cc668c;background:#00cc661a}.nc-act.power.warn{color:#e8c547;border-color:#e8c5478c;background:#e8c5471a}.nc-act.pin.on{color:#e8c547;border-color:#e8c5478c;background:#e8c54714}.nc-mcard{gap:8px}/**
|
|
2
|
-
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
3
|
-
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
4
|
-
* https://github.com/chjj/term.js
|
|
5
|
-
* @license MIT
|
|
6
|
-
*
|
|
7
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
* in the Software without restriction, including without limitation the rights
|
|
10
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
* furnished to do so, subject to the following conditions:
|
|
13
|
-
*
|
|
14
|
-
* The above copyright notice and this permission notice shall be included in
|
|
15
|
-
* all copies or substantial portions of the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
-
* THE SOFTWARE.
|
|
24
|
-
*
|
|
25
|
-
* Originally forked from (with the author's permission):
|
|
26
|
-
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
27
|
-
* http://bellard.org/jslinux/
|
|
28
|
-
* Copyright (c) 2011 Fabrice Bellard
|
|
29
|
-
* The original design remains. The terminal itself
|
|
30
|
-
* has been extended to include xterm CSI codes, among
|
|
31
|
-
* other features.
|
|
32
|
-
*/.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;-webkit-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.nc-terminal{position:absolute;top:0;right:0;bottom:0;left:0;background:#0a0e0a}.nc-terminal-host{position:absolute;top:0;right:0;bottom:0;left:0;padding:4px}.nc-terminal .xterm{height:100%}.nc-terminal-host,.nc-terminal .xterm,.nc-terminal .xterm-viewport{touch-action:none}.nc-terminal.selecting{box-shadow:inset 0 0 0 2px #d6a600}.nc-selection-tools{position:absolute;z-index:9;right:10px;top:10px;display:flex;gap:6px;align-items:center;background:#0e140ef0;border:1px solid #586b2a;border-radius:8px;padding:5px 7px;color:#edda8a;font-size:11px}.nc-selection-tools button{background:#172417;border:1px solid #486044;color:#d8ffe8;border-radius:6px;padding:5px 9px}.nc-selection-tools textarea{width:180px;height:48px;background:#071007;color:#d8ffe8}.nc-keybar{background:#0a0e0a;border-top:1px solid #1c241c;position:relative}.nc-keybar.termux{display:flex;flex-direction:column;padding:2px 0}.nc-keybar .row{display:flex}.nc-keybar .row button{flex:1 1 0;min-width:0;padding:10px 2px;background:none;border:none;border-radius:0;color:#e6ffe6;font-size:14px;font-weight:600;letter-spacing:.5px;font-family:inherit}.nc-keybar .row button:active{background:#1d2a1d}.nc-keybar .row button.armed{color:#021;background:#0c6}.nc-keymenu{position:absolute;bottom:100%;left:8px;right:8px;z-index:30;display:flex;flex-wrap:wrap;gap:6px;padding:8px;background:#101810;border:1px solid #2a3a2a;border-radius:10px 10px 0 0}.nc-keymenu button{flex:1 0 30%;padding:10px 6px;border-radius:8px;border:1px solid #243;background:#122;color:#9fd;font-size:13px}.nc-keymenu button:active{background:#0c6;color:#021}.nc-keybar.copy{display:flex;gap:6px;overflow-x:auto;padding:8px;background:#14210f}.nc-keybar.copy button{flex:0 0 auto;padding:10px 12px;min-width:48px;border-radius:8px;border:1px solid #243;background:#122;color:#9fd;font-size:13px}.nc-keybar.copy button:active{background:#0c6;color:#021}.nc-keybar .tag{flex:0 0 auto;align-self:center;padding:0 8px;color:#8e8;font-size:12px}@media (pointer: coarse){.nc-keybar .row button{padding:12px 2px;font-size:15px}}.nc-files{position:fixed;top:0;right:0;bottom:0;width:min(340px,90vw);background:var(--bg, #111511);border-left:1px solid #2a332a;display:flex;flex-direction:column;z-index:30}.nc-files header{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;border-bottom:1px solid #2a332a}.nc-files nav{display:flex;gap:6px;padding:8px 10px}.nc-files nav button{flex:0 0 auto;padding:4px 10px;border-radius:6px}.nc-files nav button.on{background:#2e7d32;color:#fff}.nc-files nav .up{margin-left:auto}.nc-files ul{list-style:none;margin:0;padding:0;overflow-y:auto;flex:1}.nc-files li{display:flex;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid #1c231c}.nc-files li .name{flex:1;cursor:pointer;overflow-wrap:anywhere}.nc-files li.empty{opacity:.5;justify-content:center}.nc-busy{padding:4px 10px;font-size:12px;color:#e0a030}@media (pointer: coarse){.nc-files nav button,.nc-files li{min-height:42px}}.nc-files header button,.nc-files nav button,.nc-files li button{display:inline-flex;align-items:center;justify-content:center;gap:6px}.nc-composer{border-top:1px solid #2a332a;padding:6px 8px;background:var(--bg, #111511)}.nc-composer-row{display:flex;gap:6px;align-items:flex-end}.nc-composer textarea{flex:1;resize:none;background:#0a0e0a;color:#d8e0d8;border:1px solid #2a332a;border-radius:8px;padding:6px 8px;font:13px/1.4 inherit}.nc-composer .mic.on{background:#b02a2a;color:#fff}.nc-composer-err{font-size:12px;color:#e0a030;padding-bottom:4px}@media (pointer: coarse){.nc-composer .mic,.nc-composer .go,.nc-composer .attach{min-width:46px;min-height:46px;font-size:20px}.nc-composer textarea{font-size:16px}.nc-attach-menu button{min-height:48px}}.nc-composer .mic,.nc-composer .go,.nc-composer .attach{display:inline-flex;align-items:center;justify-content:center;background:none;border:1px solid #243;color:#9fd;border-radius:8px;cursor:pointer}.nc-composer .go{color:#7ee787;border-color:#2e7d32}.nc-composer .attach.busy{opacity:.5;animation:nc-attach-pulse 1s ease-in-out infinite}@keyframes nc-attach-pulse{50%{opacity:.9}}.nc-attach-menu{position:fixed;z-index:1000;min-width:180px;display:flex;flex-direction:column;padding:4px;background:#0e130e;border:1px solid #2e7d32;border-radius:10px;box-shadow:0 6px 24px #0000008c}.nc-attach-menu button{display:flex;align-items:center;gap:10px;text-align:left;min-height:40px;padding:8px 12px;border:0;border-radius:7px;background:none;color:#d8e0d8;font:14px/1 inherit;cursor:pointer}.nc-attach-menu button:hover,.nc-attach-menu button:focus-visible{background:#1a241a;color:#7ee787}.nc-sidebar{display:flex;flex-direction:column;gap:8px;padding:12px 10px;color:#cfe;min-height:0;position:relative;overflow-y:auto;box-sizing:border-box;border-right:1px solid #1c241c;background:#0a0e0a}.nc-sidebar.mini{padding:12px 4px;align-items:center;gap:6px}.nc-side-resize{position:absolute;top:0;right:0;bottom:0;width:6px;cursor:col-resize;z-index:5}.nc-side-resize:hover{background:#1c3a1c}.nc-collapse-btn{flex:0 0 auto;background:none;border:1px solid #243;color:#9fd;border-radius:8px;min-width:26px;min-height:26px;cursor:pointer;font-size:13px;line-height:1}.nc-collapse-btn:hover{border-color:#2e7d32;color:#d8ffe8}.nc-side-head{display:flex;align-items:center;gap:6px;justify-content:space-between;padding:2px 4px 6px}.nc-side-head.mini{padding:2px 0 6px;justify-content:center}.nc-side-group.mini{align-items:center;gap:6px}.nc-mini-dot,.nc-mini-init{display:flex;align-items:center;justify-content:center;width:34px;height:34px;box-sizing:border-box;border:1px solid #1c241c;background:#0e140e;border-radius:9px;cursor:pointer;-webkit-user-select:none;user-select:none;color:#d8ffe8;padding:0}.nc-mini-init{font-size:13px;font-weight:700}.nc-mini-dot:hover,.nc-mini-init:hover{border-color:#244}.nc-mini-dot.active,.nc-mini-init.active{border-color:#2e7d32;background:#14200f}.nc-side-title{font-size:13px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;opacity:.8}.nc-new-btn{background:#2e7d32;color:#fff;border:none;border-radius:8px;padding:4px 10px;font-size:12px;cursor:pointer}.nc-new-btn:active{background:#255028}.nc-side-group{display:flex;flex-direction:column;gap:6px}.nc-side-group-title{font-size:11px;opacity:.55;text-transform:uppercase;letter-spacing:.5px;padding:10px 4px 2px}.nc-node-title{display:flex;align-items:center;gap:6px;opacity:.8}.nc-node-title .nc-dot{width:7px;height:7px;flex:0 0 auto}.nc-node-title b{font-weight:700}.nc-node-title small{text-transform:none;letter-spacing:0;opacity:.8}.nc-cell{display:flex;align-items:center;gap:8px;padding:9px 10px;border:1px solid #1c241c;background:#0e140e;border-radius:10px}.nc-cell-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.nc-cell-main b{font-size:13px;color:#d8ffe8}.nc-cell-main small{font-size:11px;opacity:.6}.nc-power{flex:0 0 auto;width:28px;height:28px;padding:0;display:inline-flex;align-items:center;justify-content:center;background:#ffffff0d;border:1px solid rgba(255,255,255,.22);color:#9aa89a;border-radius:50%;cursor:pointer}.nc-power.on{color:#0c6;border-color:#00cc668c;background:#00cc661a}.nc-power.warn{color:#e8c547;border-color:#e8c5478c;background:#e8c5471a}.nc-power:hover{filter:brightness(1.25)}.nc-dot{flex:0 0 auto;width:9px;height:9px;border-radius:50%;background:#355}.nc-dot.on{background:#0c6;box-shadow:0 0 6px #0c68}.nc-dot.warn{background:#e0b020;box-shadow:0 0 6px #e0b02088}.nc-side-card{display:flex;align-items:center;gap:8px;padding:9px 10px;border:1px solid #1c241c;background:#0e140e;border-radius:10px;cursor:grab;-webkit-user-select:none;user-select:none}.nc-side-card:hover{border-color:#244}.nc-side-card.active{border-color:#2e7d32;background:#14200f}.nc-side-card:active{cursor:grabbing}.nc-card-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.nc-card-main b{font-size:13px;color:#d8ffe8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nc-card-main small{font-size:11px;opacity:.55;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nc-rel{flex:0 0 auto;font-size:10px;opacity:.45}.nc-menu{flex:0 0 auto;width:26px;height:26px;padding:0;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;color:#9fd;cursor:pointer;font-size:15px;line-height:1;border-radius:50%}.nc-menu:active{color:#f88}.nc-empty{opacity:.4;padding:8px 4px;font-size:12px}.nc-side-gear{display:flex;align-items:center;gap:8px;background:none;border:1px solid #1c241c;border-radius:10px;color:#9fd;font-size:12px;padding:7px 10px;cursor:pointer;margin-top:6px}.nc-side-gear:hover{border-color:#2e7d32;color:#d8ffe8}.nc-side-gear.mini{justify-content:center;width:34px;height:34px;box-sizing:border-box;padding:0;border-radius:9px;margin:6px auto 0}.nc-side-lang{margin-top:auto;padding:10px 4px 4px;display:flex;align-items:center;gap:2px;font-size:11px;opacity:.6}.nc-lang-btn{background:none;border:none;color:inherit;cursor:pointer;font-size:11px;padding:0 1px;opacity:.5;text-transform:uppercase}.nc-lang-btn.on{opacity:1;font-weight:700;color:#d8ffe8}.nc-cell.live{cursor:pointer}.nc-cell.live:hover{background:#ffffff0f}.nc-cell.active{outline:1px solid rgba(0,204,102,.5)}.nc-side-presets{display:flex;gap:4px;padding:2px 8px 6px}.nc-side-presets button{background:none;border:1px solid rgba(255,255,255,.15);border-radius:4px;color:inherit;cursor:pointer;padding:2px 8px}.nc-side-presets button:hover{background:#ffffff14}.nc-pin{flex:0 0 auto;width:28px;height:28px;padding:0;display:inline-flex;align-items:center;justify-content:center;background:#ffffff0d;border:1px solid rgba(255,255,255,.22);color:#9aa89a;cursor:pointer;border-radius:50%;font-size:14px;line-height:1}.nc-pin:hover{filter:brightness(1.25)}.nc-pin.on{color:#e8c547;border-color:#e8c5478c;background:#e8c54714}.nc-mini-tip{position:fixed;left:56px;transform:translateY(-50%);background:#161b16;color:#e6ffe6;border:1px solid rgba(0,204,102,.4);padding:3px 10px;border-radius:4px;white-space:nowrap;z-index:1000;pointer-events:none;font-size:12px}.nc-tile{display:flex;flex-direction:column;min-height:0;min-width:0;position:relative;background:#0a0e0a;border:1px solid #1c241c;border-radius:8px;overflow:hidden}.nc-tile.focused{border-color:#2e7d32;box-shadow:0 0 0 1px #2e7d3244 inset}.nc-tile-head{flex:0 0 auto;display:flex;align-items:center;gap:6px;padding:3px 6px;background:#0e140e;border-bottom:1px solid #1c241c;height:28px}.nc-tile-name{flex:1 1 auto;min-width:0;display:inline-flex;align-items:center;gap:6px;background:none;border:none;color:#cfe;cursor:pointer;padding:0}.nc-tile-name b{font-size:12px;font-weight:600;color:#d8ffe8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nc-tile-node{flex:0 0 auto;font-size:10px;color:#7fb89a;border:1px solid #2c4a3a;border-radius:4px;padding:0 4px;line-height:14px}.nc-tile .nc-dot{width:7px;height:7px;flex:0 0 auto}.nc-tile-actions{flex:0 0 auto;display:inline-flex;gap:2px}.nc-tile-actions button{background:none;border:none;color:#9fd;cursor:pointer;min-width:22px;height:22px;font-size:13px;border-radius:4px;padding:0 3px}.nc-tile-actions button:hover{color:#d8ffe8}.nc-tile-actions .nc-tile-close:hover{color:#f88}.nc-tile-body{flex:1 1 auto;position:relative;min-height:0}.nc-tile-body .nc-terminal{width:100%;height:100%}.nc-tile-composer{flex:0 0 auto;border-top:1px solid #1c241c}.nc-tile-files{position:absolute;top:0;right:0;bottom:0;left:0;z-index:5;background:#0e140e}.nc-tile-head{cursor:grab}.nc-tile-head:active{cursor:grabbing}.nc-grid{flex:1 1 auto;min-width:0;min-height:0;display:flex;flex-direction:row;padding:6px;gap:0;position:relative;background:#070a07}.nc-col{display:flex;flex-direction:column;min-width:120px;min-height:0;position:relative}.nc-col.drop-newcol:before{content:"";position:absolute;left:-3px;top:0;bottom:0;width:3px;background:#0c6;border-radius:2px;z-index:6}.nc-tile-slot{display:flex;flex-direction:column;min-height:60px;min-width:0;position:relative}.nc-tile-slot>.nc-tile{flex:1 1 auto;min-height:0}.nc-tile-slot.drop-left:after,.nc-tile-slot.drop-right:after,.nc-tile-slot.drop-top:after,.nc-tile-slot.drop-bottom:after{content:"";position:absolute;z-index:7;pointer-events:none;background:#00cc6647;border:2px solid #00cc66;border-radius:4px}.nc-tile-slot.drop-left:after{left:0;top:0;bottom:0;width:50%}.nc-tile-slot.drop-right:after{right:0;top:0;bottom:0;width:50%}.nc-tile-slot.drop-top:after{left:0;right:0;top:0;height:50%}.nc-tile-slot.drop-bottom:after{left:0;right:0;bottom:0;height:50%}.nc-grid-toolbar{position:absolute;top:10px;right:12px;z-index:8;display:flex;gap:4px;background:#0a100ad1;border:1px solid #1c241c;border-radius:8px;padding:3px}.nc-grid-toolbar button{background:none;border:none;color:#9fd;cursor:pointer;font-size:15px;line-height:1;padding:4px 7px;border-radius:6px}.nc-grid-toolbar button:hover{background:#1c3a1c;color:#d8ffe8}.nc-divider-v{flex:0 0 6px;cursor:col-resize;margin:0 1px;border-radius:2px}.nc-divider-v:hover{background:#1c3a1c}.nc-divider-h{flex:0 0 6px;cursor:row-resize;margin:1px 0;border-radius:2px}.nc-divider-h:hover{background:#1c3a1c}.nc-drop-line-v{flex:0 0 3px;align-self:stretch;background:#0c6;border-radius:2px}.nc-drop-line-end{margin-left:3px}.nc-grid-empty{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;color:#cfe;opacity:.4;font-size:13px;text-align:center;padding:20px}.nc-deckbar{display:flex;align-items:center;gap:8px;flex:0 0 auto;min-width:0;padding:5px 8px;background:#0e140e;border-bottom:1px solid #1c2a1c;overflow-x:auto;white-space:nowrap}.nc-deckbar-label{font-size:10px;text-transform:uppercase;letter-spacing:.06em;opacity:.5;color:#9fd;flex:0 0 auto}.nc-deck-chips{display:flex;align-items:center;gap:6px;flex:0 1 auto;min-width:0}.nc-deck-chip{display:inline-flex;align-items:center;border:1px solid #243;border-radius:6px;overflow:hidden;background:#0a0e0a}.nc-deck-chip.current{border-color:#7aa903}.nc-deck-open{background:none;border:none;color:#cfe;padding:3px 8px;font:inherit;font-size:12px;cursor:pointer;max-width:180px;overflow:hidden;text-overflow:ellipsis}.nc-deck-chip.current .nc-deck-open{color:#d9f7c7}.nc-deck-open:hover{background:#132013}.nc-deck-mini{background:none;border:none;border-left:1px solid #1c2a1c;color:#7a9;padding:3px 6px;font:inherit;font-size:11px;cursor:pointer}.nc-deck-mini:hover{background:#132013;color:#9fd}.nc-deck-del:hover{color:#f99}.nc-deck-newbtn{background:none;border:1px dashed #2a3a2a;color:#9fd;border-radius:6px;padding:3px 10px;font:inherit;font-size:12px;cursor:pointer;flex:0 0 auto}.nc-deck-newbtn:hover{border-color:#7aa903}.nc-deck-add{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto}.nc-deck-add input{padding:3px 8px;background:#122;border:1px solid #243;color:#cfe;border-radius:6px;font:inherit;font-size:12px;width:130px}.nc-deck-add input.invalid{border-color:#a44}.nc-deck-slug{color:#7a9;font-size:10px;max-width:130px;overflow:hidden;text-overflow:ellipsis}.nc-deck-ok,.nc-deck-cancel{background:#122;border:1px solid #243;color:#9fd;border-radius:6px;padding:3px 9px;font:inherit;font-size:12px;cursor:pointer}.nc-deck-ok:disabled{opacity:.4;cursor:default}.nc-deck-state{font-size:10px;color:#7a9;min-width:64px}.nc-deck-state.error,.nc-deck-error{color:#f88;font-size:10px}.nc-deck-fallback{color:#fd8;font-size:11px}.nc-tile-deck{background:#0a0e0a;border:1px solid #243;color:#9fd;border-radius:5px;font:inherit;font-size:11px;padding:1px 3px;max-width:92px}.nc-side-show{position:fixed;left:8px;top:8px;z-index:30;background:#0e140e;border:1px solid #243;color:#9fd;border-radius:6px;padding:5px 9px;font:inherit;font-size:13px;cursor:pointer;opacity:.8}.nc-side-show:hover{opacity:1;border-color:#7aa903}.nc-set-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:60;background:#0000008c;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box}.nc-set-panel{width:100%;max-width:560px;max-height:90vh;background:#0e140e;color:#cfe;border:1px solid #243;border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:12px;box-shadow:0 12px 40px #00000080;overflow:hidden}@media (max-width: 1023px){.nc-set-overlay{padding:0}.nc-set-panel{max-width:none;max-height:none;height:100%;border-radius:0;border:none}}.nc-set-head{display:flex;align-items:center;gap:8px}.nc-set-head b{font-size:16px;color:#d8ffe8;flex:1}.nc-set-close{background:none;border:none;color:#9fd;cursor:pointer;padding:4px}.nc-set-readonly{font-size:12px;color:#e0b020;border:1px solid #4a3a10;border-radius:8px;padding:8px 10px;background:#171307}.nc-set-tabs{display:flex;gap:6px;border-bottom:1px solid #1c241c;padding-bottom:8px}.nc-set-tabbtn{background:none;border:1px solid #1c241c;border-radius:8px;color:#9fd;font-size:12px;padding:6px 12px;cursor:pointer;text-transform:uppercase;letter-spacing:.5px}.nc-set-tabbtn.on{border-color:#2e7d32;background:#14200f;color:#d8ffe8}.nc-set-body{overflow-y:auto;flex:1;min-height:120px}.nc-set-tab{display:flex;flex-direction:column;gap:12px}.nc-set-tab .nc-check span{display:flex;flex-direction:column;gap:2px}.nc-set-tab .nc-check small{opacity:.6;font-size:11px}.nc-set-info{font-size:12px;opacity:.7;line-height:1.6}.nc-set-note{font-size:12px;color:#9fd}.nc-set-hint{font-size:11px;opacity:.7}.nc-set-form{display:flex;flex-direction:column;gap:8px}.nc-set-form input{padding:9px 10px;font:14px/1.2 inherit;background:#0a0e0a;color:#cfe;border:1px solid #243;border-radius:8px}.nc-set-form input:focus{outline:none;border-color:#2e7d32}.nc-set-form input:disabled{opacity:.5}.nc-set-form textarea,.nc-set-form select{padding:9px 10px;font:13px/1.3 inherit;background:#0a0e0a;color:#cfe;border:1px solid #243;border-radius:8px;min-height:36px}.nc-set-form textarea{min-height:72px;resize:vertical}.nc-fleet-editor{gap:10px}.nc-fleet-section-head,.nc-fleet-item{display:flex;align-items:center;justify-content:space-between;gap:8px}.nc-fleet-section-head{margin-top:4px;border-bottom:1px solid #243;padding-bottom:6px}.nc-fleet-item{border:1px solid #1c241c;border-radius:8px;padding:8px}.nc-fleet-item>span{display:flex;gap:6px;align-items:center}.nc-fleet-item>span:first-child{flex-direction:column;align-items:flex-start;min-width:0}.nc-fleet-item small{opacity:.6;overflow-wrap:anywhere}.nc-fleet-form{border:1px solid #2e7d32;border-radius:10px;padding:10px}.nc-fleet-pair,.nc-fleet-env{display:flex;gap:6px}.nc-fleet-pair input,.nc-fleet-env input{flex:1;min-width:0}.nc-set-node{border:1px solid #1c241c;border-radius:10px;padding:10px;display:flex;flex-direction:column;gap:8px;background:#0a0e0a}.nc-set-node-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.nc-set-node-head b{color:#d8ffe8}.nc-set-node-head small{opacity:.6;font-size:11px}.nc-set-tunnel{margin-left:auto;font-size:11px;color:#f88}.nc-set-tunnel.up{color:#6c6}.nc-set-node-actions{display:flex;gap:6px;flex-wrap:wrap}.nc-set-node-actions .nc-btn{padding:5px 10px;font-size:12px}.nc-set-test{font-size:11px}.nc-set-test.ok{color:#6c6}.nc-set-test.ko{color:#f88}.nc-set-copyline{display:flex;gap:8px;align-items:center}.nc-set-copyline code{flex:1;font-size:10px;word-break:break-all;-webkit-user-select:all;user-select:all;background:#0a0e0a;border:1px solid #1c241c;border-radius:6px;padding:6px;max-height:72px;overflow-y:auto}.nc-set-akeys{display:flex;flex-direction:column;gap:6px}.nc-set-row{display:flex;gap:8px;flex-wrap:wrap}.nc-set-confirm{border:1px solid #4a3a10;border-radius:10px;padding:10px;background:#171307;font-size:12px;color:#e8d8a0;display:flex;flex-direction:column;gap:10px}.nc-set-panel .nc-check{display:flex;align-items:flex-start;gap:8px;font-size:13px;cursor:pointer}.nc-set-panel .nc-check input{accent-color:#2e7d32;margin-top:2px}.nc-set-panel .nc-btn{border:none;border-radius:8px;padding:8px 16px;font-size:13px;cursor:pointer}.nc-set-panel .nc-btn.ghost{background:none;border:1px solid #243;color:#9fd}.nc-set-panel .nc-btn.primary{background:#2e7d32;color:#fff}.nc-set-panel .nc-btn.danger{background:none;border:1px solid #532;color:#f88}.nc-set-panel .nc-btn:disabled{opacity:.5;cursor:default}.nc-set-panel .nc-sheet-actions{display:flex;justify-content:flex-end;gap:8px}.nc-set-panel .nc-sheet-label{font-size:12px;opacity:.7;text-transform:uppercase;letter-spacing:.5px}.nc-set-panel .nc-err{color:#f88;font-size:12px}.nc-set-panel .nc-empty{opacity:.5;font-size:12px}.nc-set-panel .nc-dot{width:8px;height:8px;border-radius:50%;background:#333;display:inline-block;flex:0 0 8px}.nc-set-panel .nc-dot.on{background:#2e7d32}.nc-wiz-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:#000000b3;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box}.nc-wiz{width:100%;max-width:420px;max-height:90vh;overflow-y:auto;background:#0e140e;color:#cfe;border:1px solid #243;border-radius:14px;padding:18px;display:flex;flex-direction:column;gap:14px;box-shadow:0 12px 40px #00000080}.nc-wiz-head{display:flex;flex-direction:column;gap:4px}.nc-wiz-head b{font-size:17px;color:#d8ffe8}.nc-wiz-head small{font-size:12px;opacity:.65;text-transform:uppercase;letter-spacing:.5px}.nc-wiz-body{display:flex;flex-direction:column;gap:10px}.nc-wiz-body input{padding:9px 10px;font:14px/1.2 inherit;background:#0a0e0a;color:#cfe;border:1px solid #243;border-radius:8px}.nc-wiz-body input:focus{outline:none;border-color:#2e7d32}.nc-wiz-done{font-size:13px;opacity:.85}.nc-wiz .nc-check{display:flex;align-items:flex-start;gap:8px;font-size:13px;cursor:pointer}.nc-wiz .nc-check input{accent-color:#2e7d32;margin-top:2px}.nc-wiz .nc-check span{display:flex;flex-direction:column;gap:2px}.nc-wiz .nc-check small{opacity:.6;font-size:11px}.nc-wiz .nc-btn{border:none;border-radius:8px;padding:8px 16px;font-size:13px;cursor:pointer}.nc-wiz .nc-btn.ghost{background:none;border:1px solid #243;color:#9fd}.nc-wiz .nc-btn.primary{background:#2e7d32;color:#fff}.nc-wiz .nc-btn:disabled{opacity:.5;cursor:default}.nc-wiz .nc-sheet-actions{display:flex;justify-content:flex-end;gap:8px}.nc-wiz .nc-err{color:#f88;font-size:12px}.nc-wiz-skip{background:none;border:none;color:#9fd;opacity:.6;font-size:12px;cursor:pointer;text-decoration:underline;align-self:center;padding:4px}.nc-wiz-skip:hover{opacity:1}.nc-ntf-toasts{position:fixed;top:10px;right:10px;z-index:2100;display:flex;flex-direction:column;gap:8px;max-width:min(360px,calc(100vw - 20px))}.nc-ntf-toast{display:flex;align-items:flex-start;gap:8px;background:var(--bg-secondary);color:var(--text-primary);border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:10px;padding:8px 8px 8px 12px;font-size:13px;box-shadow:0 2px 12px #0000008c}.nc-ntf-toast.high{border-left-color:var(--warning)}.nc-ntf-toast-txt{display:flex;flex-direction:column;gap:2px;min-width:0}.nc-ntf-toast-txt b{word-break:break-word}.nc-ntf-toast-txt small{color:var(--text-secondary);word-break:break-word}.nc-ntf-from{color:var(--text-tertiary);font-size:11px;font-family:var(--font-mono)}.nc-ntf-x{margin-left:auto;background:none;border:none;color:var(--text-tertiary);cursor:pointer;padding:2px;display:inline-flex;border-radius:6px}.nc-ntf-x:hover{color:var(--text-primary);background:var(--bg-hover)}.nc-ask-badge{position:fixed;bottom:64px;right:12px;z-index:2100;display:inline-flex;align-items:center;gap:6px;background:var(--accent);color:#fff;border:none;border-radius:999px;padding:8px 14px;font-size:14px;font-weight:700;cursor:pointer;box-shadow:0 2px 12px #0000008c}.nc-ask-badge:hover{background:var(--accent-hover)}.nc-ask-count{background:#00000059;border-radius:999px;padding:0 7px;font-size:12px;line-height:18px}.nc-ask-panel{position:fixed;bottom:10px;right:10px;z-index:2100;width:min(420px,calc(100vw - 20px));max-height:min(70vh,560px);display:flex;flex-direction:column;background:var(--bg-secondary);border:1px solid var(--border);border-radius:12px;box-shadow:0 4px 20px #0009}.nc-ask-panel-head{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--border);font-size:13px}.nc-ask-panel-head .nc-ask-count{background:var(--accent)}.nc-ask-panel-body{overflow-y:auto;padding:10px 12px;display:flex;flex-direction:column;gap:10px}.nc-ask-card{background:var(--bg-tertiary);border:1px solid var(--border);border-radius:10px;padding:10px;display:flex;flex-direction:column;gap:8px}.nc-ask-head{display:flex;align-items:center;gap:8px}.nc-ask-id{color:var(--text-tertiary);font-size:11px;margin-left:auto}.nc-ask-q{font-size:13px;white-space:pre-wrap;word-break:break-word}.nc-ask-opts{display:flex;flex-wrap:wrap;gap:6px}.nc-ask-reply{display:flex;gap:6px;align-items:flex-end}.nc-ask-reply textarea{flex:1;resize:vertical;min-height:34px;background:var(--bg-primary);color:var(--text-primary);border:1px solid var(--border);border-radius:8px;padding:6px 8px;font:inherit;font-size:13px}.nc-ask-card .nc-err{color:var(--error);font-size:12px}:root{color-scheme:dark}body,#root{margin:0;height:100vh;height:100dvh;background:#0a0e0a;font-family:ui-monospace,monospace}.nc-app{display:flex;flex-direction:column;height:100vh;height:100dvh;min-height:0}.nc-keybar{flex:0 0 auto}.nc-bar{display:flex;gap:10px;align-items:center;padding:8px;color:#cfe;background:#0e140e}.nc-bar button{background:none;border:1px solid #243;color:#9fd;border-radius:6px;padding:4px 10px}.nc-termwrap{position:relative;flex:1}.nc-auth{color:#cfe;padding:20px;display:flex;flex-direction:column;gap:10px;max-width:420px}.nc-auth input[type=text],.nc-auth input:not([type]){padding:10px;background:#122;border:1px solid #243;color:#cfe;border-radius:6px}.nc-auth button{padding:10px;background:#122;border:1px solid #243;color:#9fd;border-radius:6px}.nc-bar-right{margin-left:auto;display:flex;gap:4px}@media (pointer: coarse){.nc-bar button,.nc-bar-right button{min-height:42px;min-width:42px;font-size:20px}}.nc-bar button,.nc-bar-right button{display:inline-flex;align-items:center;justify-content:center;gap:6px}.nc-bar>button{flex:0 0 auto}.nc-bar>b{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600}.nc-bar-right{flex:0 0 auto}@media (max-width: 480px){.nc-bar-label{display:none}}.nc-workspace{display:flex;flex-direction:row;height:100vh;height:100dvh;min-height:0;background:#0a0e0a;color:#cfe}.nc-workspace-main{flex:1 1 auto;min-width:0;min-height:0;display:flex;flex-direction:column}.nc-single-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:40;background:#0a0e0a}.nc-bar-single .nc-bar-center{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.15}.nc-bar-single .nc-bar-center b{font-size:13px;font-weight:600;color:#d8ffe8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.nc-bar-sub{font-size:10px;opacity:.55}.nc-app{animation:nc-slide-in .2s ease-out}@keyframes nc-slide-in{0%{transform:translate(12%);opacity:0}to{transform:translate(0);opacity:1}}@media (prefers-reduced-motion: reduce){.nc-app{animation:none}}.nc-stale{position:fixed;top:8px;left:50%;transform:translate(-50%);z-index:2000;cursor:pointer;background:#1a2410;color:#d9f7c7;border:1px solid #7aa903;border-radius:8px;padding:6px 14px;font-size:13px;box-shadow:0 2px 10px #00000080}.nc-update{position:fixed;bottom:8px;left:50%;transform:translate(-50%);z-index:2000;display:flex;align-items:center;gap:10px;background:#0f1a0f;color:#d9f7c7;border:1px solid #2e7d32;border-radius:10px;padding:6px 8px 6px 14px;font-size:13px;box-shadow:0 2px 12px #0000008c}.nc-update-msg{white-space:nowrap}.nc-update-btn{display:inline-flex;align-items:center;justify-content:center;background:#2e7d32;border:1px solid #2e7d32;color:#06120a;border-radius:7px;padding:4px 12px;font:inherit;font-size:13px;cursor:pointer}.nc-update-btn:hover{background:#3a9d42}@media (prefers-reduced-motion: reduce){.nc-update{transition:none}}:root{--bg-primary: #0d1117;--bg-secondary: #161b22;--bg-tertiary: #21262d;--bg-hover: #30363d;--text-primary: #e6edf3;--text-secondary: #8b949e;--text-tertiary: #6e7681;--border: #30363d;--accent: #6c5ce7;--accent-hover: #7c6cf7;--success: #3fb950;--warning: #d29922;--error: #f85149;--user-bg: #1c2333;--assistant-bg: transparent;--font-mono: "SF Mono", monospace;--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif}*{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%;width:100%;overflow:hidden}body{font-family:var(--font-sans);background:var(--bg-primary);color:var(--text-primary);-webkit-font-smoothing:antialiased}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--bg-tertiary);border-radius:3px}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.spinning{animation:spin 1s linear infinite}
|