@inkeep/agents-core 0.79.1 → 0.80.0

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 (38) hide show
  1. package/dist/auth/auth-schema.d.ts +227 -227
  2. package/dist/auth/auth-validation-schemas.d.ts +154 -154
  3. package/dist/auth/auth.js +1 -1
  4. package/dist/auth/permissions.d.ts +9 -9
  5. package/dist/data-access/manage/agents.d.ts +40 -40
  6. package/dist/data-access/manage/artifactComponents.d.ts +8 -8
  7. package/dist/data-access/manage/contextConfigs.d.ts +12 -12
  8. package/dist/data-access/manage/dataComponents.d.ts +2 -2
  9. package/dist/data-access/manage/functionTools.d.ts +10 -10
  10. package/dist/data-access/manage/skills.d.ts +10 -10
  11. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
  12. package/dist/data-access/manage/subAgentRelations.d.ts +24 -24
  13. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  14. package/dist/data-access/manage/subAgents.d.ts +12 -12
  15. package/dist/data-access/manage/tools.d.ts +21 -21
  16. package/dist/data-access/manage/tools.js +33 -8
  17. package/dist/data-access/manage/triggers.d.ts +6 -6
  18. package/dist/data-access/runtime/apiKeys.d.ts +20 -20
  19. package/dist/data-access/runtime/apps.d.ts +19 -19
  20. package/dist/data-access/runtime/conversations.d.ts +24 -24
  21. package/dist/data-access/runtime/evalRuns.d.ts +5 -0
  22. package/dist/data-access/runtime/evalRuns.js +3 -0
  23. package/dist/data-access/runtime/events.d.ts +4 -4
  24. package/dist/data-access/runtime/feedback.d.ts +6 -6
  25. package/dist/data-access/runtime/feedback.js +2 -2
  26. package/dist/data-access/runtime/messages.d.ts +15 -15
  27. package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +2 -2
  28. package/dist/data-access/runtime/tasks.d.ts +3 -3
  29. package/dist/db/manage/manage-schema.d.ts +510 -510
  30. package/dist/db/runtime/runtime-schema.d.ts +458 -458
  31. package/dist/utils/json-schema-walk.d.ts +50 -0
  32. package/dist/utils/json-schema-walk.js +202 -0
  33. package/dist/utils/mcp-client.js +14 -32
  34. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  35. package/dist/validation/schemas/skills.d.ts +19 -19
  36. package/dist/validation/schemas.d.ts +2415 -2414
  37. package/dist/validation/schemas.js +1 -0
  38. package/package.json +5 -1
@@ -5,16 +5,15 @@ import { AppInsert, AppSelect, AppUpdate } from "../../types/entities.js";
5
5
 
6
6
  //#region src/data-access/runtime/apps.d.ts
7
7
  declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promise<{
8
- type: AppType;
9
8
  id: string;
10
- name: string;
9
+ tenantId: string | null;
11
10
  createdAt: string;
12
- updatedAt: string;
11
+ name: string;
12
+ type: AppType;
13
13
  description: string | null;
14
- enabled: boolean;
15
- prompt: string | null;
16
14
  projectId: string | null;
17
- tenantId: string | null;
15
+ updatedAt: string;
16
+ enabled: boolean;
18
17
  config: {
19
18
  type: "web_client";
20
19
  webClient: {
@@ -22,7 +21,7 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
22
21
  publicKeys: {
23
22
  kid: string;
24
23
  publicKey: string;
25
- algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
24
+ algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
26
25
  addedAt: string;
27
26
  }[];
28
27
  allowAnonymous: boolean;
@@ -45,9 +44,10 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
45
44
  }[] | undefined;
46
45
  };
47
46
  };
48
- lastUsedAt: string | null;
49
- defaultProjectId: string | null;
47
+ prompt: string | null;
50
48
  defaultAgentId: string | null;
49
+ defaultProjectId: string | null;
50
+ lastUsedAt: string | null;
51
51
  } | undefined>;
52
52
  declare const updateAppLastUsed: (db: AgentsRunDatabaseClient) => (id: string) => Promise<void>;
53
53
  declare const getAppByIdForTenant: (db: AgentsRunDatabaseClient) => (params: {
@@ -74,16 +74,15 @@ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
74
74
  };
75
75
  }>;
76
76
  declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
77
- type: AppType;
78
77
  id: string;
79
- name: string;
78
+ tenantId: string | null;
80
79
  createdAt: string;
81
- updatedAt: string;
80
+ name: string;
81
+ type: AppType;
82
82
  description: string | null;
83
- enabled: boolean;
84
- prompt: string | null;
85
83
  projectId: string | null;
