feat(agent): add asset management tools and CLI commands (#387)

* feat(agent): add asset management tools and CLI commands

* fix(core): resolve code review findings for reparenting cycles, agent deniedTools update, and CLI folder delete
This commit is contained in:
Yiling-J
2026-09-06 17:15:58 +08:00
committed by GitHub
parent b087bf73ae
commit 8c1e59d131
28 changed files with 1300 additions and 10 deletions
@@ -0,0 +1,15 @@
-- Append 'delete_asset' to deniedTools of existing agents if not already present
UPDATE "agents"
SET "config" = jsonb_set(
"config"::jsonb,
'{deniedTools}',
CASE
WHEN "config"::jsonb ? 'deniedTools' AND jsonb_typeof("config"::jsonb->'deniedTools') = 'array' THEN
CASE
WHEN "config"::jsonb->'deniedTools' @> '["delete_asset"]'::jsonb THEN "config"::jsonb->'deniedTools'
ELSE ("config"::jsonb->'deniedTools') || '["delete_asset"]'::jsonb
END
ELSE
'["delete_asset"]'::jsonb
END
);