@inkeep/agents-core 0.0.0-dev-20260311141825 → 0.0.0-dev-20260311144908

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.
@@ -4,6 +4,7 @@ import "../../types/index.js";
4
4
  import { CredentialStoreRegistry } from "../../credential-stores/CredentialStoreRegistry.js";
5
5
  import "../../credential-stores/index.js";
6
6
  import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
7
+ import { WithTimestamps } from "../../validation/extend-schemas.js";
7
8
  import "../../index.js";
8
9
  import { McpTool, ToolInsert, ToolSelect, ToolUpdate } from "../../types/entities.js";
9
10
 
@@ -13,19 +14,19 @@ import { McpTool, ToolInsert, ToolSelect, ToolUpdate } from "../../types/entitie
13
14
  * This is a fast path that returns status='unknown' and empty availableTools.
14
15
  * Use this for list views where you want instant page load.
15
16
  */
16
- declare const dbResultToMcpToolSkeleton: (dbResult: ToolSelect, relationshipId?: string) => McpTool;
17
- declare const dbResultToMcpTool: (dbResult: ToolSelect, dbClient: AgentsManageDatabaseClient, credentialStoreRegistry?: CredentialStoreRegistry, relationshipId?: string, userId?: string) => Promise<McpTool>;
17
+ declare const dbResultToMcpToolSkeleton: (dbResult: ToolSelect, relationshipId?: string) => WithTimestamps<McpTool>;
18
+ declare const dbResultToMcpTool: (dbResult: ToolSelect, dbClient: AgentsManageDatabaseClient, credentialStoreRegistry?: CredentialStoreRegistry, relationshipId?: string, userId?: string) => Promise<WithTimestamps<McpTool>>;
18
19
  declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
19
20
  scopes: ProjectScopeConfig;
20
21
  toolId: string;
21
22
  }) => Promise<{
22
23
  id: string;
23
- createdAt: string;
24
24
  name: string;
25
- updatedAt: string;
26
- projectId: string;
27
- tenantId: string;
28
25
  description: string | null;
26
+ tenantId: string;
27
+ projectId: string;
28
+ createdAt: string;
29
+ updatedAt: string;
29
30
  headers: Record<string, string> | null;
30
31
  config: {
31
32
  type: "mcp";
@@ -78,12 +79,12 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
78
79
  }>;
79
80
  declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
80
81
  id: string;
81
- createdAt: string;
82
82
  name: string;
83
- updatedAt: string;
84
- projectId: string;
85
- tenantId: string;
86
83
  description: string | null;
84
+ tenantId: string;
85
+ projectId: string;
86
+ createdAt: string;
87
+ updatedAt: string;
87
88
  headers: Record<string, string> | null;
88
89
  config: {
89
90
  type: "mcp";
@@ -99,7 +100,7 @@ declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInser
99
100
  declare const updateTool: (db: AgentsManageDatabaseClient) => (params: {
100
101
  scopes: ProjectScopeConfig;
101
102
  toolId: string;
102
- data: ToolUpdate;
103
+ data: WithTimestamps<ToolUpdate>;
103
104
  }) => Promise<{
104
105
  createdAt: string;
105
106
  updatedAt: string;
@@ -135,13 +136,13 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
135
136
  }> | null;
136
137
  }) => Promise<{
137
138
  id: string;
139
+ tenantId: string;
140
+ projectId: string;
141
+ agentId: string;
138
142
  createdAt: string;
139
143
  updatedAt: string;
140
- agentId: string;
141
- projectId: string;
142
- tenantId: string;
143
- headers: Record<string, string> | null;
144
144
  toolId: string;
145
+ headers: Record<string, string> | null;
145
146
  toolPolicies: Record<string, {
146
147
  needsApproval?: boolean;
147
148
  }> | null;
@@ -154,13 +155,13 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
154
155
  toolId: string;
155
156
  }) => Promise<{
156
157
  id: string;
158
+ tenantId: string;
159
+ projectId: string;
160
+ agentId: string;
157
161
  createdAt: string;
158
162
  updatedAt: string;
159
- agentId: string;
160
- projectId: string;
161
- tenantId: string;
162
- headers: Record<string, string> | null;
163
163
  toolId: string;
164
+ headers: Record<string, string> | null;
164
165
  toolPolicies: Record<string, {
165
166
  needsApproval?: boolean;
166
167
  }> | null;
@@ -182,13 +183,13 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
182
183
  relationId?: string;
183
184
  }) => Promise<{
184
185
  id: string;
186
+ tenantId: string;
187
+ projectId: string;
188
+ agentId: string;
185
189
  createdAt: string;
186
190
  updatedAt: string;
187
- agentId: string;
188
- projectId: string;
189
- tenantId: string;
190
- headers: Record<string, string> | null;
191
191
  toolId: string;
192
+ headers: Record<string, string> | null;
192
193
  toolPolicies: Record<string, {
193
194
  needsApproval?: boolean;
194
195
  }> | null;
@@ -202,12 +203,12 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
202
203
  data: ToolInsert;
203
204
  }) => Promise<{
204
205
  id: string;
205
- createdAt: string;
206
206
  name: string;
207
- updatedAt: string;
208
- projectId: string;
209
- tenantId: string;
210
207
  description: string | null;
208
+ tenantId: string;
209
+ projectId: string;
210
+ createdAt: string;
211
+ updatedAt: string;
211
212
  headers: Record<string, string> | null;
212
213
  config: {
213
214
  type: "mcp";
@@ -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" | "body" | "header";
43
+ source: "query" | "header" | "body";
44
44
  key: string;
45
45
  prefix?: string | undefined;
46
46
  regex?: string | undefined;
47
47
  };
48
48
  signedComponents: {
49
- source: "literal" | "body" | "header";
49
+ source: "literal" | "header" | "body";
50
50
  required: boolean;
51
51
  key?: string | undefined;
52
52
  value?: string | undefined;
@@ -9,12 +9,12 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
9
9
  id: string;
10
10
  }) => Promise<{
11
11
  id: string;
12
- createdAt: string;
13
12
  name: string | null;
14
- updatedAt: string;
15
- agentId: string;
16
- projectId: string;
17
13
  tenantId: string;
14
+ projectId: string;
15
+ agentId: string;
16
+ createdAt: string;
17
+ updatedAt: string;
18
18
  expiresAt: string | null;
19
19
  publicId: string;
20
20
  keyHash: string;
@@ -23,12 +23,12 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
23
23
  } | undefined>;
