mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 04:40:45 +08:00
完成运行时与启动链路的全面相对路径整改,统一以仓库根为路径基准并移除 oclaw 双层硬编码。
同时补齐路径回归测试与开源自检文档,确保从非仓库 cwd 启动时 workspace 根、配置和 wiki 路径仍稳定可用。 Made-with: Cursor
This commit is contained in:
parent
dbbe3add6a
commit
9d2900db02
40 changed files with 223 additions and 82 deletions
|
|
@ -12,18 +12,18 @@ def _read(rel: str) -> str:
|
|||
def test_no_legacy_inline_manager_prompts() -> None:
|
||||
# Manager orchestrator was removed; keep this test as a smoke-guard for any new inline
|
||||
# manager-style prompt leakage into the runtime entrypoints.
|
||||
content = _read("oclaw/runtime/gateway.py")
|
||||
content = _read("runtime/gateway.py")
|
||||
assert "【重要:只返回合法 JSON】" not in content
|
||||
assert "你是 AI 助手的路由(Routing)智能体" not in content
|
||||
|
||||
|
||||
def test_no_legacy_inline_specialist_prompts() -> None:
|
||||
content = _read("oclaw/runtime/agents/specialists.py")
|
||||
content = _read("runtime/agents/specialists.py")
|
||||
assert "【最高优先级执行规则(必须遵守)】" not in content
|
||||
assert "【职责范围】" not in content
|
||||
|
||||
|
||||
def test_no_legacy_inline_runtime_prompt() -> None:
|
||||
content = _read("oclaw/runtime/chat/agent.py")
|
||||
content = _read("runtime/chat/agent.py")
|
||||
assert "你是一个通用 AI 助手。" not in content
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue