@inkeep/agents-core 0.36.1 → 0.37.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/dist/auth/auth-validation-schemas.js +17 -17
- package/dist/auth/auth.d.ts +3 -3
- package/dist/auth/auth.js +28 -2
- package/dist/{chunk-OEHP46F7.js → chunk-32YRH2S7.js} +67 -63
- package/dist/chunk-CUM6BY2Y.js +320 -0
- package/dist/{chunk-4OISWRFK.js → chunk-ICZLNCX7.js} +49 -30
- package/dist/{chunk-FOK3JSQN.js → chunk-MB2ZIPZS.js} +5 -5
- package/dist/chunk-OUXC23J7.js +12534 -0
- package/dist/{chunk-4RVJB4KV.js → chunk-Q5U2SVA6.js} +7 -8
- package/dist/{chunk-KMLLKRUY.js → chunk-SLQW43IV.js} +5 -4
- package/dist/{chunk-7GZHUB4J.js → chunk-SSRRHYU4.js} +5 -4
- package/dist/{chunk-ZCEKN54E.js → chunk-VQXQOGJU.js} +314 -312
- package/dist/{client-HrEgt7wv.d.ts → client-CnpNkGsH.d.ts} +1 -1
- package/dist/client-exports.d.ts +2 -2
- package/dist/client-exports.js +126 -125
- package/dist/constants/schema-validation/index.js +1 -1
- package/dist/credential-stores/index.d.ts +1 -1
- package/dist/credential-stores/index.js +1 -1
- package/dist/db/schema.d.ts +2 -2
- package/dist/db/test-client.d.ts +3 -3
- package/dist/index.d.ts +23 -6
- package/dist/index.js +16 -14
- package/dist/{schema-CoC3tYFX.d.ts → schema-Cgkp_geg.d.ts} +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/{utility-C4QAannk.d.ts → utility-C_tTZ7-k.d.ts} +5 -0
- package/dist/utils/schema-conversion.js +1 -1
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/package.json +4 -8
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { subAgents, subAgentRelations, agents, tasks, taskRelations, conversations, messages, contextCache, dataComponents, subAgentDataComponents, artifactComponents, subAgentArtifactComponents, externalAgents, apiKeys, credentialReferences, tools, functionTools, functions, contextConfigs, subAgentToolRelations, subAgentExternalAgentRelations, subAgentTeamAgentRelations, ledgerArtifacts, projects } from './chunk-NFYCSHD3.js';
|
|
2
2
|
import { schemaValidationDefaults } from './chunk-Z64UK4CA.js';
|
|
3
3
|
import { VALID_RELATION_TYPES, MCPTransportType, TOOL_STATUS_VALUES, CredentialStoreType, MCPServerType } from './chunk-YFHT5M2R.js';
|
|
4
|
-
import {
|
|
4
|
+
import { external_exports } from './chunk-OUXC23J7.js';
|
|
5
5
|
import { createSelectSchema as createSelectSchema$1, createInsertSchema as createInsertSchema$1 } from 'drizzle-zod';
|
|
6
6
|
import Ajv from 'ajv';
|
|
7
7
|
|
|
8
8
|
var MIN_ID_LENGTH = 1;
|
|
9
9
|
var MAX_ID_LENGTH = 255;
|
|
10
10
|
var URL_SAFE_ID_PATTERN = /^[a-zA-Z0-9\-_.]+$/;
|
|
11
|
-
var resourceIdSchema =
|
|
11
|
+
var resourceIdSchema = external_exports.string().min(MIN_ID_LENGTH).max(MAX_ID_LENGTH).describe("Resource identifier").regex(URL_SAFE_ID_PATTERN, {
|
|
12
12
|
message: "ID must contain only letters, numbers, hyphens, underscores, and dots"
|
|
13
13
|
}).openapi({
|
|
14
14
|
description: "Resource identifier",
|
|
@@ -31,12 +31,12 @@ var FIELD_MODIFIERS = {
|
|
|
31
31
|
return modified;
|
|
32
32
|
},
|
|
33
33
|
name: (_schema) => {
|
|
34
|
-
const modified =
|
|
34
|
+
const modified = external_exports.string().describe("Name");
|
|
35
35
|
modified.meta({ description: "Name" });
|
|
36
36
|
return modified;
|
|
37
37
|
},
|
|
38
38
|
description: (_schema) => {
|
|
39
|
-
const modified =
|
|
39
|
+
const modified = external_exports.string().describe("Description");
|
|
40
40
|
modified.meta({ description: "Description" });
|
|
41
41
|
return modified;
|
|
42
42
|
},
|
|
@@ -106,7 +106,7 @@ function createInsertSchemaWithModifiers(table, overrides) {
|
|
|
106
106
|
var createSelectSchema = createSelectSchemaWithModifiers;
|
|
107
107
|
var createInsertSchema = createInsertSchemaWithModifiers;
|
|
108
108
|
function registerFieldSchemas(schema) {
|
|
109
|
-
if (!(schema instanceof
|
|
109
|
+
if (!(schema instanceof external_exports.ZodObject)) {
|
|
110
110
|
return schema;
|
|
111
111
|
}
|
|
112
112
|
const shape = schema.shape;
|
|
@@ -125,12 +125,12 @@ function registerFieldSchemas(schema) {
|
|
|
125
125
|
if (fieldName in fieldMetadata && fieldSchema) {
|
|
126
126
|
let zodFieldSchema = fieldSchema;
|
|
127
127
|
let innerSchema = null;
|
|
128
|
-
if (zodFieldSchema instanceof
|
|
128
|
+
if (zodFieldSchema instanceof external_exports.ZodOptional) {
|
|
129
129
|
innerSchema = zodFieldSchema._def.innerType;
|
|
130
130
|
zodFieldSchema = innerSchema;
|
|
131
131
|
}
|
|
132
132
|
zodFieldSchema.meta(fieldMetadata[fieldName]);
|
|
133
|
-
if (fieldName === "id" && zodFieldSchema instanceof
|
|
133
|
+
if (fieldName === "id" && zodFieldSchema instanceof external_exports.ZodString) {
|
|
134
134
|
zodFieldSchema.openapi({
|
|
135
135
|
description: "Resource identifier",
|
|
136
136
|
minLength: MIN_ID_LENGTH,
|
|
@@ -138,18 +138,20 @@ function registerFieldSchemas(schema) {
|
|
|
138
138
|
pattern: URL_SAFE_ID_PATTERN.source,
|
|
139
139
|
example: "resource_789"
|
|
140
140
|
});
|
|
141
|
-
} else if (zodFieldSchema instanceof
|
|
141
|
+
} else if (zodFieldSchema instanceof external_exports.ZodString) {
|
|
142
142
|
zodFieldSchema.openapi({
|
|
143
143
|
description: fieldMetadata[fieldName].description
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
|
-
if (innerSchema && fieldSchema instanceof
|
|
146
|
+
if (innerSchema && fieldSchema instanceof external_exports.ZodOptional) {
|
|
147
147
|
fieldSchema.meta(fieldMetadata[fieldName]);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
return schema;
|
|
152
152
|
}
|
|
153
|
+
|
|
154
|
+
// src/validation/schemas.ts
|
|
153
155
|
var {
|
|
154
156
|
AGENT_EXECUTION_TRANSFER_COUNT_MAX,
|
|
155
157
|
AGENT_EXECUTION_TRANSFER_COUNT_MIN,
|
|
@@ -161,9 +163,9 @@ var {
|
|
|
161
163
|
VALIDATION_AGENT_PROMPT_MAX_CHARS,
|
|
162
164
|
VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS
|
|
163
165
|
} = schemaValidationDefaults;
|
|
164
|
-
var StopWhenSchema =
|
|
165
|
-
transferCountIs:
|
|
166
|
-
stepCountIs:
|
|
166
|
+
var StopWhenSchema = external_exports.object({
|
|
167
|
+
transferCountIs: external_exports.number().min(AGENT_EXECUTION_TRANSFER_COUNT_MIN).max(AGENT_EXECUTION_TRANSFER_COUNT_MAX).optional().describe("The maximum number of transfers to trigger the stop condition."),
|
|
168
|
+
stepCountIs: external_exports.number().min(SUB_AGENT_TURN_GENERATION_STEPS_MIN).max(SUB_AGENT_TURN_GENERATION_STEPS_MAX).optional().describe("The maximum number of steps to trigger the stop condition.")
|
|
167
169
|
}).openapi("StopWhen");
|
|
168
170
|
var AgentStopWhenSchema = StopWhenSchema.pick({ transferCountIs: true }).openapi(
|
|
169
171
|
"AgentStopWhen"
|
|
@@ -171,28 +173,28 @@ var AgentStopWhenSchema = StopWhenSchema.pick({ transferCountIs: true }).openapi
|
|
|
171
173
|
var SubAgentStopWhenSchema = StopWhenSchema.pick({ stepCountIs: true }).openapi(
|
|
172
174
|
"SubAgentStopWhen"
|
|
173
175
|
);
|
|
174
|
-
var pageNumber =
|
|
175
|
-
var limitNumber =
|
|
176
|
-
var ModelSettingsSchema =
|
|
177
|
-
model:
|
|
178
|
-
providerOptions:
|
|
176
|
+
var pageNumber = external_exports.coerce.number().min(1).default(1).openapi("PaginationPageQueryParam");
|
|
177
|
+
var limitNumber = external_exports.coerce.number().min(1).max(100).default(10).openapi("PaginationLimitQueryParam");
|
|
178
|
+
var ModelSettingsSchema = external_exports.object({
|
|
179
|
+
model: external_exports.string().optional().describe("The model to use for the project."),
|
|
180
|
+
providerOptions: external_exports.record(external_exports.string(), external_exports.any()).optional().describe("The provider options to use for the project.")
|
|
179
181
|
}).openapi("ModelSettings");
|
|
180
|
-
var ModelSchema =
|
|
182
|
+
var ModelSchema = external_exports.object({
|
|
181
183
|
base: ModelSettingsSchema.optional(),
|
|
182
184
|
structuredOutput: ModelSettingsSchema.optional(),
|
|
183
185
|
summarizer: ModelSettingsSchema.optional()
|
|
184
186
|
}).openapi("Model");
|
|
185
|
-
var ProjectModelSchema =
|
|
187
|
+
var ProjectModelSchema = external_exports.object({
|
|
186
188
|
base: ModelSettingsSchema,
|
|
187
189
|
structuredOutput: ModelSettingsSchema.optional(),
|
|
188
190
|
summarizer: ModelSettingsSchema.optional()
|
|
189
191
|
}).openapi("ProjectModel");
|
|
190
|
-
var FunctionToolConfigSchema =
|
|
191
|
-
name:
|
|
192
|
-
description:
|
|
193
|
-
inputSchema:
|
|
194
|
-
dependencies:
|
|
195
|
-
execute:
|
|
192
|
+
var FunctionToolConfigSchema = external_exports.object({
|
|
193
|
+
name: external_exports.string(),
|
|
194
|
+
description: external_exports.string(),
|
|
195
|
+
inputSchema: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
196
|
+
dependencies: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
197
|
+
execute: external_exports.union([external_exports.function(), external_exports.string()])
|
|
196
198
|
});
|
|
197
199
|
var createApiSchema = (schema) => schema.omit({ tenantId: true, projectId: true });
|
|
198
200
|
var createApiInsertSchema = (schema) => schema.omit({ tenantId: true, projectId: true });
|
|
@@ -225,7 +227,7 @@ var SubAgentRelationApiSelectSchema = createAgentScopedApiSchema(
|
|
|
225
227
|
var SubAgentRelationApiInsertSchema = createAgentScopedApiInsertSchema(
|
|
226
228
|
SubAgentRelationInsertSchema
|
|
227
229
|
).extend({
|
|
228
|
-
relationType:
|
|
230
|
+
relationType: external_exports.enum(VALID_RELATION_TYPES)
|
|
229
231
|
}).refine(
|
|
230
232
|
(data) => {
|
|
231
233
|
const hasTarget = data.targetSubAgentId != null;
|
|
@@ -242,7 +244,7 @@ var SubAgentRelationApiInsertSchema = createAgentScopedApiInsertSchema(
|
|
|
242
244
|
var SubAgentRelationApiUpdateSchema = createAgentScopedApiUpdateSchema(
|
|
243
245
|
SubAgentRelationUpdateSchema
|
|
244
246
|
).extend({
|
|
245
|
-
relationType:
|
|
247
|
+
relationType: external_exports.enum(VALID_RELATION_TYPES).optional()
|
|
246
248
|
}).refine(
|
|
247
249
|
(data) => {
|
|
248
250
|
const hasTarget = data.targetSubAgentId != null;
|
|
@@ -259,11 +261,11 @@ var SubAgentRelationApiUpdateSchema = createAgentScopedApiUpdateSchema(
|
|
|
259
261
|
path: ["targetSubAgentId", "externalSubAgentId", "teamSubAgentId"]
|
|
260
262
|
}
|
|
261
263
|
).openapi("SubAgentRelationUpdate");
|
|
262
|
-
var SubAgentRelationQuerySchema =
|
|
263
|
-
sourceSubAgentId:
|
|
264
|
-
targetSubAgentId:
|
|
265
|
-
externalSubAgentId:
|
|
266
|
-
teamSubAgentId:
|
|
264
|
+
var SubAgentRelationQuerySchema = external_exports.object({
|
|
265
|
+
sourceSubAgentId: external_exports.string().optional(),
|
|
266
|
+
targetSubAgentId: external_exports.string().optional(),
|
|
267
|
+
externalSubAgentId: external_exports.string().optional(),
|
|
268
|
+
teamSubAgentId: external_exports.string().optional()
|
|
267
269
|
});
|
|
268
270
|
var ExternalSubAgentRelationInsertSchema = createInsertSchema(subAgentRelations).extend({
|
|
269
271
|
id: resourceIdSchema,
|
|
@@ -277,7 +279,7 @@ var ExternalSubAgentRelationApiInsertSchema = createApiInsertSchema(
|
|
|
277
279
|
var AgentSelectSchema = createSelectSchema(agents);
|
|
278
280
|
var AgentInsertSchema = createInsertSchema(agents).extend({
|
|
279
281
|
id: resourceIdSchema,
|
|
280
|
-
name:
|
|
282
|
+
name: external_exports.string().trim().nonempty()
|
|
281
283
|
});
|
|
282
284
|
var AgentUpdateSchema = AgentInsertSchema.partial();
|
|
283
285
|
var AgentApiSelectSchema = createApiSchema(AgentSelectSchema).openapi("Agent");
|
|
@@ -304,7 +306,7 @@ var TaskRelationUpdateSchema = TaskRelationInsertSchema.partial();
|
|
|
304
306
|
var TaskRelationApiSelectSchema = createApiSchema(TaskRelationSelectSchema);
|
|
305
307
|
var TaskRelationApiInsertSchema = createApiInsertSchema(TaskRelationInsertSchema);
|
|
306
308
|
var TaskRelationApiUpdateSchema = createApiUpdateSchema(TaskRelationUpdateSchema);
|
|
307
|
-
var imageUrlSchema =
|
|
309
|
+
var imageUrlSchema = external_exports.string().optional().refine(
|
|
308
310
|
(url) => {
|
|
309
311
|
if (!url) return true;
|
|
310
312
|
if (url.startsWith("data:image/")) {
|
|
@@ -323,43 +325,43 @@ var imageUrlSchema = z.string().optional().refine(
|
|
|
323
325
|
message: "Image URL must be a valid HTTP(S) URL or a base64 data URL (max 1MB)"
|
|
324
326
|
}
|
|
325
327
|
);
|
|
326
|
-
var McpTransportConfigSchema =
|
|
327
|
-
type:
|
|
328
|
-
requestInit:
|
|
329
|
-
eventSourceInit:
|
|
330
|
-
reconnectionOptions:
|
|
328
|
+
var McpTransportConfigSchema = external_exports.object({
|
|
329
|
+
type: external_exports.enum(MCPTransportType),
|
|
330
|
+
requestInit: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
331
|
+
eventSourceInit: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
332
|
+
reconnectionOptions: external_exports.any().optional().openapi({
|
|
331
333
|
type: "object",
|
|
332
334
|
description: "Reconnection options for streamable HTTP transport"
|
|
333
335
|
}),
|
|
334
|
-
sessionId:
|
|
336
|
+
sessionId: external_exports.string().optional()
|
|
335
337
|
}).openapi("McpTransportConfig");
|
|
336
|
-
var ToolStatusSchema =
|
|
337
|
-
var McpToolDefinitionSchema =
|
|
338
|
-
name:
|
|
339
|
-
description:
|
|
340
|
-
inputSchema:
|
|
338
|
+
var ToolStatusSchema = external_exports.enum(TOOL_STATUS_VALUES);
|
|
339
|
+
var McpToolDefinitionSchema = external_exports.object({
|
|
340
|
+
name: external_exports.string(),
|
|
341
|
+
description: external_exports.string().optional(),
|
|
342
|
+
inputSchema: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
341
343
|
});
|
|
342
344
|
var ToolSelectSchema = createSelectSchema(tools);
|
|
343
345
|
var ToolInsertSchema = createInsertSchema(tools).extend({
|
|
344
346
|
id: resourceIdSchema,
|
|
345
347
|
imageUrl: imageUrlSchema,
|
|
346
|
-
config:
|
|
347
|
-
type:
|
|
348
|
-
mcp:
|
|
349
|
-
server:
|
|
350
|
-
url:
|
|
348
|
+
config: external_exports.object({
|
|
349
|
+
type: external_exports.literal("mcp"),
|
|
350
|
+
mcp: external_exports.object({
|
|
351
|
+
server: external_exports.object({
|
|
352
|
+
url: external_exports.url()
|
|
351
353
|
}),
|
|
352
|
-
transport:
|
|
353
|
-
type:
|
|
354
|
-
requestInit:
|
|
355
|
-
eventSourceInit:
|
|
356
|
-
reconnectionOptions:
|
|
354
|
+
transport: external_exports.object({
|
|
355
|
+
type: external_exports.enum(MCPTransportType),
|
|
356
|
+
requestInit: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
357
|
+
eventSourceInit: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
358
|
+
reconnectionOptions: external_exports.any().optional().openapi({
|
|
357
359
|
type: "object",
|
|
358
360
|
description: "Reconnection options for streamable HTTP transport"
|
|
359
361
|
}),
|
|
360
|
-
sessionId:
|
|
362
|
+
sessionId: external_exports.string().optional()
|
|
361
363
|
}).optional(),
|
|
362
|
-
activeTools:
|
|
364
|
+
activeTools: external_exports.array(external_exports.string()).optional()
|
|
363
365
|
})
|
|
364
366
|
})
|
|
365
367
|
});
|
|
@@ -454,7 +456,7 @@ var SubAgentArtifactComponentApiUpdateSchema = createAgentScopedApiUpdateSchema(
|
|
|
454
456
|
SubAgentArtifactComponentUpdateSchema
|
|
455
457
|
);
|
|
456
458
|
var ExternalAgentSelectSchema = createSelectSchema(externalAgents).extend({
|
|
457
|
-
credentialReferenceId:
|
|
459
|
+
credentialReferenceId: external_exports.string().nullable().optional()
|
|
458
460
|
});
|
|
459
461
|
var ExternalAgentInsertSchema = createInsertSchema(externalAgents).extend({
|
|
460
462
|
id: resourceIdSchema
|
|
@@ -463,9 +465,9 @@ var ExternalAgentUpdateSchema = ExternalAgentInsertSchema.partial();
|
|
|
463
465
|
var ExternalAgentApiSelectSchema = createApiSchema(ExternalAgentSelectSchema).openapi("ExternalAgent");
|
|
464
466
|
var ExternalAgentApiInsertSchema = createApiInsertSchema(ExternalAgentInsertSchema).openapi("ExternalAgentCreate");
|
|
465
467
|
var ExternalAgentApiUpdateSchema = createApiUpdateSchema(ExternalAgentUpdateSchema).openapi("ExternalAgentUpdate");
|
|
466
|
-
var AllAgentSchema =
|
|
467
|
-
SubAgentApiSelectSchema.extend({ type:
|
|
468
|
-
ExternalAgentApiSelectSchema.extend({ type:
|
|
468
|
+
var AllAgentSchema = external_exports.discriminatedUnion("type", [
|
|
469
|
+
SubAgentApiSelectSchema.extend({ type: external_exports.literal("internal") }),
|
|
470
|
+
ExternalAgentApiSelectSchema.extend({ type: external_exports.literal("external") })
|
|
469
471
|
]);
|
|
470
472
|
var ApiKeySelectSchema = createSelectSchema(apiKeys);
|
|
471
473
|
var ApiKeyInsertSchema = createInsertSchema(apiKeys).extend({
|
|
@@ -487,10 +489,10 @@ var ApiKeyApiSelectSchema = ApiKeySelectSchema.omit({
|
|
|
487
489
|
keyHash: true
|
|
488
490
|
// Never expose the hash
|
|
489
491
|
}).openapi("ApiKey");
|
|
490
|
-
var ApiKeyApiCreationResponseSchema =
|
|
491
|
-
data:
|
|
492
|
+
var ApiKeyApiCreationResponseSchema = external_exports.object({
|
|
493
|
+
data: external_exports.object({
|
|
492
494
|
apiKey: ApiKeyApiSelectSchema,
|
|
493
|
-
key:
|
|
495
|
+
key: external_exports.string().describe("The full API key (shown only once)")
|
|
494
496
|
})
|
|
495
497
|
});
|
|
496
498
|
var ApiKeyApiInsertSchema = ApiKeyInsertSchema.omit({
|
|
@@ -508,89 +510,89 @@ var ApiKeyApiInsertSchema = ApiKeyInsertSchema.omit({
|
|
|
508
510
|
// Not set on creation
|
|
509
511
|
}).openapi("ApiKeyCreate");
|
|
510
512
|
var ApiKeyApiUpdateSchema = ApiKeyUpdateSchema.openapi("ApiKeyUpdate");
|
|
511
|
-
var CredentialReferenceSelectSchema =
|
|
512
|
-
id:
|
|
513
|
-
tenantId:
|
|
514
|
-
projectId:
|
|
515
|
-
name:
|
|
516
|
-
type:
|
|
517
|
-
credentialStoreId:
|
|
518
|
-
retrievalParams:
|
|
519
|
-
createdAt:
|
|
520
|
-
updatedAt:
|
|
513
|
+
var CredentialReferenceSelectSchema = external_exports.object({
|
|
514
|
+
id: external_exports.string(),
|
|
515
|
+
tenantId: external_exports.string(),
|
|
516
|
+
projectId: external_exports.string(),
|
|
517
|
+
name: external_exports.string(),
|
|
518
|
+
type: external_exports.string(),
|
|
519
|
+
credentialStoreId: external_exports.string(),
|
|
520
|
+
retrievalParams: external_exports.record(external_exports.string(), external_exports.unknown()).nullish(),
|
|
521
|
+
createdAt: external_exports.string(),
|
|
522
|
+
updatedAt: external_exports.string()
|
|
521
523
|
});
|
|
522
524
|
var CredentialReferenceInsertSchema = createInsertSchema(credentialReferences).extend({
|
|
523
525
|
id: resourceIdSchema,
|
|
524
|
-
type:
|
|
526
|
+
type: external_exports.string(),
|
|
525
527
|
credentialStoreId: resourceIdSchema,
|
|
526
|
-
retrievalParams:
|
|
528
|
+
retrievalParams: external_exports.record(external_exports.string(), external_exports.unknown()).nullish()
|
|
527
529
|
});
|
|
528
530
|
var CredentialReferenceUpdateSchema = CredentialReferenceInsertSchema.partial();
|
|
529
531
|
var CredentialReferenceApiSelectSchema = createApiSchema(CredentialReferenceSelectSchema).extend({
|
|
530
|
-
type:
|
|
531
|
-
tools:
|
|
532
|
-
externalAgents:
|
|
532
|
+
type: external_exports.enum(CredentialStoreType),
|
|
533
|
+
tools: external_exports.array(ToolSelectSchema).optional(),
|
|
534
|
+
externalAgents: external_exports.array(ExternalAgentSelectSchema).optional()
|
|
533
535
|
}).openapi("CredentialReference");
|
|
534
536
|
var CredentialReferenceApiInsertSchema = createApiInsertSchema(
|
|
535
537
|
CredentialReferenceInsertSchema
|
|
536
538
|
).extend({
|
|
537
|
-
type:
|
|
539
|
+
type: external_exports.enum(CredentialStoreType)
|
|
538
540
|
}).openapi("CredentialReferenceCreate");
|
|
539
541
|
var CredentialReferenceApiUpdateSchema = createApiUpdateSchema(
|
|
540
542
|
CredentialReferenceUpdateSchema
|
|
541
543
|
).extend({
|
|
542
|
-
type:
|
|
544
|
+
type: external_exports.enum(CredentialStoreType).optional()
|
|
543
545
|
}).openapi("CredentialReferenceUpdate");
|
|
544
|
-
var CredentialStoreSchema =
|
|
545
|
-
id:
|
|
546
|
-
type:
|
|
547
|
-
available:
|
|
548
|
-
reason:
|
|
546
|
+
var CredentialStoreSchema = external_exports.object({
|
|
547
|
+
id: external_exports.string().describe("Unique identifier of the credential store"),
|
|
548
|
+
type: external_exports.enum(CredentialStoreType),
|
|
549
|
+
available: external_exports.boolean().describe("Whether the store is functional and ready to use"),
|
|
550
|
+
reason: external_exports.string().nullable().describe("Reason why store is not available, if applicable")
|
|
549
551
|
}).openapi("CredentialStore");
|
|
550
|
-
var CredentialStoreListResponseSchema =
|
|
551
|
-
data:
|
|
552
|
+
var CredentialStoreListResponseSchema = external_exports.object({
|
|
553
|
+
data: external_exports.array(CredentialStoreSchema).describe("List of credential stores")
|
|
552
554
|
}).openapi("CredentialStoreListResponse");
|
|
553
|
-
var CreateCredentialInStoreRequestSchema =
|
|
554
|
-
key:
|
|
555
|
-
value:
|
|
556
|
-
metadata:
|
|
555
|
+
var CreateCredentialInStoreRequestSchema = external_exports.object({
|
|
556
|
+
key: external_exports.string().describe("The credential key"),
|
|
557
|
+
value: external_exports.string().describe("The credential value"),
|
|
558
|
+
metadata: external_exports.record(external_exports.string(), external_exports.string()).nullish().describe("The metadata for the credential")
|
|
557
559
|
}).openapi("CreateCredentialInStoreRequest");
|
|
558
|
-
var CreateCredentialInStoreResponseSchema =
|
|
559
|
-
data:
|
|
560
|
-
key:
|
|
561
|
-
storeId:
|
|
562
|
-
createdAt:
|
|
560
|
+
var CreateCredentialInStoreResponseSchema = external_exports.object({
|
|
561
|
+
data: external_exports.object({
|
|
562
|
+
key: external_exports.string().describe("The credential key"),
|
|
563
|
+
storeId: external_exports.string().describe("The store ID where credential was created"),
|
|
564
|
+
createdAt: external_exports.string().describe("ISO timestamp of creation")
|
|
563
565
|
})
|
|
564
566
|
}).openapi("CreateCredentialInStoreResponse");
|
|
565
|
-
var RelatedAgentInfoSchema =
|
|
566
|
-
id:
|
|
567
|
-
name:
|
|
568
|
-
description:
|
|
567
|
+
var RelatedAgentInfoSchema = external_exports.object({
|
|
568
|
+
id: external_exports.string(),
|
|
569
|
+
name: external_exports.string(),
|
|
570
|
+
description: external_exports.string()
|
|
569
571
|
}).openapi("RelatedAgentInfo");
|
|
570
|
-
var ComponentAssociationSchema =
|
|
571
|
-
subAgentId:
|
|
572
|
-
createdAt:
|
|
572
|
+
var ComponentAssociationSchema = external_exports.object({
|
|
573
|
+
subAgentId: external_exports.string(),
|
|
574
|
+
createdAt: external_exports.string()
|
|
573
575
|
}).openapi("ComponentAssociation");
|
|
574
|
-
var OAuthLoginQuerySchema =
|
|
575
|
-
tenantId:
|
|
576
|
-
projectId:
|
|
577
|
-
toolId:
|
|
576
|
+
var OAuthLoginQuerySchema = external_exports.object({
|
|
577
|
+
tenantId: external_exports.string().min(1, "Tenant ID is required"),
|
|
578
|
+
projectId: external_exports.string().min(1, "Project ID is required"),
|
|
579
|
+
toolId: external_exports.string().min(1, "Tool ID is required")
|
|
578
580
|
}).openapi("OAuthLoginQuery");
|
|
579
|
-
var OAuthCallbackQuerySchema =
|
|
580
|
-
code:
|
|
581
|
-
state:
|
|
582
|
-
error:
|
|
583
|
-
error_description:
|
|
581
|
+
var OAuthCallbackQuerySchema = external_exports.object({
|
|
582
|
+
code: external_exports.string().min(1, "Authorization code is required"),
|
|
583
|
+
state: external_exports.string().min(1, "State parameter is required"),
|
|
584
|
+
error: external_exports.string().optional(),
|
|
585
|
+
error_description: external_exports.string().optional()
|
|
584
586
|
}).openapi("OAuthCallbackQuery");
|
|
585
587
|
var McpToolSchema = ToolInsertSchema.extend({
|
|
586
588
|
imageUrl: imageUrlSchema,
|
|
587
|
-
availableTools:
|
|
589
|
+
availableTools: external_exports.array(McpToolDefinitionSchema).optional(),
|
|
588
590
|
status: ToolStatusSchema.default("unknown"),
|
|
589
|
-
version:
|
|
590
|
-
createdAt:
|
|
591
|
-
updatedAt:
|
|
592
|
-
expiresAt:
|
|
593
|
-
relationshipId:
|
|
591
|
+
version: external_exports.string().optional(),
|
|
592
|
+
createdAt: external_exports.date(),
|
|
593
|
+
updatedAt: external_exports.date(),
|
|
594
|
+
expiresAt: external_exports.date().optional(),
|
|
595
|
+
relationshipId: external_exports.string().optional()
|
|
594
596
|
}).openapi("McpTool");
|
|
595
597
|
var MCPToolConfigSchema = McpToolSchema.omit({
|
|
596
598
|
config: true,
|
|
@@ -602,12 +604,12 @@ var MCPToolConfigSchema = McpToolSchema.omit({
|
|
|
602
604
|
updatedAt: true,
|
|
603
605
|
credentialReferenceId: true
|
|
604
606
|
}).extend({
|
|
605
|
-
tenantId:
|
|
606
|
-
projectId:
|
|
607
|
-
description:
|
|
608
|
-
serverUrl:
|
|
609
|
-
activeTools:
|
|
610
|
-
mcpType:
|
|
607
|
+
tenantId: external_exports.string().optional(),
|
|
608
|
+
projectId: external_exports.string().optional(),
|
|
609
|
+
description: external_exports.string().optional(),
|
|
610
|
+
serverUrl: external_exports.url(),
|
|
611
|
+
activeTools: external_exports.array(external_exports.string()).optional(),
|
|
612
|
+
mcpType: external_exports.enum(MCPServerType).optional(),
|
|
611
613
|
transport: McpTransportConfigSchema.optional(),
|
|
612
614
|
credential: CredentialReferenceApiInsertSchema.optional()
|
|
613
615
|
});
|
|
@@ -631,40 +633,40 @@ var FunctionUpdateSchema = FunctionInsertSchema.partial();
|
|
|
631
633
|
var FunctionApiSelectSchema = createApiSchema(FunctionSelectSchema).openapi("Function");
|
|
632
634
|
var FunctionApiInsertSchema = createApiInsertSchema(FunctionInsertSchema).openapi("FunctionCreate");
|
|
633
635
|
var FunctionApiUpdateSchema = createApiUpdateSchema(FunctionUpdateSchema).openapi("FunctionUpdate");
|
|
634
|
-
var FetchConfigSchema =
|
|
635
|
-
url:
|
|
636
|
-
method:
|
|
637
|
-
headers:
|
|
638
|
-
body:
|
|
639
|
-
transform:
|
|
636
|
+
var FetchConfigSchema = external_exports.object({
|
|
637
|
+
url: external_exports.string().min(1, "URL is required"),
|
|
638
|
+
method: external_exports.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().default("GET"),
|
|
639
|
+
headers: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
640
|
+
body: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
641
|
+
transform: external_exports.string().optional(),
|
|
640
642
|
// JSONPath or JS transform function
|
|
641
|
-
timeout:
|
|
643
|
+
timeout: external_exports.number().min(0).optional().default(CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT).optional()
|
|
642
644
|
}).openapi("FetchConfig");
|
|
643
|
-
var FetchDefinitionSchema =
|
|
644
|
-
id:
|
|
645
|
-
name:
|
|
646
|
-
trigger:
|
|
645
|
+
var FetchDefinitionSchema = external_exports.object({
|
|
646
|
+
id: external_exports.string().min(1, "Fetch definition ID is required"),
|
|
647
|
+
name: external_exports.string().optional(),
|
|
648
|
+
trigger: external_exports.enum(["initialization", "invocation"]),
|
|
647
649
|
fetchConfig: FetchConfigSchema,
|
|
648
|
-
responseSchema:
|
|
650
|
+
responseSchema: external_exports.any().optional(),
|
|
649
651
|
// JSON Schema for validating HTTP response
|
|
650
|
-
defaultValue:
|
|
652
|
+
defaultValue: external_exports.any().optional().openapi({
|
|
651
653
|
description: "Default value if fetch fails"
|
|
652
654
|
}),
|
|
653
655
|
credential: CredentialReferenceApiInsertSchema.optional()
|
|
654
656
|
}).openapi("FetchDefinition");
|
|
655
657
|
var ContextConfigSelectSchema = createSelectSchema(contextConfigs).extend({
|
|
656
|
-
headersSchema:
|
|
658
|
+
headersSchema: external_exports.any().optional().openapi({
|
|
657
659
|
type: "object",
|
|
658
660
|
description: "JSON Schema for validating request headers"
|
|
659
661
|
})
|
|
660
662
|
});
|
|
661
663
|
var ContextConfigInsertSchema = createInsertSchema(contextConfigs).extend({
|
|
662
664
|
id: resourceIdSchema.optional(),
|
|
663
|
-
headersSchema:
|
|
665
|
+
headersSchema: external_exports.any().nullable().optional().openapi({
|
|
664
666
|
type: "object",
|
|
665
667
|
description: "JSON Schema for validating request headers"
|
|
666
668
|
}),
|
|
667
|
-
contextVariables:
|
|
669
|
+
contextVariables: external_exports.any().nullable().optional().openapi({
|
|
668
670
|
type: "object",
|
|
669
671
|
description: "Context variables configuration with fetch definitions"
|
|
670
672
|
})
|
|
@@ -687,8 +689,8 @@ var SubAgentToolRelationInsertSchema = createInsertSchema(subAgentToolRelations)
|
|
|
687
689
|
id: resourceIdSchema,
|
|
688
690
|
subAgentId: resourceIdSchema,
|
|
689
691
|
toolId: resourceIdSchema,
|
|
690
|
-
selectedTools:
|
|
691
|
-
headers:
|
|
692
|
+
selectedTools: external_exports.array(external_exports.string()).nullish(),
|
|
693
|
+
headers: external_exports.record(external_exports.string(), external_exports.string()).nullish()
|
|
692
694
|
});
|
|
693
695
|
var SubAgentToolRelationUpdateSchema = SubAgentToolRelationInsertSchema.partial();
|
|
694
696
|
var SubAgentToolRelationApiSelectSchema = createAgentScopedApiSchema(
|
|
@@ -709,7 +711,7 @@ var SubAgentExternalAgentRelationInsertSchema = createInsertSchema(
|
|
|
709
711
|
id: resourceIdSchema,
|
|
710
712
|
subAgentId: resourceIdSchema,
|
|
711
713
|
externalAgentId: resourceIdSchema,
|
|
712
|
-
headers:
|
|
714
|
+
headers: external_exports.record(external_exports.string(), external_exports.string()).nullish()
|
|
713
715
|
});
|
|
714
716
|
var SubAgentExternalAgentRelationUpdateSchema = SubAgentExternalAgentRelationInsertSchema.partial();
|
|
715
717
|
var SubAgentExternalAgentRelationApiSelectSchema = createAgentScopedApiSchema(
|
|
@@ -728,7 +730,7 @@ var SubAgentTeamAgentRelationInsertSchema = createInsertSchema(
|
|
|
728
730
|
id: resourceIdSchema,
|
|
729
731
|
subAgentId: resourceIdSchema,
|
|
730
732
|
targetAgentId: resourceIdSchema,
|
|
731
|
-
headers:
|
|
733
|
+
headers: external_exports.record(external_exports.string(), external_exports.string()).nullish()
|
|
732
734
|
});
|
|
733
735
|
var SubAgentTeamAgentRelationUpdateSchema = SubAgentTeamAgentRelationInsertSchema.partial();
|
|
734
736
|
var SubAgentTeamAgentRelationApiSelectSchema = createAgentScopedApiSchema(
|
|
@@ -746,57 +748,57 @@ var LedgerArtifactUpdateSchema = LedgerArtifactInsertSchema.partial();
|
|
|
746
748
|
var LedgerArtifactApiSelectSchema = createApiSchema(LedgerArtifactSelectSchema);
|
|
747
749
|
var LedgerArtifactApiInsertSchema = createApiInsertSchema(LedgerArtifactInsertSchema);
|
|
748
750
|
var LedgerArtifactApiUpdateSchema = createApiUpdateSchema(LedgerArtifactUpdateSchema);
|
|
749
|
-
var StatusComponentSchema =
|
|
750
|
-
type:
|
|
751
|
-
description:
|
|
752
|
-
detailsSchema:
|
|
753
|
-
type:
|
|
754
|
-
properties:
|
|
755
|
-
required:
|
|
751
|
+
var StatusComponentSchema = external_exports.object({
|
|
752
|
+
type: external_exports.string(),
|
|
753
|
+
description: external_exports.string().optional(),
|
|
754
|
+
detailsSchema: external_exports.object({
|
|
755
|
+
type: external_exports.literal("object"),
|
|
756
|
+
properties: external_exports.record(external_exports.string(), external_exports.any()),
|
|
757
|
+
required: external_exports.array(external_exports.string()).optional()
|
|
756
758
|
}).optional()
|
|
757
759
|
}).openapi("StatusComponent");
|
|
758
|
-
var StatusUpdateSchema =
|
|
759
|
-
enabled:
|
|
760
|
-
numEvents:
|
|
761
|
-
timeInSeconds:
|
|
762
|
-
prompt:
|
|
760
|
+
var StatusUpdateSchema = external_exports.object({
|
|
761
|
+
enabled: external_exports.boolean().optional(),
|
|
762
|
+
numEvents: external_exports.number().min(1).max(STATUS_UPDATE_MAX_NUM_EVENTS).optional(),
|
|
763
|
+
timeInSeconds: external_exports.number().min(1).max(STATUS_UPDATE_MAX_INTERVAL_SECONDS).optional(),
|
|
764
|
+
prompt: external_exports.string().max(
|
|
763
765
|
VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS,
|
|
764
766
|
`Custom prompt cannot exceed ${VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS} characters`
|
|
765
767
|
).optional(),
|
|
766
|
-
statusComponents:
|
|
768
|
+
statusComponents: external_exports.array(StatusComponentSchema).optional()
|
|
767
769
|
}).openapi("StatusUpdate");
|
|
768
|
-
var CanUseItemSchema =
|
|
769
|
-
agentToolRelationId:
|
|
770
|
-
toolId:
|
|
771
|
-
toolSelection:
|
|
772
|
-
headers:
|
|
770
|
+
var CanUseItemSchema = external_exports.object({
|
|
771
|
+
agentToolRelationId: external_exports.string().optional(),
|
|
772
|
+
toolId: external_exports.string(),
|
|
773
|
+
toolSelection: external_exports.array(external_exports.string()).nullish(),
|
|
774
|
+
headers: external_exports.record(external_exports.string(), external_exports.string()).nullish()
|
|
773
775
|
}).openapi("CanUseItem");
|
|
774
|
-
var canDelegateToExternalAgentSchema =
|
|
775
|
-
externalAgentId:
|
|
776
|
-
subAgentExternalAgentRelationId:
|
|
777
|
-
headers:
|
|
776
|
+
var canDelegateToExternalAgentSchema = external_exports.object({
|
|
777
|
+
externalAgentId: external_exports.string(),
|
|
778
|
+
subAgentExternalAgentRelationId: external_exports.string().optional(),
|
|
779
|
+
headers: external_exports.record(external_exports.string(), external_exports.string()).nullish()
|
|
778
780
|
}).openapi("CanDelegateToExternalAgent");
|
|
779
|
-
var canDelegateToTeamAgentSchema =
|
|
780
|
-
agentId:
|
|
781
|
-
subAgentTeamAgentRelationId:
|
|
782
|
-
headers:
|
|
781
|
+
var canDelegateToTeamAgentSchema = external_exports.object({
|
|
782
|
+
agentId: external_exports.string(),
|
|
783
|
+
subAgentTeamAgentRelationId: external_exports.string().optional(),
|
|
784
|
+
headers: external_exports.record(external_exports.string(), external_exports.string()).nullish()
|
|
783
785
|
}).openapi("CanDelegateToTeamAgent");
|
|
784
|
-
var TeamAgentSchema =
|
|
785
|
-
id:
|
|
786
|
-
name:
|
|
787
|
-
description:
|
|
786
|
+
var TeamAgentSchema = external_exports.object({
|
|
787
|
+
id: external_exports.string(),
|
|
788
|
+
name: external_exports.string(),
|
|
789
|
+
description: external_exports.string()
|
|
788
790
|
}).openapi("TeamAgent");
|
|
789
791
|
var FullAgentAgentInsertSchema = SubAgentApiInsertSchema.extend({
|
|
790
|
-
type:
|
|
791
|
-
canUse:
|
|
792
|
+
type: external_exports.literal("internal"),
|
|
793
|
+
canUse: external_exports.array(CanUseItemSchema),
|
|
792
794
|
// All tools (both MCP and function tools)
|
|
793
|
-
dataComponents:
|
|
794
|
-
artifactComponents:
|
|
795
|
-
canTransferTo:
|
|
796
|
-
prompt:
|
|
797
|
-
canDelegateTo:
|
|
798
|
-
|
|
799
|
-
|
|
795
|
+
dataComponents: external_exports.array(external_exports.string()).optional(),
|
|
796
|
+
artifactComponents: external_exports.array(external_exports.string()).optional(),
|
|
797
|
+
canTransferTo: external_exports.array(external_exports.string()).optional(),
|
|
798
|
+
prompt: external_exports.string().trim().nonempty(),
|
|
799
|
+
canDelegateTo: external_exports.array(
|
|
800
|
+
external_exports.union([
|
|
801
|
+
external_exports.string(),
|
|
800
802
|
// Internal subAgent ID
|
|
801
803
|
canDelegateToExternalAgentSchema,
|
|
802
804
|
// External agent with headers
|
|
@@ -806,53 +808,53 @@ var FullAgentAgentInsertSchema = SubAgentApiInsertSchema.extend({
|
|
|
806
808
|
).optional()
|
|
807
809
|
}).openapi("FullAgentAgentInsert");
|
|
808
810
|
var AgentWithinContextOfProjectSchema = AgentApiInsertSchema.extend({
|
|
809
|
-
subAgents:
|
|
811
|
+
subAgents: external_exports.record(external_exports.string(), FullAgentAgentInsertSchema),
|
|
810
812
|
// Lookup maps for UI to resolve canUse items
|
|
811
|
-
tools:
|
|
813
|
+
tools: external_exports.record(external_exports.string(), ToolApiInsertSchema).optional(),
|
|
812
814
|
// MCP tools (project-scoped)
|
|
813
|
-
externalAgents:
|
|
815
|
+
externalAgents: external_exports.record(external_exports.string(), ExternalAgentApiInsertSchema).optional(),
|
|
814
816
|
// External agents (project-scoped)
|
|
815
|
-
teamAgents:
|
|
817
|
+
teamAgents: external_exports.record(external_exports.string(), TeamAgentSchema).optional(),
|
|
816
818
|
// Team agents contain basic metadata for the agent to be delegated to
|
|
817
|
-
functionTools:
|
|
819
|
+
functionTools: external_exports.record(external_exports.string(), FunctionToolApiInsertSchema).optional(),
|
|
818
820
|
// Function tools (agent-scoped)
|
|
819
|
-
functions:
|
|
821
|
+
functions: external_exports.record(external_exports.string(), FunctionApiInsertSchema).optional(),
|
|
820
822
|
// Get function code for function tools
|
|
821
|
-
contextConfig:
|
|
822
|
-
statusUpdates:
|
|
823
|
+
contextConfig: external_exports.optional(ContextConfigApiInsertSchema),
|
|
824
|
+
statusUpdates: external_exports.optional(StatusUpdateSchema),
|
|
823
825
|
models: ModelSchema.optional(),
|
|
824
826
|
stopWhen: AgentStopWhenSchema.optional(),
|
|
825
|
-
prompt:
|
|
827
|
+
prompt: external_exports.string().max(
|
|
826
828
|
VALIDATION_AGENT_PROMPT_MAX_CHARS,
|
|
827
829
|
`Agent prompt cannot exceed ${VALIDATION_AGENT_PROMPT_MAX_CHARS} characters`
|
|
828
830
|
).optional()
|
|
829
831
|
}).openapi("AgentWithinContextOfProject");
|
|
830
|
-
var PaginationSchema =
|
|
832
|
+
var PaginationSchema = external_exports.object({
|
|
831
833
|
page: pageNumber,
|
|
832
834
|
limit: limitNumber,
|
|
833
|
-
total:
|
|
834
|
-
pages:
|
|
835
|
+
total: external_exports.number(),
|
|
836
|
+
pages: external_exports.number()
|
|
835
837
|
}).openapi("Pagination");
|
|
836
|
-
var ListResponseSchema = (itemSchema) =>
|
|
837
|
-
data:
|
|
838
|
+
var ListResponseSchema = (itemSchema) => external_exports.object({
|
|
839
|
+
data: external_exports.array(itemSchema),
|
|
838
840
|
pagination: PaginationSchema
|
|
839
841
|
});
|
|
840
|
-
var SingleResponseSchema = (itemSchema) =>
|
|
842
|
+
var SingleResponseSchema = (itemSchema) => external_exports.object({
|
|
841
843
|
data: itemSchema
|
|
842
844
|
});
|
|
843
|
-
var ErrorResponseSchema =
|
|
844
|
-
error:
|
|
845
|
-
message:
|
|
846
|
-
details:
|
|
845
|
+
var ErrorResponseSchema = external_exports.object({
|
|
846
|
+
error: external_exports.string(),
|
|
847
|
+
message: external_exports.string().optional(),
|
|
848
|
+
details: external_exports.any().optional().openapi({
|
|
847
849
|
description: "Additional error details"
|
|
848
850
|
})
|
|
849
851
|
}).openapi("ErrorResponse");
|
|
850
|
-
var ExistsResponseSchema =
|
|
851
|
-
exists:
|
|
852
|
+
var ExistsResponseSchema = external_exports.object({
|
|
853
|
+
exists: external_exports.boolean()
|
|
852
854
|
}).openapi("ExistsResponse");
|
|
853
|
-
var RemovedResponseSchema =
|
|
854
|
-
message:
|
|
855
|
-
removed:
|
|
855
|
+
var RemovedResponseSchema = external_exports.object({
|
|
856
|
+
message: external_exports.string(),
|
|
857
|
+
removed: external_exports.boolean()
|
|
856
858
|
}).openapi("RemovedResponse");
|
|
857
859
|
var ProjectSelectSchema = registerFieldSchemas(
|
|
858
860
|
createSelectSchema(projects).extend({
|
|
@@ -879,147 +881,147 @@ var ProjectApiInsertSchema = ProjectInsertSchema.omit({ tenantId: true }).openap
|
|
|
879
881
|
);
|
|
880
882
|
var ProjectApiUpdateSchema = ProjectUpdateSchema.openapi("ProjectUpdate");
|
|
881
883
|
var FullProjectDefinitionSchema = ProjectApiInsertSchema.extend({
|
|
882
|
-
agents:
|
|
883
|
-
tools:
|
|
884
|
-
functionTools:
|
|
885
|
-
functions:
|
|
886
|
-
dataComponents:
|
|
887
|
-
artifactComponents:
|
|
888
|
-
externalAgents:
|
|
889
|
-
statusUpdates:
|
|
890
|
-
credentialReferences:
|
|
891
|
-
createdAt:
|
|
892
|
-
updatedAt:
|
|
884
|
+
agents: external_exports.record(external_exports.string(), AgentWithinContextOfProjectSchema),
|
|
885
|
+
tools: external_exports.record(external_exports.string(), ToolApiInsertSchema),
|
|
886
|
+
functionTools: external_exports.record(external_exports.string(), FunctionToolApiInsertSchema).optional(),
|
|
887
|
+
functions: external_exports.record(external_exports.string(), FunctionApiInsertSchema).optional(),
|
|
888
|
+
dataComponents: external_exports.record(external_exports.string(), DataComponentApiInsertSchema).optional(),
|
|
889
|
+
artifactComponents: external_exports.record(external_exports.string(), ArtifactComponentApiInsertSchema).optional(),
|
|
890
|
+
externalAgents: external_exports.record(external_exports.string(), ExternalAgentApiInsertSchema).optional(),
|
|
891
|
+
statusUpdates: external_exports.optional(StatusUpdateSchema),
|
|
892
|
+
credentialReferences: external_exports.record(external_exports.string(), CredentialReferenceApiInsertSchema).optional(),
|
|
893
|
+
createdAt: external_exports.string().optional(),
|
|
894
|
+
updatedAt: external_exports.string().optional()
|
|
893
895
|
}).openapi("FullProjectDefinition");
|
|
894
|
-
var ProjectResponse =
|
|
895
|
-
var SubAgentResponse =
|
|
896
|
-
var AgentResponse =
|
|
897
|
-
var ToolResponse =
|
|
898
|
-
var ExternalAgentResponse =
|
|
899
|
-
var ContextConfigResponse =
|
|
900
|
-
var ApiKeyResponse =
|
|
901
|
-
var CredentialReferenceResponse =
|
|
902
|
-
var FunctionResponse =
|
|
903
|
-
var FunctionToolResponse =
|
|
904
|
-
var DataComponentResponse =
|
|
905
|
-
var ArtifactComponentResponse =
|
|
906
|
-
var SubAgentRelationResponse =
|
|
907
|
-
var SubAgentToolRelationResponse =
|
|
908
|
-
var ConversationResponse =
|
|
909
|
-
var MessageResponse =
|
|
910
|
-
var ProjectListResponse =
|
|
911
|
-
data:
|
|
896
|
+
var ProjectResponse = external_exports.object({ data: ProjectApiSelectSchema }).openapi("ProjectResponse");
|
|
897
|
+
var SubAgentResponse = external_exports.object({ data: SubAgentApiSelectSchema }).openapi("SubAgentResponse");
|
|
898
|
+
var AgentResponse = external_exports.object({ data: AgentApiSelectSchema }).openapi("AgentResponse");
|
|
899
|
+
var ToolResponse = external_exports.object({ data: ToolApiSelectSchema }).openapi("ToolResponse");
|
|
900
|
+
var ExternalAgentResponse = external_exports.object({ data: ExternalAgentApiSelectSchema }).openapi("ExternalAgentResponse");
|
|
901
|
+
var ContextConfigResponse = external_exports.object({ data: ContextConfigApiSelectSchema }).openapi("ContextConfigResponse");
|
|
902
|
+
var ApiKeyResponse = external_exports.object({ data: ApiKeyApiSelectSchema }).openapi("ApiKeyResponse");
|
|
903
|
+
var CredentialReferenceResponse = external_exports.object({ data: CredentialReferenceApiSelectSchema }).openapi("CredentialReferenceResponse");
|
|
904
|
+
var FunctionResponse = external_exports.object({ data: FunctionApiSelectSchema }).openapi("FunctionResponse");
|
|
905
|
+
var FunctionToolResponse = external_exports.object({ data: FunctionToolApiSelectSchema }).openapi("FunctionToolResponse");
|
|
906
|
+
var DataComponentResponse = external_exports.object({ data: DataComponentApiSelectSchema }).openapi("DataComponentResponse");
|
|
907
|
+
var ArtifactComponentResponse = external_exports.object({ data: ArtifactComponentApiSelectSchema }).openapi("ArtifactComponentResponse");
|
|
908
|
+
var SubAgentRelationResponse = external_exports.object({ data: SubAgentRelationApiSelectSchema }).openapi("SubAgentRelationResponse");
|
|
909
|
+
var SubAgentToolRelationResponse = external_exports.object({ data: SubAgentToolRelationApiSelectSchema }).openapi("SubAgentToolRelationResponse");
|
|
910
|
+
var ConversationResponse = external_exports.object({ data: ConversationApiSelectSchema }).openapi("ConversationResponse");
|
|
911
|
+
var MessageResponse = external_exports.object({ data: MessageApiSelectSchema }).openapi("MessageResponse");
|
|
912
|
+
var ProjectListResponse = external_exports.object({
|
|
913
|
+
data: external_exports.array(ProjectApiSelectSchema),
|
|
912
914
|
pagination: PaginationSchema
|
|
913
915
|
}).openapi("ProjectListResponse");
|
|
914
|
-
var SubAgentListResponse =
|
|
915
|
-
data:
|
|
916
|
+
var SubAgentListResponse = external_exports.object({
|
|
917
|
+
data: external_exports.array(SubAgentApiSelectSchema),
|
|
916
918
|
pagination: PaginationSchema
|
|
917
919
|
}).openapi("SubAgentListResponse");
|
|
918
|
-
var AgentListResponse =
|
|
919
|
-
data:
|
|
920
|
+
var AgentListResponse = external_exports.object({
|
|
921
|
+
data: external_exports.array(AgentApiSelectSchema),
|
|
920
922
|
pagination: PaginationSchema
|
|
921
923
|
}).openapi("AgentListResponse");
|
|
922
|
-
var ToolListResponse =
|
|
923
|
-
data:
|
|
924
|
+
var ToolListResponse = external_exports.object({
|
|
925
|
+
data: external_exports.array(ToolApiSelectSchema),
|
|
924
926
|
pagination: PaginationSchema
|
|
925
927
|
}).openapi("ToolListResponse");
|
|
926
|
-
var ExternalAgentListResponse =
|
|
927
|
-
data:
|
|
928
|
+
var ExternalAgentListResponse = external_exports.object({
|
|
929
|
+
data: external_exports.array(ExternalAgentApiSelectSchema),
|
|
928
930
|
pagination: PaginationSchema
|
|
929
931
|
}).openapi("ExternalAgentListResponse");
|
|
930
|
-
var ContextConfigListResponse =
|
|
931
|
-
data:
|
|
932
|
+
var ContextConfigListResponse = external_exports.object({
|
|
933
|
+
data: external_exports.array(ContextConfigApiSelectSchema),
|
|
932
934
|
pagination: PaginationSchema
|
|
933
935
|
}).openapi("ContextConfigListResponse");
|
|
934
|
-
var ApiKeyListResponse =
|
|
935
|
-
data:
|
|
936
|
+
var ApiKeyListResponse = external_exports.object({
|
|
937
|
+
data: external_exports.array(ApiKeyApiSelectSchema),
|
|
936
938
|
pagination: PaginationSchema
|
|
937
939
|
}).openapi("ApiKeyListResponse");
|
|
938
|
-
var CredentialReferenceListResponse =
|
|
939
|
-
data:
|
|
940
|
+
var CredentialReferenceListResponse = external_exports.object({
|
|
941
|
+
data: external_exports.array(CredentialReferenceApiSelectSchema),
|
|
940
942
|
pagination: PaginationSchema
|
|
941
943
|
}).openapi("CredentialReferenceListResponse");
|
|
942
|
-
var FunctionListResponse =
|
|
943
|
-
data:
|
|
944
|
+
var FunctionListResponse = external_exports.object({
|
|
945
|
+
data: external_exports.array(FunctionApiSelectSchema),
|
|
944
946
|
pagination: PaginationSchema
|
|
945
947
|
}).openapi("FunctionListResponse");
|
|
946
|
-
var FunctionToolListResponse =
|
|
947
|
-
data:
|
|
948
|
+
var FunctionToolListResponse = external_exports.object({
|
|
949
|
+
data: external_exports.array(FunctionToolApiSelectSchema),
|
|
948
950
|
pagination: PaginationSchema
|
|
949
951
|
}).openapi("FunctionToolListResponse");
|
|
950
|
-
var DataComponentListResponse =
|
|
951
|
-
data:
|
|
952
|
+
var DataComponentListResponse = external_exports.object({
|
|
953
|
+
data: external_exports.array(DataComponentApiSelectSchema),
|
|
952
954
|
pagination: PaginationSchema
|
|
953
955
|
}).openapi("DataComponentListResponse");
|
|
954
|
-
var ArtifactComponentListResponse =
|
|
955
|
-
data:
|
|
956
|
+
var ArtifactComponentListResponse = external_exports.object({
|
|
957
|
+
data: external_exports.array(ArtifactComponentApiSelectSchema),
|
|
956
958
|
pagination: PaginationSchema
|
|
957
959
|
}).openapi("ArtifactComponentListResponse");
|
|
958
|
-
var SubAgentRelationListResponse =
|
|
959
|
-
data:
|
|
960
|
+
var SubAgentRelationListResponse = external_exports.object({
|
|
961
|
+
data: external_exports.array(SubAgentRelationApiSelectSchema),
|
|
960
962
|
pagination: PaginationSchema
|
|
961
963
|
}).openapi("SubAgentRelationListResponse");
|
|
962
|
-
var SubAgentToolRelationListResponse =
|
|
963
|
-
data:
|
|
964
|
+
var SubAgentToolRelationListResponse = external_exports.object({
|
|
965
|
+
data: external_exports.array(SubAgentToolRelationApiSelectSchema),
|
|
964
966
|
pagination: PaginationSchema
|
|
965
967
|
}).openapi("SubAgentToolRelationListResponse");
|
|
966
|
-
var ConversationListResponse =
|
|
967
|
-
data:
|
|
968
|
+
var ConversationListResponse = external_exports.object({
|
|
969
|
+
data: external_exports.array(ConversationApiSelectSchema),
|
|
968
970
|
pagination: PaginationSchema
|
|
969
971
|
}).openapi("ConversationListResponse");
|
|
970
|
-
var MessageListResponse =
|
|
971
|
-
data:
|
|
972
|
+
var MessageListResponse = external_exports.object({
|
|
973
|
+
data: external_exports.array(MessageApiSelectSchema),
|
|
972
974
|
pagination: PaginationSchema
|
|
973
975
|
}).openapi("MessageListResponse");
|
|
974
|
-
var SubAgentDataComponentResponse =
|
|
975
|
-
var SubAgentArtifactComponentResponse =
|
|
976
|
-
var SubAgentDataComponentListResponse =
|
|
977
|
-
data:
|
|
976
|
+
var SubAgentDataComponentResponse = external_exports.object({ data: SubAgentDataComponentApiSelectSchema }).openapi("SubAgentDataComponentResponse");
|
|
977
|
+
var SubAgentArtifactComponentResponse = external_exports.object({ data: SubAgentArtifactComponentApiSelectSchema }).openapi("SubAgentArtifactComponentResponse");
|
|
978
|
+
var SubAgentDataComponentListResponse = external_exports.object({
|
|
979
|
+
data: external_exports.array(SubAgentDataComponentApiSelectSchema),
|
|
978
980
|
pagination: PaginationSchema
|
|
979
981
|
}).openapi("SubAgentDataComponentListResponse");
|
|
980
|
-
var SubAgentArtifactComponentListResponse =
|
|
981
|
-
data:
|
|
982
|
+
var SubAgentArtifactComponentListResponse = external_exports.object({
|
|
983
|
+
data: external_exports.array(SubAgentArtifactComponentApiSelectSchema),
|
|
982
984
|
pagination: PaginationSchema
|
|
983
985
|
}).openapi("SubAgentArtifactComponentListResponse");
|
|
984
|
-
var FullProjectDefinitionResponse =
|
|
985
|
-
var AgentWithinContextOfProjectResponse =
|
|
986
|
-
var RelatedAgentInfoListResponse =
|
|
987
|
-
data:
|
|
986
|
+
var FullProjectDefinitionResponse = external_exports.object({ data: FullProjectDefinitionSchema }).openapi("FullProjectDefinitionResponse");
|
|
987
|
+
var AgentWithinContextOfProjectResponse = external_exports.object({ data: AgentWithinContextOfProjectSchema }).openapi("AgentWithinContextOfProjectResponse");
|
|
988
|
+
var RelatedAgentInfoListResponse = external_exports.object({
|
|
989
|
+
data: external_exports.array(RelatedAgentInfoSchema),
|
|
988
990
|
pagination: PaginationSchema
|
|
989
991
|
}).openapi("RelatedAgentInfoListResponse");
|
|
990
|
-
var ComponentAssociationListResponse =
|
|
991
|
-
var McpToolResponse =
|
|
992
|
-
var McpToolListResponse =
|
|
993
|
-
data:
|
|
992
|
+
var ComponentAssociationListResponse = external_exports.object({ data: external_exports.array(ComponentAssociationSchema) }).openapi("ComponentAssociationListResponse");
|
|
993
|
+
var McpToolResponse = external_exports.object({ data: McpToolSchema }).openapi("McpToolResponse");
|
|
994
|
+
var McpToolListResponse = external_exports.object({
|
|
995
|
+
data: external_exports.array(McpToolSchema),
|
|
994
996
|
pagination: PaginationSchema
|
|
995
997
|
}).openapi("McpToolListResponse");
|
|
996
|
-
var SubAgentTeamAgentRelationResponse =
|
|
997
|
-
var SubAgentTeamAgentRelationListResponse =
|
|
998
|
-
data:
|
|
998
|
+
var SubAgentTeamAgentRelationResponse = external_exports.object({ data: SubAgentTeamAgentRelationApiSelectSchema }).openapi("SubAgentTeamAgentRelationResponse");
|
|
999
|
+
var SubAgentTeamAgentRelationListResponse = external_exports.object({
|
|
1000
|
+
data: external_exports.array(SubAgentTeamAgentRelationApiSelectSchema),
|
|
999
1001
|
pagination: PaginationSchema
|
|
1000
1002
|
}).openapi("SubAgentTeamAgentRelationListResponse");
|
|
1001
|
-
var SubAgentExternalAgentRelationResponse =
|
|
1002
|
-
var SubAgentExternalAgentRelationListResponse =
|
|
1003
|
-
data:
|
|
1003
|
+
var SubAgentExternalAgentRelationResponse = external_exports.object({ data: SubAgentExternalAgentRelationApiSelectSchema }).openapi("SubAgentExternalAgentRelationResponse");
|
|
1004
|
+
var SubAgentExternalAgentRelationListResponse = external_exports.object({
|
|
1005
|
+
data: external_exports.array(SubAgentExternalAgentRelationApiSelectSchema),
|
|
1004
1006
|
pagination: PaginationSchema
|
|
1005
1007
|
}).openapi("SubAgentExternalAgentRelationListResponse");
|
|
1006
|
-
var DataComponentArrayResponse =
|
|
1007
|
-
var ArtifactComponentArrayResponse =
|
|
1008
|
-
var HeadersScopeSchema =
|
|
1009
|
-
"x-inkeep-tenant-id":
|
|
1008
|
+
var DataComponentArrayResponse = external_exports.object({ data: external_exports.array(DataComponentApiSelectSchema) }).openapi("DataComponentArrayResponse");
|
|
1009
|
+
var ArtifactComponentArrayResponse = external_exports.object({ data: external_exports.array(ArtifactComponentApiSelectSchema) }).openapi("ArtifactComponentArrayResponse");
|
|
1010
|
+
var HeadersScopeSchema = external_exports.object({
|
|
1011
|
+
"x-inkeep-tenant-id": external_exports.string().optional().openapi({
|
|
1010
1012
|
description: "Tenant identifier",
|
|
1011
1013
|
example: "tenant_123"
|
|
1012
1014
|
}),
|
|
1013
|
-
"x-inkeep-project-id":
|
|
1015
|
+
"x-inkeep-project-id": external_exports.string().optional().openapi({
|
|
1014
1016
|
description: "Project identifier",
|
|
1015
1017
|
example: "project_456"
|
|
1016
1018
|
}),
|
|
1017
|
-
"x-inkeep-agent-id":
|
|
1019
|
+
"x-inkeep-agent-id": external_exports.string().optional().openapi({
|
|
1018
1020
|
description: "Agent identifier",
|
|
1019
1021
|
example: "agent_789"
|
|
1020
1022
|
})
|
|
1021
1023
|
});
|
|
1022
|
-
var TenantId =
|
|
1024
|
+
var TenantId = external_exports.string().openapi("TenantIdPathParam", {
|
|
1023
1025
|
param: {
|
|
1024
1026
|
name: "tenantId",
|
|
1025
1027
|
in: "path"
|
|
@@ -1027,7 +1029,7 @@ var TenantId = z.string().openapi("TenantIdPathParam", {
|
|
|
1027
1029
|
description: "Tenant identifier",
|
|
1028
1030
|
example: "tenant_123"
|
|
1029
1031
|
});
|
|
1030
|
-
var ProjectId =
|
|
1032
|
+
var ProjectId = external_exports.string().openapi("ProjectIdPathParam", {
|
|
1031
1033
|
param: {
|
|
1032
1034
|
name: "projectId",
|
|
1033
1035
|
in: "path"
|
|
@@ -1035,7 +1037,7 @@ var ProjectId = z.string().openapi("ProjectIdPathParam", {
|
|
|
1035
1037
|
description: "Project identifier",
|
|
1036
1038
|
example: "project_456"
|
|
1037
1039
|
});
|
|
1038
|
-
var AgentId =
|
|
1040
|
+
var AgentId = external_exports.string().openapi("AgentIdPathParam", {
|
|
1039
1041
|
param: {
|
|
1040
1042
|
name: "agentId",
|
|
1041
1043
|
in: "path"
|
|
@@ -1043,7 +1045,7 @@ var AgentId = z.string().openapi("AgentIdPathParam", {
|
|
|
1043
1045
|
description: "Agent identifier",
|
|
1044
1046
|
example: "agent_789"
|
|
1045
1047
|
});
|
|
1046
|
-
var SubAgentId =
|
|
1048
|
+
var SubAgentId = external_exports.string().openapi("SubAgentIdPathParam", {
|
|
1047
1049
|
param: {
|
|
1048
1050
|
name: "subAgentId",
|
|
1049
1051
|
in: "path"
|
|
@@ -1051,7 +1053,7 @@ var SubAgentId = z.string().openapi("SubAgentIdPathParam", {
|
|
|
1051
1053
|
description: "Sub-agent identifier",
|
|
1052
1054
|
example: "sub_agent_123"
|
|
1053
1055
|
});
|
|
1054
|
-
var TenantParamsSchema =
|
|
1056
|
+
var TenantParamsSchema = external_exports.object({
|
|
1055
1057
|
tenantId: TenantId
|
|
1056
1058
|
});
|
|
1057
1059
|
var TenantIdParamsSchema = TenantParamsSchema.extend({
|
|
@@ -1075,25 +1077,25 @@ var TenantProjectAgentSubAgentParamsSchema = TenantProjectAgentParamsSchema.exte
|
|
|
1075
1077
|
var TenantProjectAgentSubAgentIdParamsSchema = TenantProjectAgentSubAgentParamsSchema.extend({
|
|
1076
1078
|
id: resourceIdSchema
|
|
1077
1079
|
});
|
|
1078
|
-
var PaginationQueryParamsSchema =
|
|
1080
|
+
var PaginationQueryParamsSchema = external_exports.object({
|
|
1079
1081
|
page: pageNumber,
|
|
1080
1082
|
limit: limitNumber
|
|
1081
1083
|
}).openapi("PaginationQueryParams");
|
|
1082
|
-
var PrebuiltMCPServerSchema =
|
|
1083
|
-
id:
|
|
1084
|
-
name:
|
|
1085
|
-
url:
|
|
1086
|
-
transport:
|
|
1087
|
-
imageUrl:
|
|
1088
|
-
isOpen:
|
|
1089
|
-
category:
|
|
1090
|
-
description:
|
|
1091
|
-
thirdPartyConnectAccountUrl:
|
|
1084
|
+
var PrebuiltMCPServerSchema = external_exports.object({
|
|
1085
|
+
id: external_exports.string().describe("Unique identifier for the MCP server"),
|
|
1086
|
+
name: external_exports.string().describe("Display name of the MCP server"),
|
|
1087
|
+
url: external_exports.url().describe("URL endpoint for the MCP server"),
|
|
1088
|
+
transport: external_exports.enum(MCPTransportType).describe("Transport protocol type"),
|
|
1089
|
+
imageUrl: external_exports.url().optional().describe("Logo/icon URL for the MCP server"),
|
|
1090
|
+
isOpen: external_exports.boolean().optional().describe("Whether the MCP server is open (doesn't require authentication)"),
|
|
1091
|
+
category: external_exports.string().optional().describe("Category of the MCP server (e.g., communication, project_management)"),
|
|
1092
|
+
description: external_exports.string().optional().describe("Brief description of what the MCP server does"),
|
|
1093
|
+
thirdPartyConnectAccountUrl: external_exports.url().optional().describe("URL to connect to the third party account")
|
|
1092
1094
|
});
|
|
1093
|
-
var MCPCatalogListResponse =
|
|
1094
|
-
data:
|
|
1095
|
+
var MCPCatalogListResponse = external_exports.object({
|
|
1096
|
+
data: external_exports.array(PrebuiltMCPServerSchema)
|
|
1095
1097
|
}).openapi("MCPCatalogListResponse");
|
|
1096
|
-
var ThirdPartyMCPServerResponse =
|
|
1098
|
+
var ThirdPartyMCPServerResponse = external_exports.object({
|
|
1097
1099
|
data: PrebuiltMCPServerSchema.nullable()
|
|
1098
1100
|
}).openapi("ThirdPartyMCPServerResponse");
|
|
1099
1101
|
function validatePropsAsJsonSchema(props) {
|