librechat-data-provider 0.8.521 → 0.8.523
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-pwrlWjJs.mjs → data-service-Bx6IFaSa.mjs} +1770 -51
- package/dist/data-service-Bx6IFaSa.mjs.map +1 -0
- package/dist/{data-service-DOIF4BkW.js → data-service-CTX0tVO5.js} +2509 -112
- package/dist/data-service-CTX0tVO5.js.map +1 -0
- package/dist/index.js +1503 -54
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1314 -55
- package/dist/index.mjs.map +1 -1
- package/dist/react-query/index.js +2 -1
- package/dist/react-query/index.js.map +1 -1
- package/dist/react-query/index.mjs +2 -1
- package/dist/react-query/index.mjs.map +1 -1
- package/dist/types/accessPermissions.d.ts +58 -1
- package/dist/types/actions.d.ts +2 -2
- package/dist/types/agentToolOptions.d.ts +11 -0
- package/dist/types/api-endpoints.d.ts +24 -0
- package/dist/types/bedrock.d.ts +238 -10
- package/dist/types/cadence.d.ts +33 -0
- 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 +28 -0
- package/dist/types/codeEnvRef.d.ts +26 -0
- package/dist/types/config.d.ts +13180 -3021
- package/dist/types/data-service.d.ts +48 -2
- package/dist/types/errors.d.ts +2 -0
- package/dist/types/file-config.d.ts +138 -9
- package/dist/types/filters.d.ts +1422 -0
- package/dist/types/generate.d.ts +103 -1
- package/dist/types/index.d.ts +17 -0
- package/dist/types/keys.d.ts +33 -2
- package/dist/types/langchain.d.ts +4 -0
- package/dist/types/limits.d.ts +13 -0
- package/dist/types/mcp.d.ts +555 -460
- package/dist/types/messages.d.ts +24 -0
- package/dist/types/models.d.ts +1112 -319
- package/dist/types/parameterSettings.d.ts +13 -1
- package/dist/types/parsers.d.ts +10 -0
- package/dist/types/permissions.d.ts +42 -1
- package/dist/types/providers.d.ts +37 -0
- package/dist/types/request.d.ts +2 -2
- package/dist/types/resolve-llm-delivery-path.d.ts +68 -0
- package/dist/types/roles.d.ts +34 -0
- package/dist/types/runSteps.d.ts +59 -0
- package/dist/types/schemas.d.ts +1724 -248
- package/dist/types/stateful-code.d.ts +7 -0
- package/dist/types/svg.d.ts +34 -0
- package/dist/types/types/agents.d.ts +116 -7
- package/dist/types/types/assistants.d.ts +121 -6
- package/dist/types/types/files.d.ts +46 -2
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/insights.d.ts +71 -0
- package/dist/types/types/mutations.d.ts +1 -0
- package/dist/types/types/queries.d.ts +37 -2
- package/dist/types/types/queuedTurns.d.ts +870 -0
- package/dist/types/types/runs.d.ts +119 -9
- package/dist/types/types/schedules.d.ts +339 -0
- package/dist/types/types/skills.d.ts +9 -0
- package/dist/types/types/subagents.d.ts +159 -0
- package/dist/types/types/traces.d.ts +85 -0
- package/dist/types/types/web.d.ts +12 -2
- package/dist/types/types.d.ts +101 -1
- package/package.json +5 -3
- package/dist/data-service-DOIF4BkW.js.map +0 -1
- package/dist/data-service-pwrlWjJs.mjs.map +0 -1
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
export type SubagentThreadStatus = 'dispatched' | 'running' | 'completed' | 'failed' | 'interrupted' | 'cancelled';
|
|
2
|
+
export type ParentSubagentTaskSummary = {
|
|
3
|
+
taskId: string;
|
|
4
|
+
status: SubagentThreadStatus;
|
|
5
|
+
createdAt?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Bounded discovery projection for one child owned by a parent conversation.
|
|
9
|
+
* Event-delivery identities stay private; `actorId` is the only event-binding
|
|
10
|
+
* field intentionally exposed to the parent's UI.
|
|
11
|
+
*/
|
|
12
|
+
export type ParentSubagentSummary = {
|
|
13
|
+
threadId: string;
|
|
14
|
+
parentMessageId: string;
|
|
15
|
+
/** Present only for ordinary tool-spawned children. */
|
|
16
|
+
parentToolCallId?: string;
|
|
17
|
+
subagentType: string;
|
|
18
|
+
subagentKind: 'agent' | 'graph';
|
|
19
|
+
agentId?: string;
|
|
20
|
+
title: string;
|
|
21
|
+
origin: 'tool' | 'event';
|
|
22
|
+
actorId?: string;
|
|
23
|
+
status: SubagentThreadStatus;
|
|
24
|
+
updatedAt?: string;
|
|
25
|
+
latestTaskId?: string;
|
|
26
|
+
tasks: ParentSubagentTaskSummary[];
|
|
27
|
+
tasksTruncated: boolean;
|
|
28
|
+
};
|
|
29
|
+
export type ParentSubagentIndex = {
|
|
30
|
+
parentConversationId: string;
|
|
31
|
+
children: ParentSubagentSummary[];
|
|
32
|
+
childrenTruncated: boolean;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* A bounded, presentation-safe description of child work. This deliberately
|
|
36
|
+
* models user-visible activity instead of the LangChain messages, SSE events,
|
|
37
|
+
* or durable records that produced it.
|
|
38
|
+
*/
|
|
39
|
+
export type SubagentActivityItem = {
|
|
40
|
+
type: 'writing';
|
|
41
|
+
text: string;
|
|
42
|
+
textTruncated?: boolean;
|
|
43
|
+
} | {
|
|
44
|
+
type: 'reasoning';
|
|
45
|
+
/** Bounded user-visible reasoning text; absent on projections persisted
|
|
46
|
+
* before reasoning retention (rendered as a marker). */
|
|
47
|
+
text?: string;
|
|
48
|
+
textTruncated?: boolean;
|
|
49
|
+
} | {
|
|
50
|
+
type: 'activity_label';
|
|
51
|
+
label: string;
|
|
52
|
+
labelType?: 'phase';
|
|
53
|
+
toolCallIds?: string[];
|
|
54
|
+
activityStartIndex?: number;
|
|
55
|
+
activityEndIndex?: number;
|
|
56
|
+
activityCount?: number;
|
|
57
|
+
agentIds?: string[];
|
|
58
|
+
status?: 'ok' | 'partial' | 'failed';
|
|
59
|
+
pending?: boolean;
|
|
60
|
+
labelTruncated?: boolean;
|
|
61
|
+
} | {
|
|
62
|
+
type: 'tool';
|
|
63
|
+
toolCallId: string;
|
|
64
|
+
name: string;
|
|
65
|
+
input?: string;
|
|
66
|
+
output?: string;
|
|
67
|
+
status: 'running' | 'completed' | 'failed' | 'cancelled';
|
|
68
|
+
inputValidationError?: true;
|
|
69
|
+
inputTruncated?: boolean;
|
|
70
|
+
outputTruncated?: boolean;
|
|
71
|
+
};
|
|
72
|
+
export type SubagentControlAction = 'steer' | 'queue' | 'interrupt' | 'cancel' | 'cancel_message';
|
|
73
|
+
export type SubagentControlReceipt = {
|
|
74
|
+
invocationId: string;
|
|
75
|
+
controlId?: string;
|
|
76
|
+
action: SubagentControlAction;
|
|
77
|
+
status: 'accepted' | 'applied' | 'rejected' | 'failed';
|
|
78
|
+
createdAt: string;
|
|
79
|
+
updatedAt: string;
|
|
80
|
+
boundary?: 'preempt' | 'tool' | 'turn';
|
|
81
|
+
reason?: string;
|
|
82
|
+
message?: string;
|
|
83
|
+
messageTruncated?: boolean;
|
|
84
|
+
};
|
|
85
|
+
export type SubagentControlRequest = {
|
|
86
|
+
taskId: string;
|
|
87
|
+
invocationId: string;
|
|
88
|
+
action: SubagentControlAction;
|
|
89
|
+
message?: string;
|
|
90
|
+
controlId?: string;
|
|
91
|
+
};
|
|
92
|
+
export type SubagentControlResponse = {
|
|
93
|
+
receipt: SubagentControlReceipt;
|
|
94
|
+
};
|
|
95
|
+
export type SubagentThreadMessage = {
|
|
96
|
+
messageId: string;
|
|
97
|
+
parentMessageId: string | null;
|
|
98
|
+
role: 'user' | 'assistant';
|
|
99
|
+
text: string;
|
|
100
|
+
createdAt?: string;
|
|
101
|
+
error?: boolean;
|
|
102
|
+
textTruncated?: boolean;
|
|
103
|
+
};
|
|
104
|
+
export type SubagentThreadTriggerKind = 'parent_dispatch' | 'parent_continuation' | 'external_event';
|
|
105
|
+
export type SubagentExternalEventDetails = {
|
|
106
|
+
eventType: string;
|
|
107
|
+
sourceType: string;
|
|
108
|
+
occurredAt: string;
|
|
109
|
+
expectedActionToolName?: string;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* One chronological child execution boundary. The trigger is host-authored,
|
|
113
|
+
* while activity and messages are bounded public projections of the child run.
|
|
114
|
+
*/
|
|
115
|
+
export type SubagentThreadTurn = {
|
|
116
|
+
taskId: string;
|
|
117
|
+
trigger: {
|
|
118
|
+
kind: SubagentThreadTriggerKind;
|
|
119
|
+
summary: string;
|
|
120
|
+
createdAt?: string;
|
|
121
|
+
summaryTruncated?: boolean;
|
|
122
|
+
externalEvent?: SubagentExternalEventDetails;
|
|
123
|
+
};
|
|
124
|
+
status: SubagentThreadStatus;
|
|
125
|
+
activity: SubagentActivityItem[];
|
|
126
|
+
activityTruncated: boolean;
|
|
127
|
+
controlReceipts?: SubagentControlReceipt[];
|
|
128
|
+
controlReceiptsTruncated?: boolean;
|
|
129
|
+
messages: SubagentThreadMessage[];
|
|
130
|
+
};
|
|
131
|
+
export type SubagentThreadView = {
|
|
132
|
+
threadId: string;
|
|
133
|
+
parentConversationId: string;
|
|
134
|
+
parentMessageId: string;
|
|
135
|
+
parentToolCallId: string;
|
|
136
|
+
subagentType: string;
|
|
137
|
+
subagentKind: 'agent' | 'graph';
|
|
138
|
+
/** Product recursion level, currently bounded to one by the host runtime. */
|
|
139
|
+
depth?: number;
|
|
140
|
+
agentId?: string;
|
|
141
|
+
title: string;
|
|
142
|
+
status: SubagentThreadStatus;
|
|
143
|
+
/** Activity for the exact task requested by the parent card, when retained. */
|
|
144
|
+
activity: SubagentActivityItem[];
|
|
145
|
+
activityTruncated: boolean;
|
|
146
|
+
/** Bounded authoritative parent-to-child command receipts for this task. */
|
|
147
|
+
controlReceipts?: SubagentControlReceipt[];
|
|
148
|
+
/** True when older authoritative command receipts were omitted from this view. */
|
|
149
|
+
controlReceiptsTruncated?: boolean;
|
|
150
|
+
/** Chronological, branch-selected child history for conversation-native rendering. */
|
|
151
|
+
turns?: SubagentThreadTurn[];
|
|
152
|
+
messages: SubagentThreadMessage[];
|
|
153
|
+
historyTruncated: boolean;
|
|
154
|
+
/** True when some branch rows were omitted and cannot be recovered with `nextCursor`. */
|
|
155
|
+
historyUnavailable?: boolean;
|
|
156
|
+
/** Opaque task-message cursor for the next older bounded branch page. */
|
|
157
|
+
nextCursor?: string;
|
|
158
|
+
updatedAt?: string;
|
|
159
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider-neutral conversation trace contract. The server maps whatever its
|
|
3
|
+
* tracing backend stores into these shapes, so the client never sees a
|
|
4
|
+
* backend's field names, credentials, URL structure or API version.
|
|
5
|
+
*/
|
|
6
|
+
export type TTraceRecordKind = 'agent' | 'generation' | 'tool' | 'span' | 'event';
|
|
7
|
+
/** `running` marks a record with no end time yet; it has a start but no duration. */
|
|
8
|
+
export type TTraceStatus = 'ok' | 'warning' | 'error' | 'running';
|
|
9
|
+
export type TTraceUsage = {
|
|
10
|
+
input?: number;
|
|
11
|
+
output?: number;
|
|
12
|
+
total?: number;
|
|
13
|
+
reasoning?: number;
|
|
14
|
+
cacheRead?: number;
|
|
15
|
+
cacheWrite?: number;
|
|
16
|
+
};
|
|
17
|
+
export type TTraceRecord = {
|
|
18
|
+
id: string;
|
|
19
|
+
traceId: string;
|
|
20
|
+
/** The response message whose turn produced this record; groups records into turns. */
|
|
21
|
+
messageId: string;
|
|
22
|
+
/** `null` for a root; may name a record that is not loaded (or does not exist). */
|
|
23
|
+
parentId: string | null;
|
|
24
|
+
kind: TTraceRecordKind;
|
|
25
|
+
name: string;
|
|
26
|
+
model?: string;
|
|
27
|
+
/** ISO-8601 timestamps. */
|
|
28
|
+
startTime: string;
|
|
29
|
+
endTime?: string;
|
|
30
|
+
/** First streamed token of a generation; splits its span into TTFT and decoding. */
|
|
31
|
+
completionStartTime?: string;
|
|
32
|
+
status: TTraceStatus;
|
|
33
|
+
statusMessage?: string;
|
|
34
|
+
usage?: TTraceUsage;
|
|
35
|
+
/** Total cost in USD, when the backend priced the record. */
|
|
36
|
+
cost?: number;
|
|
37
|
+
};
|
|
38
|
+
export type TTraceErrorCode = 'disabled' | 'not_found' | 'invalid_request' | 'rate_limited' | 'timeout' | 'unauthorized' | 'unsupported' | 'upstream_error';
|
|
39
|
+
export type TTraceErrorResponse = {
|
|
40
|
+
error: string;
|
|
41
|
+
errorCode: TTraceErrorCode;
|
|
42
|
+
};
|
|
43
|
+
export type TTraceAvailability = {
|
|
44
|
+
available: boolean;
|
|
45
|
+
/** Set when the backend cannot decide yet; ask again after this many milliseconds. */
|
|
46
|
+
retryAfterMs?: number;
|
|
47
|
+
};
|
|
48
|
+
export type TTracePageParams = {
|
|
49
|
+
conversationId: string;
|
|
50
|
+
cursor?: string;
|
|
51
|
+
};
|
|
52
|
+
export type TTraceRecordParams = {
|
|
53
|
+
conversationId: string;
|
|
54
|
+
recordId: string;
|
|
55
|
+
/** The turn the list attributed the record to; its traces are what authorize the read. */
|
|
56
|
+
messageId: string;
|
|
57
|
+
/** The `sourceId` of the page that listed the record, so its detail reads the same project. */
|
|
58
|
+
sourceId?: string;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Newest turns first; `nextCursor` loads the next older page. A turn's records
|
|
62
|
+
* may continue on the following page, and their order within a turn is not
|
|
63
|
+
* defined, so a client groups records by turn and orders them by time.
|
|
64
|
+
*/
|
|
65
|
+
export type TTracePage = {
|
|
66
|
+
records: TTraceRecord[];
|
|
67
|
+
nextCursor?: string;
|
|
68
|
+
/** Opaque identity of the backend project that served the page. */
|
|
69
|
+
sourceId?: string;
|
|
70
|
+
};
|
|
71
|
+
export type TTraceContent = {
|
|
72
|
+
value: string;
|
|
73
|
+
truncated: boolean;
|
|
74
|
+
};
|
|
75
|
+
export type TTraceRecordDetail = {
|
|
76
|
+
record: TTraceRecord;
|
|
77
|
+
/** False when the deployment withholds input, output and metadata. */
|
|
78
|
+
contentAvailable: boolean;
|
|
79
|
+
input?: TTraceContent;
|
|
80
|
+
output?: TTraceContent;
|
|
81
|
+
metadata?: TTraceContent;
|
|
82
|
+
};
|
|
83
|
+
export declare const TRACE_CURSOR_MAX_LENGTH = 4096;
|
|
84
|
+
export declare const TRACE_SOURCE_ID_MAX_LENGTH = 128;
|
|
85
|
+
export declare const TRACE_RECORD_ID_MAX_LENGTH = 256;
|
|
@@ -9,8 +9,8 @@ export declare enum DATE_RANGE {
|
|
|
9
9
|
PAST_MONTH = "m",
|
|
10
10
|
PAST_YEAR = "y"
|
|
11
11
|
}
|
|
12
|
-
export type SearchProvider = 'serper' | 'searxng' | 'tavily';
|
|
13
|
-
export type ScraperProvider = 'firecrawl' | 'serper' | 'tavily';
|
|
12
|
+
export type SearchProvider = 'serper' | 'searxng' | 'tavily' | 'keenable';
|
|
13
|
+
export type ScraperProvider = 'firecrawl' | 'serper' | 'tavily' | 'keenable';
|
|
14
14
|
export type RerankerType = 'infinity' | 'jina' | 'cohere' | 'none';
|
|
15
15
|
export interface Highlight {
|
|
16
16
|
score: number;
|
|
@@ -68,9 +68,13 @@ export interface SearchConfig {
|
|
|
68
68
|
serperApiKey?: string;
|
|
69
69
|
searxngInstanceUrl?: string;
|
|
70
70
|
searxngApiKey?: string;
|
|
71
|
+
searxngSearchOptions?: z.infer<typeof webSearchSchema>['searxngSearchOptions'];
|
|
71
72
|
tavilyApiKey?: string;
|
|
72
73
|
tavilySearchUrl?: string;
|
|
73
74
|
tavilySearchOptions?: TavilyConfig['tavilySearchOptions'];
|
|
75
|
+
keenableApiKey?: string;
|
|
76
|
+
keenableApiUrl?: string;
|
|
77
|
+
keenableSearchOptions?: KeenableConfig['keenableSearchOptions'];
|
|
74
78
|
}
|
|
75
79
|
export type References = {
|
|
76
80
|
links: MediaReference[];
|
|
@@ -130,6 +134,12 @@ export interface TavilyConfig {
|
|
|
130
134
|
tavilySearchOptions?: z.infer<typeof webSearchSchema>['tavilySearchOptions'];
|
|
131
135
|
tavilyScraperOptions?: z.infer<typeof webSearchSchema>['tavilyScraperOptions'];
|
|
132
136
|
}
|
|
137
|
+
export interface KeenableConfig {
|
|
138
|
+
keenableApiKey?: string;
|
|
139
|
+
keenableApiUrl?: string;
|
|
140
|
+
keenableSearchOptions?: z.infer<typeof webSearchSchema>['keenableSearchOptions'];
|
|
141
|
+
keenableScraperOptions?: z.infer<typeof webSearchSchema>['keenableScraperOptions'];
|
|
142
|
+
}
|
|
133
143
|
export interface ScraperContentResult {
|
|
134
144
|
content: string;
|
|
135
145
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
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 {
|
|
3
|
+
import type { CodeWorkspaceDescriptor, CodeEnvironmentMode, CodeWorkspaceOperation, CodeWorkspaceSelection } from './code/workspace';
|
|
4
|
+
import type { CodeEnvironmentUserConfigSchema, CodeEnvironmentUserSettings, TAgentsEndpoint } from './config';
|
|
5
|
+
import type { Agent, EToolResources, StatefulCodeEnvironment } from './types/assistants';
|
|
6
|
+
import type { CodeApprovalMode } from './code/approval';
|
|
4
7
|
import type { RefillIntervalUnit } from './balance';
|
|
5
8
|
import type { SettingDefinition } from './generate';
|
|
6
9
|
import type { TMinimalFeedback } from './feedback';
|
|
7
10
|
import type { ContentTypes } from './types/runs';
|
|
11
|
+
import type { ProviderId } from './providers';
|
|
8
12
|
export * from './schemas';
|
|
13
|
+
export * from './types/subagents';
|
|
9
14
|
export type TMessages = TMessage[];
|
|
10
15
|
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'> & {
|
|
11
16
|
modelDisplayLabel?: string;
|
|
@@ -48,6 +53,9 @@ export type TEphemeralAgent = {
|
|
|
48
53
|
export type TPayload = Partial<TMessage> & Partial<TEndpointOption> & {
|
|
49
54
|
isContinued: boolean;
|
|
50
55
|
isRegenerate?: boolean;
|
|
56
|
+
/** Manual context compaction: summarize the branch up to `parentMessageId`
|
|
57
|
+
* and end without a reply. No user message is created. */
|
|
58
|
+
compact?: boolean;
|
|
51
59
|
conversationId: string | null;
|
|
52
60
|
messages?: TMessages;
|
|
53
61
|
isTemporary: boolean;
|
|
@@ -62,6 +70,12 @@ export type TPayload = Partial<TMessage> & Partial<TEndpointOption> & {
|
|
|
62
70
|
* before the LLM turn runs.
|
|
63
71
|
*/
|
|
64
72
|
manualSkills?: string[];
|
|
73
|
+
/** Conversation-scoped preference for code tool approval behavior. */
|
|
74
|
+
codeApprovalMode?: CodeApprovalMode;
|
|
75
|
+
/** Immutable conversation choice for attached code execution. */
|
|
76
|
+
codeEnvironmentMode?: CodeEnvironmentMode;
|
|
77
|
+
/** Conversation-selected workspaces, with at most one binding per environment. */
|
|
78
|
+
codeWorkspaces?: CodeWorkspaceSelection[];
|
|
65
79
|
/** Browser IANA timezone (e.g. `America/New_York`) used to resolve local-time prompt variables server-side. */
|
|
66
80
|
timezone?: string;
|
|
67
81
|
/**
|
|
@@ -98,6 +112,9 @@ export type TSubmission = {
|
|
|
98
112
|
/** Client-only full message context used to restore branch siblings after scoped regenerate. */
|
|
99
113
|
regenerateMessages?: TMessage[];
|
|
100
114
|
isRegenerate?: boolean;
|
|
115
|
+
/** Manual context compaction; shaped like a regenerate on the client (no new
|
|
116
|
+
* user bubble) and sent to the server as a summarize-only turn. */
|
|
117
|
+
compact?: boolean;
|
|
101
118
|
initialResponse?: TMessage;
|
|
102
119
|
conversation: Partial<TConversation>;
|
|
103
120
|
endpointOption: TEndpointOption;
|
|
@@ -134,6 +151,12 @@ export type TSubmission = {
|
|
|
134
151
|
addedConvo?: TConversation;
|
|
135
152
|
/** Skills the user invoked via the `$` popover for this submission. */
|
|
136
153
|
manualSkills?: string[];
|
|
154
|
+
/** Conversation-scoped preference for code tool approval behavior. */
|
|
155
|
+
codeApprovalMode?: CodeApprovalMode;
|
|
156
|
+
/** Immutable conversation choice for attached code execution. */
|
|
157
|
+
codeEnvironmentMode?: CodeEnvironmentMode;
|
|
158
|
+
/** Conversation-selected workspaces, with at most one binding per environment. */
|
|
159
|
+
codeWorkspaces?: CodeWorkspaceSelection[];
|
|
137
160
|
/** Stable per-submission idempotency key (uuid) forwarded to the server to dedup retried start-generation requests. */
|
|
138
161
|
clientRequestId?: string;
|
|
139
162
|
/** Client-only carry-through for a receipt-bound queued recovery. */
|
|
@@ -200,10 +223,18 @@ export type TUser = {
|
|
|
200
223
|
backupCodes?: TBackupCode[];
|
|
201
224
|
personalization?: {
|
|
202
225
|
memories?: boolean;
|
|
226
|
+
statefulCodeEnvironment?: StatefulCodeEnvironment;
|
|
203
227
|
};
|
|
204
228
|
createdAt: string;
|
|
205
229
|
updatedAt: string;
|
|
206
230
|
};
|
|
231
|
+
export type TUpdateUserPreferencesRequest = {
|
|
232
|
+
statefulCodeEnvironment: StatefulCodeEnvironment;
|
|
233
|
+
};
|
|
234
|
+
export type TUpdateUserPreferencesResponse = {
|
|
235
|
+
updated: boolean;
|
|
236
|
+
preferences: TUpdateUserPreferencesRequest;
|
|
237
|
+
};
|
|
207
238
|
export type TGetConversationsResponse = {
|
|
208
239
|
conversations: TConversation[];
|
|
209
240
|
pageNumber: string;
|
|
@@ -305,6 +336,9 @@ export type TArchiveConversationRequest = {
|
|
|
305
336
|
isArchived: boolean;
|
|
306
337
|
};
|
|
307
338
|
export type TArchiveConversationResponse = TConversation;
|
|
339
|
+
export type TArchiveAllConversationsResponse = {
|
|
340
|
+
archivedCount: number;
|
|
341
|
+
};
|
|
308
342
|
export type TPinConversationRequest = {
|
|
309
343
|
conversationId: string;
|
|
310
344
|
pinned: boolean;
|
|
@@ -312,6 +346,7 @@ export type TPinConversationRequest = {
|
|
|
312
346
|
export type TPinConversationResponse = TConversation;
|
|
313
347
|
export type TSharedMessagesResponse = Omit<TSharedLink, 'messages'> & {
|
|
314
348
|
messages: TMessage[];
|
|
349
|
+
langfuseSessionUrl?: string;
|
|
315
350
|
};
|
|
316
351
|
export type TCreateShareLinkRequest = Pick<TConversation, 'conversationId'>;
|
|
317
352
|
export type TUpdateShareLinkRequest = Pick<TSharedLink, 'shareId' | 'targetMessageId'>;
|
|
@@ -372,6 +407,53 @@ export type TSearchResults = {
|
|
|
372
407
|
pages: string | number;
|
|
373
408
|
filter: object;
|
|
374
409
|
};
|
|
410
|
+
export type TPublicCodeEnvironment = {
|
|
411
|
+
id: string;
|
|
412
|
+
name: string;
|
|
413
|
+
type: 'managed' | 'attached';
|
|
414
|
+
default?: boolean;
|
|
415
|
+
pairingAvailable?: boolean;
|
|
416
|
+
configSchema?: CodeEnvironmentUserConfigSchema;
|
|
417
|
+
settings?: CodeEnvironmentUserSettings;
|
|
418
|
+
};
|
|
419
|
+
export type TCodeEnvironmentSummary = {
|
|
420
|
+
resourceId: string;
|
|
421
|
+
id: string;
|
|
422
|
+
name: string;
|
|
423
|
+
type: 'managed' | 'attached';
|
|
424
|
+
canEdit?: boolean;
|
|
425
|
+
canDelete: boolean;
|
|
426
|
+
configSchema?: CodeEnvironmentUserConfigSchema;
|
|
427
|
+
settings?: CodeEnvironmentUserSettings;
|
|
428
|
+
};
|
|
429
|
+
export type TCodeControlPlane = {
|
|
430
|
+
id: string;
|
|
431
|
+
name: string;
|
|
432
|
+
configSchema?: CodeEnvironmentUserConfigSchema;
|
|
433
|
+
};
|
|
434
|
+
export type TCodeEnvironmentsResponse = {
|
|
435
|
+
environments: TCodeEnvironmentSummary[];
|
|
436
|
+
controlPlanes: TCodeControlPlane[];
|
|
437
|
+
};
|
|
438
|
+
export type TCodeEnvironmentPairingResponse = {
|
|
439
|
+
environment: TCodeEnvironmentSummary;
|
|
440
|
+
pairing: {
|
|
441
|
+
workerId: string;
|
|
442
|
+
code: string;
|
|
443
|
+
expiresAt: string;
|
|
444
|
+
endpoint: string;
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
export type TCodeEnvironmentStatusResponse = {
|
|
448
|
+
environmentId: string;
|
|
449
|
+
status: 'offline' | 'starting' | 'ready';
|
|
450
|
+
statefulWorkspace?: boolean;
|
|
451
|
+
leaseExpiresInMs?: number;
|
|
452
|
+
sandboxProfile?: string;
|
|
453
|
+
runtimes?: string[];
|
|
454
|
+
operations?: CodeWorkspaceOperation[];
|
|
455
|
+
workspaces?: CodeWorkspaceDescriptor[];
|
|
456
|
+
};
|
|
375
457
|
export type TConfig = {
|
|
376
458
|
order: number;
|
|
377
459
|
type?: EModelEndpoint;
|
|
@@ -382,6 +464,8 @@ export type TConfig = {
|
|
|
382
464
|
plugins?: Record<string, string>;
|
|
383
465
|
name?: string;
|
|
384
466
|
iconURL?: string;
|
|
467
|
+
/** Canonical provider identity resolved at config load, used for branding. */
|
|
468
|
+
providerId?: ProviderId;
|
|
385
469
|
version?: string;
|
|
386
470
|
modelDisplayLabel?: string;
|
|
387
471
|
userProvide?: boolean | null;
|
|
@@ -393,6 +477,20 @@ export type TConfig = {
|
|
|
393
477
|
disableBuilder?: boolean;
|
|
394
478
|
retrievalModels?: string[];
|
|
395
479
|
capabilities?: string[];
|
|
480
|
+
statefulCodeSessions?: {
|
|
481
|
+
allowedEnvironments: StatefulCodeEnvironment[];
|
|
482
|
+
environments?: TPublicCodeEnvironment[];
|
|
483
|
+
approvalsEnabled?: boolean;
|
|
484
|
+
/** Approval modes the endpoint policy permits the client to offer. */
|
|
485
|
+
approvalModes?: CodeApprovalMode[];
|
|
486
|
+
};
|
|
487
|
+
/** Effective subagents-per-agent cap served from `endpoints.agents.maxSubagents`. */
|
|
488
|
+
maxSubagents?: number;
|
|
489
|
+
fileSharing?: TAgentsEndpoint['fileSharing'];
|
|
490
|
+
/** Concurrent Code API uploads allowed per route and authenticated principal. */
|
|
491
|
+
codeApiUploadConcurrency?: number;
|
|
492
|
+
/** Milliseconds one operation may spend waiting on Code API rate limits. */
|
|
493
|
+
codeApiMaxRetryWaitMs?: number;
|
|
396
494
|
customParams?: {
|
|
397
495
|
defaultParamsEndpoint?: string;
|
|
398
496
|
reasoningFormat?: ReasoningParameterFormat;
|
|
@@ -733,4 +831,6 @@ export type TLangfuseConnectionTestResponse = {
|
|
|
733
831
|
};
|
|
734
832
|
export type TLangfuseSessionLinkResponse = {
|
|
735
833
|
url: string | null;
|
|
834
|
+
/** Opaque identity of the project `url` opens, so a caller can tell whether it holds what it showed. */
|
|
835
|
+
destinationId?: string;
|
|
736
836
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "librechat-data-provider",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.523",
|
|
4
4
|
"description": "data services for librechat apps",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -43,9 +43,11 @@
|
|
|
43
43
|
},
|
|
44
44
|
"homepage": "https://librechat.ai",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"axios": "^1.
|
|
46
|
+
"axios": "^1.20.0",
|
|
47
|
+
"croner": "^10.0.1",
|
|
47
48
|
"dayjs": "^1.11.13",
|
|
48
|
-
"js-yaml": "^4.3.
|
|
49
|
+
"js-yaml": "^4.3.2",
|
|
50
|
+
"re2js": "^2.8.6",
|
|
49
51
|
"zod": "^3.22.4"
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|