feat: add agent skills and guardrails functionality

- Introduced new tools for managing agent skills and guardrails, including add, remove, and list operations.
- Updated README.md to document new commands and usage patterns for skills and guardrails.
- Enhanced server configuration to support longer read and write timeouts.
- Increased maximum upload size for files to 100 MB and adjusted related configurations.
- Created database migrations for agent skills, guardrails, and their associations with projects.
- Updated relevant code files to integrate new skills and guardrails into the application logic.
This commit is contained in:
2026-03-30 23:35:54 +02:00
parent e6f00ce636
commit 3c1ca83dc9
14 changed files with 862 additions and 14 deletions

View File

@@ -0,0 +1,39 @@
create table if not exists agent_skills (
id uuid primary key default gen_random_uuid(),
name text not null,
description text not null default '',
content text not null,
tags text[] not null default '{}',
created_at timestamptz not null default now(),
updated_at timestamptz not null default now(),
constraint agent_skills_name_unique unique (name)
);
create table if not exists agent_guardrails (
id uuid primary key default gen_random_uuid(),
name text not null,
description text not null default '',
content text not null,
severity text not null default 'medium' check (severity in ('low', 'medium', 'high', 'critical')),
tags text[] not null default '{}',
created_at timestamptz not null default now(),
updated_at timestamptz not null default now(),
constraint agent_guardrails_name_unique unique (name)
);
create table if not exists project_skills (
project_id uuid not null references projects(guid) on delete cascade,
skill_id uuid not null references agent_skills(id) on delete cascade,
created_at timestamptz not null default now(),
primary key (project_id, skill_id)
);
create table if not exists project_guardrails (
project_id uuid not null references projects(guid) on delete cascade,
guardrail_id uuid not null references agent_guardrails(id) on delete cascade,
created_at timestamptz not null default now(),
primary key (project_id, guardrail_id)
);
create index if not exists project_skills_project_id_idx on project_skills (project_id);
create index if not exists project_guardrails_project_id_idx on project_guardrails (project_id);

View File

@@ -28,4 +28,11 @@ GRANT ALL ON TABLE public.professional_contacts TO amcs;
GRANT ALL ON TABLE public.contact_interactions TO amcs;
GRANT ALL ON TABLE public.opportunities TO amcs;
GRANT ALL ON TABLE public.stored_files TO amcs;
GRANT ALL ON TABLE public.agent_guardrails TO amcs;
GRANT ALL ON TABLE public.agent_skills TO amcs;
GRANT ALL ON TABLE public.project_skills TO amcs;
GRANT ALL ON TABLE public.project_guardrails TO amcs;
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO amcs;