@inkeep/agents-core 0.0.0-dev-20260204075611 → 0.0.0-dev-20260204152302

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 (43) hide show
  1. package/dist/auth/auth-schema.d.ts +82 -82
  2. package/dist/auth/auth-validation-schemas.d.ts +146 -146
  3. package/dist/auth/auth.d.ts +22 -22
  4. package/dist/auth/authz/index.d.ts +2 -2
  5. package/dist/auth/authz/index.js +2 -2
  6. package/dist/auth/authz/permissions.d.ts +16 -1
  7. package/dist/auth/authz/permissions.js +26 -1
  8. package/dist/auth/permissions.d.ts +9 -9
  9. package/dist/client-exports.d.ts +2 -3
  10. package/dist/data-access/index.d.ts +2 -2
  11. package/dist/data-access/index.js +4 -4
  12. package/dist/data-access/manage/agents.d.ts +39 -22
  13. package/dist/data-access/manage/agents.js +33 -2
  14. package/dist/data-access/manage/artifactComponents.d.ts +10 -10
  15. package/dist/data-access/manage/contextConfigs.d.ts +12 -12
  16. package/dist/data-access/manage/dataComponents.d.ts +4 -4
  17. package/dist/data-access/manage/functionTools.d.ts +16 -16
  18. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
  19. package/dist/data-access/manage/subAgentRelations.d.ts +28 -28
  20. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +24 -24
  21. package/dist/data-access/manage/subAgents.d.ts +15 -15
  22. package/dist/data-access/manage/tools.d.ts +33 -33
  23. package/dist/data-access/manage/tools.js +1 -1
  24. package/dist/data-access/manage/triggers.d.ts +2 -2
  25. package/dist/data-access/runtime/apiKeys.d.ts +20 -20
  26. package/dist/data-access/runtime/conversations.d.ts +24 -24
  27. package/dist/data-access/runtime/messages.d.ts +18 -18
  28. package/dist/data-access/runtime/tasks.d.ts +4 -4
  29. package/dist/db/manage/manage-schema.d.ts +306 -306
  30. package/dist/db/runtime/runtime-schema.d.ts +206 -206
  31. package/dist/dolt/branch.js +1 -1
  32. package/dist/dolt/branches-api.js +1 -1
  33. package/dist/dolt/index.js +3 -3
  34. package/dist/dolt/migrate-all-branches.js +1 -1
  35. package/dist/dolt/ref-helpers.js +1 -1
  36. package/dist/dolt/ref-scope.js +1 -1
  37. package/dist/index.d.ts +3 -3
  38. package/dist/index.js +11 -11
  39. package/dist/utils/temp-jwt.d.ts +2 -1
  40. package/dist/utils/temp-jwt.js +3 -2
  41. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  42. package/dist/validation/schemas.d.ts +1587 -1587
  43. package/package.json +1 -1
@@ -1,5 +1,7 @@
1
1
  import { agents, artifactComponents, dataComponents, functionTools, projects, subAgentArtifactComponents, subAgentDataComponents, subAgentFunctionToolRelations, subAgentToolRelations, subAgents, tools } from "../../db/manage/manage-schema.js";
2
+ import { getLogger } from "../../utils/logger.js";
2
3
  import { generateId } from "../../utils/conversations.js";
4
+ import { getProjectMainBranchName } from "./projectLifecycle.js";
3
5
  import { getContextConfigById } from "./contextConfigs.js";
4
6
  import { getExternalAgent } from "./externalAgents.js";
5
7
  import { getFunction } from "./functions.js";
@@ -10,7 +12,7 @@ import { getSubAgentById } from "./subAgents.js";
10
12
  import { getSubAgentTeamAgentRelationsByAgent } from "./subAgentTeamAgentRelations.js";
11
13
  import { listTools } from "./tools.js";
12
14
  import { listTriggers } from "./triggers.js";
