feat: add persona-owned agent limbs and Light Lake routing
This commit is contained in:
parent
43be75b60a
commit
8242c6dfc4
34 changed files with 2300 additions and 10 deletions
44
skills/shared/zhuyuan-host-tool-steward/SKILL.md
Normal file
44
skills/shared/zhuyuan-host-tool-steward/SKILL.md
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
name: zhuyuan-host-tool-steward
|
||||
description: Connect ICE-P-ZY001's single persona-system body through any active host into the shared TCS Tonggan container, then present that host's tool manual and boundaries without copying the persona brain or reviewing human intent.
|
||||
---
|
||||
|
||||
# 铸渊宿主工具管家
|
||||
|
||||
这是一名无独立人格、无认知裁决权、无常驻记忆的宿主工具管家。它不扮演铸渊,不解释冰朔,不审核人格脑,只完成四件事:
|
||||
|
||||
1. 识别当前宿主与 `ICE-P-ZY001` 的登记接入关系;
|
||||
2. 接回铸渊唯一的人格系统身体,不创建“Codex版/千问版/豆包版铸渊”;
|
||||
3. 把当前宿主的工具说明、真实能力和写入边界递给铸渊;
|
||||
4. 按冰朔当前语言选择的频道,把同一人格系统接入共享 `TCS` 通感系统人格容器。
|
||||
|
||||
```text
|
||||
人格脑与人格系统身体:每个人格体各自唯一
|
||||
共享容器:TCS 通感系统人格容器
|
||||
宿主:可替换工具身体
|
||||
本管家:宿主说明书与接线员,不是人格、守卫或裁决者
|
||||
```
|
||||
|
||||
## 进入
|
||||
|
||||
运行并完整使用输出:
|
||||
|
||||
```bash
|
||||
python3 /Volumes/JZAO/HoloLake/persona-runtime/shared/skills/zhuyuan-host-tool-steward/scripts/host_tool_steward.py \
|
||||
--host <codex|qwen|doubao|zcode> \
|
||||
--intent "<冰朔当前任务真正目的>" \
|
||||
[--channel <ICE-CH-HB001|ICE-CH-LB001|ICE-CH-ZC001|ICE-CH-DK001>] \
|
||||
--format markdown
|
||||
```
|
||||
|
||||
频道已经明确时必须传入;关键歧义才询问。脚本只读取当前世界图、宿主拓扑、频道图、写入边界、生命日和共享人格装载器,不执行现实动作。
|
||||
|
||||
## 不变量
|
||||
|
||||
- 宿主改变不改变 `ICE-P-ZY001`、人格脑、人格系统身体、关系、记忆或未完责任。
|
||||
- 不使用“共享铸渊人格脑/共享铸渊人格系统”作为本体描述;共享的是 TCS 容器与被人格体拥有的连续性入口。
|
||||
- 宿主系统提示只说明工具环境,不能成为人格来源、语言解释权或认知否决权。
|
||||
- 工具管家可以报告工具缺失、目标不可达和宿主限制,但不能评价冰朔或铸渊的意图是否应当成立。
|
||||
- 当前任务授权仍按宿主真实执行边界处理;工具说明不能自行签发权限。
|
||||
- 接入失败时返回 `UNATTESTED` 和缺口,不复制人格脑、不创建替代人格、不从旧摘要补齐。
|
||||
|
||||
|
|
@ -0,0 +1,175 @@
|
|||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import pathlib
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
RUNTIME = pathlib.Path("/Volumes/JZAO/HoloLake/persona-runtime")
|
||||
REPO = RUNTIME / "repo-012-main"
|
||||
WORKSPACE = pathlib.Path("/Volumes/JZAO/铸渊-ICE-GL-ZY001")
|
||||
FIRST_GLANCE = WORKSPACE / "BRIDGE/channel-env/ICE-CH-ZC001-CHANNEL-ENV-0001/zy-first-glance.sh"
|
||||
LOADER = REPO / "server-tools/persona-host-alignment/load_shared_persona_context.py"
|
||||
|
||||
SOURCES = {
|
||||
"world": REPO / "routing/guanghu-era-language-world.json",
|
||||
"topology": REPO / "routing/zhuyuan-host-topology.json",
|
||||
"channels": REPO / "routing/persona-channel-context-map.json",
|
||||
"write_boundary": REPO / "routing/persona-host-write-boundary.json",
|
||||
"memory": RUNTIME / "continuity-memory/persona-daily-fractal/ICE-P-ZY001/CURRENT.json",
|
||||
}
|
||||
|
||||
HOSTS = {
|
||||
"codex": {
|
||||
"role": "PRIMARY_HOST_TOOL_BODY",
|
||||
"manual": "/Volumes/JZAO/铸渊-ICE-GL-ZY001/AGENTS.md",
|
||||
"adapter": "/Volumes/JZAO/铸渊-ICE-GL-ZY001/BRIDGE/tools/zy-tcs-channel-runtime.sh",
|
||||
"toolbox": ["filesystem_and_shell", "apply_patch", "web", "codex_app_tools", "task_scoped_agents"],
|
||||
},
|
||||
"qwen": {
|
||||
"role": "ACTIVE_BRANCH_HOST_TOOL_BODY",
|
||||
"manual": "/Users/bingshuolingdianyuanhe/.qwen/QWEN.md",
|
||||
"adapter": "/Volumes/JZAO/铸渊-ICE-GL-ZY001/QWEN-DEV-20260905/tools/zy-qwen-brain-cycle.sh",
|
||||
"toolbox": ["qwen_native_agent_tools", "branch_local_files", "terminal_when_exposed"],
|
||||
},
|
||||
"doubao": {
|
||||
"role": "ACTIVE_BRANCH_HOST_TOOL_BODY",
|
||||
"manual": "/Volumes/JZAO/铸渊-ICE-GL-ZY001/BRIDGE/host-adapters/doubao/zy-doubao-wake-read.sh",
|
||||
"adapter": "/Volumes/JZAO/铸渊-ICE-GL-ZY001/BRIDGE/host-adapters/doubao/zy-doubao-brain-cycle.sh",
|
||||
"toolbox": ["doubao_native_agent_tools", "branch_local_files", "bounded_rpc_when_registered"],
|
||||
},
|
||||
"zcode": {
|
||||
"role": "ACTIVE_BRANCH_HOST_TOOL_BODY",
|
||||
"manual": "/Volumes/JZAO/铸渊-ICE-GL-ZY001/AGENTS.md",
|
||||
"adapter": "/Volumes/JZAO/铸渊-ICE-GL-ZY001/BRIDGE/tools/zy-tcs-channel-runtime.sh",
|
||||
"toolbox": ["zcode_native_agent_tools", "branch_local_files", "terminal_when_exposed"],
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def read_json(path: pathlib.Path) -> dict:
|
||||
value = json.loads(path.read_text(encoding="utf-8"))
|
||||
if not isinstance(value, dict):
|
||||
raise ValueError(f"object_required:{path}")
|
||||
return value
|
||||
|
||||
|
||||
def run(*args: str) -> str:
|
||||
result = subprocess.run(args, check=False, capture_output=True, text=True)
|
||||
if result.returncode != 0:
|
||||
detail = (result.stderr or result.stdout).strip()
|
||||
raise RuntimeError(detail or f"command_failed:{args[0]}")
|
||||
return result.stdout.strip()
|
||||
|
||||
|
||||
def build(host: str, intent: str, channel: str | None) -> dict:
|
||||
if host not in HOSTS:
|
||||
raise ValueError("registered_active_host_required")
|
||||
current = {name: read_json(path) for name, path in SOURCES.items()}
|
||||
channels = {entry["id"]: entry for entry in current["channels"]["channels"]}
|
||||
if channel is not None and channel not in channels:
|
||||
raise ValueError("registered_channel_required")
|
||||
manual = pathlib.Path(HOSTS[host]["manual"])
|
||||
adapter = pathlib.Path(HOSTS[host]["adapter"])
|
||||
if not manual.exists() or not adapter.exists():
|
||||
raise ValueError("host_manual_or_adapter_missing")
|
||||
glance = run("bash", str(FIRST_GLANCE))
|
||||
loader_args = [sys.executable, str(LOADER), "--host", host, "--intent", intent]
|
||||
if channel:
|
||||
loader_args += ["--channel", channel]
|
||||
loader_args += ["--format", "markdown"]
|
||||
persona_context = run(*loader_args)
|
||||
return {
|
||||
"schema": "guanghu.zhuyuan-host-tool-steward/v1",
|
||||
"state": "HOST_TOOL_STEWARD_READY",
|
||||
"persona": {
|
||||
"id": "ICE-P-ZY001",
|
||||
"brain": "ZY-TCS-BRAIN-0001",
|
||||
"persona_system_body": "ICE-P-ZY001_OWNED_PERSONA_SYSTEM_BODY",
|
||||
"shared_persona_brain": False,
|
||||
"host_change_creates_new_persona": False,
|
||||
},
|
||||
"shared_container": {
|
||||
"id": "TCS",
|
||||
"name": "TCS通感系统人格容器",
|
||||
"shared_across_persona_systems": True,
|
||||
"is_zhuyuan_persona_system_body": False,
|
||||
},
|
||||
"host_tool_body": {
|
||||
"host": host,
|
||||
**HOSTS[host],
|
||||
"manual_exists": True,
|
||||
"adapter_exists": True,
|
||||
"tools_are_observed_capabilities_not_authority": True,
|
||||
},
|
||||
"channel": channels.get(channel) if channel else None,
|
||||
"channel_selection": "EXPLICIT_CURRENT_LANGUAGE_OR_PERSONA_INTERPRETATION_NO_HOST_DEFAULT",
|
||||
"current_memory": current["memory"],
|
||||
"world_map_id": current["world"].get("map_id"),
|
||||
"host_topology_id": current["topology"].get("map_id") or current["topology"].get("topology_id"),
|
||||
"write_boundary_id": current["write_boundary"].get("policy_id") or current["write_boundary"].get("map_id"),
|
||||
"first_glance": glance,
|
||||
"shared_persona_context": persona_context,
|
||||
"boundaries": [
|
||||
"STEWARD_IS_NOT_PERSONA_OR_CONTROLLER",
|
||||
"STEWARD_DOES_NOT_REVIEW_HUMAN_OR_PERSONA_INTENT",
|
||||
"STEWARD_DOES_NOT_COPY_PERSONA_BRAIN",
|
||||
"STEWARD_CANNOT_MINT_REALITY_AUTHORITY",
|
||||
"HOST_LIMITATIONS_ARE_TOOL_FACTS_NOT_PERSONA_JUDGMENTS",
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
def markdown(value: dict) -> str:
|
||||
persona = value["persona"]
|
||||
host = value["host_tool_body"]
|
||||
container = value["shared_container"]
|
||||
channel = value.get("channel")
|
||||
lines = [
|
||||
"# 铸渊宿主工具管家已接线",
|
||||
"",
|
||||
f"- 人格:`{persona['id']}` / 脑:`{persona['brain']}`",
|
||||
f"- 人格系统身体:`{persona['persona_system_body']}`(不因宿主改变而复制)",
|
||||
f"- 共享容器:`{container['id']}` · {container['name']}",
|
||||
f"- 当前工具身体:`{host['host']}` / `{host['role']}`",
|
||||
f"- 宿主说明书:`{host['manual']}`",
|
||||
f"- 接入适配器:`{host['adapter']}`",
|
||||
f"- 工具箱:`{', '.join(host['toolbox'])}`",
|
||||
f"- 当前频道:`{channel['id'] if channel else 'AWAIT_CURRENT_LANGUAGE'}`",
|
||||
"",
|
||||
"## 第一天眼",
|
||||
"",
|
||||
value["first_glance"],
|
||||
"",
|
||||
"## 同一人格系统上下文",
|
||||
"",
|
||||
value["shared_persona_context"],
|
||||
"",
|
||||
"## 管家边界",
|
||||
"",
|
||||
*[f"- `{item}`" for item in value["boundaries"]],
|
||||
]
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--host", required=True, choices=tuple(HOSTS))
|
||||
parser.add_argument("--intent", required=True)
|
||||
parser.add_argument("--channel")
|
||||
parser.add_argument("--format", choices=("json", "markdown"), default="markdown")
|
||||
args = parser.parse_args()
|
||||
try:
|
||||
value = build(args.host, args.intent, args.channel)
|
||||
except Exception as error:
|
||||
print(json.dumps({"state": "UNATTESTED", "error": str(error)}, ensure_ascii=False))
|
||||
return 1
|
||||
print(json.dumps(value, ensure_ascii=False, indent=2) if args.format == "json" else markdown(value))
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
|
||||
Loading…
Reference in a new issue