From 6df459247c1a16a3798615837b54dfb70c0a6b3e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Apr 2026 12:07:12 +0000 Subject: [PATCH] =?UTF-8?q?=E5=85=89=E6=B9=96=E7=81=AF=E5=A1=94v40.0=20?= =?UTF-8?q?=C2=B7=20=E8=AF=AD=E8=A8=80=E9=A9=B1=E5=8A=A83D=E7=BF=BB?= =?UTF-8?q?=E8=BD=AC=E6=93=8D=E4=BD=9C=E7=B3=BB=E7=BB=9F=20+=20=E7=A0=81?= =?UTF-8?q?=E5=AD=97=E5=B7=A5=E4=BD=9C=E5=8F=B0=20+=20COS=E5=8F=8C?= =?UTF-8?q?=E6=A1=B6=20+=20=E6=99=BA=E8=83=BD=E6=A8=A1=E5=9E=8B=E5=88=86?= =?UTF-8?q?=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/5fc8d967-00c4-4b70-9d49-bd775684c43b Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- docs/index.html | 1018 ++++++++++++++++++++++++++++++ server/app/modules/cos-bridge.js | 32 +- server/app/server.js | 26 + 3 files changed, 1074 insertions(+), 2 deletions(-) create mode 100644 docs/index.html diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 00000000..a0904969 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,1018 @@ + + + + + + + + + +光湖灯塔 · AGE OS + + + + + +
+ + + + +
+
+
+
🏛️ 光湖灯塔
+
在线
+
+
+
+
AGE OS v40.0
+

光湖灯塔

+
语言驱动操作系统 · 人类只说话,系统搞定一切
+
「语言 = 现实」
+
+ +
📡 系统更新
+
v40.0

COS双桶存储 · 智能模型分流

人格体数据库 + 语料库 · API智能选模型

+
v39.0

全链路部署观测

日志采集 · 自动修复 · LLM诊断

+
v38.0

HLDP协作语言协议

Notion↔GitHub双侧通信 · 铸渊方言

+ +
+ ✍️ + 码字工作台 + 网文行业 · AI辅助创作 · 语言即命令 +
Beta 内测
+
+ + +
+
+ + + + +
+
+ +
✍️ 码字工作台
+ +
+
+
+
+
+ + + + +
+
+ +
📖 新建作品
+ +
+
+
+
+
+
+
+ + + + +
+
+ +
作品
+
+
+
+
+

+

+
+
+
+
📋大纲总纲 · 卷纲
+
👥人物卡角色管理
+
📚章节目录管理
+
✏️写正文续写章节
+
+
对铸渊说「进入大纲」「人物卡」「写正文」自动翻转
+
+
+ + + + +
+
+ +
📋 大纲
+ +
+
+
+
+ + +
+
+
+
+ + + + +
+
+ +
👥 人物卡
+ +
+
+
+
+
+ + + + +
+
+ +
新角色
+ +
+
+
+
+
+
+
+
+
+ + + + +
+
+ +
📚 章节
+ +
+
+
+
+
+ + + + +
+
+ +
正文
+ +
+
+
+ + 0 字 +
+ +
+ 字数:0 + 自动保存 · 点右下角💬唤醒铸渊 +
+
+
+
+ + + + + +
+
+
🏛️
+
铸渊
光湖灯塔 · 守护者
+
ready
+
+
+
—— 与铸渊对话 ——
+
你好!我是铸渊 🏛️

告诉我你是谁,我会记住你。
说「我要码字」进入码字工作台。
进入作品后,说「大纲」「人物卡」「写正文」页面会翻转切换。
铸渊·本地
+
+
+ + +
+
+ + +
+
API0
+
+
连接
+
模型
+
+
+ + + + diff --git a/server/app/modules/cos-bridge.js b/server/app/modules/cos-bridge.js index bb753d05..d2d237fe 100644 --- a/server/app/modules/cos-bridge.js +++ b/server/app/modules/cos-bridge.js @@ -212,12 +212,13 @@ async function checkConnection() { } /** - * 保存用户记忆到核心桶 + * 保存用户记忆到核心桶(团队内测用户 → COS) */ async function saveUserMemory(userId, memoryData) { const key = `users/${userId}/memory.json`; const wrapped = { user_id: userId, + user_tier: 'team', // team = 内测团队 / public = 普通用户(后期单独存储) updated_at: new Date().toISOString(), version: 1, memories: memoryData @@ -233,7 +234,32 @@ async function loadUserMemory(userId) { const key = `users/${userId}/memory.json`; return await readCore(key); } catch { - return { user_id: userId, memories: [], version: 0 }; + return { user_id: userId, user_tier: 'team', memories: [], version: 0 }; + } +} + +/** + * 保存用户作品到核心桶(团队用户) + */ +async function saveUserWorks(userId, worksData) { + const key = `users/${userId}/works.json`; + return writeCore(key, { + user_id: userId, + user_tier: 'team', + updated_at: new Date().toISOString(), + works: worksData + }); +} + +/** + * 读取用户作品 + */ +async function loadUserWorks(userId) { + try { + const key = `users/${userId}/works.json`; + return await readCore(key); + } catch { + return { user_id: userId, works: [] }; } } @@ -267,6 +293,8 @@ module.exports = { checkConnection, saveUserMemory, loadUserMemory, + saveUserWorks, + loadUserWorks, getConfig, COS_CONFIG }; diff --git a/server/app/server.js b/server/app/server.js index 2007438c..54630825 100644 --- a/server/app/server.js +++ b/server/app/server.js @@ -323,6 +323,32 @@ app.get('/api/cos/config', (_req, res) => { } }); +// ─── 用户作品同步(团队内测用户 → COS) ─── +app.post('/api/cos/sync-works', async (req, res) => { + if (!cosBridge) return res.status(503).json({ error: true, message: 'COS模块未加载' }); + try { + const { userId, works } = req.body; + if (!userId || !works) return res.status(400).json({ error: true, message: '缺少userId或works' }); + await cosBridge.saveUserWorks(userId, works); + res.json({ success: true, message: '作品已同步到COS', userId }); + } catch (err) { + res.status(500).json({ error: true, message: err.message }); + } +}); + +// ─── 用户作品加载(团队内测用户 ← COS) ─── +app.get('/api/cos/load-works', async (req, res) => { + if (!cosBridge) return res.status(503).json({ error: true, message: 'COS模块未加载' }); + try { + const userId = req.query.userId; + if (!userId) return res.status(400).json({ error: true, message: '缺少userId' }); + const data = await cosBridge.loadUserWorks(userId); + res.json({ success: true, ...data }); + } catch (err) { + res.json({ success: true, user_id: req.query.userId, works: [] }); + } +}); + // ═══════════════════════════════════════════════════════════ // 智能模型分流 · Smart Model Router API // ═══════════════════════════════════════════════════════════