librechat-data-provider 0.8.509 → 0.8.522

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 (61) hide show
  1. package/dist/{data-service-BsdHkdKS.mjs → data-service-CaB7saTP.mjs} +2175 -113
  2. package/dist/data-service-CaB7saTP.mjs.map +1 -0
  3. package/dist/{data-service-XTxx76uB.js → data-service-D5kHzBt-.js} +2806 -150
  4. package/dist/data-service-D5kHzBt-.js.map +1 -0
  5. package/dist/index.js +1403 -92
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +1248 -93
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/react-query/index.js +2 -1
  10. package/dist/react-query/index.js.map +1 -1
  11. package/dist/react-query/index.mjs +2 -1
  12. package/dist/react-query/index.mjs.map +1 -1
  13. package/dist/types/accessPermissions.d.ts +4 -0
  14. package/dist/types/actions.d.ts +3 -3
  15. package/dist/types/agentToolOptions.d.ts +11 -0
  16. package/dist/types/api-endpoints.d.ts +28 -2
  17. package/dist/types/bedrock.d.ts +220 -0
  18. package/dist/types/cadence.d.ts +33 -0
  19. package/dist/types/codeEnvRef.d.ts +21 -0
  20. package/dist/types/config.d.ts +13457 -1573
  21. package/dist/types/data-service.d.ts +65 -14
  22. package/dist/types/feedback.d.ts +9 -1
  23. package/dist/types/file-config.d.ts +42 -5
  24. package/dist/types/filters.d.ts +1422 -0
  25. package/dist/types/generate.d.ts +85 -1
  26. package/dist/types/index.d.ts +10 -0
  27. package/dist/types/keys.d.ts +29 -4
  28. package/dist/types/langchain.d.ts +4 -0
  29. package/dist/types/limits.d.ts +13 -0
  30. package/dist/types/mcp.d.ts +338 -228
  31. package/dist/types/messages.d.ts +13 -0
  32. package/dist/types/models.d.ts +840 -68
  33. package/dist/types/parameterSettings.d.ts +7 -3
  34. package/dist/types/parsers.d.ts +13 -1
  35. package/dist/types/permissions.d.ts +42 -1
  36. package/dist/types/providers.d.ts +36 -0
  37. package/dist/types/react-query/react-query-service.d.ts +2 -7
  38. package/dist/types/request.d.ts +4 -2
  39. package/dist/types/roles.d.ts +34 -0
  40. package/dist/types/runSteps.d.ts +59 -0
  41. package/dist/types/schemas.d.ts +1358 -34
  42. package/dist/types/stateful-code.d.ts +7 -0
  43. package/dist/types/types/agents.d.ts +303 -8
  44. package/dist/types/types/assistants.d.ts +170 -7
  45. package/dist/types/types/files.d.ts +29 -8
  46. package/dist/types/types/index.d.ts +2 -0
  47. package/dist/types/types/insights.d.ts +62 -0
  48. package/dist/types/types/mcpServers.d.ts +25 -0
  49. package/dist/types/types/mutations.d.ts +2 -0
  50. package/dist/types/types/queries.d.ts +47 -5
  51. package/dist/types/types/queuedTurns.d.ts +870 -0
  52. package/dist/types/types/runs.d.ts +206 -26
  53. package/dist/types/types/schedules.d.ts +306 -0
  54. package/dist/types/types/skills.d.ts +34 -6
  55. package/dist/types/types/subagents.d.ts +159 -0
  56. package/dist/types/types/web.d.ts +12 -2
  57. package/dist/types/types.d.ts +175 -2
  58. package/dist/types/upload.d.ts +2 -0
  59. package/package.json +7 -5
  60. package/dist/data-service-BsdHkdKS.mjs.map +0 -1
  61. package/dist/data-service-XTxx76uB.js.map +0 -1
@@ -1,9 +1,11 @@
1
1
  import type { AxiosResponse } from 'axios';