13
- import { and, count, desc, eq, inArray } from "drizzle-orm";
15
+ import { and, count, desc, eq, inArray, sql } from "drizzle-orm";
14
16
 
15
17
  //#region src/data-access/manage/agents.ts
16
18
  const getAgentById = (db) => async (params) => {
@@ -43,6 +45,35 @@ const listAgentsPaginated = (db) => async (params) => {
43
45
  }
44
46
  };
45
47
  };
48
+ const agentsLogger = getLogger("agents-data-access");
49
+ /**
50
+ * List agents across multiple project branches for a tenant.
51
+ *
52
+ * Use this when you need to query agents across projects without middleware-provided db.
53
+ *
54
+ * @param db - Database client
55
+ * @param params - Tenant and project IDs
56
+ */
57
+ async function listAgentsAcrossProjectBranches(db, params) {
58
+ const { tenantId, projectIds } = params;
59
+ const allAgents = [];
60
+ for (const projectId of projectIds) try {
61
+ const branchName = getProjectMainBranchName(tenantId, projectId);
62
+ const result = await db.execute(sql`
63
+ SELECT id as "agentId", name as "agentName", project_id as "projectId"
64
+ FROM agent AS OF ${branchName}
65
+ WHERE tenant_id = ${tenantId} AND project_id = ${projectId}
66
+ ORDER BY name
67
+ `);
68
+ allAgents.push(...result.rows);
69
+ } catch (error) {
70
+ agentsLogger.warn({
71
+ error,
72
+ projectId
73
+ }, "Failed to fetch agents for project, skipping");
74
+ }
75
+ return allAgents;
76
+ }
46
77
  const createAgent = (db) => async (data) => {
47
78
  const now = (/* @__PURE__ */ new Date()).toISOString();
48
79
  const insertData = {
@@ -527,4 +558,4 @@ const upsertAgent = (db) => async (params) => {
527
558
  };
528
559
 
529
560
  //#endregion
530
- export { createAgent, deleteAgent, fetchComponentRelationships, getAgentById, getAgentSubAgentInfos, getAgentWithDefaultSubAgent, getFullAgentDefinition, getFullAgentDefinitionWithRelationIds, listAgents, listAgentsPaginated, updateAgent, upsertAgent };
561
+ export { createAgent, deleteAgent, fetchComponentRelationships, getAgentById, getAgentSubAgentInfos, getAgentWithDefaultSubAgent, getFullAgentDefinition, getFullAgentDefinitionWithRelationIds, listAgents, listAgentsAcrossProjectBranches, listAgentsPaginated, updateAgent, upsertAgent };
@@ -7,13 +7,13 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
7
7
  scopes: ProjectScopeConfig;
8
8
  id: string;
9
9
  }) => Promise<{
10
- tenantId: string;
11
- projectId: string;
12
10
  id: string;
13
11
  name: string;
14
- description: string | null;
15
12
  createdAt: string;
16
13
  updatedAt: string;
14
+ description: string | null;
15
+ tenantId: string;
16
+ projectId: string;
17
17
  props: Record<string, unknown> | null;
18
18
  render: {
19
19
  component: string;
@@ -49,13 +49,13 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
49
49
  };
50
50
  }>;
51
51
  declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
52
- tenantId: string;
53
- projectId: string;
54
52
  id: string;
55
53
  name: string;
56
- description: string | null;
57
54
  createdAt: string;
58
55
  updatedAt: string;
56
+ description: string | null;
57
+ tenantId: string;
58
+ projectId: string;
59
59
  props: Record<string, unknown> | null;
60
60
  render: {
61
61
  component: string;
@@ -104,11 +104,11 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
104
104
  scopes: SubAgentScopeConfig;
105
105
  artifactComponentId: string;
106
106
  }) => Promise<{
107
+ id: string;
108
+ createdAt: string;
107
109
  tenantId: string;
108
110
  projectId: string;
109
- id: string;
110
111
  agentId: string;
111
- createdAt: string;
112
112
  subAgentId: string;
113
113
  artifactComponentId: string;
114
114
  }>;
