@inkeep/agents-core 0.0.0-dev-20260121184116 → 0.0.0-dev-20260121211317

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.
@@ -8,12 +8,12 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
8
8
  scopes: AgentScopeConfig;
9
9
  relationId: string;
10
10
  }) => Promise<{
11
- id: string;
12
11
  tenantId: string;
12
+ projectId: string;
13
+ id: string;
14
+ agentId: string;
13
15
  createdAt: string;
14
16
  updatedAt: string;
15
- agentId: string;
16
- projectId: 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
- id: string;
47
46
  tenantId: string;
47
+ projectId: string;
48
+ id: string;
49
+ agentId: string;
48
50
  createdAt: string;
49
51
  updatedAt: string;
50
- agentId: string;
51
- projectId: 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
- id: string;
60
59
  tenantId: string;
60
+ projectId: string;
61
+ id: string;
62
+ agentId: string;
61
63
  createdAt: string;
62
64
  updatedAt: string;
63
- agentId: string;
64
- projectId: 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
- id: string;
129
128
  tenantId: string;
129
+ projectId: string;
130
+ id: string;
131
+ agentId: string;
130
132
  createdAt: string;
131
133
  updatedAt: string;
132
- agentId: string;
133
- projectId: 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
- id: string;
148
147
  tenantId: string;
148
+ projectId: string;
149
+ id: string;
150
+ agentId: string;
149
151
  createdAt: string;
150
152
  updatedAt: string;
151
- agentId: string;
152
- projectId: 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
- id: string;
162
161
  tenantId: string;
162
+ projectId: string;
163
+ id: string;
164
+ agentId: string;
163
165
  createdAt: string;
164
166
  updatedAt: string;
165
- agentId: string;
166
- projectId: 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
- id: string;
207
206
  tenantId: string;
207
+ projectId: string;
208
+ id: string;
209
+ agentId: string;
208
210
  createdAt: string;
209
211
  updatedAt: string;
210
- subAgentId: string;
211
- agentId: string;
212
- projectId: string;
213
212
  toolId: string;
214
213
  headers: Record<string, string> | null;
215
- selectedTools: string[] | null;
216
214
  toolPolicies: Record<string, {
217
215
  needsApproval?: boolean;
218
216
  }> | 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
- id: string;
251
250
  tenantId: string;
251
+ projectId: string;
252
+ id: string;
253
+ agentId: string;
252
254
  createdAt: string;
253
255
  updatedAt: string;
254
- subAgentId: string;
255
- agentId: string;
256
- projectId: string;
257
256
  toolId: string;
258
257
  headers: Record<string, string> | null;
259
- selectedTools: string[] | null;
260
258
  toolPolicies: Record<string, {
261
259
  needsApproval?: boolean;
262
260
  }> | 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
- id: string;
12
11
  tenantId: string;
12
+ projectId: string;
13
+ id: string;
14
+ agentId: string;
13
15
  createdAt: string;
14
16
  updatedAt: string;
15
- subAgentId: string;
16
- agentId: string;
17
- projectId: string;
18
17
  headers: Record<string, string> | null;
18
+ subAgentId: string;
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
- id: string;
47
46
  tenantId: string;
47
+ projectId: string;
48
+ id: string;
49
+ agentId: string;
48
50
  createdAt: string;
49
51
  updatedAt: string;
50
- subAgentId: string;
51
- agentId: string;
52
- projectId: string;
53
52
  headers: Record<string, string> | null;
53
+ subAgentId: string;
54
54
  targetAgentId: string;
55
55
  }[]>;
56
56
  declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
57
57
  scopes: AgentScopeConfig;
58
58
  }) => Promise<{
59
- id: string;
60
59
  tenantId: string;
60
+ projectId: string;
61
+ id: string;
62
+ agentId: string;
61
63
  createdAt: string;
62
64
  updatedAt: string;
63
- subAgentId: string;
64
- agentId: string;
65
- projectId: string;
66
65
  headers: Record<string, string> | null;
66
+ subAgentId: string;
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
- id: string;
213
212
  tenantId: string;
213
+ projectId: string;
214
+ id: string;
215
+ agentId: string;
214
216
  createdAt: string;
215
217
  updatedAt: string;
216
- subAgentId: string;
217
- agentId: string;
218
- projectId: string;
219
218
  headers: Record<string, string> | null;
219
+ subAgentId: string;
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
- id: string;
230
229
  tenantId: string;
230
+ projectId: string;
231
+ id: string;
232
+ agentId: string;
231
233
  createdAt: string;
232
234
  updatedAt: string;
233
- subAgentId: string;
234
- agentId: string;
235
- projectId: string;
236
235
  headers: Record<string, string> | null;
236
+ subAgentId: string;
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
- id: string;
251
250
  tenantId: string;
251
+ projectId: string;
252
+ id: string;
253
+ agentId: string;
252
254
  createdAt: string;
253
255
  updatedAt: string;
254
- subAgentId: string;
255
- agentId: string;
256
- projectId: string;
257
256
  headers: Record<string, string> | null;
257
+ subAgentId: string;
258
258
  targetAgentId: string;
259
259
  }>;