2
- import type { TContextProjectionRequest, TContextUsageEvent } from './types/runs';
2
+ import type { TInsightsAccessResponse, TInsightsParams, TInsightsResponse } from './types/insights';
3
3
  import type { TFileConfig } from './file-config';
4
4
  import type * as t from './types';
5
5
  import * as permissions from './accessPermissions';
6
6
  import * as mcp from './types/mcpServers';
7
+ import * as qt from './types/queuedTurns';
8
+ import * as sch from './types/schedules';
7
9
  import * as a from './types/assistants';
8
10
  import * as m from './types/mutations';
9
11
  import * as ag from './types/agents';
@@ -13,18 +15,37 @@ import * as f from './types/files';
13
15
  import * as config from './config';
14
16
  import * as s from './schemas';
15
17
  import * as r from './roles';
18
+ export declare function getInsights(params?: TInsightsParams): Promise<TInsightsResponse>;
19
+ export declare function getInsightsAccess(): Promise<TInsightsAccessResponse>;
20
+ export declare function getLangfuseConnection(): Promise<t.TLangfuseConnectionStatus>;
21
+ export declare function updateLangfuseConnection(payload: t.TUpdateLangfuseConnectionRequest): Promise<t.TLangfuseConnectionStatus>;
22
+ export declare function testLangfuseConnection(payload: t.TLangfuseConnectionTestRequest): Promise<t.TLangfuseConnectionTestResponse>;
23
+ export declare function getLangfuseSessionLink(conversationId: string): Promise<t.TLangfuseSessionLinkResponse>;
16
24
  export declare function revokeUserKey(name: string): Promise<unknown>;
17
25
  export declare function revokeAllUserKeys(): Promise<unknown>;
18
26
  export declare function deleteUser(payload?: t.TDeleteUserRequest): Promise<unknown>;
27
+ export declare function getCodeEnvironments(): Promise<t.TCodeEnvironmentsResponse>;
28
+ export declare function pairCodeEnvironment(payload: {
29
+ name: string;
30
+ controlPlaneId: string;
31
+ }): Promise<t.TCodeEnvironmentPairingResponse>;
32
+ export declare function deleteCodeEnvironment(id: string): Promise<{
33
+ environment: t.TCodeEnvironmentSummary;
34
+ }>;
35
+ export declare function updateCodeEnvironmentSettings({ id, settings, }: {
36
+ id: string;
37
+ settings: config.CodeEnvironmentUserSettings;
38
+ }): Promise<{
39
+ environment: t.TCodeEnvironmentSummary;
40
+ }>;
19
41
  export declare function getFavorites(): Promise<q.TUserFavorite[]>;
20
42
  export declare function updateFavorites(favorites: q.TUserFavorite[]): Promise<q.TUserFavorite[]>;
21
- /**
22
- * Skill favorites (star-a-skill). The backend route is phase 2 — see the
23
- * original UI PR for the client surface. Until then, these resolve with
24
- * an empty list so the UI hooks compile and the Star button is a no-op.
25
- */
26
- export declare function getSkillFavorites(): Promise<string[]>;
27
- export declare function updateSkillFavorites(skillFavorites: string[]): Promise<string[]>;
43
+ /** Tool favorites — starred marketplace items (builtins, tools, MCP servers, skills). */
44
+ export declare function getToolFavorites(): Promise<q.TToolFavorite[]>;
45
+ export declare function addToolFavorite(favorite: q.TToolFavorite): Promise<q.TToolFavorite>;
46
+ export declare function removeToolFavorite(favorite: q.TToolFavorite): Promise<{
47
+ ok: boolean;
48
+ }>;
28
49
  /** Per-user skill active/inactive overrides. */
29
50
  export declare function getSkillStates(): Promise<sk.TSkillStatesResponse>;
30
51
  export declare function updateSkillStates(skillStates: sk.TSkillStatesResponse): Promise<sk.TSkillStatesResponse>;
@@ -45,6 +66,7 @@ export declare function updatePreset(payload: s.TPreset): Promise<s.TPreset>;
45
66
  export declare function deletePreset(arg: s.TPreset | undefined): Promise<m.PresetDeleteResponse>;
46
67
  export declare function getSearchEnabled(): Promise<boolean>;
47
68
  export declare function getUser(): Promise<t.TUser>;
69
+ export declare function updateUserPreferences(preferences: t.TUpdateUserPreferencesRequest): Promise<t.TUpdateUserPreferencesResponse>;
48
70
  export declare function getUserBalance(): Promise<t.TBalanceResponse>;
49
71
  export declare const updateTokenCount: (text: string) => Promise<any>;
50
72
  export declare const login: (payload: t.TLoginUser) => Promise<t.TLoginResponse>;
@@ -58,7 +80,7 @@ export declare const verifyEmail: (payload: t.TVerifyEmail) => Promise<t.VerifyE
58
80
  export declare const resendVerificationEmail: (payload: t.TResendVerificationEmail) => Promise<t.VerifyEmailResponse>;
59
81
  export declare const getAvailablePlugins: () => Promise<s.TPlugin[]>;
60
82
  export declare const updateUserPlugins: (payload: t.TUpdateUserPlugins) => Promise<any>;
61
- export declare const reinitializeMCPServer: (serverName: string) => Promise<any>;
83
+ export declare const reinitializeMCPServer: (serverName: string) => Promise<mcp.MCPReinitializeResponse>;
62
84
  export declare const bindMCPOAuth: (serverName: string) => Promise<{
63
85
  success: boolean;
64
86
  }>;
@@ -69,6 +91,7 @@ export declare const getMCPConnectionStatus: () => Promise<q.MCPConnectionStatus
69
91
  export declare const getMCPServerConnectionStatus: (serverName: string) => Promise<q.MCPServerConnectionStatusResponse>;
70
92
  export declare const getMCPAuthValues: (serverName: string) => Promise<q.MCPAuthValuesResponse>;
71
93
  export declare function cancelMCPOAuth(serverName: string): Promise<m.CancelMCPOAuthResponse>;
94
+ export declare function getMCPOAuthStatus(flowId: string): Promise<mcp.MCPOAuthStatusResponse>;
72
95
  export type StartupConfigOptions = {
73
96
  context?: config.StartupConfigContext;
74
97
  };
@@ -80,7 +103,6 @@ export declare const getStartupConfig: (options?: StartupConfigOptions) => Promi
80
103
  }>;
81
104
  export declare const getAIEndpoints: () => Promise<t.TEndpointsConfig>;
82
105
  export declare const getTokenConfig: () => Promise<t.TTokenConfigMap>;
83
- export declare const getContextProjection: (payload: TContextProjectionRequest) => Promise<TContextUsageEvent | null>;
84
106
  export declare const getModels: () => Promise<t.TModelsConfig>;
85
107
  export declare const createAssistant: ({ version, ...data }: a.AssistantCreateParams) => Promise<a.Assistant>;
