@inkeep/agents-core 0.0.0-dev-20260303063511 → 0.0.0-dev-20260303225743

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.
Files changed (47) hide show
  1. package/dist/auth/auth-schema.d.ts +85 -85
  2. package/dist/auth/auth-validation-schemas.d.ts +135 -135
  3. package/dist/auth/auth.d.ts +9 -9
  4. package/dist/auth/auth.js +2 -2
  5. package/dist/auth/permissions.d.ts +9 -9
  6. package/dist/client-exports.d.ts +2 -2
  7. package/dist/client-exports.js +2 -2
  8. package/dist/data-access/index.d.ts +3 -3
  9. package/dist/data-access/index.js +3 -3
  10. package/dist/data-access/manage/agents.d.ts +21 -21
  11. package/dist/data-access/manage/agents.js +25 -11
  12. package/dist/data-access/manage/artifactComponents.d.ts +6 -6
  13. package/dist/data-access/manage/contextConfigs.d.ts +8 -8
  14. package/dist/data-access/manage/dataComponents.d.ts +2 -2
  15. package/dist/data-access/manage/functionTools.d.ts +12 -12
  16. package/dist/data-access/manage/skills.d.ts +13 -13
  17. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
  18. package/dist/data-access/manage/subAgentRelations.d.ts +20 -20
  19. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  20. package/dist/data-access/manage/subAgents.d.ts +15 -15
  21. package/dist/data-access/manage/tools.d.ts +18 -18
  22. package/dist/data-access/manage/triggerCleanup.d.ts +12 -0
  23. package/dist/data-access/manage/triggerCleanup.js +51 -0
  24. package/dist/data-access/manage/triggers.d.ts +12 -1
  25. package/dist/data-access/manage/triggers.js +8 -1
  26. package/dist/data-access/runtime/apiKeys.d.ts +12 -12
  27. package/dist/data-access/runtime/conversations.d.ts +20 -20
  28. package/dist/data-access/runtime/messages.d.ts +18 -18
  29. package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +3 -3
  30. package/dist/data-access/runtime/tasks.d.ts +4 -4
  31. package/dist/data-access/runtime/users.d.ts +5 -1
  32. package/dist/data-access/runtime/users.js +14 -1
  33. package/dist/db/manage/manage-schema.d.ts +393 -355
  34. package/dist/db/manage/manage-schema.js +2 -0
  35. package/dist/db/runtime/runtime-schema.d.ts +266 -266
  36. package/dist/index.d.ts +4 -4
  37. package/dist/index.js +4 -4
  38. package/dist/validation/index.d.ts +2 -2
  39. package/dist/validation/index.js +2 -2
  40. package/dist/validation/schemas.d.ts +1796 -1627
  41. package/dist/validation/schemas.js +18 -5
  42. package/drizzle/manage/0012_petite_weapon_omega.sql +2 -0
  43. package/drizzle/manage/meta/0012_snapshot.json +3697 -0
  44. package/drizzle/manage/meta/_journal.json +7 -0
  45. package/package.json +1 -1
  46. package/dist/auth/cleanup.d.ts +0 -12
  47. package/dist/auth/cleanup.js +0 -43
@@ -11,11 +11,11 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
11
11
  }) => Promise<{
12
12
  id: string;
13
13
  name: string;
14
- createdAt: string;
15
- updatedAt: string;
16
14
  description: string | null;
15
+ defaultSubAgentId: string | null;
17
16
  tenantId: string;
18
17
  projectId: string;
18
+ prompt: string | null;
19
19
  models: {
20
20
  base?: {
21
21
  model?: string | undefined;
@@ -33,8 +33,8 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
33
33
  stopWhen: {
34
34
  transferCountIs?: number | undefined;
35
35
  } | null;
36
- prompt: string | null;
37
- defaultSubAgentId: string | null;
36
+ createdAt: string;
37
+ updatedAt: string;
38
38
  contextConfigId: string | null;
39
39
  statusUpdates: {
40
40
  enabled?: boolean | undefined;
@@ -57,11 +57,11 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
57
57
  }) => Promise<{
58
58
  id: string;
59
59
  name: string;
60
- createdAt: string;
61
- updatedAt: string;
62
60
  description: string | null;
61
+ defaultSubAgentId: string | null;
63
62
  tenantId: string;
64
63
  projectId: string;
64
+ prompt: string | null;
65
65
  models: {
66
66
  base?: {
67
67
  model?: string | undefined;
@@ -79,8 +79,8 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
79
79
  stopWhen: {
80
80
  transferCountIs?: number | undefined;
81
81
  } | null;
82
- prompt: string | null;
83
- defaultSubAgentId: string | null;
82
+ createdAt: string;
83
+ updatedAt: string;
84
84
  contextConfigId: string | null;
85
85
  statusUpdates: {
86
86
  enabled?: boolean | undefined;
@@ -100,11 +100,12 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
100
100
  defaultSubAgent: {
101
101
  id: string;
102
102
  name: string;
103
- createdAt: string;
104
- updatedAt: string;
105
103
  description: string | null;
106
104
  tenantId: string;
107
105
  projectId: string;
106
+ agentId: string;
107
+ prompt: string | null;
108
+ conversationHistoryConfig: ConversationHistoryConfig | null;
108
109
  models: {
109
110
  base?: {
110
111
  model?: string | undefined;
@@ -122,9 +123,8 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
122
123
  stopWhen: {
123
124
  stepCountIs?: number | undefined;
124
125
  } | null;
125
- agentId: string;
126
- prompt: string | null;
127
- conversationHistoryConfig: ConversationHistoryConfig | null;
126
+ createdAt: string;
127
+ updatedAt: string;
128
128
  } | null;
129
129
  } | null>;
130
130
  declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
@@ -132,11 +132,11 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
132
132
  }) => Promise<{
133
133
  id: string;
134
134
  name: string;
135
- createdAt: string;
136
- updatedAt: string;
137
135
  description: string | null;
136
+ defaultSubAgentId: string | null;
138
137
  tenantId: string;
139
138
  projectId: string;
139
+ prompt: string | null;
140
140
  models: {
141
141
  base?: {
142
142
  model?: string | undefined;
@@ -154,8 +154,8 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
154
154
  stopWhen: {
155
155
  transferCountIs?: number | undefined;
156
156
  } | null;
157
- prompt: string | null;
158
- defaultSubAgentId: string | null;
157
+ createdAt: string;
158
+ updatedAt: string;
159
159
  contextConfigId: string | null;
160
160
  statusUpdates: {
161
161
  enabled?: boolean | undefined;
@@ -248,11 +248,11 @@ declare function listAgentsAcrossProjectMainBranches(db: AgentsManageDatabaseCli
248
248
  declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
249
249
  id: string;
250
250
  name: string;
251
- createdAt: string;
252
- updatedAt: string;
253
251
  description: string | null;
252
+ defaultSubAgentId: string | null;
254
253
  tenantId: string;
255
254
  projectId: string;
255
+ prompt: string | null;
256
256
  models: {
257
257
  base?: {
258
258
  model?: string | undefined;
@@ -270,8 +270,8 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
270
270
  stopWhen: {
271
271
  transferCountIs?: number | undefined;
272
272
  } | null;
273
- prompt: string | null;
274
- defaultSubAgentId: string | null;
273
+ createdAt: string;
274
+ updatedAt: string;
275
275
  contextConfigId: string | null;
276
276
  statusUpdates: {
277
277
  enabled?: boolean | undefined;
@@ -365,7 +365,10 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
365
365
  id: agent.contextConfigId
366
366
  });
367
367
  } catch (error) {
368
- console.warn(`Failed to retrieve contextConfig ${agent.contextConfigId}:`, error);
368
+ agentsLogger.warn({
369
+ error,
370
+ contextConfigId: agent.contextConfigId
371
+ }, "Failed to retrieve contextConfig");
369
372
  }
370
373
  try {
371
374
  await fetchComponentRelationships(db)({
@@ -386,7 +389,7 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
386
389
  }
387
390
  });
388
391
  } catch (error) {
389
- console.warn("Failed to retrieve dataComponents:", error);
392
+ agentsLogger.warn({ error }, "Failed to retrieve dataComponents");
390
393
  }
391
394
  try {
392
395
  await fetchComponentRelationships(db)({
@@ -407,7 +410,7 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
407
410
  }
408
411
  });
409
412
  } catch (error) {
410
- console.warn("Failed to retrieve artifactComponents:", error);
413
+ agentsLogger.warn({ error }, "Failed to retrieve artifactComponents");
411
414
  }
412
415
  const result = {
413
416
  id: agent.id,
@@ -455,7 +458,10 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
455
458
  stopWhen: agent$1.stopWhen
456
459
  };
457
460
  } catch (dbError) {
458
- console.warn(`Failed to persist stopWhen for agent ${subAgentId}:`, dbError);
461
+ agentsLogger.warn({
462
+ error: dbError,
463
+ subAgentId
464
+ }, "Failed to persist stopWhen for agent");
459
465
  }
460
466
  }
461
467
  }
@@ -463,7 +469,7 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
463
469
  }
464
470
  }
465
471
  } catch (error) {
466
- console.warn("Failed to apply agent stepCountIs inheritance:", error);
472
+ agentsLogger.warn({ error }, "Failed to apply agent stepCountIs inheritance");
467
473
  }
468
474
  try {
469
475
  const usedToolIds = new Set(Object.values(agentsObject).flatMap((a) => Array.isArray(a?.canUse) ? a.canUse : []).map((ref) => ref?.toolId).filter(Boolean));
@@ -532,7 +538,7 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
532
538
  result.functions = Object.fromEntries(functions);
533
539
  }
534
540
  } catch (error) {
535
- console.warn("Failed to load tools/functions lookups:", error);
541
+ agentsLogger.warn({ error }, "Failed to load tools/functions lookups");
536
542
  }
537
543
  try {
538
544
  const triggersList = await listTriggers(db)({ scopes: {
@@ -540,7 +546,10 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
540
546
  projectId,
541
547
  agentId
542
548
  } });
543
- console.log(`[getFullAgentDefinitionInternal] Fetched ${triggersList.length} triggers for agent ${agentId}`);
549
+ agentsLogger.debug({
550
+ agentId,
551
+ count: triggersList.length
552
+ }, "Fetched triggers for agent");
544
553
  if (triggersList.length > 0) {
545
554
  const triggersObject = {};
546
555
  for (const trigger of triggersList) triggersObject[trigger.id] = {
@@ -553,13 +562,18 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
553
562
  messageTemplate: trigger.messageTemplate,
554
563
  authentication: trigger.authentication,
555
564
  signingSecretCredentialReferenceId: trigger.signingSecretCredentialReferenceId,
556
- signatureVerification: trigger.signatureVerification
565
+ signatureVerification: trigger.signatureVerification,
566
+ runAsUserId: trigger.runAsUserId,
567
+ createdBy: trigger.createdBy
557
568
  };
558
569
  result.triggers = triggersObject;
559
- console.log(`[getFullAgentDefinitionInternal] Added triggers to result:`, Object.keys(triggersObject));
570
+ agentsLogger.debug({
571
+ agentId,
572
+ triggerIds: Object.keys(triggersObject)
573
+ }, "Added triggers to result");
560
574
  }
561
575
  } catch (error) {
562
- console.warn("Failed to load triggers:", error);
576
+ agentsLogger.warn({ error }, "Failed to load triggers");
563
577
  }
564
578
  try {
565
579
  const scheduledTriggersList = await listScheduledTriggers(db)({ scopes: {
@@ -588,7 +602,7 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
588
602
  result.scheduledTriggers = scheduledTriggersObject;
589
603
  }
590
604
  } catch (error) {
591
- console.warn("Failed to load scheduled triggers:", error);
605
+ agentsLogger.warn({ error }, "Failed to load scheduled triggers");
592
606
  }
593
607
  return result;
594
608
  };
@@ -11,11 +11,11 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
11
11
  }) => Promise<{
12
12
  id: string;
13
13
  name: string;
14
- createdAt: string;
15
- updatedAt: string;
16
14
  description: string | null;
17
15
  tenantId: string;
18
16
  projectId: string;
17
+ createdAt: string;
18
+ updatedAt: string;
19
19
  props: {
20
20
  [x: string]: unknown;
21
21
  type: "object";
@@ -67,11 +67,11 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
67
67
  declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
68
68
  id: string;
69
69
  name: string;
70
- createdAt: string;
71
- updatedAt: string;
72
70
  description: string | null;
73
71
  tenantId: string;
74
72
  projectId: string;
73
+ createdAt: string;
74
+ updatedAt: string;
75
75
  props: {
76
76
  [x: string]: unknown;
77
77
  type: "object";
@@ -142,10 +142,10 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
142
142
  artifactComponentId: string;
143
143
  }) => Promise<{
144
144
  id: string;
145
- createdAt: string;
146
145
  tenantId: string;
147
146
  projectId: string;
148
147
  agentId: string;
148
+ createdAt: string;
149
149
  subAgentId: string;
150
150
  artifactComponentId: string;
151
151
  }>;
@@ -185,10 +185,10 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
185
185
  artifactComponentId: string;
186
186
  }) => Promise<{
187
187
  id: string;
188
- createdAt: string;
189
188
  tenantId: string;
190
189
  projectId: string;
191
190
  agentId: string;
191
+ createdAt: string;
192
192
  subAgentId: string;
193
193
  artifactComponentId: string;
194
194
  } | null>;
@@ -10,11 +10,11 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
10
10
  id: string;
11
11
  }) => Promise<{
12
12
  id: string;
13
- createdAt: string;
14
- updatedAt: string;
15
13
  tenantId: string;
16
14
  projectId: string;
17
15
  agentId: string;
16
+ createdAt: string;
17
+ updatedAt: string;
18
18
  headersSchema: unknown;
19
19
  contextVariables: Record<string, ContextFetchDefinition> | null;
20
20
  } | undefined>;
@@ -22,11 +22,11 @@ declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
22
22
  scopes: AgentScopeConfig;
23
23
  }) => Promise<{
24
24
  id: string;
25
- createdAt: string;
26
- updatedAt: string;
27
25
  tenantId: string;
28
26
  projectId: string;
29
27
  agentId: string;
28
+ createdAt: string;
29
+ updatedAt: string;
30
30
  headersSchema: unknown;
31
31
  contextVariables: Record<string, ContextFetchDefinition> | null;
32
32
  }[]>;
@@ -44,11 +44,11 @@ declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (
44
44
  }>;
45
45
  declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params: ContextConfigInsert) => Promise<{
46
46
  id: string;
47
- createdAt: string;
48
- updatedAt: string;
49
47
  tenantId: string;
50
48
  projectId: string;
51
49
  agentId: string;
50
+ createdAt: string;
51
+ updatedAt: string;
52
52
  headersSchema: unknown;
53
53
  contextVariables: Record<string, ContextFetchDefinition> | null;
54
54
  }>;
