@inkeep/agents-core 0.53.8 → 0.53.10

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 (56) hide show
  1. package/dist/auth/auth-validation-schemas.d.ts +152 -152
  2. package/dist/auth/auth.d.ts +11 -9
  3. package/dist/auth/auth.js +12 -3
  4. package/dist/auth/cleanup.d.ts +12 -0
  5. package/dist/auth/cleanup.js +43 -0
  6. package/dist/auth/init.js +12 -2
  7. package/dist/auth/permissions.d.ts +9 -9
  8. package/dist/client-exports.d.ts +3 -3
  9. package/dist/constants/otel-attributes.d.ts +7 -0
  10. package/dist/constants/otel-attributes.js +10 -3
  11. package/dist/constants/signoz-queries.d.ts +1 -0
  12. package/dist/constants/signoz-queries.js +2 -1
  13. package/dist/data-access/index.d.ts +2 -2
  14. package/dist/data-access/index.js +2 -2
  15. package/dist/data-access/manage/agents.d.ts +26 -26
  16. package/dist/data-access/manage/agents.js +3 -1
  17. package/dist/data-access/manage/artifactComponents.d.ts +10 -10
  18. package/dist/data-access/manage/contextConfigs.d.ts +12 -12
  19. package/dist/data-access/manage/dataComponents.d.ts +4 -4
  20. package/dist/data-access/manage/functionTools.d.ts +14 -14
  21. package/dist/data-access/manage/scheduledTriggers.d.ts +12 -1
  22. package/dist/data-access/manage/scheduledTriggers.js +8 -1
  23. package/dist/data-access/manage/skills.d.ts +13 -13
  24. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
  25. package/dist/data-access/manage/subAgentRelations.d.ts +28 -28
  26. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  27. package/dist/data-access/manage/subAgents.d.ts +18 -18
  28. package/dist/data-access/manage/tools.d.ts +24 -24
  29. package/dist/data-access/manage/tools.js +2 -2
  30. package/dist/data-access/runtime/apiKeys.d.ts +12 -12
  31. package/dist/data-access/runtime/conversations.d.ts +24 -24
  32. package/dist/data-access/runtime/messages.d.ts +9 -9
  33. package/dist/data-access/runtime/tasks.d.ts +6 -6
  34. package/dist/db/manage/manage-schema.d.ts +391 -353
  35. package/dist/db/manage/manage-schema.js +2 -0
  36. package/dist/db/runtime/runtime-schema.d.ts +262 -262
  37. package/dist/dolt/index.d.ts +2 -2
  38. package/dist/dolt/index.js +2 -2
  39. package/dist/dolt/ref-helpers.d.ts +5 -1
  40. package/dist/dolt/ref-helpers.js +20 -1
  41. package/dist/index.d.ts +4 -4
  42. package/dist/index.js +4 -4
  43. package/dist/setup/setup.js +19 -5
  44. package/dist/utils/index.d.ts +2 -2
  45. package/dist/utils/index.js +2 -2
  46. package/dist/utils/third-party-mcp-servers/composio-client.d.ts +8 -10
  47. package/dist/utils/third-party-mcp-servers/composio-client.js +19 -15
  48. package/dist/utils/third-party-mcp-servers/index.d.ts +2 -2
  49. package/dist/utils/third-party-mcp-servers/index.js +2 -2
  50. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  51. package/dist/validation/schemas.d.ts +1871 -1753
  52. package/dist/validation/schemas.js +7 -4
  53. package/drizzle/manage/0011_smooth_whizzer.sql +2 -0
  54. package/drizzle/manage/meta/0011_snapshot.json +3685 -0
  55. package/drizzle/manage/meta/_journal.json +7 -0
  56. package/package.json +3 -3