86
- tenantId: string | null;
84
+ updatedAt: string;
85
+ enabled: boolean;
87
86
  config: {
88
87
  type: "web_client";
89
88
  webClient: {
@@ -91,7 +90,7 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
91
90
  publicKeys: {
92
91
  kid: string;
93
92
  publicKey: string;
94
- algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
93
+ algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
95
94
  addedAt: string;
96
95
  }[];
97
96
  allowAnonymous: boolean;
@@ -114,9 +113,10 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
114
113
  }[] | undefined;
115
114
  };
116
115
  };
117
- lastUsedAt: string | null;
118
- defaultProjectId: string | null;
116
+ prompt: string | null;
119
117
  defaultAgentId: string | null;
118
+ defaultProjectId: string | null;
119
+ lastUsedAt: string | null;
120
120
  }>;
121
121
  declare const updateAppForTenant: (db: AgentsRunDatabaseClient) => (params: {
122
122
  scopes: TenantScopeConfig;
@@ -174,7 +174,7 @@ declare const updateApp: (db: AgentsRunDatabaseClient) => (params: {
174
174
  publicKeys: {
175
175
  kid: string;
176
176
  publicKey: string;
177
- algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
177
+ algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
178
178
  addedAt: string;
179
179
  }[];
180
180
  allowAnonymous: boolean;
@@ -17,20 +17,20 @@ 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;
20
21
  createdAt: string;
21
- updatedAt: string;
22
+ metadata: ConversationMetadata | null;
23
+ title: string | null;
24
+ properties: Record<string, unknown> | null;
22
25
  ref: {
23
26
  type: "commit" | "tag" | "branch";
24
27
  name: string;
25
28
  hash: string;
26
29
  } | null;
27
- userId: string | null;
28
- metadata: ConversationMetadata | null;
29
- properties: Record<string, unknown> | null;
30
- title: string | null;
31
30
  agentId: string | null;
32
31
  projectId: string;
33
- tenantId: string;
32
+ updatedAt: string;
33
+ userId: string | null;
34
34
  activeSubAgentId: string;
35
35
  lastContextResolution: string | null;
36
36
  userProperties: Record<string, unknown> | null;
@@ -92,20 +92,20 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
92
92
  conversationId: string;
93
93
  }) => Promise<{
94
94
  id: string;
95
+ tenantId: string;
95
96
  createdAt: string;
96
- updatedAt: string;
97
+ metadata: ConversationMetadata | null;
98
+ title: string | null;
99
+ properties: Record<string, unknown> | null;
97
100
  ref: {
98
101
  type: "commit" | "tag" | "branch";
99
102
  name: string;
100
103
  hash: string;
101
104
  } | null;
102
- userId: string | null;
103
- metadata: ConversationMetadata | null;
104
- properties: Record<string, unknown> | null;
105
- title: string | null;
106
105
  agentId: string | null;
107
106
  projectId: string;
108
- tenantId: string;
107
+ updatedAt: string;
108
+ userId: string | null;
109
109
  activeSubAgentId: string;
110
110
  lastContextResolution: string | null;
111
111
  userProperties: Record<string, unknown> | null;
@@ -147,20 +147,20 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
147
147
  properties?: Record<string, unknown> | null | undefined;
148
148
  } | {
149
149
  id: string;
150
+ tenantId: string;
150
151
  createdAt: string;
151
- updatedAt: string;
152
+ metadata: ConversationMetadata | null;
153
+ title: string | null;
154
+ properties: Record<string, unknown> | null;
152
155
  ref: {
153
156
  type: "commit" | "tag" | "branch";
154
157
  name: string;
155
158
  hash: string;
156
159
  } | null;
157
- userId: string | null;
158
- metadata: ConversationMetadata | null;
159
- properties: Record<string, unknown> | null;
160
- title: string | null;
161
160
  agentId: string | null;
162
161
  projectId: string;
163
- tenantId: string;
162
+ updatedAt: string;
163
+ userId: string | null;
164
164
  activeSubAgentId: string;
165
165
  lastContextResolution: string | null;
166
166
  userProperties: Record<string, unknown> | null;
@@ -185,20 +185,20 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
185
185
  conversationId: string;
186
186
  }) => Promise<{
187
187
  id: string;
188
+ tenantId: string;
188
189
  createdAt: string;
189
- updatedAt: string;
190
+ metadata: ConversationMetadata | null;
191
+ title: string | null;
192
+ properties: Record<string, unknown> | null;
190
193
  ref: {
191
194
  type: "commit" | "tag" | "branch";
192
195
  name: string;
193
196
  hash: string;
194
197
  } | null;
195
- userId: string | null;
196
- metadata: ConversationMetadata | null;
197
- properties: Record<string, unknown> | null;
198
- title: string | null;
199
198
  agentId: string | null;
200
199
  projectId: string;
201
- tenantId: string;
200
+ updatedAt: string;
201
+ userId: string | null;
202
202
  activeSubAgentId: string;
203
203
  lastContextResolution: string | null;
204
204
  userProperties: Record<string, unknown> | null;
@@ -94,6 +94,11 @@ declare const listEvaluationResultsByRun: (db: AgentsRunDatabaseClient) => (para
94
94
  interface EvalResultsFilter {
95
95
  evaluatorId?: string;
96
96
  agentId?: string;
97
+ conversationId?: string;
98
+ /** ISO timestamp — only include results whose conversation was created on or after this instant. */
99
+ startDate?: string;
100
+ /** ISO timestamp — only include results whose conversation was created on or before this instant. */
101
+ endDate?: string;
97
102
  }
98
103
  interface EvalResultsPagination {
99
104
  page: number;
@@ -112,6 +112,9 @@ function buildEvalResultsBaseQuery(db, params) {
112
112
  const whereConditions = [projectScopedWhere(evaluationResult, params.scopes), inArray(evaluationResult.evaluationRunId, runIdSubquery)];
113
113
  if (params.filters?.evaluatorId) whereConditions.push(eq(evaluationResult.evaluatorId, params.filters.evaluatorId));
114
114
  if (params.filters?.agentId) whereConditions.push(eq(conversations.agentId, params.filters.agentId));
115
+ if (params.filters?.conversationId) whereConditions.push(eq(evaluationResult.conversationId, params.filters.conversationId));
116
+ if (params.filters?.startDate) whereConditions.push(gte(conversations.createdAt, params.filters.startDate));
117
+ if (params.filters?.endDate) whereConditions.push(lte(conversations.createdAt, params.filters.endDate));
115
118
  return { whereConditions };
116
119
  }
117
120
  const listEvaluationResultsPaginated = (db) => async (params) => {
@@ -7,17 +7,17 @@ import { EventInsert } from "../../types/entities.js";
7
7
  //#region src/data-access/runtime/events.d.ts
8
8
  declare const createEvent: (db: AgentsRunDatabaseClient) => (params: EventInsert) => Promise<{
9
9
  row: {
10
- type: string;
11
10
  id: string;
11
+ tenantId: string;
12
12
  createdAt: string;
13
- updatedAt: string;
14
13
  metadata: Record<string, unknown> | null;
14
+ type: string;
15
15
  properties: Record<string, unknown> | null;
16
16
  agentId: string | null;
17
17
  projectId: string;
18
- tenantId: string;
19
- userProperties: Record<string, unknown> | null;
18
+ updatedAt: string;
20
19
  conversationId: string | null;
20
+ userProperties: Record<string, unknown> | null;
21
21
  messageId: string | null;
22
22
  serverMetadata: {
23
23
  [k: string]: unknown;
@@ -70,12 +70,12 @@ declare const getFeedbackByIds: (db: AgentsRunDatabaseClient) => (params: {
70
70
  agentId: string | null;
71
71
  }[]>;
72
72
  declare const createFeedback: (db: AgentsRunDatabaseClient) => (params: FeedbackInsert) => Promise<{
73
- type: "positive" | "negative";
74
73
  id: string;
74
+ tenantId: string;
75
75
  createdAt: string;
76
- updatedAt: string;
76
+ type: "positive" | "negative";
77
77
  projectId: string;
78
- tenantId: string;
78
+ updatedAt: string;
79
79
  conversationId: string;
80
80
  messageId: string | null;
81
81
  details: string | null;
@@ -100,12 +100,12 @@ declare const deleteFeedback: (db: AgentsRunDatabaseClient) => (params: {
100
100
  scopes: ProjectScopeConfig;
101
101
  feedbackId: string;
102
102
  }) => Promise<{
103
- type: "positive" | "negative";
104
103
  id: string;
104
+ tenantId: string;
105
105
  createdAt: string;
106
- updatedAt: string;
106
+ type: "positive" | "negative";
107
107
  projectId: string;
108
- tenantId: string;
108
+ updatedAt: string;
109
109
  conversationId: string;
110
110
  messageId: string | null;
111
111
  details: string | null;
@@ -31,8 +31,8 @@ const listFeedback = (db) => async (params) => {
31
31
  if (params.conversationId) conditions.push(eq(feedback.conversationId, params.conversationId));
32
32
  if (params.messageId) conditions.push(eq(feedback.messageId, params.messageId));
33
33
  if (params.type) conditions.push(eq(feedback.type, params.type));
34
- if (params.startDate) conditions.push(gte(feedback.createdAt, `${params.startDate}T00:00:00.000Z`));
35
- if (params.endDate) conditions.push(lte(feedback.createdAt, `${params.endDate}T23:59:59.999Z`));
34
+ if (params.startDate) conditions.push(gte(feedback.createdAt, params.startDate));
35
+ if (params.endDate) conditions.push(lte(feedback.createdAt, params.endDate));
36
36
  if (params.agentId) conditions.push(eq(conversations.agentId, params.agentId));
37
37
  const whereClause = and(...conditions);
38
38
  const conversationsJoin = [
@@ -11,16 +11,16 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
11
11
  messageId: string;
12
12
  }) => Promise<{
13
13
  id: string;
14
+ tenantId: string;
14
15
  createdAt: string;
15
- updatedAt: string;
16
16
  metadata: MessageMetadata | null;
17
- role: string;
18
17
  properties: Record<string, unknown> | null;
19
- projectId: string;
20
- tenantId: string;
21
18
  content: MessageContent;
22
- userProperties: Record<string, unknown> | null;
19
+ projectId: string;
20
+ updatedAt: string;
23
21
  conversationId: string;
22
+ userProperties: Record<string, unknown> | null;
23
+ role: string;
24
24
  fromSubAgentId: string | null;
25
25
  toSubAgentId: string | null;
26
26
  fromExternalAgentId: string | null;
@@ -184,16 +184,16 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
184
184
  data: Omit<MessageInsert, "tenantId" | "projectId">;
185
185
  }) => Promise<{
186
186
  id: string;
187
+ tenantId: string;
187
188
  createdAt: string;
188
- updatedAt: string;
189
189
  metadata: MessageMetadata | null;
190
- role: string;
191
190
  properties: Record<string, unknown> | null;
192
- projectId: string;
193
- tenantId: string;
194
191
  content: MessageContent;
195
- userProperties: Record<string, unknown> | null;
192
+ projectId: string;
193
+ updatedAt: string;
196
194
  conversationId: string;
195
+ userProperties: Record<string, unknown> | null;
196
+ role: string;
197
197
  fromSubAgentId: string | null;
198
198
  toSubAgentId: string | null;
199
199
  fromExternalAgentId: string | null;
@@ -241,16 +241,16 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
241
241
  messageId: string;
242
242
  }) => Promise<{
243
243
  id: string;
244
+ tenantId: string;
244
245
  createdAt: string;
245
- updatedAt: string;
246
246
  metadata: MessageMetadata | null;
247
- role: string;
248
247
  properties: Record<string, unknown> | null;
249
- projectId: string;
250
- tenantId: string;
251
248
  content: MessageContent;
252
- userProperties: Record<string, unknown> | null;
249
+ projectId: string;
250
+ updatedAt: string;
253
251
  conversationId: string;
252
+ userProperties: Record<string, unknown> | null;
253
+ role: string;
254
254
  fromSubAgentId: string | null;
255
255
  toSubAgentId: string | null;
256
256
  fromExternalAgentId: string | null;
@@ -15,10 +15,10 @@ declare const createScheduledTriggerUser: (db: AgentsRunDatabaseClient) => (para
15
15
  scheduledTriggerId: string;
16
16
  userId: string;
17
17
  }) => Promise<{
18
- createdAt: string;
19
- userId: string;
20
18
  tenantId: string;
19
+ createdAt: string;
21
20
  scheduledTriggerId: string;
21
+ userId: string;
22
22
  }>;
23
23
  declare const deleteScheduledTriggerUser: (db: AgentsRunDatabaseClient) => (params: {
24
24
  tenantId: string;
@@ -8,19 +8,19 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
8
8
  //#region src/data-access/runtime/tasks.d.ts
9
9
  declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
10
10
  id: string;
11
+ tenantId: string;
11
12
  createdAt: string;
12
- updatedAt: string;
13
+ metadata: TaskMetadataConfig | null;
13
14
  ref: {
14
15
  type: "commit" | "tag" | "branch";
15
16
  name: string;
16
17
  hash: string;
17
18
  } | null;
18
- metadata: TaskMetadataConfig | null;
19
19
  status: string;
20
20
  agentId: string;
21
21
  projectId: string;
22
- tenantId: string;
23
22
  subAgentId: string;
23
+ updatedAt: string;
24
24
  contextId: string;
25
25
  }>;
26
26
  declare const getTask: (db: AgentsRunDatabaseClient) => (params: {