@@ -147,11 +147,11 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
147
147
  scopes: SubAgentScopeConfig;
148
148
  artifactComponentId: string;
149
149
  }) => Promise<{
150
+ id: string;
151
+ createdAt: string;
150
152
  tenantId: string;
151
153
  projectId: string;
152
- id: string;
153
154
  agentId: string;
154
- createdAt: string;
155
155
  subAgentId: string;
156
156
  artifactComponentId: string;
157
157
  } | null>;
@@ -8,26 +8,26 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
8
8
  scopes: AgentScopeConfig;
9
9
  id: string;
10
10
  }) => Promise<{
11
- tenantId: string;
12
- projectId: string;
13
11
  id: string;
14
- agentId: string;
15
12
  createdAt: string;
16
13
  updatedAt: string;
14
+ tenantId: string;
15
+ projectId: string;
17
16
  headersSchema: unknown;
18
17
  contextVariables: Record<string, ContextFetchDefinition> | null;
18
+ agentId: string;
19
19
  } | undefined>;
20
20
  declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
21
21
  scopes: AgentScopeConfig;
22
22
  }) => Promise<{
23
- tenantId: string;
24
- projectId: string;
25
23
  id: string;
26
- agentId: string;
27
24
  createdAt: string;
28
25
  updatedAt: string;
26
+ tenantId: string;
27
+ projectId: string;
29
28
  headersSchema: unknown;
30
29
  contextVariables: Record<string, ContextFetchDefinition> | null;
30
+ agentId: string;
31
31
  }[]>;
32
32
  declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (params: {
33
33
  scopes: AgentScopeConfig;
@@ -42,14 +42,14 @@ declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (
42
42
  };
43
43
  }>;
44
44
  declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params: ContextConfigInsert) => Promise<{
45
- tenantId: string;
46
- projectId: string;
47
45
  id: string;
48
- agentId: string;
49
46
  createdAt: string;
50
47
  updatedAt: string;
48
+ tenantId: string;
49
+ projectId: string;
51
50
  headersSchema: unknown;
52
51
  contextVariables: Record<string, ContextFetchDefinition> | null;
52
+ agentId: string;
53
53
  }>;
54
54
  declare const updateContextConfig: (db: AgentsManageDatabaseClient) => (params: {
55
55
  scopes: AgentScopeConfig;
@@ -82,14 +82,14 @@ declare const countContextConfigs: (db: AgentsManageDatabaseClient) => (params:
82
82
  declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params: {
83
83
  data: ContextConfigInsert;
84
84
  }) => Promise<{
85
- tenantId: string;
86
- projectId: string;
87
85
  id: string;
88
- agentId: string;
89
86
  createdAt: string;
90
87
  updatedAt: string;
88
+ tenantId: string;
89
+ projectId: string;
91
90
  headersSchema: unknown;
92
91
  contextVariables: Record<string, ContextFetchDefinition> | null;
92
+ agentId: string;
93
93
  }>;
94
94
  //#endregion
95
95
  export { countContextConfigs, createContextConfig, deleteContextConfig, getContextConfigById, hasContextConfig, listContextConfigs, listContextConfigsPaginated, updateContextConfig, upsertContextConfig };
@@ -64,11 +64,11 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
64
64
  scopes: SubAgentScopeConfig;
65
65
  dataComponentId: string;
66
66
  }) => Promise<{
67
+ id: string;
68
+ createdAt: string;
67
69
  tenantId: string;
68
70
  projectId: string;
69
- id: string;
70
71
  agentId: string;
71
- createdAt: string;
72
72
  dataComponentId: string;
73
73
  subAgentId: string;
74
74
  }>;
@@ -106,11 +106,11 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
106
106
  scopes: SubAgentScopeConfig;
107
107
  dataComponentId: string;