@@ -84,11 +84,11 @@ declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params:
84
84
  data: ContextConfigInsert;
85
85
  }) => Promise<{
86
86
  id: string;
87
- createdAt: string;
88
- updatedAt: string;
89
87
  tenantId: string;
90
88
  projectId: string;
91
89
  agentId: string;
90
+ createdAt: string;
91
+ updatedAt: string;
92
92
  headersSchema: unknown;
93
93
  contextVariables: Record<string, ContextFetchDefinition> | null;
94
94
  }>;
@@ -66,10 +66,10 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
66
66
  dataComponentId: string;
67
67
  }) => Promise<{
68
68
  id: string;
69
- createdAt: string;
70
69
  tenantId: string;
71
70
  projectId: string;
72
71
  agentId: string;
72
+ createdAt: string;
73
73
  subAgentId: string;
74
74
  dataComponentId: string;
75
75
  }>;
@@ -108,10 +108,10 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
108
108
  dataComponentId: string;
109
109
  }) => Promise<{
110
110
  id: string;
111
- createdAt: string;
112
111
  tenantId: string;
113
112
  projectId: string;
114
113
  agentId: string;
114
+ createdAt: string;
115
115
  subAgentId: string;
116
116
  dataComponentId: string;
117
117
  } | null>;
@@ -55,12 +55,12 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
55
55
  }) => Promise<{
56
56
  id: string;
57
57
  name: string;
58
- createdAt: string;
59
- updatedAt: string;
60
58
  description: string | null;
61
59
  tenantId: string;
62
60
  projectId: string;
63
61
  agentId: string;
62
+ createdAt: string;
63
+ updatedAt: string;
64
64
  functionId: string;
65
65
  }>;