260
260
  declare const updateSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
@@ -8,14 +8,15 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
8
8
  scopes: AgentScopeConfig;
9
9
  subAgentId: string;
10
10
  }) => Promise<{
11
- id: string;
12
11
  tenantId: string;
13
- createdAt: string;
12
+ projectId: string;
13
+ id: string;
14
14
  name: string;
15
15
  description: string | null;
16
- updatedAt: string;
16
+ prompt: string | null;
17
17
  agentId: string;
18
- projectId: string;
18
+ createdAt: string;
19
+ updatedAt: string;
19
20
  models: {
20
21
  base?: {
21
22
  model?: string | undefined;
@@ -33,20 +34,20 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
33
34
  stopWhen: {
34
35
  stepCountIs?: number | undefined;
35
36
  } | null;
36
- prompt: string | null;
37
37
  conversationHistoryConfig: ConversationHistoryConfig | null;
38
38
  } | undefined>;
39
39
  declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
40
40
  scopes: AgentScopeConfig;
41
41
  }) => Promise<{
42
- id: string;
43
42
  tenantId: string;
44
- createdAt: string;
43
+ projectId: string;
44
+ id: string;
45
45
  name: string;
46
46
  description: string | null;
47
- updatedAt: string;
47
+ prompt: string | null;
48
48
  agentId: string;
49
- projectId: string;
49
+ createdAt: string;
50
+ updatedAt: string;
50
51
  models: {
51
52
  base?: {
52
53
  model?: string | undefined;
@@ -64,7 +65,6 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
64
65
  stopWhen: {
65
66
  stepCountIs?: number | undefined;
66
67
  } | null;
67
- prompt: string | null;
68
68
  conversationHistoryConfig: ConversationHistoryConfig | null;
69
69
  }[]>;
70
70
  declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
@@ -108,14 +108,15 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
108
108
  };
109
109
  }>;
110
110
  declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
111
- id: string;
112
111
  tenantId: string;
113
- createdAt: string;
112
+ projectId: string;
113
+ id: string;
114
114
  name: string;
115
115
  description: string | null;
116
- updatedAt: string;
116
+ prompt: string | null;
117
117
  agentId: string;
118
- projectId: string;
118
+ createdAt: string;
119
+ updatedAt: string;
119
120
  models: {
120
121
  base?: {
121
122
  model?: string | undefined;
@@ -133,7 +134,6 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
133
134
  stopWhen: {
134
135
  stepCountIs?: number | undefined;
135
136
  } | null;
136
- prompt: string | null;
137
137
  conversationHistoryConfig: ConversationHistoryConfig | null;
138
138
  }>;
139
139
  declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -12,20 +12,20 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
12
12
  scopes: ProjectScopeConfig;
13
13
  toolId: string;
14
14
  }) => Promise<{
15
- id: string;
16
15
  tenantId: string;
17
- createdAt: string;
16
+ projectId: string;
17
+ id: string;
18
18
  name: string;
19
19
  description: string | null;
20
- updatedAt: string;
21
- projectId: string;
22
- credentialReferenceId: string | null;
23
20
  config: {
24
21
  type: "mcp";
25
22
  mcp: ToolMcpConfig;
26
23
  };
27
- credentialScope: string;
24
+ credentialReferenceId: string | null;
25
+ createdAt: string;
26
+ updatedAt: string;
28
27
  headers: Record<string, string> | null;
28
+ credentialScope: string;
29
29
  imageUrl: string | null;
30
30
  capabilities: ToolServerCapabilities | null;
31
31
  lastError: string | null;
@@ -68,20 +68,20 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
68
68
  };
69
69
  }>;
70
70
  declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
71
- id: string;
72
71
  tenantId: string;