108
108
  }) => Promise<{
109
+ id: string;
110
+ createdAt: string;
109
111
  tenantId: string;
110
112
  projectId: string;
111
- id: string;
112
113
  agentId: string;
113
- createdAt: string;
114
114
  dataComponentId: string;
115
115
  subAgentId: string;
116
116
  } | null>;
@@ -53,14 +53,14 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
53
53
  data: FunctionToolApiInsert;
54
54
  scopes: AgentScopeConfig;
55
55
  }) => Promise<{
56
- tenantId: string;
57
- projectId: string;
58
56
  id: string;
59
57
  name: string;
60
- description: string | null;
61
- agentId: string;
62
58
  createdAt: string;
63
59
  updatedAt: string;
60
+ description: string | null;
61
+ tenantId: string;
62
+ projectId: string;
63
+ agentId: string;
64
64
  functionId: string;
65
65
  }>;
66
66
  /**
@@ -95,14 +95,14 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
95
95
  data: FunctionToolApiInsert;
96
96
  scopes: AgentScopeConfig;
97
97
  }) => Promise<{
98
- tenantId: string;
99
- projectId: string;
100
98
  id: string;
101
99
  name: string;
102
- description: string | null;
103
- agentId: string;
104
100
  createdAt: string;
105
101
  updatedAt: string;
102
+ description: string | null;
103
+ tenantId: string;
104
+ projectId: string;
105
+ agentId: string;
106
106
  functionId: string;
107
107
  }>;
108
108
  declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -161,16 +161,16 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
161
161
  needsApproval?: boolean;
162
162
  }> | null;
163
163
  }) => Promise<{
164
- tenantId: string;
165
- projectId: string;
166
164
  id: string;
167
- agentId: string;
168
165
  createdAt: string;
169
166
  updatedAt: string;
167
+ tenantId: string;
168
+ projectId: string;
169
+ agentId: string;
170
+ subAgentId: string;
170
171
  toolPolicies: Record<string, {
171
172
  needsApproval?: boolean;
172
173
  }> | null;
173
- subAgentId: string;
174
174
  functionToolId: string;
175
175
  }>;
176
176
  /**
@@ -226,16 +226,16 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
226
226
  needsApproval?: boolean;
227
227
  }> | null;
228
228
  }) => Promise<{
229
- tenantId: string;
230
- projectId: string;
231
229
  id: string;
232
- agentId: string;
233
230
  createdAt: string;
234
231
  updatedAt: string;
232
+ tenantId: string;
233
+ projectId: string;
234
+ agentId: string;
235
+ subAgentId: string;
235
236
  toolPolicies: Record<string, {
236
237
  needsApproval?: boolean;
237
238
  }> | null;
238
- subAgentId: string;
239
239
  functionToolId: string;
240
240
  }>;
241
241
  //#endregion
@@ -8,15 +8,15 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
8
8
  scopes: SubAgentScopeConfig;
9
9
  relationId: string;
10
10
  }) => Promise<{
11
- tenantId: string;
12
- projectId: string;
13
11
  id: string;
14
- agentId: string;
15
12
  createdAt: string;
16
13
  updatedAt: string;
14
+ tenantId: string;
15
+ projectId: string;
16
+ agentId: string;
17
+ subAgentId: string;
17
18
  headers: Record<string, string> | null;
18
19
  externalAgentId: string;
19
- subAgentId: string;
20
20
  } | undefined>;
21
21
  declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
22
22
  scopes: SubAgentScopeConfig;
@@ -43,28 +43,28 @@ declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClien
43
43
  declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
44
44
  scopes: SubAgentScopeConfig;
45
45
  }) => Promise<{
46
- tenantId: string;
47
- projectId: string;
48
46
  id: string;
49
- agentId: string;
50
47
  createdAt: string;
51
48
  updatedAt: string;
49
+ tenantId: string;
50
+ projectId: string;
51
+ agentId: string;
52
+ subAgentId: string;
52
53
  headers: Record<string, string> | null;
53
54
  externalAgentId: string;
54
- subAgentId: string;
55
55
  }[]>;
56
56
  declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
57
57
  scopes: AgentScopeConfig;
58
58
  }) => Promise<{
59
- tenantId: string;
60
- projectId: string;
61
59
  id: string;
62
- agentId: string;
63
60
  createdAt: string;
64
61
  updatedAt: string;
62
+ tenantId: string;
63
+ projectId: string;
64
+ agentId: string;
65
+ subAgentId: string;
65
66
  headers: Record<string, string> | null;
66
67
  externalAgentId: string;
67
- subAgentId: string;
68
68
  }[]>;
69
69
  declare const getSubAgentExternalAgentRelationsByExternalAgent: (db: AgentsManageDatabaseClient) => (params: {
70
70
  scopes: AgentScopeConfig;
@@ -179,15 +179,15 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
179
179
  headers?: Record<string, string> | null;
180
180
  };
181
181
  }) => Promise<{
182
- tenantId: string;
183
- projectId: string;
184
182
  id: string;
185
- agentId: string;
186
183
  createdAt: string;
187
184
  updatedAt: string;
185
+ tenantId: string;
186
+ projectId: string;
187
+ agentId: string;
188
+ subAgentId: string;
188
189
  headers: Record<string, string> | null;
189
190
  externalAgentId: string;
190
- subAgentId: string;
191
191
  }>;
192
192
  /**
193
193
  * Check if sub-agent external agent relation exists by params
@@ -196,15 +196,15 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
196
196
  scopes: SubAgentScopeConfig;
197
197
  externalAgentId: string;
198
198
  }) => Promise<{
199
- tenantId: string;
200
- projectId: string;
201
199
  id: string;
202
- agentId: string;
203
200
  createdAt: string;
204
201
  updatedAt: string;
202
+ tenantId: string;
203
+ projectId: string;
204
+ agentId: string;
205
+ subAgentId: string;
205
206
  headers: Record<string, string> | null;
206
207
  externalAgentId: string;
207
- subAgentId: string;
208
208
  } | undefined>;
209
209
  /**
210
210
  * Upsert sub-agent external agent relation (create if it doesn't exist, update if it does)
@@ -217,15 +217,15 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
217
217
  headers?: Record<string, string> | null;
218
218
  };
219
219
  }) => Promise<{
220
- tenantId: string;
221
- projectId: string;
222
220
  id: string;
223
- agentId: string;
224
221
  createdAt: string;
225
222
  updatedAt: string;
223
+ tenantId: string;
224
+ projectId: string;
225
+ agentId: string;
226
+ subAgentId: string;
226
227
  headers: Record<string, string> | null;
227
228
  externalAgentId: string;
228
- subAgentId: string;
229
229
  }>;
230
230
  declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
231
231
  scopes: SubAgentScopeConfig;
@@ -8,12 +8,12 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
8
8
  scopes: AgentScopeConfig;
9
9
  relationId: string;
10
10
  }) => Promise<{
11
- tenantId: string;
12
- projectId: string;
13
11
  id: string;
14
- agentId: string;
15
12
  createdAt: string;
16
13
  updatedAt: string;
14
+ tenantId: string;
15
+ projectId: string;
16
+ agentId: string;
17
17
  sourceSubAgentId: string;
18
18
  targetSubAgentId: string | null;
19
19
  relationType: string | null;
@@ -43,12 +43,12 @@ declare const listAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
43
43
  declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
44
44
  scopes: SubAgentScopeConfig;
45
45
  }) => Promise<{
46
- tenantId: string;
47
- projectId: string;
48
46
  id: string;
49
- agentId: string;
50
47
  createdAt: string;
51
48
  updatedAt: string;
49
+ tenantId: string;
50
+ projectId: string;
51
+ agentId: string;
52
52
  sourceSubAgentId: string;
53
53
  targetSubAgentId: string | null;
54
54
  relationType: string | null;
@@ -56,12 +56,12 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
56
56
  declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
57
57
  scopes: AgentScopeConfig;
58
58
  }) => Promise<{
59
- tenantId: string;
60
- projectId: string;
61
59
  id: string;
62
- agentId: string;
63
60
  createdAt: string;
64
61
  updatedAt: string;
62
+ tenantId: string;
63
+ projectId: string;
64
+ agentId: string;
65
65
  sourceSubAgentId: string;
66
66
  targetSubAgentId: string | null;
67
67
  relationType: string | null;
@@ -125,12 +125,12 @@ declare const getRelatedAgentsForAgent: (db: AgentsManageDatabaseClient) => (par
125
125
  }[];
126
126
  }>;
127
127
  declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
128
- tenantId: string;
129
- projectId: string;
130
128
  id: string;
131
- agentId: string;
132
129
  createdAt: string;
133
130
  updatedAt: string;
131
+ tenantId: string;
132
+ projectId: string;
133
+ agentId: string;
134
134
  sourceSubAgentId: string;
135
135
  targetSubAgentId: string | null;
136
136
  relationType: string | null;
@@ -144,12 +144,12 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
144
144
  targetSubAgentId?: string;
145
145
  relationType: string;
146
146
  }) => Promise<{
147
- tenantId: string;
148
- projectId: string;
149
147
  id: string;
150
- agentId: string;
151
148
  createdAt: string;
152
149
  updatedAt: string;
150
+ tenantId: string;
151
+ projectId: string;
152
+ agentId: string;
153
153
  sourceSubAgentId: string;
154
154
  targetSubAgentId: string | null;
155
155
  relationType: string | null;
@@ -158,12 +158,12 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
158
158
  * Upsert agent relation (create if it doesn't exist, no-op if it does)
159
159
  */
