mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-12 01:50:49 +08:00
修复 Admin Skills 安装区块不显示,并支持卸载 _workspace/public lane。
同时补齐 _workspace/public 目录约定、公共技能免绑定规则,并为 run_command 增加默认禁用开关与回归测试。 Made-with: Cursor
This commit is contained in:
parent
da2413afad
commit
5d67303d22
11 changed files with 118 additions and 5 deletions
|
|
@ -17,6 +17,7 @@ def test_build_gateway_executor_defaults_to_generalist(tmp_path: Path) -> None:
|
|||
|
||||
def test_build_gateway_executor_generalist_run_command_is_disabled_by_default(tmp_path: Path) -> None:
|
||||
os.environ.pop("AIA_ENABLE_RUN_COMMAND", None)
|
||||
os.environ["AIA_PUBLIC_TOOLS_ALLOW_HIGH"] = "1"
|
||||
os.environ["OPS_ASSISTANT_DB_PATH"] = str(tmp_path / "ops.sqlite")
|
||||
try:
|
||||
store = SqliteStore(str(tmp_path / "ops.sqlite"))
|
||||
|
|
@ -28,11 +29,13 @@ def test_build_gateway_executor_generalist_run_command_is_disabled_by_default(tm
|
|||
assert out.get("ok") is False
|
||||
assert out.get("error") == "disabled"
|
||||
finally:
|
||||
os.environ.pop("AIA_PUBLIC_TOOLS_ALLOW_HIGH", None)
|
||||
os.environ.pop("OPS_ASSISTANT_DB_PATH", None)
|
||||
|
||||
|
||||
def test_build_gateway_executor_generalist_run_command_prefers_db_setting(tmp_path: Path) -> None:
|
||||
os.environ["AIA_ENABLE_RUN_COMMAND"] = "0"
|
||||
os.environ["AIA_PUBLIC_TOOLS_ALLOW_HIGH"] = "1"
|
||||
os.environ["OPS_ASSISTANT_DB_PATH"] = str(tmp_path / "ops.sqlite")
|
||||
try:
|
||||
store = SqliteStore(str(tmp_path / "ops.sqlite"))
|
||||
|
|
@ -45,5 +48,6 @@ def test_build_gateway_executor_generalist_run_command_prefers_db_setting(tmp_pa
|
|||
assert out.get("ok") is True
|
||||
finally:
|
||||
os.environ.pop("AIA_ENABLE_RUN_COMMAND", None)
|
||||
os.environ.pop("AIA_PUBLIC_TOOLS_ALLOW_HIGH", None)
|
||||
os.environ.pop("OPS_ASSISTANT_DB_PATH", None)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue