librechat-data-provider 0.8.522 → 0.8.524
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/{data-service-CaB7saTP.mjs → data-service-B-WUVvTH.mjs} +1044 -173
- package/dist/data-service-B-WUVvTH.mjs.map +1 -0
- package/dist/{data-service-D5kHzBt-.js → data-service-CUG1qdeC.js} +1426 -207
- package/dist/data-service-CUG1qdeC.js.map +1 -0
- package/dist/index.js +886 -74
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +780 -70
- package/dist/index.mjs.map +1 -1
- package/dist/react-query/index.js +1 -1
- package/dist/react-query/index.mjs +1 -1
- package/dist/types/accessPermissions.d.ts +54 -1
- package/dist/types/actions.d.ts +1 -1
- package/dist/types/agentToolOptions.d.ts +1 -1
- package/dist/types/api-endpoints.d.ts +7 -0
- package/dist/types/backgroundResults.d.ts +13 -0
- package/dist/types/balance.d.ts +4 -0
- package/dist/types/bedrock.d.ts +132 -65
- package/dist/types/code/approval.d.ts +26 -0
- package/dist/types/code/worker.d.ts +10 -0
- package/dist/types/code/workspace.d.ts +50 -0
- package/dist/types/codeEnvRef.d.ts +5 -0
- package/dist/types/config.d.ts +5859 -2469
- package/dist/types/data-service.d.ts +22 -12
- package/dist/types/errors.d.ts +2 -0
- package/dist/types/file-config.d.ts +179 -12
- package/dist/types/filters.d.ts +97 -97
- package/dist/types/footer.d.ts +20 -0
- package/dist/types/generate.d.ts +48 -24
- package/dist/types/index.d.ts +11 -0
- package/dist/types/keys.d.ts +13 -2
- package/dist/types/limits.d.ts +8 -0
- package/dist/types/mcp.d.ts +683 -30
- package/dist/types/messages.d.ts +25 -1
- package/dist/types/models.d.ts +312 -183
- package/dist/types/parameterSettings.d.ts +10 -1
- package/dist/types/parsers.d.ts +25 -1
- package/dist/types/providers.d.ts +1 -0
- package/dist/types/resolve-llm-delivery-path.d.ts +161 -0
- package/dist/types/schemas.d.ts +771 -457
- package/dist/types/svg.d.ts +34 -0
- package/dist/types/types/agents.d.ts +257 -2
- package/dist/types/types/assistants.d.ts +2 -617
- package/dist/types/types/content.d.ts +286 -0
- package/dist/types/types/files.d.ts +48 -1
- package/dist/types/types/insights.d.ts +9 -0
- package/dist/types/types/mutations.d.ts +3 -2
- package/dist/types/types/queries.d.ts +8 -1
- package/dist/types/types/queuedTurns.d.ts +140 -106
- package/dist/types/types/runs.d.ts +33 -5
- package/dist/types/types/schedules.d.ts +40 -7
- package/dist/types/types/skills.d.ts +43 -0
- package/dist/types/types/tools.d.ts +132 -0
- package/dist/types/types/traces.d.ts +134 -0
- package/dist/types/types.d.ts +72 -2
- package/package.json +2 -2
- package/dist/data-service-CaB7saTP.mjs.map +0 -1
- package/dist/data-service-D5kHzBt-.js.map +0 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { AxiosResponse } from 'axios';
|
|
2
|
+
import type { TTracePage, TTracePageParams, TTraceAvailability, TTraceRecordParams, TTraceRecordDetail } from './types/traces';
|
|
2
3
|
import type { TInsightsAccessResponse, TInsightsParams, TInsightsResponse } from './types/insights';
|
|
3
4
|
import type { TFileConfig } from './file-config';
|
|
5
|
+
import type * as tl from './types/tools';
|
|
4
6
|
import type * as t from './types';
|
|
5
7
|
import * as permissions from './accessPermissions';
|
|
6
8
|
import * as mcp from './types/mcpServers';
|
|
@@ -17,6 +19,9 @@ import * as s from './schemas';
|
|
|
17
19
|
import * as r from './roles';
|
|
18
20
|
export declare function getInsights(params?: TInsightsParams): Promise<TInsightsResponse>;
|
|
19
21
|
export declare function getInsightsAccess(): Promise<TInsightsAccessResponse>;
|
|
22
|
+
export declare function getConversationTraceAvailability(conversationId: string): Promise<TTraceAvailability>;
|
|
23
|
+
export declare function getConversationTraceRecords({ conversationId, cursor }: TTracePageParams, signal?: AbortSignal): Promise<TTracePage>;
|
|
24
|
+
export declare function getConversationTraceRecord({ conversationId, recordId, messageId, sourceId }: TTraceRecordParams, signal?: AbortSignal): Promise<TTraceRecordDetail>;
|
|
20
25
|
export declare function getLangfuseConnection(): Promise<t.TLangfuseConnectionStatus>;
|
|
21
26
|
export declare function updateLangfuseConnection(payload: t.TUpdateLangfuseConnectionRequest): Promise<t.TLangfuseConnectionStatus>;
|
|
22
27
|
export declare function testLangfuseConnection(payload: t.TLangfuseConnectionTestRequest): Promise<t.TLangfuseConnectionTestResponse>;
|
|
@@ -25,6 +30,8 @@ export declare function revokeUserKey(name: string): Promise<unknown>;
|
|
|
25
30
|
export declare function revokeAllUserKeys(): Promise<unknown>;
|
|
26
31
|
export declare function deleteUser(payload?: t.TDeleteUserRequest): Promise<unknown>;
|
|
27
32
|
export declare function getCodeEnvironments(): Promise<t.TCodeEnvironmentsResponse>;
|
|
33
|
+
export declare function getCodeEnvironmentStatus(id: string): Promise<t.TCodeEnvironmentStatusResponse>;
|
|
34
|
+
export declare function moveConversationCodeEnvironment({ conversationId, from, to, }: t.TCodeEnvironmentMoveRequest): Promise<t.TCodeEnvironmentMoveResponse>;
|
|
28
35
|
export declare function pairCodeEnvironment(payload: {
|
|
29
36
|
name: string;
|
|
30
37
|
controlPlaneId: string;
|
|
@@ -40,6 +47,9 @@ export declare function updateCodeEnvironmentSettings({ id, settings, }: {
|
|
|
40
47
|
}>;
|
|
41
48
|
export declare function getFavorites(): Promise<q.TUserFavorite[]>;
|
|
42
49
|
export declare function updateFavorites(favorites: q.TUserFavorite[]): Promise<q.TUserFavorite[]>;
|
|
50
|
+
/** Combined Pinned-section display order: favorite and pinned-chat entry keys interleaved. */
|
|
51
|
+
export declare function getPinnedOrder(): Promise<string[]>;
|
|
52
|
+
export declare function updatePinnedOrder(pinnedOrder: string[]): Promise<string[]>;
|
|
43
53
|
/** Tool favorites — starred marketplace items (builtins, tools, MCP servers, skills). */
|
|
44
54
|
export declare function getToolFavorites(): Promise<q.TToolFavorite[]>;
|
|
45
55
|
export declare function addToolFavorite(favorite: q.TToolFavorite): Promise<q.TToolFavorite>;
|
|
@@ -165,30 +175,30 @@ export declare const deleteAction: ({ assistant_id, action_id, model, version, e
|
|
|
165
175
|
/**
|
|
166
176
|
* Agents
|
|
167
177
|
*/
|
|
168
|
-
export declare const createAgent: ({ ...data }:
|
|
178
|
+
export declare const createAgent: ({ ...data }: ag.AgentCreateParams) => Promise<ag.Agent>;
|
|
169
179
|
export declare const getAgentById: ({ agent_id }: {
|
|
170
180
|
agent_id: string;
|
|
171
|
-
}) => Promise<
|
|
181
|
+
}) => Promise<ag.Agent>;
|
|
172
182
|
export declare const getExpandedAgentById: ({ agent_id }: {
|
|
173
183
|
agent_id: string;
|
|
174
|
-
}) => Promise<
|
|
184
|
+
}) => Promise<ag.Agent>;
|
|
175
185
|
export declare const getAgentVersions: ({ agent_id }: {
|
|
176
186
|
agent_id: string;
|
|
177
|
-
}) => Promise<
|
|
187
|
+
}) => Promise<ag.Agent[]>;
|
|
178
188
|
export declare const updateAgent: ({ agent_id, data, }: {
|
|
179
189
|
agent_id: string;
|
|
180
|
-
data:
|
|
181
|
-
}) => Promise<
|
|
190
|
+
data: ag.AgentUpdateParams;
|
|
191
|
+
}) => Promise<ag.Agent>;
|
|
182
192
|
export declare const duplicateAgent: ({ agent_id, }: m.DuplicateAgentBody) => Promise<{
|
|
183
|
-
agent:
|
|
193
|
+
agent: ag.Agent;
|
|
184
194
|
actions: ag.Action[];
|
|
185
195
|
}>;
|
|
186
196
|
export declare const deleteAgent: ({ agent_id }: m.DeleteAgentBody) => Promise<void>;
|
|
187
|
-
export declare const listAgents: (params:
|
|
197
|
+
export declare const listAgents: (params: ag.AgentListParams) => Promise<ag.AgentListResponse>;
|
|
188
198
|
export declare const revertAgentVersion: ({ agent_id, version_index, }: {
|
|
189
199
|
agent_id: string;
|
|
190
200
|
version_index: number;
|
|
191
|
-
}) => Promise<
|
|
201
|
+
}) => Promise<ag.Agent>;
|
|
192
202
|
/**
|
|
193
203
|
* Get agent categories with counts for marketplace tabs
|
|
194
204
|
*/
|
|
@@ -203,7 +213,7 @@ export declare const getMarketplaceAgents: (params: {
|
|
|
203
213
|
limit?: number;
|
|
204
214
|
cursor?: string;
|
|
205
215
|
promoted?: 0 | 1;
|
|
206
|
-
}) => Promise<
|
|
216
|
+
}) => Promise<ag.AgentListResponse>;
|
|
207
217
|
export declare const getAvailableAgentTools: () => Promise<s.TPlugin[]>;
|
|
208
218
|
export declare const updateAgentAction: (data: m.UpdateAgentActionVariables) => Promise<m.UpdateAgentActionResponse>;
|
|
209
219
|
export declare const deleteAgentAction: ({ agent_id, action_id, }: m.DeleteAgentActionVariables) => Promise<void>;
|
|
@@ -242,7 +252,7 @@ export declare const deleteMCPServer: (serverName: string) => Promise<{
|
|
|
242
252
|
export declare const importConversationsFile: (data: FormData) => Promise<t.TImportResponse>;
|
|
243
253
|
export declare const uploadAvatar: (data: FormData) => Promise<f.AvatarUploadResponse>;
|
|
244
254
|
export declare const uploadAssistantAvatar: (data: m.AssistantAvatarVariables) => Promise<a.Assistant>;
|
|
245
|
-
export declare const uploadAgentAvatar: (data: m.AgentAvatarVariables) => Promise<
|
|
255
|
+
export declare const uploadAgentAvatar: (data: m.AgentAvatarVariables) => Promise<ag.Agent>;
|
|
246
256
|
export declare const getFileDownload: (userId: string, file_id: string) => Promise<AxiosResponse>;
|
|
247
257
|
export declare const getFileDownloadURL: (userId: string, file_id: string) => Promise<f.FileDownloadURLResponse>;
|
|
248
258
|
/** Blob download for a snapshotted file served through a shared link. */
|
|
@@ -252,7 +262,7 @@ export declare const deleteFiles: (payload: {
|
|
|
252
262
|
files: f.BatchFile[];
|
|
253
263
|
agent_id?: string;
|
|
254
264
|
assistant_id?: string;
|
|
255
|
-
tool_resource?:
|
|
265
|
+
tool_resource?: tl.EToolResources;
|
|
256
266
|
}) => Promise<f.DeleteFilesResponse>;
|
|
257
267
|
export declare const speechToText: (data: FormData) => Promise<f.SpeechToTextResponse>;
|
|
258
268
|
export declare const textToSpeech: (data: FormData) => Promise<ArrayBuffer>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { EndpointFileConfig, FileConfig, RegexLike } from './types/files';
|
|
3
|
+
import type { ResponsesApiRouting } from './types';
|
|
4
|
+
/** Parallel storage deletions during rollback of a failed skill archive import. */
|
|
5
|
+
export declare const DEFAULT_SKILL_IMPORT_CLEANUP_CONCURRENCY = 8;
|
|
3
6
|
export declare const supportsFiles: {
|
|
4
7
|
openAI: boolean;
|
|
5
8
|
google: boolean;
|
|
@@ -20,6 +23,48 @@ export declare const imageExtRegex: RegExp;
|
|
|
20
23
|
export type BedrockDocumentFormat = 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'html' | 'txt' | 'md';
|
|
21
24
|
/** Maps MIME types to Bedrock Converse API document format values */
|
|
22
25
|
export declare const bedrockDocumentFormats: Record<string, BedrockDocumentFormat>;
|
|
26
|
+
/**
|
|
27
|
+
* Whether an upload belongs to the conversation rather than to the agent. The value
|
|
28
|
+
* arrives from multipart form data, so it can be the string "false", which is truthy.
|
|
29
|
+
* Shared so the route, the authorization check and processing cannot disagree about it.
|
|
30
|
+
*/
|
|
31
|
+
export declare const isMessageFileUpload: (value?: boolean | string | null) => boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the upload's conversation uses the Responses API, which decides whether Azure
|
|
34
|
+
* can carry a document natively. Multipart form data has no booleans, so it arrives as
|
|
35
|
+
* the string "true".
|
|
36
|
+
*/
|
|
37
|
+
export declare const isResponsesApiUpload: (value?: boolean | string | null) => boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The name a file carries inside the code sandbox.
|
|
40
|
+
*
|
|
41
|
+
* Image uploads are converted to the configured output type while the record keeps the
|
|
42
|
+
* original filename, so the extension has to follow the stored bytes or the sandbox
|
|
43
|
+
* decoder is handed a mismatch. Provisioning and priming both resolve the mount path
|
|
44
|
+
* from here: deriving it twice under different rules leaves a later turn advertising a
|
|
45
|
+
* path that does not exist in the sandbox.
|
|
46
|
+
*/
|
|
47
|
+
export declare const resolveSandboxFilename: (filename: string, mimeType?: string | null) => string;
|
|
48
|
+
/**
|
|
49
|
+
* The Responses setting a turn actually runs on. A saved agent's own record wins, since
|
|
50
|
+
* execution reads its model parameters; a conversation only answers for itself. Upload
|
|
51
|
+
* and delivery must agree here, or a document is stored as raw provider content and then
|
|
52
|
+
* re-resolved to text it has no extraction for.
|
|
53
|
+
*/
|
|
54
|
+
export declare const resolveUseResponsesApi: (agentValue?: boolean | null, conversationValue?: boolean | null) => boolean | undefined;
|
|
55
|
+
/** Models whose native OpenAI and Azure execution defaults to Responses. Keep
|
|
56
|
+
* this shared with client upload routing so documents follow the API that the
|
|
57
|
+
* backend will actually invoke. Explicit false remains an opt-out. */
|
|
58
|
+
export declare const prefersResponsesApiByModel: (model?: string | null) => boolean;
|
|
59
|
+
/** The server has transport and administrator settings the browser cannot see.
|
|
60
|
+
* Missing policy never enables model-based uploads (including during upgrades). */
|
|
61
|
+
export declare const resolveEffectiveUseResponsesApi: ({ value, endpoint, model, routing, webSearch, }: {
|
|
62
|
+
value?: boolean | null;
|
|
63
|
+
endpoint?: string | null;
|
|
64
|
+
model?: string | null;
|
|
65
|
+
routing?: ResponsesApiRouting;
|
|
66
|
+
webSearch?: boolean | null;
|
|
67
|
+
}) => boolean | undefined;
|
|
23
68
|
export declare const isBedrockDocumentType: (mimeType?: string) => boolean;
|
|
24
69
|
/** MIME types Bedrock's Converse document path can send to the model (mirrors `bedrockDocumentFormats`). */
|
|
25
70
|
export declare const bedrockDocumentMimeTypes: readonly string[];
|
|
@@ -110,10 +155,13 @@ export declare const fileConfig: {
|
|
|
110
155
|
};
|
|
111
156
|
skills: {
|
|
112
157
|
fileSizeLimit: number;
|
|
158
|
+
importCleanupConcurrency: number;
|
|
113
159
|
};
|
|
114
160
|
serverFileSizeLimit: number;
|
|
115
161
|
avatarSizeLimit: number;
|
|
116
162
|
fileTokenLimit: number;
|
|
163
|
+
fileContextSizeLimit: number;
|
|
164
|
+
fileContextCharLimit: number;
|
|
117
165
|
clientImageResize: {
|
|
118
166
|
enabled: boolean;
|
|
119
167
|
maxWidth: number;
|
|
@@ -132,24 +180,61 @@ export declare const fileConfig: {
|
|
|
132
180
|
};
|
|
133
181
|
checkType: (fileType: string, supportedTypes?: RegexLike[]) => boolean;
|
|
134
182
|
};
|
|
183
|
+
export declare const DefaultLLMDeliveryPath: z.ZodEnum<["provider", "text", "none"]>;
|
|
184
|
+
export type TDefaultLLMDeliveryPath = z.infer<typeof DefaultLLMDeliveryPath>;
|
|
185
|
+
export declare const defaultLLMDeliveryPathSchema: z.ZodObject<{
|
|
186
|
+
fallback: z.ZodOptional<z.ZodEnum<["provider", "text", "none"]>>;
|
|
187
|
+
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["provider", "text", "none"]>>>;
|
|
188
|
+
}, "strip", z.ZodTypeAny, {
|
|
189
|
+
fallback?: "none" | "text" | "provider" | undefined;
|
|
190
|
+
overrides?: Record<string, "none" | "text" | "provider"> | undefined;
|
|
191
|
+
}, {
|
|
192
|
+
fallback?: "none" | "text" | "provider" | undefined;
|
|
193
|
+
overrides?: Record<string, "none" | "text" | "provider"> | undefined;
|
|
194
|
+
}>;
|
|
195
|
+
export type TDefaultLLMDeliveryPathConfig = z.infer<typeof defaultLLMDeliveryPathSchema>;
|
|
135
196
|
export declare const endpointFileConfigSchema: z.ZodObject<{
|
|
136
197
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
137
198
|
fileLimit: z.ZodOptional<z.ZodNumber>;
|
|
138
199
|
fileSizeLimit: z.ZodOptional<z.ZodNumber>;
|
|
139
200
|
totalSizeLimit: z.ZodOptional<z.ZodNumber>;
|
|
140
|
-
supportedMimeTypes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
201
|
+
supportedMimeTypes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>>;
|
|
202
|
+
defaultLLMDeliveryPath: z.ZodOptional<z.ZodObject<{
|
|
203
|
+
fallback: z.ZodOptional<z.ZodEnum<["provider", "text", "none"]>>;
|
|
204
|
+
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["provider", "text", "none"]>>>;
|
|
205
|
+
}, "strip", z.ZodTypeAny, {
|
|
206
|
+
fallback?: "none" | "text" | "provider" | undefined;
|
|
207
|
+
overrides?: Record<string, "none" | "text" | "provider"> | undefined;
|
|
208
|
+
}, {
|
|
209
|
+
fallback?: "none" | "text" | "provider" | undefined;
|
|
210
|
+
overrides?: Record<string, "none" | "text" | "provider"> | undefined;
|
|
211
|
+
}>>;
|
|
212
|
+
legacyFileUploadUX: z.ZodOptional<z.ZodBoolean>;
|
|
213
|
+
textFallbackWithoutTools: z.ZodOptional<z.ZodBoolean>;
|
|
141
214
|
}, "strip", z.ZodTypeAny, {
|
|
142
215
|
disabled?: boolean | undefined;
|
|
143
216
|
fileLimit?: number | undefined;
|
|
144
217
|
fileSizeLimit?: number | undefined;
|
|
145
218
|
totalSizeLimit?: number | undefined;
|
|
146
219
|
supportedMimeTypes?: string[] | undefined;
|
|
220
|
+
defaultLLMDeliveryPath?: {
|
|
221
|
+
fallback?: "none" | "text" | "provider" | undefined;
|
|
222
|
+
overrides?: Record<string, "none" | "text" | "provider"> | undefined;
|
|
223
|
+
} | undefined;
|
|
224
|
+
legacyFileUploadUX?: boolean | undefined;
|
|
225
|
+
textFallbackWithoutTools?: boolean | undefined;
|
|
147
226
|
}, {
|
|
148
227
|
disabled?: boolean | undefined;
|
|
149
228
|
fileLimit?: number | undefined;
|
|
150
229
|
fileSizeLimit?: number | undefined;
|
|
151
230
|
totalSizeLimit?: number | undefined;
|
|
152
231
|
supportedMimeTypes?: string[] | undefined;
|
|
232
|
+
defaultLLMDeliveryPath?: {
|
|
233
|
+
fallback?: "none" | "text" | "provider" | undefined;
|
|
234
|
+
overrides?: Record<string, "none" | "text" | "provider"> | undefined;
|
|
235
|
+
} | undefined;
|
|
236
|
+
legacyFileUploadUX?: boolean | undefined;
|
|
237
|
+
textFallbackWithoutTools?: boolean | undefined;
|
|
153
238
|
}>;
|
|
154
239
|
export declare const fileConfigSchema: z.ZodObject<{
|
|
155
240
|
endpoints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -157,30 +242,60 @@ export declare const fileConfigSchema: z.ZodObject<{
|
|
|
157
242
|
fileLimit: z.ZodOptional<z.ZodNumber>;
|
|
158
243
|
fileSizeLimit: z.ZodOptional<z.ZodNumber>;
|
|
159
244
|
totalSizeLimit: z.ZodOptional<z.ZodNumber>;
|
|
160
|
-
supportedMimeTypes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
245
|
+
supportedMimeTypes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>>;
|
|
246
|
+
defaultLLMDeliveryPath: z.ZodOptional<z.ZodObject<{
|
|
247
|
+
fallback: z.ZodOptional<z.ZodEnum<["provider", "text", "none"]>>;
|
|
248
|
+
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["provider", "text", "none"]>>>;
|
|
249
|
+
}, "strip", z.ZodTypeAny, {
|
|
250
|
+
fallback?: "none" | "text" | "provider" | undefined;
|
|
251
|
+
overrides?: Record<string, "none" | "text" | "provider"> | undefined;
|
|
252
|
+
}, {
|
|
253
|
+
fallback?: "none" | "text" | "provider" | undefined;
|
|
254
|
+
overrides?: Record<string, "none" | "text" | "provider"> | undefined;
|
|
255
|
+
}>>;
|
|
256
|
+
legacyFileUploadUX: z.ZodOptional<z.ZodBoolean>;
|
|
257
|
+
textFallbackWithoutTools: z.ZodOptional<z.ZodBoolean>;
|
|
161
258
|
}, "strip", z.ZodTypeAny, {
|
|
162
259
|
disabled?: boolean | undefined;
|
|
163
260
|
fileLimit?: number | undefined;
|
|
164
261
|
fileSizeLimit?: number | undefined;
|
|
165
262
|
totalSizeLimit?: number | undefined;
|
|
166
263
|
supportedMimeTypes?: string[] | undefined;
|
|
264
|
+
defaultLLMDeliveryPath?: {
|
|
265
|
+
fallback?: "none" | "text" | "provider" | undefined;
|
|
266
|
+
overrides?: Record<string, "none" | "text" | "provider"> | undefined;
|
|
267
|
+
} | undefined;
|
|
268
|
+
legacyFileUploadUX?: boolean | undefined;
|
|
269
|
+
textFallbackWithoutTools?: boolean | undefined;
|
|
167
270
|
}, {
|
|
168
271
|
disabled?: boolean | undefined;
|
|
169
272
|
fileLimit?: number | undefined;
|
|
170
273
|
fileSizeLimit?: number | undefined;
|
|
171
274
|
totalSizeLimit?: number | undefined;
|
|
172
275
|
supportedMimeTypes?: string[] | undefined;
|
|
276
|
+
defaultLLMDeliveryPath?: {
|
|
277
|
+
fallback?: "none" | "text" | "provider" | undefined;
|
|
278
|
+
overrides?: Record<string, "none" | "text" | "provider"> | undefined;
|
|
279
|
+
} | undefined;
|
|
280
|
+
legacyFileUploadUX?: boolean | undefined;
|
|
281
|
+
textFallbackWithoutTools?: boolean | undefined;
|
|
173
282
|
}>>>;
|
|
174
283
|
skills: z.ZodOptional<z.ZodObject<{
|
|
175
284
|
fileSizeLimit: z.ZodOptional<z.ZodNumber>;
|
|
285
|
+
importCleanupConcurrency: z.ZodOptional<z.ZodNumber>;
|
|
176
286
|
}, "strip", z.ZodTypeAny, {
|
|
177
287
|
fileSizeLimit?: number | undefined;
|
|
288
|
+
importCleanupConcurrency?: number | undefined;
|
|
178
289
|
}, {
|
|
179
290
|
fileSizeLimit?: number | undefined;
|
|
291
|
+
importCleanupConcurrency?: number | undefined;
|
|
180
292
|
}>>;
|
|
181
293
|
serverFileSizeLimit: z.ZodOptional<z.ZodNumber>;
|
|
182
294
|
avatarSizeLimit: z.ZodOptional<z.ZodNumber>;
|
|
183
295
|
fileTokenLimit: z.ZodOptional<z.ZodNumber>;
|
|
296
|
+
fileContextSizeLimit: z.ZodOptional<z.ZodNumber>;
|
|
297
|
+
fileContextCharLimit: z.ZodOptional<z.ZodNumber>;
|
|
298
|
+
codeEnvLivenessSafeWindowMs: z.ZodOptional<z.ZodNumber>;
|
|
184
299
|
imageGeneration: z.ZodOptional<z.ZodObject<{
|
|
185
300
|
percentage: z.ZodOptional<z.ZodNumber>;
|
|
186
301
|
px: z.ZodOptional<z.ZodNumber>;
|
|
@@ -208,36 +323,67 @@ export declare const fileConfigSchema: z.ZodObject<{
|
|
|
208
323
|
quality?: number | undefined;
|
|
209
324
|
}>>;
|
|
210
325
|
ocr: z.ZodOptional<z.ZodObject<{
|
|
211
|
-
supportedMimeTypes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
326
|
+
supportedMimeTypes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>>;
|
|
212
327
|
}, "strip", z.ZodTypeAny, {
|
|
213
328
|
supportedMimeTypes?: string[] | undefined;
|
|
214
329
|
}, {
|
|
215
330
|
supportedMimeTypes?: string[] | undefined;
|
|
216
331
|
}>>;
|
|
217
332
|
text: z.ZodOptional<z.ZodObject<{
|
|
218
|
-
supportedMimeTypes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
333
|
+
supportedMimeTypes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>>;
|
|
219
334
|
}, "strip", z.ZodTypeAny, {
|
|
220
335
|
supportedMimeTypes?: string[] | undefined;
|
|
221
336
|
}, {
|
|
222
337
|
supportedMimeTypes?: string[] | undefined;
|
|
223
338
|
}>>;
|
|
339
|
+
defaultLLMDeliveryPath: z.ZodOptional<z.ZodObject<{
|
|
340
|
+
fallback: z.ZodOptional<z.ZodEnum<["provider", "text", "none"]>>;
|
|
341
|
+
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["provider", "text", "none"]>>>;
|
|
342
|
+
}, "strip", z.ZodTypeAny, {
|
|
343
|
+
fallback?: "none" | "text" | "provider" | undefined;
|
|
344
|
+
overrides?: Record<string, "none" | "text" | "provider"> | undefined;
|
|
345
|
+
}, {
|
|
346
|
+
fallback?: "none" | "text" | "provider" | undefined;
|
|
347
|
+
overrides?: Record<string, "none" | "text" | "provider"> | undefined;
|
|
348
|
+
}>>;
|
|
349
|
+
legacyFileUploadUX: z.ZodOptional<z.ZodBoolean>;
|
|
350
|
+
textFallbackWithoutTools: z.ZodOptional<z.ZodBoolean>;
|
|
224
351
|
}, "strip", z.ZodTypeAny, {
|
|
225
|
-
fileTokenLimit?: number | undefined;
|
|
226
352
|
text?: {
|
|
227
353
|
supportedMimeTypes?: string[] | undefined;
|
|
228
354
|
} | undefined;
|
|
229
355
|
skills?: {
|
|
230
356
|
fileSizeLimit?: number | undefined;
|
|
357
|
+
importCleanupConcurrency?: number | undefined;
|
|
358
|
+
} | undefined;
|
|
359
|
+
fileTokenLimit?: number | undefined;
|
|
360
|
+
ocr?: {
|
|
361
|
+
supportedMimeTypes?: string[] | undefined;
|
|
231
362
|
} | undefined;
|
|
363
|
+
defaultLLMDeliveryPath?: {
|
|
364
|
+
fallback?: "none" | "text" | "provider" | undefined;
|
|
365
|
+
overrides?: Record<string, "none" | "text" | "provider"> | undefined;
|
|
366
|
+
} | undefined;
|
|
367
|
+
legacyFileUploadUX?: boolean | undefined;
|
|
368
|
+
textFallbackWithoutTools?: boolean | undefined;
|
|
232
369
|
endpoints?: Record<string, {
|
|
233
370
|
disabled?: boolean | undefined;
|
|
234
371
|
fileLimit?: number | undefined;
|
|
235
372
|
fileSizeLimit?: number | undefined;
|
|
236
373
|
totalSizeLimit?: number | undefined;
|
|
237
374
|
supportedMimeTypes?: string[] | undefined;
|
|
375
|
+
defaultLLMDeliveryPath?: {
|
|
376
|
+
fallback?: "none" | "text" | "provider" | undefined;
|
|
377
|
+
overrides?: Record<string, "none" | "text" | "provider"> | undefined;
|
|
378
|
+
} | undefined;
|
|
379
|
+
legacyFileUploadUX?: boolean | undefined;
|
|
380
|
+
textFallbackWithoutTools?: boolean | undefined;
|
|
238
381
|
}> | undefined;
|
|
239
382
|
serverFileSizeLimit?: number | undefined;
|
|
240
383
|
avatarSizeLimit?: number | undefined;
|
|
384
|
+
fileContextSizeLimit?: number | undefined;
|
|
385
|
+
fileContextCharLimit?: number | undefined;
|
|
386
|
+
codeEnvLivenessSafeWindowMs?: number | undefined;
|
|
241
387
|
imageGeneration?: {
|
|
242
388
|
percentage?: number | undefined;
|
|
243
389
|
px?: number | undefined;
|
|
@@ -248,26 +394,42 @@ export declare const fileConfigSchema: z.ZodObject<{
|
|
|
248
394
|
maxHeight?: number | undefined;
|
|
249
395
|
quality?: number | undefined;
|
|
250
396
|
} | undefined;
|
|
251
|
-
ocr?: {
|
|
252
|
-
supportedMimeTypes?: string[] | undefined;
|
|
253
|
-
} | undefined;
|
|
254
397
|
}, {
|
|
255
|
-
fileTokenLimit?: number | undefined;
|
|
256
398
|
text?: {
|
|
257
399
|
supportedMimeTypes?: string[] | undefined;
|
|
258
400
|
} | undefined;
|
|
259
401
|
skills?: {
|
|
260
402
|
fileSizeLimit?: number | undefined;
|
|
403
|
+
importCleanupConcurrency?: number | undefined;
|
|
261
404
|
} | undefined;
|
|
405
|
+
fileTokenLimit?: number | undefined;
|
|
406
|
+
ocr?: {
|
|
407
|
+
supportedMimeTypes?: string[] | undefined;
|
|
408
|
+
} | undefined;
|
|
409
|
+
defaultLLMDeliveryPath?: {
|
|
410
|
+
fallback?: "none" | "text" | "provider" | undefined;
|
|
411
|
+
overrides?: Record<string, "none" | "text" | "provider"> | undefined;
|
|
412
|
+
} | undefined;
|
|
413
|
+
legacyFileUploadUX?: boolean | undefined;
|
|
414
|
+
textFallbackWithoutTools?: boolean | undefined;
|
|
262
415
|
endpoints?: Record<string, {
|
|
263
416
|
disabled?: boolean | undefined;
|
|
264
417
|
fileLimit?: number | undefined;
|
|
265
418
|
fileSizeLimit?: number | undefined;
|
|
266
419
|
totalSizeLimit?: number | undefined;
|
|
267
420
|
supportedMimeTypes?: string[] | undefined;
|
|
421
|
+
defaultLLMDeliveryPath?: {
|
|
422
|
+
fallback?: "none" | "text" | "provider" | undefined;
|
|
423
|
+
overrides?: Record<string, "none" | "text" | "provider"> | undefined;
|
|
424
|
+
} | undefined;
|
|
425
|
+
legacyFileUploadUX?: boolean | undefined;
|
|
426
|
+
textFallbackWithoutTools?: boolean | undefined;
|
|
268
427
|
}> | undefined;
|
|
269
428
|
serverFileSizeLimit?: number | undefined;
|
|
270
429
|
avatarSizeLimit?: number | undefined;
|
|
430
|
+
fileContextSizeLimit?: number | undefined;
|
|
431
|
+
fileContextCharLimit?: number | undefined;
|
|
432
|
+
codeEnvLivenessSafeWindowMs?: number | undefined;
|
|
271
433
|
imageGeneration?: {
|
|
272
434
|
percentage?: number | undefined;
|
|
273
435
|
px?: number | undefined;
|
|
@@ -278,9 +440,6 @@ export declare const fileConfigSchema: z.ZodObject<{
|
|
|
278
440
|
maxHeight?: number | undefined;
|
|
279
441
|
quality?: number | undefined;
|
|
280
442
|
} | undefined;
|
|
281
|
-
ocr?: {
|
|
282
|
-
supportedMimeTypes?: string[] | undefined;
|
|
283
|
-
} | undefined;
|
|
284
443
|
}>;
|
|
285
444
|
export type TFileConfig = z.infer<typeof fileConfigSchema>;
|
|
286
445
|
/** Override the MIME-pattern compiler; the server injects a linear-time engine at startup. */
|
|
@@ -289,6 +448,12 @@ export declare const setFileConfigRegexCompiler: (compile: (pattern: string) =>
|
|
|
289
448
|
export declare const convertStringsToRegex: (patterns: string[]) => RegexLike[];
|
|
290
449
|
/** Detects whether the given MIME type patterns accept all file types (e.g., `.*` or `.+`). */
|
|
291
450
|
export declare const isPermissiveMimeConfig: (types?: RegexLike[]) => boolean;
|
|
451
|
+
/**
|
|
452
|
+
* Detects whether an endpoint's `supportedMimeTypes` were set by the admin rather than inherited
|
|
453
|
+
* from the built-in default list. Inheritance is signaled by referential identity with
|
|
454
|
+
* `supportedMimeTypes`, which `mergeWithDefault` preserves for unconfigured endpoints.
|
|
455
|
+
*/
|
|
456
|
+
export declare const isExplicitMimeConfig: (types?: RegexLike[]) => types is RegexLike[];
|
|
292
457
|
/** The kind of content a provider upload path can actually send to the model. */
|
|
293
458
|
export type MimeUploadCategory = 'image' | 'document' | 'audio' | 'video';
|
|
294
459
|
/** Describes what an upload path can send, used to scope a configured allowlist to selectable files. */
|
|
@@ -298,6 +463,8 @@ export interface MimeUploadCapability {
|
|
|
298
463
|
/** When `document` is permitted, restrict document types to this set (e.g. Bedrock formats); default: all. */
|
|
299
464
|
documentMimeTypes?: readonly string[];
|
|
300
465
|
}
|
|
466
|
+
/** Preferred extension for a known document MIME type, including its leading dot. */
|
|
467
|
+
export declare function getDocumentFileExtension(mimeType?: string): string | undefined;
|
|
301
468
|
/**
|
|
302
469
|
* Resolves the file-input `accept` value for a configured `supportedMimeTypes` allowlist, scoped to
|
|
303
470
|
* what the current upload path (`capability`) can send to the model.
|