@@ -11,11 +11,12 @@ declare const getSubAgentById: (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;
17
- projectId: string;
18
15
  tenantId: string;
16
+ projectId: string;
17
+ agentId: string;
18
+ prompt: string | null;
19
+ conversationHistoryConfig: ConversationHistoryConfig | null;
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
- agentId: string;
37
- prompt: string | null;
38
- conversationHistoryConfig: ConversationHistoryConfig | null;
37
+ createdAt: string;
38
+ updatedAt: string;
39
39
  } | undefined>;
40
40
  declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
41
41
  scopes: AgentScopeConfig;
42
42
  }) => Promise<{
43
43
  id: string;
44
44
  name: string;
45
- createdAt: string;
46
- updatedAt: string;
47
45
  description: string | null;
48
- projectId: string;
49
46
  tenantId: string;
47
+ projectId: string;
48
+ agentId: string;
49
+ prompt: string | null;
50
+ conversationHistoryConfig: ConversationHistoryConfig | null;
50
51
  models: {
51
52
  base?: {
52
53
  model?: string | undefined;
@@ -64,9 +65,8 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
64
65
  stopWhen: {
65
66
  stepCountIs?: number | undefined;
66
67
  } | null;
67
- agentId: string;
68
- prompt: string | null;
69
- conversationHistoryConfig: ConversationHistoryConfig | null;
68
+ createdAt: string;
69
+ updatedAt: string;
70
70
  }[]>;
71
71
  declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
72
72
  scopes: AgentScopeConfig;
@@ -111,11 +111,12 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
111
111
  declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
112
112
  id: string;
113
113
  name: string;
114
- createdAt: string;
115
- updatedAt: string;
116
114
  description: string | null;
117
- projectId: string;
118
115
  tenantId: string;
116
+ projectId: string;
117
+ agentId: string;
118
+ prompt: string | null;
119
+ conversationHistoryConfig: ConversationHistoryConfig | null;
119
120
  models: {
120
121
  base?: {
121
122
  model?: string | undefined;
@@ -133,9 +134,8 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
133
134
  stopWhen: {
134
135
  stepCountIs?: number | undefined;
135
136
  } | null;
136
- agentId: string;
137
- prompt: string | null;
138
- conversationHistoryConfig: ConversationHistoryConfig | null;
137
+ createdAt: string;
138
+ updatedAt: string;
139
139
  }>;
140
140
  declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
141
141
  scopes: AgentScopeConfig;
@@ -21,12 +21,12 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
21
21
  }) => Promise<{
22
22
  id: string;
23
23
  name: string;
24
+ description: string | null;
25
+ tenantId: string;
26
+ projectId: string;
24
27
  createdAt: string;
25
28
  updatedAt: string;
26
- description: string | null;
27
29
  headers: Record<string, string> | null;
28
- projectId: string;
29
- tenantId: string;
30
30
  config: {
31
31
  type: "mcp";
32
32
  mcp: ToolMcpConfig;
@@ -79,12 +79,12 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
79
79
  declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
80
80
  id: string;
81
81
  name: string;
82
+ description: string | null;
83
+ tenantId: string;
84
+ projectId: string;
82
85
  createdAt: string;
83
86
  updatedAt: string;
84
- description: string | null;
85
87
  headers: Record<string, string> | null;
86
- projectId: string;
87
- tenantId: string;
88
88
  config: {
89
89
  type: "mcp";
90
90
  mcp: ToolMcpConfig;
@@ -135,17 +135,17 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
135
135
  }> | null;
136
136
  }) => Promise<{
137
137
  id: string;
138
+ tenantId: string;
139
+ projectId: string;
140
+ agentId: string;
138
141
  createdAt: string;
139
142
  updatedAt: string;
140
- headers: Record<string, string> | null;
141
143
  toolId: string;
142
- projectId: string;
143
- tenantId: string;
144
- agentId: string;
145
- subAgentId: string;
144
+ headers: Record<string, string> | null;
146
145
  toolPolicies: Record<string, {
147
146
  needsApproval?: boolean;
148
147
  }> | null;
148
+ subAgentId: string;
149
149
  selectedTools: string[] | null;
150
150
  }>;
151
151
  declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -154,17 +154,17 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
154
154
  toolId: string;
155
155
  }) => Promise<{
156
156
  id: string;
157
+ tenantId: string;
158
+ projectId: string;
159
+ agentId: string;
157
160
  createdAt: string;
158
161
  updatedAt: string;
159
- headers: Record<string, string> | null;
160
162
  toolId: string;
161
- projectId: string;
162
- tenantId: string;
163
- agentId: string;
164
- subAgentId: string;
163
+ headers: Record<string, string> | null;
165
164
  toolPolicies: Record<string, {
166
165
  needsApproval?: boolean;
167
166
  }> | null;
167
+ subAgentId: string;
168
168
  selectedTools: string[] | null;
169
169
  }>;
