@inkeep/agents-core 0.19.0 → 0.19.2

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.
@@ -1,4 +1,4 @@
1
- import { AgentWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-3GZBRBXP.js';
1
+ import { AgentWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-VICWT3WO.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  var TransferDataSchema = z.object({
@@ -1,7 +1,7 @@
1
1
  // src/constants/models.ts
2
2
  var ANTHROPIC_MODELS = {
3
3
  CLAUDE_OPUS_4_1: "anthropic/claude-opus-4-1-20250805",
4
- CLAUDE_SONNET_4_5: "anthropic/claude-sonnet-4.5-20250531",
4
+ CLAUDE_SONNET_4_5: "anthropic/claude-sonnet-4-5-20250929",
5
5
  CLAUDE_SONNET_4: "anthropic/claude-sonnet-4-20250514",
6
6
  CLAUDE_3_5_SONNET: "anthropic/claude-3-5-sonnet-20241022",
7
7
  CLAUDE_3_5_HAIKU: "anthropic/claude-3-5-haiku-20241022"
@@ -7,9 +7,13 @@ import Ajv from 'ajv';
7
7
  var StopWhenSchema = z.object({
8
8
  transferCountIs: z.number().min(1).max(100).optional(),
9
9
  stepCountIs: z.number().min(1).max(1e3).optional()
10
- });
11
- var AgentStopWhenSchema = StopWhenSchema.pick({ transferCountIs: true });
12
- var SubAgentStopWhenSchema = StopWhenSchema.pick({ stepCountIs: true });
10
+ }).openapi("StopWhen");
11
+ var AgentStopWhenSchema = StopWhenSchema.pick({ transferCountIs: true }).openapi(
12
+ "AgentStopWhen"
13
+ );
14
+ var SubAgentStopWhenSchema = StopWhenSchema.pick({ stepCountIs: true }).openapi(
15
+ "SubAgentStopWhen"
16
+ );
13
17
  var MIN_ID_LENGTH = 1;
14
18
  var MAX_ID_LENGTH = 255;
15
19
  var URL_SAFE_ID_PATTERN = /^[a-zA-Z0-9\-_.]+$/;
@@ -22,23 +26,23 @@ var resourceIdSchema = z.string().min(MIN_ID_LENGTH).max(MAX_ID_LENGTH).regex(UR
22
26
  var ModelSettingsSchema = z.object({
23
27
  model: z.string().optional(),
24
28
  providerOptions: z.record(z.string(), z.any()).optional()
25
- });
29
+ }).openapi("ModelSettings");
26
30
  var ModelSchema = z.object({
27
31
  base: ModelSettingsSchema.optional(),
28
32
  structuredOutput: ModelSettingsSchema.optional(),
29
33
  summarizer: ModelSettingsSchema.optional()
30
- });
34
+ }).openapi("Model");
31
35
  var ProjectModelSchema = z.object({
32
36
  base: ModelSettingsSchema,
33
37
  structuredOutput: ModelSettingsSchema.optional(),
34
38
  summarizer: ModelSettingsSchema.optional()
35
- });
39
+ }).openapi("ProjectModel");
36
40
  var SandboxConfigSchema = z.object({
37
41
  provider: z.enum(["vercel", "local"]),
38
42
  runtime: z.enum(["node22", "typescript"]),
39
43
  timeout: z.number().min(1e3).max(3e5).optional(),
40
44
  vcpus: z.number().min(1).max(8).optional()
41
- });
45
+ }).openapi("SandboxConfig");
42
46
  var FunctionToolConfigSchema = z.object({
43
47
  name: z.string(),
44
48
  description: z.string(),
@@ -58,9 +62,15 @@ var SubAgentInsertSchema = createInsertSchema(subAgents).extend({
58
62
  models: ModelSchema.optional()
59
63
  });
60
64
  var SubAgentUpdateSchema = SubAgentInsertSchema.partial();
61
- var SubAgentApiSelectSchema = createAgentScopedApiSchema(SubAgentSelectSchema);
62
- var SubAgentApiInsertSchema = createAgentScopedApiInsertSchema(SubAgentInsertSchema);
63
- var SubAgentApiUpdateSchema = createAgentScopedApiUpdateSchema(SubAgentUpdateSchema);
65
+ var SubAgentApiSelectSchema = createAgentScopedApiSchema(SubAgentSelectSchema).openapi(
66
+ "SubAgent"
67
+ );
68
+ var SubAgentApiInsertSchema = createAgentScopedApiInsertSchema(
69
+ SubAgentInsertSchema
70
+ ).openapi("SubAgentCreate");
71
+ var SubAgentApiUpdateSchema = createAgentScopedApiUpdateSchema(
72
+ SubAgentUpdateSchema
73
+ ).openapi("SubAgentUpdate");
64
74
  var SubAgentRelationSelectSchema = createSelectSchema(subAgentRelations);
65
75
  var SubAgentRelationInsertSchema = createInsertSchema(subAgentRelations).extend({
66
76
  id: resourceIdSchema,
@@ -72,7 +82,7 @@ var SubAgentRelationInsertSchema = createInsertSchema(subAgentRelations).extend(
72
82
  var SubAgentRelationUpdateSchema = SubAgentRelationInsertSchema.partial();
73
83
  var SubAgentRelationApiSelectSchema = createAgentScopedApiSchema(
74
84
  SubAgentRelationSelectSchema
75
- );
85
+ ).openapi("SubAgentRelation");
76
86
  var SubAgentRelationApiInsertSchema = createAgentScopedApiInsertSchema(
77
87
  SubAgentRelationInsertSchema
78
88
  ).extend({
@@ -87,7 +97,7 @@ var SubAgentRelationApiInsertSchema = createAgentScopedApiInsertSchema(
87
97
  message: "Must specify exactly one of targetSubAgentId or externalSubAgentId",
88
98
  path: ["targetSubAgentId", "externalSubAgentId"]
89
99
  }
90
- );
100
+ ).openapi("SubAgentRelationCreate");
91
101
  var SubAgentRelationApiUpdateSchema = createAgentScopedApiUpdateSchema(
92
102
  SubAgentRelationUpdateSchema
93
103
  ).extend({
@@ -105,7 +115,7 @@ var SubAgentRelationApiUpdateSchema = createAgentScopedApiUpdateSchema(
105
115
  message: "Must specify exactly one of targetSubAgentId or externalSubAgentId when updating sub-agent relationships",
106
116
  path: ["targetSubAgentId", "externalSubAgentId"]
107
117
  }
108
- );
118
+ ).openapi("SubAgentRelationUpdate");
109
119
  var SubAgentRelationQuerySchema = z.object({
110
120
  sourceSubAgentId: z.string().optional(),
111
121
  targetSubAgentId: z.string().optional(),
@@ -125,11 +135,13 @@ var AgentInsertSchema = createInsertSchema(agents).extend({
125
135
  id: resourceIdSchema
126
136
  });
127
137
  var AgentUpdateSchema = AgentInsertSchema.partial();
128
- var AgentApiSelectSchema = createApiSchema(AgentSelectSchema);
138
+ var AgentApiSelectSchema = createApiSchema(AgentSelectSchema).openapi("Agent");
129
139
  var AgentApiInsertSchema = createApiInsertSchema(AgentInsertSchema).extend({
130
140
  id: resourceIdSchema
131
- });
132
- var AgentApiUpdateSchema = createApiUpdateSchema(AgentUpdateSchema);
141
+ }).openapi("AgentCreate");
142
+ var AgentApiUpdateSchema = createApiUpdateSchema(AgentUpdateSchema).openapi(
143
+ "AgentUpdate"
144
+ );
133
145
  var TaskSelectSchema = createSelectSchema(tasks);
134
146
  var TaskInsertSchema = createInsertSchema(tasks).extend({
135
147
  id: resourceIdSchema,
@@ -177,7 +189,7 @@ var McpTransportConfigSchema = z.object({
177
189
  description: "Reconnection options for streamable HTTP transport"
178
190
  }),
179
191
  sessionId: z.string().optional()
180
- });
192
+ }).openapi("McpTransportConfig");
181
193
  var ToolStatusSchema = z.enum(TOOL_STATUS_VALUES);
182
194
  var McpToolDefinitionSchema = z.object({
183
195
  name: z.string(),
@@ -214,9 +226,15 @@ var ConversationInsertSchema = createInsertSchema(conversations).extend({
214
226
  contextConfigId: resourceIdSchema.optional()
215
227
  });
216
228
  var ConversationUpdateSchema = ConversationInsertSchema.partial();
217
- var ConversationApiSelectSchema = createApiSchema(ConversationSelectSchema);
218
- var ConversationApiInsertSchema = createApiInsertSchema(ConversationInsertSchema);
219
- var ConversationApiUpdateSchema = createApiUpdateSchema(ConversationUpdateSchema);
229
+ var ConversationApiSelectSchema = createApiSchema(ConversationSelectSchema).openapi(
230
+ "Conversation"
231
+ );
232
+ var ConversationApiInsertSchema = createApiInsertSchema(ConversationInsertSchema).openapi(
233
+ "ConversationCreate"
234
+ );
235
+ var ConversationApiUpdateSchema = createApiUpdateSchema(ConversationUpdateSchema).openapi(
236
+ "ConversationUpdate"
237
+ );
220
238
  var MessageSelectSchema = createSelectSchema(messages);
221
239
  var MessageInsertSchema = createInsertSchema(messages).extend({
222
240
  id: resourceIdSchema,
@@ -224,9 +242,13 @@ var MessageInsertSchema = createInsertSchema(messages).extend({
224
242
  taskId: resourceIdSchema.optional()
225
243
  });
226
244
  var MessageUpdateSchema = MessageInsertSchema.partial();
227
- var MessageApiSelectSchema = createApiSchema(MessageSelectSchema);
228
- var MessageApiInsertSchema = createApiInsertSchema(MessageInsertSchema);
229
- var MessageApiUpdateSchema = createApiUpdateSchema(MessageUpdateSchema);
245
+ var MessageApiSelectSchema = createApiSchema(MessageSelectSchema).openapi("Message");
246
+ var MessageApiInsertSchema = createApiInsertSchema(MessageInsertSchema).openapi(
247
+ "MessageCreate"
248
+ );
249
+ var MessageApiUpdateSchema = createApiUpdateSchema(MessageUpdateSchema).openapi(
250
+ "MessageUpdate"
251
+ );
230
252
  var ContextCacheSelectSchema = createSelectSchema(contextCache);
231
253
  var ContextCacheInsertSchema = createInsertSchema(contextCache);
232
254
  var ContextCacheUpdateSchema = ContextCacheInsertSchema.partial();
@@ -242,9 +264,15 @@ var DataComponentBaseSchema = DataComponentInsertSchema.omit({
242
264
  updatedAt: true
243
265
  });
244
266
  var DataComponentUpdateSchema = DataComponentInsertSchema.partial();
245
- var DataComponentApiSelectSchema = createApiSchema(DataComponentSelectSchema);
246
- var DataComponentApiInsertSchema = createApiInsertSchema(DataComponentInsertSchema);
247
- var DataComponentApiUpdateSchema = createApiUpdateSchema(DataComponentUpdateSchema);
267
+ var DataComponentApiSelectSchema = createApiSchema(
268
+ DataComponentSelectSchema
269
+ ).openapi("DataComponent");
270
+ var DataComponentApiInsertSchema = createApiInsertSchema(
271
+ DataComponentInsertSchema
272
+ ).openapi("DataComponentCreate");
273
+ var DataComponentApiUpdateSchema = createApiUpdateSchema(
274
+ DataComponentUpdateSchema
275
+ ).openapi("DataComponentUpdate");
248
276
  var SubAgentDataComponentSelectSchema = createSelectSchema(subAgentDataComponents);
249
277
  var SubAgentDataComponentInsertSchema = createInsertSchema(subAgentDataComponents);
250
278
  var SubAgentDataComponentUpdateSchema = SubAgentDataComponentInsertSchema.partial();
@@ -265,16 +293,18 @@ var ArtifactComponentInsertSchema = createInsertSchema(artifactComponents).exten
265
293
  id: resourceIdSchema
266
294
  });
267
295
  var ArtifactComponentUpdateSchema = ArtifactComponentInsertSchema.partial();
268
- var ArtifactComponentApiSelectSchema = createApiSchema(ArtifactComponentSelectSchema);
296
+ var ArtifactComponentApiSelectSchema = createApiSchema(
297
+ ArtifactComponentSelectSchema
298
+ ).openapi("ArtifactComponent");
269
299
  var ArtifactComponentApiInsertSchema = ArtifactComponentInsertSchema.omit({
270
300
  tenantId: true,
271
301
  projectId: true,
272
302
  createdAt: true,
273
303
  updatedAt: true
274
- });
304
+ }).openapi("ArtifactComponentCreate");
275
305
  var ArtifactComponentApiUpdateSchema = createApiUpdateSchema(
276
306
  ArtifactComponentUpdateSchema
277
- );
307
+ ).openapi("ArtifactComponentUpdate");
278
308
  var SubAgentArtifactComponentSelectSchema = createSelectSchema(subAgentArtifactComponents);
279
309
  var SubAgentArtifactComponentInsertSchema = createInsertSchema(
280
310
  subAgentArtifactComponents
@@ -304,9 +334,15 @@ var ExternalAgentInsertSchema = createInsertSchema(externalAgents).extend({
304
334
  id: resourceIdSchema
305
335
  });
306
336
  var ExternalAgentUpdateSchema = ExternalAgentInsertSchema.partial();
307
- var ExternalAgentApiSelectSchema = createAgentScopedApiSchema(ExternalAgentSelectSchema);
308
- var ExternalAgentApiInsertSchema = createAgentScopedApiInsertSchema(ExternalAgentInsertSchema);
309
- var ExternalAgentApiUpdateSchema = createAgentScopedApiUpdateSchema(ExternalAgentUpdateSchema);
337
+ var ExternalAgentApiSelectSchema = createAgentScopedApiSchema(
338
+ ExternalAgentSelectSchema
339
+ ).openapi("ExternalAgent");
340
+ var ExternalAgentApiInsertSchema = createAgentScopedApiInsertSchema(
341
+ ExternalAgentInsertSchema
342
+ ).openapi("ExternalAgentCreate");
343
+ var ExternalAgentApiUpdateSchema = createAgentScopedApiUpdateSchema(
344
+ ExternalAgentUpdateSchema
345
+ ).openapi("ExternalAgentUpdate");
310
346
  var AllAgentSchema = z.discriminatedUnion("type", [
311
347
  SubAgentApiSelectSchema.extend({ type: z.literal("internal") }),
312
348
  ExternalAgentApiSelectSchema.extend({ type: z.literal("external") })
@@ -330,7 +366,7 @@ var ApiKeyApiSelectSchema = ApiKeySelectSchema.omit({
330
366
  projectId: true,
331
367
  keyHash: true
332
368
  // Never expose the hash
333
- });
369
+ }).openapi("ApiKey");
334
370
  var ApiKeyApiCreationResponseSchema = z.object({
335
371
  data: z.object({
336
372
  apiKey: ApiKeyApiSelectSchema,
@@ -350,8 +386,8 @@ var ApiKeyApiInsertSchema = ApiKeyInsertSchema.omit({
350
386
  // Auto-generated
351
387
  lastUsedAt: true
352
388
  // Not set on creation
353
- });
354
- var ApiKeyApiUpdateSchema = ApiKeyUpdateSchema;
389
+ }).openapi("ApiKeyCreate");
390
+ var ApiKeyApiUpdateSchema = ApiKeyUpdateSchema.openapi("ApiKeyUpdate");
355
391
  var CredentialReferenceSelectSchema = z.object({
356
392
  id: z.string(),
357
393
  tenantId: z.string(),
@@ -374,17 +410,17 @@ var CredentialReferenceApiSelectSchema = createApiSchema(
374
410
  ).extend({
375
411
  type: z.enum(CredentialStoreType),
376
412
  tools: z.array(ToolSelectSchema).optional()
377
- });
413
+ }).openapi("CredentialReference");
378
414
  var CredentialReferenceApiInsertSchema = createApiInsertSchema(
379
415
  CredentialReferenceInsertSchema
380
416
  ).extend({
381
417
  type: z.enum(CredentialStoreType)
382
- });
418
+ }).openapi("CredentialReferenceCreate");
383
419
  var CredentialReferenceApiUpdateSchema = createApiUpdateSchema(
384
420
  CredentialReferenceUpdateSchema
385
421
  ).extend({
386
422
  type: z.enum(CredentialStoreType).optional()
387
- });
423
+ }).openapi("CredentialReferenceUpdate");
388
424
  var McpToolSchema = ToolInsertSchema.extend({
389
425
  imageUrl: imageUrlSchema,
390
426
  availableTools: z.array(McpToolDefinitionSchema).optional(),
@@ -413,25 +449,35 @@ var MCPToolConfigSchema = McpToolSchema.omit({
413
449
  credential: CredentialReferenceApiInsertSchema.optional()
414
450
  });
415
451
  var ToolUpdateSchema = ToolInsertSchema.partial();
416
- var ToolApiSelectSchema = createApiSchema(ToolSelectSchema);
417
- var ToolApiInsertSchema = createApiInsertSchema(ToolInsertSchema);
418
- var ToolApiUpdateSchema = createApiUpdateSchema(ToolUpdateSchema);
452
+ var ToolApiSelectSchema = createApiSchema(ToolSelectSchema).openapi("Tool");
453
+ var ToolApiInsertSchema = createApiInsertSchema(ToolInsertSchema).openapi("ToolCreate");
454
+ var ToolApiUpdateSchema = createApiUpdateSchema(ToolUpdateSchema).openapi("ToolUpdate");
419
455
  var FunctionToolSelectSchema = createSelectSchema(functionTools);
420
456
  var FunctionToolInsertSchema = createInsertSchema(functionTools).extend({
421
457
  id: resourceIdSchema
422
458
  });
423
459
  var FunctionToolUpdateSchema = FunctionToolInsertSchema.partial();
424
- var FunctionToolApiSelectSchema = createApiSchema(FunctionToolSelectSchema);
425
- var FunctionToolApiInsertSchema = createAgentScopedApiInsertSchema(FunctionToolInsertSchema);
426
- var FunctionToolApiUpdateSchema = createApiUpdateSchema(FunctionToolUpdateSchema);
460
+ var FunctionToolApiSelectSchema = createApiSchema(FunctionToolSelectSchema).openapi(
461
+ "FunctionTool"
462
+ );
463
+ var FunctionToolApiInsertSchema = createAgentScopedApiInsertSchema(
464
+ FunctionToolInsertSchema
465
+ ).openapi("FunctionToolCreate");
466
+ var FunctionToolApiUpdateSchema = createApiUpdateSchema(
467
+ FunctionToolUpdateSchema
468
+ ).openapi("FunctionToolUpdate");
427
469
  var FunctionSelectSchema = createSelectSchema(functions);
428
470
  var FunctionInsertSchema = createInsertSchema(functions).extend({
429
471
  id: resourceIdSchema
430
472
  });
431
473
  var FunctionUpdateSchema = FunctionInsertSchema.partial();
432
- var FunctionApiSelectSchema = createApiSchema(FunctionSelectSchema);
433
- var FunctionApiInsertSchema = createApiInsertSchema(FunctionInsertSchema);
434
- var FunctionApiUpdateSchema = createApiUpdateSchema(FunctionUpdateSchema);
474
+ var FunctionApiSelectSchema = createApiSchema(FunctionSelectSchema).openapi("Function");
475
+ var FunctionApiInsertSchema = createApiInsertSchema(FunctionInsertSchema).openapi(
476
+ "FunctionCreate"
477
+ );
478
+ var FunctionApiUpdateSchema = createApiUpdateSchema(FunctionUpdateSchema).openapi(
479
+ "FunctionUpdate"
480
+ );
435
481
  var FetchConfigSchema = z.object({
436
482
  url: z.string().min(1, "URL is required"),
437
483
  method: z.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().default("GET"),
@@ -440,7 +486,7 @@ var FetchConfigSchema = z.object({
440
486
  transform: z.string().optional(),
441
487
  // JSONPath or JS transform function
442
488
  timeout: z.number().min(0).optional().default(1e4).optional()
443
- });
489
+ }).openapi("FetchConfig");
444
490
  var FetchDefinitionSchema = z.object({
445
491
  id: z.string().min(1, "Fetch definition ID is required"),
446
492
  name: z.string().optional(),
@@ -452,7 +498,7 @@ var FetchDefinitionSchema = z.object({
452
498
  description: "Default value if fetch fails"
453
499
  }),
454
500
  credential: CredentialReferenceApiInsertSchema.optional()
455
- });
501
+ }).openapi("FetchDefinition");
456
502
  var ContextConfigSelectSchema = createSelectSchema(contextConfigs).extend({
457
503
  headersSchema: z.any().optional().openapi({
458
504
  type: "object",
@@ -476,13 +522,13 @@ var ContextConfigInsertSchema = createInsertSchema(contextConfigs).extend({
476
522
  var ContextConfigUpdateSchema = ContextConfigInsertSchema.partial();
477
523
  var ContextConfigApiSelectSchema = createApiSchema(ContextConfigSelectSchema).omit({
478
524
  agentId: true
479
- });
525
+ }).openapi("ContextConfig");
480
526
  var ContextConfigApiInsertSchema = createApiInsertSchema(ContextConfigInsertSchema).omit({
481
527
  agentId: true
482
- });
528
+ }).openapi("ContextConfigCreate");
483
529
  var ContextConfigApiUpdateSchema = createApiUpdateSchema(ContextConfigUpdateSchema).omit({
484
530
  agentId: true
485
- });
531
+ }).openapi("ContextConfigUpdate");
486
532
  var SubAgentToolRelationSelectSchema = createSelectSchema(subAgentToolRelations);