160
160
  declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
161
- tenantId: string;
162
- projectId: string;
163
161
  id: string;
164
- agentId: string;
165
162
  createdAt: string;
166
163
  updatedAt: string;
164
+ tenantId: string;
165
+ projectId: string;
166
+ agentId: string;
167
167
  sourceSubAgentId: string;
168
168
  targetSubAgentId: string | null;
169
169
  relationType: string | null;
@@ -203,19 +203,19 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
203
203
  }> | null;
204
204
  };
205
205
  }) => Promise<{
206
- tenantId: string;
207
- projectId: string;
208
206
  id: string;
209
- agentId: string;
210
207
  createdAt: string;
211
208
  updatedAt: string;
209
+ tenantId: string;
210
+ projectId: string;
211
+ agentId: string;
212
212
  toolId: string;
213
+ subAgentId: string;
213
214
  headers: Record<string, string> | null;
215
+ selectedTools: string[] | null;
214
216
  toolPolicies: Record<string, {
215
217
  needsApproval?: boolean;
216
218
  }> | null;
217
- subAgentId: string;
218
- selectedTools: string[] | null;
219
219
  }>;
220
220
  declare const updateAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: {
221
221
  scopes: AgentScopeConfig;
@@ -247,19 +247,19 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
247
247
  scopes: SubAgentScopeConfig;
248
248
  relationId: string;
249
249
  }) => Promise<{
250
- tenantId: string;
251
- projectId: string;
252
250
  id: string;
253
- agentId: string;
254
251
  createdAt: string;
255
252
  updatedAt: string;
253
+ tenantId: string;
254
+ projectId: string;
255
+ agentId: string;
256
256
  toolId: string;
257
+ subAgentId: string;
257
258
  headers: Record<string, string> | null;
259
+ selectedTools: string[] | null;
258
260
  toolPolicies: Record<string, {
259
261
  needsApproval?: boolean;
260
262
  }> | null;
261
- subAgentId: string;
262
- selectedTools: string[] | null;
263
263
  } | undefined>;
