@epam/ai-dial-chat-hooks 1.2.0-dev.2 → 1.2.0-dev.201
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/api-error/api-error.js +5 -4
- package/attachment/useAttachmentValidation/useAttachmentValidation.js +26 -19
- package/attachments.d.ts +10 -4
- package/catalog/catalog-derivations.js +1 -1
- package/catalog/deployment-id.js +8 -2
- package/catalog/map-deployment-limits-to-input.js +81 -9
- package/catalog/map-deployment-to-catalog-item.js +34 -34
- package/catalog/map-entity-details-to-catalog.js +7 -0
- package/catalog/map-skill-to-catalog-item.js +30 -27
- package/catalog/publish.js +6 -5
- package/catalog/useApplicationCredentials/useApplicationCredentials.js +39 -0
- package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js +39 -39
- package/catalog/useSkillItemDetails.js +19 -17
- package/catalog.d.ts +134 -20
- package/catalog.js +23 -22
- package/conversation/announcement-message.js +16 -5
- package/conversation/conversation-transfer/export-conversation.js +24 -16
- package/conversation/conversation-transfer/import-conversation.js +80 -31
- package/conversation/conversation-transfer/queue.js +8 -5
- package/conversation/create-chat-stream-api.js +85 -49
- package/conversation/message-utils.js +44 -2
- package/conversation/stage.js +23 -0
- package/conversation/useAttachmentUpload/useAttachmentUpload.js +12 -5
- package/conversation/useConversationExport/useConversationExport.js +9 -9
- package/conversation/useConversationHandlers/useConversationHandlers.js +13 -17
- package/conversation/useConversationImport/useConversationImport.js +123 -121
- package/conversation/useConversationPanelItems/useConversationPanelItems.js +2 -3
- package/conversation/useConversationScroll/useConversationScroll.js +68 -64
- package/conversation/useConversationStream/apply-chunk.js +1 -1
- package/conversation/useConversationStream/generation-resume.js +104 -63
- package/conversation/useConversationStream/useConversationStream.js +183 -108
- package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +189 -0
- package/conversation/useTranscribeAudio/transcription-retry.js +5 -4
- package/conversation-overlay.d.ts +7 -0
- package/conversation-overlay.js +2 -0
- package/conversation-sources/useConversationSources/useConversationSources.js +31 -24
- package/conversation-sources.d.ts +1 -1
- package/conversation-transfer.d.ts +2 -1
- package/conversation.d.ts +274 -17
- package/conversation.js +32 -30
- package/file-manager-canvas.d.ts +398 -0
- package/file-manager-canvas.js +2 -0
- package/file-manager.d.ts +153 -348
- package/file-manager.js +25 -24
- package/files/attachment-canvas.js +51 -13
- package/files/attachment-types.js +14 -13
- package/files/dial-file-manager-mapping.util.js +2 -1
- package/files/dial-file-manager-path.util.js +23 -1
- package/files/dial-file-manager.model.js +23 -19
- package/files/dial-file-manager.types.js +3 -3
- package/files/useDialFileListing/useDialFileListing.js +157 -145
- package/files/useDialFileManager/useDialFileManager.js +132 -128
- package/files/useDialFileManagerSections/useDialFileManagerSections.js +155 -0
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +20 -19
- package/files/useDialFileMutations/useDialFileMutations.js +33 -32
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +117 -110
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +43 -0
- package/index.d.ts +1124 -90
- package/index.js +136 -122
- package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.js +7 -5
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +1 -1
- package/mcp-apps/useMcpAppTools/useMcpAppTools.js +1 -1
- package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.js +25 -23
- package/mcp-apps.d.ts +8 -6
- package/oauth/toolset-id.js +5 -3
- package/oauth/useToolsetLogin/useToolsetLogin.js +8 -8
- package/oauth.d.ts +32 -0
- package/oauth.js +9 -9
- package/package.json +36 -21
- package/scheduled-task/scheduled-task-description.js +77 -0
- package/scheduled-task/scheduled-task-preparation.js +24 -0
- package/scheduled-task/scheduled-task-trigger.js +7 -2
- package/scheduled-task/scheduled-tasks-api-client.js +19 -0
- package/scheduled-task/use-scheduled-task-runs.js +194 -0
- package/scheduled-task/use-scheduled-tasks.js +93 -0
- package/scheduled-tasks.d.ts +195 -3
- package/scheduled-tasks.js +7 -2
- package/skill/skill-archive.js +19 -0
- package/skill/skill-types.js +8 -7
- package/skill/skill.js +42 -27
- package/skill/useSkillArchiveImport/useSkillArchiveImport.js +75 -0
- package/skill/useSkillEditorLoad.js +29 -28
- package/skill/useSkillEditorSubmit.js +108 -84
- package/skill/useSkillFileActions.js +70 -58
- package/skill-editor.d.ts +131 -3
- package/skill-editor.js +9 -8
- package/usage/map-usage-data-to-dashboard.js +66 -0
- package/usage/map-user-usage-to-model-limits.js +202 -0
- package/usage.d.ts +125 -0
- package/usage.js +3 -0
- package/usePageFileDrag/usePageFileDrag.js +3 -3
- package/utils.d.ts +8 -6
package/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Annotation } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
import { AnnotationGroup } from '@epam/ai-dial-quotations';
|
|
3
|
+
import { ApplicationExternalServiceDto } from '@epam/ai-dial-chat-api-client';
|
|
4
|
+
import { ApplicationVisualizer } from '@epam/ai-dial-chat-shared';
|
|
3
5
|
import { ArchiveItemDto } from '@epam/ai-dial-chat-api-client';
|
|
4
6
|
import { Attachment } from '@epam/ai-dial-chat-shared';
|
|
5
7
|
import { AttachmentDisplayResolvers } from '@epam/ai-dial-chat-shared';
|
|
@@ -25,6 +27,7 @@ import { ConversationTransferJob } from '@epam/ai-dial-chat-shared';
|
|
|
25
27
|
import { ConversationTransferWarningCode } from '@epam/ai-dial-chat-shared';
|
|
26
28
|
import { CopyFilesResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
27
29
|
import { CopyItemDto } from '@epam/ai-dial-chat-api-client';
|
|
30
|
+
import { CreatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
|
|
28
31
|
import { CreateFolderDto } from '@epam/ai-dial-chat-api-client';
|
|
29
32
|
import { CreateFolderResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
30
33
|
import { CreateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
|
|
@@ -34,8 +37,6 @@ import type { CustomVisualizerDataLayout } from '@epam/ai-dial-chat-shared';
|
|
|
34
37
|
import { DeleteFilesResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
35
38
|
import { DeleteItemDto } from '@epam/ai-dial-chat-api-client';
|
|
36
39
|
import { DeploymentConfigurationSchema } from '@epam/ai-dial-chat-shared';
|
|
37
|
-
import { DeploymentCreationFormLocaleEntry } from '@epam/ai-dial-builder-form';
|
|
38
|
-
import { DeploymentCreationFormLocaleOption } from '@epam/ai-dial-builder-form';
|
|
39
40
|
import { DeploymentDetailsDto } from '@epam/ai-dial-chat-api-client';
|
|
40
41
|
import { DeploymentFeatures } from '@epam/ai-dial-chat-shared';
|
|
41
42
|
import { DeploymentItemDto } from '@epam/ai-dial-chat-api-client';
|
|
@@ -59,22 +60,33 @@ import { Dispatch } from 'react';
|
|
|
59
60
|
import { DisplayAttachment } from '@epam/ai-dial-chat-shared';
|
|
60
61
|
import { DropdownItem } from '@epam/ai-dial-ui-kit';
|
|
61
62
|
import { ExportFolder } from '@epam/ai-dial-chat-shared';
|
|
63
|
+
import { ExternalServicesApi } from '@epam/ai-dial-chat-api-client';
|
|
62
64
|
import { FileManagerColumnKey } from '@epam/ai-dial-react-file-manager';
|
|
65
|
+
import { FileManagerSelectableNode } from '@epam/ai-dial-chat-shared';
|
|
63
66
|
import { FileMetadataResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
64
67
|
import { FilesApi } from '@epam/ai-dial-chat-api-client';
|
|
68
|
+
import { FileTreeOptions } from '@epam/ai-dial-react-file-manager';
|
|
65
69
|
import { FileUploadBatchState } from '@epam/ai-dial-chat-shared';
|
|
66
70
|
import { FileUploadEntry } from '@epam/ai-dial-chat-shared';
|
|
67
71
|
import { FileUploadResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
68
72
|
import { FileUploadStatus } from '@epam/ai-dial-chat-shared';
|
|
69
73
|
import { FileUploadValidationResult } from '@epam/ai-dial-chat-shared';
|
|
74
|
+
import { FilterChipItem } from '@epam/ai-dial-ui-kit';
|
|
70
75
|
import { FilterTab } from '@epam/ai-dial-chat-shared';
|
|
71
76
|
import { getParentFolderPath } from '@epam/ai-dial-chat-shared';
|
|
77
|
+
import type { GroupedAttachmentItem } from '@epam/ai-dial-chat-shared';
|
|
78
|
+
import { Implementation } from '@modelcontextprotocol/sdk/types.js';
|
|
72
79
|
import type { InputHighlightData } from '@epam/pdf-highlighter-kit';
|
|
73
80
|
import { ListFilesItemDto } from '@epam/ai-dial-chat-api-client';
|
|
74
81
|
import { ListFilesResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
75
82
|
import { ListPublicFilesRequest } from '@epam/ai-dial-chat-api-client';
|
|
83
|
+
import { ListScheduledTaskRunsResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
84
|
+
import { ListScheduledTasksResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
85
|
+
import { ListScheduledTasksSortEnum } from '@epam/ai-dial-chat-api-client';
|
|
76
86
|
import { ListSharedFilesRequest } from '@epam/ai-dial-chat-api-client';
|
|
87
|
+
import { LocaleOption } from '@epam/ai-dial-chat-shared';
|
|
77
88
|
import { LocaleTextEntryDto } from '@epam/ai-dial-chat-api-client';
|
|
89
|
+
import { LocalizedTextEntry } from '@epam/ai-dial-chat-shared';
|
|
78
90
|
import { McpAppToolSummaryDto } from '@epam/ai-dial-chat-api-client';
|
|
79
91
|
import { McpUiHostContext } from '@mcp-ui/client';
|
|
80
92
|
import { Message } from '@epam/ai-dial-chat-shared';
|
|
@@ -82,10 +94,13 @@ import { MessageAttachment } from '@epam/ai-dial-chat-shared';
|
|
|
82
94
|
import { MessageCustomContent } from '@epam/ai-dial-chat-shared';
|
|
83
95
|
import { MessageRating } from '@epam/ai-dial-chat-shared';
|
|
84
96
|
import { Middleware } from '@epam/ai-dial-chat-api-client';
|
|
97
|
+
import { ModelLimitPeriodStatuses } from '@epam/ai-dial-usage-dashboard';
|
|
98
|
+
import { ModelLimitRow } from '@epam/ai-dial-usage-dashboard';
|
|
85
99
|
import { MoveFilesResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
86
100
|
import { MoveItemDto } from '@epam/ai-dial-chat-api-client';
|
|
87
101
|
import { MutableRefObject } from 'react';
|
|
88
102
|
import { NotificationVariant } from '@epam/ai-dial-ui-kit';
|
|
103
|
+
import { OfflineCredentialsApi } from '@epam/ai-dial-chat-api-client';
|
|
89
104
|
import { OverlayChatMessage } from '@epam/ai-dial-chat-overlay';
|
|
90
105
|
import { PromptFolderResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
91
106
|
import { PromptListResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
@@ -111,6 +126,10 @@ import { RevokeAccessItemDto } from '@epam/ai-dial-chat-api-client';
|
|
|
111
126
|
import { RevokeAccessResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
112
127
|
import { ScheduledTaskCreateFormValues } from '@epam/ai-dial-scheduled-tasks';
|
|
113
128
|
import { ScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
|
|
129
|
+
import { ScheduledTaskRunDto } from '@epam/ai-dial-chat-api-client';
|
|
130
|
+
import { ScheduledTaskValidationErrors } from '../../libs/scheduled-tasks/validation';
|
|
131
|
+
import { ScheduledTaskValidationOptions } from '../../libs/scheduled-tasks/validation';
|
|
132
|
+
import { ScheduleTriggerDto } from '@epam/ai-dial-chat-api-client';
|
|
114
133
|
import { SendCompletionDtoModeEnum } from '@epam/ai-dial-chat-api-client';
|
|
115
134
|
import { SetStateAction } from 'react';
|
|
116
135
|
import { ShareApi } from '@epam/ai-dial-chat-api-client';
|
|
@@ -122,16 +141,16 @@ import { SkillEditorFileActions } from '@epam/ai-dial-skill-editor';
|
|
|
122
141
|
import { SkillEditorValues } from '@epam/ai-dial-skill-editor';
|
|
123
142
|
import { SkillFileBatchError } from '@epam/ai-dial-skill-editor';
|
|
124
143
|
import { SkillFileListResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
144
|
+
import { SkillFileSourceEntry } from '@epam/ai-dial-skill-editor';
|
|
125
145
|
import { SkillFileTreeNode } from '@epam/ai-dial-skill-editor';
|
|
126
146
|
import { SkillFileUploadCandidate } from '@epam/ai-dial-skill-editor';
|
|
127
147
|
import { SkillFileValidationResult } from '@epam/ai-dial-skill-editor';
|
|
128
148
|
import { SkillMetadataItemDto } from '@epam/ai-dial-chat-api-client';
|
|
129
149
|
import { SkillUploadResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
150
|
+
import { Stage } from '@epam/ai-dial-chat-shared';
|
|
130
151
|
import { StarterOption } from '@epam/ai-dial-chat-shared';
|
|
131
152
|
import { StatusMessage } from '@epam/ai-dial-chat-shared';
|
|
132
153
|
import { StreamChunk } from '@epam/ai-dial-chat-shared';
|
|
133
|
-
import { TabModel } from '@epam/ai-dial-ui-kit';
|
|
134
|
-
import { ToolbarOptions } from '@epam/ai-dial-react-file-manager';
|
|
135
154
|
import { ToolMenuItem } from '@epam/ai-dial-chat-shared';
|
|
136
155
|
import { ToolsetLoginBodyDto } from '@epam/ai-dial-chat-api-client';
|
|
137
156
|
import { ToolsetLogoutBodyDto } from '@epam/ai-dial-chat-api-client';
|
|
@@ -139,9 +158,11 @@ import { ToolsetsApi } from '@epam/ai-dial-chat-api-client';
|
|
|
139
158
|
import { TranscriptionApi } from '@epam/ai-dial-chat-api-client';
|
|
140
159
|
import { UnpublishCatalogEntityDto } from '@epam/ai-dial-chat-api-client';
|
|
141
160
|
import { UnpublishResultDto } from '@epam/ai-dial-chat-api-client';
|
|
161
|
+
import { UpdatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
|
|
142
162
|
import { UpdateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
|
|
143
163
|
import { UploadArchiveResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
144
164
|
import { UploadedAttachmentResult } from '@epam/ai-dial-chat-shared';
|
|
165
|
+
import { UsageLimitCardData } from '@epam/ai-dial-usage-dashboard';
|
|
145
166
|
import { useGridEditingScroll } from '@epam/ai-dial-chat-shared';
|
|
146
167
|
import { UseGridEditingScrollOptions } from '@epam/ai-dial-chat-shared';
|
|
147
168
|
import { UseGridEditingScrollResult } from '@epam/ai-dial-chat-shared';
|
|
@@ -161,6 +182,7 @@ export declare interface AgentCapabilities {
|
|
|
161
182
|
hasConfiguration?: boolean;
|
|
162
183
|
hasChatCompletion?: boolean;
|
|
163
184
|
hasResponsesApi?: boolean;
|
|
185
|
+
hasSkills?: boolean;
|
|
164
186
|
}
|
|
165
187
|
|
|
166
188
|
/** Input-attachment configuration for an agent (application) deployment. */
|
|
@@ -212,10 +234,32 @@ export declare interface AnnouncementContent {
|
|
|
212
234
|
title: string | null;
|
|
213
235
|
description: string | null;
|
|
214
236
|
html: string | null;
|
|
237
|
+
/** Entries of the popover the banner opens. */
|
|
238
|
+
items?: readonly AnnouncementListItem[];
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/** One entry of the announcements popover behind the banner's `+N` pill. */
|
|
242
|
+
export declare interface AnnouncementListItem {
|
|
243
|
+
/** Plain-text heading of the entry. */
|
|
244
|
+
title: string;
|
|
245
|
+
/** Supporting copy of the entry, sanitized before it is rendered. */
|
|
246
|
+
description?: string | null;
|
|
247
|
+
/** Optional call to action shown at the end of the entry. */
|
|
248
|
+
link?: AnnouncementListItemLink | null;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/** A link rendered as the call to action of an announcements-popover entry. */
|
|
252
|
+
export declare interface AnnouncementListItemLink {
|
|
253
|
+
/** Visible text of the call to action. */
|
|
254
|
+
label: string;
|
|
255
|
+
/** Absolute `http`/`https` target the call to action opens. */
|
|
256
|
+
href: string;
|
|
215
257
|
}
|
|
216
258
|
|
|
217
259
|
/** Normalized shape returned by {@link getApiErrorDetails}. */
|
|
218
260
|
export declare interface ApiErrorDetails {
|
|
261
|
+
/** Stable domain error code supplied by the API, when present. */
|
|
262
|
+
code?: string;
|
|
219
263
|
/** HTTP status code carried by the error, when available. */
|
|
220
264
|
status?: number;
|
|
221
265
|
/** Resolved human-readable error message, or `null` when none could be resolved. */
|
|
@@ -227,6 +271,25 @@ export declare interface ApiErrorDetails {
|
|
|
227
271
|
/** Appends a locale's uppercased code to a field label, e.g. `'Name [EN]'`. */
|
|
228
272
|
export declare const appendLocaleCode: (label: string, locale: string) => string;
|
|
229
273
|
|
|
274
|
+
/**
|
|
275
|
+
* Applies a single SSE stream chunk to the message list.
|
|
276
|
+
*
|
|
277
|
+
*
|
|
278
|
+
* Attachments are accumulated: each chunk's attachments are appended to the
|
|
279
|
+
* existing array rather than replacing it.
|
|
280
|
+
*
|
|
281
|
+
* Annotations are merged by `index`: partial `body.title` and `body.quote`
|
|
282
|
+
* strings are concatenated across chunks, matching the same delta-merge
|
|
283
|
+
* semantics used for stages.
|
|
284
|
+
*
|
|
285
|
+
* `state` is overwritten (not merged) by each chunk that carries one,
|
|
286
|
+
* matching the DIAL stateful-app contract.
|
|
287
|
+
*
|
|
288
|
+
* @returns Updated message array, or `null` when the chunk carries no
|
|
289
|
+
* actionable data (empty content, no form_schema, and no attachments).
|
|
290
|
+
*/
|
|
291
|
+
export declare const applyChunkToMessages: (messages: Message[], messageIndex: number, chunk: StreamChunk) => Message[] | null;
|
|
292
|
+
|
|
230
293
|
/** Converts an APScheduler weekday (Monday=0..Sunday=6) to a JS `Date` weekday (Sunday=0..Saturday=6). */
|
|
231
294
|
export declare const apSchedulerDayToJsDay: (apSchedulerDay: number) => number;
|
|
232
295
|
|
|
@@ -294,6 +357,7 @@ declare enum AttachmentContentType {
|
|
|
294
357
|
Code = 'code',
|
|
295
358
|
Html = 'html',
|
|
296
359
|
Visualizer = 'visualizer',
|
|
360
|
+
GroupedVisualizer = 'grouped_visualizer',
|
|
297
361
|
McpApp = 'mcp_app',
|
|
298
362
|
Unsupported = 'unsupported',
|
|
299
363
|
Error = 'error',
|
|
@@ -325,10 +389,12 @@ export declare const attachmentToDto: (attachment: Attachment) => AttachmentDto;
|
|
|
325
389
|
export declare interface AttachmentValidationErrorEvent {
|
|
326
390
|
/** Why the attachment(s) were rejected. */
|
|
327
391
|
reason: AttachmentValidationErrorReason;
|
|
328
|
-
/** The resolved MIME types the caller currently allows (possibly empty). */
|
|
329
|
-
allowedMimeTypes
|
|
392
|
+
/** The resolved MIME types the caller currently allows (possibly empty). Present only when `reason` is `NoTypesAllowed` or `UnsupportedType`. */
|
|
393
|
+
allowedMimeTypes?: string[];
|
|
330
394
|
/** Already-formatted, non-translated extension list (e.g. ".png, .jpg"), present only when `reason` is `UnsupportedType`. */
|
|
331
395
|
formats?: string;
|
|
396
|
+
/** The size limit, in bytes, that was exceeded. Present only when `reason` is `FileTooLarge`. */
|
|
397
|
+
maxFileSizeBytes?: number;
|
|
332
398
|
}
|
|
333
399
|
|
|
334
400
|
/** Reason a rejected attachment failed validation. */
|
|
@@ -336,7 +402,9 @@ export declare enum AttachmentValidationErrorReason {
|
|
|
336
402
|
/** No MIME types are allowed at all — attachments are disabled entirely. */
|
|
337
403
|
NoTypesAllowed = "noTypesAllowed",
|
|
338
404
|
/** The attachment's content type is not among the allowed MIME types. */
|
|
339
|
-
UnsupportedType = "unsupportedType"
|
|
405
|
+
UnsupportedType = "unsupportedType",
|
|
406
|
+
/** The attachment's file size exceeds `maxFileSizeBytes`. */
|
|
407
|
+
FileTooLarge = "fileTooLarge"
|
|
340
408
|
}
|
|
341
409
|
|
|
342
410
|
/** Thrown by `transcribeAudio`; carries a machine-readable `reason` instead of translated text. */
|
|
@@ -353,7 +421,7 @@ export declare enum AudioTranscriptionErrorReason {
|
|
|
353
421
|
Unavailable = "unavailable",
|
|
354
422
|
/** The recording exceeds the caller's configured size limit. */
|
|
355
423
|
TooLarge = "tooLarge",
|
|
356
|
-
/**
|
|
424
|
+
/** Recognition is rate-limited, unavailable, or exhausted short gateway retries. */
|
|
357
425
|
Busy = "busy",
|
|
358
426
|
/** Recognition failed for any other reason. */
|
|
359
427
|
Failed = "failed"
|
|
@@ -371,7 +439,7 @@ export declare enum AuthenticationType {
|
|
|
371
439
|
* `additionalLocaleCodes` and excluding whichever code is already the
|
|
372
440
|
* primary Name/Description field.
|
|
373
441
|
*/
|
|
374
|
-
export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: string[], primaryLocale: string) =>
|
|
442
|
+
export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: string[], primaryLocale: string) => LocaleOption[];
|
|
375
443
|
|
|
376
444
|
/**
|
|
377
445
|
* Builds the value persisted under `StorageKey.TextOfClosedAnnouncement` when
|
|
@@ -379,9 +447,18 @@ export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: strin
|
|
|
379
447
|
* hidden only while the current announcement produces the same signature, so
|
|
380
448
|
* editing any part of it brings the banner back with no version counter.
|
|
381
449
|
*
|
|
450
|
+
* Every piece of content the banner surface renders feeds the signature — the
|
|
451
|
+
* title, the description, and the popover entries behind the pill, which live
|
|
452
|
+
* inside the banner and are hidden along with it. Publishing a new entry in
|
|
453
|
+
* that list therefore invalidates an earlier dismissal on its own, even when
|
|
454
|
+
* the banner line itself is untouched.
|
|
455
|
+
*
|
|
382
456
|
* A legacy-only announcement returns the raw HTML string — byte-identical to
|
|
383
457
|
* what shipped before the structured fields existed — so dismissals recorded
|
|
384
|
-
* by older builds keep working without a storage migration.
|
|
458
|
+
* by older builds keep working without a storage migration. `items` is left
|
|
459
|
+
* out of the payload entirely when the list is empty for the same reason: a
|
|
460
|
+
* deployment that never configured the popover keeps matching the signatures
|
|
461
|
+
* its users already have stored.
|
|
385
462
|
*/
|
|
386
463
|
export declare const buildAnnouncementSignature: (content: AnnouncementContent) => string;
|
|
387
464
|
|
|
@@ -493,6 +570,13 @@ export declare const buildSkillManifestFromFrontmatter: (baseFrontmatter: Record
|
|
|
493
570
|
* authored it, when it last changed, and its file inventory. Grouping folders
|
|
494
571
|
* in the file listing are excluded from both the count and the rows. Sizes are
|
|
495
572
|
* not shown — the skill metadata carries no content-length field.
|
|
573
|
+
*
|
|
574
|
+
* `skill` is the authoritative `getSkillMetadata` response when that request
|
|
575
|
+
* fulfilled; the caller falls back to the catalog listing entry only when it
|
|
576
|
+
* rejected (`useSkillItemDetails`'s `onFetchSkillDetails`). Either way, this
|
|
577
|
+
* function never fills a gap in one source from the other — an absent
|
|
578
|
+
* `author` omits the row and an absent `updatedAt` leaves the updated row's
|
|
579
|
+
* value empty, exactly as `skill` carries it.
|
|
496
580
|
*/
|
|
497
581
|
export declare const buildSkillOverview: (skill: SkillMetadataItemDto | undefined, files: SkillMetadataItemDto[], about: SkillAboutDetails | undefined, labels: SkillOverviewLabels) => CatalogItemOverview;
|
|
498
582
|
|
|
@@ -688,6 +772,13 @@ export declare interface ChatStreamCompletionOptions {
|
|
|
688
772
|
signal?: AbortSignal;
|
|
689
773
|
}
|
|
690
774
|
|
|
775
|
+
/**
|
|
776
|
+
* Classifies an import request's HTTP status into a semantic outcome: 400/413/422 are
|
|
777
|
+
* archive-content problems, 409 is a name collision, 429 is rate limiting, 502/503 mean the
|
|
778
|
+
* backend is unavailable, and anything else (including no status at all) is generic.
|
|
779
|
+
*/
|
|
780
|
+
export declare const classifySkillArchiveImportError: (status: number | undefined) => SkillArchiveImportErrorKind;
|
|
781
|
+
|
|
691
782
|
/** Clears all cached fetch results. Call this when leaving a conversation. */
|
|
692
783
|
export declare const clearAttachmentCache: () => void;
|
|
693
784
|
|
|
@@ -714,7 +805,7 @@ export declare const COLUMNS_WITHOUT_AUTHOR: FileManagerColumnKey[];
|
|
|
714
805
|
* `undefined` (not `[]`) when nothing remains, so a request untouched by
|
|
715
806
|
* this feature stays byte-identical to today.
|
|
716
807
|
*/
|
|
717
|
-
export declare const composeLocalePayload: (otherLocales:
|
|
808
|
+
export declare const composeLocalePayload: (otherLocales: LocalizedTextEntry[], primaryLocale: string) => LocaleTextEntryDto[] | undefined;
|
|
718
809
|
|
|
719
810
|
/** Whether an export includes the conversation's attachments. */
|
|
720
811
|
export declare enum ConversationExportMode {
|
|
@@ -730,6 +821,28 @@ export declare interface ConversationGenerationLifecycle {
|
|
|
730
821
|
completeGeneration: (path: string, generationId: string) => void;
|
|
731
822
|
}
|
|
732
823
|
|
|
824
|
+
/** Labels and formatter callbacks for the conversation-input limits mapping utility. */
|
|
825
|
+
export declare interface ConversationInputLimitsLabels {
|
|
826
|
+
/** Heading of the group listing the selected deployment's token limits. */
|
|
827
|
+
tokenGroup: string;
|
|
828
|
+
/** Heading of the group listing the caller's cost budget and spend against it. */
|
|
829
|
+
costGroup: string;
|
|
830
|
+
/** Label for the current-UTC-day row, used by both groups. */
|
|
831
|
+
periodDay: string;
|
|
832
|
+
/** Label for the current-UTC-week row, used by both groups. */
|
|
833
|
+
periodWeek: string;
|
|
834
|
+
/** Label for the current-UTC-month row, used by both groups. */
|
|
835
|
+
periodMonth: string;
|
|
836
|
+
/** Formats the combined used/total display value for a capped row. */
|
|
837
|
+
formatValueLabel: (used: string, total: string) => string;
|
|
838
|
+
/** Formats the ARIA label for a capped progress row. */
|
|
839
|
+
formatProgressAriaLabel: (params: {
|
|
840
|
+
label: string;
|
|
841
|
+
used: string;
|
|
842
|
+
total: string;
|
|
843
|
+
}) => string;
|
|
844
|
+
}
|
|
845
|
+
|
|
733
846
|
/** Stable reverse-lookup maps returned by `useConversationLookupMaps`. */
|
|
734
847
|
export declare interface ConversationLookupMaps {
|
|
735
848
|
/** Returns the raw context id for a panel-space conversation id, or `undefined` when not found. */
|
|
@@ -880,6 +993,12 @@ export declare interface CreateChatStreamApiDeps {
|
|
|
880
993
|
getTimezone?: () => string | undefined;
|
|
881
994
|
/** `fetch` implementation to issue requests through. Defaults to the global `fetch`. */
|
|
882
995
|
fetchImpl?: typeof fetch;
|
|
996
|
+
/**
|
|
997
|
+
* How long an open completion stream may go without receiving a byte
|
|
998
|
+
* (keepalive comments included) before it is reported as a
|
|
999
|
+
* {@link StreamInterruptedError}. Defaults to {@link DEFAULT_STREAM_IDLE_TIMEOUT_MS}.
|
|
1000
|
+
*/
|
|
1001
|
+
idleTimeoutMs?: number;
|
|
883
1002
|
}
|
|
884
1003
|
|
|
885
1004
|
/**
|
|
@@ -929,6 +1048,12 @@ export declare const createMessagePair: (content: string, customContent?: Messag
|
|
|
929
1048
|
*/
|
|
930
1049
|
export declare const createPublishApiClient: (publishApi: PublishApi) => PublishApiClient;
|
|
931
1050
|
|
|
1051
|
+
/**
|
|
1052
|
+
* Composes scheduler operations over an already configured generated client.
|
|
1053
|
+
* Authentication, base URL, CSRF, and retries remain host responsibilities.
|
|
1054
|
+
*/
|
|
1055
|
+
export declare const createScheduledTasksApiClient: (client: ScheduledTasksConfiguredClient) => ScheduledTasksApiClient;
|
|
1056
|
+
|
|
932
1057
|
/**
|
|
933
1058
|
* Builds a generated-client `Middleware` that throws on 401, and on a
|
|
934
1059
|
* classified invalid-CSRF 403 refreshes the token and retries the original
|
|
@@ -991,6 +1116,15 @@ export declare type CsrfRefreshOutcome = {
|
|
|
991
1116
|
|
|
992
1117
|
export declare const DATE_OPTIONS: Intl.DateTimeFormatOptions;
|
|
993
1118
|
|
|
1119
|
+
/**
|
|
1120
|
+
* Inverse of `encodeDeploymentId` — decodes each `/`-separated segment back
|
|
1121
|
+
* to its raw, human-readable form. A segment that isn't valid
|
|
1122
|
+
* percent-encoding is passed through unchanged rather than throwing, since
|
|
1123
|
+
* this decodes externally-sourced ids (the settings iframe's postMessage
|
|
1124
|
+
* protocol).
|
|
1125
|
+
*/
|
|
1126
|
+
export declare const decodeDeploymentId: (id: string) => string;
|
|
1127
|
+
|
|
994
1128
|
/**
|
|
995
1129
|
* Inverse of `encodeToolsetId` — decodes each `/`-separated segment back to
|
|
996
1130
|
* its raw, human-readable form. A segment that isn't valid percent-encoding
|
|
@@ -1007,11 +1141,14 @@ export declare const decodeToolsetId: (id: string) => string;
|
|
|
1007
1141
|
* present in either map, excluding `primaryLocale` — that key is already the
|
|
1008
1142
|
* primary Name/Description field, not a row in the popup.
|
|
1009
1143
|
*/
|
|
1010
|
-
export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) =>
|
|
1144
|
+
export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) => LocalizedTextEntry[];
|
|
1011
1145
|
|
|
1012
1146
|
/** Fallback text of a {@link GenerationConflictError} when no message is supplied. */
|
|
1013
1147
|
export declare const DEFAULT_GENERATION_CONFLICT_MESSAGE = "A response is already being generated in this conversation. Wait for it to finish or stop it before sending another message.";
|
|
1014
1148
|
|
|
1149
|
+
/** Safe fallback for hosts that do not supply a translated persistence warning. */
|
|
1150
|
+
export declare const DEFAULT_GENERATION_PERSISTENCE_ERROR_MESSAGE = "The response could not be saved. It is still shown here, but may be lost if you reload or leave this page. Copy it before continuing.";
|
|
1151
|
+
|
|
1015
1152
|
/**
|
|
1016
1153
|
* Default ceiling on the summed byte length of an export's attachments.
|
|
1017
1154
|
*
|
|
@@ -1025,6 +1162,8 @@ export declare const DEFAULT_GENERATION_CONFLICT_MESSAGE = "A response is alread
|
|
|
1025
1162
|
*/
|
|
1026
1163
|
export declare const DEFAULT_MAX_ARCHIVE_BYTES: number;
|
|
1027
1164
|
|
|
1165
|
+
export declare const DEFAULT_STREAM_IDLE_TIMEOUT_MS = 45000;
|
|
1166
|
+
|
|
1028
1167
|
/** Translated folder-path labels for the Personal/Shared/Public deployment groupings. */
|
|
1029
1168
|
export declare interface DeploymentFolderLabels {
|
|
1030
1169
|
personal: string;
|
|
@@ -1091,15 +1230,34 @@ export declare const deriveAvailableTabIds: <T extends CatalogEntityType>(items:
|
|
|
1091
1230
|
export declare const deriveConversationRowActionState: (item: Pick<ConversationListItemDto, "sharedWithMe" | "publishedWithMe" | "isReadonly">, publishHistory: PublishHistoryEntry[] | undefined, recipients: RecipientsCountEntry) => ConversationRowActionState;
|
|
1092
1231
|
|
|
1093
1232
|
/**
|
|
1094
|
-
* Returns items marked as a user favorite, in original order.
|
|
1233
|
+
* Returns items marked as a user favorite that are not hidden, in original order.
|
|
1095
1234
|
*/
|
|
1096
1235
|
export declare const deriveFavoriteItems: (items: readonly CatalogItem[]) => CatalogItem[];
|
|
1097
1236
|
|
|
1237
|
+
/**
|
|
1238
|
+
* Describes the complete trigger without requiring unrelated task metadata.
|
|
1239
|
+
* Unsupported constraints remain Custom, with the full source expression.
|
|
1240
|
+
* Calendar-month shifts crossing month boundaries or days 29–31 remain
|
|
1241
|
+
* Custom because a shifted monthly day is not equivalent around short months.
|
|
1242
|
+
*/
|
|
1243
|
+
export declare const describeScheduledTaskTrigger: (trigger: ScheduleTriggerDto, { timeZone, referenceDate, }?: ScheduledTaskTriggerDescriptionOptions) => ScheduledTaskTriggerDescription;
|
|
1244
|
+
|
|
1245
|
+
/** Source tabs `useDialFileManagerSections` can merge into the All tab, in display order. */
|
|
1246
|
+
export declare const DIAL_FILE_MANAGER_SECTION_TABS: readonly DialFileManagerTabs[];
|
|
1247
|
+
|
|
1098
1248
|
/** Strip the "files/{bucket}/" prefix from a DIAL Core URL to get the path within the bucket. */
|
|
1099
1249
|
export declare const dialCorePathToRelative: (dialCorePath: string, bucket: string) => string;
|
|
1100
1250
|
|
|
1101
1251
|
export { DialFileManagerActionProfile }
|
|
1102
1252
|
|
|
1253
|
+
/** One source tab rendered as a top-level folder of the All view. */
|
|
1254
|
+
export declare interface DialFileManagerSection {
|
|
1255
|
+
/** Source tab backing this section — `MyFiles`, `Shared` or `Organization`. */
|
|
1256
|
+
tab: DialFileManagerTabs;
|
|
1257
|
+
/** Display name of the section's top-level folder; also the first segment of its virtual paths. An empty, slash-containing or repeated label is replaced by the tab id. */
|
|
1258
|
+
rootLabel: string;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1103
1261
|
export { DialFileManagerVariant }
|
|
1104
1262
|
|
|
1105
1263
|
/**
|
|
@@ -1434,7 +1592,9 @@ export declare enum FileManagerNotificationReason {
|
|
|
1434
1592
|
/** `onUploadArchive` extracted some entries successfully and some failed; `count`/`names`/`restCount` describe the failures. */
|
|
1435
1593
|
UploadArchivePartiallyFailed = "uploadArchivePartiallyFailed",
|
|
1436
1594
|
/** `onUploadArchive`'s `uploadArchive` request itself rejected. */
|
|
1437
|
-
UploadArchiveRequestFailed = "uploadArchiveRequestFailed"
|
|
1595
|
+
UploadArchiveRequestFailed = "uploadArchiveRequestFailed",
|
|
1596
|
+
/** A copy/move targeted a destination in a different All-view section from its source items; no request was made. */
|
|
1597
|
+
CrossSectionTransferUnsupported = "crossSectionTransferUnsupported"
|
|
1438
1598
|
}
|
|
1439
1599
|
|
|
1440
1600
|
/**
|
|
@@ -1455,8 +1615,6 @@ export declare type FileNameValidationError = {
|
|
|
1455
1615
|
} | {
|
|
1456
1616
|
reason: FileNameValidationErrorReason.DuplicateName;
|
|
1457
1617
|
existingName: string;
|
|
1458
|
-
} | {
|
|
1459
|
-
reason: FileNameValidationErrorReason.LeadingDot;
|
|
1460
1618
|
};
|
|
1461
1619
|
|
|
1462
1620
|
/**
|
|
@@ -1469,8 +1627,7 @@ export declare enum FileNameValidationErrorReason {
|
|
|
1469
1627
|
ForbiddenSymbols = "forbiddenSymbols",
|
|
1470
1628
|
ReservedName = "reservedName",
|
|
1471
1629
|
TooLong = "tooLong",
|
|
1472
|
-
DuplicateName = "duplicateName"
|
|
1473
|
-
LeadingDot = "leadingDot"
|
|
1630
|
+
DuplicateName = "duplicateName"
|
|
1474
1631
|
}
|
|
1475
1632
|
|
|
1476
1633
|
/**
|
|
@@ -1487,7 +1644,10 @@ export declare enum FileOperationKind {
|
|
|
1487
1644
|
FileCopied = "fileCopied",
|
|
1488
1645
|
FilesCopied = "filesCopied",
|
|
1489
1646
|
FileMoved = "fileMoved",
|
|
1490
|
-
FilesMoved = "filesMoved"
|
|
1647
|
+
FilesMoved = "filesMoved",
|
|
1648
|
+
/** A copy whose every item landed in its own source folder (Duplicate). */
|
|
1649
|
+
FileDuplicated = "fileDuplicated",
|
|
1650
|
+
FilesDuplicated = "filesDuplicated"
|
|
1491
1651
|
}
|
|
1492
1652
|
|
|
1493
1653
|
/**
|
|
@@ -1502,13 +1662,15 @@ export declare interface FileOperationSuccessEvent {
|
|
|
1502
1662
|
name?: string;
|
|
1503
1663
|
/** Number of items the operation covered, when applicable. */
|
|
1504
1664
|
count?: number;
|
|
1505
|
-
/**
|
|
1665
|
+
/**
|
|
1666
|
+
* Destination folder as a slash-joined virtual path starting at the root
|
|
1667
|
+
* label (e.g. `My files/reports`), for copy/move/duplicate operations.
|
|
1668
|
+
*/
|
|
1506
1669
|
destinationFolderName?: string;
|
|
1507
1670
|
/**
|
|
1508
|
-
* Whether the affected item is a folder rather than a file.
|
|
1509
|
-
*
|
|
1510
|
-
*
|
|
1511
|
-
* "File renamed").
|
|
1671
|
+
* Whether the affected item is a folder rather than a file. Set for rename,
|
|
1672
|
+
* copy, move, and duplicate events; on a multi-item event it describes the
|
|
1673
|
+
* first successfully affected item (the one `name` refers to).
|
|
1512
1674
|
*/
|
|
1513
1675
|
isFolder?: boolean;
|
|
1514
1676
|
}
|
|
@@ -1606,6 +1768,9 @@ export declare const formatOperationFolderName: (destinationFolder: string, root
|
|
|
1606
1768
|
*/
|
|
1607
1769
|
export declare const formatQuotedNameList: (names: string[]) => string;
|
|
1608
1770
|
|
|
1771
|
+
/** Formats a raw `resetsAt` into display strings, or returns `undefined` when it cannot be formatted. */
|
|
1772
|
+
export declare type FormatResetTime = (resetsAt: string | undefined) => ResetTimeDisplay | undefined;
|
|
1773
|
+
|
|
1609
1774
|
/**
|
|
1610
1775
|
* Reported through `onError` when the backend rejects a completion because
|
|
1611
1776
|
* another generation is already active on the same conversation — what a
|
|
@@ -1617,7 +1782,13 @@ export declare class GenerationConflictError extends Error {
|
|
|
1617
1782
|
constructor(message?: string);
|
|
1618
1783
|
}
|
|
1619
1784
|
|
|
1620
|
-
/**
|
|
1785
|
+
/** Identifies a failed terminal save independently of the model's generation outcome. */
|
|
1786
|
+
export declare class GenerationPersistenceError extends Error {
|
|
1787
|
+
static readonly type = "conversation_save_failed";
|
|
1788
|
+
constructor();
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
/** Normalizes any API error into a `{ status?, message, traceId?, code? }` shape. */
|
|
1621
1792
|
export declare const getApiErrorDetails: (error: unknown) => Promise<ApiErrorDetails>;
|
|
1622
1793
|
|
|
1623
1794
|
/** Resolves a human-readable message from an API error's response body, or falls back to `Error.message`. */
|
|
@@ -1652,6 +1823,21 @@ export declare const getConversationSource: (item: Pick<ConversationListItemDto,
|
|
|
1652
1823
|
*/
|
|
1653
1824
|
export declare const getExternalServiceFallbackName: (serviceName: string) => string;
|
|
1654
1825
|
|
|
1826
|
+
/**
|
|
1827
|
+
* Returns the tool values the conversation's last message sets through its
|
|
1828
|
+
* `form_schema`, restricted to `toolIds`, plus a key identifying that exact
|
|
1829
|
+
* application. `undefined` when the last message is not an assistant message
|
|
1830
|
+
* or sets no known tool.
|
|
1831
|
+
*
|
|
1832
|
+
* Streamed chunks and reloads re-create an identical `form_schema`; comparing
|
|
1833
|
+
* keys rather than object identity applies an app's value once and leaves a
|
|
1834
|
+
* later user toggle alone until the app sends a different value.
|
|
1835
|
+
*/
|
|
1836
|
+
export declare const getFormSchemaToolSyncKey: (conversationId: string, messages: Message[], toolIds: readonly string[]) => {
|
|
1837
|
+
key: string;
|
|
1838
|
+
values: Record<string, boolean>;
|
|
1839
|
+
} | undefined;
|
|
1840
|
+
|
|
1655
1841
|
/**
|
|
1656
1842
|
* Returns the deployment the conversation was last running on: scanning
|
|
1657
1843
|
* backwards, the `new_deployment_id` of a `model_changed` status message or
|
|
@@ -1675,6 +1861,15 @@ export declare const getLastDeploymentId: (messages: Message[]) => string | null
|
|
|
1675
1861
|
*/
|
|
1676
1862
|
export declare const getLastUserMessageToolConfiguration: (messages: Message[]) => Record<string, unknown> | undefined;
|
|
1677
1863
|
|
|
1864
|
+
/**
|
|
1865
|
+
* Returns the tool configuration a (re-)loaded conversation should show: the
|
|
1866
|
+
* last user message's `configuration_value`, overlaid in order by the
|
|
1867
|
+
* `form_schema` values of the assistant messages after it. An app that turned
|
|
1868
|
+
* a toggle off in its final response must not see it re-armed on reload just
|
|
1869
|
+
* because the user message that started the run had it on.
|
|
1870
|
+
*/
|
|
1871
|
+
export declare const getLatestToolConfiguration: (messages: Message[]) => Record<string, unknown> | undefined;
|
|
1872
|
+
|
|
1678
1873
|
/**
|
|
1679
1874
|
* Extracts the deployment/model ID from a DIAL Core conversation ID.
|
|
1680
1875
|
*
|
|
@@ -1722,6 +1917,9 @@ export declare const getQuickAppConversationStarters: (conversationStarters: unk
|
|
|
1722
1917
|
*/
|
|
1723
1918
|
export declare const getRemainingCharacters: (value: string, maxLength: number) => number | null;
|
|
1724
1919
|
|
|
1920
|
+
/** Returns the limit each over-long skill field exceeds, keyed by field; fields within their limit are omitted. */
|
|
1921
|
+
export declare const getSkillFieldLengthViolations: (values: Record<SkillTextField, string>) => Partial<Record<SkillTextField, number>>;
|
|
1922
|
+
|
|
1725
1923
|
/**
|
|
1726
1924
|
* Returns the text to start/populate a conversation from a selected starter button.
|
|
1727
1925
|
* `description` (the schema property's shared intro/question text) is used only
|
|
@@ -1775,6 +1973,15 @@ export declare const getStarterSubmitText: (starter: StarterOption, description?
|
|
|
1775
1973
|
*/
|
|
1776
1974
|
export declare const getTimeOfDayGreeting: (hour: number, translations: GreetingTranslations, firstName?: string) => string;
|
|
1777
1975
|
|
|
1976
|
+
/**
|
|
1977
|
+
* Returns the boolean values an assistant message's `form_schema` sets, keyed
|
|
1978
|
+
* by property name, or `undefined` when no property resolves to a boolean.
|
|
1979
|
+
* Lets a DIAL app switch a tools-menu toggle (e.g. `deep_research`) per
|
|
1980
|
+
* message — on while a run is in progress, off once its result is delivered.
|
|
1981
|
+
* Not filtered by tool id: `restoreToolConfiguration` ignores unknown ids.
|
|
1982
|
+
*/
|
|
1983
|
+
export declare const getToolConfigurationFromFormSchema: (formSchema: DeploymentConfigurationSchema | undefined) => Record<string, boolean> | undefined;
|
|
1984
|
+
|
|
1778
1985
|
/** Name of the same-origin `BroadcastChannel` shared by an OAuth flow's opener and its callback popup. */
|
|
1779
1986
|
export declare const getToolsetOAuthChannelName: (flowId: string) => string;
|
|
1780
1987
|
|
|
@@ -1809,6 +2016,30 @@ export declare interface GreetingTranslations {
|
|
|
1809
2016
|
nightNoName: string;
|
|
1810
2017
|
}
|
|
1811
2018
|
|
|
2019
|
+
/** Content payload for an application-scoped grouped visualizer: every attachment a message's visualizer claims, rendered together inside one sandboxed iframe. */
|
|
2020
|
+
declare interface GroupedVisualizerCanvasContent {
|
|
2021
|
+
/** Discriminates the content type to select the correct renderer. */
|
|
2022
|
+
type: AttachmentContentType.GroupedVisualizer;
|
|
2023
|
+
/** Iframe `src`, resolved from the matching registry entry's `url`. */
|
|
2024
|
+
url: string;
|
|
2025
|
+
/** One item per claimed attachment, in the message's attachment order. Each `url` is absolute, resolved by the host. */
|
|
2026
|
+
attachments: GroupedAttachmentItem[];
|
|
2027
|
+
/** Presentation layout hints (`themeId`, `width`, `height`, `mobileHeight`) shared by every item. */
|
|
2028
|
+
layout: CustomVisualizerDataLayout;
|
|
2029
|
+
/** postMessage protocol namespace — MUST equal the registry entry's `title`, or the iframe never receives data. */
|
|
2030
|
+
visualizerName: string;
|
|
2031
|
+
/** Milliseconds to wait for a `send()` request's response before rejecting. From the registry entry; does NOT bound the handshake. */
|
|
2032
|
+
requestTimeout?: number;
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
/** Outcome of building a grouped visualizer payload. */
|
|
2036
|
+
export declare interface GroupedVisualizerResolution {
|
|
2037
|
+
/** The grouped payload, or `null` when no claimed attachment resolved to a URL. */
|
|
2038
|
+
content: GroupedVisualizerCanvasContent | null;
|
|
2039
|
+
/** The claimed attachments that reached `content.attachments`, in the input's order. The caller returns the rest to the ordinary attachment tray. */
|
|
2040
|
+
resolved: DisplayAttachment[];
|
|
2041
|
+
}
|
|
2042
|
+
|
|
1812
2043
|
/** Whether at least one tool toggle in `value` is active. */
|
|
1813
2044
|
export declare const hasActiveToolConfig: (value: Record<string, boolean> | undefined) => boolean;
|
|
1814
2045
|
|
|
@@ -1827,6 +2058,9 @@ export declare const hasDialFileWritePermission: (folder?: DialFile) => boolean;
|
|
|
1827
2058
|
|
|
1828
2059
|
export declare const hasForbiddenNameSymbols: (name: string, forbiddenSymbolsRegExp?: RegExp) => boolean;
|
|
1829
2060
|
|
|
2061
|
+
/** Returns `true` when both sets contain exactly the same paths. */
|
|
2062
|
+
export declare const hasSamePaths: (a: ReadonlySet<string>, b: ReadonlySet<string>) => boolean;
|
|
2063
|
+
|
|
1830
2064
|
/**
|
|
1831
2065
|
* Whether the operator configured the structured banner (title and/or
|
|
1832
2066
|
* description) rather than only the legacy HTML message. Drives which of the
|
|
@@ -1878,8 +2112,8 @@ export declare const isAnswerIncomplete: (answer: Message | undefined) => boolea
|
|
|
1878
2112
|
* True when the conversation's last message is an unresolved assistant
|
|
1879
2113
|
* placeholder: the backend only persists a conversation at generation start
|
|
1880
2114
|
* (empty placeholder) and at generation end (final content, or a partial
|
|
1881
|
-
* flagged `streamErrorMessage`/`wasStoppedByUser`)
|
|
1882
|
-
*
|
|
2115
|
+
* flagged `streamErrorMessage`/`wasStoppedByUser`). This can mean generation
|
|
2116
|
+
* is still active elsewhere, or that its terminal save failed.
|
|
1883
2117
|
*/
|
|
1884
2118
|
export declare const isAwaitingGenerationResume: (conversation: Conversation) => boolean;
|
|
1885
2119
|
|
|
@@ -2014,8 +2248,8 @@ export declare const mapDeploymentDetailsDtoToEntityDetails: (dto: DeploymentDet
|
|
|
2014
2248
|
/** Maps a deployment limits DTO to display-ready catalog limits, or `undefined` when no qualifying stats exist. */
|
|
2015
2249
|
export declare const mapDeploymentLimitsDtoToCatalogLimits: (dto: DeploymentLimitsResponseDto | undefined, labels: DeploymentLimitsLabels) => CatalogItemLimits | undefined;
|
|
2016
2250
|
|
|
2017
|
-
/** Maps
|
|
2018
|
-
export declare const mapDeploymentLimitsToInput: (dto: DeploymentLimitsResponseDto | undefined) =>
|
|
2251
|
+
/** Maps a deployment's day, week, and month token limits and the caller's cost budget to display-ready rows, or `undefined` when none qualify. */
|
|
2252
|
+
export declare const mapDeploymentLimitsToInput: (dto: DeploymentLimitsResponseDto | undefined, labels: ConversationInputLimitsLabels, formatResetTime?: FormatResetTime) => CatalogItemLimits | undefined;
|
|
2019
2253
|
|
|
2020
2254
|
/** Maps a deployment listing row into the catalog UI's `CatalogItem` shape. */
|
|
2021
2255
|
export declare const mapDeploymentToCatalogItem: (deployment: DeploymentItemDto, { favoriteIds, entityDetails, folderLabels, editableSchemaIds, isCustomAppsEditable, activeLocale, primaryLocale, resolveIconUrl, }: MapDeploymentToCatalogItemOptions) => CatalogItem;
|
|
@@ -2081,12 +2315,18 @@ export declare const mapFileMetadataToDialFile: (metadata: FileMetadataResponseD
|
|
|
2081
2315
|
export declare const mapFormValuesToCreateBody: (values: ScheduledTaskCreateFormValues) => CreateScheduledTaskBodyDto;
|
|
2082
2316
|
|
|
2083
2317
|
/**
|
|
2084
|
-
* Maps validated edit
|
|
2085
|
-
*
|
|
2086
|
-
* `CreateScheduledTaskBodyDto`, so this reuses the same trigger-building logic.
|
|
2318
|
+
* Maps a complete, validated edit draft to an update body. An unset skill
|
|
2319
|
+
* emits null to remove the saved reference; hydrate from detail before editing.
|
|
2087
2320
|
*/
|
|
2088
2321
|
export declare const mapFormValuesToUpdateBody: (values: ScheduledTaskCreateFormValues) => UpdateScheduledTaskBodyDto;
|
|
2089
2322
|
|
|
2323
|
+
/**
|
|
2324
|
+
* Maps the same top-level Cost budgets used by the aggregate cards into table-header state.
|
|
2325
|
+
*
|
|
2326
|
+
* @param formatResetTime - Formats each period's top-level `resetsAt` into the header's reset trio. Omit it to produce statuses with no reset fields.
|
|
2327
|
+
*/
|
|
2328
|
+
export declare const mapOverallCostLimitsToPeriodStatuses: (usage: UserLimitStatsResponseDto | undefined, activeLocale: string, t: Translate_2, formatResetTime?: FormatResetTime) => ModelLimitPeriodStatuses;
|
|
2329
|
+
|
|
2090
2330
|
/**
|
|
2091
2331
|
* Maps a prompt DTO into a catalog item.
|
|
2092
2332
|
*
|
|
@@ -2145,6 +2385,13 @@ export declare interface MapSkillToCatalogItemOptions {
|
|
|
2145
2385
|
favoriteIds: ReadonlySet<string>;
|
|
2146
2386
|
}
|
|
2147
2387
|
|
|
2388
|
+
/**
|
|
2389
|
+
* Returns the normalized stages of a raw stage array or a message-like
|
|
2390
|
+
* payload (reading `custom_content.stages`, falling back to
|
|
2391
|
+
* `customContent.stages`), or `undefined` when there are none.
|
|
2392
|
+
*/
|
|
2393
|
+
export declare const mapStages: (source: RawStage[] | RawStageSource | null | undefined) => Stage[] | undefined;
|
|
2394
|
+
|
|
2148
2395
|
/**
|
|
2149
2396
|
* Maps a toolset's specification into the lib's credential-status shape,
|
|
2150
2397
|
* for refreshing the details panel after login/logout. Includes both
|
|
@@ -2169,6 +2416,25 @@ export declare interface MapToolsetToCatalogItemOptions {
|
|
|
2169
2416
|
resolveIconUrl: (iconUrl: string | undefined) => string | undefined;
|
|
2170
2417
|
}
|
|
2171
2418
|
|
|
2419
|
+
/**
|
|
2420
|
+
* Maps a `UserLimitStatsResponseDto` into `UsageLimitCardGroup`'s `cards` prop,
|
|
2421
|
+
* in Today / This week / This month order. A period is omitted entirely when
|
|
2422
|
+
* the response carries no usable stat for it. Each card's reset trio comes from
|
|
2423
|
+
* `formatResetTime`, and is absent when that callback returns `undefined`.
|
|
2424
|
+
*/
|
|
2425
|
+
export declare const mapUsageDataToDashboard: (usage: UserLimitStatsResponseDto | undefined, t: Translate, formatResetTime: FormatResetTime) => UsageLimitCardData[];
|
|
2426
|
+
|
|
2427
|
+
/**
|
|
2428
|
+
* Maps `usage.deployments` into `ModelLimitsSection`'s `rows` prop, joined with model or application
|
|
2429
|
+
* identity from `deploymentItems`. Rows are included only when any displayed period stat has nonzero
|
|
2430
|
+
* usage (Cost stats only, for an application). Order follows `Object.keys(deployments)` —
|
|
2431
|
+
* `deploymentItems` is enrichment-only.
|
|
2432
|
+
*
|
|
2433
|
+
* @param resolveIconUrl - Resolves a deployment's raw `iconUrl` to the URL the avatar should load.
|
|
2434
|
+
* @param resolveDisplayName - Resolves a localized-text map or plain string to the display name for `activeLocale`.
|
|
2435
|
+
*/
|
|
2436
|
+
export declare const mapUserUsageToModelLimits: (usage: UserLimitStatsResponseDto | undefined, deploymentItems: DeploymentItemDto[], activeLocale: string, t: Translate_2, resolveIconUrl: ResolveIconUrl, resolveDisplayName: ResolveDisplayName) => ModelLimitRow[];
|
|
2437
|
+
|
|
2172
2438
|
/** Content payload for Markdown file attachments. */
|
|
2173
2439
|
declare interface MarkdownCanvasContent {
|
|
2174
2440
|
/** Discriminates the content type to select the correct renderer. */
|
|
@@ -2189,6 +2455,8 @@ declare type McpAppDisplayMode = NonNullable<McpUiHostContext['displayMode']>;
|
|
|
2189
2455
|
declare interface McpAppHostAdapter {
|
|
2190
2456
|
/** `McpUiHostContext` to deliver to the mounted app's `ui/initialize` handshake. */
|
|
2191
2457
|
hostContext: McpUiHostContext;
|
|
2458
|
+
/** Host identity (`name`/`version`) to deliver to the mounted app's `ui/initialize` handshake. */
|
|
2459
|
+
hostInfo: Implementation;
|
|
2192
2460
|
/** Operator-configured MCP Apps sandbox-proxy URL, or `null` when unconfigured. */
|
|
2193
2461
|
sandboxUrl: string | null;
|
|
2194
2462
|
/** Fetches the matched tool's MCP Apps `ui://` resource. */
|
|
@@ -2205,7 +2473,7 @@ export declare interface McpAppHostContextParams {
|
|
|
2205
2473
|
mcpAppTheme?: string;
|
|
2206
2474
|
/** Host's current i18n locale (BCP 47). */
|
|
2207
2475
|
locale: string;
|
|
2208
|
-
/** Operator-configured MCP App user-agent override. Defaults to `
|
|
2476
|
+
/** Operator-configured MCP App user-agent override. Defaults to the browser's own `navigator.userAgent`. */
|
|
2209
2477
|
mcpAppUserAgent?: string;
|
|
2210
2478
|
/**
|
|
2211
2479
|
* Display modes the host can switch an app between via
|
|
@@ -2327,6 +2595,31 @@ export declare enum McpResourceKind {
|
|
|
2327
2595
|
|
|
2328
2596
|
export declare const mergeCreatedFolderIntoCache: (cache: Map<string, ListFilesItemDto[]>, parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => Map<string, ListFilesItemDto[]>;
|
|
2329
2597
|
|
|
2598
|
+
/**
|
|
2599
|
+
* Merges a freshly-fetched page 0 into the currently-loaded run list: an
|
|
2600
|
+
* already-known id is replaced in place at its existing array position, an
|
|
2601
|
+
* unseen id is prepended (upstream order is `created_at desc`, so it is the
|
|
2602
|
+
* newest), and an id absent from `incoming` is left untouched — a background
|
|
2603
|
+
* refresh never removes a loaded run.
|
|
2604
|
+
*/
|
|
2605
|
+
export declare const mergeRunsById: (current: ScheduledTaskRunDto[], incoming: ScheduledTaskRunDto[]) => ScheduledTaskRunDto[];
|
|
2606
|
+
|
|
2607
|
+
/**
|
|
2608
|
+
* Merges incoming stage deltas into an existing stage list, keyed by `index`.
|
|
2609
|
+
*
|
|
2610
|
+
* Partial `name` and `content` strings are concatenated across chunks;
|
|
2611
|
+
* attachments are merged by their own `index` (concatenating partial `title`
|
|
2612
|
+
* and `data`); every other field on the incoming delta overwrites the
|
|
2613
|
+
* accumulated one. A brand-new stage whose first chunk carries `name: null`
|
|
2614
|
+
* is normalized to `''`.
|
|
2615
|
+
*
|
|
2616
|
+
* Exported for hosts that keep a flattened `Stage[]` on the message instead
|
|
2617
|
+
* of `Message.custom_content.stages` and therefore cannot reuse
|
|
2618
|
+
* {@link applyChunkToMessages}. Prefer `useConversationStream` when the host
|
|
2619
|
+
* can delegate the whole stream loop.
|
|
2620
|
+
*/
|
|
2621
|
+
export declare const mergeStages: (existing: Stage[], incoming: Stage[]) => Stage[];
|
|
2622
|
+
|
|
2330
2623
|
/** True when `message` is an assistant message carrying at least one stage. */
|
|
2331
2624
|
export declare const messageHasStages: (message: Message) => boolean;
|
|
2332
2625
|
|
|
@@ -2336,10 +2629,31 @@ export declare interface MessagePair {
|
|
|
2336
2629
|
assistantMessage: Message;
|
|
2337
2630
|
}
|
|
2338
2631
|
|
|
2632
|
+
/** A stable snapshot of one eligible native text selection. */
|
|
2633
|
+
export declare interface MessageSelectionReplySnapshot {
|
|
2634
|
+
/** Scope that owned the selection when it was captured. */
|
|
2635
|
+
conversationId: string;
|
|
2636
|
+
/** Message text root containing the captured range. */
|
|
2637
|
+
body: HTMLDivElement;
|
|
2638
|
+
/** Captured native range. */
|
|
2639
|
+
range: Range;
|
|
2640
|
+
/** Native selected text preserved for the generated file. */
|
|
2641
|
+
text: string;
|
|
2642
|
+
/** Visible fragment of the selected range. */
|
|
2643
|
+
rect: DOMRect;
|
|
2644
|
+
}
|
|
2645
|
+
|
|
2339
2646
|
/** Formats MIME types as a human-readable, comma-separated list of dotted extensions (or the MIME type itself for wildcards). */
|
|
2340
2647
|
export declare const mimeTypesToAttachmentExtensionLabels: (types: string[]) => string;
|
|
2341
2648
|
|
|
2342
|
-
/**
|
|
2649
|
+
/**
|
|
2650
|
+
* Normalizes `*` to the all-files wildcard, canonicalizes MIME aliases, and drops
|
|
2651
|
+
* any value that is not a valid `DialFileAcceptType`.
|
|
2652
|
+
*
|
|
2653
|
+
* Aliases are resolved because a file picker matches an `accept` entry against its
|
|
2654
|
+
* own MIME table: a declared `text/json` offers no `.json` file, while the
|
|
2655
|
+
* `application/json` it denotes does.
|
|
2656
|
+
*/
|
|
2343
2657
|
export declare const mimeTypesToDialFileAcceptTypes: (types?: string[]) => DialFileAcceptType[] | undefined;
|
|
2344
2658
|
|
|
2345
2659
|
/**
|
|
@@ -2367,6 +2681,7 @@ export declare interface ModelCapabilities {
|
|
|
2367
2681
|
hasResume?: boolean;
|
|
2368
2682
|
hasChatCompletion?: boolean;
|
|
2369
2683
|
hasResponsesApi?: boolean;
|
|
2684
|
+
hasSkills?: boolean;
|
|
2370
2685
|
reasoningEfforts?: string[];
|
|
2371
2686
|
}
|
|
2372
2687
|
|
|
@@ -2406,18 +2721,6 @@ export declare interface ModelSpecification {
|
|
|
2406
2721
|
createdAt?: number;
|
|
2407
2722
|
}
|
|
2408
2723
|
|
|
2409
|
-
/** Normalized monthly token usage consumed by the conversation input control. */
|
|
2410
|
-
export declare interface MonthlyUsageLimit {
|
|
2411
|
-
/** Normalized used-token count. */
|
|
2412
|
-
used: number;
|
|
2413
|
-
/** Configured monthly token limit. */
|
|
2414
|
-
total: number;
|
|
2415
|
-
/** Remaining monthly tokens, clamped to zero. */
|
|
2416
|
-
remaining: number;
|
|
2417
|
-
/** Monthly utilization percentage, clamped to 0–100. */
|
|
2418
|
-
usedPercent: number;
|
|
2419
|
-
}
|
|
2420
|
-
|
|
2421
2724
|
/** Returns a skill relative path's final segment (its display name in the file tree). */
|
|
2422
2725
|
export declare const nameFromPath: (path: string) => string;
|
|
2423
2726
|
|
|
@@ -2429,6 +2732,20 @@ export declare const nameFromPath: (path: string) => string;
|
|
|
2429
2732
|
*/
|
|
2430
2733
|
export declare const navigateToolsetOAuthPopup: (popup: Window, auth: ToolsetOAuthSettings, toolsetId: string, callbackPath: string, credentialsLevel?: ToolsetCredentialsLevel, resourceKind?: OAuthResourceKind, offlineUsageConsent?: boolean) => ToolsetOAuthInitiationResult;
|
|
2431
2734
|
|
|
2735
|
+
/**
|
|
2736
|
+
* Encodes a deployment/application id to its single-encoded form regardless
|
|
2737
|
+
* of whether the value it received was already percent-encoded or the raw,
|
|
2738
|
+
* human-readable form — decoding first then re-encoding once is idempotent
|
|
2739
|
+
* either way, since `decodeDeploymentId` on a raw (unencoded) id is a no-op.
|
|
2740
|
+
* Use this instead of `encodeDeploymentId` at a boundary that cannot
|
|
2741
|
+
* guarantee which form it receives, such as a `postMessage` payload from the
|
|
2742
|
+
* settings iframe: calling `encodeDeploymentId` directly on a value the
|
|
2743
|
+
* sender already encoded escapes the existing `%` characters a second time
|
|
2744
|
+
* (`%20` becomes `%2520`), which the backend only ever undoes once and so
|
|
2745
|
+
* 404s on.
|
|
2746
|
+
*/
|
|
2747
|
+
export declare const normalizeDeploymentId: (id: string) => string;
|
|
2748
|
+
|
|
2432
2749
|
/**
|
|
2433
2750
|
* Normalises a stored response-format string to the current enum. Legacy data
|
|
2434
2751
|
* may contain `'Markdown'` or `'PlainText'` (capital-first) instead of the
|
|
@@ -2444,6 +2761,19 @@ export declare const normalizeResponseFormat: (value: string | undefined) => Res
|
|
|
2444
2761
|
*/
|
|
2445
2762
|
export declare const normalizeSkillName: (input: string) => string;
|
|
2446
2763
|
|
|
2764
|
+
/**
|
|
2765
|
+
* Encodes a toolset id to its single-encoded form regardless of whether the
|
|
2766
|
+
* value received it in was already percent-encoded or the raw,
|
|
2767
|
+
* human-readable form — decoding first then re-encoding once is idempotent
|
|
2768
|
+
* either way, since `decodeToolsetId` on a raw (unencoded) id is a no-op.
|
|
2769
|
+
* Use this instead of `encodeToolsetId` at a boundary that cannot guarantee
|
|
2770
|
+
* which form it receives, such as a `postMessage` payload from an embedded
|
|
2771
|
+
* iframe: calling `encodeToolsetId` directly on a value the sender already
|
|
2772
|
+
* encoded escapes the existing `%` characters a second time (`%20` becomes
|
|
2773
|
+
* `%2520`), which the backend only ever undoes once and so 404s on.
|
|
2774
|
+
*/
|
|
2775
|
+
export declare const normalizeToolsetId: (toolsetId: string) => string;
|
|
2776
|
+
|
|
2447
2777
|
export declare const normalizeVirtualPath: (value: string) => string;
|
|
2448
2778
|
|
|
2449
2779
|
/** Arguments handed to the host's exchange callback. */
|
|
@@ -2515,7 +2845,17 @@ declare interface OoxmlDocxHighlightLocation {
|
|
|
2515
2845
|
text: string;
|
|
2516
2846
|
}
|
|
2517
2847
|
|
|
2518
|
-
/**
|
|
2848
|
+
/** A complete table row in the DOCX body, matched by cell text. */
|
|
2849
|
+
declare interface OoxmlDocxTableRowLocation {
|
|
2850
|
+
/** Location kind. */
|
|
2851
|
+
kind: OoxmlHighlightKind.DocxTableRow;
|
|
2852
|
+
/** Plain text of each cell, in column order. */
|
|
2853
|
+
cells: string[];
|
|
2854
|
+
/** 1-based matching row in document order. */
|
|
2855
|
+
occurrence: number;
|
|
2856
|
+
}
|
|
2857
|
+
|
|
2858
|
+
/** Supported document formats rendered by the installed `@silurus/ooxml` runtime. */
|
|
2519
2859
|
declare enum OoxmlFileType {
|
|
2520
2860
|
Docx = 'docx',
|
|
2521
2861
|
Xlsx = 'xlsx',
|
|
@@ -2537,6 +2877,10 @@ declare enum OoxmlHighlightKind {
|
|
|
2537
2877
|
DocxTextRange = 'docxTextRange',
|
|
2538
2878
|
/** A character range inside a single PPTX shape on one slide. */
|
|
2539
2879
|
PptxTextRange = 'pptxTextRange',
|
|
2880
|
+
/** A complete DOCX table row identified by its cell text. */
|
|
2881
|
+
DocxTableRow = 'docxTableRow',
|
|
2882
|
+
/** A complete PPTX table row identified by its cell text on one slide. */
|
|
2883
|
+
PptxTableRow = 'pptxTableRow',
|
|
2540
2884
|
/** One cell, or a contiguous same-row cell range, on a named XLSX sheet. */
|
|
2541
2885
|
XlsxCellRange = 'xlsxCellRange',
|
|
2542
2886
|
}
|
|
@@ -2545,6 +2889,8 @@ declare enum OoxmlHighlightKind {
|
|
|
2545
2889
|
declare type OoxmlHighlightLocation =
|
|
2546
2890
|
| OoxmlDocxHighlightLocation
|
|
2547
2891
|
| OoxmlPptxHighlightLocation
|
|
2892
|
+
| OoxmlDocxTableRowLocation
|
|
2893
|
+
| OoxmlPptxTableRowLocation
|
|
2548
2894
|
| OoxmlXlsxHighlightLocation;
|
|
2549
2895
|
|
|
2550
2896
|
/** A cited character range inside a single shape on one PPTX slide. */
|
|
@@ -2563,6 +2909,18 @@ declare interface OoxmlPptxHighlightLocation {
|
|
|
2563
2909
|
text: string;
|
|
2564
2910
|
}
|
|
2565
2911
|
|
|
2912
|
+
/** A complete table row on one PPTX slide, matched by cell text. */
|
|
2913
|
+
declare interface OoxmlPptxTableRowLocation {
|
|
2914
|
+
/** Location kind. */
|
|
2915
|
+
kind: OoxmlHighlightKind.PptxTableRow;
|
|
2916
|
+
/** Plain text of each cell, in column order. */
|
|
2917
|
+
cells: string[];
|
|
2918
|
+
/** 1-based matching row on the specified slide. */
|
|
2919
|
+
occurrence: number;
|
|
2920
|
+
/** 1-based slide number. */
|
|
2921
|
+
slide: number;
|
|
2922
|
+
}
|
|
2923
|
+
|
|
2566
2924
|
/** A cited cell, or contiguous same-row cell range, on a named XLSX sheet. */
|
|
2567
2925
|
declare interface OoxmlXlsxHighlightLocation {
|
|
2568
2926
|
/** Discriminates this location within `OoxmlHighlightLocation`. */
|
|
@@ -2734,6 +3092,15 @@ export declare const prepareMoveRenameItems: (copiedItems: DialCopiedItem[], buc
|
|
|
2734
3092
|
preparedMoveItems: PreparedCopyMoveItem<MoveItemDto>[];
|
|
2735
3093
|
};
|
|
2736
3094
|
|
|
3095
|
+
/**
|
|
3096
|
+
* Validates form values before creating a request body. Hosts translate the
|
|
3097
|
+
* returned field codes and must not issue a write when `ok` is false.
|
|
3098
|
+
*/
|
|
3099
|
+
export declare const prepareScheduledTaskCreateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<CreateScheduledTaskBodyDto>;
|
|
3100
|
+
|
|
3101
|
+
/** Validates form values before preparing an update request body. */
|
|
3102
|
+
export declare const prepareScheduledTaskUpdateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<UpdateScheduledTaskBodyDto>;
|
|
3103
|
+
|
|
2737
3104
|
/** Maximum body length accepted by `CreatePromptDto.content`. */
|
|
2738
3105
|
export declare const PROMPT_CONTENT_MAX_LENGTH = 50000;
|
|
2739
3106
|
|
|
@@ -2785,7 +3152,11 @@ export declare enum PromptSource {
|
|
|
2785
3152
|
Public = "public"
|
|
2786
3153
|
}
|
|
2787
3154
|
|
|
2788
|
-
/**
|
|
3155
|
+
/**
|
|
3156
|
+
* DIAL Core bucket holding organisation-wide skills.
|
|
3157
|
+
*
|
|
3158
|
+
* @deprecated Use `PUBLIC_BUCKET` from `@epam/ai-dial-chat-shared`.
|
|
3159
|
+
*/
|
|
2789
3160
|
export declare const PUBLIC_SKILL_BUCKET = "public";
|
|
2790
3161
|
|
|
2791
3162
|
/** The DIAL publish API surface produced by {@link createPublishApiClient}. */
|
|
@@ -2817,6 +3188,63 @@ export declare interface QuickAppSchemaLike {
|
|
|
2817
3188
|
displayName?: string;
|
|
2818
3189
|
}
|
|
2819
3190
|
|
|
3191
|
+
/**
|
|
3192
|
+
* One stage as it arrives from the REST API or the SSE stream, before
|
|
3193
|
+
* normalization. Structurally satisfied by the generated `StageDto` and by a
|
|
3194
|
+
* raw stream delta, both of which omit `index`/`name`/`status` on the chunk
|
|
3195
|
+
* that opens a stage.
|
|
3196
|
+
*/
|
|
3197
|
+
export declare interface RawStage {
|
|
3198
|
+
/** Ordering key. Defaults to `0` when absent. */
|
|
3199
|
+
index?: number | null;
|
|
3200
|
+
/** Stage title. `null` on the chunk that opens the stage. */
|
|
3201
|
+
name?: string | null;
|
|
3202
|
+
/** Terminal state as a raw wire string; anything other than `'completed'`/`'failed'` means still running. */
|
|
3203
|
+
status?: string | null;
|
|
3204
|
+
/** Additional stage text. */
|
|
3205
|
+
content?: string | null;
|
|
3206
|
+
/** Short source/category label shown beside the stage name. */
|
|
3207
|
+
tag?: string | null;
|
|
3208
|
+
/** Files produced or referenced by this stage. */
|
|
3209
|
+
attachments?: RawStageAttachment[] | null;
|
|
3210
|
+
}
|
|
3211
|
+
|
|
3212
|
+
/**
|
|
3213
|
+
* One stage attachment as it arrives from the REST API or the SSE stream,
|
|
3214
|
+
* before normalization: every field is optional and may be `null`.
|
|
3215
|
+
*/
|
|
3216
|
+
export declare interface RawStageAttachment {
|
|
3217
|
+
/** Zero-based position in the attachment list. */
|
|
3218
|
+
index?: number | null;
|
|
3219
|
+
/** MIME type of the attachment content. */
|
|
3220
|
+
type?: string | null;
|
|
3221
|
+
/** Display name shown in the UI. */
|
|
3222
|
+
title?: string | null;
|
|
3223
|
+
/** Inline base-64 encoded content. */
|
|
3224
|
+
data?: string | null;
|
|
3225
|
+
/** Remote URL pointing to the attachment content. */
|
|
3226
|
+
url?: string | null;
|
|
3227
|
+
/** MIME type of the referenced resource. */
|
|
3228
|
+
reference_type?: string | null;
|
|
3229
|
+
/** URL of an alternate reference resource. */
|
|
3230
|
+
reference_url?: string | null;
|
|
3231
|
+
}
|
|
3232
|
+
|
|
3233
|
+
/**
|
|
3234
|
+
* Message-like payload carrying stages under either the wire's snake_case
|
|
3235
|
+
* `custom_content` or a host's camelCased `customContent`.
|
|
3236
|
+
*/
|
|
3237
|
+
export declare interface RawStageSource {
|
|
3238
|
+
/** Custom content as the DIAL wire format spells it. */
|
|
3239
|
+
custom_content?: {
|
|
3240
|
+
stages?: RawStage[] | null;
|
|
3241
|
+
} | null;
|
|
3242
|
+
/** Custom content as a camelCasing host spells it. */
|
|
3243
|
+
customContent?: {
|
|
3244
|
+
stages?: RawStage[] | null;
|
|
3245
|
+
} | null;
|
|
3246
|
+
}
|
|
3247
|
+
|
|
2820
3248
|
/**
|
|
2821
3249
|
* Reads a skill file response as raw bytes, or `null` when the body is
|
|
2822
3250
|
* larger than `SKILL_MANIFEST_MAX_BYTES`. The declared `content-length` is
|
|
@@ -2827,6 +3255,24 @@ export declare interface QuickAppSchemaLike {
|
|
|
2827
3255
|
*/
|
|
2828
3256
|
export declare const readSkillFileBytes: (response: Response) => Promise<Uint8Array | null>;
|
|
2829
3257
|
|
|
3258
|
+
/**
|
|
3259
|
+
* Reads a skill file response as raw bytes with no size ceiling, for the
|
|
3260
|
+
* supporting-file **preview** path.
|
|
3261
|
+
*
|
|
3262
|
+
* Previews are user-initiated, one file at a time, and a realistic binary
|
|
3263
|
+
* (a PDF, an image) routinely exceeds `SKILL_MANIFEST_MAX_BYTES` — a cap
|
|
3264
|
+
* sized for `SKILL.md` frontmatter, not for binaries — so applying that cap
|
|
3265
|
+
* here rejected virtually every real PDF before it was ever decoded. This
|
|
3266
|
+
* reader therefore never returns `null`: file size is not a failure class on
|
|
3267
|
+
* the preview path.
|
|
3268
|
+
*
|
|
3269
|
+
* `readSkillFileBytes` and `readSkillManifest` keep their
|
|
3270
|
+
* `SKILL_MANIFEST_MAX_BYTES` ceiling, because they feed the manifest parse
|
|
3271
|
+
* and the textual Content-tab read, where an oversized body must never be
|
|
3272
|
+
* decoded into a string.
|
|
3273
|
+
*/
|
|
3274
|
+
export declare const readSkillFilePreviewBytes: (response: Response) => Promise<Uint8Array>;
|
|
3275
|
+
|
|
2830
3276
|
/**
|
|
2831
3277
|
* Reads a skill manifest response as text, or `null` when the body is larger
|
|
2832
3278
|
* than `SKILL_MANIFEST_MAX_BYTES`. The size is checked before decoding, so an
|
|
@@ -2872,6 +3318,23 @@ export declare const referenceAttachmentToPdfCanvasContent: (attachment: Attachm
|
|
|
2872
3318
|
/** Name reserved for the hidden marker file used to create empty folders. */
|
|
2873
3319
|
export declare const RESERVED_MARKER_NAME = ".dial_folder";
|
|
2874
3320
|
|
|
3321
|
+
/**
|
|
3322
|
+
* One reset time, already parsed and formatted by the host. Declared
|
|
3323
|
+
* structurally here so this library never imports an application type; the
|
|
3324
|
+
* host passes a value that satisfies this shape (e.g. `apps/chat`'s own
|
|
3325
|
+
* `ResetTimeDisplay`).
|
|
3326
|
+
*/
|
|
3327
|
+
export declare interface ResetTimeDisplay {
|
|
3328
|
+
/** Exclusive end of the period as an epoch ms value, for the host's boundary scheduling. */
|
|
3329
|
+
resetsAtMs: number;
|
|
3330
|
+
/** Machine-readable instant for a `<time dateTime>` attribute. */
|
|
3331
|
+
isoValue: string;
|
|
3332
|
+
/** Visible reset line. */
|
|
3333
|
+
label: string;
|
|
3334
|
+
/** Accessible expansion of the reset line. */
|
|
3335
|
+
ariaLabel: string;
|
|
3336
|
+
}
|
|
3337
|
+
|
|
2875
3338
|
/**
|
|
2876
3339
|
* Resolves the primary action for a catalog item.
|
|
2877
3340
|
*
|
|
@@ -2891,7 +3354,8 @@ export declare const resolveCatalogPrimaryAction: (item: CatalogItem, fetchPromp
|
|
|
2891
3354
|
/** Resolves a syntax-highlighted code canvas content payload from a DisplayAttachment, or `null` if unavailable. */
|
|
2892
3355
|
export declare const resolveCodeCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, language?: string) => Promise<CodeCanvasContent | ErrorCanvasContent | null>;
|
|
2893
3356
|
|
|
2894
|
-
|
|
3357
|
+
/** Resolves a deployment's display folder, including organization applications without a folder path. */
|
|
3358
|
+
export declare const resolveDeploymentFolder: (deployment: Pick<DeploymentItemDto, "isMy" | "sharedWithMe" | "applicationFolder"> & Partial<Pick<DeploymentItemDto, "type">>, labels: DeploymentFolderLabels) => string[];
|
|
2895
3359
|
|
|
2896
3360
|
/**
|
|
2897
3361
|
* Resolves a DialFile to the bucket-relative API path used by files BFF endpoints.
|
|
@@ -2909,6 +3373,9 @@ export declare const resolveDialFileBucketAndPath: (fileId: string) => {
|
|
|
2909
3373
|
path: string;
|
|
2910
3374
|
} | undefined;
|
|
2911
3375
|
|
|
3376
|
+
/** A callback that resolves a display name from a localized-text value. */
|
|
3377
|
+
declare type ResolveDisplayName = (name: string | Record<string, string> | undefined | null, locale: string) => string;
|
|
3378
|
+
|
|
2912
3379
|
/** Resolves a DIAL Core file id to a downloadable URL. Host-owned — encodes the app's own file-download endpoint. */
|
|
2913
3380
|
export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
|
|
2914
3381
|
|
|
@@ -2927,6 +3394,17 @@ export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
|
|
|
2927
3394
|
*/
|
|
2928
3395
|
export declare const resolveExternalSourceContentType: (contentType: string, url: string) => string;
|
|
2929
3396
|
|
|
3397
|
+
/**
|
|
3398
|
+
* Builds the grouped payload for an application-scoped visualizer from the
|
|
3399
|
+
* attachments its entry claims, reporting which of them `resolveAbsoluteUrl`
|
|
3400
|
+
* could produce a URL for. Unlike the single-attachment resolver this fetches
|
|
3401
|
+
* nothing: the grouped protocol hands the visualizer URLs and lets it read
|
|
3402
|
+
* them itself, so the URLs must be absolute — a host-relative path would
|
|
3403
|
+
* resolve against the iframe's own origin. Producing one is host knowledge,
|
|
3404
|
+
* which is why it arrives as a callback rather than being built here.
|
|
3405
|
+
*/
|
|
3406
|
+
export declare const resolveGroupedVisualizerCanvasContent: (attachments: DisplayAttachment[], resolveAbsoluteUrl: (attachment: DisplayAttachment) => string | undefined, entry: ApplicationVisualizer, themeId: string) => GroupedVisualizerResolution;
|
|
3407
|
+
|
|
2930
3408
|
/**
|
|
2931
3409
|
* Resolves an HTML canvas content payload from a DisplayAttachment.
|
|
2932
3410
|
* Fetches and inlines the HTML as `srcdoc` when the attachment has a download URL or inline data.
|
|
@@ -2935,12 +3413,17 @@ export declare const resolveExternalSourceContentType: (contentType: string, url
|
|
|
2935
3413
|
*/
|
|
2936
3414
|
export declare const resolveHtmlCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<HtmlCanvasContent | ErrorCanvasContent | null>;
|
|
2937
3415
|
|
|
3416
|
+
/** A callback that resolves an icon URL from a deployment's raw `iconUrl` field. */
|
|
3417
|
+
declare type ResolveIconUrl = (iconUrl: string | undefined) => string | undefined;
|
|
3418
|
+
|
|
2938
3419
|
/**
|
|
2939
3420
|
* Resolves an image canvas content payload from a DisplayAttachment without
|
|
2940
|
-
* fetching — returns
|
|
2941
|
-
*
|
|
2942
|
-
*
|
|
2943
|
-
*
|
|
3421
|
+
* fetching — returns a local blob URL or the BFF download URL directly so the
|
|
3422
|
+
* browser cache can be shared with the conversation view's `<img>` element.
|
|
3423
|
+
* A local `File` with bytes takes precedence over the DIAL download URL; a
|
|
3424
|
+
* 0-byte `File` (the file-manager placeholder) does not. Error detection is
|
|
3425
|
+
* delegated to `<img onError>` in the canvas renderer. Returns `null` if no
|
|
3426
|
+
* URL source is available.
|
|
2944
3427
|
*/
|
|
2945
3428
|
export declare const resolveImageCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => ImageCanvasContent | null;
|
|
2946
3429
|
|
|
@@ -2986,6 +3469,9 @@ export declare const resolvePdfCanvasContent: (attachment: DisplayAttachment, re
|
|
|
2986
3469
|
*/
|
|
2987
3470
|
export declare const resolveRelativeDialFilePath: (pathOrFileId: string, bucket: string) => string;
|
|
2988
3471
|
|
|
3472
|
+
/** Returns the section whose root label is the first segment of `virtualPath`, or `undefined` when none matches. */
|
|
3473
|
+
export declare const resolveSectionByPath: <TSection extends DialFileManagerSection>(virtualPath: string, sections: readonly TSection[]) => TSection | undefined;
|
|
3474
|
+
|
|
2989
3475
|
/**
|
|
2990
3476
|
* Converts an opaque file-listing id into the path expected by the single-file
|
|
2991
3477
|
* download endpoint. Core may prefix listing paths with the skill path and its
|
|
@@ -3005,6 +3491,16 @@ export declare const resolveSkillManifestFileId: (files: SkillMetadataItemDto[],
|
|
|
3005
3491
|
/** Resolves a plain-text canvas content payload from a DisplayAttachment, or `null` if unavailable. */
|
|
3006
3492
|
export declare const resolveTextCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<PlainTextCanvasContent | ErrorCanvasContent | null>;
|
|
3007
3493
|
|
|
3494
|
+
/**
|
|
3495
|
+
* Resolves which credentials level a toolset's login applies to, per DIAL
|
|
3496
|
+
* Core's public/private toolset convention: a `public`-bucket toolset is
|
|
3497
|
+
* shared credentials-wise at `User` level, while a private/workspace toolset
|
|
3498
|
+
* is scoped at `Global` level. Every surface that drives a toolset login
|
|
3499
|
+
* (the sign-in-interrupt dialog, the QuickApps editor iframe bridge,
|
|
3500
|
+
* `useToolsetLogin`) must resolve the level this way rather than assuming one.
|
|
3501
|
+
*/
|
|
3502
|
+
export declare const resolveToolsetCredentialsLevel: (toolsetId: string) => ToolsetCredentialsLevel.User | ToolsetCredentialsLevel.Global;
|
|
3503
|
+
|
|
3008
3504
|
/**
|
|
3009
3505
|
* Fetches the attachment payload and builds a `VisualizerCanvasContent` for the
|
|
3010
3506
|
* given registry entry and theme. Returns `null` when the payload cannot be
|
|
@@ -3058,6 +3554,114 @@ export declare type ScheduledTaskDtoMappingResult = {
|
|
|
3058
3554
|
reason: UnsupportedTriggerReason;
|
|
3059
3555
|
};
|
|
3060
3556
|
|
|
3557
|
+
/** A checked request preparation result that never serializes invalid values. */
|
|
3558
|
+
export declare type ScheduledTaskPreparationResult<TBody> = {
|
|
3559
|
+
ok: true;
|
|
3560
|
+
body: TBody;
|
|
3561
|
+
} | {
|
|
3562
|
+
ok: false;
|
|
3563
|
+
errors: ScheduledTaskValidationErrors;
|
|
3564
|
+
};
|
|
3565
|
+
|
|
3566
|
+
export declare interface ScheduledTaskRunsListRequest {
|
|
3567
|
+
scheduleId: string;
|
|
3568
|
+
limit?: number;
|
|
3569
|
+
offset?: number;
|
|
3570
|
+
signal?: AbortSignal;
|
|
3571
|
+
}
|
|
3572
|
+
|
|
3573
|
+
export declare interface ScheduledTasksApiClient {
|
|
3574
|
+
listScheduledTasks: (request?: ScheduledTasksListRequest) => Promise<ListScheduledTasksResponseDto>;
|
|
3575
|
+
listScheduledTaskRuns: (request: ScheduledTaskRunsListRequest) => Promise<ListScheduledTaskRunsResponseDto>;
|
|
3576
|
+
createScheduledTask: (body: CreateScheduledTaskBodyDto) => Promise<CreatedScheduledTaskDto>;
|
|
3577
|
+
getScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
|
|
3578
|
+
updateScheduledTask: (scheduleId: string, body: UpdateScheduledTaskBodyDto) => Promise<UpdatedScheduledTaskDto>;
|
|
3579
|
+
pauseScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
|
|
3580
|
+
resumeScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
|
|
3581
|
+
deleteScheduledTask: (scheduleId: string) => Promise<void>;
|
|
3582
|
+
}
|
|
3583
|
+
|
|
3584
|
+
/** Narrow configured generated-client surface required by scheduler hooks. */
|
|
3585
|
+
export declare interface ScheduledTasksConfiguredClient {
|
|
3586
|
+
listScheduledTasks: (request: {
|
|
3587
|
+
limit?: number;
|
|
3588
|
+
offset?: number;
|
|
3589
|
+
search?: string;
|
|
3590
|
+
sort?: ListScheduledTasksSortEnum;
|
|
3591
|
+
}, options?: RequestInit) => Promise<ListScheduledTasksResponseDto>;
|
|
3592
|
+
listScheduledTaskRuns: (request: {
|
|
3593
|
+
scheduleId: string;
|
|
3594
|
+
limit?: number;
|
|
3595
|
+
offset?: number;
|
|
3596
|
+
}, options?: RequestInit) => Promise<ListScheduledTaskRunsResponseDto>;
|
|
3597
|
+
createScheduledTask: (request: {
|
|
3598
|
+
createScheduledTaskBodyDto: CreateScheduledTaskBodyDto;
|
|
3599
|
+
}) => Promise<CreatedScheduledTaskDto>;
|
|
3600
|
+
getScheduledTask: (request: {
|
|
3601
|
+
scheduleId: string;
|
|
3602
|
+
}) => Promise<ScheduledTaskDto>;
|
|
3603
|
+
updateScheduledTask: (request: {
|
|
3604
|
+
scheduleId: string;
|
|
3605
|
+
updateScheduledTaskBodyDto: UpdateScheduledTaskBodyDto;
|
|
3606
|
+
}) => Promise<UpdatedScheduledTaskDto>;
|
|
3607
|
+
pauseScheduledTask: (request: {
|
|
3608
|
+
scheduleId: string;
|
|
3609
|
+
}) => Promise<ScheduledTaskDto>;
|
|
3610
|
+
resumeScheduledTask: (request: {
|
|
3611
|
+
scheduleId: string;
|
|
3612
|
+
}) => Promise<ScheduledTaskDto>;
|
|
3613
|
+
deleteScheduledTask: (request: {
|
|
3614
|
+
scheduleId: string;
|
|
3615
|
+
}) => Promise<void>;
|
|
3616
|
+
}
|
|
3617
|
+
|
|
3618
|
+
/** App-agnostic request options accepted by the scheduler facade. */
|
|
3619
|
+
export declare interface ScheduledTasksListRequest {
|
|
3620
|
+
limit?: number;
|
|
3621
|
+
offset?: number;
|
|
3622
|
+
search?: string;
|
|
3623
|
+
sort?: ListScheduledTasksSortEnum;
|
|
3624
|
+
signal?: AbortSignal;
|
|
3625
|
+
}
|
|
3626
|
+
|
|
3627
|
+
export declare interface ScheduledTaskTriggerDescription {
|
|
3628
|
+
kind: ScheduledTaskTriggerDescriptionKind;
|
|
3629
|
+
time?: string;
|
|
3630
|
+
dayOfWeek?: string;
|
|
3631
|
+
dayOfMonth?: string;
|
|
3632
|
+
intervalMinutes?: number;
|
|
3633
|
+
date?: Date;
|
|
3634
|
+
expression?: string;
|
|
3635
|
+
sourceTimezone: 'utc';
|
|
3636
|
+
}
|
|
3637
|
+
|
|
3638
|
+
/** Display categories are independent of task editability. */
|
|
3639
|
+
export declare enum ScheduledTaskTriggerDescriptionKind {
|
|
3640
|
+
OneTime = "oneTime",
|
|
3641
|
+
Hourly = "hourly",
|
|
3642
|
+
EveryNMinutes = "everyNMinutes",
|
|
3643
|
+
Daily = "daily",
|
|
3644
|
+
Weekly = "weekly",
|
|
3645
|
+
Monthly = "monthly",
|
|
3646
|
+
Custom = "custom",
|
|
3647
|
+
Invalid = "invalid"
|
|
3648
|
+
}
|
|
3649
|
+
|
|
3650
|
+
export declare interface ScheduledTaskTriggerDescriptionOptions {
|
|
3651
|
+
/** Display timezone; defaults to UTC for backwards compatibility. */
|
|
3652
|
+
timeZone?: string;
|
|
3653
|
+
/** Date whose timezone offset is used. Defaults to now (the existing UTC-storage policy). */
|
|
3654
|
+
referenceDate?: Date;
|
|
3655
|
+
}
|
|
3656
|
+
|
|
3657
|
+
/**
|
|
3658
|
+
* Picks the auth-status field matching one credentials level out of a
|
|
3659
|
+
* toolset's `authSettings` — DIAL Core reports `userLevelAuthStatus` and
|
|
3660
|
+
* `globalAuthStatus` as independent fields rather than one status keyed by
|
|
3661
|
+
* level.
|
|
3662
|
+
*/
|
|
3663
|
+
export declare const selectToolsetAuthStatus: (authSettings: Pick<DialToolsetAuthSettingsDto, "userLevelAuthStatus" | "globalAuthStatus"> | undefined, credentialsLevel: ToolsetCredentialsLevel) => string | undefined;
|
|
3664
|
+
|
|
3061
3665
|
/** Serializes a prompt export envelope into a pretty-printed JSON blob. */
|
|
3062
3666
|
export declare const serializePromptExport: (envelope: PromptExportFormat) => Blob;
|
|
3063
3667
|
|
|
@@ -3109,6 +3713,9 @@ export declare const SKILL_MANIFEST_FILE = "SKILL.md";
|
|
|
3109
3713
|
*/
|
|
3110
3714
|
export declare const SKILL_MANIFEST_MAX_BYTES: number;
|
|
3111
3715
|
|
|
3716
|
+
/** Length limit of each skill editor text field. */
|
|
3717
|
+
export declare const SKILL_TEXT_FIELD_MAX_LENGTHS: Record<SkillTextField, number>;
|
|
3718
|
+
|
|
3112
3719
|
/**
|
|
3113
3720
|
* Client-side mirror of the backend's default `SKILL_UPLOAD_MAX_FILES`
|
|
3114
3721
|
* (`apps/chat-api/src/config/environment.config.ts`), used only for
|
|
@@ -3133,6 +3740,28 @@ export declare interface SkillAboutDetails {
|
|
|
3133
3740
|
skillPrompt?: string;
|
|
3134
3741
|
}
|
|
3135
3742
|
|
|
3743
|
+
/** Semantic classification of an import request failure. */
|
|
3744
|
+
export declare enum SkillArchiveImportErrorKind {
|
|
3745
|
+
Validation = "validation",
|
|
3746
|
+
Collision = "collision",
|
|
3747
|
+
RateLimited = "rateLimited",
|
|
3748
|
+
ServiceUnavailable = "serviceUnavailable",
|
|
3749
|
+
Generic = "generic"
|
|
3750
|
+
}
|
|
3751
|
+
|
|
3752
|
+
/** Phase of a skill-archive import, driving the host's loading/success/error presentation. */
|
|
3753
|
+
export declare enum SkillArchiveImportStatus {
|
|
3754
|
+
Idle = "idle",
|
|
3755
|
+
Uploading = "uploading",
|
|
3756
|
+
Success = "success",
|
|
3757
|
+
Error = "error"
|
|
3758
|
+
}
|
|
3759
|
+
|
|
3760
|
+
/** Reason a selected/dropped file was rejected before any request was made. */
|
|
3761
|
+
export declare enum SkillArchiveSelectionRejectionReason {
|
|
3762
|
+
UnsupportedFilename = "unsupportedFilename"
|
|
3763
|
+
}
|
|
3764
|
+
|
|
3136
3765
|
/** Injected API port for skill detail fetching. Mirrors exact server-api wrapper signatures. */
|
|
3137
3766
|
export declare interface SkillDetailsApi {
|
|
3138
3767
|
/** Downloads a raw skill file, returning the raw fetch `Response`. */
|
|
@@ -3146,6 +3775,12 @@ export declare interface SkillDetailsApi {
|
|
|
3146
3775
|
limit?: number;
|
|
3147
3776
|
recursive?: boolean;
|
|
3148
3777
|
}, signal?: AbortSignal): Promise<SkillFileListResponseDto>;
|
|
3778
|
+
/**
|
|
3779
|
+
* Fetches a single skill's own authoritative metadata (`author`,
|
|
3780
|
+
* `updatedAt`, and the rest of `SkillMetadataItemDto`) — not the catalog
|
|
3781
|
+
* listing entry, which may be sparse for a shared skill.
|
|
3782
|
+
*/
|
|
3783
|
+
getSkillMetadata(bucket: string, path: string, signal?: AbortSignal): Promise<SkillMetadataItemDto>;
|
|
3149
3784
|
}
|
|
3150
3785
|
|
|
3151
3786
|
/** Already-configured DIAL Core download operations `useSkillEditorLoad` needs. */
|
|
@@ -3189,6 +3824,14 @@ export declare interface SkillEditorSubmitClient {
|
|
|
3189
3824
|
export declare interface SkillEditorSubmitMessages {
|
|
3190
3825
|
/** Shown when a required field is empty. */
|
|
3191
3826
|
required: string;
|
|
3827
|
+
/** Shown when a name, description or instructions value exceeds its length limit, given that limit. */
|
|
3828
|
+
tooLong: (maxLength: number) => string;
|
|
3829
|
+
/**
|
|
3830
|
+
* Shown when the Instructions value opens with its own YAML frontmatter
|
|
3831
|
+
* block — pasting a whole `SKILL.md` in there would otherwise produce a
|
|
3832
|
+
* manifest with two frontmatter blocks.
|
|
3833
|
+
*/
|
|
3834
|
+
instructionsFrontmatter: string;
|
|
3192
3835
|
/** Shown when the normalized skill name fails DIAL's naming rules. */
|
|
3193
3836
|
nameInvalid: string;
|
|
3194
3837
|
/** Shown when the skill name already exists (409), or defensively on an unreachable create-mode 412. */
|
|
@@ -3389,12 +4032,37 @@ export declare enum SkillSource {
|
|
|
3389
4032
|
Public = "public"
|
|
3390
4033
|
}
|
|
3391
4034
|
|
|
4035
|
+
/** Skill editor text fields with a length limit. */
|
|
4036
|
+
export declare type SkillTextField = 'name' | 'description' | 'instructions';
|
|
4037
|
+
|
|
3392
4038
|
/** Splits a file name into its base and extension, using only the last dot. */
|
|
3393
4039
|
export declare const splitFileNameExtension: (fileName: string) => {
|
|
3394
4040
|
base: string;
|
|
3395
4041
|
extension: string;
|
|
3396
4042
|
};
|
|
3397
4043
|
|
|
4044
|
+
/**
|
|
4045
|
+
* Answers one question: would appending this text after the fence that
|
|
4046
|
+
* `buildSkillManifest` writes produce a *second* frontmatter block?
|
|
4047
|
+
*
|
|
4048
|
+
* That happens when the text's first non-blank line is a bare `---` and some
|
|
4049
|
+
* later line is a bare `---` too — the exact shape of a `SKILL.md` pasted
|
|
4050
|
+
* wholesale into the editor's Instructions field.
|
|
4051
|
+
*
|
|
4052
|
+
* Detection is deliberately structural rather than YAML-based: a pasted block
|
|
4053
|
+
* whose fenced content fails to parse corrupts the stored manifest
|
|
4054
|
+
* identically (and renders as a setext `h2` in the Catalog's Details tab just
|
|
4055
|
+
* the same), so requiring parseable YAML here would let the worst cases
|
|
4056
|
+
* through. Keeping `parseYaml` out also makes this cheap enough to run on
|
|
4057
|
+
* every keystroke.
|
|
4058
|
+
*
|
|
4059
|
+
* A single unclosed fence returns `false`: with no closing fence there is no
|
|
4060
|
+
* second block, matching `FRONTMATTER_PATTERN`'s own requirement. A `---`
|
|
4061
|
+
* appearing later in the body (a horizontal rule, a setext underline) is
|
|
4062
|
+
* likewise not a frontmatter block.
|
|
4063
|
+
*/
|
|
4064
|
+
export declare const startsWithFrontmatterBlock: (text: string) => boolean;
|
|
4065
|
+
|
|
3398
4066
|
/** Options accepted by {@link ConversationStreamTransport.streamCompletion}. */
|
|
3399
4067
|
export declare interface StreamCompletionOptions {
|
|
3400
4068
|
onChunk: (chunk: StreamChunk) => void;
|
|
@@ -3403,6 +4071,29 @@ export declare interface StreamCompletionOptions {
|
|
|
3403
4071
|
signal: AbortSignal;
|
|
3404
4072
|
}
|
|
3405
4073
|
|
|
4074
|
+
/**
|
|
4075
|
+
* Reported through `onError` when the network connection carrying a
|
|
4076
|
+
* completion stream is lost (a rejected `fetch`, or a read that fails after a
|
|
4077
|
+
* 2xx response) or goes silent past the idle timeout — what a laptop sleep or
|
|
4078
|
+
* a phone lock mid-generation produces. The backend-owned generation may
|
|
4079
|
+
* still be running, so the caller can recover it rather than treat the
|
|
4080
|
+
* response as failed. `cause` holds the original error, when there is one.
|
|
4081
|
+
*/
|
|
4082
|
+
export declare class StreamInterruptedError extends Error {
|
|
4083
|
+
constructor(cause?: unknown);
|
|
4084
|
+
}
|
|
4085
|
+
|
|
4086
|
+
/**
|
|
4087
|
+
* Reported through `onError` when DIAL Core itself signals a failure with an
|
|
4088
|
+
* in-band `{ error: { message } }` SSE chunk. Its `message` is upstream text
|
|
4089
|
+
* intended for the user, unlike a transport failure (failed `fetch`, non-OK
|
|
4090
|
+
* status, broken stream), whose message is technical detail. A custom
|
|
4091
|
+
* transport raises this for any user-facing upstream error text.
|
|
4092
|
+
*/
|
|
4093
|
+
export declare class StreamUpstreamError extends Error {
|
|
4094
|
+
constructor(message: string);
|
|
4095
|
+
}
|
|
4096
|
+
|
|
3406
4097
|
/** Strips leading and trailing slashes from a path segment. */
|
|
3407
4098
|
export declare const stripSurroundingSlashes: (path: string) => string;
|
|
3408
4099
|
|
|
@@ -3720,6 +4411,13 @@ export declare const toPublishEntityType: (type: CatalogEntityType) => CatalogPu
|
|
|
3720
4411
|
*/
|
|
3721
4412
|
export declare const toPublishRuleDto: (rule: PublicationRule) => PublishRuleDto;
|
|
3722
4413
|
|
|
4414
|
+
/**
|
|
4415
|
+
* Returns a renderable `Stage` for one raw payload: `index` defaults to `0`,
|
|
4416
|
+
* `name` to `''`, an unrecognized `status` to `null` (still running), and
|
|
4417
|
+
* `content`/`tag`/`attachments` are passed through when present.
|
|
4418
|
+
*/
|
|
4419
|
+
export declare const toStage: (stage: RawStage) => Stage;
|
|
4420
|
+
|
|
3723
4421
|
/** Request shape the host's selected-deployment recognition call accepts. */
|
|
3724
4422
|
export declare interface TranscribeWithDeploymentParams {
|
|
3725
4423
|
audioUrl: string;
|
|
@@ -3728,6 +4426,12 @@ export declare interface TranscribeWithDeploymentParams {
|
|
|
3728
4426
|
signal: AbortSignal;
|
|
3729
4427
|
}
|
|
3730
4428
|
|
|
4429
|
+
/** A translate function compatible with i18next's `TFunction`. */
|
|
4430
|
+
declare type Translate = (key: string, options?: Record<string, unknown>) => string;
|
|
4431
|
+
|
|
4432
|
+
/** A translate function compatible with i18next's `TFunction`. */
|
|
4433
|
+
declare type Translate_2 = (key: string, options?: Record<string, unknown>) => string;
|
|
4434
|
+
|
|
3731
4435
|
export declare const trimFileNameToByteLimit: (name: string, limit?: number) => string;
|
|
3732
4436
|
|
|
3733
4437
|
/** An error thrown to indicate the caller is unauthenticated. */
|
|
@@ -3736,6 +4440,9 @@ export declare interface UnauthorizedErrorLike extends Error {
|
|
|
3736
4440
|
readonly url: string;
|
|
3737
4441
|
}
|
|
3738
4442
|
|
|
4443
|
+
/** Returns a new set containing every path from each of `pathSets`. */
|
|
4444
|
+
export declare const unionPathSets: (pathSets: readonly ReadonlySet<string>[]) => Set<string>;
|
|
4445
|
+
|
|
3739
4446
|
/** A skill archive unpacked into its manifest text and a relative-path → bytes map of every other entry. */
|
|
3740
4447
|
export declare interface UnpackedSkillArchive {
|
|
3741
4448
|
/** The root `SKILL.md` entry's decoded text content. */
|
|
@@ -3762,7 +4469,7 @@ export declare enum UnsupportedTriggerReason {
|
|
|
3762
4469
|
MissingRequiredFields = "missingRequiredFields"
|
|
3763
4470
|
}
|
|
3764
4471
|
|
|
3765
|
-
export declare const updateEntry: (prev: FileUploadBatchState | null,
|
|
4472
|
+
export declare const updateEntry: (prev: FileUploadBatchState | null, id: string, patch: FileUploadStatus | Partial<Pick<FileUploadEntry, "status" | "percent">>) => FileUploadBatchState | null;
|
|
3766
4473
|
|
|
3767
4474
|
/** Max number of files uploaded concurrently within a single upload batch. */
|
|
3768
4475
|
export declare const UPLOAD_CONCURRENCY = 3;
|
|
@@ -3786,6 +4493,66 @@ export declare interface UploadFileWithProgressOptions {
|
|
|
3786
4493
|
/** Upload mode passed to `FilesApi.uploadFile`: overwrite an existing file or fail if it already exists. */
|
|
3787
4494
|
export declare type UploadMode = 'overwrite' | 'create-only';
|
|
3788
4495
|
|
|
4496
|
+
/**
|
|
4497
|
+
* i18n key strings that the consuming app's translation bundle must define for
|
|
4498
|
+
* `mapUsageDataToDashboard` to produce correctly translated strings. The
|
|
4499
|
+
* values are the default key paths used by AI DIAL Chat.
|
|
4500
|
+
*/
|
|
4501
|
+
export declare const USAGE_DATA_I18N_KEYS: {
|
|
4502
|
+
/** Title for the current-UTC-day card (e.g. `'Today'`). */
|
|
4503
|
+
readonly todayTitle: "usage.todayTitle";
|
|
4504
|
+
/** Accessible period description for the current-UTC-day card. */
|
|
4505
|
+
readonly todayPeriodDescription: "usage.todayPeriodDescription";
|
|
4506
|
+
/** Title for the current-UTC-week card (e.g. `'This week'`). */
|
|
4507
|
+
readonly thisWeekTitle: "usage.thisWeekTitle";
|
|
4508
|
+
/** Accessible period description for the current-UTC-week card. */
|
|
4509
|
+
readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
|
|
4510
|
+
/** Title for the current-UTC-month card (e.g. `'This month'`). */
|
|
4511
|
+
readonly thisMonthTitle: "usage.thisMonthTitle";
|
|
4512
|
+
/** Accessible period description for the current-UTC-month card. */
|
|
4513
|
+
readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
|
|
4514
|
+
/** Aria label when there is no limit. Receives `{ used: string }`. */
|
|
4515
|
+
readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
|
|
4516
|
+
/** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
|
|
4517
|
+
readonly progressAriaLabel: "usage.progressAriaLabel";
|
|
4518
|
+
};
|
|
4519
|
+
|
|
4520
|
+
/**
|
|
4521
|
+
* i18n key strings that the consuming app's translation bundle must define for
|
|
4522
|
+
* `mapUserUsageToModelLimits` and `mapOverallCostLimitsToPeriodStatuses` to produce
|
|
4523
|
+
* correctly translated strings. The values are the default key paths used by AI DIAL Chat.
|
|
4524
|
+
*/
|
|
4525
|
+
export declare const USAGE_MODEL_LIMITS_I18N_KEYS: {
|
|
4526
|
+
/** Period label used in tooltip text. Receives no interpolation. */
|
|
4527
|
+
readonly todayPeriodDescription: "usage.todayPeriodDescription";
|
|
4528
|
+
/** Period label used in tooltip text. Receives no interpolation. */
|
|
4529
|
+
readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
|
|
4530
|
+
/** Period label used in tooltip text. Receives no interpolation. */
|
|
4531
|
+
readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
|
|
4532
|
+
/** Tooltip when the overall cost limit is running low. Receives `{ period: string }`. */
|
|
4533
|
+
readonly overallCostLimitRunningLowTooltip: "usage.overallCostLimitRunningLowTooltip";
|
|
4534
|
+
/** Tooltip when the overall cost limit is reached. Receives `{ period: string }`. */
|
|
4535
|
+
readonly overallCostLimitReachedTooltip: "usage.overallCostLimitReachedTooltip";
|
|
4536
|
+
/** Aria label for a metric cell with no data. */
|
|
4537
|
+
readonly unavailableLabel: "usage.unavailableLabel";
|
|
4538
|
+
/** Supporting label when a token limit follows the cost limit. */
|
|
4539
|
+
readonly followsCostLimitLabel: "usage.followsCostLimitLabel";
|
|
4540
|
+
/** Supporting label when there is no per-deployment token limit. */
|
|
4541
|
+
readonly noLimitLabel: "usage.noLimitLabel";
|
|
4542
|
+
/** Aria label when token usage has no limit but follows the cost limit. Receives `{ used: string }`. */
|
|
4543
|
+
readonly followsCostLimitAriaLabel: "usage.followsCostLimitAriaLabel";
|
|
4544
|
+
/** Aria label when there is no limit. Receives `{ used: string }`. */
|
|
4545
|
+
readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
|
|
4546
|
+
/** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
|
|
4547
|
+
readonly progressAriaLabel: "usage.progressAriaLabel";
|
|
4548
|
+
/** Label for the spent-cost cell. Receives `{ amount: string }`. */
|
|
4549
|
+
readonly spentLabel: "usage.spentLabel";
|
|
4550
|
+
/** Type caption for an application (agent) row. Receives no interpolation. */
|
|
4551
|
+
readonly applicationTypeLabel: "usage.applicationTypeLabel";
|
|
4552
|
+
/** Supporting label on an application row's spent cost. Receives no interpolation. */
|
|
4553
|
+
readonly includesCalledModelsLabel: "usage.includesCalledModelsLabel";
|
|
4554
|
+
};
|
|
4555
|
+
|
|
3789
4556
|
/**
|
|
3790
4557
|
* Synchronises the active conversation with the conversation list and returns
|
|
3791
4558
|
* the panel-space id of the active conversation, or `undefined` when none is active.
|
|
@@ -3820,6 +4587,25 @@ export declare interface UseActiveConversationSyncParams {
|
|
|
3820
4587
|
toPanelConversationId: (id: string) => string;
|
|
3821
4588
|
}
|
|
3822
4589
|
|
|
4590
|
+
/** Loads fresh service statuses without coupling proactive credentials to a live completion. */
|
|
4591
|
+
export declare const useApplicationCredentials: ({ appId, externalServicesClient, offlineCredentialsClient, }: UseApplicationCredentialsParams) => {
|
|
4592
|
+
services: ApplicationExternalServiceDto[];
|
|
4593
|
+
isOfflineConnected: boolean;
|
|
4594
|
+
isLoading: boolean;
|
|
4595
|
+
hasError: boolean;
|
|
4596
|
+
refresh: () => Promise<void>;
|
|
4597
|
+
};
|
|
4598
|
+
|
|
4599
|
+
/** Configured operations for loading application credential metadata. */
|
|
4600
|
+
export declare interface UseApplicationCredentialsParams {
|
|
4601
|
+
/** Application identifier passed through to the configured client. */
|
|
4602
|
+
appId: string;
|
|
4603
|
+
/** Host-configured external-services API. */
|
|
4604
|
+
externalServicesClient: Pick<ExternalServicesApi, 'listExternalServices'>;
|
|
4605
|
+
/** Host-configured offline-credentials API. */
|
|
4606
|
+
offlineCredentialsClient: Pick<OfflineCredentialsApi, 'getOfflineCredentials'>;
|
|
4607
|
+
}
|
|
4608
|
+
|
|
3823
4609
|
/**
|
|
3824
4610
|
* Generic single-slot pending / loading / error state machine for
|
|
3825
4611
|
* confirmation dialogs that trigger an async operation.
|
|
@@ -3862,8 +4648,8 @@ export declare const useAttachmentUpload: ({ filesApi, bucket, onNetworkError, d
|
|
|
3862
4648
|
|
|
3863
4649
|
/** Parameters for {@link useAttachmentUpload}. */
|
|
3864
4650
|
export declare interface UseAttachmentUploadParams {
|
|
3865
|
-
/** Already-configured
|
|
3866
|
-
filesApi: Pick<FilesApi, 'uploadFile'
|
|
4651
|
+
/** Already-configured client; optional listing skips stored names after a conflict. */
|
|
4652
|
+
filesApi: Pick<FilesApi, 'uploadFile'> & Partial<Pick<FilesApi, 'listFiles'>>;
|
|
3867
4653
|
/** DIAL Core bucket the file is uploaded into. */
|
|
3868
4654
|
bucket: string | undefined;
|
|
3869
4655
|
/** Called with batched filenames after a burst of network-error upload failures. */
|
|
@@ -3883,12 +4669,14 @@ export declare interface UseAttachmentUploadResult {
|
|
|
3883
4669
|
* MIME types, debouncing a burst of rejected files into a single
|
|
3884
4670
|
* `onValidationError` call rather than firing one per file.
|
|
3885
4671
|
*/
|
|
3886
|
-
export declare const useAttachmentValidation: ({ allowedMimeTypes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
|
|
4672
|
+
export declare const useAttachmentValidation: ({ allowedMimeTypes, maxFileSizeBytes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
|
|
3887
4673
|
|
|
3888
4674
|
/** Parameters for {@link useAttachmentValidation}. */
|
|
3889
4675
|
export declare interface UseAttachmentValidationParams {
|
|
3890
4676
|
/** Resolved MIME types currently allowed for attachments. */
|
|
3891
4677
|
allowedMimeTypes: string[];
|
|
4678
|
+
/** Maximum attachment file size, in bytes. When omitted, no file is rejected for size. */
|
|
4679
|
+
maxFileSizeBytes?: number;
|
|
3892
4680
|
/** Called with a structured event when a rejected attachment is reported, at most once per debounce window. */
|
|
3893
4681
|
onValidationError?: (event: AttachmentValidationErrorEvent) => void;
|
|
3894
4682
|
/** Debounce window, in ms, before firing `onValidationError` for a rejected file. Defaults to `100`. */
|
|
@@ -4218,7 +5006,8 @@ export declare interface UseConversationHandlersResult {
|
|
|
4218
5006
|
* `.dial`/`.zip`, v5 envelope, old- or new-chat origin) once per file, then
|
|
4219
5007
|
* re-uploads any archive attachments to `uploads/<YYYY-MM>/` —
|
|
4220
5008
|
* disambiguating a name collision with a ` (n)` suffix instead of rejecting
|
|
4221
|
-
* it — rewrites attachment references (and renamed titles),
|
|
5009
|
+
* it — rewrites attachment references (and renamed titles), drops any
|
|
5010
|
+
* reference still pointing into another user's bucket, regenerates each
|
|
4222
5011
|
* conversation's id/path with a fresh UUID (collision-free save, no replace
|
|
4223
5012
|
* dialog), and persists every conversation through the injected
|
|
4224
5013
|
* `conversationsApi`. One job per imported file, not per conversation.
|
|
@@ -4289,9 +5078,8 @@ export declare interface UseConversationLookupMapsParams {
|
|
|
4289
5078
|
* panel's item contract. All app-specific concerns (icon URL resolution,
|
|
4290
5079
|
* route generation, id normalisation) are injected via resolver callbacks.
|
|
4291
5080
|
*/
|
|
4292
|
-
export declare const useConversationPanelItems: ({ items, deployments, isDeploymentsLoading, toPanelConversationId, resolveIconUrl, resolveIconTooltip, resolveHref,
|
|
4293
|
-
|
|
4294
|
-
taskBadgeLabel?: string | undefined;
|
|
5081
|
+
export declare const useConversationPanelItems: ({ items, deployments, isDeploymentsLoading, toPanelConversationId, resolveIconUrl, resolveIconTooltip, resolveHref, resolveTaskPresentation, }: UseConversationPanelItemsParams) => {
|
|
5082
|
+
leadingIcon?: ReactNode;
|
|
4295
5083
|
isUnread?: boolean | undefined;
|
|
4296
5084
|
id: string;
|
|
4297
5085
|
title: string;
|
|
@@ -4327,11 +5115,12 @@ export declare interface UseConversationPanelItemsResolvers {
|
|
|
4327
5115
|
/** Resolves the href to navigate to when the conversation row is clicked. */
|
|
4328
5116
|
resolveHref: (panelConversationId: string) => string;
|
|
4329
5117
|
/**
|
|
4330
|
-
* Returns
|
|
4331
|
-
*
|
|
5118
|
+
* Returns the row presentation for a scheduled-task conversation — a
|
|
5119
|
+
* host-rendered leading icon that replaces the deployment avatar, and the
|
|
5120
|
+
* unread flag — or `undefined` for an ordinary conversation.
|
|
4332
5121
|
*/
|
|
4333
|
-
|
|
4334
|
-
|
|
5122
|
+
resolveTaskPresentation?: (item: ConversationListItemDto) => {
|
|
5123
|
+
leadingIcon?: ReactNode;
|
|
4335
5124
|
isUnread: boolean;
|
|
4336
5125
|
} | undefined;
|
|
4337
5126
|
}
|
|
@@ -4398,7 +5187,7 @@ export declare interface UseConversationSourcesResult {
|
|
|
4398
5187
|
uploaded: DisplayAttachment[];
|
|
4399
5188
|
/** Deduplicated attachments the assistant generated across the conversation. */
|
|
4400
5189
|
generated: DisplayAttachment[];
|
|
4401
|
-
/** Quotation sources referenced by assistant messages, deduplicated by URL
|
|
5190
|
+
/** Quotation sources referenced by assistant messages, deduplicated by URL; PDF sources are qualified with `#page=N`. */
|
|
4402
5191
|
sources: QuotationSource[];
|
|
4403
5192
|
}
|
|
4404
5193
|
|
|
@@ -4410,7 +5199,7 @@ export declare interface UseConversationSourcesResult {
|
|
|
4410
5199
|
* `transport`/`generation`/`channel`/`overlay` capabilities rather than any
|
|
4411
5200
|
* app context or `server-api` import.
|
|
4412
5201
|
*/
|
|
4413
|
-
export declare const useConversationStream: ({ conversationId, state: { setConversation, conversationRef }, transport, generation: { startGeneration, completeGeneration }, channel, overlay, onStopError, generationConflictMessage, }: UseConversationStreamParams) => UseConversationStreamResult;
|
|
5202
|
+
export declare const useConversationStream: ({ conversationId, state: { setConversation, conversationRef }, transport, generation: { startGeneration, completeGeneration }, channel, overlay, onStopError, generationConflictMessage, generationPersistenceErrorMessage, onStreamError, }: UseConversationStreamParams) => UseConversationStreamResult;
|
|
4414
5203
|
|
|
4415
5204
|
/** Parameters for {@link useConversationStream}. */
|
|
4416
5205
|
export declare interface UseConversationStreamParams {
|
|
@@ -4428,6 +5217,15 @@ export declare interface UseConversationStreamParams {
|
|
|
4428
5217
|
* {@link DEFAULT_GENERATION_CONFLICT_MESSAGE}.
|
|
4429
5218
|
*/
|
|
4430
5219
|
generationConflictMessage?: string;
|
|
5220
|
+
/** Host-translated warning shown when the received answer could not be saved. */
|
|
5221
|
+
generationPersistenceErrorMessage?: string;
|
|
5222
|
+
/**
|
|
5223
|
+
* Receives the original error of every failed stream. The hook shows only
|
|
5224
|
+
* host-supplied or upstream-supplied text on the message bubble and hides
|
|
5225
|
+
* transport detail (e.g. `Failed to fetch`), so this is where the host can
|
|
5226
|
+
* still log or report the raw error.
|
|
5227
|
+
*/
|
|
5228
|
+
onStreamError?: (error: Error) => void;
|
|
4431
5229
|
}
|
|
4432
5230
|
|
|
4433
5231
|
/** Return value of {@link useConversationStream}. */
|
|
@@ -4453,7 +5251,7 @@ export declare interface UseConversationStreamResult {
|
|
|
4453
5251
|
* - shared: files shared with the user via `DialFilesApi.listSharedFiles`
|
|
4454
5252
|
* - organization: public bucket via `DialFilesApi.listPublicFiles`
|
|
4455
5253
|
*/
|
|
4456
|
-
export declare const useDialFileListing: ({ filesApi, bucket, rootLabel, activeTab, onNotification, }: UseDialFileListingOptions) => UseDialFileListingResult;
|
|
5254
|
+
export declare const useDialFileListing: ({ filesApi, bucket, rootLabel, activeTab, onNotification, isActive, sessionKey, }: UseDialFileListingOptions) => UseDialFileListingResult;
|
|
4457
5255
|
|
|
4458
5256
|
/** Options accepted by `useDialFileListing`. */
|
|
4459
5257
|
export declare interface UseDialFileListingOptions {
|
|
@@ -4467,6 +5265,10 @@ export declare interface UseDialFileListingOptions {
|
|
|
4467
5265
|
activeTab: DialFileManagerTabs;
|
|
4468
5266
|
/** Called with a structured event when a folder-load operation fails. */
|
|
4469
5267
|
onNotification?: (notification: FileManagerNotification) => void;
|
|
5268
|
+
/** When false, the hook issues no `DialFilesApi` call and reports `isLoading: false`. Defaults to `true`. */
|
|
5269
|
+
isActive?: boolean;
|
|
5270
|
+
/** Changing this value resets cache and navigation exactly like an `activeTab` change. Defaults to `undefined`. */
|
|
5271
|
+
sessionKey?: string;
|
|
4470
5272
|
}
|
|
4471
5273
|
|
|
4472
5274
|
/** Values returned by `useDialFileListing`. */
|
|
@@ -4523,7 +5325,7 @@ export declare interface UseDialFileListingResult {
|
|
|
4523
5325
|
* every translated string reaches it through `labels`,
|
|
4524
5326
|
* `disabledNewButtonTooltip`, and `buildValidationErrorMessage`.
|
|
4525
5327
|
*/
|
|
4526
|
-
export declare const useDialFileManager: ({ filesApi, bucket, rootLabel, activeTab, onNotification, onOperationSuccess, forbiddenSymbolsRegExp, variant, actionProfile, labels, locale, disabledNewButtonTooltip, downloadDestination, buildValidationErrorMessage, }: UseDialFileManagerOptions) => UseDialFileManagerResult;
|
|
5328
|
+
export declare const useDialFileManager: ({ filesApi, bucket, rootLabel, activeTab, isActive, sessionKey, onNotification, onOperationSuccess, forbiddenSymbolsRegExp, variant, actionProfile, labels, locale, disabledNewButtonTooltip, downloadDestination, buildValidationErrorMessage, }: UseDialFileManagerOptions) => UseDialFileManagerResult;
|
|
4527
5329
|
|
|
4528
5330
|
export declare interface UseDialFileManagerOptions {
|
|
4529
5331
|
/** Injected operation port used for every file-manager network call. */
|
|
@@ -4534,6 +5336,10 @@ export declare interface UseDialFileManagerOptions {
|
|
|
4534
5336
|
rootLabel?: string;
|
|
4535
5337
|
/** Active tab — drives listing source and per-tab options. Defaults to MyFiles. */
|
|
4536
5338
|
activeTab?: DialFileManagerTabs;
|
|
5339
|
+
/** When false, the listing issues no `DialFilesApi` call and reports `isLoading: false`. Defaults to `true`. */
|
|
5340
|
+
isActive?: boolean;
|
|
5341
|
+
/** Changing this value resets cache and navigation exactly like an `activeTab` change. Defaults to `undefined`. */
|
|
5342
|
+
sessionKey?: string;
|
|
4537
5343
|
/** Called when a file-manager action should surface a toast notification. */
|
|
4538
5344
|
onNotification?: (notification: FileManagerNotification) => void;
|
|
4539
5345
|
/** Called when a mutation succeeds, instead of invoking an application notification service directly. */
|
|
@@ -4588,7 +5394,7 @@ export declare interface UseDialFileManagerResult {
|
|
|
4588
5394
|
onSearchFiles: (folder: string, query: string) => void;
|
|
4589
5395
|
/** Search: true while a search request is in flight. */
|
|
4590
5396
|
isSearching: boolean;
|
|
4591
|
-
/** Search: flat
|
|
5397
|
+
/** Search: flat, unfiltered recursive listing of the current folder, or null when search is not active. */
|
|
4592
5398
|
searchResults: DialFile[] | null;
|
|
4593
5399
|
/** Search: clears results and exits search mode. */
|
|
4594
5400
|
clearSearchResults: () => void;
|
|
@@ -4612,7 +5418,9 @@ export declare interface UseDialFileManagerResult {
|
|
|
4612
5418
|
uploadBatchState: FileUploadBatchState | null;
|
|
4613
5419
|
/** Upload: abort all in-flight and queued uploads. */
|
|
4614
5420
|
cancelUpload: () => void;
|
|
4615
|
-
/** Upload:
|
|
5421
|
+
/** Upload: abort one queued or in-flight upload by its entry id. */
|
|
5422
|
+
cancelUploadFile: (id: string) => void;
|
|
5423
|
+
/** Upload: empty the upload queue. */
|
|
4616
5424
|
clearUploadBatch: () => void;
|
|
4617
5425
|
/** Folder creation: called when user confirms a new folder name. */
|
|
4618
5426
|
onCreateFolder: (file: DialUploadFileItem, folderPath: string, fileId: string) => Promise<void>;
|
|
@@ -4679,7 +5487,7 @@ export declare interface UseDialFileManagerResult {
|
|
|
4679
5487
|
/**
|
|
4680
5488
|
* True while any mutating file-manager operation is in flight: the OR of
|
|
4681
5489
|
* `isCreatingFolder`, `isDownloading`, `isDeleting`, `isRenaming`, `isCopying`,
|
|
4682
|
-
* `isMoving`, `isUnsharing`, `isRemovingAccess`, and
|
|
5490
|
+
* `isMoving`, `isUnsharing`, `isRemovingAccess`, and any upload still queued or running.
|
|
4683
5491
|
*
|
|
4684
5492
|
* Deliberately excludes three flags, each already fully contained by its own
|
|
4685
5493
|
* scoped loading UI:
|
|
@@ -4690,17 +5498,42 @@ export declare interface UseDialFileManagerResult {
|
|
|
4690
5498
|
isAnyOperationInProgress: boolean;
|
|
4691
5499
|
}
|
|
4692
5500
|
|
|
5501
|
+
/**
|
|
5502
|
+
* Composes one `useDialFileManager` per source tab (My files, Shared,
|
|
5503
|
+
* Organization) so the File storage page can offer an All tab without a
|
|
5504
|
+
* second copy of the per-tab rules. On a single tab it returns that section's
|
|
5505
|
+
* result; on All it merges the section roots into one tree and routes every
|
|
5506
|
+
* callback to the section owning the path. Section availability and names
|
|
5507
|
+
* arrive through `sections` — the hook reads no config, i18n, or context.
|
|
5508
|
+
*/
|
|
5509
|
+
export declare const useDialFileManagerSections: ({ activeTab, sections, ...managerOptions }: UseDialFileManagerSectionsOptions) => UseDialFileManagerSectionsResult;
|
|
5510
|
+
|
|
5511
|
+
/** Options accepted by `useDialFileManagerSections`. */
|
|
5512
|
+
export declare interface UseDialFileManagerSectionsOptions extends Omit<UseDialFileManagerOptions, 'activeTab' | 'rootLabel' | 'isActive' | 'sessionKey'> {
|
|
5513
|
+
/** Active tab, including `DialFileManagerTabs.All`. */
|
|
5514
|
+
activeTab: DialFileManagerTabs;
|
|
5515
|
+
/** Enabled source tabs in display order, each with its translated top-level folder name. */
|
|
5516
|
+
sections: DialFileManagerSection[];
|
|
5517
|
+
}
|
|
5518
|
+
|
|
5519
|
+
/** Values returned by `useDialFileManagerSections`. */
|
|
5520
|
+
export declare interface UseDialFileManagerSectionsResult extends UseDialFileManagerResult {
|
|
5521
|
+
/** Source tab of the browsed folder; never `DialFileManagerTabs.All`. */
|
|
5522
|
+
sectionTab: DialFileManagerTabs;
|
|
5523
|
+
}
|
|
5524
|
+
|
|
4693
5525
|
/**
|
|
4694
5526
|
* Filters the file-manager's tab list down to the host's configured set and
|
|
4695
5527
|
* resets `activeTab` to the highest-priority still-enabled tab when the
|
|
4696
5528
|
* current one becomes excluded. A `fileManagerTabs` of `undefined` means no
|
|
4697
5529
|
* restriction — every tab in `allTabs` stays enabled and no reset ever fires.
|
|
5530
|
+
* The All tab is kept only while at least two source tabs are enabled.
|
|
4698
5531
|
*/
|
|
4699
|
-
export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs:
|
|
5532
|
+
export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: FilterChipItem<DialFileManagerTabs>[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
|
|
4700
5533
|
|
|
4701
5534
|
/** Values returned by `useDialFileManagerTabConfig`. */
|
|
4702
5535
|
export declare interface UseDialFileManagerTabConfigResult {
|
|
4703
|
-
tabs:
|
|
5536
|
+
tabs: FileTreeOptions['tabs'];
|
|
4704
5537
|
}
|
|
4705
5538
|
|
|
4706
5539
|
/**
|
|
@@ -4825,10 +5658,11 @@ export declare interface UseDialFileSharingResult {
|
|
|
4825
5658
|
|
|
4826
5659
|
/**
|
|
4827
5660
|
* Manages upload batches (single-file and ZIP-archive extraction), including
|
|
4828
|
-
* concurrency-limited progress tracking and abort.
|
|
4829
|
-
*
|
|
4830
|
-
* `
|
|
4831
|
-
* cache
|
|
5661
|
+
* concurrency-limited progress tracking and per-file abort. A batch started
|
|
5662
|
+
* while another is on screen is appended to it, and settled entries stay in
|
|
5663
|
+
* `uploadBatchState` until `clearUploadBatch`. Invalidates the shared listing
|
|
5664
|
+
* cache for the destination folder through `invalidateFolders`/`bumpRetry`
|
|
5665
|
+
* after a batch settles — it never holds its own copy of the cache.
|
|
4832
5666
|
*/
|
|
4833
5667
|
export declare const useDialFileUploadBatch: ({ filesApi, bucket, rootLabel, activeTab, cache, sharedRootMetaRef, invalidateFolders, bumpRetry, onNotification, }: UseDialFileUploadBatchOptions) => UseDialFileUploadBatchResult;
|
|
4834
5668
|
|
|
@@ -4861,6 +5695,7 @@ export declare interface UseDialFileUploadBatchResult {
|
|
|
4861
5695
|
onValidateUpload: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => Promise<FileUploadValidationResult>;
|
|
4862
5696
|
uploadBatchState: FileUploadBatchState | null;
|
|
4863
5697
|
cancelUpload: () => void;
|
|
5698
|
+
cancelUploadFile: (id: string) => void;
|
|
4864
5699
|
clearUploadBatch: () => void;
|
|
4865
5700
|
}
|
|
4866
5701
|
|
|
@@ -4889,6 +5724,64 @@ export declare interface UseFavoriteEntitiesStateResult {
|
|
|
4889
5724
|
toggleFavorite: (id: string, isFavorite: boolean, entityType?: FavoriteEntityType) => Promise<void>;
|
|
4890
5725
|
}
|
|
4891
5726
|
|
|
5727
|
+
/**
|
|
5728
|
+
* Composes the file-manager tab/listing hooks into the stateful part of an attachment picker:
|
|
5729
|
+
* active tab, selected paths, and hidden-path/MIME/size/folder row eligibility. Returns the
|
|
5730
|
+
* existing `useDialFileManager` controller unchanged and the selection/tab/eligibility fields
|
|
5731
|
+
* `FileManagerAttachModal` already consumes — it composes that modal, it does not replace it.
|
|
5732
|
+
* Final attachment filtering, deduplication, and count enforcement stay owned by the modal.
|
|
5733
|
+
*/
|
|
5734
|
+
export declare const useFileAttachmentPicker: ({ fileManagerOptions, bucket, forbiddenSymbolsRegExp, tabLabels, allowedTabs, initialTab, allowedTypes, maxSelectableFileSize, canAttachFolders, }: UseFileAttachmentPickerOptions) => UseFileAttachmentPickerResult;
|
|
5735
|
+
|
|
5736
|
+
/** Options accepted by {@link useFileAttachmentPicker}. */
|
|
5737
|
+
export declare interface UseFileAttachmentPickerOptions {
|
|
5738
|
+
/**
|
|
5739
|
+
* Configured `useDialFileManager` options besides the values this hook derives:
|
|
5740
|
+
* `bucket`, `activeTab`, `rootLabel`, `variant`, and `forbiddenSymbolsRegExp`.
|
|
5741
|
+
*/
|
|
5742
|
+
fileManagerOptions: Omit<UseDialFileManagerOptions, 'bucket' | 'activeTab' | 'rootLabel' | 'variant' | 'forbiddenSymbolsRegExp'>;
|
|
5743
|
+
/** DIAL Core bucket to browse. */
|
|
5744
|
+
bucket: string;
|
|
5745
|
+
/** Regexp of characters forbidden in file/folder names, forwarded to `useDialFileManager`. */
|
|
5746
|
+
forbiddenSymbolsRegExp?: RegExp;
|
|
5747
|
+
/** Host-translated label per tab; also supplies the active tab's root-folder label. */
|
|
5748
|
+
tabLabels: Record<DialFileManagerTabs, string>;
|
|
5749
|
+
/** Tab ids the host's configuration allows. `undefined` allows every tab. `all` is never offered. */
|
|
5750
|
+
allowedTabs?: string[];
|
|
5751
|
+
/** Initial active tab. Defaults to `DialFileManagerTabs.MyFiles`; `All` is treated as the default. */
|
|
5752
|
+
initialTab?: DialFileManagerTabs;
|
|
5753
|
+
/** MIME types eligible for selection/upload. Empty or absent allows every type. */
|
|
5754
|
+
allowedTypes?: string[];
|
|
5755
|
+
/** Files at or below this size (bytes) remain eligible; absent allows any size. */
|
|
5756
|
+
maxSelectableFileSize?: number;
|
|
5757
|
+
/** Whether folder rows are eligible for selection. Defaults to `false`. */
|
|
5758
|
+
canAttachFolders?: boolean;
|
|
5759
|
+
}
|
|
5760
|
+
|
|
5761
|
+
/** Result returned by {@link useFileAttachmentPicker}. */
|
|
5762
|
+
export declare interface UseFileAttachmentPickerResult {
|
|
5763
|
+
/** The composed file-manager controller; forward to `FileManagerAttachModal`'s `controller` prop. */
|
|
5764
|
+
controller: UseDialFileManagerResult;
|
|
5765
|
+
/** Active tab. */
|
|
5766
|
+
activeTab: DialFileManagerTabs;
|
|
5767
|
+
/** Tab list filtered to `allowedTabs`; forward to `FileManagerAttachModal`'s `tabs` prop. */
|
|
5768
|
+
tabs: FileTreeOptions['tabs'];
|
|
5769
|
+
/** Switches the active tab and clears the current selection. */
|
|
5770
|
+
onTabChange: (tab: DialFileManagerTabs) => void;
|
|
5771
|
+
/** Currently selected paths. */
|
|
5772
|
+
selectedPaths: Set<string>;
|
|
5773
|
+
/** Replaces the selection with a defensive copy of the given set. */
|
|
5774
|
+
onSelectedPathsChange: (paths: Set<string>) => void;
|
|
5775
|
+
/** Row eligibility predicate; forward to `FileManagerAttachModal`'s `isRowSelectable` prop. */
|
|
5776
|
+
isRowSelectable: (node: {
|
|
5777
|
+
data?: FileManagerSelectableNode | null;
|
|
5778
|
+
}) => boolean;
|
|
5779
|
+
/** MIME eligibility predicate; forward to `FileManagerAttachModal`'s `isFileTypeAllowed` prop. */
|
|
5780
|
+
isFileTypeAllowed: (contentType: string) => boolean;
|
|
5781
|
+
/** Accepted upload MIME types; forward to `FileManagerAttachModal`'s `allowedFileTypes` prop. */
|
|
5782
|
+
allowedFileTypes: DialFileAcceptType[] | undefined;
|
|
5783
|
+
}
|
|
5784
|
+
|
|
4892
5785
|
export { useGridEditingScroll }
|
|
4893
5786
|
|
|
4894
5787
|
export { UseGridEditingScrollOptions }
|
|
@@ -4932,10 +5825,11 @@ export declare interface UseImportFilePickerResult {
|
|
|
4932
5825
|
* Builds the `McpAppHostAdapter` a host injects into `@epam/ai-dial-mcp-apps`'s
|
|
4933
5826
|
* hooks/components, wiring the library's host-context/tool-call/resource-fetch
|
|
4934
5827
|
* contract to a configured `McpAppsApiClient` and this app's theme/locale/config
|
|
4935
|
-
* values (`hostContextParams`, `sandboxUrl`)
|
|
4936
|
-
*
|
|
5828
|
+
* values (`hostContextParams`, `sandboxUrl`), plus the host's own identity
|
|
5829
|
+
* (`hostInfo`) — this hook itself never reads app context, so a host builds
|
|
5830
|
+
* those values wherever it already has them.
|
|
4937
5831
|
*/
|
|
4938
|
-
export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams) => McpAppHostAdapter;
|
|
5832
|
+
export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams, hostInfo: Implementation) => McpAppHostAdapter;
|
|
4939
5833
|
|
|
4940
5834
|
/**
|
|
4941
5835
|
* Builds the `McpUiHostContext` delivered to a mounted MCP App during its
|
|
@@ -4965,6 +5859,35 @@ export declare const useMcpAppHostContext: (displayMode: "inline" | "fullscreen"
|
|
|
4965
5859
|
*/
|
|
4966
5860
|
export declare const useMcpAppTools: (client: McpAppsApiClient, deployment: DeploymentItemDto | undefined, messages: Message[], toolsets: DialToolsetDto[]) => McpAppToolRef[];
|
|
4967
5861
|
|
|
5862
|
+
/**
|
|
5863
|
+
* Captures eligible message text and creates Reply files for an existing composer
|
|
5864
|
+
* attachment flow without acquiring host deployment, upload or localization knowledge.
|
|
5865
|
+
*/
|
|
5866
|
+
export declare const useMessageSelectionReply: ({ conversationId, enabled, droppedFiles, onDroppedFilesConsumed, }: UseMessageSelectionReplyParams) => {
|
|
5867
|
+
contentRef: (node: HTMLDivElement | null) => (() => void) | undefined;
|
|
5868
|
+
actionRef: RefObject<HTMLDivElement | null>;
|
|
5869
|
+
selection: MessageSelectionReplySnapshot | null;
|
|
5870
|
+
onReply: () => void;
|
|
5871
|
+
dismiss: () => void;
|
|
5872
|
+
pendingFiles: File[];
|
|
5873
|
+
onFilesConsumed: () => void;
|
|
5874
|
+
focusRequestId: number | undefined;
|
|
5875
|
+
onAttachmentsChange: (attachments: Attachment[]) => void;
|
|
5876
|
+
addedRevision: number;
|
|
5877
|
+
};
|
|
5878
|
+
|
|
5879
|
+
/** Parameters accepted by {@link useMessageSelectionReply}. */
|
|
5880
|
+
export declare interface UseMessageSelectionReplyParams {
|
|
5881
|
+
/** Identifier used to discard selection and queued files after a scope change. */
|
|
5882
|
+
conversationId: string;
|
|
5883
|
+
/** Whether the host currently permits a Reply attachment. */
|
|
5884
|
+
enabled: boolean;
|
|
5885
|
+
/** Files from the host's ordinary page-drop queue. */
|
|
5886
|
+
droppedFiles: File[];
|
|
5887
|
+
/** Acknowledges the captured page-drop batch after the composer accepts it. */
|
|
5888
|
+
onDroppedFilesConsumed: () => void;
|
|
5889
|
+
}
|
|
5890
|
+
|
|
4968
5891
|
/**
|
|
4969
5892
|
* Completes an OAuth authorization-code flow from inside the callback popup:
|
|
4970
5893
|
* reads and clears the redirect state written into this popup's own
|
|
@@ -5038,8 +5961,6 @@ export declare const useOpenMcpAppCanvas: (cache: McpAppResponseCache, hostAdapt
|
|
|
5038
5961
|
|
|
5039
5962
|
/** User-facing text `useOpenMcpAppCanvas` needs but cannot resolve itself — a lib must not call `t()`. */
|
|
5040
5963
|
export declare interface UseOpenMcpAppCanvasLabels {
|
|
5041
|
-
/** Canvas panel title while an MCP App is loading or open. */
|
|
5042
|
-
title: string;
|
|
5043
5964
|
/** Error label shown when the resource fetch is forbidden (HTTP 403). */
|
|
5044
5965
|
forbiddenErrorLabel: string;
|
|
5045
5966
|
/** Error label shown for any other resource-load/tool-call failure. */
|
|
@@ -5177,6 +6098,56 @@ export declare interface UsePublishFoldersResult {
|
|
|
5177
6098
|
hasPublishWriteAccess: (folderPath: string[]) => boolean;
|
|
5178
6099
|
}
|
|
5179
6100
|
|
|
6101
|
+
/** Shared, cancellation-safe pagination and background refresh for one schedule's run history. */
|
|
6102
|
+
export declare const useScheduledTaskRuns: (client: ScheduledTasksApiClient, { scheduleId, enabled, pageSize, nextRunTime, }: UseScheduledTaskRunsOptions) => {
|
|
6103
|
+
items: ScheduledTaskRunDto[];
|
|
6104
|
+
isLoading: boolean;
|
|
6105
|
+
isLoadingMore: boolean;
|
|
6106
|
+
initialError: Error | null;
|
|
6107
|
+
loadMoreError: Error | null;
|
|
6108
|
+
hasMore: boolean;
|
|
6109
|
+
loadMore: () => void;
|
|
6110
|
+
retryLoadMore: () => void;
|
|
6111
|
+
refetch: () => void;
|
|
6112
|
+
};
|
|
6113
|
+
|
|
6114
|
+
export declare interface UseScheduledTaskRunsOptions {
|
|
6115
|
+
scheduleId: string;
|
|
6116
|
+
enabled?: boolean;
|
|
6117
|
+
pageSize?: number;
|
|
6118
|
+
/**
|
|
6119
|
+
* The task's next scheduled run time (ISO string), when known. Drives the
|
|
6120
|
+
* one-shot background refresh described on {@link useScheduledTaskRuns}.
|
|
6121
|
+
* The caller already holds the task DTO — this hook never fetches it.
|
|
6122
|
+
*/
|
|
6123
|
+
nextRunTime?: string | null;
|
|
6124
|
+
}
|
|
6125
|
+
|
|
6126
|
+
/** Shared scheduler-list lifecycle with generation-scoped stale-response guards. */
|
|
6127
|
+
export declare const useScheduledTasks: (client: ScheduledTasksApiClient, { enabled, pageSize, debounceMs, initialSearch, initialSort, }?: UseScheduledTasksOptions) => {
|
|
6128
|
+
items: ScheduledTaskDto[];
|
|
6129
|
+
searchQuery: string;
|
|
6130
|
+
setSearchQuery: Dispatch<SetStateAction<string>>;
|
|
6131
|
+
sortKey: "firstToRun" | "lastToRun" | "newest" | "nameAZ";
|
|
6132
|
+
setSortKey: Dispatch<SetStateAction<"firstToRun" | "lastToRun" | "newest" | "nameAZ">>;
|
|
6133
|
+
isLoading: boolean;
|
|
6134
|
+
isLoadingMore: boolean;
|
|
6135
|
+
initialError: Error | null;
|
|
6136
|
+
loadMoreError: Error | null;
|
|
6137
|
+
hasMore: boolean;
|
|
6138
|
+
loadMore: () => void;
|
|
6139
|
+
retryLoadMore: () => void;
|
|
6140
|
+
refetch: () => void;
|
|
6141
|
+
};
|
|
6142
|
+
|
|
6143
|
+
export declare interface UseScheduledTasksOptions {
|
|
6144
|
+
enabled?: boolean;
|
|
6145
|
+
pageSize?: number;
|
|
6146
|
+
debounceMs?: number;
|
|
6147
|
+
initialSearch?: string;
|
|
6148
|
+
initialSort?: ListScheduledTasksSortEnum;
|
|
6149
|
+
}
|
|
6150
|
+
|
|
5180
6151
|
/**
|
|
5181
6152
|
* Resolves and manages share-link data for a DIAL Core resource.
|
|
5182
6153
|
*
|
|
@@ -5217,6 +6188,46 @@ export declare interface UseShareRecipientsCountResult {
|
|
|
5217
6188
|
invalidateRecipientsCount: (itemId: string) => void;
|
|
5218
6189
|
}
|
|
5219
6190
|
|
|
6191
|
+
/**
|
|
6192
|
+
* Headless controller for the skill-archive upload flow: dialog visibility, the exact-filename
|
|
6193
|
+
* precheck, in-flight exclusion, and import completion. The host supplies the configured request
|
|
6194
|
+
* and observes completion/failure through the injected callbacks; the hook never imports app
|
|
6195
|
+
* contexts, i18n, or a configured API client.
|
|
6196
|
+
*/
|
|
6197
|
+
export declare const useSkillArchiveImport: <TResult>({ importArchive, onImported, onError, manifestFileName, }: UseSkillArchiveImportOptions<TResult>) => UseSkillArchiveImportResult;
|
|
6198
|
+
|
|
6199
|
+
/** Options accepted by {@link useSkillArchiveImport}. */
|
|
6200
|
+
export declare interface UseSkillArchiveImportOptions<TResult> {
|
|
6201
|
+
/** Submits the selected archive; the host owns request configuration and the client. */
|
|
6202
|
+
importArchive: (file: File) => Promise<TResult>;
|
|
6203
|
+
/** Called once after a successful import (and any awaited host follow-up) settles. */
|
|
6204
|
+
onImported: (result: TResult) => void | Promise<void>;
|
|
6205
|
+
/** Called once when the import request, or the host's follow-up in {@link onImported}, fails. */
|
|
6206
|
+
onError: (error: unknown, kind: SkillArchiveImportErrorKind) => void;
|
|
6207
|
+
/** Exact filename treated as the skill manifest. Defaults to `'SKILL.md'`. */
|
|
6208
|
+
manifestFileName?: string;
|
|
6209
|
+
}
|
|
6210
|
+
|
|
6211
|
+
/** Result returned by {@link useSkillArchiveImport}. */
|
|
6212
|
+
export declare interface UseSkillArchiveImportResult {
|
|
6213
|
+
/** Whether the upload dialog is open. */
|
|
6214
|
+
isDialogOpen: boolean;
|
|
6215
|
+
/** Current phase of the import. */
|
|
6216
|
+
status: SkillArchiveImportStatus;
|
|
6217
|
+
/** Reason the current/last selection was rejected locally; `undefined` once cleared. */
|
|
6218
|
+
selectionRejectionReason: SkillArchiveSelectionRejectionReason | undefined;
|
|
6219
|
+
/** Classified failure of the last import request; `undefined` outside a request failure. */
|
|
6220
|
+
errorKind: SkillArchiveImportErrorKind | undefined;
|
|
6221
|
+
/** Opens the dialog, unless an import is already in flight. */
|
|
6222
|
+
openDialog: () => void;
|
|
6223
|
+
/** Closes the dialog and clears any rejection reason. */
|
|
6224
|
+
closeDialog: () => void;
|
|
6225
|
+
/** Wire to the dialog drop zone's `onChange`. */
|
|
6226
|
+
handleFilesSelected: (files: File[]) => void;
|
|
6227
|
+
/** Wire to the dialog drop zone's `onReject`. */
|
|
6228
|
+
handleFilesRejected: () => void;
|
|
6229
|
+
}
|
|
6230
|
+
|
|
5220
6231
|
/**
|
|
5221
6232
|
* Headless data pipeline behind a skill details side panel: resolves the
|
|
5222
6233
|
* selected skill from the listings, maps it to a catalog item with its
|
|
@@ -5318,7 +6329,7 @@ export declare interface UseSkillEditorLoadResult {
|
|
|
5318
6329
|
* `client.createSkill`/`client.updateSkill`, and mapping the resulting
|
|
5319
6330
|
* success/error/conflict outcomes to presentable state.
|
|
5320
6331
|
*/
|
|
5321
|
-
export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, frontmatterRef, loadedPathRef, etagRef, returnUrl, refetchSkills, client, messages, onNavigate, onNotify, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
|
|
6332
|
+
export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, frontmatterRef, loadedPathRef, etagRef, returnUrl, getCreateReturnUrl, refetchSkills, client, messages, onNavigate, onNotify, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
|
|
5322
6333
|
|
|
5323
6334
|
/** Parameters accepted by {@link useSkillEditorSubmit}. */
|
|
5324
6335
|
export declare interface UseSkillEditorSubmitParams {
|
|
@@ -5338,6 +6349,8 @@ export declare interface UseSkillEditorSubmitParams {
|
|
|
5338
6349
|
etagRef: React.MutableRefObject<string | undefined>;
|
|
5339
6350
|
/** Where to navigate on a successful save. */
|
|
5340
6351
|
returnUrl: string;
|
|
6352
|
+
/** Resolves the destination after creation from the normalized skill path. Defaults to `returnUrl`. */
|
|
6353
|
+
getCreateReturnUrl?: (path: string) => string;
|
|
5341
6354
|
/** Refetches the host's skill listing after a successful save. */
|
|
5342
6355
|
refetchSkills: () => Promise<void>;
|
|
5343
6356
|
/** Already-configured create/update operations. */
|
|
@@ -5358,6 +6371,10 @@ export declare interface UseSkillEditorSubmitResult {
|
|
|
5358
6371
|
errors: SkillEditorErrors;
|
|
5359
6372
|
/** General submit-time error, distinct from a stale-edit `conflict`. */
|
|
5360
6373
|
submitError: string | undefined;
|
|
6374
|
+
/** Whether `submitError` was caused by something a plain re-send can clear, rather than by the submission itself. */
|
|
6375
|
+
isSubmitErrorRetryable: boolean;
|
|
6376
|
+
/** Re-submits the values of the attempt that produced `submitError`. No-op before the first submit. */
|
|
6377
|
+
retrySubmit: () => void;
|
|
5361
6378
|
/** Present when the last save hit a stale-ETag conflict. */
|
|
5362
6379
|
conflict: {
|
|
5363
6380
|
message: string;
|
|
@@ -5366,15 +6383,22 @@ export declare interface UseSkillEditorSubmitResult {
|
|
|
5366
6383
|
clearConflict: () => void;
|
|
5367
6384
|
/** Validates and submits the given form values. */
|
|
5368
6385
|
handleSubmit: (values: SkillEditorValues) => Promise<void>;
|
|
6386
|
+
/**
|
|
6387
|
+
* Re-runs the Instructions frontmatter check against the editor's current
|
|
6388
|
+
* values, so a pasted `SKILL.md` is flagged as the text lands rather than
|
|
6389
|
+
* only on submit. Pass as the editor's `onValuesChange`.
|
|
6390
|
+
*/
|
|
6391
|
+
handleValuesChange: (values: SkillEditorValues) => void;
|
|
5369
6392
|
}
|
|
5370
6393
|
|
|
5371
6394
|
/**
|
|
5372
6395
|
* Owns the Skill Editor's batch file upload workflow: validating a staged
|
|
5373
6396
|
* batch, committing it atomically (supporting files plus an optional
|
|
5374
|
-
* `SKILL.md` manifest import, with a confirmation gate),
|
|
6397
|
+
* `SKILL.md` manifest import, with a confirmation gate), creating empty
|
|
6398
|
+
* folders, expanding `.zip` archives for staging, and removing
|
|
5375
6399
|
* already-committed nodes.
|
|
5376
6400
|
*/
|
|
5377
|
-
export declare const useSkillFileActions: ({ files, setFiles, filesContentRef, frontmatterRef, loadedValues, setLoadedValues, isEditMode, isDirty, setSelectedPath, messages, }: UseSkillFileActionsParams) => UseSkillFileActionsResult;
|
|
6401
|
+
export declare const useSkillFileActions: ({ files, setFiles, filesContentRef, frontmatterRef, loadedValues, setLoadedValues, isEditMode, isDirty, setSelectedPath, messages, pickFromFileSystem, }: UseSkillFileActionsParams) => UseSkillFileActionsResult;
|
|
5378
6402
|
|
|
5379
6403
|
/** Parameters accepted by {@link useSkillFileActions}. */
|
|
5380
6404
|
export declare interface UseSkillFileActionsParams {
|
|
@@ -5398,6 +6422,12 @@ export declare interface UseSkillFileActionsParams {
|
|
|
5398
6422
|
setSelectedPath: Dispatch<SetStateAction<string>>;
|
|
5399
6423
|
/** Localized messages, resolved by the host. */
|
|
5400
6424
|
messages: SkillFileActionsMessages;
|
|
6425
|
+
/**
|
|
6426
|
+
* Opens the host's file-system picker; passed through unchanged as
|
|
6427
|
+
* `fileActions.pickFromFileSystem`. Omit to hide the editor's "Open DIAL
|
|
6428
|
+
* file system" entry.
|
|
6429
|
+
*/
|
|
6430
|
+
pickFromFileSystem?: () => Promise<SkillFileSourceEntry[] | undefined>;
|
|
5401
6431
|
}
|
|
5402
6432
|
|
|
5403
6433
|
/** Return value of {@link useSkillFileActions}. */
|
|
@@ -5444,10 +6474,11 @@ export declare interface UseSkillFilePreviewResult {
|
|
|
5444
6474
|
|
|
5445
6475
|
/**
|
|
5446
6476
|
* Headless hook that encapsulates skill detail fetching: manifest download and
|
|
5447
|
-
* parse, package file listing,
|
|
5448
|
-
* loads. `useCatalogItemDetails` delegates
|
|
5449
|
-
* only surface skill details consume this
|
|
5450
|
-
* deployment and prompt ports the full catalog
|
|
6477
|
+
* parse, package file listing, authoritative metadata fetching, overview
|
|
6478
|
+
* construction, and in-package file loads. `useCatalogItemDetails` delegates
|
|
6479
|
+
* its skill branch here; hosts that only surface skill details consume this
|
|
6480
|
+
* hook directly, without the deployment and prompt ports the full catalog
|
|
6481
|
+
* pipeline requires.
|
|
5451
6482
|
*/
|
|
5452
6483
|
export declare const useSkillItemDetails: ({ api, skills, skillOverviewLabels, }: UseSkillItemDetailsOptions) => UseSkillItemDetailsResult;
|
|
5453
6484
|
|
|
@@ -5728,4 +6759,7 @@ export declare enum WithLogin {
|
|
|
5728
6759
|
WithConfig = "with-config"
|
|
5729
6760
|
}
|
|
5730
6761
|
|
|
6762
|
+
/** Returns `sections` with every root label usable as a unique first path segment, falling back to the tab id. */
|
|
6763
|
+
export declare const withRoutableRootLabels: <TSection extends DialFileManagerSection>(sections: readonly TSection[]) => TSection[];
|
|
6764
|
+
|
|
5731
6765
|
export { }
|