@inkeep/agents-core 0.59.0 → 0.59.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/auth/auth-schema.d.ts +86 -86
  2. package/dist/auth/auth-validation-schemas.d.ts +154 -154
  3. package/dist/client-exports.d.ts +2 -2
  4. package/dist/client-exports.js +2 -2
  5. package/dist/constants/{allowed-image-formats.d.ts → allowed-file-formats.d.ts} +4 -3
  6. package/dist/constants/{allowed-image-formats.js → allowed-file-formats.js} +13 -10
  7. package/dist/credential-stores/composio-store.d.ts +28 -0
  8. package/dist/credential-stores/composio-store.js +53 -0
  9. package/dist/credential-stores/default-constants.d.ts +2 -1
  10. package/dist/credential-stores/default-constants.js +2 -1
  11. package/dist/credential-stores/defaults.js +3 -1
  12. package/dist/credential-stores/index.d.ts +3 -2
  13. package/dist/credential-stores/index.js +3 -2
  14. package/dist/data-access/index.d.ts +2 -2
  15. package/dist/data-access/index.js +2 -2
  16. package/dist/data-access/manage/agents.d.ts +30 -30
  17. package/dist/data-access/manage/artifactComponents.d.ts +10 -10
  18. package/dist/data-access/manage/contextConfigs.d.ts +8 -8
  19. package/dist/data-access/manage/dataComponents.d.ts +2 -2
  20. package/dist/data-access/manage/functionTools.d.ts +14 -14
  21. package/dist/data-access/manage/skills.d.ts +19 -19
  22. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
  23. package/dist/data-access/manage/subAgentRelations.d.ts +22 -22
  24. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  25. package/dist/data-access/manage/subAgents.d.ts +18 -18
  26. package/dist/data-access/manage/tools.d.ts +30 -30
  27. package/dist/data-access/manage/tools.js +17 -5
  28. package/dist/data-access/manage/triggers.d.ts +1 -1
  29. package/dist/data-access/runtime/apiKeys.d.ts +16 -16
  30. package/dist/data-access/runtime/apps.d.ts +12 -12
  31. package/dist/data-access/runtime/conversations.d.ts +24 -24
  32. package/dist/data-access/runtime/messages.d.ts +21 -21
  33. package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +10 -1
  34. package/dist/data-access/runtime/scheduledTriggerInvocations.js +13 -1
  35. package/dist/data-access/runtime/tasks.d.ts +6 -6
  36. package/dist/db/manage/manage-schema.d.ts +359 -359
  37. package/dist/db/runtime/runtime-schema.d.ts +298 -298
  38. package/dist/index.d.ts +5 -4
  39. package/dist/index.js +6 -5
  40. package/dist/middleware/no-auth.d.ts +2 -2
  41. package/dist/types/utility.d.ts +1 -0
  42. package/dist/types/utility.js +2 -1
  43. package/dist/utils/credential-store-utils.js +1 -0
  44. package/dist/utils/index.d.ts +2 -2
  45. package/dist/utils/index.js +4 -4
  46. package/dist/utils/third-party-mcp-servers/composio-client.d.ts +20 -4
  47. package/dist/utils/third-party-mcp-servers/composio-client.js +51 -25
  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/utils/third-party-mcp-servers/third-party-check.d.ts +3 -4
  51. package/dist/utils/third-party-mcp-servers/third-party-check.js +1 -2
  52. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  53. package/dist/validation/schemas.d.ts +2037 -2016
  54. package/dist/validation/schemas.js +3 -1
  55. package/package.json +4 -4
@@ -16,20 +16,20 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
16
16
  total: number;
17
17
  }>;
18
18
  declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
19
+ metadata: ConversationMetadata | null;
20
+ userId: string | null;
19
21
  id: string;
20
- tenantId: string;
21
- projectId: string;
22
- agentId: string | null;
23
- title: string | null;
24
22
  createdAt: string;
25
23
  updatedAt: string;
26
- metadata: ConversationMetadata | null;
27
- userId: string | null;
28
24
  ref: {
29
25
  type: "commit" | "tag" | "branch";
30
26
  name: string;
31
27
  hash: string;
32
28
  } | null;
29
+ tenantId: string;
30
+ projectId: string;
31
+ agentId: string | null;
32
+ title: string | null;
33
33
  activeSubAgentId: string;
34
34
  lastContextResolution: string | null;
35
35
  }>;
@@ -85,20 +85,20 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
85
85
  scopes: ProjectScopeConfig;
86
86
  conversationId: string;
87
87
  }) => Promise<{
88
+ metadata: ConversationMetadata | null;
89
+ userId: string | null;
88
90
  id: string;
89
- tenantId: string;
90
- projectId: string;
91
- agentId: string | null;
92
- title: string | null;
93
91
  createdAt: string;
94
92
  updatedAt: string;
95
- metadata: ConversationMetadata | null;
96
- userId: string | null;
97
93
  ref: {
98
94
  type: "commit" | "tag" | "branch";
99
95
  name: string;
100
96
  hash: string;
101
97
  } | null;
98
+ tenantId: string;
99
+ projectId: string;
100
+ agentId: string | null;
101
+ title: string | null;
102
102
  activeSubAgentId: string;
103
103
  lastContextResolution: string | null;
104
104
  } | undefined>;
