@inkeep/agents-core 0.20.1 → 0.21.1

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.
@@ -3371,13 +3371,13 @@ declare const subAgentToolRelations: drizzle_orm_sqlite_core.SQLiteTableWithColu
3371
3371
  };
3372
3372
  dialect: "sqlite";
3373
3373
  }>;
3374
- declare const agentFunctionToolRelations: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
3375
- name: "agent_function_tool_relations";
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: "agent_function_tool_relations";
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: "agent_function_tool_relations";
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: "agent_function_tool_relations";
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: "agent_function_tool_relations";
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: "agent_function_tool_relations";
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: "agent_function_tool_relations";
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: "agent_function_tool_relations";
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: "agent_function_tool_relations";
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<"agent_function_tool_relations">;
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
- agentRelations: drizzle_orm.Many<"agent_function_tool_relations">;
4966
+ subAgentRelations: drizzle_orm.Many<"sub_agent_function_tool_relations">;
4967
4967
  }>;
4968
- declare const agentFunctionToolRelationsRelations: drizzle_orm.Relations<"agent_function_tool_relations", {
4969
- agent: drizzle_orm.One<"sub_agents", true>;
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 { schema_agentFunctionToolRelations as agentFunctionToolRelations, schema_agentFunctionToolRelationsRelations as agentFunctionToolRelationsRelations, 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_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 };
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, agentFunctionToolRelationsRelations 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, agentFunctionToolRelations 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 };
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 };
@@ -34,6 +34,14 @@ interface CredentialStore {
34
34
  * Delete a credential
35
35
  */
36
36
  delete(key: string): Promise<boolean>;
37
+ /**
38
+ * Check if the credential store is available and functional
39
+ * @returns Promise resolving to availability status and optional reason if unavailable
40
+ */
41
+ checkAvailability(): Promise<{
42
+ available: boolean;
43
+ reason?: string;
44
+ }>;
37
45
  }
38
46
  /**
39
47
  * Server configuration options for HTTP server behavior
@@ -34,6 +34,14 @@ interface CredentialStore {
34
34
  * Delete a credential
35
35
  */
36
36
  delete(key: string): Promise<boolean>;
37
+ /**
38
+ * Check if the credential store is available and functional
39
+ * @returns Promise resolving to availability status and optional reason if unavailable
40
+ */
41
+ checkAvailability(): Promise<{
42
+ available: boolean;
43
+ reason?: string;
44
+ }>;
37
45
  }
