@inkeep/agents-core 0.0.0-dev-20260130050728 → 0.0.0-dev-20260130091101
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-schema.d.ts +104 -104
- package/dist/auth/auth-validation-schemas.d.ts +146 -146
- package/dist/auth/auth.d.ts +22 -22
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +2 -6
- package/dist/client-exports.js +3 -7
- package/dist/data-access/manage/agentFull.js +1 -1
- package/dist/data-access/manage/artifactComponents.js +1 -1
- package/dist/data-access/manage/dataComponents.d.ts +2 -2
- package/dist/data-access/manage/dataComponents.js +1 -1
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/conversations.d.ts +11 -11
- package/dist/data-access/runtime/messages.d.ts +3 -3
- package/dist/data-access/runtime/tasks.d.ts +3 -3
- package/dist/db/manage/manage-schema.d.ts +381 -381
- package/dist/db/runtime/runtime-schema.d.ts +181 -181
- package/dist/index.d.ts +2 -4
- package/dist/index.js +8 -10
- package/dist/validation/agentFull.js +1 -1
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +4 -23
- package/dist/validation/drizzle-schema-helpers.js +3 -30
- package/dist/validation/index.d.ts +2 -4
- package/dist/validation/index.js +4 -6
- package/dist/validation/schemas.d.ts +1402 -1413
- package/dist/validation/schemas.js +117 -78
- package/package.json +2 -1
- package/dist/validation/id-validation.d.ts +0 -24
- package/dist/validation/id-validation.js +0 -52
|
@@ -4,8 +4,9 @@ import { jmespathString, validateJMESPathSecure, validateRegex } from "../utils/
|
|
|
4
4
|
import { agents, artifactComponents, contextConfigs, credentialReferences, dataComponents, dataset, datasetItem, datasetRunConfig, datasetRunConfigAgentRelations, evaluationJobConfig, evaluationJobConfigEvaluatorRelations, evaluationRunConfig, evaluationRunConfigEvaluationSuiteConfigRelations, evaluationSuiteConfig, evaluationSuiteConfigEvaluatorRelations, evaluator, externalAgents, functionTools, functions, projects, subAgentArtifactComponents, subAgentDataComponents, subAgentExternalAgentRelations, subAgentFunctionToolRelations, subAgentRelations, subAgentTeamAgentRelations, subAgentToolRelations, subAgents, tools, triggers } from "../db/manage/manage-schema.js";
|
|
5
5
|
import { apiKeys, contextCache, conversations, datasetRun, datasetRunConversationRelations, evaluationResult, evaluationRun, ledgerArtifacts, messages, projectMetadata, taskRelations, tasks, triggerInvocations } from "../db/runtime/runtime-schema.js";
|
|
6
6
|
import { ResolvedRefSchema } from "./dolt-schemas.js";
|
|
7
|
-
import {
|
|
7
|
+
import { createInsertSchema, createSelectSchema, registerFieldSchemas } from "./drizzle-schema-helpers.js";
|
|
8
8
|
import { z } from "@hono/zod-openapi";
|
|
9
|
+
import { parse } from "@babel/parser";
|
|
9
10
|
|
|
10
11
|
//#region src/validation/schemas.ts
|
|
11
12
|
const { AGENT_EXECUTION_TRANSFER_COUNT_MAX, AGENT_EXECUTION_TRANSFER_COUNT_MIN, CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT, STATUS_UPDATE_MAX_INTERVAL_SECONDS, STATUS_UPDATE_MAX_NUM_EVENTS, SUB_AGENT_TURN_GENERATION_STEPS_MAX, SUB_AGENT_TURN_GENERATION_STEPS_MIN, VALIDATION_AGENT_PROMPT_MAX_CHARS, VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS } = schemaValidationDefaults;
|
|
@@ -15,6 +16,13 @@ const StopWhenSchema = z.object({
|
|
|
15
16
|
}).openapi("StopWhen");
|
|
16
17
|
const AgentStopWhenSchema = StopWhenSchema.pick({ transferCountIs: true }).openapi("AgentStopWhen");
|
|
17
18
|
const SubAgentStopWhenSchema = StopWhenSchema.pick({ stepCountIs: true }).openapi("SubAgentStopWhen");
|
|
19
|
+
const MIN_ID_LENGTH = 1;
|
|
20
|
+
const MAX_ID_LENGTH = 255;
|
|
21
|
+
const URL_SAFE_ID_PATTERN = /^[a-zA-Z0-9\-_.]+$/;
|
|
22
|
+
const ResourceIdSchema = z.string().min(MIN_ID_LENGTH).max(MAX_ID_LENGTH).regex(URL_SAFE_ID_PATTERN, { message: "ID must contain only letters, numbers, hyphens, underscores, and dots" }).refine((value) => value !== "new", "Must not use a reserved name \"new\"").openapi({
|
|
23
|
+
description: "Resource identifier",
|
|
24
|
+
example: "resource_789"
|
|
25
|
+
});
|
|
18
26
|
const pageNumber = z.coerce.number().min(1).default(1).openapi("PaginationPageQueryParam");
|
|
19
27
|
const limitNumber = z.coerce.number().min(1).max(100).default(10).openapi("PaginationLimitQueryParam");
|
|
20
28
|
const ModelSettingsSchema = z.object({
|
|
@@ -72,7 +80,7 @@ const createAgentScopedApiUpdateSchema = (schema) => schema.omit({
|
|
|
72
80
|
}).partial();
|
|
73
81
|
const SubAgentSelectSchema = createSelectSchema(subAgents);
|
|
74
82
|
const SubAgentInsertSchema = createInsertSchema(subAgents).extend({
|
|
75
|
-
id:
|
|
83
|
+
id: ResourceIdSchema,
|
|
76
84
|
models: ModelSchema.optional()
|
|
77
85
|
});
|
|
78
86
|
const SubAgentUpdateSchema = SubAgentInsertSchema.partial();
|
|
@@ -81,12 +89,12 @@ const SubAgentApiInsertSchema = createAgentScopedApiInsertSchema(SubAgentInsertS
|
|
|
81
89
|
const SubAgentApiUpdateSchema = createAgentScopedApiUpdateSchema(SubAgentUpdateSchema).openapi("SubAgentUpdate");
|
|
82
90
|
const SubAgentRelationSelectSchema = createSelectSchema(subAgentRelations);
|
|
83
91
|
const SubAgentRelationInsertSchema = createInsertSchema(subAgentRelations).extend({
|
|
84
|
-
id:
|
|
85
|
-
agentId:
|
|
86
|
-
sourceSubAgentId:
|
|
87
|
-
targetSubAgentId:
|
|
88
|
-
externalSubAgentId:
|
|
89
|
-
teamSubAgentId:
|
|
92
|
+
id: ResourceIdSchema,
|
|
93
|
+
agentId: ResourceIdSchema,
|
|
94
|
+
sourceSubAgentId: ResourceIdSchema,
|
|
95
|
+
targetSubAgentId: ResourceIdSchema.optional(),
|
|
96
|
+
externalSubAgentId: ResourceIdSchema.optional(),
|
|
97
|
+
teamSubAgentId: ResourceIdSchema.optional()
|
|
90
98
|
});
|
|
91
99
|
const SubAgentRelationUpdateSchema = SubAgentRelationInsertSchema.partial();
|
|
92
100
|
const SubAgentRelationApiSelectSchema = createAgentScopedApiSchema(SubAgentRelationSelectSchema).openapi("SubAgentRelation");
|
|
@@ -127,22 +135,25 @@ const SubAgentRelationQuerySchema = z.object({
|
|
|
127
135
|
teamSubAgentId: z.string().optional()
|
|
128
136
|
});
|
|
129
137
|
const ExternalSubAgentRelationInsertSchema = createInsertSchema(subAgentRelations).extend({
|
|
130
|
-
id:
|
|
131
|
-
agentId:
|
|
132
|
-
sourceSubAgentId:
|
|
133
|
-
externalSubAgentId:
|
|
138
|
+
id: ResourceIdSchema,
|
|
139
|
+
agentId: ResourceIdSchema,
|
|
140
|
+
sourceSubAgentId: ResourceIdSchema,
|
|
141
|
+
externalSubAgentId: ResourceIdSchema
|
|
134
142
|
});
|
|
135
143
|
const ExternalSubAgentRelationApiInsertSchema = createApiInsertSchema(ExternalSubAgentRelationInsertSchema);
|
|
136
144
|
const AgentSelectSchema = createSelectSchema(agents);
|
|
137
145
|
const DEFAULT_SUB_AGENT_ID_DESCRIPTION = "ID of the default sub-agent that handles initial user messages. Required at runtime but nullable on creation to avoid circular FK dependency. Workflow: 1) POST Agent (without defaultSubAgentId), 2) POST SubAgent, 3) PATCH Agent with defaultSubAgentId.";
|
|
138
146
|
const AgentInsertSchema = createInsertSchema(agents, {
|
|
139
|
-
id: () =>
|
|
147
|
+
id: () => ResourceIdSchema,
|
|
140
148
|
name: () => z.string().trim().nonempty().describe("Agent name").openapi({ description: "Agent name" }),
|
|
141
|
-
defaultSubAgentId: () =>
|
|
149
|
+
defaultSubAgentId: () => ResourceIdSchema.clone().nullable().optional().openapi({
|
|
150
|
+
description: DEFAULT_SUB_AGENT_ID_DESCRIPTION,
|
|
151
|
+
example: "my-default-subagent"
|
|
152
|
+
})
|
|
142
153
|
});
|
|
143
154
|
const AgentUpdateSchema = AgentInsertSchema.partial();
|
|
144
155
|
const AgentApiSelectSchema = createApiSchema(AgentSelectSchema).openapi("Agent");
|
|
145
|
-
const AgentApiInsertSchema = createApiInsertSchema(AgentInsertSchema).extend({ id:
|
|
156
|
+
const AgentApiInsertSchema = createApiInsertSchema(AgentInsertSchema).extend({ id: ResourceIdSchema }).openapi("AgentCreate");
|
|
146
157
|
const AgentApiUpdateSchema = createApiUpdateSchema(AgentUpdateSchema).openapi("AgentUpdate");
|
|
147
158
|
const TriggerAuthHeaderInputSchema = z.object({
|
|
148
159
|
name: z.string().min(1).describe("Header name (e.g., X-API-Key, Authorization)"),
|
|
@@ -334,7 +345,7 @@ const TriggerSelectSchema = registerFieldSchemas(createSelectSchema(triggers).ex
|
|
|
334
345
|
signatureVerification: SignatureVerificationConfigSchema.nullable().optional()
|
|
335
346
|
}));
|
|
336
347
|
const TriggerInsertSchemaBase = createInsertSchema(triggers, {
|
|
337
|
-
id: () =>
|
|
348
|
+
id: () => ResourceIdSchema,
|
|
338
349
|
name: () => z.string().trim().nonempty().describe("Trigger name"),
|
|
339
350
|
description: () => z.string().optional().describe("Trigger description"),
|
|
340
351
|
enabled: () => z.boolean().default(true).describe("Whether the trigger is enabled"),
|
|
@@ -418,14 +429,14 @@ const TriggerInsertSchema = TriggerInsertSchemaBase.superRefine((data, ctx) => {
|
|
|
418
429
|
});
|
|
419
430
|
const TriggerUpdateSchema = TriggerInsertSchemaBase.extend({ enabled: z.boolean().optional().describe("Whether the trigger is enabled") }).partial();
|
|
420
431
|
const TriggerApiSelectSchema = createAgentScopedApiSchema(TriggerSelectSchema).openapi("Trigger");
|
|
421
|
-
const TriggerApiInsertSchema = createAgentScopedApiInsertSchema(TriggerInsertSchema).extend({ id:
|
|
432
|
+
const TriggerApiInsertSchema = createAgentScopedApiInsertSchema(TriggerInsertSchema).extend({ id: ResourceIdSchema.optional() }).openapi("TriggerCreate");
|
|
422
433
|
const TriggerApiUpdateSchema = TriggerUpdateSchema.openapi("TriggerUpdate");
|
|
423
434
|
const TriggerWithWebhookUrlSchema = TriggerApiSelectSchema.extend({ webhookUrl: z.string().describe("Fully qualified webhook URL for this trigger") }).openapi("TriggerWithWebhookUrl");
|
|
424
435
|
const TriggerInvocationSelectSchema = createSelectSchema(triggerInvocations);
|
|
425
436
|
const TriggerInvocationInsertSchema = createInsertSchema(triggerInvocations, {
|
|
426
|
-
id: () =>
|
|
427
|
-
triggerId: () =>
|
|
428
|
-
conversationId: () =>
|
|
437
|
+
id: () => ResourceIdSchema,
|
|
438
|
+
triggerId: () => ResourceIdSchema,
|
|
439
|
+
conversationId: () => ResourceIdSchema.optional(),
|
|
429
440
|
status: () => TriggerInvocationStatusEnum.default("pending"),
|
|
430
441
|
requestPayload: () => z.record(z.string(), z.unknown()).describe("Original webhook payload"),
|
|
431
442
|
transformedPayload: () => z.record(z.string(), z.unknown()).optional().describe("Transformed payload"),
|
|
@@ -433,12 +444,12 @@ const TriggerInvocationInsertSchema = createInsertSchema(triggerInvocations, {
|
|
|
433
444
|
});
|
|
434
445
|
const TriggerInvocationUpdateSchema = TriggerInvocationInsertSchema.partial();
|
|
435
446
|
const TriggerInvocationApiSelectSchema = createAgentScopedApiSchema(TriggerInvocationSelectSchema).openapi("TriggerInvocation");
|
|
436
|
-
const TriggerInvocationApiInsertSchema = createAgentScopedApiInsertSchema(TriggerInvocationInsertSchema).extend({ id:
|
|
447
|
+
const TriggerInvocationApiInsertSchema = createAgentScopedApiInsertSchema(TriggerInvocationInsertSchema).extend({ id: ResourceIdSchema }).openapi("TriggerInvocationCreate");
|
|
437
448
|
const TriggerInvocationApiUpdateSchema = createAgentScopedApiUpdateSchema(TriggerInvocationUpdateSchema).openapi("TriggerInvocationUpdate");
|
|
438
449
|
const TaskSelectSchema = createSelectSchema(tasks);
|
|
439
450
|
const TaskInsertSchema = createInsertSchema(tasks).extend({
|
|
440
|
-
id:
|
|
441
|
-
conversationId:
|
|
451
|
+
id: ResourceIdSchema,
|
|
452
|
+
conversationId: ResourceIdSchema.optional(),
|
|
442
453
|
ref: ResolvedRefSchema
|
|
443
454
|
});
|
|
444
455
|
const TaskUpdateSchema = TaskInsertSchema.partial();
|
|
@@ -447,9 +458,9 @@ const TaskApiInsertSchema = createApiInsertSchema(TaskInsertSchema);
|
|
|
447
458
|
const TaskApiUpdateSchema = createApiUpdateSchema(TaskUpdateSchema);
|
|
448
459
|
const TaskRelationSelectSchema = createSelectSchema(taskRelations);
|
|
449
460
|
const TaskRelationInsertSchema = createInsertSchema(taskRelations).extend({
|
|
450
|
-
id:
|
|
451
|
-
parentTaskId:
|
|
452
|
-
childTaskId:
|
|
461
|
+
id: ResourceIdSchema,
|
|
462
|
+
parentTaskId: ResourceIdSchema,
|
|
463
|
+
childTaskId: ResourceIdSchema
|
|
453
464
|
});
|
|
454
465
|
const TaskRelationUpdateSchema = TaskRelationInsertSchema.partial();
|
|
455
466
|
const TaskRelationApiSelectSchema = createApiSchema(TaskRelationSelectSchema);
|
|
@@ -487,7 +498,7 @@ const McpToolDefinitionSchema = z.object({
|
|
|
487
498
|
});
|
|
488
499
|
const ToolSelectSchema = createSelectSchema(tools);
|
|
489
500
|
const ToolInsertSchema = createInsertSchema(tools).extend({
|
|
490
|
-
id:
|
|
501
|
+
id: ResourceIdSchema,
|
|
491
502
|
imageUrl: imageUrlSchema,
|
|
492
503
|
config: z.object({
|
|
493
504
|
type: z.literal("mcp"),
|
|
@@ -516,8 +527,8 @@ const ToolInsertSchema = createInsertSchema(tools).extend({
|
|
|
516
527
|
});
|
|
517
528
|
const ConversationSelectSchema = createSelectSchema(conversations);
|
|
518
529
|
const ConversationInsertSchema = createInsertSchema(conversations).extend({
|
|
519
|
-
id:
|
|
520
|
-
contextConfigId:
|
|
530
|
+
id: ResourceIdSchema,
|
|
531
|
+
contextConfigId: ResourceIdSchema.optional(),
|
|
521
532
|
ref: ResolvedRefSchema
|
|
522
533
|
});
|
|
523
534
|
const ConversationUpdateSchema = ConversationInsertSchema.partial();
|
|
@@ -526,9 +537,9 @@ const ConversationApiInsertSchema = createApiInsertSchema(ConversationInsertSche
|
|
|
526
537
|
const ConversationApiUpdateSchema = createApiUpdateSchema(ConversationUpdateSchema).openapi("ConversationUpdate");
|
|
527
538
|
const MessageSelectSchema = createSelectSchema(messages);
|
|
528
539
|
const MessageInsertSchema = createInsertSchema(messages).extend({
|
|
529
|
-
id:
|
|
530
|
-
conversationId:
|
|
531
|
-
taskId:
|
|
540
|
+
id: ResourceIdSchema,
|
|
541
|
+
conversationId: ResourceIdSchema,
|
|
542
|
+
taskId: ResourceIdSchema.optional()
|
|
532
543
|
});
|
|
533
544
|
const MessageUpdateSchema = MessageInsertSchema.partial();
|
|
534
545
|
const MessageApiSelectSchema = createApiSchema(MessageSelectSchema).openapi("Message");
|
|
@@ -541,80 +552,80 @@ const ContextCacheApiSelectSchema = createApiSchema(ContextCacheSelectSchema);
|
|
|
541
552
|
const ContextCacheApiInsertSchema = createApiInsertSchema(ContextCacheInsertSchema);
|
|
542
553
|
const ContextCacheApiUpdateSchema = createApiUpdateSchema(ContextCacheUpdateSchema);
|
|
543
554
|
const DatasetRunSelectSchema = createSelectSchema(datasetRun);
|
|
544
|
-
const DatasetRunInsertSchema = createInsertSchema(datasetRun).extend({ id:
|
|
555
|
+
const DatasetRunInsertSchema = createInsertSchema(datasetRun).extend({ id: ResourceIdSchema });
|
|
545
556
|
const DatasetRunUpdateSchema = DatasetRunInsertSchema.partial();
|
|
546
557
|
const DatasetRunApiSelectSchema = createApiSchema(DatasetRunSelectSchema).openapi("DatasetRun");
|
|
547
558
|
const DatasetRunApiInsertSchema = createApiInsertSchema(DatasetRunInsertSchema).omit({ id: true }).openapi("DatasetRunCreate");
|
|
548
559
|
const DatasetRunApiUpdateSchema = createApiUpdateSchema(DatasetRunUpdateSchema).omit({ id: true }).openapi("DatasetRunUpdate");
|
|
549
560
|
const DatasetRunConversationRelationSelectSchema = createSelectSchema(datasetRunConversationRelations);
|
|
550
|
-
const DatasetRunConversationRelationInsertSchema = createInsertSchema(datasetRunConversationRelations).extend({ id:
|
|
561
|
+
const DatasetRunConversationRelationInsertSchema = createInsertSchema(datasetRunConversationRelations).extend({ id: ResourceIdSchema });
|
|
551
562
|
const DatasetRunConversationRelationUpdateSchema = DatasetRunConversationRelationInsertSchema.partial();
|
|
552
563
|
const DatasetRunConversationRelationApiSelectSchema = createApiSchema(DatasetRunConversationRelationSelectSchema).openapi("DatasetRunConversationRelation");
|
|
553
564
|
const DatasetRunConversationRelationApiInsertSchema = createApiInsertSchema(DatasetRunConversationRelationInsertSchema).omit({ id: true }).openapi("DatasetRunConversationRelationCreate");
|
|
554
565
|
const DatasetRunConversationRelationApiUpdateSchema = createApiUpdateSchema(DatasetRunConversationRelationUpdateSchema).omit({ id: true }).openapi("DatasetRunConversationRelationUpdate");
|
|
555
566
|
const EvaluationResultSelectSchema = createSelectSchema(evaluationResult);
|
|
556
|
-
const EvaluationResultInsertSchema = createInsertSchema(evaluationResult).extend({ id:
|
|
567
|
+
const EvaluationResultInsertSchema = createInsertSchema(evaluationResult).extend({ id: ResourceIdSchema });
|
|
557
568
|
const EvaluationResultUpdateSchema = EvaluationResultInsertSchema.partial();
|
|
558
569
|
const EvaluationResultApiSelectSchema = createApiSchema(EvaluationResultSelectSchema).openapi("EvaluationResult");
|
|
559
570
|
const EvaluationResultApiInsertSchema = createApiInsertSchema(EvaluationResultInsertSchema).omit({ id: true }).openapi("EvaluationResultCreate");
|
|
560
571
|
const EvaluationResultApiUpdateSchema = createApiUpdateSchema(EvaluationResultUpdateSchema).omit({ id: true }).openapi("EvaluationResultUpdate");
|
|
561
572
|
const EvaluationRunSelectSchema = createSelectSchema(evaluationRun);
|
|
562
|
-
const EvaluationRunInsertSchema = createInsertSchema(evaluationRun).extend({ id:
|
|
573
|
+
const EvaluationRunInsertSchema = createInsertSchema(evaluationRun).extend({ id: ResourceIdSchema });
|
|
563
574
|
const EvaluationRunUpdateSchema = EvaluationRunInsertSchema.partial();
|
|
564
575
|
const EvaluationRunApiSelectSchema = createApiSchema(EvaluationRunSelectSchema).openapi("EvaluationRun");
|
|
565
576
|
const EvaluationRunApiInsertSchema = createApiInsertSchema(EvaluationRunInsertSchema).omit({ id: true }).openapi("EvaluationRunCreate");
|
|
566
577
|
const EvaluationRunApiUpdateSchema = createApiUpdateSchema(EvaluationRunUpdateSchema).omit({ id: true }).openapi("EvaluationRunUpdate");
|
|
567
578
|
const EvaluationRunConfigSelectSchema = createSelectSchema(evaluationRunConfig);
|
|
568
|
-
const EvaluationRunConfigInsertSchema = createInsertSchema(evaluationRunConfig).extend({ id:
|
|
579
|
+
const EvaluationRunConfigInsertSchema = createInsertSchema(evaluationRunConfig).extend({ id: ResourceIdSchema });
|
|
569
580
|
const EvaluationRunConfigUpdateSchema = EvaluationRunConfigInsertSchema.partial();
|
|
570
581
|
const EvaluationRunConfigApiSelectSchema = createApiSchema(EvaluationRunConfigSelectSchema).openapi("EvaluationRunConfig");
|
|
571
582
|
const EvaluationRunConfigApiInsertSchema = createApiInsertSchema(EvaluationRunConfigInsertSchema).omit({ id: true }).extend({ suiteConfigIds: z.array(z.string()).min(1, "At least one suite config is required") }).openapi("EvaluationRunConfigCreate");
|
|
572
583
|
const EvaluationRunConfigApiUpdateSchema = createApiUpdateSchema(EvaluationRunConfigUpdateSchema).omit({ id: true }).extend({ suiteConfigIds: z.array(z.string()).optional() }).openapi("EvaluationRunConfigUpdate");
|
|
573
584
|
const EvaluationRunConfigWithSuiteConfigsApiSelectSchema = EvaluationRunConfigApiSelectSchema.extend({ suiteConfigIds: z.array(z.string()) }).openapi("EvaluationRunConfigWithSuiteConfigs");
|
|
574
585
|
const EvaluationJobConfigSelectSchema = createSelectSchema(evaluationJobConfig);
|
|
575
|
-
const EvaluationJobConfigInsertSchema = createInsertSchema(evaluationJobConfig).extend({ id:
|
|
586
|
+
const EvaluationJobConfigInsertSchema = createInsertSchema(evaluationJobConfig).extend({ id: ResourceIdSchema });
|
|
576
587
|
const EvaluationJobConfigUpdateSchema = EvaluationJobConfigInsertSchema.partial();
|
|
577
588
|
const EvaluationJobConfigApiSelectSchema = createApiSchema(EvaluationJobConfigSelectSchema).openapi("EvaluationJobConfig");
|
|
578
589
|
const EvaluationJobConfigApiInsertSchema = createApiInsertSchema(EvaluationJobConfigInsertSchema).omit({ id: true }).extend({ evaluatorIds: z.array(z.string()).min(1, "At least one evaluator is required") }).openapi("EvaluationJobConfigCreate");
|
|
579
590
|
const EvaluationJobConfigApiUpdateSchema = createApiUpdateSchema(EvaluationJobConfigUpdateSchema).omit({ id: true }).openapi("EvaluationJobConfigUpdate");
|
|
580
591
|
const EvaluationSuiteConfigSelectSchema = createSelectSchema(evaluationSuiteConfig);
|
|
581
|
-
const EvaluationSuiteConfigInsertSchema = createInsertSchema(evaluationSuiteConfig).extend({ id:
|
|
592
|
+
const EvaluationSuiteConfigInsertSchema = createInsertSchema(evaluationSuiteConfig).extend({ id: ResourceIdSchema });
|
|
582
593
|
const EvaluationSuiteConfigUpdateSchema = EvaluationSuiteConfigInsertSchema.partial();
|
|
583
594
|
const EvaluationSuiteConfigApiSelectSchema = createApiSchema(EvaluationSuiteConfigSelectSchema).openapi("EvaluationSuiteConfig");
|
|
584
595
|
const EvaluationSuiteConfigApiInsertSchema = createApiInsertSchema(EvaluationSuiteConfigInsertSchema).omit({ id: true }).extend({ evaluatorIds: z.array(z.string()).min(1, "At least one evaluator is required") }).openapi("EvaluationSuiteConfigCreate");
|
|
585
596
|
const EvaluationSuiteConfigApiUpdateSchema = createApiUpdateSchema(EvaluationSuiteConfigUpdateSchema).omit({ id: true }).extend({ evaluatorIds: z.array(z.string()).optional() }).openapi("EvaluationSuiteConfigUpdate");
|
|
586
597
|
const EvaluationRunConfigEvaluationSuiteConfigRelationSelectSchema = createSelectSchema(evaluationRunConfigEvaluationSuiteConfigRelations);
|
|
587
|
-
const EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema = createInsertSchema(evaluationRunConfigEvaluationSuiteConfigRelations).extend({ id:
|
|
598
|
+
const EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema = createInsertSchema(evaluationRunConfigEvaluationSuiteConfigRelations).extend({ id: ResourceIdSchema });
|
|
588
599
|
const EvaluationRunConfigEvaluationSuiteConfigRelationUpdateSchema = EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema.partial();
|
|
589
600
|
const EvaluationRunConfigEvaluationSuiteConfigRelationApiSelectSchema = createApiSchema(EvaluationRunConfigEvaluationSuiteConfigRelationSelectSchema).openapi("EvaluationRunConfigEvaluationSuiteConfigRelation");
|
|
590
601
|
const EvaluationRunConfigEvaluationSuiteConfigRelationApiInsertSchema = createApiInsertSchema(EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema).omit({ id: true }).openapi("EvaluationRunConfigEvaluationSuiteConfigRelationCreate");
|
|
591
602
|
const EvaluationRunConfigEvaluationSuiteConfigRelationApiUpdateSchema = createApiUpdateSchema(EvaluationRunConfigEvaluationSuiteConfigRelationUpdateSchema).omit({ id: true }).openapi("EvaluationRunConfigEvaluationSuiteConfigRelationUpdate");
|
|
592
603
|
const EvaluationJobConfigEvaluatorRelationSelectSchema = createSelectSchema(evaluationJobConfigEvaluatorRelations);
|
|
593
|
-
const EvaluationJobConfigEvaluatorRelationInsertSchema = createInsertSchema(evaluationJobConfigEvaluatorRelations).extend({ id:
|
|
604
|
+
const EvaluationJobConfigEvaluatorRelationInsertSchema = createInsertSchema(evaluationJobConfigEvaluatorRelations).extend({ id: ResourceIdSchema });
|
|
594
605
|
const EvaluationJobConfigEvaluatorRelationUpdateSchema = EvaluationJobConfigEvaluatorRelationInsertSchema.partial();
|
|
595
606
|
const EvaluationJobConfigEvaluatorRelationApiSelectSchema = createApiSchema(EvaluationJobConfigEvaluatorRelationSelectSchema).openapi("EvaluationJobConfigEvaluatorRelation");
|
|
596
607
|
const EvaluationJobConfigEvaluatorRelationApiInsertSchema = createApiInsertSchema(EvaluationJobConfigEvaluatorRelationInsertSchema).omit({ id: true }).openapi("EvaluationJobConfigEvaluatorRelationCreate");
|
|
597
608
|
const EvaluationJobConfigEvaluatorRelationApiUpdateSchema = createApiUpdateSchema(EvaluationJobConfigEvaluatorRelationUpdateSchema).omit({ id: true }).openapi("EvaluationJobConfigEvaluatorRelationUpdate");
|
|
598
609
|
const EvaluationSuiteConfigEvaluatorRelationSelectSchema = createSelectSchema(evaluationSuiteConfigEvaluatorRelations);
|
|
599
|
-
const EvaluationSuiteConfigEvaluatorRelationInsertSchema = createInsertSchema(evaluationSuiteConfigEvaluatorRelations).extend({ id:
|
|
610
|
+
const EvaluationSuiteConfigEvaluatorRelationInsertSchema = createInsertSchema(evaluationSuiteConfigEvaluatorRelations).extend({ id: ResourceIdSchema });
|
|
600
611
|
const EvaluationSuiteConfigEvaluatorRelationUpdateSchema = EvaluationSuiteConfigEvaluatorRelationInsertSchema.partial();
|
|
601
612
|
const EvaluationSuiteConfigEvaluatorRelationApiSelectSchema = createApiSchema(EvaluationSuiteConfigEvaluatorRelationSelectSchema).openapi("EvaluationSuiteConfigEvaluatorRelation");
|
|
602
613
|
const EvaluationSuiteConfigEvaluatorRelationApiInsertSchema = createApiInsertSchema(EvaluationSuiteConfigEvaluatorRelationInsertSchema).omit({ id: true }).openapi("EvaluationSuiteConfigEvaluatorRelationCreate");
|
|
603
614
|
const EvaluationSuiteConfigEvaluatorRelationApiUpdateSchema = createApiUpdateSchema(EvaluationSuiteConfigEvaluatorRelationUpdateSchema).omit({ id: true }).openapi("EvaluationSuiteConfigEvaluatorRelationUpdate");
|
|
604
615
|
const EvaluatorSelectSchema = createSelectSchema(evaluator);
|
|
605
|
-
const EvaluatorInsertSchema = createInsertSchema(evaluator).extend({ id:
|
|
616
|
+
const EvaluatorInsertSchema = createInsertSchema(evaluator).extend({ id: ResourceIdSchema });
|
|
606
617
|
const EvaluatorUpdateSchema = EvaluatorInsertSchema.partial();
|
|
607
618
|
const EvaluatorApiSelectSchema = createApiSchema(EvaluatorSelectSchema).openapi("Evaluator");
|
|
608
619
|
const EvaluatorApiInsertSchema = createApiInsertSchema(EvaluatorInsertSchema).omit({ id: true }).openapi("EvaluatorCreate");
|
|
609
620
|
const EvaluatorApiUpdateSchema = createApiUpdateSchema(EvaluatorUpdateSchema).omit({ id: true }).openapi("EvaluatorUpdate");
|
|
610
621
|
const DatasetSelectSchema = createSelectSchema(dataset);
|
|
611
|
-
const DatasetInsertSchema = createInsertSchema(dataset).extend({ id:
|
|
622
|
+
const DatasetInsertSchema = createInsertSchema(dataset).extend({ id: ResourceIdSchema });
|
|
612
623
|
const DatasetUpdateSchema = DatasetInsertSchema.partial();
|
|
613
624
|
const DatasetApiSelectSchema = createApiSchema(DatasetSelectSchema).openapi("Dataset");
|
|
614
625
|
const DatasetApiInsertSchema = createApiInsertSchema(DatasetInsertSchema).omit({ id: true }).openapi("DatasetCreate");
|
|
615
626
|
const DatasetApiUpdateSchema = createApiUpdateSchema(DatasetUpdateSchema).omit({ id: true }).openapi("DatasetUpdate");
|
|
616
627
|
const DatasetItemSelectSchema = createSelectSchema(datasetItem);
|
|
617
|
-
const DatasetItemInsertSchema = createInsertSchema(datasetItem).extend({ id:
|
|
628
|
+
const DatasetItemInsertSchema = createInsertSchema(datasetItem).extend({ id: ResourceIdSchema });
|
|
618
629
|
const DatasetItemUpdateSchema = DatasetItemInsertSchema.partial();
|
|
619
630
|
const DatasetItemApiSelectSchema = createApiSchema(DatasetItemSelectSchema).openapi("DatasetItem");
|
|
620
631
|
const DatasetItemApiInsertSchema = createApiInsertSchema(DatasetItemInsertSchema).omit({
|
|
@@ -657,19 +668,19 @@ const TriggerEvaluationJobSchema = z.object({
|
|
|
657
668
|
jobFilters: EvaluationJobFilterCriteriaSchema.nullable().optional()
|
|
658
669
|
}).openapi("TriggerEvaluationJob");
|
|
659
670
|
const DatasetRunConfigSelectSchema = createSelectSchema(datasetRunConfig);
|
|
660
|
-
const DatasetRunConfigInsertSchema = createInsertSchema(datasetRunConfig).extend({ id:
|
|
671
|
+
const DatasetRunConfigInsertSchema = createInsertSchema(datasetRunConfig).extend({ id: ResourceIdSchema });
|
|
661
672
|
const DatasetRunConfigUpdateSchema = DatasetRunConfigInsertSchema.partial();
|
|
662
673
|
const DatasetRunConfigApiSelectSchema = createApiSchema(DatasetRunConfigSelectSchema).openapi("DatasetRunConfig");
|
|
663
674
|
const DatasetRunConfigApiInsertSchema = createApiInsertSchema(DatasetRunConfigInsertSchema).omit({ id: true }).openapi("DatasetRunConfigCreate");
|
|
664
675
|
const DatasetRunConfigApiUpdateSchema = createApiUpdateSchema(DatasetRunConfigUpdateSchema).omit({ id: true }).openapi("DatasetRunConfigUpdate");
|
|
665
676
|
const DatasetRunConfigAgentRelationSelectSchema = createSelectSchema(datasetRunConfigAgentRelations);
|
|
666
|
-
const DatasetRunConfigAgentRelationInsertSchema = createInsertSchema(datasetRunConfigAgentRelations).extend({ id:
|
|
677
|
+
const DatasetRunConfigAgentRelationInsertSchema = createInsertSchema(datasetRunConfigAgentRelations).extend({ id: ResourceIdSchema });
|
|
667
678
|
const DatasetRunConfigAgentRelationUpdateSchema = DatasetRunConfigAgentRelationInsertSchema.partial();
|
|
668
679
|
const DatasetRunConfigAgentRelationApiSelectSchema = createApiSchema(DatasetRunConfigAgentRelationSelectSchema).openapi("DatasetRunConfigAgentRelation");
|
|
669
680
|
const DatasetRunConfigAgentRelationApiInsertSchema = createApiInsertSchema(DatasetRunConfigAgentRelationInsertSchema).omit({ id: true }).openapi("DatasetRunConfigAgentRelationCreate");
|
|
670
681
|
const DatasetRunConfigAgentRelationApiUpdateSchema = createApiUpdateSchema(DatasetRunConfigAgentRelationUpdateSchema).omit({ id: true }).openapi("DatasetRunConfigAgentRelationUpdate");
|
|
671
682
|
const DataComponentSelectSchema = createSelectSchema(dataComponents);
|
|
672
|
-
const DataComponentInsertSchema = createInsertSchema(dataComponents).extend({ id:
|
|
683
|
+
const DataComponentInsertSchema = createInsertSchema(dataComponents).extend({ id: ResourceIdSchema });
|
|
673
684
|
const DataComponentBaseSchema = DataComponentInsertSchema.omit({
|
|
674
685
|
createdAt: true,
|
|
675
686
|
updatedAt: true
|
|
@@ -690,7 +701,7 @@ const SubAgentDataComponentApiInsertSchema = SubAgentDataComponentInsertSchema.o
|
|
|
690
701
|
});
|
|
691
702
|
const SubAgentDataComponentApiUpdateSchema = createAgentScopedApiUpdateSchema(SubAgentDataComponentUpdateSchema);
|
|
692
703
|
const ArtifactComponentSelectSchema = createSelectSchema(artifactComponents);
|
|
693
|
-
const ArtifactComponentInsertSchema = createInsertSchema(artifactComponents).extend({ id:
|
|
704
|
+
const ArtifactComponentInsertSchema = createInsertSchema(artifactComponents).extend({ id: ResourceIdSchema });
|
|
694
705
|
const ArtifactComponentUpdateSchema = ArtifactComponentInsertSchema.partial();
|
|
695
706
|
const ArtifactComponentApiSelectSchema = createApiSchema(ArtifactComponentSelectSchema).openapi("ArtifactComponent");
|
|
696
707
|
const ArtifactComponentApiInsertSchema = ArtifactComponentInsertSchema.omit({
|
|
@@ -702,9 +713,9 @@ const ArtifactComponentApiInsertSchema = ArtifactComponentInsertSchema.omit({
|
|
|
702
713
|
const ArtifactComponentApiUpdateSchema = createApiUpdateSchema(ArtifactComponentUpdateSchema).openapi("ArtifactComponentUpdate");
|
|
703
714
|
const SubAgentArtifactComponentSelectSchema = createSelectSchema(subAgentArtifactComponents);
|
|
704
715
|
const SubAgentArtifactComponentInsertSchema = createInsertSchema(subAgentArtifactComponents).extend({
|
|
705
|
-
id:
|
|
706
|
-
subAgentId:
|
|
707
|
-
artifactComponentId:
|
|
716
|
+
id: ResourceIdSchema,
|
|
717
|
+
subAgentId: ResourceIdSchema,
|
|
718
|
+
artifactComponentId: ResourceIdSchema
|
|
708
719
|
});
|
|
709
720
|
const SubAgentArtifactComponentUpdateSchema = SubAgentArtifactComponentInsertSchema.partial();
|
|
710
721
|
const SubAgentArtifactComponentApiSelectSchema = createAgentScopedApiSchema(SubAgentArtifactComponentSelectSchema);
|
|
@@ -716,7 +727,7 @@ const SubAgentArtifactComponentApiInsertSchema = SubAgentArtifactComponentInsert
|
|
|
716
727
|
});
|
|
717
728
|
const SubAgentArtifactComponentApiUpdateSchema = createAgentScopedApiUpdateSchema(SubAgentArtifactComponentUpdateSchema);
|
|
718
729
|
const ExternalAgentSelectSchema = createSelectSchema(externalAgents).extend({ credentialReferenceId: z.string().nullable().optional() });
|
|
719
|
-
const ExternalAgentInsertSchema = createInsertSchema(externalAgents).extend({ id:
|
|
730
|
+
const ExternalAgentInsertSchema = createInsertSchema(externalAgents).extend({ id: ResourceIdSchema });
|
|
720
731
|
const ExternalAgentUpdateSchema = ExternalAgentInsertSchema.partial();
|
|
721
732
|
const ExternalAgentApiSelectSchema = createApiSchema(ExternalAgentSelectSchema).openapi("ExternalAgent");
|
|
722
733
|
const ExternalAgentApiInsertSchema = createApiInsertSchema(ExternalAgentInsertSchema).openapi("ExternalAgentCreate");
|
|
@@ -724,8 +735,8 @@ const ExternalAgentApiUpdateSchema = createApiUpdateSchema(ExternalAgentUpdateSc
|
|
|
724
735
|
const AllAgentSchema = z.discriminatedUnion("type", [SubAgentApiSelectSchema.extend({ type: z.literal("internal") }), ExternalAgentApiSelectSchema.extend({ type: z.literal("external") })]);
|
|
725
736
|
const ApiKeySelectSchema = createSelectSchema(apiKeys);
|
|
726
737
|
const ApiKeyInsertSchema = createInsertSchema(apiKeys).extend({
|
|
727
|
-
id:
|
|
728
|
-
agentId:
|
|
738
|
+
id: ResourceIdSchema,
|
|
739
|
+
agentId: ResourceIdSchema
|
|
729
740
|
});
|
|
730
741
|
const ApiKeyUpdateSchema = ApiKeyInsertSchema.partial().omit({
|
|
731
742
|
tenantId: true,
|
|
@@ -757,9 +768,9 @@ const ApiKeyApiInsertSchema = ApiKeyInsertSchema.omit({
|
|
|
757
768
|
const ApiKeyApiUpdateSchema = ApiKeyUpdateSchema.openapi("ApiKeyUpdate");
|
|
758
769
|
const CredentialReferenceSelectSchema = createSelectSchema(credentialReferences);
|
|
759
770
|
const CredentialReferenceInsertSchema = createInsertSchema(credentialReferences).extend({
|
|
760
|
-
id:
|
|
771
|
+
id: ResourceIdSchema,
|
|
761
772
|
type: z.string(),
|
|
762
|
-
credentialStoreId:
|
|
773
|
+
credentialStoreId: ResourceIdSchema,
|
|
763
774
|
retrievalParams: z.record(z.string(), z.unknown()).nullish()
|
|
764
775
|
});
|
|
765
776
|
const CredentialReferenceUpdateSchema = CredentialReferenceInsertSchema.partial();
|
|
@@ -847,16 +858,16 @@ const ToolApiSelectSchema = createApiSchema(ToolSelectSchema).openapi("Tool");
|
|
|
847
858
|
const ToolApiInsertSchema = createApiInsertSchema(ToolInsertSchema).openapi("ToolCreate");
|
|
848
859
|
const ToolApiUpdateSchema = createApiUpdateSchema(ToolUpdateSchema).openapi("ToolUpdate");
|
|
849
860
|
const FunctionToolSelectSchema = createSelectSchema(functionTools);
|
|
850
|
-
const FunctionToolInsertSchema = createInsertSchema(functionTools).extend({ id:
|
|
861
|
+
const FunctionToolInsertSchema = createInsertSchema(functionTools).extend({ id: ResourceIdSchema });
|
|
851
862
|
const FunctionToolUpdateSchema = FunctionToolInsertSchema.partial();
|
|
852
863
|
const FunctionToolApiSelectSchema = createApiSchema(FunctionToolSelectSchema).extend({ relationshipId: z.string().optional() }).openapi("FunctionTool");
|
|
853
864
|
const FunctionToolApiInsertSchema = createAgentScopedApiInsertSchema(FunctionToolInsertSchema).openapi("FunctionToolCreate");
|
|
854
865
|
const FunctionToolApiUpdateSchema = createApiUpdateSchema(FunctionToolUpdateSchema).openapi("FunctionToolUpdate");
|
|
855
866
|
const SubAgentFunctionToolRelationSelectSchema = createSelectSchema(subAgentFunctionToolRelations);
|
|
856
867
|
const SubAgentFunctionToolRelationInsertSchema = createInsertSchema(subAgentFunctionToolRelations).extend({
|
|
857
|
-
id:
|
|
858
|
-
subAgentId:
|
|
859
|
-
functionToolId:
|
|
868
|
+
id: ResourceIdSchema,
|
|
869
|
+
subAgentId: ResourceIdSchema,
|
|
870
|
+
functionToolId: ResourceIdSchema
|
|
860
871
|
});
|
|
861
872
|
const SubAgentFunctionToolRelationApiSelectSchema = createAgentScopedApiSchema(SubAgentFunctionToolRelationSelectSchema).openapi("SubAgentFunctionToolRelation");
|
|
862
873
|
const SubAgentFunctionToolRelationApiInsertSchema = SubAgentFunctionToolRelationInsertSchema.omit({
|
|
@@ -868,10 +879,38 @@ const SubAgentFunctionToolRelationApiInsertSchema = SubAgentFunctionToolRelation
|
|
|
868
879
|
updatedAt: true
|
|
869
880
|
}).openapi("SubAgentFunctionToolRelationCreate");
|
|
870
881
|
const FunctionSelectSchema = createSelectSchema(functions);
|
|
871
|
-
const FunctionInsertSchema = createInsertSchema(functions).extend({ id:
|
|
882
|
+
const FunctionInsertSchema = createInsertSchema(functions).extend({ id: ResourceIdSchema });
|
|
872
883
|
const FunctionUpdateSchema = FunctionInsertSchema.partial();
|
|
873
884
|
const FunctionApiSelectSchema = createApiSchema(FunctionSelectSchema).openapi("Function");
|
|
874
|
-
const
|
|
885
|
+
const validateExecuteCode = (val, ctx) => {
|
|
886
|
+
try {
|
|
887
|
+
const isAnonymousFunction = /^(async\s+)?function(\s+)?\(/.test(val);
|
|
888
|
+
if (isAnonymousFunction) val = `(${val})`;
|
|
889
|
+
const { body } = parse(val, { sourceType: "module" }).program;
|
|
890
|
+
for (const node of body) {
|
|
891
|
+
if (node.type === "ExportDefaultDeclaration") throw SyntaxError("Export default declarations are not supported. Provide a single function instead.");
|
|
892
|
+
if (node.type === "ExportNamedDeclaration") throw SyntaxError("Export declarations are not supported. Provide a single function instead.");
|
|
893
|
+
}
|
|
894
|
+
const functionsCount = body.filter((node) => {
|
|
895
|
+
if (node.type === "FunctionDeclaration") return true;
|
|
896
|
+
if (node.type === "ExpressionStatement") return node.expression.type === (isAnonymousFunction ? "FunctionExpression" : "ArrowFunctionExpression");
|
|
897
|
+
return false;
|
|
898
|
+
}).length;
|
|
899
|
+
if (!functionsCount) throw new SyntaxError("Must contain exactly one function.");
|
|
900
|
+
if (functionsCount > 1) throw new SyntaxError(`Must contain exactly one function (found ${functionsCount}).`);
|
|
901
|
+
} catch (error) {
|
|
902
|
+
let message = error instanceof Error ? error.message : JSON.stringify(error);
|
|
903
|
+
if (message.startsWith("'return' outside of function. (")) message = "Top-level return is not allowed.";
|
|
904
|
+
else if (message.startsWith("Unexpected token, expected \"")) message = "TypeScript syntax is not supported. Use plain JavaScript.";
|
|
905
|
+
else if (message.startsWith("This experimental syntax requires enabling one of the following parser plugin(s): \"jsx\", \"flow\", \"typescript\". (")) message = "JSX syntax is not supported. Use plain JavaScript.";
|
|
906
|
+
ctx.addIssue({
|
|
907
|
+
code: "custom",
|
|
908
|
+
message,
|
|
909
|
+
input: val
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
};
|
|
913
|
+
const FunctionApiInsertSchema = createApiInsertSchema(FunctionInsertSchema).openapi("FunctionCreate").extend({ executeCode: z.string().trim().nonempty().superRefine(validateExecuteCode) });
|
|
875
914
|
const FunctionApiUpdateSchema = createApiUpdateSchema(FunctionUpdateSchema).openapi("FunctionUpdate");
|
|
876
915
|
const FetchConfigSchema = z.object({
|
|
877
916
|
url: z.string().min(1, "URL is required"),
|
|
@@ -902,7 +941,7 @@ const ContextConfigSelectSchema = createSelectSchema(contextConfigs).extend({ he
|
|
|
902
941
|
description: "JSON Schema for validating request headers"
|
|
903
942
|
}) });
|
|
904
943
|
const ContextConfigInsertSchema = createInsertSchema(contextConfigs).extend({
|
|
905
|
-
id:
|
|
944
|
+
id: ResourceIdSchema.optional(),
|
|
906
945
|
headersSchema: z.any().nullable().optional().openapi({
|
|
907
946
|
type: "object",
|
|
908
947
|
description: "JSON Schema for validating request headers"
|
|
@@ -921,9 +960,9 @@ const ContextConfigApiInsertSchema = createApiInsertSchema(ContextConfigInsertSc
|
|
|
921
960
|
const ContextConfigApiUpdateSchema = createApiUpdateSchema(ContextConfigUpdateSchema).omit({ agentId: true }).openapi("ContextConfigUpdate");
|
|
922
961
|
const SubAgentToolRelationSelectSchema = createSelectSchema(subAgentToolRelations);
|
|
923
962
|
const SubAgentToolRelationInsertSchema = createInsertSchema(subAgentToolRelations).extend({
|
|
924
|
-
id:
|
|
925
|
-
subAgentId:
|
|
926
|
-
toolId:
|
|
963
|
+
id: ResourceIdSchema,
|
|
964
|
+
subAgentId: ResourceIdSchema,
|
|
965
|
+
toolId: ResourceIdSchema,
|
|
927
966
|
selectedTools: z.array(z.string()).nullish(),
|
|
928
967
|
headers: z.record(z.string(), z.string()).nullish(),
|
|
929
968
|
toolPolicies: z.record(z.string(), z.object({ needsApproval: z.boolean().optional() })).nullish()
|
|
@@ -934,9 +973,9 @@ const SubAgentToolRelationApiInsertSchema = createAgentScopedApiInsertSchema(Sub
|
|
|
934
973
|
const SubAgentToolRelationApiUpdateSchema = createAgentScopedApiUpdateSchema(SubAgentToolRelationUpdateSchema).openapi("SubAgentToolRelationUpdate");
|
|
935
974
|
const SubAgentExternalAgentRelationSelectSchema = createSelectSchema(subAgentExternalAgentRelations);
|
|
936
975
|
const SubAgentExternalAgentRelationInsertSchema = createInsertSchema(subAgentExternalAgentRelations).extend({
|
|
937
|
-
id:
|
|
938
|
-
subAgentId:
|
|
939
|
-
externalAgentId:
|
|
976
|
+
id: ResourceIdSchema,
|
|
977
|
+
subAgentId: ResourceIdSchema,
|
|
978
|
+
externalAgentId: ResourceIdSchema,
|
|
940
979
|
headers: z.record(z.string(), z.string()).nullish()
|
|
941
980
|
});
|
|
942
981
|
const SubAgentExternalAgentRelationUpdateSchema = SubAgentExternalAgentRelationInsertSchema.partial();
|
|
@@ -948,9 +987,9 @@ const SubAgentExternalAgentRelationApiInsertSchema = createAgentScopedApiInsertS
|
|
|
948
987
|
const SubAgentExternalAgentRelationApiUpdateSchema = createAgentScopedApiUpdateSchema(SubAgentExternalAgentRelationUpdateSchema).openapi("SubAgentExternalAgentRelationUpdate");
|
|
949
988
|
const SubAgentTeamAgentRelationSelectSchema = createSelectSchema(subAgentTeamAgentRelations);
|
|
950
989
|
const SubAgentTeamAgentRelationInsertSchema = createInsertSchema(subAgentTeamAgentRelations).extend({
|
|
951
|
-
id:
|
|
952
|
-
subAgentId:
|
|
953
|
-
targetAgentId:
|
|
990
|
+
id: ResourceIdSchema,
|
|
991
|
+
subAgentId: ResourceIdSchema,
|
|
992
|
+
targetAgentId: ResourceIdSchema,
|
|
954
993
|
headers: z.record(z.string(), z.string()).nullish()
|
|
955
994
|
});
|
|
956
995
|
const SubAgentTeamAgentRelationUpdateSchema = SubAgentTeamAgentRelationInsertSchema.partial();
|
|
@@ -1328,13 +1367,13 @@ const SubAgentId = z.string().openapi("SubAgentIdPathParam", {
|
|
|
1328
1367
|
example: "sub_agent_123"
|
|
1329
1368
|
});
|
|
1330
1369
|
const TenantParamsSchema = z.object({ tenantId: TenantId });
|
|
1331
|
-
const TenantIdParamsSchema = TenantParamsSchema.extend({ id:
|
|
1370
|
+
const TenantIdParamsSchema = TenantParamsSchema.extend({ id: ResourceIdSchema });
|
|
1332
1371
|
const TenantProjectParamsSchema = TenantParamsSchema.extend({ projectId: ProjectId });
|
|
1333
|
-
const TenantProjectIdParamsSchema = TenantProjectParamsSchema.extend({ id:
|
|
1372
|
+
const TenantProjectIdParamsSchema = TenantProjectParamsSchema.extend({ id: ResourceIdSchema });
|
|
1334
1373
|
const TenantProjectAgentParamsSchema = TenantProjectParamsSchema.extend({ agentId: AgentId });
|
|
1335
|
-
const TenantProjectAgentIdParamsSchema = TenantProjectAgentParamsSchema.extend({ id:
|
|
1374
|
+
const TenantProjectAgentIdParamsSchema = TenantProjectAgentParamsSchema.extend({ id: ResourceIdSchema });
|
|
1336
1375
|
const TenantProjectAgentSubAgentParamsSchema = TenantProjectAgentParamsSchema.extend({ subAgentId: SubAgentId });
|
|
1337
|
-
const TenantProjectAgentSubAgentIdParamsSchema = TenantProjectAgentSubAgentParamsSchema.extend({ id:
|
|
1376
|
+
const TenantProjectAgentSubAgentIdParamsSchema = TenantProjectAgentSubAgentParamsSchema.extend({ id: ResourceIdSchema });
|
|
1338
1377
|
const RefQueryParamSchema = z.object({ ref: z.string().optional().describe("Branch name, tag name, or commit hash to query from") });
|
|
1339
1378
|
const PaginationQueryParamsSchema = z.object({
|
|
1340
1379
|
page: pageNumber,
|
|
@@ -1358,4 +1397,4 @@ const ProjectMetadataSelectSchema = createSelectSchema(projectMetadata);
|
|
|
1358
1397
|
const ProjectMetadataInsertSchema = createInsertSchema(projectMetadata).omit({ createdAt: true });
|
|
1359
1398
|
|
|
1360
1399
|
//#endregion
|
|
1361
|
-
export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectResponse, AgentWithinContextOfProjectSchema, AgentWithinContextOfProjectSelectResponse, AgentWithinContextOfProjectSelectSchema, AgentWithinContextOfProjectSelectSchemaWithRelationIds, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentArrayResponse, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ComponentAssociationListResponse, ComponentAssociationSchema, ComponentJoinSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CreateCredentialInStoreRequestSchema, CreateCredentialInStoreResponseSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, CredentialStoreListResponseSchema, CredentialStoreSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentArrayResponse, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, DatasetApiInsertSchema, DatasetApiSelectSchema, DatasetApiUpdateSchema, DatasetInsertSchema, DatasetItemApiInsertSchema, DatasetItemApiSelectSchema, DatasetItemApiUpdateSchema, DatasetItemInsertSchema, DatasetItemSelectSchema, DatasetItemUpdateSchema, DatasetRunApiInsertSchema, DatasetRunApiSelectSchema, DatasetRunApiUpdateSchema, DatasetRunConfigAgentRelationApiInsertSchema, DatasetRunConfigAgentRelationApiSelectSchema, DatasetRunConfigAgentRelationApiUpdateSchema, DatasetRunConfigAgentRelationInsertSchema, DatasetRunConfigAgentRelationSelectSchema, DatasetRunConfigAgentRelationUpdateSchema, DatasetRunConfigApiInsertSchema, DatasetRunConfigApiSelectSchema, DatasetRunConfigApiUpdateSchema, DatasetRunConfigInsertSchema, DatasetRunConfigSelectSchema, DatasetRunConfigUpdateSchema, DatasetRunConversationRelationApiInsertSchema, DatasetRunConversationRelationApiSelectSchema, DatasetRunConversationRelationApiUpdateSchema, DatasetRunConversationRelationInsertSchema, DatasetRunConversationRelationSelectSchema, DatasetRunConversationRelationUpdateSchema, DatasetRunInsertSchema, DatasetRunItemSchema, DatasetRunSelectSchema, DatasetRunUpdateSchema, DatasetSelectSchema, DatasetUpdateSchema, ErrorResponseSchema, EvaluationJobConfigApiInsertSchema, EvaluationJobConfigApiSelectSchema, EvaluationJobConfigApiUpdateSchema, EvaluationJobConfigEvaluatorRelationApiInsertSchema, EvaluationJobConfigEvaluatorRelationApiSelectSchema, EvaluationJobConfigEvaluatorRelationApiUpdateSchema, EvaluationJobConfigEvaluatorRelationInsertSchema, EvaluationJobConfigEvaluatorRelationSelectSchema, EvaluationJobConfigEvaluatorRelationUpdateSchema, EvaluationJobConfigInsertSchema, EvaluationJobConfigSelectSchema, EvaluationJobConfigUpdateSchema, EvaluationJobFilterCriteriaSchema, EvaluationResultApiInsertSchema, EvaluationResultApiSelectSchema, EvaluationResultApiUpdateSchema, EvaluationResultInsertSchema, EvaluationResultSelectSchema, EvaluationResultUpdateSchema, EvaluationRunApiInsertSchema, EvaluationRunApiSelectSchema, EvaluationRunApiUpdateSchema, EvaluationRunConfigApiInsertSchema, EvaluationRunConfigApiSelectSchema, EvaluationRunConfigApiUpdateSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiInsertSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiSelectSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiUpdateSchema, EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema, EvaluationRunConfigEvaluationSuiteConfigRelationSelectSchema, EvaluationRunConfigEvaluationSuiteConfigRelationUpdateSchema, EvaluationRunConfigInsertSchema, EvaluationRunConfigSelectSchema, EvaluationRunConfigUpdateSchema, EvaluationRunConfigWithSuiteConfigsApiSelectSchema, EvaluationRunInsertSchema, EvaluationRunSelectSchema, EvaluationRunUpdateSchema, EvaluationSuiteConfigApiInsertSchema, EvaluationSuiteConfigApiSelectSchema, EvaluationSuiteConfigApiUpdateSchema, EvaluationSuiteConfigEvaluatorRelationApiInsertSchema, EvaluationSuiteConfigEvaluatorRelationApiSelectSchema, EvaluationSuiteConfigEvaluatorRelationApiUpdateSchema, EvaluationSuiteConfigEvaluatorRelationInsertSchema, EvaluationSuiteConfigEvaluatorRelationSelectSchema, EvaluationSuiteConfigEvaluatorRelationUpdateSchema, EvaluationSuiteConfigInsertSchema, EvaluationSuiteConfigSelectSchema, EvaluationSuiteConfigUpdateSchema, EvaluatorApiInsertSchema, EvaluatorApiSelectSchema, EvaluatorApiUpdateSchema, EvaluatorInsertSchema, EvaluatorSelectSchema, EvaluatorUpdateSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullAgentSubAgentSelectSchema, FullAgentSubAgentSelectSchemaWithRelationIds, FullProjectDefinitionResponse, FullProjectDefinitionSchema, FullProjectSelectResponse, FullProjectSelectSchema, FullProjectSelectSchemaWithRelationIds, FullProjectSelectWithRelationIdsResponse, 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, MCPCatalogListResponse, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolListResponse, McpToolResponse, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, PaginationQueryParamsSchema, PaginationSchema, PaginationWithRefQueryParamsSchema, PrebuiltMCPServerSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectMetadataInsertSchema, ProjectMetadataSelectSchema, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RefQueryParamSchema, RelatedAgentInfoListResponse, RelatedAgentInfoSchema, RemovedResponseSchema, SignatureSourceSchema, SignatureValidationOptionsSchema, SignatureVerificationConfigSchema, SignedComponentSchema, SimulationAgentSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationListResponse, SubAgentExternalAgentRelationResponse, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentFunctionToolRelationApiInsertSchema, SubAgentFunctionToolRelationApiSelectSchema, SubAgentFunctionToolRelationInsertSchema, SubAgentFunctionToolRelationListResponse, SubAgentFunctionToolRelationResponse, SubAgentFunctionToolRelationSelectSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationListResponse, SubAgentTeamAgentRelationResponse, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TeamAgentSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ThirdPartyMCPServerResponse, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, TriggerApiInsertSchema, TriggerApiSelectSchema, TriggerApiUpdateSchema, TriggerAuthHeaderInputSchema, TriggerAuthHeaderStoredSchema, TriggerAuthHeaderUpdateSchema, TriggerAuthenticationInputSchema, TriggerAuthenticationSchema, TriggerAuthenticationStoredSchema, TriggerAuthenticationUpdateSchema, TriggerBatchConversationEvaluationSchema, TriggerConversationEvaluationSchema, TriggerDatasetRunSchema, TriggerEvaluationJobSchema, TriggerInsertSchema, TriggerInvocationApiInsertSchema, TriggerInvocationApiSelectSchema, TriggerInvocationApiUpdateSchema, TriggerInvocationInsertSchema, TriggerInvocationListResponse, TriggerInvocationResponse, TriggerInvocationSelectSchema, TriggerInvocationStatusEnum, TriggerInvocationUpdateSchema, TriggerListResponse, TriggerOutputTransformSchema, TriggerResponse, TriggerSelectSchema, TriggerUpdateSchema, TriggerWithWebhookUrlListResponse, TriggerWithWebhookUrlResponse, TriggerWithWebhookUrlSchema, URL_SAFE_ID_PATTERN, canDelegateToExternalAgentInsertSchema, canDelegateToExternalAgentSchema, canDelegateToTeamAgentInsertSchema, canDelegateToTeamAgentSchema, canRelateToInternalSubAgentSchema, resourceIdSchema };
|
|
1400
|
+
export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectResponse, AgentWithinContextOfProjectSchema, AgentWithinContextOfProjectSelectResponse, AgentWithinContextOfProjectSelectSchema, AgentWithinContextOfProjectSelectSchemaWithRelationIds, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentArrayResponse, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ComponentAssociationListResponse, ComponentAssociationSchema, ComponentJoinSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CreateCredentialInStoreRequestSchema, CreateCredentialInStoreResponseSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, CredentialStoreListResponseSchema, CredentialStoreSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentArrayResponse, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, DatasetApiInsertSchema, DatasetApiSelectSchema, DatasetApiUpdateSchema, DatasetInsertSchema, DatasetItemApiInsertSchema, DatasetItemApiSelectSchema, DatasetItemApiUpdateSchema, DatasetItemInsertSchema, DatasetItemSelectSchema, DatasetItemUpdateSchema, DatasetRunApiInsertSchema, DatasetRunApiSelectSchema, DatasetRunApiUpdateSchema, DatasetRunConfigAgentRelationApiInsertSchema, DatasetRunConfigAgentRelationApiSelectSchema, DatasetRunConfigAgentRelationApiUpdateSchema, DatasetRunConfigAgentRelationInsertSchema, DatasetRunConfigAgentRelationSelectSchema, DatasetRunConfigAgentRelationUpdateSchema, DatasetRunConfigApiInsertSchema, DatasetRunConfigApiSelectSchema, DatasetRunConfigApiUpdateSchema, DatasetRunConfigInsertSchema, DatasetRunConfigSelectSchema, DatasetRunConfigUpdateSchema, DatasetRunConversationRelationApiInsertSchema, DatasetRunConversationRelationApiSelectSchema, DatasetRunConversationRelationApiUpdateSchema, DatasetRunConversationRelationInsertSchema, DatasetRunConversationRelationSelectSchema, DatasetRunConversationRelationUpdateSchema, DatasetRunInsertSchema, DatasetRunItemSchema, DatasetRunSelectSchema, DatasetRunUpdateSchema, DatasetSelectSchema, DatasetUpdateSchema, ErrorResponseSchema, EvaluationJobConfigApiInsertSchema, EvaluationJobConfigApiSelectSchema, EvaluationJobConfigApiUpdateSchema, EvaluationJobConfigEvaluatorRelationApiInsertSchema, EvaluationJobConfigEvaluatorRelationApiSelectSchema, EvaluationJobConfigEvaluatorRelationApiUpdateSchema, EvaluationJobConfigEvaluatorRelationInsertSchema, EvaluationJobConfigEvaluatorRelationSelectSchema, EvaluationJobConfigEvaluatorRelationUpdateSchema, EvaluationJobConfigInsertSchema, EvaluationJobConfigSelectSchema, EvaluationJobConfigUpdateSchema, EvaluationJobFilterCriteriaSchema, EvaluationResultApiInsertSchema, EvaluationResultApiSelectSchema, EvaluationResultApiUpdateSchema, EvaluationResultInsertSchema, EvaluationResultSelectSchema, EvaluationResultUpdateSchema, EvaluationRunApiInsertSchema, EvaluationRunApiSelectSchema, EvaluationRunApiUpdateSchema, EvaluationRunConfigApiInsertSchema, EvaluationRunConfigApiSelectSchema, EvaluationRunConfigApiUpdateSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiInsertSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiSelectSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiUpdateSchema, EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema, EvaluationRunConfigEvaluationSuiteConfigRelationSelectSchema, EvaluationRunConfigEvaluationSuiteConfigRelationUpdateSchema, EvaluationRunConfigInsertSchema, EvaluationRunConfigSelectSchema, EvaluationRunConfigUpdateSchema, EvaluationRunConfigWithSuiteConfigsApiSelectSchema, EvaluationRunInsertSchema, EvaluationRunSelectSchema, EvaluationRunUpdateSchema, EvaluationSuiteConfigApiInsertSchema, EvaluationSuiteConfigApiSelectSchema, EvaluationSuiteConfigApiUpdateSchema, EvaluationSuiteConfigEvaluatorRelationApiInsertSchema, EvaluationSuiteConfigEvaluatorRelationApiSelectSchema, EvaluationSuiteConfigEvaluatorRelationApiUpdateSchema, EvaluationSuiteConfigEvaluatorRelationInsertSchema, EvaluationSuiteConfigEvaluatorRelationSelectSchema, EvaluationSuiteConfigEvaluatorRelationUpdateSchema, EvaluationSuiteConfigInsertSchema, EvaluationSuiteConfigSelectSchema, EvaluationSuiteConfigUpdateSchema, EvaluatorApiInsertSchema, EvaluatorApiSelectSchema, EvaluatorApiUpdateSchema, EvaluatorInsertSchema, EvaluatorSelectSchema, EvaluatorUpdateSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullAgentSubAgentSelectSchema, FullAgentSubAgentSelectSchemaWithRelationIds, FullProjectDefinitionResponse, FullProjectDefinitionSchema, FullProjectSelectResponse, FullProjectSelectSchema, FullProjectSelectSchemaWithRelationIds, FullProjectSelectWithRelationIdsResponse, 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, MCPCatalogListResponse, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolListResponse, McpToolResponse, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, PaginationQueryParamsSchema, PaginationSchema, PaginationWithRefQueryParamsSchema, PrebuiltMCPServerSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectMetadataInsertSchema, ProjectMetadataSelectSchema, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RefQueryParamSchema, RelatedAgentInfoListResponse, RelatedAgentInfoSchema, RemovedResponseSchema, ResourceIdSchema, SignatureSourceSchema, SignatureValidationOptionsSchema, SignatureVerificationConfigSchema, SignedComponentSchema, SimulationAgentSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationListResponse, SubAgentExternalAgentRelationResponse, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentFunctionToolRelationApiInsertSchema, SubAgentFunctionToolRelationApiSelectSchema, SubAgentFunctionToolRelationInsertSchema, SubAgentFunctionToolRelationListResponse, SubAgentFunctionToolRelationResponse, SubAgentFunctionToolRelationSelectSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationListResponse, SubAgentTeamAgentRelationResponse, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TeamAgentSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ThirdPartyMCPServerResponse, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, TriggerApiInsertSchema, TriggerApiSelectSchema, TriggerApiUpdateSchema, TriggerAuthHeaderInputSchema, TriggerAuthHeaderStoredSchema, TriggerAuthHeaderUpdateSchema, TriggerAuthenticationInputSchema, TriggerAuthenticationSchema, TriggerAuthenticationStoredSchema, TriggerAuthenticationUpdateSchema, TriggerBatchConversationEvaluationSchema, TriggerConversationEvaluationSchema, TriggerDatasetRunSchema, TriggerEvaluationJobSchema, TriggerInsertSchema, TriggerInvocationApiInsertSchema, TriggerInvocationApiSelectSchema, TriggerInvocationApiUpdateSchema, TriggerInvocationInsertSchema, TriggerInvocationListResponse, TriggerInvocationResponse, TriggerInvocationSelectSchema, TriggerInvocationStatusEnum, TriggerInvocationUpdateSchema, TriggerListResponse, TriggerOutputTransformSchema, TriggerResponse, TriggerSelectSchema, TriggerUpdateSchema, TriggerWithWebhookUrlListResponse, TriggerWithWebhookUrlResponse, TriggerWithWebhookUrlSchema, URL_SAFE_ID_PATTERN, canDelegateToExternalAgentInsertSchema, canDelegateToExternalAgentSchema, canDelegateToTeamAgentInsertSchema, canDelegateToTeamAgentSchema, canRelateToInternalSubAgentSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-core",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260130091101",
|
|
4
4
|
"description": "Agents Core contains the database schema, types, and validation schemas for Inkeep Agent Framework, along with core components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -101,6 +101,7 @@
|
|
|
101
101
|
"@ai-sdk/openai": "3.0.7",
|
|
102
102
|
"@ai-sdk/openai-compatible": "2.0.4",
|
|
103
103
|
"@authzed/authzed-node": "^1.6.1",
|
|
104
|
+
"@babel/parser": "^7.28.6",
|
|
104
105
|
"@better-auth/sso": "~1.4.10",
|
|
105
106
|
"@composio/core": "^0.2.4",
|
|
106
107
|
"@electric-sql/pglite": "^0.3.13",
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
//#region src/validation/id-validation.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Valid URL-safe characters for resource IDs based on RFC 3986.
|
|
4
|
-
*
|
|
5
|
-
* Allowed characters:
|
|
6
|
-
* - Letters: a-z, A-Z
|
|
7
|
-
* - Numbers: 0-9
|
|
8
|
-
* - Hyphens: -
|
|
9
|
-
* - Underscores: _
|
|
10
|
-
*
|
|
11
|
-
* Note: While dots (.) and tildes (~) are technically URL-safe,
|
|
12
|
-
* we exclude them for consistency with existing patterns in the codebase.
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* Helper function to validate if a string is a valid resource ID
|
|
16
|
-
*/
|
|
17
|
-
declare function isValidResourceId(id: string): boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Helper function to generate a URL-safe ID from a name or title.
|
|
20
|
-
* Converts to lowercase and replaces invalid characters with hyphens.
|
|
21
|
-
*/
|
|
22
|
-
declare function generateIdFromName(name: string): string;
|
|
23
|
-
//#endregion
|
|
24
|
-
export { generateIdFromName, isValidResourceId };
|