@@ -121,20 +121,20 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
121
121
  metadata?: ConversationMetadata | null | undefined;
122
122
  contextConfigId?: string | undefined;
123
123
  } | {
124
+ metadata: ConversationMetadata | null;
125
+ userId: string | null;
124
126
  id: string;
125
- tenantId: string;
126
- projectId: string;
127
- agentId: string | null;
128
- title: string | null;
129
127
  createdAt: string;
130
128
  updatedAt: string;
131
- metadata: ConversationMetadata | null;
132
- userId: string | null;
133
129
  ref: {
134
130
  type: "commit" | "tag" | "branch";
135
131
  name: string;
136
132
  hash: string;
137
133
  } | null;
134
+ tenantId: string;
135
+ projectId: string;
136
+ agentId: string | null;
137
+ title: string | null;
138
138
  activeSubAgentId: string;
139
139
  lastContextResolution: string | null;
140
140
  }>;
@@ -153,20 +153,20 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
153
153
  scopes: ProjectScopeConfig;
154
154
  conversationId: string;
155
155
  }) => Promise<{
156
+ metadata: ConversationMetadata | null;
157
+ userId: string | null;
156
158
  id: string;
157
- tenantId: string;
158
- projectId: string;
159
- agentId: string | null;
160
- title: string | null;
161
159
  createdAt: string;
162
160
  updatedAt: string;
163
- metadata: ConversationMetadata | null;
164
- userId: string | null;
165
161
  ref: {
166
162
  type: "commit" | "tag" | "branch";
167
163
  name: string;
168
164
  hash: string;
169
165
  } | null;
166
+ tenantId: string;
167
+ projectId: string;
168
+ agentId: string | null;
169
+ title: string | null;
170
170
  activeSubAgentId: string;
171
171
  lastContextResolution: string | null;
172
172
  } | undefined>;
@@ -10,26 +10,26 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
10
10
  scopes: ProjectScopeConfig;
11
11
  messageId: string;
12
12
  }) => Promise<{
13
+ metadata: MessageMetadata | null;
14
+ role: string;
13
15
  id: string;
14
- tenantId: string;
15
- projectId: string;
16
16
  createdAt: string;
17
17
  updatedAt: string;
18
- metadata: MessageMetadata | null;
18
+ tenantId: string;
19
+ projectId: string;
19
20
  content: MessageContent;
20
- role: string;
21
+ conversationId: string;
21
22
  fromSubAgentId: string | null;
22
23
  toSubAgentId: string | null;
23
24
  fromExternalAgentId: string | null;
24
25
  toExternalAgentId: string | null;
25
- taskId: string | null;
26
- a2aTaskId: string | null;
27
- conversationId: string;
28
26
  fromTeamAgentId: string | null;
29
27
  toTeamAgentId: string | null;
30
28
  visibility: string;
31
29
  messageType: string;
30
+ taskId: string | null;
32
31
  parentMessageId: string | null;
32
+ a2aTaskId: string | null;
33
33
  a2aSessionId: string | null;
34
34
  } | undefined>;
35
35
  declare const listMessages: (db: AgentsRunDatabaseClient) => (params: {
@@ -144,26 +144,26 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
144
144
  scopes: ProjectScopeConfig;
145
145
  data: Omit<MessageInsert, "tenantId" | "projectId">;
146
146
  }) => Promise<{
147
+ metadata: MessageMetadata | null;
148
+ role: string;
147
149
  id: string;
148
- tenantId: string;
149
- projectId: string;
150
150
  createdAt: string;
151
151
  updatedAt: string;
152
- metadata: MessageMetadata | null;
152
+ tenantId: string;
153
+ projectId: string;
153
154
  content: MessageContent;
154
- role: string;
155
+ conversationId: string;
155
156
  fromSubAgentId: string | null;
156
157
  toSubAgentId: string | null;
157
158
  fromExternalAgentId: string | null;
158
159
  toExternalAgentId: string | null;
159
- taskId: string | null;
160
- a2aTaskId: string | null;
161
- conversationId: string;
162
160
  fromTeamAgentId: string | null;
163
161
  toTeamAgentId: string | null;
164
162
  visibility: string;
165
163
  messageType: string;
164
+ taskId: string | null;
166
165
  parentMessageId: string | null;
166
+ a2aTaskId: string | null;
167
167
  a2aSessionId: string | null;
168
168
  }>;
