@inkeep/agents-core 0.0.0-dev-20260325201121 → 0.0.0-dev-20260325203817

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 (42) hide show
  1. package/dist/auth/auth-schema.d.ts +108 -108
  2. package/dist/auth/auth-validation-schemas.d.ts +137 -137
  3. package/dist/auth/auth.d.ts +6 -6
  4. package/dist/auth/permissions.d.ts +13 -13
  5. package/dist/client-exports.d.ts +3 -3
  6. package/dist/client-exports.js +2 -2
  7. package/dist/constants/otel-attributes.d.ts +25 -1
  8. package/dist/constants/otel-attributes.js +25 -1
  9. package/dist/data-access/manage/agents.d.ts +37 -37
  10. package/dist/data-access/manage/artifactComponents.d.ts +10 -10
  11. package/dist/data-access/manage/contextConfigs.d.ts +16 -16
  12. package/dist/data-access/manage/dataComponents.d.ts +4 -4
  13. package/dist/data-access/manage/functionTools.d.ts +12 -12
  14. package/dist/data-access/manage/skills.d.ts +14 -14
  15. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
  16. package/dist/data-access/manage/subAgentRelations.d.ts +18 -18
  17. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  18. package/dist/data-access/manage/subAgents.d.ts +15 -15
  19. package/dist/data-access/manage/tools.d.ts +21 -21
  20. package/dist/data-access/manage/triggers.d.ts +2 -2
  21. package/dist/data-access/runtime/apiKeys.d.ts +16 -16
  22. package/dist/data-access/runtime/apps.d.ts +8 -8
  23. package/dist/data-access/runtime/conversations.d.ts +20 -20
  24. package/dist/data-access/runtime/messages.d.ts +9 -9
  25. package/dist/data-access/runtime/tasks.d.ts +5 -5
  26. package/dist/db/manage/manage-schema.d.ts +453 -453
  27. package/dist/db/runtime/runtime-schema.d.ts +334 -332
  28. package/dist/db/runtime/runtime-schema.js +3 -1
  29. package/dist/index.d.ts +5 -3
  30. package/dist/index.js +4 -2
  31. package/dist/utils/error.d.ts +51 -51
  32. package/dist/utils/index.d.ts +5 -1
  33. package/dist/utils/index.js +3 -1
  34. package/dist/utils/model-factory.js +35 -10
  35. package/dist/utils/token-estimator.d.ts +19 -0
  36. package/dist/utils/token-estimator.js +17 -0
  37. package/dist/utils/usage-cost-middleware.d.ts +13 -0
  38. package/dist/utils/usage-cost-middleware.js +60 -0
  39. package/dist/utils/usage-tracker.d.ts +2 -0
  40. package/dist/utils/usage-tracker.js +1 -0
  41. package/dist/validation/schemas.d.ts +1712 -1712
  42. package/package.json +1 -1
@@ -20,14 +20,14 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
20
20
  scopes: ProjectScopeConfig;
21
21
  toolId: string;
22
22
  }) => Promise<{
23
+ headers: Record<string, string> | null;
24
+ name: string;
23
25
  id: string;
24
26
  createdAt: string;
25
- name: string;
26
27
  updatedAt: string;
27
- projectId: string;
28
- tenantId: string;
29
28
  description: string | null;
30
- headers: Record<string, string> | null;
29
+ tenantId: string;
30
+ projectId: string;
31
31
  config: {
32
32
  type: "mcp";
33
33
  mcp: ToolMcpConfig;
@@ -78,14 +78,14 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
78
78
  };
79
79
  }>;
80
80
  declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
81
+ headers: Record<string, string> | null;
82
+ name: string;
81
83
  id: string;
82
84
  createdAt: string;
83
- name: string;
84
85
  updatedAt: string;
85
- projectId: string;
86
- tenantId: string;
87
86
  description: string | null;
88
- headers: Record<string, string> | null;
87
+ tenantId: string;
88
+ projectId: string;
89
89
  config: {
90
90
  type: "mcp";
91
91
  mcp: ToolMcpConfig;
@@ -135,15 +135,15 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
135
135
  needsApproval?: boolean;
136
136
  }> | null;
137
137
  }) => Promise<{
138
+ headers: Record<string, string> | null;
138
139
  id: string;
139
140
  createdAt: string;
140
141
  updatedAt: string;
141
- agentId: string;
142
- projectId: string;
143
142
  tenantId: string;
143
+ projectId: string;
144
+ agentId: string;
144
145
  subAgentId: string;
145
146
  toolId: string;
146
- headers: Record<string, string> | null;
147
147
  toolPolicies: Record<string, {
148
148
  needsApproval?: boolean;
149
149
  }> | null;
@@ -154,15 +154,15 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
154
154
  subAgentId: string;
155
155
  toolId: string;
156
156
  }) => Promise<{
157
+ headers: Record<string, string> | null;
157
158
  id: string;
158
159
  createdAt: string;
159
160
  updatedAt: string;
160
- agentId: string;
161
- projectId: string;
162
161
  tenantId: string;
162
+ projectId: string;
163
+ agentId: string;
163
164
  subAgentId: string;
164
165
  toolId: string;
165
- headers: Record<string, string> | null;
166
166
  toolPolicies: Record<string, {
167
167
  needsApproval?: boolean;
168
168
  }> | null;
@@ -182,15 +182,15 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
182
182
  }> | null;