73
- createdAt: string;
72
+ projectId: string;
73
+ id: string;
74
74
  name: string;
75
75
  description: string | null;
76
- updatedAt: string;
77
- projectId: string;
78
- credentialReferenceId: string | null;
79
76
  config: {
80
77
  type: "mcp";
81
78
  mcp: ToolMcpConfig;
82
79
  };
83
- credentialScope: string;
80
+ credentialReferenceId: string | null;
81
+ createdAt: string;
82
+ updatedAt: string;
84
83
  headers: Record<string, string> | null;
84
+ credentialScope: string;
85
85
  imageUrl: string | null;
86
86
  capabilities: ToolServerCapabilities | null;
87
87
  lastError: string | null;
@@ -123,38 +123,38 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
123
123
  needsApproval?: boolean;
124
124
  }> | null;
125
125
  }) => Promise<{
126
- id: string;
127
126
  tenantId: string;
127
+ projectId: string;
128
+ id: string;
129
+ agentId: string;
128
130
  createdAt: string;
129
131
  updatedAt: string;
130
- subAgentId: string;
131
- agentId: string;
132
- projectId: string;
133
132
  toolId: string;
134
133
  headers: Record<string, string> | null;
135
- selectedTools: string[] | null;
136
134
  toolPolicies: Record<string, {
137
135
  needsApproval?: boolean;
138
136
  }> | null;
137
+ subAgentId: string;
138
+ selectedTools: string[] | null;
139
139
  }>;
140
140
  declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
141
141
  scopes: AgentScopeConfig;
142
142
  subAgentId: string;
143
143
  toolId: string;
144
144
  }) => Promise<{
145
- id: string;
146
145
  tenantId: string;
146
+ projectId: string;
147
+ id: string;
148
+ agentId: string;
147
149
  createdAt: string;
148
150
  updatedAt: string;
149
- subAgentId: string;
150
- agentId: string;
151
- projectId: string;
152
151
  toolId: string;
153
152
  headers: Record<string, string> | null;
154
- selectedTools: string[] | null;
155
153
  toolPolicies: Record<string, {
156
154
  needsApproval?: boolean;
157
155
  }> | null;
156
+ subAgentId: string;
157
+ selectedTools: string[] | null;
158
158
  }>;
