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
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import type { SubagentIdentity, ContentTypes } from './runs';
|
|
2
|
+
import type { Agents } from './agents';
|
|
3
|
+
import type { TFile } from './files';
|
|
4
|
+
/**
|
|
5
|
+
* Details of the Code Interpreter tool call the run step was involved in.
|
|
6
|
+
* Includes the tool call ID, the code interpreter definition, and the type of tool call.
|
|
7
|
+
*/
|
|
8
|
+
export type CodeToolCall = {
|
|
9
|
+
id: string;
|
|
10
|
+
code_interpreter: {
|
|
11
|
+
input: string;
|
|
12
|
+
outputs: Array<Record<string, unknown>>;
|
|
13
|
+
};
|
|
14
|
+
type: 'code_interpreter';
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Details of a Function tool call the run step was involved in.
|
|
18
|
+
* Includes the tool call ID, the function definition, and the type of tool call.
|
|
19
|
+
*/
|
|
20
|
+
export type FunctionToolCall = {
|
|
21
|
+
id: string;
|
|
22
|
+
function: {
|
|
23
|
+
arguments: string;
|
|
24
|
+
name: string;
|
|
25
|
+
output: string | null;
|
|
26
|
+
};
|
|
27
|
+
type: 'function';
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Details of a Retrieval tool call the run step was involved in.
|
|
31
|
+
* Includes the tool call ID and the type of tool call.
|
|
32
|
+
*/
|
|
33
|
+
export type RetrievalToolCall = {
|
|
34
|
+
id: string;
|
|
35
|
+
retrieval: unknown;
|
|
36
|
+
type: 'retrieval';
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Details of a Retrieval tool call the run step was involved in.
|
|
40
|
+
* Includes the tool call ID and the type of tool call.
|
|
41
|
+
*/
|
|
42
|
+
export type FileSearchToolCall = {
|
|
43
|
+
id: string;
|
|
44
|
+
file_search: unknown;
|
|
45
|
+
type: 'file_search';
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Details of the tool calls involved in a run step.
|
|
49
|
+
* Can be associated with one of three types of tools: `code_interpreter`, `retrieval`, or `function`.
|
|
50
|
+
*/
|
|
51
|
+
export type ToolCallsStepDetails = {
|
|
52
|
+
tool_calls: Array<CodeToolCall | RetrievalToolCall | FileSearchToolCall | FunctionToolCall>;
|
|
53
|
+
type: 'tool_calls';
|
|
54
|
+
};
|
|
55
|
+
export type ImageFile = TFile & {
|
|
56
|
+
/**
|
|
57
|
+
* The [File](https://platform.openai.com/docs/api-reference/files) ID of the image
|
|
58
|
+
* in the message content.
|
|
59
|
+
*/
|
|
60
|
+
file_id: string;
|
|
61
|
+
filename: string;
|
|
62
|
+
filepath: string;
|
|
63
|
+
height: number;
|
|
64
|
+
width: number;
|
|
65
|
+
/**
|
|
66
|
+
* Prompt used to generate the image if applicable.
|
|
67
|
+
*/
|
|
68
|
+
prompt?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Additional metadata used to generate or about the image/tool_call.
|
|
71
|
+
*/
|
|
72
|
+
metadata?: Record<string, unknown>;
|
|
73
|
+
};
|
|
74
|
+
export type FileCitation = {
|
|
75
|
+
end_index: number;
|
|
76
|
+
file_citation: FileCitationDetails;
|
|
77
|
+
start_index: number;
|
|
78
|
+
text: string;
|
|
79
|
+
type: 'file_citation';
|
|
80
|
+
};
|
|
81
|
+
export type FileCitationDetails = {
|
|
82
|
+
file_id: string;
|
|
83
|
+
quote: string;
|
|
84
|
+
};
|
|
85
|
+
export type FilePath = {
|
|
86
|
+
end_index: number;
|
|
87
|
+
file_path: FilePathDetails;
|
|
88
|
+
start_index: number;
|
|
89
|
+
text: string;
|
|
90
|
+
type: 'file_path';
|
|
91
|
+
};
|
|
92
|
+
export type FilePathDetails = {
|
|
93
|
+
file_id: string;
|
|
94
|
+
};
|
|
95
|
+
export type Text = {
|
|
96
|
+
annotations?: Array<FileCitation | FilePath>;
|
|
97
|
+
value: string;
|
|
98
|
+
};
|
|
99
|
+
export declare enum AnnotationTypes {
|
|
100
|
+
FILE_CITATION = "file_citation",
|
|
101
|
+
FILE_PATH = "file_path"
|
|
102
|
+
}
|
|
103
|
+
export declare enum StepStatus {
|
|
104
|
+
IN_PROGRESS = "in_progress",
|
|
105
|
+
CANCELLED = "cancelled",
|
|
106
|
+
FAILED = "failed",
|
|
107
|
+
COMPLETED = "completed",
|
|
108
|
+
EXPIRED = "expired"
|
|
109
|
+
}
|
|
110
|
+
export declare enum MessageContentTypes {
|
|
111
|
+
TEXT = "text",
|
|
112
|
+
IMAGE_FILE = "image_file"
|
|
113
|
+
}
|
|
114
|
+
export type PartMetadata = {
|
|
115
|
+
/** Host-resolved execution identity for a saved subagent invocation. */
|
|
116
|
+
subagentIdentity?: SubagentIdentity;
|
|
117
|
+
progress?: number;
|
|
118
|
+
asset_pointer?: string;
|
|
119
|
+
status?: string;
|
|
120
|
+
action?: boolean;
|
|
121
|
+
auth?: string;
|
|
122
|
+
expires_at?: number;
|
|
123
|
+
/** Index indicating parallel sibling content (same stepIndex in multi-agent runs) */
|
|
124
|
+
siblingIndex?: number;
|
|
125
|
+
/** Agent ID for parallel agent rendering - identifies which agent produced this content */
|
|
126
|
+
agentId?: string;
|
|
127
|
+
/** Group ID for parallel content - parts with same groupId are displayed in columns */
|
|
128
|
+
groupId?: number;
|
|
129
|
+
/**
|
|
130
|
+
* Terminal lifecycle status of the run step that produced this part, from
|
|
131
|
+
* `on_run_step_closed`. Distinct from `status`, which is already claimed by
|
|
132
|
+
* activity-label and question-form parts. Absent on parts predating the
|
|
133
|
+
* event or from endpoints that do not emit it, in which case renderers fall
|
|
134
|
+
* back to inferring "stopped" from `progress` and `isSubmitting`.
|
|
135
|
+
*/
|
|
136
|
+
runStepStatus?: Agents.RunStepClosedStatus;
|
|
137
|
+
/**
|
|
138
|
+
* Wall-clock milliseconds the run step took, derived from the same
|
|
139
|
+
* `on_run_step_closed` event as {@link runStepStatus} via
|
|
140
|
+
* `getRunStepDurationMs`. Only written when the event carried both
|
|
141
|
+
* timestamps and they agree in order — so its absence means "not
|
|
142
|
+
* derivable", never "instant". The raw value is persisted unfiltered;
|
|
143
|
+
* whether it is worth showing (`isReportableRunStepDuration`) is decided
|
|
144
|
+
* at render time.
|
|
145
|
+
*/
|
|
146
|
+
runStepDurationMs?: number;
|
|
147
|
+
/**
|
|
148
|
+
* Stamped by the background harvester when a detached task's final output
|
|
149
|
+
* replaces the dispatch handle in `tool_call.output`. The handle JSON and
|
|
150
|
+
* the live status-marker attachment are both transient, so after the patch
|
|
151
|
+
* (or a reload) this is the only signal that the call ran in the
|
|
152
|
+
* background — renderers use it to keep treating {@link runStepDurationMs}
|
|
153
|
+
* as dispatch time rather than the task's runtime.
|
|
154
|
+
*/
|
|
155
|
+
backgrounded?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Content index this part occupied while its run streamed. The aggregator
|
|
158
|
+
* writes parts at provider-source indexes, so the streamed array is sparse;
|
|
159
|
+
* persistence compacts it and every part after a hole shifts down. The
|
|
160
|
+
* client's final handler stamps the streamed position onto the compacted
|
|
161
|
+
* parts it adopts, so index-derived render identity survives the swap
|
|
162
|
+
* instead of remounting the settled message. Client-only and absent
|
|
163
|
+
* everywhere else — persisted content never carries it.
|
|
164
|
+
*/
|
|
165
|
+
streamedIndex?: number;
|
|
166
|
+
};
|
|
167
|
+
/** Metadata for parallel content rendering - subset of PartMetadata */
|
|
168
|
+
export type ContentMetadata = Pick<PartMetadata, 'agentId' | 'groupId' | 'streamedIndex'>;
|
|
169
|
+
export type ContentPart = (CodeToolCall | RetrievalToolCall | FileSearchToolCall | FunctionToolCall | Agents.AgentToolCall | ImageFile | Text) & PartMetadata;
|
|
170
|
+
export type TextData = (Text & PartMetadata) | undefined;
|
|
171
|
+
export type SummaryContentPart = {
|
|
172
|
+
type: ContentTypes.SUMMARY;
|
|
173
|
+
content?: Array<{
|
|
174
|
+
type: ContentTypes.TEXT;
|
|
175
|
+
text: string;
|
|
176
|
+
}>;
|
|
177
|
+
tokenCount?: number;
|
|
178
|
+
summarizing?: boolean;
|
|
179
|
+
/** A summarize round that ended in error. Partial deltas already streamed
|
|
180
|
+
* into this slot are kept, so the renderer needs this to avoid presenting
|
|
181
|
+
* truncated text under the "Conversation summarized" label. */
|
|
182
|
+
failed?: boolean;
|
|
183
|
+
/** Set when the user compacted the context manually rather than the
|
|
184
|
+
* automatic detour firing on context pressure. */
|
|
185
|
+
initiatedBy?: 'user';
|
|
186
|
+
summaryVersion?: number;
|
|
187
|
+
model?: string;
|
|
188
|
+
provider?: string;
|
|
189
|
+
createdAt?: string;
|
|
190
|
+
boundary?: {
|
|
191
|
+
messageId: string;
|
|
192
|
+
contentIndex: number;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* A user steering message injected mid-run at a tool-batch boundary.
|
|
197
|
+
* Persisted inline in the response message's content array (keyed by the
|
|
198
|
+
* type name like `text`/`think` so token counting reads it for free);
|
|
199
|
+
* replayed as a user message on subsequent turns by `formatAgentMessages`.
|
|
200
|
+
*/
|
|
201
|
+
export type SteerContentPart = {
|
|
202
|
+
type: ContentTypes.STEER;
|
|
203
|
+
steer: string;
|
|
204
|
+
steerId?: string;
|
|
205
|
+
/** Stable optimistic-client id used to settle a POST whose response was lost. */
|
|
206
|
+
clientSteerId?: string;
|
|
207
|
+
createdAt?: number;
|
|
208
|
+
/** Attachments steered with the message; re-encoded per turn on replay
|
|
209
|
+
* like any other user-message media (refs only, never encoded data). */
|
|
210
|
+
files?: Partial<TFile>[];
|
|
211
|
+
/** Quoted excerpts steered with the message, persisted separately from the
|
|
212
|
+
* typed text (mirroring `TMessage.quotes`) so the UI renders them as
|
|
213
|
+
* reference blocks; merged into the model-bound user turn on every replay. */
|
|
214
|
+
quotes?: string[];
|
|
215
|
+
};
|
|
216
|
+
export type TMessageContentParts = ({
|
|
217
|
+
type: ContentTypes.ERROR;
|
|
218
|
+
text?: string | TextData;
|
|
219
|
+
error?: string;
|
|
220
|
+
/** Set when this failure is what a manual compaction produced instead of a
|
|
221
|
+
* summary. The turn has no other record of having been one, so the rerun
|
|
222
|
+
* controls read it the same way they read a summary's marker. */
|
|
223
|
+
initiatedBy?: 'user';
|
|
224
|
+
} & ContentMetadata) | ({
|
|
225
|
+
type: ContentTypes.THINK;
|
|
226
|
+
think?: string | TextData;
|
|
227
|
+
/** Generated orientation for this user-visible reasoning step. */
|
|
228
|
+
reasoning_label?: string;
|
|
229
|
+
/** Stable SDK run-step identity used to correlate live revisions. */
|
|
230
|
+
reasoning_label_step_id?: string;
|
|
231
|
+
/** Durable provider-call count used to enforce the per-run cost cap across resumes. */
|
|
232
|
+
reasoning_label_attempts?: number;
|
|
233
|
+
/** Visible reasoning length included in this step's latest provider call. */
|
|
234
|
+
reasoning_label_submitted_chars?: number;
|
|
235
|
+
/** Monotonic provider-call revision; gaps are allowed after unsuccessful attempts. */
|
|
236
|
+
reasoning_label_revision?: number;
|
|
237
|
+
/** Whether the reasoning step can still produce a newer label. */
|
|
238
|
+
reasoning_label_status?: 'streaming' | 'complete';
|
|
239
|
+
/** The reasoning happened but its text is not available to this view
|
|
240
|
+
* (e.g. detached subagent projections retain only a marker). */
|
|
241
|
+
reasoning_unavailable?: boolean;
|
|
242
|
+
} & ContentMetadata) | (SteerContentPart & ContentMetadata) | ({
|
|
243
|
+
type: ContentTypes.TEXT;
|
|
244
|
+
text?: string | TextData;
|
|
245
|
+
tool_call_ids?: string[];
|
|
246
|
+
/** Open Responses semantic channel for assistant text. */
|
|
247
|
+
phase?: 'commentary' | 'final_answer';
|
|
248
|
+
} & ContentMetadata) | ({
|
|
249
|
+
type: ContentTypes.TOOL_CALL;
|
|
250
|
+
tool_call: (CodeToolCall | RetrievalToolCall | FileSearchToolCall | FunctionToolCall | Agents.AgentToolCall) & PartMetadata;
|
|
251
|
+
} & ContentMetadata) | ({
|
|
252
|
+
type: ContentTypes.IMAGE_FILE;
|
|
253
|
+
image_file: ImageFile & PartMetadata;
|
|
254
|
+
} & ContentMetadata) | (SummaryContentPart & ContentMetadata) | ({
|
|
255
|
+
/** One-line LLM-generated note describing a completed tool batch. UI-only:
|
|
256
|
+
* never sent to the model (stripped before payload formatting). */
|
|
257
|
+
type: ContentTypes.ACTIVITY_LABEL;
|
|
258
|
+
activity_label?: string;
|
|
259
|
+
/** Missing means the legacy/per-batch activity label. */
|
|
260
|
+
activity_label_type?: 'phase';
|
|
261
|
+
tool_call_ids?: string[];
|
|
262
|
+
/** Parent phase bounds and telemetry. */
|
|
263
|
+
activity_start_index?: number;
|
|
264
|
+
/** Exclusive end of the grouped content; may precede the marker itself. */
|
|
265
|
+
activity_end_index?: number;
|
|
266
|
+
activity_count?: number;
|
|
267
|
+
agent_ids?: string[];
|
|
268
|
+
/** ok = all tools succeeded, failed = all failed, partial = mixed. */
|
|
269
|
+
status?: 'ok' | 'partial' | 'failed';
|
|
270
|
+
pending?: boolean;
|
|
271
|
+
} & ContentMetadata) | (Agents.AgentUpdate & ContentMetadata) | (Agents.MessageContentImageUrl & ContentMetadata) | (Agents.MessageContentVideoUrl & ContentMetadata) | (Agents.MessageContentInputAudio & ContentMetadata);
|
|
272
|
+
export type StreamContentData = TMessageContentParts & {
|
|
273
|
+
/** The index of the current content part */
|
|
274
|
+
index: number;
|
|
275
|
+
/** The current text content was already served but edited to replace elements therein */
|
|
276
|
+
edited?: boolean;
|
|
277
|
+
};
|
|
278
|
+
export type TContentData = StreamContentData & {
|
|
279
|
+
messageId: string;
|
|
280
|
+
conversationId: string;
|
|
281
|
+
userMessageId: string;
|
|
282
|
+
thread_id: string;
|
|
283
|
+
stream?: boolean;
|
|
284
|
+
};
|
|
285
|
+
export declare const hostImageIdSuffix = "_host_copy";
|
|
286
|
+
export declare const hostImageNamePrefix = "host_copy_";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { TDefaultLLMDeliveryPathConfig } from '../file-config';
|
|
1
2
|
import type { CodeEnvRef, CodeEnvRefMap } from '../codeEnvRef';
|
|
2
|
-
import { EToolResources } from './
|
|
3
|
+
import { EToolResources } from './tools';
|
|
3
4
|
export declare enum FileSources {
|
|
4
5
|
local = "local",
|
|
5
6
|
firebase = "firebase",
|
|
@@ -26,6 +27,7 @@ export declare enum FileContext {
|
|
|
26
27
|
image_generation = "image_generation",
|
|
27
28
|
assistants_output = "assistants_output",
|
|
28
29
|
message_attachment = "message_attachment",
|
|
30
|
+
run_artifact = "run_artifact",
|
|
29
31
|
skill_file = "skill_file",
|
|
30
32
|
filename = "filename",
|
|
31
33
|
updatedAt = "updatedAt",
|
|
@@ -44,15 +46,26 @@ export type EndpointFileConfig = {
|
|
|
44
46
|
fileSizeLimit?: number;
|
|
45
47
|
totalSizeLimit?: number;
|
|
46
48
|
supportedMimeTypes?: RegexLike[];
|
|
49
|
+
defaultLLMDeliveryPath?: TDefaultLLMDeliveryPathConfig;
|
|
50
|
+
legacyFileUploadUX?: boolean;
|
|
51
|
+
/** Delivers the text extracted at upload for a file routed to tools (`none`) on a turn that
|
|
52
|
+
* runs no tool able to read it. Off by default, which leaves such a file out of the prompt. */
|
|
53
|
+
textFallbackWithoutTools?: boolean;
|
|
47
54
|
};
|
|
48
55
|
export type FileConfig = {
|
|
49
56
|
endpoints: {
|
|
50
57
|
[key: string]: EndpointFileConfig;
|
|
51
58
|
};
|
|
52
59
|
skills?: {
|
|
60
|
+
/** Maximum concurrent blob deletions during failed archive import cleanup. */
|
|
61
|
+
importCleanupConcurrency?: number;
|
|
53
62
|
fileSizeLimit?: number;
|
|
54
63
|
};
|
|
55
64
|
fileTokenLimit?: number;
|
|
65
|
+
/** Maximum aggregate model-bound attachment bytes admitted into one agent turn. */
|
|
66
|
+
fileContextSizeLimit?: number;
|
|
67
|
+
/** Maximum aggregate extracted-text characters admitted into one agent turn. */
|
|
68
|
+
fileContextCharLimit?: number;
|
|
56
69
|
serverFileSizeLimit?: number;
|
|
57
70
|
avatarSizeLimit?: number;
|
|
58
71
|
clientImageResize?: {
|
|
@@ -73,16 +86,25 @@ export type FileConfig = {
|
|
|
73
86
|
supportedMimeTypes?: RegexLike[];
|
|
74
87
|
};
|
|
75
88
|
checkType?: (fileType: string, supportedTypes: RegexLike[]) => boolean;
|
|
89
|
+
defaultLLMDeliveryPath?: TDefaultLLMDeliveryPathConfig;
|
|
90
|
+
legacyFileUploadUX?: boolean;
|
|
91
|
+
/** Delivers the text extracted at upload for a file routed to tools (`none`) on a turn that
|
|
92
|
+
* runs no tool able to read it. Off by default, which leaves such a file out of the prompt. */
|
|
93
|
+
textFallbackWithoutTools?: boolean;
|
|
76
94
|
};
|
|
77
95
|
export type FileConfigInput = {
|
|
78
96
|
endpoints?: {
|
|
79
97
|
[key: string]: EndpointFileConfig;
|
|
80
98
|
};
|
|
81
99
|
skills?: {
|
|
100
|
+
/** Maximum concurrent blob deletions during failed archive import cleanup. */
|
|
101
|
+
importCleanupConcurrency?: number;
|
|
82
102
|
fileSizeLimit?: number;
|
|
83
103
|
};
|
|
84
104
|
serverFileSizeLimit?: number;
|
|
85
105
|
avatarSizeLimit?: number;
|
|
106
|
+
fileContextSizeLimit?: number;
|
|
107
|
+
fileContextCharLimit?: number;
|
|
86
108
|
clientImageResize?: {
|
|
87
109
|
enabled?: boolean;
|
|
88
110
|
maxWidth?: number;
|
|
@@ -99,6 +121,23 @@ export type FileConfigInput = {
|
|
|
99
121
|
supportedMimeTypes?: string[];
|
|
100
122
|
};
|
|
101
123
|
checkType?: (fileType: string, supportedTypes: RegexLike[]) => boolean;
|
|
124
|
+
defaultLLMDeliveryPath?: TDefaultLLMDeliveryPathConfig;
|
|
125
|
+
legacyFileUploadUX?: boolean;
|
|
126
|
+
/** Delivers the text extracted at upload for a file routed to tools (`none`) on a turn that
|
|
127
|
+
* runs no tool able to read it. Off by default, which leaves such a file out of the prompt. */
|
|
128
|
+
textFallbackWithoutTools?: boolean;
|
|
129
|
+
};
|
|
130
|
+
/** The immutable origin of a file explicitly published from an agent execution. */
|
|
131
|
+
export type RunFileProvenance = {
|
|
132
|
+
runId: string;
|
|
133
|
+
executionId: string;
|
|
134
|
+
agentId: string;
|
|
135
|
+
parentExecutionId?: string;
|
|
136
|
+
parentAgentId?: string;
|
|
137
|
+
recipientAgentIds?: string[];
|
|
138
|
+
sourceFileId: string;
|
|
139
|
+
publishedAt: string;
|
|
140
|
+
inputFileIds: string[];
|
|
102
141
|
};
|
|
103
142
|
export type TFile = {
|
|
104
143
|
_id?: string;
|
|
@@ -150,6 +189,7 @@ export type TFile = {
|
|
|
150
189
|
*/
|
|
151
190
|
previewError?: string;
|
|
152
191
|
metadata?: {
|
|
192
|
+
runFile?: RunFileProvenance;
|
|
153
193
|
fileIdentifier?: string;
|
|
154
194
|
/**
|
|
155
195
|
* Structured form of `fileIdentifier`. Persisted alongside the
|
|
@@ -160,7 +200,14 @@ export type TFile = {
|
|
|
160
200
|
codeEnvRefs?: CodeEnvRefMap;
|
|
161
201
|
/** Dispatch-order stamp for the current source artifact generation. */
|
|
162
202
|
sourceDispatchedAt?: number;
|
|
203
|
+
/** Vector namespaces this file has been embedded into. */
|
|
204
|
+
embeddedEntities?: string[];
|
|
205
|
+
/** The user named this destination, so absent ones were declined. */
|
|
206
|
+
destinationChosen?: boolean;
|
|
207
|
+
/** The type the delivery route was resolved against, when conversion changed it. */
|
|
208
|
+
routingMimeType?: string;
|
|
163
209
|
};
|
|
210
|
+
llmDeliveryPath?: 'provider' | 'text' | 'none';
|
|
164
211
|
createdAt?: string | Date;
|
|
165
212
|
updatedAt?: string | Date;
|
|
166
213
|
};
|
|
@@ -2,15 +2,21 @@ export type InsightsRange = '24h' | '7d' | '30d' | 'custom';
|
|
|
2
2
|
export declare const INSIGHTS_MAX_RANGE_DAYS = 30;
|
|
3
3
|
export declare const INSIGHTS_SEARCH_MIN_LENGTH = 3;
|
|
4
4
|
export declare const INSIGHTS_SEARCH_MAX_LENGTH = 200;
|
|
5
|
+
export declare const INSIGHTS_AGENT_ID_MAX_LENGTH = 256;
|
|
5
6
|
export type TInsightsParams = {
|
|
6
7
|
range?: InsightsRange;
|
|
7
8
|
fromTimestamp?: string;
|
|
8
9
|
toTimestamp?: string;
|
|
9
10
|
timeZone?: string;
|
|
10
11
|
search?: string;
|
|
12
|
+
agentIds?: string[];
|
|
11
13
|
page?: number;
|
|
12
14
|
pageSize?: number;
|
|
13
15
|
};
|
|
16
|
+
export type TInsightsAgent = {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
};
|
|
14
20
|
export type TInsightsDailyPoint = {
|
|
15
21
|
date: string;
|
|
16
22
|
conversations: number;
|
|
@@ -31,6 +37,8 @@ export type TInsightsChurnedUser = TInsightsUser & {
|
|
|
31
37
|
};
|
|
32
38
|
export type TInsightsConversation = {
|
|
33
39
|
conversationId: string;
|
|
40
|
+
agentId: string;
|
|
41
|
+
agentName: string;
|
|
34
42
|
date: string;
|
|
35
43
|
userId: string;
|
|
36
44
|
name: string;
|
|
@@ -46,6 +54,7 @@ export type TInsightsSummary = {
|
|
|
46
54
|
totalTokens: number;
|
|
47
55
|
};
|
|
48
56
|
export type TInsightsResponse = {
|
|
57
|
+
agents: TInsightsAgent[];
|
|
49
58
|
summary: TInsightsSummary;
|
|
50
59
|
daily: TInsightsDailyPoint[];
|
|
51
60
|
topUsers: TInsightsUser[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { InfiniteData, QueryKey } from '@tanstack/react-query';
|
|
2
2
|
import type { TSkill, TSkillFile, TCreateSkill, TUpdateSkillVariables, TUpdateSkillResponse, TDeleteSkillResponse, TUploadSkillFileVariables, TDeleteSkillFileVariables, TDeleteSkillFileResponse, TSkillListResponse } from './skills';
|
|
3
|
-
import {
|
|
4
|
-
import { Action, ActionMetadata } from './agents';
|
|
3
|
+
import { Assistant, AssistantCreateParams, AssistantUpdateParams, AssistantDocument } from './assistants';
|
|
4
|
+
import { Action, ActionMetadata, Agent, AgentCreateParams, AgentUpdateParams } from './agents';
|
|
5
|
+
import { Tools, FunctionTool } from './tools';
|
|
5
6
|
import * as p from '../permissions';
|
|
6
7
|
import * as types from '../types';
|
|
7
8
|
import * as r from '../roles';
|
|
@@ -22,7 +22,7 @@ export type ConversationListParams = {
|
|
|
22
22
|
search?: string;
|
|
23
23
|
projectId?: string;
|
|
24
24
|
};
|
|
25
|
-
export type MinimalConversation = Pick<s.TConversation, 'conversationId' | 'endpoint' | 'title' | 'createdAt' | 'updatedAt' | 'archivedAt' | 'user' | 'chatProjectId' | 'pinned'>;
|
|
25
|
+
export type MinimalConversation = Pick<s.TConversation, 'conversationId' | 'endpoint' | 'title' | 'createdAt' | 'updatedAt' | 'archivedAt' | 'isArchived' | 'user' | 'chatProjectId' | 'pinned'>;
|
|
26
26
|
export type ConversationListResponse = {
|
|
27
27
|
conversations: MinimalConversation[];
|
|
28
28
|
nextCursor: string | null;
|
|
@@ -103,6 +103,10 @@ export type MCPServer = {
|
|
|
103
103
|
name: string;
|
|
104
104
|
icon: string;
|
|
105
105
|
authenticated: boolean;
|
|
106
|
+
/** Passive discovery found that stored OAuth authorization must be renewed. */
|
|
107
|
+
authorizationState?: 'reauth_required';
|
|
108
|
+
/** Shared credential/catalog generation observed by passive discovery. */
|
|
109
|
+
authorizationGeneration?: string;
|
|
106
110
|
authConfig: s.TPluginAuthConfig[];
|
|
107
111
|
tools: MCPTool[];
|
|
108
112
|
};
|
|
@@ -194,6 +198,8 @@ export interface MCPServerStatus {
|
|
|
194
198
|
configurationState?: 'configured' | 'needs_configuration';
|
|
195
199
|
connectionState: 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
196
200
|
authorizationState?: 'not_required' | 'authorizing' | 'authorized' | 'needs_authorization' | 'error';
|
|
201
|
+
/** Shared credential/catalog generation observed by the status endpoint. */
|
|
202
|
+
authorizationGeneration?: string;
|
|
197
203
|
}
|
|
198
204
|
export interface MCPConnectionStatusResponse {
|
|
199
205
|
success: boolean;
|
|
@@ -209,6 +215,7 @@ export interface MCPServerConnectionStatusResponse {
|
|
|
209
215
|
configurationState?: MCPServerStatus['configurationState'];
|
|
210
216
|
connectionStatus: 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
211
217
|
authorizationState?: MCPServerStatus['authorizationState'];
|
|
218
|
+
authorizationGeneration?: string;
|
|
212
219
|
}
|
|
213
220
|
export interface MCPAuthValuesResponse {
|
|
214
221
|
success: boolean;
|