@axiom-lattice/gateway 3.0.2 → 3.0.3
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/dist/index.js +31 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -6
- package/.eslintrc.json +0 -22
- package/.turbo/turbo-build.log +0 -46
- package/AGENTS.md +0 -112
- package/CHANGELOG.md +0 -1190
- package/LOGGER_CONFIG.md +0 -135
- package/RESUME_STREAM_CONTENT_BASED.md +0 -326
- package/RESUME_STREAM_README.md +0 -388
- package/jest.config.js +0 -72
- package/public/sdk/README.md +0 -695
- package/public/sdk/dashboard-engine-skill.md +0 -1122
- package/public/sdk/dashboard-single-file-spec.md +0 -357
- package/public/sdk/data-query-sdk-skill.md +0 -307
- package/public/sdk/data-query-sdk.d.ts +0 -252
- package/public/sdk/data-query-sdk.js +0 -970
- package/public/sdk/occupancy-dashboard.html +0 -363
- package/public/sdk/test-dashboard.html +0 -690
- package/scripts/seed-lark-installation.ts +0 -54
- package/src/__tests__/__mocks__/e2b.ts +0 -1
- package/src/__tests__/a2a.test.ts +0 -428
- package/src/__tests__/channel-installations.test.ts +0 -199
- package/src/__tests__/data-query.test.ts +0 -77
- package/src/__tests__/sandbox-provider-registration.test.ts +0 -74
- package/src/__tests__/setup.ts +0 -5
- package/src/__tests__/workspace.test.ts +0 -400
- package/src/channels/__tests__/routes.test.ts +0 -50
- package/src/channels/lark/LarkChannelAdapter.ts +0 -217
- package/src/channels/lark/README.md +0 -187
- package/src/channels/lark/__tests__/controller.test.ts +0 -136
- package/src/channels/lark/__tests__/mapping-service.test.ts +0 -118
- package/src/channels/lark/__tests__/parser.test.ts +0 -72
- package/src/channels/lark/__tests__/sender.test.ts +0 -37
- package/src/channels/lark/__tests__/verification.test.ts +0 -157
- package/src/channels/lark/controller.ts +0 -48
- package/src/channels/lark/mapping-service.ts +0 -138
- package/src/channels/lark/parser.ts +0 -68
- package/src/channels/lark/routes.ts +0 -22
- package/src/channels/lark/sender.ts +0 -58
- package/src/channels/lark/types.ts +0 -20
- package/src/channels/lark/verification.ts +0 -32
- package/src/channels/registry.ts +0 -20
- package/src/channels/routes.ts +0 -30
- package/src/channels/wechat/WechatChannelAdapter.ts +0 -294
- package/src/channels/wechat/__tests__/context-store.test.ts +0 -148
- package/src/channels/wechat/context-store.ts +0 -54
- package/src/channels/wechat/controller.ts +0 -59
- package/src/channels/wechat/routes.ts +0 -7
- package/src/channels/wechat/types.ts +0 -62
- package/src/channels/wechat/wechat-client.ts +0 -162
- package/src/config/local-a2a-templates.ts +0 -59
- package/src/config.ts +0 -124
- package/src/controllers/__tests__/assistant-local-a2a.test.ts +0 -147
- package/src/controllers/__tests__/local-a2a-templates.test.ts +0 -112
- package/src/controllers/__tests__/mime.test.ts +0 -74
- package/src/controllers/__tests__/resources.test.ts +0 -122
- package/src/controllers/__tests__/run.test.ts +0 -115
- package/src/controllers/__tests__/tasks.test.ts +0 -215
- package/src/controllers/__tests__/workflow-tracking.test.ts +0 -113
- package/src/controllers/agent_task.ts +0 -72
- package/src/controllers/assistant.ts +0 -490
- package/src/controllers/auth.ts +0 -524
- package/src/controllers/channel-bindings.ts +0 -135
- package/src/controllers/channel-installations.ts +0 -409
- package/src/controllers/collections.ts +0 -176
- package/src/controllers/config.ts +0 -126
- package/src/controllers/connections.ts +0 -181
- package/src/controllers/data-query.ts +0 -236
- package/src/controllers/database-configs.ts +0 -440
- package/src/controllers/embeddings.ts +0 -22
- package/src/controllers/entries.ts +0 -167
- package/src/controllers/eval.ts +0 -513
- package/src/controllers/export-import.ts +0 -166
- package/src/controllers/health.ts +0 -36
- package/src/controllers/local-a2a-templates.ts +0 -18
- package/src/controllers/local-a2a.ts +0 -149
- package/src/controllers/mcp-configs.ts +0 -673
- package/src/controllers/memory.ts +0 -257
- package/src/controllers/menu-items.ts +0 -114
- package/src/controllers/metrics-configs.ts +0 -1061
- package/src/controllers/middleware-types.ts +0 -15
- package/src/controllers/models.ts +0 -199
- package/src/controllers/personal-assistant.ts +0 -191
- package/src/controllers/resources.ts +0 -477
- package/src/controllers/run.ts +0 -338
- package/src/controllers/sandbox.ts +0 -255
- package/src/controllers/schedules.ts +0 -336
- package/src/controllers/skills.ts +0 -256
- package/src/controllers/tasks.ts +0 -213
- package/src/controllers/tenants.ts +0 -121
- package/src/controllers/thread_status.ts +0 -66
- package/src/controllers/threads.ts +0 -260
- package/src/controllers/tools.ts +0 -139
- package/src/controllers/users.ts +0 -135
- package/src/controllers/workflow-tracking.ts +0 -693
- package/src/controllers/workspace.ts +0 -879
- package/src/export_registrations/a2a-api-key.registration.ts +0 -89
- package/src/export_registrations/agent.registration.ts +0 -80
- package/src/export_registrations/binding.registration.ts +0 -106
- package/src/export_registrations/channel-installation.registration.ts +0 -88
- package/src/export_registrations/collection.registration.ts +0 -85
- package/src/export_registrations/connection.registration.ts +0 -97
- package/src/export_registrations/database-config.registration.ts +0 -94
- package/src/export_registrations/eval.registration.ts +0 -334
- package/src/export_registrations/index.ts +0 -31
- package/src/export_registrations/mcp-config.registration.ts +0 -97
- package/src/export_registrations/menu.registration.ts +0 -91
- package/src/export_registrations/metrics-config.registration.ts +0 -94
- package/src/export_registrations/skill.registration.ts +0 -88
- package/src/export_registrations/task.registration.ts +0 -99
- package/src/index.ts +0 -497
- package/src/logger/Logger.ts +0 -186
- package/src/router/MessageContext.ts +0 -14
- package/src/router/MessageRouter.ts +0 -490
- package/src/router/middlewares/auditLogger.ts +0 -34
- package/src/router/middlewares/deduplication.ts +0 -38
- package/src/router/middlewares/index.ts +0 -3
- package/src/router/middlewares/rateLimit.ts +0 -46
- package/src/routes/__tests__/a2a-test-connection.test.ts +0 -177
- package/src/routes/a2a-bridge.ts +0 -266
- package/src/routes/a2a-test-connection.ts +0 -126
- package/src/routes/a2a.ts +0 -851
- package/src/routes/channel-bindings.ts +0 -11
- package/src/routes/channel-installations.ts +0 -33
- package/src/routes/index.ts +0 -640
- package/src/routes/menu-items.ts +0 -10
- package/src/routes/resource-routes.ts +0 -35
- package/src/routes/stt.ts +0 -102
- package/src/schemas/data-query.ts +0 -69
- package/src/schemas/index.ts +0 -852
- package/src/services/ExportImportService.ts +0 -296
- package/src/services/__tests__/ExportImportService.test.ts +0 -130
- package/src/services/__tests__/eval-runner.test.ts +0 -131
- package/src/services/__tests__/local-a2a.test.ts +0 -124
- package/src/services/agent_task_consumer.ts +0 -348
- package/src/services/collection_service.ts +0 -258
- package/src/services/eval-runner.ts +0 -283
- package/src/services/local-a2a.ts +0 -354
- package/src/services/queue_service.ts +0 -104
- package/src/services/sandbox_service.ts +0 -223
- package/src/services/skill_service.ts +0 -97
- package/src/services/supabase.ts +0 -60
- package/src/swagger.ts +0 -77
- package/src/types/index.ts +0 -118
- package/src/types/koa.d.ts +0 -7
- package/src/utils/__tests__/local-a2a-runtime.test.ts +0 -77
- package/src/utils/__tests__/path-containment.test.ts +0 -35
- package/src/utils/a2a-url.ts +0 -20
- package/src/utils/local-a2a-runtime.ts +0 -107
- package/src/utils/mime.ts +0 -44
- package/src/utils/path-containment.ts +0 -38
- package/tsconfig.json +0 -26
package/src/schemas/index.ts
DELETED
|
@@ -1,852 +0,0 @@
|
|
|
1
|
-
import { FastifySchema } from "fastify";
|
|
2
|
-
|
|
3
|
-
// Create Run Schemas
|
|
4
|
-
export const createRunSchema: FastifySchema = {
|
|
5
|
-
description: "Create a new agent run",
|
|
6
|
-
tags: ["Runs"],
|
|
7
|
-
summary: "Create Agent Run",
|
|
8
|
-
body: {
|
|
9
|
-
type: "object",
|
|
10
|
-
properties: {
|
|
11
|
-
thread_id: { type: "string", description: "Thread ID" },
|
|
12
|
-
assistant_id: { type: "string", description: "Assistant ID" },
|
|
13
|
-
message: { type: "string", description: "Message data for the run" },
|
|
14
|
-
command: {
|
|
15
|
-
type: "object",
|
|
16
|
-
description: "Command data for the run",
|
|
17
|
-
nullable: true,
|
|
18
|
-
},
|
|
19
|
-
streaming: {
|
|
20
|
-
type: "boolean",
|
|
21
|
-
description: "Whether to stream the response",
|
|
22
|
-
nullable: true,
|
|
23
|
-
},
|
|
24
|
-
background: {
|
|
25
|
-
type: "boolean",
|
|
26
|
-
description: "Whether to run in background",
|
|
27
|
-
nullable: true,
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
required: ["thread_id", "assistant_id", "message"],
|
|
31
|
-
},
|
|
32
|
-
response: {
|
|
33
|
-
200: {},
|
|
34
|
-
400: {},
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
// Memory Schemas
|
|
39
|
-
export const getAllMemoryItemsSchema: FastifySchema = {
|
|
40
|
-
description: "Get all memory items for an assistant thread",
|
|
41
|
-
tags: ["Memory"],
|
|
42
|
-
summary: "Get All Memory Items",
|
|
43
|
-
params: {
|
|
44
|
-
type: "object",
|
|
45
|
-
properties: {
|
|
46
|
-
assistantId: { type: "string", description: "Assistant ID" },
|
|
47
|
-
thread_id: { type: "string", description: "Thread ID" },
|
|
48
|
-
},
|
|
49
|
-
required: ["assistantId", "thread_id"],
|
|
50
|
-
},
|
|
51
|
-
response: {
|
|
52
|
-
200: {},
|
|
53
|
-
400: {},
|
|
54
|
-
500: {},
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export const getAgentStateSchema: FastifySchema = {
|
|
59
|
-
description: "Get agent state for an assistant thread",
|
|
60
|
-
tags: ["Memory"],
|
|
61
|
-
summary: "Get Agent State",
|
|
62
|
-
params: {
|
|
63
|
-
type: "object",
|
|
64
|
-
properties: {
|
|
65
|
-
assistantId: { type: "string", description: "Assistant ID" },
|
|
66
|
-
thread_id: { type: "string", description: "Thread ID" },
|
|
67
|
-
},
|
|
68
|
-
required: ["assistantId", "thread_id"],
|
|
69
|
-
},
|
|
70
|
-
response: {
|
|
71
|
-
200: {},
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export const getMemoryItemSchema: FastifySchema = {
|
|
76
|
-
description: "Get a specific memory item by key",
|
|
77
|
-
tags: ["Memory"],
|
|
78
|
-
summary: "Get Memory Item",
|
|
79
|
-
params: {
|
|
80
|
-
type: "object",
|
|
81
|
-
properties: {
|
|
82
|
-
assistantId: { type: "string", description: "Assistant ID" },
|
|
83
|
-
key: { type: "string", description: "Memory key" },
|
|
84
|
-
},
|
|
85
|
-
required: ["assistantId", "key"],
|
|
86
|
-
},
|
|
87
|
-
response: {
|
|
88
|
-
200: {},
|
|
89
|
-
},
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export const setMemoryItemSchema: FastifySchema = {
|
|
93
|
-
description: "Set or update a memory item",
|
|
94
|
-
tags: ["Memory"],
|
|
95
|
-
summary: "Set Memory Item",
|
|
96
|
-
params: {
|
|
97
|
-
type: "object",
|
|
98
|
-
properties: {
|
|
99
|
-
assistantId: { type: "string", description: "Assistant ID" },
|
|
100
|
-
key: { type: "string", description: "Memory key" },
|
|
101
|
-
},
|
|
102
|
-
required: ["assistantId", "key"],
|
|
103
|
-
},
|
|
104
|
-
body: {
|
|
105
|
-
type: "object",
|
|
106
|
-
description: "Memory item data",
|
|
107
|
-
},
|
|
108
|
-
response: {
|
|
109
|
-
200: {},
|
|
110
|
-
},
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
export const deleteMemoryItemSchema: FastifySchema = {
|
|
114
|
-
description: "Delete a specific memory item",
|
|
115
|
-
tags: ["Memory"],
|
|
116
|
-
summary: "Delete Memory Item",
|
|
117
|
-
params: {
|
|
118
|
-
type: "object",
|
|
119
|
-
properties: {
|
|
120
|
-
assistantId: { type: "string", description: "Assistant ID" },
|
|
121
|
-
key: { type: "string", description: "Memory key" },
|
|
122
|
-
},
|
|
123
|
-
required: ["assistantId", "key"],
|
|
124
|
-
},
|
|
125
|
-
response: {
|
|
126
|
-
200: {},
|
|
127
|
-
},
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
export const clearMemorySchema: FastifySchema = {
|
|
131
|
-
description: "Clear all memory items for an assistant",
|
|
132
|
-
tags: ["Memory"],
|
|
133
|
-
summary: "Clear Memory",
|
|
134
|
-
params: {
|
|
135
|
-
type: "object",
|
|
136
|
-
properties: {
|
|
137
|
-
assistantId: { type: "string", description: "Assistant ID" },
|
|
138
|
-
},
|
|
139
|
-
required: ["assistantId"],
|
|
140
|
-
},
|
|
141
|
-
response: {
|
|
142
|
-
200: {},
|
|
143
|
-
},
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
// Graph Schema
|
|
147
|
-
export const getAgentGraphSchema: FastifySchema = {
|
|
148
|
-
description: "Get agent graph visualization",
|
|
149
|
-
tags: ["Graph"],
|
|
150
|
-
summary: "Get Agent Graph",
|
|
151
|
-
params: {
|
|
152
|
-
type: "object",
|
|
153
|
-
properties: {
|
|
154
|
-
assistantId: { type: "string", description: "Assistant ID" },
|
|
155
|
-
},
|
|
156
|
-
required: ["assistantId"],
|
|
157
|
-
},
|
|
158
|
-
response: {
|
|
159
|
-
200: {},
|
|
160
|
-
},
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
// Resume Stream Schema
|
|
164
|
-
export const resumeStreamSchema: FastifySchema = {
|
|
165
|
-
description: "Resume streaming from a known position",
|
|
166
|
-
tags: ["Streaming"],
|
|
167
|
-
summary: "Resume Stream",
|
|
168
|
-
body: {
|
|
169
|
-
type: "object",
|
|
170
|
-
properties: {
|
|
171
|
-
thread_id: { type: "string", description: "Thread ID" },
|
|
172
|
-
message_id: {
|
|
173
|
-
type: "string",
|
|
174
|
-
description: "Message ID (usually run_id)",
|
|
175
|
-
},
|
|
176
|
-
known_content: {
|
|
177
|
-
type: "string",
|
|
178
|
-
description: "Content already received",
|
|
179
|
-
},
|
|
180
|
-
poll_interval: {
|
|
181
|
-
type: "number",
|
|
182
|
-
description: "Polling interval in milliseconds",
|
|
183
|
-
nullable: true,
|
|
184
|
-
default: 100,
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
required: ["thread_id", "message_id"],
|
|
188
|
-
},
|
|
189
|
-
response: {
|
|
190
|
-
200: {},
|
|
191
|
-
400: {},
|
|
192
|
-
500: {},
|
|
193
|
-
},
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
// Trigger Agent Task Schema
|
|
197
|
-
export const triggerAgentTaskSchema: FastifySchema = {
|
|
198
|
-
description: "Trigger an agent task",
|
|
199
|
-
tags: ["Agent Tasks"],
|
|
200
|
-
summary: "Trigger Agent Task",
|
|
201
|
-
body: {
|
|
202
|
-
type: "object",
|
|
203
|
-
properties: {
|
|
204
|
-
assistant_id: {
|
|
205
|
-
type: "string",
|
|
206
|
-
description: "Assistant ID",
|
|
207
|
-
},
|
|
208
|
-
thread_id: {
|
|
209
|
-
type: "string",
|
|
210
|
-
description: "Thread ID",
|
|
211
|
-
},
|
|
212
|
-
input: {
|
|
213
|
-
type: "object",
|
|
214
|
-
description: "Task input data",
|
|
215
|
-
},
|
|
216
|
-
command: {
|
|
217
|
-
type: "object",
|
|
218
|
-
description: "Command data for the task",
|
|
219
|
-
nullable: true,
|
|
220
|
-
},
|
|
221
|
-
},
|
|
222
|
-
required: ["assistant_id", "thread_id"],
|
|
223
|
-
},
|
|
224
|
-
response: {
|
|
225
|
-
200: {
|
|
226
|
-
type: "object",
|
|
227
|
-
properties: {
|
|
228
|
-
success: { type: "boolean" },
|
|
229
|
-
result: { type: "object" },
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
|
-
400: {
|
|
233
|
-
type: "object",
|
|
234
|
-
properties: {
|
|
235
|
-
success: { type: "boolean" },
|
|
236
|
-
error: { type: "string" },
|
|
237
|
-
},
|
|
238
|
-
},
|
|
239
|
-
500: {
|
|
240
|
-
type: "object",
|
|
241
|
-
properties: {
|
|
242
|
-
success: { type: "boolean" },
|
|
243
|
-
error: { type: "string" },
|
|
244
|
-
},
|
|
245
|
-
},
|
|
246
|
-
},
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
// Configuration Schemas
|
|
250
|
-
export const updateConfigSchema: FastifySchema = {
|
|
251
|
-
description: "Update gateway configuration",
|
|
252
|
-
tags: ["Configuration"],
|
|
253
|
-
summary: "Update Configuration",
|
|
254
|
-
body: {
|
|
255
|
-
type: "object",
|
|
256
|
-
properties: {
|
|
257
|
-
config: {
|
|
258
|
-
type: "object",
|
|
259
|
-
description: "Configuration object to update",
|
|
260
|
-
properties: {
|
|
261
|
-
port: { type: "number", description: "Server port" },
|
|
262
|
-
queueServiceType: {
|
|
263
|
-
type: "string",
|
|
264
|
-
enum: ["memory", "redis"],
|
|
265
|
-
description: "Queue service type",
|
|
266
|
-
},
|
|
267
|
-
redisUrl: { type: "string", description: "Redis URL" },
|
|
268
|
-
redisPassword: { type: "string", description: "Redis password" },
|
|
269
|
-
queueName: { type: "string", description: "Queue name" },
|
|
270
|
-
},
|
|
271
|
-
},
|
|
272
|
-
},
|
|
273
|
-
required: ["config"],
|
|
274
|
-
},
|
|
275
|
-
response: {
|
|
276
|
-
200: {
|
|
277
|
-
type: "object",
|
|
278
|
-
properties: {
|
|
279
|
-
success: { type: "boolean" },
|
|
280
|
-
message: { type: "string" },
|
|
281
|
-
data: { type: "object" },
|
|
282
|
-
},
|
|
283
|
-
},
|
|
284
|
-
400: {
|
|
285
|
-
type: "object",
|
|
286
|
-
properties: {
|
|
287
|
-
success: { type: "boolean" },
|
|
288
|
-
error: { type: "string" },
|
|
289
|
-
},
|
|
290
|
-
},
|
|
291
|
-
500: {
|
|
292
|
-
type: "object",
|
|
293
|
-
properties: {
|
|
294
|
-
success: { type: "boolean" },
|
|
295
|
-
error: { type: "string" },
|
|
296
|
-
},
|
|
297
|
-
},
|
|
298
|
-
},
|
|
299
|
-
};
|
|
300
|
-
|
|
301
|
-
export const getConfigSchema: FastifySchema = {
|
|
302
|
-
description: "Get current gateway configuration",
|
|
303
|
-
tags: ["Configuration"],
|
|
304
|
-
summary: "Get Configuration",
|
|
305
|
-
response: {
|
|
306
|
-
200: {
|
|
307
|
-
type: "object",
|
|
308
|
-
properties: {
|
|
309
|
-
success: { type: "boolean" },
|
|
310
|
-
data: { type: "object" },
|
|
311
|
-
},
|
|
312
|
-
},
|
|
313
|
-
500: {
|
|
314
|
-
type: "object",
|
|
315
|
-
properties: {
|
|
316
|
-
success: { type: "boolean" },
|
|
317
|
-
error: { type: "string" },
|
|
318
|
-
},
|
|
319
|
-
},
|
|
320
|
-
},
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
// Health Check Schema
|
|
324
|
-
export const getHealthSchema: FastifySchema = {
|
|
325
|
-
description: "Health check endpoint for monitoring and load balancer checks",
|
|
326
|
-
tags: ["Health"],
|
|
327
|
-
summary: "Health Check",
|
|
328
|
-
response: {
|
|
329
|
-
200: {
|
|
330
|
-
type: "object",
|
|
331
|
-
properties: {
|
|
332
|
-
success: { type: "boolean" },
|
|
333
|
-
data: {
|
|
334
|
-
type: "object",
|
|
335
|
-
properties: {
|
|
336
|
-
status: { type: "string", enum: ["healthy", "unhealthy"] },
|
|
337
|
-
timestamp: { type: "string" },
|
|
338
|
-
uptime: { type: "number" },
|
|
339
|
-
service: { type: "string" },
|
|
340
|
-
version: { type: "string" },
|
|
341
|
-
},
|
|
342
|
-
},
|
|
343
|
-
},
|
|
344
|
-
},
|
|
345
|
-
500: {
|
|
346
|
-
type: "object",
|
|
347
|
-
properties: {
|
|
348
|
-
success: { type: "boolean" },
|
|
349
|
-
status: { type: "string" },
|
|
350
|
-
error: { type: "string" },
|
|
351
|
-
},
|
|
352
|
-
},
|
|
353
|
-
},
|
|
354
|
-
};
|
|
355
|
-
|
|
356
|
-
// Skills Schemas
|
|
357
|
-
export const getSkillListSchema: FastifySchema = {
|
|
358
|
-
description: "Get list of all skills",
|
|
359
|
-
tags: ["Skills"],
|
|
360
|
-
summary: "Get Skill List",
|
|
361
|
-
response: {
|
|
362
|
-
200: {
|
|
363
|
-
type: "object",
|
|
364
|
-
properties: {
|
|
365
|
-
success: { type: "boolean" },
|
|
366
|
-
message: { type: "string" },
|
|
367
|
-
data: {
|
|
368
|
-
type: "object",
|
|
369
|
-
properties: {
|
|
370
|
-
records: {
|
|
371
|
-
type: "array",
|
|
372
|
-
items: { type: "object" },
|
|
373
|
-
},
|
|
374
|
-
total: { type: "number" },
|
|
375
|
-
},
|
|
376
|
-
},
|
|
377
|
-
},
|
|
378
|
-
},
|
|
379
|
-
500: {
|
|
380
|
-
type: "object",
|
|
381
|
-
properties: {
|
|
382
|
-
success: { type: "boolean" },
|
|
383
|
-
message: { type: "string" },
|
|
384
|
-
data: {
|
|
385
|
-
type: "object",
|
|
386
|
-
properties: {
|
|
387
|
-
records: {
|
|
388
|
-
type: "array",
|
|
389
|
-
items: { type: "object" },
|
|
390
|
-
},
|
|
391
|
-
total: { type: "number" },
|
|
392
|
-
},
|
|
393
|
-
},
|
|
394
|
-
},
|
|
395
|
-
},
|
|
396
|
-
},
|
|
397
|
-
};
|
|
398
|
-
|
|
399
|
-
export const getSkillSchema: FastifySchema = {
|
|
400
|
-
description: "Get a single skill by ID",
|
|
401
|
-
tags: ["Skills"],
|
|
402
|
-
summary: "Get Skill",
|
|
403
|
-
params: {
|
|
404
|
-
type: "object",
|
|
405
|
-
properties: {
|
|
406
|
-
id: { type: "string", description: "Skill ID" },
|
|
407
|
-
},
|
|
408
|
-
required: ["id"],
|
|
409
|
-
},
|
|
410
|
-
response: {
|
|
411
|
-
200: {
|
|
412
|
-
type: "object",
|
|
413
|
-
properties: {
|
|
414
|
-
success: { type: "boolean" },
|
|
415
|
-
message: { type: "string" },
|
|
416
|
-
data: { type: "object" },
|
|
417
|
-
},
|
|
418
|
-
},
|
|
419
|
-
404: {
|
|
420
|
-
type: "object",
|
|
421
|
-
properties: {
|
|
422
|
-
success: { type: "boolean" },
|
|
423
|
-
message: { type: "string" },
|
|
424
|
-
},
|
|
425
|
-
},
|
|
426
|
-
500: {
|
|
427
|
-
type: "object",
|
|
428
|
-
properties: {
|
|
429
|
-
success: { type: "boolean" },
|
|
430
|
-
message: { type: "string" },
|
|
431
|
-
},
|
|
432
|
-
},
|
|
433
|
-
},
|
|
434
|
-
};
|
|
435
|
-
|
|
436
|
-
export const createSkillSchema: FastifySchema = {
|
|
437
|
-
description: "Create a new skill",
|
|
438
|
-
tags: ["Skills"],
|
|
439
|
-
summary: "Create Skill",
|
|
440
|
-
body: {
|
|
441
|
-
type: "object",
|
|
442
|
-
properties: {
|
|
443
|
-
id: {
|
|
444
|
-
type: "string",
|
|
445
|
-
description: "Skill ID (optional, defaults to name if not provided; must equal name, name is used for path addressing)"
|
|
446
|
-
},
|
|
447
|
-
name: {
|
|
448
|
-
type: "string",
|
|
449
|
-
description: "Skill name (1-64 chars, lowercase alphanumeric with single hyphens, pattern: ^[a-z0-9]+(-[a-z0-9]+)*$)",
|
|
450
|
-
pattern: "^[a-z0-9]+(-[a-z0-9]+)*$",
|
|
451
|
-
minLength: 1,
|
|
452
|
-
maxLength: 64
|
|
453
|
-
},
|
|
454
|
-
description: { type: "string", description: "Skill description" },
|
|
455
|
-
license: { type: "string", description: "License information" },
|
|
456
|
-
compatibility: { type: "string", description: "Compatibility information" },
|
|
457
|
-
metadata: {
|
|
458
|
-
type: "object",
|
|
459
|
-
additionalProperties: { type: "string" },
|
|
460
|
-
description: "Additional metadata",
|
|
461
|
-
},
|
|
462
|
-
content: { type: "string", description: "Skill detailed content (markdown)" },
|
|
463
|
-
subSkills: {
|
|
464
|
-
type: "array",
|
|
465
|
-
items: { type: "string" },
|
|
466
|
-
description: "Array of sub-skill names (hierarchical structure)",
|
|
467
|
-
},
|
|
468
|
-
},
|
|
469
|
-
required: ["name", "description"],
|
|
470
|
-
},
|
|
471
|
-
response: {
|
|
472
|
-
201: {
|
|
473
|
-
type: "object",
|
|
474
|
-
properties: {
|
|
475
|
-
success: { type: "boolean" },
|
|
476
|
-
message: { type: "string" },
|
|
477
|
-
data: { type: "object" },
|
|
478
|
-
},
|
|
479
|
-
},
|
|
480
|
-
400: {
|
|
481
|
-
type: "object",
|
|
482
|
-
properties: {
|
|
483
|
-
success: { type: "boolean" },
|
|
484
|
-
message: { type: "string" },
|
|
485
|
-
},
|
|
486
|
-
},
|
|
487
|
-
409: {
|
|
488
|
-
type: "object",
|
|
489
|
-
properties: {
|
|
490
|
-
success: { type: "boolean" },
|
|
491
|
-
message: { type: "string" },
|
|
492
|
-
},
|
|
493
|
-
},
|
|
494
|
-
500: {
|
|
495
|
-
type: "object",
|
|
496
|
-
properties: {
|
|
497
|
-
success: { type: "boolean" },
|
|
498
|
-
message: { type: "string" },
|
|
499
|
-
},
|
|
500
|
-
},
|
|
501
|
-
},
|
|
502
|
-
};
|
|
503
|
-
|
|
504
|
-
export const updateSkillSchema: FastifySchema = {
|
|
505
|
-
description: "Update an existing skill",
|
|
506
|
-
tags: ["Skills"],
|
|
507
|
-
summary: "Update Skill",
|
|
508
|
-
params: {
|
|
509
|
-
type: "object",
|
|
510
|
-
properties: {
|
|
511
|
-
id: { type: "string", description: "Skill ID" },
|
|
512
|
-
},
|
|
513
|
-
required: ["id"],
|
|
514
|
-
},
|
|
515
|
-
body: {
|
|
516
|
-
type: "object",
|
|
517
|
-
properties: {
|
|
518
|
-
name: {
|
|
519
|
-
type: "string",
|
|
520
|
-
description: "Skill name (1-64 chars, lowercase alphanumeric with single hyphens, pattern: ^[a-z0-9]+(-[a-z0-9]+)*$)",
|
|
521
|
-
pattern: "^[a-z0-9]+(-[a-z0-9]+)*$",
|
|
522
|
-
minLength: 1,
|
|
523
|
-
maxLength: 64
|
|
524
|
-
},
|
|
525
|
-
description: { type: "string", description: "Skill description" },
|
|
526
|
-
license: { type: "string", description: "License information" },
|
|
527
|
-
compatibility: { type: "string", description: "Compatibility information" },
|
|
528
|
-
metadata: {
|
|
529
|
-
type: "object",
|
|
530
|
-
additionalProperties: { type: "string" },
|
|
531
|
-
description: "Additional metadata",
|
|
532
|
-
},
|
|
533
|
-
content: { type: "string", description: "Skill detailed content (markdown)" },
|
|
534
|
-
subSkills: {
|
|
535
|
-
type: "array",
|
|
536
|
-
items: { type: "string" },
|
|
537
|
-
description: "Array of sub-skill names (hierarchical structure)",
|
|
538
|
-
},
|
|
539
|
-
},
|
|
540
|
-
},
|
|
541
|
-
response: {
|
|
542
|
-
200: {
|
|
543
|
-
type: "object",
|
|
544
|
-
properties: {
|
|
545
|
-
success: { type: "boolean" },
|
|
546
|
-
message: { type: "string" },
|
|
547
|
-
data: { type: "object" },
|
|
548
|
-
},
|
|
549
|
-
},
|
|
550
|
-
400: {
|
|
551
|
-
type: "object",
|
|
552
|
-
properties: {
|
|
553
|
-
success: { type: "boolean" },
|
|
554
|
-
message: { type: "string" },
|
|
555
|
-
},
|
|
556
|
-
},
|
|
557
|
-
404: {
|
|
558
|
-
type: "object",
|
|
559
|
-
properties: {
|
|
560
|
-
success: { type: "boolean" },
|
|
561
|
-
message: { type: "string" },
|
|
562
|
-
},
|
|
563
|
-
},
|
|
564
|
-
500: {
|
|
565
|
-
type: "object",
|
|
566
|
-
properties: {
|
|
567
|
-
success: { type: "boolean" },
|
|
568
|
-
message: { type: "string" },
|
|
569
|
-
},
|
|
570
|
-
},
|
|
571
|
-
},
|
|
572
|
-
};
|
|
573
|
-
|
|
574
|
-
export const deleteSkillSchema: FastifySchema = {
|
|
575
|
-
description: "Delete a skill by ID",
|
|
576
|
-
tags: ["Skills"],
|
|
577
|
-
summary: "Delete Skill",
|
|
578
|
-
params: {
|
|
579
|
-
type: "object",
|
|
580
|
-
properties: {
|
|
581
|
-
id: { type: "string", description: "Skill ID" },
|
|
582
|
-
},
|
|
583
|
-
required: ["id"],
|
|
584
|
-
},
|
|
585
|
-
response: {
|
|
586
|
-
200: {
|
|
587
|
-
type: "object",
|
|
588
|
-
properties: {
|
|
589
|
-
success: { type: "boolean" },
|
|
590
|
-
message: { type: "string" },
|
|
591
|
-
},
|
|
592
|
-
},
|
|
593
|
-
404: {
|
|
594
|
-
type: "object",
|
|
595
|
-
properties: {
|
|
596
|
-
success: { type: "boolean" },
|
|
597
|
-
message: { type: "string" },
|
|
598
|
-
},
|
|
599
|
-
},
|
|
600
|
-
500: {
|
|
601
|
-
type: "object",
|
|
602
|
-
properties: {
|
|
603
|
-
success: { type: "boolean" },
|
|
604
|
-
message: { type: "string" },
|
|
605
|
-
},
|
|
606
|
-
},
|
|
607
|
-
},
|
|
608
|
-
};
|
|
609
|
-
|
|
610
|
-
export const searchSkillsByMetadataSchema: FastifySchema = {
|
|
611
|
-
description: "Search skills by metadata",
|
|
612
|
-
tags: ["Skills"],
|
|
613
|
-
summary: "Search Skills by Metadata",
|
|
614
|
-
querystring: {
|
|
615
|
-
type: "object",
|
|
616
|
-
properties: {
|
|
617
|
-
key: { type: "string", description: "Metadata key" },
|
|
618
|
-
value: { type: "string", description: "Metadata value" },
|
|
619
|
-
},
|
|
620
|
-
required: ["key", "value"],
|
|
621
|
-
},
|
|
622
|
-
response: {
|
|
623
|
-
200: {
|
|
624
|
-
type: "object",
|
|
625
|
-
properties: {
|
|
626
|
-
success: { type: "boolean" },
|
|
627
|
-
message: { type: "string" },
|
|
628
|
-
data: {
|
|
629
|
-
type: "object",
|
|
630
|
-
properties: {
|
|
631
|
-
records: {
|
|
632
|
-
type: "array",
|
|
633
|
-
items: { type: "object" },
|
|
634
|
-
},
|
|
635
|
-
total: { type: "number" },
|
|
636
|
-
},
|
|
637
|
-
},
|
|
638
|
-
},
|
|
639
|
-
},
|
|
640
|
-
400: {
|
|
641
|
-
type: "object",
|
|
642
|
-
properties: {
|
|
643
|
-
success: { type: "boolean" },
|
|
644
|
-
message: { type: "string" },
|
|
645
|
-
data: {
|
|
646
|
-
type: "object",
|
|
647
|
-
properties: {
|
|
648
|
-
records: {
|
|
649
|
-
type: "array",
|
|
650
|
-
items: { type: "object" },
|
|
651
|
-
},
|
|
652
|
-
total: { type: "number" },
|
|
653
|
-
},
|
|
654
|
-
},
|
|
655
|
-
},
|
|
656
|
-
},
|
|
657
|
-
500: {
|
|
658
|
-
type: "object",
|
|
659
|
-
properties: {
|
|
660
|
-
success: { type: "boolean" },
|
|
661
|
-
message: { type: "string" },
|
|
662
|
-
data: {
|
|
663
|
-
type: "object",
|
|
664
|
-
properties: {
|
|
665
|
-
records: {
|
|
666
|
-
type: "array",
|
|
667
|
-
items: { type: "object" },
|
|
668
|
-
},
|
|
669
|
-
total: { type: "number" },
|
|
670
|
-
},
|
|
671
|
-
},
|
|
672
|
-
},
|
|
673
|
-
},
|
|
674
|
-
},
|
|
675
|
-
};
|
|
676
|
-
|
|
677
|
-
export const filterSkillsByCompatibilitySchema: FastifySchema = {
|
|
678
|
-
description: "Filter skills by compatibility",
|
|
679
|
-
tags: ["Skills"],
|
|
680
|
-
summary: "Filter Skills by Compatibility",
|
|
681
|
-
querystring: {
|
|
682
|
-
type: "object",
|
|
683
|
-
properties: {
|
|
684
|
-
compatibility: { type: "string", description: "Compatibility string" },
|
|
685
|
-
},
|
|
686
|
-
required: ["compatibility"],
|
|
687
|
-
},
|
|
688
|
-
response: {
|
|
689
|
-
200: {
|
|
690
|
-
type: "object",
|
|
691
|
-
properties: {
|
|
692
|
-
success: { type: "boolean" },
|
|
693
|
-
message: { type: "string" },
|
|
694
|
-
data: {
|
|
695
|
-
type: "object",
|
|
696
|
-
properties: {
|
|
697
|
-
records: {
|
|
698
|
-
type: "array",
|
|
699
|
-
items: { type: "object" },
|
|
700
|
-
},
|
|
701
|
-
total: { type: "number" },
|
|
702
|
-
},
|
|
703
|
-
},
|
|
704
|
-
},
|
|
705
|
-
},
|
|
706
|
-
400: {
|
|
707
|
-
type: "object",
|
|
708
|
-
properties: {
|
|
709
|
-
success: { type: "boolean" },
|
|
710
|
-
message: { type: "string" },
|
|
711
|
-
data: {
|
|
712
|
-
type: "object",
|
|
713
|
-
properties: {
|
|
714
|
-
records: {
|
|
715
|
-
type: "array",
|
|
716
|
-
items: { type: "object" },
|
|
717
|
-
},
|
|
718
|
-
total: { type: "number" },
|
|
719
|
-
},
|
|
720
|
-
},
|
|
721
|
-
},
|
|
722
|
-
},
|
|
723
|
-
500: {
|
|
724
|
-
type: "object",
|
|
725
|
-
properties: {
|
|
726
|
-
success: { type: "boolean" },
|
|
727
|
-
message: { type: "string" },
|
|
728
|
-
data: {
|
|
729
|
-
type: "object",
|
|
730
|
-
properties: {
|
|
731
|
-
records: {
|
|
732
|
-
type: "array",
|
|
733
|
-
items: { type: "object" },
|
|
734
|
-
},
|
|
735
|
-
total: { type: "number" },
|
|
736
|
-
},
|
|
737
|
-
},
|
|
738
|
-
},
|
|
739
|
-
},
|
|
740
|
-
},
|
|
741
|
-
};
|
|
742
|
-
|
|
743
|
-
export const filterSkillsByLicenseSchema: FastifySchema = {
|
|
744
|
-
description: "Filter skills by license",
|
|
745
|
-
tags: ["Skills"],
|
|
746
|
-
summary: "Filter Skills by License",
|
|
747
|
-
querystring: {
|
|
748
|
-
type: "object",
|
|
749
|
-
properties: {
|
|
750
|
-
license: { type: "string", description: "License string" },
|
|
751
|
-
},
|
|
752
|
-
required: ["license"],
|
|
753
|
-
},
|
|
754
|
-
response: {
|
|
755
|
-
200: {
|
|
756
|
-
type: "object",
|
|
757
|
-
properties: {
|
|
758
|
-
success: { type: "boolean" },
|
|
759
|
-
message: { type: "string" },
|
|
760
|
-
data: {
|
|
761
|
-
type: "object",
|
|
762
|
-
properties: {
|
|
763
|
-
records: {
|
|
764
|
-
type: "array",
|
|
765
|
-
items: { type: "object" },
|
|
766
|
-
},
|
|
767
|
-
total: { type: "number" },
|
|
768
|
-
},
|
|
769
|
-
},
|
|
770
|
-
},
|
|
771
|
-
},
|
|
772
|
-
400: {
|
|
773
|
-
type: "object",
|
|
774
|
-
properties: {
|
|
775
|
-
success: { type: "boolean" },
|
|
776
|
-
message: { type: "string" },
|
|
777
|
-
data: {
|
|
778
|
-
type: "object",
|
|
779
|
-
properties: {
|
|
780
|
-
records: {
|
|
781
|
-
type: "array",
|
|
782
|
-
items: { type: "object" },
|
|
783
|
-
},
|
|
784
|
-
total: { type: "number" },
|
|
785
|
-
},
|
|
786
|
-
},
|
|
787
|
-
},
|
|
788
|
-
},
|
|
789
|
-
500: {
|
|
790
|
-
type: "object",
|
|
791
|
-
properties: {
|
|
792
|
-
success: { type: "boolean" },
|
|
793
|
-
message: { type: "string" },
|
|
794
|
-
data: {
|
|
795
|
-
type: "object",
|
|
796
|
-
properties: {
|
|
797
|
-
records: {
|
|
798
|
-
type: "array",
|
|
799
|
-
items: { type: "object" },
|
|
800
|
-
},
|
|
801
|
-
total: { type: "number" },
|
|
802
|
-
},
|
|
803
|
-
},
|
|
804
|
-
},
|
|
805
|
-
},
|
|
806
|
-
},
|
|
807
|
-
};
|
|
808
|
-
|
|
809
|
-
export const getSandboxUrlSchema: FastifySchema = {
|
|
810
|
-
description: "Get sandbox URL based on assistant and thread configuration",
|
|
811
|
-
tags: ["Sandbox"],
|
|
812
|
-
summary: "Get Sandbox URL",
|
|
813
|
-
params: {
|
|
814
|
-
type: "object",
|
|
815
|
-
properties: {
|
|
816
|
-
assistantId: { type: "string", description: "Assistant ID" },
|
|
817
|
-
threadId: { type: "string", description: "Thread ID" },
|
|
818
|
-
},
|
|
819
|
-
required: ["assistantId", "threadId"],
|
|
820
|
-
},
|
|
821
|
-
response: {
|
|
822
|
-
200: {
|
|
823
|
-
type: "object",
|
|
824
|
-
properties: {
|
|
825
|
-
success: { type: "boolean" },
|
|
826
|
-
message: { type: "string" },
|
|
827
|
-
data: {
|
|
828
|
-
type: "object",
|
|
829
|
-
properties: {
|
|
830
|
-
sandboxUrl: { type: "string", description: "Sandbox URL" },
|
|
831
|
-
sandboxName: { type: "string", description: "Sandbox name" },
|
|
832
|
-
vmIsolation: {
|
|
833
|
-
type: "string",
|
|
834
|
-
enum: ["agent", "project", "global"],
|
|
835
|
-
description: "Sandbox isolation level",
|
|
836
|
-
},
|
|
837
|
-
},
|
|
838
|
-
},
|
|
839
|
-
},
|
|
840
|
-
},
|
|
841
|
-
404: {
|
|
842
|
-
type: "object",
|
|
843
|
-
properties: {
|
|
844
|
-
success: { type: "boolean" },
|
|
845
|
-
message: { type: "string" },
|
|
846
|
-
},
|
|
847
|
-
},
|
|
848
|
-
},
|
|
849
|
-
};
|
|
850
|
-
|
|
851
|
-
// Data Query Schema
|
|
852
|
-
export { dataQuerySchema } from "./data-query";
|