38
46
  /**
39
47
  * Server configuration options for HTTP server behavior
@@ -78,11 +78,8 @@ var projects = sqliteCore.sqliteTable(
78
78
  {
79
79
  ...tenantScoped,
80
80
  ...uiProperties,
81
- // Project-level default model settings that can be inherited by agents
82
81
  models: sqliteCore.text("models", { mode: "json" }).$type(),
83
- // Project-level stopWhen configuration that can be inherited by agents
84
82
  stopWhen: sqliteCore.text("stop_when", { mode: "json" }).$type(),
85
- // Project-level sandbox configuration for function execution
86
83
  sandboxConfig: sqliteCore.text("sandbox_config", { mode: "json" }).$type(),
87
84
  ...timestamps
88
85
  },
@@ -115,9 +112,7 @@ var contextConfigs = sqliteCore.sqliteTable(
115
112
  "context_configs",
116
113
  {
117
114
  ...agentScoped,
118
- // Developer-defined Zod schema for validating incoming request context
119
115
  headersSchema: sqliteCore.blob("headers_schema", { mode: "json" }).$type(),
120
- // Object mapping template keys to fetch definitions that use request context data
121
116
  contextVariables: sqliteCore.blob("context_variables", { mode: "json" }).$type(),
122
117
  ...timestamps
123
118
  },
@@ -134,15 +129,11 @@ var contextCache = sqliteCore.sqliteTable(
134
129
  "context_cache",
135
130
  {
136
131
  ...projectScoped,
137
- // Always scoped to conversation for complete data isolation
138
132
  conversationId: sqliteCore.text("conversation_id").notNull(),
139
- // Reference to the context config and specific fetch definition
140
133
  contextConfigId: sqliteCore.text("context_config_id").notNull(),
141
134
  contextVariableKey: sqliteCore.text("context_variable_key").notNull(),
142
135
  value: sqliteCore.blob("value", { mode: "json" }).$type().notNull(),
143
- // Request hash for cache invalidation based on context changes
144
136
  requestHash: sqliteCore.text("request_hash"),
145
- // Metadata for monitoring and debugging
146
137
  fetchedAt: sqliteCore.text("fetched_at").notNull(),
147
138
  fetchSource: sqliteCore.text("fetch_source"),
148
139
  fetchDurationMs: sqliteCore.integer("fetch_duration_ms"),
@@ -189,9 +180,7 @@ var subAgentRelations = sqliteCore.sqliteTable(
189
180
  {
190
181
  ...agentScoped,
191
182
  sourceSubAgentId: sqliteCore.text("source_sub_agent_id").notNull(),
192
- // For internal relationships
193
183
  targetSubAgentId: sqliteCore.text("target_sub_agent_id"),
194
- // For external relationships
195
184
  externalSubAgentId: sqliteCore.text("external_sub_agent_id"),
196
185
  relationType: sqliteCore.text("relation_type"),
197
186
  ...timestamps
@@ -360,9 +349,7 @@ var tools = sqliteCore.sqliteTable(
360
349
  config: sqliteCore.blob("config", { mode: "json" }).$type().notNull(),
361
350
  credentialReferenceId: sqliteCore.text("credential_reference_id"),
362
351
  headers: sqliteCore.blob("headers", { mode: "json" }).$type(),
363
- // Image URL for custom tool icon (supports regular URLs and base64 encoded images)
364
352
  imageUrl: sqliteCore.text("image_url"),
365
- // Server capabilities and status (only for MCP tools)
366
353
  capabilities: sqliteCore.blob("capabilities", { mode: "json" }).$type(),
367
354
  lastError: sqliteCore.text("last_error"),
368
355
  ...timestamps
@@ -392,7 +379,6 @@ var functionTools = sqliteCore.sqliteTable(
392
379
  foreignColumns: [agents.tenantId, agents.projectId, agents.id],
393
380
  name: "function_tools_agent_fk"
394
381
  }).onDelete("cascade"),
395
- // Foreign key constraint to functions table
396
382
  sqliteCore.foreignKey({
397
383
  columns: [table.tenantId, table.projectId, table.functionId],
398
384
  foreignColumns: [functions.tenantId, functions.projectId, functions.id],
@@ -441,8 +427,8 @@ var subAgentToolRelations = sqliteCore.sqliteTable(
441
427
  }).onDelete("cascade")
442
428
  ]
443
429
  );
444
- var agentFunctionToolRelations = sqliteCore.sqliteTable(
445
- "agent_function_tool_relations",
430
+ var subAgentFunctionToolRelations = sqliteCore.sqliteTable(
431
+ "sub_agent_function_tool_relations",
446
432
  {
447
433
  ...subAgentScoped,
448
434
  functionToolId: sqliteCore.text("function_tool_id").notNull(),
@@ -450,13 +436,11 @@ var agentFunctionToolRelations = sqliteCore.sqliteTable(
450
436
  },
451
437
  (table) => [
452
438
  sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.agentId, table.id] }),
453
- // Foreign key constraint to agents table
454
439
  sqliteCore.foreignKey({
455
440
  columns: [table.tenantId, table.projectId, table.agentId, table.subAgentId],
456
441
  foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.agentId, subAgents.id],
457
- name: "agent_function_tool_relations_agent_fk"
442
+ name: "sub_agent_function_tool_relations_sub_agent_fk"
458
443
  }).onDelete("cascade"),
459
- // Foreign key constraint to functionTools table
460
444
  sqliteCore.foreignKey({
461
445
  columns: [table.tenantId, table.projectId, table.agentId, table.functionToolId],
462
446
  foreignColumns: [
@@ -465,7 +449,7 @@ var agentFunctionToolRelations = sqliteCore.sqliteTable(
465
449
  functionTools.agentId,
466
450
  functionTools.id
467
451
  ],
468
- name: "agent_function_tool_relations_function_tool_fk"
452
+ name: "sub_agent_function_tool_relations_function_tool_fk"
469
453
  }).onDelete("cascade")
470
454
  ]
471
455
  );
@@ -494,26 +478,18 @@ var messages = sqliteCore.sqliteTable(
494
478
  {
495
479
  ...projectScoped,
496
480
  conversationId: sqliteCore.text("conversation_id").notNull(),
497
- // Role mapping: user, agent, system (unified for both formats)
498
481
  role: sqliteCore.text("role").notNull(),
499
- // Agent sender/recipient tracking (nullable - only populated when relevant)
500
482
  fromSubAgentId: sqliteCore.text("from_sub_agent_id"),
501
483
  toSubAgentId: sqliteCore.text("to_sub_agent_id"),
502
- // External agent sender tracking
503
484
  fromExternalAgentId: sqliteCore.text("from_external_sub_agent_id"),
504
- // External agent recipient tracking
505
485
  toExternalAgentId: sqliteCore.text("to_external_sub_agent_id"),
506
- // Message content stored as JSON to support both formats
507
486
  content: sqliteCore.blob("content", { mode: "json" }).$type().notNull(),
508
- // Message classification and filtering
509
487
  visibility: sqliteCore.text("visibility").notNull().default("user-facing"),
510
488
  messageType: sqliteCore.text("message_type").notNull().default("chat"),
511
489
  taskId: sqliteCore.text("task_id"),
512
490
  parentMessageId: sqliteCore.text("parent_message_id"),
513
- // A2A specific fields
514
491
  a2aTaskId: sqliteCore.text("a2a_task_id"),
515
492
  a2aSessionId: sqliteCore.text("a2a_session_id"),
516
- // Metadata for extensions
517
493
  metadata: sqliteCore.blob("metadata", { mode: "json" }).$type(),
518
494
  ...timestamps
519
495
  },
@@ -530,17 +506,14 @@ var ledgerArtifacts = sqliteCore.sqliteTable(
530
506
  "ledger_artifacts",
531
507
  {
532
508
  ...projectScoped,
533
- // Links
534
509
  taskId: sqliteCore.text("task_id").notNull(),
535
510
  toolCallId: sqliteCore.text("tool_call_id"),
536
511
  contextId: sqliteCore.text("context_id").notNull(),
537
- // Core Artifact fields
538
512
  type: sqliteCore.text("type").notNull().default("source"),
539
513
  name: sqliteCore.text("name"),
540
514
  description: sqliteCore.text("description"),
541
515
  parts: sqliteCore.blob("parts", { mode: "json" }).$type(),
542
516
  metadata: sqliteCore.blob("metadata", { mode: "json" }).$type(),
543
- // Extra ledger information (not part of the Artifact spec – kept optional)
544
517
  summary: sqliteCore.text("summary"),
545
518
  mime: sqliteCore.blob("mime", { mode: "json" }).$type(),
546
519
  visibility: sqliteCore.text("visibility").default("context"),
@@ -691,7 +664,7 @@ drizzleOrm.relations(subAgents, ({ many, one }) => ({
691
664
  relationName: "receivedMessages"
692
665
  }),
693
666
  toolRelations: many(subAgentToolRelations),
694
- functionToolRelations: many(agentFunctionToolRelations),
667
+ functionToolRelations: many(subAgentFunctionToolRelations),
695
668
  dataComponentRelations: many(subAgentDataComponents),
696
669
  artifactComponentRelations: many(subAgentArtifactComponents)
697
670
  }));
@@ -896,17 +869,17 @@ drizzleOrm.relations(functionTools, ({ one, many }) => ({
896
869
  fields: [functionTools.tenantId, functionTools.projectId, functionTools.functionId],
897
870
  references: [functions.tenantId, functions.projectId, functions.id]
898
871
  }),
899
- agentRelations: many(agentFunctionToolRelations)
872
+ subAgentRelations: many(subAgentFunctionToolRelations)
900
873
  }));
901
874
  drizzleOrm.relations(
902
- agentFunctionToolRelations,
875
+ subAgentFunctionToolRelations,
903
876
  ({ one }) => ({
904
- agent: one(subAgents, {
905
- fields: [agentFunctionToolRelations.subAgentId],
877
+ subAgent: one(subAgents, {
878
+ fields: [subAgentFunctionToolRelations.subAgentId],
906
879
  references: [subAgents.id]
907
880
  }),
908
881
  functionTool: one(functionTools, {
909
- fields: [agentFunctionToolRelations.functionToolId],
882
+ fields: [subAgentFunctionToolRelations.functionToolId],
910
883
  references: [functionTools.id]
911
884
  })
912
885
  })
@@ -1,2 +1,2 @@
1
- export { A2AMessageMetadataSchema, DataOperationDetailsSchema, DataOperationEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, TransferDataSchema, generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validateToolReferences } from '../chunk-4FMDWUE4.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-VICWT3WO.js';
1
+ export { A2AMessageMetadataSchema, DataOperationDetailsSchema, DataOperationEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, TransferDataSchema, generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validateToolReferences } from '../chunk-QEXLYPVZ.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-XKJPMUGE.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;