183
183
  relationId?: string;
184
184
  }) => Promise<{
185
+ headers: Record<string, string> | null;
185
186
  id: string;
186
187
  createdAt: string;
187
188
  updatedAt: string;
188
- agentId: string;
189
- projectId: string;
190
189
  tenantId: string;
190
+ projectId: string;
191
+ agentId: string;
191
192
  subAgentId: string;
192
193
  toolId: string;
193
- headers: Record<string, string> | null;
194
194
  toolPolicies: Record<string, {
195
195
  needsApproval?: boolean;
196
196
  }> | null;
@@ -202,14 +202,14 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
202
202
  declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
203
203
  data: ToolInsert;
204
204
  }) => Promise<{
205
+ headers: Record<string, string> | null;
206
+ name: string;
205
207
  id: string;
206
208
  createdAt: string;
207
- name: string;
208
209
  updatedAt: string;
209
- projectId: string;
210
- tenantId: string;
211
210
  description: string | null;
212
- headers: Record<string, string> | null;
211
+ tenantId: string;
212
+ projectId: string;
213
213
  config: {
214
214
  type: "mcp";
215
215
  mcp: ToolMcpConfig;
@@ -40,13 +40,13 @@ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params
40
40
  algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
41
41
  encoding: "hex" | "base64";
42
42
  signature: {
43
- source: "query" | "header" | "body";
43
+ source: "body" | "query" | "header";
44
44
  key: string;
45
45
  prefix?: string | undefined;
46
46
  regex?: string | undefined;
47
47
  };
48
48
  signedComponents: {
49
- source: "literal" | "header" | "body";
49
+ source: "body" | "header" | "literal";
50
50
  required: boolean;
51
51
  key?: string | undefined;
52
52
  value?: string | undefined;
@@ -8,28 +8,28 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
8
8
  scopes: ProjectScopeConfig;
9
9
  id: string;
10
10
  }) => Promise<{
11
+ name: string | null;
11
12
  id: string;
12
13
  createdAt: string;
13
- name: string | null;
14
+ expiresAt: string | null;
14
15
  updatedAt: string;
15
- agentId: string;
16
- projectId: string;
17
16
  tenantId: string;
18
- expiresAt: string | null;
17
+ projectId: string;
18
+ agentId: string;
19
19
  publicId: string;
20
20
  keyHash: string;
21
21
  keyPrefix: string;
22
22
  lastUsedAt: string | null;
23
23
  } | undefined>;
24
24
  declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
25
+ name: string | null;
25
26
  id: string;
26
27
  createdAt: string;
27
- name: string | null;
28
+ expiresAt: string | null;
28
29
  updatedAt: string;
29
- agentId: string;
30
- projectId: string;
31
30
  tenantId: string;
32
- expiresAt: string | null;
31
+ projectId: string;
32
+ agentId: string;
33
33
  publicId: string;
34
34
  keyHash: string;
35
35
  keyPrefix: string;
@@ -39,14 +39,14 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
39
39
  scopes: ProjectScopeConfig;
40
40
  agentId?: string;
41
41
  }) => Promise<{
42
+ name: string | null;
42
43
  id: string;
43
44
  createdAt: string;
44
- name: string | null;
45
+ expiresAt: string | null;
45
46
  updatedAt: string;
46
- agentId: string;
47
- projectId: string;
48
47
  tenantId: string;
49
- expiresAt: string | null;
48
+ projectId: string;
49
+ agentId: string;
50
50
  publicId: string;
51
51
  keyHash: string;
52
52
  keyPrefix: string;
@@ -66,14 +66,14 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
66
66
  };
67
67
  }>;
68
68
  declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
69
+ name: string | null;
69
70
  id: string;
70
71
  createdAt: string;
71
- name: string | null;
72
+ expiresAt: string | null;
72
73
  updatedAt: string;
73
- agentId: string;
74
- projectId: string;
75
74
  tenantId: string;
76
- expiresAt: string | null;
75
+ projectId: string;
76
+ agentId: string;
77
77
  publicId: string;
78
78
  keyHash: string;
79
79
  keyPrefix: string;
@@ -5,14 +5,14 @@ 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
+ name: string;
8
10
  id: string;
9
11
  createdAt: string;
10
- name: string;
11
12
  updatedAt: string;
12
- projectId: string | null;
13
- tenantId: string | null;
14
13
  description: string | null;
