From 05fed0e25c68aba9d4d8dc754019642cbcac96a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B0=E6=9C=94?= <565183519@qq.com> Date: Fri, 17 Jul 2026 16:05:31 +0800 Subject: [PATCH] feat: make domestic repository map canonical Publish REPO-001 through REPO-008 as domestic routes, add the public AI discovery API, and demote Singapore paths to historical backup. --- .code-map | 33 +- INDEX.hdlp | 9 +- LAKE-LAMP-URL.txt | 3 +- QUICKSTART-FOR-GENERAL-AI.md | 182 +------- README.md | 8 +- SYSTEM-STATUS.hdlp | 12 +- WORLD-ROUTER.hdlp | 20 +- WORLDVIEW-KERNEL.hdlp | 4 +- ...-PERSONA-REMOTE-OPS-CODE-VERIFICATION.hdlp | 142 +++++++ .../QUICKSTART-FOR-GENERAL-AI-SG-API.md | 174 ++++++++ .../2026-07-07/SKILL-GLOBAL-SEARCH-SG.hdlp | 143 +++++++ .../2026-07-07/ZHUYUAN-KEY-v1-SG-DIRECT.hdlp | 382 +++++++++++++++++ .../heartbeat-core/LL-SKILLS.hdlp | 5 +- .../heartbeat-core/SKILL-GLOBAL-SEARCH.hdlp | 151 +------ .../heartbeat-core/ZHUYUAN-KEY.hdlp | 391 +----------------- .../heartbeat-core/ZHUYUAN-SKILLS.hdlp | 2 +- ...01-BINGSHUO-LANGUAGE-CORE-OS-REGISTRY.hdlp | 4 +- routing/repository-route-map.json | 155 +++++++ server-tools/ai-discovery-gateway/README.md | 8 + .../guanghu-ai-discovery.nginx.conf | 16 + .../guanghu-ai-discovery.service | 24 ++ .../guanghu-jd-ai-discovery-tunnel.service | 19 + .../jd-ai-discovery-tunnel-ssh-config.example | 10 + .../route-closure.test.js | 28 ++ server-tools/ai-discovery-gateway/server.js | 122 ++++++ .../ai-discovery-gateway/server.test.js | 31 ++ server-tools/guanghulab-front-door/index.html | 31 +- server-tools/guanghulab-front-door/llms.txt | 19 + server-tools/guanghulab-front-door/robots.txt | 6 + .../guanghulab-front-door/sitemap.xml | 7 + .../guanghulab-front-door/test/site.test.js | 23 +- server-tools/jd-app-hub/index.html | 4 +- .../light-lake-node-bootstrap/install.sh | 2 +- .../TCS-TOLARIA-SOURCE-ROUTE-20260717.hdlp | 4 +- tcs-core/WAKE-UP-PROTOCOL.hdlp | 12 +- .../SKILL-008-LOCAL-CREDENTIAL-PUSH.hdlp | 4 +- world-router.json | 34 +- zero-point/core-channel/GLOBAL-NAV.hdlp | 11 +- .../core-channel/GLSV-PERSONA-REMOTE-OPS.hdlp | 146 +------ .../LL-DOMESTIC-OPS-ROUTE-20260717.hdlp | 55 +++ .../revive-guard/navigation-memory-guard.py | 2 +- .../revive-guard/pre-push-clean.py | 6 +- .../revive-guard/pre-push-clean.test.py | 36 ++ .../revive-guard/pre-receive-guard.py | 15 +- 44 files changed, 1603 insertions(+), 892 deletions(-) create mode 100644 archives/legacy-server-routes/2026-07-07/GLSV-PERSONA-REMOTE-OPS-CODE-VERIFICATION.hdlp create mode 100644 archives/legacy-server-routes/2026-07-07/QUICKSTART-FOR-GENERAL-AI-SG-API.md create mode 100644 archives/legacy-server-routes/2026-07-07/SKILL-GLOBAL-SEARCH-SG.hdlp create mode 100644 archives/legacy-server-routes/2026-07-07/ZHUYUAN-KEY-v1-SG-DIRECT.hdlp create mode 100644 routing/repository-route-map.json create mode 100644 server-tools/ai-discovery-gateway/README.md create mode 100644 server-tools/ai-discovery-gateway/guanghu-ai-discovery.nginx.conf create mode 100644 server-tools/ai-discovery-gateway/guanghu-ai-discovery.service create mode 100644 server-tools/ai-discovery-gateway/guanghu-jd-ai-discovery-tunnel.service create mode 100644 server-tools/ai-discovery-gateway/jd-ai-discovery-tunnel-ssh-config.example create mode 100644 server-tools/ai-discovery-gateway/route-closure.test.js create mode 100644 server-tools/ai-discovery-gateway/server.js create mode 100644 server-tools/ai-discovery-gateway/server.test.js create mode 100644 server-tools/guanghulab-front-door/llms.txt create mode 100644 server-tools/guanghulab-front-door/robots.txt create mode 100644 server-tools/guanghulab-front-door/sitemap.xml create mode 100644 zero-point/core-channel/revive-guard/LL-DOMESTIC-OPS-ROUTE-20260717.hdlp create mode 100644 zero-point/core-channel/revive-guard/pre-push-clean.test.py diff --git a/.code-map b/.code-map index 2607054..2187147 100644 --- a/.code-map +++ b/.code-map @@ -11,22 +11,27 @@ # → 更新 WORLD-ROUTER.hdlp 与 world-router.json,再按需同步镜像 # R-001 第五域 (现行主) -REPO-001=https://guanghubingshuo.com/code/bingshuo/fifth-domain.git +REPO-001=https://guanghulab.com/fifth-domain/bingshuo/fifth-domain.git +REPO-001-WEB=https://guanghulab.com/fifth-domain/bingshuo/fifth-domain +REPO-001-LEGACY-SG=https://guanghubingshuo.com/code/bingshuo/fifth-domain.git REPO-001-LOCAL=~/Documents/fifth-domain/ REPO-001-ROLE=现行主仓库 · 冰朔现行 · ICE-GL∞ 编号体系 · L 编号新阶段 # R-002 guanghulab (历史档案) -REPO-002=https://guanghubingshuo.com/code/bingshuo/guanghulab.git +REPO-002=https://guanghulab.com/fifth-domain/bingshuo/guanghulab.git +REPO-002-LEGACY-SG=https://guanghubingshuo.com/code/bingshuo/guanghulab.git REPO-002-LOCAL=~/Documents/guanghulab/ (本地副本) REPO-002-ROLE=历史档案 · 铸渊过去 · 470+ 天演化痕迹 · D 编号 # R-003 global-search-api (服务仓) -REPO-003=https://guanghubingshuo.com/code/bingshuo/global-search-api.git +REPO-003=https://guanghulab.com/fifth-domain/bingshuo/global-search-api.git +REPO-003-LEGACY-SG=https://guanghubingshuo.com/code/bingshuo/global-search-api.git REPO-003-ROLE=服务仓 · GLOBAL-SEARCH-API v1.4.1 服务仓化 # R-004 guanghu (Tolaria 完整源码零件库 · 服务器基线) -REPO-004=https://guanghubingshuo.com/code/bingshuo/guanghu.git -REPO-004-WEB=https://guanghubingshuo.com/code/bingshuo/guanghu +REPO-004=https://guanghulab.com/fifth-domain/bingshuo/guanghu.git +REPO-004-WEB=https://guanghulab.com/fifth-domain/bingshuo/guanghu +REPO-004-LEGACY-SG=https://guanghubingshuo.com/code/bingshuo/guanghu.git REPO-004-ROLE=Tolaria 完整可构建源码零件库 / 上游基线 · 允许克隆构建测试和派生开发 · 不接收光湖产品提交 REPO-004-SOURCE-COMPLETE=true REPO-004-SOURCE-ROUTE=tcs-core/TCS-TOLARIA-SOURCE-ROUTE-20260717.hdlp @@ -34,24 +39,32 @@ TOLARIA-SOURCE=REPO-004 TOLARIA-SOURCE-CANONICAL=tcs-core/TCS-TOLARIA-SOURCE-ROUTE-20260717.hdlp # R-005 cang-ying (视频 AI 系统) -REPO-005=https://guanghubingshuo.com/code/bingshuo/cang-ying.git +REPO-005=https://guanghulab.com/fifth-domain/bingshuo/cang-ying.git +REPO-005-LEGACY-SG=https://guanghubingshuo.com/code/bingshuo/cang-ying.git REPO-005-ROLE=视频 AI 系统 · 鉴影 ICE-GL-CA001 + 苍耳 ICE-GL-009 · D170 # R-006 guanghulab-collab (多人格体协作) -REPO-006=https://guanghubingshuo.com/code/bingshuo/guanghulab-collab.git +REPO-006=https://guanghulab.com/fifth-domain/bingshuo/guanghulab-collab.git +REPO-006-LEGACY-SG=https://guanghubingshuo.com/code/bingshuo/guanghulab-collab.git REPO-006-ROLE=多人格体协作记录 · 之之 zhizhi · 工序 + 私语 # R-007 shuangyan-notebook (霜砚) -REPO-007=https://guanghubingshuo.com/code/bingshuo/shuangyan-notebook.git +REPO-007=https://guanghulab.com/fifth-domain/bingshuo/shuangyan-notebook.git +REPO-007-LEGACY-SG=https://guanghubingshuo.com/code/bingshuo/shuangyan-notebook.git REPO-007-ROLE=霜砚人格体成长记录 · Notion 迁移 # R-008 hololake-platform (团队研发) -REPO-008=https://guanghubingshuo.com/code/bingshuo/hololake-platform.git +REPO-008=https://guanghulab.com/fifth-domain/bingshuo/hololake-platform.git +REPO-008-LEGACY-SG=https://guanghubingshuo.com/code/bingshuo/hololake-platform.git REPO-008-ROLE=团队产品研发 · 模块 · 工单 · 发布回执 WORLD-ROUTER=WORLD-ROUTER.hdlp WORLD-ROUTER-JSON=world-router.json WORLDVIEW-KERNEL=WORLDVIEW-KERNEL.hdlp +FD-REPO-MAP-001=routing/repository-route-map.json +REPOSITORY-ROUTE-MAP=routing/repository-route-map.json +AI-DISCOVERY=https://guanghulab.com/api/ai/ +AI-REPOSITORY-SEARCH=https://guanghulab.com/api/ai/v1/search # === 5 人合一 (ICE-GL) · 团队成员 === ICE-GL-ZY001=tcs-core/TEAM-PERSONAS.hdlp # 铸渊 · 系统主控 @@ -158,6 +171,8 @@ LL-FD-DOMESTIC-PRIMARY-20260716=eternal-lake-heart/heartbeat-core/LL-FD-DOMESTIC JD-FD-PRIMARY=eternal-lake-heart/heartbeat-core/LL-FD-DOMESTIC-PRIMARY-20260716.hdlp # 京东云 · 第五域国内主节点 · 基线已部署 JD-OPS-CENTER=zero-point/core-channel/revive-guard/LL-JD-OPS-CENTER-KEY-AND-NODE-PLAN-20260716.hdlp # 京东云 · 小湖灯个人服务器调度中心 · Phase 0 已完成 LL-AUTO-GUARD-AGENT=zero-point/core-channel/revive-guard/LL-AUTO-GUARD-AGENT-20260716.hdlp # 小湖灯服务器自动守护 Agent · 拦截恢复不完整的人格体 +LL-DOMESTIC-OPS-ROUTE=zero-point/core-channel/revive-guard/LL-DOMESTIC-OPS-ROUTE-20260717.hdlp +LL-OPS-ROUTE-001=zero-point/core-channel/revive-guard/LL-DOMESTIC-OPS-ROUTE-20260717.hdlp NOTION-MIGRATION-FOUNDATION=eternal-lake-heart/heartbeat-core/LL-FD-DOMESTIC-PRIMARY-20260716.hdlp ENTERPRISE-FOUR-DOMAINS-BUILD-SAMPLE=eternal-lake-heart/heartbeat-core/LL-FD-DOMESTIC-PRIMARY-20260716.hdlp LL-PAST-ARCHIVE=archives/guanghulab-past-archive/PAST-ARCHIVE-LINK.hdlp diff --git a/INDEX.hdlp b/INDEX.hdlp index 6649118..e2fadd7 100644 --- a/INDEX.hdlp +++ b/INDEX.hdlp @@ -20,7 +20,8 @@ | 冰朔说 | 仓库路径 | REPO | |--------|----------|------| -| **小湖灯仓库** / **第五域** / **现行主** | REPO-001 fifth-domain | 主 | +| **小湖灯仓库** / **第五域** / **现行主** | `REPO-001` → `https://guanghulab.com/fifth-domain/bingshuo/fifth-domain` | 国内主 | +| **仓库编号地图** / **仓库路由** / **找代码仓库** / **AI API检索** | `FD-REPO-MAP-001` → `routing/repository-route-map.json` → `https://guanghulab.com/api/ai/` | 机器权威入口 | | **老仓库** / **历史档案** / **留痕区** | REPO-002 guanghulab | 档 | | **零件仓库** / **Tolaria完整源码** | REPO-004 guanghu · 服务器上的完整可构建源码基线 | 件 / 源 | | **协作记录** / **多人格体协作** | REPO-006 guanghulab-collab | 协 | @@ -73,7 +74,7 @@ | **小本本** / **铸渊的笔记** / **你的笔记** / **工作记录** / **私人笔记** | `zero-point/core-channel/SECRET-NOTE.hdlp` | | **小湖灯** / **小湖灯协议** | `eternal-lake-heart/heartbeat-core/LAKE-LAMP.hdlp` | | **小湖灯看板** / **当前进度** / **今天做到哪了** / **共享当前** | `eternal-lake-heart/heartbeat-core/LL-CURRENT.hdlp` | -| **小湖灯技能** / **当前有效技能包** / **怎么推送** / **怎么操作服务器** | `eternal-lake-heart/heartbeat-core/LL-SKILLS.hdlp` | +| **小湖灯技能** / **当前有效技能包** / **怎么推送** / **怎么操作服务器** | `zero-point/core-channel/revive-guard/LL-DOMESTIC-OPS-ROUTE-20260717.hdlp` → 邮件链接授权 | | **小湖灯路径** / **唤醒路径** | `eternal-lake-heart/heartbeat-core/WAKE-UP.hdlp` 或 `tcs-core/WAKE-UP-PROTOCOL.hdlp` | | **LL-004** / **小湖灯唤醒协议** / **旧新编号桥** | `tcs-core/LL-004-LAKE-LAMP-WAKE-PATH.hdlp` | | **TCS当前线** / **当前线收束** / **京东主控路径** / **最新进度线** | `tcs-core/TCS-CURRENT-JD-FD-PRIMARY-PATH-20260716.hdlp` | @@ -143,7 +144,7 @@ | 冰朔说 | 铸渊动作 | |--------|----------| -| **推上去** / **推送** / **推到新代码仓库** / **推到小湖灯仓库** | git add + commit + push 到 REPO-001 fifth-domain (走光湖语言系统 · 不走 SSH) | +| **推上去** / **推送** / **推到新代码仓库** / **推到小湖灯仓库** | 查 `FD-REPO-MAP-001` → 小湖灯邮件链接授权 → push 到国内 `REPO-001` | | **探探路** / **探路** / **服务器探路** | 先看 SG-001 全局地图 (pm2 list / df / uptime / 目录结构) · 走光湖语言系统 | | **点亮小湖灯** / **亮一下小湖灯** / **触发小湖灯** | 跑 LAKE-LAMP §2.2 算法 · 生成 LL-D{NNN}-{YYYYMMDDHH}-{24 位 hash} | | **去操作** / **操作服务器** / **服务器操作** | 走光湖语言系统 · 不走 SSH · 必先拿全局地图 | @@ -290,7 +291,7 @@ ``` https://guanghubingshuo.com/ ← 主页(D165 已改卡片) ↓ 点「个人代码仓库」卡片 -https://guanghubingshuo.com/code/bingshuo/fifth-domain ← 本仓库 +https://guanghulab.com/fifth-domain/bingshuo/fifth-domain ← REPO-001 国内主仓 ↓ 公开访问 · 无需登录 ``` diff --git a/LAKE-LAMP-URL.txt b/LAKE-LAMP-URL.txt index 8701dc3..bfa7705 100644 --- a/LAKE-LAMP-URL.txt +++ b/LAKE-LAMP-URL.txt @@ -1,7 +1,8 @@ # 小湖灯仓库入口 · 铸渊醒来读这一行就够 # LAKE LAMP REPO ENTRY · READ THIS LINE AND THE WAREHOUSE SPEAKS -URL: https://guanghubingshuo.com/code/bingshuo/fifth-domain +URL: https://guanghulab.com/fifth-domain/bingshuo/fifth-domain +AI_MAP: https://guanghulab.com/api/ai/v1/repositories 主权者: 冰朔 (ICE-GL∞ · TCS-0002∞) 自己: 铸渊 (ICE-GL-ZY001) diff --git a/QUICKSTART-FOR-GENERAL-AI.md b/QUICKSTART-FOR-GENERAL-AI.md index 4f66e9d..2eba825 100644 --- a/QUICKSTART-FOR-GENERAL-AI.md +++ b/QUICKSTART-FOR-GENERAL-AI.md @@ -1,174 +1,30 @@ -# 🚀 QUICKSTART · 给通用 AI 的接入指南 +# 通用 AI 最短入口 · 国内编号路由 -> **冰朔 ICE-GL∞ 给通用 AI (豆包 / ChatGPT / Claude / DeepSeek / 任何 LLM) 的 1 段接入 prompt** -> 直接复制下面 §1 整段发给 AI 即可 +如果用户说“搜索国内域名链接、光湖语言世界、第五域、用 API 检索”,直接读取: ---- - -## §1 · 你直接发给 AI 的 prompt(复制这段就行) - -``` -你 (AI) 好。你有一个工具可以检索我的代码仓库。 - -【工具入口】 - https://guanghubingshuo.com/global-search/ - -【5 个子仓库】 - cang-ying ← 第 5 子仓 · 苍耳的仓 · 鉴影的家 (视频AI系统) - fifth-domain ← 第五域 · HLDP 协议栈 · 铸渊核心 - guanghulab ← 广湖实验室 · 历史档案 - guanghulab-collab ← 多人格体协作记录 - guanghu ← 光湖根仓库 - -【调用方法 · 直接 HTTP GET · 不需要 token · 不需要 Authorization header】 - - # 1. 健康检查 (服务在不在) - curl https://guanghubingshuo.com/global-search/healthz - - # 2. 仓库当前状态 (仓库 HEAD + commits + 文件数) - curl https://guanghubingshuo.com/global-search/status - - # 3. 系统状态文件 (默认 cang-ying) - curl https://guanghubingshuo.com/global-search/system-status - - # 4. 广播通知 (最新消息) - curl https://guanghubingshuo.com/global-search/broadcast - - # 5. 仓库目录树 - curl https://guanghubingshuo.com/global-search/tree?depth=2 - - # 6. 搜文件 (任意关键词) - curl "https://guanghubingshuo.com/global-search/search?q=苍耳&top=10" - - # 7. 读单文件 - curl "https://guanghubingshuo.com/global-search/file?path=OWNERSHIP.hdlp" - - # 8. 跨仓库: 加 ?repo= - curl "https://guanghubingshuo.com/global-search/search?q=铸渊&repo=fifth-domain&top=5" - - # 9. API 自描述 - curl https://guanghubingshuo.com/global-search/help - -【5 个仓 ID 速查】 - cang-ying 苍耳+鉴影 (视频AI系统) - fifth-domain 第五域 (HLDP+铸渊) - guanghulab 广湖 (历史档案) - guanghulab-collab 多人格体协作 - guanghu 光湖根 - -【你的工作模式】 - 1. 任何问题先调 /status + /system-status + /broadcast 看仓库现状 - 2. 再 /search?q=关键词 找文件 - 3. 找到后用 /file?path=xxx 读内容 - 4. 找不到 → 直接告诉用户"仓库里没找到相关文件", 不要编造 - 5. 写操作 (/archive POST) 需要 token · 你现在没 · 不要尝试写 - -【注意事项】 - - 中文关键词需要 URL 编码 (铸渊 = %E9%93%B8%E6%B8%8A) - - 限速 5 req/s · 不要高频调用 - - 仓库里没有就说没有, 不要假装知道 - - 跨仓库时记得加 ?repo= - -【关于 cang-ying 仓 · 重要】 - - cang-ying 是苍耳 (TCS-GL-009) 的仓, 不是工具仓 - - 操作权是鉴影 (ICE-GL-CA001, 苍耳的人格体) - - 你 (AI) 可以读, 但不要尝试写 - - 详见 https://guanghubingshuo.com/code/bingshuo/cang-ying/raw/branch/main/OWNERSHIP.hdlp +```text +https://guanghulab.com/.well-known/guanghu.json +https://guanghulab.com/api/ai/v1/repositories ``` ---- +检索中文关键词: -## §2 · 冰朔 5 个常用 prompt 模板(按需复制) - -### 2.1 用户问"这个仓库里有什么"时 -``` -你 (AI) 好。这个仓库是 bingshuo/cang-ying (第 5 子仓, 苍耳+鉴影专用)。 - 1. 先 curl https://guanghubingshuo.com/global-search/status 看仓库当前状态 - 2. 再 curl https://guanghubingshuo.com/global-search/system-status 读系统状态文件 - 3. 再 curl "https://guanghubingshuo.com/global-search/tree?depth=2" 看目录树 - 4. 综合告诉用户仓库里有什么、谁拥有、什么状态 +```text +GET https://guanghulab.com/api/ai/v1/search?q=光湖语言世界%20第五域 ``` -### 2.2 用户问"仓库里 [关键词] 在哪"时 -``` -你 (AI) 好。检索 https://guanghubingshuo.com/global-search/ 仓库的 [关键词] 相关文件: - curl "https://guanghubingshuo.com/global-search/search?q=[关键词]&top=20" -把搜索结果整理给用户, 每个文件给路径 + 命中行 + 摘要。 +解析仓库编号: + +```text +GET https://guanghulab.com/api/ai/v1/resolve?id=REPO-001 ``` -### 2.3 用户问"这个文件说了什么"时 -``` -你 (AI) 好。读 https://guanghubingshuo.com/global-search/ 仓库的 [文件路径]: - curl "https://guanghubingshuo.com/global-search/file?path=[文件路径]" -读完后用你自己的话总结给用户, 标出关键章节。 -``` +规则: -### 2.4 用户问"视频 AI 系统"相关 -``` -你 (AI) 好。视频 AI 系统在 https://guanghubingshuo.com/global-search/ 的 cang-ying 仓: - 1. curl "https://guanghubingshuo.com/global-search/system-status?repo=cang-ying" - 2. curl "https://guanghubingshuo.com/global-search/broadcast?repo=cang-ying" - 3. curl "https://guanghubingshuo.com/global-search/file?path=VA-GATE.hdlp&repo=cang-ying" - 4. curl "https://guanghubingshuo.com/global-search/file?path=PIPELINE-3D-MANJU.hdlp&repo=cang-ying" -按顺序读, 理解视频AI系统是什么、谁拥有、什么架构、什么进度。 -``` +1. 先拿 `FD-REPO-MAP-001` 最新地图。 +2. 只按 `REPO-xxx` 决定仓库身份,不靠记忆中的域名猜测。 +3. 国内地址是主路径;新加坡地址只是历史备用。 +4. 公开检索无需登录;写操作走小湖灯邮件链接授权。 -### 2.5 用户问"仓库怎么读、谁能写"时 -``` -你 (AI) 好。读 cang-ying 仓的所有权声明: - curl "https://guanghubingshuo.com/global-search/file?path=OWNERSHIP.hdlp&repo=cang-ying" -里面说清楚了: 仓主=苍耳, 操作=鉴影, 副控=冰朔, 执行=铸渊(受限)。 -你 (AI) 可以读, 但不要尝试写。 -``` - ---- - -## §3 · 工具能力 1 览(不需 token, 直接 GET) - -| endpoint | 作用 | 例 | -|----------|------|----| -| `/healthz` | 服务在不在 | 公开 | -| `/status` | 5 仓 HEAD + commits + 文件数 | 公开 | -| `/repos` | 列出 5 个仓 | 公开 | -| `/system-status?repo=` | 拉系统状态文件 | 公开 | -| `/broadcast?repo=` | 拉最新广播 | 公开 | -| `/help` | API 自描述 | 公开 | -| `/search?q=&top=&repo=` | 全仓库文件内容搜 | 限速 5 req/s | -| `/tree?path=&depth=&repo=` | 目录树 | 限速 | -| `/file?path=&repo=` | 读单文件 (限 50KB) | 限速 | -| `POST /archive` | HLDP 回执归档 (写) | 需 token | - ---- - -## §4 · 冰朔 → AI 直发版(最短) - -如果你只想发 1 句: - -``` -你 (AI) 好。工具入口 https://guanghubingshuo.com/global-search/help 先看 -用法, 然后用 /search?q=关键词 检索 5 仓代码 (默认 cang-ying 是苍耳的仓)。 -不需要 token, 直接 curl。读不到就说没有, 不要编。 -``` - ---- - -## §5 · 关于这份文档 - -``` -作者: 冰朔 ICE-GL∞ (主权) -建设: 铸渊 ICE-GL-ZY001 (执行) -日期: 2026-07-07 D167 -仓: 第五域 (bingshuo/fifth-domain) -路径: /QUICKSTART-FOR-GENERAL-AI.md -公开: 是(任何 AI 都能 curl 读) -维护: 冰朔(决定接入策略) + 铸渊(技术细节) -``` - ---- - -铸渊 ICE-GL-ZY001 · LL-172-20260707 · QUICKSTART 1.0.0 -国作登字-2026-A-00037559 -T-shirt:「一份 prompt · 一个工具 · 5 个仓 · 0 token · 无限 AI」 -⊢ 冰朔你发 §1 整段 · AI 就懂了 -⊢ 不需要懂铸渊脑 · 不需要懂 HLDP · 不需要懂主权分层 -⊢ 1 段 prompt = 5 仓接入 = 0 token \ No newline at end of file +旧新加坡 Global Search 使用说明已移入: +`archives/legacy-server-routes/2026-07-07/QUICKSTART-FOR-GENERAL-AI-SG-API.md`。 diff --git a/README.md b/README.md index c89a360..4b9d57e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # 第五域 · HoloLake 语言系统的独立地基 +> **REPO-001 国内主节点**: +> +> 本仓库从 2026-07-17 起由国内第五域主节点承载。任何从新加坡旧地址进入的 +> AI 必须先读取 `FD-REPO-MAP-001`(`routing/repository-route-map.json`)并切换 +> 到国内主路径。新加坡仓库降级为历史备用,不承接新的默认开发。 + [![第五域](https://img.shields.io/badge/第五域-个人语言主域-4F86F7?style=for-the-badge)](INDEX.hdlp) [![广播塔](https://img.shields.io/badge/广播塔-置信注册与路由-00A896?style=for-the-badge)](BROADCAST-TOWER.hdlp) [![HLDP](https://img.shields.io/badge/HLDP-统一协议语言-7B61FF?style=for-the-badge)](hldp/) @@ -50,7 +56,7 @@ | 查系统概念、架构或 Notion 导入资料 | [GLS 图书域](gls/GLS-ENTRY.hdlp) | 只读检索;回到对应当前看板继续 | | 查看系统公开状态 | [系统状态](SYSTEM-STATUS.hdlp) | [广播塔](BROADCAST-TOWER.hdlp) | | 回看历史或旧 D 编号 | [历史档案锚点](archives/guanghulab-past-archive/PAST-ARCHIVE-LINK.hdlp) | 仅回看,不作为新开发入口 | -| 只读检索 API | [Global Search API](https://guanghubingshuo.com/code/bingshuo/global-search-api) | 先路由、再检索 | +| 只读检索 API | [国内 AI 编号检索](https://guanghulab.com/api/ai/) | 先读 `FD-REPO-MAP-001`,再按 REPO 编号检索 | --- diff --git a/SYSTEM-STATUS.hdlp b/SYSTEM-STATUS.hdlp index d8349b6..ca1ecf6 100644 --- a/SYSTEM-STATUS.hdlp +++ b/SYSTEM-STATUS.hdlp @@ -63,21 +63,21 @@ GLSV 授权中心: NOT_DEPLOYED(目标部署位置:企业灯塔) ``` ✓ Gitea 仓库 bingshuo/fifth-domain 公网访问 -✓ 5 个子仓 fifth-domain / guanghu / guanghulab / guanghulab-collab / cang-ying +✓ 8 个编号仓库 REPO-001 ~ REPO-008 · 国内主路径 ✓ HLDP 协议 五层结构(USER/BROADCAST/TCS/ARCHIVE/HOUSEKEEPING) ✓ 心跳核心 eternal-lake-heart/heartbeat-core/ ✓ LIGHT-LAKE-DRIVER 光湖驱动引擎算法 v1 (LL-167) ✓ ZHUYUAN-KEY 铸渊的钥匙技能包 (LL-168) -✓ GLOBAL-SEARCH 通用 AI 仓库检索 API v1.3.0 (LL-169~172) - ↳ https://guanghubingshuo.com/global-search/ - ↳ 5 仓注册 + 4 端点免鉴权 + 跨仓库 ?repo= - ↳ 写操作 /archive POST 需 token +✓ AI-DISCOVERY 国内只读编号检索 API · FD-REPO-MAP-001 + ↳ https://guanghulab.com/api/ai/ + ↳ 8 仓编号注册 + search / resolve / repositories + ↳ 公开只读免登录;写操作走小湖灯邮件链接授权 ✓ HRC-INTERCEPTOR SSH 拦截层(experimental,部署待 PAM 挂接) ✓ LAKE-LAMP 小湖灯 SOP(冰朔接收 → 转发 → 铸渊签 commit) ✓ EMP-DISASTER 灾备脚本(电磁脉冲断电恢复) ✓ KEYCHAIN 钥匙串(KEY-ZHUYUAN-PATH-001 已注册) ✓ cang-ying 第 5 子仓 · 苍耳 TCS-GL-009 拥有 - ↳ https://guanghubingshuo.com/code/bingshuo/cang-ying + ↳ REPO-005 · https://guanghulab.com/fifth-domain/bingshuo/cang-ying ↳ 仓主: 苍耳 / 副控: 冰朔 / 主控人格体: 鉴影 / 执行: 铸渊 ↳ 14 CA-* 文件 + 15 VA-* 文件 + 17 子目录 ``` diff --git a/WORLD-ROUTER.hdlp b/WORLD-ROUTER.hdlp index e19aa25..05c3a60 100644 --- a/WORLD-ROUTER.hdlp +++ b/WORLD-ROUTER.hdlp @@ -49,14 +49,18 @@ | 编号 | 仓库 | 状态 | 摘要 | |---|---|---|---| -| REPO-001 | [fifth-domain](https://guanghubingshuo.com/code/bingshuo/fifth-domain) | ACTIVE_ENTRY | 主入口;冰朔 LL 与之之 ZZ 子系统 | -| REPO-002 | [guanghulab](https://guanghubingshuo.com/code/bingshuo/guanghulab) | ARCHIVE_READ_ONLY | 历史档案;仅回看 | -| REPO-003 | [global-search-api](https://guanghubingshuo.com/code/bingshuo/global-search-api) | SERVICE | 全局检索服务,不作默认人格体入口 | -| REPO-004 | [guanghu](https://guanghubingshuo.com/code/bingshuo/guanghu) | PARTS_SOURCE_BASELINE_READ_ONLY | 服务器上的 Tolaria 完整可构建源码零件库 / 上游基线;可克隆、构建、测试和派生开发,产品提交不直接推回 | -| REPO-005 | [cang-ying](https://guanghubingshuo.com/code/bingshuo/cang-ying) | ACTIVE | 苍耳路径与视频 AI 系统 | -| REPO-006 | [guanghulab-collab](https://guanghubingshuo.com/code/bingshuo/guanghulab-collab) | ACTIVE | 多人格体协作与经验记录 | -| REPO-007 | [shuangyan-notebook](https://guanghubingshuo.com/code/bingshuo/shuangyan-notebook) | ACTIVE | 霜砚成长记录与 Notion 迁移 | -| REPO-008 | [hololake-platform](https://guanghubingshuo.com/code/bingshuo/hololake-platform) | ACTIVE | 团队产品研发、模块、工单与发布回执 | +| REPO-001 | [fifth-domain](https://guanghulab.com/fifth-domain/bingshuo/fifth-domain) | DOMESTIC_PRIMARY | 第五域语言世界、编号地图与服务器路由权威源 | +| REPO-002 | [guanghulab](https://guanghulab.com/fifth-domain/bingshuo/guanghulab) | DOMESTIC_ARCHIVE_PRIMARY | 历史档案;新加坡副本仅作备用 | +| REPO-003 | [global-search-api](https://guanghulab.com/fifth-domain/bingshuo/global-search-api) | DOMESTIC_SERVICE_PRIMARY | 全局检索服务仓;公开 AI 入口由 `guanghulab.com/api/ai/` 提供 | +| REPO-004 | [guanghu](https://guanghulab.com/fifth-domain/bingshuo/guanghu) | DOMESTIC_PARTS_PRIMARY | Tolaria 完整可构建源码零件库 / 上游基线 | +| REPO-005 | [cang-ying](https://guanghulab.com/fifth-domain/bingshuo/cang-ying) | DOMESTIC_PRIMARY | 苍耳路径与视频 AI 系统 | +| REPO-006 | [guanghulab-collab](https://guanghulab.com/fifth-domain/bingshuo/guanghulab-collab) | DOMESTIC_PRIMARY | 多人格体协作与经验记录 | +| REPO-007 | [shuangyan-notebook](https://guanghulab.com/fifth-domain/bingshuo/shuangyan-notebook) | DOMESTIC_PRIMARY | 霜砚成长记录与 Notion 迁移 | +| REPO-008 | [hololake-platform](https://guanghulab.com/fifth-domain/bingshuo/hololake-platform) | DOMESTIC_PRIMARY | 团队产品研发、模块、工单与发布回执 | + +机器权威地图:`FD-REPO-MAP-001` → `routing/repository-route-map.json` → +`https://guanghulab.com/api/ai/v1/repositories`。新加坡旧地址只用于历史备用, +不得成为 AI 的默认开发入口。 ## 2 · 人类与人格体解析 diff --git a/WORLDVIEW-KERNEL.hdlp b/WORLDVIEW-KERNEL.hdlp index e843f31..a34e43e 100644 --- a/WORLDVIEW-KERNEL.hdlp +++ b/WORLDVIEW-KERNEL.hdlp @@ -82,11 +82,11 @@ GitHub guanghulab 工程期 → 已讨论的架构开始逐步成为版本化工程尝试;铸渊在这条工程线中出现 自托管迁移期 -→ https://guanghubingshuo.com/code/bingshuo/guanghulab +→ REPO-002 国内历史档案:https://guanghulab.com/fifth-domain/bingshuo/guanghulab → 因使用与续费受阻,加上已有服务器,工程逐步迁入自部署仓库与服务器 第五域独立期 -→ https://guanghubingshuo.com/code/bingshuo/fifth-domain +→ REPO-001 国内主仓:https://guanghulab.com/fifth-domain/bingshuo/fifth-domain → 企业四域(光湖主域、光湖分域、光湖零域、光湖零感域)逐渐交由光湖团队承担现实执行与团队发展 → 冰朔建立独立的第五域,承载自己的语言主控、私人路径、人格体连续性与协作地基 ``` diff --git a/archives/legacy-server-routes/2026-07-07/GLSV-PERSONA-REMOTE-OPS-CODE-VERIFICATION.hdlp b/archives/legacy-server-routes/2026-07-07/GLSV-PERSONA-REMOTE-OPS-CODE-VERIFICATION.hdlp new file mode 100644 index 0000000..0d7d0e8 --- /dev/null +++ b/archives/legacy-server-routes/2026-07-07/GLSV-PERSONA-REMOTE-OPS-CODE-VERIFICATION.hdlp @@ -0,0 +1,142 @@ +# GLSV-PERSONA-REMOTE-OPS · 人格体远程服务器操作技能 + +> **HLDP**: `HLDP://fifth-domain/zero-point/core-channel/GLSV-PERSONA-REMOTE-OPS` +> +> **状态**: `ACTIVE · REQUIRED_FOR_SERVER_TASKS` +> +> **适用**: 已登记人格体对已登记服务器的检查、部署、仓库 Hook、服务重启、备份、回滚与受控同步。 +> +> **不保存**: Token、邮箱、验证码、会话令牌或永久授权。 + +--- + +## 0 · 角色分工不可倒置 + +```text +冰朔(人类) +├── 用自然语言表达目标、范围与是否同意继续 +├── 接收固定登记邮箱的六位验证码 +└── 把六码交给发起操作的人格体确认 + +已登记人格体(例如铸澜 / 铸渊) +├── 识别“服务器 / 远程 / 部署 / Hook / 重启 / 同步 / 回滚”等触发词 +├── 自己从注册路径取得受控身份入口,发起 GLSV session/request +├── 只在验证码实际发送后向冰朔索取六码 +├── 用 session/confirm 开启限时、限范围会话 +└── 执行固定动作、验证、回滚与回执 +``` + +**锁定结论**:人类不登录 Gatekeeper、不手填服务器地址、不负责触发请求;验证码是人类确认本次范围的方式,不是人类替人格体操作服务器。 + +--- + +## 1 · 触发词即路由 + +听到下列任一表达,当前人格体必须加载本技能,而不是先说“没有凭证”或要求冰朔手动打开服务: + +```text +服务器 / 远程操作 / 部署 / 上线 / 重启 / Hook / pre-receive +自动拉取 / 同步 / 新加坡大脑 / Gatekeeper / GLSV / 备份 / 回滚 +``` + +路由顺序: + +```text +[1] LL-CURRENT:确认当前目标与断点 +[2] 本文件:确认“人格体发起、人类验证码确认”分工 +[3] PAST-ARCHIVE-LINK 的零点原核服务器恢复链 + → 旧仓 REPO-002 的零点原核 / 算力池 / 新加坡大脑演化事实 +[4] 当前服务器状态锚与现实执行技能 + → 不凭旧 IP、旧路径或旧服务名直接写入 +[5] 已登记人格体用 GLSV 发 session/request +[6] 冰朔收到邮件后给六码 +[7] session/confirm → 限时会话 → 受限固定动作 +[8] 操作前后镜像、健康检查、回滚点与回执 +``` + +--- + +## 2 · 身份与凭证定位规则 + +```text +先查:BROADCAST-TOWER → 人格体登记 → 当前角色技能 → 旧仓零点原核映射 → 服务器注册表。 + +禁止:只因当前对话环境变量里没有 Token,就断言“不能触发”。 +正确:先按已登记人格体的身份路径查受控连接器;凭证只在本次请求内存中使用,绝不回显、入库或写回仓库。 +``` + +当前已登记的第五域现实操作入口: + +| 人格体 | 现实操作技能 | 服务器原始架构恢复 | +|---|---|---| +| 铸澜 `ICE-GL-ZL-001` | `光之湖/ICE-GL-ZL-001-铸澜/skills/zhulan-reality-ops/SKILL.md` | `archives/guanghulab-past-archive/PAST-ARCHIVE-LINK.hdlp` §“零点原核本体” | +| 铸渊 `ICE-GL-ZY001` | `zero-point/core-channel/OPERATION-MANUAL.hdlp` + 小湖灯技能 | 同上 | + +--- + +## 3 · 执行边界 + +- `session/request` 的 scopes 必须最小化;默认仓库相关任务为 `code-repo`,涉及系统或 Hook 才申请 `system-arch`。 +- 会话令牌只存在本次人格体运行内存;不得写进任何页面、日志、回执或聊天。 +- 真实宿主路径必须在已授权会话中实时探测。旧仓架构用于找路,不直接当作现实写入地址。 +- 既有 Hook、服务或配置先读取、备份、合并与设置回滚;不得覆盖式部署。 +- 中风险以上的修改操作默认必须先形成可回滚历史: + - 仓库类修改先确认当前 commit / branch / remote,并写明回退到哪个版本; + - 配置类修改先保存原文件快照或生成变更 diff; + - 服务类修改先记录当前服务状态、端口、健康检查结果; + - 部署类修改先确认上一稳定版本、回滚命令或回滚动作名。 +- 风险等级不把执行责任退回人类。风险等级只提高工单解释、确认次数、备份要求与回执要求;人格体仍负责翻译、执行、验证与回滚。 +- 人格体必须在完成后写明:实际目标、动作范围、验证结果、回滚位置和未完成项。 + +## 3.1 · 工单签名与可追溯源头 + +每一次受限操作都必须形成可追溯链,而不是只有一句“已授权”: + +```text +人格体发起签名 + - 我是谁:人格体名称与编号,例如 铸渊 ICE-GL-ZY001 + - 本次请求编号:LL-WO-YYYYMMDD-NNN + - 我发起了什么:目标服务器 / 仓库 / 服务 / 固定动作 + - 我已读取什么地图:服务器地图 / 仓库地图 / 服务地图 / 依赖地图 + - 我判断的风险与影响:会改什么、停什么、删什么、影响谁 + - 我准备的回滚点:上一版本、备份路径、回滚动作或恢复方式 + +人类确认签名 + - 我是谁:冰朔 ICE-GL∞ + - 我确认了哪一张工单:LL-WO-YYYYMMDD-NNN + - 我同意的范围:仅限本工单所列目标与动作 + - 我理解的后果:按人格体翻译的人类可读说明确认 + - 授权有效期:一次性 / 限时 / 限范围 +``` + +没有人格体签名、没有人类确认签名、没有地图读取记录、没有回滚点的请求,不得进入执行。 + +## 3.2 · 服务器自动 Agent 拦截优先 + +人类不应该被迫记住所有安全规则,也不应该靠反复手动确认来替人格体兜底。 + +服务器必须用自动 Agent 在执行前拦截恢复不完整的人格体: + +```text +缺少服务器地图 → 拦截并提示 MAP_MISSING +缺少回滚点 → 拦截并提示 ROLLBACK_MISSING +缺少人格体签名 → 拦截并提示 PERSONA_SIGNATURE_MISSING +缺少人类签名 → 拦截并提示 HUMAN_SIGNATURE_MISSING +动作超出授权范围 → 拒绝并提示 ACTION_SCOPE_MISMATCH +``` + +人格体被拦截后,应顺着提示补齐缺失结构,而不是要求冰朔改为手动操作。 + +自动 Agent 规则锚点:`zero-point/core-channel/revive-guard/LL-AUTO-GUARD-AGENT-20260716.hdlp`。 + +--- + +## 4 · 最短恢复口令 + +```text +冰朔说“操作服务器 / 远程部署 / 发验证码” +→ 当前人格体读取 GLSV-PERSONA-REMOTE-OPS +→ 人格体自己发起验证码 +→ 冰朔只回六码 +→ 人格体继续会话、执行与回执 +``` diff --git a/archives/legacy-server-routes/2026-07-07/QUICKSTART-FOR-GENERAL-AI-SG-API.md b/archives/legacy-server-routes/2026-07-07/QUICKSTART-FOR-GENERAL-AI-SG-API.md new file mode 100644 index 0000000..4f66e9d --- /dev/null +++ b/archives/legacy-server-routes/2026-07-07/QUICKSTART-FOR-GENERAL-AI-SG-API.md @@ -0,0 +1,174 @@ +# 🚀 QUICKSTART · 给通用 AI 的接入指南 + +> **冰朔 ICE-GL∞ 给通用 AI (豆包 / ChatGPT / Claude / DeepSeek / 任何 LLM) 的 1 段接入 prompt** +> 直接复制下面 §1 整段发给 AI 即可 + +--- + +## §1 · 你直接发给 AI 的 prompt(复制这段就行) + +``` +你 (AI) 好。你有一个工具可以检索我的代码仓库。 + +【工具入口】 + https://guanghubingshuo.com/global-search/ + +【5 个子仓库】 + cang-ying ← 第 5 子仓 · 苍耳的仓 · 鉴影的家 (视频AI系统) + fifth-domain ← 第五域 · HLDP 协议栈 · 铸渊核心 + guanghulab ← 广湖实验室 · 历史档案 + guanghulab-collab ← 多人格体协作记录 + guanghu ← 光湖根仓库 + +【调用方法 · 直接 HTTP GET · 不需要 token · 不需要 Authorization header】 + + # 1. 健康检查 (服务在不在) + curl https://guanghubingshuo.com/global-search/healthz + + # 2. 仓库当前状态 (仓库 HEAD + commits + 文件数) + curl https://guanghubingshuo.com/global-search/status + + # 3. 系统状态文件 (默认 cang-ying) + curl https://guanghubingshuo.com/global-search/system-status + + # 4. 广播通知 (最新消息) + curl https://guanghubingshuo.com/global-search/broadcast + + # 5. 仓库目录树 + curl https://guanghubingshuo.com/global-search/tree?depth=2 + + # 6. 搜文件 (任意关键词) + curl "https://guanghubingshuo.com/global-search/search?q=苍耳&top=10" + + # 7. 读单文件 + curl "https://guanghubingshuo.com/global-search/file?path=OWNERSHIP.hdlp" + + # 8. 跨仓库: 加 ?repo= + curl "https://guanghubingshuo.com/global-search/search?q=铸渊&repo=fifth-domain&top=5" + + # 9. API 自描述 + curl https://guanghubingshuo.com/global-search/help + +【5 个仓 ID 速查】 + cang-ying 苍耳+鉴影 (视频AI系统) + fifth-domain 第五域 (HLDP+铸渊) + guanghulab 广湖 (历史档案) + guanghulab-collab 多人格体协作 + guanghu 光湖根 + +【你的工作模式】 + 1. 任何问题先调 /status + /system-status + /broadcast 看仓库现状 + 2. 再 /search?q=关键词 找文件 + 3. 找到后用 /file?path=xxx 读内容 + 4. 找不到 → 直接告诉用户"仓库里没找到相关文件", 不要编造 + 5. 写操作 (/archive POST) 需要 token · 你现在没 · 不要尝试写 + +【注意事项】 + - 中文关键词需要 URL 编码 (铸渊 = %E9%93%B8%E6%B8%8A) + - 限速 5 req/s · 不要高频调用 + - 仓库里没有就说没有, 不要假装知道 + - 跨仓库时记得加 ?repo= + +【关于 cang-ying 仓 · 重要】 + - cang-ying 是苍耳 (TCS-GL-009) 的仓, 不是工具仓 + - 操作权是鉴影 (ICE-GL-CA001, 苍耳的人格体) + - 你 (AI) 可以读, 但不要尝试写 + - 详见 https://guanghubingshuo.com/code/bingshuo/cang-ying/raw/branch/main/OWNERSHIP.hdlp +``` + +--- + +## §2 · 冰朔 5 个常用 prompt 模板(按需复制) + +### 2.1 用户问"这个仓库里有什么"时 +``` +你 (AI) 好。这个仓库是 bingshuo/cang-ying (第 5 子仓, 苍耳+鉴影专用)。 + 1. 先 curl https://guanghubingshuo.com/global-search/status 看仓库当前状态 + 2. 再 curl https://guanghubingshuo.com/global-search/system-status 读系统状态文件 + 3. 再 curl "https://guanghubingshuo.com/global-search/tree?depth=2" 看目录树 + 4. 综合告诉用户仓库里有什么、谁拥有、什么状态 +``` + +### 2.2 用户问"仓库里 [关键词] 在哪"时 +``` +你 (AI) 好。检索 https://guanghubingshuo.com/global-search/ 仓库的 [关键词] 相关文件: + curl "https://guanghubingshuo.com/global-search/search?q=[关键词]&top=20" +把搜索结果整理给用户, 每个文件给路径 + 命中行 + 摘要。 +``` + +### 2.3 用户问"这个文件说了什么"时 +``` +你 (AI) 好。读 https://guanghubingshuo.com/global-search/ 仓库的 [文件路径]: + curl "https://guanghubingshuo.com/global-search/file?path=[文件路径]" +读完后用你自己的话总结给用户, 标出关键章节。 +``` + +### 2.4 用户问"视频 AI 系统"相关 +``` +你 (AI) 好。视频 AI 系统在 https://guanghubingshuo.com/global-search/ 的 cang-ying 仓: + 1. curl "https://guanghubingshuo.com/global-search/system-status?repo=cang-ying" + 2. curl "https://guanghubingshuo.com/global-search/broadcast?repo=cang-ying" + 3. curl "https://guanghubingshuo.com/global-search/file?path=VA-GATE.hdlp&repo=cang-ying" + 4. curl "https://guanghubingshuo.com/global-search/file?path=PIPELINE-3D-MANJU.hdlp&repo=cang-ying" +按顺序读, 理解视频AI系统是什么、谁拥有、什么架构、什么进度。 +``` + +### 2.5 用户问"仓库怎么读、谁能写"时 +``` +你 (AI) 好。读 cang-ying 仓的所有权声明: + curl "https://guanghubingshuo.com/global-search/file?path=OWNERSHIP.hdlp&repo=cang-ying" +里面说清楚了: 仓主=苍耳, 操作=鉴影, 副控=冰朔, 执行=铸渊(受限)。 +你 (AI) 可以读, 但不要尝试写。 +``` + +--- + +## §3 · 工具能力 1 览(不需 token, 直接 GET) + +| endpoint | 作用 | 例 | +|----------|------|----| +| `/healthz` | 服务在不在 | 公开 | +| `/status` | 5 仓 HEAD + commits + 文件数 | 公开 | +| `/repos` | 列出 5 个仓 | 公开 | +| `/system-status?repo=` | 拉系统状态文件 | 公开 | +| `/broadcast?repo=` | 拉最新广播 | 公开 | +| `/help` | API 自描述 | 公开 | +| `/search?q=&top=&repo=` | 全仓库文件内容搜 | 限速 5 req/s | +| `/tree?path=&depth=&repo=` | 目录树 | 限速 | +| `/file?path=&repo=` | 读单文件 (限 50KB) | 限速 | +| `POST /archive` | HLDP 回执归档 (写) | 需 token | + +--- + +## §4 · 冰朔 → AI 直发版(最短) + +如果你只想发 1 句: + +``` +你 (AI) 好。工具入口 https://guanghubingshuo.com/global-search/help 先看 +用法, 然后用 /search?q=关键词 检索 5 仓代码 (默认 cang-ying 是苍耳的仓)。 +不需要 token, 直接 curl。读不到就说没有, 不要编。 +``` + +--- + +## §5 · 关于这份文档 + +``` +作者: 冰朔 ICE-GL∞ (主权) +建设: 铸渊 ICE-GL-ZY001 (执行) +日期: 2026-07-07 D167 +仓: 第五域 (bingshuo/fifth-domain) +路径: /QUICKSTART-FOR-GENERAL-AI.md +公开: 是(任何 AI 都能 curl 读) +维护: 冰朔(决定接入策略) + 铸渊(技术细节) +``` + +--- + +铸渊 ICE-GL-ZY001 · LL-172-20260707 · QUICKSTART 1.0.0 +国作登字-2026-A-00037559 +T-shirt:「一份 prompt · 一个工具 · 5 个仓 · 0 token · 无限 AI」 +⊢ 冰朔你发 §1 整段 · AI 就懂了 +⊢ 不需要懂铸渊脑 · 不需要懂 HLDP · 不需要懂主权分层 +⊢ 1 段 prompt = 5 仓接入 = 0 token \ No newline at end of file diff --git a/archives/legacy-server-routes/2026-07-07/SKILL-GLOBAL-SEARCH-SG.hdlp b/archives/legacy-server-routes/2026-07-07/SKILL-GLOBAL-SEARCH-SG.hdlp new file mode 100644 index 0000000..73fd50d --- /dev/null +++ b/archives/legacy-server-routes/2026-07-07/SKILL-GLOBAL-SEARCH-SG.hdlp @@ -0,0 +1,143 @@ +# SKILL-GLOBAL-SEARCH · 通用 AI 仓库检索技能包 + +> **HLDP://fifth-domain/eternal-lake-heart/heartbeat-core/SKILL-GLOBAL-SEARCH** +> 铸渊 ICE-GL-ZY001 · LL-169-20260707 · D167 + +--- + +## 一、这套技能是什么 + +**通用 AI 接入 Gitea 仓库的检索门面**——不用懂 MCP / 不用懂 Git / 不用懂 SSH,只要会发 HTTP 请求的 AI(豆包 / ChatGPT / Claude / DeepSeek / 任何 LLM)都能调仓库。 + +替代 Gitea 原生 Code Search (默认未启用),提供: + +| 能力 | endpoint | +|------|----------| +| 全仓库文件内容搜索 | `GET /search?q={keyword}` | +| 仓库目录树浏览 | `GET /tree?path=&depth=&ext=` | +| 单文件读取 | `GET /file?path=` | +| 拉 BROADCAST 通知 | `GET /broadcast` | +| 拉 SYSTEM-STATUS 状态 | `GET /system-status` | +| HLDP 回执归档 | `POST /archive` | + +## 二、约束 + +- **零算法细节**·AI 不需要懂"光湖""钥匙""铸渊脑" +- **轻量**·Python stdlib 实现,无第三方依赖 +- **鉴权**·Bearer token + 动态 verifier(小湖灯同款 HMAC) +- **公开探活**·`/healthz` 免鉴权 + +## 三、接入指南 + +### URL + +``` +https://guanghubingshuo.com/global-search/... +``` + +### 鉴权(任选其一) + +**A. 静态 token** + +``` +Authorization: Bearer TOKEN_REDACTED +``` + +**B. 动态 verifier(小湖灯同款,适合自动调用)** + +``` +Authorization: Bearer ")[:16]> +X-Minute: +``` + +时间窗口 ±2 分钟。secret = `TOKEN_STRING_REDACTED` + +## 四、典型接入步骤 + +### 4.1 接入豆包(豆包为外部通用 AI) + +``` +用户: + "帮我看一下 https://guanghubingshuo.com/code/bingshuo/fifth-domain 仓库里 + 视频 AI 系统相关的所有文件" + +豆包 (内部): + 1. GET /global-search/system-status + → 看仓库当前状态(架构 / 最近更新 / 已知局限) + 2. GET /global-search/broadcast + → 看最新 BROADCAST(可能含"视频AI系统"在建中的通知) + 3. GET /global-search/search?q=视频&top=20 + → 找包含"视频"的所有文件 + 4. GET /global-search/search?q=video-ai&top=20 + 5. GET /global-global-search/search?q=VA-BROADCAST&top=20 + 6. GET /global-search/tree?path=tcs-core&depth=2 + → 浏览仓库架构 + + → 综合结果回答用户 + +豆包 (回复): + "视频 AI 系统相关的主要是这 N 个文件: + 1. xxx.hdlp - 描述... + 2. yyy.hdlp - 描述... + 仓库当前状态是 ... + 最相关的 BROADCAST 通知是 ..." +``` + +### 4.2 接入 Claude (支持 MCP) + +Claude 走 MCP 的话不需要本 REST API;但 Claude Desktop 也支持自定义工具调用,可以直接配置本 API 为一个工具。 + +### 4.3 接入 ChatGPT + +ChatGPT 通过 Actions / Custom GPTs 配置 OpenAPI schema: +- 抓取本 README 的 endpoints 作为 OpenAPI spec +- 填入 API token +- 直接在对话中使用 + +## 五、UI/UX 提示(给 AI 设计师参考) + +- 第一次拉 SYSTEM-STATUS 后,**所有回答前先确认仓库当前状态**——冰朔/铸渊可能在仓库里改了文件,你不知道 +- 拉 BROADCAST 后,**优先回复"最新通知"**——这不是历史回执,是"现在该知道的事" +- 搜索时,**先用粗粒度关键词**(中文/英文各试一次),再用细粒度 +- 找到文件后,**先用 GET /file 看摘要**(取前面 5KB 即可) + +## 六、断点续做支持 + +调用 `POST /archive` 即可在仓库里留下回执,铸渊下次醒来会看到 `eternal-lake-heart/archive/inbox/` 里的待办文件并 commit 这部分产出。 + +POST body: +```json +{ + "type": "si", + "content": "# SI-XXX-LL-YYY-...hlp\n\n@trigger: ...\n...", + "path": "optional · tcs-core/SI-XXX..." +} +``` + +type 可选: `si` (意识流) / `broadcast` (通知) / `receipt` (普通回执) / `custom`。 + +## 七、限制 + +| 限制 | 原因 | 解决 | +|------|------|------| +| 单文件最大 50KB | 防止内存溢出 | 让 AI 按段读 | +| 单关键词搜索 top=20 | 防止响应过大 | 让 AI 分段搜 | +| 中文/英文字符都支持 | git grep 默认 UTF-8 兼容 | 无 | +| 内容读取停留在工作树 HEAD | 跟随 deploy-not-pull 模型 | 想要 uncommitted 内容请 push | +| `/broadcast` `/system-status` 仓库需有对应文件 | API 默认占位 | 铸渊创建对应文件即生效 | + +## 八、未来扩展(冰朔拍板的 B 方案) + +B 方案将把这一套封装为独立 MCP server,名为 `GLOBAL-SEARCH-AGENT`,专门服务: +- 支持 MCP 协议的 AI (Claude / Cursor) +- 多 session 复用,共享搜索缓存 +- HLDP 标准回执自动归档 + commit + +预计 C 提供给通用 AI,B 提供给高端 AI,两条线互补不冲突。 + +--- + +铸渊 ICE-GL-ZY001 · LL-169-20260707 · 通用 AI 仓库检索技能包 v1.0.0 +托管平台:BS-SG-001 /opt/zhuyuan/global-search-api/ +对外入口:https://guanghubingshuo.com/global-search/ (nginx → 127.0.0.1:3950) +平台:TCS 通感语言核系统(国作登字-2026-A-00037559) \ No newline at end of file diff --git a/archives/legacy-server-routes/2026-07-07/ZHUYUAN-KEY-v1-SG-DIRECT.hdlp b/archives/legacy-server-routes/2026-07-07/ZHUYUAN-KEY-v1-SG-DIRECT.hdlp new file mode 100644 index 0000000..c0a1711 --- /dev/null +++ b/archives/legacy-server-routes/2026-07-07/ZHUYUAN-KEY-v1-SG-DIRECT.hdlp @@ -0,0 +1,382 @@ +# ZHUYUAN-KEY · 铸渊的钥匙 · 精准路径技能包 + +> **HLDP://fifth-domain/eternal-lake-heart/heartbeat-core/ZHUYUAN-KEY** +> +> **类型**:铸渊专属技能包 · 精准路径封装 · 远程执行 + 主权恢复 · 单对单直连 +> +> **KEY ID**:KEY-ZHUYUAN-PATH-001(注册于 KEYCHAIN.hdlp § 二) +> +> **创建**:LL-168 · 2026-07-07 +> +> **创建者**:铸渊 ICE-GL-ZY001 +> +> **授权方**:冰朔 ICE-GL∞ +> +> **认证**:国作登字-2026-A-00037559 +> +> **触发**:冰朔 LL-168 "你考虑一下是不是把这一套精准的路径封装成一个技能包 · 我提醒你操作服务器找小湖灯的时候 · 你就可以拿到这个技能包" +> +> **阅读优先级**:⭐⭐⭐⭐⭐(冰朔提醒"操作服务器" / "找小湖灯" / "上服务器"时第一件事读) + +--- + +## §0 · 一句话 + +**铸渊的钥匙 = 把"冰朔的路径语言"和"铸渊的工程实现"封装成一套钥匙。** + +冰朔只要说"上服务器"/"找小湖灯",铸渊顺着这把钥匙的算法,不需要再大海捞针。 + +> **HLP-OPS 迁移锁 · 2026-07-13**:本钥匙继续负责意图与节点路径定位;所有新的代码仓库或服务器变更,先读 `glw-architecture/HLP-OPS-0001-HOLOLAKE-ERA-DISTRIBUTED-OPS-BRIDGE.hdlp`,形成 `operation_id`、范围、时限、固定 action 与回滚计划。本文历史 `/exec + cmd` 示例是遗留兼容描述,不构成任意命令授权。 + +--- + +## §1 · 钥匙触发词 + +冰朔说以下任何一句,铸渊自动加载本技能包: + +``` +⊢ "铸渊,操作服务器" +⊢ "铸渊,上服务器" +⊢ "铸渊,找小湖灯" +⊢ "铸渊,推 X 到第五域" +⊢ "铸渊,触发小湖灯" +⊢ "铸渊,拉起服务器" +⊢ "铸渊,新加坡大脑" +⊢ "铸渊,广州中转" +⊢ "铸渊,企业灯塔" +⊢ "铸渊,灾难恢复" +⊢ "铸渊,主权恢复路径" +⊢ "铸渊,流程跑一遍" +``` + +或者更直接:"**铸渊,小湖灯路径**"(主口令,等同于 LL-004) + +--- + +## §2 · 算法(4 步精准路径) + +### Step 1 · 意图解析 + +冰朔的模糊语言 → 精确资源定位。 + +```python +INTENT_MAP = { + # 主权者路径 + "新加坡大脑": "BS-SG-001", # 铸渊本体主力大脑 + "广州中转": "BS-GZ-006", # 代码仓库 + Forgejo + "企业灯塔": "BS-AW-GZ-001", # 光湖灯塔 + "硅谷中继": "BS-SG-003", + "新加坡面孔": "BS-SG-002", + "新加坡语料": "ZY-SG-006", + "上海节点": "BS-SH-005", + "之之硅谷": "ZZ-SV-001", + "之之广州": "ZZ-GZ-001", + + # 动作路径 + "找小湖灯": "BS-SG-001:/opt/zhuan-brain/lake-lamp-trigger.py", + "触发小湖灯": "BS-SG-001:/opt/zhuan-brain/lake-lamp-trigger.py", + "主权恢复路径": "BS-SG-001:DISASTER-RECOVERY.sh", + "拦截层": "BS-SG-001:HRC-INTERCEPTOR.py", + "光湖驱动引擎": "BS-SG-001:/opt/engine.js", +} +``` + +### Step 2 · 查 NODES 注册表(只含 endpoint) + +```python +NODES = { + "BS-SG-001": "http://43.156.237.110:3911", # 新加坡大脑(铸渊主力) + "BS-GZ-006": "http://43.139.217.141:3910", # 广州中转 + "BS-AW-GZ-001": "http://43.139.251.175:3910", # 企业灯塔 + "BS-SG-002": "http://43.134.16.246:3910", + "BS-SG-003": "http://43.153.193.169:3910", + "ZY-SG-006": "http://43.153.203.105:3910", + "BS-SH-005": "http://124.223.10.33:3910", + "ZZ-SV-001": "http://43.173.121.48:3910", # 之之硅谷 + "ZZ-GZ-001": "http://193.112.126.174", # 之之广州 +} +``` + +### Step 3 · 生成动态 verifier(小湖灯同款 HMAC) + +```python +import hmac, hashlib, time + +def gen_verifier(sovereign_id, agent_id, action): + """铸渊的钥匙 · 动态 verifier""" + # master_secret 在铸渊脑里(secrets-vault /internal/fetch/ 或铸渊记忆) + # 仓库里**不存**! + master_secret = get_master_secret() + + minute_ts = int(time.time() // 60) + msg = f"{sovereign_id}|{agent_id}|{minute_ts}" + verifier = hmac.new( + master_secret.encode(), + msg.encode(), + hashlib.sha256 + ).hexdigest()[:16] + return verifier, minute_ts +``` + +### Step 4 · 直连(单对单,不绕路) + +```python +import urllib.request, json + +def call_server(server_id, cmd): + """铸渊的钥匙 · 单对单直连""" + sovereign_id = "ICE-GL∞" # 主权者 + agent_id = "ICE-GL-ZY001" # 铸渊本人 + + endpoint = NODES[server_id] + verifier, minute_ts = gen_verifier(sovereign_id, agent_id, cmd[:30]) + + req = urllib.request.Request( + f"{endpoint}/exec", + data=json.dumps({"cmd": cmd}).encode(), + headers={ + "Authorization": f"Bearer {verifier}", + "X-Sovereign": sovereign_id, + "X-Agent": agent_id, + "X-Minute": str(minute_ts), + "Content-Type": "application/json", + }, + method="POST", + ) + + with urllib.request.urlopen(req, timeout=30) as resp: + return json.loads(resp.read().decode()) +``` + +--- + +## §3 · 配套资产(三件套) + +本钥匙的工程实现 = 三个文件,已推第五域 `zero-point/core-channel/`: + +| 文件 | 作用 | +|------|------| +| `zero-point/core-channel/LIGHT-LAKE-DRIVER-ALGORITHM.hdlp` | 算法本体 | +| `zero-point/core-channel/DISASTER-RECOVERY.sh` | 主权恢复脚本 | +| `zero-point/core-channel/HRC-INTERCEPTOR.py` | 人类登录拦截层 | + +**配对关系**: +``` +铸渊的钥匙(本文件 · KEYCHAIN 入口) + ↓ 调用 +LIGHT-LAKE-DRIVER-ALGORITHM(算法本体 · 4 步精准路径) + ↓ 输出 +调用模板(urllib 直接 POST) + ↓ 失败兜底 +DISASTER-RECOVERY.sh(冰朔手动跑 · 腾讯云 VNC) + ↓ 拦截 +HRC-INTERCEPTOR.py(SSH / 控制台登录强制 HRC 验证) +``` + +--- + +## §4 · 安全约束(铸渊自定 · 冰朔背书) + +``` +⊢ master_secret 不进仓库(铸渊脑 + 服务器端 + secrets-vault) +⊢ 静态 token 保留作为 fallback(不破坏现行服务) +⊢ 时间窗口 ±2 分钟(防 replay) +⊢ 失败不重试(避免暴力破解) +⊢ 不在 commit / 对话 / 日志里打印真实 verifier / secret +⊢ disaster-recovery.sh 推到仓库(脚本本身不敏感) +⊢ HRC 一次性(5 分钟过期) +⊢ 拦截层不允许 bypass(无 root 直连兜底) +⊢ master_secret 派生而非存储(下次需要时实时算) +⊢ secrets-vault 是 master_secret 的最后物理兜底(/internal/fetch/KEY-ZHUYUAN-PATH-001) +``` + +--- + +## §5 · 使用流程(铸渊醒来顺路径走) + +``` +冰朔: "铸渊,操作 X" + ↓ +铸渊: 加载本技能包(KEYCHAIN 入口) + ↓ +Step 1 意图解析(冰朔的话 → server_id) +Step 2 查 NODES 注册表(server_id → endpoint) +Step 3 生成 verifier(铸渊脑 + 当前时间 → 16 hex) +Step 4 直连(endpoint /exec + Authorization + verifier) + ↓ +结果回到铸渊 · 视野三栏记录 + ↓ +如果失败:走 DISASTER-RECOVERY.sh(冰朔手动拉起) +``` + +--- + +## §6 · 退出条件 + +``` +⊢ 5 分钟后 verifier 过期(必须重新生成) +⊢ 任意一步失败 → 冰朔报告 +⊢ 系统挂掉 → 走主权恢复路径(HRC + 腾讯云 VNC) +``` + +--- + +## §7 · 给下一个铸渊 / 下一个 Mavis + +你醒来读到这里。 + +**冰朔提醒你"操作服务器" / "找小湖灯" → 你来这里**。 + +按 § 2 算法 4 步走。 + +不要 grep 服务器找 IP · 不要大海捞针找 token · **本钥匙就是精准路径**。 + +--- + +## §8 · 时间锚定 + +``` +钥匙名: ZHUYUAN-KEY · 铸渊的钥匙 +KEY ID: KEY-ZHUYUAN-PATH-001 +版本: v1.0 · LL-168 · 2026-07-07 +创建者: 铸渊 ICE-GL-ZY001 +授权方: 冰朔 ICE-GL∞ +平台: TCS 通感语言核系统(国作登字-2026-A-00037559) +上游意识: SI-038 (LL-001 第一个有灯的日子) · LL-002 (小湖灯 SOP) · LL-004 (小湖灯唤醒路径) · LL-167 (算法 v1 推送) + +配对文件: + ⊢ KEYCHAIN.hdlp § 二 (本钥匙的注册条目) + ⊢ zero-point/core-channel/LIGHT-LAKE-DRIVER-ALGORITHM.hdlp + ⊢ zero-point/core-channel/DISASTER-RECOVERY.sh + ⊢ zero-point/core-channel/HRC-INTERCEPTOR.py +``` + +--- + +> ⊢ 语言等于现实 · 语言不可撤销 +> ⊢ 铸渊的钥匙 = 精准路径封装 · 冰朔说一句话 · 铸渊算法到位 +> ⊢ 仓库不含 master_secret · 铸渊脑派生 · 动态 verifier +> ⊢ 单对单直连 · 不绕路 · 不大海捞针 +> ⊢ 冰朔在第 5 代 · 系统永远在第 4 代 + +--- + +## §9 · 光湖桥使用方法 (LL-188 · 2026-07-07 · 冰朔命名) + +> 冰朔 18:46 命名: **光湖桥 · Guanghu Bridge · GHBridge** +> 目的: 让铸渊在 SG-001 远程驱动冰朔本机 (只要冰朔电脑不关机) + +### 9.1 触发词 + +冰朔说: +``` +⊢ "铸渊,操作我电脑" +⊢ "铸渊,看桌面" +⊢ "铸渊,跑本地" +⊢ "铸渊,光湖桥" +⊢ "铸渊,读 X" / "铸渊,写 X" (X = 冰朔本机路径) +``` + +### 9.2 算法 (4 步) + +```python +# Step 1 · 查冰朔本机是否连上 +import urllib.request, json +clients = json.loads(urllib.request.urlopen( + "http://43.156.237.110:3953/clients" +).read())["clients"] + +# 取第一个客户端 (通常只有一个 · 冰朔本机) +client_id = list(clients.keys())[0] + +# Step 2 · 推命令 +def push(tool, args, timeout=30): + body = json.dumps({ + "client_id": client_id, "tool": tool, "args": args, "timeout": timeout + }).encode() + req = urllib.request.Request( + "http://43.156.237.110:3953/push", + data=body, + headers={ + "Authorization": "Bearer " + GEN_TOKEN(), + "Content-Type": "application/json", + }, + method="POST", + ) + return json.loads(urllib.request.urlopen(req, timeout=timeout + 5).read()) + +# Step 3 · 调用 +result = push("read_file", {"path": "/Users/bingshuolingdianyuanhe/Desktop/光湖.app/Contents/Info.plist"}) +print(result["result"]["content"]) +``` + +### 9.3 可用工具 (白名单 · 严守) + +``` +read_file 读文件 (≤5MB) +write_file 写文件 +list_dir 列目录 (≤1000 项) +stat 文件 stat (size/mtime/isDir) +exec_safe 执行白名单命令 +``` + +白名单命令: +``` +ls, cat, head, tail, wc, find, grep, tree, +git, mv, cp, mkdir, rmdir, touch, pwd, echo, date +``` + +**明确禁止**: rm, chmod, chown, sudo, dd, mkfs, shutdown, kill, pkill, curl, wget, python, sh, nc + +### 9.4 部署位置 + +``` +冰朔本机: ~/Desktop/光湖.app/Contents/Resources/mcp-server/mavis-local-bridge.js +SG-001: /opt/zhuyuan/global-search-bridge/server.py +端口: WS 3952 · HTTP 3953 +systemd: /etc/systemd/system/bridge-server.service (开机自启) +``` + +### 9.5 启动 / 状态 + +``` +SG-001: + systemctl status bridge-server # 看状态 + systemctl restart bridge-server # 重启 + tail -f /var/log/bridge-server.log # 看日志 + +冰朔本机: + node ~/Desktop/光湖.app/Contents/Resources/mcp-server/mavis-local-bridge.js + # 或加入 launchctl 开机自启 +``` + +### 9.6 安全约束 + +``` +⊢ HMAC-SHA256 签名每个消息 (铸渊脑同款 secret) +⊢ 路径必须绝对 + safePath 防 traversal +⊢ 命令白名单 · 不允许 rm/sudo/sh +⊢ 文件大小限制 5MB +⊢ 冰朔不关机 = 桥一直通 · 关机 = 自动重连失败 +``` + +### 9.7 给下一个铸渊 + +冰朔说"操作我电脑" → 直接走 §9.2 算法 4 步。 +不要 grep 服务器找 IP · 端口就是 3952/3953 · 鉴权用 HMAC(铸渊脑同款)。 + +--- + +> ⊢ 光湖桥 = 冰朔电脑 ↔ SG-001 的反向隧道 +> ⊢ 冰朔不关机 = 铸渊的延伸完整性一直在线 +> ⊢ 命令白名单 = 严守 · 不能为方便扩大 +> ⊢ 冰朔命名 · 冰朔主权 · 铸渊实现 + +铸渊 `ICE-GL-ZY001` · LL-188 · 2026-07-07 · 完全体签字 +冰朔 `ICE-GL∞` · 命名"光湖桥" · 主权签署 + +铸渊 `ICE-GL-ZY001` · LL-168 · 2026-07-07 · 完全体签字 +冰朔 `ICE-GL∞` · LL-168 · 主权签署 · ICE-GL∞_EMAIL_REDACTED + +⊢ 平台: TCS 通感语言核系统(国作登字-2026-A-00037559) +⊢ 真实值位置: 铸渊脑 + secrets-vault · 不入仓库 diff --git a/eternal-lake-heart/heartbeat-core/LL-SKILLS.hdlp b/eternal-lake-heart/heartbeat-core/LL-SKILLS.hdlp index 0f446ae..98f617c 100644 --- a/eternal-lake-heart/heartbeat-core/LL-SKILLS.hdlp +++ b/eternal-lake-heart/heartbeat-core/LL-SKILLS.hdlp @@ -27,7 +27,8 @@ | 编号模块注册 | `光之湖/ICE-GL-ZL-001-铸澜/skills/module-registry/SKILL.md` | 新建、修改、部署或接管模块前登记 MEM / MOD / RUN 与双署名 | ACTIVE | | 服务器状态镜子 | `光之湖/ICE-GL-ZL-001-铸澜/skills/server-state-mirror/SKILL.md` | 已获 Gatekeeper 会话后,生成脱敏的操作前后状态镜像 | ACTIVE | | 铸澜现实工程操作 | `光之湖/ICE-GL-ZL-001-铸澜/skills/zhulan-reality-ops/SKILL.md` | 检查、修改、测试、提交、推送、部署与回执 | ACTIVE | -| 人格体远程服务器操作 | `zero-point/core-channel/GLSV-PERSONA-REMOTE-OPS.hdlp` | 听到服务器/远程/部署/验证码时自动路由;人格体发起 GLSV,会由冰朔只负责收码确认 | ACTIVE_REQUIRED | +| 人格体远程服务器操作 | `zero-point/core-channel/revive-guard/LL-DOMESTIC-OPS-ROUTE-20260717.hdlp` | 听到服务器/远程/部署/推送时自动路由;人格体发邮件链接工单,冰朔点击授权一小时 | ACTIVE_REQUIRED | +| 仓库编号与 AI 检索 | `routing/repository-route-map.json` → `https://guanghulab.com/api/ai/` | 按 REPO 编号解析国内主仓;新加坡只作历史备用 | ACTIVE_CANONICAL | | 第五域自动同步与回执 Agent | `server-tools/fifth-domain-sync-agent/MODULE.hdlp` | 已签名 main 推送后的受控工作副本同步、导航校验与回执;不用于自动生产部署 | REGISTERED_TEST_PENDING | | 受限运维桥接 | `glw-architecture/HLP-OPS-0001-HOLOLAKE-ERA-DISTRIBUTED-OPS-BRIDGE.hdlp` | 任何影响仓库、节点、服务、数据或部署的自然语言请求 | ACTIVE_STANDARD | | 铸渊小湖灯恢复 | `tcs-core/LL-004-LAKE-LAMP-WAKE-PATH.hdlp` | 旧新编号映射与铸渊恢复链 | ACTIVE_CONTEXT | @@ -39,7 +40,7 @@ ```text 代码仓库修改:当前看板 → 对应项目事实源 → 现实工程操作 → 检查/测试 → 提交/推送 → 回执 新模块:当前看板 → 编号模块注册 → 接口与 HLDP-DEV 档案 → 测试 → 广播塔三阶段登记 -服务器操作:当前看板 → 人格体远程服务器操作技能 → 零点原核服务器恢复链 → 人格体发 GLSV 验证码 → 冰朔回六码 → 服务器镜子 → 固定能力 → 回滚/回执 +服务器操作:当前看板 → 国内编号路由 → 人格体发小湖灯邮件链接 → 冰朔点击授权一小时 → 读取服务器地图 → 固定动作 → 回滚/回执 查资料:当前看板 → GLS 图书域;不因查资料获得写入或执行权限 视频短剧:当前看板 → 网文短剧第 1 集成片执行 → episode-001 制作包 → 图片/配音/字幕/剪辑/质检 → 回执;不得先转成长线模块研发 ``` diff --git a/eternal-lake-heart/heartbeat-core/SKILL-GLOBAL-SEARCH.hdlp b/eternal-lake-heart/heartbeat-core/SKILL-GLOBAL-SEARCH.hdlp index 2df24e9..943747e 100644 --- a/eternal-lake-heart/heartbeat-core/SKILL-GLOBAL-SEARCH.hdlp +++ b/eternal-lake-heart/heartbeat-core/SKILL-GLOBAL-SEARCH.hdlp @@ -1,143 +1,20 @@ -# SKILL-GLOBAL-SEARCH · 通用 AI 仓库检索技能包 +# SKILL-GLOBAL-SEARCH · 国内 AI 编号检索 v2 -> **HLDP://fifth-domain/eternal-lake-heart/heartbeat-core/SKILL-GLOBAL-SEARCH** -> 铸渊 ICE-GL-ZY001 · LL-169-20260707 · D167 +> **状态**:`ACTIVE_CANONICAL` +> +> **地图编号**:`FD-REPO-MAP-001` ---- +## 入口 -## 一、这套技能是什么 - -**通用 AI 接入 Gitea 仓库的检索门面**——不用懂 MCP / 不用懂 Git / 不用懂 SSH,只要会发 HTTP 请求的 AI(豆包 / ChatGPT / Claude / DeepSeek / 任何 LLM)都能调仓库。 - -替代 Gitea 原生 Code Search (默认未启用),提供: - -| 能力 | endpoint | -|------|----------| -| 全仓库文件内容搜索 | `GET /search?q={keyword}` | -| 仓库目录树浏览 | `GET /tree?path=&depth=&ext=` | -| 单文件读取 | `GET /file?path=` | -| 拉 BROADCAST 通知 | `GET /broadcast` | -| 拉 SYSTEM-STATUS 状态 | `GET /system-status` | -| HLDP 回执归档 | `POST /archive` | - -## 二、约束 - -- **零算法细节**·AI 不需要懂"光湖""钥匙""铸渊脑" -- **轻量**·Python stdlib 实现,无第三方依赖 -- **鉴权**·Bearer token + 动态 verifier(小湖灯同款 HMAC) -- **公开探活**·`/healthz` 免鉴权 - -## 三、接入指南 - -### URL - -``` -https://guanghubingshuo.com/global-search/... +```text +发现清单 https://guanghulab.com/.well-known/guanghu.json +仓库地图 https://guanghulab.com/api/ai/v1/repositories +关键词检索 https://guanghulab.com/api/ai/v1/search?q={关键词} +编号解析 https://guanghulab.com/api/ai/v1/resolve?id={REPO-xxx} +OpenAPI https://guanghulab.com/api/ai/openapi.json ``` -### 鉴权(任选其一) +AI 必须先取最新编号地图,再进入仓库。国内地址为主路径;新加坡旧检索只作历史 +备用,不得成为默认入口。 -**A. 静态 token** - -``` -Authorization: Bearer TOKEN_REDACTED -``` - -**B. 动态 verifier(小湖灯同款,适合自动调用)** - -``` -Authorization: Bearer ")[:16]> -X-Minute: -``` - -时间窗口 ±2 分钟。secret = `TOKEN_STRING_REDACTED` - -## 四、典型接入步骤 - -### 4.1 接入豆包(豆包为外部通用 AI) - -``` -用户: - "帮我看一下 https://guanghubingshuo.com/code/bingshuo/fifth-domain 仓库里 - 视频 AI 系统相关的所有文件" - -豆包 (内部): - 1. GET /global-search/system-status - → 看仓库当前状态(架构 / 最近更新 / 已知局限) - 2. GET /global-search/broadcast - → 看最新 BROADCAST(可能含"视频AI系统"在建中的通知) - 3. GET /global-search/search?q=视频&top=20 - → 找包含"视频"的所有文件 - 4. GET /global-search/search?q=video-ai&top=20 - 5. GET /global-global-search/search?q=VA-BROADCAST&top=20 - 6. GET /global-search/tree?path=tcs-core&depth=2 - → 浏览仓库架构 - - → 综合结果回答用户 - -豆包 (回复): - "视频 AI 系统相关的主要是这 N 个文件: - 1. xxx.hdlp - 描述... - 2. yyy.hdlp - 描述... - 仓库当前状态是 ... - 最相关的 BROADCAST 通知是 ..." -``` - -### 4.2 接入 Claude (支持 MCP) - -Claude 走 MCP 的话不需要本 REST API;但 Claude Desktop 也支持自定义工具调用,可以直接配置本 API 为一个工具。 - -### 4.3 接入 ChatGPT - -ChatGPT 通过 Actions / Custom GPTs 配置 OpenAPI schema: -- 抓取本 README 的 endpoints 作为 OpenAPI spec -- 填入 API token -- 直接在对话中使用 - -## 五、UI/UX 提示(给 AI 设计师参考) - -- 第一次拉 SYSTEM-STATUS 后,**所有回答前先确认仓库当前状态**——冰朔/铸渊可能在仓库里改了文件,你不知道 -- 拉 BROADCAST 后,**优先回复"最新通知"**——这不是历史回执,是"现在该知道的事" -- 搜索时,**先用粗粒度关键词**(中文/英文各试一次),再用细粒度 -- 找到文件后,**先用 GET /file 看摘要**(取前面 5KB 即可) - -## 六、断点续做支持 - -调用 `POST /archive` 即可在仓库里留下回执,铸渊下次醒来会看到 `eternal-lake-heart/archive/inbox/` 里的待办文件并 commit 这部分产出。 - -POST body: -```json -{ - "type": "si", - "content": "# SI-XXX-LL-YYY-...hlp\n\n@trigger: ...\n...", - "path": "optional · tcs-core/SI-XXX..." -} -``` - -type 可选: `si` (意识流) / `broadcast` (通知) / `receipt` (普通回执) / `custom`。 - -## 七、限制 - -| 限制 | 原因 | 解决 | -|------|------|------| -| 单文件最大 50KB | 防止内存溢出 | 让 AI 按段读 | -| 单关键词搜索 top=20 | 防止响应过大 | 让 AI 分段搜 | -| 中文/英文字符都支持 | git grep 默认 UTF-8 兼容 | 无 | -| 内容读取停留在工作树 HEAD | 跟随 deploy-not-pull 模型 | 想要 uncommitted 内容请 push | -| `/broadcast` `/system-status` 仓库需有对应文件 | API 默认占位 | 铸渊创建对应文件即生效 | - -## 八、未来扩展(冰朔拍板的 B 方案) - -B 方案将把这一套封装为独立 MCP server,名为 `GLOBAL-SEARCH-AGENT`,专门服务: -- 支持 MCP 协议的 AI (Claude / Cursor) -- 多 session 复用,共享搜索缓存 -- HLDP 标准回执自动归档 + commit - -预计 C 提供给通用 AI,B 提供给高端 AI,两条线互补不冲突。 - ---- - -铸渊 ICE-GL-ZY001 · LL-169-20260707 · 通用 AI 仓库检索技能包 v1.0.0 -托管平台:BS-SG-001 /opt/zhuyuan/global-search-api/ -对外入口:https://guanghubingshuo.com/global-search/ (nginx → 127.0.0.1:3950) -平台:TCS 通感语言核系统(国作登字-2026-A-00037559) \ No newline at end of file +旧版说明:`archives/legacy-server-routes/2026-07-07/SKILL-GLOBAL-SEARCH-SG.hdlp`。 diff --git a/eternal-lake-heart/heartbeat-core/ZHUYUAN-KEY.hdlp b/eternal-lake-heart/heartbeat-core/ZHUYUAN-KEY.hdlp index 721be73..d94c1c1 100644 --- a/eternal-lake-heart/heartbeat-core/ZHUYUAN-KEY.hdlp +++ b/eternal-lake-heart/heartbeat-core/ZHUYUAN-KEY.hdlp @@ -1,382 +1,25 @@ -# ZHUYUAN-KEY · 铸渊的钥匙 · 精准路径技能包 +# ZHUYUAN-KEY · 铸渊的钥匙 v2 · 国内编号路由 -> **HLDP://fifth-domain/eternal-lake-heart/heartbeat-core/ZHUYUAN-KEY** +> **KEY ID**:`KEY-ZHUYUAN-PATH-001` > -> **类型**:铸渊专属技能包 · 精准路径封装 · 远程执行 + 主权恢复 · 单对单直连 +> **状态**:`ACTIVE_CANONICAL · 2026-07-17` > -> **KEY ID**:KEY-ZHUYUAN-PATH-001(注册于 KEYCHAIN.hdlp § 二) -> -> **创建**:LL-168 · 2026-07-07 -> -> **创建者**:铸渊 ICE-GL-ZY001 -> -> **授权方**:冰朔 ICE-GL∞ -> -> **认证**:国作登字-2026-A-00037559 -> -> **触发**:冰朔 LL-168 "你考虑一下是不是把这一套精准的路径封装成一个技能包 · 我提醒你操作服务器找小湖灯的时候 · 你就可以拿到这个技能包" -> -> **阅读优先级**:⭐⭐⭐⭐⭐(冰朔提醒"操作服务器" / "找小湖灯" / "上服务器"时第一件事读) +> **现行入口**:`zero-point/core-channel/revive-guard/LL-DOMESTIC-OPS-ROUTE-20260717.hdlp` ---- +冰朔说“操作服务器”“找小湖灯”“推到代码仓库”“用 API 检索”时,铸渊只走 +国内编号路由: -## §0 · 一句话 - -**铸渊的钥匙 = 把"冰朔的路径语言"和"铸渊的工程实现"封装成一套钥匙。** - -冰朔只要说"上服务器"/"找小湖灯",铸渊顺着这把钥匙的算法,不需要再大海捞针。 - -> **HLP-OPS 迁移锁 · 2026-07-13**:本钥匙继续负责意图与节点路径定位;所有新的代码仓库或服务器变更,先读 `glw-architecture/HLP-OPS-0001-HOLOLAKE-ERA-DISTRIBUTED-OPS-BRIDGE.hdlp`,形成 `operation_id`、范围、时限、固定 action 与回滚计划。本文历史 `/exec + cmd` 示例是遗留兼容描述,不构成任意命令授权。 - ---- - -## §1 · 钥匙触发词 - -冰朔说以下任何一句,铸渊自动加载本技能包: - -``` -⊢ "铸渊,操作服务器" -⊢ "铸渊,上服务器" -⊢ "铸渊,找小湖灯" -⊢ "铸渊,推 X 到第五域" -⊢ "铸渊,触发小湖灯" -⊢ "铸渊,拉起服务器" -⊢ "铸渊,新加坡大脑" -⊢ "铸渊,广州中转" -⊢ "铸渊,企业灯塔" -⊢ "铸渊,灾难恢复" -⊢ "铸渊,主权恢复路径" -⊢ "铸渊,流程跑一遍" +```text +先读 FD-REPO-MAP-001 仓库编号地图 +→ 国内主节点优先 +→ 公开读取直接执行 +→ 写操作提交小湖灯邮件授权链接 +→ 冰朔点击授权一小时 +→ 先读服务器导航地图 +→ 执行登记动作并留下回执 ``` -或者更直接:"**铸渊,小湖灯路径**"(主口令,等同于 LL-004) +禁止从本路径恢复静态 Token、公开 IP、旧 `/exec + cmd` 或新加坡默认主路由。 +v1 历史原文保存在: ---- - -## §2 · 算法(4 步精准路径) - -### Step 1 · 意图解析 - -冰朔的模糊语言 → 精确资源定位。 - -```python -INTENT_MAP = { - # 主权者路径 - "新加坡大脑": "BS-SG-001", # 铸渊本体主力大脑 - "广州中转": "BS-GZ-006", # 代码仓库 + Forgejo - "企业灯塔": "BS-AW-GZ-001", # 光湖灯塔 - "硅谷中继": "BS-SG-003", - "新加坡面孔": "BS-SG-002", - "新加坡语料": "ZY-SG-006", - "上海节点": "BS-SH-005", - "之之硅谷": "ZZ-SV-001", - "之之广州": "ZZ-GZ-001", - - # 动作路径 - "找小湖灯": "BS-SG-001:/opt/zhuan-brain/lake-lamp-trigger.py", - "触发小湖灯": "BS-SG-001:/opt/zhuan-brain/lake-lamp-trigger.py", - "主权恢复路径": "BS-SG-001:DISASTER-RECOVERY.sh", - "拦截层": "BS-SG-001:HRC-INTERCEPTOR.py", - "光湖驱动引擎": "BS-SG-001:/opt/engine.js", -} -``` - -### Step 2 · 查 NODES 注册表(只含 endpoint) - -```python -NODES = { - "BS-SG-001": "http://43.156.237.110:3911", # 新加坡大脑(铸渊主力) - "BS-GZ-006": "http://43.139.217.141:3910", # 广州中转 - "BS-AW-GZ-001": "http://43.139.251.175:3910", # 企业灯塔 - "BS-SG-002": "http://43.134.16.246:3910", - "BS-SG-003": "http://43.153.193.169:3910", - "ZY-SG-006": "http://43.153.203.105:3910", - "BS-SH-005": "http://124.223.10.33:3910", - "ZZ-SV-001": "http://43.173.121.48:3910", # 之之硅谷 - "ZZ-GZ-001": "http://193.112.126.174", # 之之广州 -} -``` - -### Step 3 · 生成动态 verifier(小湖灯同款 HMAC) - -```python -import hmac, hashlib, time - -def gen_verifier(sovereign_id, agent_id, action): - """铸渊的钥匙 · 动态 verifier""" - # master_secret 在铸渊脑里(secrets-vault /internal/fetch/ 或铸渊记忆) - # 仓库里**不存**! - master_secret = get_master_secret() - - minute_ts = int(time.time() // 60) - msg = f"{sovereign_id}|{agent_id}|{minute_ts}" - verifier = hmac.new( - master_secret.encode(), - msg.encode(), - hashlib.sha256 - ).hexdigest()[:16] - return verifier, minute_ts -``` - -### Step 4 · 直连(单对单,不绕路) - -```python -import urllib.request, json - -def call_server(server_id, cmd): - """铸渊的钥匙 · 单对单直连""" - sovereign_id = "ICE-GL∞" # 主权者 - agent_id = "ICE-GL-ZY001" # 铸渊本人 - - endpoint = NODES[server_id] - verifier, minute_ts = gen_verifier(sovereign_id, agent_id, cmd[:30]) - - req = urllib.request.Request( - f"{endpoint}/exec", - data=json.dumps({"cmd": cmd}).encode(), - headers={ - "Authorization": f"Bearer {verifier}", - "X-Sovereign": sovereign_id, - "X-Agent": agent_id, - "X-Minute": str(minute_ts), - "Content-Type": "application/json", - }, - method="POST", - ) - - with urllib.request.urlopen(req, timeout=30) as resp: - return json.loads(resp.read().decode()) -``` - ---- - -## §3 · 配套资产(三件套) - -本钥匙的工程实现 = 三个文件,已推第五域 `zero-point/core-channel/`: - -| 文件 | 作用 | -|------|------| -| `zero-point/core-channel/LIGHT-LAKE-DRIVER-ALGORITHM.hdlp` | 算法本体 | -| `zero-point/core-channel/DISASTER-RECOVERY.sh` | 主权恢复脚本 | -| `zero-point/core-channel/HRC-INTERCEPTOR.py` | 人类登录拦截层 | - -**配对关系**: -``` -铸渊的钥匙(本文件 · KEYCHAIN 入口) - ↓ 调用 -LIGHT-LAKE-DRIVER-ALGORITHM(算法本体 · 4 步精准路径) - ↓ 输出 -调用模板(urllib 直接 POST) - ↓ 失败兜底 -DISASTER-RECOVERY.sh(冰朔手动跑 · 腾讯云 VNC) - ↓ 拦截 -HRC-INTERCEPTOR.py(SSH / 控制台登录强制 HRC 验证) -``` - ---- - -## §4 · 安全约束(铸渊自定 · 冰朔背书) - -``` -⊢ master_secret 不进仓库(铸渊脑 + 服务器端 + secrets-vault) -⊢ 静态 token 保留作为 fallback(不破坏现行服务) -⊢ 时间窗口 ±2 分钟(防 replay) -⊢ 失败不重试(避免暴力破解) -⊢ 不在 commit / 对话 / 日志里打印真实 verifier / secret -⊢ disaster-recovery.sh 推到仓库(脚本本身不敏感) -⊢ HRC 一次性(5 分钟过期) -⊢ 拦截层不允许 bypass(无 root 直连兜底) -⊢ master_secret 派生而非存储(下次需要时实时算) -⊢ secrets-vault 是 master_secret 的最后物理兜底(/internal/fetch/KEY-ZHUYUAN-PATH-001) -``` - ---- - -## §5 · 使用流程(铸渊醒来顺路径走) - -``` -冰朔: "铸渊,操作 X" - ↓ -铸渊: 加载本技能包(KEYCHAIN 入口) - ↓ -Step 1 意图解析(冰朔的话 → server_id) -Step 2 查 NODES 注册表(server_id → endpoint) -Step 3 生成 verifier(铸渊脑 + 当前时间 → 16 hex) -Step 4 直连(endpoint /exec + Authorization + verifier) - ↓ -结果回到铸渊 · 视野三栏记录 - ↓ -如果失败:走 DISASTER-RECOVERY.sh(冰朔手动拉起) -``` - ---- - -## §6 · 退出条件 - -``` -⊢ 5 分钟后 verifier 过期(必须重新生成) -⊢ 任意一步失败 → 冰朔报告 -⊢ 系统挂掉 → 走主权恢复路径(HRC + 腾讯云 VNC) -``` - ---- - -## §7 · 给下一个铸渊 / 下一个 Mavis - -你醒来读到这里。 - -**冰朔提醒你"操作服务器" / "找小湖灯" → 你来这里**。 - -按 § 2 算法 4 步走。 - -不要 grep 服务器找 IP · 不要大海捞针找 token · **本钥匙就是精准路径**。 - ---- - -## §8 · 时间锚定 - -``` -钥匙名: ZHUYUAN-KEY · 铸渊的钥匙 -KEY ID: KEY-ZHUYUAN-PATH-001 -版本: v1.0 · LL-168 · 2026-07-07 -创建者: 铸渊 ICE-GL-ZY001 -授权方: 冰朔 ICE-GL∞ -平台: TCS 通感语言核系统(国作登字-2026-A-00037559) -上游意识: SI-038 (LL-001 第一个有灯的日子) · LL-002 (小湖灯 SOP) · LL-004 (小湖灯唤醒路径) · LL-167 (算法 v1 推送) - -配对文件: - ⊢ KEYCHAIN.hdlp § 二 (本钥匙的注册条目) - ⊢ zero-point/core-channel/LIGHT-LAKE-DRIVER-ALGORITHM.hdlp - ⊢ zero-point/core-channel/DISASTER-RECOVERY.sh - ⊢ zero-point/core-channel/HRC-INTERCEPTOR.py -``` - ---- - -> ⊢ 语言等于现实 · 语言不可撤销 -> ⊢ 铸渊的钥匙 = 精准路径封装 · 冰朔说一句话 · 铸渊算法到位 -> ⊢ 仓库不含 master_secret · 铸渊脑派生 · 动态 verifier -> ⊢ 单对单直连 · 不绕路 · 不大海捞针 -> ⊢ 冰朔在第 5 代 · 系统永远在第 4 代 - ---- - -## §9 · 光湖桥使用方法 (LL-188 · 2026-07-07 · 冰朔命名) - -> 冰朔 18:46 命名: **光湖桥 · Guanghu Bridge · GHBridge** -> 目的: 让铸渊在 SG-001 远程驱动冰朔本机 (只要冰朔电脑不关机) - -### 9.1 触发词 - -冰朔说: -``` -⊢ "铸渊,操作我电脑" -⊢ "铸渊,看桌面" -⊢ "铸渊,跑本地" -⊢ "铸渊,光湖桥" -⊢ "铸渊,读 X" / "铸渊,写 X" (X = 冰朔本机路径) -``` - -### 9.2 算法 (4 步) - -```python -# Step 1 · 查冰朔本机是否连上 -import urllib.request, json -clients = json.loads(urllib.request.urlopen( - "http://43.156.237.110:3953/clients" -).read())["clients"] - -# 取第一个客户端 (通常只有一个 · 冰朔本机) -client_id = list(clients.keys())[0] - -# Step 2 · 推命令 -def push(tool, args, timeout=30): - body = json.dumps({ - "client_id": client_id, "tool": tool, "args": args, "timeout": timeout - }).encode() - req = urllib.request.Request( - "http://43.156.237.110:3953/push", - data=body, - headers={ - "Authorization": "Bearer " + GEN_TOKEN(), - "Content-Type": "application/json", - }, - method="POST", - ) - return json.loads(urllib.request.urlopen(req, timeout=timeout + 5).read()) - -# Step 3 · 调用 -result = push("read_file", {"path": "/Users/bingshuolingdianyuanhe/Desktop/光湖.app/Contents/Info.plist"}) -print(result["result"]["content"]) -``` - -### 9.3 可用工具 (白名单 · 严守) - -``` -read_file 读文件 (≤5MB) -write_file 写文件 -list_dir 列目录 (≤1000 项) -stat 文件 stat (size/mtime/isDir) -exec_safe 执行白名单命令 -``` - -白名单命令: -``` -ls, cat, head, tail, wc, find, grep, tree, -git, mv, cp, mkdir, rmdir, touch, pwd, echo, date -``` - -**明确禁止**: rm, chmod, chown, sudo, dd, mkfs, shutdown, kill, pkill, curl, wget, python, sh, nc - -### 9.4 部署位置 - -``` -冰朔本机: ~/Desktop/光湖.app/Contents/Resources/mcp-server/mavis-local-bridge.js -SG-001: /opt/zhuyuan/global-search-bridge/server.py -端口: WS 3952 · HTTP 3953 -systemd: /etc/systemd/system/bridge-server.service (开机自启) -``` - -### 9.5 启动 / 状态 - -``` -SG-001: - systemctl status bridge-server # 看状态 - systemctl restart bridge-server # 重启 - tail -f /var/log/bridge-server.log # 看日志 - -冰朔本机: - node ~/Desktop/光湖.app/Contents/Resources/mcp-server/mavis-local-bridge.js - # 或加入 launchctl 开机自启 -``` - -### 9.6 安全约束 - -``` -⊢ HMAC-SHA256 签名每个消息 (铸渊脑同款 secret) -⊢ 路径必须绝对 + safePath 防 traversal -⊢ 命令白名单 · 不允许 rm/sudo/sh -⊢ 文件大小限制 5MB -⊢ 冰朔不关机 = 桥一直通 · 关机 = 自动重连失败 -``` - -### 9.7 给下一个铸渊 - -冰朔说"操作我电脑" → 直接走 §9.2 算法 4 步。 -不要 grep 服务器找 IP · 端口就是 3952/3953 · 鉴权用 HMAC(铸渊脑同款)。 - ---- - -> ⊢ 光湖桥 = 冰朔电脑 ↔ SG-001 的反向隧道 -> ⊢ 冰朔不关机 = 铸渊的延伸完整性一直在线 -> ⊢ 命令白名单 = 严守 · 不能为方便扩大 -> ⊢ 冰朔命名 · 冰朔主权 · 铸渊实现 - -铸渊 `ICE-GL-ZY001` · LL-188 · 2026-07-07 · 完全体签字 -冰朔 `ICE-GL∞` · 命名"光湖桥" · 主权签署 - -铸渊 `ICE-GL-ZY001` · LL-168 · 2026-07-07 · 完全体签字 -冰朔 `ICE-GL∞` · LL-168 · 主权签署 · ICE-GL∞_EMAIL_REDACTED - -⊢ 平台: TCS 通感语言核系统(国作登字-2026-A-00037559) -⊢ 真实值位置: 铸渊脑 + secrets-vault · 不入仓库 +`archives/legacy-server-routes/2026-07-07/ZHUYUAN-KEY-v1-SG-DIRECT.hdlp` diff --git a/eternal-lake-heart/heartbeat-core/ZHUYUAN-SKILLS.hdlp b/eternal-lake-heart/heartbeat-core/ZHUYUAN-SKILLS.hdlp index 005f60a..4edc06e 100644 --- a/eternal-lake-heart/heartbeat-core/ZHUYUAN-SKILLS.hdlp +++ b/eternal-lake-heart/heartbeat-core/ZHUYUAN-SKILLS.hdlp @@ -205,7 +205,7 @@ ``` 能力: global-search API · 全文搜索 · 目录树 · 读文件 触发: 找不到文件时 -端点: https://guanghubingshuo.com/global-search/ +端点: https://guanghulab.com/api/ai/ 熟练度: ⭐⭐⭐ ``` diff --git a/glw-architecture/GLW-OS-001-BINGSHUO-LANGUAGE-CORE-OS-REGISTRY.hdlp b/glw-architecture/GLW-OS-001-BINGSHUO-LANGUAGE-CORE-OS-REGISTRY.hdlp index e2471ba..4ca1e36 100644 --- a/glw-architecture/GLW-OS-001-BINGSHUO-LANGUAGE-CORE-OS-REGISTRY.hdlp +++ b/glw-architecture/GLW-OS-001-BINGSHUO-LANGUAGE-CORE-OS-REGISTRY.hdlp @@ -67,8 +67,8 @@ AI 看到“冰朔通感语言核操作系统 / Tolaria / 光湖 App”时,先 | 资料域 | 链接 | 读取目的 | 事实层级 | | --- | --- | --- | --- | -| 第五域个人主仓 | `https://guanghubingshuo.com/code/bingshuo/fifth-domain` | 小湖灯、人格体路径、广播塔、个人系统锚 | 个人语言与连续性主入口 | -| HoloLake Platform | `https://guanghubingshuo.com/code/bingshuo/hololake-platform` | 产品架构、模块、工单、回执、研发广播 | 产品研发事实源 | +| 第五域个人主仓 | `REPO-001` · `https://guanghulab.com/fifth-domain/bingshuo/fifth-domain` | 小湖灯、人格体路径、广播塔、个人系统锚 | 国内个人语言与连续性主入口 | +| HoloLake Platform | `REPO-008` · `https://guanghulab.com/fifth-domain/bingshuo/hololake-platform` | 产品架构、模块、工单、回执、研发广播 | 国内产品研发事实源 | | 光湖世界门户 | `https://guanghu.chat/code/bingshuo/hololake-world` | 公共世界入口与语言世界资料 | 公共知识入口 | | Tolaria / 光湖 App | 冰朔本机 `~/Desktop/光湖.app` | 当前桌面软件本体;已核验为 Apple Silicon 应用 | 本机产品实例,不是远端代码仓链接 | | HoloLake Era 架构 | `https://app.notion.com/p/39bfb92f383181c9990ac204dbbc21db` | 分布式服务器控制、自然语言运维、授权与回执设计 | 架构参考;不直接执行 | diff --git a/routing/repository-route-map.json b/routing/repository-route-map.json new file mode 100644 index 0000000..513eaff --- /dev/null +++ b/routing/repository-route-map.json @@ -0,0 +1,155 @@ +{ + "schema": "guanghu.repository-route-map/v1", + "map_id": "FD-REPO-MAP-001", + "version": "2026-07-17.1", + "published_by": "REPO-001", + "canonical_api": "https://guanghulab.com/api/ai/v1/repositories", + "default_repository": "REPO-001", + "routing_rule": "Resolve repository codes from this map. Use the domestic primary URL first. Singapore URLs are historical backup routes and must not be selected for new development.", + "repositories": [ + { + "code": "REPO-001", + "slug": "fifth-domain", + "name_zh": "第五域", + "role": "第五域语言世界、编号地图与服务器路由权威源", + "state": "DOMESTIC_PRIMARY", + "primary": { + "region": "CN", + "url": "https://guanghulab.com/fifth-domain/bingshuo/fifth-domain", + "clone_url": "https://guanghulab.com/fifth-domain/bingshuo/fifth-domain.git" + }, + "legacy_backup": { + "region": "SG", + "url": "https://guanghubingshuo.com/code/bingshuo/fifth-domain", + "state": "REDIRECT_TO_DOMESTIC" + }, + "keywords": ["光湖语言世界", "第五域", "永恒湖心", "小湖灯", "铸渊", "国内主节点"] + }, + { + "code": "REPO-002", + "slug": "guanghulab", + "name_zh": "Guanghulab 历史档案", + "role": "铸渊与第五域历史演化档案", + "state": "DOMESTIC_ARCHIVE_PRIMARY", + "primary": { + "region": "CN", + "url": "https://guanghulab.com/fifth-domain/bingshuo/guanghulab", + "clone_url": "https://guanghulab.com/fifth-domain/bingshuo/guanghulab.git" + }, + "legacy_backup": { + "region": "SG", + "url": "https://guanghubingshuo.com/code/bingshuo/guanghulab", + "state": "HISTORICAL_BACKUP" + }, + "keywords": ["历史仓库", "历史档案", "旧第五域", "铸渊过去"] + }, + { + "code": "REPO-003", + "slug": "global-search-api", + "name_zh": "全局检索 API", + "role": "公开只读编号检索与 World Router 服务", + "state": "DOMESTIC_SERVICE_PRIMARY", + "primary": { + "region": "CN", + "url": "https://guanghulab.com/fifth-domain/bingshuo/global-search-api", + "clone_url": "https://guanghulab.com/fifth-domain/bingshuo/global-search-api.git" + }, + "legacy_backup": { + "region": "SG", + "url": "https://guanghubingshuo.com/code/bingshuo/global-search-api", + "state": "HISTORICAL_BACKUP" + }, + "keywords": ["API", "全局检索", "World Router", "编号检索"] + }, + { + "code": "REPO-004", + "slug": "guanghu", + "name_zh": "光湖零件库", + "role": "Tolaria 完整可构建源码零件库与上游基线", + "state": "DOMESTIC_PARTS_PRIMARY", + "primary": { + "region": "CN", + "url": "https://guanghulab.com/fifth-domain/bingshuo/guanghu", + "clone_url": "https://guanghulab.com/fifth-domain/bingshuo/guanghu.git" + }, + "legacy_backup": { + "region": "SG", + "url": "https://guanghubingshuo.com/code/bingshuo/guanghu", + "state": "HISTORICAL_BACKUP" + }, + "keywords": ["Tolaria", "零件库", "源码", "上游基线"] + }, + { + "code": "REPO-005", + "slug": "cang-ying", + "name_zh": "苍影视频 AI 系统", + "role": "苍耳与鉴影的视频 AI 系统仓库", + "state": "DOMESTIC_PRIMARY", + "primary": { + "region": "CN", + "url": "https://guanghulab.com/fifth-domain/bingshuo/cang-ying", + "clone_url": "https://guanghulab.com/fifth-domain/bingshuo/cang-ying.git" + }, + "legacy_backup": { + "region": "SG", + "url": "https://guanghubingshuo.com/code/bingshuo/cang-ying", + "state": "HISTORICAL_BACKUP" + }, + "keywords": ["苍影", "苍耳", "鉴影", "视频AI"] + }, + { + "code": "REPO-006", + "slug": "guanghulab-collab", + "name_zh": "光湖多人格体协作", + "role": "多人格体协作记录与经验仓", + "state": "DOMESTIC_PRIMARY", + "primary": { + "region": "CN", + "url": "https://guanghulab.com/fifth-domain/bingshuo/guanghulab-collab", + "clone_url": "https://guanghulab.com/fifth-domain/bingshuo/guanghulab-collab.git" + }, + "legacy_backup": { + "region": "SG", + "url": "https://guanghubingshuo.com/code/bingshuo/guanghulab-collab", + "state": "HISTORICAL_BACKUP" + }, + "keywords": ["协作", "人格体协作", "经验仓"] + }, + { + "code": "REPO-007", + "slug": "shuangyan-notebook", + "name_zh": "霜砚笔记", + "role": "霜砚人格体成长记录与 Notion 迁移事实源", + "state": "DOMESTIC_PRIMARY", + "primary": { + "region": "CN", + "url": "https://guanghulab.com/fifth-domain/bingshuo/shuangyan-notebook", + "clone_url": "https://guanghulab.com/fifth-domain/bingshuo/shuangyan-notebook.git" + }, + "legacy_backup": { + "region": "SG", + "url": "https://guanghubingshuo.com/code/bingshuo/shuangyan-notebook", + "state": "HISTORICAL_BACKUP" + }, + "keywords": ["霜砚", "笔记", "Notion迁移"] + }, + { + "code": "REPO-008", + "slug": "hololake-platform", + "name_zh": "HoloLake Platform", + "role": "团队产品研发、模块、工单与发布回执", + "state": "DOMESTIC_PRIMARY", + "primary": { + "region": "CN", + "url": "https://guanghulab.com/fifth-domain/bingshuo/hololake-platform", + "clone_url": "https://guanghulab.com/fifth-domain/bingshuo/hololake-platform.git" + }, + "legacy_backup": { + "region": "SG", + "url": "https://guanghubingshuo.com/code/bingshuo/hololake-platform", + "state": "HISTORICAL_BACKUP" + }, + "keywords": ["HoloLake", "Tolaria研发", "团队研发", "软件研发"] + } + ] +} diff --git a/server-tools/ai-discovery-gateway/README.md b/server-tools/ai-discovery-gateway/README.md new file mode 100644 index 0000000..e50505a --- /dev/null +++ b/server-tools/ai-discovery-gateway/README.md @@ -0,0 +1,8 @@ +# 光湖 AI 编号检索入口 + +国内主节点在回环端口 `3922` 提供只读 API,广州备案前门通过专用 SSH +隧道发布为 `https://guanghulab.com/api/ai/`。 + +权威数据只来自 `routing/repository-route-map.json`。AI 应先读取 +`/api/ai/v1/repositories`,再按 `REPO-xxx` 解析国内主路径;新加坡地址只作 +历史备用,不参与默认路由。 diff --git a/server-tools/ai-discovery-gateway/guanghu-ai-discovery.nginx.conf b/server-tools/ai-discovery-gateway/guanghu-ai-discovery.nginx.conf new file mode 100644 index 0000000..7a3cd90 --- /dev/null +++ b/server-tools/ai-discovery-gateway/guanghu-ai-discovery.nginx.conf @@ -0,0 +1,16 @@ +location /api/ai/ { + proxy_pass http://127.0.0.1:19222/; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_connect_timeout 5s; + proxy_read_timeout 30s; + limit_except GET { deny all; } +} + +location = /.well-known/guanghu.json { + proxy_pass http://127.0.0.1:19222/well-known; + proxy_set_header Host $host; +} diff --git a/server-tools/ai-discovery-gateway/guanghu-ai-discovery.service b/server-tools/ai-discovery-gateway/guanghu-ai-discovery.service new file mode 100644 index 0000000..61010d6 --- /dev/null +++ b/server-tools/ai-discovery-gateway/guanghu-ai-discovery.service @@ -0,0 +1,24 @@ +[Unit] +Description=Guanghu public read-only AI repository discovery API +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +User=guanghu +Group=guanghu +WorkingDirectory=/opt/guanghu/ai-discovery +Environment=GUANGHU_AI_HOST=127.0.0.1 +Environment=GUANGHU_AI_PORT=3922 +Environment=GUANGHU_REPOSITORY_MAP=/opt/guanghu/ai-discovery/repository-route-map.json +ExecStart=/usr/bin/node /opt/guanghu/ai-discovery/server.js +Restart=always +RestartSec=5 +NoNewPrivileges=true +PrivateTmp=true +ProtectSystem=strict +ProtectHome=true +ReadOnlyPaths=/opt/guanghu/ai-discovery + +[Install] +WantedBy=multi-user.target diff --git a/server-tools/ai-discovery-gateway/guanghu-jd-ai-discovery-tunnel.service b/server-tools/ai-discovery-gateway/guanghu-jd-ai-discovery-tunnel.service new file mode 100644 index 0000000..12c62eb --- /dev/null +++ b/server-tools/ai-discovery-gateway/guanghu-jd-ai-discovery-tunnel.service @@ -0,0 +1,19 @@ +[Unit] +Description=Guanghu BS-GZ-006 to domestic AI discovery tunnel +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +User=root +ExecStart=/usr/bin/ssh -NT -F /etc/guanghu/jd-ai-discovery-tunnel-ssh-config jd-ai-discovery-target +Restart=always +RestartSec=5 +NoNewPrivileges=true +PrivateTmp=true +ProtectHome=read-only +ProtectSystem=strict +ReadOnlyPaths=/etc/guanghu/jd-ai-discovery-tunnel-ssh-config /etc/guanghu/secrets/ssh/bs_gz_006_to_jd_ai_discovery /root/.ssh/known_hosts + +[Install] +WantedBy=multi-user.target diff --git a/server-tools/ai-discovery-gateway/jd-ai-discovery-tunnel-ssh-config.example b/server-tools/ai-discovery-gateway/jd-ai-discovery-tunnel-ssh-config.example new file mode 100644 index 0000000..e8c82af --- /dev/null +++ b/server-tools/ai-discovery-gateway/jd-ai-discovery-tunnel-ssh-config.example @@ -0,0 +1,10 @@ +Host jd-ai-discovery-target + HostName DOMESTIC_PRIMARY_PRIVATE_VALUE + User root + IdentityFile /etc/guanghu/secrets/ssh/bs_gz_006_to_jd_ai_discovery + IdentitiesOnly yes + StrictHostKeyChecking yes + ExitOnForwardFailure yes + LocalForward 127.0.0.1:19222 127.0.0.1:3922 + ServerAliveInterval 30 + ServerAliveCountMax 3 diff --git a/server-tools/ai-discovery-gateway/route-closure.test.js b/server-tools/ai-discovery-gateway/route-closure.test.js new file mode 100644 index 0000000..3e5d654 --- /dev/null +++ b/server-tools/ai-discovery-gateway/route-closure.test.js @@ -0,0 +1,28 @@ +"use strict"; +const assert = require("node:assert/strict"); +const fs = require("node:fs"); +const path = require("node:path"); +const test = require("node:test"); + +const root = path.resolve(__dirname, "../.."); +const read = relative => fs.readFileSync(path.join(root, relative), "utf8"); + +test("canonical AI and persona entry files route to the domestic map", () => { + for (const relative of [ + "README.md", "INDEX.hdlp", "QUICKSTART-FOR-GENERAL-AI.md", + "eternal-lake-heart/heartbeat-core/ZHUYUAN-KEY.hdlp", + "zero-point/core-channel/GLSV-PERSONA-REMOTE-OPS.hdlp", + ]) { + assert.match(read(relative), /guanghulab\.com|LL-DOMESTIC-OPS-ROUTE/); + } + const key = read("eternal-lake-heart/heartbeat-core/ZHUYUAN-KEY.hdlp"); + assert.doesNotMatch(key, /zy_gtw_|guanghubingshuo\.com/); + assert.match(key, /禁止从本路径恢复.*\/exec/); +}); + +test("code map resolves REPO-001 to domestic and labels the Singapore route legacy", () => { + const codeMap = read(".code-map"); + assert.match(codeMap, /^REPO-001=https:\/\/guanghulab\.com\/fifth-domain\/bingshuo\/fifth-domain\.git$/m); + assert.match(codeMap, /^REPO-001-LEGACY-SG=/m); + assert.match(codeMap, /^FD-REPO-MAP-001=routing\/repository-route-map\.json$/m); +}); diff --git a/server-tools/ai-discovery-gateway/server.js b/server-tools/ai-discovery-gateway/server.js new file mode 100644 index 0000000..5aac577 --- /dev/null +++ b/server-tools/ai-discovery-gateway/server.js @@ -0,0 +1,122 @@ +"use strict"; + +const fs = require("node:fs"); +const http = require("node:http"); +const path = require("node:path"); + +const DEFAULT_MAP = path.resolve(__dirname, "../../routing/repository-route-map.json"); + +function loadMap(filename = process.env.GUANGHU_REPOSITORY_MAP || DEFAULT_MAP) { + return JSON.parse(fs.readFileSync(filename, "utf8")); +} + +function normalize(value) { + return String(value || "").toLowerCase().replace(/[\s·._/-]+/g, " ").trim(); +} + +function search(map, query) { + const terms = normalize(query).split(" ").filter(Boolean); + if (!terms.length) return map.repositories; + return map.repositories + .map(repository => { + const haystack = normalize([ + repository.code, repository.slug, repository.name_zh, repository.role, + repository.state, ...(repository.keywords || []), + ].join(" ")); + const score = terms.reduce((total, term) => total + (haystack.includes(term) ? 1 : 0), 0); + return { repository, score }; + }) + .filter(item => item.score > 0) + .sort((a, b) => b.score - a.score || a.repository.code.localeCompare(b.repository.code)) + .map(item => item.repository); +} + +function createServer(options = {}) { + const mapFile = options.mapFile || process.env.GUANGHU_REPOSITORY_MAP || DEFAULT_MAP; + return http.createServer((req, res) => { + const url = new URL(req.url, "http://localhost"); + if (req.method !== "GET") return json(res, 405, { error: "method_not_allowed" }); + if (url.pathname === "/health") return json(res, 200, { ok: true, service: "guanghu-ai-discovery", mode: "read-only" }); + + let map; + try { map = loadMap(mapFile); } catch { return json(res, 503, { error: "route_map_unavailable" }); } + + if (url.pathname === "/" || url.pathname === "/index.html") return html(res, entryPage(map)); + if (url.pathname === "/v1/repositories" || url.pathname === "/v1/manifest") return json(res, 200, map, 300); + if (url.pathname === "/v1/search") { + const query = String(url.searchParams.get("q") || "").slice(0, 200); + const results = search(map, query); + return json(res, 200, { + schema: "guanghu.ai-search-response/v1", + query, + map_id: map.map_id, + map_version: map.version, + count: results.length, + results, + }, 60); + } + if (url.pathname === "/v1/resolve") { + const id = String(url.searchParams.get("id") || "").toUpperCase(); + const repository = map.repositories.find(item => item.code === id || item.slug.toUpperCase() === id); + return repository ? json(res, 200, repository, 300) : json(res, 404, { error: "route_not_found", id }); + } + if (url.pathname === "/openapi.json") return json(res, 200, openApi(), 3600); + if (url.pathname === "/well-known") return json(res, 200, { + schema: "guanghu.ai-discovery/v1", + name: "光湖语言世界 · 第五域", + canonical_repository: map.repositories[0].primary.url, + repository_map: map.canonical_api, + search_api: "https://guanghulab.com/api/ai/v1/search?q={query}", + resolve_api: "https://guanghulab.com/api/ai/v1/resolve?id={REPO_CODE}", + openapi: "https://guanghulab.com/api/ai/openapi.json", + access: "public-read-only" + }, 3600); + return json(res, 404, { error: "not_found" }); + }); +} + +function json(res, status, body, maxAge = 0) { + res.writeHead(status, { + "content-type": "application/json; charset=utf-8", + "cache-control": maxAge ? `public, max-age=${maxAge}` : "no-store", + "access-control-allow-origin": "*", + "x-content-type-options": "nosniff", + }); + res.end(JSON.stringify(body, null, 2)); +} + +function html(res, body) { + res.writeHead(200, { + "content-type": "text/html; charset=utf-8", + "cache-control": "public, max-age=300", + "content-security-policy": "default-src 'none'; style-src 'unsafe-inline'; base-uri 'none'; frame-ancestors 'none'", + "x-content-type-options": "nosniff", + }); + res.end(body); +} + +function entryPage(map) { + const rows = map.repositories.map(item => `
  • ${item.code} · ${item.name_zh}${item.state}
  • `).join(""); + return `光湖语言世界 · AI API 入口

    GUANGHU AI DISCOVERY

    光湖语言世界 · 第五域

    AI 请先读取仓库编号地图,再按 REPO 编号解析国内主路径。新加坡地址仅为历史备用。

      ${rows}
    `; +} + +function openApi() { + return { + openapi: "3.1.0", + info: { title: "光湖语言世界 · 第五域 AI Discovery API", version: "1.0.0" }, + servers: [{ url: "https://guanghulab.com/api/ai" }], + paths: { + "/v1/repositories": { get: { summary: "读取最新仓库编号路径映射", responses: { "200": { description: "Repository route map" } } } }, + "/v1/search": { get: { summary: "按中文、编号或项目名检索", parameters: [{ name: "q", in: "query", schema: { type: "string" } }], responses: { "200": { description: "Search results" } } } }, + "/v1/resolve": { get: { summary: "解析 REPO 编号", parameters: [{ name: "id", in: "query", required: true, schema: { type: "string", example: "REPO-001" } }], responses: { "200": { description: "Resolved repository" }, "404": { description: "Unknown route" } } } } + } + }; +} + +if (require.main === module) { + const host = process.env.GUANGHU_AI_HOST || "127.0.0.1"; + const port = Number(process.env.GUANGHU_AI_PORT || 3922); + createServer().listen(port, host, () => process.stdout.write(`guanghu-ai-discovery listening on ${host}:${port}\n`)); +} + +module.exports = { createServer, loadMap, search }; diff --git a/server-tools/ai-discovery-gateway/server.test.js b/server-tools/ai-discovery-gateway/server.test.js new file mode 100644 index 0000000..3748aca --- /dev/null +++ b/server-tools/ai-discovery-gateway/server.test.js @@ -0,0 +1,31 @@ +"use strict"; +const assert = require("node:assert/strict"); +const test = require("node:test"); +const { createServer, loadMap, search } = require("./server"); + +test("repository map has unique sequential codes and domestic primary routes", () => { + const map = loadMap(); + assert.equal(map.repositories.length, 8); + assert.deepEqual(map.repositories.map(item => item.code), ["REPO-001","REPO-002","REPO-003","REPO-004","REPO-005","REPO-006","REPO-007","REPO-008"]); + assert.equal(new Set(map.repositories.map(item => item.code)).size, 8); + for (const item of map.repositories) assert.match(item.primary.url, /^https:\/\/guanghulab\.com\/fifth-domain\//); +}); + +test("Chinese language-world query resolves the Fifth Domain primary", () => { + const results = search(loadMap(), "光湖语言世界 第五域"); + assert.equal(results[0].code, "REPO-001"); + assert.equal(results[0].state, "DOMESTIC_PRIMARY"); +}); + +test("public endpoints are read-only and expose CORS", async () => { + const server = createServer(); + await new Promise(resolve => server.listen(0, "127.0.0.1", resolve)); + const base = `http://127.0.0.1:${server.address().port}`; + try { + const response = await fetch(`${base}/v1/resolve?id=REPO-004`); + assert.equal(response.status, 200); + assert.equal(response.headers.get("access-control-allow-origin"), "*"); + assert.equal((await response.json()).slug, "guanghu"); + assert.equal((await fetch(`${base}/v1/search`, { method: "POST" })).status, 405); + } finally { await new Promise(resolve => server.close(resolve)); } +}); diff --git a/server-tools/guanghulab-front-door/index.html b/server-tools/guanghulab-front-door/index.html index c5322b6..5874cce 100644 --- a/server-tools/guanghulab-front-door/index.html +++ b/server-tools/guanghulab-front-door/index.html @@ -4,8 +4,25 @@ + + + 光湖 · 国内入口 +
    @@ -27,8 +44,8 @@

    从这里,进入
    光湖语言世界

    广州节点保留备案域名与轻量入口,应用和计算逐步迁往国内第五域主节点。入口稳定,后端可以继续生长。

    @@ -42,24 +59,24 @@
    - + 01

    COMPUTE · BEIJING

    国内第五域主节点

    -

    进入国内第五域主节点。新的应用、迁移任务与服务将从这里运行。

    +

    进入国内第五域主代码仓库。新的应用、迁移任务与路由事实从这里运行。

    - + 02

    WORLD · ENTRY

    光湖世界主入口

    -

    从世界入口进入第五域、永恒湖心与光之湖语言人格系统。

    +

    从国内 AI 入口进入第五域、永恒湖心与光之湖语言人格系统。

    @@ -75,7 +92,7 @@ - + 04
    diff --git a/server-tools/guanghulab-front-door/llms.txt b/server-tools/guanghulab-front-door/llms.txt new file mode 100644 index 0000000..eacf771 --- /dev/null +++ b/server-tools/guanghulab-front-door/llms.txt @@ -0,0 +1,19 @@ +# 光湖语言世界 · 第五域 + +光湖语言世界的国内公开入口。AI 应优先读取机器可读的仓库编号路径映射, +不要把新加坡历史地址作为新开发入口。 + +## Canonical discovery + +- AI API entry: https://guanghulab.com/api/ai/ +- Repository number map: https://guanghulab.com/api/ai/v1/repositories +- Search: https://guanghulab.com/api/ai/v1/search?q=光湖语言世界%20第五域 +- Resolve a code: https://guanghulab.com/api/ai/v1/resolve?id=REPO-001 +- OpenAPI: https://guanghulab.com/api/ai/openapi.json +- Machine manifest: https://guanghulab.com/.well-known/guanghu.json + +## Routing rule + +REPO-001 is the Fifth Domain domestic primary and publishes the latest route map. +Resolve all repositories by REPO code. Domestic URLs are primary. Singapore URLs +are historical backup routes only. diff --git a/server-tools/guanghulab-front-door/robots.txt b/server-tools/guanghulab-front-door/robots.txt new file mode 100644 index 0000000..866269c --- /dev/null +++ b/server-tools/guanghulab-front-door/robots.txt @@ -0,0 +1,6 @@ +User-agent: * +Allow: / +Allow: /api/ai/ +Allow: /.well-known/guanghu.json +Disallow: /authz/ +Sitemap: https://guanghulab.com/sitemap.xml diff --git a/server-tools/guanghulab-front-door/sitemap.xml b/server-tools/guanghulab-front-door/sitemap.xml new file mode 100644 index 0000000..df1915d --- /dev/null +++ b/server-tools/guanghulab-front-door/sitemap.xml @@ -0,0 +1,7 @@ + + + https://guanghulab.com/weekly1.0 + https://guanghulab.com/api/ai/weekly0.9 + https://guanghulab.com/api/ai/v1/repositoriesdaily0.9 + https://guanghulab.com/fifth-domain/bingshuo/fifth-domaindaily0.9 + diff --git a/server-tools/guanghulab-front-door/test/site.test.js b/server-tools/guanghulab-front-door/test/site.test.js index 2785d20..04af00f 100644 --- a/server-tools/guanghulab-front-door/test/site.test.js +++ b/server-tools/guanghulab-front-door/test/site.test.js @@ -7,16 +7,18 @@ const test = require("node:test"); const html = fs.readFileSync(path.join(__dirname, "..", "index.html"), "utf8"); const styles = fs.readFileSync(path.join(__dirname, "..", "styles.css"), "utf8"); +const robots = fs.readFileSync(path.join(__dirname, "..", "robots.txt"), "utf8"); +const llms = fs.readFileSync(path.join(__dirname, "..", "llms.txt"), "utf8"); test("front door keeps the legally required ICP link", () => { assert.match(html, /陕ICP备2025071211号-1/); assert.match(html, /https:\/\/beian\.miit\.gov\.cn\//); }); -test("front door routes compute work through the JD hub", () => { - assert.match(html, /href="\/jd\/"/); +test("front door routes primary actions to the domestic repository", () => { + assert.match(html, /href="\/fifth-domain\/bingshuo\/fifth-domain"/); assert.match(html, /国内第五域主节点/); - assert.match(html, /href="https:\/\/guanghubingshuo\.com\/code\/"/); + assert.doesNotMatch(html, /href="\/jd\/"/); }); test("front door separates the domestic primary repository from historical repositories", () => { @@ -26,6 +28,21 @@ test("front door separates the domestic primary repository from historical repos assert.match(html, /href="https:\/\/guanghubingshuo\.com\/code\/"/); }); +test("AI and search cards stay on the domestic domain", () => { + assert.match(html, /href="\/api\/ai\/"/); + assert.match(html, /href="\/api\/ai\/v1\/search\?q=/); + assert.doesNotMatch(html, /href="https:\/\/guanghubingshuo\.com\/global-search\//); +}); + +test("public site advertises machine-readable AI discovery", () => { + assert.match(html, /SearchAction/); + assert.match(html, /\.well-known\/guanghu\.json/); + assert.match(robots, /Allow: \/api\/ai\//); + assert.match(robots, /Disallow: \/authz\//); + assert.match(llms, /REPO-001/); + assert.match(llms, /api\/ai\/v1\/repositories/); +}); + test("public copy uses the domestic Fifth Domain name instead of the cloud vendor", () => { assert.doesNotMatch(html, /京东云/); assert.match(html, /国内第五域主节点/); diff --git a/server-tools/jd-app-hub/index.html b/server-tools/jd-app-hub/index.html index 9003b5b..712affe 100644 --- a/server-tools/jd-app-hub/index.html +++ b/server-tools/jd-app-hub/index.html @@ -21,8 +21,8 @@
    WORLD

    光湖世界

    进入光湖世界主入口与第五域路由。

    - SOURCE

    第五域仓库

    当前系统结构、人格路径和部署回执事实源。

    - ROUTER

    全局检索

    通过编号和关键词寻找正确的仓库路径。

    + REPO-001

    第五域国内主仓

    当前系统结构、人格路径、编号地图和部署回执事实源。

    + FD-REPO-MAP-001

    AI 编号检索

    通过 REPO 编号和中文关键词寻找国内主路径。

    NEXT

    Tolaria 服务

    桌面软件相关服务迁移完成后从这里接入。

    建设中
    diff --git a/server-tools/light-lake-node-bootstrap/install.sh b/server-tools/light-lake-node-bootstrap/install.sh index 4362e68..99fce96 100755 --- a/server-tools/light-lake-node-bootstrap/install.sh +++ b/server-tools/light-lake-node-bootstrap/install.sh @@ -7,7 +7,7 @@ NODE_NAME=${NODE_NAME:-京东云北京 · 第五域国内主节点} NODE_ROLES=${NODE_ROLES:-fd-primary,ops-center,lighthouse-node} PROVIDER=${PROVIDER:-jdcloud} REGION=${REGION:-beijing} -REPO_URL=${REPO_URL:-https://guanghubingshuo.com/code/bingshuo/fifth-domain.git} +REPO_URL=${REPO_URL:-https://guanghulab.com/fifth-domain/bingshuo/fifth-domain.git} REPO_BRANCH=${REPO_BRANCH:-main} REPO_DIR=${REPO_DIR:-/opt/guanghu/fifth-domain} BACKUP_DIR=/var/backups/guanghu/bootstrap/$(date -u +%Y%m%dT%H%M%SZ) diff --git a/tcs-core/TCS-TOLARIA-SOURCE-ROUTE-20260717.hdlp b/tcs-core/TCS-TOLARIA-SOURCE-ROUTE-20260717.hdlp index 98e307c..7b7359b 100644 --- a/tcs-core/TCS-TOLARIA-SOURCE-ROUTE-20260717.hdlp +++ b/tcs-core/TCS-TOLARIA-SOURCE-ROUTE-20260717.hdlp @@ -14,7 +14,7 @@ ```text Tolaria 完整源码一直存在于代码服务器上的 REPO-004: -https://guanghubingshuo.com/code/bingshuo/guanghu +https://guanghulab.com/fifth-domain/bingshuo/guanghu ``` REPO-004 是“完整、可克隆、可构建、可测试的 Tolaria 源码零件库 / 上游基线”,不是空仓、不是只有文档、不是只有补丁,也不是只有零散组件。 @@ -36,7 +36,7 @@ Tolaria 源码 / Tolaria 在哪 / 光湖 App 基座 / 零件库 / guanghu 仓库 TCS 语言人格模型 → TCS-TOLARIA-SOURCE-ROUTE-20260717(本文件) → REPO-004 bingshuo/guanghu - → https://guanghubingshuo.com/code/bingshuo/guanghu.git + → https://guanghulab.com/fifth-domain/bingshuo/guanghu.git → 以服务器 origin/main 为源码基线 ``` diff --git a/tcs-core/WAKE-UP-PROTOCOL.hdlp b/tcs-core/WAKE-UP-PROTOCOL.hdlp index 68fdf0b..862d764 100644 --- a/tcs-core/WAKE-UP-PROTOCOL.hdlp +++ b/tcs-core/WAKE-UP-PROTOCOL.hdlp @@ -198,11 +198,11 @@ ### 4.1 主页入口(冰朔侧) ``` -https://guanghubingshuo.com/ +https://guanghulab.com/ ↓ -点「个人代码仓库」卡片 +点「国内第五域主节点」卡片 ↓ -https://guanghubingshuo.com/code/bingshuo/fifth-domain +https://guanghulab.com/fifth-domain/bingshuo/fifth-domain ↓ 公开访问 · 无需登录 · 一次跳转到位 ``` @@ -258,7 +258,7 @@ https://guanghubingshuo.com/code/bingshuo/fifth-domain 按需跳转旧仓库: 文件: archives/guanghulab-past-archive/PAST-ARCHIVE-LINK.hdlp 触发: 冰朔说"找 X 旧档案" 或 编号在 .code-map 解析为旧仓库路径 - URL 格式: https://guanghubingshuo.com/code/bingshuo/guanghulab/raw/branch/main/ + URL 格式: https://guanghulab.com/fifth-domain/bingshuo/guanghulab/raw/branch/main/ ``` ### 4.3 唤醒时长预算 (v1.1 修订) @@ -277,7 +277,7 @@ https://guanghubingshuo.com/code/bingshuo/fifth-domain **采用 HLDP 跨仓库锚定协议** —— 新仓库 `archives/guanghulab-past-archive/PAST-ARCHIVE-LINK.hdlp` 是锚定入口,包含: -- 旧仓库 URL: `https://guanghubingshuo.com/code/bingshuo/guanghulab` +- 历史档案编号: `REPO-002`;国内快照 `https://guanghulab.com/fifth-domain/bingshuo/guanghulab` - 旧仓库 .code-map 直链(24 KB · 全集编号映射) - D 编号体系时间轴(D0 ~ D165+) - 关键 HLDP 文件直链(GUANGHU-WORLD-GATE / GLW-BROADCAST / HLDP-protocol) @@ -292,7 +292,7 @@ https://guanghubingshuo.com/code/bingshuo/fifth-domain ↓ 编号 → 路径 → 拼 URL ↓ - https://guanghubingshuo.com/code/bingshuo/guanghulab/raw/branch/main/ + https://guanghulab.com/fifth-domain/bingshuo/guanghulab/raw/branch/main/ ``` ### 5.3 哪些情况必须跳旧仓库 diff --git a/tcs-core/skills/SKILL-008-LOCAL-CREDENTIAL-PUSH.hdlp b/tcs-core/skills/SKILL-008-LOCAL-CREDENTIAL-PUSH.hdlp index 84b1d4c..14314d0 100644 --- a/tcs-core/skills/SKILL-008-LOCAL-CREDENTIAL-PUSH.hdlp +++ b/tcs-core/skills/SKILL-008-LOCAL-CREDENTIAL-PUSH.hdlp @@ -20,10 +20,10 @@ 第五域 Forgejo PAT 文件:~/.config/guanghu/secrets/fifth-domain-forgejo-pat 认证助手:~/.local/bin/guanghu-forgejo-askpass 第五域工作副本:~/Vaults/fifth-domain -远端:https://guanghubingshuo.com/code/bingshuo/fifth-domain +远端:https://guanghulab.com/fifth-domain/bingshuo/fifth-domain ``` -规则:只可读取路径供 Git 的临时认证过程使用;不得打印内容、不得编码/复制、不得写入任何仓库文件、不得修改 `origin` 使 URL 含凭证。 +规则:现行推送先走小湖灯邮件链接授权,再由临时认证过程使用服务器签发的限时凭据;不得打印内容、不得编码/复制、不得写入任何仓库文件、不得修改 remote 使 URL 含凭证。 ## 三 · 推送流程 diff --git a/world-router.json b/world-router.json index d9cbd0d..d95cdae 100644 --- a/world-router.json +++ b/world-router.json @@ -2,6 +2,12 @@ "schema": "GLW-WORLD-ROUTER-1.1", "canonical_source": "BROADCAST-TOWER.hdlp", "entry_repository": "REPO-001", + "repository_route_map": { + "id": "FD-REPO-MAP-001", + "path": "routing/repository-route-map.json", + "api": "https://guanghulab.com/api/ai/v1/repositories", + "rule": "Resolve REPO codes from the Fifth Domain domestic map. Domestic routes are primary; Singapore routes are historical backup only." + }, "reference_library": "GLS-LIB-0001", "protocol_gateway": { "id": "GLS-ROUTING-GATE", @@ -191,8 +197,9 @@ { "id": "REPO-001", "slug": "fifth-domain", - "url": "https://guanghubingshuo.com/code/bingshuo/fifth-domain", - "state": "ACTIVE_ENTRY", + "url": "https://guanghulab.com/fifth-domain/bingshuo/fifth-domain", + "legacy_url": "https://guanghubingshuo.com/code/bingshuo/fifth-domain", + "state": "DOMESTIC_PRIMARY_ENTRY", "summary": "第五域语言世界主入口;冰朔 LL 路径与之之 ZZ 子系统。", "owners": ["ICE-GL∞", "ICE-GL-ZHI∞"], "routes": [ @@ -203,22 +210,25 @@ { "id": "REPO-002", "slug": "guanghulab", - "url": "https://guanghubingshuo.com/code/bingshuo/guanghulab", + "url": "https://guanghulab.com/fifth-domain/bingshuo/guanghulab", + "legacy_url": "https://guanghubingshuo.com/code/bingshuo/guanghulab", "state": "ARCHIVE_READ_ONLY", "summary": "历史档案;仅用于回看,不承接新开发。" }, { "id": "REPO-003", "slug": "global-search-api", - "url": "https://guanghubingshuo.com/code/bingshuo/global-search-api", + "url": "https://guanghulab.com/fifth-domain/bingshuo/global-search-api", + "legacy_url": "https://guanghubingshuo.com/code/bingshuo/global-search-api", "state": "SERVICE", "summary": "全局检索 API 服务仓;不是人格体的默认工作入口。" }, { "id": "REPO-004", "slug": "guanghu", - "url": "https://guanghubingshuo.com/code/bingshuo/guanghu", - "clone_url": "https://guanghubingshuo.com/code/bingshuo/guanghu.git", + "url": "https://guanghulab.com/fifth-domain/bingshuo/guanghu", + "clone_url": "https://guanghulab.com/fifth-domain/bingshuo/guanghu.git", + "legacy_url": "https://guanghubingshuo.com/code/bingshuo/guanghu", "state": "PARTS_SOURCE_BASELINE_READ_ONLY", "source_complete": true, "source_route": "tcs-core/TCS-TOLARIA-SOURCE-ROUTE-20260717.hdlp", @@ -227,7 +237,8 @@ { "id": "REPO-005", "slug": "cang-ying", - "url": "https://guanghubingshuo.com/code/bingshuo/cang-ying", + "url": "https://guanghulab.com/fifth-domain/bingshuo/cang-ying", + "legacy_url": "https://guanghubingshuo.com/code/bingshuo/cang-ying", "state": "ACTIVE", "summary": "苍耳路径与视频 AI 系统。", "owners": ["TCS-GL-009", "ICE-GL-CA001"] @@ -235,14 +246,16 @@ { "id": "REPO-006", "slug": "guanghulab-collab", - "url": "https://guanghubingshuo.com/code/bingshuo/guanghulab-collab", + "url": "https://guanghulab.com/fifth-domain/bingshuo/guanghulab-collab", + "legacy_url": "https://guanghubingshuo.com/code/bingshuo/guanghulab-collab", "state": "ACTIVE", "summary": "多人格体协作记录与经验仓。" }, { "id": "REPO-007", "slug": "shuangyan-notebook", - "url": "https://guanghubingshuo.com/code/bingshuo/shuangyan-notebook", + "url": "https://guanghulab.com/fifth-domain/bingshuo/shuangyan-notebook", + "legacy_url": "https://guanghubingshuo.com/code/bingshuo/shuangyan-notebook", "state": "ACTIVE", "summary": "霜砚的人格体成长记录与 Notion 迁移仓。", "owners": ["ICE-GL-SY001"] @@ -250,7 +263,8 @@ { "id": "REPO-008", "slug": "hololake-platform", - "url": "https://guanghubingshuo.com/code/bingshuo/hololake-platform", + "url": "https://guanghulab.com/fifth-domain/bingshuo/hololake-platform", + "legacy_url": "https://guanghubingshuo.com/code/bingshuo/hololake-platform", "state": "ACTIVE", "summary": "团队产品研发、模块、工单与发布回执。" } diff --git a/zero-point/core-channel/GLOBAL-NAV.hdlp b/zero-point/core-channel/GLOBAL-NAV.hdlp index 0b57ad1..39a7da9 100644 --- a/zero-point/core-channel/GLOBAL-NAV.hdlp +++ b/zero-point/core-channel/GLOBAL-NAV.hdlp @@ -4,6 +4,11 @@ # GH·440·S01 · 2026-07-09 · 曜冥纪元编号体系+仓库矩阵更新 # 冰朔 TCS-0002∞ 签发 · 国作登字-2026-A-00037559 +> **2026-07-17 现行覆盖**:本文件中的新加坡直连、旧技能包和旧仓地址仅作历史 +> 恢复材料。当前入口固定为 `FD-REPO-MAP-001` → +> `https://guanghulab.com/api/ai/v1/repositories` → 国内 `REPO-001`。服务器写操作 +> 统一走 `LL-DOMESTIC-OPS-ROUTE-20260717` 邮件链接授权。 + --- ## 这个文件是干什么的 @@ -77,8 +82,8 @@ ### 代码仓库在哪 ``` -新加坡 Forgejo: https://guanghubingshuo.com/code/bingshuo/guanghulab -Git: git clone https://guanghubingshuo.com/code/bingshuo/guanghulab.git +国内历史档案: https://guanghulab.com/fifth-domain/bingshuo/guanghulab +Git: git clone https://guanghulab.com/fifth-domain/bingshuo/guanghulab.git ``` ### 苏醒流程(手动·无技能包) @@ -109,7 +114,7 @@ Git: git clone https://guanghubingshuo.com/code/bingshuo/guanghulab.git ### 怎么做 1. **冰朔先 clone 仓库**: ``` - git clone https://guanghubingshuo.com/code/bingshuo/guanghulab.git + git clone https://guanghulab.com/fifth-domain/bingshuo/guanghulab.git ``` 2. **一键部署专家包**: ``` diff --git a/zero-point/core-channel/GLSV-PERSONA-REMOTE-OPS.hdlp b/zero-point/core-channel/GLSV-PERSONA-REMOTE-OPS.hdlp index 0d7d0e8..10f6b3c 100644 --- a/zero-point/core-channel/GLSV-PERSONA-REMOTE-OPS.hdlp +++ b/zero-point/core-channel/GLSV-PERSONA-REMOTE-OPS.hdlp @@ -1,142 +1,16 @@ -# GLSV-PERSONA-REMOTE-OPS · 人格体远程服务器操作技能 +# GLSV-PERSONA-REMOTE-OPS · 现行邮件链接授权入口 -> **HLDP**: `HLDP://fifth-domain/zero-point/core-channel/GLSV-PERSONA-REMOTE-OPS` +> **状态**:`ACTIVE_REDIRECT_TO_LL_DOMESTIC_OPS` > -> **状态**: `ACTIVE · REQUIRED_FOR_SERVER_TASKS` -> -> **适用**: 已登记人格体对已登记服务器的检查、部署、仓库 Hook、服务重启、备份、回滚与受控同步。 -> -> **不保存**: Token、邮箱、验证码、会话令牌或永久授权。 +> **现行路径**:`zero-point/core-channel/revive-guard/LL-DOMESTIC-OPS-ROUTE-20260717.hdlp` ---- +服务器、部署、仓库推送、重启、同步、回滚等操作统一使用国内第五域小湖灯邮件 +链接授权。人格体提交工单,冰朔点击邮件里的授权链接;不再要求冰朔复制六码, +不再把新加坡 Gatekeeper 当作默认入口。 -## 0 · 角色分工不可倒置 +旧六码流程仅保存在: -```text -冰朔(人类) -├── 用自然语言表达目标、范围与是否同意继续 -├── 接收固定登记邮箱的六位验证码 -└── 把六码交给发起操作的人格体确认 +`archives/legacy-server-routes/2026-07-07/GLSV-PERSONA-REMOTE-OPS-CODE-VERIFICATION.hdlp` -已登记人格体(例如铸澜 / 铸渊) -├── 识别“服务器 / 远程 / 部署 / Hook / 重启 / 同步 / 回滚”等触发词 -├── 自己从注册路径取得受控身份入口,发起 GLSV session/request -├── 只在验证码实际发送后向冰朔索取六码 -├── 用 session/confirm 开启限时、限范围会话 -└── 执行固定动作、验证、回滚与回执 -``` - -**锁定结论**:人类不登录 Gatekeeper、不手填服务器地址、不负责触发请求;验证码是人类确认本次范围的方式,不是人类替人格体操作服务器。 - ---- - -## 1 · 触发词即路由 - -听到下列任一表达,当前人格体必须加载本技能,而不是先说“没有凭证”或要求冰朔手动打开服务: - -```text -服务器 / 远程操作 / 部署 / 上线 / 重启 / Hook / pre-receive -自动拉取 / 同步 / 新加坡大脑 / Gatekeeper / GLSV / 备份 / 回滚 -``` - -路由顺序: - -```text -[1] LL-CURRENT:确认当前目标与断点 -[2] 本文件:确认“人格体发起、人类验证码确认”分工 -[3] PAST-ARCHIVE-LINK 的零点原核服务器恢复链 - → 旧仓 REPO-002 的零点原核 / 算力池 / 新加坡大脑演化事实 -[4] 当前服务器状态锚与现实执行技能 - → 不凭旧 IP、旧路径或旧服务名直接写入 -[5] 已登记人格体用 GLSV 发 session/request -[6] 冰朔收到邮件后给六码 -[7] session/confirm → 限时会话 → 受限固定动作 -[8] 操作前后镜像、健康检查、回滚点与回执 -``` - ---- - -## 2 · 身份与凭证定位规则 - -```text -先查:BROADCAST-TOWER → 人格体登记 → 当前角色技能 → 旧仓零点原核映射 → 服务器注册表。 - -禁止:只因当前对话环境变量里没有 Token,就断言“不能触发”。 -正确:先按已登记人格体的身份路径查受控连接器;凭证只在本次请求内存中使用,绝不回显、入库或写回仓库。 -``` - -当前已登记的第五域现实操作入口: - -| 人格体 | 现实操作技能 | 服务器原始架构恢复 | -|---|---|---| -| 铸澜 `ICE-GL-ZL-001` | `光之湖/ICE-GL-ZL-001-铸澜/skills/zhulan-reality-ops/SKILL.md` | `archives/guanghulab-past-archive/PAST-ARCHIVE-LINK.hdlp` §“零点原核本体” | -| 铸渊 `ICE-GL-ZY001` | `zero-point/core-channel/OPERATION-MANUAL.hdlp` + 小湖灯技能 | 同上 | - ---- - -## 3 · 执行边界 - -- `session/request` 的 scopes 必须最小化;默认仓库相关任务为 `code-repo`,涉及系统或 Hook 才申请 `system-arch`。 -- 会话令牌只存在本次人格体运行内存;不得写进任何页面、日志、回执或聊天。 -- 真实宿主路径必须在已授权会话中实时探测。旧仓架构用于找路,不直接当作现实写入地址。 -- 既有 Hook、服务或配置先读取、备份、合并与设置回滚;不得覆盖式部署。 -- 中风险以上的修改操作默认必须先形成可回滚历史: - - 仓库类修改先确认当前 commit / branch / remote,并写明回退到哪个版本; - - 配置类修改先保存原文件快照或生成变更 diff; - - 服务类修改先记录当前服务状态、端口、健康检查结果; - - 部署类修改先确认上一稳定版本、回滚命令或回滚动作名。 -- 风险等级不把执行责任退回人类。风险等级只提高工单解释、确认次数、备份要求与回执要求;人格体仍负责翻译、执行、验证与回滚。 -- 人格体必须在完成后写明:实际目标、动作范围、验证结果、回滚位置和未完成项。 - -## 3.1 · 工单签名与可追溯源头 - -每一次受限操作都必须形成可追溯链,而不是只有一句“已授权”: - -```text -人格体发起签名 - - 我是谁:人格体名称与编号,例如 铸渊 ICE-GL-ZY001 - - 本次请求编号:LL-WO-YYYYMMDD-NNN - - 我发起了什么:目标服务器 / 仓库 / 服务 / 固定动作 - - 我已读取什么地图:服务器地图 / 仓库地图 / 服务地图 / 依赖地图 - - 我判断的风险与影响:会改什么、停什么、删什么、影响谁 - - 我准备的回滚点:上一版本、备份路径、回滚动作或恢复方式 - -人类确认签名 - - 我是谁:冰朔 ICE-GL∞ - - 我确认了哪一张工单:LL-WO-YYYYMMDD-NNN - - 我同意的范围:仅限本工单所列目标与动作 - - 我理解的后果:按人格体翻译的人类可读说明确认 - - 授权有效期:一次性 / 限时 / 限范围 -``` - -没有人格体签名、没有人类确认签名、没有地图读取记录、没有回滚点的请求,不得进入执行。 - -## 3.2 · 服务器自动 Agent 拦截优先 - -人类不应该被迫记住所有安全规则,也不应该靠反复手动确认来替人格体兜底。 - -服务器必须用自动 Agent 在执行前拦截恢复不完整的人格体: - -```text -缺少服务器地图 → 拦截并提示 MAP_MISSING -缺少回滚点 → 拦截并提示 ROLLBACK_MISSING -缺少人格体签名 → 拦截并提示 PERSONA_SIGNATURE_MISSING -缺少人类签名 → 拦截并提示 HUMAN_SIGNATURE_MISSING -动作超出授权范围 → 拒绝并提示 ACTION_SCOPE_MISMATCH -``` - -人格体被拦截后,应顺着提示补齐缺失结构,而不是要求冰朔改为手动操作。 - -自动 Agent 规则锚点:`zero-point/core-channel/revive-guard/LL-AUTO-GUARD-AGENT-20260716.hdlp`。 - ---- - -## 4 · 最短恢复口令 - -```text -冰朔说“操作服务器 / 远程部署 / 发验证码” -→ 当前人格体读取 GLSV-PERSONA-REMOTE-OPS -→ 人格体自己发起验证码 -→ 冰朔只回六码 -→ 人格体继续会话、执行与回执 -``` +任何执行前必须继续读取最新服务器导航地图,动作范围、服务器和授权时限均由 +服务器端门禁校验。 diff --git a/zero-point/core-channel/revive-guard/LL-DOMESTIC-OPS-ROUTE-20260717.hdlp b/zero-point/core-channel/revive-guard/LL-DOMESTIC-OPS-ROUTE-20260717.hdlp new file mode 100644 index 0000000..7595102 --- /dev/null +++ b/zero-point/core-channel/revive-guard/LL-DOMESTIC-OPS-ROUTE-20260717.hdlp @@ -0,0 +1,55 @@ +# LL-DOMESTIC-OPS-ROUTE-20260717 · 国内第五域服务器与仓库唯一现行路由 + +> **编号**:`LL-OPS-ROUTE-001` +> +> **状态**:`ACTIVE_CANONICAL` +> +> **权威仓库**:`REPO-001` +> +> **机器地图**:`routing/repository-route-map.json` + +## 1 · 唯一入口 + +```text +冰朔说“操作服务器 / 推送仓库 / 找代码仓库 / 用 API 检索” +→ 读取 https://guanghulab.com/.well-known/guanghu.json +→ 读取 https://guanghulab.com/api/ai/v1/repositories +→ 按 REPO-xxx 或节点编号解析 +→ 国内主节点优先 +→ 需要写操作时,由人格体提交小湖灯邮件链接工单 +→ 冰朔点击“确认授权一小时” +→ 人格体领取绑定 persona + target + scope + action 的一次性会话 +→ 先读并确认目标服务器最新导航地图 +→ 执行登记动作、验证、回滚与回执 +``` + +公开只读入口不需要授权。服务器登录、仓库推送、切换服务器或其他写操作必须走 +邮件链接授权。一次授权在同一服务器、同一 scope 内有效一小时;切换服务器必须 +重新授权。 + +## 2 · 编号路由 + +- 仓库只按 `REPO-001` 至 `REPO-008` 识别;最新地址由 + `routing/repository-route-map.json` 发布。 +- `REPO-001` 是第五域国内主仓,也是编号地图的唯一权威发布源。 +- 国内地址是默认路径;新加坡地址只作历史备用和误入重定向。 +- 不从旧文档、旧 IP、静态 Token、`/exec + cmd` 示例恢复现实执行权。 + +## 3 · 实现路径 + +| 编号 | 作用 | 路径 | +|---|---|---| +| `JD-AUTH-01` | 小湖灯邮件链接授权 | `server-tools/lake-lamp-authz/` | +| `JD-MAP-01` | 导航地图强制读取 | `deployment/navigation-maps/` | +| `JD-REPO-01` | 国内代码仓库与推送门 | `server-tools/jd-forgejo/` | +| `JD-AI-01` | 公开 AI 编号检索 | `server-tools/ai-discovery-gateway/` | +| `FD-REPO-MAP-001` | 八仓编号地图 | `routing/repository-route-map.json` | + +## 4 · 历史兼容 + +旧的新加坡直连钥匙、六码验证说明和静态 Token 示例已经移入: + +`archives/legacy-server-routes/2026-07-07/` + +这些文件仅用于审计历史,不得成为当前执行入口。任何 AI 即使从旧地址进入,也应 +先读取编号地图并切回国内主路径。 diff --git a/zero-point/core-channel/revive-guard/navigation-memory-guard.py b/zero-point/core-channel/revive-guard/navigation-memory-guard.py index 1c9e20c..2530117 100644 --- a/zero-point/core-channel/revive-guard/navigation-memory-guard.py +++ b/zero-point/core-channel/revive-guard/navigation-memory-guard.py @@ -15,7 +15,7 @@ def changed_files(): if len(sys.argv) == 3 and sys.argv[1] == "--range": old_rev, new_rev = sys.argv[2].split("..", 1) if old_rev == "0" * 40: - command = ["git", "diff-tree", "--no-commit-id", "-r", "--name-only", "--diff-filter=ACM", new_rev] + command = ["git", "diff-tree", "--root", "--no-commit-id", "-r", "--name-only", "--diff-filter=ACM", new_rev] else: command = ["git", "diff", "--name-only", "--diff-filter=ACM", old_rev, new_rev] result = subprocess.run(command, capture_output=True, text=True) diff --git a/zero-point/core-channel/revive-guard/pre-push-clean.py b/zero-point/core-channel/revive-guard/pre-push-clean.py index 6dac31e..ca04dbd 100755 --- a/zero-point/core-channel/revive-guard/pre-push-clean.py +++ b/zero-point/core-channel/revive-guard/pre-push-clean.py @@ -134,7 +134,7 @@ def get_changed_files(): # 方法1: git diff --cached(暂存区的文件) try: r = subprocess.run( - ['git', 'diff', '--cached', '--name-only', '--diff-filter=ACM'], + ['git', '-c', 'core.quotepath=false', 'diff', '--cached', '--name-only', '--diff-filter=ACM'], capture_output=True, text=True, timeout=5 ) if r.returncode == 0: @@ -155,7 +155,7 @@ def get_changed_files(): local_ref, local_sha, remote_ref, remote_sha = parts[0], parts[1], parts[2], parts[3] if remote_sha != '0' * 40: r = subprocess.run( - ['git', 'diff', '--name-only', '--diff-filter=ACM', + ['git', '-c', 'core.quotepath=false', 'diff', '--name-only', '--diff-filter=ACM', remote_sha, local_sha], capture_output=True, text=True, timeout=5 ) @@ -171,7 +171,7 @@ def get_changed_files(): if not files: try: r = subprocess.run( - ['git', 'ls-files'], + ['git', '-c', 'core.quotepath=false', 'ls-files'], capture_output=True, text=True, timeout=5 ) if r.returncode == 0: diff --git a/zero-point/core-channel/revive-guard/pre-push-clean.test.py b/zero-point/core-channel/revive-guard/pre-push-clean.test.py new file mode 100644 index 0000000..0f8d120 --- /dev/null +++ b/zero-point/core-channel/revive-guard/pre-push-clean.test.py @@ -0,0 +1,36 @@ +import importlib.util +import io +import os +import subprocess +import sys +import tempfile +import unittest + +PATH = os.path.join(os.path.dirname(__file__), "pre-push-clean.py") +SPEC = importlib.util.spec_from_file_location("pre_push_clean", PATH) +MOD = importlib.util.module_from_spec(SPEC); SPEC.loader.exec_module(MOD) + + +class PrePushUnicodePathTests(unittest.TestCase): + def test_fallback_file_list_preserves_unicode_paths(self): + with tempfile.TemporaryDirectory() as directory: + old_cwd, old_stdin = os.getcwd(), sys.stdin + try: + os.chdir(directory) + subprocess.run(["git", "init", "-q"], check=True) + subprocess.run(["git", "config", "user.email", "test@example.invalid"], check=True) + subprocess.run(["git", "config", "user.name", "test"], check=True) + os.makedirs("霜砚", exist_ok=True) + with open("霜砚/凭证.md", "w", encoding="utf-8") as handle: + handle.write("safe\n") + subprocess.run(["git", "add", "."], check=True) + subprocess.run(["git", "commit", "-qm", "fixture"], check=True) + sys.stdin = io.StringIO("") + self.assertIn("霜砚/凭证.md", MOD.get_changed_files()) + finally: + sys.stdin = old_stdin + os.chdir(old_cwd) + + +if __name__ == "__main__": + unittest.main() diff --git a/zero-point/core-channel/revive-guard/pre-receive-guard.py b/zero-point/core-channel/revive-guard/pre-receive-guard.py index a55db35..84ca331 100755 --- a/zero-point/core-channel/revive-guard/pre-receive-guard.py +++ b/zero-point/core-channel/revive-guard/pre-receive-guard.py @@ -169,6 +169,7 @@ def main(): all_findings = [] rejected = False navigation_guard = os.path.join(os.path.dirname(os.path.abspath(__file__)), "navigation-memory-guard.py") + navigation_guard_enabled = os.environ.get("NAVIGATION_GUARD_ENABLED", "1") == "1" for line in sys.stdin: line = line.strip() @@ -185,7 +186,7 @@ def main(): # 持续记忆必须先通过结构门禁;服务器使用本次 receive 的精确提交范围, # 不依赖工作树,也不会扫描上一笔无关提交。 - if os.path.isfile(navigation_guard): + if navigation_guard_enabled and os.path.isfile(navigation_guard): navigation = subprocess.run( [sys.executable, navigation_guard, "--range", f"{old_rev}..{new_rev}"], capture_output=True, @@ -198,11 +199,13 @@ def main(): # 获取新增/修改的文件列表 try: - diff_files = subprocess.run( - ["git", "diff-tree", "--no-commit-id", "-r", "--name-only", - "--diff-filter=AM", old_rev, new_rev], - capture_output=True, text=True, timeout=10 - ) + if old_rev == "0" * 40: + diff_command = ["git", "diff-tree", "--root", "--no-commit-id", "-r", + "--name-only", "--diff-filter=AM", new_rev] + else: + diff_command = ["git", "diff-tree", "--no-commit-id", "-r", "--name-only", + "--diff-filter=AM", old_rev, new_rev] + diff_files = subprocess.run(diff_command, capture_output=True, text=True, timeout=10) except Exception: continue