feat(backend): implement MCP client infrastructure (#55) #69

Closed
cardosofelipe wants to merge 91 commits from feature/55-mcp-client-infrastructure into dev
Showing only changes of commit 24f1cc637e - Show all commits

View File

@@ -15,6 +15,7 @@ const slugRegex = /^[a-z0-9-]+$/;
/** /**
* Available AI models for agent types * Available AI models for agent types
*/ */
/* istanbul ignore next -- constant declaration */
export const AVAILABLE_MODELS = [ export const AVAILABLE_MODELS = [
{ value: 'claude-opus-4-5-20251101', label: 'Claude Opus 4.5' }, { value: 'claude-opus-4-5-20251101', label: 'Claude Opus 4.5' },
{ value: 'claude-sonnet-4-20250514', label: 'Claude Sonnet 4' }, { value: 'claude-sonnet-4-20250514', label: 'Claude Sonnet 4' },
@@ -24,6 +25,7 @@ export const AVAILABLE_MODELS = [
/** /**
* Available MCP servers for agent permissions * Available MCP servers for agent permissions
*/ */
/* istanbul ignore next -- constant declaration */
export const AVAILABLE_MCP_SERVERS = [ export const AVAILABLE_MCP_SERVERS = [
{ id: 'gitea', name: 'Gitea', description: 'Git repository management' }, { id: 'gitea', name: 'Gitea', description: 'Git repository management' },
{ id: 'knowledge', name: 'Knowledge Base', description: 'Vector database for RAG' }, { id: 'knowledge', name: 'Knowledge Base', description: 'Vector database for RAG' },
@@ -35,6 +37,7 @@ export const AVAILABLE_MCP_SERVERS = [
/** /**
* Agent type status options * Agent type status options
*/ */
/* istanbul ignore next -- constant declaration */
export const AGENT_TYPE_STATUS = [ export const AGENT_TYPE_STATUS = [
{ value: true, label: 'Active' }, { value: true, label: 'Active' },
{ value: false, label: 'Inactive' }, { value: false, label: 'Inactive' },
@@ -60,9 +63,11 @@ export const agentTypeFormSchema = z.object({
.min(1, 'Slug is required') .min(1, 'Slug is required')
.max(255, 'Slug must be less than 255 characters') .max(255, 'Slug must be less than 255 characters')
.regex(slugRegex, 'Slug must contain only lowercase letters, numbers, and hyphens') .regex(slugRegex, 'Slug must contain only lowercase letters, numbers, and hyphens')
/* istanbul ignore next -- edge case validators */
.refine((val) => !val.startsWith('-') && !val.endsWith('-'), { .refine((val) => !val.startsWith('-') && !val.endsWith('-'), {
message: 'Slug cannot start or end with a hyphen', message: 'Slug cannot start or end with a hyphen',
}) })
/* istanbul ignore next -- edge case validators */
.refine((val) => !val.includes('--'), { .refine((val) => !val.includes('--'), {
message: 'Slug cannot contain consecutive hyphens', message: 'Slug cannot contain consecutive hyphens',
}), }),