librechat-data-provider 0.8.508 → 0.8.521
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-DN-HeTC-.js → data-service-DOIF4BkW.js} +1211 -92
- package/dist/data-service-DOIF4BkW.js.map +1 -0
- package/dist/{data-service-DgNwjhBS.mjs → data-service-pwrlWjJs.mjs} +1062 -93
- package/dist/data-service-pwrlWjJs.mjs.map +1 -0
- package/dist/index.js +472 -57
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +440 -58
- package/dist/index.mjs.map +1 -1
- package/dist/react-query/index.js +1 -1
- package/dist/react-query/index.js.map +1 -1
- package/dist/react-query/index.mjs +1 -1
- package/dist/react-query/index.mjs.map +1 -1
- package/dist/types/actions.d.ts +1 -1
- package/dist/types/api-endpoints.d.ts +11 -2
- package/dist/types/bedrock.d.ts +57 -0
- package/dist/types/config.d.ts +4230 -183
- package/dist/types/data-service.d.ts +28 -14
- package/dist/types/feedback.d.ts +9 -1
- package/dist/types/file-config.d.ts +41 -5
- package/dist/types/generate.d.ts +8 -0
- package/dist/types/keys.d.ts +7 -2
- package/dist/types/mcp.d.ts +45 -24
- package/dist/types/messages.d.ts +8 -0
- package/dist/types/models.d.ts +120 -0
- package/dist/types/parameterSettings.d.ts +2 -2
- package/dist/types/parsers.d.ts +3 -1
- package/dist/types/react-query/react-query-service.d.ts +2 -7
- package/dist/types/request.d.ts +3 -1
- package/dist/types/schemas.d.ts +211 -11
- package/dist/types/types/agents.d.ts +211 -1
- package/dist/types/types/assistants.d.ts +77 -5
- package/dist/types/types/files.d.ts +18 -7
- package/dist/types/types/mcpServers.d.ts +25 -0
- package/dist/types/types/mutations.d.ts +1 -0
- package/dist/types/types/queries.d.ts +17 -3
- package/dist/types/types/runs.d.ts +114 -25
- package/dist/types/types/skills.d.ts +25 -6
- package/dist/types/types.d.ts +117 -2
- package/dist/types/upload.d.ts +2 -0
- package/package.json +4 -4
- package/dist/data-service-DN-HeTC-.js.map +0 -1
- package/dist/data-service-DgNwjhBS.mjs.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TFile } from './files';
|
|
1
2
|
export declare enum ContentTypes {
|
|
2
3
|
TEXT = "text",
|
|
3
4
|
THINK = "think",
|
|
@@ -9,6 +10,8 @@ export declare enum ContentTypes {
|
|
|
9
10
|
INPUT_AUDIO = "input_audio",
|
|
10
11
|
AGENT_UPDATE = "agent_update",
|
|
11
12
|
SUMMARY = "summary",
|
|
13
|
+
ACTIVITY_LABEL = "activity_label",
|
|
14
|
+
STEER = "steer",
|
|
12
15
|
ERROR = "error"
|
|
13
16
|
}
|
|
14
17
|
export declare enum StepTypes {
|
|
@@ -33,13 +36,120 @@ export declare enum StepEvents {
|
|
|
33
36
|
ON_SUMMARIZE_START = "on_summarize_start",
|
|
34
37
|
ON_SUMMARIZE_DELTA = "on_summarize_delta",
|
|
35
38
|
ON_SUMMARIZE_COMPLETE = "on_summarize_complete",
|
|
36
|
-
ON_SUBAGENT_UPDATE = "on_subagent_update"
|
|
39
|
+
ON_SUBAGENT_UPDATE = "on_subagent_update",
|
|
40
|
+
ON_SANDBOX_STARTING = "on_sandbox_starting"
|
|
37
41
|
}
|
|
42
|
+
/** Payload for {@link StepEvents.ON_SANDBOX_STARTING} — the stateful code
|
|
43
|
+
* sandbox is cold-booting for the given code tool call. */
|
|
44
|
+
export type SandboxStartingEvent = {
|
|
45
|
+
tool_call_id: string;
|
|
46
|
+
runId?: string;
|
|
47
|
+
};
|
|
38
48
|
/** Token-tracking event names streamed to the client (separate from StepEvents dispatch). */
|
|
39
49
|
export declare enum UsageEvents {
|
|
40
50
|
ON_CONTEXT_USAGE = "on_context_usage",
|
|
41
51
|
ON_TOKEN_USAGE = "on_token_usage"
|
|
42
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Human-in-the-loop event names. Streamed to live clients when a run pauses for
|
|
55
|
+
* tool approval (or an ask-user question). Reconnecting clients instead read the
|
|
56
|
+
* same record from `resumeState.pendingAction` on the sync event / status route.
|
|
57
|
+
*/
|
|
58
|
+
export declare enum ApprovalEvents {
|
|
59
|
+
ON_PENDING_ACTION = "on_pending_action"
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Steering event names. `on_steer_applied` streams to live clients when a
|
|
63
|
+
* queued steer message is injected at a tool-batch boundary; reconnecting
|
|
64
|
+
* clients recover injected steers from `aggregatedContent` and still-queued
|
|
65
|
+
* ones from `resumeState.pendingSteers`. Steers that never reach a boundary
|
|
66
|
+
* ride the final/abort events as `pendingSteers`.
|
|
67
|
+
*/
|
|
68
|
+
export declare enum SteerEvents {
|
|
69
|
+
ON_STEER_APPLIED = "on_steer_applied",
|
|
70
|
+
/** Durable capability correction for queued steers after HITL handover. */
|
|
71
|
+
ON_STEER_UPDATED = "on_steer_updated"
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Activity-label event names. `on_activity_label` streams to live clients
|
|
75
|
+
* when a tool-batch or parent-phase label part is claimed and again when the
|
|
76
|
+
* fast-model label resolves; reconnecting clients recover applied labels
|
|
77
|
+
* from `aggregatedContent` like any other content part.
|
|
78
|
+
*/
|
|
79
|
+
export declare enum ActivityLabelEvents {
|
|
80
|
+
ON_ACTIVITY_LABEL = "on_activity_label"
|
|
81
|
+
}
|
|
82
|
+
/** Payload of the `on_activity_label` SSE event. */
|
|
83
|
+
export type TActivityLabelEvent = {
|
|
84
|
+
/** Absolute content index the label part occupies. */
|
|
85
|
+
index: number;
|
|
86
|
+
part: {
|
|
87
|
+
type: ContentTypes.ACTIVITY_LABEL;
|
|
88
|
+
[ContentTypes.ACTIVITY_LABEL]: string;
|
|
89
|
+
/** Missing means a per-batch activity label. */
|
|
90
|
+
activity_label_type?: 'phase';
|
|
91
|
+
tool_call_ids?: string[];
|
|
92
|
+
activity_start_index?: number;
|
|
93
|
+
activity_end_index?: number;
|
|
94
|
+
activity_count?: number;
|
|
95
|
+
agent_ids?: string[];
|
|
96
|
+
counts?: {
|
|
97
|
+
searches: number;
|
|
98
|
+
reads: number;
|
|
99
|
+
writes: number;
|
|
100
|
+
commands: number;
|
|
101
|
+
other: number;
|
|
102
|
+
};
|
|
103
|
+
status?: 'ok' | 'partial' | 'failed';
|
|
104
|
+
agentId?: string;
|
|
105
|
+
pending?: boolean;
|
|
106
|
+
};
|
|
107
|
+
responseMessageId?: string;
|
|
108
|
+
conversationId?: string;
|
|
109
|
+
};
|
|
110
|
+
/** A steer message queued server-side but not yet injected into the run. */
|
|
111
|
+
export type TPendingSteer = {
|
|
112
|
+
steerId: string;
|
|
113
|
+
/** Correlates a server steer with its optimistic chip when terminal delivery
|
|
114
|
+
* races ahead of the POST response. */
|
|
115
|
+
clientSteerId?: string;
|
|
116
|
+
text: string;
|
|
117
|
+
createdAt?: number;
|
|
118
|
+
files?: Partial<TFile>[];
|
|
119
|
+
/** The steer asked to interrupt generation at the next safe boundary —
|
|
120
|
+
* kept on parked/replayed chips so the "interrupting" label survives. */
|
|
121
|
+
preempt?: boolean;
|
|
122
|
+
/** Monotonic server revision for last-writer-wins interrupt labels. */
|
|
123
|
+
preemptRevision?: number;
|
|
124
|
+
};
|
|
125
|
+
/** Payload of the `on_steer_applied` SSE event. */
|
|
126
|
+
export type TSteerAppliedEvent = {
|
|
127
|
+
steerId: string;
|
|
128
|
+
/** Correlates the applied event with the optimistic chip before the POST settles. */
|
|
129
|
+
clientSteerId?: string;
|
|
130
|
+
/** Absolute content index the steer part was injected at. */
|
|
131
|
+
index: number;
|
|
132
|
+
part: {
|
|
133
|
+
type: ContentTypes.STEER;
|
|
134
|
+
[ContentTypes.STEER]: string;
|
|
135
|
+
steerId?: string;
|
|
136
|
+
clientSteerId?: string;
|
|
137
|
+
createdAt?: number;
|
|
138
|
+
files?: Partial<TFile>[];
|
|
139
|
+
};
|
|
140
|
+
responseMessageId?: string;
|
|
141
|
+
conversationId?: string;
|
|
142
|
+
};
|
|
143
|
+
/** A queued steer's interrupt label changed without moving its FIFO slot. */
|
|
144
|
+
export type TSteerUpdatedEvent = {
|
|
145
|
+
conversationId: string;
|
|
146
|
+
steers: Array<{
|
|
147
|
+
steerId: string;
|
|
148
|
+
clientSteerId?: string;
|
|
149
|
+
preempt: boolean;
|
|
150
|
+
preemptRevision: number;
|
|
151
|
+
}>;
|
|
152
|
+
};
|
|
43
153
|
/** Mirrors TokenBudgetBreakdown from @librechat/agents (data-provider cannot import it). */
|
|
44
154
|
export type TTokenBudgetBreakdown = {
|
|
45
155
|
maxContextTokens: number;
|
|
@@ -78,28 +188,6 @@ export type TContextUsageEvent = {
|
|
|
78
188
|
* already includes for earlier steps. */
|
|
79
189
|
completedOutputTokens?: number;
|
|
80
190
|
};
|
|
81
|
-
/**
|
|
82
|
-
* Request payload for a server-side context-usage projection: "what context
|
|
83
|
-
* would the next call send for this branch under this config", computed by the
|
|
84
|
-
* agents SDK without invoking the model. Powers the gauge in states the live
|
|
85
|
-
* snapshot can't cover (page load of a snapshot-less branch, window/model
|
|
86
|
-
* switch). `messageId` is the viewed branch's tail; the server walks its parent
|
|
87
|
-
* chain.
|
|
88
|
-
*/
|
|
89
|
-
export type TContextProjectionRequest = {
|
|
90
|
-
conversationId: string;
|
|
91
|
-
messageId: string;
|
|
92
|
-
endpoint: string;
|
|
93
|
-
model?: string;
|
|
94
|
-
agentId?: string;
|
|
95
|
-
spec?: string;
|
|
96
|
-
maxContextTokens?: number;
|
|
97
|
-
/** Provider-calibrated ratio from a prior snapshot, applied as a static seed. */
|
|
98
|
-
calibrationRatio?: number;
|
|
99
|
-
/** Client-only cache-bust: a branch content revision so a message edit
|
|
100
|
-
* (which keeps the same tail id) refetches. The server ignores it. */
|
|
101
|
-
revision?: number;
|
|
102
|
-
};
|
|
103
191
|
/**
|
|
104
192
|
* Per-response usage rollup persisted on `responseMessage.metadata.usage`, in
|
|
105
193
|
* display units (input excludes cache; output includes repaired completion).
|
|
@@ -128,8 +216,9 @@ export type TTokenUsageEvent = {
|
|
|
128
216
|
provider?: string;
|
|
129
217
|
/** Non-primary buckets fold into session cost/totals but not the live
|
|
130
218
|
* context gauge: hidden sequential-agent calls (`sequential`), summary
|
|
131
|
-
* passes (`summarization`),
|
|
132
|
-
|
|
219
|
+
* passes (`summarization`), isolated subagent runs (`subagent`), and
|
|
220
|
+
* fast-model activity headers (`activity-label`, `activity-phase`) */
|
|
221
|
+
usage_type?: 'summarization' | 'subagent' | 'sequential' | 'activity-label' | 'activity-phase';
|
|
133
222
|
runId?: string;
|
|
134
223
|
/** Per-run emission sequence; keeps identical payloads from distinct model calls unique */
|
|
135
224
|
seq?: number;
|
|
@@ -33,11 +33,20 @@ export type SkillSource = 'inline' | 'deployment' | 'github' | 'notion';
|
|
|
33
33
|
* everything else (including root-level files) is `other`.
|
|
34
34
|
*/
|
|
35
35
|
export type SkillFileCategory = 'script' | 'reference' | 'asset' | 'other';
|
|
36
|
+
/** Nested object inside a structured frontmatter key. */
|
|
37
|
+
export type SkillFrontmatterObject = {
|
|
38
|
+
[key: string]: SkillFrontmatterValue | undefined;
|
|
39
|
+
};
|
|
36
40
|
/**
|
|
37
|
-
* Allowed value types inside a skill's YAML frontmatter.
|
|
38
|
-
*
|
|
41
|
+
* Allowed value types inside a skill's YAML frontmatter. Scalars cover the
|
|
42
|
+
* documented keys; nested arrays and objects describe the structured ones
|
|
43
|
+
* (`hooks`, `metadata`, `references`), which real `SKILL.md` files write as a
|
|
44
|
+
* list, a list of objects, or a map.
|
|
45
|
+
*
|
|
46
|
+
* Still no `unknown` or `any`: the payload is JSON-safe by construction, and
|
|
47
|
+
* the server bounds depth, string length and array size when validating it.
|
|
39
48
|
*/
|
|
40
|
-
export type SkillFrontmatterValue = string | number | boolean |
|
|
49
|
+
export type SkillFrontmatterValue = string | number | boolean | null | SkillFrontmatterValue[] | SkillFrontmatterObject;
|
|
41
50
|
/**
|
|
42
51
|
* Structured YAML frontmatter for a skill. All keys are optional on the wire
|
|
43
52
|
* because not every skill document carries a complete frontmatter block —
|
|
@@ -95,8 +104,8 @@ export type TSkillWarning = {
|
|
|
95
104
|
* - `description` is the "when to use this skill" sentence. Highest-leverage
|
|
96
105
|
* field for trigger accuracy; a short/vague one causes undertriggering.
|
|
97
106
|
* - `frontmatter` is the structured YAML bag minus `name`/`description`
|
|
98
|
-
* (those live as top-level columns).
|
|
99
|
-
*
|
|
107
|
+
* (those live as top-level columns). Known keys receive value validation;
|
|
108
|
+
* unknown keys are retained and reported as non-blocking warnings.
|
|
100
109
|
* - `source`/`sourceMetadata` identify whether the row is user-authored,
|
|
101
110
|
* deployment-provided, or mirrored from an external source such as GitHub.
|
|
102
111
|
*/
|
|
@@ -200,11 +209,19 @@ export type TGitHubSkillSyncCredentialSummary = {
|
|
|
200
209
|
updatedAt?: string;
|
|
201
210
|
createdAt?: string;
|
|
202
211
|
};
|
|
212
|
+
/** One upstream skill a sync run dropped, with the reason it was dropped. */
|
|
213
|
+
export type TGitHubSkillSyncSkippedSkill = {
|
|
214
|
+
path: string;
|
|
215
|
+
name?: string;
|
|
216
|
+
errorCode: string;
|
|
217
|
+
errorMessage: string;
|
|
218
|
+
};
|
|
203
219
|
export type TGitHubSkillSyncSourceStatus = {
|
|
204
220
|
provider: 'github';
|
|
205
221
|
sourceId: string;
|
|
206
222
|
tenantId?: string;
|
|
207
|
-
|
|
223
|
+
/** `partial`: some skills published, others were skipped (see `skippedSkills`). */
|
|
224
|
+
status: 'idle' | 'running' | 'succeeded' | 'partial' | 'failed' | 'skipped';
|
|
208
225
|
credentialKey?: string;
|
|
209
226
|
credentialPresent: boolean;
|
|
210
227
|
owner?: string;
|
|
@@ -221,6 +238,8 @@ export type TGitHubSkillSyncSourceStatus = {
|
|
|
221
238
|
syncedFileCount: number;
|
|
222
239
|
deletedSkillCount: number;
|
|
223
240
|
deletedFileCount: number;
|
|
241
|
+
skippedSkillCount: number;
|
|
242
|
+
skippedSkills?: TGitHubSkillSyncSkippedSkill[];
|
|
224
243
|
updatedAt?: string;
|
|
225
244
|
createdAt?: string;
|
|
226
245
|
};
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { InfiniteData } from '@tanstack/react-query';
|
|
2
2
|
import type { TConversationTag, EModelEndpoint, TConversation, TSharedLink, TAttachment, TMessage, TBanner, ReasoningResponseKey, ReasoningParameterFormat } from './schemas';
|
|
3
|
+
import type { Agent, EToolResources } from './types/assistants';
|
|
3
4
|
import type { RefillIntervalUnit } from './balance';
|
|
4
5
|
import type { SettingDefinition } from './generate';
|
|
5
6
|
import type { TMinimalFeedback } from './feedback';
|
|
6
7
|
import type { ContentTypes } from './types/runs';
|
|
7
|
-
import type { Agent } from './types/assistants';
|
|
8
8
|
export * from './schemas';
|
|
9
9
|
export type TMessages = TMessage[];
|
|
10
10
|
export type TEndpointOption = Pick<TConversation, 'endpoint' | 'endpointType' | 'model' | 'modelLabel' | 'chatGptLabel' | 'promptPrefix' | 'temperature' | 'topP' | 'topK' | 'top_p' | 'frequency_penalty' | 'presence_penalty' | 'maxOutputTokens' | 'maxContextTokens' | 'max_tokens' | 'maxTokens' | 'resendFiles' | 'imageDetail' | 'reasoning_effort' | 'verbosity' | 'instructions' | 'additional_instructions' | 'append_current_datetime' | 'tools' | 'stop' | 'region' | 'additionalModelRequestFields' | 'promptCache' | 'promptCacheTtl' | 'thinking' | 'thinkingBudget' | 'thinkingLevel' | 'effort' | 'thinkingDisplay' | 'assistant_id' | 'agent_id' | 'iconURL' | 'greeting' | 'spec' | 'artifacts' | 'file_ids' | 'system' | 'chatProjectId' | 'examples' | 'context'> & {
|
|
@@ -29,6 +29,21 @@ export type TEphemeralAgent = {
|
|
|
29
29
|
execute_code?: boolean;
|
|
30
30
|
artifacts?: string;
|
|
31
31
|
skills?: boolean;
|
|
32
|
+
memory?: boolean;
|
|
33
|
+
/** Equip the ephemeral agent with the `ask_user_question` HITL tool. */
|
|
34
|
+
ask_user_question?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Let the model dispatch this ephemeral agent's eligible tool calls in the
|
|
37
|
+
* background (poll results via `check_background_task`). Requires the
|
|
38
|
+
* `run_in_background` agent capability to be enabled by the admin.
|
|
39
|
+
*/
|
|
40
|
+
run_in_background?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Inject the `intent` label param into this ephemeral agent's eligible
|
|
43
|
+
* tools so each call streams a live status label. Requires the
|
|
44
|
+
* `tool_intents` agent capability to be enabled by the admin.
|
|
45
|
+
*/
|
|
46
|
+
describe_intent?: boolean;
|
|
32
47
|
};
|
|
33
48
|
export type TPayload = Partial<TMessage> & Partial<TEndpointOption> & {
|
|
34
49
|
isContinued: boolean;
|
|
@@ -49,6 +64,21 @@ export type TPayload = Partial<TMessage> & Partial<TEndpointOption> & {
|
|
|
49
64
|
manualSkills?: string[];
|
|
50
65
|
/** Browser IANA timezone (e.g. `America/New_York`) used to resolve local-time prompt variables server-side. */
|
|
51
66
|
timezone?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Stable per-submission idempotency key (uuid) generated once per `ask()`. Identical
|
|
69
|
+
* across the client's start-generation network retries, unique per user action (including
|
|
70
|
+
* regenerate). The server dedups retried start requests on it so a lost/reset response
|
|
71
|
+
* cannot trigger a second billed generation.
|
|
72
|
+
*/
|
|
73
|
+
clientRequestId?: string;
|
|
74
|
+
/** Parked steer source consumed only after this new turn's user message is
|
|
75
|
+
* durably saved. Separate from `clientRequestId`, which identifies one
|
|
76
|
+
* generation attempt and must rotate after a failed recovery. */
|
|
77
|
+
recoverySteerId?: string;
|
|
78
|
+
/** Optional optimistic-serialization fence for a queued follow-up. The
|
|
79
|
+
* server may create only if this observed predecessor is still current or
|
|
80
|
+
* the conversation is still idle after its cleanup. */
|
|
81
|
+
expectedPredecessorCreatedAt?: number;
|
|
52
82
|
};
|
|
53
83
|
export type TEditedContent = {
|
|
54
84
|
index: number;
|
|
@@ -74,10 +104,44 @@ export type TSubmission = {
|
|
|
74
104
|
clientTimestamp?: string;
|
|
75
105
|
ephemeralAgent?: TEphemeralAgent | null;
|
|
76
106
|
editedContent?: TEditedContent | null;
|
|
107
|
+
/**
|
|
108
|
+
* Length of the retained content prefix for an edited resubmission, captured
|
|
109
|
+
* when the submission is built.
|
|
110
|
+
*
|
|
111
|
+
* The server indexes only NEW content, so the client offsets incoming
|
|
112
|
+
* indices by the prefix it kept. `initialResponse.content` cannot be used
|
|
113
|
+
* for that after a reconnect: the resume sync overwrites it with the
|
|
114
|
+
* server's completion-local snapshot, whose length is unrelated to the
|
|
115
|
+
* prefix. Recording the length up front keeps the offset stable across
|
|
116
|
+
* resumes for run steps and activity labels alike.
|
|
117
|
+
*/
|
|
118
|
+
editPrefixLength?: number;
|
|
119
|
+
/** True once server index 0 text/reasoning actually merged into the retained tail. */
|
|
120
|
+
editPrefixFirstPartFolded?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Set once a resume SYNC has replaced the response's retained prefix with
|
|
123
|
+
* the server's completion-local snapshot. From that point the prefix is
|
|
124
|
+
* gone from the rendered message and server indices are absolute in the
|
|
125
|
+
* new space, so {@link editPrefixLength} must NOT be applied — by run
|
|
126
|
+
* steps or by activity labels. Both event paths read this flag so a
|
|
127
|
+
* batch's tool cards and its header always land in one index space.
|
|
128
|
+
*
|
|
129
|
+
* Stamped per event by the resumable transport, which owns the SYNC
|
|
130
|
+
* boundary; the non-resumable path never sets it.
|
|
131
|
+
*/
|
|
132
|
+
editPrefixCleared?: boolean;
|
|
77
133
|
/** Added conversation for multi-convo feature */
|
|
78
134
|
addedConvo?: TConversation;
|
|
79
135
|
/** Skills the user invoked via the `$` popover for this submission. */
|
|
80
136
|
manualSkills?: string[];
|
|
137
|
+
/** Stable per-submission idempotency key (uuid) forwarded to the server to dedup retried start-generation requests. */
|
|
138
|
+
clientRequestId?: string;
|
|
139
|
+
/** Client-only carry-through for a receipt-bound queued recovery. */
|
|
140
|
+
recoverySteerId?: string;
|
|
141
|
+
expectedPredecessorCreatedAt?: number;
|
|
142
|
+
/** Opaque client-only queue restoration metadata; intentionally omitted by
|
|
143
|
+
* `createPayload`. */
|
|
144
|
+
queuedMessageOrigin?: unknown;
|
|
81
145
|
};
|
|
82
146
|
export type EventSubmission = Omit<TSubmission, 'initialResponse'> & {
|
|
83
147
|
initialResponse: TMessage;
|
|
@@ -108,6 +172,8 @@ export type TMarketplaceCategory = TCategory & {
|
|
|
108
172
|
export type TError = {
|
|
109
173
|
message: string;
|
|
110
174
|
code?: number | string;
|
|
175
|
+
file_id?: string;
|
|
176
|
+
tool_resource?: EToolResources;
|
|
111
177
|
response?: {
|
|
112
178
|
data?: {
|
|
113
179
|
message?: string;
|
|
@@ -287,6 +353,17 @@ export type TForkConvoResponse = {
|
|
|
287
353
|
conversation: TConversation;
|
|
288
354
|
messages: TMessage[];
|
|
289
355
|
};
|
|
356
|
+
export type TForkSharedConvoRequest = {
|
|
357
|
+
shareId: string;
|
|
358
|
+
/** Index of the viewer's active message within the shared payload; reduces the
|
|
359
|
+
* fork to that branch. An index is used because shared ids are re-anonymized
|
|
360
|
+
* per request and `createdAt` can collide, while the payload order is stable. */
|
|
361
|
+
targetMessageIndex?: number;
|
|
362
|
+
/** `updatedAt` of the shared payload being forked. The shareId survives an
|
|
363
|
+
* owner update, so the server rejects a fork whose payload has since moved
|
|
364
|
+
* instead of resolving the index against different messages. */
|
|
365
|
+
shareRevision?: string;
|
|
366
|
+
};
|
|
290
367
|
export type TSearchResults = {
|
|
291
368
|
conversations: TConversation[];
|
|
292
369
|
messages: TMessage[];
|
|
@@ -320,6 +397,8 @@ export type TConfig = {
|
|
|
320
397
|
defaultParamsEndpoint?: string;
|
|
321
398
|
reasoningFormat?: ReasoningParameterFormat;
|
|
322
399
|
reasoningKey?: ReasoningResponseKey;
|
|
400
|
+
includeReasoningContent?: boolean;
|
|
401
|
+
includeReasoningHistory?: boolean;
|
|
323
402
|
paramDefinitions?: Partial<SettingDefinition>[];
|
|
324
403
|
};
|
|
325
404
|
};
|
|
@@ -555,9 +634,11 @@ export type TCustomConfigSpeechResponse = {
|
|
|
555
634
|
};
|
|
556
635
|
export type TUserTermsResponse = {
|
|
557
636
|
termsAccepted: boolean;
|
|
637
|
+
termsAcceptedAt: Date | string | null;
|
|
558
638
|
};
|
|
559
639
|
export type TAcceptTermsResponse = {
|
|
560
|
-
|
|
640
|
+
message: string;
|
|
641
|
+
termsAcceptedAt: Date | string;
|
|
561
642
|
};
|
|
562
643
|
export type TBannerResponse = TBanner | null;
|
|
563
644
|
export type TUpdateFeedbackRequest = {
|
|
@@ -619,3 +700,37 @@ export type TUpdateSkillNodeRequest = {
|
|
|
619
700
|
parentId?: string | null;
|
|
620
701
|
order?: number;
|
|
621
702
|
};
|
|
703
|
+
export type TLangfuseConnectionStatus = {
|
|
704
|
+
configured: boolean;
|
|
705
|
+
enabled: boolean;
|
|
706
|
+
destinations: TLangfuseDestinationOption[];
|
|
707
|
+
destination?: string;
|
|
708
|
+
publicKey?: string;
|
|
709
|
+
secretKeyPreview?: string;
|
|
710
|
+
updatedAt?: string;
|
|
711
|
+
};
|
|
712
|
+
export type TLangfuseDestinationOption = {
|
|
713
|
+
key: string;
|
|
714
|
+
baseUrl: string;
|
|
715
|
+
};
|
|
716
|
+
export type TUpdateLangfuseConnectionRequest = {
|
|
717
|
+
enabled: boolean;
|
|
718
|
+
destination: string;
|
|
719
|
+
publicKey: string;
|
|
720
|
+
secretKey?: string;
|
|
721
|
+
};
|
|
722
|
+
export type TLangfuseConnectionTestRequest = {
|
|
723
|
+
destination: string;
|
|
724
|
+
publicKey: string;
|
|
725
|
+
secretKey?: string;
|
|
726
|
+
};
|
|
727
|
+
export type TLangfuseConnectionTestErrorCode = 'invalid_credentials' | 'access_denied' | 'rate_limited' | 'server_error' | 'timeout' | 'unreachable' | 'missing_secret' | 'stored_secret_unavailable' | 'unexpected_response';
|
|
728
|
+
export type TLangfuseConnectionTestResponse = {
|
|
729
|
+
success: true;
|
|
730
|
+
} | {
|
|
731
|
+
success: false;
|
|
732
|
+
errorCode: TLangfuseConnectionTestErrorCode;
|
|
733
|
+
};
|
|
734
|
+
export type TLangfuseSessionLinkResponse = {
|
|
735
|
+
url: string | null;
|
|
736
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "librechat-data-provider",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.521",
|
|
4
4
|
"description": "data services for librechat apps",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"axios": "^1.16.0",
|
|
47
47
|
"dayjs": "^1.11.13",
|
|
48
|
-
"js-yaml": "^4.
|
|
48
|
+
"js-yaml": "^4.3.1",
|
|
49
49
|
"zod": "^3.22.4"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
@@ -61,14 +61,14 @@
|
|
|
61
61
|
"@types/js-yaml": "^4.0.9",
|
|
62
62
|
"@types/node": "^24.12.4",
|
|
63
63
|
"@types/react": "^18.2.18",
|
|
64
|
-
"@types/winston": "^2.4.4",
|
|
65
64
|
"jest": "^30.2.0",
|
|
66
65
|
"jest-junit": "^17.0.0",
|
|
67
66
|
"openapi-types": "^12.1.3",
|
|
68
67
|
"rimraf": "^6.1.3",
|
|
69
68
|
"rollup": "^4.34.9",
|
|
70
69
|
"tsdown": "^0.22.2",
|
|
71
|
-
"typescript": "^5.9.3"
|
|
70
|
+
"typescript": "^5.9.3",
|
|
71
|
+
"winston": "^3.17.0"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"@tanstack/react-query": "^4.28.0"
|