cortico-world-memory-core 0.19.0 → 0.20.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.20.0
4
+
5
+ **换了一张脸,但原来的还在。** 插件设置里多了一个入口「记忆核心 · 新版星系」,旧页面一个字没动,两个可以同时开着比。
6
+
7
+ - **新版页面 `/next`**:深空蓝黑底 + 青色连接 + 紫色自我 + 金色重要记忆,重排了顶栏、索引栏、主舞台和详情栏的层级。功能和老页面完全一致(星图 / 图谱 / 时间线 / 列表 / 原文 / 文件 / 体检、新建 / 改 / 删 / 退休 / 导出 / 维护),共用同一份 `app.js`,所以不存在「新版少个功能」。
8
+ - **星图重做**:三臂星尘改成四旋臂,加了盘面雾带、旋臂骨架、沿臂亮星团和很轻的呼吸;核心与盘面整体放大。仍然可拖、可缩、可点,静置自转。
9
+ - **浅色主题**:新版有自己的银白科技舱配色;星图内部始终是深空,不会因为切浅色变成一张灰图。
10
+ - **修一个会崩页面的 bug**:新版少了 `#brand-sub`,共享脚本刷新时写 `textContent` 直接抛 `Cannot set properties of null`,整块渲染停住。节点补上,脚本也对可选节点做了空值保护。
11
+ - **自检加严**:`tools/audit-webui.ts` 原来只查 `index.html`,新版页面缺 DOM 根本发现不了。现在两个页面都查,还查重复 id 和视图按钮。
12
+ - **鉴权**:`/next` 与首页注入同一个站点令牌,Host 白名单照样生效;`test-site-auth.ts` 补了新版路由、令牌复用、伪造 Host 和写入四组断言。
13
+
3
14
  ## 0.19.0
4
15
 
5
16
  **记忆写得太少了。** 一周 8 条、一天 1 条——不是没东西可记,是规则把路堵死了。
package/README.md CHANGED
@@ -66,6 +66,8 @@ pnpm add cortico-world-memory-core
66
66
 
67
67
  右栏是详情:可改文本、类型、权重、标签、截止时间,能复制、看相关记忆与版本链;没有选中时收成一条 46px 的窄条,把宽度还给舞台。
68
68
 
69
+ **两套界面,一个站点**:插件设置里有两个入口——「记忆地图 · 图谱与时间线」是原来的页面,`/next` 是新的「记忆核心 · 新版星系」(深空配色、四旋臂星图、银白浅色主题)。两者的数据、接口、令牌和功能完全一致,可以同时打开对比。
70
+
69
71
  快捷键:`/` 搜索 · `1–6` 切视图 · `J/K` 移动 · `Enter` 打开 · `E` 改 · `N` 新建 · `I` 右栏 · `R` 刷新 · `?` 帮助。
70
72
  深链接:`/?view=timeline`、`/?view=galaxy`、`/?card=<id>`、`/?view=turns&q=泡馍&archive=1`(第二个参数表示连归档一起搜)。
71
73
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cortico-world-memory-core",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "type": "module",
5
5
  "description": "四个工具写卡、查卡、改状态、排日程,改口不覆盖。每轮自动把 2 条相关旧记忆推到眼前,不用模型自己查;搜索分「对得上 / 可能沾边」两档。冷层收走三个月没想起的流水账,不删、可回暖。3D 星图一眼看完整个库。常驻约 1,000 token,本地不联网,MIT。\n\nQQ 交流群:745879632",
