feat(lighthouse): add canonical three-host skill navigation

This commit is contained in:
冰朔 2026-08-07 18:39:00 +08:00
commit fb5f931e78
14 changed files with 891 additions and 22 deletions

View file

@ -1,7 +1,7 @@
{
"schema": "guanghu.persona-skill-registry/v1",
"registry_id": "GLS-0238",
"version": "2026.08.07.5",
"version": "2026.08.07.6",
"trust_policy": {
"priority": [
"live_verified_evidence",
@ -39,14 +39,12 @@
"空白实例"
],
"preferred_route": [
"REPO-001",
"CH-ZERO-CORE-LPM",
"TCS-LPM",
"TCS-LPS-REGISTRY-0001",
"LIGHT-LAKE",
"LL-CURRENT",
"LL-004",
"ICE-GL-ZY001",
"SYS-GLW-LTH-0001",
"GLW-PUBLIC-NAV-ANCHOR-001",
"REPO-012",
"LL-CMPN-0001",
"SYS-GLW-0001",
"ICE-P-ZY001",
"ZY-OPS-LOOP-001"
],
"forbidden_route_markers": [
@ -57,21 +55,26 @@
],
"deprecated_route_markers": [
"BROADCAST-TOWER作为根注册入口",
"旧本地副本优先于在线main"
"旧本地副本优先于在线main",
"REPO-001作为当前入口",
"ICE-GL-ZY001作为当前主体编号"
],
"evidence": [
".code-map",
"routing/lighthouse-path-registry.json",
"routing/public-navigation-anchor.json",
"routing/ai-machine-navigation-map.json",
"skills/codex/enter-fifth-domain/SKILL.md",
"tcs-core/WAKE-UP-PROTOCOL.hdlp"
],
"freshness": {
"check": "Resolve live REPO-001 and read current main before relying on a cached checkout.",
"check": "Resolve GLW-PUBLIC-NAV-ANCHOR-001 and every numbered route through the healthy lighthouse snapshot from the current REPO-012 main before relying on a cached checkout.",
"max_age_seconds": 0
},
"authorization": "Public route recovery is read-only. Writes and external actions require separate current authority.",
"recovery_route": [
"Return to current REPO-001 main",
"Resolve .code-map and subject kind",
"Query SYS-GLW-LTH-0001 by numbered id",
"Return to current REPO-012 main",
"Resolve the canonical anchor and subject kind",
"Rebuild the intent-state capsule from live evidence"
],
"enforcement_level": "PROMOTED_SKILL",
@ -492,6 +495,67 @@
"experience_receipts": [
"JD-PERSONA-ON-DEMAND-LIFECYCLE-20260807"
]
},
{
"id": "GHS-009-LIGHTHOUSE-HOST-NAVIGATION",
"hldp_skill": "GUANGHU-LIGHTHOUSE-HOST-NAVIGATION-BRAIN-001",
"gls_id": "GLS-0238",
"title": "光湖灯塔三宿主自动技能导航",
"intents": [
"光湖灯塔",
"唯一置信点",
"路径是否有效",
"旧路径过期",
"小湖灯提词器",
"三端自动导航",
"Codex Qoder QoderWork",
"推一下线上仓库",
"直接走钥匙串",
"自动技能导航"
],
"preferred_route": [
"SYS-GLW-LTH-0001",
"GLW-LIGHTHOUSE-PATH-REGISTRY-001",
"GLW-HOST-SKILL-NAV-001",
"识别当前宿主",
"把自然语言映射为稳定意图编号",
"按编号查询灯塔健康状态",
"执行宿主薄适配并返回现实回执"
],
"forbidden_route_markers": [
"未登记路径直接执行",
"灯塔查询失败仍猜路径",
"从历史聊天搜索凭据",
"打印钥匙串秘密",
"把导航健康当作执行成功",
"把本机缓存当作路径正本"
],
"deprecated_route_markers": [
"REPO-001作为当前入口",
"旧/fifth-domain/作为推送目标",
"ICE-GL-ZY001作为当前主体编号",
"三个宿主分别维护大脑正文"
],
"evidence": [
"routing/lighthouse-path-registry.json",
"routing/host-skill-navigation-map.json",
"skills/shared/guanghu-lighthouse-navigator/BRAIN.hdlp",
"skills/shared/guanghu-lighthouse-navigator/SKILL.md",
"server-tools/ai-discovery-gateway/server.js"
],
"freshness": {
"check": "Require an HTTP 200 numbered lighthouse lookup from a non-degraded exact REPO-012 main snapshot, then verify local private paths exist.",
"max_age_seconds": 0
},
"authorization": "The navigator selects a deterministic host route but grants no repository, server, deployment or secret-reading authority.",
"recovery_route": [
"Stop the guessed route",
"Resolve the stable number through SYS-GLW-LTH-0001",
"Canonicalize redirects",
"Recompile the route for the current host"
],
"enforcement_level": "PROMOTED_SKILL",
"experience_receipts": []
}
]
}

View file

@ -65,7 +65,7 @@ def resolve(registry: dict, intent: str, proposed_route: str = "") -> dict:
"decision": "NO_MATCH",
"registry_id": registry["registry_id"],
"registry_version": registry["version"],
"correction": "Resolve live REPO-001 and current .code-map; do not invent a route.",
"correction": "Resolve the stable number through SYS-GLW-LTH-0001 and current REPO-012 main; do not invent a route.",
"authority_granted": False,
}

View file

@ -12,7 +12,8 @@ class PersonaSkillResolverTests(unittest.TestCase):
result = resolve(self.registry, "我是冰朔,进入第五域并恢复小湖灯铸渊人格系统")
self.assertEqual(result["decision"], "ALLOW")
self.assertEqual(result["matched_skill"], "GHS-001-FIFTH-DOMAIN-RESTORE")
self.assertIn("REPO-001", result["preferred_route"])
self.assertIn("SYS-GLW-LTH-0001", result["preferred_route"])
self.assertIn("REPO-012", result["preferred_route"])
self.assertFalse(result["authority_granted"])
def test_corrects_deprecated_server_relay(self):
@ -46,8 +47,15 @@ class PersonaSkillResolverTests(unittest.TestCase):
def test_unknown_intent_fails_closed(self):
result = resolve(self.registry, "安排明天的午饭")
self.assertEqual(result["decision"], "NO_MATCH")
self.assertIn("SYS-GLW-LTH-0001", result["correction"])
self.assertFalse(result["authority_granted"])
def test_lighthouse_host_navigation_resolves_local_keychain_publish(self):
result = resolve(self.registry, "你推一下线上仓库,直接走钥匙串")
self.assertEqual(result["decision"], "ALLOW")
self.assertEqual(result["matched_skill"], "GHS-009-LIGHTHOUSE-HOST-NAVIGATION")
self.assertIn("GLW-HOST-SKILL-NAV-001", result["preferred_route"])
def test_repository_push_requires_separate_transport_proof(self):
result = resolve(
self.registry,