feat(skills): enhance agent skills with additional tags and commands
Some checks failed
CI / build-and-test (push) Failing after -29m56s

- Added language_tags, library_tags, framework_tags, and domain_tags to agent skills.
- Introduced new commands: get_skill and get_guardrail for fetching specific skills and guardrails.
- Updated database schema and migration scripts to accommodate new fields.
- Enhanced skill listing functionality to support filtering by new tags.
- Improved error handling and response structures for skill-related operations.
This commit is contained in:
2026-05-05 09:24:58 +02:00
parent 1f671dad54
commit 1ceb317f4b
9 changed files with 364 additions and 67 deletions

View File

@@ -277,8 +277,12 @@ CREATE TABLE IF NOT EXISTS public.agent_skills (
content text NOT NULL,
created_at timestamptz NOT NULL DEFAULT now(),
description text NOT NULL DEFAULT '',
domain_tags text[] NOT NULL DEFAULT '{}',
framework_tags text[] NOT NULL DEFAULT '{}',
guid uuid NOT NULL DEFAULT gen_random_uuid(),
id bigserial NOT NULL,
language_tags text[] NOT NULL DEFAULT '{}',
library_tags text[] NOT NULL DEFAULT '{}',
name text NOT NULL,
tags text[] NOT NULL DEFAULT '{}',
updated_at timestamptz NOT NULL DEFAULT now()
@@ -1793,6 +1797,32 @@ BEGIN
END;
$$;
DO $$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = 'agent_skills'
AND column_name = 'domain_tags'
) THEN
ALTER TABLE public.agent_skills ADD COLUMN domain_tags text[] NOT NULL DEFAULT '{}';
END IF;
END;
$$;
DO $$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = 'agent_skills'
AND column_name = 'framework_tags'
) THEN
ALTER TABLE public.agent_skills ADD COLUMN framework_tags text[] NOT NULL DEFAULT '{}';
END IF;
END;
$$;
DO $$
BEGIN
IF NOT EXISTS (
@@ -1819,6 +1849,32 @@ BEGIN
END;
$$;
DO $$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = 'agent_skills'
AND column_name = 'language_tags'
) THEN
ALTER TABLE public.agent_skills ADD COLUMN language_tags text[] NOT NULL DEFAULT '{}';
END IF;
END;
$$;
DO $$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = 'agent_skills'
AND column_name = 'library_tags'
) THEN
ALTER TABLE public.agent_skills ADD COLUMN library_tags text[] NOT NULL DEFAULT '{}';
END IF;
END;
$$;
DO $$
BEGIN
IF NOT EXISTS (