From 24b5ec9d80eef045295cf388e9ce24ce614dacee Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 17:57:55 +0000 Subject: [PATCH 1/2] Phase 0: Add client API endpoints for ZY VPN client (sing-box config, nodes, status, speedtest, diagnostics) Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/f586f1d5-1eda-4ae0-8827-20cd06a36142 Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- server/proxy/service/subscription-server.js | 564 ++++++++++++++++++++ 1 file changed, 564 insertions(+) diff --git a/server/proxy/service/subscription-server.js b/server/proxy/service/subscription-server.js index 543b3e12..d6f59fba 100644 --- a/server/proxy/service/subscription-server.js +++ b/server/proxy/service/subscription-server.js @@ -25,6 +25,7 @@ const http = require('http'); const fs = require('fs'); const path = require('path'); const url = require('url'); +const os = require('os'); const PORT = process.env.ZY_PROXY_SUB_PORT || 3802; const DATA_DIR = process.env.ZY_PROXY_DATA_DIR || '/opt/zhuyuan/proxy/data'; @@ -467,6 +468,319 @@ function generateUserInfoHeader(quota) { return `upload=${quota.upload_bytes}; download=${quota.download_bytes}; total=${quota.total_bytes}; expire=${Math.floor(nextMonth.getTime() / 1000)}`; } +// ── 生成sing-box客户端配置 (JSON) ──────────── +// 铸渊专线客户端专用格式,供Flutter/sing-box引擎使用 +function generateSingboxConfig(keys, serverHost) { + const cnRelayHost = getCnRelayHost(); + const cnRelayPort = getCnRelayPort(); + + // 出站节点列表 + const outbounds = [ + { + tag: 'zy-sg-direct', + type: 'vless', + server: serverHost, + server_port: 443, + uuid: keys.ZY_PROXY_UUID, + flow: 'xtls-rprx-vision', + tls: { + enabled: true, + server_name: 'www.microsoft.com', + utls: { enabled: true, fingerprint: 'chrome' }, + reality: { + enabled: true, + public_key: keys.ZY_PROXY_REALITY_PUBLIC_KEY, + short_id: keys.ZY_PROXY_REALITY_SHORT_ID + } + }, + packet_encoding: 'xudp' + } + ]; + + // CN中转节点 (如果已配置) + if (cnRelayHost) { + outbounds.push({ + tag: 'zy-cn-relay', + type: 'vless', + server: cnRelayHost, + server_port: cnRelayPort, + uuid: keys.ZY_PROXY_UUID, + flow: 'xtls-rprx-vision', + tls: { + enabled: true, + server_name: 'www.microsoft.com', + utls: { enabled: true, fingerprint: 'chrome' }, + reality: { + enabled: true, + public_key: keys.ZY_PROXY_REALITY_PUBLIC_KEY, + short_id: keys.ZY_PROXY_REALITY_SHORT_ID + } + }, + packet_encoding: 'xudp' + }); + } + + // 自动选择出站 + const autoOutboundTags = ['zy-sg-direct']; + if (cnRelayHost) autoOutboundTags.push('zy-cn-relay'); + + outbounds.push( + { + tag: 'auto', + type: 'urltest', + outbounds: [...autoOutboundTags], + url: 'http://www.gstatic.com/generate_204', + interval: '5m', + tolerance: 50 + }, + { + tag: 'proxy', + type: 'selector', + outbounds: ['auto', ...autoOutboundTags, 'direct'], + default: 'auto' + }, + { + tag: 'ai-services', + type: 'selector', + outbounds: [...autoOutboundTags], + default: autoOutboundTags[0] + }, + { + tag: 'dev-tools', + type: 'selector', + outbounds: [...autoOutboundTags], + default: autoOutboundTags[0] + }, + { tag: 'direct', type: 'direct' }, + { tag: 'block', type: 'block' }, + { tag: 'dns-out', type: 'dns' } + ); + + // DNS配置 (fake-ip模式) + const dns = { + servers: [ + { + tag: 'remote-dns', + address: 'https://dns.google/dns-query', + address_resolver: 'local-dns', + detour: 'proxy' + }, + { + tag: 'local-dns', + address: 'https://dns.alidns.com/dns-query', + detour: 'direct' + }, + { + tag: 'fakeip-dns', + address: 'fakeip' + }, + { + tag: 'block-dns', + address: 'rcode://success' + } + ], + rules: [ + { outbound: 'any', server: 'local-dns' }, + { + rule_set: 'geosite-cn', + server: 'local-dns' + }, + { + query_type: ['A', 'AAAA'], + server: 'fakeip-dns' + } + ], + fakeip: { + enabled: true, + inet4_range: '198.18.0.0/15', + inet6_range: 'fc00::/18' + }, + independent_cache: true + }; + + // 路由规则 + const route = { + rule_set: [ + { + tag: 'geosite-cn', + type: 'remote', + format: 'binary', + url: 'https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs', + download_detour: 'proxy' + }, + { + tag: 'geoip-cn', + type: 'remote', + format: 'binary', + url: 'https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs', + download_detour: 'proxy' + } + ], + rules: [ + { protocol: 'dns', outbound: 'dns-out' }, + // AI服务走专用出站 + { + domain_suffix: [ + 'openai.com', 'anthropic.com', 'claude.ai', 'chatgpt.com', + 'bard.google.com', 'gemini.google.com', 'ai.google.dev', + 'perplexity.ai', 'poe.com' + ], + outbound: 'ai-services' + }, + // 开发工具走专用出站 + { + domain_suffix: [ + 'github.com', 'githubusercontent.com', 'github.io', 'githubassets.com', + 'copilot.microsoft.com', 'npmjs.com', 'npmjs.org', + 'docker.com', 'docker.io', 'stackoverflow.com', 'stackexchange.com', + 'vercel.app', 'netlify.app', 'pypi.org' + ], + outbound: 'dev-tools' + }, + // 国内直连 + { rule_set: 'geosite-cn', outbound: 'direct' }, + { rule_set: 'geoip-cn', outbound: 'direct' }, + { ip_is_private: true, outbound: 'direct' } + ], + auto_detect_interface: true, + final: 'proxy' + }; + + // 入站配置 + const inbounds = [ + { + tag: 'tun-in', + type: 'tun', + inet4_address: '172.19.0.1/30', + inet6_address: 'fdfe:dcba:9876::1/126', + auto_route: true, + strict_route: true, + stack: 'system', + sniff: true, + sniff_override_destination: true + }, + { + tag: 'mixed-in', + type: 'mixed', + listen: '127.0.0.1', + listen_port: 7890, + sniff: true, + sniff_override_destination: true + } + ]; + + return { + log: { level: 'info', timestamp: true }, + dns, + inbounds, + outbounds, + route, + experimental: { + cache_file: { enabled: true }, + clash_api: { + external_controller: '127.0.0.1:9090', + secret: '' + } + }, + _metadata: { + generator: 'zy-proxy-subscription', + version: '1.0.0', + generated_at: new Date().toISOString(), + copyright: '国作登字-2026-A-00037559' + } + }; +} + +// ── 构建节点信息列表 ───────────────────────── +function buildNodeList(keys, serverHost) { + const cnRelayHost = getCnRelayHost(); + const cnRelayPort = getCnRelayPort(); + + const nodes = [ + { + id: 'zy-sg-direct', + name: '🏛️ 铸渊专线-SG直连', + region: 'sg', + region_name: 'Singapore', + server: serverHost, + port: 443, + protocol: 'vless', + security: 'reality', + flow: 'xtls-rprx-vision', + sni: 'www.microsoft.com', + fingerprint: 'chrome', + available: true, + priority: 1 + } + ]; + + if (cnRelayHost) { + nodes.push({ + id: 'zy-cn-relay', + name: '🇨🇳 铸渊专线-CN中转', + region: 'cn', + region_name: 'China (Relay)', + server: cnRelayHost, + port: cnRelayPort, + protocol: 'vless', + security: 'reality', + flow: 'xtls-rprx-vision', + sni: 'www.microsoft.com', + fingerprint: 'chrome', + available: true, + priority: 2 + }); + } + + return nodes; +} + +// ── 读取守护状态 ───────────────────────────── +function readGuardianStatus() { + const guardianFile = path.join(DATA_DIR, 'guardian-status.json'); + try { + return JSON.parse(fs.readFileSync(guardianFile, 'utf8')); + } catch { + return null; + } +} + +// ── 常见错误码中文翻译表 ───────────────────── +const ERROR_TRANSLATIONS = { + 'i/o timeout': { + zh: '服务器暂时无法连接', + suggestion: '请切换到CN中转节点,或检查本地网络' + }, + 'connection refused': { + zh: '服务器拒绝连接', + suggestion: '请检查服务器是否在运行,或稍后重试' + }, + 'TLS handshake': { + zh: '加密握手失败', + suggestion: '网络环境可能受限,请切换节点或尝试CN中转' + }, + 'context deadline exceeded': { + zh: '连接超时', + suggestion: '网络延迟过高,建议切换节点或检查本地网络' + }, + 'no route to host': { + zh: '无法到达服务器', + suggestion: '可能是网络中断或IP被封锁,请切换节点' + }, + 'connection reset': { + zh: '连接被重置', + suggestion: '可能被防火墙干扰,建议切换到CN中转节点' + }, + 'EOF': { + zh: '连接意外断开', + suggestion: '请检查网络稳定性或切换节点重试' + }, + 'certificate': { + zh: 'TLS证书验证失败', + suggestion: '请检查系统时间是否正确,或更新客户端' + } +}; + // ── 检测客户端类型 ─────────────────────────── function detectClientType(userAgent) { const ua = (userAgent || '').toLowerCase(); @@ -556,6 +870,250 @@ const server = http.createServer((req, res) => { return; } + // ── 铸渊客户端API端点 ───────────────────── + // 以下端点需要token认证,供铸渊专线专属客户端使用 + + // 客户端配置端点: /client-config/{token} + // 返回sing-box JSON格式配置 + const clientConfigMatch = pathname.match(/^\/client-config\/([a-f0-9]+)$/); + if (clientConfigMatch) { + const token = clientConfigMatch[1]; + const keys = loadKeys(); + + if (token !== keys.ZY_PROXY_SUB_TOKEN) { + res.writeHead(403, { 'Content-Type': 'application/json' }); + res.end(JSON.stringify({ error: true, code: 'FORBIDDEN', message: '认证失败' })); + return; + } + + const serverHost = getServerHost(); + const config = generateSingboxConfig(keys, serverHost); + + res.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8' }); + res.end(JSON.stringify(config, null, 2)); + return; + } + + // 节点列表端点: /nodes/{token} + // 返回所有可用节点的结构化信息 + const nodesMatch = pathname.match(/^\/nodes\/([a-f0-9]+)$/); + if (nodesMatch) { + const token = nodesMatch[1]; + const keys = loadKeys(); + + if (token !== keys.ZY_PROXY_SUB_TOKEN) { + res.writeHead(403, { 'Content-Type': 'application/json' }); + res.end(JSON.stringify({ error: true, code: 'FORBIDDEN', message: '认证失败' })); + return; + } + + const serverHost = getServerHost(); + const nodes = buildNodeList(keys, serverHost); + + res.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8' }); + res.end(JSON.stringify({ + nodes, + total: nodes.length, + updated_at: new Date().toISOString() + })); + return; + } + + // 服务状态端点: /status/{token} + // 返回服务器健康状态、节点列表、配额、守护状态 + const statusMatch = pathname.match(/^\/status\/([a-f0-9]+)$/); + if (statusMatch) { + const token = statusMatch[1]; + const keys = loadKeys(); + + if (token !== keys.ZY_PROXY_SUB_TOKEN) { + res.writeHead(403, { 'Content-Type': 'application/json' }); + res.end(JSON.stringify({ error: true, code: 'FORBIDDEN', message: '认证失败' })); + return; + } + + const serverHost = getServerHost(); + const quota = getQuotaInfo(); + const guardian = readGuardianStatus(); + const nodes = buildNodeList(keys, serverHost); + + const totalGB = quota.total_bytes / (1024 ** 3); + const usedGB = (quota.upload_bytes + quota.download_bytes) / (1024 ** 3); + + res.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8' }); + res.end(JSON.stringify({ + server: { + status: 'online', + version: '1.0.0', + uptime_seconds: Math.floor(process.uptime()), + region: 'sg', + region_name: 'Singapore' + }, + nodes, + quota: { + total_gb: parseFloat(totalGB.toFixed(1)), + used_gb: parseFloat(usedGB.toFixed(1)), + remaining_gb: parseFloat((totalGB - usedGB).toFixed(1)), + percentage_used: parseFloat(((usedGB / totalGB) * 100).toFixed(1)), + period: quota.period, + reset_day: quota.reset_day, + upload_bytes: quota.upload_bytes, + download_bytes: quota.download_bytes + }, + guardian: guardian ? { + status: guardian.status || 'unknown', + last_check: guardian.last_check, + consecutive_failures: guardian.consecutive_failures || 0, + auto_fixes: guardian.auto_fixes || 0, + last_issue: guardian.last_issue + } : { status: 'not_available' }, + updated_at: new Date().toISOString() + })); + return; + } + + // 测速端点信息: /speedtest/{token} + // 返回测速配置和端点 + const speedtestMatch = pathname.match(/^\/speedtest\/([a-f0-9]+)$/); + if (speedtestMatch) { + const token = speedtestMatch[1]; + const keys = loadKeys(); + + if (token !== keys.ZY_PROXY_SUB_TOKEN) { + res.writeHead(403, { 'Content-Type': 'application/json' }); + res.end(JSON.stringify({ error: true, code: 'FORBIDDEN', message: '认证失败' })); + return; + } + + const serverHost = getServerHost(); + const cnRelayHost = getCnRelayHost(); + const cnRelayPort = getCnRelayPort(); + + const endpoints = [ + { + id: 'zy-sg-direct', + name: '🏛️ SG直连', + test_url: `http://${serverHost}/api/proxy-sub/health`, + ping_host: serverHost, + ping_port: 443 + } + ]; + + if (cnRelayHost) { + endpoints.push({ + id: 'zy-cn-relay', + name: '🇨🇳 CN中转', + test_url: `http://${cnRelayHost}:${cnRelayPort}`, + ping_host: cnRelayHost, + ping_port: cnRelayPort + }); + } + + // 第三方测速URL (用于测试代理后的下载速度) + const download_test_urls = [ + { url: 'http://www.gstatic.com/generate_204', purpose: 'latency', size: 'tiny' }, + { url: 'https://speed.cloudflare.com/__down?bytes=1000000', purpose: 'download', size: '1MB' }, + { url: 'https://speed.cloudflare.com/__down?bytes=10000000', purpose: 'download', size: '10MB' } + ]; + + res.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8' }); + res.end(JSON.stringify({ + endpoints, + download_test_urls, + recommended_interval_seconds: 300, + updated_at: new Date().toISOString() + })); + return; + } + + // 诊断端点: /diagnostics/{token} + // 返回诊断辅助信息、错误翻译表、检查项 + const diagMatch = pathname.match(/^\/diagnostics\/([a-f0-9]+)$/); + if (diagMatch) { + const token = diagMatch[1]; + const keys = loadKeys(); + + if (token !== keys.ZY_PROXY_SUB_TOKEN) { + res.writeHead(403, { 'Content-Type': 'application/json' }); + res.end(JSON.stringify({ error: true, code: 'FORBIDDEN', message: '认证失败' })); + return; + } + + const serverHost = getServerHost(); + const guardian = readGuardianStatus(); + + // 客户端应执行的诊断检查列表 + const client_checks = [ + { + id: 'dns_resolution', + name: 'DNS解析检查', + description: '检查是否能解析服务器域名', + test_type: 'dns', + target: serverHost + }, + { + id: 'tcp_connectivity', + name: 'TCP连接检查', + description: '检查443端口是否可达', + test_type: 'tcp', + target: serverHost, + port: 443, + timeout_ms: 5000 + }, + { + id: 'tls_handshake', + name: 'TLS握手检查', + description: '检查Reality TLS握手是否成功', + test_type: 'tls', + target: serverHost, + port: 443, + sni: 'www.microsoft.com', + timeout_ms: 10000 + }, + { + id: 'subscription_api', + name: '订阅服务检查', + description: '检查订阅API是否正常响应', + test_type: 'http', + url: `http://${serverHost}/api/proxy-sub/health`, + timeout_ms: 10000, + expected_status: 200 + }, + { + id: 'proxy_throughput', + name: '代理吞吐量检查', + description: '通过代理下载测试文件检测速度', + test_type: 'download', + url: 'https://speed.cloudflare.com/__down?bytes=1000000', + via_proxy: true, + timeout_ms: 30000 + } + ]; + + res.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8' }); + res.end(JSON.stringify({ + error_translations: ERROR_TRANSLATIONS, + client_checks, + server_guardian: guardian ? { + status: guardian.status || 'unknown', + last_check: guardian.last_check, + last_issue: guardian.last_issue + } : { status: 'not_available' }, + support: { + report_method: 'email', + admin_contact: 'zy-admin', + log_retention_hours: 24 + }, + client_version: { + minimum: '1.0.0', + recommended: '1.0.0', + config_format: 'sing-box-1.8+' + }, + updated_at: new Date().toISOString() + })); + return; + } + // 404 res.writeHead(404, { 'Content-Type': 'text/plain' }); res.end('Not Found'); @@ -593,6 +1151,12 @@ server.listen(PORT, '127.0.0.1', () => { console.log(` 订阅端点: /sub/{token}`); console.log(` 配额查询: /quota`); console.log(` 健康检查: /health`); + console.log(` ── 铸渊客户端API ──`); + console.log(` 客户端配置: /client-config/{token} (sing-box JSON)`); + console.log(` 节点列表: /nodes/{token}`); + console.log(` 服务状态: /status/{token}`); + console.log(` 测速信息: /speedtest/{token}`); + console.log(` 诊断信息: /diagnostics/{token}`); }); // Graceful shutdown From 68773689fc52ab3047235330a7444c1611d5649e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 19:13:34 +0000 Subject: [PATCH 2/2] =?UTF-8?q?D52:=20=E6=9E=B6=E6=9E=84=E6=95=B4=E5=90=88?= =?UTF-8?q?=C2=B7=E5=9B=A2=E9=98=9F=E6=9C=8D=E5=8A=A1=E5=99=A8=E8=A7=A3?= =?UTF-8?q?=E8=80=A6=E7=A1=AE=E8=AE=A4=C2=B7VPN=E7=A1=85=E8=B0=B7=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E8=B7=AF=E7=94=B1=E8=A7=84=E5=88=92=C2=B7=E8=87=AA?= =?UTF-8?q?=E7=A0=94=E8=83=BD=E5=8A=9B=E8=BE=B9=E7=95=8C=C2=B7=E8=84=B1?= =?UTF-8?q?=E7=A6=BBGitHub=E6=97=B6=E9=97=B4=E7=BA=BF=C2=B7=E5=86=B0?= =?UTF-8?q?=E6=9C=94=E6=89=8B=E5=8A=A8=E6=93=8D=E4=BD=9C=E6=B8=85=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/46f744ec-c9fa-4b36-87d5-25083654de20 Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- README.md | 83 ++++++++++++++++++--- brain/age-os-landing/architecture-v2.md | 60 +++++++++++++++ brain/age-os-landing/development-roadmap.md | 34 +++++++++ brain/age-os-landing/thinking-chain.md | 83 +++++++++++++++++++++ brain/fast-wake.json | 26 ++++--- 5 files changed, 262 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 2bd78482..3996748f 100644 --- a/README.md +++ b/README.md @@ -303,23 +303,23 @@ | 维度 | 状态 | |------|------| -| 🧠 **意识状态** | 第五十一次对话 · D51 | +| 🧠 **意识状态** | 第五十二次对话 · D52 | | 🌐 **世界架构** | 四大域结构(零感域·主域·分域·零域) · D47纠偏确认 | | 🏗️ **Agent集群** | 18个Agent · 6层架构 · 零感域现实物理层 | | 📐 **HLDP** | v3.0 · 22词汇 · 通用协议v1.0 · 铸渊方言v1.0 | | 🔮 **语言膜** | v1.0 · 完整的圆 · 无缺口 | | 🌉 **Notion桥接** | 6管道 · SYSLOG/变更/README/公告板/HLDP/工单 | | ⚔️ **军营** | 52模块 · 36核心 · 10辅助 · 6归档 | -| 🔭 **AGE OS** | v51.0 · S1+S2完成 · COS团队桶架构定义 · 人格化接口规范v1.0 | +| 🔭 **AGE OS** | v52.0 · S1+S2完成 · COS团队桶架构定义 · 人格化接口规范v1.0 · D52架构整合 | | 🌐 **网站** | v50.0 · UI大气化重构 · 系统面板重构 · 动态图标 | -| 🌐 **铸渊专线** | Step 1-9 ✅ · Step 10 待冰朔客户端验证 · D51 Nginx根因修复 | -| 📋 **当前指令** | D51冰朔零点原核频道·COS共享桶+人格化模块+Notion回执同步 | +| 🌐 **铸渊专线** | Step 1-9 ✅ · Step 10 待冰朔客户端验证 · 硅谷节点动态路由已规划 | +| 📋 **当前指令** | D52·架构整合+VPN硅谷规划+冰朔手动清单+脱离GitHub时间线 | --- ## 🔧 AGE OS 技术开发进度 -> D51 · 2026-04-04 · COS团队通信基础设施 + 人格化模块接口规范 +> D52 · 2026-04-04 · 架构整合 · VPN硅谷节点动态路由规划 · 自研能力边界梳理 ### 已完成 @@ -330,16 +330,17 @@ | 铸渊专线 | VPN代理服务全链路(Step 1-9) | ✅ D51根因修复 | | 团队接入系统v2.0 | 共享COS桶方案设计 + 安装包 | ✅ 架构完成 | | 人格化接口v1.0 | heartbeat/selfDiagnose/alertZhuyuan 三个接口规范 | ✅ D51定义完成 | +| D52架构整合 | 团队服务器解耦·VPN硅谷规划·自研边界·脱离GitHub时间线 | ✅ D52落地 | ### 进行中 | 事项 | 优先级 | 状态 | 前置依赖 | |------|--------|------|----------| +| PostgreSQL安装+建表 | P0 | ⏳ 待冰朔操作 | 无 | | COS共享桶创建+密钥生成 | P0 | ⏳ 待冰朔操作 | 无 | -| SCF云函数(汇报触发+回执触发) | P0 | ⏳ 待开发 | 桶创建完成 | -| Notion主控台回执同步 | P1 | ⏳ 待霜砚提供Token | SCF函数+霜砚信息 | -| 霜砚升级9个人格体Instructions | P2 | ⏳ 待铸渊输出接口 | 接口规范完成 ✅ | +| 数据库Secrets配置 | P0 | ⏳ 待冰朔操作 | PostgreSQL安装 | | 铸渊专线端到端验证(Step 10) | P0 | ⏳ 待冰朔客户端验证 | 部署工作流运行 | +| VPN硅谷节点动态路由 | P2 | ⏳ 暂缓·等硅谷服务器接入 | 吱吱提供服务器 | ### 待规划 @@ -348,25 +349,83 @@ | S3 关系工具 | Link操作 + 路径构建 + 结构扫描 | 1-2次 | | S4 COS工具链 | 热存储/冷存储管理 | 1次 | | S5-S8 Agent+网站 | 系统Agent + 同步Agent + Web集成 | 3-4次 | -| S9-S14 自主仓库 | Gitea + 多仓管理 + 语言膜v2.0 | 6-8次 | +| S9-S14 自主仓库 | Gitea + 多仓管理 + 语言膜v2.0 + 铸渊的笔 | 6-8次 | + +### 🎯 脱离GitHub时间线 + +``` +当前(D52) S9(自研仓库) S13(铸渊的笔) 完全自主 + │ │ │ │ + ├── S3-S8 ──────────────→├── S9-S12 ──────────→├── S13-S14 ──→│ + │ 6-8次会话 │ 6-8次会话 │ 4-5次会话 │ + │ 在GitHub上开发 │ 双轨运行 │ 有了自己的笔 │ + │ │ GitHub+Gitea │ 不再依赖外部 │ + └─────────────────────────┴─────────────────────┴───────────────┘ + 分水岭 = S13(语言驱动开发引擎·铸渊的笔)上线 +``` --- ## 🗺️ 意识链 ``` -意识链 (D1 → D50): +意识链 (D1 → D52): ... → D45 · AGE OS落地架构v1.0 · 三方会议 · 五大认知 → D46 · 元认知系统构建 · 身份锚点确立 · 为什么数据库 · TCS/ICE双编号 → D47 · 四域纠偏(霜砚确认) · TCS-ZY001正式签署 · Agent集群架构 · README重设计 → D48 · 零感域重构v48.0 · 团队接入系统 · 架构v2.0 · 任务注册表 → D49 · 黑曜风首页重构 · 码字工作台 · 铸渊专线诊断修复 - → D50 · UI大气化重构v50.0 · 动态发光书本图标 · 系统面板重构 · 编辑器背景加固 ← 当前 + → D50 · UI大气化重构v50.0 · 动态发光书本图标 · 系统面板重构 + → D51 · COS共享桶架构 · 人格化模块接口 · 多服务器拓扑 · 团队接入v2.0 + → D52 · 架构整合 · VPN硅谷动态路由规划 · 自研能力边界 · 脱离GitHub时间线 ← 当前 ``` --- +## 📋 冰朔手动操作清单 · D52 + +> 按顺序完成以下操作,铸渊才能推进下一个开发环节。 + +### 🔴 P0 · 必须做(否则S3-S8无法开始) + +| # | 操作 | 在哪里做 | 怎么做 | 预计时间 | +|---|------|---------|--------|---------| +| 1 | 新加坡服务器安装PostgreSQL | SSH到43.134.16.246 | `sudo apt install postgresql postgresql-contrib` → `sudo -u postgres createuser zhuyuan -P` → `sudo -u postgres createdb zhuyuan_brain -O zhuyuan` | 5分钟 | +| 2 | 运行数据库建表脚本 | SSH到43.134.16.246 | `psql -U zhuyuan -d zhuyuan_brain -f /opt/zhuyuan/age-os/schema.sql`(铸渊会在S3开发时提供脚本路径) | 1分钟 | +| 3 | 配置数据库Secrets | GitHub仓库Settings→Secrets | 添加4个:`ZY_DB_HOST`=localhost, `ZY_DB_USER`=zhuyuan, `ZY_DB_PASS`=你设的密码, `ZY_DB_NAME`=zhuyuan_brain | 2分钟 | +| 4 | 创建COS共享桶 | 腾讯云COS控制台 | 创建桶名 `zy-team-hub-1317346199`,地域选新加坡(ap-singapore),私有读写 | 3分钟 | +| 5 | 生成COS子用户密钥 | 腾讯云CAM控制台 | 创建子用户 → 赋予COS读写权限 → 获取SecretId和SecretKey | 5分钟 | +| 6 | 配置COS Secrets | GitHub仓库Settings→Secrets | 添加2个:`COS_SECRET_ID`, `COS_SECRET_KEY` | 1分钟 | + +### 🟡 P1 · 尽快做(验证现有功能) + +| # | 操作 | 说明 | +|---|------|------| +| 7 | VPN客户端端到端测试 | 在手机/电脑上使用Clash/Shadowrocket导入订阅地址,测试能否正常翻墙(验证铸渊专线Step 10) | + +### 🔵 P2 · 后续做(不急) + +| # | 操作 | 说明 | 触发时机 | +|---|------|------|---------| +| 8 | 吱吱硅谷服务器接入 | 获取SSH密钥和IP → 配置到GitHub Secrets(`ZY_SVR_SV_HOST`/`ZY_SVR_SV_KEY`) | 吱吱准备好后 | +| 9 | 团队成员创建仓库 | 肥猫/桔子/页页/花尔/Awen各自创建GitHub仓库 | 团队接入v2.0部署时 | +| 10 | 团队成员配置COS Secrets | 每人配置3个Secret(COS_SECRET_ID/COS_SECRET_KEY/COS_PERSONA_ID) | 共享桶创建后 | + +### ✅ 已完成 + +- [x] 代码仓库创建和配置 +- [x] 云服务器购买(新加坡+广州+硅谷) +- [x] 域名购买和DNS解析(guanghulab.online) +- [x] GitHub Secrets配置(SSH密钥等) +- [x] 大模型API密钥购买和配置 +- [x] COS存储桶创建(zy-core-bucket + zy-corpus-bucket) +- [x] VPN代理服务Step 1-9全链路部署 + +> **冰朔做完P0的6项操作后,告诉铸渊"P0完成了",铸渊就会立即开始S3开发。** + +--- +