ai-agent-command-center 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +20 -0
- package/LICENSE +21 -0
- package/README.md +402 -2
- package/bin/ai-center.js +183 -0
- package/client/dist/assets/index-BRl_ORtB.css +1 -0
- package/client/dist/assets/index-CLhAmxoi.js +4444 -0
- package/client/dist/icon-192.png +0 -0
- package/client/dist/icon-512.png +0 -0
- package/client/dist/icon.svg +43 -0
- package/client/dist/index.html +31 -0
- package/client/dist/manifest.webmanifest +30 -0
- package/client/dist/sw.js +75 -0
- package/package.json +66 -4
- package/server/.env.example +9 -0
- package/server/dist/server/src/adapters/base.js +4 -0
- package/server/dist/server/src/adapters/customApi.js +353 -0
- package/server/dist/server/src/adapters/hermes.js +82 -0
- package/server/dist/server/src/adapters/preset.js +221 -0
- package/server/dist/server/src/adapters/router.js +32 -0
- package/server/dist/server/src/config/index.js +9 -0
- package/server/dist/server/src/db/index.js +180 -0
- package/server/dist/server/src/db/schemaSql.js +522 -0
- package/server/dist/server/src/index.js +241 -0
- package/server/dist/server/src/middleware/rateLimiter.js +76 -0
- package/server/dist/server/src/middleware/securityHeaders.js +21 -0
- package/server/dist/server/src/routes/actions.js +79 -0
- package/server/dist/server/src/routes/activities.js +35 -0
- package/server/dist/server/src/routes/agents.js +354 -0
- package/server/dist/server/src/routes/alerts.js +174 -0
- package/server/dist/server/src/routes/auth.js +138 -0
- package/server/dist/server/src/routes/dashboard.js +41 -0
- package/server/dist/server/src/routes/dataAnalyst.js +90 -0
- package/server/dist/server/src/routes/documents.js +242 -0
- package/server/dist/server/src/routes/domain.js +58 -0
- package/server/dist/server/src/routes/evals.js +56 -0
- package/server/dist/server/src/routes/mcp.js +160 -0
- package/server/dist/server/src/routes/memoryGraph.js +91 -0
- package/server/dist/server/src/routes/monitoring.js +41 -0
- package/server/dist/server/src/routes/notifications.js +88 -0
- package/server/dist/server/src/routes/orchestrator.js +54 -0
- package/server/dist/server/src/routes/pipeline.js +261 -0
- package/server/dist/server/src/routes/playground.js +91 -0
- package/server/dist/server/src/routes/projects.js +183 -0
- package/server/dist/server/src/routes/providers.js +403 -0
- package/server/dist/server/src/routes/rag.js +118 -0
- package/server/dist/server/src/routes/reports.js +123 -0
- package/server/dist/server/src/routes/schedules.js +165 -0
- package/server/dist/server/src/routes/skills.js +102 -0
- package/server/dist/server/src/routes/sre.js +84 -0
- package/server/dist/server/src/routes/swarm.js +165 -0
- package/server/dist/server/src/routes/system.js +199 -0
- package/server/dist/server/src/routes/tasks.js +314 -0
- package/server/dist/server/src/routes/warRooms.js +113 -0
- package/server/dist/server/src/routes/webResearch.js +60 -0
- package/server/dist/server/src/routes/webhooks.js +102 -0
- package/server/dist/server/src/routes/workflows.js +168 -0
- package/server/dist/server/src/services/actionManager.js +246 -0
- package/server/dist/server/src/services/alertingService.js +289 -0
- package/server/dist/server/src/services/dataAnalystService.js +463 -0
- package/server/dist/server/src/services/documentParserService.js +205 -0
- package/server/dist/server/src/services/domainManagerService.js +286 -0
- package/server/dist/server/src/services/embedding.js +178 -0
- package/server/dist/server/src/services/evalService.js +359 -0
- package/server/dist/server/src/services/logger.js +61 -0
- package/server/dist/server/src/services/mcpClientService.js +518 -0
- package/server/dist/server/src/services/memoryGraphService.js +545 -0
- package/server/dist/server/src/services/monitoring.js +90 -0
- package/server/dist/server/src/services/orchestrator.js +463 -0
- package/server/dist/server/src/services/ragService.js +308 -0
- package/server/dist/server/src/services/realtime.js +74 -0
- package/server/dist/server/src/services/sandbox.js +673 -0
- package/server/dist/server/src/services/schedulerService.js +548 -0
- package/server/dist/server/src/services/skillStudioService.js +366 -0
- package/server/dist/server/src/services/sreAgentService.js +405 -0
- package/server/dist/server/src/services/swarmArtifactService.js +258 -0
- package/server/dist/server/src/services/swarmService.js +623 -0
- package/server/dist/server/src/services/warRoomService.js +461 -0
- package/server/dist/server/src/services/webResearchService.js +295 -0
- package/server/dist/server/src/services/workflowEngine.js +611 -0
- package/server/dist/server/src/utils/auth.js +33 -0
- package/server/dist/server/src/utils/crypto.js +55 -0
- package/server/dist/server/src/utils/ssrf.js +112 -0
- package/server/dist/shared/constants.js +113 -0
- package/server/dist/shared/types.js +5 -0
- package/shared/constants.ts +129 -0
- package/shared/types.ts +1360 -0
package/shared/types.ts
ADDED
|
@@ -0,0 +1,1360 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified Shared Types & Contracts — AI Agent Command Center
|
|
3
|
+
* Sesuai spesifikasi Rancangan_Arsitektur_AI_Command_Center_Antigravity.md
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export type ProtocolType = 'openai' | 'anthropic' | 'gemini' | 'ollama' | 'hermes_runtime';
|
|
7
|
+
|
|
8
|
+
export type ProviderType =
|
|
9
|
+
| 'custom_api'
|
|
10
|
+
| 'routex_local'
|
|
11
|
+
| 'openai'
|
|
12
|
+
| 'anthropic'
|
|
13
|
+
| 'gemini'
|
|
14
|
+
| 'groq'
|
|
15
|
+
| 'ollama'
|
|
16
|
+
| 'hermes';
|
|
17
|
+
|
|
18
|
+
export type ConnectionStatus =
|
|
19
|
+
| 'NOT_CONFIGURED'
|
|
20
|
+
| 'CONNECTION_OK'
|
|
21
|
+
| 'CONNECTION_FAILED'
|
|
22
|
+
| 'MODEL_VERIFIED'
|
|
23
|
+
| 'UNAVAILABLE';
|
|
24
|
+
|
|
25
|
+
export type AgentStatus =
|
|
26
|
+
| 'READY'
|
|
27
|
+
| 'IDLE'
|
|
28
|
+
| 'BUSY'
|
|
29
|
+
| 'UNAVAILABLE'
|
|
30
|
+
| 'DISABLED';
|
|
31
|
+
|
|
32
|
+
export type AgentRole =
|
|
33
|
+
| 'Orchestrator'
|
|
34
|
+
| 'Planner'
|
|
35
|
+
| 'Executor'
|
|
36
|
+
| 'QA / Reviewer'
|
|
37
|
+
| 'DevOps'
|
|
38
|
+
| 'Domain Specialist';
|
|
39
|
+
|
|
40
|
+
export type RunStatus =
|
|
41
|
+
| 'QUEUED'
|
|
42
|
+
| 'RUNNING'
|
|
43
|
+
| 'WAITING'
|
|
44
|
+
| 'SUCCEEDED'
|
|
45
|
+
| 'FAILED'
|
|
46
|
+
| 'CANCELLED';
|
|
47
|
+
|
|
48
|
+
export type TaskStatus =
|
|
49
|
+
| 'TODO'
|
|
50
|
+
| 'IN_PROGRESS'
|
|
51
|
+
| 'IN_REVIEW'
|
|
52
|
+
| 'DONE'
|
|
53
|
+
| 'CANCELLED';
|
|
54
|
+
|
|
55
|
+
export type TaskPriority = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
|
56
|
+
|
|
57
|
+
export interface ModelProviderConfig {
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
providerType: ProviderType;
|
|
61
|
+
baseUrl: string;
|
|
62
|
+
protocol: ProtocolType;
|
|
63
|
+
apiKeyMasked?: string;
|
|
64
|
+
enabled: boolean;
|
|
65
|
+
connectionStatus: ConnectionStatus;
|
|
66
|
+
lastCheckedAt?: string;
|
|
67
|
+
errorMessage?: string;
|
|
68
|
+
createdAt: string;
|
|
69
|
+
updatedAt: string;
|
|
70
|
+
agentCount?: number;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface AIAgent {
|
|
74
|
+
id: string;
|
|
75
|
+
workspaceId: string;
|
|
76
|
+
name: string;
|
|
77
|
+
role: AgentRole;
|
|
78
|
+
description: string;
|
|
79
|
+
systemPrompt: string;
|
|
80
|
+
providerId: string;
|
|
81
|
+
modelId: string;
|
|
82
|
+
capabilities: string[];
|
|
83
|
+
parameters: {
|
|
84
|
+
temperature?: number;
|
|
85
|
+
maxTokens?: number;
|
|
86
|
+
topP?: number;
|
|
87
|
+
};
|
|
88
|
+
enabled: boolean;
|
|
89
|
+
status: AgentStatus;
|
|
90
|
+
lastRunAt?: string;
|
|
91
|
+
createdAt: string;
|
|
92
|
+
updatedAt: string;
|
|
93
|
+
// Joined provider metadata for UI display
|
|
94
|
+
providerName?: string;
|
|
95
|
+
providerType?: ProviderType;
|
|
96
|
+
// Computed productivity & execution statistics
|
|
97
|
+
totalTasks?: number;
|
|
98
|
+
completedTasks?: number;
|
|
99
|
+
totalRuns?: number;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface AgentRun {
|
|
103
|
+
id: string;
|
|
104
|
+
agentId: string;
|
|
105
|
+
taskId?: string;
|
|
106
|
+
modelId: string;
|
|
107
|
+
status: RunStatus;
|
|
108
|
+
inputPrompt: string;
|
|
109
|
+
outputResult?: string;
|
|
110
|
+
errorCode?: string;
|
|
111
|
+
errorMessage?: string;
|
|
112
|
+
durationMs?: number;
|
|
113
|
+
tokensUsed?: {
|
|
114
|
+
promptTokens: number;
|
|
115
|
+
completionTokens: number;
|
|
116
|
+
totalTokens: number;
|
|
117
|
+
};
|
|
118
|
+
startedAt?: string;
|
|
119
|
+
finishedAt?: string;
|
|
120
|
+
createdAt: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface Task {
|
|
124
|
+
id: string;
|
|
125
|
+
workspaceId: string;
|
|
126
|
+
projectId?: string;
|
|
127
|
+
title: string;
|
|
128
|
+
description?: string;
|
|
129
|
+
status: TaskStatus;
|
|
130
|
+
priority: TaskPriority;
|
|
131
|
+
assignedAgentId?: string;
|
|
132
|
+
assignedAgentName?: string;
|
|
133
|
+
dueDate?: string;
|
|
134
|
+
createdAt: string;
|
|
135
|
+
updatedAt: string;
|
|
136
|
+
completedAt?: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface Project {
|
|
140
|
+
id: string;
|
|
141
|
+
workspaceId: string;
|
|
142
|
+
name: string;
|
|
143
|
+
description?: string;
|
|
144
|
+
status: 'PLANNING' | 'ACTIVE' | 'COMPLETED' | 'ON_HOLD';
|
|
145
|
+
progressPercentage: number;
|
|
146
|
+
dueDate?: string;
|
|
147
|
+
createdAt: string;
|
|
148
|
+
updatedAt: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface Activity {
|
|
152
|
+
id: string;
|
|
153
|
+
workspaceId: string;
|
|
154
|
+
actorType: 'AGENT' | 'USER' | 'SYSTEM';
|
|
155
|
+
actorId?: string;
|
|
156
|
+
actorName: string;
|
|
157
|
+
eventType: string;
|
|
158
|
+
summary: string;
|
|
159
|
+
targetType?: string;
|
|
160
|
+
targetId?: string;
|
|
161
|
+
createdAt: string;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export interface ServerMetrics {
|
|
165
|
+
cpuUsagePercent: number;
|
|
166
|
+
cpuCores: number;
|
|
167
|
+
memoryTotalBytes: number;
|
|
168
|
+
memoryUsedBytes: number;
|
|
169
|
+
memoryFreeBytes: number;
|
|
170
|
+
memoryUsagePercent: number;
|
|
171
|
+
diskTotalBytes: number;
|
|
172
|
+
diskUsedBytes: number;
|
|
173
|
+
diskUsagePercent: number;
|
|
174
|
+
loadAvg: [number, number, number];
|
|
175
|
+
uptimeSeconds: number;
|
|
176
|
+
observedAt: string;
|
|
177
|
+
status: 'NORMAL' | 'WARNING' | 'CRITICAL';
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface DashboardSummary {
|
|
181
|
+
runningTasksCount: number;
|
|
182
|
+
completedTasksCount: number;
|
|
183
|
+
onlineAgentsCount: number;
|
|
184
|
+
totalAgentsCount: number;
|
|
185
|
+
activeProjectsCount: number;
|
|
186
|
+
systemStatus: 'OPERATIONAL' | 'DEGRADED' | 'MAINTENANCE';
|
|
187
|
+
serverMetrics: ServerMetrics;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Request & Response DTOs
|
|
191
|
+
export interface TestConnectionRequest {
|
|
192
|
+
providerType: ProviderType;
|
|
193
|
+
baseUrl: string;
|
|
194
|
+
protocol: ProtocolType;
|
|
195
|
+
apiKey?: string;
|
|
196
|
+
existingProviderId?: string;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface TestConnectionResponse {
|
|
200
|
+
success: boolean;
|
|
201
|
+
status: ConnectionStatus;
|
|
202
|
+
message: string;
|
|
203
|
+
discoveredModels?: string[];
|
|
204
|
+
latencyMs?: number;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface CreateProviderRequest {
|
|
208
|
+
name: string;
|
|
209
|
+
providerType: ProviderType;
|
|
210
|
+
baseUrl: string;
|
|
211
|
+
protocol?: ProtocolType;
|
|
212
|
+
apiKey?: string;
|
|
213
|
+
enabled?: boolean;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export interface UpdateProviderRequest {
|
|
217
|
+
name?: string;
|
|
218
|
+
providerType?: ProviderType;
|
|
219
|
+
baseUrl?: string;
|
|
220
|
+
protocol?: ProtocolType;
|
|
221
|
+
apiKey?: string;
|
|
222
|
+
enabled?: boolean;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export interface CreateAgentRequest {
|
|
226
|
+
name: string;
|
|
227
|
+
role: AgentRole;
|
|
228
|
+
description: string;
|
|
229
|
+
systemPrompt: string;
|
|
230
|
+
providerMode: 'existing' | 'new_custom' | 'new_preset' | 'hermes_runtime';
|
|
231
|
+
providerId?: string;
|
|
232
|
+
newProvider?: {
|
|
233
|
+
name: string;
|
|
234
|
+
providerType: ProviderType;
|
|
235
|
+
baseUrl: string;
|
|
236
|
+
protocol: ProtocolType;
|
|
237
|
+
apiKey?: string;
|
|
238
|
+
};
|
|
239
|
+
modelId: string;
|
|
240
|
+
capabilities?: string[];
|
|
241
|
+
parameters?: {
|
|
242
|
+
temperature?: number;
|
|
243
|
+
maxTokens?: number;
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface ExecuteAgentRunRequest {
|
|
248
|
+
agentId: string;
|
|
249
|
+
taskId?: string;
|
|
250
|
+
prompt: string;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export type DocumentCategory = 'SOP' | 'SPEC' | 'PROMPT_TEMPLATE' | 'ARCHITECTURE' | 'NOTE' | 'RESEARCH';
|
|
254
|
+
|
|
255
|
+
export interface DocumentItem {
|
|
256
|
+
id: string;
|
|
257
|
+
workspaceId: string;
|
|
258
|
+
projectId?: string;
|
|
259
|
+
title: string;
|
|
260
|
+
content: string;
|
|
261
|
+
category: DocumentCategory;
|
|
262
|
+
tags: string[];
|
|
263
|
+
createdAt: string;
|
|
264
|
+
updatedAt: string;
|
|
265
|
+
chunkCount?: number;
|
|
266
|
+
isIndexed?: boolean;
|
|
267
|
+
fileMetadata?: {
|
|
268
|
+
originalFileName?: string;
|
|
269
|
+
fileType?: string;
|
|
270
|
+
fileSize?: number;
|
|
271
|
+
rowCount?: number;
|
|
272
|
+
parsedFormat?: string;
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export interface CreateDocumentRequest {
|
|
277
|
+
title: string;
|
|
278
|
+
content: string;
|
|
279
|
+
category: DocumentCategory;
|
|
280
|
+
tags?: string[];
|
|
281
|
+
projectId?: string;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export interface UploadDocumentRequest {
|
|
285
|
+
fileName: string;
|
|
286
|
+
fileType: string;
|
|
287
|
+
fileContentBase64: string;
|
|
288
|
+
category?: DocumentCategory;
|
|
289
|
+
tags?: string[];
|
|
290
|
+
projectId?: string;
|
|
291
|
+
workspaceId?: string;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
export type NotificationType = 'INFO' | 'SUCCESS' | 'WARNING' | 'ERROR';
|
|
296
|
+
|
|
297
|
+
export interface NotificationItem {
|
|
298
|
+
id: string;
|
|
299
|
+
workspaceId: string;
|
|
300
|
+
title: string;
|
|
301
|
+
message: string;
|
|
302
|
+
type: NotificationType;
|
|
303
|
+
isRead: boolean;
|
|
304
|
+
targetType?: string;
|
|
305
|
+
targetId?: string;
|
|
306
|
+
createdAt: string;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export interface AgentMetric {
|
|
310
|
+
agentId: string;
|
|
311
|
+
agentName: string;
|
|
312
|
+
role: string;
|
|
313
|
+
totalRuns: number;
|
|
314
|
+
successCount: number;
|
|
315
|
+
failureCount: number;
|
|
316
|
+
avgDurationMs: number;
|
|
317
|
+
totalTokens: number;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export interface ModelMetric {
|
|
321
|
+
modelId: string;
|
|
322
|
+
totalRuns: number;
|
|
323
|
+
totalPromptTokens: number;
|
|
324
|
+
totalCompletionTokens: number;
|
|
325
|
+
totalTokens: number;
|
|
326
|
+
avgDurationMs: number;
|
|
327
|
+
estimatedCostUsd: number;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
export interface FinOpsReportsSummary {
|
|
331
|
+
periodDays: number;
|
|
332
|
+
totalRuns: number;
|
|
333
|
+
successfulRuns: number;
|
|
334
|
+
failedRuns: number;
|
|
335
|
+
successRatePercent: number;
|
|
336
|
+
totalPromptTokens: number;
|
|
337
|
+
totalCompletionTokens: number;
|
|
338
|
+
totalTokens: number;
|
|
339
|
+
estimatedTotalCostUsd: number;
|
|
340
|
+
averageLatencyMs: number;
|
|
341
|
+
agentMetrics: AgentMetric[];
|
|
342
|
+
modelMetrics: ModelMetric[];
|
|
343
|
+
dailyUsage: {
|
|
344
|
+
date: string;
|
|
345
|
+
runs: number;
|
|
346
|
+
tokens: number;
|
|
347
|
+
}[];
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export interface OrchestratorStatus {
|
|
351
|
+
enabled: boolean;
|
|
352
|
+
isRunning: boolean;
|
|
353
|
+
intervalSeconds: number;
|
|
354
|
+
activeTasksCount: number;
|
|
355
|
+
completedTasksToday: number;
|
|
356
|
+
lastTickAt: string | null;
|
|
357
|
+
lastDispatchedTaskId?: string;
|
|
358
|
+
lastDispatchedAgentName?: string;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export interface OrchestratorConfig {
|
|
362
|
+
enabled: boolean;
|
|
363
|
+
intervalSeconds?: number;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export interface SystemLogEntry {
|
|
367
|
+
id: string;
|
|
368
|
+
timestamp: string;
|
|
369
|
+
level: 'INFO' | 'WARN' | 'ERROR' | 'DEBUG';
|
|
370
|
+
category: 'ORCHESTRATOR' | 'INFERENCE' | 'API' | 'SYSTEM' | 'SECURITY';
|
|
371
|
+
message: string;
|
|
372
|
+
meta?: any;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export interface WorkspaceBackup {
|
|
376
|
+
version: string;
|
|
377
|
+
exportedAt: string;
|
|
378
|
+
workspaceId: string;
|
|
379
|
+
data: {
|
|
380
|
+
projects: Project[];
|
|
381
|
+
tasks: Task[];
|
|
382
|
+
agents: AIAgent[];
|
|
383
|
+
documents: DocumentItem[];
|
|
384
|
+
providers: ModelProviderConfig[];
|
|
385
|
+
activities: Activity[];
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
// Swarm & Multi-Agent Pipeline Types
|
|
390
|
+
export interface PipelineStageConfig {
|
|
391
|
+
id: string;
|
|
392
|
+
name: string;
|
|
393
|
+
role: AgentRole;
|
|
394
|
+
agentId?: string;
|
|
395
|
+
agentName?: string;
|
|
396
|
+
stagePromptTemplate: string;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export interface PipelineTemplate {
|
|
400
|
+
id: string;
|
|
401
|
+
name: string;
|
|
402
|
+
description: string;
|
|
403
|
+
stages: PipelineStageConfig[];
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export interface PipelineStageExecution {
|
|
407
|
+
stageId: string;
|
|
408
|
+
stageName: string;
|
|
409
|
+
agentId: string;
|
|
410
|
+
agentName: string;
|
|
411
|
+
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
|
|
412
|
+
prompt: string;
|
|
413
|
+
output?: string;
|
|
414
|
+
durationMs?: number;
|
|
415
|
+
tokensUsed?: number;
|
|
416
|
+
error?: string;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
export interface PipelineExecutionResult {
|
|
420
|
+
pipelineId: string;
|
|
421
|
+
masterTaskId: string;
|
|
422
|
+
title: string;
|
|
423
|
+
objective: string;
|
|
424
|
+
status: 'SUCCESS' | 'FAILED' | 'PARTIAL';
|
|
425
|
+
totalDurationMs: number;
|
|
426
|
+
stages: PipelineStageExecution[];
|
|
427
|
+
finalSummary: string;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
// Agent Tool Calling & Action Sandbox Types
|
|
431
|
+
export type ToolRiskLevel = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
|
432
|
+
export type ActionApprovalStatus = 'PENDING' | 'APPROVED' | 'REJECTED' | 'EXECUTED' | 'FAILED';
|
|
433
|
+
|
|
434
|
+
export interface ToolDefinition {
|
|
435
|
+
name: string;
|
|
436
|
+
description: string;
|
|
437
|
+
category: 'SYSTEM' | 'FILESYSTEM' | 'NETWORK' | 'RUNTIME';
|
|
438
|
+
riskLevel: ToolRiskLevel;
|
|
439
|
+
requiresApproval: boolean;
|
|
440
|
+
parameters: Record<string, { type: string; description: string; required?: boolean }>;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export interface AgentAction {
|
|
444
|
+
id: string;
|
|
445
|
+
runId?: string;
|
|
446
|
+
agentId: string;
|
|
447
|
+
agentName?: string;
|
|
448
|
+
taskId?: string;
|
|
449
|
+
taskTitle?: string;
|
|
450
|
+
toolName: string;
|
|
451
|
+
toolInput: Record<string, any>;
|
|
452
|
+
status: ActionApprovalStatus;
|
|
453
|
+
riskLevel: ToolRiskLevel;
|
|
454
|
+
requiresApproval: boolean;
|
|
455
|
+
approvedBy?: string;
|
|
456
|
+
outputResult?: string;
|
|
457
|
+
errorMessage?: string;
|
|
458
|
+
createdAt: string;
|
|
459
|
+
executedAt?: string;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
export interface ExecuteActionRequest {
|
|
463
|
+
agentId: string;
|
|
464
|
+
toolName: string;
|
|
465
|
+
toolInput: Record<string, any>;
|
|
466
|
+
taskId?: string;
|
|
467
|
+
runId?: string;
|
|
468
|
+
autoApprove?: boolean;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
// RAG & Semantic Vector Memory Types
|
|
472
|
+
export interface DocumentChunk {
|
|
473
|
+
id: string;
|
|
474
|
+
documentId: string;
|
|
475
|
+
workspaceId: string;
|
|
476
|
+
chunkIndex: number;
|
|
477
|
+
content: string;
|
|
478
|
+
charCount: number;
|
|
479
|
+
tokenCount: number;
|
|
480
|
+
similarity?: number;
|
|
481
|
+
documentTitle?: string;
|
|
482
|
+
category?: DocumentCategory;
|
|
483
|
+
createdAt: string;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
export interface RagSearchResult {
|
|
487
|
+
chunkId: string;
|
|
488
|
+
documentId: string;
|
|
489
|
+
documentTitle: string;
|
|
490
|
+
category: DocumentCategory;
|
|
491
|
+
chunkIndex: number;
|
|
492
|
+
content: string;
|
|
493
|
+
similarity: number; // 0.0 to 1.0 (cosine similarity)
|
|
494
|
+
distance: number; // cosine distance
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
export interface RagSearchRequest {
|
|
498
|
+
query: string;
|
|
499
|
+
limit?: number;
|
|
500
|
+
minSimilarity?: number;
|
|
501
|
+
category?: DocumentCategory;
|
|
502
|
+
projectId?: string;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
export interface RagIndexStats {
|
|
506
|
+
totalDocuments: number;
|
|
507
|
+
indexedDocuments: number;
|
|
508
|
+
totalChunks: number;
|
|
509
|
+
totalMemories: number;
|
|
510
|
+
embeddingDimensions: number;
|
|
511
|
+
storageEngine: string;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
export type AgentMemoryType = 'EPISODIC' | 'FACTUAL' | 'PREFERENCE' | 'GOAL';
|
|
515
|
+
|
|
516
|
+
export interface AgentMemoryItem {
|
|
517
|
+
id: string;
|
|
518
|
+
agentId: string;
|
|
519
|
+
agentName?: string;
|
|
520
|
+
workspaceId: string;
|
|
521
|
+
taskId?: string;
|
|
522
|
+
taskTitle?: string;
|
|
523
|
+
memoryType: AgentMemoryType;
|
|
524
|
+
keyPoint: string;
|
|
525
|
+
context?: string;
|
|
526
|
+
importanceScore: number; // 0.1 to 1.0
|
|
527
|
+
similarity?: number;
|
|
528
|
+
createdAt: string;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
export interface StoreMemoryRequest {
|
|
532
|
+
agentId: string;
|
|
533
|
+
taskId?: string;
|
|
534
|
+
memoryType?: AgentMemoryType;
|
|
535
|
+
keyPoint: string;
|
|
536
|
+
context?: string;
|
|
537
|
+
importanceScore?: number;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
// Autonomous Multi-Agent Swarm & Hierarchical Delegation Mesh Types
|
|
541
|
+
export type SwarmMissionStatus = 'PLANNING' | 'EXECUTING' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
|
|
542
|
+
export type SwarmSubtaskStatus = 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'SKIPPED';
|
|
543
|
+
export type SwarmMessageType = 'DELEGATION' | 'HANDOFF' | 'FEEDBACK' | 'SYNTHESIS';
|
|
544
|
+
|
|
545
|
+
export interface SwarmSubtask {
|
|
546
|
+
id: string;
|
|
547
|
+
title: string;
|
|
548
|
+
role: AgentRole;
|
|
549
|
+
assignedAgentId?: string;
|
|
550
|
+
assignedAgentName?: string;
|
|
551
|
+
status: SwarmSubtaskStatus;
|
|
552
|
+
dependencies: string[]; // IDs of predecessor subtasks
|
|
553
|
+
promptTemplate: string;
|
|
554
|
+
outputResult?: string;
|
|
555
|
+
error?: string;
|
|
556
|
+
startedAt?: string;
|
|
557
|
+
completedAt?: string;
|
|
558
|
+
durationMs?: number;
|
|
559
|
+
feedbackLoopCount?: number;
|
|
560
|
+
revisions?: { iteration: number; critique: string; patchResult: string; timestamp: string }[];
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export interface SwarmMission {
|
|
564
|
+
id: string;
|
|
565
|
+
workspaceId: string;
|
|
566
|
+
title: string;
|
|
567
|
+
objective: string;
|
|
568
|
+
status: SwarmMissionStatus;
|
|
569
|
+
coordinatorAgentId?: string;
|
|
570
|
+
coordinatorAgentName?: string;
|
|
571
|
+
subtasks: SwarmSubtask[];
|
|
572
|
+
finalSynthesis?: string;
|
|
573
|
+
totalDurationMs?: number;
|
|
574
|
+
totalTokens?: number;
|
|
575
|
+
selfCorrectionCount?: number;
|
|
576
|
+
createdAt: string;
|
|
577
|
+
updatedAt: string;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
export interface SwarmMessage {
|
|
581
|
+
id: string;
|
|
582
|
+
missionId: string;
|
|
583
|
+
fromAgentId?: string;
|
|
584
|
+
fromAgentName?: string;
|
|
585
|
+
toAgentId?: string;
|
|
586
|
+
toAgentName?: string;
|
|
587
|
+
messageType: SwarmMessageType;
|
|
588
|
+
content: string;
|
|
589
|
+
metadata?: Record<string, any>;
|
|
590
|
+
createdAt: string;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
export interface SwarmPlanRequest {
|
|
594
|
+
objective: string;
|
|
595
|
+
workspaceId?: string;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
export interface SwarmPlanResponse {
|
|
599
|
+
coordinatorAgent: AIAgent;
|
|
600
|
+
title: string;
|
|
601
|
+
objective: string;
|
|
602
|
+
subtasks: SwarmSubtask[];
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
export interface SwarmDispatchRequest {
|
|
606
|
+
objective: string;
|
|
607
|
+
title?: string;
|
|
608
|
+
subtasks?: SwarmSubtask[];
|
|
609
|
+
coordinatorAgentId?: string;
|
|
610
|
+
workspaceId?: string;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
// Proactive Autonomous Routines & Cron Scheduler Types
|
|
614
|
+
export type ScheduleRoutineType =
|
|
615
|
+
| 'SWARM_MISSION'
|
|
616
|
+
| 'SECURITY_AUDIT'
|
|
617
|
+
| 'HEALTH_CHECK'
|
|
618
|
+
| 'VECTOR_REINDEX'
|
|
619
|
+
| 'AGENT_TASK';
|
|
620
|
+
|
|
621
|
+
export type ScheduleStatus = 'IDLE' | 'RUNNING' | 'SUCCESS' | 'FAILED';
|
|
622
|
+
|
|
623
|
+
export interface AgentSchedule {
|
|
624
|
+
id: string;
|
|
625
|
+
workspaceId: string;
|
|
626
|
+
title: string;
|
|
627
|
+
description?: string;
|
|
628
|
+
cronExpression: string;
|
|
629
|
+
routineType: ScheduleRoutineType;
|
|
630
|
+
targetAgentId?: string;
|
|
631
|
+
targetAgentName?: string;
|
|
632
|
+
payload: Record<string, any>;
|
|
633
|
+
isActive: boolean;
|
|
634
|
+
lastRunAt?: string;
|
|
635
|
+
nextRunAt?: string;
|
|
636
|
+
lastStatus: ScheduleStatus;
|
|
637
|
+
lastResultSummary?: string;
|
|
638
|
+
totalRuns: number;
|
|
639
|
+
failureCount: number;
|
|
640
|
+
createdAt: string;
|
|
641
|
+
updatedAt: string;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
export interface ScheduleExecution {
|
|
645
|
+
id: string;
|
|
646
|
+
scheduleId: string;
|
|
647
|
+
scheduleTitle?: string;
|
|
648
|
+
routineType: ScheduleRoutineType;
|
|
649
|
+
workspaceId: string;
|
|
650
|
+
status: 'RUNNING' | 'SUCCESS' | 'FAILED';
|
|
651
|
+
startedAt: string;
|
|
652
|
+
completedAt?: string;
|
|
653
|
+
durationMs?: number;
|
|
654
|
+
outputSummary?: string;
|
|
655
|
+
errorMessage?: string;
|
|
656
|
+
missionId?: string;
|
|
657
|
+
details?: Record<string, any>;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
export interface CreateScheduleDTO {
|
|
661
|
+
title: string;
|
|
662
|
+
description?: string;
|
|
663
|
+
cronExpression: string;
|
|
664
|
+
routineType: ScheduleRoutineType;
|
|
665
|
+
targetAgentId?: string;
|
|
666
|
+
payload?: Record<string, any>;
|
|
667
|
+
isActive?: boolean;
|
|
668
|
+
workspaceId?: string;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
export interface UpdateScheduleDTO {
|
|
672
|
+
title?: string;
|
|
673
|
+
description?: string;
|
|
674
|
+
cronExpression?: string;
|
|
675
|
+
routineType?: ScheduleRoutineType;
|
|
676
|
+
targetAgentId?: string;
|
|
677
|
+
payload?: Record<string, any>;
|
|
678
|
+
isActive?: boolean;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
// Swarm Artifact Bundler & Git PR Generator Types
|
|
682
|
+
export interface SwarmExtractedFile {
|
|
683
|
+
filePath: string;
|
|
684
|
+
language: string;
|
|
685
|
+
content: string;
|
|
686
|
+
sourceSubtaskTitle: string;
|
|
687
|
+
sourceAgentRole: AgentRole;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
export interface SwarmArtifactBundle {
|
|
691
|
+
missionId: string;
|
|
692
|
+
missionTitle: string;
|
|
693
|
+
objective: string;
|
|
694
|
+
status: SwarmMissionStatus;
|
|
695
|
+
markdownReport: string;
|
|
696
|
+
extractedFiles: SwarmExtractedFile[];
|
|
697
|
+
unifiedPatch: string;
|
|
698
|
+
gitBranchCreated?: string;
|
|
699
|
+
gitCommitHash?: string;
|
|
700
|
+
generatedAt: string;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
export interface CreateGitBranchRequest {
|
|
704
|
+
branchName?: string;
|
|
705
|
+
commitMessage?: string;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
export interface CreateGitBranchResponse {
|
|
709
|
+
success: boolean;
|
|
710
|
+
branchName: string;
|
|
711
|
+
commitHash: string;
|
|
712
|
+
filesCommitted: string[];
|
|
713
|
+
message: string;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
// Outbound Alerting & Webhook Incident Dispatcher Types
|
|
717
|
+
export type AlertPlatform = 'DISCORD' | 'SLACK' | 'TELEGRAM' | 'GENERIC';
|
|
718
|
+
|
|
719
|
+
export type AlertEventType =
|
|
720
|
+
| 'SECURITY_ALERT'
|
|
721
|
+
| 'SWARM_COMPLETED'
|
|
722
|
+
| 'ACTION_PENDING'
|
|
723
|
+
| 'SCHEDULE_FAILED'
|
|
724
|
+
| 'SYSTEM_ANOMALY';
|
|
725
|
+
|
|
726
|
+
export interface AlertWebhookItem {
|
|
727
|
+
id: string;
|
|
728
|
+
workspaceId: string;
|
|
729
|
+
name: string;
|
|
730
|
+
platform: AlertPlatform;
|
|
731
|
+
webhookUrl: string;
|
|
732
|
+
secretToken?: string;
|
|
733
|
+
events: AlertEventType[];
|
|
734
|
+
isActive: boolean;
|
|
735
|
+
createdAt: string;
|
|
736
|
+
updatedAt: string;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
export interface CreateAlertWebhookRequest {
|
|
740
|
+
name: string;
|
|
741
|
+
platform: AlertPlatform;
|
|
742
|
+
webhookUrl: string;
|
|
743
|
+
secretToken?: string;
|
|
744
|
+
events?: AlertEventType[];
|
|
745
|
+
isActive?: boolean;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
export interface UpdateAlertWebhookRequest {
|
|
749
|
+
name?: string;
|
|
750
|
+
platform?: AlertPlatform;
|
|
751
|
+
webhookUrl?: string;
|
|
752
|
+
secretToken?: string;
|
|
753
|
+
events?: AlertEventType[];
|
|
754
|
+
isActive?: boolean;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
export interface AlertPayload {
|
|
758
|
+
event: AlertEventType;
|
|
759
|
+
title: string;
|
|
760
|
+
message: string;
|
|
761
|
+
severity?: 'INFO' | 'WARNING' | 'CRITICAL';
|
|
762
|
+
metadata?: Record<string, any>;
|
|
763
|
+
timestamp?: string;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
export interface AlertDeliveryLog {
|
|
767
|
+
id: string;
|
|
768
|
+
webhookId: string;
|
|
769
|
+
workspaceId: string;
|
|
770
|
+
eventType: string;
|
|
771
|
+
payload: any;
|
|
772
|
+
statusCode?: number;
|
|
773
|
+
success: boolean;
|
|
774
|
+
errorMessage?: string;
|
|
775
|
+
createdAt: string;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
// Automated Agent Evals & LLM-as-a-Judge Types
|
|
779
|
+
export type EvalCategory = 'CODING' | 'ARCHITECTURE' | 'SECURITY' | 'ANTI_HALLUCINATION';
|
|
780
|
+
|
|
781
|
+
export interface EvalBenchmarkItem {
|
|
782
|
+
id: string;
|
|
783
|
+
workspaceId: string;
|
|
784
|
+
category: EvalCategory;
|
|
785
|
+
title: string;
|
|
786
|
+
prompt: string;
|
|
787
|
+
referenceAnswer?: string;
|
|
788
|
+
evaluationCriteria: string;
|
|
789
|
+
createdAt: string;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
export interface EvalRunResult {
|
|
793
|
+
id: string;
|
|
794
|
+
workspaceId: string;
|
|
795
|
+
benchmarkId: string;
|
|
796
|
+
benchmarkTitle?: string;
|
|
797
|
+
benchmarkCategory?: EvalCategory;
|
|
798
|
+
providerConfigId?: string;
|
|
799
|
+
modelName: string;
|
|
800
|
+
agentOutput: string;
|
|
801
|
+
latencyMs: number;
|
|
802
|
+
tokensUsed: number;
|
|
803
|
+
costUsd: number;
|
|
804
|
+
judgeScoreCorrectness: number;
|
|
805
|
+
judgeScoreFaithfulness: number;
|
|
806
|
+
judgeVerdict: string;
|
|
807
|
+
judgeModel: string;
|
|
808
|
+
createdAt: string;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
export interface RunEvalRequest {
|
|
812
|
+
benchmarkId: string;
|
|
813
|
+
providerId: string;
|
|
814
|
+
modelId: string;
|
|
815
|
+
judgeProviderId?: string;
|
|
816
|
+
judgeModelId?: string;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
export interface EvalLeaderboardEntry {
|
|
820
|
+
modelName: string;
|
|
821
|
+
totalRuns: number;
|
|
822
|
+
avgCorrectness: number;
|
|
823
|
+
avgFaithfulness: number;
|
|
824
|
+
overallScore: number;
|
|
825
|
+
avgLatencyMs: number;
|
|
826
|
+
totalCostUsd: number;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
// Model Context Protocol (MCP) Client Types
|
|
830
|
+
export type McpTransport = 'stdio' | 'sse';
|
|
831
|
+
export type McpServerStatus = 'CONNECTED' | 'DISCONNECTED' | 'ERROR';
|
|
832
|
+
|
|
833
|
+
export interface McpToolSchema {
|
|
834
|
+
type: string;
|
|
835
|
+
properties?: Record<string, any>;
|
|
836
|
+
required?: string[];
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
export interface McpTool {
|
|
840
|
+
serverId: string;
|
|
841
|
+
serverName: string;
|
|
842
|
+
name: string;
|
|
843
|
+
description?: string;
|
|
844
|
+
inputSchema: McpToolSchema;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
export interface McpServer {
|
|
848
|
+
id: string;
|
|
849
|
+
name: string;
|
|
850
|
+
description?: string;
|
|
851
|
+
transport: McpTransport;
|
|
852
|
+
command?: string;
|
|
853
|
+
args: string[];
|
|
854
|
+
env: Record<string, string>;
|
|
855
|
+
url?: string;
|
|
856
|
+
status: McpServerStatus;
|
|
857
|
+
enabled: boolean;
|
|
858
|
+
toolsCache: McpTool[];
|
|
859
|
+
createdAt: string;
|
|
860
|
+
updatedAt: string;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
export interface McpToolCallRequest {
|
|
864
|
+
serverId: string;
|
|
865
|
+
toolName: string;
|
|
866
|
+
arguments: Record<string, any>;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
export interface McpToolCallResult {
|
|
870
|
+
content: Array<{
|
|
871
|
+
type: 'text' | 'image' | 'resource';
|
|
872
|
+
text?: string;
|
|
873
|
+
data?: string;
|
|
874
|
+
mimeType?: string;
|
|
875
|
+
}>;
|
|
876
|
+
isError?: boolean;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
export interface McpServerTemplate {
|
|
880
|
+
id: string;
|
|
881
|
+
name: string;
|
|
882
|
+
description: string;
|
|
883
|
+
transport: McpTransport;
|
|
884
|
+
command: string;
|
|
885
|
+
args: string[];
|
|
886
|
+
env?: Record<string, string>;
|
|
887
|
+
defaultTools: string[];
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
// Visual Drag-and-Drop DAG Workflow Studio Types
|
|
891
|
+
export type WorkflowNodeType =
|
|
892
|
+
| 'TRIGGER'
|
|
893
|
+
| 'AGENT'
|
|
894
|
+
| 'RAG'
|
|
895
|
+
| 'CONDITION'
|
|
896
|
+
| 'ACTION'
|
|
897
|
+
| 'MCP_TOOL'
|
|
898
|
+
| 'HUMAN_APPROVAL'
|
|
899
|
+
| 'ALERT';
|
|
900
|
+
|
|
901
|
+
export interface WorkflowNode {
|
|
902
|
+
id: string;
|
|
903
|
+
type: WorkflowNodeType;
|
|
904
|
+
label: string;
|
|
905
|
+
position: { x: number; y: number };
|
|
906
|
+
config: Record<string, any>;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
export interface WorkflowEdge {
|
|
910
|
+
id: string;
|
|
911
|
+
source: string;
|
|
912
|
+
target: string;
|
|
913
|
+
sourceHandle?: string;
|
|
914
|
+
label?: string;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
export interface Workflow {
|
|
918
|
+
id: string;
|
|
919
|
+
workspaceId: string;
|
|
920
|
+
name: string;
|
|
921
|
+
description?: string;
|
|
922
|
+
nodes: WorkflowNode[];
|
|
923
|
+
edges: WorkflowEdge[];
|
|
924
|
+
isActive: boolean;
|
|
925
|
+
createdAt: string;
|
|
926
|
+
updatedAt: string;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
export type WorkflowExecutionStatus =
|
|
930
|
+
| 'RUNNING'
|
|
931
|
+
| 'COMPLETED'
|
|
932
|
+
| 'FAILED'
|
|
933
|
+
| 'WAITING_APPROVAL'
|
|
934
|
+
| 'CANCELLED';
|
|
935
|
+
|
|
936
|
+
export interface WorkflowNodeState {
|
|
937
|
+
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'SKIPPED' | 'WAITING_APPROVAL';
|
|
938
|
+
output?: any;
|
|
939
|
+
error?: string;
|
|
940
|
+
durationMs?: number;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
export interface WorkflowExecution {
|
|
944
|
+
id: string;
|
|
945
|
+
workflowId: string;
|
|
946
|
+
workspaceId: string;
|
|
947
|
+
status: WorkflowExecutionStatus;
|
|
948
|
+
currentNodeId?: string;
|
|
949
|
+
nodeStates: Record<string, WorkflowNodeState>;
|
|
950
|
+
contextData: Record<string, any>;
|
|
951
|
+
startedAt: string;
|
|
952
|
+
completedAt?: string;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
// Multi-Agent War Room & Live Debate Types
|
|
956
|
+
export type WarRoomStatus = 'ACTIVE' | 'CONCLUDED' | 'ARCHIVED';
|
|
957
|
+
|
|
958
|
+
export type DebateRole =
|
|
959
|
+
| 'LEAD_ARCHITECT'
|
|
960
|
+
| 'SECURITY_ANALYST'
|
|
961
|
+
| 'DEV_LEAD'
|
|
962
|
+
| 'PERFORMANCE_CRITIC'
|
|
963
|
+
| 'MODERATOR'
|
|
964
|
+
| 'SPECIALIST';
|
|
965
|
+
|
|
966
|
+
export interface WarRoomParticipant {
|
|
967
|
+
id: string;
|
|
968
|
+
warRoomId: string;
|
|
969
|
+
agentId: string;
|
|
970
|
+
roleInDebate: DebateRole;
|
|
971
|
+
joinedAt: string;
|
|
972
|
+
agentName?: string;
|
|
973
|
+
agentRole?: string;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
export interface WarRoomMessage {
|
|
977
|
+
id: string;
|
|
978
|
+
warRoomId: string;
|
|
979
|
+
senderType: 'USER' | 'AGENT' | 'MODERATOR';
|
|
980
|
+
senderId: string;
|
|
981
|
+
senderName: string;
|
|
982
|
+
content: string;
|
|
983
|
+
roundNumber: number;
|
|
984
|
+
isConsensusProposal?: boolean;
|
|
985
|
+
critiqueTargetId?: string;
|
|
986
|
+
metadata?: Record<string, any>;
|
|
987
|
+
createdAt: string;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
export interface WarRoom {
|
|
991
|
+
id: string;
|
|
992
|
+
workspaceId: string;
|
|
993
|
+
title: string;
|
|
994
|
+
topic: string;
|
|
995
|
+
status: WarRoomStatus;
|
|
996
|
+
consensusSummary?: string;
|
|
997
|
+
participants: WarRoomParticipant[];
|
|
998
|
+
messages?: WarRoomMessage[];
|
|
999
|
+
createdAt: string;
|
|
1000
|
+
updatedAt: string;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
export interface CreateWarRoomRequest {
|
|
1004
|
+
title: string;
|
|
1005
|
+
topic: string;
|
|
1006
|
+
agentIds: string[];
|
|
1007
|
+
roles?: Record<string, DebateRole>;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
export interface DeliberateRoundRequest {
|
|
1011
|
+
roundNumber?: number;
|
|
1012
|
+
userPrompt?: string;
|
|
1013
|
+
targetAgentId?: string;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
export interface ConvertWarRoomToTaskRequest {
|
|
1017
|
+
title?: string;
|
|
1018
|
+
projectId?: string;
|
|
1019
|
+
priority?: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
// Autonomous Web Research & Live Browser Types
|
|
1023
|
+
export interface WebSearchResultItem {
|
|
1024
|
+
title: string;
|
|
1025
|
+
url: string;
|
|
1026
|
+
snippet: string;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
export interface WebSearchResponse {
|
|
1030
|
+
query: string;
|
|
1031
|
+
results: WebSearchResultItem[];
|
|
1032
|
+
totalResults: number;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
export interface WebBrowseResponse {
|
|
1036
|
+
url: string;
|
|
1037
|
+
title: string;
|
|
1038
|
+
markdownContent: string;
|
|
1039
|
+
metaDescription?: string;
|
|
1040
|
+
contentLength: number;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
export interface WebResearchAndIngestRequest {
|
|
1044
|
+
query: string;
|
|
1045
|
+
documentTitle?: string;
|
|
1046
|
+
category?: DocumentCategory;
|
|
1047
|
+
tags?: string[];
|
|
1048
|
+
projectId?: string;
|
|
1049
|
+
workspaceId?: string;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
export interface WebResearchAndIngestResponse {
|
|
1053
|
+
success: boolean;
|
|
1054
|
+
documentId: string;
|
|
1055
|
+
title: string;
|
|
1056
|
+
category: DocumentCategory;
|
|
1057
|
+
chunksIndexed: number;
|
|
1058
|
+
sources: Array<{ title: string; url: string }>;
|
|
1059
|
+
summary: string;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
// Autonomous SRE & Self-Healing Incident Agent Types
|
|
1063
|
+
export type SreIncidentType =
|
|
1064
|
+
| 'HIGH_MEMORY'
|
|
1065
|
+
| 'HIGH_CPU'
|
|
1066
|
+
| 'DISK_PRESSURE'
|
|
1067
|
+
| 'SERVICE_CRASH'
|
|
1068
|
+
| 'SLOW_QUERIES'
|
|
1069
|
+
| 'SYSTEM_ANOMALY';
|
|
1070
|
+
|
|
1071
|
+
export type SreIncidentSeverity = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
|
1072
|
+
|
|
1073
|
+
export type SreIncidentStatus =
|
|
1074
|
+
| 'OPEN'
|
|
1075
|
+
| 'INVESTIGATING'
|
|
1076
|
+
| 'REMEDIATING'
|
|
1077
|
+
| 'RESOLVED'
|
|
1078
|
+
| 'FAILED';
|
|
1079
|
+
|
|
1080
|
+
export interface SreRemediationPlan {
|
|
1081
|
+
playbook: 'ROTATE_LOGS' | 'VACUUM_DATABASE' | 'RESTART_SERVICE' | 'CLEAR_MEMORY_CACHE' | 'CUSTOM';
|
|
1082
|
+
description: string;
|
|
1083
|
+
command?: string;
|
|
1084
|
+
isDestructive: boolean;
|
|
1085
|
+
estimatedRecoverySec: number;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
export interface SreIncident {
|
|
1089
|
+
id: string;
|
|
1090
|
+
workspaceId: string;
|
|
1091
|
+
incidentType: SreIncidentType;
|
|
1092
|
+
severity: SreIncidentSeverity;
|
|
1093
|
+
status: SreIncidentStatus;
|
|
1094
|
+
title: string;
|
|
1095
|
+
description: string;
|
|
1096
|
+
diagnostics: Record<string, any>;
|
|
1097
|
+
remediationPlan?: SreRemediationPlan;
|
|
1098
|
+
actionTaken?: string;
|
|
1099
|
+
postMortem?: string;
|
|
1100
|
+
requiresApproval: boolean;
|
|
1101
|
+
isApproved: boolean;
|
|
1102
|
+
createdAt: string;
|
|
1103
|
+
resolvedAt?: string;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
export interface SreScanResult {
|
|
1107
|
+
healthy: boolean;
|
|
1108
|
+
timestamp: string;
|
|
1109
|
+
metrics: {
|
|
1110
|
+
cpuPercent: number;
|
|
1111
|
+
memoryPercent: number;
|
|
1112
|
+
diskPercent: number;
|
|
1113
|
+
activeConnections: number;
|
|
1114
|
+
systemdStatus: string;
|
|
1115
|
+
};
|
|
1116
|
+
detectedIncidents: SreIncident[];
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
// Autonomous Data Analyst & Interactive Visualizer Studio Types
|
|
1120
|
+
export type ChartType = 'bar' | 'line' | 'pie' | 'area';
|
|
1121
|
+
|
|
1122
|
+
export interface ChartDataset {
|
|
1123
|
+
label: string;
|
|
1124
|
+
data: number[];
|
|
1125
|
+
color?: string;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
export interface ChartConfig {
|
|
1129
|
+
type: ChartType;
|
|
1130
|
+
title: string;
|
|
1131
|
+
xAxisLabel?: string;
|
|
1132
|
+
yAxisLabel?: string;
|
|
1133
|
+
labels: string[];
|
|
1134
|
+
datasets: ChartDataset[];
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
export interface DataStatisticalSummary {
|
|
1138
|
+
totalRows: number;
|
|
1139
|
+
columnCount: number;
|
|
1140
|
+
columns: string[];
|
|
1141
|
+
numericMetrics?: Record<string, { min: number; max: number; avg: number; sum: number }>;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
export interface DataAnalysisSession {
|
|
1145
|
+
id: string;
|
|
1146
|
+
workspaceId: string;
|
|
1147
|
+
title: string;
|
|
1148
|
+
datasetName: string;
|
|
1149
|
+
sourceType: 'CSV' | 'JSON' | 'SYSTEM_METRICS' | 'TASK_ANALYTICS';
|
|
1150
|
+
queryPrompt: string;
|
|
1151
|
+
summary: string;
|
|
1152
|
+
insights: string[];
|
|
1153
|
+
stats: DataStatisticalSummary;
|
|
1154
|
+
chartConfig: ChartConfig;
|
|
1155
|
+
createdAt: string;
|
|
1156
|
+
updatedAt: string;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
export interface AnalyzeDataRequest {
|
|
1160
|
+
datasetName?: string;
|
|
1161
|
+
sourceType: 'CSV' | 'JSON' | 'SYSTEM_METRICS' | 'TASK_ANALYTICS';
|
|
1162
|
+
rawData?: string;
|
|
1163
|
+
queryPrompt: string;
|
|
1164
|
+
workspaceId?: string;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
export type QuickDataQueryType =
|
|
1168
|
+
| 'TASK_SUCCESS_RATES'
|
|
1169
|
+
| 'AGENT_COST_DISTRIBUTION'
|
|
1170
|
+
| 'SERVER_RESOURCE_TRENDS'
|
|
1171
|
+
| 'HOURLY_ACTIVITY_PEAKS';
|
|
1172
|
+
|
|
1173
|
+
// No-Code Agent Skill Builder & Dynamic Tool Studio Types
|
|
1174
|
+
export type ToolCategory = 'API' | 'DATABASE' | 'SYSTEM' | 'UTILITY' | 'INTEGRATION' | 'CUSTOM';
|
|
1175
|
+
|
|
1176
|
+
export interface CustomSkillParameter {
|
|
1177
|
+
type: 'string' | 'number' | 'boolean' | 'object';
|
|
1178
|
+
description: string;
|
|
1179
|
+
required?: boolean;
|
|
1180
|
+
defaultValue?: any;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
export interface CustomSkillRestConfig {
|
|
1184
|
+
endpointUrl: string;
|
|
1185
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
1186
|
+
headers?: Record<string, string>;
|
|
1187
|
+
bodyTemplate?: string;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
export interface CustomAgentSkill {
|
|
1191
|
+
id: string;
|
|
1192
|
+
workspaceId: string;
|
|
1193
|
+
name: string;
|
|
1194
|
+
displayName: string;
|
|
1195
|
+
description: string;
|
|
1196
|
+
category: ToolCategory | 'CUSTOM';
|
|
1197
|
+
riskLevel: ToolRiskLevel;
|
|
1198
|
+
requiresApproval: boolean;
|
|
1199
|
+
executionType: 'REST_API' | 'MOCK_RESPONSE';
|
|
1200
|
+
parametersSchema: Record<string, CustomSkillParameter>;
|
|
1201
|
+
restConfig?: CustomSkillRestConfig;
|
|
1202
|
+
mockOutputTemplate?: string;
|
|
1203
|
+
allowedAgentIds: string[];
|
|
1204
|
+
isEnabled: boolean;
|
|
1205
|
+
createdAt: string;
|
|
1206
|
+
updatedAt: string;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
export interface CreateCustomSkillRequest {
|
|
1210
|
+
name: string;
|
|
1211
|
+
displayName: string;
|
|
1212
|
+
description: string;
|
|
1213
|
+
category?: ToolCategory | 'CUSTOM';
|
|
1214
|
+
riskLevel?: ToolRiskLevel;
|
|
1215
|
+
requiresApproval?: boolean;
|
|
1216
|
+
executionType: 'REST_API' | 'MOCK_RESPONSE';
|
|
1217
|
+
parametersSchema: Record<string, CustomSkillParameter>;
|
|
1218
|
+
restConfig?: CustomSkillRestConfig;
|
|
1219
|
+
mockOutputTemplate?: string;
|
|
1220
|
+
allowedAgentIds?: string[];
|
|
1221
|
+
isEnabled?: boolean;
|
|
1222
|
+
workspaceId?: string;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
export interface TestSkillExecutionRequest {
|
|
1226
|
+
input: Record<string, any>;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
// Cognitive Memory Graph Explorer & Mind Map Types
|
|
1230
|
+
export interface MemoryGraphNode {
|
|
1231
|
+
id: string;
|
|
1232
|
+
type: 'AGENT' | 'MEMORY';
|
|
1233
|
+
label: string;
|
|
1234
|
+
subLabel?: string;
|
|
1235
|
+
memoryType?: AgentMemoryType;
|
|
1236
|
+
agentId?: string;
|
|
1237
|
+
agentName?: string;
|
|
1238
|
+
importanceScore?: number;
|
|
1239
|
+
context?: string;
|
|
1240
|
+
taskId?: string;
|
|
1241
|
+
taskTitle?: string;
|
|
1242
|
+
createdAt?: string;
|
|
1243
|
+
clusterGroup: string;
|
|
1244
|
+
x?: number;
|
|
1245
|
+
y?: number;
|
|
1246
|
+
radius: number;
|
|
1247
|
+
color: string;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
export interface MemoryGraphEdge {
|
|
1251
|
+
id: string;
|
|
1252
|
+
source: string;
|
|
1253
|
+
target: string;
|
|
1254
|
+
edgeType: 'AGENT_MEMORY' | 'SEMANTIC_SIMILARITY' | 'TASK_COOCCURRENCE';
|
|
1255
|
+
similarity?: number;
|
|
1256
|
+
weight: number;
|
|
1257
|
+
label?: string;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
export interface MemoryGraphData {
|
|
1261
|
+
nodes: MemoryGraphNode[];
|
|
1262
|
+
edges: MemoryGraphEdge[];
|
|
1263
|
+
stats: {
|
|
1264
|
+
totalMemories: number;
|
|
1265
|
+
totalAgents: number;
|
|
1266
|
+
totalEdges: number;
|
|
1267
|
+
averageImportance: number;
|
|
1268
|
+
clustersCount: number;
|
|
1269
|
+
episodicCount: number;
|
|
1270
|
+
factualCount: number;
|
|
1271
|
+
preferenceCount: number;
|
|
1272
|
+
goalCount: number;
|
|
1273
|
+
};
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
export interface PruneMemoriesRequest {
|
|
1277
|
+
thresholdScore?: number;
|
|
1278
|
+
agentId?: string;
|
|
1279
|
+
olderThanDays?: number;
|
|
1280
|
+
workspaceId?: string;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
export interface ShareMemoryRequest {
|
|
1284
|
+
memoryId: string;
|
|
1285
|
+
targetAgentIds: string[];
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
export interface ConsolidateMemoriesRequest {
|
|
1289
|
+
memoryIds: string[];
|
|
1290
|
+
targetMemoryType: AgentMemoryType;
|
|
1291
|
+
newKeyPoint: string;
|
|
1292
|
+
newContext?: string;
|
|
1293
|
+
targetAgentId?: string;
|
|
1294
|
+
workspaceId?: string;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
// Automated Custom Domain & SSL Provisioning Types
|
|
1298
|
+
export interface CustomDomain {
|
|
1299
|
+
id: string;
|
|
1300
|
+
workspaceId: string;
|
|
1301
|
+
domainName: string;
|
|
1302
|
+
status: 'ACTIVE' | 'PENDING_DNS' | 'ERROR';
|
|
1303
|
+
sslStatus: 'PROVISIONED' | 'CLOUDFLARE_MANAGED' | 'PENDING';
|
|
1304
|
+
isPrimary: boolean;
|
|
1305
|
+
dnsMode: 'DIRECT' | 'CLOUDFLARE_PROXY';
|
|
1306
|
+
detectedIp?: string;
|
|
1307
|
+
targetIp: string;
|
|
1308
|
+
lastCheckedAt: string;
|
|
1309
|
+
createdAt: string;
|
|
1310
|
+
updatedAt: string;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
export interface CheckDomainDnsRequest {
|
|
1314
|
+
domainName: string;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
export interface CheckDomainDnsResponse {
|
|
1318
|
+
domainName: string;
|
|
1319
|
+
isConfigured: boolean;
|
|
1320
|
+
detectedIps: string[];
|
|
1321
|
+
serverPublicIp: string;
|
|
1322
|
+
isMatch: boolean;
|
|
1323
|
+
isCloudflareProxy: boolean;
|
|
1324
|
+
dnsMode: 'DIRECT' | 'CLOUDFLARE_PROXY' | 'UNRESOLVED' | 'MISMATCH';
|
|
1325
|
+
message: string;
|
|
1326
|
+
guidance: {
|
|
1327
|
+
type: string;
|
|
1328
|
+
name: string;
|
|
1329
|
+
targetIp: string;
|
|
1330
|
+
cloudflareProxyRecommended: boolean;
|
|
1331
|
+
};
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
export interface ProvisionDomainRequest {
|
|
1335
|
+
domainName: string;
|
|
1336
|
+
workspaceId?: string;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
export interface ProvisionDomainResponse {
|
|
1340
|
+
success: boolean;
|
|
1341
|
+
domain: CustomDomain;
|
|
1342
|
+
caddyReloaded: boolean;
|
|
1343
|
+
accessUrl: string;
|
|
1344
|
+
message: string;
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
export interface DomainManagerInfoResponse {
|
|
1348
|
+
serverPublicIp: string;
|
|
1349
|
+
domains: CustomDomain[];
|
|
1350
|
+
primaryDomain: CustomDomain | null;
|
|
1351
|
+
defaultAccessUrl: string;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
|