guanghulab/brain/yaoming-channel/feature-registry.json
2026-05-10 13:12:44 +08:00

294 lines
14 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"registry_id": "ZY-YAOMING-FEATURE-REGISTRY",
"domain": "guanghuyaoming.com",
"channel": "零点原核 · 冰朔个人频道",
"guardian": "铸渊 · ICE-GL-ZY001",
"copyright": "国作登字-2026-A-00037559",
"last_updated": "2026-04-15",
"purpose": "记录零点原核频道所有功能的开发状态、验证结果和问题修复历史。铸渊每次开发前必须先读此文件,确保已完成功能不被破坏。",
"features": [
{
"id": "YM-FEAT-001",
"name": "QQ邮箱验证码登录 · 主权邮箱绑定",
"module": "server/app/modules/email-auth.js",
"routes": [
"POST /api/auth/send-code",
"POST /api/auth/verify-code",
"GET /api/auth/session",
"POST /api/auth/logout",
"GET /api/auth/status"
],
"status": "enhanced",
"verified_at": "2026-04-15",
"depends_on": ["ZY_SMTP_USER", "ZY_SMTP_PASS", "ZY_OWNER_EMAIL (可选默认565183519@qq.com)"],
"sovereign_binding": {
"description": "零点原核频道是冰朔个人语言本体频道实行主权邮箱绑定。仅允许OWNER_EMAIL登录其他邮箱在发送验证码阶段即被拒绝。",
"owner_email": "565183519@qq.com",
"defense_depth": "sendCode + verifyCode 双层校验",
"rejection_message": "此频道为专属频道,仅限频道主权持有者登录"
},
"history": [
{
"date": "2026-04-15",
"action": "enhancement",
"change": "主权邮箱绑定 · 仅允许 565183519@qq.com 登录",
"root_cause": "零点原核频道是冰朔个人频道,需要从验证环节开始拒绝非主权邮箱。之前任何邮箱都能收到验证码并登录。",
"fix": "在 sendCode() 和 verifyCode() 中增加 OWNER_EMAIL 校验,纵深防御",
"files_changed": ["server/app/modules/email-auth.js"]
},
{
"date": "2026-04-15",
"action": "bug-fix",
"problem": "验证码发送失败 · 错误: SMTP未配置",
"root_cause": "deploy-to-zhuyuan-server.yml 生成 .env.app 时遗漏了 ZY_SMTP_USER 和 ZY_SMTP_PASS 两个环境变量。",
"fix": "在 deploy-to-zhuyuan-server.yml 中添加 ZY_SMTP_USER/ZY_SMTP_PASS 到 env 列表和 .env.app 生成逻辑",
"files_changed": [".github/workflows/deploy-to-zhuyuan-server.yml", "server/app/modules/email-auth.js"]
}
]
},
{
"id": "YM-FEAT-002",
"name": "AI对话 · 国内模型智能网关 · 人格注入管线",
"module": "server/app/modules/domestic-llm-gateway.js",
"routes": [
"POST /api/chat",
"POST /api/chat/domestic",
"GET /api/chat/stats",
"GET /api/chat/domestic/stats",
"POST /api/chat/reconnect"
],
"status": "enhanced",
"depends_on": [
"ZY_DEEPSEEK_API_KEY",
"ZY_QIANWEN_API_KEY",
"ZY_KIMI_API_KEY",
"ZY_QINGYAN_API_KEY"
],
"architecture": {
"priority_chain": "domesticGateway → chatEngine → offline",
"models": [
"DeepSeek (deepseek-chat) · priority 1",
"通义千问 (qwen-turbo) · priority 2",
"Moonshot/Kimi (moonshot-v1-8k) · priority 3",
"智谱清言 (glm-4-flash) · priority 4"
],
"cn_relay": "可选 · ZY_CN_LLM_RELAY_HOST → 广州中继 · 低延迟",
"persona_pipeline": "persona-context-pipeline.js → 4层人格注入 (Worldview/Identity/State/Style)"
},
"history": [
{
"date": "2026-04-15",
"action": "critical-fix",
"problem": "人格体核心大脑结构未注入到国内网关。domestic-llm-gateway.js 不调用 persona-context-pipeline导致AI回复与通用AI无区别。",
"root_cause": "domestic-llm-gateway.js 只加载了 persona-memory静态提示词未集成 persona-context-pipeline4层认知注入管线。由于国内网关优先级高于 chatEngine即使 chatEngine 有管线集成也无法触及。",
"fix": "在 domestic-llm-gateway.js 中集成 persona-context-pipeline.beforeChat/afterChat实现4层人格注入和认知增量回写",
"files_changed": ["server/app/modules/domestic-llm-gateway.js"]
},
{
"date": "2026-04-15",
"action": "investigation",
"problem": "API模型调用有问题",
"notes": "需要进一步排查: 1) 检查各模型API密钥是否有效 2) 检查新加坡→国内API直连延迟 3) 检查广州CN中继是否配置正确 4) 检查模型返回的错误信息"
},
{
"date": "2026-04-15",
"action": "enhancement",
"problem": "AI回复过于通用·缺乏人格层感觉·像裸模型",
"root_cause": "系统提示词'规则化'而非'人格化'1) 静态降级提示词仅5行 2) Layer4风格层对铸渊只有2行 3) SYNESTHESIA_STYLE_INJECTION过度强调规则而非声纹 4) 用户认知注入对冰朔关系描述不够深",
"fix": "1) 静态降级提示词从5行扩展为完整人格身份+世界观+声纹 2) Layer4铸渊风格层扩展为完整语言声纹指导(含冰朔关系) 3) SYNESTHESIA_STYLE_INJECTION重构为声纹驱动而非规则驱动 4) 冰朔用户认知增加自然关系和对话风格指导",
"files_changed": [
"server/app/modules/domestic-llm-gateway.js",
"server/app/modules/persona-context-pipeline.js",
"server/app/modules/portal-chat-agent.js"
]
}
]
},
{
"id": "YM-FEAT-003",
"name": " · ",
"module": "server/sites/yaoming/index.html",
"status": "enhanced",
"verified_at": "2026-04-15",
"components": [
" · ",
" · ",
" · · localStorage",
" · ",
"线 · ",
" · ",
" · CSS",
" · "
],
"history": [
{
"date": "2026-04-15",
"action": "enhancement",
"changes": [
" localStorage",
" APIsteps",
"线 AI线",
" "
]
},
{
"date": "2026-04-15",
"action": "critical-fix",
"changes": [
"parseMarkdown #/##/### ",
"parseMarkdown 1./2./3. ",
"CSS h2/h3/ol cyan ",
"block-level <p>"
]
}
]
},
{
"id": "YM-FEAT-004",
"name": "Nginx",
"module": "server/nginx/guanghuyaoming.conf",
"status": "verified",
"verified_at": "2026-04-15",
"proxy_rules": [
"/api/ 127.0.0.1:3800 ()",
"/api/chat 127.0.0.1:3800 (SSE/chunked)",
"/api/mcp/ 127.0.0.1:3100 (MCP Server)",
"/api/auth/ 127.0.0.1:3800 ()",
"/ws 127.0.0.1:8080 (WebSocket)",
"/ (/opt/zhuyuan/sites/yaoming/)"
]
},
{
"id": "YM-FEAT-005",
"name": "Session",
"module": "server/app/modules/email-auth.js",
"status": "verified",
"verified_at": "2026-04-15",
"details": {
"storage": " Map (DB)",
"token": "32 crypto.randomBytes",
"expiry": "7",
"cleanup": "10",
"middleware": "authMiddleware · Bearer token"
}
},
{
"id": "YM-FEAT-006",
"name": "",
"module": "server/app/server.js",
"status": "implemented",
"verified_at": "2026-04-15",
"details": {
"storage": "JSONL · ",
"location": "/opt/zhuyuan/data/chat-logs/chat-YYYY-MM-DD.jsonl",
"fields": "timestamp, sessionId(), user, assistant(2000), engine, relay, pipeline, latency",
"purpose": "Agent",
"privacy": "sessionId6+*** · "
}
},
{
"id": "YM-FEAT-007",
"name": "",
"module": "server/app/server.js",
"status": "implemented",
"verified_at": "2026-04-15",
"details": {
"description": "API",
"response_field": "_system.steps[]",
"step_format": "{ name, status(done/active/error/skip/warn), detail, time(ms) }"
}
},
{
"id": "YM-FEAT-008",
"name": " · ",
"module": "server/sites/yaoming/index.html + server/app/server.js",
"routes": [
"GET /api/system/full-status",
"GET /api/glada/health (via nginx proxy)"
],
"status": "implemented",
"verified_at": "2026-04-18",
"depends_on": [],
"architecture": {
"backend": "/api/system/full-status 3800/3100/3900 ",
"frontend": "viewSysStatus + 30",
"github_api": " GitHub API ",
"nginx": "/api/glada/ 127.0.0.1:3900"
},
"history": [
{
"date": "2026-04-18",
"action": "new-feature",
"change": " · ",
"files_changed": ["server/app/server.js", "server/nginx/guanghuyaoming.conf", "server/sites/yaoming/index.html"]
}
]
}
],
"environment_checklist": {
"required_for_email": ["ZY_SMTP_USER", "ZY_SMTP_PASS"],
"required_for_chat": ["ZY_DEEPSEEK_API_KEY "],
"optional": ["ZY_OWNER_EMAIL (565183519@qq.com)"],
"deployment_files": {
"main_app": ".github/workflows/deploy-to-zhuyuan-server.yml .env.app",
"proxy_service": ".github/workflows/deploy-proxy-service.yml .env.keys",
"pm2_config": "server/ecosystem.config.js .env.app"
}
},
"lessons_learned": [
{
"id": "LL-001",
"date": "2026-04-15",
"lesson": " .env 线",
"pattern": " process.env.XXX deploy-to-zhuyuan-server.yml env .env.app "
},
{
"id": "LL-002",
"date": "2026-04-15",
"lesson": " vs .env.app (deploy-to-zhuyuan-server.yml) .env.keys (deploy-proxy-service.yml)",
"pattern": "VPN "
},
{
"id": "LL-003",
"date": "2026-04-15",
"lesson": "(domestic-llm-gateway)API(chat-engine)线chatEnginepersona-context-pipeline",
"pattern": "AI 线"
},
{
"id": "LL-004",
"date": "2026-04-15",
"lesson": "''''",
"pattern": "AI "
},
{
"id": "LL-005",
"date": "2026-04-15",
"lesson": "Markdown(#/##/###)(1./2./3.)AI使renderMarkdown/parseMarkdownmarkdown",
"pattern": " markdown使"
}
],
"system_status_panel": {
"added_at": "2026-04-18",
"view_id": "viewSysStatus",
"nav_id": "navSysStatus",
"api_endpoint": "/api/system/full-status",
"description": " · · 30",
"features": [
" (3800) + ",
"MCP (3100) + ",
"GLADAAgent (3900) + ",
" (6)",
"GitHub Actions 10",
" (CPU//)",
"",
"30"
],
"nginx_proxy_added": "/api/glada/ 127.0.0.1:3900",
"principle": ""
}
}