264
264
  declare const getAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
265
265
  scopes: SubAgentScopeConfig;
@@ -8,14 +8,14 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
8
8
  scopes: SubAgentScopeConfig;
9
9
  relationId: string;
10
10
  }) => Promise<{
11
- tenantId: string;
12
- projectId: string;
13
11
  id: string;
14
- agentId: string;
15
12
  createdAt: string;
16
13
  updatedAt: string;
17
- headers: Record<string, string> | null;
14
+ tenantId: string;
15
+ projectId: string;
16
+ agentId: string;
18
17
  subAgentId: string;
18
+ headers: Record<string, string> | null;
19
19
  targetAgentId: string;
20
20
  } | undefined>;
21
21
  declare const listSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
@@ -43,27 +43,27 @@ declare const listSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =
43
43
  declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
44
44
  scopes: SubAgentScopeConfig;
45
45
  }) => Promise<{
46
- tenantId: string;
47
- projectId: string;
48
46
  id: string;
49
- agentId: string;
50
47
  createdAt: string;
51
48
  updatedAt: string;
52
- headers: Record<string, string> | null;
49
+ tenantId: string;
50
+ projectId: string;
51
+ agentId: string;
53
52
  subAgentId: string;
53
+ headers: Record<string, string> | null;
54
54
  targetAgentId: string;
55
55
  }[]>;
