@epam/ai-dial-chat-hooks 1.2.0-dev.28 → 1.2.0-dev.284

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/api-error/api-error.js +7 -4
  2. package/attachment/useAttachmentValidation/useAttachmentValidation.js +26 -19
  3. package/attachments.d.ts +10 -4
  4. package/catalog/catalog-derivations.js +1 -1
  5. package/catalog/deployment-id.js +8 -2
  6. package/catalog/map-deployment-limits-to-catalog.js +16 -24
  7. package/catalog/map-deployment-limits-to-input.js +81 -9
  8. package/catalog/map-deployment-to-catalog-item.js +34 -34
  9. package/catalog/map-entity-details-to-catalog.js +7 -0
  10. package/catalog/map-skill-to-catalog-item.js +55 -48
  11. package/catalog/publish.js +6 -5
  12. package/catalog/useApplicationCredentials/useApplicationCredentials.js +39 -0
  13. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +122 -101
  14. package/catalog/usePublishFolders/usePublishFolders.js +1 -1
  15. package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js +39 -39
  16. package/catalog/useSkillItemDetails.js +17 -13
  17. package/catalog.d.ts +139 -34
  18. package/catalog.js +23 -22
  19. package/conversation/conversation-transfer/export-conversation.js +24 -16
  20. package/conversation/conversation-transfer/import-conversation.js +80 -31
  21. package/conversation/conversation-transfer/queue.js +8 -5
  22. package/conversation/create-chat-stream-api.js +85 -49
  23. package/conversation/message-utils.js +44 -2
  24. package/conversation/stage.js +27 -0
  25. package/conversation/useActiveConversationSync/useActiveConversationSync.js +7 -8
  26. package/conversation/useConversationExport/useConversationExport.js +9 -9
  27. package/conversation/useConversationHandlers/useConversationHandlers.js +73 -57
  28. package/conversation/useConversationImport/useConversationImport.js +123 -121
  29. package/conversation/useConversationPanelItems/useConversationPanelItems.js +50 -32
  30. package/conversation/useConversationScroll/useConversationScroll.js +68 -64
  31. package/conversation/useConversationStream/apply-chunk.js +1 -1
  32. package/conversation/useConversationStream/frame-scheduler.js +39 -0
  33. package/conversation/useConversationStream/generation-resume.js +122 -64
  34. package/conversation/useConversationStream/useConversationStream.js +265 -116
  35. package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +189 -0
  36. package/conversation-sources/useConversationSources/useConversationSources.js +31 -24
  37. package/conversation-sources.d.ts +1 -1
  38. package/conversation-transfer.d.ts +2 -1
  39. package/conversation.d.ts +295 -17
  40. package/conversation.js +32 -29
  41. package/file-manager-canvas.d.ts +53 -5
  42. package/file-manager.d.ts +156 -26
  43. package/file-manager.js +25 -23
  44. package/files/attachment-canvas.js +74 -40
  45. package/files/attachment-types.js +14 -13
  46. package/files/dial-file-manager-mapping.util.js +2 -1
  47. package/files/dial-file-manager-path.util.js +23 -1
  48. package/files/dial-file-manager.model.js +23 -19
  49. package/files/dial-file-manager.types.js +3 -3
  50. package/files/useDialFileListing/useDialFileListing.js +139 -127
  51. package/files/useDialFileManager/useDialFileManager.js +132 -128
  52. package/files/useDialFileManagerSections/useDialFileManagerSections.js +155 -0
  53. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +20 -19
  54. package/files/useDialFileMutations/useDialFileMutations.js +33 -32
  55. package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +117 -110
  56. package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +49 -0
  57. package/index.d.ts +1178 -112
  58. package/index.js +136 -122
  59. package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.js +7 -5
  60. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +1 -1
  61. package/mcp-apps/useMcpAppTools/useMcpAppTools.js +1 -1
  62. package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.js +25 -23
  63. package/mcp-apps.d.ts +8 -6
  64. package/oauth/toolset-id.js +5 -3
  65. package/oauth/useToolsetLogin/useToolsetLogin.js +8 -8
  66. package/oauth.d.ts +32 -0
  67. package/oauth.js +9 -9
  68. package/package.json +26 -21
  69. package/scheduled-task/scheduled-task-description.js +81 -0
  70. package/scheduled-task/scheduled-task-preparation.js +24 -0
  71. package/scheduled-task/scheduled-task-trigger.js +74 -71
  72. package/scheduled-task/scheduled-tasks-api-client.js +19 -0
  73. package/scheduled-task/use-scheduled-task-runs.js +194 -0
  74. package/scheduled-task/use-scheduled-tasks.js +93 -0
  75. package/scheduled-tasks.d.ts +197 -3
  76. package/scheduled-tasks.js +7 -2
  77. package/shared/application-schema.js +5 -2
  78. package/shared/cron-day-of-month.js +13 -0
  79. package/skill/skill-archive.js +19 -0
  80. package/skill/skill-types.js +8 -7
  81. package/skill/skill.js +53 -27
  82. package/skill/useSkillArchiveImport/useSkillArchiveImport.js +79 -0
  83. package/skill/useSkillEditorLoad.js +65 -59
  84. package/skill/useSkillEditorSubmit.js +108 -84
  85. package/skill/useSkillFileActions.js +70 -58
  86. package/skill-editor.d.ts +160 -8
  87. package/skill-editor.js +9 -8
  88. package/usage/map-usage-data-to-dashboard.js +66 -0
  89. package/usage/map-user-usage-to-model-limits.js +202 -0
  90. package/usage.d.ts +125 -0
  91. package/usage.js +3 -0
  92. package/usePageFileDrag/usePageFileDrag.js +3 -3
  93. package/utils.d.ts +26 -6
  94. package/utils.js +10 -10
package/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { Annotation } from '@epam/ai-dial-chat-shared';
2
2
  import { AnnotationGroup } from '@epam/ai-dial-quotations';
3
+ import { ApplicationExternalServiceDto } from '@epam/ai-dial-chat-api-client';
4
+ import { ApplicationSchemaSummaryDto } from '@epam/ai-dial-chat-api-client';
3
5
  import { ApplicationVisualizer } from '@epam/ai-dial-chat-shared';
4
6
  import { ArchiveItemDto } from '@epam/ai-dial-chat-api-client';
5
7
  import { Attachment } from '@epam/ai-dial-chat-shared';
@@ -9,6 +11,7 @@ import { AttachmentErrorReason } from '@epam/ai-dial-chat-shared';
9
11
  import { AttachmentResource } from '@epam/ai-dial-chat-shared';
10
12
  import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
11
13
  import { CatalogContentTreeNode } from '@epam/ai-dial-catalog';
14
+ import { CatalogCreateSearch } from '@epam/ai-dial-catalog';
12
15
  import { CatalogEntityType } from '@epam/ai-dial-chat-shared';
13
16
  import { CatalogItem } from '@epam/ai-dial-catalog';
14
17
  import { CatalogItemApiDetails } from '@epam/ai-dial-catalog';
@@ -26,6 +29,7 @@ import { ConversationTransferJob } from '@epam/ai-dial-chat-shared';
26
29
  import { ConversationTransferWarningCode } from '@epam/ai-dial-chat-shared';
27
30
  import { CopyFilesResponseDto } from '@epam/ai-dial-chat-api-client';
28
31
  import { CopyItemDto } from '@epam/ai-dial-chat-api-client';