24
24
  declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
25
25
  id: string;
26
- createdAt: string;
27
26
  name: string | null;
28
- updatedAt: string;
29
- agentId: string;
30
- projectId: string;
31
27
  tenantId: string;
28
+ projectId: string;
29
+ agentId: string;
30
+ createdAt: string;
31
+ updatedAt: string;
32
32
  expiresAt: string | null;
33
33
  publicId: string;
34
34
  keyHash: string;
@@ -40,12 +40,12 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
40
40
  agentId?: string;
41
41
  }) => Promise<{
42
42
  id: string;
43
- createdAt: string;
44
43
  name: string | null;
45
- updatedAt: string;
46
- agentId: string;
47
- projectId: string;
48
44
  tenantId: string;
45
+ projectId: string;
46
+ agentId: string;
47
+ createdAt: string;
48
+ updatedAt: string;
49
49
  expiresAt: string | null;
50
50
  publicId: string;
51
51
  keyHash: string;
@@ -67,12 +67,12 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
67
67
  }>;
68
68
  declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
69
69
  id: string;
70
- createdAt: string;
71
70
  name: string | null;
72
- updatedAt: string;
73
- agentId: string;
74
- projectId: string;
75
71
  tenantId: string;
72
+ projectId: string;
73
+ agentId: string;
74
+ createdAt: string;
75
+ updatedAt: string;
76
76
  expiresAt: string | null;
77
77
  publicId: string;
78
78
  keyHash: 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
8
  id: string;
10
- createdAt: string;
11
9
  name: string;
12
- updatedAt: string;
13
- projectId: string | null;
14
- tenantId: string | null;
15
10
  description: string | null;
11
+ tenantId: string | null;
12
+ projectId: string | null;
13
+ type: AppType;
14
+ createdAt: string;
15
+ updatedAt: string;
16
16
  enabled: boolean;
17
17
  config: {
18
18
  type: "web_client";
@@ -48,14 +48,14 @@ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
48
48
  };
49
49
  }>;
50
50
  declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
51
- type: AppType;
52
51
  id: string;
53
- createdAt: string;
54
52
  name: string;
55
- updatedAt: string;
56
- projectId: string | null;
57
- tenantId: string | null;
58
53
  description: string | null;
54
+ tenantId: string | null;
55
+ projectId: string | null;
56
+ type: AppType;
57
+ createdAt: string;
58
+ updatedAt: string;
59
59
  enabled: boolean;
60
60
  config: {
61
61
  type: "web_client";
@@ -17,12 +17,12 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
17
17
  }>;
18
18
  declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
19
19
  id: string;
20
- createdAt: string;
21
- updatedAt: string;
22
- agentId: string | null;
23
- projectId: string;
24
20
  tenantId: string;
21
+ projectId: string;
22
+ agentId: string | null;
25
23
  title: string | null;
24
+ createdAt: string;
25
+ updatedAt: string;
26
26
  metadata: ConversationMetadata | null;
