@epam/ai-dial-chat-hooks 1.2.0-dev.21 → 1.2.0-dev.217

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 (89) 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-input.js +81 -9
  7. package/catalog/map-deployment-to-catalog-item.js +34 -34
  8. package/catalog/map-entity-details-to-catalog.js +7 -0
  9. package/catalog/map-skill-to-catalog-item.js +30 -27
  10. package/catalog/publish.js +6 -5
  11. package/catalog/useApplicationCredentials/useApplicationCredentials.js +39 -0
  12. package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js +39 -39
  13. package/catalog/useSkillItemDetails.js +17 -13
  14. package/catalog.d.ts +116 -20
  15. package/catalog.js +23 -22
  16. package/conversation/conversation-transfer/export-conversation.js +24 -16
  17. package/conversation/conversation-transfer/import-conversation.js +80 -31
  18. package/conversation/conversation-transfer/queue.js +8 -5
  19. package/conversation/create-chat-stream-api.js +85 -49
  20. package/conversation/message-utils.js +44 -2
  21. package/conversation/stage.js +23 -0
  22. package/conversation/useConversationExport/useConversationExport.js +9 -9
  23. package/conversation/useConversationHandlers/useConversationHandlers.js +16 -5
  24. package/conversation/useConversationImport/useConversationImport.js +123 -121
  25. package/conversation/useConversationPanelItems/useConversationPanelItems.js +2 -3
  26. package/conversation/useConversationScroll/useConversationScroll.js +68 -64
  27. package/conversation/useConversationStream/apply-chunk.js +1 -1
  28. package/conversation/useConversationStream/generation-resume.js +104 -63
  29. package/conversation/useConversationStream/useConversationStream.js +181 -110
  30. package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +189 -0
  31. package/conversation-overlay.d.ts +7 -0
  32. package/conversation-overlay.js +2 -0
  33. package/conversation-sources/useConversationSources/useConversationSources.js +31 -24
  34. package/conversation-sources.d.ts +1 -1
  35. package/conversation-transfer.d.ts +2 -1
  36. package/conversation.d.ts +241 -13
  37. package/conversation.js +32 -30
  38. package/file-manager-canvas.d.ts +409 -0
  39. package/file-manager-canvas.js +2 -0
  40. package/file-manager.d.ts +153 -350
  41. package/file-manager.js +25 -24
  42. package/files/attachment-canvas.js +73 -22
  43. package/files/attachment-types.js +14 -13
  44. package/files/dial-file-manager-mapping.util.js +2 -1
  45. package/files/dial-file-manager-path.util.js +23 -1
  46. package/files/dial-file-manager.model.js +23 -19
  47. package/files/dial-file-manager.types.js +3 -3
  48. package/files/useDialFileListing/useDialFileListing.js +139 -127
  49. package/files/useDialFileManager/useDialFileManager.js +132 -128
  50. package/files/useDialFileManagerSections/useDialFileManagerSections.js +155 -0
  51. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +20 -19
  52. package/files/useDialFileMutations/useDialFileMutations.js +33 -32
  53. package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +117 -110
  54. package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +43 -0
  55. package/index.d.ts +1094 -86
  56. package/index.js +136 -122
  57. package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.js +7 -5
  58. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +1 -1
  59. package/mcp-apps/useMcpAppTools/useMcpAppTools.js +1 -1
  60. package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.js +25 -23
  61. package/mcp-apps.d.ts +8 -6
  62. package/oauth/toolset-id.js +5 -3
  63. package/oauth/useToolsetLogin/useToolsetLogin.js +8 -8
  64. package/oauth.d.ts +32 -0
  65. package/oauth.js +9 -9
  66. package/package.json +36 -21
  67. package/scheduled-task/scheduled-task-description.js +77 -0
  68. package/scheduled-task/scheduled-task-preparation.js +24 -0
  69. package/scheduled-task/scheduled-task-trigger.js +7 -2
  70. package/scheduled-task/scheduled-tasks-api-client.js +19 -0
  71. package/scheduled-task/use-scheduled-task-runs.js +194 -0
  72. package/scheduled-task/use-scheduled-tasks.js +93 -0
  73. package/scheduled-tasks.d.ts +195 -3
  74. package/scheduled-tasks.js +7 -2
  75. package/skill/skill-archive.js +19 -0
  76. package/skill/skill-types.js +8 -7
  77. package/skill/skill.js +42 -27
  78. package/skill/useSkillArchiveImport/useSkillArchiveImport.js +79 -0
  79. package/skill/useSkillEditorLoad.js +29 -28
  80. package/skill/useSkillEditorSubmit.js +108 -84
  81. package/skill/useSkillFileActions.js +70 -58
  82. package/skill-editor.d.ts +133 -3
  83. package/skill-editor.js +9 -8
  84. package/usage/map-usage-data-to-dashboard.js +66 -0
  85. package/usage/map-user-usage-to-model-limits.js +202 -0
  86. package/usage.d.ts +125 -0
  87. package/usage.js +3 -0
  88. package/usePageFileDrag/usePageFileDrag.js +3 -3
  89. package/utils.d.ts +18 -6
package/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { Annotation } from '@epam/ai-dial-chat-shared';
2
2
  import { AnnotationGroup } from '@epam/ai-dial-quotations';
3
+ import { ApplicationExternalServiceDto } from '@epam/ai-dial-chat-api-client';
4
+ import { ApplicationVisualizer } from '@epam/ai-dial-chat-shared';
3
5
  import { ArchiveItemDto } from '@epam/ai-dial-chat-api-client';
4
6
  import { Attachment } from '@epam/ai-dial-chat-shared';
5
7
  import { AttachmentDisplayResolvers } from '@epam/ai-dial-chat-shared';
@@ -25,6 +27,7 @@ import { ConversationTransferJob } from '@epam/ai-dial-chat-shared';
25
27
  import { ConversationTransferWarningCode } from '@epam/ai-dial-chat-shared';
26
28
  import { CopyFilesResponseDto } from '@epam/ai-dial-chat-api-client';
27
29
  import { CopyItemDto } from '@epam/ai-dial-chat-api-client';
