修复 Admin Skills 安装区块不显示,并支持卸载 _workspace/public lane。

同时补齐 _workspace/public 目录约定、公共技能免绑定规则,并为 run_command 增加默认禁用开关与回归测试。

Made-with: Cursor
This commit is contained in:
oliver 2026-05-01 03:34:32 +08:00
parent da2413afad
commit 5d67303d22
11 changed files with 118 additions and 5 deletions

View file

@ -240,6 +240,11 @@ class AdminSkillsApiTests(unittest.TestCase):
self.assertFalse(bool(result2.get("ok")))
self.assertIn(str(result2.get("error_code") or ""), {"path_restricted", "runtime_error"})
# Uninstall should be able to remove workspace lane skills.
u = self.client.post("/admin/api/skills/uninstall", json={"name": "ws_demo_skill"}, headers=self._h())
self.assertEqual(u.status_code, 200, u.text)
self.assertTrue((u.json() or {}).get("ok"))
def test_skills_self_check_endpoint(self) -> None:
c = self.client.post(
"/admin/api/skills/create-workspace",