487
533
  var SubAgentToolRelationInsertSchema = createInsertSchema(subAgentToolRelations).extend({
488
534
  id: resourceIdSchema,
@@ -494,13 +540,13 @@ var SubAgentToolRelationInsertSchema = createInsertSchema(subAgentToolRelations)
494
540
  var SubAgentToolRelationUpdateSchema = SubAgentToolRelationInsertSchema.partial();
495
541
  var SubAgentToolRelationApiSelectSchema = createAgentScopedApiSchema(
496
542
  SubAgentToolRelationSelectSchema
497
- );
543
+ ).openapi("SubAgentToolRelation");
498
544
  var SubAgentToolRelationApiInsertSchema = createAgentScopedApiInsertSchema(
499
545
  SubAgentToolRelationInsertSchema
500
- );
546
+ ).openapi("SubAgentToolRelationCreate");
501
547
  var SubAgentToolRelationApiUpdateSchema = createAgentScopedApiUpdateSchema(
502
548
  SubAgentToolRelationUpdateSchema
503
- );
549
+ ).openapi("SubAgentToolRelationUpdate");
504
550
  var LedgerArtifactSelectSchema = createSelectSchema(ledgerArtifacts);
505
551
  var LedgerArtifactInsertSchema = createInsertSchema(ledgerArtifacts);