6
6
  "keywords": [
@@ -58,6 +58,8 @@
58
58
  "webui/app.js",
59
59
  "webui/index.html",
60
60
  "webui/style.css",
61
+ "webui/next.html",
62
+ "webui/next.css",
61
63
  "assets",
62
64
  "ENV_PROMPT.md",
63
65
  "describe.json",
package/src/site.ts CHANGED
@@ -190,6 +190,12 @@ export class MemorySite {
190
190
 
191
191
  if (path.startsWith('/api/')) return this.api(req, rsp, url, path);
192
192
 
193
+ // 原页面和新版页面共用同一个本地站点与令牌,方便并排对比。
194
+ if (path === '/next' || path === '/next/') {
195
+ if (req.method !== 'GET' && req.method !== 'HEAD') return this.text(rsp, 405, 'method not allowed');
196
+ return this.sendFile(rsp, 'next.html');
197
+ }
198
+
193
199
  // 无域名、无认证:只服务本机,禁止被 iframe 之外的地方引用
194
200
  if (req.method !== 'GET' && req.method !== 'HEAD') return this.text(rsp, 405, 'method not allowed');
195
201
  const file = path === '/' ? 'index.html' : path.replace(/^\/+/, '');
@@ -365,7 +371,7 @@ export class MemorySite {
365
371
  const type = MIME[extname(full).toLowerCase()] ?? 'application/octet-stream';
366
372
  // 首页注入一次性令牌:app.js 把它放进每个写请求的头里。
367
373
  // 这份 HTML 不进缓存,否则进程重启后旧令牌会让所有写操作 403。
368
- if (safe === 'index.html') {
374
+ if (safe === 'index.html' || safe === 'next.html') {
369
375
  const html = body
370
376
  .toString('utf8')
371
377
  .replace('<head>', `<head>\n<meta name="mcore-token" content="${this.token}">`);
package/src/world.ts CHANGED
@@ -283,7 +283,10 @@ export class MemoryCoreWorld implements World {
283
283
  ],
284
284
  config: [MEMORY_CORE_CONFIG_GROUP],
285
285
  links: this.siteOrigin
286
- ? [{ label: '记忆地图 · 图谱与时间线', href: this.siteOrigin, inheritTheme: true }]
286
+ ? [
287
+ { label: '记忆地图 · 图谱与时间线', href: this.siteOrigin, inheritTheme: true },
288
+ { label: '记忆核心 · 新版星系', href: `${this.siteOrigin}/next`, inheritTheme: true },
289
+ ]
287
290
  : [],
288
291
  storage: [
289
292
  {
package/webui/app.js CHANGED
@@ -995,7 +995,7 @@ class Graph {
995
995
  /* ── 记忆星图(3D) ─────────────────────────────────── */
996
996
 
997
997
  const GALAXY_KIND = { fact: '事实', self: '自己', episode: '经历', promise: '承诺', note: '临时' };
998
- const GALAXY_COLOR = { fact: '#8ef0dc', self: '#9ab8ff', episode: '#ffc078', promise: '#ff9ec4', note: '#c3ccd8' };
998
+ const GALAXY_COLOR = { fact: '#72f4dc', self: '#a997ff', episode: '#ffd18a', promise: '#ff9fc9', note: '#b9d3e8' };
999
999
  /** 攒够 3 张就独立成团的标签,可以有自己的颜色。色相要和它的 kind 拉开,一眼能分。 */
1000
1000
  const GALAXY_TAG_COLOR = { 独处: '#c9a2ff' };
1001
1001
  const GALAXY_CAM = 1900;
@@ -1033,6 +1033,8 @@ class Galaxy {
1033
1033
  this.links = [];
1034
1034
  this.regions = [];
1035
1035
  this.dust = [];
1036
+ this.armTrails = [];
1037
+ this.clusters = [];
1036
1038
  this.far = [];
1037
1039
  this.glow = new Map();
1038
1040
  this.hover = null;
@@ -1234,8 +1236,8 @@ class Galaxy {
1234
1236
  const H = this.h;
1235
1237
  this.CX = W * 0.5;
1236
1238
  this.CY = H * 0.52;
1237
- this.RCORE = Math.min(W, H) * 0.1;
1238
- this.RMAX = Math.min(W, H) * 0.4;
1239
+ this.RCORE = Math.min(W, H) * 0.125;
1240
+ this.RMAX = Math.min(W, H) * 0.46;
1239
1241
  const RMAX = this.RMAX;
1240
1242
  const RCORE = this.RCORE;
1241
1243
  const rnd = seeded(20261105);
@@ -1364,16 +1366,17 @@ class Galaxy {
1364
1366
  // 星系尘埃:散点按密度自然堆出旋臂,不画「虚线螺旋」
1365
1367
  this.dust = [];
1366
1368
  const arms = [
1367
- { base: 0, tone: '150,225,255', n: 2200 },
1368
- { base: Math.PI, tone: '195,170,255', n: 2200 },
1369
- { base: Math.PI * 0.55, tone: '255,225,190', n: 800 },
1369
+ { base: -0.18, tone: '105,225,255', n: 1850, twist: Math.PI * 2.42 },
1370
+ { base: Math.PI * 0.5 - 0.18, tone: '190,155,255', n: 1850, twist: Math.PI * 2.42 },
1371
+ { base: Math.PI - 0.18, tone: '255,205,150', n: 1850, twist: Math.PI * 2.42 },
1372
+ { base: Math.PI * 1.5 - 0.18, tone: '110,235,205', n: 1850, twist: Math.PI * 2.42 },
1370
1373
  ];
1371
1374
  for (const arm of arms) {
1372
1375
  for (let i = 0; i < arm.n; i += 1) {
1373
1376
  const s = Math.pow(rnd(), 0.75);
1374
1377
  const r = RCORE * 0.55 + s * RMAX * 1.1;
1375
- const t = arm.base + 2.15 * Math.PI * s + gauss() * (0.03 + 0.085 * s);
1376
- const rr = r + gauss() * (10 + 42 * s);
1378
+ const t = arm.base + arm.twist * s + gauss() * (0.03 + 0.085 * s);
1379
+ const rr = r + gauss() * (9 + 38 * s);
1377
1380
  // 沿弧长做亮度起伏,看起来有「结」和「空洞」
1378
1381
  const knot = 0.5 + 0.5 * Math.sin(s * 19 + arm.base * 3);
1379
1382
  const faint = arm.n === 800 ? 0.55 : 1;
@@ -1383,46 +1386,31 @@ class Galaxy {
1383
1386
  z: gauss() * RMAX * 0.05,
1384
1387
  size: 0.5 + Math.pow(rnd(), 2) * 1.7,
1385
1388
  alpha: (0.12 + rnd() * 0.24) * knot * (1 - s * 0.3) * faint,
1386
- color: s < 0.22 ? '255,238,205' : arm.tone,
1389
+ color: s < 0.2 ? '255,238,205' : arm.tone,
1387
1390
  });
1388
1391
  }
1389
1392
  }
1390
1393
 
1391
- // 旋臂薄雾:几十个大而极淡的圆,把散点连成一片
1392
- this.haze = [];
1393
- for (const arm of arms) {
1394
- const steps = arm.n === 800 ? 16 : 30;
1395
- for (let i = 0; i < steps; i += 1) {
1396
- const s0 = (i + 0.5) / steps;
1397
- const r = RCORE * 0.55 + s0 * RMAX * 1.1;
1398
- const t = arm.base + 2.15 * Math.PI * s0;
1399
- this.haze.push({
1400
- x: Math.cos(t) * r,
1401
- y: Math.sin(t) * r,
1402
- z: 0,
1403
- radius: RMAX * (0.05 + 0.05 * s0),
1404
- color: s0 < 0.22 ? '255,238,205' : arm.tone,
1405
- alpha: 0.035 * (arm.n === 800 ? 0.6 : 1) * (1 - s0 * 0.25),
1406
- });
1394
+ // 清晰但很淡的旋臂骨架:让星尘形成真正的银河结构,而不是一团竖直光柱。
1395
+ this.armTrails = arms.map((arm) => {
1396
+ const points = [];
1397
+ for (let i = 0; i <= 96; i += 1) {
1398
+ const s = i / 96;
1399
+ const r = RCORE * 0.62 + s * RMAX * 1.1;
1400
+ const t = arm.base + arm.twist * s;
1401
+ points.push({ x: Math.cos(t) * r, y: Math.sin(t) * r, z: gauss() * RMAX * 0.018 });
1407
1402
  }
1408
- }
1403
+ return { points, tone: arm.tone };
1404
+ });
1409
1405
 
1410
- // 旋臂薄雾:几十个大而极淡的圆,把散点连成一片
1411
- this.haze = [];
1406
+ // 亮星团:沿旋臂布置少量高亮节点,形成照片般的“恒星育婴室”。
1407
+ this.clusters = [];
1412
1408
  for (const arm of arms) {
1413
- const steps = arm.n === 800 ? 16 : 30;
1414
- for (let i = 0; i < steps; i += 1) {
1415
- const s0 = (i + 0.5) / steps;
1416
- const r = RCORE * 0.55 + s0 * RMAX * 1.1;
1417
- const t = arm.base + 2.15 * Math.PI * s0;
1418
- this.haze.push({
1419
- x: Math.cos(t) * r,
1420
- y: Math.sin(t) * r,
1421
- z: 0,
1422
- radius: RMAX * (0.05 + 0.05 * s0),
1423
- color: s0 < 0.22 ? '255,238,205' : arm.tone,
1424
- alpha: 0.035 * (arm.n === 800 ? 0.6 : 1) * (1 - s0 * 0.25),
1425
- });
1409
+ for (let i = 0; i < 42; i += 1) {
1410
+ const s = 0.08 + rnd() * 0.9;
1411
+ const r = RCORE * 0.7 + s * RMAX * 1.08 + gauss() * (4 + s * 12);
1412
+ const t = arm.base + arm.twist * s + gauss() * 0.035;
1413
+ this.clusters.push({ x: Math.cos(t) * r, y: Math.sin(t) * r, z: gauss() * RMAX * 0.035, tone: arm.tone, size: 0.7 + rnd() * 1.6, alpha: 0.35 + rnd() * 0.5, phase: rnd() * Math.PI * 2 });
1426
1414
  }
1427
1415
  }
1428
1416
 
@@ -1490,14 +1478,33 @@ class Galaxy {
1490
1478
  if (!ctx) return;
1491
1479
  ctx.clearRect(0, 0, W, H);
1492
1480
 
1493
- // 深空底
1494
- const bg = ctx.createRadialGradient(this.CX, this.CY, 0, this.CX, this.CY, Math.max(W, H) * 0.75);
1495
- bg.addColorStop(0, '#0a0e1c');
1496
- bg.addColorStop(0.55, '#05070f');
1497
- bg.addColorStop(1, '#020308');
1481
+ // 深空底:中心银白、外围靛蓝,先铺一个很克制的宇宙底色。
1482
+ const bg = ctx.createRadialGradient(this.CX, this.CY, 0, this.CX, this.CY, Math.max(W, H) * 0.78);
1483
+ bg.addColorStop(0, '#15182a');
1484
+ bg.addColorStop(0.18, '#0b1221');
1485
+ bg.addColorStop(0.62, '#050914');
1486
+ bg.addColorStop(1, '#010207');
1498
1487
  ctx.fillStyle = bg;
1499
1488
  ctx.fillRect(0, 0, W, H);
1500
1489
 
1490
+ // 倾斜的银河盘:细微的椭圆雾带,帮助眼睛感受到盘面方向。
1491
+ ctx.save();
1492
+ ctx.translate(this.CX + this.panX, this.CY + this.panY);
1493
+ ctx.rotate(-0.16);
1494
+ ctx.globalCompositeOperation = 'lighter';
1495
+ const disk = ctx.createRadialGradient(0, 0, this.RCORE * 0.2, 0, 0, this.RMAX * 1.4);
1496
+ disk.addColorStop(0, 'rgba(255,246,220,.18)');
1497
+ disk.addColorStop(.22, 'rgba(140,190,255,.065)');
1498
+ disk.addColorStop(.62, 'rgba(90,110,220,.026)');
1499
+ disk.addColorStop(1, 'rgba(0,0,0,0)');
1500
+ ctx.fillStyle = disk;
1501
+ ctx.scale(1, .25);
1502
+ ctx.beginPath();
1503
+ ctx.arc(0, 0, this.RMAX * 1.35, 0, Math.PI * 2);
1504
+ ctx.fill();
1505
+ ctx.restore();
1506
+ ctx.globalCompositeOperation = 'source-over';
1507
+
1501
1508
  // 没有记忆时也要有星空底:尘埃和远景星照画,只是没有星点和标签
1502
1509
 
1503
1510
  // 每个区一团淡淡的星云
@@ -1518,6 +1525,24 @@ class Galaxy {
1518
1525
  }
1519
1526
  ctx.globalCompositeOperation = 'source-over';
1520
1527
 
1528
+ // 旋臂骨架线:比单纯星点更能读出银河的盘面和旋转方向。
1529
+ ctx.save();
1530
+ ctx.globalCompositeOperation = 'lighter';
1531
+ ctx.lineCap = 'round';
1532
+ for (const arm of this.armTrails ?? []) {
1533
+ let started = false;
1534
+ for (const q of arm.points) {
1535
+ const p = this.project(q.x, q.y, q.z);
1536
+ if (!p) { started = false; continue; }
1537
+ if (!started) { ctx.beginPath(); ctx.moveTo(p.x, p.y); started = true; }
1538
+ else ctx.lineTo(p.x, p.y);
1539
+ }
1540
+ ctx.strokeStyle = `rgba(${arm.tone},.13)`;
1541
+ ctx.lineWidth = Math.max(1, this.zoom * 1.3);
1542
+ ctx.stroke();
1543
+ }
1544
+ ctx.restore();
1545
+
1521
1546
  // 星系核心
1522
1547
  const core = this.project(0, 0, 0);
1523
1548
  if (core) {
@@ -1578,6 +1603,26 @@ class Galaxy {
1578
1603
  ctx.globalCompositeOperation = 'source-over';
1579
1604
  }
1580
1605
 
1606
+ // 沿旋臂的亮星团,亮度随时间轻微呼吸。
1607
+ ctx.save();
1608
+ ctx.globalCompositeOperation = 'lighter';
1609
+ const pulseTime = performance.now() * 0.001;
1610
+ for (const c of this.clusters ?? []) {
1611
+ const p = this.project(c.x, c.y, c.z);
1612
+ if (!p) continue;
1613
+ const pulse = 0.82 + Math.sin(pulseTime * 0.7 + c.phase) * 0.18;
1614
+ const r = Math.max(.8, c.size * p.k * 1.8);
1615
+ ctx.globalAlpha = c.alpha * pulse;
1616
+ ctx.fillStyle = `rgb(${c.tone})`;
1617
+ ctx.beginPath(); ctx.arc(p.x, p.y, r, 0, Math.PI * 2); ctx.fill();
1618
+ if (r > 1.5) {
1619
+ ctx.globalAlpha = c.alpha * pulse * .2;
1620
+ ctx.strokeStyle = `rgb(${c.tone})`;
1621
+ ctx.beginPath(); ctx.moveTo(p.x - r * 4, p.y); ctx.lineTo(p.x + r * 4, p.y); ctx.moveTo(p.x, p.y - r * 4); ctx.lineTo(p.x, p.y + r * 4); ctx.stroke();
1622
+ }
1623
+ }
1624
+ ctx.restore();
1625
+
1581
1626
  // 收集并按深度排序(远的先画)
1582
1627
  const items = [];
1583
1628
  for (const d of this.dust) items.push({ z: d.z, kind: 'dust', d });
@@ -1722,7 +1767,7 @@ class Galaxy {
1722
1767
  placed.push(box);
1723
1768
  ly = box.y + 10;
1724
1769
 
1725
- ctx.fillStyle = 'rgba(4,7,14,0.6)';
1770
+ ctx.fillStyle = 'rgba(4,7,14,0.72)'
1726
1771
  roundRect(ctx, box.x, box.y, box.w, box.h, 6);
1727
1772
  ctx.fill();
1728
1773
  ctx.textAlign = 'center';
@@ -2766,7 +2811,8 @@ function renderStatus() {
2766
2811
  el.statusCount.textContent = `显示 ${shown} / ${total} 条`;
2767
2812
  const site = S.snap?.site?.origin;
2768
2813
  el.statusSite.textContent = site ? `服务 ${site}` : '';
2769
- el.brandSub.textContent = `${total} 条记忆 · ${S.snap?.stats?.openPromises ?? 0} 个承诺在等`;
2814
+ // 新旧页面都共用这份脚本;新版有品牌副标题,未来的精简嵌入页可能没有它。
2815
+ if (el.brandSub) el.brandSub.textContent = `${total} 条记忆 · ${S.snap?.stats?.openPromises ?? 0} 个承诺在等`;
2770
2816
  applyInspState();
2771
2817
  }
2772
2818
 
package/webui/next.css ADDED
@@ -0,0 +1,69 @@
1
+ /* 记忆核心新版:保留旧页面功能,换成神经记忆星系的视觉皮肤。 */
2
+ :root {
3
+ --paper: #070b14; --paper-2: #0b1220; --sheet: #101a2a; --sheet-2: #142238; --sheet-3: #1b2d47;
4
+ --ink: #edf4ff; --ink-soft: #aab8ce; --ink-dim: #667791; --line: rgba(143, 182, 224, .16); --line-2: rgba(143, 182, 224, .28); --line-strong: rgba(143, 182, 224, .5);
5
+ --accent: #61e3cf; --accent-2: #9ae9de; --on-accent: #071c1b; --ok: #61e3cf; --warn: #f2c978; --danger: #ff9eaa;
6
+ --chart-1: #61e3cf; --chart-2: #c9a2ff; --chart-3: #78c8ff; --chart-4: #77d8c3; --chart-5: #f2c978; --chart-6: #e69ac7; --chart-7: #9ab8da; --chart-8: #b6a6ff;
7
+ --k-fact: #61e3cf; --k-self: #c9a2ff; --k-episode: #78c8ff; --k-promise: #f2c978; --k-note: #9ab8da;
8
+ --radius: 11px; --radius-sm: 7px; --shadow: 0 18px 44px rgba(0,0,0,.35); --mono: ui-monospace, "SF Mono", Consolas, monospace; color-scheme: dark;
9
+ }
10
+ html[data-mode="light"] {
11
+ --paper: #eef3f6; --paper-2: #e5edf2; --sheet: #f8fbfc; --sheet-2: #edf4f7; --sheet-3: #dbe8ee;
12
+ --ink: #172532; --ink-soft: #536a79; --ink-dim: #78909f; --line: rgba(56, 98, 119, .2); --line-2: rgba(56, 98, 119, .34); --line-strong: rgba(36, 117, 125, .58);
13
+ --accent: #168f83; --accent-2: #237e79; --on-accent: #f3fffd; --ok: #168f83; --warn: #a56f19; --danger: #ba4d59;
14
+ --chart-1: #168f83; --chart-2: #8054b5; --chart-3: #287eae; --chart-4: #278d79; --chart-5: #a56f19; --chart-6: #ac4e85; --chart-7: #587d9a; --chart-8: #7159b5;
15
+ --k-fact: #168f83; --k-self: #8054b5; --k-episode: #287eae; --k-promise: #a56f19; --k-note: #587d9a;
16
+ color-scheme: light;
17
+ }
18
+ * { box-sizing: border-box; }
19
+ html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); font: 13px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
20
+ body { background-image: linear-gradient(rgba(101, 227, 207, .018) 1px, transparent 1px), linear-gradient(90deg, rgba(101, 227, 207, .018) 1px, transparent 1px), radial-gradient(circle at 52% 43%, rgba(84, 76, 180, .08), transparent 46rem); background-size: 44px 44px, 44px 44px, auto; }
21
+ html[data-mode="light"] body { background-image: linear-gradient(rgba(24, 112, 128, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(24, 112, 128, .035) 1px, transparent 1px), radial-gradient(circle at 52% 43%, rgba(125, 93, 184, .08), transparent 46rem); }
22
+ button, input, textarea, select { font: inherit; color: inherit; } button { cursor: pointer; } ::selection { background: rgba(201, 162, 255, .28); }
23
+ .next-app { height: 100vh; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
24
+ .next-topbar { display: flex; align-items: center; gap: 16px; padding: 11px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); }
25
+ .next-brand { display: flex; align-items: center; gap: 10px; min-width: 205px; }
26
+ .core-mark { position: relative; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(97, 227, 207, .7); border-radius: 50%; box-shadow: 0 0 0 5px rgba(97, 227, 207, .055), inset 0 0 12px rgba(97, 227, 207, .16); }
27
+ .core-mark::before, .core-mark::after { content: ''; position: absolute; width: 6px; height: 6px; border: 1px solid var(--purple, #c9a2ff); border-radius: 50%; }
28
+ .core-mark::before { left: -5px; top: 9px; } .core-mark::after { right: -5px; top: 9px; }
29
+ .core-mark i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--accent); } .core-mark i:nth-child(1) { left: 5px; top: 4px; } .core-mark i:nth-child(2) { right: 5px; top: 4px; background: #c9a2ff; } .core-mark i:nth-child(3) { bottom: 4px; background: #f2c978; }
30
+ .next-brand-copy { display: flex; flex-direction: column; line-height: 1.25; } .next-brand-copy strong { font-size: 14px; letter-spacing: .05em; font-weight: 600; } .next-brand-copy span { margin-top: 3px; color: var(--ink-dim); font: 9px var(--mono); letter-spacing: .06em; }
31
+ .next-search { flex: 1 1 310px; max-width: 500px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; background: rgba(20, 34, 56, .72); border: 1px solid var(--line); border-radius: 8px; transition: border-color .15s, background .15s; }
32
+ .next-tabs { display: flex; gap: 2px; padding: 3px; background: rgba(20, 34, 56, .72); border: 1px solid var(--line); border-radius: 8px; }
33
+ .next-tabs .next-tab { border: 0; background: transparent; color: var(--ink-soft); padding: 5px 8px; border-radius: 5px; font-size: 11px; white-space: nowrap; }
34
+ .next-tabs .next-tab:hover { color: var(--ink); }
35
+ .next-tabs .next-tab.active { background: var(--sheet-3); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(143, 182, 224, .12); }
36
+ .next-search:focus-within { border-color: rgba(97, 227, 207, .65); background: rgba(20, 34, 56, .95); } .search-icon { color: var(--ink-dim); font-size: 20px; line-height: 1; transform: rotate(-20deg); } .next-search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; color: var(--ink); } .next-search input::placeholder { color: var(--ink-dim); } .search-key { color: var(--ink-dim); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font: 10px var(--mono); }
37
+ .next-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; } .node-status { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font: 10px var(--mono); margin-right: 4px; white-space: nowrap; } .node-status i { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px rgba(97, 227, 207, .75); }
38
+ .next-icon { width: 31px; height: 31px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ink-soft); font-size: 17px; } .next-icon:hover { color: var(--ink); background: var(--sheet-2); border-color: var(--line); }
39
+ .next-btn { border: 1px solid var(--line-2); background: var(--sheet-2); color: var(--ink); padding: 7px 12px; border-radius: 7px; white-space: nowrap; } .next-btn:hover { background: var(--sheet-3); } .next-btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); font-weight: 600; }
40
+ .next-metrics { display: flex; align-items: stretch; gap: 0; padding: 0 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 88%, transparent); overflow-x: auto; scrollbar-width: none; } .next-metrics::-webkit-scrollbar { display: none; }
41
+ .metric { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 9px 19px 9px 0; margin-right: 19px; border-right: 1px solid var(--line); white-space: nowrap; } .metric:last-child { border-right: 0; } .metric .label { font-size: 10px; color: var(--ink-dim); letter-spacing: .06em; } .metric .value { font: 500 18px var(--mono); color: var(--ink); } .metric .value small { font: 11px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink-dim); margin-left: 3px; } .metric.ok .value { color: var(--accent); } .metric.warn .value { color: var(--warn); } .spark { display: flex; align-items: flex-end; gap: 2px; height: 29px; margin-left: auto; padding-left: 18px; } .spark i { display: block; width: 6px; min-height: 2px; border-radius: 2px 2px 0 0; background: rgba(97, 227, 207, .35); } .spark i.today { background: var(--accent); }
42
+ .next-workspace { --rail-w: 242px; --insp-w: 330px; display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--insp-w); min-height: 0; overflow: hidden; transition: grid-template-columns .18s ease; } body[data-insp="off"] .next-workspace { --insp-w: 46px; }
43
+ .next-rail { border-right: 1px solid var(--line); padding: 14px; overflow-y: auto; background: color-mix(in srgb, var(--paper) 82%, transparent); } .next-rail h3, .next-inspector h3 { margin: 0 0 8px; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-dim); font-weight: 600; } .next-rail section + section { margin-top: 18px; } .next-rail .hint { color: var(--ink-dim); font-size: 10.5px; margin-top: 6px; }
44
+ .chip-list { display: flex; flex-wrap: wrap; gap: 5px; } .chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: rgba(16, 26, 42, .86); color: var(--ink-soft); font-size: 11.5px; transition: .12s; } .chip:hover, .chip.on { border-color: var(--line-strong); color: var(--ink); background: var(--sheet-3); } .chip .dot { width: 7px; height: 7px; border-radius: 50%; } .chip .n { color: var(--ink-dim); font: 10px var(--mono); }
45
+ .field { display: flex; flex-direction: column; gap: 6px; } .field input[type="range"] { width: 100%; accent-color: var(--accent); } .field .row { display: flex; gap: 6px; } .seg { display: flex; gap: 2px; padding: 2px; background: var(--sheet-2); border: 1px solid var(--line); border-radius: 7px; } .seg button { flex: 1; border: 0; background: transparent; color: var(--ink-soft); padding: 5px 0; border-radius: 5px; font-size: 11px; } .seg button.on { background: var(--sheet-3); color: var(--ink); }
46
+ .status-card { border: 1px solid var(--line); border-radius: 8px; background: rgba(16, 26, 42, .82); padding: 10px; display: grid; gap: 6px; } .status-card .line { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; } .status-card .line b { font-weight: 600; font-family: var(--mono); } .meter { height: 4px; border-radius: 2px; background: var(--sheet-3); overflow: hidden; } .meter i { display: block; height: 100%; background: var(--accent); }
47
+ .next-stage { position: relative; min-width: 0; min-height: 0; background: color-mix(in srgb, var(--paper-2) 68%, transparent); } .view { position: absolute; inset: 0; } .view[hidden] { display: none; } #view-graph canvas { width: 100%; height: 100%; display: block; cursor: grab; } #view-graph canvas.dragging { cursor: grabbing; }
48
+ .graph-hud { position: absolute; inset: auto 14px 14px 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; pointer-events: none; } .graph-hud > * { pointer-events: auto; } .legend, .hud-actions { background: rgba(16, 26, 42, .78); border: 1px solid var(--line); backdrop-filter: blur(7px); } .legend { display: flex; flex-wrap: wrap; gap: 8px; padding: 7px 10px; border-radius: 7px; } .legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--ink-soft); } .legend i { width: 7px; height: 7px; border-radius: 50%; } .hud-actions { display: flex; align-items: center; gap: 5px; padding: 4px; border-radius: 7px; } .chip-btn { border: 0; background: transparent; color: var(--ink-soft); padding: 4px 8px; border-radius: 5px; font-size: 11px; } .chip-btn:hover { background: var(--sheet-3); color: var(--ink); } .switch { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-soft); padding: 0 6px 0 2px; } .switch input { accent-color: var(--accent); }
49
+ .empty { position: absolute; inset: 0; display: grid; place-content: center; gap: 4px; text-align: center; color: var(--ink-soft); } .empty[hidden] { display: none; } .empty .dim { color: var(--ink-dim); font-size: 12px; }
50
+ #view-timeline { overflow-y: auto; padding: 15px 20px 40px; } .day-group { margin-bottom: 24px; } .day-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: baseline; gap: 8px; padding: 6px 0 7px; background: linear-gradient(var(--paper-2) 70%, transparent); font-size: 11.5px; color: var(--ink-dim); } .day-head b { font-size: 13px; color: var(--ink); font-weight: 600; }
51
+ .tl-item { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; padding: 8px 10px 8px 4px; border-radius: 8px; cursor: default; transition: background .12s; } .tl-item:hover, .tl-item.sel { background: var(--sheet-2); } .tl-item.sel { box-shadow: inset 0 0 0 1px var(--line-strong); } .tl-dot { align-self: start; margin-top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-dim); } .tl-body { min-width: 0; } .tl-text { cursor: pointer; } .tl-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; font-size: 11px; color: var(--ink-dim); } .tl-right { text-align: right; font-size: 11px; color: var(--ink-dim); white-space: nowrap; } .wbar { width: 46px; height: 3px; border-radius: 2px; background: var(--sheet-3); overflow: hidden; margin-top: 4px; margin-left: auto; } .wbar i { display: block; height: 100%; background: var(--accent); }
52
+ table.grid { width: 100%; min-width: 820px; table-layout: fixed; border-collapse: collapse; font-size: 12px; } #view-table { overflow: auto; scrollbar-width: thin; } table.grid thead th { position: sticky; top: 0; z-index: 2; background: var(--paper-2); text-align: left; font-weight: 600; color: var(--ink-soft); padding: 8px 10px; border-bottom: 1px solid var(--line); } table.grid tbody tr { border-bottom: 1px solid rgba(143, 182, 224, .09); } table.grid tbody tr:hover, table.grid tbody tr.sel { background: var(--sheet-2); } table.grid td { padding: 7px 10px; vertical-align: top; overflow: hidden; } .kind-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-soft); white-space: nowrap; } .kind-pill i { width: 7px; height: 7px; border-radius: 50%; } .tag { font-size: 11px; color: var(--ink-soft); background: var(--sheet-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; } tr.retired td { opacity: .55; }
53
+ .turns-wrap, .docs-wrap { height: 100%; overflow-y: auto; padding: 14px 18px 40px; } .turn { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 5px 0; border-bottom: 1px dashed rgba(143,182,224,.12); } .turn time { font-size: 11px; color: var(--ink-dim); font-family: var(--mono); } .turn .who { font-size: 10.5px; color: var(--ink-dim); } .turn .msg { font-size: 12.5px; color: var(--ink-soft); word-break: break-word; } mark { background: rgba(242, 201, 120, .3); color: inherit; border-radius: 2px; padding: 0 1px; } .doc-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: var(--sheet); }
54
+ .next-inspector { border-left: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 86%, transparent); display: flex; flex-direction: column; min-width: 0; overflow: hidden; } .insp-body { flex: 1; min-height: 0; overflow-y: auto; padding: 15px; } .insp-stub { display: none; flex: 1; flex-direction: column; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; color: var(--ink-dim); padding: 12px 0; } body[data-insp="off"] .insp-stub { display: flex; } body[data-insp="off"] .insp-body { display: none; } .insp-stub:hover { color: var(--ink); background: var(--sheet-2); } .stub-label { writing-mode: vertical-rl; letter-spacing: 3px; font-size: 11px; } .stub-count { font: 10px var(--mono); padding: 0 5px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); } .insp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; } .card-kind { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 5px; font-size: 11px; background: var(--sheet-2); color: var(--ink-soft); } .card-kind i { width: 7px; height: 7px; border-radius: 50%; } .card-text { font-size: 13.5px; line-height: 1.75; padding: 11px 12px; background: rgba(16, 26, 42, .88); border: 1px solid var(--line); border-radius: 7px; white-space: pre-wrap; word-break: break-word; } .card-meta { margin-top: 11px; display: grid; gap: 7px; font-size: 12px; } .card-meta .kv { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-dim); } .card-meta .kv b { color: var(--ink-soft); font-weight: 500; text-align: right; } .card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; } .related { margin-top: 17px; } .related-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 7px 8px; border-radius: 6px; color: var(--ink-soft); font-size: 12px; } .related-item:hover { background: var(--sheet-2); color: var(--ink); }
55
+ .maint-tabs { display: flex; gap: 4px; margin-bottom: 10px; } .maint-tabs button { border: 1px solid var(--line); background: var(--sheet-2); color: var(--ink-soft); padding: 4px 10px; border-radius: 999px; font-size: 12px; } .maint-tabs button.on { background: var(--sheet-3); color: var(--ink); } .maint-note { margin: 0 0 12px; font-size: 11px; color: var(--ink-dim); } .maint-body { display: grid; gap: 8px; } .maint-group { border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: var(--paper); } .maint-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 6px; border-radius: 7px; } .maint-row:hover { background: var(--sheet-2); } .maint-text { font-size: 12.5px; color: var(--ink-soft); }
56
+ .editor { display: grid; gap: 10px; margin-top: 8px; } .editor textarea, .editor input[type="text"], .editor input[type="datetime-local"], .editor select { width: 100%; padding: 7px 9px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--sheet); outline: none; } .editor textarea { min-height: 108px; resize: vertical; line-height: 1.65; } .editor textarea:focus, .editor input:focus, .editor select:focus { border-color: var(--accent); } .editor .row { display: flex; gap: 8px; align-items: center; } .editor .row > * { flex: 1; } .editor .label { font-size: 11px; color: var(--ink-dim); }
57
+ .dist { display: grid; gap: 6px; } .dist .row { display: grid; grid-template-columns: 62px 1fr 26px; gap: 8px; align-items: center; font-size: 11.5px; color: var(--ink-dim); } .dist .track { height: 5px; border-radius: 3px; background: var(--sheet-3); overflow: hidden; } .dist .track i { display: block; height: 100%; } .recent-list { display: grid; gap: 2px; } .recent-list button { text-align: left; border: 0; background: transparent; color: var(--ink-soft); padding: 7px 8px; border-radius: 6px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .recent-list button:hover { background: var(--sheet-2); color: var(--ink); }
58
+ .next-statusbar { display: flex; align-items: center; gap: 10px; padding: 6px 16px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--ink-dim); background: color-mix(in srgb, var(--paper) 90%, transparent); min-height: 29px; } .next-statusbar .sep { width: 1px; height: 11px; background: var(--line-2); } .next-statusbar .grow { flex: 1; } .next-caption { color: var(--ink-dim); font: 9px var(--mono); letter-spacing: .05em; } .kbd-hints { display: flex; align-items: center; gap: 4px; } kbd { font: 9px var(--mono); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; color: var(--ink-soft); background: var(--sheet); }
59
+ .modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(3, 6, 12, .65); backdrop-filter: blur(4px); } .modal[hidden] { display: none; } .modal-panel { width: min(560px, calc(100vw - 40px)); max-height: calc(100vh - 80px); display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--line-2); border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; } .modal-panel header { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line); } .modal-panel header h2 { margin: 0; font-size: 14px; font-weight: 600; } .modal-body { padding: 14px 16px; overflow-y: auto; } .modal-panel footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--paper); }
60
+ .toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--sheet-3); border: 1px solid var(--line-2); color: var(--ink); font-size: 12px; box-shadow: var(--shadow); } .toast[hidden], .menu[hidden] { display: none; } .toast.err { border-color: var(--danger); color: var(--danger); } .toast-undo { background: transparent; border: 1px solid currentColor; color: inherit; border-radius: 6px; font-size: 12px; padding: 2px 8px; }
61
+ .menu { position: fixed; z-index: 55; min-width: 190px; padding: 5px; background: var(--sheet); border: 1px solid var(--line-2); border-radius: 9px; box-shadow: var(--shadow); } .menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; border: 0; background: transparent; color: var(--ink-soft); padding: 7px 9px; border-radius: 6px; font-size: 12.5px; text-align: left; } .menu button:hover { background: var(--sheet-2); color: var(--ink); }
62
+ .galaxy-wrap { position: relative; height: 100%; border-radius: 14px; overflow: hidden; background: #040713; box-shadow: inset 0 0 0 1px rgba(143,182,224,.22), 0 12px 35px rgba(0,0,0,.28); }
63
+ html[data-mode="light"] .galaxy-wrap { background: #07101d; box-shadow: inset 0 0 0 1px rgba(80, 126, 150, .3), 0 12px 28px rgba(64, 92, 110, .16); } #galaxy { display: block; width: 100%; height: 100%; } .galaxy-scan { position: absolute; inset: 0; pointer-events: none; opacity: .12; background: repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(101,227,207,.12) 4px); mix-blend-mode: screen; } .galaxy-hud { position: absolute; left: 21px; top: 17px; display: flex; flex-direction: column; gap: 5px; color: #e6edf7; pointer-events: none; } .galaxy-hud b { font-size: 15px; font-weight: 600; letter-spacing: .08em; } .galaxy-hud span { font-size: 10.5px; color: #8193ae; } .galaxy-legend { position: absolute; left: 20px; bottom: 17px; display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 9px; background: rgba(7,11,20,.63); border: 1px solid rgba(143,182,224,.18); border-radius: 7px; backdrop-filter: blur(7px); } .galaxy-legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; } .galaxy-legend i { width: 6px; height: 6px; border-radius: 50%; } .galaxy-telemetry { position: absolute; right: 19px; bottom: 18px; color: #71849f; font: 10px var(--mono); letter-spacing: .04em; pointer-events: none; } .galaxy-hint { position: absolute; right: 20px; top: 18px; color: #71849f; font-size: 10px; pointer-events: none; } .galaxy-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #aab8ce; } .galaxy-empty[hidden] { display: none; }
64
+ .health-wrap { height: 100%; overflow-y: auto; padding: 16px 18px 48px; display: grid; gap: 18px; align-content: start; } .h-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; } .h-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--sheet); padding: 12px 14px; } .h-label { font-size: 11px; color: var(--ink-dim); } .h-value { font: 26px/1.3 var(--mono); color: var(--ink); } .h-hint { font-size: 11px; color: var(--ink-dim); margin-top: 2px; } .h-block h3 { font-size: 12px; font-weight: 500; color: var(--ink-soft); margin: 0 0 8px; }
65
+ @media (max-width: 1180px) { .next-workspace { --rail-w: 205px; --insp-w: 300px; } .next-brand { min-width: 0; } .next-brand-copy span { display: none; } .next-caption { display: none; } }
66
+ @media (max-width: 980px) { .next-workspace { --rail-w: 0px; --insp-w: 300px; } .next-rail { display: none; } .next-brand { min-width: 130px; } .next-tabs .next-tab { padding-left: 6px; padding-right: 6px; } }
67
+ @media (max-width: 820px) { .next-tabs .next-tab span { display: none; } .next-tabs .next-tab::after { content: attr(data-letter); } }
68
+ @media (max-width: 760px) { .next-topbar { gap: 8px; padding: 9px 10px; flex-wrap: wrap; } .next-brand { min-width: 38px; } .next-brand-copy { display: none; } .node-status { display: none; } .next-workspace { --insp-w: 0px; grid-template-columns: minmax(0, 1fr); } .next-inspector { display: none; } .kbd-hints { display: none; } .next-search { flex: 1 1 180px; order: 3; max-width: none; } .next-tabs { order: 2; margin-left: auto; } .next-actions { order: 4; } }
69
+ @media (max-width: 520px) { .next-btn.primary { padding: 7px 8px; font-size: 12px; } .next-metrics { padding: 0 10px; } .metric { padding-right: 12px; margin-right: 12px; } .metric .value { font-size: 16px; } .graph-hud { inset: auto 8px 8px 8px; } .legend { max-width: 62%; } }
@@ -0,0 +1,91 @@
1
+ <!doctype html>
2
+ <html lang="zh-CN" data-mode="dark">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>记忆核心 · 新版星系</title>
7
+ <link rel="stylesheet" href="/next.css" />
8
+ </head>
9
+ <body>
10
+ <div class="next-app">
11
+ <header class="next-topbar">
12
+ <div class="next-brand">
13
+ <span class="core-mark" aria-hidden="true"><i></i><i></i><i></i></span>
14
+ <div class="next-brand-copy"><strong>记忆核心</strong><span id="brand-sub">NEURAL MEMORY CORE / LOCAL NODE</span></div>
15
+ </div>
16
+ <div class="next-search" role="search">
17
+ <span class="search-icon">⌕</span>
18
+ <input id="search" type="search" placeholder="搜索记忆、对话、文件…" autocomplete="off" spellcheck="false" />
19
+ <span class="search-key">/</span>
20
+ <button id="search-clear" class="next-icon" title="清空搜索" aria-label="清空搜索" hidden>×</button>
21
+ </div>
22
+ <nav class="tab next-tabs" id="tabs" role="tablist" aria-label="视图">
23
+ <button role="tab" data-view="galaxy" data-letter="星" class="tab next-tab active" title="星图"><span>星图</span></button>
24
+ <button role="tab" data-view="graph" data-letter="图" class="tab next-tab" title="图谱"><span>图谱</span></button>
25
+ <button role="tab" data-view="timeline" data-letter="线" class="tab next-tab" title="时间线"><span>时间线</span></button>
26
+ <button role="tab" data-view="table" data-letter="表" class="tab next-tab" title="列表"><span>列表</span></button>
27
+ <button role="tab" data-view="turns" data-letter="文" class="tab next-tab" title="对话原文"><span>原文</span></button>
28
+ <button role="tab" data-view="docs" data-letter="件" class="tab next-tab" title="工作区文件"><span>文件</span></button>
29
+ <button role="tab" data-view="health" data-letter="检" class="tab next-tab" title="体检"><span>体检</span></button>
30
+ </nav>
31
+ <div class="next-actions">
32
+ <span class="node-status"><i></i><span>CORE ONLINE</span></span>
33
+ <button id="btn-new" class="next-btn primary">+ 新记忆</button>
34
+ <button id="btn-refresh" class="next-icon" title="刷新" aria-label="刷新">↻</button>
35
+ <button id="btn-theme" class="next-icon" title="切换主题" aria-label="切换主题">◐</button>
36
+ <button id="btn-more" class="next-icon" title="更多" aria-label="更多">⋯</button>
37
+ </div>
38
+ </header>
39
+
40
+ <section class="next-metrics" id="metrics" aria-label="记忆核心概览"></section>
41
+
42
+ <main class="next-workspace">
43
+ <aside class="next-rail" id="rail" aria-label="记忆索引"></aside>
44
+ <section class="next-stage" id="stage">
45
+ <div class="view" id="view-graph">
46
+ <canvas id="graph"></canvas>
47
+ <div class="graph-hud">
48
+ <div class="legend" id="graph-legend"></div>
49
+ <div class="hud-actions">
50
+ <button class="chip-btn" id="graph-fit" title="适应窗口">适应</button>
51
+ <button class="chip-btn" id="graph-relayout" title="重新布局">重排</button>
52
+ <button class="chip-btn" id="graph-stars" title="星图 / 图谱">星图</button>
53
+ <label class="switch"><input type="checkbox" id="graph-labels" checked /><span>标签</span></label>
54
+ </div>
55
+ </div>
56
+ <div class="empty" id="graph-empty" hidden><p>还没有记忆。</p><p class="dim">聊几句,或者点右上角「+ 新记忆」。</p></div>
57
+ </div>
58
+ <div class="view" id="view-timeline" hidden></div>
59
+ <div class="view" id="view-table" hidden></div>
60
+ <div class="view" id="view-turns" hidden></div>
61
+ <div class="view" id="view-docs" hidden></div>
62
+ <div class="view" id="view-health" hidden></div>
63
+ <div class="view" id="view-galaxy" hidden>
64
+ <div class="galaxy-wrap">
65
+ <canvas id="galaxy"></canvas>
66
+ <div class="galaxy-scan"></div>
67
+ <div class="galaxy-hud"><b>记忆星图</b><span>亮度 = 最近被想起 大小 = 权重 光团 = 主题</span></div>
68
+ <div class="galaxy-telemetry" id="galaxy-telemetry">ROT 000° · PITCH 0° · ZOOM 1.00×</div>
69
+ <div class="galaxy-legend" id="galaxy-legend"></div>
70
+ <div class="galaxy-hint">拖动旋转 · 滚轮缩放 · 双击复位</div>
71
+ <div class="galaxy-empty" id="galaxy-empty" hidden>还没有记忆,聊几句再回来。</div>
72
+ </div>
73
+ </div>
74
+ </section>
75
+ <aside class="next-inspector" id="inspector" aria-label="记忆详情">
76
+ <button class="insp-stub" id="insp-stub" title="展开右栏" aria-label="展开右栏"><span class="stub-chev">‹</span><span class="stub-label">概览</span><span class="stub-count" id="stub-count">0</span></button>
77
+ <div class="insp-body" id="insp-body"></div>
78
+ </aside>
79
+ </main>
80
+
81
+ <footer class="next-statusbar">
82
+ <span id="status-count">—</span><span class="sep"></span><span id="status-site" class="dim"></span><span class="grow"></span>
83
+ <span class="next-caption">MEMORY CORE / 记忆正在沉淀、连接、被唤醒</span>
84
+ <span class="kbd-hints"><kbd>/</kbd> 搜 <kbd>J</kbd><kbd>K</kbd> 移动 <kbd>Enter</kbd> 打开 <kbd>I</kbd> 右栏</span>
85
+ </footer>
86
+ </div>
87
+ <div class="modal" id="modal" hidden><div class="modal-panel" role="dialog" aria-modal="true" aria-labelledby="modal-title"><header><h2 id="modal-title">新建记忆</h2><button class="next-icon" id="modal-close" aria-label="关闭">×</button></header><div class="modal-body" id="modal-body"></div><footer id="modal-foot"></footer></div></div>
88
+ <div class="toast" id="toast" hidden></div><div class="menu" id="menu" hidden></div>
89
+ <script src="/app.js" type="module"></script>
90
+ </body>
91
+ </html>