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

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 +5 -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 +398 -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 +40 -1
  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 +157 -145
  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 +1068 -81
  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 +8 -6
package/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { Annotation } from '@epam/ai-dial-chat-shared';
2
2
  import { AnnotationGroup } from '@epam/ai-dial-quotations';
3
+ import { ApplicationExternalServiceDto } from '@epam/ai-dial-chat-api-client';
4
+ import { ApplicationVisualizer } from '@epam/ai-dial-chat-shared';
3
5
  import { ArchiveItemDto } from '@epam/ai-dial-chat-api-client';
4
6
  import { Attachment } from '@epam/ai-dial-chat-shared';
5
7
  import { AttachmentDisplayResolvers } from '@epam/ai-dial-chat-shared';
@@ -25,6 +27,7 @@ import { ConversationTransferJob } from '@epam/ai-dial-chat-shared';
25
27
  import { ConversationTransferWarningCode } from '@epam/ai-dial-chat-shared';
26
28
  import { CopyFilesResponseDto } from '@epam/ai-dial-chat-api-client';
27
29
  import { CopyItemDto } from '@epam/ai-dial-chat-api-client';
30
+ import { CreatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
28
31
  import { CreateFolderDto } from '@epam/ai-dial-chat-api-client';
29
32
  import { CreateFolderResponseDto } from '@epam/ai-dial-chat-api-client';
30
33
  import { CreateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
@@ -34,8 +37,6 @@ import type { CustomVisualizerDataLayout } from '@epam/ai-dial-chat-shared';
34
37
  import { DeleteFilesResponseDto } from '@epam/ai-dial-chat-api-client';
35
38
  import { DeleteItemDto } from '@epam/ai-dial-chat-api-client';
36
39
  import { DeploymentConfigurationSchema } from '@epam/ai-dial-chat-shared';
37
- import { DeploymentCreationFormLocaleEntry } from '@epam/ai-dial-builder-form';
38
- import { DeploymentCreationFormLocaleOption } from '@epam/ai-dial-builder-form';
39
40
  import { DeploymentDetailsDto } from '@epam/ai-dial-chat-api-client';
40
41
  import { DeploymentFeatures } from '@epam/ai-dial-chat-shared';
41
42
  import { DeploymentItemDto } from '@epam/ai-dial-chat-api-client';
@@ -59,22 +60,33 @@ import { Dispatch } from 'react';
59
60
  import { DisplayAttachment } from '@epam/ai-dial-chat-shared';
60
61
  import { DropdownItem } from '@epam/ai-dial-ui-kit';
61
62
  import { ExportFolder } from '@epam/ai-dial-chat-shared';
63
+ import { ExternalServicesApi } from '@epam/ai-dial-chat-api-client';
62
64
  import { FileManagerColumnKey } from '@epam/ai-dial-react-file-manager';
65
+ import { FileManagerSelectableNode } from '@epam/ai-dial-chat-shared';
63
66
  import { FileMetadataResponseDto } from '@epam/ai-dial-chat-api-client';
64
67
  import { FilesApi } from '@epam/ai-dial-chat-api-client';
68
+ import { FileTreeOptions } from '@epam/ai-dial-react-file-manager';
65
69
  import { FileUploadBatchState } from '@epam/ai-dial-chat-shared';
66
70
  import { FileUploadEntry } from '@epam/ai-dial-chat-shared';
67
71
  import { FileUploadResponseDto } from '@epam/ai-dial-chat-api-client';
68
72
  import { FileUploadStatus } from '@epam/ai-dial-chat-shared';
69
73
  import { FileUploadValidationResult } from '@epam/ai-dial-chat-shared';
74
+ import { FilterChipItem } from '@epam/ai-dial-ui-kit';
70
75
  import { FilterTab } from '@epam/ai-dial-chat-shared';
71
76
  import { getParentFolderPath } from '@epam/ai-dial-chat-shared';
77
+ import type { GroupedAttachmentItem } from '@epam/ai-dial-chat-shared';
78
+ import { Implementation } from '@modelcontextprotocol/sdk/types.js';
72
79
  import type { InputHighlightData } from '@epam/pdf-highlighter-kit';
73
80
  import { ListFilesItemDto } from '@epam/ai-dial-chat-api-client';
74
81
  import { ListFilesResponseDto } from '@epam/ai-dial-chat-api-client';
75
82
  import { ListPublicFilesRequest } from '@epam/ai-dial-chat-api-client';
83
+ import { ListScheduledTaskRunsResponseDto } from '@epam/ai-dial-chat-api-client';
84
+ import { ListScheduledTasksResponseDto } from '@epam/ai-dial-chat-api-client';
85
+ import { ListScheduledTasksSortEnum } from '@epam/ai-dial-chat-api-client';
76
86
  import { ListSharedFilesRequest } from '@epam/ai-dial-chat-api-client';
87
+ import { LocaleOption } from '@epam/ai-dial-chat-shared';
77
88
  import { LocaleTextEntryDto } from '@epam/ai-dial-chat-api-client';
89
+ import { LocalizedTextEntry } from '@epam/ai-dial-chat-shared';
78
90
  import { McpAppToolSummaryDto } from '@epam/ai-dial-chat-api-client';
79
91
  import { McpUiHostContext } from '@mcp-ui/client';
80
92
  import { Message } from '@epam/ai-dial-chat-shared';
@@ -82,10 +94,13 @@ import { MessageAttachment } from '@epam/ai-dial-chat-shared';
82
94
  import { MessageCustomContent } from '@epam/ai-dial-chat-shared';
83
95
  import { MessageRating } from '@epam/ai-dial-chat-shared';
84
96
  import { Middleware } from '@epam/ai-dial-chat-api-client';
97
+ import { ModelLimitPeriodStatuses } from '@epam/ai-dial-usage-dashboard';
98
+ import { ModelLimitRow } from '@epam/ai-dial-usage-dashboard';
85
99
  import { MoveFilesResponseDto } from '@epam/ai-dial-chat-api-client';
86
100
  import { MoveItemDto } from '@epam/ai-dial-chat-api-client';
87
101
  import { MutableRefObject } from 'react';
88
102
  import { NotificationVariant } from '@epam/ai-dial-ui-kit';
103
+ import { OfflineCredentialsApi } from '@epam/ai-dial-chat-api-client';
89
104
  import { OverlayChatMessage } from '@epam/ai-dial-chat-overlay';
90
105
  import { PromptFolderResponseDto } from '@epam/ai-dial-chat-api-client';
91
106
  import { PromptListResponseDto } from '@epam/ai-dial-chat-api-client';
@@ -111,6 +126,10 @@ import { RevokeAccessItemDto } from '@epam/ai-dial-chat-api-client';
111
126
  import { RevokeAccessResponseDto } from '@epam/ai-dial-chat-api-client';
112
127
  import { ScheduledTaskCreateFormValues } from '@epam/ai-dial-scheduled-tasks';
113
128
  import { ScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
129
+ import { ScheduledTaskRunDto } from '@epam/ai-dial-chat-api-client';
130
+ import { ScheduledTaskValidationErrors } from '../../libs/scheduled-tasks/validation';
131
+ import { ScheduledTaskValidationOptions } from '../../libs/scheduled-tasks/validation';
132
+ import { ScheduleTriggerDto } from '@epam/ai-dial-chat-api-client';
114
133
  import { SendCompletionDtoModeEnum } from '@epam/ai-dial-chat-api-client';
115
134
  import { SetStateAction } from 'react';
116
135
  import { ShareApi } from '@epam/ai-dial-chat-api-client';
@@ -122,16 +141,16 @@ import { SkillEditorFileActions } from '@epam/ai-dial-skill-editor';
122
141
  import { SkillEditorValues } from '@epam/ai-dial-skill-editor';
123
142
  import { SkillFileBatchError } from '@epam/ai-dial-skill-editor';
124
143
  import { SkillFileListResponseDto } from '@epam/ai-dial-chat-api-client';
144
+ import { SkillFileSourceEntry } from '@epam/ai-dial-skill-editor';
125
145
  import { SkillFileTreeNode } from '@epam/ai-dial-skill-editor';
126
146
  import { SkillFileUploadCandidate } from '@epam/ai-dial-skill-editor';
127
147
  import { SkillFileValidationResult } from '@epam/ai-dial-skill-editor';
128
148
  import { SkillMetadataItemDto } from '@epam/ai-dial-chat-api-client';
129
149
  import { SkillUploadResponseDto } from '@epam/ai-dial-chat-api-client';
150
+ import { Stage } from '@epam/ai-dial-chat-shared';
130
151
  import { StarterOption } from '@epam/ai-dial-chat-shared';
131
152
  import { StatusMessage } from '@epam/ai-dial-chat-shared';
132
153
  import { StreamChunk } from '@epam/ai-dial-chat-shared';
133
- import { TabModel } from '@epam/ai-dial-ui-kit';
134
- import { ToolbarOptions } from '@epam/ai-dial-react-file-manager';
135
154
  import { ToolMenuItem } from '@epam/ai-dial-chat-shared';
136
155
  import { ToolsetLoginBodyDto } from '@epam/ai-dial-chat-api-client';
137
156
  import { ToolsetLogoutBodyDto } from '@epam/ai-dial-chat-api-client';
@@ -139,9 +158,11 @@ import { ToolsetsApi } from '@epam/ai-dial-chat-api-client';
139
158
  import { TranscriptionApi } from '@epam/ai-dial-chat-api-client';
140
159
  import { UnpublishCatalogEntityDto } from '@epam/ai-dial-chat-api-client';
141
160
  import { UnpublishResultDto } from '@epam/ai-dial-chat-api-client';
161
+ import { UpdatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
142
162
  import { UpdateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
143
163
  import { UploadArchiveResponseDto } from '@epam/ai-dial-chat-api-client';
144
164
  import { UploadedAttachmentResult } from '@epam/ai-dial-chat-shared';
165
+ import { UsageLimitCardData } from '@epam/ai-dial-usage-dashboard';
145
166
  import { useGridEditingScroll } from '@epam/ai-dial-chat-shared';
146
167
  import { UseGridEditingScrollOptions } from '@epam/ai-dial-chat-shared';
147
168
  import { UseGridEditingScrollResult } from '@epam/ai-dial-chat-shared';
@@ -161,6 +182,7 @@ export declare interface AgentCapabilities {
161
182
  hasConfiguration?: boolean;
162
183
  hasChatCompletion?: boolean;
163
184
  hasResponsesApi?: boolean;
185
+ hasSkills?: boolean;
164
186
  }
165
187
 
166
188
  /** Input-attachment configuration for an agent (application) deployment. */
@@ -236,6 +258,8 @@ 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. */
@@ -247,6 +271,25 @@ export declare interface ApiErrorDetails {
247
271
  /** Appends a locale's uppercased code to a field label, e.g. `'Name [EN]'`. */
248
272
  export declare const appendLocaleCode: (label: string, locale: string) => string;
249
273
 
274
+ /**
275
+ * Applies a single SSE stream chunk to the message list.
276
+ *
277
+ *
278
+ * Attachments are accumulated: each chunk's attachments are appended to the
279
+ * existing array rather than replacing it.
280
+ *
281
+ * Annotations are merged by `index`: partial `body.title` and `body.quote`
282
+ * strings are concatenated across chunks, matching the same delta-merge
283
+ * semantics used for stages.
284
+ *
285
+ * `state` is overwritten (not merged) by each chunk that carries one,
286
+ * matching the DIAL stateful-app contract.
287
+ *
288
+ * @returns Updated message array, or `null` when the chunk carries no
289
+ * actionable data (empty content, no form_schema, and no attachments).
290
+ */
291
+ export declare const applyChunkToMessages: (messages: Message[], messageIndex: number, chunk: StreamChunk) => Message[] | null;
292
+
250
293
  /** Converts an APScheduler weekday (Monday=0..Sunday=6) to a JS `Date` weekday (Sunday=0..Saturday=6). */
251
294
  export declare const apSchedulerDayToJsDay: (apSchedulerDay: number) => number;
252
295
 
@@ -314,6 +357,7 @@ declare enum AttachmentContentType {
314
357
  Code = 'code',
315
358
  Html = 'html',
316
359
  Visualizer = 'visualizer',
360
+ GroupedVisualizer = 'grouped_visualizer',
317
361
  McpApp = 'mcp_app',
318
362
  Unsupported = 'unsupported',
319
363
  Error = 'error',
@@ -345,10 +389,12 @@ export declare const attachmentToDto: (attachment: Attachment) => AttachmentDto;
345
389
  export declare interface AttachmentValidationErrorEvent {
346
390
  /** Why the attachment(s) were rejected. */
347
391
  reason: AttachmentValidationErrorReason;
348
- /** The resolved MIME types the caller currently allows (possibly empty). */
349
- allowedMimeTypes: string[];
392
+ /** The resolved MIME types the caller currently allows (possibly empty). Present only when `reason` is `NoTypesAllowed` or `UnsupportedType`. */
393
+ allowedMimeTypes?: string[];
350
394
  /** Already-formatted, non-translated extension list (e.g. ".png, .jpg"), present only when `reason` is `UnsupportedType`. */
351
395
  formats?: string;
396
+ /** The size limit, in bytes, that was exceeded. Present only when `reason` is `FileTooLarge`. */
397
+ maxFileSizeBytes?: number;
352
398
  }
353
399
 
354
400
  /** Reason a rejected attachment failed validation. */
@@ -356,7 +402,9 @@ export declare enum AttachmentValidationErrorReason {
356
402
  /** No MIME types are allowed at all — attachments are disabled entirely. */
357
403
  NoTypesAllowed = "noTypesAllowed",
358
404
  /** The attachment's content type is not among the allowed MIME types. */
359
- UnsupportedType = "unsupportedType"
405
+ UnsupportedType = "unsupportedType",
406
+ /** The attachment's file size exceeds `maxFileSizeBytes`. */
407
+ FileTooLarge = "fileTooLarge"
360
408
  }
361
409
 
362
410
  /** Thrown by `transcribeAudio`; carries a machine-readable `reason` instead of translated text. */
@@ -391,7 +439,7 @@ export declare enum AuthenticationType {
391
439
  * `additionalLocaleCodes` and excluding whichever code is already the
392
440
  * primary Name/Description field.
393
441
  */
394
- export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: string[], primaryLocale: string) => DeploymentCreationFormLocaleOption[];
442
+ export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: string[], primaryLocale: string) => LocaleOption[];
395
443
 
396
444
  /**
397
445
  * Builds the value persisted under `StorageKey.TextOfClosedAnnouncement` when
@@ -522,6 +570,13 @@ export declare const buildSkillManifestFromFrontmatter: (baseFrontmatter: Record
522
570
  * authored it, when it last changed, and its file inventory. Grouping folders
523
571
  * in the file listing are excluded from both the count and the rows. Sizes are
524
572
  * not shown — the skill metadata carries no content-length field.
573
+ *
574
+ * `skill` is the authoritative `getSkillMetadata` response when that request
575
+ * fulfilled; the caller falls back to the catalog listing entry only when it
576
+ * rejected (`useSkillItemDetails`'s `onFetchSkillDetails`). Either way, this
577
+ * function never fills a gap in one source from the other — an absent
578
+ * `author` omits the row and an absent `updatedAt` leaves the updated row's
579
+ * value empty, exactly as `skill` carries it.
525
580
  */
526
581
  export declare const buildSkillOverview: (skill: SkillMetadataItemDto | undefined, files: SkillMetadataItemDto[], about: SkillAboutDetails | undefined, labels: SkillOverviewLabels) => CatalogItemOverview;
527
582
 
@@ -717,6 +772,13 @@ export declare interface ChatStreamCompletionOptions {
717
772
  signal?: AbortSignal;
718
773
  }
719
774
 
775
+ /**
776
+ * Classifies an import request's HTTP status into a semantic outcome: 400/413/422 are
777
+ * archive-content problems, 409 is a name collision, 429 is rate limiting, 502/503 mean the
778
+ * backend is unavailable, and anything else (including no status at all) is generic.
779
+ */
780
+ export declare const classifySkillArchiveImportError: (status: number | undefined) => SkillArchiveImportErrorKind;
781
+
720
782
  /** Clears all cached fetch results. Call this when leaving a conversation. */
721
783
  export declare const clearAttachmentCache: () => void;
722
784
 
@@ -743,7 +805,7 @@ export declare const COLUMNS_WITHOUT_AUTHOR: FileManagerColumnKey[];
743
805
  * `undefined` (not `[]`) when nothing remains, so a request untouched by
744
806
  * this feature stays byte-identical to today.
745
807
  */
746
- export declare const composeLocalePayload: (otherLocales: DeploymentCreationFormLocaleEntry[], primaryLocale: string) => LocaleTextEntryDto[] | undefined;
808
+ export declare const composeLocalePayload: (otherLocales: LocalizedTextEntry[], primaryLocale: string) => LocaleTextEntryDto[] | undefined;
747
809
 
748
810
  /** Whether an export includes the conversation's attachments. */
749
811
  export declare enum ConversationExportMode {
@@ -759,6 +821,28 @@ export declare interface ConversationGenerationLifecycle {
759
821
  completeGeneration: (path: string, generationId: string) => void;
760
822
  }
761
823
 
824
+ /** Labels and formatter callbacks for the conversation-input limits mapping utility. */
825
+ export declare interface ConversationInputLimitsLabels {
826
+ /** Heading of the group listing the selected deployment's token limits. */
827
+ tokenGroup: string;
828
+ /** Heading of the group listing the caller's cost budget and spend against it. */
829
+ costGroup: string;
830
+ /** Label for the current-UTC-day row, used by both groups. */
831
+ periodDay: string;
832
+ /** Label for the current-UTC-week row, used by both groups. */
833
+ periodWeek: string;
834
+ /** Label for the current-UTC-month row, used by both groups. */
835
+ periodMonth: string;
836
+ /** Formats the combined used/total display value for a capped row. */
837
+ formatValueLabel: (used: string, total: string) => string;
838
+ /** Formats the ARIA label for a capped progress row. */
839
+ formatProgressAriaLabel: (params: {
840
+ label: string;
841
+ used: string;
842
+ total: string;
843
+ }) => string;
844
+ }
845
+
762
846
  /** Stable reverse-lookup maps returned by `useConversationLookupMaps`. */
763
847
  export declare interface ConversationLookupMaps {
764
848
  /** Returns the raw context id for a panel-space conversation id, or `undefined` when not found. */
@@ -909,6 +993,12 @@ export declare interface CreateChatStreamApiDeps {
909
993
  getTimezone?: () => string | undefined;
910
994
  /** `fetch` implementation to issue requests through. Defaults to the global `fetch`. */
911
995
  fetchImpl?: typeof fetch;
996
+ /**
997
+ * How long an open completion stream may go without receiving a byte
998
+ * (keepalive comments included) before it is reported as a
999
+ * {@link StreamInterruptedError}. Defaults to {@link DEFAULT_STREAM_IDLE_TIMEOUT_MS}.
1000
+ */
1001
+ idleTimeoutMs?: number;
912
1002
  }
913
1003
 
914
1004
  /**
@@ -958,6 +1048,12 @@ export declare const createMessagePair: (content: string, customContent?: Messag
958
1048
  */
959
1049
  export declare const createPublishApiClient: (publishApi: PublishApi) => PublishApiClient;
960
1050
 
1051
+ /**
1052
+ * Composes scheduler operations over an already configured generated client.
1053
+ * Authentication, base URL, CSRF, and retries remain host responsibilities.
1054
+ */
1055
+ export declare const createScheduledTasksApiClient: (client: ScheduledTasksConfiguredClient) => ScheduledTasksApiClient;
1056
+
961
1057
  /**
962
1058
  * Builds a generated-client `Middleware` that throws on 401, and on a
963
1059
  * classified invalid-CSRF 403 refreshes the token and retries the original
@@ -1020,6 +1116,15 @@ export declare type CsrfRefreshOutcome = {
1020
1116
 
1021
1117
  export declare const DATE_OPTIONS: Intl.DateTimeFormatOptions;
1022
1118
 
1119
+ /**
1120
+ * Inverse of `encodeDeploymentId` — decodes each `/`-separated segment back
1121
+ * to its raw, human-readable form. A segment that isn't valid
1122
+ * percent-encoding is passed through unchanged rather than throwing, since
1123
+ * this decodes externally-sourced ids (the settings iframe's postMessage
1124
+ * protocol).
1125
+ */
1126
+ export declare const decodeDeploymentId: (id: string) => string;
1127
+
1023
1128
  /**
1024
1129
  * Inverse of `encodeToolsetId` — decodes each `/`-separated segment back to
1025
1130
  * its raw, human-readable form. A segment that isn't valid percent-encoding
@@ -1036,11 +1141,14 @@ export declare const decodeToolsetId: (id: string) => string;
1036
1141
  * present in either map, excluding `primaryLocale` — that key is already the
1037
1142
  * primary Name/Description field, not a row in the popup.
1038
1143
  */
1039
- export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) => DeploymentCreationFormLocaleEntry[];
1144
+ export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) => LocalizedTextEntry[];
1040
1145
 
1041
1146
  /** Fallback text of a {@link GenerationConflictError} when no message is supplied. */
1042
1147
  export declare const DEFAULT_GENERATION_CONFLICT_MESSAGE = "A response is already being generated in this conversation. Wait for it to finish or stop it before sending another message.";
1043
1148
 
1149
+ /** Safe fallback for hosts that do not supply a translated persistence warning. */
1150
+ export declare const DEFAULT_GENERATION_PERSISTENCE_ERROR_MESSAGE = "The response could not be saved. It is still shown here, but may be lost if you reload or leave this page. Copy it before continuing.";
1151
+
1044
1152
  /**
1045
1153
  * Default ceiling on the summed byte length of an export's attachments.
1046
1154
  *
@@ -1054,6 +1162,8 @@ export declare const DEFAULT_GENERATION_CONFLICT_MESSAGE = "A response is alread
1054
1162
  */
1055
1163
  export declare const DEFAULT_MAX_ARCHIVE_BYTES: number;
1056
1164
 
1165
+ export declare const DEFAULT_STREAM_IDLE_TIMEOUT_MS = 45000;
1166
+
1057
1167
  /** Translated folder-path labels for the Personal/Shared/Public deployment groupings. */
1058
1168
  export declare interface DeploymentFolderLabels {
1059
1169
  personal: string;
@@ -1120,15 +1230,34 @@ export declare const deriveAvailableTabIds: <T extends CatalogEntityType>(items:
1120
1230
  export declare const deriveConversationRowActionState: (item: Pick<ConversationListItemDto, "sharedWithMe" | "publishedWithMe" | "isReadonly">, publishHistory: PublishHistoryEntry[] | undefined, recipients: RecipientsCountEntry) => ConversationRowActionState;
1121
1231
 
1122
1232
  /**
1123
- * Returns items marked as a user favorite, in original order.
1233
+ * Returns items marked as a user favorite that are not hidden, in original order.
1124
1234
  */
1125
1235
  export declare const deriveFavoriteItems: (items: readonly CatalogItem[]) => CatalogItem[];
1126
1236
 
1237
+ /**
1238
+ * Describes the complete trigger without requiring unrelated task metadata.
1239
+ * Unsupported constraints remain Custom, with the full source expression.
1240
+ * Calendar-month shifts crossing month boundaries or days 29–31 remain
1241
+ * Custom because a shifted monthly day is not equivalent around short months.
1242
+ */
1243
+ export declare const describeScheduledTaskTrigger: (trigger: ScheduleTriggerDto, { timeZone, referenceDate, }?: ScheduledTaskTriggerDescriptionOptions) => ScheduledTaskTriggerDescription;
1244
+
1245
+ /** Source tabs `useDialFileManagerSections` can merge into the All tab, in display order. */
1246
+ export declare const DIAL_FILE_MANAGER_SECTION_TABS: readonly DialFileManagerTabs[];
1247
+
1127
1248
  /** Strip the "files/{bucket}/" prefix from a DIAL Core URL to get the path within the bucket. */
1128
1249
  export declare const dialCorePathToRelative: (dialCorePath: string, bucket: string) => string;
1129
1250
 
1130
1251
  export { DialFileManagerActionProfile }
1131
1252
 
1253
+ /** One source tab rendered as a top-level folder of the All view. */
1254
+ export declare interface DialFileManagerSection {
1255
+ /** Source tab backing this section — `MyFiles`, `Shared` or `Organization`. */
1256
+ tab: DialFileManagerTabs;
1257
+ /** Display name of the section's top-level folder; also the first segment of its virtual paths. An empty, slash-containing or repeated label is replaced by the tab id. */
1258
+ rootLabel: string;
1259
+ }
1260
+
1132
1261
  export { DialFileManagerVariant }
1133
1262
 
1134
1263
  /**
@@ -1463,7 +1592,9 @@ export declare enum FileManagerNotificationReason {
1463
1592
  /** `onUploadArchive` extracted some entries successfully and some failed; `count`/`names`/`restCount` describe the failures. */
1464
1593
  UploadArchivePartiallyFailed = "uploadArchivePartiallyFailed",
1465
1594
  /** `onUploadArchive`'s `uploadArchive` request itself rejected. */
1466
- UploadArchiveRequestFailed = "uploadArchiveRequestFailed"
1595
+ UploadArchiveRequestFailed = "uploadArchiveRequestFailed",
1596
+ /** A copy/move targeted a destination in a different All-view section from its source items; no request was made. */
1597
+ CrossSectionTransferUnsupported = "crossSectionTransferUnsupported"
1467
1598
  }
1468
1599
 
1469
1600
  /**
@@ -1484,8 +1615,6 @@ export declare type FileNameValidationError = {
1484
1615
  } | {
1485
1616
  reason: FileNameValidationErrorReason.DuplicateName;
1486
1617
  existingName: string;
1487
- } | {
1488
- reason: FileNameValidationErrorReason.LeadingDot;
1489
1618
  };
1490
1619
 
1491
1620
  /**
@@ -1498,8 +1627,7 @@ export declare enum FileNameValidationErrorReason {
1498
1627
  ForbiddenSymbols = "forbiddenSymbols",
1499
1628
  ReservedName = "reservedName",
1500
1629
  TooLong = "tooLong",
1501
- DuplicateName = "duplicateName",
1502
- LeadingDot = "leadingDot"
1630
+ DuplicateName = "duplicateName"
1503
1631
  }
1504
1632
 
1505
1633
  /**
@@ -1516,7 +1644,10 @@ export declare enum FileOperationKind {
1516
1644
  FileCopied = "fileCopied",
1517
1645
  FilesCopied = "filesCopied",
1518
1646
  FileMoved = "fileMoved",
1519
- FilesMoved = "filesMoved"
1647
+ FilesMoved = "filesMoved",
1648
+ /** A copy whose every item landed in its own source folder (Duplicate). */
1649
+ FileDuplicated = "fileDuplicated",
1650
+ FilesDuplicated = "filesDuplicated"
1520
1651
  }
1521
1652
 
1522
1653
  /**
@@ -1531,13 +1662,15 @@ export declare interface FileOperationSuccessEvent {
1531
1662
  name?: string;
1532
1663
  /** Number of items the operation covered, when applicable. */
1533
1664
  count?: number;
1534
- /** Destination folder name, for copy/move operations. */
1665
+ /**
1666
+ * Destination folder as a slash-joined virtual path starting at the root
1667
+ * label (e.g. `My files/reports`), for copy/move/duplicate operations.
1668
+ */
1535
1669
  destinationFolderName?: string;
1536
1670
  /**
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").
1671
+ * Whether the affected item is a folder rather than a file. Set for rename,
1672
+ * copy, move, and duplicate events; on a multi-item event it describes the
1673
+ * first successfully affected item (the one `name` refers to).
1541
1674
  */
1542
1675
  isFolder?: boolean;
1543
1676
  }
@@ -1635,6 +1768,9 @@ export declare const formatOperationFolderName: (destinationFolder: string, root
1635
1768
  */
1636
1769
  export declare const formatQuotedNameList: (names: string[]) => string;
1637
1770
 
1771
+ /** Formats a raw `resetsAt` into display strings, or returns `undefined` when it cannot be formatted. */
1772
+ export declare type FormatResetTime = (resetsAt: string | undefined) => ResetTimeDisplay | undefined;
1773
+
1638
1774
  /**
1639
1775
  * Reported through `onError` when the backend rejects a completion because
1640
1776
  * another generation is already active on the same conversation — what a
@@ -1646,7 +1782,13 @@ export declare class GenerationConflictError extends Error {
1646
1782
  constructor(message?: string);
1647
1783
  }
1648
1784
 
1649
- /** Normalizes any API error into a `{ status?, message, traceId? }` shape. */
1785
+ /** Identifies a failed terminal save independently of the model's generation outcome. */
1786
+ export declare class GenerationPersistenceError extends Error {
1787
+ static readonly type = "conversation_save_failed";
1788
+ constructor();
1789
+ }
1790
+
1791
+ /** Normalizes any API error into a `{ status?, message, traceId?, code? }` shape. */
1650
1792
  export declare const getApiErrorDetails: (error: unknown) => Promise<ApiErrorDetails>;
1651
1793
 
1652
1794
  /** Resolves a human-readable message from an API error's response body, or falls back to `Error.message`. */
@@ -1681,6 +1823,21 @@ export declare const getConversationSource: (item: Pick<ConversationListItemDto,
1681
1823
  */
1682
1824
  export declare const getExternalServiceFallbackName: (serviceName: string) => string;
1683
1825
 
1826
+ /**
1827
+ * Returns the tool values the conversation's last message sets through its
1828
+ * `form_schema`, restricted to `toolIds`, plus a key identifying that exact
1829
+ * application. `undefined` when the last message is not an assistant message
1830
+ * or sets no known tool.
1831
+ *
1832
+ * Streamed chunks and reloads re-create an identical `form_schema`; comparing
1833
+ * keys rather than object identity applies an app's value once and leaves a
1834
+ * later user toggle alone until the app sends a different value.
1835
+ */
1836
+ export declare const getFormSchemaToolSyncKey: (conversationId: string, messages: Message[], toolIds: readonly string[]) => {
1837
+ key: string;
1838
+ values: Record<string, boolean>;
1839
+ } | undefined;
1840
+
1684
1841
  /**
1685
1842
  * Returns the deployment the conversation was last running on: scanning
1686
1843
  * backwards, the `new_deployment_id` of a `model_changed` status message or
@@ -1704,6 +1861,15 @@ export declare const getLastDeploymentId: (messages: Message[]) => string | null
1704
1861
  */
1705
1862
  export declare const getLastUserMessageToolConfiguration: (messages: Message[]) => Record<string, unknown> | undefined;
1706
1863
 
1864
+ /**
1865
+ * Returns the tool configuration a (re-)loaded conversation should show: the
1866
+ * last user message's `configuration_value`, overlaid in order by the
1867
+ * `form_schema` values of the assistant messages after it. An app that turned
1868
+ * a toggle off in its final response must not see it re-armed on reload just
1869
+ * because the user message that started the run had it on.
1870
+ */
1871
+ export declare const getLatestToolConfiguration: (messages: Message[]) => Record<string, unknown> | undefined;
1872
+
1707
1873
  /**
1708
1874
  * Extracts the deployment/model ID from a DIAL Core conversation ID.
1709
1875
  *
@@ -1751,6 +1917,9 @@ export declare const getQuickAppConversationStarters: (conversationStarters: unk
1751
1917
  */
1752
1918
  export declare const getRemainingCharacters: (value: string, maxLength: number) => number | null;
1753
1919
 
1920
+ /** Returns the limit each over-long skill field exceeds, keyed by field; fields within their limit are omitted. */
1921
+ export declare const getSkillFieldLengthViolations: (values: Record<SkillTextField, string>) => Partial<Record<SkillTextField, number>>;
1922
+
1754
1923
  /**
1755
1924
  * Returns the text to start/populate a conversation from a selected starter button.
1756
1925
  * `description` (the schema property's shared intro/question text) is used only
@@ -1804,6 +1973,15 @@ export declare const getStarterSubmitText: (starter: StarterOption, description?
1804
1973
  */
1805
1974
  export declare const getTimeOfDayGreeting: (hour: number, translations: GreetingTranslations, firstName?: string) => string;
1806
1975
 
1976
+ /**
1977
+ * Returns the boolean values an assistant message's `form_schema` sets, keyed
1978
+ * by property name, or `undefined` when no property resolves to a boolean.
1979
+ * Lets a DIAL app switch a tools-menu toggle (e.g. `deep_research`) per
1980
+ * message — on while a run is in progress, off once its result is delivered.
1981
+ * Not filtered by tool id: `restoreToolConfiguration` ignores unknown ids.
1982
+ */
1983
+ export declare const getToolConfigurationFromFormSchema: (formSchema: DeploymentConfigurationSchema | undefined) => Record<string, boolean> | undefined;
1984
+
1807
1985
  /** Name of the same-origin `BroadcastChannel` shared by an OAuth flow's opener and its callback popup. */
1808
1986
  export declare const getToolsetOAuthChannelName: (flowId: string) => string;
1809
1987
 
@@ -1838,6 +2016,30 @@ export declare interface GreetingTranslations {
1838
2016
  nightNoName: string;
1839
2017
  }
1840
2018
 
2019
+ /** Content payload for an application-scoped grouped visualizer: every attachment a message's visualizer claims, rendered together inside one sandboxed iframe. */
2020
+ declare interface GroupedVisualizerCanvasContent {
2021
+ /** Discriminates the content type to select the correct renderer. */
2022
+ type: AttachmentContentType.GroupedVisualizer;
2023
+ /** Iframe `src`, resolved from the matching registry entry's `url`. */
2024
+ url: string;
2025
+ /** One item per claimed attachment, in the message's attachment order. Each `url` is absolute, resolved by the host. */
2026
+ attachments: GroupedAttachmentItem[];
2027
+ /** Presentation layout hints (`themeId`, `width`, `height`, `mobileHeight`) shared by every item. */
2028
+ layout: CustomVisualizerDataLayout;
2029
+ /** postMessage protocol namespace — MUST equal the registry entry's `title`, or the iframe never receives data. */
2030
+ visualizerName: string;
2031
+ /** Milliseconds to wait for a `send()` request's response before rejecting. From the registry entry; does NOT bound the handshake. */
2032
+ requestTimeout?: number;
2033
+ }
2034
+
2035
+ /** Outcome of building a grouped visualizer payload. */
2036
+ export declare interface GroupedVisualizerResolution {
2037
+ /** The grouped payload, or `null` when no claimed attachment resolved to a URL. */
2038
+ content: GroupedVisualizerCanvasContent | null;
2039
+ /** The claimed attachments that reached `content.attachments`, in the input's order. The caller returns the rest to the ordinary attachment tray. */
2040
+ resolved: DisplayAttachment[];
2041
+ }
2042
+
1841
2043
  /** Whether at least one tool toggle in `value` is active. */
1842
2044
  export declare const hasActiveToolConfig: (value: Record<string, boolean> | undefined) => boolean;
1843
2045
 
@@ -1856,6 +2058,9 @@ export declare const hasDialFileWritePermission: (folder?: DialFile) => boolean;
1856
2058
 
1857
2059
  export declare const hasForbiddenNameSymbols: (name: string, forbiddenSymbolsRegExp?: RegExp) => boolean;
1858
2060
 
2061
+ /** Returns `true` when both sets contain exactly the same paths. */
2062
+ export declare const hasSamePaths: (a: ReadonlySet<string>, b: ReadonlySet<string>) => boolean;
2063
+
1859
2064
  /**
1860
2065
  * Whether the operator configured the structured banner (title and/or
1861
2066
  * description) rather than only the legacy HTML message. Drives which of the
@@ -1907,8 +2112,8 @@ export declare const isAnswerIncomplete: (answer: Message | undefined) => boolea
1907
2112
  * True when the conversation's last message is an unresolved assistant
1908
2113
  * placeholder: the backend only persists a conversation at generation start
1909
2114
  * (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.
2115
+ * flagged `streamErrorMessage`/`wasStoppedByUser`). This can mean generation
2116
+ * is still active elsewhere, or that its terminal save failed.
1912
2117
  */
1913
2118
  export declare const isAwaitingGenerationResume: (conversation: Conversation) => boolean;
1914
2119
 
@@ -2043,8 +2248,8 @@ export declare const mapDeploymentDetailsDtoToEntityDetails: (dto: DeploymentDet
2043
2248
  /** Maps a deployment limits DTO to display-ready catalog limits, or `undefined` when no qualifying stats exist. */
2044
2249
  export declare const mapDeploymentLimitsDtoToCatalogLimits: (dto: DeploymentLimitsResponseDto | undefined, labels: DeploymentLimitsLabels) => CatalogItemLimits | undefined;
2045
2250
 
2046
- /** Maps the monthly deployment token limit to a display-ready value. */
2047
- export declare const mapDeploymentLimitsToInput: (dto: DeploymentLimitsResponseDto | undefined) => MonthlyUsageLimit | undefined;
2251
+ /** Maps a deployment's day, week, and month token limits and the caller's cost budget to display-ready rows, or `undefined` when none qualify. */
2252
+ export declare const mapDeploymentLimitsToInput: (dto: DeploymentLimitsResponseDto | undefined, labels: ConversationInputLimitsLabels, formatResetTime?: FormatResetTime) => CatalogItemLimits | undefined;
2048
2253
 
2049
2254
  /** Maps a deployment listing row into the catalog UI's `CatalogItem` shape. */
2050
2255
  export declare const mapDeploymentToCatalogItem: (deployment: DeploymentItemDto, { favoriteIds, entityDetails, folderLabels, editableSchemaIds, isCustomAppsEditable, activeLocale, primaryLocale, resolveIconUrl, }: MapDeploymentToCatalogItemOptions) => CatalogItem;
@@ -2110,12 +2315,18 @@ export declare const mapFileMetadataToDialFile: (metadata: FileMetadataResponseD
2110
2315
  export declare const mapFormValuesToCreateBody: (values: ScheduledTaskCreateFormValues) => CreateScheduledTaskBodyDto;
2111
2316
 
2112
2317
  /**
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.
2318
+ * Maps a complete, validated edit draft to an update body. An unset skill
2319
+ * emits null to remove the saved reference; hydrate from detail before editing.
2116
2320
  */
2117
2321
  export declare const mapFormValuesToUpdateBody: (values: ScheduledTaskCreateFormValues) => UpdateScheduledTaskBodyDto;
2118
2322
 
2323
+ /**
2324
+ * Maps the same top-level Cost budgets used by the aggregate cards into table-header state.
2325
+ *
2326
+ * @param formatResetTime - Formats each period's top-level `resetsAt` into the header's reset trio. Omit it to produce statuses with no reset fields.
2327
+ */
2328
+ export declare const mapOverallCostLimitsToPeriodStatuses: (usage: UserLimitStatsResponseDto | undefined, activeLocale: string, t: Translate_2, formatResetTime?: FormatResetTime) => ModelLimitPeriodStatuses;
2329
+
2119
2330
  /**
2120
2331
  * Maps a prompt DTO into a catalog item.
2121
2332
  *
@@ -2174,6 +2385,13 @@ export declare interface MapSkillToCatalogItemOptions {
2174
2385
  favoriteIds: ReadonlySet<string>;
2175
2386
  }
2176
2387
 
2388
+ /**
2389
+ * Returns the normalized stages of a raw stage array or a message-like
2390
+ * payload (reading `custom_content.stages`, falling back to
2391
+ * `customContent.stages`), or `undefined` when there are none.
2392
+ */
2393
+ export declare const mapStages: (source: RawStage[] | RawStageSource | null | undefined) => Stage[] | undefined;
2394
+
2177
2395
  /**
2178
2396
  * Maps a toolset's specification into the lib's credential-status shape,
2179
2397
  * for refreshing the details panel after login/logout. Includes both
@@ -2198,6 +2416,25 @@ export declare interface MapToolsetToCatalogItemOptions {
2198
2416
  resolveIconUrl: (iconUrl: string | undefined) => string | undefined;
2199
2417
  }
2200
2418
 
2419
+ /**
2420
+ * Maps a `UserLimitStatsResponseDto` into `UsageLimitCardGroup`'s `cards` prop,
2421
+ * in Today / This week / This month order. A period is omitted entirely when
2422
+ * the response carries no usable stat for it. Each card's reset trio comes from
2423
+ * `formatResetTime`, and is absent when that callback returns `undefined`.
2424
+ */
2425
+ export declare const mapUsageDataToDashboard: (usage: UserLimitStatsResponseDto | undefined, t: Translate, formatResetTime: FormatResetTime) => UsageLimitCardData[];
2426
+
2427
+ /**
2428
+ * Maps `usage.deployments` into `ModelLimitsSection`'s `rows` prop, joined with model or application
2429
+ * identity from `deploymentItems`. Rows are included only when any displayed period stat has nonzero
2430
+ * usage (Cost stats only, for an application). Order follows `Object.keys(deployments)` —
2431
+ * `deploymentItems` is enrichment-only.
2432
+ *
2433
+ * @param resolveIconUrl - Resolves a deployment's raw `iconUrl` to the URL the avatar should load.
2434
+ * @param resolveDisplayName - Resolves a localized-text map or plain string to the display name for `activeLocale`.
2435
+ */
2436
+ export declare const mapUserUsageToModelLimits: (usage: UserLimitStatsResponseDto | undefined, deploymentItems: DeploymentItemDto[], activeLocale: string, t: Translate_2, resolveIconUrl: ResolveIconUrl, resolveDisplayName: ResolveDisplayName) => ModelLimitRow[];
2437
+
2201
2438
  /** Content payload for Markdown file attachments. */
2202
2439
  declare interface MarkdownCanvasContent {
2203
2440
  /** Discriminates the content type to select the correct renderer. */
@@ -2218,6 +2455,8 @@ declare type McpAppDisplayMode = NonNullable<McpUiHostContext['displayMode']>;
2218
2455
  declare interface McpAppHostAdapter {
2219
2456
  /** `McpUiHostContext` to deliver to the mounted app's `ui/initialize` handshake. */
2220
2457
  hostContext: McpUiHostContext;
2458
+ /** Host identity (`name`/`version`) to deliver to the mounted app's `ui/initialize` handshake. */
2459
+ hostInfo: Implementation;
2221
2460
  /** Operator-configured MCP Apps sandbox-proxy URL, or `null` when unconfigured. */
2222
2461
  sandboxUrl: string | null;
2223
2462
  /** Fetches the matched tool's MCP Apps `ui://` resource. */
@@ -2234,7 +2473,7 @@ export declare interface McpAppHostContextParams {
2234
2473
  mcpAppTheme?: string;
2235
2474
  /** Host's current i18n locale (BCP 47). */
2236
2475
  locale: string;
2237
- /** Operator-configured MCP App user-agent override. Defaults to `'ai-dial-chat'`. */
2476
+ /** Operator-configured MCP App user-agent override. Defaults to the browser's own `navigator.userAgent`. */
2238
2477
  mcpAppUserAgent?: string;
2239
2478
  /**
2240
2479
  * Display modes the host can switch an app between via
@@ -2356,6 +2595,31 @@ export declare enum McpResourceKind {
2356
2595
 
2357
2596
  export declare const mergeCreatedFolderIntoCache: (cache: Map<string, ListFilesItemDto[]>, parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => Map<string, ListFilesItemDto[]>;
2358
2597
 
2598
+ /**
2599
+ * Merges a freshly-fetched page 0 into the currently-loaded run list: an
2600
+ * already-known id is replaced in place at its existing array position, an
2601
+ * unseen id is prepended (upstream order is `created_at desc`, so it is the
2602
+ * newest), and an id absent from `incoming` is left untouched — a background
2603
+ * refresh never removes a loaded run.
2604
+ */
2605
+ export declare const mergeRunsById: (current: ScheduledTaskRunDto[], incoming: ScheduledTaskRunDto[]) => ScheduledTaskRunDto[];
2606
+
2607
+ /**
2608
+ * Merges incoming stage deltas into an existing stage list, keyed by `index`.
2609
+ *
2610
+ * Partial `name` and `content` strings are concatenated across chunks;
2611
+ * attachments are merged by their own `index` (concatenating partial `title`
2612
+ * and `data`); every other field on the incoming delta overwrites the
2613
+ * accumulated one. A brand-new stage whose first chunk carries `name: null`
2614
+ * is normalized to `''`.
2615
+ *
2616
+ * Exported for hosts that keep a flattened `Stage[]` on the message instead
2617
+ * of `Message.custom_content.stages` and therefore cannot reuse
2618
+ * {@link applyChunkToMessages}. Prefer `useConversationStream` when the host
2619
+ * can delegate the whole stream loop.
2620
+ */
2621
+ export declare const mergeStages: (existing: Stage[], incoming: Stage[]) => Stage[];
2622
+
2359
2623
  /** True when `message` is an assistant message carrying at least one stage. */
2360
2624
  export declare const messageHasStages: (message: Message) => boolean;
2361
2625
 
@@ -2365,10 +2629,31 @@ export declare interface MessagePair {
2365
2629
  assistantMessage: Message;
2366
2630
  }
2367
2631
 
2632
+ /** A stable snapshot of one eligible native text selection. */
2633
+ export declare interface MessageSelectionReplySnapshot {
2634
+ /** Scope that owned the selection when it was captured. */
2635
+ conversationId: string;
2636
+ /** Message text root containing the captured range. */
2637
+ body: HTMLDivElement;
2638
+ /** Captured native range. */
2639
+ range: Range;
2640
+ /** Native selected text preserved for the generated file. */
2641
+ text: string;
2642
+ /** Visible fragment of the selected range. */
2643
+ rect: DOMRect;
2644
+ }
2645
+
2368
2646
  /** Formats MIME types as a human-readable, comma-separated list of dotted extensions (or the MIME type itself for wildcards). */
2369
2647
  export declare const mimeTypesToAttachmentExtensionLabels: (types: string[]) => string;
2370
2648
 
2371
- /** Normalizes `*` to the all-files wildcard and drops any value that is not a valid `DialFileAcceptType`. */
2649
+ /**
2650
+ * Normalizes `*` to the all-files wildcard, canonicalizes MIME aliases, and drops
2651
+ * any value that is not a valid `DialFileAcceptType`.
2652
+ *
2653
+ * Aliases are resolved because a file picker matches an `accept` entry against its
2654
+ * own MIME table: a declared `text/json` offers no `.json` file, while the
2655
+ * `application/json` it denotes does.
2656
+ */
2372
2657
  export declare const mimeTypesToDialFileAcceptTypes: (types?: string[]) => DialFileAcceptType[] | undefined;
2373
2658
 
2374
2659
  /**
@@ -2396,6 +2681,7 @@ export declare interface ModelCapabilities {
2396
2681
  hasResume?: boolean;
2397
2682
  hasChatCompletion?: boolean;
2398
2683
  hasResponsesApi?: boolean;
2684
+ hasSkills?: boolean;
2399
2685
  reasoningEfforts?: string[];
2400
2686
  }
2401
2687
 
@@ -2435,18 +2721,6 @@ export declare interface ModelSpecification {
2435
2721
  createdAt?: number;
2436
2722
  }
2437
2723
 
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
2724
  /** Returns a skill relative path's final segment (its display name in the file tree). */
2451
2725
  export declare const nameFromPath: (path: string) => string;
2452
2726
 
@@ -2458,6 +2732,20 @@ export declare const nameFromPath: (path: string) => string;
2458
2732
  */
2459
2733
  export declare const navigateToolsetOAuthPopup: (popup: Window, auth: ToolsetOAuthSettings, toolsetId: string, callbackPath: string, credentialsLevel?: ToolsetCredentialsLevel, resourceKind?: OAuthResourceKind, offlineUsageConsent?: boolean) => ToolsetOAuthInitiationResult;
2460
2734
 
2735
+ /**
2736
+ * Encodes a deployment/application id to its single-encoded form regardless
2737
+ * of whether the value it received was already percent-encoded or the raw,
2738
+ * human-readable form — decoding first then re-encoding once is idempotent
2739
+ * either way, since `decodeDeploymentId` on a raw (unencoded) id is a no-op.
2740
+ * Use this instead of `encodeDeploymentId` at a boundary that cannot
2741
+ * guarantee which form it receives, such as a `postMessage` payload from the
2742
+ * settings iframe: calling `encodeDeploymentId` directly on a value the
2743
+ * sender already encoded escapes the existing `%` characters a second time
2744
+ * (`%20` becomes `%2520`), which the backend only ever undoes once and so
2745
+ * 404s on.
2746
+ */
2747
+ export declare const normalizeDeploymentId: (id: string) => string;
2748
+
2461
2749
  /**
2462
2750
  * Normalises a stored response-format string to the current enum. Legacy data
2463
2751
  * may contain `'Markdown'` or `'PlainText'` (capital-first) instead of the
@@ -2473,6 +2761,19 @@ export declare const normalizeResponseFormat: (value: string | undefined) => Res
2473
2761
  */
2474
2762
  export declare const normalizeSkillName: (input: string) => string;
2475
2763
 
2764
+ /**
2765
+ * Encodes a toolset id to its single-encoded form regardless of whether the
2766
+ * value received it in was already percent-encoded or the raw,
2767
+ * human-readable form — decoding first then re-encoding once is idempotent
2768
+ * either way, since `decodeToolsetId` on a raw (unencoded) id is a no-op.
2769
+ * Use this instead of `encodeToolsetId` at a boundary that cannot guarantee
2770
+ * which form it receives, such as a `postMessage` payload from an embedded
2771
+ * iframe: calling `encodeToolsetId` directly on a value the sender already
2772
+ * encoded escapes the existing `%` characters a second time (`%20` becomes
2773
+ * `%2520`), which the backend only ever undoes once and so 404s on.
2774
+ */
2775
+ export declare const normalizeToolsetId: (toolsetId: string) => string;
2776
+
2476
2777
  export declare const normalizeVirtualPath: (value: string) => string;
2477
2778
 
2478
2779
  /** Arguments handed to the host's exchange callback. */
@@ -2544,6 +2845,16 @@ declare interface OoxmlDocxHighlightLocation {
2544
2845
  text: string;
2545
2846
  }
2546
2847
 
2848
+ /** A complete table row in the DOCX body, matched by cell text. */
2849
+ declare interface OoxmlDocxTableRowLocation {
2850
+ /** Location kind. */
2851
+ kind: OoxmlHighlightKind.DocxTableRow;
2852
+ /** Plain text of each cell, in column order. */
2853
+ cells: string[];
2854
+ /** 1-based matching row in document order. */
2855
+ occurrence: number;
2856
+ }
2857
+
2547
2858
  /** Supported document formats rendered by the installed `@silurus/ooxml` runtime. */
2548
2859
  declare enum OoxmlFileType {
2549
2860
  Docx = 'docx',
@@ -2566,6 +2877,10 @@ declare enum OoxmlHighlightKind {
2566
2877
  DocxTextRange = 'docxTextRange',
2567
2878
  /** A character range inside a single PPTX shape on one slide. */
2568
2879
  PptxTextRange = 'pptxTextRange',
2880
+ /** A complete DOCX table row identified by its cell text. */
2881
+ DocxTableRow = 'docxTableRow',
2882
+ /** A complete PPTX table row identified by its cell text on one slide. */
2883
+ PptxTableRow = 'pptxTableRow',
2569
2884
  /** One cell, or a contiguous same-row cell range, on a named XLSX sheet. */
2570
2885
  XlsxCellRange = 'xlsxCellRange',
2571
2886
  }
@@ -2574,6 +2889,8 @@ declare enum OoxmlHighlightKind {
2574
2889
  declare type OoxmlHighlightLocation =
2575
2890
  | OoxmlDocxHighlightLocation
2576
2891
  | OoxmlPptxHighlightLocation
2892
+ | OoxmlDocxTableRowLocation
2893
+ | OoxmlPptxTableRowLocation
2577
2894
  | OoxmlXlsxHighlightLocation;
2578
2895
 
2579
2896
  /** A cited character range inside a single shape on one PPTX slide. */
@@ -2592,6 +2909,18 @@ declare interface OoxmlPptxHighlightLocation {
2592
2909
  text: string;
2593
2910
  }
2594
2911
 
2912
+ /** A complete table row on one PPTX slide, matched by cell text. */
2913
+ declare interface OoxmlPptxTableRowLocation {
2914
+ /** Location kind. */
2915
+ kind: OoxmlHighlightKind.PptxTableRow;
2916
+ /** Plain text of each cell, in column order. */
2917
+ cells: string[];
2918
+ /** 1-based matching row on the specified slide. */
2919
+ occurrence: number;
2920
+ /** 1-based slide number. */
2921
+ slide: number;
2922
+ }
2923
+
2595
2924
  /** A cited cell, or contiguous same-row cell range, on a named XLSX sheet. */
2596
2925
  declare interface OoxmlXlsxHighlightLocation {
2597
2926
  /** Discriminates this location within `OoxmlHighlightLocation`. */
@@ -2763,6 +3092,15 @@ export declare const prepareMoveRenameItems: (copiedItems: DialCopiedItem[], buc
2763
3092
  preparedMoveItems: PreparedCopyMoveItem<MoveItemDto>[];
2764
3093
  };
2765
3094
 
3095
+ /**
3096
+ * Validates form values before creating a request body. Hosts translate the
3097
+ * returned field codes and must not issue a write when `ok` is false.
3098
+ */
3099
+ export declare const prepareScheduledTaskCreateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<CreateScheduledTaskBodyDto>;
3100
+
3101
+ /** Validates form values before preparing an update request body. */
3102
+ export declare const prepareScheduledTaskUpdateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<UpdateScheduledTaskBodyDto>;
3103
+
2766
3104
  /** Maximum body length accepted by `CreatePromptDto.content`. */
2767
3105
  export declare const PROMPT_CONTENT_MAX_LENGTH = 50000;
2768
3106
 
@@ -2814,7 +3152,11 @@ export declare enum PromptSource {
2814
3152
  Public = "public"
2815
3153
  }
2816
3154
 
2817
- /** DIAL Core bucket holding organisation-wide skills. */
3155
+ /**
3156
+ * DIAL Core bucket holding organisation-wide skills.
3157
+ *
3158
+ * @deprecated Use `PUBLIC_BUCKET` from `@epam/ai-dial-chat-shared`.
3159
+ */
2818
3160
  export declare const PUBLIC_SKILL_BUCKET = "public";
2819
3161
 
2820
3162
  /** The DIAL publish API surface produced by {@link createPublishApiClient}. */
@@ -2846,6 +3188,63 @@ export declare interface QuickAppSchemaLike {
2846
3188
  displayName?: string;
2847
3189
  }
2848
3190
 
3191
+ /**
3192
+ * One stage as it arrives from the REST API or the SSE stream, before
3193
+ * normalization. Structurally satisfied by the generated `StageDto` and by a
3194
+ * raw stream delta, both of which omit `index`/`name`/`status` on the chunk
3195
+ * that opens a stage.
3196
+ */
3197
+ export declare interface RawStage {
3198
+ /** Ordering key. Defaults to `0` when absent. */
3199
+ index?: number | null;
3200
+ /** Stage title. `null` on the chunk that opens the stage. */
3201
+ name?: string | null;
3202
+ /** Terminal state as a raw wire string; anything other than `'completed'`/`'failed'` means still running. */
3203
+ status?: string | null;
3204
+ /** Additional stage text. */
3205
+ content?: string | null;
3206
+ /** Short source/category label shown beside the stage name. */
3207
+ tag?: string | null;
3208
+ /** Files produced or referenced by this stage. */
3209
+ attachments?: RawStageAttachment[] | null;
3210
+ }
3211
+
3212
+ /**
3213
+ * One stage attachment as it arrives from the REST API or the SSE stream,
3214
+ * before normalization: every field is optional and may be `null`.
3215
+ */
3216
+ export declare interface RawStageAttachment {
3217
+ /** Zero-based position in the attachment list. */
3218
+ index?: number | null;
3219
+ /** MIME type of the attachment content. */
3220
+ type?: string | null;
3221
+ /** Display name shown in the UI. */
3222
+ title?: string | null;
3223
+ /** Inline base-64 encoded content. */
3224
+ data?: string | null;
3225
+ /** Remote URL pointing to the attachment content. */
3226
+ url?: string | null;
3227
+ /** MIME type of the referenced resource. */
3228
+ reference_type?: string | null;
3229
+ /** URL of an alternate reference resource. */
3230
+ reference_url?: string | null;
3231
+ }
3232
+
3233
+ /**
3234
+ * Message-like payload carrying stages under either the wire's snake_case
3235
+ * `custom_content` or a host's camelCased `customContent`.
3236
+ */
3237
+ export declare interface RawStageSource {
3238
+ /** Custom content as the DIAL wire format spells it. */
3239
+ custom_content?: {
3240
+ stages?: RawStage[] | null;
3241
+ } | null;
3242
+ /** Custom content as a camelCasing host spells it. */
3243
+ customContent?: {
3244
+ stages?: RawStage[] | null;
3245
+ } | null;
3246
+ }
3247
+
2849
3248
  /**
2850
3249
  * Reads a skill file response as raw bytes, or `null` when the body is
2851
3250
  * larger than `SKILL_MANIFEST_MAX_BYTES`. The declared `content-length` is
@@ -2919,6 +3318,23 @@ export declare const referenceAttachmentToPdfCanvasContent: (attachment: Attachm
2919
3318
  /** Name reserved for the hidden marker file used to create empty folders. */
2920
3319
  export declare const RESERVED_MARKER_NAME = ".dial_folder";
2921
3320
 
3321
+ /**
3322
+ * One reset time, already parsed and formatted by the host. Declared
3323
+ * structurally here so this library never imports an application type; the
3324
+ * host passes a value that satisfies this shape (e.g. `apps/chat`'s own
3325
+ * `ResetTimeDisplay`).
3326
+ */
3327
+ export declare interface ResetTimeDisplay {
3328
+ /** Exclusive end of the period as an epoch ms value, for the host's boundary scheduling. */
3329
+ resetsAtMs: number;
3330
+ /** Machine-readable instant for a `<time dateTime>` attribute. */
3331
+ isoValue: string;
3332
+ /** Visible reset line. */
3333
+ label: string;
3334
+ /** Accessible expansion of the reset line. */
3335
+ ariaLabel: string;
3336
+ }
3337
+
2922
3338
  /**
2923
3339
  * Resolves the primary action for a catalog item.
2924
3340
  *
@@ -2938,7 +3354,8 @@ export declare const resolveCatalogPrimaryAction: (item: CatalogItem, fetchPromp
2938
3354
  /** Resolves a syntax-highlighted code canvas content payload from a DisplayAttachment, or `null` if unavailable. */
2939
3355
  export declare const resolveCodeCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, language?: string) => Promise<CodeCanvasContent | ErrorCanvasContent | null>;
2940
3356
 
2941
- export declare const resolveDeploymentFolder: (deployment: Pick<DeploymentItemDto, "isMy" | "sharedWithMe" | "applicationFolder">, labels: DeploymentFolderLabels) => string[];
3357
+ /** Resolves a deployment's display folder, including organization applications without a folder path. */
3358
+ export declare const resolveDeploymentFolder: (deployment: Pick<DeploymentItemDto, "isMy" | "sharedWithMe" | "applicationFolder"> & Partial<Pick<DeploymentItemDto, "type">>, labels: DeploymentFolderLabels) => string[];
2942
3359
 
2943
3360
  /**
2944
3361
  * Resolves a DialFile to the bucket-relative API path used by files BFF endpoints.
@@ -2956,6 +3373,9 @@ export declare const resolveDialFileBucketAndPath: (fileId: string) => {
2956
3373
  path: string;
2957
3374
  } | undefined;
2958
3375
 
3376
+ /** A callback that resolves a display name from a localized-text value. */
3377
+ declare type ResolveDisplayName = (name: string | Record<string, string> | undefined | null, locale: string) => string;
3378
+
2959
3379
  /** Resolves a DIAL Core file id to a downloadable URL. Host-owned — encodes the app's own file-download endpoint. */
2960
3380
  export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
2961
3381
 
@@ -2974,6 +3394,17 @@ export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
2974
3394
  */
2975
3395
  export declare const resolveExternalSourceContentType: (contentType: string, url: string) => string;
2976
3396
 
3397
+ /**
3398
+ * Builds the grouped payload for an application-scoped visualizer from the
3399
+ * attachments its entry claims, reporting which of them `resolveAbsoluteUrl`
3400
+ * could produce a URL for. Unlike the single-attachment resolver this fetches
3401
+ * nothing: the grouped protocol hands the visualizer URLs and lets it read
3402
+ * them itself, so the URLs must be absolute — a host-relative path would
3403
+ * resolve against the iframe's own origin. Producing one is host knowledge,
3404
+ * which is why it arrives as a callback rather than being built here.
3405
+ */
3406
+ export declare const resolveGroupedVisualizerCanvasContent: (attachments: DisplayAttachment[], resolveAbsoluteUrl: (attachment: DisplayAttachment) => string | undefined, entry: ApplicationVisualizer, themeId: string) => GroupedVisualizerResolution;
3407
+
2977
3408
  /**
2978
3409
  * Resolves an HTML canvas content payload from a DisplayAttachment.
2979
3410
  * Fetches and inlines the HTML as `srcdoc` when the attachment has a download URL or inline data.
@@ -2982,6 +3413,9 @@ export declare const resolveExternalSourceContentType: (contentType: string, url
2982
3413
  */
2983
3414
  export declare const resolveHtmlCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<HtmlCanvasContent | ErrorCanvasContent | null>;
2984
3415
 
3416
+ /** A callback that resolves an icon URL from a deployment's raw `iconUrl` field. */
3417
+ declare type ResolveIconUrl = (iconUrl: string | undefined) => string | undefined;
3418
+
2985
3419
  /**
2986
3420
  * Resolves an image canvas content payload from a DisplayAttachment without
2987
3421
  * fetching — returns a local blob URL or the BFF download URL directly so the
@@ -3035,6 +3469,9 @@ export declare const resolvePdfCanvasContent: (attachment: DisplayAttachment, re
3035
3469
  */
3036
3470
  export declare const resolveRelativeDialFilePath: (pathOrFileId: string, bucket: string) => string;
3037
3471
 
3472
+ /** Returns the section whose root label is the first segment of `virtualPath`, or `undefined` when none matches. */
3473
+ export declare const resolveSectionByPath: <TSection extends DialFileManagerSection>(virtualPath: string, sections: readonly TSection[]) => TSection | undefined;
3474
+
3038
3475
  /**
3039
3476
  * Converts an opaque file-listing id into the path expected by the single-file
3040
3477
  * download endpoint. Core may prefix listing paths with the skill path and its
@@ -3054,6 +3491,16 @@ export declare const resolveSkillManifestFileId: (files: SkillMetadataItemDto[],
3054
3491
  /** Resolves a plain-text canvas content payload from a DisplayAttachment, or `null` if unavailable. */
3055
3492
  export declare const resolveTextCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<PlainTextCanvasContent | ErrorCanvasContent | null>;
3056
3493
 
3494
+ /**
3495
+ * Resolves which credentials level a toolset's login applies to, per DIAL
3496
+ * Core's public/private toolset convention: a `public`-bucket toolset is
3497
+ * shared credentials-wise at `User` level, while a private/workspace toolset
3498
+ * is scoped at `Global` level. Every surface that drives a toolset login
3499
+ * (the sign-in-interrupt dialog, the QuickApps editor iframe bridge,
3500
+ * `useToolsetLogin`) must resolve the level this way rather than assuming one.
3501
+ */
3502
+ export declare const resolveToolsetCredentialsLevel: (toolsetId: string) => ToolsetCredentialsLevel.User | ToolsetCredentialsLevel.Global;
3503
+
3057
3504
  /**
3058
3505
  * Fetches the attachment payload and builds a `VisualizerCanvasContent` for the
3059
3506
  * given registry entry and theme. Returns `null` when the payload cannot be
@@ -3107,6 +3554,114 @@ export declare type ScheduledTaskDtoMappingResult = {
3107
3554
  reason: UnsupportedTriggerReason;
3108
3555
  };
3109
3556
 
3557
+ /** A checked request preparation result that never serializes invalid values. */
3558
+ export declare type ScheduledTaskPreparationResult<TBody> = {
3559
+ ok: true;
3560
+ body: TBody;
3561
+ } | {
3562
+ ok: false;
3563
+ errors: ScheduledTaskValidationErrors;
3564
+ };
3565
+
3566
+ export declare interface ScheduledTaskRunsListRequest {
3567
+ scheduleId: string;
3568
+ limit?: number;
3569
+ offset?: number;
3570
+ signal?: AbortSignal;
3571
+ }
3572
+
3573
+ export declare interface ScheduledTasksApiClient {
3574
+ listScheduledTasks: (request?: ScheduledTasksListRequest) => Promise<ListScheduledTasksResponseDto>;
3575
+ listScheduledTaskRuns: (request: ScheduledTaskRunsListRequest) => Promise<ListScheduledTaskRunsResponseDto>;
3576
+ createScheduledTask: (body: CreateScheduledTaskBodyDto) => Promise<CreatedScheduledTaskDto>;
3577
+ getScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3578
+ updateScheduledTask: (scheduleId: string, body: UpdateScheduledTaskBodyDto) => Promise<UpdatedScheduledTaskDto>;
3579
+ pauseScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3580
+ resumeScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3581
+ deleteScheduledTask: (scheduleId: string) => Promise<void>;
3582
+ }
3583
+
3584
+ /** Narrow configured generated-client surface required by scheduler hooks. */
3585
+ export declare interface ScheduledTasksConfiguredClient {
3586
+ listScheduledTasks: (request: {
3587
+ limit?: number;
3588
+ offset?: number;
3589
+ search?: string;
3590
+ sort?: ListScheduledTasksSortEnum;
3591
+ }, options?: RequestInit) => Promise<ListScheduledTasksResponseDto>;
3592
+ listScheduledTaskRuns: (request: {
3593
+ scheduleId: string;
3594
+ limit?: number;
3595
+ offset?: number;
3596
+ }, options?: RequestInit) => Promise<ListScheduledTaskRunsResponseDto>;
3597
+ createScheduledTask: (request: {
3598
+ createScheduledTaskBodyDto: CreateScheduledTaskBodyDto;
3599
+ }) => Promise<CreatedScheduledTaskDto>;
3600
+ getScheduledTask: (request: {
3601
+ scheduleId: string;
3602
+ }) => Promise<ScheduledTaskDto>;
3603
+ updateScheduledTask: (request: {
3604
+ scheduleId: string;
3605
+ updateScheduledTaskBodyDto: UpdateScheduledTaskBodyDto;
3606
+ }) => Promise<UpdatedScheduledTaskDto>;
3607
+ pauseScheduledTask: (request: {
3608
+ scheduleId: string;
3609
+ }) => Promise<ScheduledTaskDto>;
3610
+ resumeScheduledTask: (request: {
3611
+ scheduleId: string;
3612
+ }) => Promise<ScheduledTaskDto>;
3613
+ deleteScheduledTask: (request: {
3614
+ scheduleId: string;
3615
+ }) => Promise<void>;
3616
+ }
3617
+
3618
+ /** App-agnostic request options accepted by the scheduler facade. */
3619
+ export declare interface ScheduledTasksListRequest {
3620
+ limit?: number;
3621
+ offset?: number;
3622
+ search?: string;
3623
+ sort?: ListScheduledTasksSortEnum;
3624
+ signal?: AbortSignal;
3625
+ }
3626
+
3627
+ export declare interface ScheduledTaskTriggerDescription {
3628
+ kind: ScheduledTaskTriggerDescriptionKind;
3629
+ time?: string;
3630
+ dayOfWeek?: string;
3631
+ dayOfMonth?: string;
3632
+ intervalMinutes?: number;
3633
+ date?: Date;
3634
+ expression?: string;
3635
+ sourceTimezone: 'utc';
3636
+ }
3637
+
3638
+ /** Display categories are independent of task editability. */
3639
+ export declare enum ScheduledTaskTriggerDescriptionKind {
3640
+ OneTime = "oneTime",
3641
+ Hourly = "hourly",
3642
+ EveryNMinutes = "everyNMinutes",
3643
+ Daily = "daily",
3644
+ Weekly = "weekly",
3645
+ Monthly = "monthly",
3646
+ Custom = "custom",
3647
+ Invalid = "invalid"
3648
+ }
3649
+
3650
+ export declare interface ScheduledTaskTriggerDescriptionOptions {
3651
+ /** Display timezone; defaults to UTC for backwards compatibility. */
3652
+ timeZone?: string;
3653
+ /** Date whose timezone offset is used. Defaults to now (the existing UTC-storage policy). */
3654
+ referenceDate?: Date;
3655
+ }
3656
+
3657
+ /**
3658
+ * Picks the auth-status field matching one credentials level out of a
3659
+ * toolset's `authSettings` — DIAL Core reports `userLevelAuthStatus` and
3660
+ * `globalAuthStatus` as independent fields rather than one status keyed by
3661
+ * level.
3662
+ */
3663
+ export declare const selectToolsetAuthStatus: (authSettings: Pick<DialToolsetAuthSettingsDto, "userLevelAuthStatus" | "globalAuthStatus"> | undefined, credentialsLevel: ToolsetCredentialsLevel) => string | undefined;
3664
+
3110
3665
  /** Serializes a prompt export envelope into a pretty-printed JSON blob. */
3111
3666
  export declare const serializePromptExport: (envelope: PromptExportFormat) => Blob;
3112
3667
 
@@ -3158,6 +3713,9 @@ export declare const SKILL_MANIFEST_FILE = "SKILL.md";
3158
3713
  */
3159
3714
  export declare const SKILL_MANIFEST_MAX_BYTES: number;
3160
3715
 
3716
+ /** Length limit of each skill editor text field. */
3717
+ export declare const SKILL_TEXT_FIELD_MAX_LENGTHS: Record<SkillTextField, number>;
3718
+
3161
3719
  /**
3162
3720
  * Client-side mirror of the backend's default `SKILL_UPLOAD_MAX_FILES`
3163
3721
  * (`apps/chat-api/src/config/environment.config.ts`), used only for
@@ -3182,6 +3740,28 @@ export declare interface SkillAboutDetails {
3182
3740
  skillPrompt?: string;
3183
3741
  }
3184
3742
 
3743
+ /** Semantic classification of an import request failure. */
3744
+ export declare enum SkillArchiveImportErrorKind {
3745
+ Validation = "validation",
3746
+ Collision = "collision",
3747
+ RateLimited = "rateLimited",
3748
+ ServiceUnavailable = "serviceUnavailable",
3749
+ Generic = "generic"
3750
+ }
3751
+
3752
+ /** Phase of a skill-archive import, driving the host's loading/success/error presentation. */
3753
+ export declare enum SkillArchiveImportStatus {
3754
+ Idle = "idle",
3755
+ Uploading = "uploading",
3756
+ Success = "success",
3757
+ Error = "error"
3758
+ }
3759
+
3760
+ /** Reason a selected/dropped file was rejected before any request was made. */
3761
+ export declare enum SkillArchiveSelectionRejectionReason {
3762
+ UnsupportedFilename = "unsupportedFilename"
3763
+ }
3764
+
3185
3765
  /** Injected API port for skill detail fetching. Mirrors exact server-api wrapper signatures. */
3186
3766
  export declare interface SkillDetailsApi {
3187
3767
  /** Downloads a raw skill file, returning the raw fetch `Response`. */
@@ -3195,6 +3775,12 @@ export declare interface SkillDetailsApi {
3195
3775
  limit?: number;
3196
3776
  recursive?: boolean;
3197
3777
  }, signal?: AbortSignal): Promise<SkillFileListResponseDto>;
3778
+ /**
3779
+ * Fetches a single skill's own authoritative metadata (`author`,
3780
+ * `updatedAt`, and the rest of `SkillMetadataItemDto`) — not the catalog
3781
+ * listing entry, which may be sparse for a shared skill.
3782
+ */
3783
+ getSkillMetadata(bucket: string, path: string, signal?: AbortSignal): Promise<SkillMetadataItemDto>;
3198
3784
  }
3199
3785
 
3200
3786
  /** Already-configured DIAL Core download operations `useSkillEditorLoad` needs. */
@@ -3238,6 +3824,14 @@ export declare interface SkillEditorSubmitClient {
3238
3824
  export declare interface SkillEditorSubmitMessages {
3239
3825
  /** Shown when a required field is empty. */
3240
3826
  required: string;
3827
+ /** Shown when a name, description or instructions value exceeds its length limit, given that limit. */
3828
+ tooLong: (maxLength: number) => string;
3829
+ /**
3830
+ * Shown when the Instructions value opens with its own YAML frontmatter
3831
+ * block — pasting a whole `SKILL.md` in there would otherwise produce a
3832
+ * manifest with two frontmatter blocks.
3833
+ */
3834
+ instructionsFrontmatter: string;
3241
3835
  /** Shown when the normalized skill name fails DIAL's naming rules. */
3242
3836
  nameInvalid: string;
3243
3837
  /** Shown when the skill name already exists (409), or defensively on an unreachable create-mode 412. */
@@ -3438,12 +4032,37 @@ export declare enum SkillSource {
3438
4032
  Public = "public"
3439
4033
  }
3440
4034
 
4035
+ /** Skill editor text fields with a length limit. */
4036
+ export declare type SkillTextField = 'name' | 'description' | 'instructions';
4037
+
3441
4038
  /** Splits a file name into its base and extension, using only the last dot. */
3442
4039
  export declare const splitFileNameExtension: (fileName: string) => {
3443
4040
  base: string;
3444
4041
  extension: string;
3445
4042
  };
3446
4043
 
4044
+ /**
4045
+ * Answers one question: would appending this text after the fence that
4046
+ * `buildSkillManifest` writes produce a *second* frontmatter block?
4047
+ *
4048
+ * That happens when the text's first non-blank line is a bare `---` and some
4049
+ * later line is a bare `---` too — the exact shape of a `SKILL.md` pasted
4050
+ * wholesale into the editor's Instructions field.
4051
+ *
4052
+ * Detection is deliberately structural rather than YAML-based: a pasted block
4053
+ * whose fenced content fails to parse corrupts the stored manifest
4054
+ * identically (and renders as a setext `h2` in the Catalog's Details tab just
4055
+ * the same), so requiring parseable YAML here would let the worst cases
4056
+ * through. Keeping `parseYaml` out also makes this cheap enough to run on
4057
+ * every keystroke.
4058
+ *
4059
+ * A single unclosed fence returns `false`: with no closing fence there is no
4060
+ * second block, matching `FRONTMATTER_PATTERN`'s own requirement. A `---`
4061
+ * appearing later in the body (a horizontal rule, a setext underline) is
4062
+ * likewise not a frontmatter block.
4063
+ */
4064
+ export declare const startsWithFrontmatterBlock: (text: string) => boolean;
4065
+
3447
4066
  /** Options accepted by {@link ConversationStreamTransport.streamCompletion}. */
3448
4067
  export declare interface StreamCompletionOptions {
3449
4068
  onChunk: (chunk: StreamChunk) => void;
@@ -3452,6 +4071,29 @@ export declare interface StreamCompletionOptions {
3452
4071
  signal: AbortSignal;
3453
4072
  }
3454
4073
 
4074
+ /**
4075
+ * Reported through `onError` when the network connection carrying a
4076
+ * completion stream is lost (a rejected `fetch`, or a read that fails after a
4077
+ * 2xx response) or goes silent past the idle timeout — what a laptop sleep or
4078
+ * a phone lock mid-generation produces. The backend-owned generation may
4079
+ * still be running, so the caller can recover it rather than treat the
4080
+ * response as failed. `cause` holds the original error, when there is one.
4081
+ */
4082
+ export declare class StreamInterruptedError extends Error {
4083
+ constructor(cause?: unknown);
4084
+ }
4085
+
4086
+ /**
4087
+ * Reported through `onError` when DIAL Core itself signals a failure with an
4088
+ * in-band `{ error: { message } }` SSE chunk. Its `message` is upstream text
4089
+ * intended for the user, unlike a transport failure (failed `fetch`, non-OK
4090
+ * status, broken stream), whose message is technical detail. A custom
4091
+ * transport raises this for any user-facing upstream error text.
4092
+ */
4093
+ export declare class StreamUpstreamError extends Error {
4094
+ constructor(message: string);
4095
+ }
4096
+
3455
4097
  /** Strips leading and trailing slashes from a path segment. */
3456
4098
  export declare const stripSurroundingSlashes: (path: string) => string;
3457
4099
 
@@ -3769,6 +4411,13 @@ export declare const toPublishEntityType: (type: CatalogEntityType) => CatalogPu
3769
4411
  */
3770
4412
  export declare const toPublishRuleDto: (rule: PublicationRule) => PublishRuleDto;
3771
4413
 
4414
+ /**
4415
+ * Returns a renderable `Stage` for one raw payload: `index` defaults to `0`,
4416
+ * `name` to `''`, an unrecognized `status` to `null` (still running), and
4417
+ * `content`/`tag`/`attachments` are passed through when present.
4418
+ */
4419
+ export declare const toStage: (stage: RawStage) => Stage;
4420
+
3772
4421
  /** Request shape the host's selected-deployment recognition call accepts. */
3773
4422
  export declare interface TranscribeWithDeploymentParams {
3774
4423
  audioUrl: string;
@@ -3777,6 +4426,12 @@ export declare interface TranscribeWithDeploymentParams {
3777
4426
  signal: AbortSignal;
3778
4427
  }
3779
4428
 
4429
+ /** A translate function compatible with i18next's `TFunction`. */
4430
+ declare type Translate = (key: string, options?: Record<string, unknown>) => string;
4431
+
4432
+ /** A translate function compatible with i18next's `TFunction`. */
4433
+ declare type Translate_2 = (key: string, options?: Record<string, unknown>) => string;
4434
+
3780
4435
  export declare const trimFileNameToByteLimit: (name: string, limit?: number) => string;
3781
4436
 
3782
4437
  /** An error thrown to indicate the caller is unauthenticated. */
@@ -3785,6 +4440,9 @@ export declare interface UnauthorizedErrorLike extends Error {
3785
4440
  readonly url: string;
3786
4441
  }
3787
4442
 
4443
+ /** Returns a new set containing every path from each of `pathSets`. */
4444
+ export declare const unionPathSets: (pathSets: readonly ReadonlySet<string>[]) => Set<string>;
4445
+
3788
4446
  /** A skill archive unpacked into its manifest text and a relative-path → bytes map of every other entry. */
3789
4447
  export declare interface UnpackedSkillArchive {
3790
4448
  /** The root `SKILL.md` entry's decoded text content. */
@@ -3811,7 +4469,7 @@ export declare enum UnsupportedTriggerReason {
3811
4469
  MissingRequiredFields = "missingRequiredFields"
3812
4470
  }
3813
4471
 
3814
- export declare const updateEntry: (prev: FileUploadBatchState | null, index: number, patch: FileUploadStatus | Partial<Pick<FileUploadEntry, "status" | "percent">>) => FileUploadBatchState | null;
4472
+ export declare const updateEntry: (prev: FileUploadBatchState | null, id: string, patch: FileUploadStatus | Partial<Pick<FileUploadEntry, "status" | "percent">>) => FileUploadBatchState | null;
3815
4473
 
3816
4474
  /** Max number of files uploaded concurrently within a single upload batch. */
3817
4475
  export declare const UPLOAD_CONCURRENCY = 3;
@@ -3835,6 +4493,66 @@ export declare interface UploadFileWithProgressOptions {
3835
4493
  /** Upload mode passed to `FilesApi.uploadFile`: overwrite an existing file or fail if it already exists. */
3836
4494
  export declare type UploadMode = 'overwrite' | 'create-only';
3837
4495
 
4496
+ /**
4497
+ * i18n key strings that the consuming app's translation bundle must define for
4498
+ * `mapUsageDataToDashboard` to produce correctly translated strings. The
4499
+ * values are the default key paths used by AI DIAL Chat.
4500
+ */
4501
+ export declare const USAGE_DATA_I18N_KEYS: {
4502
+ /** Title for the current-UTC-day card (e.g. `'Today'`). */
4503
+ readonly todayTitle: "usage.todayTitle";
4504
+ /** Accessible period description for the current-UTC-day card. */
4505
+ readonly todayPeriodDescription: "usage.todayPeriodDescription";
4506
+ /** Title for the current-UTC-week card (e.g. `'This week'`). */
4507
+ readonly thisWeekTitle: "usage.thisWeekTitle";
4508
+ /** Accessible period description for the current-UTC-week card. */
4509
+ readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
4510
+ /** Title for the current-UTC-month card (e.g. `'This month'`). */
4511
+ readonly thisMonthTitle: "usage.thisMonthTitle";
4512
+ /** Accessible period description for the current-UTC-month card. */
4513
+ readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
4514
+ /** Aria label when there is no limit. Receives `{ used: string }`. */
4515
+ readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
4516
+ /** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
4517
+ readonly progressAriaLabel: "usage.progressAriaLabel";
4518
+ };
4519
+
4520
+ /**
4521
+ * i18n key strings that the consuming app's translation bundle must define for
4522
+ * `mapUserUsageToModelLimits` and `mapOverallCostLimitsToPeriodStatuses` to produce
4523
+ * correctly translated strings. The values are the default key paths used by AI DIAL Chat.
4524
+ */
4525
+ export declare const USAGE_MODEL_LIMITS_I18N_KEYS: {
4526
+ /** Period label used in tooltip text. Receives no interpolation. */
4527
+ readonly todayPeriodDescription: "usage.todayPeriodDescription";
4528
+ /** Period label used in tooltip text. Receives no interpolation. */
4529
+ readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
4530
+ /** Period label used in tooltip text. Receives no interpolation. */
4531
+ readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
4532
+ /** Tooltip when the overall cost limit is running low. Receives `{ period: string }`. */
4533
+ readonly overallCostLimitRunningLowTooltip: "usage.overallCostLimitRunningLowTooltip";
4534
+ /** Tooltip when the overall cost limit is reached. Receives `{ period: string }`. */
4535
+ readonly overallCostLimitReachedTooltip: "usage.overallCostLimitReachedTooltip";
4536
+ /** Aria label for a metric cell with no data. */
4537
+ readonly unavailableLabel: "usage.unavailableLabel";
4538
+ /** Supporting label when a token limit follows the cost limit. */
4539
+ readonly followsCostLimitLabel: "usage.followsCostLimitLabel";
4540
+ /** Supporting label when there is no per-deployment token limit. */
4541
+ readonly noLimitLabel: "usage.noLimitLabel";
4542
+ /** Aria label when token usage has no limit but follows the cost limit. Receives `{ used: string }`. */
4543
+ readonly followsCostLimitAriaLabel: "usage.followsCostLimitAriaLabel";
4544
+ /** Aria label when there is no limit. Receives `{ used: string }`. */
4545
+ readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
4546
+ /** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
4547
+ readonly progressAriaLabel: "usage.progressAriaLabel";
4548
+ /** Label for the spent-cost cell. Receives `{ amount: string }`. */
4549
+ readonly spentLabel: "usage.spentLabel";
4550
+ /** Type caption for an application (agent) row. Receives no interpolation. */
4551
+ readonly applicationTypeLabel: "usage.applicationTypeLabel";
4552
+ /** Supporting label on an application row's spent cost. Receives no interpolation. */
4553
+ readonly includesCalledModelsLabel: "usage.includesCalledModelsLabel";
4554
+ };
4555
+
3838
4556
  /**
3839
4557
  * Synchronises the active conversation with the conversation list and returns
3840
4558
  * the panel-space id of the active conversation, or `undefined` when none is active.
@@ -3869,6 +4587,25 @@ export declare interface UseActiveConversationSyncParams {
3869
4587
  toPanelConversationId: (id: string) => string;
3870
4588
  }
3871
4589
 
4590
+ /** Loads fresh service statuses without coupling proactive credentials to a live completion. */
4591
+ export declare const useApplicationCredentials: ({ appId, externalServicesClient, offlineCredentialsClient, }: UseApplicationCredentialsParams) => {
4592
+ services: ApplicationExternalServiceDto[];
4593
+ isOfflineConnected: boolean;
4594
+ isLoading: boolean;
4595
+ hasError: boolean;
4596
+ refresh: () => Promise<void>;
4597
+ };
4598
+
4599
+ /** Configured operations for loading application credential metadata. */
4600
+ export declare interface UseApplicationCredentialsParams {
4601
+ /** Application identifier passed through to the configured client. */
4602
+ appId: string;
4603
+ /** Host-configured external-services API. */
4604
+ externalServicesClient: Pick<ExternalServicesApi, 'listExternalServices'>;
4605
+ /** Host-configured offline-credentials API. */
4606
+ offlineCredentialsClient: Pick<OfflineCredentialsApi, 'getOfflineCredentials'>;
4607
+ }
4608
+
3872
4609
  /**
3873
4610
  * Generic single-slot pending / loading / error state machine for
3874
4611
  * confirmation dialogs that trigger an async operation.
@@ -3932,12 +4669,14 @@ export declare interface UseAttachmentUploadResult {
3932
4669
  * MIME types, debouncing a burst of rejected files into a single
3933
4670
  * `onValidationError` call rather than firing one per file.
3934
4671
  */
3935
- export declare const useAttachmentValidation: ({ allowedMimeTypes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
4672
+ export declare const useAttachmentValidation: ({ allowedMimeTypes, maxFileSizeBytes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
3936
4673
 
3937
4674
  /** Parameters for {@link useAttachmentValidation}. */
3938
4675
  export declare interface UseAttachmentValidationParams {
3939
4676
  /** Resolved MIME types currently allowed for attachments. */
3940
4677
  allowedMimeTypes: string[];
4678
+ /** Maximum attachment file size, in bytes. When omitted, no file is rejected for size. */
4679
+ maxFileSizeBytes?: number;
3941
4680
  /** Called with a structured event when a rejected attachment is reported, at most once per debounce window. */
3942
4681
  onValidationError?: (event: AttachmentValidationErrorEvent) => void;
3943
4682
  /** Debounce window, in ms, before firing `onValidationError` for a rejected file. Defaults to `100`. */
@@ -4267,7 +5006,8 @@ export declare interface UseConversationHandlersResult {
4267
5006
  * `.dial`/`.zip`, v5 envelope, old- or new-chat origin) once per file, then
4268
5007
  * re-uploads any archive attachments to `uploads/<YYYY-MM>/` —
4269
5008
  * disambiguating a name collision with a ` (n)` suffix instead of rejecting
4270
- * it — rewrites attachment references (and renamed titles), regenerates each
5009
+ * it — rewrites attachment references (and renamed titles), drops any
5010
+ * reference still pointing into another user's bucket, regenerates each
4271
5011
  * conversation's id/path with a fresh UUID (collision-free save, no replace
4272
5012
  * dialog), and persists every conversation through the injected
4273
5013
  * `conversationsApi`. One job per imported file, not per conversation.
@@ -4338,9 +5078,8 @@ export declare interface UseConversationLookupMapsParams {
4338
5078
  * panel's item contract. All app-specific concerns (icon URL resolution,
4339
5079
  * route generation, id normalisation) are injected via resolver callbacks.
4340
5080
  */
4341
- export declare const useConversationPanelItems: ({ items, deployments, isDeploymentsLoading, toPanelConversationId, resolveIconUrl, resolveIconTooltip, resolveHref, resolveTaskBadge, }: UseConversationPanelItemsParams) => {
4342
- showTaskBadge?: boolean | undefined;
4343
- taskBadgeLabel?: string | undefined;
5081
+ export declare const useConversationPanelItems: ({ items, deployments, isDeploymentsLoading, toPanelConversationId, resolveIconUrl, resolveIconTooltip, resolveHref, resolveTaskPresentation, }: UseConversationPanelItemsParams) => {
5082
+ leadingIcon?: ReactNode;
4344
5083
  isUnread?: boolean | undefined;
4345
5084
  id: string;
4346
5085
  title: string;
@@ -4376,11 +5115,12 @@ export declare interface UseConversationPanelItemsResolvers {
4376
5115
  /** Resolves the href to navigate to when the conversation row is clicked. */
4377
5116
  resolveHref: (panelConversationId: string) => string;
4378
5117
  /**
4379
- * Returns badge metadata for a scheduled-task conversation, or `undefined`
4380
- * when the item should not show a task badge.
5118
+ * Returns the row presentation for a scheduled-task conversation — a
5119
+ * host-rendered leading icon that replaces the deployment avatar, and the
5120
+ * unread flag — or `undefined` for an ordinary conversation.
4381
5121
  */
4382
- resolveTaskBadge?: (item: ConversationListItemDto) => {
4383
- label: string;
5122
+ resolveTaskPresentation?: (item: ConversationListItemDto) => {
5123
+ leadingIcon?: ReactNode;
4384
5124
  isUnread: boolean;
4385
5125
  } | undefined;
4386
5126
  }
@@ -4447,7 +5187,7 @@ export declare interface UseConversationSourcesResult {
4447
5187
  uploaded: DisplayAttachment[];
4448
5188
  /** Deduplicated attachments the assistant generated across the conversation. */
4449
5189
  generated: DisplayAttachment[];
4450
- /** Quotation sources referenced by assistant messages, deduplicated by URL. */
5190
+ /** Quotation sources referenced by assistant messages, deduplicated by URL; PDF sources are qualified with `#page=N`. */
4451
5191
  sources: QuotationSource[];
4452
5192
  }
4453
5193
 
@@ -4459,7 +5199,7 @@ export declare interface UseConversationSourcesResult {
4459
5199
  * `transport`/`generation`/`channel`/`overlay` capabilities rather than any
4460
5200
  * app context or `server-api` import.
4461
5201
  */
4462
- export declare const useConversationStream: ({ conversationId, state: { setConversation, conversationRef }, transport, generation: { startGeneration, completeGeneration }, channel, overlay, onStopError, generationConflictMessage, }: UseConversationStreamParams) => UseConversationStreamResult;
5202
+ export declare const useConversationStream: ({ conversationId, state: { setConversation, conversationRef }, transport, generation: { startGeneration, completeGeneration }, channel, overlay, onStopError, generationConflictMessage, generationPersistenceErrorMessage, onStreamError, }: UseConversationStreamParams) => UseConversationStreamResult;
4463
5203
 
4464
5204
  /** Parameters for {@link useConversationStream}. */
4465
5205
  export declare interface UseConversationStreamParams {
@@ -4477,6 +5217,15 @@ export declare interface UseConversationStreamParams {
4477
5217
  * {@link DEFAULT_GENERATION_CONFLICT_MESSAGE}.
4478
5218
  */
4479
5219
  generationConflictMessage?: string;
5220
+ /** Host-translated warning shown when the received answer could not be saved. */
5221
+ generationPersistenceErrorMessage?: string;
5222
+ /**
5223
+ * Receives the original error of every failed stream. The hook shows only
5224
+ * host-supplied or upstream-supplied text on the message bubble and hides
5225
+ * transport detail (e.g. `Failed to fetch`), so this is where the host can
5226
+ * still log or report the raw error.
5227
+ */
5228
+ onStreamError?: (error: Error) => void;
4480
5229
  }
4481
5230
 
4482
5231
  /** Return value of {@link useConversationStream}. */
@@ -4502,7 +5251,7 @@ export declare interface UseConversationStreamResult {
4502
5251
  * - shared: files shared with the user via `DialFilesApi.listSharedFiles`
4503
5252
  * - organization: public bucket via `DialFilesApi.listPublicFiles`
4504
5253
  */
4505
- export declare const useDialFileListing: ({ filesApi, bucket, rootLabel, activeTab, onNotification, }: UseDialFileListingOptions) => UseDialFileListingResult;
5254
+ export declare const useDialFileListing: ({ filesApi, bucket, rootLabel, activeTab, onNotification, isActive, sessionKey, }: UseDialFileListingOptions) => UseDialFileListingResult;
4506
5255
 
4507
5256
  /** Options accepted by `useDialFileListing`. */
4508
5257
  export declare interface UseDialFileListingOptions {
@@ -4516,6 +5265,10 @@ export declare interface UseDialFileListingOptions {
4516
5265
  activeTab: DialFileManagerTabs;
4517
5266
  /** Called with a structured event when a folder-load operation fails. */
4518
5267
  onNotification?: (notification: FileManagerNotification) => void;
5268
+ /** When false, the hook issues no `DialFilesApi` call and reports `isLoading: false`. Defaults to `true`. */
5269
+ isActive?: boolean;
5270
+ /** Changing this value resets cache and navigation exactly like an `activeTab` change. Defaults to `undefined`. */
5271
+ sessionKey?: string;
4519
5272
  }
4520
5273
 
4521
5274
  /** Values returned by `useDialFileListing`. */
@@ -4572,7 +5325,7 @@ export declare interface UseDialFileListingResult {
4572
5325
  * every translated string reaches it through `labels`,
4573
5326
  * `disabledNewButtonTooltip`, and `buildValidationErrorMessage`.
4574
5327
  */
4575
- export declare const useDialFileManager: ({ filesApi, bucket, rootLabel, activeTab, onNotification, onOperationSuccess, forbiddenSymbolsRegExp, variant, actionProfile, labels, locale, disabledNewButtonTooltip, downloadDestination, buildValidationErrorMessage, }: UseDialFileManagerOptions) => UseDialFileManagerResult;
5328
+ export declare const useDialFileManager: ({ filesApi, bucket, rootLabel, activeTab, isActive, sessionKey, onNotification, onOperationSuccess, forbiddenSymbolsRegExp, variant, actionProfile, labels, locale, disabledNewButtonTooltip, downloadDestination, buildValidationErrorMessage, }: UseDialFileManagerOptions) => UseDialFileManagerResult;
4576
5329
 
4577
5330
  export declare interface UseDialFileManagerOptions {
4578
5331
  /** Injected operation port used for every file-manager network call. */
@@ -4583,6 +5336,10 @@ export declare interface UseDialFileManagerOptions {
4583
5336
  rootLabel?: string;
4584
5337
  /** Active tab — drives listing source and per-tab options. Defaults to MyFiles. */
4585
5338
  activeTab?: DialFileManagerTabs;
5339
+ /** When false, the listing issues no `DialFilesApi` call and reports `isLoading: false`. Defaults to `true`. */
5340
+ isActive?: boolean;
5341
+ /** Changing this value resets cache and navigation exactly like an `activeTab` change. Defaults to `undefined`. */
5342
+ sessionKey?: string;
4586
5343
  /** Called when a file-manager action should surface a toast notification. */
4587
5344
  onNotification?: (notification: FileManagerNotification) => void;
4588
5345
  /** Called when a mutation succeeds, instead of invoking an application notification service directly. */
@@ -4637,7 +5394,7 @@ export declare interface UseDialFileManagerResult {
4637
5394
  onSearchFiles: (folder: string, query: string) => void;
4638
5395
  /** Search: true while a search request is in flight. */
4639
5396
  isSearching: boolean;
4640
- /** Search: flat list of matching files, or null when search is not active. */
5397
+ /** Search: flat, unfiltered recursive listing of the current folder, or null when search is not active. */
4641
5398
  searchResults: DialFile[] | null;
4642
5399
  /** Search: clears results and exits search mode. */
4643
5400
  clearSearchResults: () => void;
@@ -4661,7 +5418,9 @@ export declare interface UseDialFileManagerResult {
4661
5418
  uploadBatchState: FileUploadBatchState | null;
4662
5419
  /** Upload: abort all in-flight and queued uploads. */
4663
5420
  cancelUpload: () => void;
4664
- /** Upload: dismiss the progress modal after the batch has settled. */
5421
+ /** Upload: abort one queued or in-flight upload by its entry id. */
5422
+ cancelUploadFile: (id: string) => void;
5423
+ /** Upload: empty the upload queue. */
4665
5424
  clearUploadBatch: () => void;
4666
5425
  /** Folder creation: called when user confirms a new folder name. */
4667
5426
  onCreateFolder: (file: DialUploadFileItem, folderPath: string, fileId: string) => Promise<void>;
@@ -4728,7 +5487,7 @@ export declare interface UseDialFileManagerResult {
4728
5487
  /**
4729
5488
  * True while any mutating file-manager operation is in flight: the OR of
4730
5489
  * `isCreatingFolder`, `isDownloading`, `isDeleting`, `isRenaming`, `isCopying`,
4731
- * `isMoving`, `isUnsharing`, `isRemovingAccess`, and `uploadBatchState != null`.
5490
+ * `isMoving`, `isUnsharing`, `isRemovingAccess`, and any upload still queued or running.
4732
5491
  *
4733
5492
  * Deliberately excludes three flags, each already fully contained by its own
4734
5493
  * scoped loading UI:
@@ -4739,17 +5498,42 @@ export declare interface UseDialFileManagerResult {
4739
5498
  isAnyOperationInProgress: boolean;
4740
5499
  }
4741
5500
 
5501
+ /**
5502
+ * Composes one `useDialFileManager` per source tab (My files, Shared,
5503
+ * Organization) so the File storage page can offer an All tab without a
5504
+ * second copy of the per-tab rules. On a single tab it returns that section's
5505
+ * result; on All it merges the section roots into one tree and routes every
5506
+ * callback to the section owning the path. Section availability and names
5507
+ * arrive through `sections` — the hook reads no config, i18n, or context.
5508
+ */
5509
+ export declare const useDialFileManagerSections: ({ activeTab, sections, ...managerOptions }: UseDialFileManagerSectionsOptions) => UseDialFileManagerSectionsResult;
5510
+
5511
+ /** Options accepted by `useDialFileManagerSections`. */
5512
+ export declare interface UseDialFileManagerSectionsOptions extends Omit<UseDialFileManagerOptions, 'activeTab' | 'rootLabel' | 'isActive' | 'sessionKey'> {
5513
+ /** Active tab, including `DialFileManagerTabs.All`. */
5514
+ activeTab: DialFileManagerTabs;
5515
+ /** Enabled source tabs in display order, each with its translated top-level folder name. */
5516
+ sections: DialFileManagerSection[];
5517
+ }
5518
+
5519
+ /** Values returned by `useDialFileManagerSections`. */
5520
+ export declare interface UseDialFileManagerSectionsResult extends UseDialFileManagerResult {
5521
+ /** Source tab of the browsed folder; never `DialFileManagerTabs.All`. */
5522
+ sectionTab: DialFileManagerTabs;
5523
+ }
5524
+
4742
5525
  /**
4743
5526
  * Filters the file-manager's tab list down to the host's configured set and
4744
5527
  * resets `activeTab` to the highest-priority still-enabled tab when the
4745
5528
  * current one becomes excluded. A `fileManagerTabs` of `undefined` means no
4746
5529
  * restriction — every tab in `allTabs` stays enabled and no reset ever fires.
5530
+ * The All tab is kept only while at least two source tabs are enabled.
4747
5531
  */
4748
- export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: TabModel[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
5532
+ export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: FilterChipItem<DialFileManagerTabs>[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
4749
5533
 
4750
5534
  /** Values returned by `useDialFileManagerTabConfig`. */
4751
5535
  export declare interface UseDialFileManagerTabConfigResult {
4752
- tabs: ToolbarOptions['tabs'];
5536
+ tabs: FileTreeOptions['tabs'];
4753
5537
  }
4754
5538
 
4755
5539
  /**
@@ -4874,10 +5658,11 @@ export declare interface UseDialFileSharingResult {
4874
5658
 
4875
5659
  /**
4876
5660
  * 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.
5661
+ * concurrency-limited progress tracking and per-file abort. A batch started
5662
+ * while another is on screen is appended to it, and settled entries stay in
5663
+ * `uploadBatchState` until `clearUploadBatch`. Invalidates the shared listing
5664
+ * cache for the destination folder through `invalidateFolders`/`bumpRetry`
5665
+ * after a batch settles — it never holds its own copy of the cache.
4881
5666
  */
4882
5667
  export declare const useDialFileUploadBatch: ({ filesApi, bucket, rootLabel, activeTab, cache, sharedRootMetaRef, invalidateFolders, bumpRetry, onNotification, }: UseDialFileUploadBatchOptions) => UseDialFileUploadBatchResult;
4883
5668
 
@@ -4910,6 +5695,7 @@ export declare interface UseDialFileUploadBatchResult {
4910
5695
  onValidateUpload: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => Promise<FileUploadValidationResult>;
4911
5696
  uploadBatchState: FileUploadBatchState | null;
4912
5697
  cancelUpload: () => void;
5698
+ cancelUploadFile: (id: string) => void;
4913
5699
  clearUploadBatch: () => void;
4914
5700
  }
4915
5701
 
@@ -4938,6 +5724,64 @@ export declare interface UseFavoriteEntitiesStateResult {
4938
5724
  toggleFavorite: (id: string, isFavorite: boolean, entityType?: FavoriteEntityType) => Promise<void>;
4939
5725
  }
4940
5726
 
5727
+ /**
5728
+ * Composes the file-manager tab/listing hooks into the stateful part of an attachment picker:
5729
+ * active tab, selected paths, and hidden-path/MIME/size/folder row eligibility. Returns the
5730
+ * existing `useDialFileManager` controller unchanged and the selection/tab/eligibility fields
5731
+ * `FileManagerAttachModal` already consumes — it composes that modal, it does not replace it.
5732
+ * Final attachment filtering, deduplication, and count enforcement stay owned by the modal.
5733
+ */
5734
+ export declare const useFileAttachmentPicker: ({ fileManagerOptions, bucket, forbiddenSymbolsRegExp, tabLabels, allowedTabs, initialTab, allowedTypes, maxSelectableFileSize, canAttachFolders, }: UseFileAttachmentPickerOptions) => UseFileAttachmentPickerResult;
5735
+
5736
+ /** Options accepted by {@link useFileAttachmentPicker}. */
5737
+ export declare interface UseFileAttachmentPickerOptions {
5738
+ /**
5739
+ * Configured `useDialFileManager` options besides the values this hook derives:
5740
+ * `bucket`, `activeTab`, `rootLabel`, `variant`, and `forbiddenSymbolsRegExp`.
5741
+ */
5742
+ fileManagerOptions: Omit<UseDialFileManagerOptions, 'bucket' | 'activeTab' | 'rootLabel' | 'variant' | 'forbiddenSymbolsRegExp'>;
5743
+ /** DIAL Core bucket to browse. */
5744
+ bucket: string;
5745
+ /** Regexp of characters forbidden in file/folder names, forwarded to `useDialFileManager`. */
5746
+ forbiddenSymbolsRegExp?: RegExp;
5747
+ /** Host-translated label per tab; also supplies the active tab's root-folder label. */
5748
+ tabLabels: Record<DialFileManagerTabs, string>;
5749
+ /** Tab ids the host's configuration allows. `undefined` allows every tab. `all` is never offered. */
5750
+ allowedTabs?: string[];
5751
+ /** Initial active tab. Defaults to `DialFileManagerTabs.MyFiles`; `All` is treated as the default. */
5752
+ initialTab?: DialFileManagerTabs;
5753
+ /** MIME types eligible for selection/upload. Empty or absent allows every type. */
5754
+ allowedTypes?: string[];
5755
+ /** Files at or below this size (bytes) remain eligible; absent allows any size. */
5756
+ maxSelectableFileSize?: number;
5757
+ /** Whether folder rows are eligible for selection. Defaults to `false`. */
5758
+ canAttachFolders?: boolean;
5759
+ }
5760
+
5761
+ /** Result returned by {@link useFileAttachmentPicker}. */
5762
+ export declare interface UseFileAttachmentPickerResult {
5763
+ /** The composed file-manager controller; forward to `FileManagerAttachModal`'s `controller` prop. */
5764
+ controller: UseDialFileManagerResult;
5765
+ /** Active tab. */
5766
+ activeTab: DialFileManagerTabs;
5767
+ /** Tab list filtered to `allowedTabs`; forward to `FileManagerAttachModal`'s `tabs` prop. */
5768
+ tabs: FileTreeOptions['tabs'];
5769
+ /** Switches the active tab and clears the current selection. */
5770
+ onTabChange: (tab: DialFileManagerTabs) => void;
5771
+ /** Currently selected paths. */
5772
+ selectedPaths: Set<string>;
5773
+ /** Replaces the selection with a defensive copy of the given set. */
5774
+ onSelectedPathsChange: (paths: Set<string>) => void;
5775
+ /** Row eligibility predicate; forward to `FileManagerAttachModal`'s `isRowSelectable` prop. */
5776
+ isRowSelectable: (node: {
5777
+ data?: FileManagerSelectableNode | null;
5778
+ }) => boolean;
5779
+ /** MIME eligibility predicate; forward to `FileManagerAttachModal`'s `isFileTypeAllowed` prop. */
5780
+ isFileTypeAllowed: (contentType: string) => boolean;
5781
+ /** Accepted upload MIME types; forward to `FileManagerAttachModal`'s `allowedFileTypes` prop. */
5782
+ allowedFileTypes: DialFileAcceptType[] | undefined;
5783
+ }
5784
+
4941
5785
  export { useGridEditingScroll }
4942
5786
 
4943
5787
  export { UseGridEditingScrollOptions }
@@ -4981,10 +5825,11 @@ export declare interface UseImportFilePickerResult {
4981
5825
  * Builds the `McpAppHostAdapter` a host injects into `@epam/ai-dial-mcp-apps`'s
4982
5826
  * hooks/components, wiring the library's host-context/tool-call/resource-fetch
4983
5827
  * 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.
5828
+ * values (`hostContextParams`, `sandboxUrl`), plus the host's own identity
5829
+ * (`hostInfo`) — this hook itself never reads app context, so a host builds
5830
+ * those values wherever it already has them.
4986
5831
  */
4987
- export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams) => McpAppHostAdapter;
5832
+ export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams, hostInfo: Implementation) => McpAppHostAdapter;
4988
5833
 
4989
5834
  /**
4990
5835
  * Builds the `McpUiHostContext` delivered to a mounted MCP App during its
@@ -5014,6 +5859,35 @@ export declare const useMcpAppHostContext: (displayMode: "inline" | "fullscreen"
5014
5859
  */
5015
5860
  export declare const useMcpAppTools: (client: McpAppsApiClient, deployment: DeploymentItemDto | undefined, messages: Message[], toolsets: DialToolsetDto[]) => McpAppToolRef[];
5016
5861
 
5862
+ /**
5863
+ * Captures eligible message text and creates Reply files for an existing composer
5864
+ * attachment flow without acquiring host deployment, upload or localization knowledge.
5865
+ */
5866
+ export declare const useMessageSelectionReply: ({ conversationId, enabled, droppedFiles, onDroppedFilesConsumed, }: UseMessageSelectionReplyParams) => {
5867
+ contentRef: (node: HTMLDivElement | null) => (() => void) | undefined;
5868
+ actionRef: RefObject<HTMLDivElement | null>;
5869
+ selection: MessageSelectionReplySnapshot | null;
5870
+ onReply: () => void;
5871
+ dismiss: () => void;
5872
+ pendingFiles: File[];
5873
+ onFilesConsumed: () => void;
5874
+ focusRequestId: number | undefined;
5875
+ onAttachmentsChange: (attachments: Attachment[]) => void;
5876
+ addedRevision: number;
5877
+ };
5878
+
5879
+ /** Parameters accepted by {@link useMessageSelectionReply}. */
5880
+ export declare interface UseMessageSelectionReplyParams {
5881
+ /** Identifier used to discard selection and queued files after a scope change. */
5882
+ conversationId: string;
5883
+ /** Whether the host currently permits a Reply attachment. */
5884
+ enabled: boolean;
5885
+ /** Files from the host's ordinary page-drop queue. */
5886
+ droppedFiles: File[];
5887
+ /** Acknowledges the captured page-drop batch after the composer accepts it. */
5888
+ onDroppedFilesConsumed: () => void;
5889
+ }
5890
+
5017
5891
  /**
5018
5892
  * Completes an OAuth authorization-code flow from inside the callback popup:
5019
5893
  * reads and clears the redirect state written into this popup's own
@@ -5087,8 +5961,6 @@ export declare const useOpenMcpAppCanvas: (cache: McpAppResponseCache, hostAdapt
5087
5961
 
5088
5962
  /** User-facing text `useOpenMcpAppCanvas` needs but cannot resolve itself — a lib must not call `t()`. */
5089
5963
  export declare interface UseOpenMcpAppCanvasLabels {
5090
- /** Canvas panel title while an MCP App is loading or open. */
5091
- title: string;
5092
5964
  /** Error label shown when the resource fetch is forbidden (HTTP 403). */
5093
5965
  forbiddenErrorLabel: string;
5094
5966
  /** Error label shown for any other resource-load/tool-call failure. */
@@ -5226,6 +6098,56 @@ export declare interface UsePublishFoldersResult {
5226
6098
  hasPublishWriteAccess: (folderPath: string[]) => boolean;
5227
6099
  }
5228
6100
 
6101
+ /** Shared, cancellation-safe pagination and background refresh for one schedule's run history. */
6102
+ export declare const useScheduledTaskRuns: (client: ScheduledTasksApiClient, { scheduleId, enabled, pageSize, nextRunTime, }: UseScheduledTaskRunsOptions) => {
6103
+ items: ScheduledTaskRunDto[];
6104
+ isLoading: boolean;
6105
+ isLoadingMore: boolean;
6106
+ initialError: Error | null;
6107
+ loadMoreError: Error | null;
6108
+ hasMore: boolean;
6109
+ loadMore: () => void;
6110
+ retryLoadMore: () => void;
6111
+ refetch: () => void;
6112
+ };
6113
+
6114
+ export declare interface UseScheduledTaskRunsOptions {
6115
+ scheduleId: string;
6116
+ enabled?: boolean;
6117
+ pageSize?: number;
6118
+ /**
6119
+ * The task's next scheduled run time (ISO string), when known. Drives the
6120
+ * one-shot background refresh described on {@link useScheduledTaskRuns}.
6121
+ * The caller already holds the task DTO — this hook never fetches it.
6122
+ */
6123
+ nextRunTime?: string | null;
6124
+ }
6125
+
6126
+ /** Shared scheduler-list lifecycle with generation-scoped stale-response guards. */
6127
+ export declare const useScheduledTasks: (client: ScheduledTasksApiClient, { enabled, pageSize, debounceMs, initialSearch, initialSort, }?: UseScheduledTasksOptions) => {
6128
+ items: ScheduledTaskDto[];
6129
+ searchQuery: string;
6130
+ setSearchQuery: Dispatch<SetStateAction<string>>;
6131
+ sortKey: "firstToRun" | "lastToRun" | "newest" | "nameAZ";
6132
+ setSortKey: Dispatch<SetStateAction<"firstToRun" | "lastToRun" | "newest" | "nameAZ">>;
6133
+ isLoading: boolean;
6134
+ isLoadingMore: boolean;
6135
+ initialError: Error | null;
6136
+ loadMoreError: Error | null;
6137
+ hasMore: boolean;
6138
+ loadMore: () => void;
6139
+ retryLoadMore: () => void;
6140
+ refetch: () => void;
6141
+ };
6142
+
6143
+ export declare interface UseScheduledTasksOptions {
6144
+ enabled?: boolean;
6145
+ pageSize?: number;
6146
+ debounceMs?: number;
6147
+ initialSearch?: string;
6148
+ initialSort?: ListScheduledTasksSortEnum;
6149
+ }
6150
+
5229
6151
  /**
5230
6152
  * Resolves and manages share-link data for a DIAL Core resource.
5231
6153
  *
@@ -5266,6 +6188,48 @@ export declare interface UseShareRecipientsCountResult {
5266
6188
  invalidateRecipientsCount: (itemId: string) => void;
5267
6189
  }
5268
6190
 
6191
+ /**
6192
+ * Headless controller for the skill-archive upload flow: dialog visibility, the exact-filename
6193
+ * precheck, in-flight exclusion, abort-on-close, and import completion. The host supplies the configured request
6194
+ * and observes completion/failure through the injected callbacks; the hook never imports app
6195
+ * contexts, i18n, or a configured API client.
6196
+ */
6197
+ export declare const useSkillArchiveImport: <TResult>({ importArchive, onImported, onError, manifestFileName, }: UseSkillArchiveImportOptions<TResult>) => UseSkillArchiveImportResult;
6198
+
6199
+ /** Options accepted by {@link useSkillArchiveImport}. */
6200
+ export declare interface UseSkillArchiveImportOptions<TResult> {
6201
+ /** Submits the selected archive; the host owns the client. `signal` aborts when the dialog closes or the hook unmounts mid-upload. */
6202
+ importArchive: (file: File, signal: AbortSignal) => Promise<TResult>;
6203
+ /** Called once after a successful import (and any awaited host follow-up) settles. */
6204
+ onImported: (result: TResult) => void | Promise<void>;
6205
+ /** Called once when the import request, or the host's follow-up in {@link onImported}, fails. */
6206
+ onError: (error: unknown, kind: SkillArchiveImportErrorKind) => void;
6207
+ /** Exact filename treated as the skill manifest. Defaults to `'SKILL.md'`. */
6208
+ manifestFileName?: string;
6209
+ }
6210
+
6211
+ /** Result returned by {@link useSkillArchiveImport}. */
6212
+ export declare interface UseSkillArchiveImportResult {
6213
+ /** Whether the upload dialog is open. */
6214
+ isDialogOpen: boolean;
6215
+ /** Current phase of the import. */
6216
+ status: SkillArchiveImportStatus;
6217
+ /** Whether an import request is in flight; the dialog stays open until it succeeds. */
6218
+ isUploading: boolean;
6219
+ /** Reason the current/last selection was rejected locally; `undefined` once cleared. */
6220
+ selectionRejectionReason: SkillArchiveSelectionRejectionReason | undefined;
6221
+ /** Classified failure of the last import request; `undefined` outside a request failure. */
6222
+ errorKind: SkillArchiveImportErrorKind | undefined;
6223
+ /** Opens the dialog and clears any previous rejection or request failure. */
6224
+ openDialog: () => void;
6225
+ /** Closes the dialog, aborting an in-flight import, and clears any rejection reason. */
6226
+ closeDialog: () => void;
6227
+ /** Wire to the dialog drop zone's `onChange`. */
6228
+ handleFilesSelected: (files: File[]) => void;
6229
+ /** Wire to the dialog drop zone's `onReject`. */
6230
+ handleFilesRejected: () => void;
6231
+ }
6232
+
5269
6233
  /**
5270
6234
  * Headless data pipeline behind a skill details side panel: resolves the
5271
6235
  * selected skill from the listings, maps it to a catalog item with its
@@ -5367,7 +6331,7 @@ export declare interface UseSkillEditorLoadResult {
5367
6331
  * `client.createSkill`/`client.updateSkill`, and mapping the resulting
5368
6332
  * success/error/conflict outcomes to presentable state.
5369
6333
  */
5370
- export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, frontmatterRef, loadedPathRef, etagRef, returnUrl, refetchSkills, client, messages, onNavigate, onNotify, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
6334
+ export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, frontmatterRef, loadedPathRef, etagRef, returnUrl, getCreateReturnUrl, refetchSkills, client, messages, onNavigate, onNotify, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
5371
6335
 
5372
6336
  /** Parameters accepted by {@link useSkillEditorSubmit}. */
5373
6337
  export declare interface UseSkillEditorSubmitParams {
@@ -5387,6 +6351,8 @@ export declare interface UseSkillEditorSubmitParams {
5387
6351
  etagRef: React.MutableRefObject<string | undefined>;
5388
6352
  /** Where to navigate on a successful save. */
5389
6353
  returnUrl: string;
6354
+ /** Resolves the destination after creation from the normalized skill path. Defaults to `returnUrl`. */
6355
+ getCreateReturnUrl?: (path: string) => string;
5390
6356
  /** Refetches the host's skill listing after a successful save. */
5391
6357
  refetchSkills: () => Promise<void>;
5392
6358
  /** Already-configured create/update operations. */
@@ -5407,6 +6373,10 @@ export declare interface UseSkillEditorSubmitResult {
5407
6373
  errors: SkillEditorErrors;
5408
6374
  /** General submit-time error, distinct from a stale-edit `conflict`. */
5409
6375
  submitError: string | undefined;
6376
+ /** Whether `submitError` was caused by something a plain re-send can clear, rather than by the submission itself. */
6377
+ isSubmitErrorRetryable: boolean;
6378
+ /** Re-submits the values of the attempt that produced `submitError`. No-op before the first submit. */
6379
+ retrySubmit: () => void;
5410
6380
  /** Present when the last save hit a stale-ETag conflict. */
5411
6381
  conflict: {
5412
6382
  message: string;
@@ -5415,15 +6385,22 @@ export declare interface UseSkillEditorSubmitResult {
5415
6385
  clearConflict: () => void;
5416
6386
  /** Validates and submits the given form values. */
5417
6387
  handleSubmit: (values: SkillEditorValues) => Promise<void>;
6388
+ /**
6389
+ * Re-runs the Instructions frontmatter check against the editor's current
6390
+ * values, so a pasted `SKILL.md` is flagged as the text lands rather than
6391
+ * only on submit. Pass as the editor's `onValuesChange`.
6392
+ */
6393
+ handleValuesChange: (values: SkillEditorValues) => void;
5418
6394
  }
5419
6395
 
5420
6396
  /**
5421
6397
  * Owns the Skill Editor's batch file upload workflow: validating a staged
5422
6398
  * batch, committing it atomically (supporting files plus an optional
5423
- * `SKILL.md` manifest import, with a confirmation gate), and removing
6399
+ * `SKILL.md` manifest import, with a confirmation gate), creating empty
6400
+ * folders, expanding `.zip` archives for staging, and removing
5424
6401
  * already-committed nodes.
5425
6402
  */
5426
- export declare const useSkillFileActions: ({ files, setFiles, filesContentRef, frontmatterRef, loadedValues, setLoadedValues, isEditMode, isDirty, setSelectedPath, messages, }: UseSkillFileActionsParams) => UseSkillFileActionsResult;
6403
+ export declare const useSkillFileActions: ({ files, setFiles, filesContentRef, frontmatterRef, loadedValues, setLoadedValues, isEditMode, isDirty, setSelectedPath, messages, pickFromFileSystem, }: UseSkillFileActionsParams) => UseSkillFileActionsResult;
5427
6404
 
5428
6405
  /** Parameters accepted by {@link useSkillFileActions}. */
5429
6406
  export declare interface UseSkillFileActionsParams {
@@ -5447,6 +6424,12 @@ export declare interface UseSkillFileActionsParams {
5447
6424
  setSelectedPath: Dispatch<SetStateAction<string>>;
5448
6425
  /** Localized messages, resolved by the host. */
5449
6426
  messages: SkillFileActionsMessages;
6427
+ /**
6428
+ * Opens the host's file-system picker; passed through unchanged as
6429
+ * `fileActions.pickFromFileSystem`. Omit to hide the editor's "Open DIAL
6430
+ * file system" entry.
6431
+ */
6432
+ pickFromFileSystem?: () => Promise<SkillFileSourceEntry[] | undefined>;
5450
6433
  }
5451
6434
 
5452
6435
  /** Return value of {@link useSkillFileActions}. */
@@ -5493,10 +6476,11 @@ export declare interface UseSkillFilePreviewResult {
5493
6476
 
5494
6477
  /**
5495
6478
  * 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.
6479
+ * parse, package file listing, authoritative metadata fetching, overview
6480
+ * construction, and in-package file loads. `useCatalogItemDetails` delegates
6481
+ * its skill branch here; hosts that only surface skill details consume this
6482
+ * hook directly, without the deployment and prompt ports the full catalog
6483
+ * pipeline requires.
5500
6484
  */
5501
6485
  export declare const useSkillItemDetails: ({ api, skills, skillOverviewLabels, }: UseSkillItemDetailsOptions) => UseSkillItemDetailsResult;
5502
6486
 
@@ -5777,4 +6761,7 @@ export declare enum WithLogin {
5777
6761
  WithConfig = "with-config"
5778
6762
  }
5779
6763
 
6764
+ /** Returns `sections` with every root label usable as a unique first path segment, falling back to the tab id. */
6765
+ export declare const withRoutableRootLabels: <TSection extends DialFileManagerSection>(sections: readonly TSection[]) => TSection[];
6766
+
5780
6767
  export { }