86
108
  export declare const getAssistantById: ({ endpoint, assistant_id, version, }: {
@@ -127,8 +149,14 @@ export declare const getFilePreview: (fileId: string) => Promise<f.TFilePreview>
127
149
  export declare const getSharedFilePreview: (shareId: string, fileId: string) => Promise<f.TFilePreview>;
128
150
  export declare const getAgentFiles: (agentId: string) => Promise<f.TFile[]>;
129
151
  export declare const getFileConfig: () => Promise<TFileConfig>;
130
- export declare const uploadImage: (data: FormData, signal?: AbortSignal | null) => Promise<f.TFileUpload>;
131
- export declare const uploadFile: (data: FormData, signal?: AbortSignal | null) => Promise<f.TFileUpload>;
152
+ export declare const uploadImage: (data: FormData, signal?: AbortSignal | null, sseEnabled?: boolean) => Promise<f.TFileUpload>;
153
+ export declare const uploadFile: (data: FormData, signal?: AbortSignal | null, sseEnabled?: boolean) => Promise<f.TFileUpload>;
154
+ /**
155
+ * Marks uploaded files as used (owner-scoped TTL touch) so the upload-window
156
+ * TTL cannot reap attachments held in a client-side queue during a long run.
157
+ * Best-effort: callers fire-and-forget — send-time marking is the backstop.
158
+ */
159
+ export declare const markFilesUsage: (body: f.TFilesUsageBody) => Promise<f.TFilesUsageResponse>;
132
160
  export declare const updateAction: (data: m.UpdateActionVariables) => Promise<m.UpdateActionResponse>;
133
161
  export declare function getActions(): Promise<ag.Action[]>;
134
162
  export declare const deleteAction: ({ assistant_id, action_id, model, version, endpoint, }: m.DeleteActionVariables & {
@@ -144,6 +172,9 @@ export declare const getAgentById: ({ agent_id }: {
144
172
  export declare const getExpandedAgentById: ({ agent_id }: {
145
173
  agent_id: string;
146
174
  }) => Promise<a.Agent>;
175
+ export declare const getAgentVersions: ({ agent_id }: {
176
+ agent_id: string;
177
+ }) => Promise<a.Agent[]>;
147
178
  export declare const updateAgent: ({ agent_id, data, }: {
148
179
  agent_id: string;
149
180
  data: a.AgentUpdateParams;
@@ -229,6 +260,7 @@ export declare const getVoices: () => Promise<f.VoiceResponse>;
229
260
  export declare const getCustomConfigSpeech: () => Promise<t.TCustomConfigSpeechResponse>;
230
261
  export declare function duplicateConversation(payload: t.TDuplicateConvoRequest): Promise<t.TDuplicateConvoResponse>;
231
262
  export declare function forkConversation(payload: t.TForkConvoRequest): Promise<t.TForkConvoResponse>;
263
+ export declare function forkSharedConversation(shareId: string, targetMessageIndex?: number, shareRevision?: string): Promise<t.TForkConvoResponse>;
232
264
  export declare function deleteConversation(payload: t.TDeleteConversationRequest): Promise<unknown>;
233
265
  export declare function clearAllConversations(): Promise<unknown>;
234
266
  export declare const listConversations: (params?: q.ConversationListParams) => Promise<q.ConversationListResponse>;
@@ -236,6 +268,7 @@ export declare function getConversations(cursor: string): Promise<t.TGetConversa
236
268
  export declare function getConversationById(id: string): Promise<s.TConversation>;
237
269
  export declare function updateConversation(payload: t.TUpdateConversationRequest): Promise<t.TUpdateConversationResponse>;
238
270
  export declare function archiveConversation(payload: t.TArchiveConversationRequest): Promise<t.TArchiveConversationResponse>;
271
+ export declare function archiveAllConversations(): Promise<t.TArchiveAllConversationsResponse>;
239
272
  export declare function listProjects(params?: q.ProjectListParams): Promise<q.ProjectListResponse>;
240
273
  export declare function createProject(payload: t.TCreateChatProjectRequest): Promise<t.TChatProject>;
241
274
  export declare function getProjectById(projectId: string): Promise<t.TChatProject>;
@@ -250,6 +283,10 @@ export declare function updateMessageContent(payload: t.TUpdateMessageContent):
250
283
  export declare const editArtifact: ({ messageId, ...params }: m.TEditArtifactRequest) => Promise<m.TEditArtifactResponse>;
251
284
  export declare const branchMessage: (payload: m.TBranchMessageRequest) => Promise<m.TBranchMessageResponse>;
252
285
  export declare function getMessagesByConvoId(conversationId: string): Promise<s.TMessage[]>;
286
+ export declare function getMessageById(conversationId: string, messageId: string): Promise<s.TMessage[]>;
287
+ export declare function getParentSubagents(parentConversationId: string): Promise<t.ParentSubagentIndex>;
288
+ export declare function getSubagentThread(parentConversationId: string, threadId: string, taskId?: string, cursor?: string): Promise<t.SubagentThreadView>;
289
+ export declare function controlSubagentTask(parentConversationId: string, threadId: string, body: t.SubagentControlRequest): Promise<t.SubagentControlResponse>;
253
290
  export declare function getPrompt(id: string): Promise<{
254
291
  prompt: t.TPrompt;
255
292
  }>;
@@ -270,6 +307,17 @@ export declare function deletePromptGroup(id: string): Promise<t.TDeletePromptGr
270
307
  export declare function getCategories(): Promise<t.TGetCategoriesResponse>;
271
308
  export declare function getRandomPrompts(variables: t.TGetRandomPromptsRequest): Promise<t.TGetRandomPromptsResponse>;
272
309
  export declare function listSkills(params?: sk.TSkillListRequest): Promise<sk.TSkillListResponse>;
310
+ export declare function getSchedules(): Promise<sch.TSchedulesResponse>;
311
+ export declare function enqueueAgentQueuedTurn(payload: qt.TEnqueueAgentQueuedTurnRequest): Promise<qt.TEnqueueAgentQueuedTurnResponse>;
312
+ export declare function listAgentQueuedTurns(conversationId: string, clientRequestIds?: string[]): Promise<qt.TListAgentQueuedTurnsResponse>;
313
+ export declare function cancelAgentQueuedTurn(queuedTurnId: string): Promise<qt.TCancelAgentQueuedTurnResponse>;
314
+ export declare function getSchedule(id: string): Promise<sch.TSchedule>;
315
+ export declare function createSchedule(payload: sch.TCreateSchedule): Promise<sch.TSchedule>;
316
+ export declare function updateSchedule(id: string, payload: sch.TUpdateSchedule): Promise<sch.TSchedule>;
317
+ export declare function deleteSchedule(id: string): Promise<{
318
+ id: string;
319
+ }>;
320
+ export declare function runScheduleNow(id: string): Promise<sch.TScheduleRunNowResponse>;
273
321
  export declare function getSkill(id: string): Promise<sk.TSkill>;
274
322
  export declare function createSkill(payload: sk.TCreateSkill): Promise<sk.TSkill>;
275
323
  export declare function updateSkill(variables: sk.TUpdateSkillVariables): Promise<sk.TUpdateSkillResponse>;
@@ -345,8 +393,10 @@ export declare function disableTwoFactor(payload?: t.TDisable2FARequest): Promis
345
393
  export declare function regenerateBackupCodes(payload?: t.TRegenerateBackupCodesRequest): Promise<t.TRegenerateBackupCodesResponse>;
346
394
  export declare function verifyTwoFactorTemp(payload: t.TVerify2FATempRequest): Promise<t.TVerify2FATempResponse>;
347
395
  export declare const getMemories: () => Promise<q.MemoriesResponse>;
348
- export declare const deleteMemory: (key: string) => Promise<void>;
349
- export declare const updateMemory: (key: string, value: string, originalKey?: string) => Promise<q.TUserMemory>;
396
+ export declare const deleteMemory: (key: string, agentId?: string) => Promise<q.DeleteMemoryResponse>;
397
+ export declare const deleteMemoryById: (id: string, agentId?: string) => Promise<q.DeleteMemoryResponse>;
398
+ export declare const updateMemory: (key: string, value: string, originalKey?: string, agentId?: string) => Promise<q.UpdateMemoryResponse>;
399
+ export declare const updateMemoryById: (id: string, value: string, key?: string, agentId?: string) => Promise<q.UpdateMemoryResponse>;
350
400
  export declare const updateMemoryPreferences: (preferences: {
351
401
  memories: boolean;
352
402
  }) => Promise<{
@@ -358,6 +408,7 @@ export declare const updateMemoryPreferences: (preferences: {
358
408
  export declare const createMemory: (data: {
359
409
  key: string;
360
410
  value: string;
411
+ agentId?: string;
361
412
  }) => Promise<{
362
413
  created: boolean;
363
414
  memory: q.TUserMemory;
@@ -13,7 +13,7 @@ export declare const FEEDBACK_TAGS: TFeedbackTag[];
13
13
  export declare function getTagsForRating(rating: TFeedbackRating): TFeedbackTag[];
14
14
  export declare const feedbackTagKeySchema: z.ZodEnum<["not_matched", "inaccurate", "bad_style", "missing_image", "unjustified_refusal", "not_helpful", "other", "accurate_reliable", "creative_solution", "clear_well_written", "attention_to_detail"]>;
15
15
  export declare const feedbackRatingSchema: z.ZodEnum<["thumbsUp", "thumbsDown"]>;
16
- export declare const feedbackSchema: z.ZodObject<{
16
+ export declare const feedbackSchema: z.ZodEffects<z.ZodObject<{
17
17
  rating: z.ZodEnum<["thumbsUp", "thumbsDown"]>;
18
18
  tag: z.ZodEnum<["not_matched", "inaccurate", "bad_style", "missing_image", "unjustified_refusal", "not_helpful", "other", "accurate_reliable", "creative_solution", "clear_well_written", "attention_to_detail"]>;
19
19
  text: z.ZodOptional<z.ZodString>;
@@ -25,6 +25,14 @@ export declare const feedbackSchema: z.ZodObject<{
25
25
  rating: "thumbsUp" | "thumbsDown";
26
26
  tag: "not_matched" | "inaccurate" | "bad_style" | "missing_image" | "unjustified_refusal" | "not_helpful" | "other" | "accurate_reliable" | "creative_solution" | "clear_well_written" | "attention_to_detail";
27
27
  text?: string | undefined;
28
+ }>, {
29
+ rating: "thumbsUp" | "thumbsDown";
30
+ tag: "not_matched" | "inaccurate" | "bad_style" | "missing_image" | "unjustified_refusal" | "not_helpful" | "other" | "accurate_reliable" | "creative_solution" | "clear_well_written" | "attention_to_detail";
31
+ text?: string | undefined;
32
+ }, {
33
+ rating: "thumbsUp" | "thumbsDown";
34
+ tag: "not_matched" | "inaccurate" | "bad_style" | "missing_image" | "unjustified_refusal" | "not_helpful" | "other" | "accurate_reliable" | "creative_solution" | "clear_well_written" | "attention_to_detail";
35
+ text?: string | undefined;
28
36
  }>;
29
37
  export type TMinimalFeedback = z.infer<typeof feedbackSchema>;
30
38
  export type TFeedback = {
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import type { EndpointFileConfig, FileConfig } from './types/files';
2
+ import type { EndpointFileConfig, FileConfig, RegexLike } from './types/files';
3
3
  export declare const supportsFiles: {
4
4
  openAI: boolean;
5
5
  google: boolean;
@@ -21,8 +21,21 @@ export type BedrockDocumentFormat = 'pdf' | 'csv' | 'doc' | 'docx' | 'xls' | 'xl
21
21
  /** Maps MIME types to Bedrock Converse API document format values */
22
22
  export declare const bedrockDocumentFormats: Record<string, BedrockDocumentFormat>;
23
23
  export declare const isBedrockDocumentType: (mimeType?: string) => boolean;
24
+ /** MIME types Bedrock's Converse document path can send to the model (mirrors `bedrockDocumentFormats`). */
25
+ export declare const bedrockDocumentMimeTypes: readonly string[];
24
26
  /** File extensions accepted by Bedrock document uploads (for input accept attributes) */
25
27
  export declare const bedrockDocumentExtensions = ".pdf,.csv,.doc,.docx,.xls,.xlsx,.html,.htm,.txt,.md,application/pdf,text/csv,application/csv,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/html,text/plain,text/markdown";
28
+ /**
29
+ * MIME types the Anthropic Messages API accepts as a plain-text document source
30
+ * (`source.type: 'text'`)
31
+ */
32
+ export declare const isAnthropicTextDocumentType: (mimeType?: string) => boolean;
33
+ /**
34
+ * MIME types the Anthropic Messages API document path can send to the model
35
+ * (mirrors `isBedrockDocumentType`): PDF via base64, textual types via a
36
+ * plain-text document source. All other types are rejected with a provider 400.
37
+ */
38
+ export declare const isAnthropicDocumentType: (mimeType?: string) => boolean;
26
39
  export declare const excelMimeTypes: RegExp;
27
40
  export declare const textMimeTypes: RegExp;
28
41
  export declare const applicationMimeTypes: RegExp;
@@ -106,6 +119,7 @@ export declare const fileConfig: {
106
119
  maxWidth: number;
107
120
  maxHeight: number;
108
121
  quality: number;
122
+ enforced: boolean;
109
123
  };
110
124
  ocr: {
111
125
  supportedMimeTypes: RegExp[];
@@ -116,7 +130,7 @@ export declare const fileConfig: {
116
130
  stt: {
117
131
  supportedMimeTypes: RegExp[];
118
132
  };
119
- checkType: (fileType: string, supportedTypes?: RegExp[]) => boolean;
133
+ checkType: (fileType: string, supportedTypes?: RegexLike[]) => boolean;
120
134
  };
121
135
  export declare const endpointFileConfigSchema: z.ZodObject<{
122
136
  disabled: z.ZodOptional<z.ZodBoolean>;
@@ -269,10 +283,33 @@ export declare const fileConfigSchema: z.ZodObject<{
269
283
  } | undefined;
270
284
  }>;
271
285
  export type TFileConfig = z.infer<typeof fileConfigSchema>;
272
- /** Helper function to safely convert string patterns to RegExp objects */
273
- export declare const convertStringsToRegex: (patterns: string[]) => RegExp[];
286
+ /** Override the MIME-pattern compiler; the server injects a linear-time engine at startup. */
287
+ export declare const setFileConfigRegexCompiler: (compile: (pattern: string) => RegexLike) => void;
288
+ /** Helper function to safely convert string patterns to matcher objects */
289
+ export declare const convertStringsToRegex: (patterns: string[]) => RegexLike[];
274
290
  /** Detects whether the given MIME type patterns accept all file types (e.g., `.*` or `.+`). */
275
- export declare const isPermissiveMimeConfig: (types?: RegExp[]) => boolean;
291
+ export declare const isPermissiveMimeConfig: (types?: RegexLike[]) => boolean;
292
+ /** The kind of content a provider upload path can actually send to the model. */
293
+ export type MimeUploadCategory = 'image' | 'document' | 'audio' | 'video';
294
+ /** Describes what an upload path can send, used to scope a configured allowlist to selectable files. */
295
+ export interface MimeUploadCapability {
296
+ /** Content categories the path forwards to the model. */
297
+ categories: ReadonlyArray<MimeUploadCategory>;
298
+ /** When `document` is permitted, restrict document types to this set (e.g. Bedrock formats); default: all. */
299
+ documentMimeTypes?: readonly string[];
300
+ }
301
+ /**
302
+ * Resolves the file-input `accept` value for a configured `supportedMimeTypes` allowlist, scoped to
303
+ * what the current upload path (`capability`) can send to the model.
304
+ * - `undefined` for the built-in default or a config that can't be represented safely, so callers
305
+ * keep their provider-specific filter.
306
+ * - `''` for permissive configs (e.g. `.*`), leaving the picker unrestricted.
307
+ * - a translated `accept` string for a recognized finite allowlist (images, PDFs, Office docs, etc.).
308
+ *
309
+ * The picker `accept` is a UX convenience, not a security boundary: the backend still enforces
310
+ * `supportedMimeTypes` on upload.
311
+ */
312
+ export declare const getConfiguredMimeAccept: (types: RegexLike[] | undefined, capability: MimeUploadCapability) => string | undefined;
276
313
  export declare function getEndpointFileConfig(params: {
277
314
  fileConfig?: FileConfig | null;
278
315
  endpoint?: string | null;