506
552
  var LedgerArtifactUpdateSchema = LedgerArtifactInsertSchema.partial();
@@ -515,20 +561,20 @@ var StatusComponentSchema = z.object({
515
561
  properties: z.record(z.string(), z.any()),
516
562
  required: z.array(z.string()).optional()
517
563
  }).optional()
518
- });
564
+ }).openapi("StatusComponent");
519
565
  var StatusUpdateSchema = z.object({
520
566
  enabled: z.boolean().optional(),
521
567
  numEvents: z.number().min(1).max(100).optional(),
522
568
  timeInSeconds: z.number().min(1).max(600).optional(),
523
569
  prompt: z.string().max(2e3, "Custom prompt cannot exceed 2000 characters").optional(),
524
570
  statusComponents: z.array(StatusComponentSchema).optional()
525
- });
571
+ }).openapi("StatusUpdate");
526
572
  var CanUseItemSchema = z.object({
527
573
  agentToolRelationId: z.string().optional(),
528
574
  toolId: z.string(),
529
575
  toolSelection: z.array(z.string()).nullish(),
530
576
  headers: z.record(z.string(), z.string()).nullish()
531
- });
577
+ }).openapi("CanUseItem");
532
578
  var FullAgentAgentInsertSchema = SubAgentApiInsertSchema.extend({
533
579
  type: z.literal("internal"),
534
580
  canUse: z.array(CanUseItemSchema),
@@ -561,7 +607,7 @@ var PaginationSchema = z.object({
561
607
  limit: z.coerce.number().min(1).max(100).default(10),
562
608
  total: z.number(),
563
609
  pages: z.number()
564
- });
610
+ }).openapi("Pagination");
565
611
  var ListResponseSchema = (itemSchema) => z.object({
566
612
  data: z.array(itemSchema),
567
613
  pagination: PaginationSchema
@@ -575,14 +621,14 @@ var ErrorResponseSchema = z.object({
575
621
  details: z.any().optional().openapi({
576
622
  description: "Additional error details"
577
623
  })
578
- });
624
+ }).openapi("ErrorResponse");
579
625
  var ExistsResponseSchema = z.object({
580
626
  exists: z.boolean()
581
- });
627
+ }).openapi("ExistsResponse");
582
628
  var RemovedResponseSchema = z.object({
583
629
  message: z.string(),
584
630
  removed: z.boolean()
585
- });
631
+ }).openapi("RemovedResponse");
586
632
  var ProjectSelectSchema = createSelectSchema(projects);
