@inkeep/agents-core 0.0.0-dev-20260305210619 → 0.0.0-dev-20260306023150
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 +107 -107
- package/dist/constants/allowed-image-formats.d.ts +8 -0
- package/dist/constants/allowed-image-formats.js +38 -0
- package/dist/constants/models.d.ts +2 -0
- package/dist/constants/models.js +2 -0
- package/dist/data-access/manage/subAgentRelations.d.ts +6 -6
- package/dist/data-access/runtime/apiKeys.d.ts +4 -4
- package/dist/db/manage/manage-schema.d.ts +449 -449
- package/dist/db/runtime/runtime-schema.d.ts +301 -301
- package/dist/middleware/authz-meta.d.ts +2 -2
- package/dist/middleware/no-auth.d.ts +2 -2
- package/dist/validation/schemas.d.ts +1393 -1393
- package/package.json +5 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region src/constants/allowed-image-formats.d.ts
|
|
2
|
+
declare const ALLOWED_IMAGE_MIME_TYPES: Set<string>;
|
|
3
|
+
declare const DATA_URI_IMAGE_BASE64_REGEX: RegExp;
|
|
4
|
+
declare function normalizeImageMimeType(mimeType: string): string;
|
|
5
|
+
declare function getExtensionFromMimeType(mimeType?: string): string;
|
|
6
|
+
declare function getMimeTypeFromExtension(extension?: string): string;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ALLOWED_IMAGE_MIME_TYPES, DATA_URI_IMAGE_BASE64_REGEX, getExtensionFromMimeType, getMimeTypeFromExtension, normalizeImageMimeType };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region src/constants/allowed-image-formats.ts
|
|
2
|
+
const ALLOWED_IMAGE_MIME_TYPES = new Set([
|
|
3
|
+
"image/png",
|
|
4
|
+
"image/jpeg",
|
|
5
|
+
"image/webp"
|
|
6
|
+
]);
|
|
7
|
+
const IMAGE_MIME_TYPE_TO_EXTENSION = {
|
|
8
|
+
"image/png": "png",
|
|
9
|
+
"image/jpeg": "jpg",
|
|
10
|
+
"image/jpg": "jpg",
|
|
11
|
+
"image/webp": "webp"
|
|
12
|
+
};
|
|
13
|
+
const IMAGE_EXTENSION_TO_MIME_TYPE = {
|
|
14
|
+
png: "image/png",
|
|
15
|
+
jpg: "image/jpeg",
|
|
16
|
+
jpeg: "image/jpeg",
|
|
17
|
+
webp: "image/webp"
|
|
18
|
+
};
|
|
19
|
+
const dataUriSubtypes = Array.from(ALLOWED_IMAGE_MIME_TYPES).flatMap((mime) => {
|
|
20
|
+
const subtype = mime.replace("image/", "");
|
|
21
|
+
return subtype === "jpeg" ? ["jpeg", "jpg"] : [subtype];
|
|
22
|
+
});
|
|
23
|
+
const DATA_URI_IMAGE_BASE64_REGEX = /* @__PURE__ */ new RegExp(`^data:image/(${dataUriSubtypes.join("|")});base64,`);
|
|
24
|
+
function normalizeImageMimeType(mimeType) {
|
|
25
|
+
return mimeType.split(";")[0]?.trim().toLowerCase() || "";
|
|
26
|
+
}
|
|
27
|
+
function getExtensionFromMimeType(mimeType) {
|
|
28
|
+
if (!mimeType) return "bin";
|
|
29
|
+
const normalizedMimeType = normalizeImageMimeType(mimeType);
|
|
30
|
+
return IMAGE_MIME_TYPE_TO_EXTENSION[normalizedMimeType] || normalizedMimeType.split("/")[1] || "bin";
|
|
31
|
+
}
|
|
32
|
+
function getMimeTypeFromExtension(extension) {
|
|
33
|
+
if (!extension) return "application/octet-stream";
|
|
34
|
+
return IMAGE_EXTENSION_TO_MIME_TYPE[extension.replace(/^\./, "").trim().toLowerCase()] || "application/octet-stream";
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { ALLOWED_IMAGE_MIME_TYPES, DATA_URI_IMAGE_BASE64_REGEX, getExtensionFromMimeType, getMimeTypeFromExtension, normalizeImageMimeType };
|
|
@@ -20,6 +20,8 @@ declare const ANTHROPIC_MODELS: {
|
|
|
20
20
|
readonly CLAUDE_3_5_HAIKU_20241022: "anthropic/claude-3-5-haiku-20241022";
|
|
21
21
|
};
|
|
22
22
|
declare const OPENAI_MODELS: {
|
|
23
|
+
readonly GPT_5_4_PRO: "openai/gpt-5.4-pro";
|
|
24
|
+
readonly GPT_5_4: "openai/gpt-5.4";
|
|
23
25
|
readonly GPT_5_2: "openai/gpt-5.2";
|
|
24
26
|
readonly GPT_5_2_20251211: "openai/gpt-5.2-2025-12-11";
|
|
25
27
|
readonly GPT_5_1: "openai/gpt-5.1";
|
package/dist/constants/models.js
CHANGED
|
@@ -20,6 +20,8 @@ const ANTHROPIC_MODELS = {
|
|
|
20
20
|
CLAUDE_3_5_HAIKU_20241022: "anthropic/claude-3-5-haiku-20241022"
|
|
21
21
|
};
|
|
22
22
|
const OPENAI_MODELS = {
|
|
23
|
+
GPT_5_4_PRO: "openai/gpt-5.4-pro",
|
|
24
|
+
GPT_5_4: "openai/gpt-5.4",
|
|
23
25
|
GPT_5_2: "openai/gpt-5.2",
|
|
24
26
|
GPT_5_2_20251211: "openai/gpt-5.2-2025-12-11",
|
|
25
27
|
GPT_5_1: "openai/gpt-5.1",
|
|
@@ -15,9 +15,9 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
15
15
|
agentId: string;
|
|
16
16
|
createdAt: string;
|
|
17
17
|
updatedAt: string;
|
|
18
|
+
relationType: string | null;
|
|
18
19
|
sourceSubAgentId: string;
|
|
19
20
|
targetSubAgentId: string | null;
|
|
20
|
-
relationType: string | null;
|
|
21
21
|
} | undefined>;
|
|
22
22
|
declare const listAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
23
23
|
scopes: AgentScopeConfig;
|
|
@@ -50,9 +50,9 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
50
50
|
agentId: string;
|
|
51
51
|
createdAt: string;
|
|
52
52
|
updatedAt: string;
|
|
53
|
+
relationType: string | null;
|
|
53
54
|
sourceSubAgentId: string;
|
|
54
55
|
targetSubAgentId: string | null;
|
|
55
|
-
relationType: string | null;
|
|
56
56
|
}[]>;
|
|
57
57
|
declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
58
58
|
scopes: AgentScopeConfig;
|
|
@@ -63,9 +63,9 @@ declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (par
|
|
|
63
63
|
agentId: string;
|
|
64
64
|
createdAt: string;
|
|
65
65
|
updatedAt: string;
|
|
66
|
+
relationType: string | null;
|
|
66
67
|
sourceSubAgentId: string;
|
|
67
68
|
targetSubAgentId: string | null;
|
|
68
|
-
relationType: string | null;
|
|
69
69
|
}[]>;
|
|
70
70
|
declare const getAgentRelationsBySource: (db: AgentsManageDatabaseClient) => (params: {
|
|
71
71
|
scopes: AgentScopeConfig;
|
|
@@ -132,9 +132,9 @@ declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (param
|
|
|
132
132
|
agentId: string;
|
|
133
133
|
createdAt: string;
|
|
134
134
|
updatedAt: string;
|
|
135
|
+
relationType: string | null;
|
|
135
136
|
sourceSubAgentId: string;
|
|
136
137
|
targetSubAgentId: string | null;
|
|
137
|
-
relationType: string | null;
|
|
138
138
|
}>;
|
|
139
139
|
/**
|
|
140
140
|
* Check if sub-agent relation exists by agent, source, target, and relation type
|
|
@@ -151,9 +151,9 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
|
|
|
151
151
|
agentId: string;
|
|
152
152
|
createdAt: string;
|
|
153
153
|
updatedAt: string;
|
|
154
|
+
relationType: string | null;
|
|
154
155
|
sourceSubAgentId: string;
|
|
155
156
|
targetSubAgentId: string | null;
|
|
156
|
-
relationType: string | null;
|
|
157
157
|
} | undefined>;
|
|
158
158
|
/**
|
|
159
159
|
* Upsert agent relation (create if it doesn't exist, no-op if it does)
|
|
@@ -165,9 +165,9 @@ declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (param
|
|
|
165
165
|
agentId: string;
|
|
166
166
|
createdAt: string;
|
|
167
167
|
updatedAt: string;
|
|
168
|
+
relationType: string | null;
|
|
168
169
|
sourceSubAgentId: string;
|
|
169
170
|
targetSubAgentId: string | null;
|
|
170
|
-
relationType: string | null;
|
|
171
171
|
}>;
|
|
172
172
|
declare const updateAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
173
173
|
scopes: AgentScopeConfig;
|
|
@@ -16,10 +16,10 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
16
16
|
createdAt: string;
|
|
17
17
|
updatedAt: string;
|
|
18
18
|
expiresAt: string | null;
|
|
19
|
+
lastUsedAt: string | null;
|
|
19
20
|
publicId: string;
|
|
20
21
|
keyHash: string;
|
|
21
22
|
keyPrefix: string;
|
|
22
|
-
lastUsedAt: string | null;
|
|
23
23
|
} | undefined>;
|
|
24
24
|
declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
|
|
25
25
|
id: string;
|
|
@@ -30,10 +30,10 @@ declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: s
|
|
|
30
30
|
createdAt: string;
|
|
31
31
|
updatedAt: string;
|
|
32
32
|
expiresAt: string | null;
|
|
33
|
+
lastUsedAt: string | null;
|
|
33
34
|
publicId: string;
|
|
34
35
|
keyHash: string;
|
|
35
36
|
keyPrefix: string;
|
|
36
|
-
lastUsedAt: string | null;
|
|
37
37
|
} | undefined>;
|
|
38
38
|
declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
|
|
39
39
|
scopes: ProjectScopeConfig;
|
|
@@ -47,10 +47,10 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
47
47
|
createdAt: string;
|
|
48
48
|
updatedAt: string;
|
|
49
49
|
expiresAt: string | null;
|
|
50
|
+
lastUsedAt: string | null;
|
|
50
51
|
publicId: string;
|
|
51
52
|
keyHash: string;
|
|
52
53
|
keyPrefix: string;
|
|
53
|
-
lastUsedAt: string | null;
|
|
54
54
|
}[]>;
|
|
55
55
|
declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
56
56
|
scopes: ProjectScopeConfig;
|
|
@@ -74,10 +74,10 @@ declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInse
|
|
|
74
74
|
createdAt: string;
|
|
75
75
|
updatedAt: string;
|
|
76
76
|
expiresAt: string | null;
|
|
77
|
+
lastUsedAt: string | null;
|
|
77
78
|
publicId: string;
|
|
78
79
|
keyHash: string;
|
|
79
80
|
keyPrefix: string;
|
|
80
|
-
lastUsedAt: string | null;
|
|
81
81
|
}>;
|
|
82
82
|
declare const updateApiKey: (db: AgentsRunDatabaseClient) => (params: {
|
|
83
83
|
scopes: ProjectScopeConfig;
|