27
27
  ref: {
28
28
  type: "commit" | "tag" | "branch";
@@ -86,12 +86,12 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
86
86
  conversationId: string;
87
87
  }) => Promise<{
88
88
  id: string;
89
- createdAt: string;
90
- updatedAt: string;
91
- agentId: string | null;
92
- projectId: string;
93
89
  tenantId: string;
90
+ projectId: string;
91
+ agentId: string | null;
94
92
  title: string | null;
93
+ createdAt: string;
94
+ updatedAt: string;
95
95
  metadata: ConversationMetadata | null;
96
96
  ref: {
97
97
  type: "commit" | "tag" | "branch";
@@ -122,12 +122,12 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
122
122
  contextConfigId?: string | undefined;
123
123
  } | {
124
124
  id: string;
125
- createdAt: string;
126
- updatedAt: string;
127
- agentId: string | null;
128
- projectId: string;
129
125
  tenantId: string;
126
+ projectId: string;
127
+ agentId: string | null;
130
128
  title: string | null;
129
+ createdAt: string;
130
+ updatedAt: string;
131
131
  metadata: ConversationMetadata | null;
132
132
  ref: {
133
133
  type: "commit" | "tag" | "branch";
@@ -154,12 +154,12 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
154
154
  conversationId: string;
155
155
  }) => Promise<{
156
156
  id: string;
157
- createdAt: string;
158
- updatedAt: string;
159
- agentId: string | null;
160
- projectId: string;
161
157
  tenantId: string;
158
+ projectId: string;
159
+ agentId: string | null;
162
160
  title: string | null;
161
+ createdAt: string;
162
+ updatedAt: string;
163
163
  metadata: ConversationMetadata | null;
164
164
  ref: {
165
165
  type: "commit" | "tag" | "branch";
@@ -11,10 +11,10 @@ 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
- projectId: string;
17
- tenantId: string;
18
18
  metadata: MessageMetadata | null;
19
19
  content: MessageContent;
20
20
  role: string;
@@ -142,10 +142,10 @@ 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
- projectId: string;
148
- tenantId: string;
149
149
  metadata: MessageMetadata | null;
150
150
  content: MessageContent;
151
151
  role: string;
@@ -195,10 +195,10 @@ 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
- projectId: string;
201
- tenantId: string;
202
202
  metadata: MessageMetadata | null;
203
203
  content: MessageContent;
204
204
  role: string;
@@ -7,11 +7,11 @@ 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;
12
- agentId: string;
13
- projectId: string;
14
- tenantId: string;
15
15
  metadata: TaskMetadataConfig | null;
16
16
  ref: {
17
17
  type: "commit" | "tag" | "branch";
@@ -814,13 +814,13 @@ declare const triggers: drizzle_orm_pg_core217.PgTableWithColumns<{
814
814
  algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
815
815
  encoding: "hex" | "base64";
816
816
  signature: {
817
- source: "query" | "body" | "header";
817
+ source: "query" | "header" | "body";
818
818
  key: string;
819
819
  prefix?: string | undefined;
820
820
  regex?: string | undefined;
821
821
  };
822
822
  signedComponents: {
823
- source: "literal" | "body" | "header";
823
+ source: "literal" | "header" | "body";
824
824
  required: boolean;
825
825
  key?: string | undefined;
826
826
  value?: string | undefined;
@@ -851,13 +851,13 @@ declare const triggers: drizzle_orm_pg_core217.PgTableWithColumns<{
851
851
  algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
852
852
  encoding: "hex" | "base64";
853
853
  signature: {
854
- source: "query" | "body" | "header";
854
+ source: "query" | "header" | "body";
855
855
  key: string;
856
856
  prefix?: string | undefined;
857
857
  regex?: string | undefined;
858
858
  };
859
859
  signedComponents: {
860
- source: "literal" | "body" | "header";
860
+ source: "literal" | "header" | "body";
861
861
  required: boolean;
862
862
  key?: string | undefined;
863
863
  value?: string | undefined;
@@ -30,5 +30,9 @@ declare const ArtifactComponentExtendSchema: {
30
30
  description: z.ZodOptional<z.ZodString>;
31
31
  }, z.core.$loose>>;
32
32
  };
33
+ type WithTimestamps<T> = T & {
34
+ createdAt?: string;
35
+ updatedAt?: string;
36
+ };
33
37
  //#endregion
34
- export { ArtifactComponentExtendSchema, DataComponentExtendSchema, DescriptionSchema, NameSchema, transformToJson };
38
+ export { ArtifactComponentExtendSchema, DataComponentExtendSchema, DescriptionSchema, NameSchema, WithTimestamps, transformToJson };