@inkeep/agents-core 0.74.2 → 0.74.3

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 +227 -227
  2. package/dist/auth/auth-validation-schemas.d.ts +154 -154
  3. package/dist/client-exports.d.ts +2 -1
  4. package/dist/client-exports.js +2 -1
  5. package/dist/constants/models.d.ts +3 -0
  6. package/dist/constants/models.js +3 -0
  7. package/dist/constants/otel-attributes.d.ts +4 -0
  8. package/dist/constants/otel-attributes.js +4 -0
  9. package/dist/data-access/manage/agents.d.ts +5 -5
  10. package/dist/data-access/manage/skills.d.ts +3 -3
  11. package/dist/data-access/manage/subAgentRelations.d.ts +2 -2
  12. package/dist/data-access/manage/subAgents.d.ts +3 -3
  13. package/dist/data-access/manage/tools.d.ts +3 -3
  14. package/dist/data-access/manage/triggers.d.ts +2 -2
  15. package/dist/data-access/runtime/apiKeys.d.ts +8 -8
  16. package/dist/data-access/runtime/apps.d.ts +9 -9
  17. package/dist/data-access/runtime/conversations.d.ts +12 -12
  18. package/dist/data-access/runtime/events.d.ts +1 -1
  19. package/dist/data-access/runtime/feedback.d.ts +2 -2
  20. package/dist/data-access/runtime/messages.d.ts +21 -21
  21. package/dist/data-access/runtime/tasks.d.ts +2 -2
  22. package/dist/db/manage/manage-schema.d.ts +484 -484
  23. package/dist/db/runtime/runtime-schema.d.ts +451 -451
  24. package/dist/index.d.ts +2 -2
  25. package/dist/index.js +2 -2
  26. package/dist/utils/cache-debug-query.d.ts +43 -0
  27. package/dist/utils/cache-debug-query.js +70 -0
  28. package/dist/utils/cache-debug-walk.d.ts +36 -0
  29. package/dist/utils/cache-debug-walk.js +91 -0
  30. package/dist/utils/cache-state.d.ts +36 -0
  31. package/dist/utils/cache-state.js +33 -0
  32. package/dist/utils/error.d.ts +51 -51
  33. package/dist/utils/index.d.ts +2 -2
  34. package/dist/utils/index.js +2 -2
  35. package/dist/utils/model-factory.d.ts +7 -0
  36. package/dist/utils/model-factory.js +18 -2
  37. package/dist/utils/token-estimator.d.ts +1 -0
  38. package/dist/utils/usage-cost-middleware.d.ts +3 -1
  39. package/dist/utils/usage-cost-middleware.js +70 -12
  40. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  41. package/dist/validation/schemas/skills.d.ts +34 -34
  42. package/dist/validation/schemas.d.ts +1930 -1930
  43. package/package.json +3 -2
@@ -10,10 +10,10 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
10
10
  tenantId: string | null;
11
11
  projectId: string | null;
12
12
  name: string;
13
+ enabled: boolean;
13
14
  id: string;
14
15
  createdAt: string;
15
16
  updatedAt: string;
16
- enabled: boolean;
17
17
  prompt: string | null;
18
18
  config: {
19
19
  type: "web_client";
@@ -22,7 +22,7 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
22
22
  publicKeys: {
23
23
  kid: string;
24
24
  publicKey: string;
25
- algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
25
+ algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
26
26
  addedAt: string;
27
27
  }[];
28
28
  allowAnonymous: boolean;
@@ -45,9 +45,9 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
45
45
  }[] | undefined;
46
46
  };
47
47
  };
48
- lastUsedAt: string | null;
49
- defaultProjectId: 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: {
@@ -79,10 +79,10 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
79
79
  tenantId: string | null;
80
80
  projectId: string | null;
81
81
  name: string;
82
+ enabled: boolean;
82
83
  id: string;
83
84
  createdAt: string;
84
85
  updatedAt: string;
85
- enabled: boolean;
86
86
  prompt: string | null;
87
87
  config: {
88
88
  type: "web_client";
@@ -91,7 +91,7 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
91
91
  publicKeys: {
92
92
  kid: string;
93
93
  publicKey: string;
94
- algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
94
+ algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
95
95
  addedAt: string;
96
96
  }[];
97
97
  allowAnonymous: boolean;
@@ -114,9 +114,9 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
114
114
  }[] | undefined;
115
115
  };
116
116
  };
117
- lastUsedAt: string | null;
118
- defaultProjectId: 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: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
177
+ algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
178
178
  addedAt: string;
179
179
  }[];
180
180
  allowAnonymous: boolean;