56
56
  declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
57
57
  scopes: AgentScopeConfig;
58
58
  }) => Promise<{
59
- tenantId: string;
60
- projectId: string;
61
59
  id: string;
62
- agentId: string;
63
60
  createdAt: string;
64
61
  updatedAt: string;
65
- headers: Record<string, string> | null;
62
+ tenantId: string;
63
+ projectId: string;
64
+ agentId: string;
66
65
  subAgentId: string;
66
+ headers: Record<string, string> | null;
67
67
  targetAgentId: string;
68
68
  }[]>;
69
69
  declare const getSubAgentTeamAgentRelationsByTeamAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -209,14 +209,14 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
209
209
  headers?: Record<string, string> | null;
210
210
  };
211
211
  }) => Promise<{
212
- tenantId: string;
213
- projectId: string;
214
212
  id: string;
215
- agentId: string;
216
213
  createdAt: string;
217
214
  updatedAt: string;
218
- headers: Record<string, string> | null;
215
+ tenantId: string;
216
+ projectId: string;
217
+ agentId: string;
219
218
  subAgentId: string;
219
+ headers: Record<string, string> | null;
220
220
  targetAgentId: string;
221
221
  }>;
222
222
  /**
@@ -226,14 +226,14 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
226
226
  scopes: SubAgentScopeConfig;
227
227
  targetAgentId: string;
228
228
  }) => Promise<{
229
- tenantId: string;
230
- projectId: string;
231
229
  id: string;
232
- agentId: string;
233
230
  createdAt: string;
234
231
  updatedAt: string;
235
- headers: Record<string, string> | null;
232
+ tenantId: string;
233
+ projectId: string;
234
+ agentId: string;
236
235
  subAgentId: string;
236
+ headers: Record<string, string> | null;
237
237
  targetAgentId: string;
238
238
  } | undefined>;
239
239
  /**
@@ -247,14 +247,14 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
247
247
  headers?: Record<string, string> | null;
248
248
  };
249
249
  }) => Promise<{
250
- tenantId: string;
251
- projectId: string;
252
250
  id: string;
253
- agentId: string;
254
251
  createdAt: string;
255
252
  updatedAt: string;
256
- headers: Record<string, string> | null;
253
+ tenantId: string;
254
+ projectId: string;
255
+ agentId: string;
257
256
  subAgentId: string;
257
+ headers: Record<string, string> | null;
258
258
  targetAgentId: string;
259
259
  }>;
260
260
  declare const updateSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient) => (params: {