chore(deploy): 测试环境口径固化——seed-dev 写工具绑测试专用 scope,AGENTS 补测试先行流程

This commit is contained in:
my_local_kimi_dev2
2026-11-07 22:04:40 +08:00
parent ddb5e74745
commit cb4019b78c
2 changed files with 12 additions and 0 deletions
+7
View File
@@ -100,6 +100,13 @@ SELECT s.id, t.id, 0 FROM agent_scope s JOIN tool t
WHERE s.id = 1 AND t.name = 'agent.user.list.query'
AND NOT EXISTS (SELECT 1 FROM scope_tool st WHERE st.scope_id = s.id AND st.tool_id = t.id);
-- 写工具(kind=write):dev 只绑「测试专用」(code='test'),对应 prod 口径"研发专用 scope",
-- 冒烟在测试环境用 code='test' 签用户 Token 即可。
INSERT INTO scope_tool (scope_id, tool_id, create_id)
SELECT s.id, t.id, 0 FROM agent_scope s JOIN tool t
WHERE s.code = 'test' AND t.kind = 'write'
AND NOT EXISTS (SELECT 1 FROM scope_tool st WHERE st.scope_id = s.id AND st.tool_id = t.id);
COMMIT;
-- 校验