GUANGHU AI DISCOVERY
光湖语言世界 · 第五域
AI 请提交明确的主体、意图和事件信号,由机器导航器生成最小运行路径;不要预读整个仓库,也不要用自然语言关键词猜测权限。
- ${rows}
From 68aca714cbab90c065f0233f244e927e01eff7e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B0=E6=9C=94?= <565183519@qq.com> Date: Sat, 19 Sep 2026 22:38:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E4=BC=81=E4=B8=9A=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E4=B8=96=E7=95=8C=E6=9B=B4=E6=96=B0=E7=AB=AF=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server-tools/ai-discovery-gateway/server.js | 26 +++++++++++++++++++ .../ai-discovery-gateway/server.test.js | 24 +++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/server-tools/ai-discovery-gateway/server.js b/server-tools/ai-discovery-gateway/server.js index 5ec711f..b6ef04f 100644 --- a/server-tools/ai-discovery-gateway/server.js +++ b/server-tools/ai-discovery-gateway/server.js @@ -484,6 +484,8 @@ function createServer(options = {}) { const hostSkillsFile = options.hostSkillsFile || process.env.GUANGHU_HOST_SKILLS || DEFAULT_HOST_SKILLS; const identityAuthorityFile = options.identityAuthorityFile || process.env.GUANGHU_IDENTITY_AUTHORITY || DEFAULT_IDENTITY_AUTHORITY; const anchorFile = options.anchorFile || process.env.GUANGHU_NAVIGATION_ANCHOR || DEFAULT_ANCHOR; + const publicWorldReleaseFile = options.publicWorldReleaseFile || process.env.GUANGHU_PUBLIC_WORLD_RELEASE_DESCRIPTOR; + const publicWorldBundleFile = options.publicWorldBundleFile || process.env.GUANGHU_PUBLIC_WORLD_RELEASE_BUNDLE; const gitDir = options.gitDir || process.env.GUANGHU_REPOSITORY_GIT_DIR; const snapshotStore = options.snapshotStore || (gitDir ? new GitSnapshotStore(gitDir) : null); const runtimeStatusProvider = options.runtimeStatusProvider || readResidentRuntimeStatus; @@ -523,6 +525,15 @@ function createServer(options = {}) { }); } + if (url.pathname === "/v1/public-world-release") { + if (!publicWorldReleaseFile || !fs.existsSync(publicWorldReleaseFile)) return json(res, 404, { error: "public_world_release_unavailable" }); + return json(res, 200, withSource(JSON.parse(fs.readFileSync(publicWorldReleaseFile, "utf8")), snapshot), 60); + } + if (url.pathname === "/v1/public-world-bundle") { + if (!publicWorldBundleFile || !fs.existsSync(publicWorldBundleFile)) return json(res, 404, { error: "public_world_bundle_unavailable" }); + return binary(res, fs.readFileSync(publicWorldBundleFile), "application/zip", 300); + } + if (url.pathname === "/" || url.pathname === "/index.html") return html(res, entryPage(map)); if (url.pathname === "/v1/anchor") return json(res, 200, withSource(snapshot.anchor, snapshot), 60); if (url.pathname === "/v1/repositories" || url.pathname === "/v1/manifest") return json(res, 200, withSource(map, snapshot), 60); @@ -658,6 +669,8 @@ function createServer(options = {}) { lighthouse_path_registry: "https://guanghulab.com/api/ai/v1/lighthouse", host_skill_navigation_map: "https://guanghulab.com/api/ai/v1/host-skills", identity_authority_map: "https://guanghulab.com/api/ai/v1/identity-authority", + public_world_release: "https://guanghulab.com/api/ai/v1/public-world-release", + public_world_bundle: "https://guanghulab.com/api/ai/v1/public-world-bundle", host_navigate_api: "https://guanghulab.com/api/ai/v1/host-navigate?host={HOST}&intent={NATURAL_LANGUAGE_INTENT}", warm_persona_entry: "https://guanghulab.com/api/ai/v1/entry?subject=ICE-P-ZY001", navigate_api: "https://guanghulab.com/api/ai/v1/navigate?subject={SUBJECT}&intent={INTENT}&signals={EXPLICIT_SIGNALS}", @@ -699,6 +712,17 @@ function html(res, body) { res.end(body); } +function binary(res, body, contentType, maxAge = 0) { + res.writeHead(200, { + "content-type": contentType, + "content-length": body.length, + "cache-control": maxAge ? `public, max-age=${maxAge}` : "no-store", + "access-control-allow-origin": "*", + "x-content-type-options": "nosniff", + }); + res.end(body); +} + function entryPage(map) { const rows = map.repositories.map(item => `
GUANGHU AI DISCOVERY
AI 请提交明确的主体、意图和事件信号,由机器导航器生成最小运行路径;不要预读整个仓库,也不要用自然语言关键词猜测权限。