@inkeep/agents-core 0.43.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/auth.d.ts +4 -2
- package/dist/auth/auth.js +4 -3
- package/dist/auth/authz/client.d.ts +0 -1
- package/dist/auth/authz/client.js +0 -1
- package/dist/auth/authz/config.d.ts +1 -7
- package/dist/auth/authz/config.js +1 -9
- package/dist/auth/authz/index.d.ts +3 -3
- package/dist/auth/authz/index.js +3 -3
- package/dist/auth/authz/permissions.d.ts +16 -1
- package/dist/auth/authz/permissions.js +30 -9
- package/dist/auth/authz/sync.js +1 -11
- package/dist/auth/init.d.ts +1 -0
- package/dist/auth/init.js +115 -0
- package/dist/client-exports.d.ts +2 -6
- package/dist/client-exports.js +3 -7
- package/dist/constants/otel-attributes.d.ts +6 -0
- package/dist/constants/otel-attributes.js +9 -3
- package/dist/constants/signoz-queries.d.ts +1 -0
- package/dist/constants/signoz-queries.js +2 -1
- package/dist/data-access/index.d.ts +4 -3
- package/dist/data-access/index.js +6 -5
- package/dist/data-access/manage/agentFull.js +42 -1
- package/dist/data-access/manage/agents.d.ts +27 -10
- package/dist/data-access/manage/agents.js +33 -2
- package/dist/data-access/manage/artifactComponents.d.ts +4 -4
- package/dist/data-access/manage/artifactComponents.js +1 -1
- package/dist/data-access/manage/contextConfigs.d.ts +12 -12
- package/dist/data-access/manage/dataComponents.d.ts +4 -4
- package/dist/data-access/manage/dataComponents.js +1 -1
- package/dist/data-access/manage/functionTools.d.ts +4 -4
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgents.d.ts +3 -3
- package/dist/data-access/manage/tools.d.ts +20 -15
- package/dist/data-access/manage/tools.js +20 -1
- package/dist/data-access/runtime/apiKeys.d.ts +4 -4
- package/dist/data-access/runtime/cascade-delete.d.ts +48 -1
- package/dist/data-access/runtime/cascade-delete.js +52 -2
- package/dist/data-access/runtime/conversations.d.ts +19 -19
- package/dist/data-access/runtime/github-work-app-installations.d.ts +261 -0
- package/dist/data-access/runtime/github-work-app-installations.js +457 -0
- package/dist/data-access/runtime/messages.d.ts +6 -6
- package/dist/data-access/runtime/organizations.js +2 -2
- package/dist/data-access/runtime/tasks.d.ts +4 -4
- package/dist/db/manage/manage-schema.d.ts +17 -0
- package/dist/db/manage/manage-schema.js +1 -0
- package/dist/db/runtime/runtime-schema.d.ts +1009 -165
- package/dist/db/runtime/runtime-schema.js +173 -5
- package/dist/dolt/ref-middleware.js +1 -1
- package/dist/env.d.ts +6 -4
- package/dist/env.js +11 -10
- package/dist/index.d.ts +10 -11
- package/dist/index.js +22 -23
- package/dist/types/entities.d.ts +9 -2
- package/dist/types/index.d.ts +3 -3
- package/dist/types/utility.d.ts +16 -2
- package/dist/utils/temp-jwt.d.ts +2 -1
- package/dist/utils/temp-jwt.js +3 -2
- package/dist/validation/agentFull.js +1 -1
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +1 -20
- 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 +3021 -1228
- package/dist/validation/schemas.js +164 -79
- package/drizzle/manage/0006_fixed_umar.sql +1 -0
- package/drizzle/manage/meta/0006_snapshot.json +3148 -0
- package/drizzle/manage/meta/_journal.json +7 -0
- package/drizzle/runtime/0010_previous_black_knight.sql +84 -0
- package/drizzle/runtime/meta/0010_snapshot.json +3066 -0
- package/drizzle/runtime/meta/_journal.json +7 -0
- package/package.json +4 -2
- package/dist/validation/id-validation.d.ts +0 -24
- package/dist/validation/id-validation.js +0 -52
|
@@ -2,10 +2,11 @@ import { schemaValidationDefaults } from "../constants/schema-validation/default
|
|
|
2
2
|
import { CredentialStoreType, MCPServerType, MCPTransportType, TOOL_STATUS_VALUES, VALID_RELATION_TYPES } from "../types/utility.js";
|
|
3
3
|
import { jmespathString, validateJMESPathSecure, validateRegex } from "../utils/jmespath-utils.js";
|
|
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
|
-
import { apiKeys, contextCache, conversations, datasetRun, datasetRunConversationRelations, evaluationResult, evaluationRun, ledgerArtifacts, messages, projectMetadata, taskRelations, tasks, triggerInvocations } from "../db/runtime/runtime-schema.js";
|
|
5
|
+
import { apiKeys, contextCache, conversations, datasetRun, datasetRunConversationRelations, evaluationResult, evaluationRun, ledgerArtifacts, messages, projectMetadata, taskRelations, tasks, triggerInvocations, workAppGitHubInstallations, workAppGitHubMcpToolRepositoryAccess, workAppGitHubProjectRepositoryAccess, workAppGitHubRepositories } 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" }).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({
|
|
@@ -43,6 +51,16 @@ const FunctionToolConfigSchema = z.object({
|
|
|
43
51
|
dependencies: z.record(z.string(), z.string()).optional(),
|
|
44
52
|
execute: z.union([z.function(), z.string()])
|
|
45
53
|
});
|
|
54
|
+
const omitTenantScope = (schema) => schema.omit({ tenantId: true });
|
|
55
|
+
const omitTimestamps = (schema) => schema.omit({
|
|
56
|
+
createdAt: true,
|
|
57
|
+
updatedAt: true
|
|
58
|
+
});
|
|
59
|
+
const omitGeneratedFields = (schema) => schema.omit({
|
|
60
|
+
id: true,
|
|
61
|
+
createdAt: true,
|
|
62
|
+
updatedAt: true
|
|
63
|
+
});
|
|
46
64
|
const createApiSchema = (schema) => schema.omit({
|
|
47
65
|
tenantId: true,
|
|
48
66
|
projectId: true
|
|
@@ -72,7 +90,7 @@ const createAgentScopedApiUpdateSchema = (schema) => schema.omit({
|
|
|
72
90
|
}).partial();
|
|
73
91
|
const SubAgentSelectSchema = createSelectSchema(subAgents);
|
|
74
92
|
const SubAgentInsertSchema = createInsertSchema(subAgents).extend({
|
|
75
|
-
id:
|
|
93
|
+
id: ResourceIdSchema,
|
|
76
94
|
models: ModelSchema.optional()
|
|
77
95
|
});
|
|
78
96
|
const SubAgentUpdateSchema = SubAgentInsertSchema.partial();
|
|
@@ -81,12 +99,12 @@ const SubAgentApiInsertSchema = createAgentScopedApiInsertSchema(SubAgentInsertS
|
|
|
81
99
|
const SubAgentApiUpdateSchema = createAgentScopedApiUpdateSchema(SubAgentUpdateSchema).openapi("SubAgentUpdate");
|
|
82
100
|
const SubAgentRelationSelectSchema = createSelectSchema(subAgentRelations);
|
|
83
101
|
const SubAgentRelationInsertSchema = createInsertSchema(subAgentRelations).extend({
|
|
84
|
-
id:
|
|
85
|
-
agentId:
|
|
86
|
-
sourceSubAgentId:
|
|
87
|
-
targetSubAgentId:
|
|
88
|
-
externalSubAgentId:
|
|
89
|
-
teamSubAgentId:
|
|
102
|
+
id: ResourceIdSchema,
|
|
103
|
+
agentId: ResourceIdSchema,
|
|
104
|
+
sourceSubAgentId: ResourceIdSchema,
|
|
105
|
+
targetSubAgentId: ResourceIdSchema.optional(),
|
|
106
|
+
externalSubAgentId: ResourceIdSchema.optional(),
|
|
107
|
+
teamSubAgentId: ResourceIdSchema.optional()
|
|
90
108
|
});
|
|
91
109
|
const SubAgentRelationUpdateSchema = SubAgentRelationInsertSchema.partial();
|
|
92
110
|
const SubAgentRelationApiSelectSchema = createAgentScopedApiSchema(SubAgentRelationSelectSchema).openapi("SubAgentRelation");
|
|
@@ -127,22 +145,25 @@ const SubAgentRelationQuerySchema = z.object({
|
|
|
127
145
|
teamSubAgentId: z.string().optional()
|
|
128
146
|
});
|
|
129
147
|
const ExternalSubAgentRelationInsertSchema = createInsertSchema(subAgentRelations).extend({
|
|
130
|
-
id:
|
|
131
|
-
agentId:
|
|
132
|
-
sourceSubAgentId:
|
|
133
|
-
externalSubAgentId:
|
|
148
|
+
id: ResourceIdSchema,
|
|
149
|
+
agentId: ResourceIdSchema,
|
|
150
|
+
sourceSubAgentId: ResourceIdSchema,
|
|
151
|
+
externalSubAgentId: ResourceIdSchema
|
|
134
152
|
});
|
|
135
153
|
const ExternalSubAgentRelationApiInsertSchema = createApiInsertSchema(ExternalSubAgentRelationInsertSchema);
|
|
136
154
|
const AgentSelectSchema = createSelectSchema(agents);
|
|
137
155
|
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
156
|
const AgentInsertSchema = createInsertSchema(agents, {
|
|
139
|
-
id: () =>
|
|
157
|
+
id: () => ResourceIdSchema,
|
|
140
158
|
name: () => z.string().trim().nonempty().describe("Agent name").openapi({ description: "Agent name" }),
|
|
141
|
-
defaultSubAgentId: () =>
|
|
159
|
+
defaultSubAgentId: () => ResourceIdSchema.clone().nullable().optional().openapi({
|
|
160
|
+
description: DEFAULT_SUB_AGENT_ID_DESCRIPTION,
|
|
161
|
+
example: "my-default-subagent"
|
|
162
|
+
})
|
|
142
163
|
});
|
|
143
164
|
const AgentUpdateSchema = AgentInsertSchema.partial();
|
|
144
165
|
const AgentApiSelectSchema = createApiSchema(AgentSelectSchema).openapi("Agent");
|
|
145
|
-
const AgentApiInsertSchema = createApiInsertSchema(AgentInsertSchema).extend({ id:
|
|
166
|
+
const AgentApiInsertSchema = createApiInsertSchema(AgentInsertSchema).extend({ id: ResourceIdSchema }).openapi("AgentCreate");
|
|
146
167
|
const AgentApiUpdateSchema = createApiUpdateSchema(AgentUpdateSchema).openapi("AgentUpdate");
|
|
147
168
|
const TriggerAuthHeaderInputSchema = z.object({
|
|
148
169
|
name: z.string().min(1).describe("Header name (e.g., X-API-Key, Authorization)"),
|
|
@@ -334,7 +355,7 @@ const TriggerSelectSchema = registerFieldSchemas(createSelectSchema(triggers).ex
|
|
|
334
355
|
signatureVerification: SignatureVerificationConfigSchema.nullable().optional()
|
|
335
356
|
}));
|
|
336
357
|
const TriggerInsertSchemaBase = createInsertSchema(triggers, {
|
|
337
|
-
id: () =>
|
|
358
|
+
id: () => ResourceIdSchema,
|
|
338
359
|
name: () => z.string().trim().nonempty().describe("Trigger name"),
|
|
339
360
|
description: () => z.string().optional().describe("Trigger description"),
|
|
340
361
|
enabled: () => z.boolean().default(true).describe("Whether the trigger is enabled"),
|
|
@@ -418,14 +439,14 @@ const TriggerInsertSchema = TriggerInsertSchemaBase.superRefine((data, ctx) => {
|
|
|
418
439
|
});
|
|
419
440
|
const TriggerUpdateSchema = TriggerInsertSchemaBase.extend({ enabled: z.boolean().optional().describe("Whether the trigger is enabled") }).partial();
|
|
420
441
|
const TriggerApiSelectSchema = createAgentScopedApiSchema(TriggerSelectSchema).openapi("Trigger");
|
|
421
|
-
const TriggerApiInsertSchema = createAgentScopedApiInsertSchema(TriggerInsertSchema).extend({ id:
|
|
442
|
+
const TriggerApiInsertSchema = createAgentScopedApiInsertSchema(TriggerInsertSchema).extend({ id: ResourceIdSchema.optional() }).openapi("TriggerCreate");
|
|
422
443
|
const TriggerApiUpdateSchema = TriggerUpdateSchema.openapi("TriggerUpdate");
|
|
423
444
|
const TriggerWithWebhookUrlSchema = TriggerApiSelectSchema.extend({ webhookUrl: z.string().describe("Fully qualified webhook URL for this trigger") }).openapi("TriggerWithWebhookUrl");
|
|
424
445
|
const TriggerInvocationSelectSchema = createSelectSchema(triggerInvocations);
|
|
425
446
|
const TriggerInvocationInsertSchema = createInsertSchema(triggerInvocations, {
|
|
426
|
-
id: () =>
|
|
427
|
-
triggerId: () =>
|
|
428
|
-
conversationId: () =>
|
|
447
|
+
id: () => ResourceIdSchema,
|
|
448
|
+
triggerId: () => ResourceIdSchema,
|
|
449
|
+
conversationId: () => ResourceIdSchema.optional(),
|
|
429
450
|
status: () => TriggerInvocationStatusEnum.default("pending"),
|
|
430
451
|
requestPayload: () => z.record(z.string(), z.unknown()).describe("Original webhook payload"),
|
|
431
452
|
transformedPayload: () => z.record(z.string(), z.unknown()).optional().describe("Transformed payload"),
|
|
@@ -433,12 +454,12 @@ const TriggerInvocationInsertSchema = createInsertSchema(triggerInvocations, {
|
|
|
433
454
|
});
|
|
434
455
|
const TriggerInvocationUpdateSchema = TriggerInvocationInsertSchema.partial();
|
|
435
456
|
const TriggerInvocationApiSelectSchema = createAgentScopedApiSchema(TriggerInvocationSelectSchema).openapi("TriggerInvocation");
|
|
436
|
-
const TriggerInvocationApiInsertSchema = createAgentScopedApiInsertSchema(TriggerInvocationInsertSchema).extend({ id:
|
|
457
|
+
const TriggerInvocationApiInsertSchema = createAgentScopedApiInsertSchema(TriggerInvocationInsertSchema).extend({ id: ResourceIdSchema }).openapi("TriggerInvocationCreate");
|
|
437
458
|
const TriggerInvocationApiUpdateSchema = createAgentScopedApiUpdateSchema(TriggerInvocationUpdateSchema).openapi("TriggerInvocationUpdate");
|
|
438
459
|
const TaskSelectSchema = createSelectSchema(tasks);
|
|
439
460
|
const TaskInsertSchema = createInsertSchema(tasks).extend({
|
|
440
|
-
id:
|
|
441
|
-
conversationId:
|
|
461
|
+
id: ResourceIdSchema,
|
|
462
|
+
conversationId: ResourceIdSchema.optional(),
|
|
442
463
|
ref: ResolvedRefSchema
|
|
443
464
|
});
|
|
444
465
|
const TaskUpdateSchema = TaskInsertSchema.partial();
|
|
@@ -447,9 +468,9 @@ const TaskApiInsertSchema = createApiInsertSchema(TaskInsertSchema);
|
|
|
447
468
|
const TaskApiUpdateSchema = createApiUpdateSchema(TaskUpdateSchema);
|
|
448
469
|
const TaskRelationSelectSchema = createSelectSchema(taskRelations);
|
|
449
470
|
const TaskRelationInsertSchema = createInsertSchema(taskRelations).extend({
|
|
450
|
-
id:
|
|
451
|
-
parentTaskId:
|
|
452
|
-
childTaskId:
|
|
471
|
+
id: ResourceIdSchema,
|
|
472
|
+
parentTaskId: ResourceIdSchema,
|
|
473
|
+
childTaskId: ResourceIdSchema
|
|
453
474
|
});
|
|
454
475
|
const TaskRelationUpdateSchema = TaskRelationInsertSchema.partial();
|
|
455
476
|
const TaskRelationApiSelectSchema = createApiSchema(TaskRelationSelectSchema);
|
|
@@ -487,7 +508,7 @@ const McpToolDefinitionSchema = z.object({
|
|
|
487
508
|
});
|
|
488
509
|
const ToolSelectSchema = createSelectSchema(tools);
|
|
489
510
|
const ToolInsertSchema = createInsertSchema(tools).extend({
|
|
490
|
-
id:
|
|
511
|
+
id: ResourceIdSchema,
|
|
491
512
|
imageUrl: imageUrlSchema,
|
|
492
513
|
config: z.object({
|
|
493
514
|
type: z.literal("mcp"),
|
|
@@ -516,8 +537,8 @@ const ToolInsertSchema = createInsertSchema(tools).extend({
|
|
|
516
537
|
});
|
|
517
538
|
const ConversationSelectSchema = createSelectSchema(conversations);
|
|
518
539
|
const ConversationInsertSchema = createInsertSchema(conversations).extend({
|
|
519
|
-
id:
|
|
520
|
-
contextConfigId:
|
|
540
|
+
id: ResourceIdSchema,
|
|
541
|
+
contextConfigId: ResourceIdSchema.optional(),
|
|
521
542
|
ref: ResolvedRefSchema
|
|
522
543
|
});
|
|
523
544
|
const ConversationUpdateSchema = ConversationInsertSchema.partial();
|
|
@@ -526,9 +547,9 @@ const ConversationApiInsertSchema = createApiInsertSchema(ConversationInsertSche
|
|
|
526
547
|
const ConversationApiUpdateSchema = createApiUpdateSchema(ConversationUpdateSchema).openapi("ConversationUpdate");
|
|
527
548
|
const MessageSelectSchema = createSelectSchema(messages);
|
|
528
549
|
const MessageInsertSchema = createInsertSchema(messages).extend({
|
|
529
|
-
id:
|
|
530
|
-
conversationId:
|
|
531
|
-
taskId:
|
|
550
|
+
id: ResourceIdSchema,
|
|
551
|
+
conversationId: ResourceIdSchema,
|
|
552
|
+
taskId: ResourceIdSchema.optional()
|
|
532
553
|
});
|
|
533
554
|
const MessageUpdateSchema = MessageInsertSchema.partial();
|
|
534
555
|
const MessageApiSelectSchema = createApiSchema(MessageSelectSchema).openapi("Message");
|
|
@@ -541,80 +562,80 @@ const ContextCacheApiSelectSchema = createApiSchema(ContextCacheSelectSchema);
|
|
|
541
562
|
const ContextCacheApiInsertSchema = createApiInsertSchema(ContextCacheInsertSchema);
|
|
542
563
|
const ContextCacheApiUpdateSchema = createApiUpdateSchema(ContextCacheUpdateSchema);
|
|
543
564
|
const DatasetRunSelectSchema = createSelectSchema(datasetRun);
|
|
544
|
-
const DatasetRunInsertSchema = createInsertSchema(datasetRun).extend({ id:
|
|
565
|
+
const DatasetRunInsertSchema = createInsertSchema(datasetRun).extend({ id: ResourceIdSchema });
|
|
545
566
|
const DatasetRunUpdateSchema = DatasetRunInsertSchema.partial();
|
|
546
567
|
const DatasetRunApiSelectSchema = createApiSchema(DatasetRunSelectSchema).openapi("DatasetRun");
|
|
547
568
|
const DatasetRunApiInsertSchema = createApiInsertSchema(DatasetRunInsertSchema).omit({ id: true }).openapi("DatasetRunCreate");
|
|
548
569
|
const DatasetRunApiUpdateSchema = createApiUpdateSchema(DatasetRunUpdateSchema).omit({ id: true }).openapi("DatasetRunUpdate");
|
|
549
570
|
const DatasetRunConversationRelationSelectSchema = createSelectSchema(datasetRunConversationRelations);
|
|
550
|
-
const DatasetRunConversationRelationInsertSchema = createInsertSchema(datasetRunConversationRelations).extend({ id:
|
|
571
|
+
const DatasetRunConversationRelationInsertSchema = createInsertSchema(datasetRunConversationRelations).extend({ id: ResourceIdSchema });
|
|
551
572
|
const DatasetRunConversationRelationUpdateSchema = DatasetRunConversationRelationInsertSchema.partial();
|
|
552
573
|
const DatasetRunConversationRelationApiSelectSchema = createApiSchema(DatasetRunConversationRelationSelectSchema).openapi("DatasetRunConversationRelation");
|
|
553
574
|
const DatasetRunConversationRelationApiInsertSchema = createApiInsertSchema(DatasetRunConversationRelationInsertSchema).omit({ id: true }).openapi("DatasetRunConversationRelationCreate");
|
|
554
575
|
const DatasetRunConversationRelationApiUpdateSchema = createApiUpdateSchema(DatasetRunConversationRelationUpdateSchema).omit({ id: true }).openapi("DatasetRunConversationRelationUpdate");
|
|
555
576
|
const EvaluationResultSelectSchema = createSelectSchema(evaluationResult);
|
|
556
|
-
const EvaluationResultInsertSchema = createInsertSchema(evaluationResult).extend({ id:
|
|
577
|
+
const EvaluationResultInsertSchema = createInsertSchema(evaluationResult).extend({ id: ResourceIdSchema });
|
|
557
578
|
const EvaluationResultUpdateSchema = EvaluationResultInsertSchema.partial();
|
|
558
579
|
const EvaluationResultApiSelectSchema = createApiSchema(EvaluationResultSelectSchema).openapi("EvaluationResult");
|
|
559
580
|
const EvaluationResultApiInsertSchema = createApiInsertSchema(EvaluationResultInsertSchema).omit({ id: true }).openapi("EvaluationResultCreate");
|
|
560
581
|
const EvaluationResultApiUpdateSchema = createApiUpdateSchema(EvaluationResultUpdateSchema).omit({ id: true }).openapi("EvaluationResultUpdate");
|
|
561
582
|
const EvaluationRunSelectSchema = createSelectSchema(evaluationRun);
|
|
562
|
-
const EvaluationRunInsertSchema = createInsertSchema(evaluationRun).extend({ id:
|
|
583
|
+
const EvaluationRunInsertSchema = createInsertSchema(evaluationRun).extend({ id: ResourceIdSchema });
|
|
563
584
|
const EvaluationRunUpdateSchema = EvaluationRunInsertSchema.partial();
|
|
564
585
|
const EvaluationRunApiSelectSchema = createApiSchema(EvaluationRunSelectSchema).openapi("EvaluationRun");
|
|
565
586
|
const EvaluationRunApiInsertSchema = createApiInsertSchema(EvaluationRunInsertSchema).omit({ id: true }).openapi("EvaluationRunCreate");
|
|
566
587
|
const EvaluationRunApiUpdateSchema = createApiUpdateSchema(EvaluationRunUpdateSchema).omit({ id: true }).openapi("EvaluationRunUpdate");
|
|
567
588
|
const EvaluationRunConfigSelectSchema = createSelectSchema(evaluationRunConfig);
|
|
568
|
-
const EvaluationRunConfigInsertSchema = createInsertSchema(evaluationRunConfig).extend({ id:
|
|
589
|
+
const EvaluationRunConfigInsertSchema = createInsertSchema(evaluationRunConfig).extend({ id: ResourceIdSchema });
|
|
569
590
|
const EvaluationRunConfigUpdateSchema = EvaluationRunConfigInsertSchema.partial();
|
|
570
591
|
const EvaluationRunConfigApiSelectSchema = createApiSchema(EvaluationRunConfigSelectSchema).openapi("EvaluationRunConfig");
|
|
571
592
|
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
593
|
const EvaluationRunConfigApiUpdateSchema = createApiUpdateSchema(EvaluationRunConfigUpdateSchema).omit({ id: true }).extend({ suiteConfigIds: z.array(z.string()).optional() }).openapi("EvaluationRunConfigUpdate");
|
|
573
594
|
const EvaluationRunConfigWithSuiteConfigsApiSelectSchema = EvaluationRunConfigApiSelectSchema.extend({ suiteConfigIds: z.array(z.string()) }).openapi("EvaluationRunConfigWithSuiteConfigs");
|
|
574
595
|
const EvaluationJobConfigSelectSchema = createSelectSchema(evaluationJobConfig);
|
|
575
|
-
const EvaluationJobConfigInsertSchema = createInsertSchema(evaluationJobConfig).extend({ id:
|
|
596
|
+
const EvaluationJobConfigInsertSchema = createInsertSchema(evaluationJobConfig).extend({ id: ResourceIdSchema });
|
|
576
597
|
const EvaluationJobConfigUpdateSchema = EvaluationJobConfigInsertSchema.partial();
|
|
577
598
|
const EvaluationJobConfigApiSelectSchema = createApiSchema(EvaluationJobConfigSelectSchema).openapi("EvaluationJobConfig");
|
|
578
599
|
const EvaluationJobConfigApiInsertSchema = createApiInsertSchema(EvaluationJobConfigInsertSchema).omit({ id: true }).extend({ evaluatorIds: z.array(z.string()).min(1, "At least one evaluator is required") }).openapi("EvaluationJobConfigCreate");
|
|
579
600
|
const EvaluationJobConfigApiUpdateSchema = createApiUpdateSchema(EvaluationJobConfigUpdateSchema).omit({ id: true }).openapi("EvaluationJobConfigUpdate");
|
|
580
601
|
const EvaluationSuiteConfigSelectSchema = createSelectSchema(evaluationSuiteConfig);
|
|
581
|
-
const EvaluationSuiteConfigInsertSchema = createInsertSchema(evaluationSuiteConfig).extend({ id:
|
|
602
|
+
const EvaluationSuiteConfigInsertSchema = createInsertSchema(evaluationSuiteConfig).extend({ id: ResourceIdSchema });
|
|
582
603
|
const EvaluationSuiteConfigUpdateSchema = EvaluationSuiteConfigInsertSchema.partial();
|
|
583
604
|
const EvaluationSuiteConfigApiSelectSchema = createApiSchema(EvaluationSuiteConfigSelectSchema).openapi("EvaluationSuiteConfig");
|
|
584
605
|
const EvaluationSuiteConfigApiInsertSchema = createApiInsertSchema(EvaluationSuiteConfigInsertSchema).omit({ id: true }).extend({ evaluatorIds: z.array(z.string()).min(1, "At least one evaluator is required") }).openapi("EvaluationSuiteConfigCreate");
|
|
585
606
|
const EvaluationSuiteConfigApiUpdateSchema = createApiUpdateSchema(EvaluationSuiteConfigUpdateSchema).omit({ id: true }).extend({ evaluatorIds: z.array(z.string()).optional() }).openapi("EvaluationSuiteConfigUpdate");
|
|
586
607
|
const EvaluationRunConfigEvaluationSuiteConfigRelationSelectSchema = createSelectSchema(evaluationRunConfigEvaluationSuiteConfigRelations);
|
|
587
|
-
const EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema = createInsertSchema(evaluationRunConfigEvaluationSuiteConfigRelations).extend({ id:
|
|
608
|
+
const EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema = createInsertSchema(evaluationRunConfigEvaluationSuiteConfigRelations).extend({ id: ResourceIdSchema });
|
|
588
609
|
const EvaluationRunConfigEvaluationSuiteConfigRelationUpdateSchema = EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema.partial();
|
|
589
610
|
const EvaluationRunConfigEvaluationSuiteConfigRelationApiSelectSchema = createApiSchema(EvaluationRunConfigEvaluationSuiteConfigRelationSelectSchema).openapi("EvaluationRunConfigEvaluationSuiteConfigRelation");
|
|
590
611
|
const EvaluationRunConfigEvaluationSuiteConfigRelationApiInsertSchema = createApiInsertSchema(EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema).omit({ id: true }).openapi("EvaluationRunConfigEvaluationSuiteConfigRelationCreate");
|
|
591
612
|
const EvaluationRunConfigEvaluationSuiteConfigRelationApiUpdateSchema = createApiUpdateSchema(EvaluationRunConfigEvaluationSuiteConfigRelationUpdateSchema).omit({ id: true }).openapi("EvaluationRunConfigEvaluationSuiteConfigRelationUpdate");
|
|
592
613
|
const EvaluationJobConfigEvaluatorRelationSelectSchema = createSelectSchema(evaluationJobConfigEvaluatorRelations);
|
|
593
|
-
const EvaluationJobConfigEvaluatorRelationInsertSchema = createInsertSchema(evaluationJobConfigEvaluatorRelations).extend({ id:
|
|
614
|
+
const EvaluationJobConfigEvaluatorRelationInsertSchema = createInsertSchema(evaluationJobConfigEvaluatorRelations).extend({ id: ResourceIdSchema });
|
|
594
615
|
const EvaluationJobConfigEvaluatorRelationUpdateSchema = EvaluationJobConfigEvaluatorRelationInsertSchema.partial();
|
|
595
616
|
const EvaluationJobConfigEvaluatorRelationApiSelectSchema = createApiSchema(EvaluationJobConfigEvaluatorRelationSelectSchema).openapi("EvaluationJobConfigEvaluatorRelation");
|
|
596
617
|
const EvaluationJobConfigEvaluatorRelationApiInsertSchema = createApiInsertSchema(EvaluationJobConfigEvaluatorRelationInsertSchema).omit({ id: true }).openapi("EvaluationJobConfigEvaluatorRelationCreate");
|
|
597
618
|
const EvaluationJobConfigEvaluatorRelationApiUpdateSchema = createApiUpdateSchema(EvaluationJobConfigEvaluatorRelationUpdateSchema).omit({ id: true }).openapi("EvaluationJobConfigEvaluatorRelationUpdate");
|
|
598
619
|
const EvaluationSuiteConfigEvaluatorRelationSelectSchema = createSelectSchema(evaluationSuiteConfigEvaluatorRelations);
|
|
599
|
-
const EvaluationSuiteConfigEvaluatorRelationInsertSchema = createInsertSchema(evaluationSuiteConfigEvaluatorRelations).extend({ id:
|
|
620
|
+
const EvaluationSuiteConfigEvaluatorRelationInsertSchema = createInsertSchema(evaluationSuiteConfigEvaluatorRelations).extend({ id: ResourceIdSchema });
|
|
600
621
|
const EvaluationSuiteConfigEvaluatorRelationUpdateSchema = EvaluationSuiteConfigEvaluatorRelationInsertSchema.partial();
|
|
601
622
|
const EvaluationSuiteConfigEvaluatorRelationApiSelectSchema = createApiSchema(EvaluationSuiteConfigEvaluatorRelationSelectSchema).openapi("EvaluationSuiteConfigEvaluatorRelation");
|
|
602
623
|
const EvaluationSuiteConfigEvaluatorRelationApiInsertSchema = createApiInsertSchema(EvaluationSuiteConfigEvaluatorRelationInsertSchema).omit({ id: true }).openapi("EvaluationSuiteConfigEvaluatorRelationCreate");
|
|
603
624
|
const EvaluationSuiteConfigEvaluatorRelationApiUpdateSchema = createApiUpdateSchema(EvaluationSuiteConfigEvaluatorRelationUpdateSchema).omit({ id: true }).openapi("EvaluationSuiteConfigEvaluatorRelationUpdate");
|
|
604
625
|
const EvaluatorSelectSchema = createSelectSchema(evaluator);
|
|
605
|
-
const EvaluatorInsertSchema = createInsertSchema(evaluator).extend({ id:
|
|
626
|
+
const EvaluatorInsertSchema = createInsertSchema(evaluator).extend({ id: ResourceIdSchema });
|
|
606
627
|
const EvaluatorUpdateSchema = EvaluatorInsertSchema.partial();
|
|
607
628
|
const EvaluatorApiSelectSchema = createApiSchema(EvaluatorSelectSchema).openapi("Evaluator");
|
|
608
629
|
const EvaluatorApiInsertSchema = createApiInsertSchema(EvaluatorInsertSchema).omit({ id: true }).openapi("EvaluatorCreate");
|
|
609
630
|
const EvaluatorApiUpdateSchema = createApiUpdateSchema(EvaluatorUpdateSchema).omit({ id: true }).openapi("EvaluatorUpdate");
|
|
610
631
|
const DatasetSelectSchema = createSelectSchema(dataset);
|
|
611
|
-
const DatasetInsertSchema = createInsertSchema(dataset).extend({ id:
|
|
632
|
+
const DatasetInsertSchema = createInsertSchema(dataset).extend({ id: ResourceIdSchema });
|
|
612
633
|
const DatasetUpdateSchema = DatasetInsertSchema.partial();
|
|
613
634
|
const DatasetApiSelectSchema = createApiSchema(DatasetSelectSchema).openapi("Dataset");
|
|
614
635
|
const DatasetApiInsertSchema = createApiInsertSchema(DatasetInsertSchema).omit({ id: true }).openapi("DatasetCreate");
|
|
615
636
|
const DatasetApiUpdateSchema = createApiUpdateSchema(DatasetUpdateSchema).omit({ id: true }).openapi("DatasetUpdate");
|
|
616
637
|
const DatasetItemSelectSchema = createSelectSchema(datasetItem);
|
|
617
|
-
const DatasetItemInsertSchema = createInsertSchema(datasetItem).extend({ id:
|
|
638
|
+
const DatasetItemInsertSchema = createInsertSchema(datasetItem).extend({ id: ResourceIdSchema });
|
|
618
639
|
const DatasetItemUpdateSchema = DatasetItemInsertSchema.partial();
|
|
619
640
|
const DatasetItemApiSelectSchema = createApiSchema(DatasetItemSelectSchema).openapi("DatasetItem");
|
|
620
641
|
const DatasetItemApiInsertSchema = createApiInsertSchema(DatasetItemInsertSchema).omit({
|
|
@@ -657,19 +678,19 @@ const TriggerEvaluationJobSchema = z.object({
|
|
|
657
678
|
jobFilters: EvaluationJobFilterCriteriaSchema.nullable().optional()
|
|
658
679
|
}).openapi("TriggerEvaluationJob");
|
|
659
680
|
const DatasetRunConfigSelectSchema = createSelectSchema(datasetRunConfig);
|
|
660
|
-
const DatasetRunConfigInsertSchema = createInsertSchema(datasetRunConfig).extend({ id:
|
|
681
|
+
const DatasetRunConfigInsertSchema = createInsertSchema(datasetRunConfig).extend({ id: ResourceIdSchema });
|
|
661
682
|
const DatasetRunConfigUpdateSchema = DatasetRunConfigInsertSchema.partial();
|
|
662
683
|
const DatasetRunConfigApiSelectSchema = createApiSchema(DatasetRunConfigSelectSchema).openapi("DatasetRunConfig");
|
|
663
684
|
const DatasetRunConfigApiInsertSchema = createApiInsertSchema(DatasetRunConfigInsertSchema).omit({ id: true }).openapi("DatasetRunConfigCreate");
|
|
664
685
|
const DatasetRunConfigApiUpdateSchema = createApiUpdateSchema(DatasetRunConfigUpdateSchema).omit({ id: true }).openapi("DatasetRunConfigUpdate");
|
|
665
686
|
const DatasetRunConfigAgentRelationSelectSchema = createSelectSchema(datasetRunConfigAgentRelations);
|
|
666
|
-
const DatasetRunConfigAgentRelationInsertSchema = createInsertSchema(datasetRunConfigAgentRelations).extend({ id:
|
|
687
|
+
const DatasetRunConfigAgentRelationInsertSchema = createInsertSchema(datasetRunConfigAgentRelations).extend({ id: ResourceIdSchema });
|
|
667
688
|
const DatasetRunConfigAgentRelationUpdateSchema = DatasetRunConfigAgentRelationInsertSchema.partial();
|
|
668
689
|
const DatasetRunConfigAgentRelationApiSelectSchema = createApiSchema(DatasetRunConfigAgentRelationSelectSchema).openapi("DatasetRunConfigAgentRelation");
|
|
669
690
|
const DatasetRunConfigAgentRelationApiInsertSchema = createApiInsertSchema(DatasetRunConfigAgentRelationInsertSchema).omit({ id: true }).openapi("DatasetRunConfigAgentRelationCreate");
|
|
670
691
|
const DatasetRunConfigAgentRelationApiUpdateSchema = createApiUpdateSchema(DatasetRunConfigAgentRelationUpdateSchema).omit({ id: true }).openapi("DatasetRunConfigAgentRelationUpdate");
|
|
671
692
|
const DataComponentSelectSchema = createSelectSchema(dataComponents);
|
|
672
|
-
const DataComponentInsertSchema = createInsertSchema(dataComponents).extend({ id:
|
|
693
|
+
const DataComponentInsertSchema = createInsertSchema(dataComponents).extend({ id: ResourceIdSchema });
|
|
673
694
|
const DataComponentBaseSchema = DataComponentInsertSchema.omit({
|
|
674
695
|
createdAt: true,
|
|
675
696
|
updatedAt: true
|
|
@@ -690,7 +711,7 @@ const SubAgentDataComponentApiInsertSchema = SubAgentDataComponentInsertSchema.o
|
|
|
690
711
|
});
|
|
691
712
|
const SubAgentDataComponentApiUpdateSchema = createAgentScopedApiUpdateSchema(SubAgentDataComponentUpdateSchema);
|
|
692
713
|
const ArtifactComponentSelectSchema = createSelectSchema(artifactComponents);
|
|
693
|
-
const ArtifactComponentInsertSchema = createInsertSchema(artifactComponents).extend({ id:
|
|
714
|
+
const ArtifactComponentInsertSchema = createInsertSchema(artifactComponents).extend({ id: ResourceIdSchema });
|
|
694
715
|
const ArtifactComponentUpdateSchema = ArtifactComponentInsertSchema.partial();
|
|
695
716
|
const ArtifactComponentApiSelectSchema = createApiSchema(ArtifactComponentSelectSchema).openapi("ArtifactComponent");
|
|
696
717
|
const ArtifactComponentApiInsertSchema = ArtifactComponentInsertSchema.omit({
|
|
@@ -702,9 +723,9 @@ const ArtifactComponentApiInsertSchema = ArtifactComponentInsertSchema.omit({
|
|
|
702
723
|
const ArtifactComponentApiUpdateSchema = createApiUpdateSchema(ArtifactComponentUpdateSchema).openapi("ArtifactComponentUpdate");
|
|
703
724
|
const SubAgentArtifactComponentSelectSchema = createSelectSchema(subAgentArtifactComponents);
|
|
704
725
|
const SubAgentArtifactComponentInsertSchema = createInsertSchema(subAgentArtifactComponents).extend({
|
|
705
|
-
id:
|
|
706
|
-
subAgentId:
|
|
707
|
-
artifactComponentId:
|
|
726
|
+
id: ResourceIdSchema,
|
|
727
|
+
subAgentId: ResourceIdSchema,
|
|
728
|
+
artifactComponentId: ResourceIdSchema
|
|
708
729
|
});
|
|
709
730
|
const SubAgentArtifactComponentUpdateSchema = SubAgentArtifactComponentInsertSchema.partial();
|
|
710
731
|
const SubAgentArtifactComponentApiSelectSchema = createAgentScopedApiSchema(SubAgentArtifactComponentSelectSchema);
|
|
@@ -716,7 +737,7 @@ const SubAgentArtifactComponentApiInsertSchema = SubAgentArtifactComponentInsert
|
|
|
716
737
|
});
|
|
717
738
|
const SubAgentArtifactComponentApiUpdateSchema = createAgentScopedApiUpdateSchema(SubAgentArtifactComponentUpdateSchema);
|
|
718
739
|
const ExternalAgentSelectSchema = createSelectSchema(externalAgents).extend({ credentialReferenceId: z.string().nullable().optional() });
|
|
719
|
-
const ExternalAgentInsertSchema = createInsertSchema(externalAgents).extend({ id:
|
|
740
|
+
const ExternalAgentInsertSchema = createInsertSchema(externalAgents).extend({ id: ResourceIdSchema });
|
|
720
741
|
const ExternalAgentUpdateSchema = ExternalAgentInsertSchema.partial();
|
|
721
742
|
const ExternalAgentApiSelectSchema = createApiSchema(ExternalAgentSelectSchema).openapi("ExternalAgent");
|
|
722
743
|
const ExternalAgentApiInsertSchema = createApiInsertSchema(ExternalAgentInsertSchema).openapi("ExternalAgentCreate");
|
|
@@ -724,8 +745,8 @@ const ExternalAgentApiUpdateSchema = createApiUpdateSchema(ExternalAgentUpdateSc
|
|
|
724
745
|
const AllAgentSchema = z.discriminatedUnion("type", [SubAgentApiSelectSchema.extend({ type: z.literal("internal") }), ExternalAgentApiSelectSchema.extend({ type: z.literal("external") })]);
|
|
725
746
|
const ApiKeySelectSchema = createSelectSchema(apiKeys);
|
|
726
747
|
const ApiKeyInsertSchema = createInsertSchema(apiKeys).extend({
|
|
727
|
-
id:
|
|
728
|
-
agentId:
|
|
748
|
+
id: ResourceIdSchema,
|
|
749
|
+
agentId: ResourceIdSchema
|
|
729
750
|
});
|
|
730
751
|
const ApiKeyUpdateSchema = ApiKeyInsertSchema.partial().omit({
|
|
731
752
|
tenantId: true,
|
|
@@ -757,9 +778,9 @@ const ApiKeyApiInsertSchema = ApiKeyInsertSchema.omit({
|
|
|
757
778
|
const ApiKeyApiUpdateSchema = ApiKeyUpdateSchema.openapi("ApiKeyUpdate");
|
|
758
779
|
const CredentialReferenceSelectSchema = createSelectSchema(credentialReferences);
|
|
759
780
|
const CredentialReferenceInsertSchema = createInsertSchema(credentialReferences).extend({
|
|
760
|
-
id:
|
|
781
|
+
id: ResourceIdSchema,
|
|
761
782
|
type: z.string(),
|
|
762
|
-
credentialStoreId:
|
|
783
|
+
credentialStoreId: ResourceIdSchema,
|
|
763
784
|
retrievalParams: z.record(z.string(), z.unknown()).nullish()
|
|
764
785
|
});
|
|
765
786
|
const CredentialReferenceUpdateSchema = CredentialReferenceInsertSchema.partial();
|
|
@@ -847,16 +868,16 @@ const ToolApiSelectSchema = createApiSchema(ToolSelectSchema).openapi("Tool");
|
|
|
847
868
|
const ToolApiInsertSchema = createApiInsertSchema(ToolInsertSchema).openapi("ToolCreate");
|
|
848
869
|
const ToolApiUpdateSchema = createApiUpdateSchema(ToolUpdateSchema).openapi("ToolUpdate");
|
|
849
870
|
const FunctionToolSelectSchema = createSelectSchema(functionTools);
|
|
850
|
-
const FunctionToolInsertSchema = createInsertSchema(functionTools).extend({ id:
|
|
871
|
+
const FunctionToolInsertSchema = createInsertSchema(functionTools).extend({ id: ResourceIdSchema });
|
|
851
872
|
const FunctionToolUpdateSchema = FunctionToolInsertSchema.partial();
|
|
852
873
|
const FunctionToolApiSelectSchema = createApiSchema(FunctionToolSelectSchema).extend({ relationshipId: z.string().optional() }).openapi("FunctionTool");
|
|
853
874
|
const FunctionToolApiInsertSchema = createAgentScopedApiInsertSchema(FunctionToolInsertSchema).openapi("FunctionToolCreate");
|
|
854
875
|
const FunctionToolApiUpdateSchema = createApiUpdateSchema(FunctionToolUpdateSchema).openapi("FunctionToolUpdate");
|
|
855
876
|
const SubAgentFunctionToolRelationSelectSchema = createSelectSchema(subAgentFunctionToolRelations);
|
|
856
877
|
const SubAgentFunctionToolRelationInsertSchema = createInsertSchema(subAgentFunctionToolRelations).extend({
|
|
857
|
-
id:
|
|
858
|
-
subAgentId:
|
|
859
|
-
functionToolId:
|
|
878
|
+
id: ResourceIdSchema,
|
|
879
|
+
subAgentId: ResourceIdSchema,
|
|
880
|
+
functionToolId: ResourceIdSchema
|
|
860
881
|
});
|
|
861
882
|
const SubAgentFunctionToolRelationApiSelectSchema = createAgentScopedApiSchema(SubAgentFunctionToolRelationSelectSchema).openapi("SubAgentFunctionToolRelation");
|
|
862
883
|
const SubAgentFunctionToolRelationApiInsertSchema = SubAgentFunctionToolRelationInsertSchema.omit({
|
|
@@ -868,10 +889,38 @@ const SubAgentFunctionToolRelationApiInsertSchema = SubAgentFunctionToolRelation
|
|
|
868
889
|
updatedAt: true
|
|
869
890
|
}).openapi("SubAgentFunctionToolRelationCreate");
|
|
870
891
|
const FunctionSelectSchema = createSelectSchema(functions);
|
|
871
|
-
const FunctionInsertSchema = createInsertSchema(functions).extend({ id:
|
|
892
|
+
const FunctionInsertSchema = createInsertSchema(functions).extend({ id: ResourceIdSchema });
|
|
872
893
|
const FunctionUpdateSchema = FunctionInsertSchema.partial();
|
|
873
894
|
const FunctionApiSelectSchema = createApiSchema(FunctionSelectSchema).openapi("Function");
|
|
874
|
-
const
|
|
895
|
+
const validateExecuteCode = (val, ctx) => {
|
|
896
|
+
try {
|
|
897
|
+
const isAnonymousFunction = /^(async\s+)?function(\s+)?\(/.test(val);
|
|
898
|
+
if (isAnonymousFunction) val = `(${val})`;
|
|
899
|
+
const { body } = parse(val, { sourceType: "module" }).program;
|
|
900
|
+
for (const node of body) {
|
|
901
|
+
if (node.type === "ExportDefaultDeclaration") throw SyntaxError("Export default declarations are not supported. Provide a single function instead.");
|
|
902
|
+
if (node.type === "ExportNamedDeclaration") throw SyntaxError("Export declarations are not supported. Provide a single function instead.");
|
|
903
|
+
}
|
|
904
|
+
const functionsCount = body.filter((node) => {
|
|
905
|
+
if (node.type === "FunctionDeclaration") return true;
|
|
906
|
+
if (node.type === "ExpressionStatement") return node.expression.type === (isAnonymousFunction ? "FunctionExpression" : "ArrowFunctionExpression");
|
|
907
|
+
return false;
|
|
908
|
+
}).length;
|
|
909
|
+
if (!functionsCount) throw new SyntaxError("Must contain exactly one function.");
|
|
910
|
+
if (functionsCount > 1) throw new SyntaxError(`Must contain exactly one function (found ${functionsCount}).`);
|
|
911
|
+
} catch (error) {
|
|
912
|
+
let message = error instanceof Error ? error.message : JSON.stringify(error);
|
|
913
|
+
if (message.startsWith("'return' outside of function. (")) message = "Top-level return is not allowed.";
|
|
914
|
+
else if (message.startsWith("Unexpected token, expected \"")) message = "TypeScript syntax is not supported. Use plain JavaScript.";
|
|
915
|
+
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.";
|
|
916
|
+
ctx.addIssue({
|
|
917
|
+
code: "custom",
|
|
918
|
+
message,
|
|
919
|
+
input: val
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
};
|
|
923
|
+
const FunctionApiInsertSchema = createApiInsertSchema(FunctionInsertSchema).openapi("FunctionCreate").extend({ executeCode: z.string().trim().nonempty().superRefine(validateExecuteCode) });
|
|
875
924
|
const FunctionApiUpdateSchema = createApiUpdateSchema(FunctionUpdateSchema).openapi("FunctionUpdate");
|
|
876
925
|
const FetchConfigSchema = z.object({
|
|
877
926
|
url: z.string().min(1, "URL is required"),
|
|
@@ -902,7 +951,7 @@ const ContextConfigSelectSchema = createSelectSchema(contextConfigs).extend({ he
|
|
|
902
951
|
description: "JSON Schema for validating request headers"
|
|
903
952
|
}) });
|
|
904
953
|
const ContextConfigInsertSchema = createInsertSchema(contextConfigs).extend({
|
|
905
|
-
id:
|
|
954
|
+
id: ResourceIdSchema.optional(),
|
|
906
955
|
headersSchema: z.any().nullable().optional().openapi({
|
|
907
956
|
type: "object",
|
|
908
957
|
description: "JSON Schema for validating request headers"
|
|
@@ -921,9 +970,9 @@ const ContextConfigApiInsertSchema = createApiInsertSchema(ContextConfigInsertSc
|
|
|
921
970
|
const ContextConfigApiUpdateSchema = createApiUpdateSchema(ContextConfigUpdateSchema).omit({ agentId: true }).openapi("ContextConfigUpdate");
|
|
922
971
|
const SubAgentToolRelationSelectSchema = createSelectSchema(subAgentToolRelations);
|
|
923
972
|
const SubAgentToolRelationInsertSchema = createInsertSchema(subAgentToolRelations).extend({
|
|
924
|
-
id:
|
|
925
|
-
subAgentId:
|
|
926
|
-
toolId:
|
|
973
|
+
id: ResourceIdSchema,
|
|
974
|
+
subAgentId: ResourceIdSchema,
|
|
975
|
+
toolId: ResourceIdSchema,
|
|
927
976
|
selectedTools: z.array(z.string()).nullish(),
|
|
928
977
|
headers: z.record(z.string(), z.string()).nullish(),
|
|
929
978
|
toolPolicies: z.record(z.string(), z.object({ needsApproval: z.boolean().optional() })).nullish()
|
|
@@ -934,9 +983,9 @@ const SubAgentToolRelationApiInsertSchema = createAgentScopedApiInsertSchema(Sub
|
|
|
934
983
|
const SubAgentToolRelationApiUpdateSchema = createAgentScopedApiUpdateSchema(SubAgentToolRelationUpdateSchema).openapi("SubAgentToolRelationUpdate");
|
|
935
984
|
const SubAgentExternalAgentRelationSelectSchema = createSelectSchema(subAgentExternalAgentRelations);
|
|
936
985
|
const SubAgentExternalAgentRelationInsertSchema = createInsertSchema(subAgentExternalAgentRelations).extend({
|
|
937
|
-
id:
|
|
938
|
-
subAgentId:
|
|
939
|
-
externalAgentId:
|
|
986
|
+
id: ResourceIdSchema,
|
|
987
|
+
subAgentId: ResourceIdSchema,
|
|
988
|
+
externalAgentId: ResourceIdSchema,
|
|
940
989
|
headers: z.record(z.string(), z.string()).nullish()
|
|
941
990
|
});
|
|
942
991
|
const SubAgentExternalAgentRelationUpdateSchema = SubAgentExternalAgentRelationInsertSchema.partial();
|
|
@@ -948,9 +997,9 @@ const SubAgentExternalAgentRelationApiInsertSchema = createAgentScopedApiInsertS
|
|
|
948
997
|
const SubAgentExternalAgentRelationApiUpdateSchema = createAgentScopedApiUpdateSchema(SubAgentExternalAgentRelationUpdateSchema).openapi("SubAgentExternalAgentRelationUpdate");
|
|
949
998
|
const SubAgentTeamAgentRelationSelectSchema = createSelectSchema(subAgentTeamAgentRelations);
|
|
950
999
|
const SubAgentTeamAgentRelationInsertSchema = createInsertSchema(subAgentTeamAgentRelations).extend({
|
|
951
|
-
id:
|
|
952
|
-
subAgentId:
|
|
953
|
-
targetAgentId:
|
|
1000
|
+
id: ResourceIdSchema,
|
|
1001
|
+
subAgentId: ResourceIdSchema,
|
|
1002
|
+
targetAgentId: ResourceIdSchema,
|
|
954
1003
|
headers: z.record(z.string(), z.string()).nullish()
|
|
955
1004
|
});
|
|
956
1005
|
const SubAgentTeamAgentRelationUpdateSchema = SubAgentTeamAgentRelationInsertSchema.partial();
|
|
@@ -1328,13 +1377,13 @@ const SubAgentId = z.string().openapi("SubAgentIdPathParam", {
|
|
|
1328
1377
|
example: "sub_agent_123"
|
|
1329
1378
|
});
|
|
1330
1379
|
const TenantParamsSchema = z.object({ tenantId: TenantId });
|
|
1331
|
-
const TenantIdParamsSchema = TenantParamsSchema.extend({ id:
|
|
1380
|
+
const TenantIdParamsSchema = TenantParamsSchema.extend({ id: ResourceIdSchema });
|
|
1332
1381
|
const TenantProjectParamsSchema = TenantParamsSchema.extend({ projectId: ProjectId });
|
|
1333
|
-
const TenantProjectIdParamsSchema = TenantProjectParamsSchema.extend({ id:
|
|
1382
|
+
const TenantProjectIdParamsSchema = TenantProjectParamsSchema.extend({ id: ResourceIdSchema });
|
|
1334
1383
|
const TenantProjectAgentParamsSchema = TenantProjectParamsSchema.extend({ agentId: AgentId });
|
|
1335
|
-
const TenantProjectAgentIdParamsSchema = TenantProjectAgentParamsSchema.extend({ id:
|
|
1384
|
+
const TenantProjectAgentIdParamsSchema = TenantProjectAgentParamsSchema.extend({ id: ResourceIdSchema });
|
|
1336
1385
|
const TenantProjectAgentSubAgentParamsSchema = TenantProjectAgentParamsSchema.extend({ subAgentId: SubAgentId });
|
|
1337
|
-
const TenantProjectAgentSubAgentIdParamsSchema = TenantProjectAgentSubAgentParamsSchema.extend({ id:
|
|
1386
|
+
const TenantProjectAgentSubAgentIdParamsSchema = TenantProjectAgentSubAgentParamsSchema.extend({ id: ResourceIdSchema });
|
|
1338
1387
|
const RefQueryParamSchema = z.object({ ref: z.string().optional().describe("Branch name, tag name, or commit hash to query from") });
|
|
1339
1388
|
const PaginationQueryParamsSchema = z.object({
|
|
1340
1389
|
page: pageNumber,
|
|
@@ -1356,6 +1405,42 @@ const ThirdPartyMCPServerResponse = z.object({ data: PrebuiltMCPServerSchema.nul
|
|
|
1356
1405
|
const PaginationWithRefQueryParamsSchema = PaginationQueryParamsSchema.merge(RefQueryParamSchema);
|
|
1357
1406
|
const ProjectMetadataSelectSchema = createSelectSchema(projectMetadata);
|
|
1358
1407
|
const ProjectMetadataInsertSchema = createInsertSchema(projectMetadata).omit({ createdAt: true });
|
|
1408
|
+
const WorkAppGitHubInstallationStatusSchema = z.enum([
|
|
1409
|
+
"pending",
|
|
1410
|
+
"active",
|
|
1411
|
+
"suspended",
|
|
1412
|
+
"disconnected"
|
|
1413
|
+
]);
|
|
1414
|
+
const WorkAppGitHubAccountTypeSchema = z.enum(["Organization", "User"]);
|
|
1415
|
+
const WorkAppGitHubInstallationSelectSchema = createSelectSchema(workAppGitHubInstallations);
|
|
1416
|
+
const WorkAppGitHubInstallationInsertSchema = createInsertSchema(workAppGitHubInstallations).omit({
|
|
1417
|
+
createdAt: true,
|
|
1418
|
+
updatedAt: true,
|
|
1419
|
+
status: true
|
|
1420
|
+
}).extend({
|
|
1421
|
+
accountType: WorkAppGitHubAccountTypeSchema,
|
|
1422
|
+
status: WorkAppGitHubInstallationStatusSchema.optional().default("active")
|
|
1423
|
+
});
|
|
1424
|
+
const WorkAppGithubInstallationApiSelectSchema = omitTenantScope(WorkAppGitHubInstallationSelectSchema);
|
|
1425
|
+
const WorkAppGitHubInstallationApiInsertSchema = omitGeneratedFields(WorkAppGitHubInstallationInsertSchema);
|
|
1426
|
+
const WorkAppGitHubRepositorySelectSchema = createSelectSchema(workAppGitHubRepositories);
|
|
1427
|
+
const WorkAppGitHubRepositoryInsertSchema = omitTimestamps(createInsertSchema(workAppGitHubRepositories));
|
|
1428
|
+
const WorkAppGitHubRepositoryApiInsertSchema = omitGeneratedFields(WorkAppGitHubRepositoryInsertSchema);
|
|
1429
|
+
const WorkAppGitHubProjectRepositoryAccessSelectSchema = createSelectSchema(workAppGitHubProjectRepositoryAccess);
|
|
1430
|
+
const WorkAppGitHubMcpToolRepositoryAccessSelectSchema = createSelectSchema(workAppGitHubMcpToolRepositoryAccess);
|
|
1431
|
+
const WorkAppGitHubAccessModeSchema = z.enum(["all", "selected"]);
|
|
1432
|
+
const WorkAppGitHubAccessSetRequestSchema = z.object({
|
|
1433
|
+
mode: WorkAppGitHubAccessModeSchema,
|
|
1434
|
+
repositoryIds: z.array(z.string()).optional().describe("Internal repository IDs (required when mode=\"selected\")")
|
|
1435
|
+
});
|
|
1436
|
+
const WorkAppGitHubAccessSetResponseSchema = z.object({
|
|
1437
|
+
mode: WorkAppGitHubAccessModeSchema,
|
|
1438
|
+
repositoryCount: z.number()
|
|
1439
|
+
});
|
|
1440
|
+
const WorkAppGitHubAccessGetResponseSchema = z.object({
|
|
1441
|
+
mode: WorkAppGitHubAccessModeSchema,
|
|
1442
|
+
repositories: z.array(WorkAppGitHubRepositorySelectSchema)
|
|
1443
|
+
});
|
|
1359
1444
|
|
|
1360
1445
|
//#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 };
|
|
1446
|
+
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, WorkAppGitHubAccessGetResponseSchema, WorkAppGitHubAccessModeSchema, WorkAppGitHubAccessSetRequestSchema, WorkAppGitHubAccessSetResponseSchema, WorkAppGitHubAccountTypeSchema, WorkAppGitHubInstallationApiInsertSchema, WorkAppGitHubInstallationInsertSchema, WorkAppGitHubInstallationSelectSchema, WorkAppGitHubInstallationStatusSchema, WorkAppGitHubMcpToolRepositoryAccessSelectSchema, WorkAppGitHubProjectRepositoryAccessSelectSchema, WorkAppGitHubRepositoryApiInsertSchema, WorkAppGitHubRepositoryInsertSchema, WorkAppGitHubRepositorySelectSchema, WorkAppGithubInstallationApiSelectSchema, canDelegateToExternalAgentInsertSchema, canDelegateToExternalAgentSchema, canDelegateToTeamAgentInsertSchema, canDelegateToTeamAgentSchema, canRelateToInternalSubAgentSchema };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE "tools" ADD COLUMN "is_work_app" boolean DEFAULT false NOT NULL;
|