30
+ import { CreatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
28
31
  import { CreateFolderDto } from '@epam/ai-dial-chat-api-client';
29
32
  import { CreateFolderResponseDto } from '@epam/ai-dial-chat-api-client';
30
33
  import { CreateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
@@ -34,8 +37,6 @@ import type { CustomVisualizerDataLayout } from '@epam/ai-dial-chat-shared';
34
37
  import { DeleteFilesResponseDto } from '@epam/ai-dial-chat-api-client';
35
38
  import { DeleteItemDto } from '@epam/ai-dial-chat-api-client';
36
39
  import { DeploymentConfigurationSchema } from '@epam/ai-dial-chat-shared';
37
- import { DeploymentCreationFormLocaleEntry } from '@epam/ai-dial-builder-form';
38
- import { DeploymentCreationFormLocaleOption } from '@epam/ai-dial-builder-form';
39
40
  import { DeploymentDetailsDto } from '@epam/ai-dial-chat-api-client';
40
41
  import { DeploymentFeatures } from '@epam/ai-dial-chat-shared';
41
42
  import { DeploymentItemDto } from '@epam/ai-dial-chat-api-client';
@@ -59,22 +60,33 @@ import { Dispatch } from 'react';
59
60
  import { DisplayAttachment } from '@epam/ai-dial-chat-shared';
60
61
  import { DropdownItem } from '@epam/ai-dial-ui-kit';
61
62
  import { ExportFolder } from '@epam/ai-dial-chat-shared';
63
+ import { ExternalServicesApi } from '@epam/ai-dial-chat-api-client';
62
64
  import { FileManagerColumnKey } from '@epam/ai-dial-react-file-manager';
65
+ import { FileManagerSelectableNode } from '@epam/ai-dial-chat-shared';
63
66
  import { FileMetadataResponseDto } from '@epam/ai-dial-chat-api-client';
64
67
  import { FilesApi } from '@epam/ai-dial-chat-api-client';
68
+ import { FileTreeOptions } from '@epam/ai-dial-react-file-manager';
65
69
  import { FileUploadBatchState } from '@epam/ai-dial-chat-shared';
66
70
  import { FileUploadEntry } from '@epam/ai-dial-chat-shared';
67
71
  import { FileUploadResponseDto } from '@epam/ai-dial-chat-api-client';
68
72
  import { FileUploadStatus } from '@epam/ai-dial-chat-shared';
69
73
  import { FileUploadValidationResult } from '@epam/ai-dial-chat-shared';
74
+ import { FilterChipItem } from '@epam/ai-dial-ui-kit';
70
75
  import { FilterTab } from '@epam/ai-dial-chat-shared';
71
76
  import { getParentFolderPath } from '@epam/ai-dial-chat-shared';
77
+ import type { GroupedAttachmentItem } from '@epam/ai-dial-chat-shared';
78
+ import { Implementation } from '@modelcontextprotocol/sdk/types.js';
72
79
  import type { InputHighlightData } from '@epam/pdf-highlighter-kit';
73
80
  import { ListFilesItemDto } from '@epam/ai-dial-chat-api-client';
74
81
  import { ListFilesResponseDto } from '@epam/ai-dial-chat-api-client';
75
82
  import { ListPublicFilesRequest } from '@epam/ai-dial-chat-api-client';
83
+ import { ListScheduledTaskRunsResponseDto } from '@epam/ai-dial-chat-api-client';
84
+ import { ListScheduledTasksResponseDto } from '@epam/ai-dial-chat-api-client';
85
+ import { ListScheduledTasksSortEnum } from '@epam/ai-dial-chat-api-client';
76
86
  import { ListSharedFilesRequest } from '@epam/ai-dial-chat-api-client';
87
+ import { LocaleOption } from '@epam/ai-dial-chat-shared';
77
88
  import { LocaleTextEntryDto } from '@epam/ai-dial-chat-api-client';
89
+ import { LocalizedTextEntry } from '@epam/ai-dial-chat-shared';
78
90
  import { McpAppToolSummaryDto } from '@epam/ai-dial-chat-api-client';
79
91
  import { McpUiHostContext } from '@mcp-ui/client';
80
92
  import { Message } from '@epam/ai-dial-chat-shared';
@@ -82,10 +94,13 @@ import { MessageAttachment } from '@epam/ai-dial-chat-shared';
82
94
  import { MessageCustomContent } from '@epam/ai-dial-chat-shared';
83
95
  import { MessageRating } from '@epam/ai-dial-chat-shared';
84
96
  import { Middleware } from '@epam/ai-dial-chat-api-client';
97
+ import { ModelLimitPeriodStatuses } from '@epam/ai-dial-usage-dashboard';
98
+ import { ModelLimitRow } from '@epam/ai-dial-usage-dashboard';
85
99
  import { MoveFilesResponseDto } from '@epam/ai-dial-chat-api-client';
86
100
  import { MoveItemDto } from '@epam/ai-dial-chat-api-client';
87
101
  import { MutableRefObject } from 'react';
88
102
  import { NotificationVariant } from '@epam/ai-dial-ui-kit';
103
+ import { OfflineCredentialsApi } from '@epam/ai-dial-chat-api-client';
89
104
  import { OverlayChatMessage } from '@epam/ai-dial-chat-overlay';
90
105
  import { PromptFolderResponseDto } from '@epam/ai-dial-chat-api-client';
91
106
  import { PromptListResponseDto } from '@epam/ai-dial-chat-api-client';
@@ -111,6 +126,10 @@ import { RevokeAccessItemDto } from '@epam/ai-dial-chat-api-client';
111
126
  import { RevokeAccessResponseDto } from '@epam/ai-dial-chat-api-client';
112
127
  import { ScheduledTaskCreateFormValues } from '@epam/ai-dial-scheduled-tasks';
113
128
  import { ScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
129
+ import { ScheduledTaskRunDto } from '@epam/ai-dial-chat-api-client';
130
+ import { ScheduledTaskValidationErrors } from '../../libs/scheduled-tasks/validation';
131
+ import { ScheduledTaskValidationOptions } from '../../libs/scheduled-tasks/validation';
132
+ import { ScheduleTriggerDto } from '@epam/ai-dial-chat-api-client';
114
133
  import { SendCompletionDtoModeEnum } from '@epam/ai-dial-chat-api-client';
115
134
  import { SetStateAction } from 'react';
116
135
  import { ShareApi } from '@epam/ai-dial-chat-api-client';
@@ -122,16 +141,16 @@ import { SkillEditorFileActions } from '@epam/ai-dial-skill-editor';
122
141
  import { SkillEditorValues } from '@epam/ai-dial-skill-editor';
123
142
  import { SkillFileBatchError } from '@epam/ai-dial-skill-editor';
124
143
  import { SkillFileListResponseDto } from '@epam/ai-dial-chat-api-client';
144
+ import { SkillFileSourceEntry } from '@epam/ai-dial-skill-editor';
125
145
  import { SkillFileTreeNode } from '@epam/ai-dial-skill-editor';
126
146
  import { SkillFileUploadCandidate } from '@epam/ai-dial-skill-editor';
127
147
  import { SkillFileValidationResult } from '@epam/ai-dial-skill-editor';
128
148
  import { SkillMetadataItemDto } from '@epam/ai-dial-chat-api-client';
129
149
  import { SkillUploadResponseDto } from '@epam/ai-dial-chat-api-client';
150
+ import { Stage } from '@epam/ai-dial-chat-shared';
130
151
  import { StarterOption } from '@epam/ai-dial-chat-shared';
131
152
  import { StatusMessage } from '@epam/ai-dial-chat-shared';
132
153
  import { StreamChunk } from '@epam/ai-dial-chat-shared';
133
- import { TabModel } from '@epam/ai-dial-ui-kit';
134
- import { ToolbarOptions } from '@epam/ai-dial-react-file-manager';
135
154
  import { ToolMenuItem } from '@epam/ai-dial-chat-shared';
136
155
  import { ToolsetLoginBodyDto } from '@epam/ai-dial-chat-api-client';
137
156
  import { ToolsetLogoutBodyDto } from '@epam/ai-dial-chat-api-client';
@@ -139,9 +158,11 @@ import { ToolsetsApi } from '@epam/ai-dial-chat-api-client';
139
158
  import { TranscriptionApi } from '@epam/ai-dial-chat-api-client';
140
159
  import { UnpublishCatalogEntityDto } from '@epam/ai-dial-chat-api-client';
141
160
  import { UnpublishResultDto } from '@epam/ai-dial-chat-api-client';
161
+ import { UpdatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
142
162
  import { UpdateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
143
163
  import { UploadArchiveResponseDto } from '@epam/ai-dial-chat-api-client';
144
164
  import { UploadedAttachmentResult } from '@epam/ai-dial-chat-shared';
165
+ import { UsageLimitCardData } from '@epam/ai-dial-usage-dashboard';
145
166
  import { useGridEditingScroll } from '@epam/ai-dial-chat-shared';
146
167
  import { UseGridEditingScrollOptions } from '@epam/ai-dial-chat-shared';
147
168
  import { UseGridEditingScrollResult } from '@epam/ai-dial-chat-shared';
@@ -161,6 +182,7 @@ export declare interface AgentCapabilities {
161
182
  hasConfiguration?: boolean;
162
183
  hasChatCompletion?: boolean;
163
184
  hasResponsesApi?: boolean;
185
+ hasSkills?: boolean;
164
186
  }
165
187
 
166
188
  /** Input-attachment configuration for an agent (application) deployment. */
@@ -236,17 +258,48 @@ export declare interface AnnouncementListItemLink {
236
258
 
237
259
  /** Normalized shape returned by {@link getApiErrorDetails}. */
238
260
  export declare interface ApiErrorDetails {
261
+ /** Stable domain error code supplied by the API, when present. */
262
+ code?: string;
239
263
  /** HTTP status code carried by the error, when available. */
240
264
  status?: number;
241
265
  /** Resolved human-readable error message, or `null` when none could be resolved. */
242
266
  message: string | null;
243
267
  /** Extracted W3C trace ID, when the error's response carries a valid `traceparent`. */
244
268
  traceId?: string;
269
+ /**
270
+ * Error code reported by the service behind the API, when the API forwards one
271
+ * (`upstreamCode`). Passed through as-is; the host decides whether to act on it.
272
+ */
273
+ upstreamCode?: string;
274
+ /**
275
+ * Error reason reported by the service behind the API, when the API forwards one
276
+ * (`upstreamMessage`). Untranslated; the host decides whether to display it.
277
+ */
278
+ upstreamMessage?: string;
245
279
  }
246
280
 
247
281
  /** Appends a locale's uppercased code to a field label, e.g. `'Name [EN]'`. */
248
282
  export declare const appendLocaleCode: (label: string, locale: string) => string;
249
283
 
284
+ /**
285
+ * Applies a single SSE stream chunk to the message list.
286
+ *
287
+ *
288
+ * Attachments are accumulated: each chunk's attachments are appended to the
289
+ * existing array rather than replacing it.
290
+ *
291
+ * Annotations are merged by `index`: partial `body.title` and `body.quote`
292
+ * strings are concatenated across chunks, matching the same delta-merge
293
+ * semantics used for stages.
294
+ *
295
+ * `state` is overwritten (not merged) by each chunk that carries one,
296
+ * matching the DIAL stateful-app contract.
297
+ *
298
+ * @returns Updated message array, or `null` when the chunk carries no
299
+ * actionable data (empty content, no form_schema, and no attachments).
300
+ */
301
+ export declare const applyChunkToMessages: (messages: Message[], messageIndex: number, chunk: StreamChunk) => Message[] | null;
302
+
250
303
  /** Converts an APScheduler weekday (Monday=0..Sunday=6) to a JS `Date` weekday (Sunday=0..Saturday=6). */
251
304
  export declare const apSchedulerDayToJsDay: (apSchedulerDay: number) => number;
252
305
 
@@ -314,6 +367,7 @@ declare enum AttachmentContentType {
314
367
  Code = 'code',
315
368
  Html = 'html',
316
369
  Visualizer = 'visualizer',
370
+ GroupedVisualizer = 'grouped_visualizer',
317
371
  McpApp = 'mcp_app',
318
372
  Unsupported = 'unsupported',
319
373
  Error = 'error',
@@ -345,10 +399,12 @@ export declare const attachmentToDto: (attachment: Attachment) => AttachmentDto;
345
399
  export declare interface AttachmentValidationErrorEvent {
346
400
  /** Why the attachment(s) were rejected. */
347
401
  reason: AttachmentValidationErrorReason;
348
- /** The resolved MIME types the caller currently allows (possibly empty). */
349
- allowedMimeTypes: string[];
402
+ /** The resolved MIME types the caller currently allows (possibly empty). Present only when `reason` is `NoTypesAllowed` or `UnsupportedType`. */
403
+ allowedMimeTypes?: string[];
350
404
  /** Already-formatted, non-translated extension list (e.g. ".png, .jpg"), present only when `reason` is `UnsupportedType`. */
351
405
  formats?: string;
406
+ /** The size limit, in bytes, that was exceeded. Present only when `reason` is `FileTooLarge`. */
407
+ maxFileSizeBytes?: number;
352
408
  }
353
409
 
354
410
  /** Reason a rejected attachment failed validation. */
@@ -356,7 +412,9 @@ export declare enum AttachmentValidationErrorReason {
356
412
  /** No MIME types are allowed at all — attachments are disabled entirely. */
357
413
  NoTypesAllowed = "noTypesAllowed",
358
414
  /** The attachment's content type is not among the allowed MIME types. */
359
- UnsupportedType = "unsupportedType"
415
+ UnsupportedType = "unsupportedType",
416
+ /** The attachment's file size exceeds `maxFileSizeBytes`. */
417
+ FileTooLarge = "fileTooLarge"
360
418
  }
361
419
 
362
420
  /** Thrown by `transcribeAudio`; carries a machine-readable `reason` instead of translated text. */
@@ -391,7 +449,7 @@ export declare enum AuthenticationType {
391
449
  * `additionalLocaleCodes` and excluding whichever code is already the
392
450
  * primary Name/Description field.
393
451
  */
394
- export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: string[], primaryLocale: string) => DeploymentCreationFormLocaleOption[];
452
+ export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: string[], primaryLocale: string) => LocaleOption[];
395
453
 
396
454
  /**
397
455
  * Builds the value persisted under `StorageKey.TextOfClosedAnnouncement` when
@@ -522,6 +580,13 @@ export declare const buildSkillManifestFromFrontmatter: (baseFrontmatter: Record
522
580
  * authored it, when it last changed, and its file inventory. Grouping folders
523
581
  * in the file listing are excluded from both the count and the rows. Sizes are
524
582
  * not shown — the skill metadata carries no content-length field.
583
+ *
584
+ * `skill` is the authoritative `getSkillMetadata` response when that request
585
+ * fulfilled; the caller falls back to the catalog listing entry only when it
586
+ * rejected (`useSkillItemDetails`'s `onFetchSkillDetails`). Either way, this
587
+ * function never fills a gap in one source from the other — an absent
588
+ * `author` omits the row and an absent `updatedAt` leaves the updated row's
589
+ * value empty, exactly as `skill` carries it.
525
590
  */
526
591
  export declare const buildSkillOverview: (skill: SkillMetadataItemDto | undefined, files: SkillMetadataItemDto[], about: SkillAboutDetails | undefined, labels: SkillOverviewLabels) => CatalogItemOverview;
527
592
 
@@ -717,6 +782,13 @@ export declare interface ChatStreamCompletionOptions {
717
782
  signal?: AbortSignal;
718
783
  }
719
784
 
785
+ /**
786
+ * Classifies an import request's HTTP status into a semantic outcome: 400/413/422 are
787
+ * archive-content problems, 409 is a name collision, 429 is rate limiting, 502/503 mean the
788
+ * backend is unavailable, and anything else (including no status at all) is generic.
789
+ */
790
+ export declare const classifySkillArchiveImportError: (status: number | undefined) => SkillArchiveImportErrorKind;
791
+
720
792
  /** Clears all cached fetch results. Call this when leaving a conversation. */
721
793
  export declare const clearAttachmentCache: () => void;
722
794
 
@@ -743,7 +815,7 @@ export declare const COLUMNS_WITHOUT_AUTHOR: FileManagerColumnKey[];
743
815
  * `undefined` (not `[]`) when nothing remains, so a request untouched by
744
816
  * this feature stays byte-identical to today.
745
817
  */
746
- export declare const composeLocalePayload: (otherLocales: DeploymentCreationFormLocaleEntry[], primaryLocale: string) => LocaleTextEntryDto[] | undefined;
818
+ export declare const composeLocalePayload: (otherLocales: LocalizedTextEntry[], primaryLocale: string) => LocaleTextEntryDto[] | undefined;
747
819
 
748
820
  /** Whether an export includes the conversation's attachments. */
749
821
  export declare enum ConversationExportMode {
@@ -759,6 +831,28 @@ export declare interface ConversationGenerationLifecycle {
759
831
  completeGeneration: (path: string, generationId: string) => void;
760
832
  }
761
833
 
834
+ /** Labels and formatter callbacks for the conversation-input limits mapping utility. */
835
+ export declare interface ConversationInputLimitsLabels {
836
+ /** Heading of the group listing the selected deployment's token limits. */
837
+ tokenGroup: string;
838
+ /** Heading of the group listing the caller's cost budget and spend against it. */
839
+ costGroup: string;
840
+ /** Label for the current-UTC-day row, used by both groups. */
841
+ periodDay: string;
842
+ /** Label for the current-UTC-week row, used by both groups. */
843
+ periodWeek: string;
844
+ /** Label for the current-UTC-month row, used by both groups. */
845
+ periodMonth: string;
846
+ /** Formats the combined used/total display value for a capped row. */
847
+ formatValueLabel: (used: string, total: string) => string;
848
+ /** Formats the ARIA label for a capped progress row. */
849
+ formatProgressAriaLabel: (params: {
850
+ label: string;
851
+ used: string;
852
+ total: string;
853
+ }) => string;
854
+ }
855
+
762
856
  /** Stable reverse-lookup maps returned by `useConversationLookupMaps`. */
763
857
  export declare interface ConversationLookupMaps {
764
858
  /** Returns the raw context id for a panel-space conversation id, or `undefined` when not found. */
@@ -909,6 +1003,12 @@ export declare interface CreateChatStreamApiDeps {
909
1003
  getTimezone?: () => string | undefined;
910
1004
  /** `fetch` implementation to issue requests through. Defaults to the global `fetch`. */
911
1005
  fetchImpl?: typeof fetch;
1006
+ /**
1007
+ * How long an open completion stream may go without receiving a byte
1008
+ * (keepalive comments included) before it is reported as a
1009
+ * {@link StreamInterruptedError}. Defaults to {@link DEFAULT_STREAM_IDLE_TIMEOUT_MS}.
1010
+ */
1011
+ idleTimeoutMs?: number;
912
1012
  }
913
1013
 
914
1014
  /**
@@ -958,6 +1058,12 @@ export declare const createMessagePair: (content: string, customContent?: Messag
958
1058
  */
959
1059
  export declare const createPublishApiClient: (publishApi: PublishApi) => PublishApiClient;
960
1060
 
1061
+ /**
1062
+ * Composes scheduler operations over an already configured generated client.
1063
+ * Authentication, base URL, CSRF, and retries remain host responsibilities.
1064
+ */
1065
+ export declare const createScheduledTasksApiClient: (client: ScheduledTasksConfiguredClient) => ScheduledTasksApiClient;
1066
+
961
1067
  /**
962
1068
  * Builds a generated-client `Middleware` that throws on 401, and on a
963
1069
  * classified invalid-CSRF 403 refreshes the token and retries the original
@@ -1020,6 +1126,15 @@ export declare type CsrfRefreshOutcome = {
1020
1126
 
1021
1127
  export declare const DATE_OPTIONS: Intl.DateTimeFormatOptions;
1022
1128
 
1129
+ /**
1130
+ * Inverse of `encodeDeploymentId` — decodes each `/`-separated segment back
1131
+ * to its raw, human-readable form. A segment that isn't valid
1132
+ * percent-encoding is passed through unchanged rather than throwing, since
1133
+ * this decodes externally-sourced ids (the settings iframe's postMessage
1134
+ * protocol).
1135
+ */
1136
+ export declare const decodeDeploymentId: (id: string) => string;
1137
+
1023
1138
  /**
1024
1139
  * Inverse of `encodeToolsetId` — decodes each `/`-separated segment back to
1025
1140
  * its raw, human-readable form. A segment that isn't valid percent-encoding
@@ -1036,11 +1151,14 @@ export declare const decodeToolsetId: (id: string) => string;
1036
1151
  * present in either map, excluding `primaryLocale` — that key is already the
1037
1152
  * primary Name/Description field, not a row in the popup.
1038
1153
  */
1039
- export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) => DeploymentCreationFormLocaleEntry[];
1154
+ export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) => LocalizedTextEntry[];
1040
1155
 
1041
1156
  /** Fallback text of a {@link GenerationConflictError} when no message is supplied. */
1042
1157
  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.";
1043
1158
 
1159
+ /** Safe fallback for hosts that do not supply a translated persistence warning. */
1160
+ 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.";
1161
+
1044
1162
  /**
1045
1163
  * Default ceiling on the summed byte length of an export's attachments.
1046
1164
  *
@@ -1054,6 +1172,8 @@ export declare const DEFAULT_GENERATION_CONFLICT_MESSAGE = "A response is alread
1054
1172
  */
1055
1173
  export declare const DEFAULT_MAX_ARCHIVE_BYTES: number;
1056
1174
 
1175
+ export declare const DEFAULT_STREAM_IDLE_TIMEOUT_MS = 45000;
1176
+
1057
1177
  /** Translated folder-path labels for the Personal/Shared/Public deployment groupings. */
1058
1178
  export declare interface DeploymentFolderLabels {
1059
1179
  personal: string;
@@ -1120,15 +1240,34 @@ export declare const deriveAvailableTabIds: <T extends CatalogEntityType>(items:
1120
1240
  export declare const deriveConversationRowActionState: (item: Pick<ConversationListItemDto, "sharedWithMe" | "publishedWithMe" | "isReadonly">, publishHistory: PublishHistoryEntry[] | undefined, recipients: RecipientsCountEntry) => ConversationRowActionState;
1121
1241
 
1122
1242
  /**
1123
- * Returns items marked as a user favorite, in original order.
1243
+ * Returns items marked as a user favorite that are not hidden, in original order.
1124
1244
  */
1125
1245
  export declare const deriveFavoriteItems: (items: readonly CatalogItem[]) => CatalogItem[];
1126
1246
 
1247
+ /**
1248
+ * Describes the complete trigger without requiring unrelated task metadata.
1249
+ * Unsupported constraints remain Custom, with the full source expression.
1250
+ * Calendar-month shifts crossing month boundaries or days 29–31 remain
1251
+ * Custom because a shifted monthly day is not equivalent around short months.
1252
+ */
1253
+ export declare const describeScheduledTaskTrigger: (trigger: ScheduleTriggerDto, { timeZone, referenceDate, }?: ScheduledTaskTriggerDescriptionOptions) => ScheduledTaskTriggerDescription;
1254
+
1255
+ /** Source tabs `useDialFileManagerSections` can merge into the All tab, in display order. */
1256
+ export declare const DIAL_FILE_MANAGER_SECTION_TABS: readonly DialFileManagerTabs[];
1257
+
1127
1258
  /** Strip the "files/{bucket}/" prefix from a DIAL Core URL to get the path within the bucket. */
1128
1259
  export declare const dialCorePathToRelative: (dialCorePath: string, bucket: string) => string;
1129
1260
 
1130
1261
  export { DialFileManagerActionProfile }
1131
1262
 
1263
+ /** One source tab rendered as a top-level folder of the All view. */
1264
+ export declare interface DialFileManagerSection {
1265
+ /** Source tab backing this section — `MyFiles`, `Shared` or `Organization`. */
1266
+ tab: DialFileManagerTabs;
1267
+ /** 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. */
1268
+ rootLabel: string;
1269
+ }
1270
+
1132
1271
  export { DialFileManagerVariant }
1133
1272
 
1134
1273
  /**
@@ -1463,7 +1602,9 @@ export declare enum FileManagerNotificationReason {
1463
1602
  /** `onUploadArchive` extracted some entries successfully and some failed; `count`/`names`/`restCount` describe the failures. */
1464
1603
  UploadArchivePartiallyFailed = "uploadArchivePartiallyFailed",
1465
1604
  /** `onUploadArchive`'s `uploadArchive` request itself rejected. */
1466
- UploadArchiveRequestFailed = "uploadArchiveRequestFailed"
1605
+ UploadArchiveRequestFailed = "uploadArchiveRequestFailed",
1606
+ /** A copy/move targeted a destination in a different All-view section from its source items; no request was made. */
1607
+ CrossSectionTransferUnsupported = "crossSectionTransferUnsupported"
1467
1608
  }
1468
1609
 
1469
1610
  /**
@@ -1484,8 +1625,6 @@ export declare type FileNameValidationError = {
1484
1625
  } | {
1485
1626
  reason: FileNameValidationErrorReason.DuplicateName;
1486
1627
  existingName: string;
1487
- } | {
1488
- reason: FileNameValidationErrorReason.LeadingDot;
1489
1628
  };
1490
1629
 
1491
1630
  /**
@@ -1498,8 +1637,7 @@ export declare enum FileNameValidationErrorReason {
1498
1637
  ForbiddenSymbols = "forbiddenSymbols",
1499
1638
  ReservedName = "reservedName",
1500
1639
  TooLong = "tooLong",
1501
- DuplicateName = "duplicateName",
1502
- LeadingDot = "leadingDot"
1640
+ DuplicateName = "duplicateName"
1503
1641
  }
1504
1642
 
1505
1643
  /**
@@ -1516,7 +1654,10 @@ export declare enum FileOperationKind {
1516
1654
  FileCopied = "fileCopied",
1517
1655
  FilesCopied = "filesCopied",
1518
1656
  FileMoved = "fileMoved",
1519
- FilesMoved = "filesMoved"
1657
+ FilesMoved = "filesMoved",
1658
+ /** A copy whose every item landed in its own source folder (Duplicate). */
1659
+ FileDuplicated = "fileDuplicated",
1660
+ FilesDuplicated = "filesDuplicated"
1520
1661
  }
1521
1662
 
1522
1663
  /**
@@ -1531,13 +1672,15 @@ export declare interface FileOperationSuccessEvent {
1531
1672
  name?: string;
1532
1673
  /** Number of items the operation covered, when applicable. */
1533
1674
  count?: number;
1534
- /** Destination folder name, for copy/move operations. */
1675
+ /**
1676
+ * Destination folder as a slash-joined virtual path starting at the root
1677
+ * label (e.g. `My files/reports`), for copy/move/duplicate operations.
1678
+ */
1535
1679
  destinationFolderName?: string;
1536
1680
  /**
1537
- * Whether the affected item is a folder rather than a file. Only set for
1538
- * `fileRenamed`, since it is the only kind whose current wording depends
1539
- * on the item's node type (a rename toast reads "Folder renamed" vs.
1540
- * "File renamed").
1681
+ * Whether the affected item is a folder rather than a file. Set for rename,
1682
+ * copy, move, and duplicate events; on a multi-item event it describes the
1683
+ * first successfully affected item (the one `name` refers to).
1541
1684
  */
1542
1685
  isFolder?: boolean;
1543
1686
  }
@@ -1635,6 +1778,9 @@ export declare const formatOperationFolderName: (destinationFolder: string, root
1635
1778
  */
1636
1779
  export declare const formatQuotedNameList: (names: string[]) => string;
1637
1780
 
1781
+ /** Formats a raw `resetsAt` into display strings, or returns `undefined` when it cannot be formatted. */
1782
+ export declare type FormatResetTime = (resetsAt: string | undefined) => ResetTimeDisplay | undefined;
1783
+
1638
1784
  /**
1639
1785
  * Reported through `onError` when the backend rejects a completion because
1640
1786
  * another generation is already active on the same conversation — what a
@@ -1646,7 +1792,13 @@ export declare class GenerationConflictError extends Error {
1646
1792
  constructor(message?: string);
1647
1793
  }
1648
1794
 
1649
- /** Normalizes any API error into a `{ status?, message, traceId? }` shape. */
1795
+ /** Identifies a failed terminal save independently of the model's generation outcome. */
1796
+ export declare class GenerationPersistenceError extends Error {
1797
+ static readonly type = "conversation_save_failed";
1798
+ constructor();
1799
+ }
1800
+
1801
+ /** Normalizes any API error into a `{ status?, message, traceId?, code?, upstreamCode?, upstreamMessage? }` shape. */
1650
1802
  export declare const getApiErrorDetails: (error: unknown) => Promise<ApiErrorDetails>;
1651
1803
 
1652
1804
  /** Resolves a human-readable message from an API error's response body, or falls back to `Error.message`. */
@@ -1681,6 +1833,21 @@ export declare const getConversationSource: (item: Pick<ConversationListItemDto,
1681
1833
  */
1682
1834
  export declare const getExternalServiceFallbackName: (serviceName: string) => string;
1683
1835
 
1836
+ /**
1837
+ * Returns the tool values the conversation's last message sets through its
1838
+ * `form_schema`, restricted to `toolIds`, plus a key identifying that exact
1839
+ * application. `undefined` when the last message is not an assistant message
1840
+ * or sets no known tool.
1841
+ *
1842
+ * Streamed chunks and reloads re-create an identical `form_schema`; comparing
1843
+ * keys rather than object identity applies an app's value once and leaves a
1844
+ * later user toggle alone until the app sends a different value.
1845
+ */
1846
+ export declare const getFormSchemaToolSyncKey: (conversationId: string, messages: Message[], toolIds: readonly string[]) => {
1847
+ key: string;
1848
+ values: Record<string, boolean>;
1849
+ } | undefined;
1850
+
1684
1851
  /**
1685
1852
  * Returns the deployment the conversation was last running on: scanning
1686
1853
  * backwards, the `new_deployment_id` of a `model_changed` status message or
@@ -1704,6 +1871,15 @@ export declare const getLastDeploymentId: (messages: Message[]) => string | null
1704
1871
  */
1705
1872
  export declare const getLastUserMessageToolConfiguration: (messages: Message[]) => Record<string, unknown> | undefined;
1706
1873
 
1874
+ /**
1875
+ * Returns the tool configuration a (re-)loaded conversation should show: the
1876
+ * last user message's `configuration_value`, overlaid in order by the
1877
+ * `form_schema` values of the assistant messages after it. An app that turned
1878
+ * a toggle off in its final response must not see it re-armed on reload just
1879
+ * because the user message that started the run had it on.
1880
+ */
1881
+ export declare const getLatestToolConfiguration: (messages: Message[]) => Record<string, unknown> | undefined;
1882
+
1707
1883
  /**
1708
1884
  * Extracts the deployment/model ID from a DIAL Core conversation ID.
1709
1885
  *
@@ -1751,6 +1927,9 @@ export declare const getQuickAppConversationStarters: (conversationStarters: unk
1751
1927
  */
1752
1928
  export declare const getRemainingCharacters: (value: string, maxLength: number) => number | null;
1753
1929
 
1930
+ /** Returns the limit each over-long skill field exceeds, keyed by field; fields within their limit are omitted. */
1931
+ export declare const getSkillFieldLengthViolations: (values: Record<SkillTextField, string>) => Partial<Record<SkillTextField, number>>;
1932
+
1754
1933
  /**
1755
1934
  * Returns the text to start/populate a conversation from a selected starter button.
1756
1935
  * `description` (the schema property's shared intro/question text) is used only
@@ -1804,6 +1983,15 @@ export declare const getStarterSubmitText: (starter: StarterOption, description?
1804
1983
  */
1805
1984
  export declare const getTimeOfDayGreeting: (hour: number, translations: GreetingTranslations, firstName?: string) => string;
1806
1985
 
1986
+ /**
1987
+ * Returns the boolean values an assistant message's `form_schema` sets, keyed
1988
+ * by property name, or `undefined` when no property resolves to a boolean.
1989
+ * Lets a DIAL app switch a tools-menu toggle (e.g. `deep_research`) per
1990
+ * message — on while a run is in progress, off once its result is delivered.
1991
+ * Not filtered by tool id: `restoreToolConfiguration` ignores unknown ids.
1992
+ */
1993
+ export declare const getToolConfigurationFromFormSchema: (formSchema: DeploymentConfigurationSchema | undefined) => Record<string, boolean> | undefined;
1994
+
1807
1995
  /** Name of the same-origin `BroadcastChannel` shared by an OAuth flow's opener and its callback popup. */
1808
1996
  export declare const getToolsetOAuthChannelName: (flowId: string) => string;
1809
1997
 
@@ -1838,6 +2026,30 @@ export declare interface GreetingTranslations {
1838
2026
  nightNoName: string;
1839
2027
  }
1840
2028
 
2029
+ /** Content payload for an application-scoped grouped visualizer: every attachment a message's visualizer claims, rendered together inside one sandboxed iframe. */
2030
+ declare interface GroupedVisualizerCanvasContent {
2031
+ /** Discriminates the content type to select the correct renderer. */
2032
+ type: AttachmentContentType.GroupedVisualizer;
2033
+ /** Iframe `src`, resolved from the matching registry entry's `url`. */
2034
+ url: string;
2035
+ /** One item per claimed attachment, in the message's attachment order. Each `url` is absolute, resolved by the host. */
2036
+ attachments: GroupedAttachmentItem[];
2037
+ /** Presentation layout hints (`themeId`, `width`, `height`, `mobileHeight`) shared by every item. */
2038
+ layout: CustomVisualizerDataLayout;
2039
+ /** postMessage protocol namespace — MUST equal the registry entry's `title`, or the iframe never receives data. */
2040
+ visualizerName: string;
2041
+ /** Milliseconds to wait for a `send()` request's response before rejecting. From the registry entry; does NOT bound the handshake. */
2042
+ requestTimeout?: number;
2043
+ }
2044
+
2045
+ /** Outcome of building a grouped visualizer payload. */
2046
+ export declare interface GroupedVisualizerResolution {
2047
+ /** The grouped payload, or `null` when no claimed attachment resolved to a URL. */
2048
+ content: GroupedVisualizerCanvasContent | null;
2049
+ /** The claimed attachments that reached `content.attachments`, in the input's order. The caller returns the rest to the ordinary attachment tray. */
2050
+ resolved: DisplayAttachment[];
2051
+ }
2052
+
1841
2053
  /** Whether at least one tool toggle in `value` is active. */
1842
2054
  export declare const hasActiveToolConfig: (value: Record<string, boolean> | undefined) => boolean;
1843
2055
 
@@ -1856,6 +2068,9 @@ export declare const hasDialFileWritePermission: (folder?: DialFile) => boolean;
1856
2068
 
1857
2069
  export declare const hasForbiddenNameSymbols: (name: string, forbiddenSymbolsRegExp?: RegExp) => boolean;
1858
2070
 
2071
+ /** Returns `true` when both sets contain exactly the same paths. */
2072
+ export declare const hasSamePaths: (a: ReadonlySet<string>, b: ReadonlySet<string>) => boolean;
2073
+
1859
2074
  /**
1860
2075
  * Whether the operator configured the structured banner (title and/or
1861
2076
  * description) rather than only the legacy HTML message. Drives which of the
@@ -1867,10 +2082,14 @@ export declare const hasStructuredAnnouncement: ({ title, description, }: Announ
1867
2082
  declare interface HtmlCanvasContent {
1868
2083
  /** Discriminates the content type to select the correct renderer. */
1869
2084
  type: AttachmentContentType.Html;
1870
- /** Full HTML text rendered via `srcdoc` in a sandboxed iframe. Used for file attachments. */
2085
+ /** 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`. */
1871
2086
  srcdoc?: string;
1872
- /** External URL rendered via `src` in a sandboxed iframe. Used for external link sources. */
2087
+ /** 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. */
1873
2088
  url?: string;
2089
+ /** 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. */
2090
+ isSameOriginUrl?: boolean;
2091
+ /** 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. */
2092
+ resolveSourceText?: () => Promise<string>;
1874
2093
  }
1875
2094
 
1876
2095
  /** Content payload for image attachments. */
@@ -1907,8 +2126,8 @@ export declare const isAnswerIncomplete: (answer: Message | undefined) => boolea
1907
2126
  * True when the conversation's last message is an unresolved assistant
1908
2127
  * placeholder: the backend only persists a conversation at generation start
1909
2128
  * (empty placeholder) and at generation end (final content, or a partial
1910
- * flagged `streamErrorMessage`/`wasStoppedByUser`), so this shape means a
1911
- * generation was still active elsewhere when the conversation was loaded.
2129
+ * flagged `streamErrorMessage`/`wasStoppedByUser`). This can mean generation
2130
+ * is still active elsewhere, or that its terminal save failed.
1912
2131
  */
1913
2132
  export declare const isAwaitingGenerationResume: (conversation: Conversation) => boolean;
1914
2133
 
@@ -2043,8 +2262,8 @@ export declare const mapDeploymentDetailsDtoToEntityDetails: (dto: DeploymentDet
2043
2262
  /** Maps a deployment limits DTO to display-ready catalog limits, or `undefined` when no qualifying stats exist. */
2044
2263
  export declare const mapDeploymentLimitsDtoToCatalogLimits: (dto: DeploymentLimitsResponseDto | undefined, labels: DeploymentLimitsLabels) => CatalogItemLimits | undefined;
2045
2264
 
2046
- /** Maps the monthly deployment token limit to a display-ready value. */
2047
- export declare const mapDeploymentLimitsToInput: (dto: DeploymentLimitsResponseDto | undefined) => MonthlyUsageLimit | undefined;
2265
+ /** 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. */
2266
+ export declare const mapDeploymentLimitsToInput: (dto: DeploymentLimitsResponseDto | undefined, labels: ConversationInputLimitsLabels, formatResetTime?: FormatResetTime) => CatalogItemLimits | undefined;
2048
2267
 
2049
2268
  /** Maps a deployment listing row into the catalog UI's `CatalogItem` shape. */
2050
2269
  export declare const mapDeploymentToCatalogItem: (deployment: DeploymentItemDto, { favoriteIds, entityDetails, folderLabels, editableSchemaIds, isCustomAppsEditable, activeLocale, primaryLocale, resolveIconUrl, }: MapDeploymentToCatalogItemOptions) => CatalogItem;
@@ -2110,12 +2329,18 @@ export declare const mapFileMetadataToDialFile: (metadata: FileMetadataResponseD
2110
2329
  export declare const mapFormValuesToCreateBody: (values: ScheduledTaskCreateFormValues) => CreateScheduledTaskBodyDto;
2111
2330
 
2112
2331
  /**
2113
- * Maps validated edit-form values to the `PUT /api/v1/scheduled-tasks/:scheduleId`
2114
- * request body. `UpdateScheduledTaskBodyDto` has the same shape as
2115
- * `CreateScheduledTaskBodyDto`, so this reuses the same trigger-building logic.
2332
+ * Maps a complete, validated edit draft to an update body. An unset skill
2333
+ * emits null to remove the saved reference; hydrate from detail before editing.
2116
2334
  */
2117
2335
  export declare const mapFormValuesToUpdateBody: (values: ScheduledTaskCreateFormValues) => UpdateScheduledTaskBodyDto;
2118
2336
 
2337
+ /**
2338
+ * Maps the same top-level Cost budgets used by the aggregate cards into table-header state.
2339
+ *
2340
+ * @param formatResetTime - Formats each period's top-level `resetsAt` into the header's reset trio. Omit it to produce statuses with no reset fields.
2341
+ */
2342
+ export declare const mapOverallCostLimitsToPeriodStatuses: (usage: UserLimitStatsResponseDto | undefined, activeLocale: string, t: Translate_2, formatResetTime?: FormatResetTime) => ModelLimitPeriodStatuses;
2343
+
2119
2344
  /**
2120
2345
  * Maps a prompt DTO into a catalog item.
2121
2346
  *
@@ -2174,6 +2399,13 @@ export declare interface MapSkillToCatalogItemOptions {
2174
2399
  favoriteIds: ReadonlySet<string>;
2175
2400
  }
2176
2401
 
2402
+ /**
2403
+ * Returns the normalized stages of a raw stage array or a message-like
2404
+ * payload (reading `custom_content.stages`, falling back to
2405
+ * `customContent.stages`), or `undefined` when there are none.
2406
+ */
2407
+ export declare const mapStages: (source: RawStage[] | RawStageSource | null | undefined) => Stage[] | undefined;
2408
+
2177
2409
  /**
2178
2410
  * Maps a toolset's specification into the lib's credential-status shape,
2179
2411
  * for refreshing the details panel after login/logout. Includes both
@@ -2198,6 +2430,25 @@ export declare interface MapToolsetToCatalogItemOptions {
2198
2430
  resolveIconUrl: (iconUrl: string | undefined) => string | undefined;
2199
2431
  }
2200
2432
 
2433
+ /**
2434
+ * Maps a `UserLimitStatsResponseDto` into `UsageLimitCardGroup`'s `cards` prop,
2435
+ * in Today / This week / This month order. A period is omitted entirely when
2436
+ * the response carries no usable stat for it. Each card's reset trio comes from
2437
+ * `formatResetTime`, and is absent when that callback returns `undefined`.
2438
+ */
2439
+ export declare const mapUsageDataToDashboard: (usage: UserLimitStatsResponseDto | undefined, t: Translate, formatResetTime: FormatResetTime) => UsageLimitCardData[];
2440
+
2441
+ /**
2442
+ * Maps `usage.deployments` into `ModelLimitsSection`'s `rows` prop, joined with model or application
2443
+ * identity from `deploymentItems`. Rows are included only when any displayed period stat has nonzero
2444
+ * usage (Cost stats only, for an application). Order follows `Object.keys(deployments)` —
2445
+ * `deploymentItems` is enrichment-only.
2446
+ *
2447
+ * @param resolveIconUrl - Resolves a deployment's raw `iconUrl` to the URL the avatar should load.
2448
+ * @param resolveDisplayName - Resolves a localized-text map or plain string to the display name for `activeLocale`.
2449
+ */
2450
+ export declare const mapUserUsageToModelLimits: (usage: UserLimitStatsResponseDto | undefined, deploymentItems: DeploymentItemDto[], activeLocale: string, t: Translate_2, resolveIconUrl: ResolveIconUrl, resolveDisplayName: ResolveDisplayName) => ModelLimitRow[];
2451
+
2201
2452
  /** Content payload for Markdown file attachments. */
2202
2453
  declare interface MarkdownCanvasContent {
2203
2454
  /** Discriminates the content type to select the correct renderer. */
@@ -2218,6 +2469,8 @@ declare type McpAppDisplayMode = NonNullable<McpUiHostContext['displayMode']>;
2218
2469
  declare interface McpAppHostAdapter {
2219
2470
  /** `McpUiHostContext` to deliver to the mounted app's `ui/initialize` handshake. */
2220
2471
  hostContext: McpUiHostContext;
2472
+ /** Host identity (`name`/`version`) to deliver to the mounted app's `ui/initialize` handshake. */
2473
+ hostInfo: Implementation;
2221
2474
  /** Operator-configured MCP Apps sandbox-proxy URL, or `null` when unconfigured. */
2222
2475
  sandboxUrl: string | null;
2223
2476
  /** Fetches the matched tool's MCP Apps `ui://` resource. */
@@ -2234,7 +2487,7 @@ export declare interface McpAppHostContextParams {
2234
2487
  mcpAppTheme?: string;
2235
2488
  /** Host's current i18n locale (BCP 47). */
2236
2489
  locale: string;
2237
- /** Operator-configured MCP App user-agent override. Defaults to `'ai-dial-chat'`. */
2490
+ /** Operator-configured MCP App user-agent override. Defaults to the browser's own `navigator.userAgent`. */
2238
2491
  mcpAppUserAgent?: string;
2239
2492
  /**
2240
2493
  * Display modes the host can switch an app between via
@@ -2356,6 +2609,31 @@ export declare enum McpResourceKind {
2356
2609
 
2357
2610
  export declare const mergeCreatedFolderIntoCache: (cache: Map<string, ListFilesItemDto[]>, parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => Map<string, ListFilesItemDto[]>;
2358
2611
 
2612
+ /**
2613
+ * Merges a freshly-fetched page 0 into the currently-loaded run list: an
2614
+ * already-known id is replaced in place at its existing array position, an
2615
+ * unseen id is prepended (upstream order is `created_at desc`, so it is the
2616
+ * newest), and an id absent from `incoming` is left untouched — a background
2617
+ * refresh never removes a loaded run.
2618
+ */
2619
+ export declare const mergeRunsById: (current: ScheduledTaskRunDto[], incoming: ScheduledTaskRunDto[]) => ScheduledTaskRunDto[];
2620
+
2621
+ /**
2622
+ * Merges incoming stage deltas into an existing stage list, keyed by `index`.
2623
+ *
2624
+ * Partial `name` and `content` strings are concatenated across chunks;
2625
+ * attachments are merged by their own `index` (concatenating partial `title`
2626
+ * and `data`); every other field on the incoming delta overwrites the
2627
+ * accumulated one. A brand-new stage whose first chunk carries `name: null`
2628
+ * is normalized to `''`.
2629
+ *
2630
+ * Exported for hosts that keep a flattened `Stage[]` on the message instead
2631
+ * of `Message.custom_content.stages` and therefore cannot reuse
2632
+ * {@link applyChunkToMessages}. Prefer `useConversationStream` when the host
2633
+ * can delegate the whole stream loop.
2634
+ */
2635
+ export declare const mergeStages: (existing: Stage[], incoming: Stage[]) => Stage[];
2636
+
2359
2637
  /** True when `message` is an assistant message carrying at least one stage. */
2360
2638
  export declare const messageHasStages: (message: Message) => boolean;
2361
2639
 
@@ -2365,10 +2643,31 @@ export declare interface MessagePair {
2365
2643
  assistantMessage: Message;
2366
2644
  }
2367
2645
 
2646
+ /** A stable snapshot of one eligible native text selection. */
2647
+ export declare interface MessageSelectionReplySnapshot {
2648
+ /** Scope that owned the selection when it was captured. */
2649
+ conversationId: string;
2650
+ /** Message text root containing the captured range. */
2651
+ body: HTMLDivElement;
2652
+ /** Captured native range. */
2653
+ range: Range;
2654
+ /** Native selected text preserved for the generated file. */
2655
+ text: string;
2656
+ /** Visible fragment of the selected range. */
2657
+ rect: DOMRect;
2658
+ }
2659
+
2368
2660
  /** Formats MIME types as a human-readable, comma-separated list of dotted extensions (or the MIME type itself for wildcards). */
2369
2661
  export declare const mimeTypesToAttachmentExtensionLabels: (types: string[]) => string;
2370
2662
 
2371
- /** Normalizes `*` to the all-files wildcard and drops any value that is not a valid `DialFileAcceptType`. */
2663
+ /**
2664
+ * Normalizes `*` to the all-files wildcard, canonicalizes MIME aliases, and drops
2665
+ * any value that is not a valid `DialFileAcceptType`.
2666
+ *
2667
+ * Aliases are resolved because a file picker matches an `accept` entry against its
2668
+ * own MIME table: a declared `text/json` offers no `.json` file, while the
2669
+ * `application/json` it denotes does.
2670
+ */
2372
2671
  export declare const mimeTypesToDialFileAcceptTypes: (types?: string[]) => DialFileAcceptType[] | undefined;
2373
2672
 
2374
2673
  /**
@@ -2396,6 +2695,7 @@ export declare interface ModelCapabilities {
2396
2695
  hasResume?: boolean;
2397
2696
  hasChatCompletion?: boolean;
2398
2697
  hasResponsesApi?: boolean;
2698
+ hasSkills?: boolean;
2399
2699
  reasoningEfforts?: string[];
2400
2700
  }
2401
2701
 
@@ -2435,18 +2735,6 @@ export declare interface ModelSpecification {
2435
2735
  createdAt?: number;
2436
2736
  }
2437
2737
 
2438
- /** Normalized monthly token usage consumed by the conversation input control. */
2439
- export declare interface MonthlyUsageLimit {
2440
- /** Normalized used-token count. */
2441
- used: number;
2442
- /** Configured monthly token limit. */
2443
- total: number;
2444
- /** Remaining monthly tokens, clamped to zero. */
2445
- remaining: number;
2446
- /** Monthly utilization percentage, clamped to 0–100. */
2447
- usedPercent: number;
2448
- }
2449
-
2450
2738
  /** Returns a skill relative path's final segment (its display name in the file tree). */
2451
2739
  export declare const nameFromPath: (path: string) => string;
2452
2740
 
@@ -2458,6 +2746,20 @@ export declare const nameFromPath: (path: string) => string;
2458
2746
  */
2459
2747
  export declare const navigateToolsetOAuthPopup: (popup: Window, auth: ToolsetOAuthSettings, toolsetId: string, callbackPath: string, credentialsLevel?: ToolsetCredentialsLevel, resourceKind?: OAuthResourceKind, offlineUsageConsent?: boolean) => ToolsetOAuthInitiationResult;
2460
2748
 
2749
+ /**
2750
+ * Encodes a deployment/application id to its single-encoded form regardless
2751
+ * of whether the value it received was already percent-encoded or the raw,
2752
+ * human-readable form — decoding first then re-encoding once is idempotent
2753
+ * either way, since `decodeDeploymentId` on a raw (unencoded) id is a no-op.
2754
+ * Use this instead of `encodeDeploymentId` at a boundary that cannot
2755
+ * guarantee which form it receives, such as a `postMessage` payload from the
2756
+ * settings iframe: calling `encodeDeploymentId` directly on a value the
2757
+ * sender already encoded escapes the existing `%` characters a second time
2758
+ * (`%20` becomes `%2520`), which the backend only ever undoes once and so
2759
+ * 404s on.
2760
+ */
2761
+ export declare const normalizeDeploymentId: (id: string) => string;
2762
+
2461
2763
  /**
2462
2764
  * Normalises a stored response-format string to the current enum. Legacy data
2463
2765
  * may contain `'Markdown'` or `'PlainText'` (capital-first) instead of the
@@ -2473,6 +2775,19 @@ export declare const normalizeResponseFormat: (value: string | undefined) => Res
2473
2775
  */
2474
2776
  export declare const normalizeSkillName: (input: string) => string;
2475
2777
 
2778
+ /**
2779
+ * Encodes a toolset id to its single-encoded form regardless of whether the
2780
+ * value received it in was already percent-encoded or the raw,
2781
+ * human-readable form — decoding first then re-encoding once is idempotent
2782
+ * either way, since `decodeToolsetId` on a raw (unencoded) id is a no-op.
2783
+ * Use this instead of `encodeToolsetId` at a boundary that cannot guarantee
2784
+ * which form it receives, such as a `postMessage` payload from an embedded
2785
+ * iframe: calling `encodeToolsetId` directly on a value the sender already
2786
+ * encoded escapes the existing `%` characters a second time (`%20` becomes
2787
+ * `%2520`), which the backend only ever undoes once and so 404s on.
2788
+ */
2789
+ export declare const normalizeToolsetId: (toolsetId: string) => string;
2790
+
2476
2791
  export declare const normalizeVirtualPath: (value: string) => string;
2477
2792
 
2478
2793
  /** Arguments handed to the host's exchange callback. */
@@ -2544,6 +2859,16 @@ declare interface OoxmlDocxHighlightLocation {
2544
2859
  text: string;
2545
2860
  }
2546
2861
 
2862
+ /** A complete table row in the DOCX body, matched by cell text. */
2863
+ declare interface OoxmlDocxTableRowLocation {
2864
+ /** Location kind. */
2865
+ kind: OoxmlHighlightKind.DocxTableRow;
2866
+ /** Plain text of each cell, in column order. */
2867
+ cells: string[];
2868
+ /** 1-based matching row in document order. */
2869
+ occurrence: number;
2870
+ }
2871
+
2547
2872
  /** Supported document formats rendered by the installed `@silurus/ooxml` runtime. */
2548
2873
  declare enum OoxmlFileType {
2549
2874
  Docx = 'docx',
@@ -2566,6 +2891,10 @@ declare enum OoxmlHighlightKind {
2566
2891
  DocxTextRange = 'docxTextRange',
2567
2892
  /** A character range inside a single PPTX shape on one slide. */
2568
2893
  PptxTextRange = 'pptxTextRange',
2894
+ /** A complete DOCX table row identified by its cell text. */
2895
+ DocxTableRow = 'docxTableRow',
2896
+ /** A complete PPTX table row identified by its cell text on one slide. */
2897
+ PptxTableRow = 'pptxTableRow',
2569
2898
  /** One cell, or a contiguous same-row cell range, on a named XLSX sheet. */
2570
2899
  XlsxCellRange = 'xlsxCellRange',
2571
2900
  }
@@ -2574,6 +2903,8 @@ declare enum OoxmlHighlightKind {
2574
2903
  declare type OoxmlHighlightLocation =
2575
2904
  | OoxmlDocxHighlightLocation
2576
2905
  | OoxmlPptxHighlightLocation
2906
+ | OoxmlDocxTableRowLocation
2907
+ | OoxmlPptxTableRowLocation
2577
2908
  | OoxmlXlsxHighlightLocation;
2578
2909
 
2579
2910
  /** A cited character range inside a single shape on one PPTX slide. */
@@ -2592,6 +2923,18 @@ declare interface OoxmlPptxHighlightLocation {
2592
2923
  text: string;
2593
2924
  }
2594
2925
 
2926
+ /** A complete table row on one PPTX slide, matched by cell text. */
2927
+ declare interface OoxmlPptxTableRowLocation {
2928
+ /** Location kind. */
2929
+ kind: OoxmlHighlightKind.PptxTableRow;
2930
+ /** Plain text of each cell, in column order. */
2931
+ cells: string[];
2932
+ /** 1-based matching row on the specified slide. */
2933
+ occurrence: number;
2934
+ /** 1-based slide number. */
2935
+ slide: number;
2936
+ }
2937
+
2595
2938
  /** A cited cell, or contiguous same-row cell range, on a named XLSX sheet. */
2596
2939
  declare interface OoxmlXlsxHighlightLocation {
2597
2940
  /** Discriminates this location within `OoxmlHighlightLocation`. */
@@ -2763,6 +3106,15 @@ export declare const prepareMoveRenameItems: (copiedItems: DialCopiedItem[], buc
2763
3106
  preparedMoveItems: PreparedCopyMoveItem<MoveItemDto>[];
2764
3107
  };
2765
3108
 
3109
+ /**
3110
+ * Validates form values before creating a request body. Hosts translate the
3111
+ * returned field codes and must not issue a write when `ok` is false.
3112
+ */
3113
+ export declare const prepareScheduledTaskCreateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<CreateScheduledTaskBodyDto>;
3114
+
3115
+ /** Validates form values before preparing an update request body. */
3116
+ export declare const prepareScheduledTaskUpdateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<UpdateScheduledTaskBodyDto>;
3117
+
2766
3118
  /** Maximum body length accepted by `CreatePromptDto.content`. */
2767
3119
  export declare const PROMPT_CONTENT_MAX_LENGTH = 50000;
2768
3120
 
@@ -2814,7 +3166,11 @@ export declare enum PromptSource {
2814
3166
  Public = "public"
2815
3167
  }
2816
3168
 
2817
- /** DIAL Core bucket holding organisation-wide skills. */
3169
+ /**
3170
+ * DIAL Core bucket holding organisation-wide skills.
3171
+ *
3172
+ * @deprecated Use `PUBLIC_BUCKET` from `@epam/ai-dial-chat-shared`.
3173
+ */
2818
3174
  export declare const PUBLIC_SKILL_BUCKET = "public";
2819
3175
 
2820
3176
  /** The DIAL publish API surface produced by {@link createPublishApiClient}. */
@@ -2846,6 +3202,63 @@ export declare interface QuickAppSchemaLike {
2846
3202
  displayName?: string;
2847
3203
  }
2848
3204
 
3205
+ /**
3206
+ * One stage as it arrives from the REST API or the SSE stream, before
3207
+ * normalization. Structurally satisfied by the generated `StageDto` and by a
3208
+ * raw stream delta, both of which omit `index`/`name`/`status` on the chunk
3209
+ * that opens a stage.
3210
+ */
3211
+ export declare interface RawStage {
3212
+ /** Ordering key. Defaults to `0` when absent. */
3213
+ index?: number | null;
3214
+ /** Stage title. `null` on the chunk that opens the stage. */
3215
+ name?: string | null;
3216
+ /** Terminal state as a raw wire string; anything other than `'completed'`/`'failed'` means still running. */
3217
+ status?: string | null;
3218
+ /** Additional stage text. */
3219
+ content?: string | null;
3220
+ /** Short source/category label shown beside the stage name. */
3221
+ tag?: string | null;
3222
+ /** Files produced or referenced by this stage. */
3223
+ attachments?: RawStageAttachment[] | null;
3224
+ }
3225
+
3226
+ /**
3227
+ * One stage attachment as it arrives from the REST API or the SSE stream,
3228
+ * before normalization: every field is optional and may be `null`.
3229
+ */
3230
+ export declare interface RawStageAttachment {
3231
+ /** Zero-based position in the attachment list. */
3232
+ index?: number | null;
3233
+ /** MIME type of the attachment content. */
3234
+ type?: string | null;
3235
+ /** Display name shown in the UI. */
3236
+ title?: string | null;
3237
+ /** Inline base-64 encoded content. */
3238
+ data?: string | null;
3239
+ /** Remote URL pointing to the attachment content. */
3240
+ url?: string | null;
3241
+ /** MIME type of the referenced resource. */
3242
+ reference_type?: string | null;
3243
+ /** URL of an alternate reference resource. */
3244
+ reference_url?: string | null;
3245
+ }
3246
+
3247
+ /**
3248
+ * Message-like payload carrying stages under either the wire's snake_case
3249
+ * `custom_content` or a host's camelCased `customContent`.
3250
+ */
3251
+ export declare interface RawStageSource {
3252
+ /** Custom content as the DIAL wire format spells it. */
3253
+ custom_content?: {
3254
+ stages?: RawStage[] | null;
3255
+ } | null;
3256
+ /** Custom content as a camelCasing host spells it. */
3257
+ customContent?: {
3258
+ stages?: RawStage[] | null;
3259
+ } | null;
3260
+ }
3261
+
2849
3262
  /**
2850
3263
  * Reads a skill file response as raw bytes, or `null` when the body is
2851
3264
  * larger than `SKILL_MANIFEST_MAX_BYTES`. The declared `content-length` is
@@ -2919,6 +3332,23 @@ export declare const referenceAttachmentToPdfCanvasContent: (attachment: Attachm
2919
3332
  /** Name reserved for the hidden marker file used to create empty folders. */
2920
3333
  export declare const RESERVED_MARKER_NAME = ".dial_folder";
2921
3334
 
3335
+ /**
3336
+ * One reset time, already parsed and formatted by the host. Declared
3337
+ * structurally here so this library never imports an application type; the
3338
+ * host passes a value that satisfies this shape (e.g. `apps/chat`'s own
3339
+ * `ResetTimeDisplay`).
3340
+ */
3341
+ export declare interface ResetTimeDisplay {
3342
+ /** Exclusive end of the period as an epoch ms value, for the host's boundary scheduling. */
3343
+ resetsAtMs: number;
3344
+ /** Machine-readable instant for a `<time dateTime>` attribute. */
3345
+ isoValue: string;
3346
+ /** Visible reset line. */
3347
+ label: string;
3348
+ /** Accessible expansion of the reset line. */
3349
+ ariaLabel: string;
3350
+ }
3351
+
2922
3352
  /**
2923
3353
  * Resolves the primary action for a catalog item.
2924
3354
  *
@@ -2938,7 +3368,8 @@ export declare const resolveCatalogPrimaryAction: (item: CatalogItem, fetchPromp
2938
3368
  /** Resolves a syntax-highlighted code canvas content payload from a DisplayAttachment, or `null` if unavailable. */
2939
3369
  export declare const resolveCodeCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, language?: string) => Promise<CodeCanvasContent | ErrorCanvasContent | null>;
2940
3370
 
2941
- export declare const resolveDeploymentFolder: (deployment: Pick<DeploymentItemDto, "isMy" | "sharedWithMe" | "applicationFolder">, labels: DeploymentFolderLabels) => string[];
3371
+ /** Resolves a deployment's display folder, including organization applications without a folder path. */
3372
+ export declare const resolveDeploymentFolder: (deployment: Pick<DeploymentItemDto, "isMy" | "sharedWithMe" | "applicationFolder"> & Partial<Pick<DeploymentItemDto, "type">>, labels: DeploymentFolderLabels) => string[];
2942
3373
 
2943
3374
  /**
2944
3375
  * Resolves a DialFile to the bucket-relative API path used by files BFF endpoints.
@@ -2956,6 +3387,9 @@ export declare const resolveDialFileBucketAndPath: (fileId: string) => {
2956
3387
  path: string;
2957
3388
  } | undefined;
2958
3389
 
3390
+ /** A callback that resolves a display name from a localized-text value. */
3391
+ declare type ResolveDisplayName = (name: string | Record<string, string> | undefined | null, locale: string) => string;
3392
+
2959
3393
  /** Resolves a DIAL Core file id to a downloadable URL. Host-owned — encodes the app's own file-download endpoint. */
2960
3394
  export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
2961
3395
 
@@ -2974,14 +3408,35 @@ export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
2974
3408
  */
2975
3409
  export declare const resolveExternalSourceContentType: (contentType: string, url: string) => string;
2976
3410
 
3411
+ /**
3412
+ * Builds the grouped payload for an application-scoped visualizer from the
3413
+ * attachments its entry claims, reporting which of them `resolveAbsoluteUrl`
3414
+ * could produce a URL for. Unlike the single-attachment resolver this fetches
3415
+ * nothing: the grouped protocol hands the visualizer URLs and lets it read
3416
+ * them itself, so the URLs must be absolute — a host-relative path would
3417
+ * resolve against the iframe's own origin. Producing one is host knowledge,
3418
+ * which is why it arrives as a callback rather than being built here.
3419
+ */
3420
+ export declare const resolveGroupedVisualizerCanvasContent: (attachments: DisplayAttachment[], resolveAbsoluteUrl: (attachment: DisplayAttachment) => string | undefined, entry: ApplicationVisualizer, themeId: string) => GroupedVisualizerResolution;
3421
+
2977
3422
  /**
2978
3423
  * Resolves an HTML canvas content payload from a DisplayAttachment.
2979
- * Fetches and inlines the HTML as `srcdoc` when the attachment has a download URL or inline data.
2980
- * Returns `null` if no source is available, or an `ErrorCanvasContent` on fetch failure.
2981
- * Rejects `srcdoc` payloads larger than 1 MiB to prevent browser truncation.
3424
+ * When the attachment has a download URL, that URL is the primary render
3425
+ * target so the preview loads via `src` and gets its own response-level CSP
3426
+ * instead of inheriting the host document's — no HTML text is fetched up
3427
+ * front; `resolveSourceText` fetches it lazily, only when the "View source"
3428
+ * toggle is used, and rejects if that fetch fails. `isSameOriginUrl` reflects
3429
+ * a real comparison against the embedding document's own origin.
3430
+ * With no download URL (local file or inline data), falls back to `srcdoc`
3431
+ * only, rejecting payloads larger than 1 MiB to prevent browser truncation.
3432
+ * Returns `null` if no source is available, or an `ErrorCanvasContent` when
3433
+ * that fallback fetch fails.
2982
3434
  */
2983
3435
  export declare const resolveHtmlCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<HtmlCanvasContent | ErrorCanvasContent | null>;
2984
3436
 
3437
+ /** A callback that resolves an icon URL from a deployment's raw `iconUrl` field. */
3438
+ declare type ResolveIconUrl = (iconUrl: string | undefined) => string | undefined;
3439
+
2985
3440
  /**
2986
3441
  * Resolves an image canvas content payload from a DisplayAttachment without
2987
3442
  * fetching — returns a local blob URL or the BFF download URL directly so the
@@ -3035,6 +3490,9 @@ export declare const resolvePdfCanvasContent: (attachment: DisplayAttachment, re
3035
3490
  */
3036
3491
  export declare const resolveRelativeDialFilePath: (pathOrFileId: string, bucket: string) => string;
3037
3492
 
3493
+ /** Returns the section whose root label is the first segment of `virtualPath`, or `undefined` when none matches. */
3494
+ export declare const resolveSectionByPath: <TSection extends DialFileManagerSection>(virtualPath: string, sections: readonly TSection[]) => TSection | undefined;
3495
+
3038
3496
  /**
3039
3497
  * Converts an opaque file-listing id into the path expected by the single-file
3040
3498
  * download endpoint. Core may prefix listing paths with the skill path and its
@@ -3054,6 +3512,16 @@ export declare const resolveSkillManifestFileId: (files: SkillMetadataItemDto[],
3054
3512
  /** Resolves a plain-text canvas content payload from a DisplayAttachment, or `null` if unavailable. */
3055
3513
  export declare const resolveTextCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<PlainTextCanvasContent | ErrorCanvasContent | null>;
3056
3514
 
3515
+ /**
3516
+ * Resolves which credentials level a toolset's login applies to, per DIAL
3517
+ * Core's public/private toolset convention: a `public`-bucket toolset is
3518
+ * shared credentials-wise at `User` level, while a private/workspace toolset
3519
+ * is scoped at `Global` level. Every surface that drives a toolset login
3520
+ * (the sign-in-interrupt dialog, the QuickApps editor iframe bridge,
3521
+ * `useToolsetLogin`) must resolve the level this way rather than assuming one.
3522
+ */
3523
+ export declare const resolveToolsetCredentialsLevel: (toolsetId: string) => ToolsetCredentialsLevel.User | ToolsetCredentialsLevel.Global;
3524
+
3057
3525
  /**
3058
3526
  * Fetches the attachment payload and builds a `VisualizerCanvasContent` for the
3059
3527
  * given registry entry and theme. Returns `null` when the payload cannot be
@@ -3107,6 +3575,114 @@ export declare type ScheduledTaskDtoMappingResult = {
3107
3575
  reason: UnsupportedTriggerReason;
3108
3576
  };
3109
3577
 
3578
+ /** A checked request preparation result that never serializes invalid values. */
3579
+ export declare type ScheduledTaskPreparationResult<TBody> = {
3580
+ ok: true;
3581
+ body: TBody;
3582
+ } | {
3583
+ ok: false;
3584
+ errors: ScheduledTaskValidationErrors;
3585
+ };
3586
+
3587
+ export declare interface ScheduledTaskRunsListRequest {
3588
+ scheduleId: string;
3589
+ limit?: number;
3590
+ offset?: number;
3591
+ signal?: AbortSignal;
3592
+ }
3593
+
3594
+ export declare interface ScheduledTasksApiClient {
3595
+ listScheduledTasks: (request?: ScheduledTasksListRequest) => Promise<ListScheduledTasksResponseDto>;
3596
+ listScheduledTaskRuns: (request: ScheduledTaskRunsListRequest) => Promise<ListScheduledTaskRunsResponseDto>;
3597
+ createScheduledTask: (body: CreateScheduledTaskBodyDto) => Promise<CreatedScheduledTaskDto>;
3598
+ getScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3599
+ updateScheduledTask: (scheduleId: string, body: UpdateScheduledTaskBodyDto) => Promise<UpdatedScheduledTaskDto>;
3600
+ pauseScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3601
+ resumeScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3602
+ deleteScheduledTask: (scheduleId: string) => Promise<void>;
3603
+ }
3604
+
3605
+ /** Narrow configured generated-client surface required by scheduler hooks. */
3606
+ export declare interface ScheduledTasksConfiguredClient {
3607
+ listScheduledTasks: (request: {
3608
+ limit?: number;
3609
+ offset?: number;
3610
+ search?: string;
3611
+ sort?: ListScheduledTasksSortEnum;
3612
+ }, options?: RequestInit) => Promise<ListScheduledTasksResponseDto>;
3613
+ listScheduledTaskRuns: (request: {
3614
+ scheduleId: string;
3615
+ limit?: number;
3616
+ offset?: number;
3617
+ }, options?: RequestInit) => Promise<ListScheduledTaskRunsResponseDto>;
3618
+ createScheduledTask: (request: {
3619
+ createScheduledTaskBodyDto: CreateScheduledTaskBodyDto;
3620
+ }) => Promise<CreatedScheduledTaskDto>;
3621
+ getScheduledTask: (request: {
3622
+ scheduleId: string;
3623
+ }) => Promise<ScheduledTaskDto>;
3624
+ updateScheduledTask: (request: {
3625
+ scheduleId: string;
3626
+ updateScheduledTaskBodyDto: UpdateScheduledTaskBodyDto;
3627
+ }) => Promise<UpdatedScheduledTaskDto>;
3628
+ pauseScheduledTask: (request: {
3629
+ scheduleId: string;
3630
+ }) => Promise<ScheduledTaskDto>;
3631
+ resumeScheduledTask: (request: {
3632
+ scheduleId: string;
3633
+ }) => Promise<ScheduledTaskDto>;
3634
+ deleteScheduledTask: (request: {
3635
+ scheduleId: string;
3636
+ }) => Promise<void>;
3637
+ }
3638
+
3639
+ /** App-agnostic request options accepted by the scheduler facade. */
3640
+ export declare interface ScheduledTasksListRequest {
3641
+ limit?: number;
3642
+ offset?: number;
3643
+ search?: string;
3644
+ sort?: ListScheduledTasksSortEnum;
3645
+ signal?: AbortSignal;
3646
+ }
3647
+
3648
+ export declare interface ScheduledTaskTriggerDescription {
3649
+ kind: ScheduledTaskTriggerDescriptionKind;
3650
+ time?: string;
3651
+ dayOfWeek?: string;
3652
+ dayOfMonth?: string;
3653
+ intervalMinutes?: number;
3654
+ date?: Date;
3655
+ expression?: string;
3656
+ sourceTimezone: 'utc';
3657
+ }
3658
+
3659
+ /** Display categories are independent of task editability. */
3660
+ export declare enum ScheduledTaskTriggerDescriptionKind {
3661
+ OneTime = "oneTime",
3662
+ Hourly = "hourly",
3663
+ EveryNMinutes = "everyNMinutes",
3664
+ Daily = "daily",
3665
+ Weekly = "weekly",
3666
+ Monthly = "monthly",
3667
+ Custom = "custom",
3668
+ Invalid = "invalid"
3669
+ }
3670
+
3671
+ export declare interface ScheduledTaskTriggerDescriptionOptions {
3672
+ /** Display timezone; defaults to UTC for backwards compatibility. */
3673
+ timeZone?: string;
3674
+ /** Date whose timezone offset is used. Defaults to now (the existing UTC-storage policy). */
3675
+ referenceDate?: Date;
3676
+ }
3677
+
3678
+ /**
3679
+ * Picks the auth-status field matching one credentials level out of a
3680
+ * toolset's `authSettings` — DIAL Core reports `userLevelAuthStatus` and
3681
+ * `globalAuthStatus` as independent fields rather than one status keyed by
3682
+ * level.
3683
+ */
3684
+ export declare const selectToolsetAuthStatus: (authSettings: Pick<DialToolsetAuthSettingsDto, "userLevelAuthStatus" | "globalAuthStatus"> | undefined, credentialsLevel: ToolsetCredentialsLevel) => string | undefined;
3685
+
3110
3686
  /** Serializes a prompt export envelope into a pretty-printed JSON blob. */
3111
3687
  export declare const serializePromptExport: (envelope: PromptExportFormat) => Blob;
3112
3688
 
@@ -3158,6 +3734,9 @@ export declare const SKILL_MANIFEST_FILE = "SKILL.md";
3158
3734
  */
3159
3735
  export declare const SKILL_MANIFEST_MAX_BYTES: number;
3160
3736
 
3737
+ /** Length limit of each skill editor text field. */
3738
+ export declare const SKILL_TEXT_FIELD_MAX_LENGTHS: Record<SkillTextField, number>;
3739
+
3161
3740
  /**
3162
3741
  * Client-side mirror of the backend's default `SKILL_UPLOAD_MAX_FILES`
3163
3742
  * (`apps/chat-api/src/config/environment.config.ts`), used only for
@@ -3182,6 +3761,28 @@ export declare interface SkillAboutDetails {
3182
3761
  skillPrompt?: string;
3183
3762
  }
3184
3763
 
3764
+ /** Semantic classification of an import request failure. */
3765
+ export declare enum SkillArchiveImportErrorKind {
3766
+ Validation = "validation",
3767
+ Collision = "collision",
3768
+ RateLimited = "rateLimited",
3769
+ ServiceUnavailable = "serviceUnavailable",
3770
+ Generic = "generic"
3771
+ }
3772
+
3773
+ /** Phase of a skill-archive import, driving the host's loading/success/error presentation. */
3774
+ export declare enum SkillArchiveImportStatus {
3775
+ Idle = "idle",
3776
+ Uploading = "uploading",
3777
+ Success = "success",
3778
+ Error = "error"
3779
+ }
3780
+
3781
+ /** Reason a selected/dropped file was rejected before any request was made. */
3782
+ export declare enum SkillArchiveSelectionRejectionReason {
3783
+ UnsupportedFilename = "unsupportedFilename"
3784
+ }
3785
+
3185
3786
  /** Injected API port for skill detail fetching. Mirrors exact server-api wrapper signatures. */
3186
3787
  export declare interface SkillDetailsApi {
3187
3788
  /** Downloads a raw skill file, returning the raw fetch `Response`. */
@@ -3195,6 +3796,12 @@ export declare interface SkillDetailsApi {
3195
3796
  limit?: number;
3196
3797
  recursive?: boolean;
3197
3798
  }, signal?: AbortSignal): Promise<SkillFileListResponseDto>;
3799
+ /**
3800
+ * Fetches a single skill's own authoritative metadata (`author`,
3801
+ * `updatedAt`, and the rest of `SkillMetadataItemDto`) — not the catalog
3802
+ * listing entry, which may be sparse for a shared skill.
3803
+ */
3804
+ getSkillMetadata(bucket: string, path: string, signal?: AbortSignal): Promise<SkillMetadataItemDto>;
3198
3805
  }
3199
3806
 
3200
3807
  /** Already-configured DIAL Core download operations `useSkillEditorLoad` needs. */
@@ -3238,6 +3845,14 @@ export declare interface SkillEditorSubmitClient {
3238
3845
  export declare interface SkillEditorSubmitMessages {
3239
3846
  /** Shown when a required field is empty. */
3240
3847
  required: string;
3848
+ /** Shown when a name, description or instructions value exceeds its length limit, given that limit. */
3849
+ tooLong: (maxLength: number) => string;
3850
+ /**
3851
+ * Shown when the Instructions value opens with its own YAML frontmatter
3852
+ * block — pasting a whole `SKILL.md` in there would otherwise produce a
3853
+ * manifest with two frontmatter blocks.
3854
+ */
3855
+ instructionsFrontmatter: string;
3241
3856
  /** Shown when the normalized skill name fails DIAL's naming rules. */
3242
3857
  nameInvalid: string;
3243
3858
  /** Shown when the skill name already exists (409), or defensively on an unreachable create-mode 412. */
@@ -3438,12 +4053,37 @@ export declare enum SkillSource {
3438
4053
  Public = "public"
3439
4054
  }
3440
4055
 
4056
+ /** Skill editor text fields with a length limit. */
4057
+ export declare type SkillTextField = 'name' | 'description' | 'instructions';
4058
+
3441
4059
  /** Splits a file name into its base and extension, using only the last dot. */
3442
4060
  export declare const splitFileNameExtension: (fileName: string) => {
3443
4061
  base: string;
3444
4062
  extension: string;
3445
4063
  };
3446
4064
 
4065
+ /**
4066
+ * Answers one question: would appending this text after the fence that
4067
+ * `buildSkillManifest` writes produce a *second* frontmatter block?
4068
+ *
4069
+ * That happens when the text's first non-blank line is a bare `---` and some
4070
+ * later line is a bare `---` too — the exact shape of a `SKILL.md` pasted
4071
+ * wholesale into the editor's Instructions field.
4072
+ *
4073
+ * Detection is deliberately structural rather than YAML-based: a pasted block
4074
+ * whose fenced content fails to parse corrupts the stored manifest
4075
+ * identically (and renders as a setext `h2` in the Catalog's Details tab just
4076
+ * the same), so requiring parseable YAML here would let the worst cases
4077
+ * through. Keeping `parseYaml` out also makes this cheap enough to run on
4078
+ * every keystroke.
4079
+ *
4080
+ * A single unclosed fence returns `false`: with no closing fence there is no
4081
+ * second block, matching `FRONTMATTER_PATTERN`'s own requirement. A `---`
4082
+ * appearing later in the body (a horizontal rule, a setext underline) is
4083
+ * likewise not a frontmatter block.
4084
+ */
4085
+ export declare const startsWithFrontmatterBlock: (text: string) => boolean;
4086
+
3447
4087
  /** Options accepted by {@link ConversationStreamTransport.streamCompletion}. */
3448
4088
  export declare interface StreamCompletionOptions {
3449
4089
  onChunk: (chunk: StreamChunk) => void;
@@ -3452,6 +4092,29 @@ export declare interface StreamCompletionOptions {
3452
4092
  signal: AbortSignal;
3453
4093
  }
3454
4094
 
4095
+ /**
4096
+ * Reported through `onError` when the network connection carrying a
4097
+ * completion stream is lost (a rejected `fetch`, or a read that fails after a
4098
+ * 2xx response) or goes silent past the idle timeout — what a laptop sleep or
4099
+ * a phone lock mid-generation produces. The backend-owned generation may
4100
+ * still be running, so the caller can recover it rather than treat the
4101
+ * response as failed. `cause` holds the original error, when there is one.
4102
+ */
4103
+ export declare class StreamInterruptedError extends Error {
4104
+ constructor(cause?: unknown);
4105
+ }
4106
+
4107
+ /**
4108
+ * Reported through `onError` when DIAL Core itself signals a failure with an
4109
+ * in-band `{ error: { message } }` SSE chunk. Its `message` is upstream text
4110
+ * intended for the user, unlike a transport failure (failed `fetch`, non-OK
4111
+ * status, broken stream), whose message is technical detail. A custom
4112
+ * transport raises this for any user-facing upstream error text.
4113
+ */
4114
+ export declare class StreamUpstreamError extends Error {
4115
+ constructor(message: string);
4116
+ }
4117
+
3455
4118
  /** Strips leading and trailing slashes from a path segment. */
3456
4119
  export declare const stripSurroundingSlashes: (path: string) => string;
3457
4120
 
@@ -3769,6 +4432,13 @@ export declare const toPublishEntityType: (type: CatalogEntityType) => CatalogPu
3769
4432
  */
3770
4433
  export declare const toPublishRuleDto: (rule: PublicationRule) => PublishRuleDto;
3771
4434
 
4435
+ /**
4436
+ * Returns a renderable `Stage` for one raw payload: `index` defaults to `0`,
4437
+ * `name` to `''`, an unrecognized `status` to `null` (still running), and
4438
+ * `content`/`tag`/`attachments` are passed through when present.
4439
+ */
4440
+ export declare const toStage: (stage: RawStage) => Stage;
4441
+
3772
4442
  /** Request shape the host's selected-deployment recognition call accepts. */
3773
4443
  export declare interface TranscribeWithDeploymentParams {
3774
4444
  audioUrl: string;
@@ -3777,6 +4447,12 @@ export declare interface TranscribeWithDeploymentParams {
3777
4447
  signal: AbortSignal;
3778
4448
  }
3779
4449
 
4450
+ /** A translate function compatible with i18next's `TFunction`. */
4451
+ declare type Translate = (key: string, options?: Record<string, unknown>) => string;
4452
+
4453
+ /** A translate function compatible with i18next's `TFunction`. */
4454
+ declare type Translate_2 = (key: string, options?: Record<string, unknown>) => string;
4455
+
3780
4456
  export declare const trimFileNameToByteLimit: (name: string, limit?: number) => string;
3781
4457
 
3782
4458
  /** An error thrown to indicate the caller is unauthenticated. */
@@ -3785,6 +4461,9 @@ export declare interface UnauthorizedErrorLike extends Error {
3785
4461
  readonly url: string;
3786
4462
  }
3787
4463
 
4464
+ /** Returns a new set containing every path from each of `pathSets`. */
4465
+ export declare const unionPathSets: (pathSets: readonly ReadonlySet<string>[]) => Set<string>;
4466
+
3788
4467
  /** A skill archive unpacked into its manifest text and a relative-path → bytes map of every other entry. */
3789
4468
  export declare interface UnpackedSkillArchive {
3790
4469
  /** The root `SKILL.md` entry's decoded text content. */
@@ -3811,7 +4490,7 @@ export declare enum UnsupportedTriggerReason {
3811
4490
  MissingRequiredFields = "missingRequiredFields"
3812
4491
  }
3813
4492
 
3814
- export declare const updateEntry: (prev: FileUploadBatchState | null, index: number, patch: FileUploadStatus | Partial<Pick<FileUploadEntry, "status" | "percent">>) => FileUploadBatchState | null;
4493
+ export declare const updateEntry: (prev: FileUploadBatchState | null, id: string, patch: FileUploadStatus | Partial<Pick<FileUploadEntry, "status" | "percent">>) => FileUploadBatchState | null;
3815
4494
 
3816
4495
  /** Max number of files uploaded concurrently within a single upload batch. */
3817
4496
  export declare const UPLOAD_CONCURRENCY = 3;
@@ -3835,6 +4514,66 @@ export declare interface UploadFileWithProgressOptions {
3835
4514
  /** Upload mode passed to `FilesApi.uploadFile`: overwrite an existing file or fail if it already exists. */
3836
4515
  export declare type UploadMode = 'overwrite' | 'create-only';
3837
4516
 
4517
+ /**
4518
+ * i18n key strings that the consuming app's translation bundle must define for
4519
+ * `mapUsageDataToDashboard` to produce correctly translated strings. The
4520
+ * values are the default key paths used by AI DIAL Chat.
4521
+ */
4522
+ export declare const USAGE_DATA_I18N_KEYS: {
4523
+ /** Title for the current-UTC-day card (e.g. `'Today'`). */
4524
+ readonly todayTitle: "usage.todayTitle";
4525
+ /** Accessible period description for the current-UTC-day card. */
4526
+ readonly todayPeriodDescription: "usage.todayPeriodDescription";
4527
+ /** Title for the current-UTC-week card (e.g. `'This week'`). */
4528
+ readonly thisWeekTitle: "usage.thisWeekTitle";
4529
+ /** Accessible period description for the current-UTC-week card. */
4530
+ readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
4531
+ /** Title for the current-UTC-month card (e.g. `'This month'`). */
4532
+ readonly thisMonthTitle: "usage.thisMonthTitle";
4533
+ /** Accessible period description for the current-UTC-month card. */
4534
+ readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
4535
+ /** Aria label when there is no limit. Receives `{ used: string }`. */
4536
+ readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
4537
+ /** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
4538
+ readonly progressAriaLabel: "usage.progressAriaLabel";
4539
+ };
4540
+
4541
+ /**
4542
+ * i18n key strings that the consuming app's translation bundle must define for
4543
+ * `mapUserUsageToModelLimits` and `mapOverallCostLimitsToPeriodStatuses` to produce
4544
+ * correctly translated strings. The values are the default key paths used by AI DIAL Chat.
4545
+ */
4546
+ export declare const USAGE_MODEL_LIMITS_I18N_KEYS: {
4547
+ /** Period label used in tooltip text. Receives no interpolation. */
4548
+ readonly todayPeriodDescription: "usage.todayPeriodDescription";
4549
+ /** Period label used in tooltip text. Receives no interpolation. */
4550
+ readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
4551
+ /** Period label used in tooltip text. Receives no interpolation. */
4552
+ readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
4553
+ /** Tooltip when the overall cost limit is running low. Receives `{ period: string }`. */
4554
+ readonly overallCostLimitRunningLowTooltip: "usage.overallCostLimitRunningLowTooltip";
4555
+ /** Tooltip when the overall cost limit is reached. Receives `{ period: string }`. */
4556
+ readonly overallCostLimitReachedTooltip: "usage.overallCostLimitReachedTooltip";
4557
+ /** Aria label for a metric cell with no data. */
4558
+ readonly unavailableLabel: "usage.unavailableLabel";
4559
+ /** Supporting label when a token limit follows the cost limit. */
4560
+ readonly followsCostLimitLabel: "usage.followsCostLimitLabel";
4561
+ /** Supporting label when there is no per-deployment token limit. */
4562
+ readonly noLimitLabel: "usage.noLimitLabel";
4563
+ /** Aria label when token usage has no limit but follows the cost limit. Receives `{ used: string }`. */
4564
+ readonly followsCostLimitAriaLabel: "usage.followsCostLimitAriaLabel";
4565
+ /** Aria label when there is no limit. Receives `{ used: string }`. */
4566
+ readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
4567
+ /** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
4568
+ readonly progressAriaLabel: "usage.progressAriaLabel";
4569
+ /** Label for the spent-cost cell. Receives `{ amount: string }`. */
4570
+ readonly spentLabel: "usage.spentLabel";
4571
+ /** Type caption for an application (agent) row. Receives no interpolation. */
4572
+ readonly applicationTypeLabel: "usage.applicationTypeLabel";
4573
+ /** Supporting label on an application row's spent cost. Receives no interpolation. */
4574
+ readonly includesCalledModelsLabel: "usage.includesCalledModelsLabel";
4575
+ };
4576
+
3838
4577
  /**
3839
4578
  * Synchronises the active conversation with the conversation list and returns
3840
4579
  * the panel-space id of the active conversation, or `undefined` when none is active.
@@ -3869,6 +4608,25 @@ export declare interface UseActiveConversationSyncParams {
3869
4608
  toPanelConversationId: (id: string) => string;
3870
4609
  }
3871
4610
 
4611
+ /** Loads fresh service statuses without coupling proactive credentials to a live completion. */
4612
+ export declare const useApplicationCredentials: ({ appId, externalServicesClient, offlineCredentialsClient, }: UseApplicationCredentialsParams) => {
4613
+ services: ApplicationExternalServiceDto[];
4614
+ isOfflineConnected: boolean;
4615
+ isLoading: boolean;
4616
+ hasError: boolean;
4617
+ refresh: () => Promise<void>;
4618
+ };
4619
+
4620
+ /** Configured operations for loading application credential metadata. */
4621
+ export declare interface UseApplicationCredentialsParams {
4622
+ /** Application identifier passed through to the configured client. */
4623
+ appId: string;
4624
+ /** Host-configured external-services API. */
4625
+ externalServicesClient: Pick<ExternalServicesApi, 'listExternalServices'>;
4626
+ /** Host-configured offline-credentials API. */
4627
+ offlineCredentialsClient: Pick<OfflineCredentialsApi, 'getOfflineCredentials'>;
4628
+ }
4629
+
3872
4630
  /**
3873
4631
  * Generic single-slot pending / loading / error state machine for
3874
4632
  * confirmation dialogs that trigger an async operation.
@@ -3932,12 +4690,14 @@ export declare interface UseAttachmentUploadResult {
3932
4690
  * MIME types, debouncing a burst of rejected files into a single
3933
4691
  * `onValidationError` call rather than firing one per file.
3934
4692
  */
3935
- export declare const useAttachmentValidation: ({ allowedMimeTypes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
4693
+ export declare const useAttachmentValidation: ({ allowedMimeTypes, maxFileSizeBytes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
3936
4694
 
3937
4695
  /** Parameters for {@link useAttachmentValidation}. */
3938
4696
  export declare interface UseAttachmentValidationParams {
3939
4697
  /** Resolved MIME types currently allowed for attachments. */
3940
4698
  allowedMimeTypes: string[];
4699
+ /** Maximum attachment file size, in bytes. When omitted, no file is rejected for size. */
4700
+ maxFileSizeBytes?: number;
3941
4701
  /** Called with a structured event when a rejected attachment is reported, at most once per debounce window. */
3942
4702
  onValidationError?: (event: AttachmentValidationErrorEvent) => void;
3943
4703
  /** Debounce window, in ms, before firing `onValidationError` for a rejected file. Defaults to `100`. */
@@ -4267,7 +5027,8 @@ export declare interface UseConversationHandlersResult {
4267
5027
  * `.dial`/`.zip`, v5 envelope, old- or new-chat origin) once per file, then
4268
5028
  * re-uploads any archive attachments to `uploads/<YYYY-MM>/` —
4269
5029
  * disambiguating a name collision with a ` (n)` suffix instead of rejecting
4270
- * it — rewrites attachment references (and renamed titles), regenerates each
5030
+ * it — rewrites attachment references (and renamed titles), drops any
5031
+ * reference still pointing into another user's bucket, regenerates each
4271
5032
  * conversation's id/path with a fresh UUID (collision-free save, no replace
4272
5033
  * dialog), and persists every conversation through the injected
4273
5034
  * `conversationsApi`. One job per imported file, not per conversation.
@@ -4338,9 +5099,8 @@ export declare interface UseConversationLookupMapsParams {
4338
5099
  * panel's item contract. All app-specific concerns (icon URL resolution,
4339
5100
  * route generation, id normalisation) are injected via resolver callbacks.
4340
5101
  */
4341
- export declare const useConversationPanelItems: ({ items, deployments, isDeploymentsLoading, toPanelConversationId, resolveIconUrl, resolveIconTooltip, resolveHref, resolveTaskBadge, }: UseConversationPanelItemsParams) => {
4342
- showTaskBadge?: boolean | undefined;
4343
- taskBadgeLabel?: string | undefined;
5102
+ export declare const useConversationPanelItems: ({ items, deployments, isDeploymentsLoading, toPanelConversationId, resolveIconUrl, resolveIconTooltip, resolveHref, resolveTaskPresentation, }: UseConversationPanelItemsParams) => {
5103
+ leadingIcon?: ReactNode;
4344
5104
  isUnread?: boolean | undefined;
4345
5105
  id: string;
4346
5106
  title: string;
@@ -4376,11 +5136,12 @@ export declare interface UseConversationPanelItemsResolvers {
4376
5136
  /** Resolves the href to navigate to when the conversation row is clicked. */
4377
5137
  resolveHref: (panelConversationId: string) => string;
4378
5138
  /**
4379
- * Returns badge metadata for a scheduled-task conversation, or `undefined`
4380
- * when the item should not show a task badge.
5139
+ * Returns the row presentation for a scheduled-task conversation — a
5140
+ * host-rendered leading icon that replaces the deployment avatar, and the
5141
+ * unread flag — or `undefined` for an ordinary conversation.
4381
5142
  */
4382
- resolveTaskBadge?: (item: ConversationListItemDto) => {
4383
- label: string;
5143
+ resolveTaskPresentation?: (item: ConversationListItemDto) => {
5144
+ leadingIcon?: ReactNode;
4384
5145
  isUnread: boolean;
4385
5146
  } | undefined;
4386
5147
  }
@@ -4447,7 +5208,7 @@ export declare interface UseConversationSourcesResult {
4447
5208
  uploaded: DisplayAttachment[];
4448
5209
  /** Deduplicated attachments the assistant generated across the conversation. */
4449
5210
  generated: DisplayAttachment[];
4450
- /** Quotation sources referenced by assistant messages, deduplicated by URL. */
5211
+ /** Quotation sources referenced by assistant messages, deduplicated by URL; PDF sources are qualified with `#page=N`. */
4451
5212
  sources: QuotationSource[];
4452
5213
  }
4453
5214
 
@@ -4459,7 +5220,7 @@ export declare interface UseConversationSourcesResult {
4459
5220
  * `transport`/`generation`/`channel`/`overlay` capabilities rather than any
4460
5221
  * app context or `server-api` import.
4461
5222
  */
4462
- export declare const useConversationStream: ({ conversationId, state: { setConversation, conversationRef }, transport, generation: { startGeneration, completeGeneration }, channel, overlay, onStopError, generationConflictMessage, }: UseConversationStreamParams) => UseConversationStreamResult;
5223
+ export declare const useConversationStream: ({ conversationId, state: { setConversation, conversationRef }, transport, generation: { startGeneration, completeGeneration }, channel, overlay, onStopError, generationConflictMessage, generationPersistenceErrorMessage, onStreamError, }: UseConversationStreamParams) => UseConversationStreamResult;
4463
5224
 
4464
5225
  /** Parameters for {@link useConversationStream}. */
4465
5226
  export declare interface UseConversationStreamParams {
@@ -4477,6 +5238,15 @@ export declare interface UseConversationStreamParams {
4477
5238
  * {@link DEFAULT_GENERATION_CONFLICT_MESSAGE}.
4478
5239
  */
4479
5240
  generationConflictMessage?: string;
5241
+ /** Host-translated warning shown when the received answer could not be saved. */
5242
+ generationPersistenceErrorMessage?: string;
5243
+ /**
5244
+ * Receives the original error of every failed stream. The hook shows only
5245
+ * host-supplied or upstream-supplied text on the message bubble and hides
5246
+ * transport detail (e.g. `Failed to fetch`), so this is where the host can
5247
+ * still log or report the raw error.
5248
+ */
5249
+ onStreamError?: (error: Error) => void;
4480
5250
  }
4481
5251
 
4482
5252
  /** Return value of {@link useConversationStream}. */
@@ -4502,7 +5272,7 @@ export declare interface UseConversationStreamResult {
4502
5272
  * - shared: files shared with the user via `DialFilesApi.listSharedFiles`
4503
5273
  * - organization: public bucket via `DialFilesApi.listPublicFiles`
4504
5274
  */
4505
- export declare const useDialFileListing: ({ filesApi, bucket, rootLabel, activeTab, onNotification, }: UseDialFileListingOptions) => UseDialFileListingResult;
5275
+ export declare const useDialFileListing: ({ filesApi, bucket, rootLabel, activeTab, onNotification, isActive, sessionKey, }: UseDialFileListingOptions) => UseDialFileListingResult;
4506
5276
 
4507
5277
  /** Options accepted by `useDialFileListing`. */
4508
5278
  export declare interface UseDialFileListingOptions {
@@ -4516,6 +5286,10 @@ export declare interface UseDialFileListingOptions {
4516
5286
  activeTab: DialFileManagerTabs;
4517
5287
  /** Called with a structured event when a folder-load operation fails. */
4518
5288
  onNotification?: (notification: FileManagerNotification) => void;
5289
+ /** When false, the hook issues no `DialFilesApi` call and reports `isLoading: false`. Defaults to `true`. */
5290
+ isActive?: boolean;
5291
+ /** Changing this value resets cache and navigation exactly like an `activeTab` change. Defaults to `undefined`. */
5292
+ sessionKey?: string;
4519
5293
  }
4520
5294
 
4521
5295
  /** Values returned by `useDialFileListing`. */
@@ -4572,7 +5346,7 @@ export declare interface UseDialFileListingResult {
4572
5346
  * every translated string reaches it through `labels`,
4573
5347
  * `disabledNewButtonTooltip`, and `buildValidationErrorMessage`.
4574
5348
  */
4575
- export declare const useDialFileManager: ({ filesApi, bucket, rootLabel, activeTab, onNotification, onOperationSuccess, forbiddenSymbolsRegExp, variant, actionProfile, labels, locale, disabledNewButtonTooltip, downloadDestination, buildValidationErrorMessage, }: UseDialFileManagerOptions) => UseDialFileManagerResult;
5349
+ export declare const useDialFileManager: ({ filesApi, bucket, rootLabel, activeTab, isActive, sessionKey, onNotification, onOperationSuccess, forbiddenSymbolsRegExp, variant, actionProfile, labels, locale, disabledNewButtonTooltip, downloadDestination, buildValidationErrorMessage, }: UseDialFileManagerOptions) => UseDialFileManagerResult;
4576
5350
 
4577
5351
  export declare interface UseDialFileManagerOptions {
4578
5352
  /** Injected operation port used for every file-manager network call. */
@@ -4583,6 +5357,10 @@ export declare interface UseDialFileManagerOptions {
4583
5357
  rootLabel?: string;
4584
5358
  /** Active tab — drives listing source and per-tab options. Defaults to MyFiles. */
4585
5359
  activeTab?: DialFileManagerTabs;
5360
+ /** When false, the listing issues no `DialFilesApi` call and reports `isLoading: false`. Defaults to `true`. */
5361
+ isActive?: boolean;
5362
+ /** Changing this value resets cache and navigation exactly like an `activeTab` change. Defaults to `undefined`. */
5363
+ sessionKey?: string;
4586
5364
  /** Called when a file-manager action should surface a toast notification. */
4587
5365
  onNotification?: (notification: FileManagerNotification) => void;
4588
5366
  /** Called when a mutation succeeds, instead of invoking an application notification service directly. */
@@ -4637,7 +5415,7 @@ export declare interface UseDialFileManagerResult {
4637
5415
  onSearchFiles: (folder: string, query: string) => void;
4638
5416
  /** Search: true while a search request is in flight. */
4639
5417
  isSearching: boolean;
4640
- /** Search: flat list of matching files, or null when search is not active. */
5418
+ /** Search: flat, unfiltered recursive listing of the current folder, or null when search is not active. */
4641
5419
  searchResults: DialFile[] | null;
4642
5420
  /** Search: clears results and exits search mode. */
4643
5421
  clearSearchResults: () => void;
@@ -4661,7 +5439,9 @@ export declare interface UseDialFileManagerResult {
4661
5439
  uploadBatchState: FileUploadBatchState | null;
4662
5440
  /** Upload: abort all in-flight and queued uploads. */
4663
5441
  cancelUpload: () => void;
4664
- /** Upload: dismiss the progress modal after the batch has settled. */
5442
+ /** Upload: abort one queued or in-flight upload by its entry id. */
5443
+ cancelUploadFile: (id: string) => void;
5444
+ /** Upload: empty the upload queue. */
4665
5445
  clearUploadBatch: () => void;
4666
5446
  /** Folder creation: called when user confirms a new folder name. */
4667
5447
  onCreateFolder: (file: DialUploadFileItem, folderPath: string, fileId: string) => Promise<void>;
@@ -4728,7 +5508,7 @@ export declare interface UseDialFileManagerResult {
4728
5508
  /**
4729
5509
  * True while any mutating file-manager operation is in flight: the OR of
4730
5510
  * `isCreatingFolder`, `isDownloading`, `isDeleting`, `isRenaming`, `isCopying`,
4731
- * `isMoving`, `isUnsharing`, `isRemovingAccess`, and `uploadBatchState != null`.
5511
+ * `isMoving`, `isUnsharing`, `isRemovingAccess`, and any upload still queued or running.
4732
5512
  *
4733
5513
  * Deliberately excludes three flags, each already fully contained by its own
4734
5514
  * scoped loading UI:
@@ -4739,17 +5519,42 @@ export declare interface UseDialFileManagerResult {
4739
5519
  isAnyOperationInProgress: boolean;
4740
5520
  }
4741
5521
 
5522
+ /**
5523
+ * Composes one `useDialFileManager` per source tab (My files, Shared,
5524
+ * Organization) so the File storage page can offer an All tab without a
5525
+ * second copy of the per-tab rules. On a single tab it returns that section's
5526
+ * result; on All it merges the section roots into one tree and routes every
5527
+ * callback to the section owning the path. Section availability and names
5528
+ * arrive through `sections` — the hook reads no config, i18n, or context.
5529
+ */
5530
+ export declare const useDialFileManagerSections: ({ activeTab, sections, ...managerOptions }: UseDialFileManagerSectionsOptions) => UseDialFileManagerSectionsResult;
5531
+
5532
+ /** Options accepted by `useDialFileManagerSections`. */
5533
+ export declare interface UseDialFileManagerSectionsOptions extends Omit<UseDialFileManagerOptions, 'activeTab' | 'rootLabel' | 'isActive' | 'sessionKey'> {
5534
+ /** Active tab, including `DialFileManagerTabs.All`. */
5535
+ activeTab: DialFileManagerTabs;
5536
+ /** Enabled source tabs in display order, each with its translated top-level folder name. */
5537
+ sections: DialFileManagerSection[];
5538
+ }
5539
+
5540
+ /** Values returned by `useDialFileManagerSections`. */
5541
+ export declare interface UseDialFileManagerSectionsResult extends UseDialFileManagerResult {
5542
+ /** Source tab of the browsed folder; never `DialFileManagerTabs.All`. */
5543
+ sectionTab: DialFileManagerTabs;
5544
+ }
5545
+
4742
5546
  /**
4743
5547
  * Filters the file-manager's tab list down to the host's configured set and
4744
5548
  * resets `activeTab` to the highest-priority still-enabled tab when the
4745
5549
  * current one becomes excluded. A `fileManagerTabs` of `undefined` means no
4746
5550
  * restriction — every tab in `allTabs` stays enabled and no reset ever fires.
5551
+ * The All tab is kept only while at least two source tabs are enabled.
4747
5552
  */
4748
- export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: TabModel[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
5553
+ export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: FilterChipItem<DialFileManagerTabs>[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
4749
5554
 
4750
5555
  /** Values returned by `useDialFileManagerTabConfig`. */
4751
5556
  export declare interface UseDialFileManagerTabConfigResult {
4752
- tabs: ToolbarOptions['tabs'];
5557
+ tabs: FileTreeOptions['tabs'];
4753
5558
  }
4754
5559
 
4755
5560
  /**
@@ -4874,10 +5679,11 @@ export declare interface UseDialFileSharingResult {
4874
5679
 
4875
5680
  /**
4876
5681
  * Manages upload batches (single-file and ZIP-archive extraction), including
4877
- * concurrency-limited progress tracking and abort. Invalidates the shared
4878
- * listing cache for the destination folder through `invalidateFolders`/
4879
- * `bumpRetry` after a batch settles — it never holds its own copy of the
4880
- * cache.
5682
+ * concurrency-limited progress tracking and per-file abort. A batch started
5683
+ * while another is on screen is appended to it, and settled entries stay in
5684
+ * `uploadBatchState` until `clearUploadBatch`. Invalidates the shared listing
5685
+ * cache for the destination folder through `invalidateFolders`/`bumpRetry`
5686
+ * after a batch settles — it never holds its own copy of the cache.
4881
5687
  */
4882
5688
  export declare const useDialFileUploadBatch: ({ filesApi, bucket, rootLabel, activeTab, cache, sharedRootMetaRef, invalidateFolders, bumpRetry, onNotification, }: UseDialFileUploadBatchOptions) => UseDialFileUploadBatchResult;
4883
5689
 
@@ -4910,6 +5716,7 @@ export declare interface UseDialFileUploadBatchResult {
4910
5716
  onValidateUpload: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => Promise<FileUploadValidationResult>;
4911
5717
  uploadBatchState: FileUploadBatchState | null;
4912
5718
  cancelUpload: () => void;
5719
+ cancelUploadFile: (id: string) => void;
4913
5720
  clearUploadBatch: () => void;
4914
5721
  }
4915
5722
 
@@ -4938,6 +5745,64 @@ export declare interface UseFavoriteEntitiesStateResult {
4938
5745
  toggleFavorite: (id: string, isFavorite: boolean, entityType?: FavoriteEntityType) => Promise<void>;
4939
5746
  }
4940
5747
 
5748
+ /**
5749
+ * Composes the file-manager tab/listing hooks into the stateful part of an attachment picker:
5750
+ * active tab, selected paths, and hidden-path/MIME/size/folder row eligibility. Returns the
5751
+ * existing `useDialFileManager` controller unchanged and the selection/tab/eligibility fields
5752
+ * `FileManagerAttachModal` already consumes — it composes that modal, it does not replace it.
5753
+ * Final attachment filtering, deduplication, and count enforcement stay owned by the modal.
5754
+ */
5755
+ export declare const useFileAttachmentPicker: ({ fileManagerOptions, bucket, forbiddenSymbolsRegExp, tabLabels, allowedTabs, initialTab, allowedTypes, maxSelectableFileSize, canAttachFolders, }: UseFileAttachmentPickerOptions) => UseFileAttachmentPickerResult;
5756
+
5757
+ /** Options accepted by {@link useFileAttachmentPicker}. */
5758
+ export declare interface UseFileAttachmentPickerOptions {
5759
+ /**
5760
+ * Configured `useDialFileManager` options besides the values this hook derives:
5761
+ * `bucket`, `activeTab`, `rootLabel`, `variant`, and `forbiddenSymbolsRegExp`.
5762
+ */
5763
+ fileManagerOptions: Omit<UseDialFileManagerOptions, 'bucket' | 'activeTab' | 'rootLabel' | 'variant' | 'forbiddenSymbolsRegExp'>;
5764
+ /** DIAL Core bucket to browse. */
5765
+ bucket: string;
5766
+ /** Regexp of characters forbidden in file/folder names, forwarded to `useDialFileManager`. */
5767
+ forbiddenSymbolsRegExp?: RegExp;
5768
+ /** Host-translated label per tab; also supplies the active tab's root-folder label. */
5769
+ tabLabels: Record<DialFileManagerTabs, string>;
5770
+ /** Tab ids the host's configuration allows. `undefined` allows every tab. `all` is never offered. */
5771
+ allowedTabs?: string[];
5772
+ /** Initial active tab. Defaults to `DialFileManagerTabs.MyFiles`; `All` is treated as the default. */
5773
+ initialTab?: DialFileManagerTabs;
5774
+ /** MIME types eligible for selection/upload. Empty or absent allows every type. */
5775
+ allowedTypes?: string[];
5776
+ /** Files at or below this size (bytes) remain eligible; absent allows any size. */
5777
+ maxSelectableFileSize?: number;
5778
+ /** Whether folder rows are eligible for selection. Defaults to `false`. */
5779
+ canAttachFolders?: boolean;
5780
+ }
5781
+
5782
+ /** Result returned by {@link useFileAttachmentPicker}. */
5783
+ export declare interface UseFileAttachmentPickerResult {
5784
+ /** The composed file-manager controller; forward to `FileManagerAttachModal`'s `controller` prop. */
5785
+ controller: UseDialFileManagerResult;
5786
+ /** Active tab. */
5787
+ activeTab: DialFileManagerTabs;
5788
+ /** Tab list filtered to `allowedTabs`; forward to `FileManagerAttachModal`'s `tabs` prop. */
5789
+ tabs: FileTreeOptions['tabs'];
5790
+ /** Switches the active tab and clears the current selection. */
5791
+ onTabChange: (tab: DialFileManagerTabs) => void;
5792
+ /** Currently selected paths. */
5793
+ selectedPaths: Set<string>;
5794
+ /** Replaces the selection with a defensive copy of the given set. */
5795
+ onSelectedPathsChange: (paths: Set<string>) => void;
5796
+ /** Row eligibility predicate; forward to `FileManagerAttachModal`'s `isRowSelectable` prop. */
5797
+ isRowSelectable: (node: {
5798
+ data?: FileManagerSelectableNode | null;
5799
+ }) => boolean;
5800
+ /** MIME eligibility predicate; forward to `FileManagerAttachModal`'s `isFileTypeAllowed` prop. */
5801
+ isFileTypeAllowed: (contentType: string) => boolean;
5802
+ /** Accepted upload MIME types; forward to `FileManagerAttachModal`'s `allowedFileTypes` prop. */
5803
+ allowedFileTypes: DialFileAcceptType[] | undefined;
5804
+ }
5805
+
4941
5806
  export { useGridEditingScroll }
4942
5807
 
4943
5808
  export { UseGridEditingScrollOptions }
@@ -4981,10 +5846,11 @@ export declare interface UseImportFilePickerResult {
4981
5846
  * Builds the `McpAppHostAdapter` a host injects into `@epam/ai-dial-mcp-apps`'s
4982
5847
  * hooks/components, wiring the library's host-context/tool-call/resource-fetch
4983
5848
  * contract to a configured `McpAppsApiClient` and this app's theme/locale/config
4984
- * values (`hostContextParams`, `sandboxUrl`) — this hook itself never reads app
4985
- * context, so a host builds those values wherever it already has them.
5849
+ * values (`hostContextParams`, `sandboxUrl`), plus the host's own identity
5850
+ * (`hostInfo`) — this hook itself never reads app context, so a host builds
5851
+ * those values wherever it already has them.
4986
5852
  */
4987
- export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams) => McpAppHostAdapter;
5853
+ export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams, hostInfo: Implementation) => McpAppHostAdapter;
4988
5854
 
4989
5855
  /**
4990
5856
  * Builds the `McpUiHostContext` delivered to a mounted MCP App during its
@@ -5014,6 +5880,35 @@ export declare const useMcpAppHostContext: (displayMode: "inline" | "fullscreen"
5014
5880
  */
5015
5881
  export declare const useMcpAppTools: (client: McpAppsApiClient, deployment: DeploymentItemDto | undefined, messages: Message[], toolsets: DialToolsetDto[]) => McpAppToolRef[];
5016
5882
 
5883
+ /**
5884
+ * Captures eligible message text and creates Reply files for an existing composer
5885
+ * attachment flow without acquiring host deployment, upload or localization knowledge.
5886
+ */
5887
+ export declare const useMessageSelectionReply: ({ conversationId, enabled, droppedFiles, onDroppedFilesConsumed, }: UseMessageSelectionReplyParams) => {
5888
+ contentRef: (node: HTMLDivElement | null) => (() => void) | undefined;
5889
+ actionRef: RefObject<HTMLDivElement | null>;
5890
+ selection: MessageSelectionReplySnapshot | null;
5891
+ onReply: () => void;
5892
+ dismiss: () => void;
5893
+ pendingFiles: File[];
5894
+ onFilesConsumed: () => void;
5895
+ focusRequestId: number | undefined;
5896
+ onAttachmentsChange: (attachments: Attachment[]) => void;
5897
+ addedRevision: number;
5898
+ };
5899
+
5900
+ /** Parameters accepted by {@link useMessageSelectionReply}. */
5901
+ export declare interface UseMessageSelectionReplyParams {
5902
+ /** Identifier used to discard selection and queued files after a scope change. */
5903
+ conversationId: string;
5904
+ /** Whether the host currently permits a Reply attachment. */
5905
+ enabled: boolean;
5906
+ /** Files from the host's ordinary page-drop queue. */
5907
+ droppedFiles: File[];
5908
+ /** Acknowledges the captured page-drop batch after the composer accepts it. */
5909
+ onDroppedFilesConsumed: () => void;
5910
+ }
5911
+
5017
5912
  /**
5018
5913
  * Completes an OAuth authorization-code flow from inside the callback popup:
5019
5914
  * reads and clears the redirect state written into this popup's own
@@ -5087,8 +5982,6 @@ export declare const useOpenMcpAppCanvas: (cache: McpAppResponseCache, hostAdapt
5087
5982
 
5088
5983
  /** User-facing text `useOpenMcpAppCanvas` needs but cannot resolve itself — a lib must not call `t()`. */
5089
5984
  export declare interface UseOpenMcpAppCanvasLabels {
5090
- /** Canvas panel title while an MCP App is loading or open. */
5091
- title: string;
5092
5985
  /** Error label shown when the resource fetch is forbidden (HTTP 403). */
5093
5986
  forbiddenErrorLabel: string;
5094
5987
  /** Error label shown for any other resource-load/tool-call failure. */
@@ -5226,6 +6119,56 @@ export declare interface UsePublishFoldersResult {
5226
6119
  hasPublishWriteAccess: (folderPath: string[]) => boolean;
5227
6120
  }
5228
6121
 
6122
+ /** Shared, cancellation-safe pagination and background refresh for one schedule's run history. */
6123
+ export declare const useScheduledTaskRuns: (client: ScheduledTasksApiClient, { scheduleId, enabled, pageSize, nextRunTime, }: UseScheduledTaskRunsOptions) => {
6124
+ items: ScheduledTaskRunDto[];
6125
+ isLoading: boolean;
6126
+ isLoadingMore: boolean;
6127
+ initialError: Error | null;
6128
+ loadMoreError: Error | null;
6129
+ hasMore: boolean;
6130
+ loadMore: () => void;
6131
+ retryLoadMore: () => void;
6132
+ refetch: () => void;
6133
+ };
6134
+
6135
+ export declare interface UseScheduledTaskRunsOptions {
6136
+ scheduleId: string;
6137
+ enabled?: boolean;
6138
+ pageSize?: number;
6139
+ /**
6140
+ * The task's next scheduled run time (ISO string), when known. Drives the
6141
+ * one-shot background refresh described on {@link useScheduledTaskRuns}.
6142
+ * The caller already holds the task DTO — this hook never fetches it.
6143
+ */
6144
+ nextRunTime?: string | null;
6145
+ }
6146
+
6147
+ /** Shared scheduler-list lifecycle with generation-scoped stale-response guards. */
6148
+ export declare const useScheduledTasks: (client: ScheduledTasksApiClient, { enabled, pageSize, debounceMs, initialSearch, initialSort, }?: UseScheduledTasksOptions) => {
6149
+ items: ScheduledTaskDto[];
6150
+ searchQuery: string;
6151
+ setSearchQuery: Dispatch<SetStateAction<string>>;
6152
+ sortKey: "firstToRun" | "lastToRun" | "newest" | "nameAZ";
6153
+ setSortKey: Dispatch<SetStateAction<"firstToRun" | "lastToRun" | "newest" | "nameAZ">>;
6154
+ isLoading: boolean;
6155
+ isLoadingMore: boolean;
6156
+ initialError: Error | null;
6157
+ loadMoreError: Error | null;
6158
+ hasMore: boolean;
6159
+ loadMore: () => void;
6160
+ retryLoadMore: () => void;
6161
+ refetch: () => void;
6162
+ };
6163
+
6164
+ export declare interface UseScheduledTasksOptions {
6165
+ enabled?: boolean;
6166
+ pageSize?: number;
6167
+ debounceMs?: number;
6168
+ initialSearch?: string;
6169
+ initialSort?: ListScheduledTasksSortEnum;
6170
+ }
6171
+
5229
6172
  /**
5230
6173
  * Resolves and manages share-link data for a DIAL Core resource.
5231
6174
  *
@@ -5266,6 +6209,48 @@ export declare interface UseShareRecipientsCountResult {
5266
6209
  invalidateRecipientsCount: (itemId: string) => void;
5267
6210
  }
5268
6211
 
6212
+ /**
6213
+ * Headless controller for the skill-archive upload flow: dialog visibility, the exact-filename
6214
+ * precheck, in-flight exclusion, abort-on-close, and import completion. The host supplies the configured request
6215
+ * and observes completion/failure through the injected callbacks; the hook never imports app
6216
+ * contexts, i18n, or a configured API client.
6217
+ */
6218
+ export declare const useSkillArchiveImport: <TResult>({ importArchive, onImported, onError, manifestFileName, }: UseSkillArchiveImportOptions<TResult>) => UseSkillArchiveImportResult;
6219
+
6220
+ /** Options accepted by {@link useSkillArchiveImport}. */
6221
+ export declare interface UseSkillArchiveImportOptions<TResult> {
6222
+ /** Submits the selected archive; the host owns the client. `signal` aborts when the dialog closes or the hook unmounts mid-upload. */
6223
+ importArchive: (file: File, signal: AbortSignal) => Promise<TResult>;
6224
+ /** Called once after a successful import (and any awaited host follow-up) settles. */
6225
+ onImported: (result: TResult) => void | Promise<void>;
6226
+ /** Called once when the import request, or the host's follow-up in {@link onImported}, fails. */
6227
+ onError: (error: unknown, kind: SkillArchiveImportErrorKind) => void;
6228
+ /** Exact filename treated as the skill manifest. Defaults to `'SKILL.md'`. */
6229
+ manifestFileName?: string;
6230
+ }
6231
+
6232
+ /** Result returned by {@link useSkillArchiveImport}. */
6233
+ export declare interface UseSkillArchiveImportResult {
6234
+ /** Whether the upload dialog is open. */
6235
+ isDialogOpen: boolean;
6236
+ /** Current phase of the import. */
6237
+ status: SkillArchiveImportStatus;
6238
+ /** Whether an import request is in flight; the dialog stays open until it succeeds. */
6239
+ isUploading: boolean;
6240
+ /** Reason the current/last selection was rejected locally; `undefined` once cleared. */
6241
+ selectionRejectionReason: SkillArchiveSelectionRejectionReason | undefined;
6242
+ /** Classified failure of the last import request; `undefined` outside a request failure. */
6243
+ errorKind: SkillArchiveImportErrorKind | undefined;
6244
+ /** Opens the dialog and clears any previous rejection or request failure. */
6245
+ openDialog: () => void;
6246
+ /** Closes the dialog, aborting an in-flight import, and clears any rejection reason. */
6247
+ closeDialog: () => void;
6248
+ /** Wire to the dialog drop zone's `onChange`. */
6249
+ handleFilesSelected: (files: File[]) => void;
6250
+ /** Wire to the dialog drop zone's `onReject`. */
6251
+ handleFilesRejected: () => void;
6252
+ }
6253
+
5269
6254
  /**
5270
6255
  * Headless data pipeline behind a skill details side panel: resolves the
5271
6256
  * selected skill from the listings, maps it to a catalog item with its
@@ -5367,7 +6352,7 @@ export declare interface UseSkillEditorLoadResult {
5367
6352
  * `client.createSkill`/`client.updateSkill`, and mapping the resulting
5368
6353
  * success/error/conflict outcomes to presentable state.
5369
6354
  */
5370
- export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, frontmatterRef, loadedPathRef, etagRef, returnUrl, refetchSkills, client, messages, onNavigate, onNotify, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
6355
+ export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, frontmatterRef, loadedPathRef, etagRef, returnUrl, getCreateReturnUrl, refetchSkills, client, messages, onNavigate, onNotify, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
5371
6356
 
5372
6357
  /** Parameters accepted by {@link useSkillEditorSubmit}. */
5373
6358
  export declare interface UseSkillEditorSubmitParams {
@@ -5387,6 +6372,8 @@ export declare interface UseSkillEditorSubmitParams {
5387
6372
  etagRef: React.MutableRefObject<string | undefined>;
5388
6373
  /** Where to navigate on a successful save. */
5389
6374
  returnUrl: string;
6375
+ /** Resolves the destination after creation from the normalized skill path. Defaults to `returnUrl`. */
6376
+ getCreateReturnUrl?: (path: string) => string;
5390
6377
  /** Refetches the host's skill listing after a successful save. */
5391
6378
  refetchSkills: () => Promise<void>;
5392
6379
  /** Already-configured create/update operations. */
@@ -5407,6 +6394,10 @@ export declare interface UseSkillEditorSubmitResult {
5407
6394
  errors: SkillEditorErrors;
5408
6395
  /** General submit-time error, distinct from a stale-edit `conflict`. */
5409
6396
  submitError: string | undefined;
6397
+ /** Whether `submitError` was caused by something a plain re-send can clear, rather than by the submission itself. */
6398
+ isSubmitErrorRetryable: boolean;
6399
+ /** Re-submits the values of the attempt that produced `submitError`. No-op before the first submit. */
6400
+ retrySubmit: () => void;
5410
6401
  /** Present when the last save hit a stale-ETag conflict. */
5411
6402
  conflict: {
5412
6403
  message: string;
@@ -5415,15 +6406,22 @@ export declare interface UseSkillEditorSubmitResult {
5415
6406
  clearConflict: () => void;
5416
6407
  /** Validates and submits the given form values. */
5417
6408
  handleSubmit: (values: SkillEditorValues) => Promise<void>;
6409
+ /**
6410
+ * Re-runs the Instructions frontmatter check against the editor's current
6411
+ * values, so a pasted `SKILL.md` is flagged as the text lands rather than
6412
+ * only on submit. Pass as the editor's `onValuesChange`.
6413
+ */
6414
+ handleValuesChange: (values: SkillEditorValues) => void;
5418
6415
  }
5419
6416
 
5420
6417
  /**
5421
6418
  * Owns the Skill Editor's batch file upload workflow: validating a staged
5422
6419
  * batch, committing it atomically (supporting files plus an optional
5423
- * `SKILL.md` manifest import, with a confirmation gate), and removing
6420
+ * `SKILL.md` manifest import, with a confirmation gate), creating empty
6421
+ * folders, expanding `.zip` archives for staging, and removing
5424
6422
  * already-committed nodes.
5425
6423
  */
5426
- export declare const useSkillFileActions: ({ files, setFiles, filesContentRef, frontmatterRef, loadedValues, setLoadedValues, isEditMode, isDirty, setSelectedPath, messages, }: UseSkillFileActionsParams) => UseSkillFileActionsResult;
6424
+ export declare const useSkillFileActions: ({ files, setFiles, filesContentRef, frontmatterRef, loadedValues, setLoadedValues, isEditMode, isDirty, setSelectedPath, messages, pickFromFileSystem, }: UseSkillFileActionsParams) => UseSkillFileActionsResult;
5427
6425
 
5428
6426
  /** Parameters accepted by {@link useSkillFileActions}. */
5429
6427
  export declare interface UseSkillFileActionsParams {
@@ -5447,6 +6445,12 @@ export declare interface UseSkillFileActionsParams {
5447
6445
  setSelectedPath: Dispatch<SetStateAction<string>>;
5448
6446
  /** Localized messages, resolved by the host. */
5449
6447
  messages: SkillFileActionsMessages;
6448
+ /**
6449
+ * Opens the host's file-system picker; passed through unchanged as
6450
+ * `fileActions.pickFromFileSystem`. Omit to hide the editor's "Open DIAL
6451
+ * file system" entry.
6452
+ */
6453
+ pickFromFileSystem?: () => Promise<SkillFileSourceEntry[] | undefined>;
5450
6454
  }
5451
6455
 
5452
6456
  /** Return value of {@link useSkillFileActions}. */
@@ -5493,10 +6497,11 @@ export declare interface UseSkillFilePreviewResult {
5493
6497
 
5494
6498
  /**
5495
6499
  * Headless hook that encapsulates skill detail fetching: manifest download and
5496
- * parse, package file listing, overview construction, and in-package file
5497
- * loads. `useCatalogItemDetails` delegates its skill branch here; hosts that
5498
- * only surface skill details consume this hook directly, without the
5499
- * deployment and prompt ports the full catalog pipeline requires.
6500
+ * parse, package file listing, authoritative metadata fetching, overview
6501
+ * construction, and in-package file loads. `useCatalogItemDetails` delegates
6502
+ * its skill branch here; hosts that only surface skill details consume this
6503
+ * hook directly, without the deployment and prompt ports the full catalog
6504
+ * pipeline requires.
5500
6505
  */
5501
6506
  export declare const useSkillItemDetails: ({ api, skills, skillOverviewLabels, }: UseSkillItemDetailsOptions) => UseSkillItemDetailsResult;
5502
6507
 
@@ -5777,4 +6782,7 @@ export declare enum WithLogin {
5777
6782
  WithConfig = "with-config"
5778
6783
  }
5779
6784
 
6785
+ /** Returns `sections` with every root label usable as a unique first path segment, falling back to the tab id. */
6786
+ export declare const withRoutableRootLabels: <TSection extends DialFileManagerSection>(sections: readonly TSection[]) => TSection[];
6787
+
5780
6788
  export { }