32
+ import { CreatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
29
33
  import { CreateFolderDto } from '@epam/ai-dial-chat-api-client';
30
34
  import { CreateFolderResponseDto } from '@epam/ai-dial-chat-api-client';
31
35
  import { CreateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
@@ -35,8 +39,6 @@ import type { CustomVisualizerDataLayout } from '@epam/ai-dial-chat-shared';
35
39
  import { DeleteFilesResponseDto } from '@epam/ai-dial-chat-api-client';
36
40
  import { DeleteItemDto } from '@epam/ai-dial-chat-api-client';
37
41
  import { DeploymentConfigurationSchema } from '@epam/ai-dial-chat-shared';
38
- import { DeploymentCreationFormLocaleEntry } from '@epam/ai-dial-builder-form';
39
- import { DeploymentCreationFormLocaleOption } from '@epam/ai-dial-builder-form';
40
42
  import { DeploymentDetailsDto } from '@epam/ai-dial-chat-api-client';
41
43
  import { DeploymentFeatures } from '@epam/ai-dial-chat-shared';
42
44
  import { DeploymentItemDto } from '@epam/ai-dial-chat-api-client';
@@ -60,23 +62,34 @@ import { Dispatch } from 'react';
60
62
  import { DisplayAttachment } from '@epam/ai-dial-chat-shared';
61
63
  import { DropdownItem } from '@epam/ai-dial-ui-kit';
62
64
  import { ExportFolder } from '@epam/ai-dial-chat-shared';
65
+ import { ExternalServicesApi } from '@epam/ai-dial-chat-api-client';
63
66
  import { FileManagerColumnKey } from '@epam/ai-dial-react-file-manager';
67
+ import { FileManagerSelectableNode } from '@epam/ai-dial-chat-shared';
64
68
  import { FileMetadataResponseDto } from '@epam/ai-dial-chat-api-client';
65
69
  import { FilesApi } from '@epam/ai-dial-chat-api-client';
70
+ import { FileTreeOptions } from '@epam/ai-dial-react-file-manager';
66
71
  import { FileUploadBatchState } from '@epam/ai-dial-chat-shared';
67
72
  import { FileUploadEntry } from '@epam/ai-dial-chat-shared';
68
73
  import { FileUploadResponseDto } from '@epam/ai-dial-chat-api-client';
69
74
  import { FileUploadStatus } from '@epam/ai-dial-chat-shared';
70
75
  import { FileUploadValidationResult } from '@epam/ai-dial-chat-shared';
76
+ import { FilterChipItem } from '@epam/ai-dial-ui-kit';
71
77
  import { FilterTab } from '@epam/ai-dial-chat-shared';
72
78
  import { getParentFolderPath } from '@epam/ai-dial-chat-shared';
73
79
  import type { GroupedAttachmentItem } from '@epam/ai-dial-chat-shared';
80
+ import { Implementation } from '@modelcontextprotocol/sdk/types.js';
74
81
  import type { InputHighlightData } from '@epam/pdf-highlighter-kit';
82
+ import { LimitStatsDto } from '@epam/ai-dial-chat-api-client';
75
83
  import { ListFilesItemDto } from '@epam/ai-dial-chat-api-client';
76
84
  import { ListFilesResponseDto } from '@epam/ai-dial-chat-api-client';
77
85
  import { ListPublicFilesRequest } from '@epam/ai-dial-chat-api-client';
86
+ import { ListScheduledTaskRunsResponseDto } from '@epam/ai-dial-chat-api-client';
87
+ import { ListScheduledTasksResponseDto } from '@epam/ai-dial-chat-api-client';
88
+ import { ListScheduledTasksSortEnum } from '@epam/ai-dial-chat-api-client';
78
89
  import { ListSharedFilesRequest } from '@epam/ai-dial-chat-api-client';
90
+ import { LocaleOption } from '@epam/ai-dial-chat-shared';
79
91
  import { LocaleTextEntryDto } from '@epam/ai-dial-chat-api-client';
92
+ import { LocalizedTextEntry } from '@epam/ai-dial-chat-shared';
80
93
  import { McpAppToolSummaryDto } from '@epam/ai-dial-chat-api-client';
81
94
  import { McpUiHostContext } from '@mcp-ui/client';
82
95
  import { Message } from '@epam/ai-dial-chat-shared';
@@ -84,10 +97,13 @@ import { MessageAttachment } from '@epam/ai-dial-chat-shared';
84
97
  import { MessageCustomContent } from '@epam/ai-dial-chat-shared';
85
98
  import { MessageRating } from '@epam/ai-dial-chat-shared';
86
99
  import { Middleware } from '@epam/ai-dial-chat-api-client';
100
+ import { ModelLimitPeriodStatuses } from '@epam/ai-dial-usage-dashboard';
101
+ import { ModelLimitRow } from '@epam/ai-dial-usage-dashboard';
87
102
  import { MoveFilesResponseDto } from '@epam/ai-dial-chat-api-client';
88
103
  import { MoveItemDto } from '@epam/ai-dial-chat-api-client';
89
104
  import { MutableRefObject } from 'react';
90
105
  import { NotificationVariant } from '@epam/ai-dial-ui-kit';
106
+ import { OfflineCredentialsApi } from '@epam/ai-dial-chat-api-client';
91
107
  import { OverlayChatMessage } from '@epam/ai-dial-chat-overlay';
92
108
  import { PromptFolderResponseDto } from '@epam/ai-dial-chat-api-client';
93
109
  import { PromptListResponseDto } from '@epam/ai-dial-chat-api-client';
@@ -113,6 +129,10 @@ import { RevokeAccessItemDto } from '@epam/ai-dial-chat-api-client';
113
129
  import { RevokeAccessResponseDto } from '@epam/ai-dial-chat-api-client';
114
130
  import { ScheduledTaskCreateFormValues } from '@epam/ai-dial-scheduled-tasks';
115
131
  import { ScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
132
+ import { ScheduledTaskRunDto } from '@epam/ai-dial-chat-api-client';
133
+ import { ScheduledTaskValidationErrors } from '../../libs/scheduled-tasks/validation';
134
+ import { ScheduledTaskValidationOptions } from '../../libs/scheduled-tasks/validation';
135
+ import { ScheduleTriggerDto } from '@epam/ai-dial-chat-api-client';
116
136
  import { SendCompletionDtoModeEnum } from '@epam/ai-dial-chat-api-client';
117
137
  import { SetStateAction } from 'react';
118
138
  import { ShareApi } from '@epam/ai-dial-chat-api-client';
@@ -124,16 +144,16 @@ import { SkillEditorFileActions } from '@epam/ai-dial-skill-editor';
124
144
  import { SkillEditorValues } from '@epam/ai-dial-skill-editor';
125
145
  import { SkillFileBatchError } from '@epam/ai-dial-skill-editor';
126
146
  import { SkillFileListResponseDto } from '@epam/ai-dial-chat-api-client';
147
+ import { SkillFileSourceEntry } from '@epam/ai-dial-skill-editor';
127
148
  import { SkillFileTreeNode } from '@epam/ai-dial-skill-editor';
128
149
  import { SkillFileUploadCandidate } from '@epam/ai-dial-skill-editor';
129
150
  import { SkillFileValidationResult } from '@epam/ai-dial-skill-editor';
130
151
  import { SkillMetadataItemDto } from '@epam/ai-dial-chat-api-client';
131
152
  import { SkillUploadResponseDto } from '@epam/ai-dial-chat-api-client';
153
+ import { Stage } from '@epam/ai-dial-chat-shared';
132
154
  import { StarterOption } from '@epam/ai-dial-chat-shared';
133
155
  import { StatusMessage } from '@epam/ai-dial-chat-shared';
134
156
  import { StreamChunk } from '@epam/ai-dial-chat-shared';
135
- import { TabModel } from '@epam/ai-dial-ui-kit';
136
- import { ToolbarOptions } from '@epam/ai-dial-react-file-manager';
137
157
  import { ToolMenuItem } from '@epam/ai-dial-chat-shared';
138
158
  import { ToolsetLoginBodyDto } from '@epam/ai-dial-chat-api-client';
139
159
  import { ToolsetLogoutBodyDto } from '@epam/ai-dial-chat-api-client';
@@ -141,9 +161,12 @@ import { ToolsetsApi } from '@epam/ai-dial-chat-api-client';
141
161
  import { TranscriptionApi } from '@epam/ai-dial-chat-api-client';
142
162
  import { UnpublishCatalogEntityDto } from '@epam/ai-dial-chat-api-client';
143
163
  import { UnpublishResultDto } from '@epam/ai-dial-chat-api-client';
164
+ import { UpdatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
144
165
  import { UpdateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
145
166
  import { UploadArchiveResponseDto } from '@epam/ai-dial-chat-api-client';
146
167
  import { UploadedAttachmentResult } from '@epam/ai-dial-chat-shared';
168
+ import { UsageLimitCardData } from '@epam/ai-dial-usage-dashboard';
169
+ import { UsageLimitProgressRow } from '@epam/ai-dial-catalog';
147
170
  import { useGridEditingScroll } from '@epam/ai-dial-chat-shared';
148
171
  import { UseGridEditingScrollOptions } from '@epam/ai-dial-chat-shared';
149
172
  import { UseGridEditingScrollResult } from '@epam/ai-dial-chat-shared';
@@ -163,6 +186,7 @@ export declare interface AgentCapabilities {
163
186
  hasConfiguration?: boolean;
164
187
  hasChatCompletion?: boolean;
165
188
  hasResponsesApi?: boolean;
189
+ hasSkills?: boolean;
166
190
  }
167
191
 
168
192
  /** Input-attachment configuration for an agent (application) deployment. */
@@ -205,6 +229,9 @@ export declare const annotationToOoxmlCanvasContent: (annotation: Annotation, an
205
229
  /**
206
230
  * Builds a `PdfCanvasContent` for a PDF citation annotation, including highlights
207
231
  * for the clicked annotation's document within its citation group.
232
+ * When the clicked annotation has a page but no selector with valid geometry,
233
+ * an invisible page-anchor highlight is added and selected so the viewer
234
+ * still opens that page.
208
235
  * Returns `null` if the annotation has no PDF source attachment.
209
236
  */
210
237
  export declare const annotationToPdfCanvasContent: (annotation: Annotation, groups: AnnotationGroup[], resolvers: AttachmentCanvasUrlResolvers) => PdfCanvasContent | null;
@@ -238,17 +265,48 @@ export declare interface AnnouncementListItemLink {
238
265
 
239
266
  /** Normalized shape returned by {@link getApiErrorDetails}. */
240
267
  export declare interface ApiErrorDetails {
268
+ /** Stable domain error code supplied by the API, when present. */
269
+ code?: string;
241
270
  /** HTTP status code carried by the error, when available. */
242
271
  status?: number;
243
272
  /** Resolved human-readable error message, or `null` when none could be resolved. */
244
273
  message: string | null;
245
274
  /** Extracted W3C trace ID, when the error's response carries a valid `traceparent`. */
246
275
  traceId?: string;
276
+ /**
277
+ * Error code reported by the service behind the API, when the API forwards one
278
+ * (`upstreamCode`). Passed through as-is; the host decides whether to act on it.
279
+ */
280
+ upstreamCode?: string;
281
+ /**
282
+ * Error reason reported by the service behind the API, when the API forwards one
283
+ * (`upstreamMessage`). Untranslated; the host decides whether to display it.
284
+ */
285
+ upstreamMessage?: string;
247
286
  }
248
287
 
249
288
  /** Appends a locale's uppercased code to a field label, e.g. `'Name [EN]'`. */
250
289
  export declare const appendLocaleCode: (label: string, locale: string) => string;
251
290
 
291
+ /**
292
+ * Applies a single SSE stream chunk to the message list.
293
+ *
294
+ *
295
+ * Attachments are accumulated: each chunk's attachments are appended to the
296
+ * existing array rather than replacing it.
297
+ *
298
+ * Annotations are merged by `index`: partial `body.title` and `body.quote`
299
+ * strings are concatenated across chunks, matching the same delta-merge
300
+ * semantics used for stages.
301
+ *
302
+ * `state` is overwritten (not merged) by each chunk that carries one,
303
+ * matching the DIAL stateful-app contract.
304
+ *
305
+ * @returns Updated message array, or `null` when the chunk carries no
306
+ * actionable data (empty content, no form_schema, and no attachments).
307
+ */
308
+ export declare const applyChunkToMessages: (messages: Message[], messageIndex: number, chunk: StreamChunk) => Message[] | null;
309
+
252
310
  /** Converts an APScheduler weekday (Monday=0..Sunday=6) to a JS `Date` weekday (Sunday=0..Saturday=6). */
253
311
  export declare const apSchedulerDayToJsDay: (apSchedulerDay: number) => number;
254
312
 
@@ -301,6 +359,8 @@ export declare interface AttachmentCanvasUrlResolvers {
301
359
  resolveDialUrl: (attachment: DisplayAttachment) => string | undefined;
302
360
  /** Resolves a DIAL Core file id to a fetchable metadata URL (used for cache-freshness validation). */
303
361
  resolveDialFileMetadataUrl: (fileId: string) => string | undefined;
362
+ /** 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`. */
363
+ htmlSrcdocHostUrl?: string;
304
364
  }
305
365
 
306
366
  /** The type of content the canvas can display. */
@@ -348,10 +408,12 @@ export declare const attachmentToDto: (attachment: Attachment) => AttachmentDto;
348
408
  export declare interface AttachmentValidationErrorEvent {
349
409
  /** Why the attachment(s) were rejected. */
350
410
  reason: AttachmentValidationErrorReason;
351
- /** The resolved MIME types the caller currently allows (possibly empty). */
352
- allowedMimeTypes: string[];
411
+ /** The resolved MIME types the caller currently allows (possibly empty). Present only when `reason` is `NoTypesAllowed` or `UnsupportedType`. */
412
+ allowedMimeTypes?: string[];
353
413
  /** Already-formatted, non-translated extension list (e.g. ".png, .jpg"), present only when `reason` is `UnsupportedType`. */
354
414
  formats?: string;
415
+ /** The size limit, in bytes, that was exceeded. Present only when `reason` is `FileTooLarge`. */
416
+ maxFileSizeBytes?: number;
355
417
  }
356
418
 
357
419
  /** Reason a rejected attachment failed validation. */
@@ -359,7 +421,9 @@ export declare enum AttachmentValidationErrorReason {
359
421
  /** No MIME types are allowed at all — attachments are disabled entirely. */
360
422
  NoTypesAllowed = "noTypesAllowed",
361
423
  /** The attachment's content type is not among the allowed MIME types. */
362
- UnsupportedType = "unsupportedType"
424
+ UnsupportedType = "unsupportedType",
425
+ /** The attachment's file size exceeds `maxFileSizeBytes`. */
426
+ FileTooLarge = "fileTooLarge"
363
427
  }
364
428
 
365
429
  /** Thrown by `transcribeAudio`; carries a machine-readable `reason` instead of translated text. */
@@ -394,7 +458,7 @@ export declare enum AuthenticationType {
394
458
  * `additionalLocaleCodes` and excluding whichever code is already the
395
459
  * primary Name/Description field.
396
460
  */
397
- export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: string[], primaryLocale: string) => DeploymentCreationFormLocaleOption[];
461
+ export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: string[], primaryLocale: string) => LocaleOption[];
398
462
 
399
463
  /**
400
464
  * Builds the value persisted under `StorageKey.TextOfClosedAnnouncement` when
@@ -456,6 +520,8 @@ export declare const buildPromptOverview: (prompt: PromptResponseDto, labels: Pr
456
520
  /** Joins a folder path and a prompt name into the DIAL prompt path used as an id. */
457
521
  export declare const buildPromptPath: (folderId: string, name: string) => string;
458
522
 
523
+ export declare const buildResetFields: (stats: LimitStatsDto, formatResetTime: FormatResetTime | undefined) => Pick<UsageLimitProgressRow, "resetLabel" | "resetIsoValue" | "resetAriaLabel">;
524
+
459
525
  /** Builds the Responses API endpoint URL for a deployment. */
460
526
  export declare const buildResponsesUrl: (baseUrl: string) => string;
461
527
 
@@ -481,7 +547,9 @@ export declare const buildSharedItemVirtualPath: (relativePath: string, rootLabe
481
547
  * itself) contributes no node. Every folder entry is attached under its own
482
548
  * stripped path so an empty grouping folder still appears; every file entry
483
549
  * attaches under the folder chain its stripped path implies, synthesizing
484
- * any intermediate folder the listing never enumerated on its own. A file
550
+ * any intermediate folder the listing never enumerated on its own. An
551
+ * empty-folder marker (`.dial_folder`) only proves its folder exists and
552
+ * never becomes a file node. A file
485
553
  * node's `id` is the listing entry's own (unstripped) path, so it round-trips
486
554
  * back to `downloadSkillFile` without being re-derived; a folder node's `id`
487
555
  * is the stripped path and only keys client-side expand/collapse state.
@@ -491,7 +559,10 @@ export declare const buildSkillContentTree: (files: SkillMetadataItemDto[], skil
491
559
  /**
492
560
  * Builds the ordered supporting-file paths and `Blob` payload
493
561
  * `createSkill`/`updateSkill` expect from the editor's file tree and
494
- * in-memory content map.
562
+ * in-memory content map. Every folder node with no descendant node gets a
563
+ * zero-byte `<folder>/.dial_folder` marker after the real files, so the
564
+ * empty folder survives the whole-skill write; a folder with content needs
565
+ * none, and a marker it had before is dropped by that same write.
495
566
  */
496
567
  export declare const buildSkillFilesPayload: (files: SkillFileTreeNode[], filesContent: Map<string, SkillFileContent>) => SkillFilesPayload;
497
568
 
@@ -525,6 +596,13 @@ export declare const buildSkillManifestFromFrontmatter: (baseFrontmatter: Record
525
596
  * authored it, when it last changed, and its file inventory. Grouping folders
526
597
  * in the file listing are excluded from both the count and the rows. Sizes are
527
598
  * not shown — the skill metadata carries no content-length field.
599
+ *
600
+ * `skill` is the authoritative `getSkillMetadata` response when that request
601
+ * fulfilled; the caller falls back to the catalog listing entry only when it
602
+ * rejected (`useSkillItemDetails`'s `onFetchSkillDetails`). Either way, this
603
+ * function never fills a gap in one source from the other — an absent
604
+ * `author` omits the row and an absent `updatedAt` leaves the updated row's
605
+ * value empty, exactly as `skill` carries it.
528
606
  */
529
607
  export declare const buildSkillOverview: (skill: SkillMetadataItemDto | undefined, files: SkillMetadataItemDto[], about: SkillAboutDetails | undefined, labels: SkillOverviewLabels) => CatalogItemOverview;
530
608
 
@@ -570,7 +648,6 @@ export declare interface CatalogDetailsApi extends SkillDetailsApi {
570
648
 
571
649
  /** Localized copy `useCatalogEditNavigation` needs for the Create menu and delete errors. */
572
650
  export declare interface CatalogEditNavigationLabels {
573
- createQuickApp: string;
574
651
  createToolset: string;
575
652
  createCustomApp: string;
576
653
  createSkill: string;
@@ -608,9 +685,9 @@ export declare interface CatalogEditNavigationUrls {
608
685
  buildCustomAppEditUrl(appId: string): string;
609
686
  /** URL to create a new custom (schema-less) app. */
610
687
  buildCustomAppCreateUrl(): string;
611
- /** URL to edit an existing quick app under the given schema. */
688
+ /** URL to edit an existing schema-based app (quick app or any other runner) under the given schema. */
612
689
  buildQuickAppEditUrl(schemaId: string, appId: string): string;
613
- /** URL to create a new quick app under the given schema. */
690
+ /** URL to create a new schema-based app (quick app or any other runner) under the given schema. */
614
691
  buildQuickAppCreateUrl(schemaId: string): string;
615
692
  }
616
693
 
@@ -709,6 +786,7 @@ export declare interface ChatStreamApi {
709
786
  stopCompletion: (dto: {
710
787
  generationId: string;
711
788
  path: string;
789
+ content?: string;
712
790
  }) => Promise<void>;
713
791
  }
714
792
 
@@ -720,6 +798,13 @@ export declare interface ChatStreamCompletionOptions {
720
798
  signal?: AbortSignal;
721
799
  }
722
800
 
801
+ /**
802
+ * Classifies an import request's HTTP status into a semantic outcome: 400/413/422 are
803
+ * archive-content problems, 409 is a name collision, 429 is rate limiting, 502/503 mean the
804
+ * backend is unavailable, and anything else (including no status at all) is generic.
805
+ */
806
+ export declare const classifySkillArchiveImportError: (status: number | undefined) => SkillArchiveImportErrorKind;
807
+
723
808
  /** Clears all cached fetch results. Call this when leaving a conversation. */
724
809
  export declare const clearAttachmentCache: () => void;
725
810
 
@@ -746,7 +831,7 @@ export declare const COLUMNS_WITHOUT_AUTHOR: FileManagerColumnKey[];
746
831
  * `undefined` (not `[]`) when nothing remains, so a request untouched by
747
832
  * this feature stays byte-identical to today.
748
833
  */
749
- export declare const composeLocalePayload: (otherLocales: DeploymentCreationFormLocaleEntry[], primaryLocale: string) => LocaleTextEntryDto[] | undefined;
834
+ export declare const composeLocalePayload: (otherLocales: LocalizedTextEntry[], primaryLocale: string) => LocaleTextEntryDto[] | undefined;
750
835
 
751
836
  /** Whether an export includes the conversation's attachments. */
752
837
  export declare enum ConversationExportMode {
@@ -762,6 +847,28 @@ export declare interface ConversationGenerationLifecycle {
762
847
  completeGeneration: (path: string, generationId: string) => void;
763
848
  }
764
849
 
850
+ /** Labels and formatter callbacks for the conversation-input limits mapping utility. */
851
+ export declare interface ConversationInputLimitsLabels {
852
+ /** Heading of the group listing the selected deployment's token limits. */
853
+ tokenGroup: string;
854
+ /** Heading of the group listing the caller's cost budget and spend against it. */
855
+ costGroup: string;
856
+ /** Label for the current-UTC-day row, used by both groups. */
857
+ periodDay: string;
858
+ /** Label for the current-UTC-week row, used by both groups. */
859
+ periodWeek: string;
860
+ /** Label for the current-UTC-month row, used by both groups. */
861
+ periodMonth: string;
862
+ /** Formats the combined used/total display value for a capped row. */
863
+ formatValueLabel: (used: string, total: string) => string;
864
+ /** Formats the ARIA label for a capped progress row. */
865
+ formatProgressAriaLabel: (params: {
866
+ label: string;
867
+ used: string;
868
+ total: string;
869
+ }) => string;
870
+ }
871
+
765
872
  /** Stable reverse-lookup maps returned by `useConversationLookupMaps`. */
766
873
  export declare interface ConversationLookupMaps {
767
874
  /** Returns the raw context id for a panel-space conversation id, or `undefined` when not found. */
@@ -825,7 +932,7 @@ export declare interface ConversationStreamOverlayNotifier {
825
932
  }
826
933
 
827
934
  /** The exact `startStream` shape `useConversationStream` returns. */
828
- export declare type ConversationStreamStarter = (conversationPath: string, userContent: string, messageIndex: number, model: string, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum) => void;
935
+ export declare type ConversationStreamStarter = (conversationPath: string, userContent: string, messageIndex: number, model: string, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum, options?: StartStreamOptions) => void;
829
936
 
830
937
  /**
831
938
  * Host-owned transport for the DIAL Core completion protocol. Implemented at
@@ -835,10 +942,14 @@ export declare type ConversationStreamStarter = (conversationPath: string, userC
835
942
  export declare interface ConversationStreamTransport {
836
943
  /** Starts a completion; delivers chunks/completion/error through `options`, aborted via `options.signal`. */
837
944
  streamCompletion(path: string, message: string | undefined, model: string, options: StreamCompletionOptions, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum, messageIndex?: number, clientChannelId?: string): void;
838
- /** Requests the backend stop an active generation. */
945
+ /**
946
+ * Requests the backend stop an active generation. `content` is the answer text shown
947
+ * so far; the backend saves it for a generation whose text it does not hold.
948
+ */
839
949
  stopCompletion(params: {
840
950
  generationId: string;
841
951
  path: string;
952
+ content?: string;
842
953
  }): Promise<void>;
843
954
  /** Opens a stream of resource-update events for `path`, until aborted via `signal`. */
844
955
  watchConversation(path: string, signal: AbortSignal): Promise<ReadableStream<Uint8Array>>;
@@ -912,6 +1023,12 @@ export declare interface CreateChatStreamApiDeps {
912
1023
  getTimezone?: () => string | undefined;
913
1024
  /** `fetch` implementation to issue requests through. Defaults to the global `fetch`. */
914
1025
  fetchImpl?: typeof fetch;
1026
+ /**
1027
+ * How long an open completion stream may go without receiving a byte
1028
+ * (keepalive comments included) before it is reported as a
1029
+ * {@link StreamInterruptedError}. Defaults to {@link DEFAULT_STREAM_IDLE_TIMEOUT_MS}.
1030
+ */
1031
+ idleTimeoutMs?: number;
915
1032
  }
916
1033
 
917
1034
  /**
@@ -961,6 +1078,12 @@ export declare const createMessagePair: (content: string, customContent?: Messag
961
1078
  */
962
1079
  export declare const createPublishApiClient: (publishApi: PublishApi) => PublishApiClient;
963
1080
 
1081
+ /**
1082
+ * Composes scheduler operations over an already configured generated client.
1083
+ * Authentication, base URL, CSRF, and retries remain host responsibilities.
1084
+ */
1085
+ export declare const createScheduledTasksApiClient: (client: ScheduledTasksConfiguredClient) => ScheduledTasksApiClient;
1086
+
964
1087
  /**
965
1088
  * Builds a generated-client `Middleware` that throws on 401, and on a
966
1089
  * classified invalid-CSRF 403 refreshes the token and retries the original
@@ -1023,6 +1146,15 @@ export declare type CsrfRefreshOutcome = {
1023
1146
 
1024
1147
  export declare const DATE_OPTIONS: Intl.DateTimeFormatOptions;
1025
1148
 
1149
+ /**
1150
+ * Inverse of `encodeDeploymentId` — decodes each `/`-separated segment back
1151
+ * to its raw, human-readable form. A segment that isn't valid
1152
+ * percent-encoding is passed through unchanged rather than throwing, since
1153
+ * this decodes externally-sourced ids (the settings iframe's postMessage
1154
+ * protocol).
1155
+ */
1156
+ export declare const decodeDeploymentId: (id: string) => string;
1157
+
1026
1158
  /**
1027
1159
  * Inverse of `encodeToolsetId` — decodes each `/`-separated segment back to
1028
1160
  * its raw, human-readable form. A segment that isn't valid percent-encoding
@@ -1039,11 +1171,14 @@ export declare const decodeToolsetId: (id: string) => string;
1039
1171
  * present in either map, excluding `primaryLocale` — that key is already the
1040
1172
  * primary Name/Description field, not a row in the popup.
1041
1173
  */
1042
- export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) => DeploymentCreationFormLocaleEntry[];
1174
+ export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) => LocalizedTextEntry[];
1043
1175
 
1044
1176
  /** Fallback text of a {@link GenerationConflictError} when no message is supplied. */
1045
1177
  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.";
1046
1178
 
1179
+ /** Safe fallback for hosts that do not supply a translated persistence warning. */
1180
+ 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.";
1181
+
1047
1182
  /**
1048
1183
  * Default ceiling on the summed byte length of an export's attachments.
1049
1184
  *
@@ -1057,6 +1192,8 @@ export declare const DEFAULT_GENERATION_CONFLICT_MESSAGE = "A response is alread
1057
1192
  */
1058
1193
  export declare const DEFAULT_MAX_ARCHIVE_BYTES: number;
1059
1194
 
1195
+ export declare const DEFAULT_STREAM_IDLE_TIMEOUT_MS = 45000;
1196
+
1060
1197
  /** Translated folder-path labels for the Personal/Shared/Public deployment groupings. */
1061
1198
  export declare interface DeploymentFolderLabels {
1062
1199
  personal: string;
@@ -1074,16 +1211,14 @@ export declare interface DeploymentGenerationApiSupport {
1074
1211
  export declare interface DeploymentLimitsLabels {
1075
1212
  /** Heading of the group every token stat row is listed under. */
1076
1213
  tokenGroup: string;
1077
- /** Label for the tokens-per-day stat row. */
1214
+ /** Label for the current-UTC-day token row, e.g. "Today". */
1078
1215
  tokensPerDay: string;
1079
- /** Label for the tokens-per-week stat row. */
1216
+ /** Label for the current-UTC-week token row, e.g. "This week". */
1080
1217
  tokensPerWeek: string;
1081
- /** Label for the tokens-per-month stat row. */
1218
+ /** Label for the current-UTC-month token row, e.g. "This month". */
1082
1219
  tokensPerMonth: string;
1083
1220
  /** Note shown instead of a total on a row whose limit follows the cost limit. */
1084
1221
  followsCostLimit: string;
1085
- /** Formats the "$X spent" caption under a row's label. */
1086
- formatSpentCaption: (amount: string) => string;
1087
1222
  /** Formats the combined used/total display value for a capped row. */
1088
1223
  formatValueLabel: (used: string, total: string) => string;
1089
1224
  /** Formats the ARIA label for a capped progress row. */
@@ -1097,6 +1232,8 @@ export declare interface DeploymentLimitsLabels {
1097
1232
  label: string;
1098
1233
  used: string;
1099
1234
  }) => string;
1235
+ /** Formats each period's `resetsAt` into the row's reset line. Omit it to render rows without one. */
1236
+ formatResetTime?: FormatResetTime;
1100
1237
  }
1101
1238
 
1102
1239
  export declare const deriveActionProfile: (variant: DialFileManagerVariant) => DialFileManagerActionProfile;
@@ -1123,15 +1260,36 @@ export declare const deriveAvailableTabIds: <T extends CatalogEntityType>(items:
1123
1260
  export declare const deriveConversationRowActionState: (item: Pick<ConversationListItemDto, "sharedWithMe" | "publishedWithMe" | "isReadonly">, publishHistory: PublishHistoryEntry[] | undefined, recipients: RecipientsCountEntry) => ConversationRowActionState;
1124
1261
 
1125
1262
  /**
1126
- * Returns items marked as a user favorite, in original order.
1263
+ * Returns items marked as a user favorite that are not hidden, in original order.
1127
1264
  */
1128
1265
  export declare const deriveFavoriteItems: (items: readonly CatalogItem[]) => CatalogItem[];
1129
1266
 
1267
+ /**
1268
+ * Describes the complete trigger without requiring unrelated task metadata.
1269
+ * Unsupported constraints remain Custom, with the full source expression.
1270
+ * Calendar-month shifts crossing month boundaries or days 29–31 remain
1271
+ * Custom because a shifted monthly day is not equivalent around short months.
1272
+ * The one exception is `day: 'last'` one day behind local time, which is
1273
+ * exactly the local 1st.
1274
+ */
1275
+ export declare const describeScheduledTaskTrigger: (trigger: ScheduleTriggerDto, { timeZone, referenceDate, }?: ScheduledTaskTriggerDescriptionOptions) => ScheduledTaskTriggerDescription;
1276
+
1277
+ /** Source tabs `useDialFileManagerSections` can merge into the All tab, in display order. */
1278
+ export declare const DIAL_FILE_MANAGER_SECTION_TABS: readonly DialFileManagerTabs[];
1279
+
1130
1280
  /** Strip the "files/{bucket}/" prefix from a DIAL Core URL to get the path within the bucket. */
1131
1281
  export declare const dialCorePathToRelative: (dialCorePath: string, bucket: string) => string;
1132
1282
 
1133
1283
  export { DialFileManagerActionProfile }
1134
1284
 
1285
+ /** One source tab rendered as a top-level folder of the All view. */
1286
+ export declare interface DialFileManagerSection {
1287
+ /** Source tab backing this section — `MyFiles`, `Shared` or `Organization`. */
1288
+ tab: DialFileManagerTabs;
1289
+ /** 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. */
1290
+ rootLabel: string;
1291
+ }
1292
+
1135
1293
  export { DialFileManagerVariant }
1136
1294
 
1137
1295
  /**
@@ -1466,7 +1624,9 @@ export declare enum FileManagerNotificationReason {
1466
1624
  /** `onUploadArchive` extracted some entries successfully and some failed; `count`/`names`/`restCount` describe the failures. */
1467
1625
  UploadArchivePartiallyFailed = "uploadArchivePartiallyFailed",
1468
1626
  /** `onUploadArchive`'s `uploadArchive` request itself rejected. */
1469
- UploadArchiveRequestFailed = "uploadArchiveRequestFailed"
1627
+ UploadArchiveRequestFailed = "uploadArchiveRequestFailed",
1628
+ /** A copy/move targeted a destination in a different All-view section from its source items; no request was made. */
1629
+ CrossSectionTransferUnsupported = "crossSectionTransferUnsupported"
1470
1630
  }
1471
1631
 
1472
1632
  /**
@@ -1487,8 +1647,6 @@ export declare type FileNameValidationError = {
1487
1647
  } | {
1488
1648
  reason: FileNameValidationErrorReason.DuplicateName;
1489
1649
  existingName: string;
1490
- } | {
1491
- reason: FileNameValidationErrorReason.LeadingDot;
1492
1650
  };
1493
1651
 
1494
1652
  /**
@@ -1501,8 +1659,7 @@ export declare enum FileNameValidationErrorReason {
1501
1659
  ForbiddenSymbols = "forbiddenSymbols",
1502
1660
  ReservedName = "reservedName",
1503
1661
  TooLong = "tooLong",
1504
- DuplicateName = "duplicateName",
1505
- LeadingDot = "leadingDot"
1662
+ DuplicateName = "duplicateName"
1506
1663
  }
1507
1664
 
1508
1665
  /**
@@ -1519,7 +1676,10 @@ export declare enum FileOperationKind {
1519
1676
  FileCopied = "fileCopied",
1520
1677
  FilesCopied = "filesCopied",
1521
1678
  FileMoved = "fileMoved",
1522
- FilesMoved = "filesMoved"
1679
+ FilesMoved = "filesMoved",
1680
+ /** A copy whose every item landed in its own source folder (Duplicate). */
1681
+ FileDuplicated = "fileDuplicated",
1682
+ FilesDuplicated = "filesDuplicated"
1523
1683
  }
1524
1684
 
1525
1685
  /**
@@ -1534,13 +1694,15 @@ export declare interface FileOperationSuccessEvent {
1534
1694
  name?: string;
1535
1695
  /** Number of items the operation covered, when applicable. */
1536
1696
  count?: number;
1537
- /** Destination folder name, for copy/move operations. */
1697
+ /**
1698
+ * Destination folder as a slash-joined virtual path starting at the root
1699
+ * label (e.g. `My files/reports`), for copy/move/duplicate operations.
1700
+ */
1538
1701
  destinationFolderName?: string;
1539
1702
  /**
1540
- * Whether the affected item is a folder rather than a file. Only set for
1541
- * `fileRenamed`, since it is the only kind whose current wording depends
1542
- * on the item's node type (a rename toast reads "Folder renamed" vs.
1543
- * "File renamed").
1703
+ * Whether the affected item is a folder rather than a file. Set for rename,
1704
+ * copy, move, and duplicate events; on a multi-item event it describes the
1705
+ * first successfully affected item (the one `name` refers to).
1544
1706
  */
1545
1707
  isFolder?: boolean;
1546
1708
  }
@@ -1638,6 +1800,9 @@ export declare const formatOperationFolderName: (destinationFolder: string, root
1638
1800
  */
1639
1801
  export declare const formatQuotedNameList: (names: string[]) => string;
1640
1802
 
1803
+ /** Formats a raw `resetsAt` into display strings, or returns `undefined` when it cannot be formatted. */
1804
+ export declare type FormatResetTime = (resetsAt: string | undefined) => ResetTimeDisplay | undefined;
1805
+
1641
1806
  /**
1642
1807
  * Reported through `onError` when the backend rejects a completion because
1643
1808
  * another generation is already active on the same conversation — what a
@@ -1649,7 +1814,13 @@ export declare class GenerationConflictError extends Error {
1649
1814
  constructor(message?: string);
1650
1815
  }
1651
1816
 
1652
- /** Normalizes any API error into a `{ status?, message, traceId? }` shape. */
1817
+ /** Identifies a failed terminal save independently of the model's generation outcome. */
1818
+ export declare class GenerationPersistenceError extends Error {
1819
+ static readonly type = "conversation_save_failed";
1820
+ constructor();
1821
+ }
1822
+
1823
+ /** Normalizes any API error into a `{ status?, message, traceId?, code?, upstreamCode?, upstreamMessage? }` shape. */
1653
1824
  export declare const getApiErrorDetails: (error: unknown) => Promise<ApiErrorDetails>;
1654
1825
 
1655
1826
  /** Resolves a human-readable message from an API error's response body, or falls back to `Error.message`. */
@@ -1684,6 +1855,21 @@ export declare const getConversationSource: (item: Pick<ConversationListItemDto,
1684
1855
  */
1685
1856
  export declare const getExternalServiceFallbackName: (serviceName: string) => string;
1686
1857
 
1858
+ /**
1859
+ * Returns the tool values the conversation's last message sets through its
1860
+ * `form_schema`, restricted to `toolIds`, plus a key identifying that exact
1861
+ * application. `undefined` when the last message is not an assistant message
1862
+ * or sets no known tool.
1863
+ *
1864
+ * Streamed chunks and reloads re-create an identical `form_schema`; comparing
1865
+ * keys rather than object identity applies an app's value once and leaves a
1866
+ * later user toggle alone until the app sends a different value.
1867
+ */
1868
+ export declare const getFormSchemaToolSyncKey: (conversationId: string, messages: Message[], toolIds: readonly string[]) => {
1869
+ key: string;
1870
+ values: Record<string, boolean>;
1871
+ } | undefined;
1872
+
1687
1873
  /**
1688
1874
  * Returns the deployment the conversation was last running on: scanning
1689
1875
  * backwards, the `new_deployment_id` of a `model_changed` status message or
@@ -1707,6 +1893,15 @@ export declare const getLastDeploymentId: (messages: Message[]) => string | null
1707
1893
  */
1708
1894
  export declare const getLastUserMessageToolConfiguration: (messages: Message[]) => Record<string, unknown> | undefined;
1709
1895
 
1896
+ /**
1897
+ * Returns the tool configuration a (re-)loaded conversation should show: the
1898
+ * last user message's `configuration_value`, overlaid in order by the
1899
+ * `form_schema` values of the assistant messages after it. An app that turned
1900
+ * a toggle off in its final response must not see it re-armed on reload just
1901
+ * because the user message that started the run had it on.
1902
+ */
1903
+ export declare const getLatestToolConfiguration: (messages: Message[]) => Record<string, unknown> | undefined;
1904
+
1710
1905
  /**
1711
1906
  * Extracts the deployment/model ID from a DIAL Core conversation ID.
1712
1907
  *
@@ -1754,6 +1949,12 @@ export declare const getQuickAppConversationStarters: (conversationStarters: unk
1754
1949
  */
1755
1950
  export declare const getRemainingCharacters: (value: string, maxLength: number) => number | null;
1756
1951
 
1952
+ /** Returns the schemas that create schema-based apps: unique by id, without id-less entries or the custom-app schema. */
1953
+ export declare const getRunnerSchemas: <T extends QuickAppSchemaLike>(schemas: T[]) => RunnerSchema<T>[];
1954
+
1955
+ /** Returns the limit each over-long skill field exceeds, keyed by field; fields within their limit are omitted. */
1956
+ export declare const getSkillFieldLengthViolations: (values: Record<SkillTextField, string>) => Partial<Record<SkillTextField, number>>;
1957
+
1757
1958
  /**
1758
1959
  * Returns the text to start/populate a conversation from a selected starter button.
1759
1960
  * `description` (the schema property's shared intro/question text) is used only
@@ -1807,6 +2008,15 @@ export declare const getStarterSubmitText: (starter: StarterOption, description?
1807
2008
  */
1808
2009
  export declare const getTimeOfDayGreeting: (hour: number, translations: GreetingTranslations, firstName?: string) => string;
1809
2010
 
2011
+ /**
2012
+ * Returns the boolean values an assistant message's `form_schema` sets, keyed
2013
+ * by property name, or `undefined` when no property resolves to a boolean.
2014
+ * Lets a DIAL app switch a tools-menu toggle (e.g. `deep_research`) per
2015
+ * message — on while a run is in progress, off once its result is delivered.
2016
+ * Not filtered by tool id: `restoreToolConfiguration` ignores unknown ids.
2017
+ */
2018
+ export declare const getToolConfigurationFromFormSchema: (formSchema: DeploymentConfigurationSchema | undefined) => Record<string, boolean> | undefined;
2019
+
1810
2020
  /** Name of the same-origin `BroadcastChannel` shared by an OAuth flow's opener and its callback popup. */
1811
2021
  export declare const getToolsetOAuthChannelName: (flowId: string) => string;
1812
2022
 
@@ -1883,6 +2093,9 @@ export declare const hasDialFileWritePermission: (folder?: DialFile) => boolean;
1883
2093
 
1884
2094
  export declare const hasForbiddenNameSymbols: (name: string, forbiddenSymbolsRegExp?: RegExp) => boolean;
1885
2095
 
2096
+ /** Returns `true` when both sets contain exactly the same paths. */
2097
+ export declare const hasSamePaths: (a: ReadonlySet<string>, b: ReadonlySet<string>) => boolean;
2098
+
1886
2099
  /**
1887
2100
  * Whether the operator configured the structured banner (title and/or
1888
2101
  * description) rather than only the legacy HTML message. Drives which of the
@@ -1894,10 +2107,16 @@ export declare const hasStructuredAnnouncement: ({ title, description, }: Announ
1894
2107
  declare interface HtmlCanvasContent {
1895
2108
  /** Discriminates the content type to select the correct renderer. */
1896
2109
  type: AttachmentContentType.Html;
1897
- /** Full HTML text rendered via `srcdoc` in a sandboxed iframe. Used for file attachments. */
2110
+ /** 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`. */
1898
2111
  srcdoc?: string;
1899
- /** External URL rendered via `src` in a sandboxed iframe. Used for external link sources. */
2112
+ /** 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. */
1900
2113
  url?: string;
2114
+ /** 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. */
2115
+ isSameOriginUrl?: boolean;
2116
+ /** 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. */
2117
+ resolveSourceText?: () => Promise<string>;
2118
+ /** 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`. */
2119
+ srcdocHostUrl?: string;
1901
2120
  }
1902
2121
 
1903
2122
  /** Content payload for image attachments. */
@@ -1931,11 +2150,12 @@ export declare const initiateOAuthLogin: (auth: ToolsetOAuthSettings, toolsetId:
1931
2150
  export declare const isAnswerIncomplete: (answer: Message | undefined) => boolean;
1932
2151
 
1933
2152
  /**
1934
- * True when the conversation's last message is an unresolved assistant
1935
- * placeholder: the backend only persists a conversation at generation start
1936
- * (empty placeholder) and at generation end (final content, or a partial
1937
- * flagged `streamErrorMessage`/`wasStoppedByUser`), so this shape means a
1938
- * generation was still active elsewhere when the conversation was loaded.
2153
+ * True when the conversation has a pending background message, or its last
2154
+ * message is an unresolved assistant placeholder: the backend only persists a
2155
+ * conversation at generation start (empty placeholder) and at generation end
2156
+ * (final content, or a partial flagged `streamErrorMessage`/`wasStoppedByUser`).
2157
+ * This can mean generation is still active elsewhere, or that its terminal save
2158
+ * failed.
1939
2159
  */
1940
2160
  export declare const isAwaitingGenerationResume: (conversation: Conversation) => boolean;
1941
2161
 
@@ -2011,6 +2231,9 @@ export declare const isQuickAppSchema: (schema?: QuickAppSchemaLike) => boolean;
2011
2231
  /** Share/Unshare/Remove access are Full-only — Browse and Attach never expose them. */
2012
2232
  export declare const isShareActionsAllowed: (actionProfile: DialFileManagerActionProfile) => boolean;
2013
2233
 
2234
+ /** Whether a skill-relative path is a folder marker (`<folder>/.dial_folder`, never a root-level `.dial_folder`). */
2235
+ export declare const isSkillFolderMarkerPath: (path: string) => boolean;
2236
+
2014
2237
  /** True when `value` is a well-formed absolute `http(s)://` URL. */
2015
2238
  export declare const isValidAbsoluteUrl: (value: string) => boolean;
2016
2239
 
@@ -2021,7 +2244,10 @@ export declare const isValidFeaturesData: (value: string) => boolean;
2021
2244
  * Client-side mirror of the backend's `isValidSkillRelativePath`
2022
2245
  * (`apps/chat-api/src/skills/utils/skill-path.util.ts`), used only for
2023
2246
  * immediate inline feedback — the server remains authoritative and may still
2024
- * reject a path this function accepts.
2247
+ * reject a path this function accepts. It additionally reserves the
2248
+ * `.dial_folder` marker name so a user can never upload or name a folder
2249
+ * after it; the save payload's generated markers never pass through here
2250
+ * (the server accepts them only as a zero-byte final segment).
2025
2251
  */
2026
2252
  export declare const isValidSkillRelativePath: (relativePath: string) => boolean;
2027
2253
 
@@ -2070,8 +2296,8 @@ export declare const mapDeploymentDetailsDtoToEntityDetails: (dto: DeploymentDet
2070
2296
  /** Maps a deployment limits DTO to display-ready catalog limits, or `undefined` when no qualifying stats exist. */
2071
2297
  export declare const mapDeploymentLimitsDtoToCatalogLimits: (dto: DeploymentLimitsResponseDto | undefined, labels: DeploymentLimitsLabels) => CatalogItemLimits | undefined;
2072
2298
 
2073
- /** Maps the monthly deployment token limit to a display-ready value. */
2074
- export declare const mapDeploymentLimitsToInput: (dto: DeploymentLimitsResponseDto | undefined) => MonthlyUsageLimit | undefined;
2299
+ /** 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. */
2300
+ export declare const mapDeploymentLimitsToInput: (dto: DeploymentLimitsResponseDto | undefined, labels: ConversationInputLimitsLabels, formatResetTime?: FormatResetTime) => CatalogItemLimits | undefined;
2075
2301
 
2076
2302
  /** Maps a deployment listing row into the catalog UI's `CatalogItem` shape. */
2077
2303
  export declare const mapDeploymentToCatalogItem: (deployment: DeploymentItemDto, { favoriteIds, entityDetails, folderLabels, editableSchemaIds, isCustomAppsEditable, activeLocale, primaryLocale, resolveIconUrl, }: MapDeploymentToCatalogItemOptions) => CatalogItem;
@@ -2137,12 +2363,18 @@ export declare const mapFileMetadataToDialFile: (metadata: FileMetadataResponseD
2137
2363
  export declare const mapFormValuesToCreateBody: (values: ScheduledTaskCreateFormValues) => CreateScheduledTaskBodyDto;
2138
2364
 
2139
2365
  /**
2140
- * Maps validated edit-form values to the `PUT /api/v1/scheduled-tasks/:scheduleId`
2141
- * request body. `UpdateScheduledTaskBodyDto` has the same shape as
2142
- * `CreateScheduledTaskBodyDto`, so this reuses the same trigger-building logic.
2366
+ * Maps a complete, validated edit draft to an update body. An unset skill
2367
+ * emits null to remove the saved reference; hydrate from detail before editing.
2143
2368
  */
2144
2369
  export declare const mapFormValuesToUpdateBody: (values: ScheduledTaskCreateFormValues) => UpdateScheduledTaskBodyDto;
2145
2370
 
2371
+ /**
2372
+ * Maps the same top-level Cost budgets used by the aggregate cards into table-header state.
2373
+ *
2374
+ * @param formatResetTime - Formats each period's top-level `resetsAt` into the header's reset trio. Omit it to produce statuses with no reset fields.
2375
+ */
2376
+ export declare const mapOverallCostLimitsToPeriodStatuses: (usage: UserLimitStatsResponseDto | undefined, activeLocale: string, t: Translate_2, formatResetTime?: FormatResetTime) => ModelLimitPeriodStatuses;
2377
+
2146
2378
  /**
2147
2379
  * Maps a prompt DTO into a catalog item.
2148
2380
  *
@@ -2201,6 +2433,16 @@ export declare interface MapSkillToCatalogItemOptions {
2201
2433
  favoriteIds: ReadonlySet<string>;
2202
2434
  }
2203
2435
 
2436
+ /**
2437
+ * Returns the normalized stages of a complete raw stage array or a
2438
+ * message-like payload (reading `custom_content.stages`, falling back to
2439
+ * `customContent.stages`), or `undefined` when there are none. An entry
2440
+ * without an `index` takes its array position — the identity a complete
2441
+ * non-streaming array's `parent_stage_index` refers to — while explicit
2442
+ * (possibly sparse) indexes are kept. Not for partial stream deltas.
2443
+ */
2444
+ export declare const mapStages: (source: RawStage[] | RawStageSource | null | undefined) => Stage[] | undefined;
2445
+
2204
2446
  /**
2205
2447
  * Maps a toolset's specification into the lib's credential-status shape,
2206
2448
  * for refreshing the details panel after login/logout. Includes both
@@ -2225,6 +2467,25 @@ export declare interface MapToolsetToCatalogItemOptions {
2225
2467
  resolveIconUrl: (iconUrl: string | undefined) => string | undefined;
2226
2468
  }
2227
2469
 
2470
+ /**
2471
+ * Maps a `UserLimitStatsResponseDto` into `UsageLimitCardGroup`'s `cards` prop,
2472
+ * in Today / This week / This month order. A period is omitted entirely when
2473
+ * the response carries no usable stat for it. Each card's reset trio comes from
2474
+ * `formatResetTime`, and is absent when that callback returns `undefined`.
2475
+ */
2476
+ export declare const mapUsageDataToDashboard: (usage: UserLimitStatsResponseDto | undefined, t: Translate, formatResetTime: FormatResetTime) => UsageLimitCardData[];
2477
+
2478
+ /**
2479
+ * Maps `usage.deployments` into `ModelLimitsSection`'s `rows` prop, joined with model or application
2480
+ * identity from `deploymentItems`. Rows are included only when any displayed period stat has nonzero
2481
+ * usage (Cost stats only, for an application). Order follows `Object.keys(deployments)` —
2482
+ * `deploymentItems` is enrichment-only.
2483
+ *
2484
+ * @param resolveIconUrl - Resolves a deployment's raw `iconUrl` to the URL the avatar should load.
2485
+ * @param resolveDisplayName - Resolves a localized-text map or plain string to the display name for `activeLocale`.
2486
+ */
2487
+ export declare const mapUserUsageToModelLimits: (usage: UserLimitStatsResponseDto | undefined, deploymentItems: DeploymentItemDto[], activeLocale: string, t: Translate_2, resolveIconUrl: ResolveIconUrl, resolveDisplayName: ResolveDisplayName) => ModelLimitRow[];
2488
+
2228
2489
  /** Content payload for Markdown file attachments. */
2229
2490
  declare interface MarkdownCanvasContent {
2230
2491
  /** Discriminates the content type to select the correct renderer. */
@@ -2245,6 +2506,8 @@ declare type McpAppDisplayMode = NonNullable<McpUiHostContext['displayMode']>;
2245
2506
  declare interface McpAppHostAdapter {
2246
2507
  /** `McpUiHostContext` to deliver to the mounted app's `ui/initialize` handshake. */
2247
2508
  hostContext: McpUiHostContext;
2509
+ /** Host identity (`name`/`version`) to deliver to the mounted app's `ui/initialize` handshake. */
2510
+ hostInfo: Implementation;
2248
2511
  /** Operator-configured MCP Apps sandbox-proxy URL, or `null` when unconfigured. */
2249
2512
  sandboxUrl: string | null;
2250
2513
  /** Fetches the matched tool's MCP Apps `ui://` resource. */
@@ -2261,7 +2524,7 @@ export declare interface McpAppHostContextParams {
2261
2524
  mcpAppTheme?: string;
2262
2525
  /** Host's current i18n locale (BCP 47). */
2263
2526
  locale: string;
2264
- /** Operator-configured MCP App user-agent override. Defaults to `'ai-dial-chat'`. */
2527
+ /** Operator-configured MCP App user-agent override. Defaults to the browser's own `navigator.userAgent`. */
2265
2528
  mcpAppUserAgent?: string;
2266
2529
  /**
2267
2530
  * Display modes the host can switch an app between via
@@ -2383,6 +2646,31 @@ export declare enum McpResourceKind {
2383
2646
 
2384
2647
  export declare const mergeCreatedFolderIntoCache: (cache: Map<string, ListFilesItemDto[]>, parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => Map<string, ListFilesItemDto[]>;
2385
2648
 
2649
+ /**
2650
+ * Merges a freshly-fetched page 0 into the currently-loaded run list: an
2651
+ * already-known id is replaced in place at its existing array position, an
2652
+ * unseen id is prepended (upstream order is `created_at desc`, so it is the
2653
+ * newest), and an id absent from `incoming` is left untouched — a background
2654
+ * refresh never removes a loaded run.
2655
+ */
2656
+ export declare const mergeRunsById: (current: ScheduledTaskRunDto[], incoming: ScheduledTaskRunDto[]) => ScheduledTaskRunDto[];
2657
+
2658
+ /**
2659
+ * Merges incoming stage deltas into an existing stage list, keyed by `index`.
2660
+ *
2661
+ * Partial `name` and `content` strings are concatenated across chunks;
2662
+ * attachments are merged by their own `index` (concatenating partial `title`
2663
+ * and `data`); every other field on the incoming delta overwrites the
2664
+ * accumulated one. A brand-new stage whose first chunk carries `name: null`
2665
+ * is normalized to `''`.
2666
+ *
2667
+ * Exported for hosts that keep a flattened `Stage[]` on the message instead
2668
+ * of `Message.custom_content.stages` and therefore cannot reuse
2669
+ * {@link applyChunkToMessages}. Prefer `useConversationStream` when the host
2670
+ * can delegate the whole stream loop.
2671
+ */
2672
+ export declare const mergeStages: (existing: Stage[], incoming: Stage[]) => Stage[];
2673
+
2386
2674
  /** True when `message` is an assistant message carrying at least one stage. */
2387
2675
  export declare const messageHasStages: (message: Message) => boolean;
2388
2676
 
@@ -2392,10 +2680,31 @@ export declare interface MessagePair {
2392
2680
  assistantMessage: Message;
2393
2681
  }
2394
2682
 
2683
+ /** A stable snapshot of one eligible native text selection. */
2684
+ export declare interface MessageSelectionReplySnapshot {
2685
+ /** Scope that owned the selection when it was captured. */
2686
+ conversationId: string;
2687
+ /** Message text root containing the captured range. */
2688
+ body: HTMLDivElement;
2689
+ /** Captured native range. */
2690
+ range: Range;
2691
+ /** Native selected text preserved for the generated file. */
2692
+ text: string;
2693
+ /** Visible fragment of the selected range. */
2694
+ rect: DOMRect;
2695
+ }
2696
+
2395
2697
  /** Formats MIME types as a human-readable, comma-separated list of dotted extensions (or the MIME type itself for wildcards). */
2396
2698
  export declare const mimeTypesToAttachmentExtensionLabels: (types: string[]) => string;
2397
2699
 
2398
- /** Normalizes `*` to the all-files wildcard and drops any value that is not a valid `DialFileAcceptType`. */
2700
+ /**
2701
+ * Normalizes `*` to the all-files wildcard, canonicalizes MIME aliases, and drops
2702
+ * any value that is not a valid `DialFileAcceptType`.
2703
+ *
2704
+ * Aliases are resolved because a file picker matches an `accept` entry against its
2705
+ * own MIME table: a declared `text/json` offers no `.json` file, while the
2706
+ * `application/json` it denotes does.
2707
+ */
2399
2708
  export declare const mimeTypesToDialFileAcceptTypes: (types?: string[]) => DialFileAcceptType[] | undefined;
2400
2709
 
2401
2710
  /**
@@ -2423,6 +2732,7 @@ export declare interface ModelCapabilities {
2423
2732
  hasResume?: boolean;
2424
2733
  hasChatCompletion?: boolean;
2425
2734
  hasResponsesApi?: boolean;
2735
+ hasSkills?: boolean;
2426
2736
  reasoningEfforts?: string[];
2427
2737
  }
2428
2738
 
@@ -2462,18 +2772,6 @@ export declare interface ModelSpecification {
2462
2772
  createdAt?: number;
2463
2773
  }
2464
2774
 
2465
- /** Normalized monthly token usage consumed by the conversation input control. */
2466
- export declare interface MonthlyUsageLimit {
2467
- /** Normalized used-token count. */
2468
- used: number;
2469
- /** Configured monthly token limit. */
2470
- total: number;
2471
- /** Remaining monthly tokens, clamped to zero. */
2472
- remaining: number;
2473
- /** Monthly utilization percentage, clamped to 0–100. */
2474
- usedPercent: number;
2475
- }
2476
-
2477
2775
  /** Returns a skill relative path's final segment (its display name in the file tree). */
2478
2776
  export declare const nameFromPath: (path: string) => string;
2479
2777
 
@@ -2485,6 +2783,20 @@ export declare const nameFromPath: (path: string) => string;
2485
2783
  */
2486
2784
  export declare const navigateToolsetOAuthPopup: (popup: Window, auth: ToolsetOAuthSettings, toolsetId: string, callbackPath: string, credentialsLevel?: ToolsetCredentialsLevel, resourceKind?: OAuthResourceKind, offlineUsageConsent?: boolean) => ToolsetOAuthInitiationResult;
2487
2785
 
2786
+ /**
2787
+ * Encodes a deployment/application id to its single-encoded form regardless
2788
+ * of whether the value it received was already percent-encoded or the raw,
2789
+ * human-readable form — decoding first then re-encoding once is idempotent
2790
+ * either way, since `decodeDeploymentId` on a raw (unencoded) id is a no-op.
2791
+ * Use this instead of `encodeDeploymentId` at a boundary that cannot
2792
+ * guarantee which form it receives, such as a `postMessage` payload from the
2793
+ * settings iframe: calling `encodeDeploymentId` directly on a value the
2794
+ * sender already encoded escapes the existing `%` characters a second time
2795
+ * (`%20` becomes `%2520`), which the backend only ever undoes once and so
2796
+ * 404s on.
2797
+ */
2798
+ export declare const normalizeDeploymentId: (id: string) => string;
2799
+
2488
2800
  /**
2489
2801
  * Normalises a stored response-format string to the current enum. Legacy data
2490
2802
  * may contain `'Markdown'` or `'PlainText'` (capital-first) instead of the
@@ -2500,6 +2812,19 @@ export declare const normalizeResponseFormat: (value: string | undefined) => Res
2500
2812
  */
2501
2813
  export declare const normalizeSkillName: (input: string) => string;
2502
2814
 
2815
+ /**
2816
+ * Encodes a toolset id to its single-encoded form regardless of whether the
2817
+ * value received it in was already percent-encoded or the raw,
2818
+ * human-readable form — decoding first then re-encoding once is idempotent
2819
+ * either way, since `decodeToolsetId` on a raw (unencoded) id is a no-op.
2820
+ * Use this instead of `encodeToolsetId` at a boundary that cannot guarantee
2821
+ * which form it receives, such as a `postMessage` payload from an embedded
2822
+ * iframe: calling `encodeToolsetId` directly on a value the sender already
2823
+ * encoded escapes the existing `%` characters a second time (`%20` becomes
2824
+ * `%2520`), which the backend only ever undoes once and so 404s on.
2825
+ */
2826
+ export declare const normalizeToolsetId: (toolsetId: string) => string;
2827
+
2503
2828
  export declare const normalizeVirtualPath: (value: string) => string;
2504
2829
 
2505
2830
  /** Arguments handed to the host's exchange callback. */
@@ -2571,6 +2896,16 @@ declare interface OoxmlDocxHighlightLocation {
2571
2896
  text: string;
2572
2897
  }
2573
2898
 
2899
+ /** A complete table row in the DOCX body, matched by cell text. */
2900
+ declare interface OoxmlDocxTableRowLocation {
2901
+ /** Location kind. */
2902
+ kind: OoxmlHighlightKind.DocxTableRow;
2903
+ /** Plain text of each cell, in column order. */
2904
+ cells: string[];
2905
+ /** 1-based matching row in document order. */
2906
+ occurrence: number;
2907
+ }
2908
+
2574
2909
  /** Supported document formats rendered by the installed `@silurus/ooxml` runtime. */
2575
2910
  declare enum OoxmlFileType {
2576
2911
  Docx = 'docx',
@@ -2593,6 +2928,10 @@ declare enum OoxmlHighlightKind {
2593
2928
  DocxTextRange = 'docxTextRange',
2594
2929
  /** A character range inside a single PPTX shape on one slide. */
2595
2930
  PptxTextRange = 'pptxTextRange',
2931
+ /** A complete DOCX table row identified by its cell text. */
2932
+ DocxTableRow = 'docxTableRow',
2933
+ /** A complete PPTX table row identified by its cell text on one slide. */
2934
+ PptxTableRow = 'pptxTableRow',
2596
2935
  /** One cell, or a contiguous same-row cell range, on a named XLSX sheet. */
2597
2936
  XlsxCellRange = 'xlsxCellRange',
2598
2937
  }
@@ -2601,6 +2940,8 @@ declare enum OoxmlHighlightKind {
2601
2940
  declare type OoxmlHighlightLocation =
2602
2941
  | OoxmlDocxHighlightLocation
2603
2942
  | OoxmlPptxHighlightLocation
2943
+ | OoxmlDocxTableRowLocation
2944
+ | OoxmlPptxTableRowLocation
2604
2945
  | OoxmlXlsxHighlightLocation;
2605
2946
 
2606
2947
  /** A cited character range inside a single shape on one PPTX slide. */
@@ -2619,6 +2960,18 @@ declare interface OoxmlPptxHighlightLocation {
2619
2960
  text: string;
2620
2961
  }
2621
2962
 
2963
+ /** A complete table row on one PPTX slide, matched by cell text. */
2964
+ declare interface OoxmlPptxTableRowLocation {
2965
+ /** Location kind. */
2966
+ kind: OoxmlHighlightKind.PptxTableRow;
2967
+ /** Plain text of each cell, in column order. */
2968
+ cells: string[];
2969
+ /** 1-based matching row on the specified slide. */
2970
+ occurrence: number;
2971
+ /** 1-based slide number. */
2972
+ slide: number;
2973
+ }
2974
+
2622
2975
  /** A cited cell, or contiguous same-row cell range, on a named XLSX sheet. */
2623
2976
  declare interface OoxmlXlsxHighlightLocation {
2624
2977
  /** Discriminates this location within `OoxmlHighlightLocation`. */
@@ -2790,6 +3143,15 @@ export declare const prepareMoveRenameItems: (copiedItems: DialCopiedItem[], buc
2790
3143
  preparedMoveItems: PreparedCopyMoveItem<MoveItemDto>[];
2791
3144
  };
2792
3145
 
3146
+ /**
3147
+ * Validates form values before creating a request body. Hosts translate the
3148
+ * returned field codes and must not issue a write when `ok` is false.
3149
+ */
3150
+ export declare const prepareScheduledTaskCreateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<CreateScheduledTaskBodyDto>;
3151
+
3152
+ /** Validates form values before preparing an update request body. */
3153
+ export declare const prepareScheduledTaskUpdateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<UpdateScheduledTaskBodyDto>;
3154
+
2793
3155
  /** Maximum body length accepted by `CreatePromptDto.content`. */
2794
3156
  export declare const PROMPT_CONTENT_MAX_LENGTH = 50000;
2795
3157
 
@@ -2841,7 +3203,11 @@ export declare enum PromptSource {
2841
3203
  Public = "public"
2842
3204
  }
2843
3205
 
2844
- /** DIAL Core bucket holding organisation-wide skills. */
3206
+ /**
3207
+ * DIAL Core bucket holding organisation-wide skills.
3208
+ *
3209
+ * @deprecated Use `PUBLIC_BUCKET` from `@epam/ai-dial-chat-shared`.
3210
+ */
2845
3211
  export declare const PUBLIC_SKILL_BUCKET = "public";
2846
3212
 
2847
3213
  /** The DIAL publish API surface produced by {@link createPublishApiClient}. */
@@ -2873,6 +3239,68 @@ export declare interface QuickAppSchemaLike {
2873
3239
  displayName?: string;
2874
3240
  }
2875
3241
 
3242
+ /**
3243
+ * One stage as it arrives from the REST API or the SSE stream, before
3244
+ * normalization. Structurally satisfied by the generated `StageDto` and by a
3245
+ * raw stream delta, both of which omit `index`/`name`/`status` on the chunk
3246
+ * that opens a stage.
3247
+ */
3248
+ export declare interface RawStage {
3249
+ /** Ordering key. Defaults to `0` when absent. */
3250
+ index?: number | null;
3251
+ /** Stage title. `null` on the chunk that opens the stage. */
3252
+ name?: string | null;
3253
+ /** Terminal state as a raw wire string; anything other than `'completed'`/`'failed'` means still running. */
3254
+ status?: string | null;
3255
+ /** Additional stage text. */
3256
+ content?: string | null;
3257
+ /** Short source/category label shown beside the stage name. */
3258
+ tag?: string | null;
3259
+ /** Files produced or referenced by this stage. */
3260
+ attachments?: RawStageAttachment[] | null;
3261
+ /**
3262
+ * `index` of the parent stage (its array position in a complete unindexed
3263
+ * array). Nullish means top level; `0` is a valid parent.
3264
+ */
3265
+ parent_stage_index?: number | null;
3266
+ }
3267
+
3268
+ /**
3269
+ * One stage attachment as it arrives from the REST API or the SSE stream,
3270
+ * before normalization: every field is optional and may be `null`.
3271
+ */
3272
+ export declare interface RawStageAttachment {
3273
+ /** Zero-based position in the attachment list. */
3274
+ index?: number | null;
3275
+ /** MIME type of the attachment content. */
3276
+ type?: string | null;
3277
+ /** Display name shown in the UI. */
3278
+ title?: string | null;
3279
+ /** Inline base-64 encoded content. */
3280
+ data?: string | null;
3281
+ /** Remote URL pointing to the attachment content. */
3282
+ url?: string | null;
3283
+ /** MIME type of the referenced resource. */
3284
+ reference_type?: string | null;
3285
+ /** URL of an alternate reference resource. */
3286
+ reference_url?: string | null;
3287
+ }
3288
+
3289
+ /**
3290
+ * Message-like payload carrying stages under either the wire's snake_case
3291
+ * `custom_content` or a host's camelCased `customContent`.
3292
+ */
3293
+ export declare interface RawStageSource {
3294
+ /** Custom content as the DIAL wire format spells it. */
3295
+ custom_content?: {
3296
+ stages?: RawStage[] | null;
3297
+ } | null;
3298
+ /** Custom content as a camelCasing host spells it. */
3299
+ customContent?: {
3300
+ stages?: RawStage[] | null;
3301
+ } | null;
3302
+ }
3303
+
2876
3304
  /**
2877
3305
  * Reads a skill file response as raw bytes, or `null` when the body is
2878
3306
  * larger than `SKILL_MANIFEST_MAX_BYTES`. The declared `content-length` is
@@ -2946,6 +3374,23 @@ export declare const referenceAttachmentToPdfCanvasContent: (attachment: Attachm
2946
3374
  /** Name reserved for the hidden marker file used to create empty folders. */
2947
3375
  export declare const RESERVED_MARKER_NAME = ".dial_folder";
2948
3376
 
3377
+ /**
3378
+ * One reset time, already parsed and formatted by the host. Declared
3379
+ * structurally here so this library never imports an application type; the
3380
+ * host passes a value that satisfies this shape (e.g. `apps/chat`'s own
3381
+ * `ResetTimeDisplay`).
3382
+ */
3383
+ export declare interface ResetTimeDisplay {
3384
+ /** Exclusive end of the period as an epoch ms value, for the host's boundary scheduling. */
3385
+ resetsAtMs: number;
3386
+ /** Machine-readable instant for a `<time dateTime>` attribute. */
3387
+ isoValue: string;
3388
+ /** Visible reset line. */
3389
+ label: string;
3390
+ /** Accessible expansion of the reset line. */
3391
+ ariaLabel: string;
3392
+ }
3393
+
2949
3394
  /**
2950
3395
  * Resolves the primary action for a catalog item.
2951
3396
  *
@@ -2984,6 +3429,9 @@ export declare const resolveDialFileBucketAndPath: (fileId: string) => {
2984
3429
  path: string;
2985
3430
  } | undefined;
2986
3431
 
3432
+ /** A callback that resolves a display name from a localized-text value. */
3433
+ declare type ResolveDisplayName = (name: string | Record<string, string> | undefined | null, locale: string) => string;
3434
+
2987
3435
  /** Resolves a DIAL Core file id to a downloadable URL. Host-owned — encodes the app's own file-download endpoint. */
2988
3436
  export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
2989
3437
 
@@ -3015,12 +3463,24 @@ export declare const resolveGroupedVisualizerCanvasContent: (attachments: Displa
3015
3463
 
3016
3464
  /**
3017
3465
  * Resolves an HTML canvas content payload from a DisplayAttachment.
3018
- * Fetches and inlines the HTML as `srcdoc` when the attachment has a download URL or inline data.
3019
- * Returns `null` if no source is available, or an `ErrorCanvasContent` on fetch failure.
3020
- * Rejects `srcdoc` payloads larger than 1 MiB to prevent browser truncation.
3466
+ * When the attachment has a download URL, that URL is the primary render
3467
+ * target so the preview loads via `src` and gets its own response-level CSP
3468
+ * instead of inheriting the host document's — no HTML text is fetched up
3469
+ * front; `resolveSourceText` fetches it lazily, only when the "View source"
3470
+ * toggle is used, and rejects if that fetch fails. `isSameOriginUrl` reflects
3471
+ * a real comparison against the embedding document's own origin.
3472
+ * With no download URL (local file or inline data), falls back to `srcdoc`,
3473
+ * rejecting payloads larger than 1 MiB to prevent browser truncation, and
3474
+ * forwards `resolvers.htmlSrcdocHostUrl` so that HTML can still render under
3475
+ * its own response-level CSP.
3476
+ * Returns `null` if no source is available, or an `ErrorCanvasContent` when
3477
+ * that fallback fetch fails.
3021
3478
  */
3022
3479
  export declare const resolveHtmlCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<HtmlCanvasContent | ErrorCanvasContent | null>;
3023
3480
 
3481
+ /** A callback that resolves an icon URL from a deployment's raw `iconUrl` field. */
3482
+ declare type ResolveIconUrl = (iconUrl: string | undefined) => string | undefined;
3483
+
3024
3484
  /**
3025
3485
  * Resolves an image canvas content payload from a DisplayAttachment without
3026
3486
  * fetching — returns a local blob URL or the BFF download URL directly so the
@@ -3074,6 +3534,9 @@ export declare const resolvePdfCanvasContent: (attachment: DisplayAttachment, re
3074
3534
  */
3075
3535
  export declare const resolveRelativeDialFilePath: (pathOrFileId: string, bucket: string) => string;
3076
3536
 
3537
+ /** Returns the section whose root label is the first segment of `virtualPath`, or `undefined` when none matches. */
3538
+ export declare const resolveSectionByPath: <TSection extends DialFileManagerSection>(virtualPath: string, sections: readonly TSection[]) => TSection | undefined;
3539
+
3077
3540
  /**
3078
3541
  * Converts an opaque file-listing id into the path expected by the single-file
3079
3542
  * download endpoint. Core may prefix listing paths with the skill path and its
@@ -3093,6 +3556,16 @@ export declare const resolveSkillManifestFileId: (files: SkillMetadataItemDto[],
3093
3556
  /** Resolves a plain-text canvas content payload from a DisplayAttachment, or `null` if unavailable. */
3094
3557
  export declare const resolveTextCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<PlainTextCanvasContent | ErrorCanvasContent | null>;
3095
3558
 
3559
+ /**
3560
+ * Resolves which credentials level a toolset's login applies to, per DIAL
3561
+ * Core's public/private toolset convention: a `public`-bucket toolset is
3562
+ * shared credentials-wise at `User` level, while a private/workspace toolset
3563
+ * is scoped at `Global` level. Every surface that drives a toolset login
3564
+ * (the sign-in-interrupt dialog, the QuickApps editor iframe bridge,
3565
+ * `useToolsetLogin`) must resolve the level this way rather than assuming one.
3566
+ */
3567
+ export declare const resolveToolsetCredentialsLevel: (toolsetId: string) => ToolsetCredentialsLevel.User | ToolsetCredentialsLevel.Global;
3568
+
3096
3569
  /**
3097
3570
  * Fetches the attachment payload and builds a `VisualizerCanvasContent` for the
3098
3571
  * given registry entry and theme. Returns `null` when the payload cannot be
@@ -3105,6 +3578,11 @@ export declare const resolveTextCanvasContent: (attachment: DisplayAttachment, r
3105
3578
  */
3106
3579
  export declare const resolveVisualizerCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, entry: CustomVisualizer, themeId: string) => Promise<VisualizerCanvasContent | null>;
3107
3580
 
3581
+ /** An application schema with a resolved id, as returned by {@link getRunnerSchemas}. */
3582
+ export declare type RunnerSchema<T extends QuickAppSchemaLike> = T & {
3583
+ id: string;
3584
+ };
3585
+
3108
3586
  /** Decodes a URI-encoded path segment, returning the original string if decoding fails. */
3109
3587
  export declare const safeDecodeURI: (path: string) => string;
3110
3588
 
@@ -3146,6 +3624,114 @@ export declare type ScheduledTaskDtoMappingResult = {
3146
3624
  reason: UnsupportedTriggerReason;
3147
3625
  };
3148
3626
 
3627
+ /** A checked request preparation result that never serializes invalid values. */
3628
+ export declare type ScheduledTaskPreparationResult<TBody> = {
3629
+ ok: true;
3630
+ body: TBody;
3631
+ } | {
3632
+ ok: false;
3633
+ errors: ScheduledTaskValidationErrors;
3634
+ };
3635
+
3636
+ export declare interface ScheduledTaskRunsListRequest {
3637
+ scheduleId: string;
3638
+ limit?: number;
3639
+ offset?: number;
3640
+ signal?: AbortSignal;
3641
+ }
3642
+
3643
+ export declare interface ScheduledTasksApiClient {
3644
+ listScheduledTasks: (request?: ScheduledTasksListRequest) => Promise<ListScheduledTasksResponseDto>;
3645
+ listScheduledTaskRuns: (request: ScheduledTaskRunsListRequest) => Promise<ListScheduledTaskRunsResponseDto>;
3646
+ createScheduledTask: (body: CreateScheduledTaskBodyDto) => Promise<CreatedScheduledTaskDto>;
3647
+ getScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3648
+ updateScheduledTask: (scheduleId: string, body: UpdateScheduledTaskBodyDto) => Promise<UpdatedScheduledTaskDto>;
3649
+ pauseScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3650
+ resumeScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3651
+ deleteScheduledTask: (scheduleId: string) => Promise<void>;
3652
+ }
3653
+
3654
+ /** Narrow configured generated-client surface required by scheduler hooks. */
3655
+ export declare interface ScheduledTasksConfiguredClient {
3656
+ listScheduledTasks: (request: {
3657
+ limit?: number;
3658
+ offset?: number;
3659
+ search?: string;
3660
+ sort?: ListScheduledTasksSortEnum;
3661
+ }, options?: RequestInit) => Promise<ListScheduledTasksResponseDto>;
3662
+ listScheduledTaskRuns: (request: {
3663
+ scheduleId: string;
3664
+ limit?: number;
3665
+ offset?: number;
3666
+ }, options?: RequestInit) => Promise<ListScheduledTaskRunsResponseDto>;
3667
+ createScheduledTask: (request: {
3668
+ createScheduledTaskBodyDto: CreateScheduledTaskBodyDto;
3669
+ }) => Promise<CreatedScheduledTaskDto>;
3670
+ getScheduledTask: (request: {
3671
+ scheduleId: string;
3672
+ }) => Promise<ScheduledTaskDto>;
3673
+ updateScheduledTask: (request: {
3674
+ scheduleId: string;
3675
+ updateScheduledTaskBodyDto: UpdateScheduledTaskBodyDto;
3676
+ }) => Promise<UpdatedScheduledTaskDto>;
3677
+ pauseScheduledTask: (request: {
3678
+ scheduleId: string;
3679
+ }) => Promise<ScheduledTaskDto>;
3680
+ resumeScheduledTask: (request: {
3681
+ scheduleId: string;
3682
+ }) => Promise<ScheduledTaskDto>;
3683
+ deleteScheduledTask: (request: {
3684
+ scheduleId: string;
3685
+ }) => Promise<void>;
3686
+ }
3687
+
3688
+ /** App-agnostic request options accepted by the scheduler facade. */
3689
+ export declare interface ScheduledTasksListRequest {
3690
+ limit?: number;
3691
+ offset?: number;
3692
+ search?: string;
3693
+ sort?: ListScheduledTasksSortEnum;
3694
+ signal?: AbortSignal;
3695
+ }
3696
+
3697
+ export declare interface ScheduledTaskTriggerDescription {
3698
+ kind: ScheduledTaskTriggerDescriptionKind;
3699
+ time?: string;
3700
+ dayOfWeek?: string;
3701
+ dayOfMonth?: string;
3702
+ intervalMinutes?: number;
3703
+ date?: Date;
3704
+ expression?: string;
3705
+ sourceTimezone: 'utc';
3706
+ }
3707
+
3708
+ /** Display categories are independent of task editability. */
3709
+ export declare enum ScheduledTaskTriggerDescriptionKind {
3710
+ OneTime = "oneTime",
3711
+ Hourly = "hourly",
3712
+ EveryNMinutes = "everyNMinutes",
3713
+ Daily = "daily",
3714
+ Weekly = "weekly",
3715
+ Monthly = "monthly",
3716
+ Custom = "custom",
3717
+ Invalid = "invalid"
3718
+ }
3719
+
3720
+ export declare interface ScheduledTaskTriggerDescriptionOptions {
3721
+ /** Display timezone; defaults to UTC for backwards compatibility. */
3722
+ timeZone?: string;
3723
+ /** Date whose timezone offset is used. Defaults to now (the existing UTC-storage policy). */
3724
+ referenceDate?: Date;
3725
+ }
3726
+
3727
+ /**
3728
+ * Picks the auth-status field matching one credentials level out of a
3729
+ * toolset's `authSettings` — DIAL Core reports `userLevelAuthStatus` and
3730
+ * `globalAuthStatus` as independent fields rather than one status keyed by
3731
+ * level.
3732
+ */
3733
+ export declare const selectToolsetAuthStatus: (authSettings: Pick<DialToolsetAuthSettingsDto, "userLevelAuthStatus" | "globalAuthStatus"> | undefined, credentialsLevel: ToolsetCredentialsLevel) => string | undefined;
3734
+
3149
3735
  /** Serializes a prompt export envelope into a pretty-printed JSON blob. */
3150
3736
  export declare const serializePromptExport: (envelope: PromptExportFormat) => Blob;
3151
3737
 
@@ -3179,6 +3765,13 @@ export declare const shouldWatchForDisplayNameUpdate: (conversation: Conversatio
3179
3765
  */
3180
3766
  export declare const SKILL_FILE_UPLOAD_MAX_BYTES = 1048576;
3181
3767
 
3768
+ /**
3769
+ * Zero-byte object written at `<folder>/.dial_folder` so an otherwise empty
3770
+ * skill folder survives a save — DIAL Core storage has no directory objects,
3771
+ * so a folder only exists as a file's path prefix.
3772
+ */
3773
+ export declare const SKILL_FOLDER_MARKER = ".dial_folder";
3774
+
3182
3775
  /**
3183
3776
  * Upper bound on `nextToken` follow-ups per listing, so a pathological bucket
3184
3777
  * cannot spin the client forever.
@@ -3197,6 +3790,9 @@ export declare const SKILL_MANIFEST_FILE = "SKILL.md";
3197
3790
  */
3198
3791
  export declare const SKILL_MANIFEST_MAX_BYTES: number;
3199
3792
 
3793
+ /** Length limit of each skill editor text field. */
3794
+ export declare const SKILL_TEXT_FIELD_MAX_LENGTHS: Record<SkillTextField, number>;
3795
+
3200
3796
  /**
3201
3797
  * Client-side mirror of the backend's default `SKILL_UPLOAD_MAX_FILES`
3202
3798
  * (`apps/chat-api/src/config/environment.config.ts`), used only for
@@ -3221,6 +3817,28 @@ export declare interface SkillAboutDetails {
3221
3817
  skillPrompt?: string;
3222
3818
  }
3223
3819
 
3820
+ /** Semantic classification of an import request failure. */
3821
+ export declare enum SkillArchiveImportErrorKind {
3822
+ Validation = "validation",
3823
+ Collision = "collision",
3824
+ RateLimited = "rateLimited",
3825
+ ServiceUnavailable = "serviceUnavailable",
3826
+ Generic = "generic"
3827
+ }
3828
+
3829
+ /** Phase of a skill-archive import, driving the host's loading/success/error presentation. */
3830
+ export declare enum SkillArchiveImportStatus {
3831
+ Idle = "idle",
3832
+ Uploading = "uploading",
3833
+ Success = "success",
3834
+ Error = "error"
3835
+ }
3836
+
3837
+ /** Reason a selected/dropped file was rejected before any request was made. */
3838
+ export declare enum SkillArchiveSelectionRejectionReason {
3839
+ UnsupportedFilename = "unsupportedFilename"
3840
+ }
3841
+
3224
3842
  /** Injected API port for skill detail fetching. Mirrors exact server-api wrapper signatures. */
3225
3843
  export declare interface SkillDetailsApi {
3226
3844
  /** Downloads a raw skill file, returning the raw fetch `Response`. */
@@ -3234,6 +3852,12 @@ export declare interface SkillDetailsApi {
3234
3852
  limit?: number;
3235
3853
  recursive?: boolean;
3236
3854
  }, signal?: AbortSignal): Promise<SkillFileListResponseDto>;
3855
+ /**
3856
+ * Fetches a single skill's own authoritative metadata (`author`,
3857
+ * `updatedAt`, and the rest of `SkillMetadataItemDto`) — not the catalog
3858
+ * listing entry, which may be sparse for a shared skill.
3859
+ */
3860
+ getSkillMetadata(bucket: string, path: string, signal?: AbortSignal): Promise<SkillMetadataItemDto>;
3237
3861
  }
3238
3862
 
3239
3863
  /** Already-configured DIAL Core download operations `useSkillEditorLoad` needs. */
@@ -3277,6 +3901,14 @@ export declare interface SkillEditorSubmitClient {
3277
3901
  export declare interface SkillEditorSubmitMessages {
3278
3902
  /** Shown when a required field is empty. */
3279
3903
  required: string;
3904
+ /** Shown when a name, description or instructions value exceeds its length limit, given that limit. */
3905
+ tooLong: (maxLength: number) => string;
3906
+ /**
3907
+ * Shown when the Instructions value opens with its own YAML frontmatter
3908
+ * block — pasting a whole `SKILL.md` in there would otherwise produce a
3909
+ * manifest with two frontmatter blocks.
3910
+ */
3911
+ instructionsFrontmatter: string;
3280
3912
  /** Shown when the normalized skill name fails DIAL's naming rules. */
3281
3913
  nameInvalid: string;
3282
3914
  /** Shown when the skill name already exists (409), or defensively on an unreachable create-mode 412. */
@@ -3411,6 +4043,9 @@ export declare interface SkillFilesPayload {
3411
4043
  */
3412
4044
  export declare const skillFileToAttachment: (node: SkillFileTreeNode, content: SkillFileContent) => Attachment;
3413
4045
 
4046
+ /** Returns the folder path a marker path stands for (`docs/.dial_folder` → `docs`). */
4047
+ export declare const skillFolderMarkerParent: (markerPath: string) => string;
4048
+
3414
4049
  /** A `SKILL.md` split into its frontmatter fields and its prose body. */
3415
4050
  export declare interface SkillManifestDocument {
3416
4051
  /** `name` frontmatter field, when present and a string. */
@@ -3477,12 +4112,49 @@ export declare enum SkillSource {
3477
4112
  Public = "public"
3478
4113
  }
3479
4114
 
4115
+ /** Skill editor text fields with a length limit. */
4116
+ export declare type SkillTextField = 'name' | 'description' | 'instructions';
4117
+
3480
4118
  /** Splits a file name into its base and extension, using only the last dot. */
3481
4119
  export declare const splitFileNameExtension: (fileName: string) => {
3482
4120
  base: string;
3483
4121
  extension: string;
3484
4122
  };
3485
4123
 
4124
+ /** Per-start options of {@link UseConversationStreamResult.startStream}. */
4125
+ export declare interface StartStreamOptions {
4126
+ /**
4127
+ * Treats a `GenerationConflictError` as "this turn is already being
4128
+ * generated" — e.g. a page reloaded before that generation saved its start
4129
+ * state — and joins the running generation instead of showing the conflict
4130
+ * message, which remains the fallback. Only for a start that sends no new
4131
+ * user text; a send the user typed must keep reporting the conflict.
4132
+ */
4133
+ resumeOnConflict?: boolean;
4134
+ }
4135
+
4136
+ /**
4137
+ * Answers one question: would appending this text after the fence that
4138
+ * `buildSkillManifest` writes produce a *second* frontmatter block?
4139
+ *
4140
+ * That happens when the text's first non-blank line is a bare `---` and some
4141
+ * later line is a bare `---` too — the exact shape of a `SKILL.md` pasted
4142
+ * wholesale into the editor's Instructions field.
4143
+ *
4144
+ * Detection is deliberately structural rather than YAML-based: a pasted block
4145
+ * whose fenced content fails to parse corrupts the stored manifest
4146
+ * identically (and renders as a setext `h2` in the Catalog's Details tab just
4147
+ * the same), so requiring parseable YAML here would let the worst cases
4148
+ * through. Keeping `parseYaml` out also makes this cheap enough to run on
4149
+ * every keystroke.
4150
+ *
4151
+ * A single unclosed fence returns `false`: with no closing fence there is no
4152
+ * second block, matching `FRONTMATTER_PATTERN`'s own requirement. A `---`
4153
+ * appearing later in the body (a horizontal rule, a setext underline) is
4154
+ * likewise not a frontmatter block.
4155
+ */
4156
+ export declare const startsWithFrontmatterBlock: (text: string) => boolean;
4157
+
3486
4158
  /** Options accepted by {@link ConversationStreamTransport.streamCompletion}. */
3487
4159
  export declare interface StreamCompletionOptions {
3488
4160
  onChunk: (chunk: StreamChunk) => void;
@@ -3491,6 +4163,29 @@ export declare interface StreamCompletionOptions {
3491
4163
  signal: AbortSignal;
3492
4164
  }
3493
4165
 
4166
+ /**
4167
+ * Reported through `onError` when the network connection carrying a
4168
+ * completion stream is lost (a rejected `fetch`, or a read that fails after a
4169
+ * 2xx response) or goes silent past the idle timeout — what a laptop sleep or
4170
+ * a phone lock mid-generation produces. The backend-owned generation may
4171
+ * still be running, so the caller can recover it rather than treat the
4172
+ * response as failed. `cause` holds the original error, when there is one.
4173
+ */
4174
+ export declare class StreamInterruptedError extends Error {
4175
+ constructor(cause?: unknown);
4176
+ }
4177
+
4178
+ /**
4179
+ * Reported through `onError` when DIAL Core itself signals a failure with an
4180
+ * in-band `{ error: { message } }` SSE chunk. Its `message` is upstream text
4181
+ * intended for the user, unlike a transport failure (failed `fetch`, non-OK
4182
+ * status, broken stream), whose message is technical detail. A custom
4183
+ * transport raises this for any user-facing upstream error text.
4184
+ */
4185
+ export declare class StreamUpstreamError extends Error {
4186
+ constructor(message: string);
4187
+ }
4188
+
3494
4189
  /** Strips leading and trailing slashes from a path segment. */
3495
4190
  export declare const stripSurroundingSlashes: (path: string) => string;
3496
4191
 
@@ -3808,6 +4503,14 @@ export declare const toPublishEntityType: (type: CatalogEntityType) => CatalogPu
3808
4503
  */
3809
4504
  export declare const toPublishRuleDto: (rule: PublicationRule) => PublishRuleDto;
3810
4505
 
4506
+ /**
4507
+ * Returns a renderable `Stage` for one raw payload: `index` defaults to `0`,
4508
+ * `name` to `''`, an unrecognized `status` to `null` (still running), and
4509
+ * `content`/`tag`/`attachments`/`parent_stage_index` are passed through when
4510
+ * present (a parent of `0` included).
4511
+ */
4512
+ export declare const toStage: (stage: RawStage) => Stage;
4513
+
3811
4514
  /** Request shape the host's selected-deployment recognition call accepts. */
3812
4515
  export declare interface TranscribeWithDeploymentParams {
3813
4516
  audioUrl: string;
@@ -3816,6 +4519,12 @@ export declare interface TranscribeWithDeploymentParams {
3816
4519
  signal: AbortSignal;
3817
4520
  }
3818
4521
 
4522
+ /** A translate function compatible with i18next's `TFunction`. */
4523
+ declare type Translate = (key: string, options?: Record<string, unknown>) => string;
4524
+
4525
+ /** A translate function compatible with i18next's `TFunction`. */
4526
+ declare type Translate_2 = (key: string, options?: Record<string, unknown>) => string;
4527
+
3819
4528
  export declare const trimFileNameToByteLimit: (name: string, limit?: number) => string;
3820
4529
 
3821
4530
  /** An error thrown to indicate the caller is unauthenticated. */
@@ -3824,19 +4533,25 @@ export declare interface UnauthorizedErrorLike extends Error {
3824
4533
  readonly url: string;
3825
4534
  }
3826
4535
 
4536
+ /** Returns a new set containing every path from each of `pathSets`. */
4537
+ export declare const unionPathSets: (pathSets: readonly ReadonlySet<string>[]) => Set<string>;
4538
+
3827
4539
  /** A skill archive unpacked into its manifest text and a relative-path → bytes map of every other entry. */
3828
4540
  export declare interface UnpackedSkillArchive {
3829
4541
  /** The root `SKILL.md` entry's decoded text content. */
3830
4542
  manifestText: string;
3831
- /** Every non-manifest entry, keyed by relative path. */
4543
+ /** Every non-manifest, non-marker entry, keyed by relative path. */
3832
4544
  files: Map<string, Uint8Array>;
4545
+ /** Folder paths restored from `<folder>/.dial_folder` marker entries. */
4546
+ folders: string[];
3833
4547
  }
3834
4548
 
3835
4549
  /**
3836
4550
  * Unpacks a whole-skill ZIP (as downloaded from `GET /api/v1/skills/download`
3837
4551
  * — DIAL Core's whole-resource `GET` is the one place this contract still
3838
- * uses a ZIP, per design.md) into its manifest text and every other entry's
3839
- * bytes. Throws if the archive has no root `SKILL.md` entry.
4552
+ * uses a ZIP, per design.md) into its manifest text, every other entry's
4553
+ * bytes, and the folders its empty-folder markers stand for. Throws if the
4554
+ * archive has no root `SKILL.md` entry.
3840
4555
  */
3841
4556
  export declare const unpackSkillArchive: (bytes: Uint8Array) => UnpackedSkillArchive;
3842
4557
 
@@ -3850,7 +4565,7 @@ export declare enum UnsupportedTriggerReason {
3850
4565
  MissingRequiredFields = "missingRequiredFields"
3851
4566
  }
3852
4567
 
3853
- export declare const updateEntry: (prev: FileUploadBatchState | null, index: number, patch: FileUploadStatus | Partial<Pick<FileUploadEntry, "status" | "percent">>) => FileUploadBatchState | null;
4568
+ export declare const updateEntry: (prev: FileUploadBatchState | null, id: string, patch: FileUploadStatus | Partial<Pick<FileUploadEntry, "status" | "percent">>) => FileUploadBatchState | null;
3854
4569
 
3855
4570
  /** Max number of files uploaded concurrently within a single upload batch. */
3856
4571
  export declare const UPLOAD_CONCURRENCY = 3;
@@ -3874,6 +4589,66 @@ export declare interface UploadFileWithProgressOptions {
3874
4589
  /** Upload mode passed to `FilesApi.uploadFile`: overwrite an existing file or fail if it already exists. */
3875
4590
  export declare type UploadMode = 'overwrite' | 'create-only';
3876
4591
 
4592
+ /**
4593
+ * i18n key strings that the consuming app's translation bundle must define for
4594
+ * `mapUsageDataToDashboard` to produce correctly translated strings. The
4595
+ * values are the default key paths used by AI DIAL Chat.
4596
+ */
4597
+ export declare const USAGE_DATA_I18N_KEYS: {
4598
+ /** Title for the current-UTC-day card (e.g. `'Today'`). */
4599
+ readonly todayTitle: "usage.todayTitle";
4600
+ /** Accessible period description for the current-UTC-day card. */
4601
+ readonly todayPeriodDescription: "usage.todayPeriodDescription";
4602
+ /** Title for the current-UTC-week card (e.g. `'This week'`). */
4603
+ readonly thisWeekTitle: "usage.thisWeekTitle";
4604
+ /** Accessible period description for the current-UTC-week card. */
4605
+ readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
4606
+ /** Title for the current-UTC-month card (e.g. `'This month'`). */
4607
+ readonly thisMonthTitle: "usage.thisMonthTitle";
4608
+ /** Accessible period description for the current-UTC-month card. */
4609
+ readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
4610
+ /** Aria label when there is no limit. Receives `{ used: string }`. */
4611
+ readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
4612
+ /** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
4613
+ readonly progressAriaLabel: "usage.progressAriaLabel";
4614
+ };
4615
+
4616
+ /**
4617
+ * i18n key strings that the consuming app's translation bundle must define for
4618
+ * `mapUserUsageToModelLimits` and `mapOverallCostLimitsToPeriodStatuses` to produce
4619
+ * correctly translated strings. The values are the default key paths used by AI DIAL Chat.
4620
+ */
4621
+ export declare const USAGE_MODEL_LIMITS_I18N_KEYS: {
4622
+ /** Period label used in tooltip text. Receives no interpolation. */
4623
+ readonly todayPeriodDescription: "usage.todayPeriodDescription";
4624
+ /** Period label used in tooltip text. Receives no interpolation. */
4625
+ readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
4626
+ /** Period label used in tooltip text. Receives no interpolation. */
4627
+ readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
4628
+ /** Tooltip when the overall cost limit is running low. Receives `{ period: string }`. */
4629
+ readonly overallCostLimitRunningLowTooltip: "usage.overallCostLimitRunningLowTooltip";
4630
+ /** Tooltip when the overall cost limit is reached. Receives `{ period: string }`. */
4631
+ readonly overallCostLimitReachedTooltip: "usage.overallCostLimitReachedTooltip";
4632
+ /** Aria label for a metric cell with no data. */
4633
+ readonly unavailableLabel: "usage.unavailableLabel";
4634
+ /** Supporting label when a token limit follows the cost limit. */
4635
+ readonly followsCostLimitLabel: "usage.followsCostLimitLabel";
4636
+ /** Supporting label when there is no per-deployment token limit. */
4637
+ readonly noLimitLabel: "usage.noLimitLabel";
4638
+ /** Aria label when token usage has no limit but follows the cost limit. Receives `{ used: string }`. */
4639
+ readonly followsCostLimitAriaLabel: "usage.followsCostLimitAriaLabel";
4640
+ /** Aria label when there is no limit. Receives `{ used: string }`. */
4641
+ readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
4642
+ /** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
4643
+ readonly progressAriaLabel: "usage.progressAriaLabel";
4644
+ /** Label for the spent-cost cell. Receives `{ amount: string }`. */
4645
+ readonly spentLabel: "usage.spentLabel";
4646
+ /** Type caption for an application (agent) row. Receives no interpolation. */
4647
+ readonly applicationTypeLabel: "usage.applicationTypeLabel";
4648
+ /** Supporting label on an application row's spent cost. Receives no interpolation. */
4649
+ readonly includesCalledModelsLabel: "usage.includesCalledModelsLabel";
4650
+ };
4651
+
3877
4652
  /**
3878
4653
  * Synchronises the active conversation with the conversation list and returns
3879
4654
  * the panel-space id of the active conversation, or `undefined` when none is active.
@@ -3882,7 +4657,8 @@ export declare type UploadMode = 'overwrite' | 'create-only';
3882
4657
  * 1. If the active conversation is not present in the list, requests a
3883
4658
  * refresh. The list and refresh callback are intentionally excluded from
3884
4659
  * the dependency array to avoid a refresh-loop on every list update.
3885
- * 2. Marks the active conversation as viewed whenever it or the list changes.
4660
+ * 2. Marks the active conversation as viewed when its matching identity becomes
4661
+ * available. List refreshes and persistence rollback do not retry the write.
3886
4662
  */
3887
4663
  export declare const useActiveConversationSync: ({ activeConversationId, items, refreshConversations, markConversationViewed, conversationIdsMatch, toPanelConversationId, }: UseActiveConversationSyncParams) => string | undefined;
3888
4664
 
@@ -3908,6 +4684,25 @@ export declare interface UseActiveConversationSyncParams {
3908
4684
  toPanelConversationId: (id: string) => string;
3909
4685
  }
3910
4686
 
4687
+ /** Loads fresh service statuses without coupling proactive credentials to a live completion. */
4688
+ export declare const useApplicationCredentials: ({ appId, externalServicesClient, offlineCredentialsClient, }: UseApplicationCredentialsParams) => {
4689
+ services: ApplicationExternalServiceDto[];
4690
+ isOfflineConnected: boolean;
4691
+ isLoading: boolean;
4692
+ hasError: boolean;
4693
+ refresh: () => Promise<void>;
4694
+ };
4695
+
4696
+ /** Configured operations for loading application credential metadata. */
4697
+ export declare interface UseApplicationCredentialsParams {
4698
+ /** Application identifier passed through to the configured client. */
4699
+ appId: string;
4700
+ /** Host-configured external-services API. */
4701
+ externalServicesClient: Pick<ExternalServicesApi, 'listExternalServices'>;
4702
+ /** Host-configured offline-credentials API. */
4703
+ offlineCredentialsClient: Pick<OfflineCredentialsApi, 'getOfflineCredentials'>;
4704
+ }
4705
+
3911
4706
  /**
3912
4707
  * Generic single-slot pending / loading / error state machine for
3913
4708
  * confirmation dialogs that trigger an async operation.
@@ -3971,12 +4766,14 @@ export declare interface UseAttachmentUploadResult {
3971
4766
  * MIME types, debouncing a burst of rejected files into a single
3972
4767
  * `onValidationError` call rather than firing one per file.
3973
4768
  */
3974
- export declare const useAttachmentValidation: ({ allowedMimeTypes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
4769
+ export declare const useAttachmentValidation: ({ allowedMimeTypes, maxFileSizeBytes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
3975
4770
 
3976
4771
  /** Parameters for {@link useAttachmentValidation}. */
3977
4772
  export declare interface UseAttachmentValidationParams {
3978
4773
  /** Resolved MIME types currently allowed for attachments. */
3979
4774
  allowedMimeTypes: string[];
4775
+ /** Maximum attachment file size, in bytes. When omitted, no file is rejected for size. */
4776
+ maxFileSizeBytes?: number;
3980
4777
  /** Called with a structured event when a rejected attachment is reported, at most once per debounce window. */
3981
4778
  onValidationError?: (event: AttachmentValidationErrorEvent) => void;
3982
4779
  /** Debounce window, in ms, before firing `onValidationError` for a rejected file. Defaults to `100`. */
@@ -4001,7 +4798,7 @@ export declare interface UseAttachmentValidationResult {
4001
4798
  * item through the endpoint its type owns and refetching/notifying on
4002
4799
  * completion, and building the Create dropdown's options.
4003
4800
  */
4004
- export declare const useCatalogEditNavigation: ({ deployments, isCustomAppsEnabled, isSchemaAppsEnabled, isHideCustomAppCreationEnabled, isToolsetsEnabled, isPromptsEnabled, quickAppSchemaId, urls, onNavigate, deletePrompt, deleteToolset, deleteSkill, deleteApplication, refetchPrompts, refetchToolsets, refetchSkills, refetchDeployments, onDeleteSuccess, labels, onNotify, onSkillUploadClick, }: UseCatalogEditNavigationParams) => UseCatalogEditNavigationResult;
4801
+ 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;
4005
4802
 
4006
4803
  /** Parameters accepted by {@link useCatalogEditNavigation}. */
4007
4804
  export declare interface UseCatalogEditNavigationParams {
@@ -4011,8 +4808,8 @@ export declare interface UseCatalogEditNavigationParams {
4011
4808
  isHideCustomAppCreationEnabled: boolean;
4012
4809
  isToolsetsEnabled: boolean;
4013
4810
  isPromptsEnabled: boolean;
4014
- /** The quick-app schema id resolved by `useCatalogItems`, or `undefined` when no quick-app schema exists. */
4015
- quickAppSchemaId: string | undefined;
4811
+ /** Application type schemas (runners) loaded at startup; each one except the custom-app schema gets its own Create option. */
4812
+ schemas: ApplicationSchemaSummaryDto[];
4016
4813
  /** Already-configured editor-route URL builders. */
4017
4814
  urls: CatalogEditNavigationUrls;
4018
4815
  /** Navigates the host to a URL built by `urls`. */
@@ -4043,7 +4840,10 @@ export declare interface UseCatalogEditNavigationParams {
4043
4840
  export declare interface UseCatalogEditNavigationResult {
4044
4841
  handleEdit: (item: CatalogItem) => void;
4045
4842
  handleDelete: (item: CatalogItem) => Promise<void>;
4843
+ /** The Create dropdown's items: runners and static options sorted together by label, all filtered by `createSearch.value`. */
4046
4844
  createOptions: DropdownItem[];
4845
+ /** The Create menu's search field state, or `undefined` when no runner option is offered. */
4846
+ createSearch: CatalogCreateSearch | undefined;
4047
4847
  }
4048
4848
 
4049
4849
  /**
@@ -4306,7 +5106,8 @@ export declare interface UseConversationHandlersResult {
4306
5106
  * `.dial`/`.zip`, v5 envelope, old- or new-chat origin) once per file, then
4307
5107
  * re-uploads any archive attachments to `uploads/<YYYY-MM>/` —
4308
5108
  * disambiguating a name collision with a ` (n)` suffix instead of rejecting
4309
- * it — rewrites attachment references (and renamed titles), regenerates each
5109
+ * it — rewrites attachment references (and renamed titles), drops any
5110
+ * reference still pointing into another user's bucket, regenerates each
4310
5111
  * conversation's id/path with a fresh UUID (collision-free save, no replace
4311
5112
  * dialog), and persists every conversation through the injected
4312
5113
  * `conversationsApi`. One job per imported file, not per conversation.
@@ -4376,10 +5177,14 @@ export declare interface UseConversationLookupMapsParams {
4376
5177
  * Returns a memoised array whose shape is compatible with the conversation
4377
5178
  * panel's item contract. All app-specific concerns (icon URL resolution,
4378
5179
  * route generation, id normalisation) are injected via resolver callbacks.
5180
+ *
5181
+ * While every input except `items` is unchanged, a DTO that is referentially
5182
+ * the same as in the previous render maps to the same item object, so a list
5183
+ * change (or a navigation that re-derives the list) re-renders only the rows
5184
+ * whose DTO actually changed.
4379
5185
  */
4380
- export declare const useConversationPanelItems: ({ items, deployments, isDeploymentsLoading, toPanelConversationId, resolveIconUrl, resolveIconTooltip, resolveHref, resolveTaskBadge, }: UseConversationPanelItemsParams) => {
4381
- showTaskBadge?: boolean | undefined;
4382
- taskBadgeLabel?: string | undefined;
5186
+ export declare const useConversationPanelItems: ({ items, deployments, isDeploymentsLoading, toPanelConversationId, resolveIconUrl, resolveIconTooltip, resolveHref, resolveTaskPresentation, }: UseConversationPanelItemsParams) => {
5187
+ leadingIcon?: ReactNode;
4383
5188
  isUnread?: boolean | undefined;
4384
5189
  id: string;
4385
5190
  title: string;
@@ -4415,11 +5220,12 @@ export declare interface UseConversationPanelItemsResolvers {
4415
5220
  /** Resolves the href to navigate to when the conversation row is clicked. */
4416
5221
  resolveHref: (panelConversationId: string) => string;
4417
5222
  /**
4418
- * Returns badge metadata for a scheduled-task conversation, or `undefined`
4419
- * when the item should not show a task badge.
5223
+ * Returns the row presentation for a scheduled-task conversation — a
5224
+ * host-rendered leading icon that replaces the deployment avatar, and the
5225
+ * unread flag — or `undefined` for an ordinary conversation.
4420
5226
  */
4421
- resolveTaskBadge?: (item: ConversationListItemDto) => {
4422
- label: string;
5227
+ resolveTaskPresentation?: (item: ConversationListItemDto) => {
5228
+ leadingIcon?: ReactNode;
4423
5229
  isUnread: boolean;
4424
5230
  } | undefined;
4425
5231
  }
@@ -4486,7 +5292,7 @@ export declare interface UseConversationSourcesResult {
4486
5292
  uploaded: DisplayAttachment[];
4487
5293
  /** Deduplicated attachments the assistant generated across the conversation. */
4488
5294
  generated: DisplayAttachment[];
4489
- /** Quotation sources referenced by assistant messages, deduplicated by URL. */
5295
+ /** Quotation sources referenced by assistant messages, deduplicated by URL; PDF sources are qualified with `#page=N`. */
4490
5296
  sources: QuotationSource[];
4491
5297
  }
4492
5298
 
@@ -4498,7 +5304,7 @@ export declare interface UseConversationSourcesResult {
4498
5304
  * `transport`/`generation`/`channel`/`overlay` capabilities rather than any
4499
5305
  * app context or `server-api` import.
4500
5306
  */
4501
- export declare const useConversationStream: ({ conversationId, state: { setConversation, conversationRef }, transport, generation: { startGeneration, completeGeneration }, channel, overlay, onStopError, generationConflictMessage, }: UseConversationStreamParams) => UseConversationStreamResult;
5307
+ export declare const useConversationStream: ({ conversationId, state: { setConversation, conversationRef }, transport, generation: { startGeneration, completeGeneration }, channel, overlay, onStopError, generationConflictMessage, generationPersistenceErrorMessage, onStreamError, batchChunksPerFrame, }: UseConversationStreamParams) => UseConversationStreamResult;
4502
5308
 
4503
5309
  /** Parameters for {@link useConversationStream}. */
4504
5310
  export declare interface UseConversationStreamParams {
@@ -4516,17 +5322,39 @@ export declare interface UseConversationStreamParams {
4516
5322
  * {@link DEFAULT_GENERATION_CONFLICT_MESSAGE}.
4517
5323
  */
4518
5324
  generationConflictMessage?: string;
5325
+ /** Host-translated warning shown when the received answer could not be saved. */
5326
+ generationPersistenceErrorMessage?: string;
5327
+ /**
5328
+ * Receives the original error of every failed stream. The hook shows only
5329
+ * host-supplied or upstream-supplied text on the message bubble and hides
5330
+ * transport detail (e.g. `Failed to fetch`), so this is where the host can
5331
+ * still log or report the raw error.
5332
+ */
5333
+ onStreamError?: (error: Error) => void;
5334
+ /**
5335
+ * Coalesces the displayed chunk updates into one `setConversation` per
5336
+ * animation frame. Chunks still reach the per-path buffer immediately, and
5337
+ * any pending update is flushed before completion, error, stop, or a
5338
+ * superseding generation. Defaults to `false` (one update per chunk).
5339
+ */
5340
+ batchChunksPerFrame?: boolean;
4519
5341
  }
4520
5342
 
4521
5343
  /** Return value of {@link useConversationStream}. */
4522
5344
  export declare interface UseConversationStreamResult {
4523
- startStream: (conversationId: string, userContent: string, messageIndex: number, model: string, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum) => void;
5345
+ startStream: (conversationId: string, userContent: string, messageIndex: number, model: string, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum, options?: StartStreamOptions) => void;
4524
5346
  handleStop: () => void;
4525
5347
  resumeIfAwaitingGeneration: (currentConversationId: string, conversation: Conversation) => void;
4526
5348
  /** Restores the accumulated live assistant message when its conversation is loaded again before completion. */
4527
5349
  restoreBufferedGeneration: (currentConversationId: string, conversation: Conversation) => Conversation;
4528
5350
  isStreaming: boolean;
4529
5351
  canStopStreaming: boolean;
5352
+ /** Whether the displayed conversation's terminal read failed. */
5353
+ hasConversationReloadError: boolean;
5354
+ /** Whether a retry of that read is in flight. */
5355
+ isReloadingConversation: boolean;
5356
+ /** Retries the failed read without saving or regenerating the answer. */
5357
+ retryConversationReload: () => Promise<void>;
4530
5358
  }
4531
5359
 
4532
5360
  /**
@@ -4541,7 +5369,7 @@ export declare interface UseConversationStreamResult {
4541
5369
  * - shared: files shared with the user via `DialFilesApi.listSharedFiles`
4542
5370
  * - organization: public bucket via `DialFilesApi.listPublicFiles`
4543
5371
  */
4544
- export declare const useDialFileListing: ({ filesApi, bucket, rootLabel, activeTab, onNotification, }: UseDialFileListingOptions) => UseDialFileListingResult;
5372
+ export declare const useDialFileListing: ({ filesApi, bucket, rootLabel, activeTab, onNotification, isActive, sessionKey, }: UseDialFileListingOptions) => UseDialFileListingResult;
4545
5373
 
4546
5374
  /** Options accepted by `useDialFileListing`. */
4547
5375
  export declare interface UseDialFileListingOptions {
@@ -4555,6 +5383,10 @@ export declare interface UseDialFileListingOptions {
4555
5383
  activeTab: DialFileManagerTabs;
4556
5384
  /** Called with a structured event when a folder-load operation fails. */
4557
5385
  onNotification?: (notification: FileManagerNotification) => void;
5386
+ /** When false, the hook issues no `DialFilesApi` call and reports `isLoading: false`. Defaults to `true`. */
5387
+ isActive?: boolean;
5388
+ /** Changing this value resets cache and navigation exactly like an `activeTab` change. Defaults to `undefined`. */
5389
+ sessionKey?: string;
4558
5390
  }
4559
5391
 
4560
5392
  /** Values returned by `useDialFileListing`. */
@@ -4611,7 +5443,7 @@ export declare interface UseDialFileListingResult {
4611
5443
  * every translated string reaches it through `labels`,
4612
5444
  * `disabledNewButtonTooltip`, and `buildValidationErrorMessage`.
4613
5445
  */
4614
- export declare const useDialFileManager: ({ filesApi, bucket, rootLabel, activeTab, onNotification, onOperationSuccess, forbiddenSymbolsRegExp, variant, actionProfile, labels, locale, disabledNewButtonTooltip, downloadDestination, buildValidationErrorMessage, }: UseDialFileManagerOptions) => UseDialFileManagerResult;
5446
+ export declare const useDialFileManager: ({ filesApi, bucket, rootLabel, activeTab, isActive, sessionKey, onNotification, onOperationSuccess, forbiddenSymbolsRegExp, variant, actionProfile, labels, locale, disabledNewButtonTooltip, downloadDestination, buildValidationErrorMessage, }: UseDialFileManagerOptions) => UseDialFileManagerResult;
4615
5447
 
4616
5448
  export declare interface UseDialFileManagerOptions {
4617
5449
  /** Injected operation port used for every file-manager network call. */
@@ -4622,6 +5454,10 @@ export declare interface UseDialFileManagerOptions {
4622
5454
  rootLabel?: string;
4623
5455
  /** Active tab — drives listing source and per-tab options. Defaults to MyFiles. */
4624
5456
  activeTab?: DialFileManagerTabs;
5457
+ /** When false, the listing issues no `DialFilesApi` call and reports `isLoading: false`. Defaults to `true`. */
5458
+ isActive?: boolean;
5459
+ /** Changing this value resets cache and navigation exactly like an `activeTab` change. Defaults to `undefined`. */
5460
+ sessionKey?: string;
4625
5461
  /** Called when a file-manager action should surface a toast notification. */
4626
5462
  onNotification?: (notification: FileManagerNotification) => void;
4627
5463
  /** Called when a mutation succeeds, instead of invoking an application notification service directly. */
@@ -4676,7 +5512,7 @@ export declare interface UseDialFileManagerResult {
4676
5512
  onSearchFiles: (folder: string, query: string) => void;
4677
5513
  /** Search: true while a search request is in flight. */
4678
5514
  isSearching: boolean;
4679
- /** Search: flat list of matching files, or null when search is not active. */
5515
+ /** Search: flat, unfiltered recursive listing of the current folder, or null when search is not active. */
4680
5516
  searchResults: DialFile[] | null;
4681
5517
  /** Search: clears results and exits search mode. */
4682
5518
  clearSearchResults: () => void;
@@ -4700,7 +5536,9 @@ export declare interface UseDialFileManagerResult {
4700
5536
  uploadBatchState: FileUploadBatchState | null;
4701
5537
  /** Upload: abort all in-flight and queued uploads. */
4702
5538
  cancelUpload: () => void;
4703
- /** Upload: dismiss the progress modal after the batch has settled. */
5539
+ /** Upload: abort one queued or in-flight upload by its entry id. */
5540
+ cancelUploadFile: (id: string) => void;
5541
+ /** Upload: empty the upload queue. */
4704
5542
  clearUploadBatch: () => void;
4705
5543
  /** Folder creation: called when user confirms a new folder name. */
4706
5544
  onCreateFolder: (file: DialUploadFileItem, folderPath: string, fileId: string) => Promise<void>;
@@ -4767,7 +5605,7 @@ export declare interface UseDialFileManagerResult {
4767
5605
  /**
4768
5606
  * True while any mutating file-manager operation is in flight: the OR of
4769
5607
  * `isCreatingFolder`, `isDownloading`, `isDeleting`, `isRenaming`, `isCopying`,
4770
- * `isMoving`, `isUnsharing`, `isRemovingAccess`, and `uploadBatchState != null`.
5608
+ * `isMoving`, `isUnsharing`, `isRemovingAccess`, and any upload still queued or running.
4771
5609
  *
4772
5610
  * Deliberately excludes three flags, each already fully contained by its own
4773
5611
  * scoped loading UI:
@@ -4778,17 +5616,42 @@ export declare interface UseDialFileManagerResult {
4778
5616
  isAnyOperationInProgress: boolean;
4779
5617
  }
4780
5618
 
5619
+ /**
5620
+ * Composes one `useDialFileManager` per source tab (My files, Shared,
5621
+ * Organization) so the File storage page can offer an All tab without a
5622
+ * second copy of the per-tab rules. On a single tab it returns that section's
5623
+ * result; on All it merges the section roots into one tree and routes every
5624
+ * callback to the section owning the path. Section availability and names
5625
+ * arrive through `sections` — the hook reads no config, i18n, or context.
5626
+ */
5627
+ export declare const useDialFileManagerSections: ({ activeTab, sections, ...managerOptions }: UseDialFileManagerSectionsOptions) => UseDialFileManagerSectionsResult;
5628
+
5629
+ /** Options accepted by `useDialFileManagerSections`. */
5630
+ export declare interface UseDialFileManagerSectionsOptions extends Omit<UseDialFileManagerOptions, 'activeTab' | 'rootLabel' | 'isActive' | 'sessionKey'> {
5631
+ /** Active tab, including `DialFileManagerTabs.All`. */
5632
+ activeTab: DialFileManagerTabs;
5633
+ /** Enabled source tabs in display order, each with its translated top-level folder name. */
5634
+ sections: DialFileManagerSection[];
5635
+ }
5636
+
5637
+ /** Values returned by `useDialFileManagerSections`. */
5638
+ export declare interface UseDialFileManagerSectionsResult extends UseDialFileManagerResult {
5639
+ /** Source tab of the browsed folder; never `DialFileManagerTabs.All`. */
5640
+ sectionTab: DialFileManagerTabs;
5641
+ }
5642
+
4781
5643
  /**
4782
5644
  * Filters the file-manager's tab list down to the host's configured set and
4783
5645
  * resets `activeTab` to the highest-priority still-enabled tab when the
4784
5646
  * current one becomes excluded. A `fileManagerTabs` of `undefined` means no
4785
5647
  * restriction — every tab in `allTabs` stays enabled and no reset ever fires.
5648
+ * The All tab is kept only while at least two source tabs are enabled.
4786
5649
  */
4787
- export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: TabModel[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
5650
+ export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: FilterChipItem<DialFileManagerTabs>[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
4788
5651
 
4789
5652
  /** Values returned by `useDialFileManagerTabConfig`. */
4790
5653
  export declare interface UseDialFileManagerTabConfigResult {
4791
- tabs: ToolbarOptions['tabs'];
5654
+ tabs: FileTreeOptions['tabs'];
4792
5655
  }
4793
5656
 
4794
5657
  /**
@@ -4913,10 +5776,11 @@ export declare interface UseDialFileSharingResult {
4913
5776
 
4914
5777
  /**
4915
5778
  * Manages upload batches (single-file and ZIP-archive extraction), including
4916
- * concurrency-limited progress tracking and abort. Invalidates the shared
4917
- * listing cache for the destination folder through `invalidateFolders`/
4918
- * `bumpRetry` after a batch settles — it never holds its own copy of the
4919
- * cache.
5779
+ * concurrency-limited progress tracking and per-file abort. A batch started
5780
+ * while another is on screen is appended to it, and settled entries stay in
5781
+ * `uploadBatchState` until `clearUploadBatch`. Invalidates the shared listing
5782
+ * cache for the destination folder through `invalidateFolders`/`bumpRetry`
5783
+ * after a batch settles — it never holds its own copy of the cache.
4920
5784
  */
4921
5785
  export declare const useDialFileUploadBatch: ({ filesApi, bucket, rootLabel, activeTab, cache, sharedRootMetaRef, invalidateFolders, bumpRetry, onNotification, }: UseDialFileUploadBatchOptions) => UseDialFileUploadBatchResult;
4922
5786
 
@@ -4949,6 +5813,7 @@ export declare interface UseDialFileUploadBatchResult {
4949
5813
  onValidateUpload: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => Promise<FileUploadValidationResult>;
4950
5814
  uploadBatchState: FileUploadBatchState | null;
4951
5815
  cancelUpload: () => void;
5816
+ cancelUploadFile: (id: string) => void;
4952
5817
  clearUploadBatch: () => void;
4953
5818
  }
4954
5819
 
@@ -4977,6 +5842,64 @@ export declare interface UseFavoriteEntitiesStateResult {
4977
5842
  toggleFavorite: (id: string, isFavorite: boolean, entityType?: FavoriteEntityType) => Promise<void>;
4978
5843
  }
4979
5844
 
5845
+ /**
5846
+ * Composes the file-manager tab/listing hooks into the stateful part of an attachment picker:
5847
+ * active tab, selected paths, and hidden-path/MIME/size/folder row eligibility. Returns the
5848
+ * existing `useDialFileManager` controller unchanged and the selection/tab/eligibility fields
5849
+ * `FileManagerAttachModal` already consumes — it composes that modal, it does not replace it.
5850
+ * Final attachment filtering, deduplication, and count enforcement stay owned by the modal.
5851
+ */
5852
+ export declare const useFileAttachmentPicker: ({ fileManagerOptions, bucket, forbiddenSymbolsRegExp, tabLabels, allowedTabs, initialTab, allowedTypes, maxSelectableFileSize, canAttachFolders, }: UseFileAttachmentPickerOptions) => UseFileAttachmentPickerResult;
5853
+
5854
+ /** Options accepted by {@link useFileAttachmentPicker}. */
5855
+ export declare interface UseFileAttachmentPickerOptions {
5856
+ /**
5857
+ * Configured `useDialFileManager` options besides the values this hook derives:
5858
+ * `bucket`, `activeTab`, `rootLabel`, `variant`, and `forbiddenSymbolsRegExp`.
5859
+ */
5860
+ fileManagerOptions: Omit<UseDialFileManagerOptions, 'bucket' | 'activeTab' | 'rootLabel' | 'variant' | 'forbiddenSymbolsRegExp'>;
5861
+ /** DIAL Core bucket to browse. */
5862
+ bucket: string;
5863
+ /** Regexp of characters forbidden in file/folder names, forwarded to `useDialFileManager`. */
5864
+ forbiddenSymbolsRegExp?: RegExp;
5865
+ /** Host-translated label per tab; also supplies the active tab's root-folder label. */
5866
+ tabLabels: Record<DialFileManagerTabs, string>;
5867
+ /** Tab ids the host's configuration allows. `undefined` allows every tab. */
5868
+ allowedTabs?: string[];
5869
+ /** Initial active tab. Defaults to `DialFileManagerTabs.MyFiles`. */
5870
+ initialTab?: DialFileManagerTabs;
5871
+ /** MIME types eligible for selection/upload. Empty or absent allows every type. */
5872
+ allowedTypes?: string[];
5873
+ /** Files at or below this size (bytes) remain eligible; absent allows any size. */
5874
+ maxSelectableFileSize?: number;
5875
+ /** Whether folder rows are eligible for selection. Defaults to `false`. */
5876
+ canAttachFolders?: boolean;
5877
+ }
5878
+
5879
+ /** Result returned by {@link useFileAttachmentPicker}. */
5880
+ export declare interface UseFileAttachmentPickerResult {
5881
+ /** The composed file-manager controller; forward to `FileManagerAttachModal`'s `controller` prop. */
5882
+ controller: UseDialFileManagerResult;
5883
+ /** Active tab. */
5884
+ activeTab: DialFileManagerTabs;
5885
+ /** Tab list filtered to `allowedTabs`; forward to `FileManagerAttachModal`'s `tabs` prop. */
5886
+ tabs: FileTreeOptions['tabs'];
5887
+ /** Switches the active tab and clears the current selection. */
5888
+ onTabChange: (tab: DialFileManagerTabs) => void;
5889
+ /** Currently selected paths. */
5890
+ selectedPaths: Set<string>;
5891
+ /** Replaces the selection with a defensive copy of the given set. */
5892
+ onSelectedPathsChange: (paths: Set<string>) => void;
5893
+ /** Row eligibility predicate; forward to `FileManagerAttachModal`'s `isRowSelectable` prop. */
5894
+ isRowSelectable: (node: {
5895
+ data?: FileManagerSelectableNode | null;
5896
+ }) => boolean;
5897
+ /** MIME eligibility predicate; forward to `FileManagerAttachModal`'s `isFileTypeAllowed` prop. */
5898
+ isFileTypeAllowed: (contentType: string) => boolean;
5899
+ /** Accepted upload MIME types; forward to `FileManagerAttachModal`'s `allowedFileTypes` prop. */
5900
+ allowedFileTypes: DialFileAcceptType[] | undefined;
5901
+ }
5902
+
4980
5903
  export { useGridEditingScroll }
4981
5904
 
4982
5905
  export { UseGridEditingScrollOptions }
@@ -5020,10 +5943,11 @@ export declare interface UseImportFilePickerResult {
5020
5943
  * Builds the `McpAppHostAdapter` a host injects into `@epam/ai-dial-mcp-apps`'s
5021
5944
  * hooks/components, wiring the library's host-context/tool-call/resource-fetch
5022
5945
  * contract to a configured `McpAppsApiClient` and this app's theme/locale/config
5023
- * values (`hostContextParams`, `sandboxUrl`) — this hook itself never reads app
5024
- * context, so a host builds those values wherever it already has them.
5946
+ * values (`hostContextParams`, `sandboxUrl`), plus the host's own identity
5947
+ * (`hostInfo`) — this hook itself never reads app context, so a host builds
5948
+ * those values wherever it already has them.
5025
5949
  */
5026
- export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams) => McpAppHostAdapter;
5950
+ export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams, hostInfo: Implementation) => McpAppHostAdapter;
5027
5951
 
5028
5952
  /**
5029
5953
  * Builds the `McpUiHostContext` delivered to a mounted MCP App during its
@@ -5053,6 +5977,35 @@ export declare const useMcpAppHostContext: (displayMode: "inline" | "fullscreen"
5053
5977
  */
5054
5978
  export declare const useMcpAppTools: (client: McpAppsApiClient, deployment: DeploymentItemDto | undefined, messages: Message[], toolsets: DialToolsetDto[]) => McpAppToolRef[];
5055
5979
 
5980
+ /**
5981
+ * Captures eligible message text and creates Reply files for an existing composer
5982
+ * attachment flow without acquiring host deployment, upload or localization knowledge.
5983
+ */
5984
+ export declare const useMessageSelectionReply: ({ conversationId, enabled, droppedFiles, onDroppedFilesConsumed, }: UseMessageSelectionReplyParams) => {
5985
+ contentRef: (node: HTMLDivElement | null) => (() => void) | undefined;
5986
+ actionRef: RefObject<HTMLDivElement | null>;
5987
+ selection: MessageSelectionReplySnapshot | null;
5988
+ onReply: () => void;
5989
+ dismiss: () => void;
5990
+ pendingFiles: File[];
5991
+ onFilesConsumed: () => void;
5992
+ focusRequestId: number | undefined;
5993
+ onAttachmentsChange: (attachments: Attachment[]) => void;
5994
+ addedRevision: number;
5995
+ };
5996
+
5997
+ /** Parameters accepted by {@link useMessageSelectionReply}. */
5998
+ export declare interface UseMessageSelectionReplyParams {
5999
+ /** Identifier used to discard selection and queued files after a scope change. */
6000
+ conversationId: string;
6001
+ /** Whether the host currently permits a Reply attachment. */
6002
+ enabled: boolean;
6003
+ /** Files from the host's ordinary page-drop queue. */
6004
+ droppedFiles: File[];
6005
+ /** Acknowledges the captured page-drop batch after the composer accepts it. */
6006
+ onDroppedFilesConsumed: () => void;
6007
+ }
6008
+
5056
6009
  /**
5057
6010
  * Completes an OAuth authorization-code flow from inside the callback popup:
5058
6011
  * reads and clears the redirect state written into this popup's own
@@ -5126,8 +6079,6 @@ export declare const useOpenMcpAppCanvas: (cache: McpAppResponseCache, hostAdapt
5126
6079
 
5127
6080
  /** User-facing text `useOpenMcpAppCanvas` needs but cannot resolve itself — a lib must not call `t()`. */
5128
6081
  export declare interface UseOpenMcpAppCanvasLabels {
5129
- /** Canvas panel title while an MCP App is loading or open. */
5130
- title: string;
5131
6082
  /** Error label shown when the resource fetch is forbidden (HTTP 403). */
5132
6083
  forbiddenErrorLabel: string;
5133
6084
  /** Error label shown for any other resource-load/tool-call failure. */
@@ -5256,15 +6207,65 @@ export declare interface UsePublishFoldersResult {
5256
6207
  */
5257
6208
  onCreatePublishFolder: (parentPath: string[], name: string) => Promise<void>;
5258
6209
  /**
5259
- * Records `folderPath` as a publish destination the user has actually used,
5260
- * so it keeps appearing in the tree on later publishes. Call it after a
5261
- * successful publish.
6210
+ * Records `folderPath` as the most recent publish destination (moving it to
6211
+ * the front if already remembered), so it keeps appearing in the tree on
6212
+ * later publishes. Call it after a successful publish.
5262
6213
  */
5263
6214
  rememberPublishFolder: (folderPath: string[]) => void;
5264
6215
  /** Heuristic write-access check for a folder path (see the TODO above). */
5265
6216
  hasPublishWriteAccess: (folderPath: string[]) => boolean;
5266
6217
  }
5267
6218
 
6219
+ /** Shared, cancellation-safe pagination and background refresh for one schedule's run history. */
6220
+ export declare const useScheduledTaskRuns: (client: ScheduledTasksApiClient, { scheduleId, enabled, pageSize, nextRunTime, }: UseScheduledTaskRunsOptions) => {
6221
+ items: ScheduledTaskRunDto[];
6222
+ isLoading: boolean;
6223
+ isLoadingMore: boolean;
6224
+ initialError: Error | null;
6225
+ loadMoreError: Error | null;
6226
+ hasMore: boolean;
6227
+ loadMore: () => void;
6228
+ retryLoadMore: () => void;
6229
+ refetch: () => void;
6230
+ };
6231
+
6232
+ export declare interface UseScheduledTaskRunsOptions {
6233
+ scheduleId: string;
6234
+ enabled?: boolean;
6235
+ pageSize?: number;
6236
+ /**
6237
+ * The task's next scheduled run time (ISO string), when known. Drives the
6238
+ * one-shot background refresh described on {@link useScheduledTaskRuns}.
6239
+ * The caller already holds the task DTO — this hook never fetches it.
6240
+ */
6241
+ nextRunTime?: string | null;
6242
+ }
6243
+
6244
+ /** Shared scheduler-list lifecycle with generation-scoped stale-response guards. */
6245
+ export declare const useScheduledTasks: (client: ScheduledTasksApiClient, { enabled, pageSize, debounceMs, initialSearch, initialSort, }?: UseScheduledTasksOptions) => {
6246
+ items: ScheduledTaskDto[];
6247
+ searchQuery: string;
6248
+ setSearchQuery: Dispatch<SetStateAction<string>>;
6249
+ sortKey: "firstToRun" | "lastToRun" | "newest" | "nameAZ";
6250
+ setSortKey: Dispatch<SetStateAction<"firstToRun" | "lastToRun" | "newest" | "nameAZ">>;
6251
+ isLoading: boolean;
6252
+ isLoadingMore: boolean;
6253
+ initialError: Error | null;
6254
+ loadMoreError: Error | null;
6255
+ hasMore: boolean;
6256
+ loadMore: () => void;
6257
+ retryLoadMore: () => void;
6258
+ refetch: () => void;
6259
+ };
6260
+
6261
+ export declare interface UseScheduledTasksOptions {
6262
+ enabled?: boolean;
6263
+ pageSize?: number;
6264
+ debounceMs?: number;
6265
+ initialSearch?: string;
6266
+ initialSort?: ListScheduledTasksSortEnum;
6267
+ }
6268
+
5268
6269
  /**
5269
6270
  * Resolves and manages share-link data for a DIAL Core resource.
5270
6271
  *
@@ -5305,6 +6306,48 @@ export declare interface UseShareRecipientsCountResult {
5305
6306
  invalidateRecipientsCount: (itemId: string) => void;
5306
6307
  }
5307
6308
 
6309
+ /**
6310
+ * Headless controller for the skill-archive upload flow: dialog visibility, the exact-filename
6311
+ * precheck, in-flight exclusion, abort-on-close, and import completion. The host supplies the configured request
6312
+ * and observes completion/failure through the injected callbacks; the hook never imports app
6313
+ * contexts, i18n, or a configured API client.
6314
+ */
6315
+ export declare const useSkillArchiveImport: <TResult>({ importArchive, onImported, onError, manifestFileName, }: UseSkillArchiveImportOptions<TResult>) => UseSkillArchiveImportResult;
6316
+
6317
+ /** Options accepted by {@link useSkillArchiveImport}. */
6318
+ export declare interface UseSkillArchiveImportOptions<TResult> {
6319
+ /** Submits the selected archive; the host owns the client. `signal` aborts when the dialog closes or the hook unmounts mid-upload. */
6320
+ importArchive: (file: File, signal: AbortSignal) => Promise<TResult>;
6321
+ /** Called once after a successful import (and any awaited host follow-up) settles. */
6322
+ onImported: (result: TResult) => void | Promise<void>;
6323
+ /** Called once when the import request, or the host's follow-up in {@link onImported}, fails. */
6324
+ onError: (error: unknown, kind: SkillArchiveImportErrorKind) => void;
6325
+ /** Exact filename treated as the skill manifest. Defaults to `'SKILL.md'`. */
6326
+ manifestFileName?: string;
6327
+ }
6328
+
6329
+ /** Result returned by {@link useSkillArchiveImport}. */
6330
+ export declare interface UseSkillArchiveImportResult {
6331
+ /** Whether the upload dialog is open. */
6332
+ isDialogOpen: boolean;
6333
+ /** Current phase of the import. */
6334
+ status: SkillArchiveImportStatus;
6335
+ /** Whether an import request is in flight; the dialog stays open until it succeeds. */
6336
+ isUploading: boolean;
6337
+ /** Reason the current/last selection was rejected locally; `undefined` once cleared. */
6338
+ selectionRejectionReason: SkillArchiveSelectionRejectionReason | undefined;
6339
+ /** Classified failure of the last import request; `undefined` outside a request failure. */
6340
+ errorKind: SkillArchiveImportErrorKind | undefined;
6341
+ /** Opens the dialog and clears any previous rejection or request failure. */
6342
+ openDialog: () => void;
6343
+ /** Closes the dialog, aborting an in-flight import, and clears any rejection reason. */
6344
+ closeDialog: () => void;
6345
+ /** Wire to the dialog drop zone's `onChange`. */
6346
+ handleFilesSelected: (files: File[]) => void;
6347
+ /** Wire to the dialog drop zone's `onReject`. */
6348
+ handleFilesRejected: () => void;
6349
+ }
6350
+
5308
6351
  /**
5309
6352
  * Headless data pipeline behind a skill details side panel: resolves the
5310
6353
  * selected skill from the listings, maps it to a catalog item with its
@@ -5406,7 +6449,7 @@ export declare interface UseSkillEditorLoadResult {
5406
6449
  * `client.createSkill`/`client.updateSkill`, and mapping the resulting
5407
6450
  * success/error/conflict outcomes to presentable state.
5408
6451
  */
5409
- export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, frontmatterRef, loadedPathRef, etagRef, returnUrl, refetchSkills, client, messages, onNavigate, onNotify, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
6452
+ export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, frontmatterRef, loadedPathRef, etagRef, returnUrl, getCreateReturnUrl, refetchSkills, client, messages, onNavigate, onNotify, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
5410
6453
 
5411
6454
  /** Parameters accepted by {@link useSkillEditorSubmit}. */
5412
6455
  export declare interface UseSkillEditorSubmitParams {
@@ -5426,6 +6469,8 @@ export declare interface UseSkillEditorSubmitParams {
5426
6469
  etagRef: React.MutableRefObject<string | undefined>;
5427
6470
  /** Where to navigate on a successful save. */
5428
6471
  returnUrl: string;
6472
+ /** Resolves the destination after creation from the normalized skill path. Defaults to `returnUrl`. */
6473
+ getCreateReturnUrl?: (path: string) => string;
5429
6474
  /** Refetches the host's skill listing after a successful save. */
5430
6475
  refetchSkills: () => Promise<void>;
5431
6476
  /** Already-configured create/update operations. */
@@ -5446,6 +6491,10 @@ export declare interface UseSkillEditorSubmitResult {
5446
6491
  errors: SkillEditorErrors;
5447
6492
  /** General submit-time error, distinct from a stale-edit `conflict`. */
5448
6493
  submitError: string | undefined;
6494
+ /** Whether `submitError` was caused by something a plain re-send can clear, rather than by the submission itself. */
6495
+ isSubmitErrorRetryable: boolean;
6496
+ /** Re-submits the values of the attempt that produced `submitError`. No-op before the first submit. */
6497
+ retrySubmit: () => void;
5449
6498
  /** Present when the last save hit a stale-ETag conflict. */
5450
6499
  conflict: {
5451
6500
  message: string;
@@ -5454,15 +6503,22 @@ export declare interface UseSkillEditorSubmitResult {
5454
6503
  clearConflict: () => void;
5455
6504
  /** Validates and submits the given form values. */
5456
6505
  handleSubmit: (values: SkillEditorValues) => Promise<void>;
6506
+ /**
6507
+ * Re-runs the Instructions frontmatter check against the editor's current
6508
+ * values, so a pasted `SKILL.md` is flagged as the text lands rather than
6509
+ * only on submit. Pass as the editor's `onValuesChange`.
6510
+ */
6511
+ handleValuesChange: (values: SkillEditorValues) => void;
5457
6512
  }
5458
6513
 
5459
6514
  /**
5460
6515
  * Owns the Skill Editor's batch file upload workflow: validating a staged
5461
6516
  * batch, committing it atomically (supporting files plus an optional
5462
- * `SKILL.md` manifest import, with a confirmation gate), and removing
6517
+ * `SKILL.md` manifest import, with a confirmation gate), creating empty
6518
+ * folders, expanding `.zip` archives for staging, and removing
5463
6519
  * already-committed nodes.
5464
6520
  */
5465
- export declare const useSkillFileActions: ({ files, setFiles, filesContentRef, frontmatterRef, loadedValues, setLoadedValues, isEditMode, isDirty, setSelectedPath, messages, }: UseSkillFileActionsParams) => UseSkillFileActionsResult;
6521
+ export declare const useSkillFileActions: ({ files, setFiles, filesContentRef, frontmatterRef, loadedValues, setLoadedValues, isEditMode, isDirty, setSelectedPath, messages, pickFromFileSystem, }: UseSkillFileActionsParams) => UseSkillFileActionsResult;
5466
6522
 
5467
6523
  /** Parameters accepted by {@link useSkillFileActions}. */
5468
6524
  export declare interface UseSkillFileActionsParams {
@@ -5486,6 +6542,12 @@ export declare interface UseSkillFileActionsParams {
5486
6542
  setSelectedPath: Dispatch<SetStateAction<string>>;
5487
6543
  /** Localized messages, resolved by the host. */
5488
6544
  messages: SkillFileActionsMessages;
6545
+ /**
6546
+ * Opens the host's file-system picker; passed through unchanged as
6547
+ * `fileActions.pickFromFileSystem`. Omit to hide the editor's "Open DIAL
6548
+ * file system" entry.
6549
+ */
6550
+ pickFromFileSystem?: () => Promise<SkillFileSourceEntry[] | undefined>;
5489
6551
  }
5490
6552
 
5491
6553
  /** Return value of {@link useSkillFileActions}. */
@@ -5532,10 +6594,11 @@ export declare interface UseSkillFilePreviewResult {
5532
6594
 
5533
6595
  /**
5534
6596
  * Headless hook that encapsulates skill detail fetching: manifest download and
5535
- * parse, package file listing, overview construction, and in-package file
5536
- * loads. `useCatalogItemDetails` delegates its skill branch here; hosts that
5537
- * only surface skill details consume this hook directly, without the
5538
- * deployment and prompt ports the full catalog pipeline requires.
6597
+ * parse, package file listing, authoritative metadata fetching, overview
6598
+ * construction, and in-package file loads. `useCatalogItemDetails` delegates
6599
+ * its skill branch here; hosts that only surface skill details consume this
6600
+ * hook directly, without the deployment and prompt ports the full catalog
6601
+ * pipeline requires.
5539
6602
  */
5540
6603
  export declare const useSkillItemDetails: ({ api, skills, skillOverviewLabels, }: UseSkillItemDetailsOptions) => UseSkillItemDetailsResult;
5541
6604
 
@@ -5816,4 +6879,7 @@ export declare enum WithLogin {
5816
6879
  WithConfig = "with-config"
5817
6880
  }
5818
6881
 
6882
+ /** Returns `sections` with every root label usable as a unique first path segment, falling back to the tab id. */
6883
+ export declare const withRoutableRootLabels: <TSection extends DialFileManagerSection>(sections: readonly TSection[]) => TSection[];
6884
+
5819
6885
  export { }