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 // ═══════════════════════════════════════════════════════════