587
633
  var ProjectInsertSchema = createInsertSchema(projects).extend({
588
634
  models: ProjectModelSchema,
@@ -593,9 +639,15 @@ var ProjectInsertSchema = createInsertSchema(projects).extend({
593
639
  updatedAt: true
594
640
  });
595
641
  var ProjectUpdateSchema = ProjectInsertSchema.partial();
596
- var ProjectApiSelectSchema = ProjectSelectSchema.omit({ tenantId: true });
597
- var ProjectApiInsertSchema = ProjectInsertSchema.omit({ tenantId: true });
598
- var ProjectApiUpdateSchema = ProjectUpdateSchema.omit({ tenantId: true });
642
+ var ProjectApiSelectSchema = ProjectSelectSchema.omit({ tenantId: true }).openapi(
643
+ "Project"
644
+ );
645
+ var ProjectApiInsertSchema = ProjectInsertSchema.omit({ tenantId: true }).openapi(
646
+ "ProjectCreate"
647
+ );
648
+ var ProjectApiUpdateSchema = ProjectUpdateSchema.omit({ tenantId: true }).openapi(
649
+ "ProjectUpdate"
650
+ );
599
651
  var FullProjectDefinitionSchema = ProjectApiInsertSchema.extend({
600
652
  agents: z.record(z.string(), AgentWithinContextOfProjectSchema),
601
653
  tools: z.record(z.string(), ToolApiInsertSchema),
@@ -607,6 +659,96 @@ var FullProjectDefinitionSchema = ProjectApiInsertSchema.extend({
607
659
  createdAt: z.string().optional(),
608
660
  updatedAt: z.string().optional()
609
661
  });
662
+ var ProjectResponse = z.object({ data: ProjectApiSelectSchema }).openapi("ProjectResponse");
663
+ var SubAgentResponse = z.object({ data: SubAgentApiSelectSchema }).openapi("SubAgentResponse");
664
+ var AgentResponse = z.object({ data: AgentApiSelectSchema }).openapi("AgentResponse");
665
+ var ToolResponse = z.object({ data: ToolApiSelectSchema }).openapi("ToolResponse");
666
+ var ExternalAgentResponse = z.object({ data: ExternalAgentApiSelectSchema }).openapi("ExternalAgentResponse");
667
+ var ContextConfigResponse = z.object({ data: ContextConfigApiSelectSchema }).openapi("ContextConfigResponse");
668
+ var ApiKeyResponse = z.object({ data: ApiKeyApiSelectSchema }).openapi("ApiKeyResponse");
669
+ var CredentialReferenceResponse = z.object({ data: CredentialReferenceApiSelectSchema }).openapi("CredentialReferenceResponse");
670
+ var FunctionResponse = z.object({ data: FunctionApiSelectSchema }).openapi("FunctionResponse");
671
+ var FunctionToolResponse = z.object({ data: FunctionToolApiSelectSchema }).openapi("FunctionToolResponse");
672
+ var DataComponentResponse = z.object({ data: DataComponentApiSelectSchema }).openapi("DataComponentResponse");
673
+ var ArtifactComponentResponse = z.object({ data: ArtifactComponentApiSelectSchema }).openapi("ArtifactComponentResponse");
674
+ var SubAgentRelationResponse = z.object({ data: SubAgentRelationApiSelectSchema }).openapi("SubAgentRelationResponse");
675
+ var SubAgentToolRelationResponse = z.object({ data: SubAgentToolRelationApiSelectSchema }).openapi("SubAgentToolRelationResponse");
676
+ var ConversationResponse = z.object({ data: ConversationApiSelectSchema }).openapi("ConversationResponse");
677
+ var MessageResponse = z.object({ data: MessageApiSelectSchema }).openapi("MessageResponse");
678
+ var ProjectListResponse = z.object({
679
+ data: z.array(ProjectApiSelectSchema),
680
+ pagination: PaginationSchema
681
+ }).openapi("ProjectListResponse");
682
+ var SubAgentListResponse = z.object({
683
+ data: z.array(SubAgentApiSelectSchema),
684
+ pagination: PaginationSchema
685
+ }).openapi("SubAgentListResponse");
686
+ var AgentListResponse = z.object({
687
+ data: z.array(AgentApiSelectSchema),
688
+ pagination: PaginationSchema
689
+ }).openapi("AgentListResponse");
690
+ var ToolListResponse = z.object({
691
+ data: z.array(ToolApiSelectSchema),
692
+ pagination: PaginationSchema
693
+ }).openapi("ToolListResponse");
694
+ var ExternalAgentListResponse = z.object({
695
+ data: z.array(ExternalAgentApiSelectSchema),
696
+ pagination: PaginationSchema
697
+ }).openapi("ExternalAgentListResponse");
698
+ var ContextConfigListResponse = z.object({
699
+ data: z.array(ContextConfigApiSelectSchema),
700
+ pagination: PaginationSchema
701
+ }).openapi("ContextConfigListResponse");
702
+ var ApiKeyListResponse = z.object({
703
+ data: z.array(ApiKeyApiSelectSchema),
704
+ pagination: PaginationSchema
705
+ }).openapi("ApiKeyListResponse");
706
+ var CredentialReferenceListResponse = z.object({
707
+ data: z.array(CredentialReferenceApiSelectSchema),
708
+ pagination: PaginationSchema
709
+ }).openapi("CredentialReferenceListResponse");
710
+ var FunctionListResponse = z.object({
711
+ data: z.array(FunctionApiSelectSchema),
712
+ pagination: PaginationSchema
713
+ }).openapi("FunctionListResponse");
714
+ var FunctionToolListResponse = z.object({
715
+ data: z.array(FunctionToolApiSelectSchema),
716
+ pagination: PaginationSchema
717
+ }).openapi("FunctionToolListResponse");
718
+ var DataComponentListResponse = z.object({
719
+ data: z.array(DataComponentApiSelectSchema),
720
+ pagination: PaginationSchema
721
+ }).openapi("DataComponentListResponse");
722
+ var ArtifactComponentListResponse = z.object({
723
+ data: z.array(ArtifactComponentApiSelectSchema),
724
+ pagination: PaginationSchema
725
+ }).openapi("ArtifactComponentListResponse");
726
+ var SubAgentRelationListResponse = z.object({
727
+ data: z.array(SubAgentRelationApiSelectSchema),
728
+ pagination: PaginationSchema
729
+ }).openapi("SubAgentRelationListResponse");
730
+ var SubAgentToolRelationListResponse = z.object({
731
+ data: z.array(SubAgentToolRelationApiSelectSchema),
732
+ pagination: PaginationSchema
733
+ }).openapi("SubAgentToolRelationListResponse");
734
+ var ConversationListResponse = z.object({
735
+ data: z.array(ConversationApiSelectSchema),
736
+ pagination: PaginationSchema
737
+ }).openapi("ConversationListResponse");
738
+ var MessageListResponse = z.object({
739
+ data: z.array(MessageApiSelectSchema),
740
+ pagination: PaginationSchema
741
+ }).openapi("MessageListResponse");
742
+ var SubAgentDataComponentResponse = z.object({ data: SubAgentDataComponentApiSelectSchema }).openapi("SubAgentDataComponentResponse");
743
+ var SubAgentArtifactComponentResponse = z.object({ data: SubAgentArtifactComponentApiSelectSchema }).openapi("SubAgentArtifactComponentResponse");
744
+ var SubAgentDataComponentListResponse = z.object({
745
+ data: z.array(SubAgentDataComponentApiSelectSchema),
746
+ pagination: PaginationSchema
747
+ }).openapi("SubAgentDataComponentListResponse");
748
+ var SubAgentArtifactComponentListResponse = z.object({
749
+ data: z.array(SubAgentArtifactComponentApiSelectSchema),
750
+ pagination: PaginationSchema
751
+ }).openapi("SubAgentArtifactComponentListResponse");
610
752
  var HeadersScopeSchema = z.object({
611
753
  "x-inkeep-tenant-id": z.string().optional().openapi({
612
754
  description: "Tenant identifier",
@@ -768,4 +910,4 @@ function validatePropsAsJsonSchema(props) {
768
910
  }
769
911
  }
770
912
 
771
- export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationSelectSchema, ConversationUpdateSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectModelSchema, ProjectSelectSchema, ProjectUpdateSchema, RemovedResponseSchema, SandboxConfigSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentInsertSchema, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationQuerySchema, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, resourceIdSchema, validatePropsAsJsonSchema };
913
+ export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RemovedResponseSchema, SandboxConfigSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, resourceIdSchema, validatePropsAsJsonSchema };