@inkeep/agents-core 0.0.0-dev-20260320144657 → 0.0.0-dev-20260320150253
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.
- package/dist/auth/auth-schema.d.ts +108 -108
- package/dist/auth/auth-validation-schemas.d.ts +137 -137
- package/dist/constants/{allowed-image-formats.d.ts → allowed-file-formats.d.ts} +4 -3
- package/dist/constants/{allowed-image-formats.js → allowed-file-formats.js} +13 -10
- package/dist/data-access/runtime/apps.d.ts +2 -2
- package/dist/data-access/runtime/messages.d.ts +9 -9
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +3 -3
- package/dist/db/manage/manage-schema.d.ts +449 -449
- package/dist/db/runtime/runtime-schema.d.ts +330 -330
- package/dist/validation/schemas.d.ts +1336 -1336
- package/package.json +4 -4
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
//#region src/constants/allowed-
|
|
1
|
+
//#region src/constants/allowed-file-formats.d.ts
|
|
2
2
|
declare const ALLOWED_IMAGE_MIME_TYPES: Set<string>;
|
|
3
3
|
declare const DATA_URI_IMAGE_BASE64_REGEX: RegExp;
|
|
4
|
-
declare
|
|
4
|
+
declare const DATA_URI_PDF_BASE64_REGEX: RegExp;
|
|
5
|
+
declare function normalizeMimeType(mimeType: string): string;
|
|
5
6
|
declare function getExtensionFromMimeType(mimeType?: string): string;
|
|
6
7
|
declare function getMimeTypeFromExtension(extension?: string): string;
|
|
7
8
|
//#endregion
|
|
8
|
-
export { ALLOWED_IMAGE_MIME_TYPES, DATA_URI_IMAGE_BASE64_REGEX, getExtensionFromMimeType, getMimeTypeFromExtension,
|
|
9
|
+
export { ALLOWED_IMAGE_MIME_TYPES, DATA_URI_IMAGE_BASE64_REGEX, DATA_URI_PDF_BASE64_REGEX, getExtensionFromMimeType, getMimeTypeFromExtension, normalizeMimeType };
|
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
//#region src/constants/allowed-
|
|
1
|
+
//#region src/constants/allowed-file-formats.ts
|
|
2
2
|
const ALLOWED_IMAGE_MIME_TYPES = new Set([
|
|
3
3
|
"image/png",
|
|
4
4
|
"image/jpeg",
|
|
5
5
|
"image/webp"
|
|
6
6
|
]);
|
|
7
|
-
const
|
|
7
|
+
const FILE_MIME_TYPE_TO_EXTENSION = {
|
|
8
8
|
"image/png": "png",
|
|
9
9
|
"image/jpeg": "jpg",
|
|
10
10
|
"image/jpg": "jpg",
|
|
11
|
-
"image/webp": "webp"
|
|
11
|
+
"image/webp": "webp",
|
|
12
|
+
"application/pdf": "pdf"
|
|
12
13
|
};
|
|
13
|
-
const
|
|
14
|
+
const FILE_EXTENSION_TO_MIME_TYPE = {
|
|
14
15
|
png: "image/png",
|
|
15
16
|
jpg: "image/jpeg",
|
|
16
17
|
jpeg: "image/jpeg",
|
|
17
|
-
webp: "image/webp"
|
|
18
|
+
webp: "image/webp",
|
|
19
|
+
pdf: "application/pdf"
|
|
18
20
|
};
|
|
19
21
|
const dataUriSubtypes = Array.from(ALLOWED_IMAGE_MIME_TYPES).flatMap((mime) => {
|
|
20
22
|
const subtype = mime.replace("image/", "");
|
|
21
23
|
return subtype === "jpeg" ? ["jpeg", "jpg"] : [subtype];
|
|
22
24
|
});
|
|
23
25
|
const DATA_URI_IMAGE_BASE64_REGEX = /* @__PURE__ */ new RegExp(`^data:image/(${dataUriSubtypes.join("|")});base64,`);
|
|
24
|
-
|
|
26
|
+
const DATA_URI_PDF_BASE64_REGEX = /^data:application\/pdf;base64,/;
|
|
27
|
+
function normalizeMimeType(mimeType) {
|
|
25
28
|
return mimeType.split(";")[0]?.trim().toLowerCase() || "";
|
|
26
29
|
}
|
|
27
30
|
function getExtensionFromMimeType(mimeType) {
|
|
28
31
|
if (!mimeType) return "bin";
|
|
29
|
-
const normalizedMimeType =
|
|
30
|
-
return
|
|
32
|
+
const normalizedMimeType = normalizeMimeType(mimeType);
|
|
33
|
+
return FILE_MIME_TYPE_TO_EXTENSION[normalizedMimeType] || normalizedMimeType.split("/")[1] || "bin";
|
|
31
34
|
}
|
|
32
35
|
function getMimeTypeFromExtension(extension) {
|
|
33
36
|
if (!extension) return "application/octet-stream";
|
|
34
|
-
return
|
|
37
|
+
return FILE_EXTENSION_TO_MIME_TYPE[extension.replace(/^\./, "").trim().toLowerCase()] || "application/octet-stream";
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
//#endregion
|
|
38
|
-
export { ALLOWED_IMAGE_MIME_TYPES, DATA_URI_IMAGE_BASE64_REGEX, getExtensionFromMimeType, getMimeTypeFromExtension,
|
|
41
|
+
export { ALLOWED_IMAGE_MIME_TYPES, DATA_URI_IMAGE_BASE64_REGEX, DATA_URI_PDF_BASE64_REGEX, getExtensionFromMimeType, getMimeTypeFromExtension, normalizeMimeType };
|
|
@@ -5,12 +5,12 @@ 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;
|
|
8
9
|
id: string;
|
|
9
10
|
name: string;
|
|
10
11
|
description: string | null;
|
|
11
12
|
tenantId: string | null;
|
|
12
13
|
projectId: string | null;
|
|
13
|
-
type: AppType;
|
|
14
14
|
createdAt: string;
|
|
15
15
|
updatedAt: string;
|
|
16
16
|
enabled: boolean;
|
|
@@ -52,12 +52,12 @@ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
52
52
|
};
|
|
53
53
|
}>;
|
|
54
54
|
declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
|
|
55
|
+
type: AppType;
|
|
55
56
|
id: string;
|
|
56
57
|
name: string;
|
|
57
58
|
description: string | null;
|
|
58
59
|
tenantId: string | null;
|
|
59
60
|
projectId: string | null;
|
|
60
|
-
type: AppType;
|
|
61
61
|
createdAt: string;
|
|
62
62
|
updatedAt: string;
|
|
63
63
|
enabled: boolean;
|
|
@@ -18,18 +18,18 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
18
18
|
metadata: MessageMetadata | null;
|
|
19
19
|
content: MessageContent;
|
|
20
20
|
role: string;
|
|
21
|
-
conversationId: string;
|
|
22
21
|
fromSubAgentId: string | null;
|
|
23
22
|
toSubAgentId: string | null;
|
|
24
23
|
fromExternalAgentId: string | null;
|
|
25
24
|
toExternalAgentId: string | null;
|
|
25
|
+
taskId: string | null;
|
|
26
|
+
a2aTaskId: string | null;
|
|
27
|
+
conversationId: string;
|
|
26
28
|
fromTeamAgentId: string | null;
|
|
27
29
|
toTeamAgentId: string | null;
|
|
28
30
|
visibility: string;
|
|
29
31
|
messageType: string;
|
|
30
|
-
taskId: string | null;
|
|
31
32
|
parentMessageId: string | null;
|
|
32
|
-
a2aTaskId: string | null;
|
|
33
33
|
a2aSessionId: string | null;
|
|
34
34
|
} | undefined>;
|
|
35
35
|
declare const listMessages: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -152,18 +152,18 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
152
152
|
metadata: MessageMetadata | null;
|
|
153
153
|
content: MessageContent;
|
|
154
154
|
role: string;
|
|
155
|
-
conversationId: string;
|
|
156
155
|
fromSubAgentId: string | null;
|
|
157
156
|
toSubAgentId: string | null;
|
|
158
157
|
fromExternalAgentId: string | null;
|
|
159
158
|
toExternalAgentId: string | null;
|
|
159
|
+
taskId: string | null;
|
|
160
|
+
a2aTaskId: string | null;
|
|
161
|
+
conversationId: string;
|
|
160
162
|
fromTeamAgentId: string | null;
|
|
161
163
|
toTeamAgentId: string | null;
|
|
162
164
|
visibility: string;
|
|
163
165
|
messageType: string;
|
|
164
|
-
taskId: string | null;
|
|
165
166
|
parentMessageId: string | null;
|
|
166
|
-
a2aTaskId: string | null;
|
|
167
167
|
a2aSessionId: string | null;
|
|
168
168
|
}>;
|
|
169
169
|
declare const updateMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -205,18 +205,18 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
205
205
|
metadata: MessageMetadata | null;
|
|
206
206
|
content: MessageContent;
|
|
207
207
|
role: string;
|
|
208
|
-
conversationId: string;
|
|
209
208
|
fromSubAgentId: string | null;
|
|
210
209
|
toSubAgentId: string | null;
|
|
211
210
|
fromExternalAgentId: string | null;
|
|
212
211
|
toExternalAgentId: string | null;
|
|
212
|
+
taskId: string | null;
|
|
213
|
+
a2aTaskId: string | null;
|
|
214
|
+
conversationId: string;
|
|
213
215
|
fromTeamAgentId: string | null;
|
|
214
216
|
toTeamAgentId: string | null;
|
|
215
217
|
visibility: string;
|
|
216
218
|
messageType: string;
|
|
217
|
-
taskId: string | null;
|
|
218
219
|
parentMessageId: string | null;
|
|
219
|
-
a2aTaskId: string | null;
|
|
220
220
|
a2aSessionId: string | null;
|
|
221
221
|
}>;
|
|
222
222
|
declare const countMessagesByConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -39,7 +39,7 @@ declare const listScheduledTriggerInvocationsPaginated: (db: AgentsRunDatabaseCl
|
|
|
39
39
|
name: string;
|
|
40
40
|
hash: string;
|
|
41
41
|
} | null;
|
|
42
|
-
status: "pending" | "
|
|
42
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
43
43
|
scheduledFor: string;
|
|
44
44
|
startedAt: string | null;
|
|
45
45
|
completedAt: string | null;
|
|
@@ -193,7 +193,7 @@ declare const listUpcomingInvocationsForAgentPaginated: (db: AgentsRunDatabaseCl
|
|
|
193
193
|
name: string;
|
|
194
194
|
hash: string;
|
|
195
195
|
} | null;
|
|
196
|
-
status: "pending" | "
|
|
196
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
197
197
|
scheduledFor: string;
|
|
198
198
|
startedAt: string | null;
|
|
199
199
|
completedAt: string | null;
|
|
@@ -232,7 +232,7 @@ declare const listProjectScheduledTriggerInvocationsPaginated: (db: AgentsRunDat
|
|
|
232
232
|
name: string;
|
|
233
233
|
hash: string;
|
|
234
234
|
} | null;
|
|
235
|
-
status: "pending" | "
|
|
235
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
236
236
|
scheduledFor: string;
|
|
237
237
|
startedAt: string | null;
|
|
238
238
|
completedAt: string | null;
|