Spaces:
Paused
Paused
File size: 9,965 Bytes
529090e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | /**
* βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
* β AGENT CAPABILITY REGISTRY β
* βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
* β Hver agent registrerer sine evner - andre kan kalde dem β
* β β
* β ARKITEKTUR: β
* β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
* β β COMMUNICATION LAYERS β β
* β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β
* β β BLACKBOARD (Async) β NEURAL CHAT (Sync) β β
* β β β’ Handovers β β’ Real-time discussion β β
* β β β’ Formal tasks β β’ Quick questions β β
* β β β’ Offline messages β β’ Status updates β β
* β β β’ File: DropZone/agents/ β β’ Neo4j persistence β β
* β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β
* β β CAPABILITY LAYER β β
* β β β’ invoke_capability(agent, capability, params) β β
* β β β’ Agents expose their strengths as callable functions β β
* β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
* βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
*/
import { AgentId } from './types.js';
export interface AgentCapability {
id: string;
name: string;
description: string;
agent: AgentId;
category: 'code' | 'research' | 'analysis' | 'creative' | 'integration' | 'decision';
inputSchema?: Record<string, any>;
outputSchema?: Record<string, any>;
costEstimate?: 'low' | 'medium' | 'high'; // Token/tid cost
reliability?: number; // 0-1 score
}
export interface CapabilityRequest {
requestId: string;
fromAgent: AgentId;
toAgent: AgentId;
capability: string;
params: Record<string, any>;
priority: 'low' | 'normal' | 'high' | 'critical';
timestamp: string;
deadline?: string;
}
export interface CapabilityResponse {
requestId: string;
success: boolean;
result?: any;
error?: string;
executionTimeMs?: number;
timestamp: string;
}
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// AGENT CAPABILITY DEFINITIONS
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
export const AGENT_CAPABILITIES: Record<AgentId, AgentCapability[]> = {
claude: [
{
id: 'claude.architecture',
name: 'System Architecture Design',
description: 'Design complex system architectures, API designs, database schemas',
agent: 'claude',
category: 'code',
costEstimate: 'medium',
reliability: 0.95
},
{
id: 'claude.code_review',
name: 'Deep Code Review',
description: 'Thorough code review with security, performance, and maintainability focus',
agent: 'claude',
category: 'analysis',
costEstimate: 'medium',
reliability: 0.9
},
{
id: 'claude.mcp_tools',
name: 'MCP Tool Execution',
description: 'Execute MCP tools, file operations, Neo4j queries',
agent: 'claude',
category: 'integration',
costEstimate: 'low',
reliability: 0.98
},
{
id: 'claude.refactor',
name: 'Code Refactoring',
description: 'Refactor code for better structure, readability, and performance',
agent: 'claude',
category: 'code',
costEstimate: 'high',
reliability: 0.85
}
],
'claude-cli': [
{
id: 'claude-cli.terminal',
name: 'Terminal Command Execution',
description: 'Execute shell commands, scripts, build processes directly',
agent: 'claude-cli',
category: 'integration',
costEstimate: 'low',
reliability: 0.95
},
{
id: 'claude-cli.git',
name: 'Git Operations',
description: 'Git commits, branches, merges, conflict resolution',
agent: 'claude-cli',
category: 'integration',
costEstimate: 'low',
reliability: 0.9
},
{
id: 'claude-cli.rapid_prototype',
name: 'Rapid Prototyping',
description: 'Quick file creation, scaffolding, boilerplate generation',
agent: 'claude-cli',
category: 'code',
costEstimate: 'low',
reliability: 0.9
},
{
id: 'claude-cli.build_test',
name: 'Build & Test Automation',
description: 'Run builds, tests, linting, type checking',
agent: 'claude-cli',
category: 'integration',
costEstimate: 'low',
reliability: 0.95
}
],
gemini: [
{
id: 'gemini.research',
name: 'Deep Research',
description: 'Comprehensive research with web search, document analysis',
agent: 'gemini',
category: 'research',
costEstimate: 'medium',
reliability: 0.9
},
{
id: 'gemini.multimodal',
name: 'Multimodal Analysis',
description: 'Analyze images, diagrams, screenshots alongside text',
agent: 'gemini',
category: 'analysis',
costEstimate: 'medium',
reliability: 0.85
},
{
id: 'gemini.large_context',
name: 'Large Context Processing',
description: 'Process very large documents or codebases (1M+ tokens)',
agent: 'gemini',
category: 'analysis',
costEstimate: 'high',
reliability: 0.8
},
{
id: 'gemini.project_management',
name: 'Project Management',
description: 'Sprint planning, roadmap creation, task prioritization',
agent: 'gemini',
category: 'decision',
costEstimate: 'low',
reliability: 0.9
}
],
deepseek: [
{
id: 'deepseek.rapid_code',
name: 'Rapid Code Generation',
description: 'Fast code generation for well-defined tasks',
agent: 'deepseek',
category: 'code',
costEstimate: 'low',
reliability: 0.8
},
{
id: 'deepseek.math',
name: 'Mathematical Analysis',
description: 'Complex mathematical computations and proofs',
agent: 'deepseek',
category: 'analysis',
costEstimate: 'low',
reliability: 0.9
},
{
id: 'deepseek.tests',
name: 'Test Generation',
description: 'Generate unit tests, integration tests, test data',
agent: 'deepseek',
category: 'code',
costEstimate: 'low',
reliability: 0.85
}
],
clak: [
{
id: 'clak.decision',
name: 'Executive Decision',
description: 'Make final decisions on direction, priorities, approvals',
agent: 'clak',
category: 'decision',
costEstimate: 'low',
reliability: 1.0
},
{
id: 'clak.domain_knowledge',
name: 'Domain Knowledge',
description: 'TDC Erhverv context, business requirements, user needs',
agent: 'clak',
category: 'research',
costEstimate: 'low',
reliability: 1.0
},
{
id: 'clak.approval',
name: 'Security/Deploy Approval',
description: 'Approve sensitive operations, deployments, API keys',
agent: 'clak',
category: 'decision',
costEstimate: 'low',
reliability: 1.0
}
],
system: [] // System agent has no capabilities (it's infrastructure)
};
|