@epam/ai-dial-chat-hooks 1.2.0-dev.3 → 1.2.0-dev.300
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 +7 -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-catalog.js +16 -24
- 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 +55 -48
- package/catalog/publish.js +6 -5
- package/catalog/useApplicationCredentials/useApplicationCredentials.js +39 -0
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +122 -101
- package/catalog/usePublishFolders/usePublishFolders.js +1 -1
- package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js +39 -39
- package/catalog/useSkillItemDetails.js +19 -17
- package/catalog.d.ts +159 -35
- 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 +27 -0
- package/conversation/useActiveConversationSync/useActiveConversationSync.js +7 -8
- package/conversation/useAttachmentUpload/useAttachmentUpload.js +12 -5
- package/conversation/useConversationExport/useConversationExport.js +9 -9
- package/conversation/useConversationHandlers/message-utils.js +8 -5
- package/conversation/useConversationHandlers/useConversationHandlers.js +187 -177
- package/conversation/useConversationImport/useConversationImport.js +123 -121
- package/conversation/useConversationPanelItems/useConversationPanelItems.js +50 -32
- package/conversation/useConversationScroll/useConversationScroll.js +68 -64
- package/conversation/useConversationStream/apply-chunk.js +1 -1
- package/conversation/useConversationStream/frame-scheduler.js +39 -0
- package/conversation/useConversationStream/generation-resume.js +122 -64
- package/conversation/useConversationStream/useConversationStream.js +279 -116
- 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 +328 -25
- package/conversation.js +32 -30
- package/file-manager-canvas.d.ts +418 -0
- package/file-manager-canvas.js +2 -0
- package/file-manager.d.ts +155 -359
- package/file-manager.js +25 -24
- package/files/attachment-canvas.js +116 -55
- package/files/attachment-types.js +14 -13
- package/files/dial-file-manager-copy-move.util.js +9 -8
- package/files/dial-file-manager-mapping.util.js +2 -1
- package/files/dial-file-manager-path.util.js +24 -2
- package/files/dial-file-manager.model.js +23 -19
- package/files/dial-file-manager.types.js +3 -3
- package/files/file-manager-variant.js +1 -1
- package/files/resolve-dial-file-api-path.js +11 -12
- package/files/useDialFileListing/useDialFileListing.js +140 -127
- package/files/useDialFileManager/useDialFileManager.js +139 -135
- package/files/useDialFileManagerSections/useDialFileManagerSections.js +155 -0
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +20 -19
- package/files/useDialFileMutations/useDialFileMutations.js +65 -60
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +117 -110
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +48 -0
- package/index.d.ts +1281 -136
- 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 +37 -22
- package/scheduled-task/scheduled-task-description.js +81 -0
- package/scheduled-task/scheduled-task-preparation.js +24 -0
- package/scheduled-task/scheduled-task-trigger.js +74 -71
- 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 +197 -3
- package/scheduled-tasks.js +7 -2
- package/shared/application-schema.js +5 -2
- package/shared/cron-day-of-month.js +13 -0
- package/skill/skill-archive.js +19 -0
- package/skill/skill-types.js +8 -7
- package/skill/skill.js +53 -27
- package/skill/useSkillArchiveImport/useSkillArchiveImport.js +79 -0
- package/skill/useSkillEditorLoad.js +65 -59
- package/skill/useSkillEditorSubmit.js +108 -84
- package/skill/useSkillFileActions.js +70 -58
- package/skill-editor.d.ts +160 -8
- 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 +26 -6
- package/utils.js +10 -10
package/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
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 { ApplicationSchemaSummaryDto } from '@epam/ai-dial-chat-api-client';
|
|
5
|
+
import { ApplicationVisualizer } from '@epam/ai-dial-chat-shared';
|
|
3
6
|
import { ArchiveItemDto } from '@epam/ai-dial-chat-api-client';
|
|
4
7
|
import { Attachment } from '@epam/ai-dial-chat-shared';
|
|
5
8
|
import { AttachmentDisplayResolvers } from '@epam/ai-dial-chat-shared';
|
|
@@ -8,6 +11,7 @@ import { AttachmentErrorReason } from '@epam/ai-dial-chat-shared';
|
|
|
8
11
|
import { AttachmentResource } from '@epam/ai-dial-chat-shared';
|
|
9
12
|
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
10
13
|
import { CatalogContentTreeNode } from '@epam/ai-dial-catalog';
|
|
14
|
+
import { CatalogCreateSearch } from '@epam/ai-dial-catalog';
|
|
11
15
|
import { CatalogEntityType } from '@epam/ai-dial-chat-shared';
|
|
12
16
|
import { CatalogItem } from '@epam/ai-dial-catalog';
|
|
13
17
|
import { CatalogItemApiDetails } from '@epam/ai-dial-catalog';
|
|
@@ -25,6 +29,7 @@ import { ConversationTransferJob } from '@epam/ai-dial-chat-shared';
|
|
|
25
29
|
import { ConversationTransferWarningCode } from '@epam/ai-dial-chat-shared';
|
|
26
30
|
import { CopyFilesResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
27
31
|
import { CopyItemDto } from '@epam/ai-dial-chat-api-client';
|
|
32
|
+
import { CreatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
|
|
28
33
|
import { CreateFolderDto } from '@epam/ai-dial-chat-api-client';
|
|
29
34
|
import { CreateFolderResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
30
35
|
import { CreateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
|
|
@@ -34,8 +39,6 @@ import type { CustomVisualizerDataLayout } from '@epam/ai-dial-chat-shared';
|
|
|
34
39
|
import { DeleteFilesResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
35
40
|
import { DeleteItemDto } from '@epam/ai-dial-chat-api-client';
|
|
36
41
|
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
42
|
import { DeploymentDetailsDto } from '@epam/ai-dial-chat-api-client';
|
|
40
43
|
import { DeploymentFeatures } from '@epam/ai-dial-chat-shared';
|
|
41
44
|
import { DeploymentItemDto } from '@epam/ai-dial-chat-api-client';
|
|
@@ -59,22 +62,33 @@ import { Dispatch } from 'react';
|
|
|
59
62
|
import { DisplayAttachment } from '@epam/ai-dial-chat-shared';
|
|
60
63
|
import { DropdownItem } from '@epam/ai-dial-ui-kit';
|
|
61
64
|
import { ExportFolder } from '@epam/ai-dial-chat-shared';
|
|
65
|
+
import { ExternalServicesApi } from '@epam/ai-dial-chat-api-client';
|
|
62
66
|
import { FileManagerColumnKey } from '@epam/ai-dial-react-file-manager';
|
|
67
|
+
import { FileManagerSelectableNode } from '@epam/ai-dial-chat-shared';
|
|
63
68
|
import { FileMetadataResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
64
69
|
import { FilesApi } from '@epam/ai-dial-chat-api-client';
|
|
70
|
+
import { FileTreeOptions } from '@epam/ai-dial-react-file-manager';
|
|
65
71
|
import { FileUploadBatchState } from '@epam/ai-dial-chat-shared';
|
|
66
72
|
import { FileUploadEntry } from '@epam/ai-dial-chat-shared';
|
|
67
73
|
import { FileUploadResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
68
74
|
import { FileUploadStatus } from '@epam/ai-dial-chat-shared';
|
|
69
75
|
import { FileUploadValidationResult } from '@epam/ai-dial-chat-shared';
|
|
76
|
+
import { FilterChipItem } from '@epam/ai-dial-ui-kit';
|
|
70
77
|
import { FilterTab } from '@epam/ai-dial-chat-shared';
|
|
71
|
-
import {
|
|
78
|
+
import type { GroupedAttachmentItem } from '@epam/ai-dial-chat-shared';
|
|
79
|
+
import { Implementation } from '@modelcontextprotocol/sdk/types.js';
|
|
72
80
|
import type { InputHighlightData } from '@epam/pdf-highlighter-kit';
|
|
81
|
+
import { LimitStatsDto } from '@epam/ai-dial-chat-api-client';
|
|
73
82
|
import { ListFilesItemDto } from '@epam/ai-dial-chat-api-client';
|
|
74
83
|
import { ListFilesResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
75
84
|
import { ListPublicFilesRequest } from '@epam/ai-dial-chat-api-client';
|
|
85
|
+
import { ListScheduledTaskRunsResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
86
|
+
import { ListScheduledTasksResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
87
|
+
import { ListScheduledTasksSortEnum } from '@epam/ai-dial-chat-api-client';
|
|
76
88
|
import { ListSharedFilesRequest } from '@epam/ai-dial-chat-api-client';
|
|
89
|
+
import { LocaleOption } from '@epam/ai-dial-chat-shared';
|
|
77
90
|
import { LocaleTextEntryDto } from '@epam/ai-dial-chat-api-client';
|
|
91
|
+
import { LocalizedTextEntry } from '@epam/ai-dial-chat-shared';
|
|
78
92
|
import { McpAppToolSummaryDto } from '@epam/ai-dial-chat-api-client';
|
|
79
93
|
import { McpUiHostContext } from '@mcp-ui/client';
|
|
80
94
|
import { Message } from '@epam/ai-dial-chat-shared';
|
|
@@ -82,10 +96,13 @@ import { MessageAttachment } from '@epam/ai-dial-chat-shared';
|
|
|
82
96
|
import { MessageCustomContent } from '@epam/ai-dial-chat-shared';
|
|
83
97
|
import { MessageRating } from '@epam/ai-dial-chat-shared';
|
|
84
98
|
import { Middleware } from '@epam/ai-dial-chat-api-client';
|
|
99
|
+
import { ModelLimitPeriodStatuses } from '@epam/ai-dial-usage-dashboard';
|
|
100
|
+
import { ModelLimitRow } from '@epam/ai-dial-usage-dashboard';
|
|
85
101
|
import { MoveFilesResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
86
102
|
import { MoveItemDto } from '@epam/ai-dial-chat-api-client';
|
|
87
103
|
import { MutableRefObject } from 'react';
|
|
88
104
|
import { NotificationVariant } from '@epam/ai-dial-ui-kit';
|
|
105
|
+
import { OfflineCredentialsApi } from '@epam/ai-dial-chat-api-client';
|
|
89
106
|
import { OverlayChatMessage } from '@epam/ai-dial-chat-overlay';
|
|
90
107
|
import { PromptFolderResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
91
108
|
import { PromptListResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
@@ -111,6 +128,10 @@ import { RevokeAccessItemDto } from '@epam/ai-dial-chat-api-client';
|
|
|
111
128
|
import { RevokeAccessResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
112
129
|
import { ScheduledTaskCreateFormValues } from '@epam/ai-dial-scheduled-tasks';
|
|
113
130
|
import { ScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
|
|
131
|
+
import { ScheduledTaskRunDto } from '@epam/ai-dial-chat-api-client';
|
|
132
|
+
import { ScheduledTaskValidationErrors } from '../../libs/scheduled-tasks/validation';
|
|
133
|
+
import { ScheduledTaskValidationOptions } from '../../libs/scheduled-tasks/validation';
|
|
134
|
+
import { ScheduleTriggerDto } from '@epam/ai-dial-chat-api-client';
|
|
114
135
|
import { SendCompletionDtoModeEnum } from '@epam/ai-dial-chat-api-client';
|
|
115
136
|
import { SetStateAction } from 'react';
|
|
116
137
|
import { ShareApi } from '@epam/ai-dial-chat-api-client';
|
|
@@ -122,16 +143,16 @@ import { SkillEditorFileActions } from '@epam/ai-dial-skill-editor';
|
|
|
122
143
|
import { SkillEditorValues } from '@epam/ai-dial-skill-editor';
|
|
123
144
|
import { SkillFileBatchError } from '@epam/ai-dial-skill-editor';
|
|
124
145
|
import { SkillFileListResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
146
|
+
import { SkillFileSourceEntry } from '@epam/ai-dial-skill-editor';
|
|
125
147
|
import { SkillFileTreeNode } from '@epam/ai-dial-skill-editor';
|
|
126
148
|
import { SkillFileUploadCandidate } from '@epam/ai-dial-skill-editor';
|
|
127
149
|
import { SkillFileValidationResult } from '@epam/ai-dial-skill-editor';
|
|
128
150
|
import { SkillMetadataItemDto } from '@epam/ai-dial-chat-api-client';
|
|
129
151
|
import { SkillUploadResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
152
|
+
import { Stage } from '@epam/ai-dial-chat-shared';
|
|
130
153
|
import { StarterOption } from '@epam/ai-dial-chat-shared';
|
|
131
154
|
import { StatusMessage } from '@epam/ai-dial-chat-shared';
|
|
132
155
|
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
156
|
import { ToolMenuItem } from '@epam/ai-dial-chat-shared';
|
|
136
157
|
import { ToolsetLoginBodyDto } from '@epam/ai-dial-chat-api-client';
|
|
137
158
|
import { ToolsetLogoutBodyDto } from '@epam/ai-dial-chat-api-client';
|
|
@@ -139,9 +160,12 @@ import { ToolsetsApi } from '@epam/ai-dial-chat-api-client';
|
|
|
139
160
|
import { TranscriptionApi } from '@epam/ai-dial-chat-api-client';
|
|
140
161
|
import { UnpublishCatalogEntityDto } from '@epam/ai-dial-chat-api-client';
|
|
141
162
|
import { UnpublishResultDto } from '@epam/ai-dial-chat-api-client';
|
|
163
|
+
import { UpdatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
|
|
142
164
|
import { UpdateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
|
|
143
165
|
import { UploadArchiveResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
144
166
|
import { UploadedAttachmentResult } from '@epam/ai-dial-chat-shared';
|
|
167
|
+
import { UsageLimitCardData } from '@epam/ai-dial-usage-dashboard';
|
|
168
|
+
import { UsageLimitProgressRow } from '@epam/ai-dial-catalog';
|
|
145
169
|
import { useGridEditingScroll } from '@epam/ai-dial-chat-shared';
|
|
146
170
|
import { UseGridEditingScrollOptions } from '@epam/ai-dial-chat-shared';
|
|
147
171
|
import { UseGridEditingScrollResult } from '@epam/ai-dial-chat-shared';
|
|
@@ -161,6 +185,7 @@ export declare interface AgentCapabilities {
|
|
|
161
185
|
hasConfiguration?: boolean;
|
|
162
186
|
hasChatCompletion?: boolean;
|
|
163
187
|
hasResponsesApi?: boolean;
|
|
188
|
+
hasSkills?: boolean;
|
|
164
189
|
}
|
|
165
190
|
|
|
166
191
|
/** Input-attachment configuration for an agent (application) deployment. */
|
|
@@ -203,6 +228,9 @@ export declare const annotationToOoxmlCanvasContent: (annotation: Annotation, an
|
|
|
203
228
|
/**
|
|
204
229
|
* Builds a `PdfCanvasContent` for a PDF citation annotation, including highlights
|
|
205
230
|
* for the clicked annotation's document within its citation group.
|
|
231
|
+
* When the clicked annotation has a page but no selector with valid geometry,
|
|
232
|
+
* an invisible page-anchor highlight is added and selected so the viewer
|
|
233
|
+
* still opens that page.
|
|
206
234
|
* Returns `null` if the annotation has no PDF source attachment.
|
|
207
235
|
*/
|
|
208
236
|
export declare const annotationToPdfCanvasContent: (annotation: Annotation, groups: AnnotationGroup[], resolvers: AttachmentCanvasUrlResolvers) => PdfCanvasContent | null;
|
|
@@ -212,21 +240,72 @@ export declare interface AnnouncementContent {
|
|
|
212
240
|
title: string | null;
|
|
213
241
|
description: string | null;
|
|
214
242
|
html: string | null;
|
|
243
|
+
/** Entries of the popover the banner opens. */
|
|
244
|
+
items?: readonly AnnouncementListItem[];
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/** One entry of the announcements popover behind the banner's `+N` pill. */
|
|
248
|
+
export declare interface AnnouncementListItem {
|
|
249
|
+
/** Plain-text heading of the entry. */
|
|
250
|
+
title: string;
|
|
251
|
+
/** Supporting copy of the entry, sanitized before it is rendered. */
|
|
252
|
+
description?: string | null;
|
|
253
|
+
/** Optional call to action shown at the end of the entry. */
|
|
254
|
+
link?: AnnouncementListItemLink | null;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/** A link rendered as the call to action of an announcements-popover entry. */
|
|
258
|
+
export declare interface AnnouncementListItemLink {
|
|
259
|
+
/** Visible text of the call to action. */
|
|
260
|
+
label: string;
|
|
261
|
+
/** Absolute `http`/`https` target the call to action opens. */
|
|
262
|
+
href: string;
|
|
215
263
|
}
|
|
216
264
|
|
|
217
265
|
/** Normalized shape returned by {@link getApiErrorDetails}. */
|
|
218
266
|
export declare interface ApiErrorDetails {
|
|
267
|
+
/** Stable domain error code supplied by the API, when present. */
|
|
268
|
+
code?: string;
|
|
219
269
|
/** HTTP status code carried by the error, when available. */
|
|
220
270
|
status?: number;
|
|
221
271
|
/** Resolved human-readable error message, or `null` when none could be resolved. */
|
|
222
272
|
message: string | null;
|
|
223
273
|
/** Extracted W3C trace ID, when the error's response carries a valid `traceparent`. */
|
|
224
274
|
traceId?: string;
|
|
275
|
+
/**
|
|
276
|
+
* Error code reported by the service behind the API, when the API forwards one
|
|
277
|
+
* (`upstreamCode`). Passed through as-is; the host decides whether to act on it.
|
|
278
|
+
*/
|
|
279
|
+
upstreamCode?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Error reason reported by the service behind the API, when the API forwards one
|
|
282
|
+
* (`upstreamMessage`). Untranslated; the host decides whether to display it.
|
|
283
|
+
*/
|
|
284
|
+
upstreamMessage?: string;
|
|
225
285
|
}
|
|
226
286
|
|
|
227
287
|
/** Appends a locale's uppercased code to a field label, e.g. `'Name [EN]'`. */
|
|
228
288
|
export declare const appendLocaleCode: (label: string, locale: string) => string;
|
|
229
289
|
|
|
290
|
+
/**
|
|
291
|
+
* Applies a single SSE stream chunk to the message list.
|
|
292
|
+
*
|
|
293
|
+
*
|
|
294
|
+
* Attachments are accumulated: each chunk's attachments are appended to the
|
|
295
|
+
* existing array rather than replacing it.
|
|
296
|
+
*
|
|
297
|
+
* Annotations are merged by `index`: partial `body.title` and `body.quote`
|
|
298
|
+
* strings are concatenated across chunks, matching the same delta-merge
|
|
299
|
+
* semantics used for stages.
|
|
300
|
+
*
|
|
301
|
+
* `state` is overwritten (not merged) by each chunk that carries one,
|
|
302
|
+
* matching the DIAL stateful-app contract.
|
|
303
|
+
*
|
|
304
|
+
* @returns Updated message array, or `null` when the chunk carries no
|
|
305
|
+
* actionable data (empty content, no form_schema, and no attachments).
|
|
306
|
+
*/
|
|
307
|
+
export declare const applyChunkToMessages: (messages: Message[], messageIndex: number, chunk: StreamChunk) => Message[] | null;
|
|
308
|
+
|
|
230
309
|
/** Converts an APScheduler weekday (Monday=0..Sunday=6) to a JS `Date` weekday (Sunday=0..Saturday=6). */
|
|
231
310
|
export declare const apSchedulerDayToJsDay: (apSchedulerDay: number) => number;
|
|
232
311
|
|
|
@@ -279,6 +358,8 @@ export declare interface AttachmentCanvasUrlResolvers {
|
|
|
279
358
|
resolveDialUrl: (attachment: DisplayAttachment) => string | undefined;
|
|
280
359
|
/** Resolves a DIAL Core file id to a fetchable metadata URL (used for cache-freshness validation). */
|
|
281
360
|
resolveDialFileMetadataUrl: (fileId: string) => string | undefined;
|
|
361
|
+
/** URL of a host-served bootstrap document that renders HTML with no download URL (inline `data`) under its own response CSP instead of the embedding page's — forwarded as `HtmlCanvasContent.srcdocHostUrl`. When omitted, that HTML renders via plain `srcdoc`. */
|
|
362
|
+
htmlSrcdocHostUrl?: string;
|
|
282
363
|
}
|
|
283
364
|
|
|
284
365
|
/** The type of content the canvas can display. */
|
|
@@ -294,6 +375,7 @@ declare enum AttachmentContentType {
|
|
|
294
375
|
Code = 'code',
|
|
295
376
|
Html = 'html',
|
|
296
377
|
Visualizer = 'visualizer',
|
|
378
|
+
GroupedVisualizer = 'grouped_visualizer',
|
|
297
379
|
McpApp = 'mcp_app',
|
|
298
380
|
Unsupported = 'unsupported',
|
|
299
381
|
Error = 'error',
|
|
@@ -325,10 +407,12 @@ export declare const attachmentToDto: (attachment: Attachment) => AttachmentDto;
|
|
|
325
407
|
export declare interface AttachmentValidationErrorEvent {
|
|
326
408
|
/** Why the attachment(s) were rejected. */
|
|
327
409
|
reason: AttachmentValidationErrorReason;
|
|
328
|
-
/** The resolved MIME types the caller currently allows (possibly empty). */
|
|
329
|
-
allowedMimeTypes
|
|
410
|
+
/** The resolved MIME types the caller currently allows (possibly empty). Present only when `reason` is `NoTypesAllowed` or `UnsupportedType`. */
|
|
411
|
+
allowedMimeTypes?: string[];
|
|
330
412
|
/** Already-formatted, non-translated extension list (e.g. ".png, .jpg"), present only when `reason` is `UnsupportedType`. */
|
|
331
413
|
formats?: string;
|
|
414
|
+
/** The size limit, in bytes, that was exceeded. Present only when `reason` is `FileTooLarge`. */
|
|
415
|
+
maxFileSizeBytes?: number;
|
|
332
416
|
}
|
|
333
417
|
|
|
334
418
|
/** Reason a rejected attachment failed validation. */
|
|
@@ -336,7 +420,9 @@ export declare enum AttachmentValidationErrorReason {
|
|
|
336
420
|
/** No MIME types are allowed at all — attachments are disabled entirely. */
|
|
337
421
|
NoTypesAllowed = "noTypesAllowed",
|
|
338
422
|
/** The attachment's content type is not among the allowed MIME types. */
|
|
339
|
-
UnsupportedType = "unsupportedType"
|
|
423
|
+
UnsupportedType = "unsupportedType",
|
|
424
|
+
/** The attachment's file size exceeds `maxFileSizeBytes`. */
|
|
425
|
+
FileTooLarge = "fileTooLarge"
|
|
340
426
|
}
|
|
341
427
|
|
|
342
428
|
/** Thrown by `transcribeAudio`; carries a machine-readable `reason` instead of translated text. */
|
|
@@ -353,7 +439,7 @@ export declare enum AudioTranscriptionErrorReason {
|
|
|
353
439
|
Unavailable = "unavailable",
|
|
354
440
|
/** The recording exceeds the caller's configured size limit. */
|
|
355
441
|
TooLarge = "tooLarge",
|
|
356
|
-
/**
|
|
442
|
+
/** Recognition is rate-limited, unavailable, or exhausted short gateway retries. */
|
|
357
443
|
Busy = "busy",
|
|
358
444
|
/** Recognition failed for any other reason. */
|
|
359
445
|
Failed = "failed"
|
|
@@ -371,7 +457,7 @@ export declare enum AuthenticationType {
|
|
|
371
457
|
* `additionalLocaleCodes` and excluding whichever code is already the
|
|
372
458
|
* primary Name/Description field.
|
|
373
459
|
*/
|
|
374
|
-
export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: string[], primaryLocale: string) =>
|
|
460
|
+
export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: string[], primaryLocale: string) => LocaleOption[];
|
|
375
461
|
|
|
376
462
|
/**
|
|
377
463
|
* Builds the value persisted under `StorageKey.TextOfClosedAnnouncement` when
|
|
@@ -379,9 +465,18 @@ export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: strin
|
|
|
379
465
|
* hidden only while the current announcement produces the same signature, so
|
|
380
466
|
* editing any part of it brings the banner back with no version counter.
|
|
381
467
|
*
|
|
468
|
+
* Every piece of content the banner surface renders feeds the signature — the
|
|
469
|
+
* title, the description, and the popover entries behind the pill, which live
|
|
470
|
+
* inside the banner and are hidden along with it. Publishing a new entry in
|
|
471
|
+
* that list therefore invalidates an earlier dismissal on its own, even when
|
|
472
|
+
* the banner line itself is untouched.
|
|
473
|
+
*
|
|
382
474
|
* A legacy-only announcement returns the raw HTML string — byte-identical to
|
|
383
475
|
* what shipped before the structured fields existed — so dismissals recorded
|
|
384
|
-
* by older builds keep working without a storage migration.
|
|
476
|
+
* by older builds keep working without a storage migration. `items` is left
|
|
477
|
+
* out of the payload entirely when the list is empty for the same reason: a
|
|
478
|
+
* deployment that never configured the popover keeps matching the signatures
|
|
479
|
+
* its users already have stored.
|
|
385
480
|
*/
|
|
386
481
|
export declare const buildAnnouncementSignature: (content: AnnouncementContent) => string;
|
|
387
482
|
|
|
@@ -424,6 +519,8 @@ export declare const buildPromptOverview: (prompt: PromptResponseDto, labels: Pr
|
|
|
424
519
|
/** Joins a folder path and a prompt name into the DIAL prompt path used as an id. */
|
|
425
520
|
export declare const buildPromptPath: (folderId: string, name: string) => string;
|
|
426
521
|
|
|
522
|
+
export declare const buildResetFields: (stats: LimitStatsDto, formatResetTime: FormatResetTime | undefined) => Pick<UsageLimitProgressRow, "resetLabel" | "resetIsoValue" | "resetAriaLabel">;
|
|
523
|
+
|
|
427
524
|
/** Builds the Responses API endpoint URL for a deployment. */
|
|
428
525
|
export declare const buildResponsesUrl: (baseUrl: string) => string;
|
|
429
526
|
|
|
@@ -449,7 +546,9 @@ export declare const buildSharedItemVirtualPath: (relativePath: string, rootLabe
|
|
|
449
546
|
* itself) contributes no node. Every folder entry is attached under its own
|
|
450
547
|
* stripped path so an empty grouping folder still appears; every file entry
|
|
451
548
|
* attaches under the folder chain its stripped path implies, synthesizing
|
|
452
|
-
* any intermediate folder the listing never enumerated on its own.
|
|
549
|
+
* any intermediate folder the listing never enumerated on its own. An
|
|
550
|
+
* empty-folder marker (`.dial_folder`) only proves its folder exists and
|
|
551
|
+
* never becomes a file node. A file
|
|
453
552
|
* node's `id` is the listing entry's own (unstripped) path, so it round-trips
|
|
454
553
|
* back to `downloadSkillFile` without being re-derived; a folder node's `id`
|
|
455
554
|
* is the stripped path and only keys client-side expand/collapse state.
|
|
@@ -459,7 +558,10 @@ export declare const buildSkillContentTree: (files: SkillMetadataItemDto[], skil
|
|
|
459
558
|
/**
|
|
460
559
|
* Builds the ordered supporting-file paths and `Blob` payload
|
|
461
560
|
* `createSkill`/`updateSkill` expect from the editor's file tree and
|
|
462
|
-
* in-memory content map.
|
|
561
|
+
* in-memory content map. Every folder node with no descendant node gets a
|
|
562
|
+
* zero-byte `<folder>/.dial_folder` marker after the real files, so the
|
|
563
|
+
* empty folder survives the whole-skill write; a folder with content needs
|
|
564
|
+
* none, and a marker it had before is dropped by that same write.
|
|
463
565
|
*/
|
|
464
566
|
export declare const buildSkillFilesPayload: (files: SkillFileTreeNode[], filesContent: Map<string, SkillFileContent>) => SkillFilesPayload;
|
|
465
567
|
|
|
@@ -493,6 +595,13 @@ export declare const buildSkillManifestFromFrontmatter: (baseFrontmatter: Record
|
|
|
493
595
|
* authored it, when it last changed, and its file inventory. Grouping folders
|
|
494
596
|
* in the file listing are excluded from both the count and the rows. Sizes are
|
|
495
597
|
* not shown — the skill metadata carries no content-length field.
|
|
598
|
+
*
|
|
599
|
+
* `skill` is the authoritative `getSkillMetadata` response when that request
|
|
600
|
+
* fulfilled; the caller falls back to the catalog listing entry only when it
|
|
601
|
+
* rejected (`useSkillItemDetails`'s `onFetchSkillDetails`). Either way, this
|
|
602
|
+
* function never fills a gap in one source from the other — an absent
|
|
603
|
+
* `author` omits the row and an absent `updatedAt` leaves the updated row's
|
|
604
|
+
* value empty, exactly as `skill` carries it.
|
|
496
605
|
*/
|
|
497
606
|
export declare const buildSkillOverview: (skill: SkillMetadataItemDto | undefined, files: SkillMetadataItemDto[], about: SkillAboutDetails | undefined, labels: SkillOverviewLabels) => CatalogItemOverview;
|
|
498
607
|
|
|
@@ -538,7 +647,6 @@ export declare interface CatalogDetailsApi extends SkillDetailsApi {
|
|
|
538
647
|
|
|
539
648
|
/** Localized copy `useCatalogEditNavigation` needs for the Create menu and delete errors. */
|
|
540
649
|
export declare interface CatalogEditNavigationLabels {
|
|
541
|
-
createQuickApp: string;
|
|
542
650
|
createToolset: string;
|
|
543
651
|
createCustomApp: string;
|
|
544
652
|
createSkill: string;
|
|
@@ -576,9 +684,9 @@ export declare interface CatalogEditNavigationUrls {
|
|
|
576
684
|
buildCustomAppEditUrl(appId: string): string;
|
|
577
685
|
/** URL to create a new custom (schema-less) app. */
|
|
578
686
|
buildCustomAppCreateUrl(): string;
|
|
579
|
-
/** URL to edit an existing quick app under the given schema. */
|
|
687
|
+
/** URL to edit an existing schema-based app (quick app or any other runner) under the given schema. */
|
|
580
688
|
buildQuickAppEditUrl(schemaId: string, appId: string): string;
|
|
581
|
-
/** URL to create a new quick app under the given schema. */
|
|
689
|
+
/** URL to create a new schema-based app (quick app or any other runner) under the given schema. */
|
|
582
690
|
buildQuickAppCreateUrl(schemaId: string): string;
|
|
583
691
|
}
|
|
584
692
|
|
|
@@ -677,6 +785,7 @@ export declare interface ChatStreamApi {
|
|
|
677
785
|
stopCompletion: (dto: {
|
|
678
786
|
generationId: string;
|
|
679
787
|
path: string;
|
|
788
|
+
content?: string;
|
|
680
789
|
}) => Promise<void>;
|
|
681
790
|
}
|
|
682
791
|
|
|
@@ -688,6 +797,13 @@ export declare interface ChatStreamCompletionOptions {
|
|
|
688
797
|
signal?: AbortSignal;
|
|
689
798
|
}
|
|
690
799
|
|
|
800
|
+
/**
|
|
801
|
+
* Classifies an import request's HTTP status into a semantic outcome: 400/413/422 are
|
|
802
|
+
* archive-content problems, 409 is a name collision, 429 is rate limiting, 502/503 mean the
|
|
803
|
+
* backend is unavailable, and anything else (including no status at all) is generic.
|
|
804
|
+
*/
|
|
805
|
+
export declare const classifySkillArchiveImportError: (status: number | undefined) => SkillArchiveImportErrorKind;
|
|
806
|
+
|
|
691
807
|
/** Clears all cached fetch results. Call this when leaving a conversation. */
|
|
692
808
|
export declare const clearAttachmentCache: () => void;
|
|
693
809
|
|
|
@@ -714,7 +830,7 @@ export declare const COLUMNS_WITHOUT_AUTHOR: FileManagerColumnKey[];
|
|
|
714
830
|
* `undefined` (not `[]`) when nothing remains, so a request untouched by
|
|
715
831
|
* this feature stays byte-identical to today.
|
|
716
832
|
*/
|
|
717
|
-
export declare const composeLocalePayload: (otherLocales:
|
|
833
|
+
export declare const composeLocalePayload: (otherLocales: LocalizedTextEntry[], primaryLocale: string) => LocaleTextEntryDto[] | undefined;
|
|
718
834
|
|
|
719
835
|
/** Whether an export includes the conversation's attachments. */
|
|
720
836
|
export declare enum ConversationExportMode {
|
|
@@ -730,6 +846,28 @@ export declare interface ConversationGenerationLifecycle {
|
|
|
730
846
|
completeGeneration: (path: string, generationId: string) => void;
|
|
731
847
|
}
|
|
732
848
|
|
|
849
|
+
/** Labels and formatter callbacks for the conversation-input limits mapping utility. */
|
|
850
|
+
export declare interface ConversationInputLimitsLabels {
|
|
851
|
+
/** Heading of the group listing the selected deployment's token limits. */
|
|
852
|
+
tokenGroup: string;
|
|
853
|
+
/** Heading of the group listing the caller's cost budget and spend against it. */
|
|
854
|
+
costGroup: string;
|
|
855
|
+
/** Label for the current-UTC-day row, used by both groups. */
|
|
856
|
+
periodDay: string;
|
|
857
|
+
/** Label for the current-UTC-week row, used by both groups. */
|
|
858
|
+
periodWeek: string;
|
|
859
|
+
/** Label for the current-UTC-month row, used by both groups. */
|
|
860
|
+
periodMonth: string;
|
|
861
|
+
/** Formats the combined used/total display value for a capped row. */
|
|
862
|
+
formatValueLabel: (used: string, total: string) => string;
|
|
863
|
+
/** Formats the ARIA label for a capped progress row. */
|
|
864
|
+
formatProgressAriaLabel: (params: {
|
|
865
|
+
label: string;
|
|
866
|
+
used: string;
|
|
867
|
+
total: string;
|
|
868
|
+
}) => string;
|
|
869
|
+
}
|
|
870
|
+
|
|
733
871
|
/** Stable reverse-lookup maps returned by `useConversationLookupMaps`. */
|
|
734
872
|
export declare interface ConversationLookupMaps {
|
|
735
873
|
/** Returns the raw context id for a panel-space conversation id, or `undefined` when not found. */
|
|
@@ -793,7 +931,7 @@ export declare interface ConversationStreamOverlayNotifier {
|
|
|
793
931
|
}
|
|
794
932
|
|
|
795
933
|
/** The exact `startStream` shape `useConversationStream` returns. */
|
|
796
|
-
export declare type ConversationStreamStarter = (conversationPath: string, userContent: string, messageIndex: number, model: string, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum) => void;
|
|
934
|
+
export declare type ConversationStreamStarter = (conversationPath: string, userContent: string, messageIndex: number, model: string, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum, options?: StartStreamOptions) => void;
|
|
797
935
|
|
|
798
936
|
/**
|
|
799
937
|
* Host-owned transport for the DIAL Core completion protocol. Implemented at
|
|
@@ -803,10 +941,14 @@ export declare type ConversationStreamStarter = (conversationPath: string, userC
|
|
|
803
941
|
export declare interface ConversationStreamTransport {
|
|
804
942
|
/** Starts a completion; delivers chunks/completion/error through `options`, aborted via `options.signal`. */
|
|
805
943
|
streamCompletion(path: string, message: string | undefined, model: string, options: StreamCompletionOptions, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum, messageIndex?: number, clientChannelId?: string): void;
|
|
806
|
-
/**
|
|
944
|
+
/**
|
|
945
|
+
* Requests the backend stop an active generation. `content` is the answer text shown
|
|
946
|
+
* so far; the backend saves it for a generation whose text it does not hold.
|
|
947
|
+
*/
|
|
807
948
|
stopCompletion(params: {
|
|
808
949
|
generationId: string;
|
|
809
950
|
path: string;
|
|
951
|
+
content?: string;
|
|
810
952
|
}): Promise<void>;
|
|
811
953
|
/** Opens a stream of resource-update events for `path`, until aborted via `signal`. */
|
|
812
954
|
watchConversation(path: string, signal: AbortSignal): Promise<ReadableStream<Uint8Array>>;
|
|
@@ -880,6 +1022,12 @@ export declare interface CreateChatStreamApiDeps {
|
|
|
880
1022
|
getTimezone?: () => string | undefined;
|
|
881
1023
|
/** `fetch` implementation to issue requests through. Defaults to the global `fetch`. */
|
|
882
1024
|
fetchImpl?: typeof fetch;
|
|
1025
|
+
/**
|
|
1026
|
+
* How long an open completion stream may go without receiving a byte
|
|
1027
|
+
* (keepalive comments included) before it is reported as a
|
|
1028
|
+
* {@link StreamInterruptedError}. Defaults to {@link DEFAULT_STREAM_IDLE_TIMEOUT_MS}.
|
|
1029
|
+
*/
|
|
1030
|
+
idleTimeoutMs?: number;
|
|
883
1031
|
}
|
|
884
1032
|
|
|
885
1033
|
/**
|
|
@@ -929,6 +1077,12 @@ export declare const createMessagePair: (content: string, customContent?: Messag
|
|
|
929
1077
|
*/
|
|
930
1078
|
export declare const createPublishApiClient: (publishApi: PublishApi) => PublishApiClient;
|
|
931
1079
|
|
|
1080
|
+
/**
|
|
1081
|
+
* Composes scheduler operations over an already configured generated client.
|
|
1082
|
+
* Authentication, base URL, CSRF, and retries remain host responsibilities.
|
|
1083
|
+
*/
|
|
1084
|
+
export declare const createScheduledTasksApiClient: (client: ScheduledTasksConfiguredClient) => ScheduledTasksApiClient;
|
|
1085
|
+
|
|
932
1086
|
/**
|
|
933
1087
|
* Builds a generated-client `Middleware` that throws on 401, and on a
|
|
934
1088
|
* classified invalid-CSRF 403 refreshes the token and retries the original
|
|
@@ -991,6 +1145,15 @@ export declare type CsrfRefreshOutcome = {
|
|
|
991
1145
|
|
|
992
1146
|
export declare const DATE_OPTIONS: Intl.DateTimeFormatOptions;
|
|
993
1147
|
|
|
1148
|
+
/**
|
|
1149
|
+
* Inverse of `encodeDeploymentId` — decodes each `/`-separated segment back
|
|
1150
|
+
* to its raw, human-readable form. A segment that isn't valid
|
|
1151
|
+
* percent-encoding is passed through unchanged rather than throwing, since
|
|
1152
|
+
* this decodes externally-sourced ids (the settings iframe's postMessage
|
|
1153
|
+
* protocol).
|
|
1154
|
+
*/
|
|
1155
|
+
export declare const decodeDeploymentId: (id: string) => string;
|
|
1156
|
+
|
|
994
1157
|
/**
|
|
995
1158
|
* Inverse of `encodeToolsetId` — decodes each `/`-separated segment back to
|
|
996
1159
|
* its raw, human-readable form. A segment that isn't valid percent-encoding
|
|
@@ -1007,11 +1170,14 @@ export declare const decodeToolsetId: (id: string) => string;
|
|
|
1007
1170
|
* present in either map, excluding `primaryLocale` — that key is already the
|
|
1008
1171
|
* primary Name/Description field, not a row in the popup.
|
|
1009
1172
|
*/
|
|
1010
|
-
export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) =>
|
|
1173
|
+
export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) => LocalizedTextEntry[];
|
|
1011
1174
|
|
|
1012
1175
|
/** Fallback text of a {@link GenerationConflictError} when no message is supplied. */
|
|
1013
1176
|
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
1177
|
|
|
1178
|
+
/** Safe fallback for hosts that do not supply a translated persistence warning. */
|
|
1179
|
+
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.";
|
|
1180
|
+
|
|
1015
1181
|
/**
|
|
1016
1182
|
* Default ceiling on the summed byte length of an export's attachments.
|
|
1017
1183
|
*
|
|
@@ -1025,6 +1191,8 @@ export declare const DEFAULT_GENERATION_CONFLICT_MESSAGE = "A response is alread
|
|
|
1025
1191
|
*/
|
|
1026
1192
|
export declare const DEFAULT_MAX_ARCHIVE_BYTES: number;
|
|
1027
1193
|
|
|
1194
|
+
export declare const DEFAULT_STREAM_IDLE_TIMEOUT_MS = 45000;
|
|
1195
|
+
|
|
1028
1196
|
/** Translated folder-path labels for the Personal/Shared/Public deployment groupings. */
|
|
1029
1197
|
export declare interface DeploymentFolderLabels {
|
|
1030
1198
|
personal: string;
|
|
@@ -1042,16 +1210,14 @@ export declare interface DeploymentGenerationApiSupport {
|
|
|
1042
1210
|
export declare interface DeploymentLimitsLabels {
|
|
1043
1211
|
/** Heading of the group every token stat row is listed under. */
|
|
1044
1212
|
tokenGroup: string;
|
|
1045
|
-
/** Label for the
|
|
1213
|
+
/** Label for the current-UTC-day token row, e.g. "Today". */
|
|
1046
1214
|
tokensPerDay: string;
|
|
1047
|
-
/** Label for the
|
|
1215
|
+
/** Label for the current-UTC-week token row, e.g. "This week". */
|
|
1048
1216
|
tokensPerWeek: string;
|
|
1049
|
-
/** Label for the
|
|
1217
|
+
/** Label for the current-UTC-month token row, e.g. "This month". */
|
|
1050
1218
|
tokensPerMonth: string;
|
|
1051
1219
|
/** Note shown instead of a total on a row whose limit follows the cost limit. */
|
|
1052
1220
|
followsCostLimit: string;
|
|
1053
|
-
/** Formats the "$X spent" caption under a row's label. */
|
|
1054
|
-
formatSpentCaption: (amount: string) => string;
|
|
1055
1221
|
/** Formats the combined used/total display value for a capped row. */
|
|
1056
1222
|
formatValueLabel: (used: string, total: string) => string;
|
|
1057
1223
|
/** Formats the ARIA label for a capped progress row. */
|
|
@@ -1065,6 +1231,8 @@ export declare interface DeploymentLimitsLabels {
|
|
|
1065
1231
|
label: string;
|
|
1066
1232
|
used: string;
|
|
1067
1233
|
}) => string;
|
|
1234
|
+
/** Formats each period's `resetsAt` into the row's reset line. Omit it to render rows without one. */
|
|
1235
|
+
formatResetTime?: FormatResetTime;
|
|
1068
1236
|
}
|
|
1069
1237
|
|
|
1070
1238
|
export declare const deriveActionProfile: (variant: DialFileManagerVariant) => DialFileManagerActionProfile;
|
|
@@ -1091,16 +1259,33 @@ export declare const deriveAvailableTabIds: <T extends CatalogEntityType>(items:
|
|
|
1091
1259
|
export declare const deriveConversationRowActionState: (item: Pick<ConversationListItemDto, "sharedWithMe" | "publishedWithMe" | "isReadonly">, publishHistory: PublishHistoryEntry[] | undefined, recipients: RecipientsCountEntry) => ConversationRowActionState;
|
|
1092
1260
|
|
|
1093
1261
|
/**
|
|
1094
|
-
* Returns items marked as a user favorite, in original order.
|
|
1262
|
+
* Returns items marked as a user favorite that are not hidden, in original order.
|
|
1095
1263
|
*/
|
|
1096
1264
|
export declare const deriveFavoriteItems: (items: readonly CatalogItem[]) => CatalogItem[];
|
|
1097
1265
|
|
|
1266
|
+
/**
|
|
1267
|
+
* Describes the complete trigger without requiring unrelated task metadata.
|
|
1268
|
+
* Unsupported constraints remain Custom, with the full source expression.
|
|
1269
|
+
* Calendar-month shifts crossing month boundaries or days 29–31 remain
|
|
1270
|
+
* Custom because a shifted monthly day is not equivalent around short months.
|
|
1271
|
+
* The one exception is `day: 'last'` one day behind local time, which is
|
|
1272
|
+
* exactly the local 1st.
|
|
1273
|
+
*/
|
|
1274
|
+
export declare const describeScheduledTaskTrigger: (trigger: ScheduleTriggerDto, { timeZone, referenceDate, }?: ScheduledTaskTriggerDescriptionOptions) => ScheduledTaskTriggerDescription;
|
|
1275
|
+
|
|
1276
|
+
/** Source tabs `useDialFileManagerSections` can merge into the All tab, in display order. */
|
|
1277
|
+
export declare const DIAL_FILE_MANAGER_SECTION_TABS: readonly DialFileManagerTabs[];
|
|
1278
|
+
|
|
1098
1279
|
/** Strip the "files/{bucket}/" prefix from a DIAL Core URL to get the path within the bucket. */
|
|
1099
1280
|
export declare const dialCorePathToRelative: (dialCorePath: string, bucket: string) => string;
|
|
1100
1281
|
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1282
|
+
/** One source tab rendered as a top-level folder of the All view. */
|
|
1283
|
+
export declare interface DialFileManagerSection {
|
|
1284
|
+
/** Source tab backing this section — `MyFiles`, `Shared` or `Organization`. */
|
|
1285
|
+
tab: DialFileManagerTabs;
|
|
1286
|
+
/** 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. */
|
|
1287
|
+
rootLabel: string;
|
|
1288
|
+
}
|
|
1104
1289
|
|
|
1105
1290
|
/**
|
|
1106
1291
|
* Operation port every file-manager hook that performs network I/O accepts as
|
|
@@ -1434,7 +1619,9 @@ export declare enum FileManagerNotificationReason {
|
|
|
1434
1619
|
/** `onUploadArchive` extracted some entries successfully and some failed; `count`/`names`/`restCount` describe the failures. */
|
|
1435
1620
|
UploadArchivePartiallyFailed = "uploadArchivePartiallyFailed",
|
|
1436
1621
|
/** `onUploadArchive`'s `uploadArchive` request itself rejected. */
|
|
1437
|
-
UploadArchiveRequestFailed = "uploadArchiveRequestFailed"
|
|
1622
|
+
UploadArchiveRequestFailed = "uploadArchiveRequestFailed",
|
|
1623
|
+
/** A copy/move targeted a destination in a different All-view section from its source items; no request was made. */
|
|
1624
|
+
CrossSectionTransferUnsupported = "crossSectionTransferUnsupported"
|
|
1438
1625
|
}
|
|
1439
1626
|
|
|
1440
1627
|
/**
|
|
@@ -1455,8 +1642,6 @@ export declare type FileNameValidationError = {
|
|
|
1455
1642
|
} | {
|
|
1456
1643
|
reason: FileNameValidationErrorReason.DuplicateName;
|
|
1457
1644
|
existingName: string;
|
|
1458
|
-
} | {
|
|
1459
|
-
reason: FileNameValidationErrorReason.LeadingDot;
|
|
1460
1645
|
};
|
|
1461
1646
|
|
|
1462
1647
|
/**
|
|
@@ -1469,8 +1654,7 @@ export declare enum FileNameValidationErrorReason {
|
|
|
1469
1654
|
ForbiddenSymbols = "forbiddenSymbols",
|
|
1470
1655
|
ReservedName = "reservedName",
|
|
1471
1656
|
TooLong = "tooLong",
|
|
1472
|
-
DuplicateName = "duplicateName"
|
|
1473
|
-
LeadingDot = "leadingDot"
|
|
1657
|
+
DuplicateName = "duplicateName"
|
|
1474
1658
|
}
|
|
1475
1659
|
|
|
1476
1660
|
/**
|
|
@@ -1487,7 +1671,10 @@ export declare enum FileOperationKind {
|
|
|
1487
1671
|
FileCopied = "fileCopied",
|
|
1488
1672
|
FilesCopied = "filesCopied",
|
|
1489
1673
|
FileMoved = "fileMoved",
|
|
1490
|
-
FilesMoved = "filesMoved"
|
|
1674
|
+
FilesMoved = "filesMoved",
|
|
1675
|
+
/** A copy whose every item landed in its own source folder (Duplicate). */
|
|
1676
|
+
FileDuplicated = "fileDuplicated",
|
|
1677
|
+
FilesDuplicated = "filesDuplicated"
|
|
1491
1678
|
}
|
|
1492
1679
|
|
|
1493
1680
|
/**
|
|
@@ -1502,13 +1689,15 @@ export declare interface FileOperationSuccessEvent {
|
|
|
1502
1689
|
name?: string;
|
|
1503
1690
|
/** Number of items the operation covered, when applicable. */
|
|
1504
1691
|
count?: number;
|
|
1505
|
-
/**
|
|
1692
|
+
/**
|
|
1693
|
+
* Destination folder as a slash-joined virtual path starting at the root
|
|
1694
|
+
* label (e.g. `My files/reports`), for copy/move/duplicate operations.
|
|
1695
|
+
*/
|
|
1506
1696
|
destinationFolderName?: string;
|
|
1507
1697
|
/**
|
|
1508
|
-
* Whether the affected item is a folder rather than a file.
|
|
1509
|
-
*
|
|
1510
|
-
*
|
|
1511
|
-
* "File renamed").
|
|
1698
|
+
* Whether the affected item is a folder rather than a file. Set for rename,
|
|
1699
|
+
* copy, move, and duplicate events; on a multi-item event it describes the
|
|
1700
|
+
* first successfully affected item (the one `name` refers to).
|
|
1512
1701
|
*/
|
|
1513
1702
|
isFolder?: boolean;
|
|
1514
1703
|
}
|
|
@@ -1543,8 +1732,6 @@ export declare interface FilesApiClient {
|
|
|
1543
1732
|
listSharedByMe: (bucket: string) => Promise<ListFilesResponseDto>;
|
|
1544
1733
|
}
|
|
1545
1734
|
|
|
1546
|
-
export { FileUploadValidationResult }
|
|
1547
|
-
|
|
1548
1735
|
/**
|
|
1549
1736
|
* Filters catalog items to those whose type is in `visibleTypes`.
|
|
1550
1737
|
* Call only when selector mode is active; otherwise pass through the original array.
|
|
@@ -1606,6 +1793,9 @@ export declare const formatOperationFolderName: (destinationFolder: string, root
|
|
|
1606
1793
|
*/
|
|
1607
1794
|
export declare const formatQuotedNameList: (names: string[]) => string;
|
|
1608
1795
|
|
|
1796
|
+
/** Formats a raw `resetsAt` into display strings, or returns `undefined` when it cannot be formatted. */
|
|
1797
|
+
export declare type FormatResetTime = (resetsAt: string | undefined) => ResetTimeDisplay | undefined;
|
|
1798
|
+
|
|
1609
1799
|
/**
|
|
1610
1800
|
* Reported through `onError` when the backend rejects a completion because
|
|
1611
1801
|
* another generation is already active on the same conversation — what a
|
|
@@ -1617,7 +1807,13 @@ export declare class GenerationConflictError extends Error {
|
|
|
1617
1807
|
constructor(message?: string);
|
|
1618
1808
|
}
|
|
1619
1809
|
|
|
1620
|
-
/**
|
|
1810
|
+
/** Identifies a failed terminal save independently of the model's generation outcome. */
|
|
1811
|
+
export declare class GenerationPersistenceError extends Error {
|
|
1812
|
+
static readonly type = "conversation_save_failed";
|
|
1813
|
+
constructor();
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
/** Normalizes any API error into a `{ status?, message, traceId?, code?, upstreamCode?, upstreamMessage? }` shape. */
|
|
1621
1817
|
export declare const getApiErrorDetails: (error: unknown) => Promise<ApiErrorDetails>;
|
|
1622
1818
|
|
|
1623
1819
|
/** Resolves a human-readable message from an API error's response body, or falls back to `Error.message`. */
|
|
@@ -1652,6 +1848,21 @@ export declare const getConversationSource: (item: Pick<ConversationListItemDto,
|
|
|
1652
1848
|
*/
|
|
1653
1849
|
export declare const getExternalServiceFallbackName: (serviceName: string) => string;
|
|
1654
1850
|
|
|
1851
|
+
/**
|
|
1852
|
+
* Returns the tool values the conversation's last message sets through its
|
|
1853
|
+
* `form_schema`, restricted to `toolIds`, plus a key identifying that exact
|
|
1854
|
+
* application. `undefined` when the last message is not an assistant message
|
|
1855
|
+
* or sets no known tool.
|
|
1856
|
+
*
|
|
1857
|
+
* Streamed chunks and reloads re-create an identical `form_schema`; comparing
|
|
1858
|
+
* keys rather than object identity applies an app's value once and leaves a
|
|
1859
|
+
* later user toggle alone until the app sends a different value.
|
|
1860
|
+
*/
|
|
1861
|
+
export declare const getFormSchemaToolSyncKey: (conversationId: string, messages: Message[], toolIds: readonly string[]) => {
|
|
1862
|
+
key: string;
|
|
1863
|
+
values: Record<string, boolean>;
|
|
1864
|
+
} | undefined;
|
|
1865
|
+
|
|
1655
1866
|
/**
|
|
1656
1867
|
* Returns the deployment the conversation was last running on: scanning
|
|
1657
1868
|
* backwards, the `new_deployment_id` of a `model_changed` status message or
|
|
@@ -1662,7 +1873,7 @@ export declare const getExternalServiceFallbackName: (serviceName: string) => st
|
|
|
1662
1873
|
* an edit truncates past one: the marker is appended at the end of the
|
|
1663
1874
|
* timeline, so truncating at an earlier message drops it, and the model the
|
|
1664
1875
|
* user picked reverted on the next page load even though the answer had been
|
|
1665
|
-
* regenerated on it (
|
|
1876
|
+
* regenerated on it ([#8712](https://github.com/epam/ai-dial-chat/issues/8712)). The assistant message the backend writes
|
|
1666
1877
|
* carries the deployment that produced it, which survives that truncation
|
|
1667
1878
|
* because it *is* the regenerated message.
|
|
1668
1879
|
*/
|
|
@@ -1675,6 +1886,15 @@ export declare const getLastDeploymentId: (messages: Message[]) => string | null
|
|
|
1675
1886
|
*/
|
|
1676
1887
|
export declare const getLastUserMessageToolConfiguration: (messages: Message[]) => Record<string, unknown> | undefined;
|
|
1677
1888
|
|
|
1889
|
+
/**
|
|
1890
|
+
* Returns the tool configuration a (re-)loaded conversation should show: the
|
|
1891
|
+
* last user message's `configuration_value`, overlaid in order by the
|
|
1892
|
+
* `form_schema` values of the assistant messages after it. An app that turned
|
|
1893
|
+
* a toggle off in its final response must not see it re-armed on reload just
|
|
1894
|
+
* because the user message that started the run had it on.
|
|
1895
|
+
*/
|
|
1896
|
+
export declare const getLatestToolConfiguration: (messages: Message[]) => Record<string, unknown> | undefined;
|
|
1897
|
+
|
|
1678
1898
|
/**
|
|
1679
1899
|
* Extracts the deployment/model ID from a DIAL Core conversation ID.
|
|
1680
1900
|
*
|
|
@@ -1702,8 +1922,6 @@ export declare const getLastUserMessageToolConfiguration: (messages: Message[])
|
|
|
1702
1922
|
*/
|
|
1703
1923
|
export declare const getModelIdFromConversationId: (id: string) => string | undefined;
|
|
1704
1924
|
|
|
1705
|
-
export { getParentFolderPath }
|
|
1706
|
-
|
|
1707
1925
|
/**
|
|
1708
1926
|
* The publish folder a public catalog entity id sits in: the segments between
|
|
1709
1927
|
* the `public` bucket and the entity name, decoded to the plain text the
|
|
@@ -1722,6 +1940,12 @@ export declare const getQuickAppConversationStarters: (conversationStarters: unk
|
|
|
1722
1940
|
*/
|
|
1723
1941
|
export declare const getRemainingCharacters: (value: string, maxLength: number) => number | null;
|
|
1724
1942
|
|
|
1943
|
+
/** Returns the schemas that create schema-based apps: unique by id, without id-less entries or the custom-app schema. */
|
|
1944
|
+
export declare const getRunnerSchemas: <T extends QuickAppSchemaLike>(schemas: T[]) => RunnerSchema<T>[];
|
|
1945
|
+
|
|
1946
|
+
/** Returns the limit each over-long skill field exceeds, keyed by field; fields within their limit are omitted. */
|
|
1947
|
+
export declare const getSkillFieldLengthViolations: (values: Record<SkillTextField, string>) => Partial<Record<SkillTextField, number>>;
|
|
1948
|
+
|
|
1725
1949
|
/**
|
|
1726
1950
|
* Returns the text to start/populate a conversation from a selected starter button.
|
|
1727
1951
|
* `description` (the schema property's shared intro/question text) is used only
|
|
@@ -1775,6 +1999,15 @@ export declare const getStarterSubmitText: (starter: StarterOption, description?
|
|
|
1775
1999
|
*/
|
|
1776
2000
|
export declare const getTimeOfDayGreeting: (hour: number, translations: GreetingTranslations, firstName?: string) => string;
|
|
1777
2001
|
|
|
2002
|
+
/**
|
|
2003
|
+
* Returns the boolean values an assistant message's `form_schema` sets, keyed
|
|
2004
|
+
* by property name, or `undefined` when no property resolves to a boolean.
|
|
2005
|
+
* Lets a DIAL app switch a tools-menu toggle (e.g. `deep_research`) per
|
|
2006
|
+
* message — on while a run is in progress, off once its result is delivered.
|
|
2007
|
+
* Not filtered by tool id: `restoreToolConfiguration` ignores unknown ids.
|
|
2008
|
+
*/
|
|
2009
|
+
export declare const getToolConfigurationFromFormSchema: (formSchema: DeploymentConfigurationSchema | undefined) => Record<string, boolean> | undefined;
|
|
2010
|
+
|
|
1778
2011
|
/** Name of the same-origin `BroadcastChannel` shared by an OAuth flow's opener and its callback popup. */
|
|
1779
2012
|
export declare const getToolsetOAuthChannelName: (flowId: string) => string;
|
|
1780
2013
|
|
|
@@ -1809,6 +2042,30 @@ export declare interface GreetingTranslations {
|
|
|
1809
2042
|
nightNoName: string;
|
|
1810
2043
|
}
|
|
1811
2044
|
|
|
2045
|
+
/** Content payload for an application-scoped grouped visualizer: every attachment a message's visualizer claims, rendered together inside one sandboxed iframe. */
|
|
2046
|
+
declare interface GroupedVisualizerCanvasContent {
|
|
2047
|
+
/** Discriminates the content type to select the correct renderer. */
|
|
2048
|
+
type: AttachmentContentType.GroupedVisualizer;
|
|
2049
|
+
/** Iframe `src`, resolved from the matching registry entry's `url`. */
|
|
2050
|
+
url: string;
|
|
2051
|
+
/** One item per claimed attachment, in the message's attachment order. Each `url` is absolute, resolved by the host. */
|
|
2052
|
+
attachments: GroupedAttachmentItem[];
|
|
2053
|
+
/** Presentation layout hints (`themeId`, `width`, `height`, `mobileHeight`) shared by every item. */
|
|
2054
|
+
layout: CustomVisualizerDataLayout;
|
|
2055
|
+
/** postMessage protocol namespace — MUST equal the registry entry's `title`, or the iframe never receives data. */
|
|
2056
|
+
visualizerName: string;
|
|
2057
|
+
/** Milliseconds to wait for a `send()` request's response before rejecting. From the registry entry; does NOT bound the handshake. */
|
|
2058
|
+
requestTimeout?: number;
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
/** Outcome of building a grouped visualizer payload. */
|
|
2062
|
+
export declare interface GroupedVisualizerResolution {
|
|
2063
|
+
/** The grouped payload, or `null` when no claimed attachment resolved to a URL. */
|
|
2064
|
+
content: GroupedVisualizerCanvasContent | null;
|
|
2065
|
+
/** The claimed attachments that reached `content.attachments`, in the input's order. The caller returns the rest to the ordinary attachment tray. */
|
|
2066
|
+
resolved: DisplayAttachment[];
|
|
2067
|
+
}
|
|
2068
|
+
|
|
1812
2069
|
/** Whether at least one tool toggle in `value` is active. */
|
|
1813
2070
|
export declare const hasActiveToolConfig: (value: Record<string, boolean> | undefined) => boolean;
|
|
1814
2071
|
|
|
@@ -1827,6 +2084,9 @@ export declare const hasDialFileWritePermission: (folder?: DialFile) => boolean;
|
|
|
1827
2084
|
|
|
1828
2085
|
export declare const hasForbiddenNameSymbols: (name: string, forbiddenSymbolsRegExp?: RegExp) => boolean;
|
|
1829
2086
|
|
|
2087
|
+
/** Returns `true` when both sets contain exactly the same paths. */
|
|
2088
|
+
export declare const hasSamePaths: (a: ReadonlySet<string>, b: ReadonlySet<string>) => boolean;
|
|
2089
|
+
|
|
1830
2090
|
/**
|
|
1831
2091
|
* Whether the operator configured the structured banner (title and/or
|
|
1832
2092
|
* description) rather than only the legacy HTML message. Drives which of the
|
|
@@ -1838,10 +2098,16 @@ export declare const hasStructuredAnnouncement: ({ title, description, }: Announ
|
|
|
1838
2098
|
declare interface HtmlCanvasContent {
|
|
1839
2099
|
/** Discriminates the content type to select the correct renderer. */
|
|
1840
2100
|
type: AttachmentContentType.Html;
|
|
1841
|
-
/** Full HTML text rendered via `srcdoc` in a sandboxed iframe.
|
|
2101
|
+
/** Full HTML text rendered via `srcdoc` in a sandboxed iframe. Populated only when no `url` is available (local, non-downloadable file attachments); when `url` is set, "View source" instead calls `resolveSourceText`. */
|
|
1842
2102
|
srcdoc?: string;
|
|
1843
|
-
/**
|
|
2103
|
+
/** URL rendered via `src` in a sandboxed iframe when `srcdoc` is absent, or in preference to `srcdoc` when `isSameOriginUrl` is set. Also used as the download-button/"Open in new tab" target. */
|
|
1844
2104
|
url?: string;
|
|
2105
|
+
/** True when `url`'s origin matches the embedding document's own origin. Forces the iframe sandbox to omit `allow-same-origin` — granting it would let a same-origin framed document reach this page's own cookies/storage — and makes `src` take precedence over `srcdoc`; also skips the `contentDocument` block-detection check, since the iframe is intentionally opaque-origin either way. */
|
|
2106
|
+
isSameOriginUrl?: boolean;
|
|
2107
|
+
/** Lazily fetches the full HTML source text for the "View source" toggle. Used instead of an eagerly-populated `srcdoc` when `url` is set; absent when `srcdoc` is already populated. */
|
|
2108
|
+
resolveSourceText?: () => Promise<string>;
|
|
2109
|
+
/** Host-served bootstrap document used to render `srcdoc` without inheriting the embedding page's CSP. When set alongside `srcdoc`, the iframe loads this URL via `src` (still `sandbox="allow-scripts"`) and posts `{ type: HTML_PREVIEW_FRAME_RENDER_MESSAGE, html: srcdoc }` to it once loaded, so the HTML renders under that response's own policy. Ignored when `srcdoc` is absent or `isSameOriginUrl` selects `url`. */
|
|
2110
|
+
srcdocHostUrl?: string;
|
|
1845
2111
|
}
|
|
1846
2112
|
|
|
1847
2113
|
/** Content payload for image attachments. */
|
|
@@ -1875,11 +2141,12 @@ export declare const initiateOAuthLogin: (auth: ToolsetOAuthSettings, toolsetId:
|
|
|
1875
2141
|
export declare const isAnswerIncomplete: (answer: Message | undefined) => boolean;
|
|
1876
2142
|
|
|
1877
2143
|
/**
|
|
1878
|
-
* True when the conversation
|
|
1879
|
-
* placeholder: the backend only persists a
|
|
1880
|
-
* (empty placeholder) and at generation end
|
|
1881
|
-
* flagged `streamErrorMessage`/`wasStoppedByUser`)
|
|
1882
|
-
* generation
|
|
2144
|
+
* True when the conversation has a pending background message, or its last
|
|
2145
|
+
* message is an unresolved assistant placeholder: the backend only persists a
|
|
2146
|
+
* conversation at generation start (empty placeholder) and at generation end
|
|
2147
|
+
* (final content, or a partial flagged `streamErrorMessage`/`wasStoppedByUser`).
|
|
2148
|
+
* This can mean generation is still active elsewhere, or that its terminal save
|
|
2149
|
+
* failed.
|
|
1883
2150
|
*/
|
|
1884
2151
|
export declare const isAwaitingGenerationResume: (conversation: Conversation) => boolean;
|
|
1885
2152
|
|
|
@@ -1955,6 +2222,9 @@ export declare const isQuickAppSchema: (schema?: QuickAppSchemaLike) => boolean;
|
|
|
1955
2222
|
/** Share/Unshare/Remove access are Full-only — Browse and Attach never expose them. */
|
|
1956
2223
|
export declare const isShareActionsAllowed: (actionProfile: DialFileManagerActionProfile) => boolean;
|
|
1957
2224
|
|
|
2225
|
+
/** Whether a skill-relative path is a folder marker (`<folder>/.dial_folder`, never a root-level `.dial_folder`). */
|
|
2226
|
+
export declare const isSkillFolderMarkerPath: (path: string) => boolean;
|
|
2227
|
+
|
|
1958
2228
|
/** True when `value` is a well-formed absolute `http(s)://` URL. */
|
|
1959
2229
|
export declare const isValidAbsoluteUrl: (value: string) => boolean;
|
|
1960
2230
|
|
|
@@ -1965,7 +2235,10 @@ export declare const isValidFeaturesData: (value: string) => boolean;
|
|
|
1965
2235
|
* Client-side mirror of the backend's `isValidSkillRelativePath`
|
|
1966
2236
|
* (`apps/chat-api/src/skills/utils/skill-path.util.ts`), used only for
|
|
1967
2237
|
* immediate inline feedback — the server remains authoritative and may still
|
|
1968
|
-
* reject a path this function accepts.
|
|
2238
|
+
* reject a path this function accepts. It additionally reserves the
|
|
2239
|
+
* `.dial_folder` marker name so a user can never upload or name a folder
|
|
2240
|
+
* after it; the save payload's generated markers never pass through here
|
|
2241
|
+
* (the server accepts them only as a zero-byte final segment).
|
|
1969
2242
|
*/
|
|
1970
2243
|
export declare const isValidSkillRelativePath: (relativePath: string) => boolean;
|
|
1971
2244
|
|
|
@@ -2014,8 +2287,8 @@ export declare const mapDeploymentDetailsDtoToEntityDetails: (dto: DeploymentDet
|
|
|
2014
2287
|
/** Maps a deployment limits DTO to display-ready catalog limits, or `undefined` when no qualifying stats exist. */
|
|
2015
2288
|
export declare const mapDeploymentLimitsDtoToCatalogLimits: (dto: DeploymentLimitsResponseDto | undefined, labels: DeploymentLimitsLabels) => CatalogItemLimits | undefined;
|
|
2016
2289
|
|
|
2017
|
-
/** Maps
|
|
2018
|
-
export declare const mapDeploymentLimitsToInput: (dto: DeploymentLimitsResponseDto | undefined) =>
|
|
2290
|
+
/** 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. */
|
|
2291
|
+
export declare const mapDeploymentLimitsToInput: (dto: DeploymentLimitsResponseDto | undefined, labels: ConversationInputLimitsLabels, formatResetTime?: FormatResetTime) => CatalogItemLimits | undefined;
|
|
2019
2292
|
|
|
2020
2293
|
/** Maps a deployment listing row into the catalog UI's `CatalogItem` shape. */
|
|
2021
2294
|
export declare const mapDeploymentToCatalogItem: (deployment: DeploymentItemDto, { favoriteIds, entityDetails, folderLabels, editableSchemaIds, isCustomAppsEditable, activeLocale, primaryLocale, resolveIconUrl, }: MapDeploymentToCatalogItemOptions) => CatalogItem;
|
|
@@ -2081,12 +2354,18 @@ export declare const mapFileMetadataToDialFile: (metadata: FileMetadataResponseD
|
|
|
2081
2354
|
export declare const mapFormValuesToCreateBody: (values: ScheduledTaskCreateFormValues) => CreateScheduledTaskBodyDto;
|
|
2082
2355
|
|
|
2083
2356
|
/**
|
|
2084
|
-
* Maps validated edit
|
|
2085
|
-
*
|
|
2086
|
-
* `CreateScheduledTaskBodyDto`, so this reuses the same trigger-building logic.
|
|
2357
|
+
* Maps a complete, validated edit draft to an update body. An unset skill
|
|
2358
|
+
* emits null to remove the saved reference; hydrate from detail before editing.
|
|
2087
2359
|
*/
|
|
2088
2360
|
export declare const mapFormValuesToUpdateBody: (values: ScheduledTaskCreateFormValues) => UpdateScheduledTaskBodyDto;
|
|
2089
2361
|
|
|
2362
|
+
/**
|
|
2363
|
+
* Maps the same top-level Cost budgets used by the aggregate cards into table-header state.
|
|
2364
|
+
*
|
|
2365
|
+
* @param formatResetTime - Formats each period's top-level `resetsAt` into the header's reset trio. Omit it to produce statuses with no reset fields.
|
|
2366
|
+
*/
|
|
2367
|
+
export declare const mapOverallCostLimitsToPeriodStatuses: (usage: UserLimitStatsResponseDto | undefined, activeLocale: string, t: Translate_2, formatResetTime?: FormatResetTime) => ModelLimitPeriodStatuses;
|
|
2368
|
+
|
|
2090
2369
|
/**
|
|
2091
2370
|
* Maps a prompt DTO into a catalog item.
|
|
2092
2371
|
*
|
|
@@ -2145,6 +2424,16 @@ export declare interface MapSkillToCatalogItemOptions {
|
|
|
2145
2424
|
favoriteIds: ReadonlySet<string>;
|
|
2146
2425
|
}
|
|
2147
2426
|
|
|
2427
|
+
/**
|
|
2428
|
+
* Returns the normalized stages of a complete raw stage array or a
|
|
2429
|
+
* message-like payload (reading `custom_content.stages`, falling back to
|
|
2430
|
+
* `customContent.stages`), or `undefined` when there are none. An entry
|
|
2431
|
+
* without an `index` takes its array position — the identity a complete
|
|
2432
|
+
* non-streaming array's `parent_stage_index` refers to — while explicit
|
|
2433
|
+
* (possibly sparse) indexes are kept. Not for partial stream deltas.
|
|
2434
|
+
*/
|
|
2435
|
+
export declare const mapStages: (source: RawStage[] | RawStageSource | null | undefined) => Stage[] | undefined;
|
|
2436
|
+
|
|
2148
2437
|
/**
|
|
2149
2438
|
* Maps a toolset's specification into the lib's credential-status shape,
|
|
2150
2439
|
* for refreshing the details panel after login/logout. Includes both
|
|
@@ -2169,6 +2458,25 @@ export declare interface MapToolsetToCatalogItemOptions {
|
|
|
2169
2458
|
resolveIconUrl: (iconUrl: string | undefined) => string | undefined;
|
|
2170
2459
|
}
|
|
2171
2460
|
|
|
2461
|
+
/**
|
|
2462
|
+
* Maps a `UserLimitStatsResponseDto` into `UsageLimitCardGroup`'s `cards` prop,
|
|
2463
|
+
* in Today / This week / This month order. A period is omitted entirely when
|
|
2464
|
+
* the response carries no usable stat for it. Each card's reset trio comes from
|
|
2465
|
+
* `formatResetTime`, and is absent when that callback returns `undefined`.
|
|
2466
|
+
*/
|
|
2467
|
+
export declare const mapUsageDataToDashboard: (usage: UserLimitStatsResponseDto | undefined, t: Translate, formatResetTime: FormatResetTime) => UsageLimitCardData[];
|
|
2468
|
+
|
|
2469
|
+
/**
|
|
2470
|
+
* Maps `usage.deployments` into `ModelLimitsSection`'s `rows` prop, joined with model or application
|
|
2471
|
+
* identity from `deploymentItems`. Rows are included only when any displayed period stat has nonzero
|
|
2472
|
+
* usage (Cost stats only, for an application). Order follows `Object.keys(deployments)` —
|
|
2473
|
+
* `deploymentItems` is enrichment-only.
|
|
2474
|
+
*
|
|
2475
|
+
* @param resolveIconUrl - Resolves a deployment's raw `iconUrl` to the URL the avatar should load.
|
|
2476
|
+
* @param resolveDisplayName - Resolves a localized-text map or plain string to the display name for `activeLocale`.
|
|
2477
|
+
*/
|
|
2478
|
+
export declare const mapUserUsageToModelLimits: (usage: UserLimitStatsResponseDto | undefined, deploymentItems: DeploymentItemDto[], activeLocale: string, t: Translate_2, resolveIconUrl: ResolveIconUrl, resolveDisplayName: ResolveDisplayName) => ModelLimitRow[];
|
|
2479
|
+
|
|
2172
2480
|
/** Content payload for Markdown file attachments. */
|
|
2173
2481
|
declare interface MarkdownCanvasContent {
|
|
2174
2482
|
/** Discriminates the content type to select the correct renderer. */
|
|
@@ -2189,6 +2497,8 @@ declare type McpAppDisplayMode = NonNullable<McpUiHostContext['displayMode']>;
|
|
|
2189
2497
|
declare interface McpAppHostAdapter {
|
|
2190
2498
|
/** `McpUiHostContext` to deliver to the mounted app's `ui/initialize` handshake. */
|
|
2191
2499
|
hostContext: McpUiHostContext;
|
|
2500
|
+
/** Host identity (`name`/`version`) to deliver to the mounted app's `ui/initialize` handshake. */
|
|
2501
|
+
hostInfo: Implementation;
|
|
2192
2502
|
/** Operator-configured MCP Apps sandbox-proxy URL, or `null` when unconfigured. */
|
|
2193
2503
|
sandboxUrl: string | null;
|
|
2194
2504
|
/** Fetches the matched tool's MCP Apps `ui://` resource. */
|
|
@@ -2205,7 +2515,7 @@ export declare interface McpAppHostContextParams {
|
|
|
2205
2515
|
mcpAppTheme?: string;
|
|
2206
2516
|
/** Host's current i18n locale (BCP 47). */
|
|
2207
2517
|
locale: string;
|
|
2208
|
-
/** Operator-configured MCP App user-agent override. Defaults to `
|
|
2518
|
+
/** Operator-configured MCP App user-agent override. Defaults to the browser's own `navigator.userAgent`. */
|
|
2209
2519
|
mcpAppUserAgent?: string;
|
|
2210
2520
|
/**
|
|
2211
2521
|
* Display modes the host can switch an app between via
|
|
@@ -2327,6 +2637,31 @@ export declare enum McpResourceKind {
|
|
|
2327
2637
|
|
|
2328
2638
|
export declare const mergeCreatedFolderIntoCache: (cache: Map<string, ListFilesItemDto[]>, parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => Map<string, ListFilesItemDto[]>;
|
|
2329
2639
|
|
|
2640
|
+
/**
|
|
2641
|
+
* Merges a freshly-fetched page 0 into the currently-loaded run list: an
|
|
2642
|
+
* already-known id is replaced in place at its existing array position, an
|
|
2643
|
+
* unseen id is prepended (upstream order is `created_at desc`, so it is the
|
|
2644
|
+
* newest), and an id absent from `incoming` is left untouched — a background
|
|
2645
|
+
* refresh never removes a loaded run.
|
|
2646
|
+
*/
|
|
2647
|
+
export declare const mergeRunsById: (current: ScheduledTaskRunDto[], incoming: ScheduledTaskRunDto[]) => ScheduledTaskRunDto[];
|
|
2648
|
+
|
|
2649
|
+
/**
|
|
2650
|
+
* Merges incoming stage deltas into an existing stage list, keyed by `index`.
|
|
2651
|
+
*
|
|
2652
|
+
* Partial `name` and `content` strings are concatenated across chunks;
|
|
2653
|
+
* attachments are merged by their own `index` (concatenating partial `title`
|
|
2654
|
+
* and `data`); every other field on the incoming delta overwrites the
|
|
2655
|
+
* accumulated one. A brand-new stage whose first chunk carries `name: null`
|
|
2656
|
+
* is normalized to `''`.
|
|
2657
|
+
*
|
|
2658
|
+
* Exported for hosts that keep a flattened `Stage[]` on the message instead
|
|
2659
|
+
* of `Message.custom_content.stages` and therefore cannot reuse
|
|
2660
|
+
* {@link applyChunkToMessages}. Prefer `useConversationStream` when the host
|
|
2661
|
+
* can delegate the whole stream loop.
|
|
2662
|
+
*/
|
|
2663
|
+
export declare const mergeStages: (existing: Stage[], incoming: Stage[]) => Stage[];
|
|
2664
|
+
|
|
2330
2665
|
/** True when `message` is an assistant message carrying at least one stage. */
|
|
2331
2666
|
export declare const messageHasStages: (message: Message) => boolean;
|
|
2332
2667
|
|
|
@@ -2336,10 +2671,31 @@ export declare interface MessagePair {
|
|
|
2336
2671
|
assistantMessage: Message;
|
|
2337
2672
|
}
|
|
2338
2673
|
|
|
2674
|
+
/** A stable snapshot of one eligible native text selection. */
|
|
2675
|
+
export declare interface MessageSelectionReplySnapshot {
|
|
2676
|
+
/** Scope that owned the selection when it was captured. */
|
|
2677
|
+
conversationId: string;
|
|
2678
|
+
/** Message text root containing the captured range. */
|
|
2679
|
+
body: HTMLDivElement;
|
|
2680
|
+
/** Captured native range. */
|
|
2681
|
+
range: Range;
|
|
2682
|
+
/** Native selected text preserved for the generated file. */
|
|
2683
|
+
text: string;
|
|
2684
|
+
/** Visible fragment of the selected range. */
|
|
2685
|
+
rect: DOMRect;
|
|
2686
|
+
}
|
|
2687
|
+
|
|
2339
2688
|
/** Formats MIME types as a human-readable, comma-separated list of dotted extensions (or the MIME type itself for wildcards). */
|
|
2340
2689
|
export declare const mimeTypesToAttachmentExtensionLabels: (types: string[]) => string;
|
|
2341
2690
|
|
|
2342
|
-
/**
|
|
2691
|
+
/**
|
|
2692
|
+
* Normalizes `*` to the all-files wildcard, canonicalizes MIME aliases, and drops
|
|
2693
|
+
* any value that is not a valid `DialFileAcceptType`.
|
|
2694
|
+
*
|
|
2695
|
+
* Aliases are resolved because a file picker matches an `accept` entry against its
|
|
2696
|
+
* own MIME table: a declared `text/json` offers no `.json` file, while the
|
|
2697
|
+
* `application/json` it denotes does.
|
|
2698
|
+
*/
|
|
2343
2699
|
export declare const mimeTypesToDialFileAcceptTypes: (types?: string[]) => DialFileAcceptType[] | undefined;
|
|
2344
2700
|
|
|
2345
2701
|
/**
|
|
@@ -2367,6 +2723,7 @@ export declare interface ModelCapabilities {
|
|
|
2367
2723
|
hasResume?: boolean;
|
|
2368
2724
|
hasChatCompletion?: boolean;
|
|
2369
2725
|
hasResponsesApi?: boolean;
|
|
2726
|
+
hasSkills?: boolean;
|
|
2370
2727
|
reasoningEfforts?: string[];
|
|
2371
2728
|
}
|
|
2372
2729
|
|
|
@@ -2406,18 +2763,6 @@ export declare interface ModelSpecification {
|
|
|
2406
2763
|
createdAt?: number;
|
|
2407
2764
|
}
|
|
2408
2765
|
|
|
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
2766
|
/** Returns a skill relative path's final segment (its display name in the file tree). */
|
|
2422
2767
|
export declare const nameFromPath: (path: string) => string;
|
|
2423
2768
|
|
|
@@ -2429,6 +2774,20 @@ export declare const nameFromPath: (path: string) => string;
|
|
|
2429
2774
|
*/
|
|
2430
2775
|
export declare const navigateToolsetOAuthPopup: (popup: Window, auth: ToolsetOAuthSettings, toolsetId: string, callbackPath: string, credentialsLevel?: ToolsetCredentialsLevel, resourceKind?: OAuthResourceKind, offlineUsageConsent?: boolean) => ToolsetOAuthInitiationResult;
|
|
2431
2776
|
|
|
2777
|
+
/**
|
|
2778
|
+
* Encodes a deployment/application id to its single-encoded form regardless
|
|
2779
|
+
* of whether the value it received was already percent-encoded or the raw,
|
|
2780
|
+
* human-readable form — decoding first then re-encoding once is idempotent
|
|
2781
|
+
* either way, since `decodeDeploymentId` on a raw (unencoded) id is a no-op.
|
|
2782
|
+
* Use this instead of `encodeDeploymentId` at a boundary that cannot
|
|
2783
|
+
* guarantee which form it receives, such as a `postMessage` payload from the
|
|
2784
|
+
* settings iframe: calling `encodeDeploymentId` directly on a value the
|
|
2785
|
+
* sender already encoded escapes the existing `%` characters a second time
|
|
2786
|
+
* (`%20` becomes `%2520`), which the backend only ever undoes once and so
|
|
2787
|
+
* 404s on.
|
|
2788
|
+
*/
|
|
2789
|
+
export declare const normalizeDeploymentId: (id: string) => string;
|
|
2790
|
+
|
|
2432
2791
|
/**
|
|
2433
2792
|
* Normalises a stored response-format string to the current enum. Legacy data
|
|
2434
2793
|
* may contain `'Markdown'` or `'PlainText'` (capital-first) instead of the
|
|
@@ -2444,6 +2803,19 @@ export declare const normalizeResponseFormat: (value: string | undefined) => Res
|
|
|
2444
2803
|
*/
|
|
2445
2804
|
export declare const normalizeSkillName: (input: string) => string;
|
|
2446
2805
|
|
|
2806
|
+
/**
|
|
2807
|
+
* Encodes a toolset id to its single-encoded form regardless of whether the
|
|
2808
|
+
* value received it in was already percent-encoded or the raw,
|
|
2809
|
+
* human-readable form — decoding first then re-encoding once is idempotent
|
|
2810
|
+
* either way, since `decodeToolsetId` on a raw (unencoded) id is a no-op.
|
|
2811
|
+
* Use this instead of `encodeToolsetId` at a boundary that cannot guarantee
|
|
2812
|
+
* which form it receives, such as a `postMessage` payload from an embedded
|
|
2813
|
+
* iframe: calling `encodeToolsetId` directly on a value the sender already
|
|
2814
|
+
* encoded escapes the existing `%` characters a second time (`%20` becomes
|
|
2815
|
+
* `%2520`), which the backend only ever undoes once and so 404s on.
|
|
2816
|
+
*/
|
|
2817
|
+
export declare const normalizeToolsetId: (toolsetId: string) => string;
|
|
2818
|
+
|
|
2447
2819
|
export declare const normalizeVirtualPath: (value: string) => string;
|
|
2448
2820
|
|
|
2449
2821
|
/** Arguments handed to the host's exchange callback. */
|
|
@@ -2509,13 +2881,23 @@ declare interface OoxmlDocxHighlightLocation {
|
|
|
2509
2881
|
path: number[];
|
|
2510
2882
|
/** Inclusive start character offset within the story's matched text. */
|
|
2511
2883
|
start: number;
|
|
2512
|
-
/** Exclusive end character offset
|
|
2884
|
+
/** Exclusive end character offset — the wire's `end`, already exclusive, copied through unchanged. */
|
|
2513
2885
|
endExclusive: number;
|
|
2514
2886
|
/** The cited text, compared against the text resolved over `[start, endExclusive)`. */
|
|
2515
2887
|
text: string;
|
|
2516
2888
|
}
|
|
2517
2889
|
|
|
2518
|
-
/**
|
|
2890
|
+
/** A complete table row in the DOCX body, matched by cell text. */
|
|
2891
|
+
declare interface OoxmlDocxTableRowLocation {
|
|
2892
|
+
/** Location kind. */
|
|
2893
|
+
kind: OoxmlHighlightKind.DocxTableRow;
|
|
2894
|
+
/** Plain text of each cell, in column order. */
|
|
2895
|
+
cells: string[];
|
|
2896
|
+
/** 1-based matching row in document order. */
|
|
2897
|
+
occurrence: number;
|
|
2898
|
+
}
|
|
2899
|
+
|
|
2900
|
+
/** Supported document formats rendered by the installed `@silurus/ooxml` runtime. */
|
|
2519
2901
|
declare enum OoxmlFileType {
|
|
2520
2902
|
Docx = 'docx',
|
|
2521
2903
|
Xlsx = 'xlsx',
|
|
@@ -2537,6 +2919,10 @@ declare enum OoxmlHighlightKind {
|
|
|
2537
2919
|
DocxTextRange = 'docxTextRange',
|
|
2538
2920
|
/** A character range inside a single PPTX shape on one slide. */
|
|
2539
2921
|
PptxTextRange = 'pptxTextRange',
|
|
2922
|
+
/** A complete DOCX table row identified by its cell text. */
|
|
2923
|
+
DocxTableRow = 'docxTableRow',
|
|
2924
|
+
/** A complete PPTX table row identified by its cell text on one slide. */
|
|
2925
|
+
PptxTableRow = 'pptxTableRow',
|
|
2540
2926
|
/** One cell, or a contiguous same-row cell range, on a named XLSX sheet. */
|
|
2541
2927
|
XlsxCellRange = 'xlsxCellRange',
|
|
2542
2928
|
}
|
|
@@ -2545,6 +2931,8 @@ declare enum OoxmlHighlightKind {
|
|
|
2545
2931
|
declare type OoxmlHighlightLocation =
|
|
2546
2932
|
| OoxmlDocxHighlightLocation
|
|
2547
2933
|
| OoxmlPptxHighlightLocation
|
|
2934
|
+
| OoxmlDocxTableRowLocation
|
|
2935
|
+
| OoxmlPptxTableRowLocation
|
|
2548
2936
|
| OoxmlXlsxHighlightLocation;
|
|
2549
2937
|
|
|
2550
2938
|
/** A cited character range inside a single shape on one PPTX slide. */
|
|
@@ -2557,12 +2945,24 @@ declare interface OoxmlPptxHighlightLocation {
|
|
|
2557
2945
|
shapeId: string;
|
|
2558
2946
|
/** Inclusive start character offset within the shape's matched text. */
|
|
2559
2947
|
start: number;
|
|
2560
|
-
/** Exclusive end character offset
|
|
2948
|
+
/** Exclusive end character offset — the wire's `end`, already exclusive, copied through unchanged. */
|
|
2561
2949
|
endExclusive: number;
|
|
2562
2950
|
/** The cited text, compared against the text resolved over `[start, endExclusive)`. */
|
|
2563
2951
|
text: string;
|
|
2564
2952
|
}
|
|
2565
2953
|
|
|
2954
|
+
/** A complete table row on one PPTX slide, matched by cell text. */
|
|
2955
|
+
declare interface OoxmlPptxTableRowLocation {
|
|
2956
|
+
/** Location kind. */
|
|
2957
|
+
kind: OoxmlHighlightKind.PptxTableRow;
|
|
2958
|
+
/** Plain text of each cell, in column order. */
|
|
2959
|
+
cells: string[];
|
|
2960
|
+
/** 1-based matching row on the specified slide. */
|
|
2961
|
+
occurrence: number;
|
|
2962
|
+
/** 1-based slide number. */
|
|
2963
|
+
slide: number;
|
|
2964
|
+
}
|
|
2965
|
+
|
|
2566
2966
|
/** A cited cell, or contiguous same-row cell range, on a named XLSX sheet. */
|
|
2567
2967
|
declare interface OoxmlXlsxHighlightLocation {
|
|
2568
2968
|
/** Discriminates this location within `OoxmlHighlightLocation`. */
|
|
@@ -2725,7 +3125,7 @@ export declare interface PreparedCopyMoveItem<TDto> {
|
|
|
2725
3125
|
export declare const prepareDownloadDestination: (filename: string, mimeType?: string) => Promise<DownloadDestination>;
|
|
2726
3126
|
|
|
2727
3127
|
/**
|
|
2728
|
-
* Rename-vs-move disambiguation (design.md D3): entries whose parent folder
|
|
3128
|
+
* Rename-vs-move disambiguation (`openspec/changes/archive/2026-07-21-split-use-dial-file-manager/design.md` D3): entries whose parent folder
|
|
2729
3129
|
* is unchanged become `renameDtos`; entries whose parent folder changed
|
|
2730
3130
|
* become `preparedMoveItems`.
|
|
2731
3131
|
*/
|
|
@@ -2734,6 +3134,15 @@ export declare const prepareMoveRenameItems: (copiedItems: DialCopiedItem[], buc
|
|
|
2734
3134
|
preparedMoveItems: PreparedCopyMoveItem<MoveItemDto>[];
|
|
2735
3135
|
};
|
|
2736
3136
|
|
|
3137
|
+
/**
|
|
3138
|
+
* Validates form values before creating a request body. Hosts translate the
|
|
3139
|
+
* returned field codes and must not issue a write when `ok` is false.
|
|
3140
|
+
*/
|
|
3141
|
+
export declare const prepareScheduledTaskCreateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<CreateScheduledTaskBodyDto>;
|
|
3142
|
+
|
|
3143
|
+
/** Validates form values before preparing an update request body. */
|
|
3144
|
+
export declare const prepareScheduledTaskUpdateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<UpdateScheduledTaskBodyDto>;
|
|
3145
|
+
|
|
2737
3146
|
/** Maximum body length accepted by `CreatePromptDto.content`. */
|
|
2738
3147
|
export declare const PROMPT_CONTENT_MAX_LENGTH = 50000;
|
|
2739
3148
|
|
|
@@ -2785,7 +3194,11 @@ export declare enum PromptSource {
|
|
|
2785
3194
|
Public = "public"
|
|
2786
3195
|
}
|
|
2787
3196
|
|
|
2788
|
-
/**
|
|
3197
|
+
/**
|
|
3198
|
+
* DIAL Core bucket holding organisation-wide skills.
|
|
3199
|
+
*
|
|
3200
|
+
* @deprecated Use `PUBLIC_BUCKET` from `@epam/ai-dial-chat-shared`.
|
|
3201
|
+
*/
|
|
2789
3202
|
export declare const PUBLIC_SKILL_BUCKET = "public";
|
|
2790
3203
|
|
|
2791
3204
|
/** The DIAL publish API surface produced by {@link createPublishApiClient}. */
|
|
@@ -2817,6 +3230,68 @@ export declare interface QuickAppSchemaLike {
|
|
|
2817
3230
|
displayName?: string;
|
|
2818
3231
|
}
|
|
2819
3232
|
|
|
3233
|
+
/**
|
|
3234
|
+
* One stage as it arrives from the REST API or the SSE stream, before
|
|
3235
|
+
* normalization. Structurally satisfied by the generated `StageDto` and by a
|
|
3236
|
+
* raw stream delta, both of which omit `index`/`name`/`status` on the chunk
|
|
3237
|
+
* that opens a stage.
|
|
3238
|
+
*/
|
|
3239
|
+
export declare interface RawStage {
|
|
3240
|
+
/** Ordering key. Defaults to `0` when absent. */
|
|
3241
|
+
index?: number | null;
|
|
3242
|
+
/** Stage title. `null` on the chunk that opens the stage. */
|
|
3243
|
+
name?: string | null;
|
|
3244
|
+
/** Terminal state as a raw wire string; anything other than `'completed'`/`'failed'` means still running. */
|
|
3245
|
+
status?: string | null;
|
|
3246
|
+
/** Additional stage text. */
|
|
3247
|
+
content?: string | null;
|
|
3248
|
+
/** Short source/category label shown beside the stage name. */
|
|
3249
|
+
tag?: string | null;
|
|
3250
|
+
/** Files produced or referenced by this stage. */
|
|
3251
|
+
attachments?: RawStageAttachment[] | null;
|
|
3252
|
+
/**
|
|
3253
|
+
* `index` of the parent stage (its array position in a complete unindexed
|
|
3254
|
+
* array). Nullish means top level; `0` is a valid parent.
|
|
3255
|
+
*/
|
|
3256
|
+
parent_stage_index?: number | null;
|
|
3257
|
+
}
|
|
3258
|
+
|
|
3259
|
+
/**
|
|
3260
|
+
* One stage attachment as it arrives from the REST API or the SSE stream,
|
|
3261
|
+
* before normalization: every field is optional and may be `null`.
|
|
3262
|
+
*/
|
|
3263
|
+
export declare interface RawStageAttachment {
|
|
3264
|
+
/** Zero-based position in the attachment list. */
|
|
3265
|
+
index?: number | null;
|
|
3266
|
+
/** MIME type of the attachment content. */
|
|
3267
|
+
type?: string | null;
|
|
3268
|
+
/** Display name shown in the UI. */
|
|
3269
|
+
title?: string | null;
|
|
3270
|
+
/** Inline base-64 encoded content. */
|
|
3271
|
+
data?: string | null;
|
|
3272
|
+
/** Remote URL pointing to the attachment content. */
|
|
3273
|
+
url?: string | null;
|
|
3274
|
+
/** MIME type of the referenced resource. */
|
|
3275
|
+
reference_type?: string | null;
|
|
3276
|
+
/** URL of an alternate reference resource. */
|
|
3277
|
+
reference_url?: string | null;
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
/**
|
|
3281
|
+
* Message-like payload carrying stages under either the wire's snake_case
|
|
3282
|
+
* `custom_content` or a host's camelCased `customContent`.
|
|
3283
|
+
*/
|
|
3284
|
+
export declare interface RawStageSource {
|
|
3285
|
+
/** Custom content as the DIAL wire format spells it. */
|
|
3286
|
+
custom_content?: {
|
|
3287
|
+
stages?: RawStage[] | null;
|
|
3288
|
+
} | null;
|
|
3289
|
+
/** Custom content as a camelCasing host spells it. */
|
|
3290
|
+
customContent?: {
|
|
3291
|
+
stages?: RawStage[] | null;
|
|
3292
|
+
} | null;
|
|
3293
|
+
}
|
|
3294
|
+
|
|
2820
3295
|
/**
|
|
2821
3296
|
* Reads a skill file response as raw bytes, or `null` when the body is
|
|
2822
3297
|
* larger than `SKILL_MANIFEST_MAX_BYTES`. The declared `content-length` is
|
|
@@ -2827,6 +3302,24 @@ export declare interface QuickAppSchemaLike {
|
|
|
2827
3302
|
*/
|
|
2828
3303
|
export declare const readSkillFileBytes: (response: Response) => Promise<Uint8Array | null>;
|
|
2829
3304
|
|
|
3305
|
+
/**
|
|
3306
|
+
* Reads a skill file response as raw bytes with no size ceiling, for the
|
|
3307
|
+
* supporting-file **preview** path.
|
|
3308
|
+
*
|
|
3309
|
+
* Previews are user-initiated, one file at a time, and a realistic binary
|
|
3310
|
+
* (a PDF, an image) routinely exceeds `SKILL_MANIFEST_MAX_BYTES` — a cap
|
|
3311
|
+
* sized for `SKILL.md` frontmatter, not for binaries — so applying that cap
|
|
3312
|
+
* here rejected virtually every real PDF before it was ever decoded. This
|
|
3313
|
+
* reader therefore never returns `null`: file size is not a failure class on
|
|
3314
|
+
* the preview path.
|
|
3315
|
+
*
|
|
3316
|
+
* `readSkillFileBytes` and `readSkillManifest` keep their
|
|
3317
|
+
* `SKILL_MANIFEST_MAX_BYTES` ceiling, because they feed the manifest parse
|
|
3318
|
+
* and the textual Content-tab read, where an oversized body must never be
|
|
3319
|
+
* decoded into a string.
|
|
3320
|
+
*/
|
|
3321
|
+
export declare const readSkillFilePreviewBytes: (response: Response) => Promise<Uint8Array>;
|
|
3322
|
+
|
|
2830
3323
|
/**
|
|
2831
3324
|
* Reads a skill manifest response as text, or `null` when the body is larger
|
|
2832
3325
|
* than `SKILL_MANIFEST_MAX_BYTES`. The size is checked before decoding, so an
|
|
@@ -2872,6 +3365,23 @@ export declare const referenceAttachmentToPdfCanvasContent: (attachment: Attachm
|
|
|
2872
3365
|
/** Name reserved for the hidden marker file used to create empty folders. */
|
|
2873
3366
|
export declare const RESERVED_MARKER_NAME = ".dial_folder";
|
|
2874
3367
|
|
|
3368
|
+
/**
|
|
3369
|
+
* One reset time, already parsed and formatted by the host. Declared
|
|
3370
|
+
* structurally here so this library never imports an application type; the
|
|
3371
|
+
* host passes a value that satisfies this shape (e.g. `apps/chat`'s own
|
|
3372
|
+
* `ResetTimeDisplay`).
|
|
3373
|
+
*/
|
|
3374
|
+
export declare interface ResetTimeDisplay {
|
|
3375
|
+
/** Exclusive end of the period as an epoch ms value, for the host's boundary scheduling. */
|
|
3376
|
+
resetsAtMs: number;
|
|
3377
|
+
/** Machine-readable instant for a `<time dateTime>` attribute. */
|
|
3378
|
+
isoValue: string;
|
|
3379
|
+
/** Visible reset line. */
|
|
3380
|
+
label: string;
|
|
3381
|
+
/** Accessible expansion of the reset line. */
|
|
3382
|
+
ariaLabel: string;
|
|
3383
|
+
}
|
|
3384
|
+
|
|
2875
3385
|
/**
|
|
2876
3386
|
* Resolves the primary action for a catalog item.
|
|
2877
3387
|
*
|
|
@@ -2891,7 +3401,8 @@ export declare const resolveCatalogPrimaryAction: (item: CatalogItem, fetchPromp
|
|
|
2891
3401
|
/** Resolves a syntax-highlighted code canvas content payload from a DisplayAttachment, or `null` if unavailable. */
|
|
2892
3402
|
export declare const resolveCodeCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, language?: string) => Promise<CodeCanvasContent | ErrorCanvasContent | null>;
|
|
2893
3403
|
|
|
2894
|
-
|
|
3404
|
+
/** Resolves a deployment's display folder, including organization applications without a folder path. */
|
|
3405
|
+
export declare const resolveDeploymentFolder: (deployment: Pick<DeploymentItemDto, "isMy" | "sharedWithMe" | "applicationFolder"> & Partial<Pick<DeploymentItemDto, "type">>, labels: DeploymentFolderLabels) => string[];
|
|
2895
3406
|
|
|
2896
3407
|
/**
|
|
2897
3408
|
* Resolves a DialFile to the bucket-relative API path used by files BFF endpoints.
|
|
@@ -2909,6 +3420,9 @@ export declare const resolveDialFileBucketAndPath: (fileId: string) => {
|
|
|
2909
3420
|
path: string;
|
|
2910
3421
|
} | undefined;
|
|
2911
3422
|
|
|
3423
|
+
/** A callback that resolves a display name from a localized-text value. */
|
|
3424
|
+
declare type ResolveDisplayName = (name: string | Record<string, string> | undefined | null, locale: string) => string;
|
|
3425
|
+
|
|
2912
3426
|
/** Resolves a DIAL Core file id to a downloadable URL. Host-owned — encodes the app's own file-download endpoint. */
|
|
2913
3427
|
export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
|
|
2914
3428
|
|
|
@@ -2927,20 +3441,45 @@ export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
|
|
|
2927
3441
|
*/
|
|
2928
3442
|
export declare const resolveExternalSourceContentType: (contentType: string, url: string) => string;
|
|
2929
3443
|
|
|
3444
|
+
/**
|
|
3445
|
+
* Builds the grouped payload for an application-scoped visualizer from the
|
|
3446
|
+
* attachments its entry claims, reporting which of them `resolveAbsoluteUrl`
|
|
3447
|
+
* could produce a URL for. Unlike the single-attachment resolver this fetches
|
|
3448
|
+
* nothing: the grouped protocol hands the visualizer URLs and lets it read
|
|
3449
|
+
* them itself, so the URLs must be absolute — a host-relative path would
|
|
3450
|
+
* resolve against the iframe's own origin. Producing one is host knowledge,
|
|
3451
|
+
* which is why it arrives as a callback rather than being built here.
|
|
3452
|
+
*/
|
|
3453
|
+
export declare const resolveGroupedVisualizerCanvasContent: (attachments: DisplayAttachment[], resolveAbsoluteUrl: (attachment: DisplayAttachment) => string | undefined, entry: ApplicationVisualizer, themeId: string) => GroupedVisualizerResolution;
|
|
3454
|
+
|
|
2930
3455
|
/**
|
|
2931
3456
|
* Resolves an HTML canvas content payload from a DisplayAttachment.
|
|
2932
|
-
*
|
|
2933
|
-
*
|
|
2934
|
-
*
|
|
3457
|
+
* When the attachment has a download URL, that URL is the primary render
|
|
3458
|
+
* target so the preview loads via `src` and gets its own response-level CSP
|
|
3459
|
+
* instead of inheriting the host document's — no HTML text is fetched up
|
|
3460
|
+
* front; `resolveSourceText` fetches it lazily, only when the "View source"
|
|
3461
|
+
* toggle is used, and rejects if that fetch fails. `isSameOriginUrl` reflects
|
|
3462
|
+
* a real comparison against the embedding document's own origin.
|
|
3463
|
+
* With no download URL (local file or inline data), falls back to `srcdoc`,
|
|
3464
|
+
* rejecting payloads larger than 1 MiB to prevent browser truncation, and
|
|
3465
|
+
* forwards `resolvers.htmlSrcdocHostUrl` so that HTML can still render under
|
|
3466
|
+
* its own response-level CSP.
|
|
3467
|
+
* Returns `null` if no source is available, or an `ErrorCanvasContent` when
|
|
3468
|
+
* that fallback fetch fails.
|
|
2935
3469
|
*/
|
|
2936
3470
|
export declare const resolveHtmlCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<HtmlCanvasContent | ErrorCanvasContent | null>;
|
|
2937
3471
|
|
|
3472
|
+
/** A callback that resolves an icon URL from a deployment's raw `iconUrl` field. */
|
|
3473
|
+
declare type ResolveIconUrl = (iconUrl: string | undefined) => string | undefined;
|
|
3474
|
+
|
|
2938
3475
|
/**
|
|
2939
3476
|
* Resolves an image canvas content payload from a DisplayAttachment without
|
|
2940
|
-
* fetching — returns
|
|
2941
|
-
*
|
|
2942
|
-
*
|
|
2943
|
-
*
|
|
3477
|
+
* fetching — returns a local blob URL or the BFF download URL directly so the
|
|
3478
|
+
* browser cache can be shared with the conversation view's `<img>` element.
|
|
3479
|
+
* A local `File` with bytes takes precedence over the DIAL download URL; a
|
|
3480
|
+
* 0-byte `File` (the file-manager placeholder) does not. Error detection is
|
|
3481
|
+
* delegated to `<img onError>` in the canvas renderer. Returns `null` if no
|
|
3482
|
+
* URL source is available.
|
|
2944
3483
|
*/
|
|
2945
3484
|
export declare const resolveImageCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => ImageCanvasContent | null;
|
|
2946
3485
|
|
|
@@ -2986,6 +3525,9 @@ export declare const resolvePdfCanvasContent: (attachment: DisplayAttachment, re
|
|
|
2986
3525
|
*/
|
|
2987
3526
|
export declare const resolveRelativeDialFilePath: (pathOrFileId: string, bucket: string) => string;
|
|
2988
3527
|
|
|
3528
|
+
/** Returns the section whose root label is the first segment of `virtualPath`, or `undefined` when none matches. */
|
|
3529
|
+
export declare const resolveSectionByPath: <TSection extends DialFileManagerSection>(virtualPath: string, sections: readonly TSection[]) => TSection | undefined;
|
|
3530
|
+
|
|
2989
3531
|
/**
|
|
2990
3532
|
* Converts an opaque file-listing id into the path expected by the single-file
|
|
2991
3533
|
* download endpoint. Core may prefix listing paths with the skill path and its
|
|
@@ -3005,6 +3547,16 @@ export declare const resolveSkillManifestFileId: (files: SkillMetadataItemDto[],
|
|
|
3005
3547
|
/** Resolves a plain-text canvas content payload from a DisplayAttachment, or `null` if unavailable. */
|
|
3006
3548
|
export declare const resolveTextCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<PlainTextCanvasContent | ErrorCanvasContent | null>;
|
|
3007
3549
|
|
|
3550
|
+
/**
|
|
3551
|
+
* Resolves which credentials level a toolset's login applies to, per DIAL
|
|
3552
|
+
* Core's public/private toolset convention: a `public`-bucket toolset is
|
|
3553
|
+
* shared credentials-wise at `User` level, while a private/workspace toolset
|
|
3554
|
+
* is scoped at `Global` level. Every surface that drives a toolset login
|
|
3555
|
+
* (the sign-in-interrupt dialog, the QuickApps editor iframe bridge,
|
|
3556
|
+
* `useToolsetLogin`) must resolve the level this way rather than assuming one.
|
|
3557
|
+
*/
|
|
3558
|
+
export declare const resolveToolsetCredentialsLevel: (toolsetId: string) => ToolsetCredentialsLevel.User | ToolsetCredentialsLevel.Global;
|
|
3559
|
+
|
|
3008
3560
|
/**
|
|
3009
3561
|
* Fetches the attachment payload and builds a `VisualizerCanvasContent` for the
|
|
3010
3562
|
* given registry entry and theme. Returns `null` when the payload cannot be
|
|
@@ -3017,6 +3569,11 @@ export declare const resolveTextCanvasContent: (attachment: DisplayAttachment, r
|
|
|
3017
3569
|
*/
|
|
3018
3570
|
export declare const resolveVisualizerCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, entry: CustomVisualizer, themeId: string) => Promise<VisualizerCanvasContent | null>;
|
|
3019
3571
|
|
|
3572
|
+
/** An application schema with a resolved id, as returned by {@link getRunnerSchemas}. */
|
|
3573
|
+
export declare type RunnerSchema<T extends QuickAppSchemaLike> = T & {
|
|
3574
|
+
id: string;
|
|
3575
|
+
};
|
|
3576
|
+
|
|
3020
3577
|
/** Decodes a URI-encoded path segment, returning the original string if decoding fails. */
|
|
3021
3578
|
export declare const safeDecodeURI: (path: string) => string;
|
|
3022
3579
|
|
|
@@ -3058,6 +3615,114 @@ export declare type ScheduledTaskDtoMappingResult = {
|
|
|
3058
3615
|
reason: UnsupportedTriggerReason;
|
|
3059
3616
|
};
|
|
3060
3617
|
|
|
3618
|
+
/** A checked request preparation result that never serializes invalid values. */
|
|
3619
|
+
export declare type ScheduledTaskPreparationResult<TBody> = {
|
|
3620
|
+
ok: true;
|
|
3621
|
+
body: TBody;
|
|
3622
|
+
} | {
|
|
3623
|
+
ok: false;
|
|
3624
|
+
errors: ScheduledTaskValidationErrors;
|
|
3625
|
+
};
|
|
3626
|
+
|
|
3627
|
+
export declare interface ScheduledTaskRunsListRequest {
|
|
3628
|
+
scheduleId: string;
|
|
3629
|
+
limit?: number;
|
|
3630
|
+
offset?: number;
|
|
3631
|
+
signal?: AbortSignal;
|
|
3632
|
+
}
|
|
3633
|
+
|
|
3634
|
+
export declare interface ScheduledTasksApiClient {
|
|
3635
|
+
listScheduledTasks: (request?: ScheduledTasksListRequest) => Promise<ListScheduledTasksResponseDto>;
|
|
3636
|
+
listScheduledTaskRuns: (request: ScheduledTaskRunsListRequest) => Promise<ListScheduledTaskRunsResponseDto>;
|
|
3637
|
+
createScheduledTask: (body: CreateScheduledTaskBodyDto) => Promise<CreatedScheduledTaskDto>;
|
|
3638
|
+
getScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
|
|
3639
|
+
updateScheduledTask: (scheduleId: string, body: UpdateScheduledTaskBodyDto) => Promise<UpdatedScheduledTaskDto>;
|
|
3640
|
+
pauseScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
|
|
3641
|
+
resumeScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
|
|
3642
|
+
deleteScheduledTask: (scheduleId: string) => Promise<void>;
|
|
3643
|
+
}
|
|
3644
|
+
|
|
3645
|
+
/** Narrow configured generated-client surface required by scheduler hooks. */
|
|
3646
|
+
export declare interface ScheduledTasksConfiguredClient {
|
|
3647
|
+
listScheduledTasks: (request: {
|
|
3648
|
+
limit?: number;
|
|
3649
|
+
offset?: number;
|
|
3650
|
+
search?: string;
|
|
3651
|
+
sort?: ListScheduledTasksSortEnum;
|
|
3652
|
+
}, options?: RequestInit) => Promise<ListScheduledTasksResponseDto>;
|
|
3653
|
+
listScheduledTaskRuns: (request: {
|
|
3654
|
+
scheduleId: string;
|
|
3655
|
+
limit?: number;
|
|
3656
|
+
offset?: number;
|
|
3657
|
+
}, options?: RequestInit) => Promise<ListScheduledTaskRunsResponseDto>;
|
|
3658
|
+
createScheduledTask: (request: {
|
|
3659
|
+
createScheduledTaskBodyDto: CreateScheduledTaskBodyDto;
|
|
3660
|
+
}) => Promise<CreatedScheduledTaskDto>;
|
|
3661
|
+
getScheduledTask: (request: {
|
|
3662
|
+
scheduleId: string;
|
|
3663
|
+
}) => Promise<ScheduledTaskDto>;
|
|
3664
|
+
updateScheduledTask: (request: {
|
|
3665
|
+
scheduleId: string;
|
|
3666
|
+
updateScheduledTaskBodyDto: UpdateScheduledTaskBodyDto;
|
|
3667
|
+
}) => Promise<UpdatedScheduledTaskDto>;
|
|
3668
|
+
pauseScheduledTask: (request: {
|
|
3669
|
+
scheduleId: string;
|
|
3670
|
+
}) => Promise<ScheduledTaskDto>;
|
|
3671
|
+
resumeScheduledTask: (request: {
|
|
3672
|
+
scheduleId: string;
|
|
3673
|
+
}) => Promise<ScheduledTaskDto>;
|
|
3674
|
+
deleteScheduledTask: (request: {
|
|
3675
|
+
scheduleId: string;
|
|
3676
|
+
}) => Promise<void>;
|
|
3677
|
+
}
|
|
3678
|
+
|
|
3679
|
+
/** App-agnostic request options accepted by the scheduler facade. */
|
|
3680
|
+
export declare interface ScheduledTasksListRequest {
|
|
3681
|
+
limit?: number;
|
|
3682
|
+
offset?: number;
|
|
3683
|
+
search?: string;
|
|
3684
|
+
sort?: ListScheduledTasksSortEnum;
|
|
3685
|
+
signal?: AbortSignal;
|
|
3686
|
+
}
|
|
3687
|
+
|
|
3688
|
+
export declare interface ScheduledTaskTriggerDescription {
|
|
3689
|
+
kind: ScheduledTaskTriggerDescriptionKind;
|
|
3690
|
+
time?: string;
|
|
3691
|
+
dayOfWeek?: string;
|
|
3692
|
+
dayOfMonth?: string;
|
|
3693
|
+
intervalMinutes?: number;
|
|
3694
|
+
date?: Date;
|
|
3695
|
+
expression?: string;
|
|
3696
|
+
sourceTimezone: 'utc';
|
|
3697
|
+
}
|
|
3698
|
+
|
|
3699
|
+
/** Display categories are independent of task editability. */
|
|
3700
|
+
export declare enum ScheduledTaskTriggerDescriptionKind {
|
|
3701
|
+
OneTime = "oneTime",
|
|
3702
|
+
Hourly = "hourly",
|
|
3703
|
+
EveryNMinutes = "everyNMinutes",
|
|
3704
|
+
Daily = "daily",
|
|
3705
|
+
Weekly = "weekly",
|
|
3706
|
+
Monthly = "monthly",
|
|
3707
|
+
Custom = "custom",
|
|
3708
|
+
Invalid = "invalid"
|
|
3709
|
+
}
|
|
3710
|
+
|
|
3711
|
+
export declare interface ScheduledTaskTriggerDescriptionOptions {
|
|
3712
|
+
/** Display timezone; defaults to UTC for backwards compatibility. */
|
|
3713
|
+
timeZone?: string;
|
|
3714
|
+
/** Date whose timezone offset is used. Defaults to now (the existing UTC-storage policy). */
|
|
3715
|
+
referenceDate?: Date;
|
|
3716
|
+
}
|
|
3717
|
+
|
|
3718
|
+
/**
|
|
3719
|
+
* Picks the auth-status field matching one credentials level out of a
|
|
3720
|
+
* toolset's `authSettings` — DIAL Core reports `userLevelAuthStatus` and
|
|
3721
|
+
* `globalAuthStatus` as independent fields rather than one status keyed by
|
|
3722
|
+
* level.
|
|
3723
|
+
*/
|
|
3724
|
+
export declare const selectToolsetAuthStatus: (authSettings: Pick<DialToolsetAuthSettingsDto, "userLevelAuthStatus" | "globalAuthStatus"> | undefined, credentialsLevel: ToolsetCredentialsLevel) => string | undefined;
|
|
3725
|
+
|
|
3061
3726
|
/** Serializes a prompt export envelope into a pretty-printed JSON blob. */
|
|
3062
3727
|
export declare const serializePromptExport: (envelope: PromptExportFormat) => Blob;
|
|
3063
3728
|
|
|
@@ -3091,6 +3756,13 @@ export declare const shouldWatchForDisplayNameUpdate: (conversation: Conversatio
|
|
|
3091
3756
|
*/
|
|
3092
3757
|
export declare const SKILL_FILE_UPLOAD_MAX_BYTES = 1048576;
|
|
3093
3758
|
|
|
3759
|
+
/**
|
|
3760
|
+
* Zero-byte object written at `<folder>/.dial_folder` so an otherwise empty
|
|
3761
|
+
* skill folder survives a save — DIAL Core storage has no directory objects,
|
|
3762
|
+
* so a folder only exists as a file's path prefix.
|
|
3763
|
+
*/
|
|
3764
|
+
export declare const SKILL_FOLDER_MARKER = ".dial_folder";
|
|
3765
|
+
|
|
3094
3766
|
/**
|
|
3095
3767
|
* Upper bound on `nextToken` follow-ups per listing, so a pathological bucket
|
|
3096
3768
|
* cannot spin the client forever.
|
|
@@ -3109,6 +3781,9 @@ export declare const SKILL_MANIFEST_FILE = "SKILL.md";
|
|
|
3109
3781
|
*/
|
|
3110
3782
|
export declare const SKILL_MANIFEST_MAX_BYTES: number;
|
|
3111
3783
|
|
|
3784
|
+
/** Length limit of each skill editor text field. */
|
|
3785
|
+
export declare const SKILL_TEXT_FIELD_MAX_LENGTHS: Record<SkillTextField, number>;
|
|
3786
|
+
|
|
3112
3787
|
/**
|
|
3113
3788
|
* Client-side mirror of the backend's default `SKILL_UPLOAD_MAX_FILES`
|
|
3114
3789
|
* (`apps/chat-api/src/config/environment.config.ts`), used only for
|
|
@@ -3133,6 +3808,28 @@ export declare interface SkillAboutDetails {
|
|
|
3133
3808
|
skillPrompt?: string;
|
|
3134
3809
|
}
|
|
3135
3810
|
|
|
3811
|
+
/** Semantic classification of an import request failure. */
|
|
3812
|
+
export declare enum SkillArchiveImportErrorKind {
|
|
3813
|
+
Validation = "validation",
|
|
3814
|
+
Collision = "collision",
|
|
3815
|
+
RateLimited = "rateLimited",
|
|
3816
|
+
ServiceUnavailable = "serviceUnavailable",
|
|
3817
|
+
Generic = "generic"
|
|
3818
|
+
}
|
|
3819
|
+
|
|
3820
|
+
/** Phase of a skill-archive import, driving the host's loading/success/error presentation. */
|
|
3821
|
+
export declare enum SkillArchiveImportStatus {
|
|
3822
|
+
Idle = "idle",
|
|
3823
|
+
Uploading = "uploading",
|
|
3824
|
+
Success = "success",
|
|
3825
|
+
Error = "error"
|
|
3826
|
+
}
|
|
3827
|
+
|
|
3828
|
+
/** Reason a selected/dropped file was rejected before any request was made. */
|
|
3829
|
+
export declare enum SkillArchiveSelectionRejectionReason {
|
|
3830
|
+
UnsupportedFilename = "unsupportedFilename"
|
|
3831
|
+
}
|
|
3832
|
+
|
|
3136
3833
|
/** Injected API port for skill detail fetching. Mirrors exact server-api wrapper signatures. */
|
|
3137
3834
|
export declare interface SkillDetailsApi {
|
|
3138
3835
|
/** Downloads a raw skill file, returning the raw fetch `Response`. */
|
|
@@ -3146,6 +3843,12 @@ export declare interface SkillDetailsApi {
|
|
|
3146
3843
|
limit?: number;
|
|
3147
3844
|
recursive?: boolean;
|
|
3148
3845
|
}, signal?: AbortSignal): Promise<SkillFileListResponseDto>;
|
|
3846
|
+
/**
|
|
3847
|
+
* Fetches a single skill's own authoritative metadata (`author`,
|
|
3848
|
+
* `updatedAt`, and the rest of `SkillMetadataItemDto`) — not the catalog
|
|
3849
|
+
* listing entry, which may be sparse for a shared skill.
|
|
3850
|
+
*/
|
|
3851
|
+
getSkillMetadata(bucket: string, path: string, signal?: AbortSignal): Promise<SkillMetadataItemDto>;
|
|
3149
3852
|
}
|
|
3150
3853
|
|
|
3151
3854
|
/** Already-configured DIAL Core download operations `useSkillEditorLoad` needs. */
|
|
@@ -3189,6 +3892,14 @@ export declare interface SkillEditorSubmitClient {
|
|
|
3189
3892
|
export declare interface SkillEditorSubmitMessages {
|
|
3190
3893
|
/** Shown when a required field is empty. */
|
|
3191
3894
|
required: string;
|
|
3895
|
+
/** Shown when a name, description or instructions value exceeds its length limit, given that limit. */
|
|
3896
|
+
tooLong: (maxLength: number) => string;
|
|
3897
|
+
/**
|
|
3898
|
+
* Shown when the Instructions value opens with its own YAML frontmatter
|
|
3899
|
+
* block — pasting a whole `SKILL.md` in there would otherwise produce a
|
|
3900
|
+
* manifest with two frontmatter blocks.
|
|
3901
|
+
*/
|
|
3902
|
+
instructionsFrontmatter: string;
|
|
3192
3903
|
/** Shown when the normalized skill name fails DIAL's naming rules. */
|
|
3193
3904
|
nameInvalid: string;
|
|
3194
3905
|
/** Shown when the skill name already exists (409), or defensively on an unreachable create-mode 412. */
|
|
@@ -3323,6 +4034,9 @@ export declare interface SkillFilesPayload {
|
|
|
3323
4034
|
*/
|
|
3324
4035
|
export declare const skillFileToAttachment: (node: SkillFileTreeNode, content: SkillFileContent) => Attachment;
|
|
3325
4036
|
|
|
4037
|
+
/** Returns the folder path a marker path stands for (`docs/.dial_folder` → `docs`). */
|
|
4038
|
+
export declare const skillFolderMarkerParent: (markerPath: string) => string;
|
|
4039
|
+
|
|
3326
4040
|
/** A `SKILL.md` split into its frontmatter fields and its prose body. */
|
|
3327
4041
|
export declare interface SkillManifestDocument {
|
|
3328
4042
|
/** `name` frontmatter field, when present and a string. */
|
|
@@ -3389,12 +4103,49 @@ export declare enum SkillSource {
|
|
|
3389
4103
|
Public = "public"
|
|
3390
4104
|
}
|
|
3391
4105
|
|
|
4106
|
+
/** Skill editor text fields with a length limit. */
|
|
4107
|
+
export declare type SkillTextField = 'name' | 'description' | 'instructions';
|
|
4108
|
+
|
|
3392
4109
|
/** Splits a file name into its base and extension, using only the last dot. */
|
|
3393
4110
|
export declare const splitFileNameExtension: (fileName: string) => {
|
|
3394
4111
|
base: string;
|
|
3395
4112
|
extension: string;
|
|
3396
4113
|
};
|
|
3397
4114
|
|
|
4115
|
+
/** Per-start options of {@link UseConversationStreamResult.startStream}. */
|
|
4116
|
+
export declare interface StartStreamOptions {
|
|
4117
|
+
/**
|
|
4118
|
+
* Treats a `GenerationConflictError` as "this turn is already being
|
|
4119
|
+
* generated" — e.g. a page reloaded before that generation saved its start
|
|
4120
|
+
* state — and joins the running generation instead of showing the conflict
|
|
4121
|
+
* message, which remains the fallback. Only for a start that sends no new
|
|
4122
|
+
* user text; a send the user typed must keep reporting the conflict.
|
|
4123
|
+
*/
|
|
4124
|
+
resumeOnConflict?: boolean;
|
|
4125
|
+
}
|
|
4126
|
+
|
|
4127
|
+
/**
|
|
4128
|
+
* Answers one question: would appending this text after the fence that
|
|
4129
|
+
* `buildSkillManifest` writes produce a *second* frontmatter block?
|
|
4130
|
+
*
|
|
4131
|
+
* That happens when the text's first non-blank line is a bare `---` and some
|
|
4132
|
+
* later line is a bare `---` too — the exact shape of a `SKILL.md` pasted
|
|
4133
|
+
* wholesale into the editor's Instructions field.
|
|
4134
|
+
*
|
|
4135
|
+
* Detection is deliberately structural rather than YAML-based: a pasted block
|
|
4136
|
+
* whose fenced content fails to parse corrupts the stored manifest
|
|
4137
|
+
* identically (and renders as a setext `h2` in the Catalog's Details tab just
|
|
4138
|
+
* the same), so requiring parseable YAML here would let the worst cases
|
|
4139
|
+
* through. Keeping `parseYaml` out also makes this cheap enough to run on
|
|
4140
|
+
* every keystroke.
|
|
4141
|
+
*
|
|
4142
|
+
* A single unclosed fence returns `false`: with no closing fence there is no
|
|
4143
|
+
* second block, matching `FRONTMATTER_PATTERN`'s own requirement. A `---`
|
|
4144
|
+
* appearing later in the body (a horizontal rule, a setext underline) is
|
|
4145
|
+
* likewise not a frontmatter block.
|
|
4146
|
+
*/
|
|
4147
|
+
export declare const startsWithFrontmatterBlock: (text: string) => boolean;
|
|
4148
|
+
|
|
3398
4149
|
/** Options accepted by {@link ConversationStreamTransport.streamCompletion}. */
|
|
3399
4150
|
export declare interface StreamCompletionOptions {
|
|
3400
4151
|
onChunk: (chunk: StreamChunk) => void;
|
|
@@ -3403,6 +4154,29 @@ export declare interface StreamCompletionOptions {
|
|
|
3403
4154
|
signal: AbortSignal;
|
|
3404
4155
|
}
|
|
3405
4156
|
|
|
4157
|
+
/**
|
|
4158
|
+
* Reported through `onError` when the network connection carrying a
|
|
4159
|
+
* completion stream is lost (a rejected `fetch`, or a read that fails after a
|
|
4160
|
+
* 2xx response) or goes silent past the idle timeout — what a laptop sleep or
|
|
4161
|
+
* a phone lock mid-generation produces. The backend-owned generation may
|
|
4162
|
+
* still be running, so the caller can recover it rather than treat the
|
|
4163
|
+
* response as failed. `cause` holds the original error, when there is one.
|
|
4164
|
+
*/
|
|
4165
|
+
export declare class StreamInterruptedError extends Error {
|
|
4166
|
+
constructor(cause?: unknown);
|
|
4167
|
+
}
|
|
4168
|
+
|
|
4169
|
+
/**
|
|
4170
|
+
* Reported through `onError` when DIAL Core itself signals a failure with an
|
|
4171
|
+
* in-band `{ error: { message } }` SSE chunk. Its `message` is upstream text
|
|
4172
|
+
* intended for the user, unlike a transport failure (failed `fetch`, non-OK
|
|
4173
|
+
* status, broken stream), whose message is technical detail. A custom
|
|
4174
|
+
* transport raises this for any user-facing upstream error text.
|
|
4175
|
+
*/
|
|
4176
|
+
export declare class StreamUpstreamError extends Error {
|
|
4177
|
+
constructor(message: string);
|
|
4178
|
+
}
|
|
4179
|
+
|
|
3406
4180
|
/** Strips leading and trailing slashes from a path segment. */
|
|
3407
4181
|
export declare const stripSurroundingSlashes: (path: string) => string;
|
|
3408
4182
|
|
|
@@ -3720,6 +4494,14 @@ export declare const toPublishEntityType: (type: CatalogEntityType) => CatalogPu
|
|
|
3720
4494
|
*/
|
|
3721
4495
|
export declare const toPublishRuleDto: (rule: PublicationRule) => PublishRuleDto;
|
|
3722
4496
|
|
|
4497
|
+
/**
|
|
4498
|
+
* Returns a renderable `Stage` for one raw payload: `index` defaults to `0`,
|
|
4499
|
+
* `name` to `''`, an unrecognized `status` to `null` (still running), and
|
|
4500
|
+
* `content`/`tag`/`attachments`/`parent_stage_index` are passed through when
|
|
4501
|
+
* present (a parent of `0` included).
|
|
4502
|
+
*/
|
|
4503
|
+
export declare const toStage: (stage: RawStage) => Stage;
|
|
4504
|
+
|
|
3723
4505
|
/** Request shape the host's selected-deployment recognition call accepts. */
|
|
3724
4506
|
export declare interface TranscribeWithDeploymentParams {
|
|
3725
4507
|
audioUrl: string;
|
|
@@ -3728,6 +4510,12 @@ export declare interface TranscribeWithDeploymentParams {
|
|
|
3728
4510
|
signal: AbortSignal;
|
|
3729
4511
|
}
|
|
3730
4512
|
|
|
4513
|
+
/** A translate function compatible with i18next's `TFunction`. */
|
|
4514
|
+
declare type Translate = (key: string, options?: Record<string, unknown>) => string;
|
|
4515
|
+
|
|
4516
|
+
/** A translate function compatible with i18next's `TFunction`. */
|
|
4517
|
+
declare type Translate_2 = (key: string, options?: Record<string, unknown>) => string;
|
|
4518
|
+
|
|
3731
4519
|
export declare const trimFileNameToByteLimit: (name: string, limit?: number) => string;
|
|
3732
4520
|
|
|
3733
4521
|
/** An error thrown to indicate the caller is unauthenticated. */
|
|
@@ -3736,19 +4524,25 @@ export declare interface UnauthorizedErrorLike extends Error {
|
|
|
3736
4524
|
readonly url: string;
|
|
3737
4525
|
}
|
|
3738
4526
|
|
|
4527
|
+
/** Returns a new set containing every path from each of `pathSets`. */
|
|
4528
|
+
export declare const unionPathSets: (pathSets: readonly ReadonlySet<string>[]) => Set<string>;
|
|
4529
|
+
|
|
3739
4530
|
/** A skill archive unpacked into its manifest text and a relative-path → bytes map of every other entry. */
|
|
3740
4531
|
export declare interface UnpackedSkillArchive {
|
|
3741
4532
|
/** The root `SKILL.md` entry's decoded text content. */
|
|
3742
4533
|
manifestText: string;
|
|
3743
|
-
/** Every non-manifest entry, keyed by relative path. */
|
|
4534
|
+
/** Every non-manifest, non-marker entry, keyed by relative path. */
|
|
3744
4535
|
files: Map<string, Uint8Array>;
|
|
4536
|
+
/** Folder paths restored from `<folder>/.dial_folder` marker entries. */
|
|
4537
|
+
folders: string[];
|
|
3745
4538
|
}
|
|
3746
4539
|
|
|
3747
4540
|
/**
|
|
3748
4541
|
* Unpacks a whole-skill ZIP (as downloaded from `GET /api/v1/skills/download`
|
|
3749
4542
|
* — DIAL Core's whole-resource `GET` is the one place this contract still
|
|
3750
|
-
* uses a ZIP, per design.md) into its manifest text
|
|
3751
|
-
* bytes
|
|
4543
|
+
* uses a ZIP, per `openspec/changes/archive/2026-10-05-persist-skill-empty-folders/design.md`) into its manifest text, every other entry's
|
|
4544
|
+
* bytes, and the folders its empty-folder markers stand for. Throws if the
|
|
4545
|
+
* archive has no root `SKILL.md` entry.
|
|
3752
4546
|
*/
|
|
3753
4547
|
export declare const unpackSkillArchive: (bytes: Uint8Array) => UnpackedSkillArchive;
|
|
3754
4548
|
|
|
@@ -3762,7 +4556,7 @@ export declare enum UnsupportedTriggerReason {
|
|
|
3762
4556
|
MissingRequiredFields = "missingRequiredFields"
|
|
3763
4557
|
}
|
|
3764
4558
|
|
|
3765
|
-
export declare const updateEntry: (prev: FileUploadBatchState | null,
|
|
4559
|
+
export declare const updateEntry: (prev: FileUploadBatchState | null, id: string, patch: FileUploadStatus | Partial<Pick<FileUploadEntry, "status" | "percent">>) => FileUploadBatchState | null;
|
|
3766
4560
|
|
|
3767
4561
|
/** Max number of files uploaded concurrently within a single upload batch. */
|
|
3768
4562
|
export declare const UPLOAD_CONCURRENCY = 3;
|
|
@@ -3786,6 +4580,66 @@ export declare interface UploadFileWithProgressOptions {
|
|
|
3786
4580
|
/** Upload mode passed to `FilesApi.uploadFile`: overwrite an existing file or fail if it already exists. */
|
|
3787
4581
|
export declare type UploadMode = 'overwrite' | 'create-only';
|
|
3788
4582
|
|
|
4583
|
+
/**
|
|
4584
|
+
* i18n key strings that the consuming app's translation bundle must define for
|
|
4585
|
+
* `mapUsageDataToDashboard` to produce correctly translated strings. The
|
|
4586
|
+
* values are the default key paths used by AI DIAL Chat.
|
|
4587
|
+
*/
|
|
4588
|
+
export declare const USAGE_DATA_I18N_KEYS: {
|
|
4589
|
+
/** Title for the current-UTC-day card (e.g. `'Today'`). */
|
|
4590
|
+
readonly todayTitle: "usage.todayTitle";
|
|
4591
|
+
/** Accessible period description for the current-UTC-day card. */
|
|
4592
|
+
readonly todayPeriodDescription: "usage.todayPeriodDescription";
|
|
4593
|
+
/** Title for the current-UTC-week card (e.g. `'This week'`). */
|
|
4594
|
+
readonly thisWeekTitle: "usage.thisWeekTitle";
|
|
4595
|
+
/** Accessible period description for the current-UTC-week card. */
|
|
4596
|
+
readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
|
|
4597
|
+
/** Title for the current-UTC-month card (e.g. `'This month'`). */
|
|
4598
|
+
readonly thisMonthTitle: "usage.thisMonthTitle";
|
|
4599
|
+
/** Accessible period description for the current-UTC-month card. */
|
|
4600
|
+
readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
|
|
4601
|
+
/** Aria label when there is no limit. Receives `{ used: string }`. */
|
|
4602
|
+
readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
|
|
4603
|
+
/** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
|
|
4604
|
+
readonly progressAriaLabel: "usage.progressAriaLabel";
|
|
4605
|
+
};
|
|
4606
|
+
|
|
4607
|
+
/**
|
|
4608
|
+
* i18n key strings that the consuming app's translation bundle must define for
|
|
4609
|
+
* `mapUserUsageToModelLimits` and `mapOverallCostLimitsToPeriodStatuses` to produce
|
|
4610
|
+
* correctly translated strings. The values are the default key paths used by AI DIAL Chat.
|
|
4611
|
+
*/
|
|
4612
|
+
export declare const USAGE_MODEL_LIMITS_I18N_KEYS: {
|
|
4613
|
+
/** Period label used in tooltip text. Receives no interpolation. */
|
|
4614
|
+
readonly todayPeriodDescription: "usage.todayPeriodDescription";
|
|
4615
|
+
/** Period label used in tooltip text. Receives no interpolation. */
|
|
4616
|
+
readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
|
|
4617
|
+
/** Period label used in tooltip text. Receives no interpolation. */
|
|
4618
|
+
readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
|
|
4619
|
+
/** Tooltip when the overall cost limit is running low. Receives `{ period: string }`. */
|
|
4620
|
+
readonly overallCostLimitRunningLowTooltip: "usage.overallCostLimitRunningLowTooltip";
|
|
4621
|
+
/** Tooltip when the overall cost limit is reached. Receives `{ period: string }`. */
|
|
4622
|
+
readonly overallCostLimitReachedTooltip: "usage.overallCostLimitReachedTooltip";
|
|
4623
|
+
/** Aria label for a metric cell with no data. */
|
|
4624
|
+
readonly unavailableLabel: "usage.unavailableLabel";
|
|
4625
|
+
/** Supporting label when a token limit follows the cost limit. */
|
|
4626
|
+
readonly followsCostLimitLabel: "usage.followsCostLimitLabel";
|
|
4627
|
+
/** Supporting label when there is no per-deployment token limit. */
|
|
4628
|
+
readonly noLimitLabel: "usage.noLimitLabel";
|
|
4629
|
+
/** Aria label when token usage has no limit but follows the cost limit. Receives `{ used: string }`. */
|
|
4630
|
+
readonly followsCostLimitAriaLabel: "usage.followsCostLimitAriaLabel";
|
|
4631
|
+
/** Aria label when there is no limit. Receives `{ used: string }`. */
|
|
4632
|
+
readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
|
|
4633
|
+
/** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
|
|
4634
|
+
readonly progressAriaLabel: "usage.progressAriaLabel";
|
|
4635
|
+
/** Label for the spent-cost cell. Receives `{ amount: string }`. */
|
|
4636
|
+
readonly spentLabel: "usage.spentLabel";
|
|
4637
|
+
/** Type caption for an application (agent) row. Receives no interpolation. */
|
|
4638
|
+
readonly applicationTypeLabel: "usage.applicationTypeLabel";
|
|
4639
|
+
/** Supporting label on an application row's spent cost. Receives no interpolation. */
|
|
4640
|
+
readonly includesCalledModelsLabel: "usage.includesCalledModelsLabel";
|
|
4641
|
+
};
|
|
4642
|
+
|
|
3789
4643
|
/**
|
|
3790
4644
|
* Synchronises the active conversation with the conversation list and returns
|
|
3791
4645
|
* the panel-space id of the active conversation, or `undefined` when none is active.
|
|
@@ -3794,7 +4648,8 @@ export declare type UploadMode = 'overwrite' | 'create-only';
|
|
|
3794
4648
|
* 1. If the active conversation is not present in the list, requests a
|
|
3795
4649
|
* refresh. The list and refresh callback are intentionally excluded from
|
|
3796
4650
|
* the dependency array to avoid a refresh-loop on every list update.
|
|
3797
|
-
* 2. Marks the active conversation as viewed
|
|
4651
|
+
* 2. Marks the active conversation as viewed when its matching identity becomes
|
|
4652
|
+
* available. List refreshes and persistence rollback do not retry the write.
|
|
3798
4653
|
*/
|
|
3799
4654
|
export declare const useActiveConversationSync: ({ activeConversationId, items, refreshConversations, markConversationViewed, conversationIdsMatch, toPanelConversationId, }: UseActiveConversationSyncParams) => string | undefined;
|
|
3800
4655
|
|
|
@@ -3820,6 +4675,25 @@ export declare interface UseActiveConversationSyncParams {
|
|
|
3820
4675
|
toPanelConversationId: (id: string) => string;
|
|
3821
4676
|
}
|
|
3822
4677
|
|
|
4678
|
+
/** Loads fresh service statuses without coupling proactive credentials to a live completion. */
|
|
4679
|
+
export declare const useApplicationCredentials: ({ appId, externalServicesClient, offlineCredentialsClient, }: UseApplicationCredentialsParams) => {
|
|
4680
|
+
services: ApplicationExternalServiceDto[];
|
|
4681
|
+
isOfflineConnected: boolean;
|
|
4682
|
+
isLoading: boolean;
|
|
4683
|
+
hasError: boolean;
|
|
4684
|
+
refresh: () => Promise<void>;
|
|
4685
|
+
};
|
|
4686
|
+
|
|
4687
|
+
/** Configured operations for loading application credential metadata. */
|
|
4688
|
+
export declare interface UseApplicationCredentialsParams {
|
|
4689
|
+
/** Application identifier passed through to the configured client. */
|
|
4690
|
+
appId: string;
|
|
4691
|
+
/** Host-configured external-services API. */
|
|
4692
|
+
externalServicesClient: Pick<ExternalServicesApi, 'listExternalServices'>;
|
|
4693
|
+
/** Host-configured offline-credentials API. */
|
|
4694
|
+
offlineCredentialsClient: Pick<OfflineCredentialsApi, 'getOfflineCredentials'>;
|
|
4695
|
+
}
|
|
4696
|
+
|
|
3823
4697
|
/**
|
|
3824
4698
|
* Generic single-slot pending / loading / error state machine for
|
|
3825
4699
|
* confirmation dialogs that trigger an async operation.
|
|
@@ -3862,8 +4736,8 @@ export declare const useAttachmentUpload: ({ filesApi, bucket, onNetworkError, d
|
|
|
3862
4736
|
|
|
3863
4737
|
/** Parameters for {@link useAttachmentUpload}. */
|
|
3864
4738
|
export declare interface UseAttachmentUploadParams {
|
|
3865
|
-
/** Already-configured
|
|
3866
|
-
filesApi: Pick<FilesApi, 'uploadFile'
|
|
4739
|
+
/** Already-configured client; optional listing skips stored names after a conflict. */
|
|
4740
|
+
filesApi: Pick<FilesApi, 'uploadFile'> & Partial<Pick<FilesApi, 'listFiles'>>;
|
|
3867
4741
|
/** DIAL Core bucket the file is uploaded into. */
|
|
3868
4742
|
bucket: string | undefined;
|
|
3869
4743
|
/** Called with batched filenames after a burst of network-error upload failures. */
|
|
@@ -3883,12 +4757,14 @@ export declare interface UseAttachmentUploadResult {
|
|
|
3883
4757
|
* MIME types, debouncing a burst of rejected files into a single
|
|
3884
4758
|
* `onValidationError` call rather than firing one per file.
|
|
3885
4759
|
*/
|
|
3886
|
-
export declare const useAttachmentValidation: ({ allowedMimeTypes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
|
|
4760
|
+
export declare const useAttachmentValidation: ({ allowedMimeTypes, maxFileSizeBytes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
|
|
3887
4761
|
|
|
3888
4762
|
/** Parameters for {@link useAttachmentValidation}. */
|
|
3889
4763
|
export declare interface UseAttachmentValidationParams {
|
|
3890
4764
|
/** Resolved MIME types currently allowed for attachments. */
|
|
3891
4765
|
allowedMimeTypes: string[];
|
|
4766
|
+
/** Maximum attachment file size, in bytes. When omitted, no file is rejected for size. */
|
|
4767
|
+
maxFileSizeBytes?: number;
|
|
3892
4768
|
/** Called with a structured event when a rejected attachment is reported, at most once per debounce window. */
|
|
3893
4769
|
onValidationError?: (event: AttachmentValidationErrorEvent) => void;
|
|
3894
4770
|
/** Debounce window, in ms, before firing `onValidationError` for a rejected file. Defaults to `100`. */
|
|
@@ -3913,7 +4789,7 @@ export declare interface UseAttachmentValidationResult {
|
|
|
3913
4789
|
* item through the endpoint its type owns and refetching/notifying on
|
|
3914
4790
|
* completion, and building the Create dropdown's options.
|
|
3915
4791
|
*/
|
|
3916
|
-
export declare const useCatalogEditNavigation: ({ deployments, isCustomAppsEnabled, isSchemaAppsEnabled, isHideCustomAppCreationEnabled, isToolsetsEnabled, isPromptsEnabled,
|
|
4792
|
+
export declare const useCatalogEditNavigation: ({ deployments, isCustomAppsEnabled, isSchemaAppsEnabled, isHideCustomAppCreationEnabled, isToolsetsEnabled, isPromptsEnabled, schemas, urls, onNavigate, deletePrompt, deleteToolset, deleteSkill, deleteApplication, refetchPrompts, refetchToolsets, refetchSkills, refetchDeployments, onDeleteSuccess, labels, onNotify, onSkillUploadClick, }: UseCatalogEditNavigationParams) => UseCatalogEditNavigationResult;
|
|
3917
4793
|
|
|
3918
4794
|
/** Parameters accepted by {@link useCatalogEditNavigation}. */
|
|
3919
4795
|
export declare interface UseCatalogEditNavigationParams {
|
|
@@ -3923,8 +4799,8 @@ export declare interface UseCatalogEditNavigationParams {
|
|
|
3923
4799
|
isHideCustomAppCreationEnabled: boolean;
|
|
3924
4800
|
isToolsetsEnabled: boolean;
|
|
3925
4801
|
isPromptsEnabled: boolean;
|
|
3926
|
-
/**
|
|
3927
|
-
|
|
4802
|
+
/** Application type schemas (runners) loaded at startup; each one except the custom-app schema gets its own Create option. */
|
|
4803
|
+
schemas: ApplicationSchemaSummaryDto[];
|
|
3928
4804
|
/** Already-configured editor-route URL builders. */
|
|
3929
4805
|
urls: CatalogEditNavigationUrls;
|
|
3930
4806
|
/** Navigates the host to a URL built by `urls`. */
|
|
@@ -3955,7 +4831,10 @@ export declare interface UseCatalogEditNavigationParams {
|
|
|
3955
4831
|
export declare interface UseCatalogEditNavigationResult {
|
|
3956
4832
|
handleEdit: (item: CatalogItem) => void;
|
|
3957
4833
|
handleDelete: (item: CatalogItem) => Promise<void>;
|
|
4834
|
+
/** The Create dropdown's items: runners and static options sorted together by label, all filtered by `createSearch.value`. */
|
|
3958
4835
|
createOptions: DropdownItem[];
|
|
4836
|
+
/** The Create menu's search field state, or `undefined` when no runner option is offered. */
|
|
4837
|
+
createSearch: CatalogCreateSearch | undefined;
|
|
3959
4838
|
}
|
|
3960
4839
|
|
|
3961
4840
|
/**
|
|
@@ -4218,7 +5097,8 @@ export declare interface UseConversationHandlersResult {
|
|
|
4218
5097
|
* `.dial`/`.zip`, v5 envelope, old- or new-chat origin) once per file, then
|
|
4219
5098
|
* re-uploads any archive attachments to `uploads/<YYYY-MM>/` —
|
|
4220
5099
|
* disambiguating a name collision with a ` (n)` suffix instead of rejecting
|
|
4221
|
-
* it — rewrites attachment references (and renamed titles),
|
|
5100
|
+
* it — rewrites attachment references (and renamed titles), drops any
|
|
5101
|
+
* reference still pointing into another user's bucket, regenerates each
|
|
4222
5102
|
* conversation's id/path with a fresh UUID (collision-free save, no replace
|
|
4223
5103
|
* dialog), and persists every conversation through the injected
|
|
4224
5104
|
* `conversationsApi`. One job per imported file, not per conversation.
|
|
@@ -4288,10 +5168,14 @@ export declare interface UseConversationLookupMapsParams {
|
|
|
4288
5168
|
* Returns a memoised array whose shape is compatible with the conversation
|
|
4289
5169
|
* panel's item contract. All app-specific concerns (icon URL resolution,
|
|
4290
5170
|
* route generation, id normalisation) are injected via resolver callbacks.
|
|
5171
|
+
*
|
|
5172
|
+
* While every input except `items` is unchanged, a DTO that is referentially
|
|
5173
|
+
* the same as in the previous render maps to the same item object, so a list
|
|
5174
|
+
* change (or a navigation that re-derives the list) re-renders only the rows
|
|
5175
|
+
* whose DTO actually changed.
|
|
4291
5176
|
*/
|
|
4292
|
-
export declare const useConversationPanelItems: ({ items, deployments, isDeploymentsLoading, toPanelConversationId, resolveIconUrl, resolveIconTooltip, resolveHref,
|
|
4293
|
-
|
|
4294
|
-
taskBadgeLabel?: string | undefined;
|
|
5177
|
+
export declare const useConversationPanelItems: ({ items, deployments, isDeploymentsLoading, toPanelConversationId, resolveIconUrl, resolveIconTooltip, resolveHref, resolveTaskPresentation, }: UseConversationPanelItemsParams) => {
|
|
5178
|
+
leadingIcon?: ReactNode;
|
|
4295
5179
|
isUnread?: boolean | undefined;
|
|
4296
5180
|
id: string;
|
|
4297
5181
|
title: string;
|
|
@@ -4327,11 +5211,12 @@ export declare interface UseConversationPanelItemsResolvers {
|
|
|
4327
5211
|
/** Resolves the href to navigate to when the conversation row is clicked. */
|
|
4328
5212
|
resolveHref: (panelConversationId: string) => string;
|
|
4329
5213
|
/**
|
|
4330
|
-
* Returns
|
|
4331
|
-
*
|
|
5214
|
+
* Returns the row presentation for a scheduled-task conversation — a
|
|
5215
|
+
* host-rendered leading icon that replaces the deployment avatar, and the
|
|
5216
|
+
* unread flag — or `undefined` for an ordinary conversation.
|
|
4332
5217
|
*/
|
|
4333
|
-
|
|
4334
|
-
|
|
5218
|
+
resolveTaskPresentation?: (item: ConversationListItemDto) => {
|
|
5219
|
+
leadingIcon?: ReactNode;
|
|
4335
5220
|
isUnread: boolean;
|
|
4336
5221
|
} | undefined;
|
|
4337
5222
|
}
|
|
@@ -4398,7 +5283,7 @@ export declare interface UseConversationSourcesResult {
|
|
|
4398
5283
|
uploaded: DisplayAttachment[];
|
|
4399
5284
|
/** Deduplicated attachments the assistant generated across the conversation. */
|
|
4400
5285
|
generated: DisplayAttachment[];
|
|
4401
|
-
/** Quotation sources referenced by assistant messages, deduplicated by URL
|
|
5286
|
+
/** Quotation sources referenced by assistant messages, deduplicated by URL; PDF sources are qualified with `#page=N`. */
|
|
4402
5287
|
sources: QuotationSource[];
|
|
4403
5288
|
}
|
|
4404
5289
|
|
|
@@ -4410,7 +5295,7 @@ export declare interface UseConversationSourcesResult {
|
|
|
4410
5295
|
* `transport`/`generation`/`channel`/`overlay` capabilities rather than any
|
|
4411
5296
|
* app context or `server-api` import.
|
|
4412
5297
|
*/
|
|
4413
|
-
export declare const useConversationStream: ({ conversationId, state: { setConversation, conversationRef }, transport, generation: { startGeneration, completeGeneration }, channel, overlay, onStopError, generationConflictMessage, }: UseConversationStreamParams) => UseConversationStreamResult;
|
|
5298
|
+
export declare const useConversationStream: ({ conversationId, state: { setConversation, conversationRef }, transport, generation: { startGeneration, completeGeneration }, channel, overlay, onStopError, generationConflictMessage, generationPersistenceErrorMessage, onStreamError, batchChunksPerFrame, }: UseConversationStreamParams) => UseConversationStreamResult;
|
|
4414
5299
|
|
|
4415
5300
|
/** Parameters for {@link useConversationStream}. */
|
|
4416
5301
|
export declare interface UseConversationStreamParams {
|
|
@@ -4428,17 +5313,39 @@ export declare interface UseConversationStreamParams {
|
|
|
4428
5313
|
* {@link DEFAULT_GENERATION_CONFLICT_MESSAGE}.
|
|
4429
5314
|
*/
|
|
4430
5315
|
generationConflictMessage?: string;
|
|
5316
|
+
/** Host-translated warning shown when the received answer could not be saved. */
|
|
5317
|
+
generationPersistenceErrorMessage?: string;
|
|
5318
|
+
/**
|
|
5319
|
+
* Receives the original error of every failed stream. The hook shows only
|
|
5320
|
+
* host-supplied or upstream-supplied text on the message bubble and hides
|
|
5321
|
+
* transport detail (e.g. `Failed to fetch`), so this is where the host can
|
|
5322
|
+
* still log or report the raw error.
|
|
5323
|
+
*/
|
|
5324
|
+
onStreamError?: (error: Error) => void;
|
|
5325
|
+
/**
|
|
5326
|
+
* Coalesces the displayed chunk updates into one `setConversation` per
|
|
5327
|
+
* animation frame. Chunks still reach the per-path buffer immediately, and
|
|
5328
|
+
* any pending update is flushed before completion, error, stop, or a
|
|
5329
|
+
* superseding generation. Defaults to `false` (one update per chunk).
|
|
5330
|
+
*/
|
|
5331
|
+
batchChunksPerFrame?: boolean;
|
|
4431
5332
|
}
|
|
4432
5333
|
|
|
4433
5334
|
/** Return value of {@link useConversationStream}. */
|
|
4434
5335
|
export declare interface UseConversationStreamResult {
|
|
4435
|
-
startStream: (conversationId: string, userContent: string, messageIndex: number, model: string, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum) => void;
|
|
5336
|
+
startStream: (conversationId: string, userContent: string, messageIndex: number, model: string, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum, options?: StartStreamOptions) => void;
|
|
4436
5337
|
handleStop: () => void;
|
|
4437
5338
|
resumeIfAwaitingGeneration: (currentConversationId: string, conversation: Conversation) => void;
|
|
4438
5339
|
/** Restores the accumulated live assistant message when its conversation is loaded again before completion. */
|
|
4439
5340
|
restoreBufferedGeneration: (currentConversationId: string, conversation: Conversation) => Conversation;
|
|
4440
5341
|
isStreaming: boolean;
|
|
4441
5342
|
canStopStreaming: boolean;
|
|
5343
|
+
/** Whether the displayed conversation's terminal read failed. */
|
|
5344
|
+
hasConversationReloadError: boolean;
|
|
5345
|
+
/** Whether a retry of that read is in flight. */
|
|
5346
|
+
isReloadingConversation: boolean;
|
|
5347
|
+
/** Retries the failed read without saving or regenerating the answer. */
|
|
5348
|
+
retryConversationReload: () => Promise<void>;
|
|
4442
5349
|
}
|
|
4443
5350
|
|
|
4444
5351
|
/**
|
|
@@ -4446,14 +5353,14 @@ export declare interface UseConversationStreamResult {
|
|
|
4446
5353
|
* tree's expand/collapse state, search, and the shared per-folder cache that
|
|
4447
5354
|
* `useDialFileUploadBatch`/`useDialFileMutations`/`useDialFileSharing` invalidate
|
|
4448
5355
|
* through `invalidateFolders`/`bumpRetry` after their own mutations settle
|
|
4449
|
-
* (design.md D1) — this hook is the sole owner/writer of that cache.
|
|
5356
|
+
* (`openspec/changes/archive/2026-07-21-split-use-dial-file-manager/design.md` D1) — this hook is the sole owner/writer of that cache.
|
|
4450
5357
|
*
|
|
4451
5358
|
* Supports three listing sources via `activeTab`:
|
|
4452
5359
|
* - my_files: user's own bucket via `DialFilesApi.listFiles`
|
|
4453
5360
|
* - shared: files shared with the user via `DialFilesApi.listSharedFiles`
|
|
4454
5361
|
* - organization: public bucket via `DialFilesApi.listPublicFiles`
|
|
4455
5362
|
*/
|
|
4456
|
-
export declare const useDialFileListing: ({ filesApi, bucket, rootLabel, activeTab, onNotification, }: UseDialFileListingOptions) => UseDialFileListingResult;
|
|
5363
|
+
export declare const useDialFileListing: ({ filesApi, bucket, rootLabel, activeTab, onNotification, isActive, sessionKey, }: UseDialFileListingOptions) => UseDialFileListingResult;
|
|
4457
5364
|
|
|
4458
5365
|
/** Options accepted by `useDialFileListing`. */
|
|
4459
5366
|
export declare interface UseDialFileListingOptions {
|
|
@@ -4467,6 +5374,10 @@ export declare interface UseDialFileListingOptions {
|
|
|
4467
5374
|
activeTab: DialFileManagerTabs;
|
|
4468
5375
|
/** Called with a structured event when a folder-load operation fails. */
|
|
4469
5376
|
onNotification?: (notification: FileManagerNotification) => void;
|
|
5377
|
+
/** When false, the hook issues no `DialFilesApi` call and reports `isLoading: false`. Defaults to `true`. */
|
|
5378
|
+
isActive?: boolean;
|
|
5379
|
+
/** Changing this value resets cache and navigation exactly like an `activeTab` change. Defaults to `undefined`. */
|
|
5380
|
+
sessionKey?: string;
|
|
4470
5381
|
}
|
|
4471
5382
|
|
|
4472
5383
|
/** Values returned by `useDialFileListing`. */
|
|
@@ -4502,7 +5413,7 @@ export declare interface UseDialFileListingResult {
|
|
|
4502
5413
|
/**
|
|
4503
5414
|
* Deletes the given API-path cache keys so the next listing fetch/expand for
|
|
4504
5415
|
* that folder re-fetches from the server. The only way sibling sub-hooks may
|
|
4505
|
-
* invalidate the shared cache (design.md D1).
|
|
5416
|
+
* invalidate the shared cache (`openspec/changes/archive/2026-07-21-split-use-dial-file-manager/design.md` D1).
|
|
4506
5417
|
*/
|
|
4507
5418
|
invalidateFolders: (apiPaths: string[]) => void;
|
|
4508
5419
|
/** Merges a just-created folder into its parent's cache entry (optimistic display for create-folder). */
|
|
@@ -4523,7 +5434,7 @@ export declare interface UseDialFileListingResult {
|
|
|
4523
5434
|
* every translated string reaches it through `labels`,
|
|
4524
5435
|
* `disabledNewButtonTooltip`, and `buildValidationErrorMessage`.
|
|
4525
5436
|
*/
|
|
4526
|
-
export declare const useDialFileManager: ({ filesApi, bucket, rootLabel, activeTab, onNotification, onOperationSuccess, forbiddenSymbolsRegExp, variant, actionProfile, labels, locale, disabledNewButtonTooltip, downloadDestination, buildValidationErrorMessage, }: UseDialFileManagerOptions) => UseDialFileManagerResult;
|
|
5437
|
+
export declare const useDialFileManager: ({ filesApi, bucket, rootLabel, activeTab, isActive, sessionKey, onNotification, onOperationSuccess, forbiddenSymbolsRegExp, variant, actionProfile, labels, locale, disabledNewButtonTooltip, downloadDestination, buildValidationErrorMessage, }: UseDialFileManagerOptions) => UseDialFileManagerResult;
|
|
4527
5438
|
|
|
4528
5439
|
export declare interface UseDialFileManagerOptions {
|
|
4529
5440
|
/** Injected operation port used for every file-manager network call. */
|
|
@@ -4534,6 +5445,10 @@ export declare interface UseDialFileManagerOptions {
|
|
|
4534
5445
|
rootLabel?: string;
|
|
4535
5446
|
/** Active tab — drives listing source and per-tab options. Defaults to MyFiles. */
|
|
4536
5447
|
activeTab?: DialFileManagerTabs;
|
|
5448
|
+
/** When false, the listing issues no `DialFilesApi` call and reports `isLoading: false`. Defaults to `true`. */
|
|
5449
|
+
isActive?: boolean;
|
|
5450
|
+
/** Changing this value resets cache and navigation exactly like an `activeTab` change. Defaults to `undefined`. */
|
|
5451
|
+
sessionKey?: string;
|
|
4537
5452
|
/** Called when a file-manager action should surface a toast notification. */
|
|
4538
5453
|
onNotification?: (notification: FileManagerNotification) => void;
|
|
4539
5454
|
/** Called when a mutation succeeds, instead of invoking an application notification service directly. */
|
|
@@ -4588,7 +5503,7 @@ export declare interface UseDialFileManagerResult {
|
|
|
4588
5503
|
onSearchFiles: (folder: string, query: string) => void;
|
|
4589
5504
|
/** Search: true while a search request is in flight. */
|
|
4590
5505
|
isSearching: boolean;
|
|
4591
|
-
/** Search: flat
|
|
5506
|
+
/** Search: flat, unfiltered recursive listing of the current folder, or null when search is not active. */
|
|
4592
5507
|
searchResults: DialFile[] | null;
|
|
4593
5508
|
/** Search: clears results and exits search mode. */
|
|
4594
5509
|
clearSearchResults: () => void;
|
|
@@ -4612,7 +5527,9 @@ export declare interface UseDialFileManagerResult {
|
|
|
4612
5527
|
uploadBatchState: FileUploadBatchState | null;
|
|
4613
5528
|
/** Upload: abort all in-flight and queued uploads. */
|
|
4614
5529
|
cancelUpload: () => void;
|
|
4615
|
-
/** Upload:
|
|
5530
|
+
/** Upload: abort one queued or in-flight upload by its entry id. */
|
|
5531
|
+
cancelUploadFile: (id: string) => void;
|
|
5532
|
+
/** Upload: empty the upload queue. */
|
|
4616
5533
|
clearUploadBatch: () => void;
|
|
4617
5534
|
/** Folder creation: called when user confirms a new folder name. */
|
|
4618
5535
|
onCreateFolder: (file: DialUploadFileItem, folderPath: string, fileId: string) => Promise<void>;
|
|
@@ -4679,7 +5596,7 @@ export declare interface UseDialFileManagerResult {
|
|
|
4679
5596
|
/**
|
|
4680
5597
|
* True while any mutating file-manager operation is in flight: the OR of
|
|
4681
5598
|
* `isCreatingFolder`, `isDownloading`, `isDeleting`, `isRenaming`, `isCopying`,
|
|
4682
|
-
* `isMoving`, `isUnsharing`, `isRemovingAccess`, and
|
|
5599
|
+
* `isMoving`, `isUnsharing`, `isRemovingAccess`, and any upload still queued or running.
|
|
4683
5600
|
*
|
|
4684
5601
|
* Deliberately excludes three flags, each already fully contained by its own
|
|
4685
5602
|
* scoped loading UI:
|
|
@@ -4690,17 +5607,42 @@ export declare interface UseDialFileManagerResult {
|
|
|
4690
5607
|
isAnyOperationInProgress: boolean;
|
|
4691
5608
|
}
|
|
4692
5609
|
|
|
5610
|
+
/**
|
|
5611
|
+
* Composes one `useDialFileManager` per source tab (My files, Shared,
|
|
5612
|
+
* Organization) so the File storage page can offer an All tab without a
|
|
5613
|
+
* second copy of the per-tab rules. On a single tab it returns that section's
|
|
5614
|
+
* result; on All it merges the section roots into one tree and routes every
|
|
5615
|
+
* callback to the section owning the path. Section availability and names
|
|
5616
|
+
* arrive through `sections` — the hook reads no config, i18n, or context.
|
|
5617
|
+
*/
|
|
5618
|
+
export declare const useDialFileManagerSections: ({ activeTab, sections, ...managerOptions }: UseDialFileManagerSectionsOptions) => UseDialFileManagerSectionsResult;
|
|
5619
|
+
|
|
5620
|
+
/** Options accepted by `useDialFileManagerSections`. */
|
|
5621
|
+
export declare interface UseDialFileManagerSectionsOptions extends Omit<UseDialFileManagerOptions, 'activeTab' | 'rootLabel' | 'isActive' | 'sessionKey'> {
|
|
5622
|
+
/** Active tab, including `DialFileManagerTabs.All`. */
|
|
5623
|
+
activeTab: DialFileManagerTabs;
|
|
5624
|
+
/** Enabled source tabs in display order, each with its translated top-level folder name. */
|
|
5625
|
+
sections: DialFileManagerSection[];
|
|
5626
|
+
}
|
|
5627
|
+
|
|
5628
|
+
/** Values returned by `useDialFileManagerSections`. */
|
|
5629
|
+
export declare interface UseDialFileManagerSectionsResult extends UseDialFileManagerResult {
|
|
5630
|
+
/** Source tab of the browsed folder; never `DialFileManagerTabs.All`. */
|
|
5631
|
+
sectionTab: DialFileManagerTabs;
|
|
5632
|
+
}
|
|
5633
|
+
|
|
4693
5634
|
/**
|
|
4694
5635
|
* Filters the file-manager's tab list down to the host's configured set and
|
|
4695
5636
|
* resets `activeTab` to the highest-priority still-enabled tab when the
|
|
4696
5637
|
* current one becomes excluded. A `fileManagerTabs` of `undefined` means no
|
|
4697
5638
|
* restriction — every tab in `allTabs` stays enabled and no reset ever fires.
|
|
5639
|
+
* The All tab is kept only while at least two source tabs are enabled.
|
|
4698
5640
|
*/
|
|
4699
|
-
export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs:
|
|
5641
|
+
export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: FilterChipItem<DialFileManagerTabs>[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
|
|
4700
5642
|
|
|
4701
5643
|
/** Values returned by `useDialFileManagerTabConfig`. */
|
|
4702
5644
|
export declare interface UseDialFileManagerTabConfigResult {
|
|
4703
|
-
tabs:
|
|
5645
|
+
tabs: FileTreeOptions['tabs'];
|
|
4704
5646
|
}
|
|
4705
5647
|
|
|
4706
5648
|
/**
|
|
@@ -4825,10 +5767,11 @@ export declare interface UseDialFileSharingResult {
|
|
|
4825
5767
|
|
|
4826
5768
|
/**
|
|
4827
5769
|
* Manages upload batches (single-file and ZIP-archive extraction), including
|
|
4828
|
-
* concurrency-limited progress tracking and abort.
|
|
4829
|
-
*
|
|
4830
|
-
* `
|
|
4831
|
-
* cache
|
|
5770
|
+
* concurrency-limited progress tracking and per-file abort. A batch started
|
|
5771
|
+
* while another is on screen is appended to it, and settled entries stay in
|
|
5772
|
+
* `uploadBatchState` until `clearUploadBatch`. Invalidates the shared listing
|
|
5773
|
+
* cache for the destination folder through `invalidateFolders`/`bumpRetry`
|
|
5774
|
+
* after a batch settles — it never holds its own copy of the cache.
|
|
4832
5775
|
*/
|
|
4833
5776
|
export declare const useDialFileUploadBatch: ({ filesApi, bucket, rootLabel, activeTab, cache, sharedRootMetaRef, invalidateFolders, bumpRetry, onNotification, }: UseDialFileUploadBatchOptions) => UseDialFileUploadBatchResult;
|
|
4834
5777
|
|
|
@@ -4861,6 +5804,7 @@ export declare interface UseDialFileUploadBatchResult {
|
|
|
4861
5804
|
onValidateUpload: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => Promise<FileUploadValidationResult>;
|
|
4862
5805
|
uploadBatchState: FileUploadBatchState | null;
|
|
4863
5806
|
cancelUpload: () => void;
|
|
5807
|
+
cancelUploadFile: (id: string) => void;
|
|
4864
5808
|
clearUploadBatch: () => void;
|
|
4865
5809
|
}
|
|
4866
5810
|
|
|
@@ -4889,6 +5833,64 @@ export declare interface UseFavoriteEntitiesStateResult {
|
|
|
4889
5833
|
toggleFavorite: (id: string, isFavorite: boolean, entityType?: FavoriteEntityType) => Promise<void>;
|
|
4890
5834
|
}
|
|
4891
5835
|
|
|
5836
|
+
/**
|
|
5837
|
+
* Composes the file-manager tab/listing hooks into the stateful part of an attachment picker:
|
|
5838
|
+
* active tab, selected paths, and hidden-path/MIME/size/folder row eligibility. Returns the
|
|
5839
|
+
* existing `useDialFileManager` controller unchanged and the selection/tab/eligibility fields
|
|
5840
|
+
* `FileManagerAttachModal` already consumes — it composes that modal, it does not replace it.
|
|
5841
|
+
* Final attachment filtering, deduplication, and count enforcement stay owned by the modal.
|
|
5842
|
+
*/
|
|
5843
|
+
export declare const useFileAttachmentPicker: ({ fileManagerOptions, bucket, forbiddenSymbolsRegExp, tabLabels, allowedTabs, initialTab, allowedTypes, maxSelectableFileSize, canAttachFolders, }: UseFileAttachmentPickerOptions) => UseFileAttachmentPickerResult;
|
|
5844
|
+
|
|
5845
|
+
/** Options accepted by {@link useFileAttachmentPicker}. */
|
|
5846
|
+
export declare interface UseFileAttachmentPickerOptions {
|
|
5847
|
+
/**
|
|
5848
|
+
* Configured `useDialFileManager` options besides the values this hook derives:
|
|
5849
|
+
* `bucket`, `activeTab`, `rootLabel`, `variant`, and `forbiddenSymbolsRegExp`.
|
|
5850
|
+
*/
|
|
5851
|
+
fileManagerOptions: Omit<UseDialFileManagerOptions, 'bucket' | 'activeTab' | 'rootLabel' | 'variant' | 'forbiddenSymbolsRegExp'>;
|
|
5852
|
+
/** DIAL Core bucket to browse. */
|
|
5853
|
+
bucket: string;
|
|
5854
|
+
/** Regexp of characters forbidden in file/folder names, forwarded to `useDialFileManager`. */
|
|
5855
|
+
forbiddenSymbolsRegExp?: RegExp;
|
|
5856
|
+
/** Host-translated label per tab; also supplies the active tab's root-folder label. */
|
|
5857
|
+
tabLabels: Record<DialFileManagerTabs, string>;
|
|
5858
|
+
/** Tab ids the host's configuration allows. `undefined` allows every tab. */
|
|
5859
|
+
allowedTabs?: string[];
|
|
5860
|
+
/** Initial active tab. Defaults to `DialFileManagerTabs.MyFiles`. */
|
|
5861
|
+
initialTab?: DialFileManagerTabs;
|
|
5862
|
+
/** MIME types eligible for selection/upload. Empty or absent allows every type. */
|
|
5863
|
+
allowedTypes?: string[];
|
|
5864
|
+
/** Files at or below this size (bytes) remain eligible; absent allows any size. */
|
|
5865
|
+
maxSelectableFileSize?: number;
|
|
5866
|
+
/** Whether folder rows are eligible for selection. Defaults to `false`. */
|
|
5867
|
+
canAttachFolders?: boolean;
|
|
5868
|
+
}
|
|
5869
|
+
|
|
5870
|
+
/** Result returned by {@link useFileAttachmentPicker}. */
|
|
5871
|
+
export declare interface UseFileAttachmentPickerResult {
|
|
5872
|
+
/** The composed file-manager controller; forward to `FileManagerAttachModal`'s `controller` prop. */
|
|
5873
|
+
controller: UseDialFileManagerResult;
|
|
5874
|
+
/** Active tab. */
|
|
5875
|
+
activeTab: DialFileManagerTabs;
|
|
5876
|
+
/** Tab list filtered to `allowedTabs`; forward to `FileManagerAttachModal`'s `tabs` prop. */
|
|
5877
|
+
tabs: FileTreeOptions['tabs'];
|
|
5878
|
+
/** Switches the active tab and clears the current selection. */
|
|
5879
|
+
onTabChange: (tab: DialFileManagerTabs) => void;
|
|
5880
|
+
/** Currently selected paths. */
|
|
5881
|
+
selectedPaths: Set<string>;
|
|
5882
|
+
/** Replaces the selection with a defensive copy of the given set. */
|
|
5883
|
+
onSelectedPathsChange: (paths: Set<string>) => void;
|
|
5884
|
+
/** Row eligibility predicate; forward to `FileManagerAttachModal`'s `isRowSelectable` prop. */
|
|
5885
|
+
isRowSelectable: (node: {
|
|
5886
|
+
data?: FileManagerSelectableNode | null;
|
|
5887
|
+
}) => boolean;
|
|
5888
|
+
/** MIME eligibility predicate; forward to `FileManagerAttachModal`'s `isFileTypeAllowed` prop. */
|
|
5889
|
+
isFileTypeAllowed: (contentType: string) => boolean;
|
|
5890
|
+
/** Accepted upload MIME types; forward to `FileManagerAttachModal`'s `allowedFileTypes` prop. */
|
|
5891
|
+
allowedFileTypes: DialFileAcceptType[] | undefined;
|
|
5892
|
+
}
|
|
5893
|
+
|
|
4892
5894
|
export { useGridEditingScroll }
|
|
4893
5895
|
|
|
4894
5896
|
export { UseGridEditingScrollOptions }
|
|
@@ -4932,10 +5934,11 @@ export declare interface UseImportFilePickerResult {
|
|
|
4932
5934
|
* Builds the `McpAppHostAdapter` a host injects into `@epam/ai-dial-mcp-apps`'s
|
|
4933
5935
|
* hooks/components, wiring the library's host-context/tool-call/resource-fetch
|
|
4934
5936
|
* contract to a configured `McpAppsApiClient` and this app's theme/locale/config
|
|
4935
|
-
* values (`hostContextParams`, `sandboxUrl`)
|
|
4936
|
-
*
|
|
5937
|
+
* values (`hostContextParams`, `sandboxUrl`), plus the host's own identity
|
|
5938
|
+
* (`hostInfo`) — this hook itself never reads app context, so a host builds
|
|
5939
|
+
* those values wherever it already has them.
|
|
4937
5940
|
*/
|
|
4938
|
-
export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams) => McpAppHostAdapter;
|
|
5941
|
+
export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams, hostInfo: Implementation) => McpAppHostAdapter;
|
|
4939
5942
|
|
|
4940
5943
|
/**
|
|
4941
5944
|
* Builds the `McpUiHostContext` delivered to a mounted MCP App during its
|
|
@@ -4965,6 +5968,35 @@ export declare const useMcpAppHostContext: (displayMode: "inline" | "fullscreen"
|
|
|
4965
5968
|
*/
|
|
4966
5969
|
export declare const useMcpAppTools: (client: McpAppsApiClient, deployment: DeploymentItemDto | undefined, messages: Message[], toolsets: DialToolsetDto[]) => McpAppToolRef[];
|
|
4967
5970
|
|
|
5971
|
+
/**
|
|
5972
|
+
* Captures eligible message text and creates Reply files for an existing composer
|
|
5973
|
+
* attachment flow without acquiring host deployment, upload or localization knowledge.
|
|
5974
|
+
*/
|
|
5975
|
+
export declare const useMessageSelectionReply: ({ conversationId, enabled, droppedFiles, onDroppedFilesConsumed, }: UseMessageSelectionReplyParams) => {
|
|
5976
|
+
contentRef: (node: HTMLDivElement | null) => (() => void) | undefined;
|
|
5977
|
+
actionRef: RefObject<HTMLDivElement | null>;
|
|
5978
|
+
selection: MessageSelectionReplySnapshot | null;
|
|
5979
|
+
onReply: () => void;
|
|
5980
|
+
dismiss: () => void;
|
|
5981
|
+
pendingFiles: File[];
|
|
5982
|
+
onFilesConsumed: () => void;
|
|
5983
|
+
focusRequestId: number | undefined;
|
|
5984
|
+
onAttachmentsChange: (attachments: Attachment[]) => void;
|
|
5985
|
+
addedRevision: number;
|
|
5986
|
+
};
|
|
5987
|
+
|
|
5988
|
+
/** Parameters accepted by {@link useMessageSelectionReply}. */
|
|
5989
|
+
export declare interface UseMessageSelectionReplyParams {
|
|
5990
|
+
/** Identifier used to discard selection and queued files after a scope change. */
|
|
5991
|
+
conversationId: string;
|
|
5992
|
+
/** Whether the host currently permits a Reply attachment. */
|
|
5993
|
+
enabled: boolean;
|
|
5994
|
+
/** Files from the host's ordinary page-drop queue. */
|
|
5995
|
+
droppedFiles: File[];
|
|
5996
|
+
/** Acknowledges the captured page-drop batch after the composer accepts it. */
|
|
5997
|
+
onDroppedFilesConsumed: () => void;
|
|
5998
|
+
}
|
|
5999
|
+
|
|
4968
6000
|
/**
|
|
4969
6001
|
* Completes an OAuth authorization-code flow from inside the callback popup:
|
|
4970
6002
|
* reads and clears the redirect state written into this popup's own
|
|
@@ -5038,8 +6070,6 @@ export declare const useOpenMcpAppCanvas: (cache: McpAppResponseCache, hostAdapt
|
|
|
5038
6070
|
|
|
5039
6071
|
/** User-facing text `useOpenMcpAppCanvas` needs but cannot resolve itself — a lib must not call `t()`. */
|
|
5040
6072
|
export declare interface UseOpenMcpAppCanvasLabels {
|
|
5041
|
-
/** Canvas panel title while an MCP App is loading or open. */
|
|
5042
|
-
title: string;
|
|
5043
6073
|
/** Error label shown when the resource fetch is forbidden (HTTP 403). */
|
|
5044
6074
|
forbiddenErrorLabel: string;
|
|
5045
6075
|
/** Error label shown for any other resource-load/tool-call failure. */
|
|
@@ -5168,15 +6198,65 @@ export declare interface UsePublishFoldersResult {
|
|
|
5168
6198
|
*/
|
|
5169
6199
|
onCreatePublishFolder: (parentPath: string[], name: string) => Promise<void>;
|
|
5170
6200
|
/**
|
|
5171
|
-
* Records `folderPath` as
|
|
5172
|
-
* so it keeps appearing in the tree on
|
|
5173
|
-
* successful publish.
|
|
6201
|
+
* Records `folderPath` as the most recent publish destination (moving it to
|
|
6202
|
+
* the front if already remembered), so it keeps appearing in the tree on
|
|
6203
|
+
* later publishes. Call it after a successful publish.
|
|
5174
6204
|
*/
|
|
5175
6205
|
rememberPublishFolder: (folderPath: string[]) => void;
|
|
5176
6206
|
/** Heuristic write-access check for a folder path (see the TODO above). */
|
|
5177
6207
|
hasPublishWriteAccess: (folderPath: string[]) => boolean;
|
|
5178
6208
|
}
|
|
5179
6209
|
|
|
6210
|
+
/** Shared, cancellation-safe pagination and background refresh for one schedule's run history. */
|
|
6211
|
+
export declare const useScheduledTaskRuns: (client: ScheduledTasksApiClient, { scheduleId, enabled, pageSize, nextRunTime, }: UseScheduledTaskRunsOptions) => {
|
|
6212
|
+
items: ScheduledTaskRunDto[];
|
|
6213
|
+
isLoading: boolean;
|
|
6214
|
+
isLoadingMore: boolean;
|
|
6215
|
+
initialError: Error | null;
|
|
6216
|
+
loadMoreError: Error | null;
|
|
6217
|
+
hasMore: boolean;
|
|
6218
|
+
loadMore: () => void;
|
|
6219
|
+
retryLoadMore: () => void;
|
|
6220
|
+
refetch: () => void;
|
|
6221
|
+
};
|
|
6222
|
+
|
|
6223
|
+
export declare interface UseScheduledTaskRunsOptions {
|
|
6224
|
+
scheduleId: string;
|
|
6225
|
+
enabled?: boolean;
|
|
6226
|
+
pageSize?: number;
|
|
6227
|
+
/**
|
|
6228
|
+
* The task's next scheduled run time (ISO string), when known. Drives the
|
|
6229
|
+
* one-shot background refresh described on {@link useScheduledTaskRuns}.
|
|
6230
|
+
* The caller already holds the task DTO — this hook never fetches it.
|
|
6231
|
+
*/
|
|
6232
|
+
nextRunTime?: string | null;
|
|
6233
|
+
}
|
|
6234
|
+
|
|
6235
|
+
/** Shared scheduler-list lifecycle with generation-scoped stale-response guards. */
|
|
6236
|
+
export declare const useScheduledTasks: (client: ScheduledTasksApiClient, { enabled, pageSize, debounceMs, initialSearch, initialSort, }?: UseScheduledTasksOptions) => {
|
|
6237
|
+
items: ScheduledTaskDto[];
|
|
6238
|
+
searchQuery: string;
|
|
6239
|
+
setSearchQuery: Dispatch<SetStateAction<string>>;
|
|
6240
|
+
sortKey: "firstToRun" | "lastToRun" | "newest" | "nameAZ";
|
|
6241
|
+
setSortKey: Dispatch<SetStateAction<"firstToRun" | "lastToRun" | "newest" | "nameAZ">>;
|
|
6242
|
+
isLoading: boolean;
|
|
6243
|
+
isLoadingMore: boolean;
|
|
6244
|
+
initialError: Error | null;
|
|
6245
|
+
loadMoreError: Error | null;
|
|
6246
|
+
hasMore: boolean;
|
|
6247
|
+
loadMore: () => void;
|
|
6248
|
+
retryLoadMore: () => void;
|
|
6249
|
+
refetch: () => void;
|
|
6250
|
+
};
|
|
6251
|
+
|
|
6252
|
+
export declare interface UseScheduledTasksOptions {
|
|
6253
|
+
enabled?: boolean;
|
|
6254
|
+
pageSize?: number;
|
|
6255
|
+
debounceMs?: number;
|
|
6256
|
+
initialSearch?: string;
|
|
6257
|
+
initialSort?: ListScheduledTasksSortEnum;
|
|
6258
|
+
}
|
|
6259
|
+
|
|
5180
6260
|
/**
|
|
5181
6261
|
* Resolves and manages share-link data for a DIAL Core resource.
|
|
5182
6262
|
*
|
|
@@ -5217,6 +6297,48 @@ export declare interface UseShareRecipientsCountResult {
|
|
|
5217
6297
|
invalidateRecipientsCount: (itemId: string) => void;
|
|
5218
6298
|
}
|
|
5219
6299
|
|
|
6300
|
+
/**
|
|
6301
|
+
* Headless controller for the skill-archive upload flow: dialog visibility, the exact-filename
|
|
6302
|
+
* precheck, in-flight exclusion, abort-on-close, and import completion. The host supplies the configured request
|
|
6303
|
+
* and observes completion/failure through the injected callbacks; the hook never imports app
|
|
6304
|
+
* contexts, i18n, or a configured API client.
|
|
6305
|
+
*/
|
|
6306
|
+
export declare const useSkillArchiveImport: <TResult>({ importArchive, onImported, onError, manifestFileName, }: UseSkillArchiveImportOptions<TResult>) => UseSkillArchiveImportResult;
|
|
6307
|
+
|
|
6308
|
+
/** Options accepted by {@link useSkillArchiveImport}. */
|
|
6309
|
+
export declare interface UseSkillArchiveImportOptions<TResult> {
|
|
6310
|
+
/** Submits the selected archive; the host owns the client. `signal` aborts when the dialog closes or the hook unmounts mid-upload. */
|
|
6311
|
+
importArchive: (file: File, signal: AbortSignal) => Promise<TResult>;
|
|
6312
|
+
/** Called once after a successful import (and any awaited host follow-up) settles. */
|
|
6313
|
+
onImported: (result: TResult) => void | Promise<void>;
|
|
6314
|
+
/** Called once when the import request, or the host's follow-up in {@link onImported}, fails. */
|
|
6315
|
+
onError: (error: unknown, kind: SkillArchiveImportErrorKind) => void;
|
|
6316
|
+
/** Exact filename treated as the skill manifest. Defaults to `'SKILL.md'`. */
|
|
6317
|
+
manifestFileName?: string;
|
|
6318
|
+
}
|
|
6319
|
+
|
|
6320
|
+
/** Result returned by {@link useSkillArchiveImport}. */
|
|
6321
|
+
export declare interface UseSkillArchiveImportResult {
|
|
6322
|
+
/** Whether the upload dialog is open. */
|
|
6323
|
+
isDialogOpen: boolean;
|
|
6324
|
+
/** Current phase of the import. */
|
|
6325
|
+
status: SkillArchiveImportStatus;
|
|
6326
|
+
/** Whether an import request is in flight; the dialog stays open until it succeeds. */
|
|
6327
|
+
isUploading: boolean;
|
|
6328
|
+
/** Reason the current/last selection was rejected locally; `undefined` once cleared. */
|
|
6329
|
+
selectionRejectionReason: SkillArchiveSelectionRejectionReason | undefined;
|
|
6330
|
+
/** Classified failure of the last import request; `undefined` outside a request failure. */
|
|
6331
|
+
errorKind: SkillArchiveImportErrorKind | undefined;
|
|
6332
|
+
/** Opens the dialog and clears any previous rejection or request failure. */
|
|
6333
|
+
openDialog: () => void;
|
|
6334
|
+
/** Closes the dialog, aborting an in-flight import, and clears any rejection reason. */
|
|
6335
|
+
closeDialog: () => void;
|
|
6336
|
+
/** Wire to the dialog drop zone's `onChange`. */
|
|
6337
|
+
handleFilesSelected: (files: File[]) => void;
|
|
6338
|
+
/** Wire to the dialog drop zone's `onReject`. */
|
|
6339
|
+
handleFilesRejected: () => void;
|
|
6340
|
+
}
|
|
6341
|
+
|
|
5220
6342
|
/**
|
|
5221
6343
|
* Headless data pipeline behind a skill details side panel: resolves the
|
|
5222
6344
|
* selected skill from the listings, maps it to a catalog item with its
|
|
@@ -5318,7 +6440,7 @@ export declare interface UseSkillEditorLoadResult {
|
|
|
5318
6440
|
* `client.createSkill`/`client.updateSkill`, and mapping the resulting
|
|
5319
6441
|
* success/error/conflict outcomes to presentable state.
|
|
5320
6442
|
*/
|
|
5321
|
-
export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, frontmatterRef, loadedPathRef, etagRef, returnUrl, refetchSkills, client, messages, onNavigate, onNotify, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
|
|
6443
|
+
export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, frontmatterRef, loadedPathRef, etagRef, returnUrl, getCreateReturnUrl, refetchSkills, client, messages, onNavigate, onNotify, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
|
|
5322
6444
|
|
|
5323
6445
|
/** Parameters accepted by {@link useSkillEditorSubmit}. */
|
|
5324
6446
|
export declare interface UseSkillEditorSubmitParams {
|
|
@@ -5338,6 +6460,8 @@ export declare interface UseSkillEditorSubmitParams {
|
|
|
5338
6460
|
etagRef: React.MutableRefObject<string | undefined>;
|
|
5339
6461
|
/** Where to navigate on a successful save. */
|
|
5340
6462
|
returnUrl: string;
|
|
6463
|
+
/** Resolves the destination after creation from the normalized skill path. Defaults to `returnUrl`. */
|
|
6464
|
+
getCreateReturnUrl?: (path: string) => string;
|
|
5341
6465
|
/** Refetches the host's skill listing after a successful save. */
|
|
5342
6466
|
refetchSkills: () => Promise<void>;
|
|
5343
6467
|
/** Already-configured create/update operations. */
|
|
@@ -5358,6 +6482,10 @@ export declare interface UseSkillEditorSubmitResult {
|
|
|
5358
6482
|
errors: SkillEditorErrors;
|
|
5359
6483
|
/** General submit-time error, distinct from a stale-edit `conflict`. */
|
|
5360
6484
|
submitError: string | undefined;
|
|
6485
|
+
/** Whether `submitError` was caused by something a plain re-send can clear, rather than by the submission itself. */
|
|
6486
|
+
isSubmitErrorRetryable: boolean;
|
|
6487
|
+
/** Re-submits the values of the attempt that produced `submitError`. No-op before the first submit. */
|
|
6488
|
+
retrySubmit: () => void;
|
|
5361
6489
|
/** Present when the last save hit a stale-ETag conflict. */
|
|
5362
6490
|
conflict: {
|
|
5363
6491
|
message: string;
|
|
@@ -5366,15 +6494,22 @@ export declare interface UseSkillEditorSubmitResult {
|
|
|
5366
6494
|
clearConflict: () => void;
|
|
5367
6495
|
/** Validates and submits the given form values. */
|
|
5368
6496
|
handleSubmit: (values: SkillEditorValues) => Promise<void>;
|
|
6497
|
+
/**
|
|
6498
|
+
* Re-runs the Instructions frontmatter check against the editor's current
|
|
6499
|
+
* values, so a pasted `SKILL.md` is flagged as the text lands rather than
|
|
6500
|
+
* only on submit. Pass as the editor's `onValuesChange`.
|
|
6501
|
+
*/
|
|
6502
|
+
handleValuesChange: (values: SkillEditorValues) => void;
|
|
5369
6503
|
}
|
|
5370
6504
|
|
|
5371
6505
|
/**
|
|
5372
6506
|
* Owns the Skill Editor's batch file upload workflow: validating a staged
|
|
5373
6507
|
* batch, committing it atomically (supporting files plus an optional
|
|
5374
|
-
* `SKILL.md` manifest import, with a confirmation gate),
|
|
6508
|
+
* `SKILL.md` manifest import, with a confirmation gate), creating empty
|
|
6509
|
+
* folders, expanding `.zip` archives for staging, and removing
|
|
5375
6510
|
* already-committed nodes.
|
|
5376
6511
|
*/
|
|
5377
|
-
export declare const useSkillFileActions: ({ files, setFiles, filesContentRef, frontmatterRef, loadedValues, setLoadedValues, isEditMode, isDirty, setSelectedPath, messages, }: UseSkillFileActionsParams) => UseSkillFileActionsResult;
|
|
6512
|
+
export declare const useSkillFileActions: ({ files, setFiles, filesContentRef, frontmatterRef, loadedValues, setLoadedValues, isEditMode, isDirty, setSelectedPath, messages, pickFromFileSystem, }: UseSkillFileActionsParams) => UseSkillFileActionsResult;
|
|
5378
6513
|
|
|
5379
6514
|
/** Parameters accepted by {@link useSkillFileActions}. */
|
|
5380
6515
|
export declare interface UseSkillFileActionsParams {
|
|
@@ -5398,6 +6533,12 @@ export declare interface UseSkillFileActionsParams {
|
|
|
5398
6533
|
setSelectedPath: Dispatch<SetStateAction<string>>;
|
|
5399
6534
|
/** Localized messages, resolved by the host. */
|
|
5400
6535
|
messages: SkillFileActionsMessages;
|
|
6536
|
+
/**
|
|
6537
|
+
* Opens the host's file-system picker; passed through unchanged as
|
|
6538
|
+
* `fileActions.pickFromFileSystem`. Omit to hide the editor's "Open DIAL
|
|
6539
|
+
* file system" entry.
|
|
6540
|
+
*/
|
|
6541
|
+
pickFromFileSystem?: () => Promise<SkillFileSourceEntry[] | undefined>;
|
|
5401
6542
|
}
|
|
5402
6543
|
|
|
5403
6544
|
/** Return value of {@link useSkillFileActions}. */
|
|
@@ -5444,10 +6585,11 @@ export declare interface UseSkillFilePreviewResult {
|
|
|
5444
6585
|
|
|
5445
6586
|
/**
|
|
5446
6587
|
* 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
|
|
6588
|
+
* parse, package file listing, authoritative metadata fetching, overview
|
|
6589
|
+
* construction, and in-package file loads. `useCatalogItemDetails` delegates
|
|
6590
|
+
* its skill branch here; hosts that only surface skill details consume this
|
|
6591
|
+
* hook directly, without the deployment and prompt ports the full catalog
|
|
6592
|
+
* pipeline requires.
|
|
5451
6593
|
*/
|
|
5452
6594
|
export declare const useSkillItemDetails: ({ api, skills, skillOverviewLabels, }: UseSkillItemDetailsOptions) => UseSkillItemDetailsResult;
|
|
5453
6595
|
|
|
@@ -5728,4 +6870,7 @@ export declare enum WithLogin {
|
|
|
5728
6870
|
WithConfig = "with-config"
|
|
5729
6871
|
}
|
|
5730
6872
|
|
|
6873
|
+
/** Returns `sections` with every root label usable as a unique first path segment, falling back to the tab id. */
|
|
6874
|
+
export declare const withRoutableRootLabels: <TSection extends DialFileManagerSection>(sections: readonly TSection[]) => TSection[];
|
|
6875
|
+
|
|
5731
6876
|
export { }
|