@@ -22,17 +22,17 @@ declare const createConversation: (db: AgentsRunDatabaseClient) => (params: Conv
22
22
  agentId: string | null;
23
23
  id: string;
24
24
  createdAt: string;
25
- metadata: ConversationMetadata | null;
26
25
  updatedAt: string;
27
- userId: string | null;
28
26
  ref: {
29
27
  type: "commit" | "tag" | "branch";
30
28
  name: string;
31
29
  hash: string;
32
30
  } | null;
33
- userProperties: Record<string, unknown> | null;
31
+ userId: string | null;
32
+ metadata: ConversationMetadata | null;
34
33
  activeSubAgentId: string;
35
34
  lastContextResolution: string | null;
35
+ userProperties: Record<string, unknown> | null;
36
36
  }>;
37
37
  declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
38
38
  scopes: ProjectScopeConfig;
@@ -97,17 +97,17 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
97
97
  agentId: string | null;
98
98
  id: string;
99
99
  createdAt: string;
100
- metadata: ConversationMetadata | null;
101
100
  updatedAt: string;
102
- userId: string | null;
103
101
  ref: {
104
102
  type: "commit" | "tag" | "branch";
105
103
  name: string;
106
104
  hash: string;
107
105
  } | null;
108
- userProperties: Record<string, unknown> | null;
106
+ userId: string | null;
107
+ metadata: ConversationMetadata | null;
109
108
  activeSubAgentId: string;
110
109
  lastContextResolution: string | null;
110
+ userProperties: Record<string, unknown> | null;
111
111
  } | undefined>;
112
112
  declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input: ConversationInsert) => Promise<{
113
113
  activeSubAgentId: string;
@@ -137,17 +137,17 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
137
137
  agentId: string | null;
138
138
  id: string;
139
139
  createdAt: string;
140
- metadata: ConversationMetadata | null;
141
140
  updatedAt: string;
142
- userId: string | null;
143
141
  ref: {
144
142
  type: "commit" | "tag" | "branch";
145
143
  name: string;
146
144
  hash: string;
147
145
  } | null;
148
- userProperties: Record<string, unknown> | null;
146
+ userId: string | null;
147
+ metadata: ConversationMetadata | null;
149
148
  activeSubAgentId: string;
150
149
  lastContextResolution: string | null;
150
+ userProperties: Record<string, unknown> | null;
151
151
  }>;
