librechat-data-provider 0.8.521 → 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 (57) hide show
  1. package/dist/{data-service-pwrlWjJs.mjs → data-service-CaB7saTP.mjs} +1145 -37
  2. package/dist/data-service-CaB7saTP.mjs.map +1 -0
  3. package/dist/{data-service-DOIF4BkW.js → data-service-D5kHzBt-.js} +1588 -36
  4. package/dist/data-service-D5kHzBt-.js.map +1 -0
  5. package/dist/index.js +947 -36
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +825 -37
  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 +2 -2
  15. package/dist/types/agentToolOptions.d.ts +11 -0
  16. package/dist/types/api-endpoints.d.ts +18 -0
  17. package/dist/types/bedrock.d.ts +168 -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 +9060 -1135
  21. package/dist/types/data-service.d.ts +40 -2
  22. package/dist/types/file-config.d.ts +1 -0
  23. package/dist/types/filters.d.ts +1422 -0
  24. package/dist/types/generate.d.ts +79 -1
  25. package/dist/types/index.d.ts +10 -0
  26. package/dist/types/keys.d.ts +23 -2
  27. package/dist/types/langchain.d.ts +4 -0
  28. package/dist/types/limits.d.ts +13 -0
  29. package/dist/types/mcp.d.ts +299 -210
  30. package/dist/types/messages.d.ts +5 -0
  31. package/dist/types/models.d.ts +732 -68
  32. package/dist/types/parameterSettings.d.ts +5 -1
  33. package/dist/types/parsers.d.ts +10 -0
  34. package/dist/types/permissions.d.ts +42 -1
  35. package/dist/types/providers.d.ts +36 -0
  36. package/dist/types/request.d.ts +2 -2
  37. package/dist/types/roles.d.ts +34 -0
  38. package/dist/types/runSteps.d.ts +59 -0
  39. package/dist/types/schemas.d.ts +1191 -26
  40. package/dist/types/stateful-code.d.ts +7 -0
  41. package/dist/types/types/agents.d.ts +92 -7
  42. package/dist/types/types/assistants.d.ts +96 -5
  43. package/dist/types/types/files.d.ts +12 -2
  44. package/dist/types/types/index.d.ts +2 -0
  45. package/dist/types/types/insights.d.ts +62 -0
  46. package/dist/types/types/mutations.d.ts +1 -0
  47. package/dist/types/types/queries.d.ts +30 -2
  48. package/dist/types/types/queuedTurns.d.ts +870 -0
  49. package/dist/types/types/runs.d.ts +95 -4
  50. package/dist/types/types/schedules.d.ts +306 -0
  51. package/dist/types/types/skills.d.ts +9 -0
  52. package/dist/types/types/subagents.d.ts +159 -0
  53. package/dist/types/types/web.d.ts +12 -2
  54. package/dist/types/types.d.ts +61 -1
  55. package/package.json +4 -2
  56. package/dist/data-service-DOIF4BkW.js.map +0 -1
  57. package/dist/data-service-pwrlWjJs.mjs.map +0 -1
@@ -33,11 +33,14 @@ export declare enum StepEvents {
33
33
  ON_REASONING_DELTA = "on_reasoning_delta",
34
34
  ON_RUN_STEP_DELTA = "on_run_step_delta",
35
35
  ON_RUN_STEP_COMPLETED = "on_run_step_completed",
36
+ /** Terminal signal for a run step: closed with a status and timestamps. */
37
+ ON_RUN_STEP_CLOSED = "on_run_step_closed",
36
38
  ON_SUMMARIZE_START = "on_summarize_start",
37
39
  ON_SUMMARIZE_DELTA = "on_summarize_delta",
38
40
  ON_SUMMARIZE_COMPLETE = "on_summarize_complete",
39
41
  ON_SUBAGENT_UPDATE = "on_subagent_update",
40
- ON_SANDBOX_STARTING = "on_sandbox_starting"
42
+ ON_SANDBOX_STARTING = "on_sandbox_starting",
43
+ ON_PTC_TOOL_CALL = "on_ptc_tool_call"
41
44
  }