159
159
  /**
160
160
  * Upsert agent-tool relation (create if it doesn't exist, update if it does)
@@ -170,19 +170,19 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
170
170
  }> | null;
171
171
  relationId?: string;
172
172
  }) => Promise<{
173
- id: string;
174
173
  tenantId: string;
174
+ projectId: string;
175
+ id: string;
176
+ agentId: string;
175
177
  createdAt: string;
176
178
  updatedAt: string;
177
- subAgentId: string;
178
- agentId: string;
179
- projectId: string;
180
179
  toolId: string;
181
180
  headers: Record<string, string> | null;
182
- selectedTools: string[] | null;
183
181
  toolPolicies: Record<string, {
184
182
  needsApproval?: boolean;
185
183
  }> | null;
184
+ subAgentId: string;
185
+ selectedTools: string[] | null;
186
186
  }>;
187
187
  /**
188
188
  * Upsert a tool (create if it doesn't exist, update if it does)
@@ -190,20 +190,20 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
190
190
  declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
191
191
  data: ToolInsert;
192
192
  }) => Promise<{
193
- id: string;
194
193
  tenantId: string;
195
- createdAt: string;
194
+ projectId: string;
195
+ id: string;
196
196
  name: string;
197
197
  description: string | null;
198
- updatedAt: string;
199
- projectId: string;
200
- credentialReferenceId: string | null;
201
198
  config: {
202
199
  type: "mcp";
203
200
  mcp: ToolMcpConfig;
204
201
  };
205
- credentialScope: string;
202
+ credentialReferenceId: string | null;
203
+ createdAt: string;
204
+ updatedAt: string;
206
205
  headers: Record<string, string> | null;
206
+ credentialScope: string;
207
207
  imageUrl: string | null;
208
208
  capabilities: ToolServerCapabilities | null;
209
209
  lastError: string | null;
@@ -70,24 +70,10 @@ const convertToMCPToolConfig = (tool) => {
70
70
  toolOverrides: tool.config.mcp.toolOverrides
71
71
  };
72
72
  };
73
- const discoverToolsFromServer = async (tool, dbClient, credentialStoreRegistry, userId) => {
73
+ const discoverToolsFromServer = async (tool, credentialReference, credentialStoreRegistry, userId) => {
74
74
  if (tool.config.type !== "mcp") throw new Error(`Cannot discover tools from non-MCP tool: ${tool.id}`);
75
75
  try {
76
76
  let serverConfig;
77
- const credentialReference = tool.credentialReferenceId && tool.credentialScope !== "user" ? await getCredentialReference(dbClient)({
78
- scopes: {
79
- tenantId: tool.tenantId,
80
- projectId: tool.projectId
81
- },
82
- id: tool.credentialReferenceId
83
- }) : userId && tool.credentialScope === "user" ? await getUserScopedCredentialReference(dbClient)({
84
- scopes: {
85
- tenantId: tool.tenantId,
86
- projectId: tool.projectId
87
- },
88
- toolId: tool.id,
89
- userId
90
- }) : void 0;
91
77
  if (credentialReference) {
92
78
  const storeReference = {
93
79
  credentialStoreId: credentialReference.credentialStoreId,
@@ -181,7 +167,7 @@ const dbResultToMcpTool = async (dbResult, dbClient, credentialStoreRegistry, re
181
167
  }
182
168
  const mcpServerUrl = dbResult.config.mcp.server.url;
183
169
  try {
184
- availableTools = await discoverToolsFromServer(dbResult, dbClient, credentialStoreRegistry, userId);
170
+ availableTools = await discoverToolsFromServer(dbResult, credentialReference, credentialStoreRegistry, userId);
185
171
  status = "healthy";
186
172
  lastErrorComputed = null;
187
173
  } catch (error) {
@@ -7,49 +7,49 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
7
7
  scopes: ProjectScopeConfig;
8
8
  id: string;
9
9
  }) => Promise<{
10
- id: string;
11
10
  tenantId: string;
12
- createdAt: string;
11
+ projectId: string;
12
+ id: string;
13
13
  name: string | null;
14
- updatedAt: string;
15
14
  agentId: string;
16
- projectId: string;
17
- expiresAt: string | null;
18
15
  publicId: string;
19
16
  keyHash: string;
20
17
  keyPrefix: string;
21
18
  lastUsedAt: string | null;
19
+ expiresAt: string | null;
20
+ createdAt: string;
21
+ updatedAt: string;
22
22
  } | undefined>;
23
23
  declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
24
- id: string;
25
24
  tenantId: string;
26
- createdAt: string;
25
+ projectId: string;
26
+ id: string;
27
27
  name: string | null;
28
- updatedAt: string;
29
28
  agentId: string;
30
- projectId: string;
31
- expiresAt: string | null;
32
29
  publicId: string;
33
30
  keyHash: string;
34
31
  keyPrefix: string;
35
32
  lastUsedAt: string | null;
33
+ expiresAt: string | null;
34
+ createdAt: string;
35
+ updatedAt: string;
36
36
  } | undefined>;
37
37
  declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
38
38
  scopes: ProjectScopeConfig;
39
39
  agentId?: string;
40
40
  }) => Promise<{
41
- id: string;
42
41
  tenantId: string;
43
- createdAt: string;
42
+ projectId: string;
43
+ id: string;
44
44
  name: string | null;
45
- updatedAt: string;
46
45
  agentId: string;
47
- projectId: string;
48
- expiresAt: string | null;
49
46
  publicId: string;
50
47
  keyHash: string;
51
48
  keyPrefix: string;
52
49
  lastUsedAt: string | null;
50
+ expiresAt: string | null;
51
+ createdAt: string;
52
+ updatedAt: string;
53
53
  }[]>;
54
54
  declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
55
55
  scopes: ProjectScopeConfig;
@@ -65,18 +65,18 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
65
65
  };
66
66
  }>;
67
67
  declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
68
- id: string;
69
68
  tenantId: string;
70
- createdAt: string;
69
+ projectId: string;
70
+ id: string;
71
71
  name: string | null;
72
- updatedAt: string;
73
72
  agentId: string;
74
- projectId: string;
75
- expiresAt: string | null;
76
73
  publicId: string;
77
74
  keyHash: string;
78
75
  keyPrefix: string;
79
76
  lastUsedAt: string | null;
77
+ expiresAt: string | null;
78
+ createdAt: string;
79
+ updatedAt: string;
80
80
  }>;
81
81
  declare const updateApiKey: (db: AgentsRunDatabaseClient) => (params: {
82
82
  scopes: ProjectScopeConfig;