152
152
  /**
153
153
  * Get conversation history with filtering and context management
@@ -171,17 +171,17 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
171
171
  agentId: string | null;
172
172
  id: string;
173
173
  createdAt: string;
174
- metadata: ConversationMetadata | null;
175
174
  updatedAt: string;
176
- userId: string | null;
177
175
  ref: {
178
176
  type: "commit" | "tag" | "branch";
179
177
  name: string;
180
178
  hash: string;
181
179
  } | null;
182
- userProperties: Record<string, unknown> | null;
180
+ userId: string | null;
181
+ metadata: ConversationMetadata | null;
183
182
  activeSubAgentId: string;
184
183
  lastContextResolution: string | null;
184
+ userProperties: Record<string, unknown> | null;
185
185
  } | undefined>;
186
186
  /**
187
187
  * Set active agent for a conversation (upsert operation)
@@ -14,8 +14,8 @@ declare const createEvent: (db: AgentsRunDatabaseClient) => (params: EventInsert
14
14
  agentId: string | null;
15
15
  id: string;
16
16
  createdAt: string;
17
- metadata: Record<string, unknown> | null;
18
17
  updatedAt: string;
18
+ metadata: Record<string, unknown> | null;
19
19
  conversationId: string | null;
20
20
  userProperties: Record<string, unknown> | null;
21
21
  messageId: string | null;
@@ -76,9 +76,9 @@ declare const createFeedback: (db: AgentsRunDatabaseClient) => (params: Feedback
76
76
  id: string;
77
77
  createdAt: string;
78
78
  updatedAt: string;
79
- details: string | null;
80
79
  conversationId: string;
81
80
  messageId: string | null;
81
+ details: string | null;
82
82
  }>;
83
83
  declare const createFeedbackBulk: (db: AgentsRunDatabaseClient) => (items: FeedbackInsert[]) => Promise<(typeof feedback.$inferSelect)[]>;
84
84
  declare const updateFeedback: (db: AgentsRunDatabaseClient) => (params: {
@@ -106,9 +106,9 @@ declare const deleteFeedback: (db: AgentsRunDatabaseClient) => (params: {
106
106
  id: string;
107
107
  createdAt: string;
108
108
  updatedAt: string;
109
- details: string | null;
110
109
  conversationId: string;
111
110
  messageId: string | null;
111
+ details: string | null;
112
112
  }>;
113
113
  //#endregion
114
114
  export { createFeedback, createFeedbackBulk, deleteFeedback, getFeedbackById, getFeedbackByIds, listFeedback, listFeedbackByConversation, updateFeedback };
@@ -15,23 +15,23 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
15
15
  projectId: string;
16
16
  id: string;
17
17
  createdAt: string;
18
+ updatedAt: string;
18
19
  metadata: MessageMetadata | null;
20
+ role: string;
19
21
  content: MessageContent;
20
- updatedAt: string;
22
+ conversationId: string;
23
+ taskId: string | null;
24
+ visibility: string;
25
+ userProperties: Record<string, unknown> | null;
21
26
  fromSubAgentId: string | null;
22
27
  toSubAgentId: string | null;
23
28
  fromExternalAgentId: string | null;
24
29
  toExternalAgentId: string | null;
25
- taskId: string | null;
26
- a2aTaskId: string | null;
27
- conversationId: string;
28
- role: string;
29
- userProperties: Record<string, unknown> | null;
30
30
  fromTeamAgentId: string | null;
31
31
  toTeamAgentId: string | null;
32
- visibility: string;
33
32
  messageType: string;
34
33
  parentMessageId: string | null;
34
+ a2aTaskId: string | null;
35
35
  a2aSessionId: string | null;
36
36
  } | undefined>;
37
37
  declare const listMessages: (db: AgentsRunDatabaseClient) => (params: {
@@ -159,23 +159,23 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
159
159
  projectId: string;
160
160
  id: string;
161
161
  createdAt: string;
162
+ updatedAt: string;
162
163
  metadata: MessageMetadata | null;
164
+ role: string;
163
165
  content: MessageContent;
164
- updatedAt: string;
166
+ conversationId: string;
167
+ taskId: string | null;
168
+ visibility: string;
169
+ userProperties: Record<string, unknown> | null;
165
170
  fromSubAgentId: string | null;
166
171
  toSubAgentId: string | null;
167
172
  fromExternalAgentId: string | null;
168
173
  toExternalAgentId: string | null;
169
- taskId: string | null;
170
- a2aTaskId: string | null;
171
- conversationId: string;
172
- role: string;
173
- userProperties: Record<string, unknown> | null;
174
174
  fromTeamAgentId: string | null;
175
175
  toTeamAgentId: string | null;
176
- visibility: string;
177
176
  messageType: string;
178
177
  parentMessageId: string | null;
178
+ a2aTaskId: string | null;
179
179
  a2aSessionId: string | null;
180
180
  }>;
181
181
  declare const updateMessage: (db: AgentsRunDatabaseClient) => (params: {
@@ -216,23 +216,23 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
216
216
  projectId: string;
217
217
  id: string;
218
218
  createdAt: string;
219
+ updatedAt: string;
219
220
  metadata: MessageMetadata | null;
221
+ role: string;
220
222
  content: MessageContent;
221
- updatedAt: string;
223
+ conversationId: string;
224
+ taskId: string | null;
225
+ visibility: string;
226
+ userProperties: Record<string, unknown> | null;
222
227
  fromSubAgentId: string | null;
223
228
  toSubAgentId: string | null;
224
229
  fromExternalAgentId: string | null;
225
230
  toExternalAgentId: string | null;
226
- taskId: string | null;
227
- a2aTaskId: string | null;
228
- conversationId: string;
229
- role: string;
230
- userProperties: Record<string, unknown> | null;
231
231
  fromTeamAgentId: string | null;
232
232
  toTeamAgentId: string | null;
233
- visibility: string;
234
233
  messageType: string;
235
234
  parentMessageId: string | null;
235
+ a2aTaskId: string | null;
236
236
  a2aSessionId: string | null;
237
237
  }>;
238
238
  declare const countMessagesByConversation: (db: AgentsRunDatabaseClient) => (params: {
@@ -11,16 +11,16 @@ declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert)
11
11
  projectId: string;
12
12
  agentId: string;
13
13
  subAgentId: string;
14
- status: string;
15
14
  id: string;
16
15
  createdAt: string;
17
- metadata: TaskMetadataConfig | null;
18
16
  updatedAt: string;
19
17
  ref: {
20
18
  type: "commit" | "tag" | "branch";
21
19
  name: string;
22
20
  hash: string;
23
21
  } | null;
22
+ metadata: TaskMetadataConfig | null;
23
+ status: string;
24
24
  contextId: string;
25
25
  }>;
26
26
  declare const getTask: (db: AgentsRunDatabaseClient) => (params: {