ACP / MCP

This commit is contained in:
2026-06-12 11:44:19 +08:00
parent 2a9661a6ef
commit 4ea4adfd8e
47 changed files with 2558 additions and 240 deletions
@@ -0,0 +1,19 @@
-- name: ListAgentKindConfigFiles :many
SELECT id, agent_kind_id, rel_path, encrypted_content, updated_by, created_at, updated_at
FROM acp_agent_kind_config_files
WHERE agent_kind_id = $1
ORDER BY rel_path ASC;
-- name: UpsertAgentKindConfigFile :one
INSERT INTO acp_agent_kind_config_files (
id, agent_kind_id, rel_path, encrypted_content, updated_by
) VALUES ($1, $2, $3, $4, $5)
ON CONFLICT (agent_kind_id, rel_path) DO UPDATE
SET encrypted_content = EXCLUDED.encrypted_content,
updated_by = EXCLUDED.updated_by,
updated_at = now()
RETURNING id, agent_kind_id, rel_path, encrypted_content, updated_by, created_at, updated_at;
-- name: DeleteAgentKindConfigFile :execrows
DELETE FROM acp_agent_kind_config_files
WHERE agent_kind_id = $1 AND rel_path = $2;