169
169
  declare const updateMessage: (db: AgentsRunDatabaseClient) => (params: {
@@ -197,26 +197,26 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
197
197
  scopes: ProjectScopeConfig;
198
198
  messageId: string;
199
199
  }) => Promise<{
200
+ metadata: MessageMetadata | null;
201
+ role: string;
200
202
  id: string;
201
- tenantId: string;
202
- projectId: string;
203
203
  createdAt: string;
204
204
  updatedAt: string;
205
- metadata: MessageMetadata | null;
205
+ tenantId: string;
206
+ projectId: string;
206
207
  content: MessageContent;
207
- role: string;
208
+ conversationId: string;
208
209
  fromSubAgentId: string | null;
209
210
  toSubAgentId: string | null;
210
211
  fromExternalAgentId: string | null;
211
212
  toExternalAgentId: string | null;
212
- taskId: string | null;
213
- a2aTaskId: string | null;
214
- conversationId: string;
215
213
  fromTeamAgentId: string | null;
216
214
  toTeamAgentId: string | null;
217
215
  visibility: string;
218
216
  messageType: string;
217
+ taskId: string | null;
219
218
  parentMessageId: string | null;
219
+ a2aTaskId: string | null;
220
220
  a2aSessionId: string | null;
221
221
  }>;
222
222
  declare const countMessagesByConversation: (db: AgentsRunDatabaseClient) => (params: {
@@ -116,6 +116,15 @@ declare const markScheduledTriggerInvocationFailed: (db: AgentsRunDatabaseClient
116
116
  scheduledTriggerId: string;
117
117
  invocationId: string;
118
118
  }) => Promise<ScheduledTriggerInvocation | undefined>;
119
+ /**
120
+ * Reset a cancelled invocation back to pending.
121
+ * Only updates if the current status is 'cancelled' to prevent race conditions.
122
+ */
123
+ declare const resetCancelledInvocationToPending: (db: AgentsRunDatabaseClient) => (params: {
124
+ scopes: AgentScopeConfig;
125
+ scheduledTriggerId: string;
126
+ invocationId: string;
127
+ }) => Promise<ScheduledTriggerInvocation | undefined>;
119
128
  /**
120
129
  * Add a conversation ID to the invocation's conversationIds array
121
130
  * Used to track all conversations created during retries
@@ -245,4 +254,4 @@ declare const listProjectScheduledTriggerInvocationsPaginated: (db: AgentsRunDat
245
254
  };
246
255
  }>;
247
256
  //#endregion
248
- export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, updateScheduledTriggerInvocationStatus };
257
+ export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, resetCancelledInvocationToPending, updateScheduledTriggerInvocationStatus };
@@ -98,6 +98,18 @@ const markScheduledTriggerInvocationFailed = (db) => async (params) => {
98
98
  }).where(and(agentScopedWhere(scheduledTriggerInvocations, params.scopes), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), eq(scheduledTriggerInvocations.id, params.invocationId), ne(scheduledTriggerInvocations.status, "cancelled"))).returning())[0];
99
99
  };
100
100
  /**
101
+ * Reset a cancelled invocation back to pending.
102
+ * Only updates if the current status is 'cancelled' to prevent race conditions.
103
+ */
104
+ const resetCancelledInvocationToPending = (db) => async (params) => {
105
+ return (await db.update(scheduledTriggerInvocations).set({
106
+ status: "pending",
107
+ attemptNumber: 1,
108
+ startedAt: null,
109
+ completedAt: null
110
+ }).where(and(agentScopedWhere(scheduledTriggerInvocations, params.scopes), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), eq(scheduledTriggerInvocations.id, params.invocationId), eq(scheduledTriggerInvocations.status, "cancelled"))).returning())[0];
111
+ };
112
+ /**
101
113
  * Add a conversation ID to the invocation's conversationIds array
102
114
  * Used to track all conversations created during retries
103
115
  */
@@ -213,4 +225,4 @@ const listProjectScheduledTriggerInvocationsPaginated = (db) => async (params) =
213
225
  };
214
226
 
215
227
  //#endregion
216
- export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, updateScheduledTriggerInvocationStatus };
228
+ export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, resetCancelledInvocationToPending, updateScheduledTriggerInvocationStatus };
@@ -7,20 +7,20 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
7
7
 
8
8
  //#region src/data-access/runtime/tasks.d.ts
9
9
  declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
10
+ metadata: TaskMetadataConfig | null;
10
11
  id: string;
11
- tenantId: string;
12
- projectId: string;
13
- agentId: string;
14
12
  createdAt: string;
15
- updatedAt: string;
16
- metadata: TaskMetadataConfig | null;
17
13
  status: string;
18
- subAgentId: string;
14
+ updatedAt: string;
19
15
  ref: {
20
16
  type: "commit" | "tag" | "branch";
21
17
  name: string;
22
18
  hash: string;
23
19
  } | null;
20
+ tenantId: string;
21
+ projectId: string;
22
+ agentId: string;
23
+ subAgentId: string;
24
24
  contextId: string;
25
25
  }>;
26
26
  declare const getTask: (db: AgentsRunDatabaseClient) => (params: {