170
170
  /**
@@ -182,17 +182,17 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
182
182
  relationId?: string;
183
183
  }) => Promise<{
184
184
  id: string;
185
+ tenantId: string;
186
+ projectId: string;
187
+ agentId: string;
185
188
  createdAt: string;
186
189
  updatedAt: string;
187
- headers: Record<string, string> | null;
188
190
  toolId: string;
189
- projectId: string;
190
- tenantId: string;
191
- agentId: string;
192
- subAgentId: string;
191
+ headers: Record<string, string> | null;
193
192
  toolPolicies: Record<string, {
194
193
  needsApproval?: boolean;
195
194
  }> | null;
195
+ subAgentId: string;
196
196
  selectedTools: string[] | null;
197
197
  }>;
198
198
  /**
@@ -203,12 +203,12 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
203
203
  }) => Promise<{
204
204
  id: string;
205
205
  name: string;
206
+ description: string | null;
207
+ tenantId: string;
208
+ projectId: string;
206
209
  createdAt: string;
207
210
  updatedAt: string;
208
- description: string | null;
209
211
  headers: Record<string, string> | null;
210
- projectId: string;
211
- tenantId: string;
212
212
  config: {
213
213
  type: "mcp";
214
214
  mcp: ToolMcpConfig;
@@ -12,7 +12,7 @@ import { getActiveBranch } from "../../dolt/schema-sync.js";
12
12
  import { updateAgentToolRelation } from "./subAgentRelations.js";
13
13
  import { toISODateString } from "../../utils/date.js";
14
14
  import { McpClient } from "../../utils/mcp-client.js";
15
- import { buildComposioMCPUrl } from "../../utils/third-party-mcp-servers/composio-client.js";
15
+ import { configureComposioMCPServer } from "../../utils/third-party-mcp-servers/composio-client.js";
16
16
  import { isThirdPartyMCPServerAuthenticated } from "../../utils/third-party-mcp-servers/third-party-check.js";
17
17
  import "../../utils/index.js";
18
18
  import { cascadeDeleteByTool } from "../runtime/cascade-delete.js";
@@ -118,7 +118,7 @@ const discoverToolsFromServer = async (tool, credentialReference, credentialStor
118
118
  reconnectionOptions: tool.config.mcp.transport?.reconnectionOptions,
119
119
  sessionId: tool.config.mcp.transport?.sessionId
120
120
  };
121
- if (serverConfig.url) serverConfig.url = buildComposioMCPUrl(serverConfig.url.toString(), tool.tenantId, tool.projectId, tool.credentialScope === "user" ? "user" : "project", userId);
121
+ configureComposioMCPServer(serverConfig, tool.tenantId, tool.projectId, tool.credentialScope === "user" ? "user" : "project", userId);
122
122
  if (isGithubWorkAppTool(tool)) serverConfig.headers = {
123
123
  ...serverConfig.headers,
124
124
  "x-inkeep-tool-id": tool.id,
@@ -10,12 +10,12 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
10
10
  }) => Promise<{
11
11
  id: string;
12
12
  name: string | null;
13
+ tenantId: string;
14
+ projectId: string;
15
+ agentId: string;
13
16
  createdAt: string;
14
17
  updatedAt: string;
15
18
  expiresAt: string | null;
16
- projectId: string;
17
- tenantId: string;
18
- agentId: string;
19
19
  publicId: string;
20
20
  keyHash: string;
21
21
  keyPrefix: string;
@@ -24,12 +24,12 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
24
24
  declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
25
25
  id: string;
26
26
  name: string | null;
27
+ tenantId: string;
28
+ projectId: string;
29
+ agentId: string;
27
30
  createdAt: string;
28
31
  updatedAt: string;
29
32
  expiresAt: string | null;
30
- projectId: string;
31
- tenantId: string;
32
- agentId: string;
33
33
  publicId: string;
34
34
  keyHash: string;
35
35
  keyPrefix: string;
@@ -41,12 +41,12 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
41
41
  }) => Promise<{
42
42
  id: string;
43
43
  name: string | null;
44
+ tenantId: string;
45
+ projectId: string;
46
+ agentId: string;
44
47
  createdAt: string;
45
48
  updatedAt: string;
46
49
  expiresAt: string | null;
47
- projectId: string;
48
- tenantId: string;
49
- agentId: string;
50
50
  publicId: string;
51
51
  keyHash: string;
52
52
  keyPrefix: string;
@@ -68,12 +68,12 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
68
68
  declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
69
69
  id: string;
70
70
  name: string | null;
71
+ tenantId: string;
72
+ projectId: string;
73
+ agentId: string;
71
74
  createdAt: string;
72
75
  updatedAt: string;
73
76
  expiresAt: string | null;
74
- projectId: string;
75
- tenantId: string;
76
- agentId: string;
77
77
  publicId: string;
78
78
  keyHash: string;
79
79
  keyPrefix: string;
@@ -17,19 +17,19 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
17
17
  }>;
18
18
  declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
19
19
  id: string;
20
+ tenantId: string;
21
+ projectId: string;
22
+ agentId: string | null;
23
+ title: string | null;
20
24
  createdAt: string;
21
25
  updatedAt: string;
26
+ metadata: ConversationMetadata | null;
27
+ userId: string | null;
22
28
  ref: {
23
29
  type: "tag" | "commit" | "branch";
24
30
  name: string;
25
31
  hash: string;
26
32
  } | null;
27
- userId: string | null;
28
- metadata: ConversationMetadata | null;
29
- projectId: string;
30
- tenantId: string;
31
- title: string | null;
32
- agentId: string | null;
33
33
  activeSubAgentId: string;
34
34
  lastContextResolution: string | null;
35
35
  }>;
@@ -86,19 +86,19 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
86
86
  conversationId: string;
87
87
  }) => Promise<{
88
88
  id: string;
89
+ tenantId: string;
90
+ projectId: string;
91
+ agentId: string | null;
92
+ title: string | null;
89
93
  createdAt: string;
90
94
  updatedAt: string;
95
+ metadata: ConversationMetadata | null;
96
+ userId: string | null;
91
97
  ref: {
92
98
  type: "tag" | "commit" | "branch";
93
99
  name: string;
94
100
  hash: string;
95
101
  } | null;
96
- userId: string | null;
97
- metadata: ConversationMetadata | null;
98
- projectId: string;
99
- tenantId: string;
100
- title: string | null;
101
- agentId: string | null;
102
102
  activeSubAgentId: string;
103
103
  lastContextResolution: string | null;
104
104
  } | undefined>;
@@ -122,19 +122,19 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
122
122
  contextConfigId?: string | undefined;
123
123
  } | {
124
124
  id: string;
125
+ tenantId: string;
126
+ projectId: string;
127
+ agentId: string | null;
128
+ title: string | null;
125
129
  createdAt: string;
126
130
  updatedAt: string;
131
+ metadata: ConversationMetadata | null;
132
+ userId: string | null;
127
133
  ref: {
128
134
  type: "tag" | "commit" | "branch";
129
135
  name: string;
130
136
  hash: string;
131
137
  } | null;
132
- userId: string | null;
133
- metadata: ConversationMetadata | null;
134
- projectId: string;
135
- tenantId: string;
136
- title: string | null;
137
- agentId: string | null;
138
138
  activeSubAgentId: string;
139
139
  lastContextResolution: string | null;
140
140
  }>;
@@ -154,19 +154,19 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
154
154
  conversationId: string;
155
155
  }) => Promise<{
156
156
  id: string;
157
+ tenantId: string;
158
+ projectId: string;
159
+ agentId: string | null;
160
+ title: string | null;
157
161
  createdAt: string;
158
162
  updatedAt: string;
163
+ metadata: ConversationMetadata | null;
164
+ userId: string | null;
159
165
  ref: {
160
166
  type: "tag" | "commit" | "branch";
161
167
  name: string;
162
168
  hash: string;
163
169
  } | null;
164
- userId: string | null;
165
- metadata: ConversationMetadata | null;
166
- projectId: string;
167
- tenantId: string;
168
- title: string | null;
169
- agentId: string | null;
170
170
  activeSubAgentId: string;
171
171
  lastContextResolution: string | null;
172
172
  } | undefined>;
@@ -11,13 +11,13 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
11
11
  messageId: string;
12
12
  }) => Promise<{
13
13
  id: string;
14
+ tenantId: string;
15
+ projectId: string;
14
16
  createdAt: string;
15
17
  updatedAt: string;
16
18
  metadata: MessageMetadata | null;
17
- role: string;
18
- projectId: string;
19
- tenantId: string;
20
19
  content: MessageContent;
20
+ role: string;
21
21
  fromSubAgentId: string | null;
22
22
  toSubAgentId: string | null;
23
23
  fromExternalAgentId: string | null;
@@ -142,13 +142,13 @@ declare const getVisibleMessages: (db: AgentsRunDatabaseClient) => (params: {
142
142
  }[]>;
143
143
  declare const createMessage: (db: AgentsRunDatabaseClient) => (params: MessageInsert) => Promise<{
144
144
  id: string;
145
+ tenantId: string;
146
+ projectId: string;
145
147
  createdAt: string;
146
148
  updatedAt: string;
147
149
  metadata: MessageMetadata | null;
148
- role: string;
149
- projectId: string;
150
- tenantId: string;
151
150
  content: MessageContent;
151
+ role: string;
152
152
  fromSubAgentId: string | null;
153
153
  toSubAgentId: string | null;
154
154
  fromExternalAgentId: string | null;
@@ -195,13 +195,13 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
195
195
  messageId: string;
196
196
  }) => Promise<{
197
197
  id: string;
198
+ tenantId: string;
199
+ projectId: string;
198
200
  createdAt: string;
199
201
  updatedAt: string;
200
202
  metadata: MessageMetadata | null;
201
- role: string;
202
- projectId: string;
203
- tenantId: string;
204
203
  content: MessageContent;
204
+ role: string;
205
205
  fromSubAgentId: string | null;
206
206
  toSubAgentId: string | null;
207
207
  fromExternalAgentId: string | null;
@@ -7,19 +7,19 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
7
7
  //#region src/data-access/runtime/tasks.d.ts
8
8
  declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
9
9
  id: string;
10
+ tenantId: string;
11
+ projectId: string;
12
+ agentId: string;
10
13
  createdAt: string;
11
14
  updatedAt: string;
15
+ metadata: TaskMetadataConfig | null;
16
+ status: string;
17
+ subAgentId: string;
12
18
  ref: {
13
19
  type: "tag" | "commit" | "branch";
14
20
  name: string;
15
21
  hash: string;
16
22
  } | null;
17
- metadata: TaskMetadataConfig | null;
18
- status: string;
19
- projectId: string;
20
- tenantId: string;
21
- agentId: string;
22
- subAgentId: string;
23
23
  contextId: string;
24
24
  }>;
25
25
  declare const getTask: (db: AgentsRunDatabaseClient) => (params: {