重构仓库目录为统一的 runtime 分层并清理历史 openclaw 残留。

本次迁移将网关/通道/工具/技能/脚本与协议资源集中到新结构,统一路径常量与脚本转发机制,减少顶层噪音并保证运行与测试行为一致。

Made-with: Cursor
This commit is contained in:
oliver 2026-04-25 01:24:23 +08:00
parent ba3836f00f
commit 4a23b715a2
498 changed files with 2760 additions and 2200 deletions

View file

@ -2,7 +2,7 @@ from __future__ import annotations
import pytest
from oclaw.prompts.loader import load_openclaw_prompt_doc, load_prompt_doc, render_openclaw_prompt, render_prompt
from oclaw.prompts.loader import load_runtime_prompt_doc, load_prompt_doc, render_runtime_prompt, render_prompt
def test_load_prompt_doc_with_frontmatter() -> None:
@ -26,14 +26,14 @@ def test_render_prompt_success() -> None:
assert "ok=true" in out
def test_load_openclaw_prompt_doc_with_frontmatter() -> None:
doc = load_openclaw_prompt_doc("roles/specialists/ops/system.md")
def test_load_runtime_prompt_doc_with_frontmatter() -> None:
doc = load_runtime_prompt_doc("roles/specialists/ops/system.md")
assert doc.frontmatter.get("title") == "oclaw_role_specialist_ops_system"
assert "你是网络运维专家" in doc.body
def test_render_openclaw_prompt_success() -> None:
out = render_openclaw_prompt(
def test_render_runtime_prompt_success() -> None:
out = render_runtime_prompt(
"runtime/project_context_block.md",
variables={"project_context": "[AGENTS.md]\nfoo"},
strict=True,