66
66
  /**
@@ -97,12 +97,12 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
97
97
  }) => Promise<{
98
98
  id: string;
99
99
  name: string;
100
- createdAt: string;
101
- updatedAt: string;
102
100
  description: string | null;
103
101
  tenantId: string;
104
102
  projectId: string;
105
103
  agentId: string;
104
+ createdAt: string;
105
+ updatedAt: string;
106
106
  functionId: string;
107
107
  }>;
108
108
  declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -162,16 +162,16 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
162
162
  }> | null;
163
163
  }) => Promise<{
164
164
  id: string;
165
- createdAt: string;
166
- updatedAt: string;
167
165
  tenantId: string;
168
166
  projectId: string;
169
167
  agentId: string;
170
- subAgentId: string;
171
- functionToolId: string;
168
+ createdAt: string;
169
+ updatedAt: string;
172
170
  toolPolicies: Record<string, {
173
171
  needsApproval?: boolean;
174
172
  }> | null;
173
+ subAgentId: string;
174
+ functionToolId: string;
175
175
  }>;
176
176
  /**
177
177
  * Update an agent-function tool relation
@@ -227,16 +227,16 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
227
227
  }> | null;
228
228
  }) => Promise<{
229
229
  id: string;
230
- createdAt: string;
231
- updatedAt: string;
232
230
  tenantId: string;
233
231
  projectId: string;
234
232
  agentId: string;
235
- subAgentId: string;
236
- functionToolId: string;
233
+ createdAt: string;
234
+ updatedAt: string;
237
235
  toolPolicies: Record<string, {
238
236
  needsApproval?: boolean;
239
237
  }> | null;
238
+ subAgentId: string;
239
+ functionToolId: string;
240
240
  }>;
241
241
  //#endregion
242
242
  export { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation };
@@ -10,12 +10,12 @@ declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
10
10
  }) => Promise<{
11
11
  id: string;
12
12
  name: string;
13
- createdAt: string;
14
- updatedAt: string;
15
- metadata: Record<string, string> | null;
16
13
  description: string;
17
14
  tenantId: string;
18
15
  projectId: string;
16
+ createdAt: string;
17
+ updatedAt: string;
18
+ metadata: Record<string, string> | null;
19
19
  content: string;
20
20
  } | null>;
21
21
  declare const listSkills: (db: AgentsManageDatabaseClient) => (params: {
@@ -43,23 +43,23 @@ declare const listSkills: (db: AgentsManageDatabaseClient) => (params: {
43
43
  declare const createSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
44
44
  id: string;
45
45
  name: string;
46
- createdAt: string;
47
- updatedAt: string;
48
- metadata: Record<string, string> | null;
49
46
  description: string;
50
47
  tenantId: string;
51
48
  projectId: string;
49
+ createdAt: string;
50
+ updatedAt: string;
51
+ metadata: Record<string, string> | null;
52
52
  content: string;
53
53
  }>;
54
54
  declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
55
55
  id: string;
56
56
  name: string;
57
- createdAt: string;
58
- updatedAt: string;
59
- metadata: Record<string, string> | null;
60
57
  description: string;
61
58
  tenantId: string;
62
59
  projectId: string;
60
+ createdAt: string;
61
+ updatedAt: string;
62
+ metadata: Record<string, string> | null;
63
63
  content: string;
64
64
  }>;
65
65
  declare const updateSkill: (db: AgentsManageDatabaseClient) => (params: {
@@ -92,15 +92,15 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
92
92
  alwaysLoaded?: boolean;
93
93
  }) => Promise<{
94
94
  id: string;
95
- createdAt: string;
96
- updatedAt: string;
97
95
  tenantId: string;
98
96
  projectId: string;
99
97
  agentId: string;
100
- subAgentId: string;
101
- skillId: string;
98
+ createdAt: string;
99
+ updatedAt: string;
102
100
  index: number;
103
101
  alwaysLoaded: boolean;
102
+ skillId: string;
103
+ subAgentId: string;
104
104
  }>;
105
105
  declare const deleteSubAgentSkill: (db: AgentsManageDatabaseClient) => (params: {
106
106
  scopes: AgentScopeConfig;
@@ -10,14 +10,14 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
10
10
  relationId: string;
11
11
  }) => Promise<{
12
12
  id: string;
13
- createdAt: string;
14
- updatedAt: string;
15
13
  tenantId: string;
16
14
  projectId: string;
17
15
  agentId: string;
18
- subAgentId: string;
16
+ createdAt: string;
17
+ updatedAt: string;
19
18
  headers: Record<string, string> | null;
20
19
  externalAgentId: string;
20
+ subAgentId: string;
21
21
  } | undefined>;
22
22
  declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
23
23
  scopes: SubAgentScopeConfig;
@@ -45,27 +45,27 @@ declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient
45
45
  scopes: SubAgentScopeConfig;
46
46
  }) => Promise<{
47
47
  id: string;
48
- createdAt: string;
49
- updatedAt: string;
50
48
  tenantId: string;
51
49
  projectId: string;
52
50
  agentId: string;
53
- subAgentId: string;
51
+ createdAt: string;
52
+ updatedAt: string;
54
53
  headers: Record<string, string> | null;
55
54
  externalAgentId: string;
55
+ subAgentId: string;
56
56
  }[]>;
57
57
  declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
58
58
  scopes: AgentScopeConfig;
59
59
  }) => Promise<{
60
60
  id: string;
61
- createdAt: string;
62
- updatedAt: string;
63
61
  tenantId: string;
64
62
  projectId: string;
65
63
  agentId: string;
66
- subAgentId: string;
64
+ createdAt: string;
65
+ updatedAt: string;
67
66
  headers: Record<string, string> | null;
68
67
  externalAgentId: string;
68
+ subAgentId: string;
69
69
  }[]>;
70
70
  declare const getSubAgentExternalAgentRelationsByExternalAgent: (db: AgentsManageDatabaseClient) => (params: {
71
71
  scopes: AgentScopeConfig;
@@ -181,14 +181,14 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
181
181
  };
182
182
  }) => Promise<{
183
183
  id: string;
184
- createdAt: string;
185
- updatedAt: string;
186
184
  tenantId: string;
187
185
  projectId: string;
188
186
  agentId: string;
189
- subAgentId: string;
187
+ createdAt: string;
188
+ updatedAt: string;
190
189
  headers: Record<string, string> | null;
191
190
  externalAgentId: string;
191
+ subAgentId: string;
192
192
  }>;
193
193
  /**
194
194
  * Check if sub-agent external agent relation exists by params
@@ -198,14 +198,14 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
198
198
  externalAgentId: string;
199
199
  }) => Promise<{
200
200
  id: string;
201
- createdAt: string;
202
- updatedAt: string;
203
201
  tenantId: string;
204
202
  projectId: string;
205
203
  agentId: string;
206
- subAgentId: string;
204
+ createdAt: string;
205
+ updatedAt: string;
207
206
  headers: Record<string, string> | null;
208
207
  externalAgentId: string;
208
+ subAgentId: string;
209
209
  } | undefined>;
210
210
  /**
211
211
  * Upsert sub-agent external agent relation (create if it doesn't exist, update if it does)
@@ -219,14 +219,14 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
219
219
  };
220
220
  }) => Promise<{
221
221
  id: string;
222
- createdAt: string;
223
- updatedAt: string;
224
222
  tenantId: string;
225
223
  projectId: string;
226
224
  agentId: string;
227
- subAgentId: string;
225
+ createdAt: string;
226
+ updatedAt: string;
228
227
  headers: Record<string, string> | null;
229
228
  externalAgentId: string;
229
+ subAgentId: string;
230
230
  }>;
231
231
  declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
232
232
  scopes: SubAgentScopeConfig;