42
45
  /** Payload for {@link StepEvents.ON_SANDBOX_STARTING} — the stateful code
43
46
  * sandbox is cold-booting for the given code tool call. */
@@ -45,6 +48,30 @@ export type SandboxStartingEvent = {
45
48
  tool_call_id: string;
46
49
  runId?: string;
47
50
  };
51
+ /** Lifecycle of one tool call made from inside a programmatic (PTC) program. */
52
+ export type PtcToolCallStatus = 'running' | 'success' | 'error';
53
+ /**
54
+ * Payload for {@link StepEvents.ON_PTC_TOOL_CALL} — one tool invocation the
55
+ * sandbox made on behalf of a programmatic tool-calling program. Emitted twice
56
+ * per inner call (`running`, then `success` / `error`) so the PTC card can
57
+ * render a live trace of what the code is doing under the code itself.
58
+ */
59
+ export type PtcToolCallEvent = {
60
+ /** The PTC run step's tool call id — the card this line belongs under. */
61
+ tool_call_id: string;
62
+ /** Stable per-program id; the settle event reuses the start event's value. */
63
+ call_id: string;
64
+ /** Inner tool id, e.g. `search_code_mcp_github`. */
65
+ name: string;
66
+ status: PtcToolCallStatus;
67
+ /** `key=value` preview of the call's input. Start event only. */
68
+ args?: string;
69
+ /** Truncated failure message. `error` status only. */
70
+ error?: string;
71
+ /** Wall-clock time the inner call took. Settle events only. */
72
+ durationMs?: number;
73
+ runId?: string;
74
+ };
48
75
  /** Token-tracking event names streamed to the client (separate from StepEvents dispatch). */
