@inkeep/agents-core 0.20.0 → 0.21.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/{chunk-B6F3RF4T.js → chunk-7GKB2SDR.js} +15 -15
- package/dist/{chunk-VICWT3WO.js → chunk-RCE4G7BW.js} +1 -1
- package/dist/{chunk-4FMDWUE4.js → chunk-VTNB6CCI.js} +1 -1
- package/dist/client-exports.cjs +11 -11
- package/dist/client-exports.js +2 -2
- package/dist/db/schema.cjs +14 -14
- package/dist/db/schema.d.cts +1 -1
- package/dist/db/schema.d.ts +1 -1
- package/dist/db/schema.js +1 -1
- package/dist/index.cjs +71 -45
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +61 -35
- package/dist/{schema-CcSN2XcZ.d.cts → schema-BjQKqtdC.d.cts} +18 -18
- package/dist/{schema-D8h85qdU.d.ts → schema-DylNIx0j.d.ts} +18 -18
- package/dist/validation/index.cjs +11 -11
- package/dist/validation/index.js +2 -2
- package/drizzle/0008_mysterious_crusher_hogan.sql +20 -0
- package/drizzle/meta/0008_snapshot.json +2753 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,12 +3,12 @@ export { ANTHROPIC_MODELS, GOOGLE_MODELS, OPENAI_MODELS } from './chunk-LZJWVTQ2
|
|
|
3
3
|
import { getLogger, convertZodToJsonSchema } from './chunk-YECQCT5N.js';
|
|
4
4
|
export { PinoLogger, convertZodToJsonSchema, convertZodToJsonSchemaWithPreview, extractPreviewFields, getLogger, isZodSchema, loggerFactory, preview } from './chunk-YECQCT5N.js';
|
|
5
5
|
export { TaskState } from './chunk-H2F72PDA.js';
|
|
6
|
-
import { validateAndTypeAgentData, validateAgentStructure, isInternalAgent, isExternalAgent } from './chunk-
|
|
7
|
-
export { A2AMessageMetadataSchema, DataOperationDetailsSchema, DataOperationEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, TransferDataSchema, generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validateToolReferences } from './chunk-
|
|
8
|
-
import { ContextConfigApiUpdateSchema, validatePropsAsJsonSchema } from './chunk-
|
|
9
|
-
export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RemovedResponseSchema, SandboxConfigSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, resourceIdSchema, validatePropsAsJsonSchema } from './chunk-
|
|
10
|
-
import { schema_exports, contextConfigs, externalAgents, functions, functionTools,
|
|
11
|
-
export {
|
|
6
|
+
import { validateAndTypeAgentData, validateAgentStructure, isInternalAgent, isExternalAgent } from './chunk-VTNB6CCI.js';
|
|
7
|
+
export { A2AMessageMetadataSchema, DataOperationDetailsSchema, DataOperationEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, TransferDataSchema, generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validateToolReferences } from './chunk-VTNB6CCI.js';
|
|
8
|
+
import { ContextConfigApiUpdateSchema, validatePropsAsJsonSchema } from './chunk-RCE4G7BW.js';
|
|
9
|
+
export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RemovedResponseSchema, SandboxConfigSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, resourceIdSchema, validatePropsAsJsonSchema } from './chunk-RCE4G7BW.js';
|
|
10
|
+
import { schema_exports, contextConfigs, externalAgents, functions, functionTools, subAgentFunctionToolRelations, subAgentRelations, subAgents, subAgentToolRelations, tools, credentialReferences, agents, subAgentDataComponents, subAgentArtifactComponents, dataComponents, artifactComponents, projects, apiKeys, contextCache, conversations, messages, ledgerArtifacts, tasks, taskRelations } from './chunk-7GKB2SDR.js';
|
|
11
|
+
export { agentRelations, agentToolRelationsRelations, agents, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, externalAgents, externalAgentsRelations, functionTools, functionToolsRelations, functions, functionsRelations, ledgerArtifacts, ledgerArtifactsRelations, messages, messagesRelations, projects, projectsRelations, subAgentArtifactComponents, subAgentArtifactComponentsRelations, subAgentDataComponents, subAgentDataComponentsRelations, subAgentFunctionToolRelations, subAgentFunctionToolRelationsRelations, subAgentRelations, subAgentRelationsRelations, subAgentToolRelations, subAgents, subAgentsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations } from './chunk-7GKB2SDR.js';
|
|
12
12
|
import { CredentialStoreType, MCPServerType, MCPTransportType } from './chunk-YFHT5M2R.js';
|
|
13
13
|
export { CredentialStoreType, MCPServerType, MCPTransportType, TOOL_STATUS_VALUES, VALID_RELATION_TYPES } from './chunk-YFHT5M2R.js';
|
|
14
14
|
import { __commonJS, __require, __publicField } from './chunk-E6R6PML7.js';
|
|
@@ -214114,12 +214114,12 @@ var getFunctionToolsForSubAgent = (db) => {
|
|
|
214114
214114
|
scopes: { tenantId, projectId, agentId },
|
|
214115
214115
|
pagination: { page: 1, limit: 1e3 }
|
|
214116
214116
|
});
|
|
214117
|
-
const relations = await db.select().from(
|
|
214117
|
+
const relations = await db.select().from(subAgentFunctionToolRelations).where(
|
|
214118
214118
|
and(
|
|
214119
|
-
eq(
|
|
214120
|
-
eq(
|
|
214121
|
-
eq(
|
|
214122
|
-
eq(
|
|
214119
|
+
eq(subAgentFunctionToolRelations.tenantId, tenantId),
|
|
214120
|
+
eq(subAgentFunctionToolRelations.projectId, projectId),
|
|
214121
|
+
eq(subAgentFunctionToolRelations.agentId, agentId),
|
|
214122
|
+
eq(subAgentFunctionToolRelations.subAgentId, subAgentId)
|
|
214123
214123
|
)
|
|
214124
214124
|
);
|
|
214125
214125
|
const relatedFunctionToolIds = new Set(relations.map((r) => r.functionToolId));
|
|
@@ -214140,17 +214140,43 @@ var getFunctionToolsForSubAgent = (db) => {
|
|
|
214140
214140
|
};
|
|
214141
214141
|
};
|
|
214142
214142
|
var upsertSubAgentFunctionToolRelation = (db) => async (params) => {
|
|
214143
|
-
|
|
214143
|
+
const { scopes, subAgentId, functionToolId, relationId } = params;
|
|
214144
|
+
const { tenantId, projectId, agentId } = scopes;
|
|
214145
|
+
if (relationId) {
|
|
214144
214146
|
return await updateSubAgentFunctionToolRelation(db)({
|
|
214145
|
-
scopes
|
|
214146
|
-
relationId
|
|
214147
|
+
scopes,
|
|
214148
|
+
relationId,
|
|
214147
214149
|
data: {
|
|
214148
|
-
subAgentId
|
|
214149
|
-
functionToolId
|
|
214150
|
+
subAgentId,
|
|
214151
|
+
functionToolId
|
|
214150
214152
|
}
|
|
214151
214153
|
});
|
|
214152
214154
|
}
|
|
214153
|
-
|
|
214155
|
+
try {
|
|
214156
|
+
const existingRelations = await db.select().from(subAgentFunctionToolRelations).where(
|
|
214157
|
+
and(
|
|
214158
|
+
eq(subAgentFunctionToolRelations.tenantId, tenantId),
|
|
214159
|
+
eq(subAgentFunctionToolRelations.projectId, projectId),
|
|
214160
|
+
eq(subAgentFunctionToolRelations.agentId, agentId),
|
|
214161
|
+
eq(subAgentFunctionToolRelations.subAgentId, subAgentId),
|
|
214162
|
+
eq(subAgentFunctionToolRelations.functionToolId, functionToolId)
|
|
214163
|
+
)
|
|
214164
|
+
).limit(1);
|
|
214165
|
+
if (existingRelations.length > 0) {
|
|
214166
|
+
logger3.info(
|
|
214167
|
+
{ tenantId, projectId, agentId, subAgentId, functionToolId, relationId: existingRelations[0].id },
|
|
214168
|
+
"Sub_agent-function tool relation already exists, returning existing relation"
|
|
214169
|
+
);
|
|
214170
|
+
return { id: existingRelations[0].id };
|
|
214171
|
+
}
|
|
214172
|
+
return await addFunctionToolToSubAgent(db)(params);
|
|
214173
|
+
} catch (error) {
|
|
214174
|
+
logger3.error(
|
|
214175
|
+
{ tenantId, projectId, agentId, subAgentId, functionToolId, error },
|
|
214176
|
+
"Failed to upsert sub_agent-function tool relation"
|
|
214177
|
+
);
|
|
214178
|
+
throw error;
|
|
214179
|
+
}
|
|
214154
214180
|
};
|
|
214155
214181
|
var addFunctionToolToSubAgent = (db) => {
|
|
214156
214182
|
return async (params) => {
|
|
@@ -214158,7 +214184,7 @@ var addFunctionToolToSubAgent = (db) => {
|
|
|
214158
214184
|
const { tenantId, projectId, agentId } = scopes;
|
|
214159
214185
|
try {
|
|
214160
214186
|
const relationId = nanoid();
|
|
214161
|
-
await db.insert(
|
|
214187
|
+
await db.insert(subAgentFunctionToolRelations).values({
|
|
214162
214188
|
id: relationId,
|
|
214163
214189
|
tenantId,
|
|
214164
214190
|
projectId,
|
|
@@ -214168,7 +214194,7 @@ var addFunctionToolToSubAgent = (db) => {
|
|
|
214168
214194
|
});
|
|
214169
214195
|
logger3.info(
|
|
214170
214196
|
{ tenantId, projectId, agentId, subAgentId, functionToolId, relationId },
|
|
214171
|
-
"Function tool added to
|
|
214197
|
+
"Function tool added to sub_agent"
|
|
214172
214198
|
);
|
|
214173
214199
|
return { id: relationId };
|
|
214174
214200
|
} catch (error) {
|
|
@@ -214185,20 +214211,20 @@ var updateSubAgentFunctionToolRelation = (db) => {
|
|
|
214185
214211
|
const { scopes, relationId, data } = params;
|
|
214186
214212
|
const { tenantId, projectId, agentId } = scopes;
|
|
214187
214213
|
try {
|
|
214188
|
-
await db.update(
|
|
214214
|
+
await db.update(subAgentFunctionToolRelations).set({
|
|
214189
214215
|
subAgentId: data.subAgentId,
|
|
214190
214216
|
functionToolId: data.functionToolId
|
|
214191
214217
|
}).where(
|
|
214192
214218
|
and(
|
|
214193
|
-
eq(
|
|
214194
|
-
eq(
|
|
214195
|
-
eq(
|
|
214196
|
-
eq(
|
|
214219
|
+
eq(subAgentFunctionToolRelations.id, relationId),
|
|
214220
|
+
eq(subAgentFunctionToolRelations.tenantId, tenantId),
|
|
214221
|
+
eq(subAgentFunctionToolRelations.projectId, projectId),
|
|
214222
|
+
eq(subAgentFunctionToolRelations.agentId, agentId)
|
|
214197
214223
|
)
|
|
214198
214224
|
);
|
|
214199
214225
|
logger3.info(
|
|
214200
214226
|
{ tenantId, projectId, agentId, relationId, data },
|
|
214201
|
-
"
|
|
214227
|
+
"SubAgent-function tool relation updated"
|
|
214202
214228
|
);
|
|
214203
214229
|
return { id: relationId };
|
|
214204
214230
|
} catch (error) {
|
|
@@ -216242,21 +216268,21 @@ var getFullAgentDefinition = (db) => async ({
|
|
|
216242
216268
|
tenantId: functionTools.tenantId,
|
|
216243
216269
|
projectId: functionTools.projectId,
|
|
216244
216270
|
agentId: functionTools.agentId,
|
|
216245
|
-
agentToolRelationId:
|
|
216246
|
-
}).from(
|
|
216271
|
+
agentToolRelationId: subAgentFunctionToolRelations.id
|
|
216272
|
+
}).from(subAgentFunctionToolRelations).innerJoin(
|
|
216247
216273
|
functionTools,
|
|
216248
216274
|
and(
|
|
216249
|
-
eq(
|
|
216250
|
-
eq(
|
|
216251
|
-
eq(
|
|
216252
|
-
eq(
|
|
216275
|
+
eq(subAgentFunctionToolRelations.functionToolId, functionTools.id),
|
|
216276
|
+
eq(subAgentFunctionToolRelations.tenantId, functionTools.tenantId),
|
|
216277
|
+
eq(subAgentFunctionToolRelations.projectId, functionTools.projectId),
|
|
216278
|
+
eq(subAgentFunctionToolRelations.agentId, functionTools.agentId)
|
|
216253
216279
|
)
|
|
216254
216280
|
).where(
|
|
216255
216281
|
and(
|
|
216256
|
-
eq(
|
|
216257
|
-
eq(
|
|
216258
|
-
eq(
|
|
216259
|
-
eq(
|
|
216282
|
+
eq(subAgentFunctionToolRelations.tenantId, tenantId),
|
|
216283
|
+
eq(subAgentFunctionToolRelations.projectId, projectId),
|
|
216284
|
+
eq(subAgentFunctionToolRelations.agentId, agentId),
|
|
216285
|
+
eq(subAgentFunctionToolRelations.subAgentId, agent2.id)
|
|
216260
216286
|
)
|
|
216261
216287
|
);
|
|
216262
216288
|
const agentDataComponentRelations = await db.query.subAgentDataComponents.findMany({
|
|
@@ -3371,13 +3371,13 @@ declare const subAgentToolRelations: drizzle_orm_sqlite_core.SQLiteTableWithColu
|
|
|
3371
3371
|
};
|
|
3372
3372
|
dialect: "sqlite";
|
|
3373
3373
|
}>;
|
|
3374
|
-
declare const
|
|
3375
|
-
name: "
|
|
3374
|
+
declare const subAgentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
3375
|
+
name: "sub_agent_function_tool_relations";
|
|
3376
3376
|
schema: undefined;
|
|
3377
3377
|
columns: {
|
|
3378
3378
|
createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3379
3379
|
name: "created_at";
|
|
3380
|
-
tableName: "
|
|
3380
|
+
tableName: "sub_agent_function_tool_relations";
|
|
3381
3381
|
dataType: "string";
|
|
3382
3382
|
columnType: "SQLiteText";
|
|
3383
3383
|
data: string;
|
|
@@ -3396,7 +3396,7 @@ declare const agentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWit
|
|
|
3396
3396
|
}>;
|
|
3397
3397
|
updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3398
3398
|
name: "updated_at";
|
|
3399
|
-
tableName: "
|
|
3399
|
+
tableName: "sub_agent_function_tool_relations";
|
|
3400
3400
|
dataType: "string";
|
|
3401
3401
|
columnType: "SQLiteText";
|
|
3402
3402
|
data: string;
|
|
@@ -3415,7 +3415,7 @@ declare const agentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWit
|
|
|
3415
3415
|
}>;
|
|
3416
3416
|
functionToolId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3417
3417
|
name: "function_tool_id";
|
|
3418
|
-
tableName: "
|
|
3418
|
+
tableName: "sub_agent_function_tool_relations";
|
|
3419
3419
|
dataType: "string";
|
|
3420
3420
|
columnType: "SQLiteText";
|
|
3421
3421
|
data: string;
|
|
@@ -3434,7 +3434,7 @@ declare const agentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWit
|
|
|
3434
3434
|
}>;
|
|
3435
3435
|
subAgentId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3436
3436
|
name: "sub_agent_id";
|
|
3437
|
-
tableName: "
|
|
3437
|
+
tableName: "sub_agent_function_tool_relations";
|
|
3438
3438
|
dataType: "string";
|
|
3439
3439
|
columnType: "SQLiteText";
|
|
3440
3440
|
data: string;
|
|
@@ -3453,7 +3453,7 @@ declare const agentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWit
|
|
|
3453
3453
|
}>;
|
|
3454
3454
|
agentId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3455
3455
|
name: "agent_id";
|
|
3456
|
-
tableName: "
|
|
3456
|
+
tableName: "sub_agent_function_tool_relations";
|
|
3457
3457
|
dataType: "string";
|
|
3458
3458
|
columnType: "SQLiteText";
|
|
3459
3459
|
data: string;
|
|
@@ -3472,7 +3472,7 @@ declare const agentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWit
|
|
|
3472
3472
|
}>;
|
|
3473
3473
|
projectId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3474
3474
|
name: "project_id";
|
|
3475
|
-
tableName: "
|
|
3475
|
+
tableName: "sub_agent_function_tool_relations";
|
|
3476
3476
|
dataType: "string";
|
|
3477
3477
|
columnType: "SQLiteText";
|
|
3478
3478
|
data: string;
|
|
@@ -3491,7 +3491,7 @@ declare const agentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWit
|
|
|
3491
3491
|
}>;
|
|
3492
3492
|
tenantId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3493
3493
|
name: "tenant_id";
|
|
3494
|
-
tableName: "
|
|
3494
|
+
tableName: "sub_agent_function_tool_relations";
|
|
3495
3495
|
dataType: "string";
|
|
3496
3496
|
columnType: "SQLiteText";
|
|
3497
3497
|
data: string;
|
|
@@ -3510,7 +3510,7 @@ declare const agentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWit
|
|
|
3510
3510
|
}>;
|
|
3511
3511
|
id: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3512
3512
|
name: "id";
|
|
3513
|
-
tableName: "
|
|
3513
|
+
tableName: "sub_agent_function_tool_relations";
|
|
3514
3514
|
dataType: "string";
|
|
3515
3515
|
columnType: "SQLiteText";
|
|
3516
3516
|
data: string;
|
|
@@ -4881,7 +4881,7 @@ declare const subAgentsRelations: drizzle_orm.Relations<"sub_agents", {
|
|
|
4881
4881
|
sentMessages: drizzle_orm.Many<"messages">;
|
|
4882
4882
|
receivedMessages: drizzle_orm.Many<"messages">;
|
|
4883
4883
|
toolRelations: drizzle_orm.Many<"sub_agent_tool_relations">;
|
|
4884
|
-
functionToolRelations: drizzle_orm.Many<"
|
|
4884
|
+
functionToolRelations: drizzle_orm.Many<"sub_agent_function_tool_relations">;
|
|
4885
4885
|
dataComponentRelations: drizzle_orm.Many<"sub_agent_data_components">;
|
|
4886
4886
|
artifactComponentRelations: drizzle_orm.Many<"sub_agent_artifact_components">;
|
|
4887
4887
|
}>;
|
|
@@ -4963,15 +4963,13 @@ declare const functionToolsRelations: drizzle_orm.Relations<"function_tools", {
|
|
|
4963
4963
|
project: drizzle_orm.One<"projects", true>;
|
|
4964
4964
|
agent: drizzle_orm.One<"agent", true>;
|
|
4965
4965
|
function: drizzle_orm.One<"functions", true>;
|
|
4966
|
-
|
|
4966
|
+
subAgentRelations: drizzle_orm.Many<"sub_agent_function_tool_relations">;
|
|
4967
4967
|
}>;
|
|
4968
|
-
declare const
|
|
4969
|
-
|
|
4968
|
+
declare const subAgentFunctionToolRelationsRelations: drizzle_orm.Relations<"sub_agent_function_tool_relations", {
|
|
4969
|
+
subAgent: drizzle_orm.One<"sub_agents", true>;
|
|
4970
4970
|
functionTool: drizzle_orm.One<"function_tools", true>;
|
|
4971
4971
|
}>;
|
|
4972
4972
|
|
|
4973
|
-
declare const schema_agentFunctionToolRelations: typeof agentFunctionToolRelations;
|
|
4974
|
-
declare const schema_agentFunctionToolRelationsRelations: typeof agentFunctionToolRelationsRelations;
|
|
4975
4973
|
declare const schema_agentRelations: typeof agentRelations;
|
|
4976
4974
|
declare const schema_agentToolRelationsRelations: typeof agentToolRelationsRelations;
|
|
4977
4975
|
declare const schema_agents: typeof agents;
|
|
@@ -5005,6 +5003,8 @@ declare const schema_subAgentArtifactComponents: typeof subAgentArtifactComponen
|
|
|
5005
5003
|
declare const schema_subAgentArtifactComponentsRelations: typeof subAgentArtifactComponentsRelations;
|
|
5006
5004
|
declare const schema_subAgentDataComponents: typeof subAgentDataComponents;
|
|
5007
5005
|
declare const schema_subAgentDataComponentsRelations: typeof subAgentDataComponentsRelations;
|
|
5006
|
+
declare const schema_subAgentFunctionToolRelations: typeof subAgentFunctionToolRelations;
|
|
5007
|
+
declare const schema_subAgentFunctionToolRelationsRelations: typeof subAgentFunctionToolRelationsRelations;
|
|
5008
5008
|
declare const schema_subAgentRelations: typeof subAgentRelations;
|
|
5009
5009
|
declare const schema_subAgentRelationsRelations: typeof subAgentRelationsRelations;
|
|
5010
5010
|
declare const schema_subAgentToolRelations: typeof subAgentToolRelations;
|
|
@@ -5017,7 +5017,7 @@ declare const schema_tasksRelations: typeof tasksRelations;
|
|
|
5017
5017
|
declare const schema_tools: typeof tools;
|
|
5018
5018
|
declare const schema_toolsRelations: typeof toolsRelations;
|
|
5019
5019
|
declare namespace schema {
|
|
5020
|
-
export {
|
|
5020
|
+
export { schema_agentRelations as agentRelations, schema_agentToolRelationsRelations as agentToolRelationsRelations, schema_agents as agents, schema_apiKeys as apiKeys, schema_apiKeysRelations as apiKeysRelations, schema_artifactComponents as artifactComponents, schema_artifactComponentsRelations as artifactComponentsRelations, schema_contextCache as contextCache, schema_contextCacheRelations as contextCacheRelations, schema_contextConfigs as contextConfigs, schema_contextConfigsRelations as contextConfigsRelations, schema_conversations as conversations, schema_conversationsRelations as conversationsRelations, schema_credentialReferences as credentialReferences, schema_credentialReferencesRelations as credentialReferencesRelations, schema_dataComponents as dataComponents, schema_dataComponentsRelations as dataComponentsRelations, schema_externalAgents as externalAgents, schema_externalAgentsRelations as externalAgentsRelations, schema_functionTools as functionTools, schema_functionToolsRelations as functionToolsRelations, schema_functions as functions, schema_functionsRelations as functionsRelations, schema_ledgerArtifacts as ledgerArtifacts, schema_ledgerArtifactsRelations as ledgerArtifactsRelations, schema_messages as messages, schema_messagesRelations as messagesRelations, schema_projects as projects, schema_projectsRelations as projectsRelations, schema_subAgentArtifactComponents as subAgentArtifactComponents, schema_subAgentArtifactComponentsRelations as subAgentArtifactComponentsRelations, schema_subAgentDataComponents as subAgentDataComponents, schema_subAgentDataComponentsRelations as subAgentDataComponentsRelations, schema_subAgentFunctionToolRelations as subAgentFunctionToolRelations, schema_subAgentFunctionToolRelationsRelations as subAgentFunctionToolRelationsRelations, schema_subAgentRelations as subAgentRelations, schema_subAgentRelationsRelations as subAgentRelationsRelations, schema_subAgentToolRelations as subAgentToolRelations, schema_subAgents as subAgents, schema_subAgentsRelations as subAgentsRelations, schema_taskRelations as taskRelations, schema_taskRelationsRelations as taskRelationsRelations, schema_tasks as tasks, schema_tasksRelations as tasksRelations, schema_tools as tools, schema_toolsRelations as toolsRelations };
|
|
5021
5021
|
}
|
|
5022
5022
|
|
|
5023
|
-
export { taskRelationsRelations as A, contextConfigsRelations as B, contextCacheRelations as C, subAgentsRelations as D, agentRelations as E, externalAgentsRelations as F, apiKeysRelations as G, agentToolRelationsRelations as H, credentialReferencesRelations as I, toolsRelations as J, conversationsRelations as K, messagesRelations as L, artifactComponentsRelations as M, subAgentArtifactComponentsRelations as N, dataComponentsRelations as O, subAgentDataComponentsRelations as P, ledgerArtifactsRelations as Q, functionsRelations as R, subAgentRelationsRelations as S, functionToolsRelations as T,
|
|
5023
|
+
export { taskRelationsRelations as A, contextConfigsRelations as B, contextCacheRelations as C, subAgentsRelations as D, agentRelations as E, externalAgentsRelations as F, apiKeysRelations as G, agentToolRelationsRelations as H, credentialReferencesRelations as I, toolsRelations as J, conversationsRelations as K, messagesRelations as L, artifactComponentsRelations as M, subAgentArtifactComponentsRelations as N, dataComponentsRelations as O, subAgentDataComponentsRelations as P, ledgerArtifactsRelations as Q, functionsRelations as R, subAgentRelationsRelations as S, functionToolsRelations as T, subAgentFunctionToolRelationsRelations as U, agents as a, contextCache as b, contextConfigs as c, subAgents as d, subAgentRelations as e, externalAgents as f, taskRelations as g, dataComponents as h, subAgentDataComponents as i, artifactComponents as j, subAgentArtifactComponents as k, tools as l, functionTools as m, functions as n, subAgentToolRelations as o, projects as p, subAgentFunctionToolRelations as q, conversations as r, schema as s, tasks as t, messages as u, ledgerArtifacts as v, apiKeys as w, credentialReferences as x, tasksRelations as y, projectsRelations as z };
|
|
@@ -3371,13 +3371,13 @@ declare const subAgentToolRelations: drizzle_orm_sqlite_core.SQLiteTableWithColu
|
|
|
3371
3371
|
};
|
|
3372
3372
|
dialect: "sqlite";
|
|
3373
3373
|
}>;
|
|
3374
|
-
declare const
|
|
3375
|
-
name: "
|
|
3374
|
+
declare const subAgentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
3375
|
+
name: "sub_agent_function_tool_relations";
|
|
3376
3376
|
schema: undefined;
|
|
3377
3377
|
columns: {
|
|
3378
3378
|
createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3379
3379
|
name: "created_at";
|
|
3380
|
-
tableName: "
|
|
3380
|
+
tableName: "sub_agent_function_tool_relations";
|
|
3381
3381
|
dataType: "string";
|
|
3382
3382
|
columnType: "SQLiteText";
|
|
3383
3383
|
data: string;
|
|
@@ -3396,7 +3396,7 @@ declare const agentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWit
|
|
|
3396
3396
|
}>;
|
|
3397
3397
|
updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3398
3398
|
name: "updated_at";
|
|
3399
|
-
tableName: "
|
|
3399
|
+
tableName: "sub_agent_function_tool_relations";
|
|
3400
3400
|
dataType: "string";
|
|
3401
3401
|
columnType: "SQLiteText";
|
|
3402
3402
|
data: string;
|
|
@@ -3415,7 +3415,7 @@ declare const agentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWit
|
|
|
3415
3415
|
}>;
|
|
3416
3416
|
functionToolId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3417
3417
|
name: "function_tool_id";
|
|
3418
|
-
tableName: "
|
|
3418
|
+
tableName: "sub_agent_function_tool_relations";
|
|
3419
3419
|
dataType: "string";
|
|
3420
3420
|
columnType: "SQLiteText";
|
|
3421
3421
|
data: string;
|
|
@@ -3434,7 +3434,7 @@ declare const agentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWit
|
|
|
3434
3434
|
}>;
|
|
3435
3435
|
subAgentId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3436
3436
|
name: "sub_agent_id";
|
|
3437
|
-
tableName: "
|
|
3437
|
+
tableName: "sub_agent_function_tool_relations";
|
|
3438
3438
|
dataType: "string";
|
|
3439
3439
|
columnType: "SQLiteText";
|
|
3440
3440
|
data: string;
|
|
@@ -3453,7 +3453,7 @@ declare const agentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWit
|
|
|
3453
3453
|
}>;
|
|
3454
3454
|
agentId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3455
3455
|
name: "agent_id";
|
|
3456
|
-
tableName: "
|
|
3456
|
+
tableName: "sub_agent_function_tool_relations";
|
|
3457
3457
|
dataType: "string";
|
|
3458
3458
|
columnType: "SQLiteText";
|
|
3459
3459
|
data: string;
|
|
@@ -3472,7 +3472,7 @@ declare const agentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWit
|
|
|
3472
3472
|
}>;
|
|
3473
3473
|
projectId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3474
3474
|
name: "project_id";
|
|
3475
|
-
tableName: "
|
|
3475
|
+
tableName: "sub_agent_function_tool_relations";
|
|
3476
3476
|
dataType: "string";
|
|
3477
3477
|
columnType: "SQLiteText";
|
|
3478
3478
|
data: string;
|
|
@@ -3491,7 +3491,7 @@ declare const agentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWit
|
|
|
3491
3491
|
}>;
|
|
3492
3492
|
tenantId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3493
3493
|
name: "tenant_id";
|
|
3494
|
-
tableName: "
|
|
3494
|
+
tableName: "sub_agent_function_tool_relations";
|
|
3495
3495
|
dataType: "string";
|
|
3496
3496
|
columnType: "SQLiteText";
|
|
3497
3497
|
data: string;
|
|
@@ -3510,7 +3510,7 @@ declare const agentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWit
|
|
|
3510
3510
|
}>;
|
|
3511
3511
|
id: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3512
3512
|
name: "id";
|
|
3513
|
-
tableName: "
|
|
3513
|
+
tableName: "sub_agent_function_tool_relations";
|
|
3514
3514
|
dataType: "string";
|
|
3515
3515
|
columnType: "SQLiteText";
|
|
3516
3516
|
data: string;
|
|
@@ -4881,7 +4881,7 @@ declare const subAgentsRelations: drizzle_orm.Relations<"sub_agents", {
|
|
|
4881
4881
|
sentMessages: drizzle_orm.Many<"messages">;
|
|
4882
4882
|
receivedMessages: drizzle_orm.Many<"messages">;
|
|
4883
4883
|
toolRelations: drizzle_orm.Many<"sub_agent_tool_relations">;
|
|
4884
|
-
functionToolRelations: drizzle_orm.Many<"
|
|
4884
|
+
functionToolRelations: drizzle_orm.Many<"sub_agent_function_tool_relations">;
|
|
4885
4885
|
dataComponentRelations: drizzle_orm.Many<"sub_agent_data_components">;
|
|
4886
4886
|
artifactComponentRelations: drizzle_orm.Many<"sub_agent_artifact_components">;
|
|
4887
4887
|
}>;
|
|
@@ -4963,15 +4963,13 @@ declare const functionToolsRelations: drizzle_orm.Relations<"function_tools", {
|
|
|
4963
4963
|
project: drizzle_orm.One<"projects", true>;
|
|
4964
4964
|
agent: drizzle_orm.One<"agent", true>;
|
|
4965
4965
|
function: drizzle_orm.One<"functions", true>;
|
|
4966
|
-
|
|
4966
|
+
subAgentRelations: drizzle_orm.Many<"sub_agent_function_tool_relations">;
|
|
4967
4967
|
}>;
|
|
4968
|
-
declare const
|
|
4969
|
-
|
|
4968
|
+
declare const subAgentFunctionToolRelationsRelations: drizzle_orm.Relations<"sub_agent_function_tool_relations", {
|
|
4969
|
+
subAgent: drizzle_orm.One<"sub_agents", true>;
|
|
4970
4970
|
functionTool: drizzle_orm.One<"function_tools", true>;
|
|
4971
4971
|
}>;
|
|
4972
4972
|
|
|
4973
|
-
declare const schema_agentFunctionToolRelations: typeof agentFunctionToolRelations;
|
|
4974
|
-
declare const schema_agentFunctionToolRelationsRelations: typeof agentFunctionToolRelationsRelations;
|
|
4975
4973
|
declare const schema_agentRelations: typeof agentRelations;
|
|
4976
4974
|
declare const schema_agentToolRelationsRelations: typeof agentToolRelationsRelations;
|
|
4977
4975
|
declare const schema_agents: typeof agents;
|
|
@@ -5005,6 +5003,8 @@ declare const schema_subAgentArtifactComponents: typeof subAgentArtifactComponen
|
|
|
5005
5003
|
declare const schema_subAgentArtifactComponentsRelations: typeof subAgentArtifactComponentsRelations;
|
|
5006
5004
|
declare const schema_subAgentDataComponents: typeof subAgentDataComponents;
|
|
5007
5005
|
declare const schema_subAgentDataComponentsRelations: typeof subAgentDataComponentsRelations;
|
|
5006
|
+
declare const schema_subAgentFunctionToolRelations: typeof subAgentFunctionToolRelations;
|
|
5007
|
+
declare const schema_subAgentFunctionToolRelationsRelations: typeof subAgentFunctionToolRelationsRelations;
|
|
5008
5008
|
declare const schema_subAgentRelations: typeof subAgentRelations;
|
|
5009
5009
|
declare const schema_subAgentRelationsRelations: typeof subAgentRelationsRelations;
|
|
5010
5010
|
declare const schema_subAgentToolRelations: typeof subAgentToolRelations;
|
|
@@ -5017,7 +5017,7 @@ declare const schema_tasksRelations: typeof tasksRelations;
|
|
|
5017
5017
|
declare const schema_tools: typeof tools;
|
|
5018
5018
|
declare const schema_toolsRelations: typeof toolsRelations;
|
|
5019
5019
|
declare namespace schema {
|
|
5020
|
-
export {
|
|
5020
|
+
export { schema_agentRelations as agentRelations, schema_agentToolRelationsRelations as agentToolRelationsRelations, schema_agents as agents, schema_apiKeys as apiKeys, schema_apiKeysRelations as apiKeysRelations, schema_artifactComponents as artifactComponents, schema_artifactComponentsRelations as artifactComponentsRelations, schema_contextCache as contextCache, schema_contextCacheRelations as contextCacheRelations, schema_contextConfigs as contextConfigs, schema_contextConfigsRelations as contextConfigsRelations, schema_conversations as conversations, schema_conversationsRelations as conversationsRelations, schema_credentialReferences as credentialReferences, schema_credentialReferencesRelations as credentialReferencesRelations, schema_dataComponents as dataComponents, schema_dataComponentsRelations as dataComponentsRelations, schema_externalAgents as externalAgents, schema_externalAgentsRelations as externalAgentsRelations, schema_functionTools as functionTools, schema_functionToolsRelations as functionToolsRelations, schema_functions as functions, schema_functionsRelations as functionsRelations, schema_ledgerArtifacts as ledgerArtifacts, schema_ledgerArtifactsRelations as ledgerArtifactsRelations, schema_messages as messages, schema_messagesRelations as messagesRelations, schema_projects as projects, schema_projectsRelations as projectsRelations, schema_subAgentArtifactComponents as subAgentArtifactComponents, schema_subAgentArtifactComponentsRelations as subAgentArtifactComponentsRelations, schema_subAgentDataComponents as subAgentDataComponents, schema_subAgentDataComponentsRelations as subAgentDataComponentsRelations, schema_subAgentFunctionToolRelations as subAgentFunctionToolRelations, schema_subAgentFunctionToolRelationsRelations as subAgentFunctionToolRelationsRelations, schema_subAgentRelations as subAgentRelations, schema_subAgentRelationsRelations as subAgentRelationsRelations, schema_subAgentToolRelations as subAgentToolRelations, schema_subAgents as subAgents, schema_subAgentsRelations as subAgentsRelations, schema_taskRelations as taskRelations, schema_taskRelationsRelations as taskRelationsRelations, schema_tasks as tasks, schema_tasksRelations as tasksRelations, schema_tools as tools, schema_toolsRelations as toolsRelations };
|
|
5021
5021
|
}
|
|
5022
5022
|
|
|
5023
|
-
export { taskRelationsRelations as A, contextConfigsRelations as B, contextCacheRelations as C, subAgentsRelations as D, agentRelations as E, externalAgentsRelations as F, apiKeysRelations as G, agentToolRelationsRelations as H, credentialReferencesRelations as I, toolsRelations as J, conversationsRelations as K, messagesRelations as L, artifactComponentsRelations as M, subAgentArtifactComponentsRelations as N, dataComponentsRelations as O, subAgentDataComponentsRelations as P, ledgerArtifactsRelations as Q, functionsRelations as R, subAgentRelationsRelations as S, functionToolsRelations as T,
|
|
5023
|
+
export { taskRelationsRelations as A, contextConfigsRelations as B, contextCacheRelations as C, subAgentsRelations as D, agentRelations as E, externalAgentsRelations as F, apiKeysRelations as G, agentToolRelationsRelations as H, credentialReferencesRelations as I, toolsRelations as J, conversationsRelations as K, messagesRelations as L, artifactComponentsRelations as M, subAgentArtifactComponentsRelations as N, dataComponentsRelations as O, subAgentDataComponentsRelations as P, ledgerArtifactsRelations as Q, functionsRelations as R, subAgentRelationsRelations as S, functionToolsRelations as T, subAgentFunctionToolRelationsRelations as U, agents as a, contextCache as b, contextConfigs as c, subAgents as d, subAgentRelations as e, externalAgents as f, taskRelations as g, dataComponents as h, subAgentDataComponents as i, artifactComponents as j, subAgentArtifactComponents as k, tools as l, functionTools as m, functions as n, subAgentToolRelations as o, projects as p, subAgentFunctionToolRelations as q, conversations as r, schema as s, tasks as t, messages as u, ledgerArtifacts as v, apiKeys as w, credentialReferences as x, tasksRelations as y, projectsRelations as z };
|
|
@@ -441,8 +441,8 @@ var subAgentToolRelations = sqliteCore.sqliteTable(
|
|
|
441
441
|
}).onDelete("cascade")
|
|
442
442
|
]
|
|
443
443
|
);
|
|
444
|
-
var
|
|
445
|
-
"
|
|
444
|
+
var subAgentFunctionToolRelations = sqliteCore.sqliteTable(
|
|
445
|
+
"sub_agent_function_tool_relations",
|
|
446
446
|
{
|
|
447
447
|
...subAgentScoped,
|
|
448
448
|
functionToolId: sqliteCore.text("function_tool_id").notNull(),
|
|
@@ -450,11 +450,11 @@ var agentFunctionToolRelations = sqliteCore.sqliteTable(
|
|
|
450
450
|
},
|
|
451
451
|
(table) => [
|
|
452
452
|
sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.agentId, table.id] }),
|
|
453
|
-
// Foreign key constraint to
|
|
453
|
+
// Foreign key constraint to sub_agents table
|
|
454
454
|
sqliteCore.foreignKey({
|
|
455
455
|
columns: [table.tenantId, table.projectId, table.agentId, table.subAgentId],
|
|
456
456
|
foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.agentId, subAgents.id],
|
|
457
|
-
name: "
|
|
457
|
+
name: "sub_agent_function_tool_relations_sub_agent_fk"
|
|
458
458
|
}).onDelete("cascade"),
|
|
459
459
|
// Foreign key constraint to functionTools table
|
|
460
460
|
sqliteCore.foreignKey({
|
|
@@ -465,7 +465,7 @@ var agentFunctionToolRelations = sqliteCore.sqliteTable(
|
|
|
465
465
|
functionTools.agentId,
|
|
466
466
|
functionTools.id
|
|
467
467
|
],
|
|
468
|
-
name: "
|
|
468
|
+
name: "sub_agent_function_tool_relations_function_tool_fk"
|
|
469
469
|
}).onDelete("cascade")
|
|
470
470
|
]
|
|
471
471
|
);
|
|
@@ -691,7 +691,7 @@ drizzleOrm.relations(subAgents, ({ many, one }) => ({
|
|
|
691
691
|
relationName: "receivedMessages"
|
|
692
692
|
}),
|
|
693
693
|
toolRelations: many(subAgentToolRelations),
|
|
694
|
-
functionToolRelations: many(
|
|
694
|
+
functionToolRelations: many(subAgentFunctionToolRelations),
|
|
695
695
|
dataComponentRelations: many(subAgentDataComponents),
|
|
696
696
|
artifactComponentRelations: many(subAgentArtifactComponents)
|
|
697
697
|
}));
|
|
@@ -896,17 +896,17 @@ drizzleOrm.relations(functionTools, ({ one, many }) => ({
|
|
|
896
896
|
fields: [functionTools.tenantId, functionTools.projectId, functionTools.functionId],
|
|
897
897
|
references: [functions.tenantId, functions.projectId, functions.id]
|
|
898
898
|
}),
|
|
899
|
-
|
|
899
|
+
subAgentRelations: many(subAgentFunctionToolRelations)
|
|
900
900
|
}));
|
|
901
901
|
drizzleOrm.relations(
|
|
902
|
-
|
|
902
|
+
subAgentFunctionToolRelations,
|
|
903
903
|
({ one }) => ({
|
|
904
|
-
|
|
905
|
-
fields: [
|
|
904
|
+
subAgent: one(subAgents, {
|
|
905
|
+
fields: [subAgentFunctionToolRelations.subAgentId],
|
|
906
906
|
references: [subAgents.id]
|
|
907
907
|
}),
|
|
908
908
|
functionTool: one(functionTools, {
|
|
909
|
-
fields: [
|
|
909
|
+
fields: [subAgentFunctionToolRelations.functionToolId],
|
|
910
910
|
references: [functionTools.id]
|
|
911
911
|
})
|
|
912
912
|
})
|
package/dist/validation/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A2AMessageMetadataSchema, DataOperationDetailsSchema, DataOperationEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, TransferDataSchema, generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validateToolReferences } from '../chunk-
|
|
2
|
-
export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RemovedResponseSchema, SandboxConfigSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, resourceIdSchema, validatePropsAsJsonSchema } from '../chunk-
|
|
1
|
+
export { A2AMessageMetadataSchema, DataOperationDetailsSchema, DataOperationEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, TransferDataSchema, generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validateToolReferences } from '../chunk-VTNB6CCI.js';
|
|
2
|
+
export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RemovedResponseSchema, SandboxConfigSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, resourceIdSchema, validatePropsAsJsonSchema } from '../chunk-RCE4G7BW.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
ALTER TABLE `agent_function_tool_relations` RENAME TO `sub_agent_function_tool_relations`;--> statement-breakpoint
|
|
2
|
+
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
|
3
|
+
CREATE TABLE `__new_sub_agent_function_tool_relations` (
|
|
4
|
+
`tenant_id` text NOT NULL,
|
|
5
|
+
`id` text NOT NULL,
|
|
6
|
+
`project_id` text NOT NULL,
|
|
7
|
+
`agent_id` text NOT NULL,
|
|
8
|
+
`sub_agent_id` text NOT NULL,
|
|
9
|
+
`function_tool_id` text NOT NULL,
|
|
10
|
+
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
11
|
+
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
12
|
+
PRIMARY KEY(`tenant_id`, `project_id`, `agent_id`, `id`),
|
|
13
|
+
FOREIGN KEY (`tenant_id`,`project_id`,`agent_id`,`sub_agent_id`) REFERENCES `sub_agents`(`tenant_id`,`project_id`,`agent_id`,`id`) ON UPDATE no action ON DELETE cascade,
|
|
14
|
+
FOREIGN KEY (`tenant_id`,`project_id`,`agent_id`,`function_tool_id`) REFERENCES `function_tools`(`tenant_id`,`project_id`,`agent_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
15
|
+
);
|
|
16
|
+
--> statement-breakpoint
|
|
17
|
+
INSERT INTO `__new_sub_agent_function_tool_relations`("tenant_id", "id", "project_id", "agent_id", "sub_agent_id", "function_tool_id", "created_at", "updated_at") SELECT "tenant_id", "id", "project_id", "agent_id", "sub_agent_id", "function_tool_id", "created_at", "updated_at" FROM `sub_agent_function_tool_relations`;--> statement-breakpoint
|
|
18
|
+
DROP TABLE `sub_agent_function_tool_relations`;--> statement-breakpoint
|
|
19
|
+
ALTER TABLE `__new_sub_agent_function_tool_relations` RENAME TO `sub_agent_function_tool_relations`;--> statement-breakpoint
|
|
20
|
+
PRAGMA foreign_keys=ON;
|