15
- type: AppType;
14
+ tenantId: string | null;
15
+ projectId: string | null;
16
16
  enabled: boolean;
17
17
  config: {
18
18
  type: "web_client";
@@ -52,14 +52,14 @@ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
52
52
  };
53
53
  }>;
54
54
  declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
55
+ type: AppType;
56
+ name: string;
55
57
  id: string;
56
58
  createdAt: string;
57
- name: string;
58
59
  updatedAt: string;
59
- projectId: string | null;
60
- tenantId: string | null;
61
60
  description: string | null;
62
- type: AppType;
61
+ tenantId: string | null;
62
+ projectId: string | null;
63
63
  enabled: boolean;
64
64
  config: {
65
65
  type: "web_client";
@@ -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
22
  createdAt: string;
21
23
  updatedAt: string;
22
- agentId: string | null;
23
- projectId: string;
24
- tenantId: string;
25
24
  title: string | null;
26
- metadata: ConversationMetadata | null;
25
+ tenantId: string;
26
+ projectId: string;
27
+ agentId: string | null;
27
28
  ref: {
28
29
  type: "commit" | "tag" | "branch";
29
30
  name: string;
30
31
  hash: string;
31
32
  } | null;
32
- userId: 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
91
  createdAt: string;
90
92
  updatedAt: string;
91
- agentId: string | null;
92
- projectId: string;
93
- tenantId: string;
94
93
  title: string | null;
95
- metadata: ConversationMetadata | null;
94
+ tenantId: string;
95
+ projectId: string;
96
+ agentId: string | null;
96
97
  ref: {
97
98
  type: "commit" | "tag" | "branch";
98
99
  name: string;
99
100
  hash: string;
100
101
  } | null;
101
- userId: 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
127
  createdAt: string;
126
128
  updatedAt: string;
127
- agentId: string | null;
128
- projectId: string;
129
- tenantId: string;
130
129
  title: string | null;
131
- metadata: ConversationMetadata | null;
130
+ tenantId: string;
131
+ projectId: string;
132
+ agentId: string | null;
132
133
  ref: {
133
134
  type: "commit" | "tag" | "branch";
134
135
  name: string;
135
136
  hash: string;
136
137
  } | null;
137
- userId: 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
159
  createdAt: string;
158
160
  updatedAt: string;
159
- agentId: string | null;
160
- projectId: string;
161
- tenantId: string;
162
161
  title: string | null;
163
- metadata: ConversationMetadata | null;
162
+ tenantId: string;
163
+ projectId: string;
164
+ agentId: string | null;
164
165
  ref: {
165
166
  type: "commit" | "tag" | "branch";
166
167
  name: string;
167
168
  hash: string;
168
169
  } | null;
169
- userId: string | null;
170
170
  activeSubAgentId: string;
171
171
  lastContextResolution: string | null;
172
172
  } | undefined>;
@@ -10,14 +10,14 @@ 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
16
  createdAt: string;
15
17
  updatedAt: string;
16
- projectId: string;
17
18
  tenantId: string;
18
- metadata: MessageMetadata | null;
19
+ projectId: string;
19
20
  content: MessageContent;
20
- role: string;
21
21
  fromSubAgentId: string | null;
22
22
  toSubAgentId: string | null;
23
23
  fromExternalAgentId: string | null;
@@ -144,14 +144,14 @@ 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
150
  createdAt: string;
149
151
  updatedAt: string;
150
- projectId: string;
151
152
  tenantId: string;
152
- metadata: MessageMetadata | null;
153
+ projectId: string;
153
154
  content: MessageContent;
154
- role: string;
155
155
  fromSubAgentId: string | null;
156
156
  toSubAgentId: string | null;
157
157
  fromExternalAgentId: string | null;
@@ -197,14 +197,14 @@ 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
203
  createdAt: string;
202
204
  updatedAt: string;
203
- projectId: string;
204
205
  tenantId: string;
205
- metadata: MessageMetadata | null;
206
+ projectId: string;
206
207
  content: MessageContent;
207
- role: string;
208
208
  fromSubAgentId: string | null;
209
209
  toSubAgentId: string | null;
210
210
  fromExternalAgentId: string | null;
@@ -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
12
  createdAt: string;
13
+ status: string;
12
14
  updatedAt: string;
13
- agentId: string;
14
- projectId: string;
15
15
  tenantId: string;
16
- metadata: TaskMetadataConfig | null;
16
+ projectId: string;
17
+ agentId: string;
18
+ subAgentId: string;
17
19
  ref: {
18
20
  type: "commit" | "tag" | "branch";
19
21
  name: string;
20
22
  hash: string;
21
23
  } | null;
22
- status: string;
23
- subAgentId: string;
24
24
  contextId: string;
25
25
  }>;
26
26
  declare const getTask: (db: AgentsRunDatabaseClient) => (params: {