49
76
  export declare enum UsageEvents {
50
77
  ON_CONTEXT_USAGE = "on_context_usage",
@@ -79,6 +106,41 @@ export declare enum SteerEvents {
79
106
  export declare enum ActivityLabelEvents {
80
107
  ON_ACTIVITY_LABEL = "on_activity_label"
81
108
  }
109
+ /** Live title updates for an existing reasoning content part. */
110
+ export declare enum ReasoningLabelEvents {
111
+ ON_REASONING_LABEL = "on_reasoning_label",
112
+ /** Internal durable budget reservation; clients intentionally do not render it. */
113
+ ON_REASONING_LABEL_ATTEMPT = "on_reasoning_label_attempt"
114
+ }
115
+ type TReasoningLabelEventBase = {
116
+ /** Completion-local content index of the reasoning part being updated. */
117
+ index: number;
118
+ stepId: string;
119
+ responseMessageId?: string;
120
+ conversationId?: string;
121
+ };
122
+ /** Payload of the `on_reasoning_label` SSE event. */
123
+ export type TReasoningLabelEvent = TReasoningLabelEventBase & ({
124
+ /** Clears a snapshot title when its THINK slot changed during the resume gap. */
125
+ reset: true;
126
+ /** Step identity observed in the snapshot and exclusively eligible for this reset. */
127
+ previousStepId: string;
128
+ /** Latest run-global call-budget high-water, when present on fresh content. */
129
+ attempts?: number;
130
+ } | {
131
+ reset?: false;
132
+ /** Run-unique provider-call revision; may contain gaps after unsuccessful attempts. */
133
+ revision: number;
134
+ label: string;
135
+ status: 'streaming' | 'complete';
136
+ });
137
+ /** Durable run-cumulative call-budget reservation, attributed to one reasoning step. */
138
+ export type TReasoningLabelAttemptEvent = {
139
+ index: number;
140
+ stepId: string;
141
+ attempts: number;
142
+ submittedChars: number;
143
+ };
82
144
  /** Payload of the `on_activity_label` SSE event. */
83
145
  export type TActivityLabelEvent = {
84
146
  /** Absolute content index the label part occupies. */
@@ -116,6 +178,9 @@ export type TPendingSteer = {
116
178
  text: string;
117
179
  createdAt?: number;
118
180
  files?: Partial<TFile>[];
181
+ /** Quoted excerpts steered with the message ("Add to chat" selections);
182
+ * merged into the model-bound text at the injection boundary. */
183
+ quotes?: string[];
119
184
  /** The steer asked to interrupt generation at the next safe boundary —
120
185
  * kept on parked/replayed chips so the "interrupting" label survives. */
121
186
  preempt?: boolean;
@@ -136,6 +201,9 @@ export type TSteerAppliedEvent = {
136
201
  clientSteerId?: string;
137
202
  createdAt?: number;
138
203
  files?: Partial<TFile>[];
204
+ /** Quoted excerpts steered with the message (mirrors `SteerContentPart`,
205
+ * which cannot be imported here without a module cycle). */
206
+ quotes?: string[];
139
207
  };
140
208
  responseMessageId?: string;
141
209
  conversationId?: string;
@@ -217,8 +285,9 @@ export type TTokenUsageEvent = {
217
285
  /** Non-primary buckets fold into session cost/totals but not the live
218
286
  * context gauge: hidden sequential-agent calls (`sequential`), summary
219
287
  * 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';
288
+ * fast-model activity headers (`activity-label`, `activity-phase`), and
289
+ * live reasoning titles (`reasoning-label`) */
290
+ usage_type?: 'summarization' | 'subagent' | 'sequential' | 'activity-label' | 'activity-phase' | 'reasoning-label';
222
291
  runId?: string;
223
292
  /** Per-run emission sequence; keeps identical payloads from distinct model calls unique */
224
293
  seq?: number;
@@ -250,20 +319,42 @@ export declare const promptTokensFromUsage: (event: TTokenUsageEvent) => number;
250
319
  */
251
320
  export declare const reconcileContextUsage: (snapshot: TContextUsageEvent, promptTokens: number) => TContextUsageEvent;
252
321
  /** Lifecycle phase carried on subagent-progress envelopes (mirrors SDK SubagentUpdatePhase). */
253
- export type SubagentUpdatePhase = 'start' | 'run_step' | 'run_step_delta' | 'run_step_completed' | 'message_delta' | 'reasoning_delta' | 'stop' | 'error';
322
+ export type SubagentUpdatePhase = 'start' | 'run_step' | 'run_step_delta' | 'run_step_completed' | 'run_step_closed' | 'message_delta' | 'reasoning_delta' | 'stop' | 'error';
323
+ /** Structured root-to-leaf identity for one nested subagent execution. */
324
+ export interface SubagentAncestryEntry {
325
+ readonly subagentRunId: string;
326
+ readonly subagentType: string;
327
+ readonly subagentKind: 'agent' | 'graph';
328
+ /** Execution subject ID; synthetic for graph subagents. */
329
+ readonly subagentAgentId: string;
330
+ readonly parentRunId: string;
331
+ readonly parentAgentId?: string;
332
+ readonly parentToolCallId?: string;
333
+ }
254
334
  /** Single streamed subagent update forwarded by the SDK's SubagentExecutor. */
255
335
  export interface SubagentUpdateEvent {
256
336
  runId: string;
337
+ parentRunId?: string;
257
338
  subagentRunId: string;
339
+ /** Host-assigned identity preserved when one detached update overlaps delivery streams. */
340
+ activityEventId?: string;
341
+ /** Host-assigned monotonic sequence within one detached child run. */
342
+ activitySequence?: number;
258
343
  /** Parent-side `tool_call_id` for the `subagent` tool invocation that
259
344
  * triggered this run. Surfaces from the SDK (`3.1.67-dev.2`+) so hosts
260
345
  * can correlate child progress to the parent tool call deterministically. */
261
346
  parentToolCallId?: string;
262
347
  subagentType: string;
348
+ subagentKind?: 'agent' | 'graph';
349
+ /** Execution subject ID; synthetic for graph subagents. */
263
350
  subagentAgentId: string;
351
+ memberAgentId?: string;
352
+ depth?: number;
353
+ ancestry?: readonly SubagentAncestryEntry[];
264
354
  parentAgentId?: string;
265
355
  phase: SubagentUpdatePhase;
266
356
  data?: unknown;
267
357
  label?: string;
268
358
  timestamp: string;
269
359
  }
360
+ export {};
@@ -0,0 +1,306 @@
1
+ import { z } from 'zod';
2
+ /** Cadences the dialog builds from structured pickers (hour, minute, weekday). */
3
+ export declare const scheduleStructuredFrequencies: readonly ["hourly", "daily", "weekdays", "weekly"];
4
+ export type ScheduleStructuredFrequency = (typeof scheduleStructuredFrequencies)[number];
5
+ export declare const scheduleFrequencies: readonly ["hourly", "daily", "weekdays", "weekly", "cron"];
6
+ export type ScheduleFrequency = (typeof scheduleFrequencies)[number];
7
+ /** Bounds a stored expression. Generous for five fields, because each one can hold a
8
+ * list: an every-minute-of-the-hour cadence spelled out runs past two hundred chars. */
9
+ export declare const SCHEDULE_CRON_MAX_LENGTH = 256;
10
+ export declare const scheduleTargets: readonly ["new"];
11
+ export type ScheduleTarget = (typeof scheduleTargets)[number];
12
+ export type ScheduleDisabledReason = 'too_many_failures' | 'agent_deleted' | 'invalid_schedule' | 'permission_revoked' | 'insufficient_balance' | 'project_deleted' | 'project_required';
13
+ export type ScheduleRunStatus = 'started' | 'requires_action' | 'success' | 'error' | 'interrupted' | 'skipped_overlap' | 'skipped_balance';
14
+ export declare const structuredCadenceSchema: z.ZodObject<{
15
+ frequency: z.ZodEnum<["hourly", "daily", "weekdays", "weekly"]>;
16
+ hour: z.ZodNumber;
17
+ minute: z.ZodNumber;
18
+ daysOfWeek: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, number[], number[]>>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ frequency: "hourly" | "daily" | "weekdays" | "weekly";
21
+ hour: number;
22
+ minute: number;
23
+ daysOfWeek?: number[] | undefined;
24
+ }, {
25
+ frequency: "hourly" | "daily" | "weekdays" | "weekly";
26
+ hour: number;
27
+ minute: number;
28
+ daysOfWeek?: number[] | undefined;
29
+ }>;
30
+ export type TStructuredCadence = z.infer<typeof structuredCadenceSchema>;
31
+ /**
32
+ * A raw cron expression carries its own hour and minute, so it cannot share the
33
+ * structured shape: there is no single `hour` for `0 9,17 * * 1-5`. Syntax is
34
+ * validated server-side by croner, the same parser the engine fires from, rather
35
+ * than by a regex that would accept patterns croner then rejects at fire time.
36
+ */
37
+ export declare const cronCadenceSchema: z.ZodObject<{
38
+ frequency: z.ZodLiteral<"cron">;
39
+ expression: z.ZodString;
40
+ }, "strip", z.ZodTypeAny, {
41
+ frequency: "cron";
42
+ expression: string;
43
+ }, {
44
+ frequency: "cron";
45
+ expression: string;
46
+ }>;
47
+ export type TCronCadence = z.infer<typeof cronCadenceSchema>;
48
+ export declare const scheduleCadenceSchema: z.ZodDiscriminatedUnion<"frequency", [z.ZodObject<{
49
+ frequency: z.ZodEnum<["hourly", "daily", "weekdays", "weekly"]>;
50
+ hour: z.ZodNumber;
51
+ minute: z.ZodNumber;
52
+ daysOfWeek: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, number[], number[]>>;
53
+ }, "strip", z.ZodTypeAny, {
54
+ frequency: "hourly" | "daily" | "weekdays" | "weekly";
55
+ hour: number;
56
+ minute: number;
57
+ daysOfWeek?: number[] | undefined;
58
+ }, {
59
+ frequency: "hourly" | "daily" | "weekdays" | "weekly";
60
+ hour: number;
61
+ minute: number;
62
+ daysOfWeek?: number[] | undefined;
63
+ }>, z.ZodObject<{
64
+ frequency: z.ZodLiteral<"cron">;
65
+ expression: z.ZodString;
66
+ }, "strip", z.ZodTypeAny, {
67
+ frequency: "cron";
68
+ expression: string;
69
+ }, {
70
+ frequency: "cron";
71
+ expression: string;
72
+ }>]>;
73
+ export type TScheduleCadence = z.infer<typeof scheduleCadenceSchema>;
74
+ export declare const isCronCadence: (cadence: TScheduleCadence) => cadence is TCronCadence;
75
+ export declare const createSchedulePayloadSchema: z.ZodObject<{
76
+ name: z.ZodString;
77
+ prompt: z.ZodString;
78
+ agent_id: z.ZodString;
79
+ cadence: z.ZodDiscriminatedUnion<"frequency", [z.ZodObject<{
80
+ frequency: z.ZodEnum<["hourly", "daily", "weekdays", "weekly"]>;
81
+ hour: z.ZodNumber;
82
+ minute: z.ZodNumber;
83
+ daysOfWeek: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, number[], number[]>>;
84
+ }, "strip", z.ZodTypeAny, {
85
+ frequency: "hourly" | "daily" | "weekdays" | "weekly";
86
+ hour: number;
87
+ minute: number;
88
+ daysOfWeek?: number[] | undefined;
89
+ }, {
90
+ frequency: "hourly" | "daily" | "weekdays" | "weekly";
91
+ hour: number;
92
+ minute: number;
93
+ daysOfWeek?: number[] | undefined;
94
+ }>, z.ZodObject<{
95
+ frequency: z.ZodLiteral<"cron">;
96
+ expression: z.ZodString;
97
+ }, "strip", z.ZodTypeAny, {
98
+ frequency: "cron";
99
+ expression: string;
100
+ }, {
101
+ frequency: "cron";
102
+ expression: string;
103
+ }>]>;
104
+ timezone: z.ZodString;
105
+ target: z.ZodDefault<z.ZodEnum<["new"]>>;
106
+ file_ids: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
107
+ /**
108
+ * Chat project each run's conversation is filed under. `null` clears the scope.
109
+ * Ownership is checked server-side at write time and again at every fire, so a
110
+ * deleted project disables the schedule instead of silently filing runs loose.
111
+ */
112
+ chatProjectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
113
+ enabled: z.ZodDefault<z.ZodBoolean>;
114
+ /**
115
+ * Client-generated key making creation idempotent across retries. Creation commits
116
+ * the row and arms it in two writes, so a failure between them leaves the client
117
+ * unable to tell whether anything persisted; retrying blind can produce two recurring
118
+ * schedules. A retry carrying the same key resolves to the original row instead.
119
+ * REQUIRED: an optional key preserves the keyless duplicate path for any client
120
+ * that omits it, which is exactly the failure the key exists to close.
121
+ */
122
+ clientRequestId: z.ZodString;
123
+ }, "strip", z.ZodTypeAny, {
124
+ name: string;
125
+ agent_id: string;
126
+ clientRequestId: string;
127
+ prompt: string;
128
+ enabled: boolean;
129
+ timezone: string;
130
+ cadence: {
131
+ frequency: "hourly" | "daily" | "weekdays" | "weekly";
132
+ hour: number;
133
+ minute: number;
134
+ daysOfWeek?: number[] | undefined;
135
+ } | {
136
+ frequency: "cron";
137
+ expression: string;
138
+ };
139
+ target: "new";
140
+ chatProjectId?: string | null | undefined;
141
+ file_ids?: string[] | undefined;
142
+ }, {
143
+ name: string;
144
+ agent_id: string;
145
+ clientRequestId: string;
146
+ prompt: string;
147
+ timezone: string;
148
+ cadence: {
149
+ frequency: "hourly" | "daily" | "weekdays" | "weekly";
150
+ hour: number;
151
+ minute: number;
152
+ daysOfWeek?: number[] | undefined;
153
+ } | {
154
+ frequency: "cron";
155
+ expression: string;
156
+ };
157
+ chatProjectId?: string | null | undefined;
158
+ file_ids?: string[] | undefined;
159
+ enabled?: boolean | undefined;
160
+ target?: "new" | undefined;
161
+ }>;
162
+ export type TCreateSchedule = z.infer<typeof createSchedulePayloadSchema>;
163
+ /** Idempotency is a property of the CREATE attempt, not of the schedule's config. */
164
+ export declare const updateSchedulePayloadSchema: z.ZodObject<{
165
+ name: z.ZodOptional<z.ZodString>;
166
+ chatProjectId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
167
+ file_ids: z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>>;
168
+ agent_id: z.ZodOptional<z.ZodString>;
169
+ prompt: z.ZodOptional<z.ZodString>;
170
+ enabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
171
+ timezone: z.ZodOptional<z.ZodString>;
172
+ cadence: z.ZodOptional<z.ZodDiscriminatedUnion<"frequency", [z.ZodObject<{
173
+ frequency: z.ZodEnum<["hourly", "daily", "weekdays", "weekly"]>;
174
+ hour: z.ZodNumber;
175
+ minute: z.ZodNumber;
176
+ daysOfWeek: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, number[], number[]>>;
177
+ }, "strip", z.ZodTypeAny, {
178
+ frequency: "hourly" | "daily" | "weekdays" | "weekly";
179
+ hour: number;
180
+ minute: number;
181
+ daysOfWeek?: number[] | undefined;
182
+ }, {
183
+ frequency: "hourly" | "daily" | "weekdays" | "weekly";
184
+ hour: number;
185
+ minute: number;
186
+ daysOfWeek?: number[] | undefined;
187
+ }>, z.ZodObject<{
188
+ frequency: z.ZodLiteral<"cron">;
189
+ expression: z.ZodString;
190
+ }, "strip", z.ZodTypeAny, {
191
+ frequency: "cron";
192
+ expression: string;
193
+ }, {
194
+ frequency: "cron";
195
+ expression: string;
196
+ }>]>>;
197
+ target: z.ZodOptional<z.ZodDefault<z.ZodEnum<["new"]>>>;
198
+ } & {
199
+ /**
200
+ * The configRevision the client's edit was computed from (captured when the
201
+ * dialog opened). The server fences the update on it, so a concurrent edit
202
+ * from another tab answers 409 instead of being silently overwritten by a
203
+ * payload rebuilt from a stale snapshot (cadence is sent whole, so the
204
+ * server-side fresh-read fence alone cannot detect this).
205
+ */
206
+ expectedConfigRevision: z.ZodOptional<z.ZodNumber>;
207
+ }, "strip", z.ZodTypeAny, {
208
+ name?: string | undefined;
209
+ chatProjectId?: string | null | undefined;
210
+ file_ids?: string[] | undefined;
211
+ agent_id?: string | undefined;
212
+ prompt?: string | undefined;
213
+ enabled?: boolean | undefined;
214
+ timezone?: string | undefined;
215
+ cadence?: {
216
+ frequency: "hourly" | "daily" | "weekdays" | "weekly";
217
+ hour: number;
218
+ minute: number;
219
+ daysOfWeek?: number[] | undefined;
220
+ } | {
221
+ frequency: "cron";
222
+ expression: string;
223
+ } | undefined;
224
+ target?: "new" | undefined;
225
+ expectedConfigRevision?: number | undefined;
226
+ }, {
227
+ name?: string | undefined;
228
+ chatProjectId?: string | null | undefined;
229
+ file_ids?: string[] | undefined;
230
+ agent_id?: string | undefined;
231
+ prompt?: string | undefined;
232
+ enabled?: boolean | undefined;
233
+ timezone?: string | undefined;
234
+ cadence?: {
235
+ frequency: "hourly" | "daily" | "weekdays" | "weekly";
236
+ hour: number;
237
+ minute: number;
238
+ daysOfWeek?: number[] | undefined;
239
+ } | {
240
+ frequency: "cron";
241
+ expression: string;
242
+ } | undefined;
243
+ target?: "new" | undefined;
244
+ expectedConfigRevision?: number | undefined;
245
+ }>;
246
+ export type TUpdateSchedule = z.infer<typeof updateSchedulePayloadSchema>;
247
+ export type TScheduleLastRun = {
248
+ conversationId?: string;
249
+ status: ScheduleRunStatus;
250
+ error?: string;
251
+ firedAt: string;
252
+ };
253
+ export type TSchedule = {
254
+ id: string;
255
+ user: string;
256
+ name: string;
257
+ prompt: string;
258
+ agent_id: string;
259
+ cadence: TScheduleCadence;
260
+ timezone: string;
261
+ target: ScheduleTarget;
262
+ file_ids?: string[];
263
+ chatProjectId?: string | null;
264
+ enabled: boolean;
265
+ disabledReason?: ScheduleDisabledReason;
266
+ nextRunAt?: string;
267
+ lastRun?: TScheduleLastRun;
268
+ runCount: number;
269
+ failureCount: number;
270
+ configRevision?: number;
271
+ createdAt: string;
272
+ updatedAt: string;
273
+ };
274
+ export type TScheduleRun = {
275
+ scheduleId: string;
276
+ scheduledFor: string;
277
+ firedAt?: string;
278
+ conversationId?: string;
279
+ status: ScheduleRunStatus;
280
+ error?: string;
281
+ droppedFileIds?: string[];
282
+ durationMs?: number;
283
+ };
284
+ /** Server-resolved policy the dialog must mirror. Sourced from the same
285
+ * per-principal `interface.schedules` resolution the write handlers and the fire
286
+ * path enforce, so the form can never offer a choice the server would refuse. */
287
+ export type TScheduleLimits = {
288
+ maxPerUser: number;
289
+ /** Served with the list so the dialog can refuse a cadence the floor would reject
290
+ * rather than surfacing it as a 400 after submit. */
291
+ minIntervalMinutes: number;
292
+ /** Every schedule must be filed under a chat project. */
293
+ requireProject: boolean;
294
+ /** Operator-pinned destination project; when set it is the ONLY destination and
295
+ * the client must not offer a picker. */
296
+ projectId?: string;
297
+ };
298
+ export type TSchedulesResponse = {
299
+ schedules: TSchedule[];
300
+ limits: TScheduleLimits;
301
+ };
302
+ export type TScheduleRunNowResponse = {
303
+ scheduleId: string;
304
+ conversationId: string;
305
+ status: 'started';
306
+ };
@@ -216,6 +216,13 @@ export type TGitHubSkillSyncSkippedSkill = {
216
216
  errorCode: string;
217
217
  errorMessage: string;
218
218
  };
219
+ /** One upstream file a sync run published a skill without, and why. */
220
+ export type TGitHubSkillSyncSkippedFile = {
221
+ path: string;
222
+ skillPath: string;
223
+ errorCode: string;
224
+ errorMessage: string;
225
+ };
219
226
  export type TGitHubSkillSyncSourceStatus = {
220
227
  provider: 'github';
221
228
  sourceId: string;
@@ -240,6 +247,8 @@ export type TGitHubSkillSyncSourceStatus = {
240
247
  deletedFileCount: number;
241
248
  skippedSkillCount: number;
242
249
  skippedSkills?: TGitHubSkillSyncSkippedSkill[];
250
+ skippedFileCount: number;
251
+ skippedFiles?: TGitHubSkillSyncSkippedFile[];
243
252
  updatedAt?: string;
244
253
  createdAt?: string;
245
254
  };
@@ -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
+ };
@@ -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
  }