@epam/ai-dial-chat-hooks 1.2.0-dev.1 → 1.2.0-dev.102

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 (56) hide show
  1. package/attachment/useAttachmentValidation/useAttachmentValidation.js +26 -19
  2. package/attachments.d.ts +10 -4
  3. package/catalog/map-deployment-to-catalog-item.js +2 -2
  4. package/catalog/map-skill-to-catalog-item.js +48 -48
  5. package/catalog/publish.js +2 -1
  6. package/catalog/useApplicationCredentials/useApplicationCredentials.js +39 -0
  7. package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js +39 -39
  8. package/catalog/useSkillItemDetails.js +19 -17
  9. package/catalog.d.ts +60 -5
  10. package/catalog.js +15 -14
  11. package/conversation/announcement-message.js +16 -5
  12. package/conversation/conversation-transfer/queue.js +8 -5
  13. package/conversation/stage.js +23 -0
  14. package/conversation/useAttachmentUpload/useAttachmentUpload.js +12 -5
  15. package/conversation/useConversationHandlers/useConversationHandlers.js +13 -17
  16. package/conversation/useConversationImport/useConversationImport.js +1 -1
  17. package/conversation/useConversationScroll/useConversationScroll.js +68 -64
  18. package/conversation/useConversationStream/apply-chunk.js +1 -1
  19. package/conversation/useConversationStream/useConversationStream.js +5 -1
  20. package/conversation/useTranscribeAudio/transcription-retry.js +5 -4
  21. package/conversation-overlay.d.ts +7 -0
  22. package/conversation-overlay.js +2 -0
  23. package/conversation.d.ts +139 -7
  24. package/conversation.js +24 -23
  25. package/file-manager-canvas.d.ts +398 -0
  26. package/file-manager-canvas.js +2 -0
  27. package/file-manager.d.ts +71 -330
  28. package/file-manager.js +15 -15
  29. package/files/attachment-canvas.js +51 -13
  30. package/files/attachment-types.js +14 -13
  31. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +1 -5
  32. package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +43 -0
  33. package/index.d.ts +761 -29
  34. package/index.js +123 -111
  35. package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.js +7 -5
  36. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +1 -1
  37. package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.js +25 -23
  38. package/mcp-apps.d.ts +8 -6
  39. package/package.json +37 -18
  40. package/scheduled-task/scheduled-task-description.js +77 -0
  41. package/scheduled-task/scheduled-task-preparation.js +24 -0
  42. package/scheduled-task/scheduled-tasks-api-client.js +19 -0
  43. package/scheduled-task/use-scheduled-task-runs.js +82 -0
  44. package/scheduled-task/use-scheduled-tasks.js +93 -0
  45. package/scheduled-tasks.d.ts +178 -0
  46. package/scheduled-tasks.js +7 -2
  47. package/skill/skill.js +10 -7
  48. package/skill/useSkillArchiveImport/useSkillArchiveImport.js +75 -0
  49. package/skill/useSkillEditorLoad.js +29 -28
  50. package/skill/useSkillEditorSubmit.js +92 -75
  51. package/skill-editor.d.ts +107 -0
  52. package/skill-editor.js +9 -8
  53. package/usage/map-usage-data-to-dashboard.js +66 -0
  54. package/usage/map-user-usage-to-model-limits.js +160 -0
  55. package/usage.d.ts +120 -0
  56. package/usage.js +3 -0
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';
@@ -59,20 +62,29 @@ import { Dispatch } from 'react';
59
62
  import { DisplayAttachment } from '@epam/ai-dial-chat-shared';
60
63
  import { DropdownItem } from '@epam/ai-dial-ui-kit';
61
64
  import { ExportFolder } from '@epam/ai-dial-chat-shared';
65
+ import { ExternalServicesApi } from '@epam/ai-dial-chat-api-client';
62
66
  import { FileManagerColumnKey } from '@epam/ai-dial-react-file-manager';
67
+ import { FileManagerSelectableNode } from '@epam/ai-dial-chat-shared';
63
68
  import { FileMetadataResponseDto } from '@epam/ai-dial-chat-api-client';
64
69
  import { FilesApi } from '@epam/ai-dial-chat-api-client';
70
+ import { FileTreeOptions } from '@epam/ai-dial-react-file-manager';
65
71
  import { FileUploadBatchState } from '@epam/ai-dial-chat-shared';
66
72
  import { FileUploadEntry } from '@epam/ai-dial-chat-shared';
67
73
  import { FileUploadResponseDto } from '@epam/ai-dial-chat-api-client';
68
74
  import { FileUploadStatus } from '@epam/ai-dial-chat-shared';
69
75
  import { FileUploadValidationResult } from '@epam/ai-dial-chat-shared';
76
+ import { FilterChipItem } from '@epam/ai-dial-ui-kit';
70
77
  import { FilterTab } from '@epam/ai-dial-chat-shared';
71
78
  import { getParentFolderPath } from '@epam/ai-dial-chat-shared';
79
+ import type { GroupedAttachmentItem } from '@epam/ai-dial-chat-shared';
80
+ import { Implementation } from '@modelcontextprotocol/sdk/types.js';
72
81
  import type { InputHighlightData } from '@epam/pdf-highlighter-kit';
73
82
  import { ListFilesItemDto } from '@epam/ai-dial-chat-api-client';
74
83
  import { ListFilesResponseDto } from '@epam/ai-dial-chat-api-client';
75
84
  import { ListPublicFilesRequest } from '@epam/ai-dial-chat-api-client';
85
+ import { ListScheduledTaskRunsResponseDto } from '@epam/ai-dial-chat-api-client';
86
+ import { ListScheduledTasksResponseDto } from '@epam/ai-dial-chat-api-client';
87
+ import { ListScheduledTasksSortEnum } from '@epam/ai-dial-chat-api-client';
76
88
  import { ListSharedFilesRequest } from '@epam/ai-dial-chat-api-client';
77
89
  import { LocaleTextEntryDto } from '@epam/ai-dial-chat-api-client';
78
90
  import { McpAppToolSummaryDto } from '@epam/ai-dial-chat-api-client';
@@ -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';
@@ -127,11 +146,10 @@ import { SkillFileUploadCandidate } from '@epam/ai-dial-skill-editor';
127
146
  import { SkillFileValidationResult } from '@epam/ai-dial-skill-editor';
128
147
  import { SkillMetadataItemDto } from '@epam/ai-dial-chat-api-client';
129
148
  import { SkillUploadResponseDto } from '@epam/ai-dial-chat-api-client';
149
+ import { Stage } from '@epam/ai-dial-chat-shared';
130
150
  import { StarterOption } from '@epam/ai-dial-chat-shared';
131
151
  import { StatusMessage } from '@epam/ai-dial-chat-shared';
132
152
  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
153
  import { ToolMenuItem } from '@epam/ai-dial-chat-shared';
136
154
  import { ToolsetLoginBodyDto } from '@epam/ai-dial-chat-api-client';
137
155
  import { ToolsetLogoutBodyDto } from '@epam/ai-dial-chat-api-client';
@@ -139,9 +157,11 @@ import { ToolsetsApi } from '@epam/ai-dial-chat-api-client';
139
157
  import { TranscriptionApi } from '@epam/ai-dial-chat-api-client';
140
158
  import { UnpublishCatalogEntityDto } from '@epam/ai-dial-chat-api-client';
141
159
  import { UnpublishResultDto } from '@epam/ai-dial-chat-api-client';
160
+ import { UpdatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
142
161
  import { UpdateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
143
162
  import { UploadArchiveResponseDto } from '@epam/ai-dial-chat-api-client';
144
163
  import { UploadedAttachmentResult } from '@epam/ai-dial-chat-shared';
164
+ import { UsageLimitCardData } from '@epam/ai-dial-usage-dashboard';
145
165
  import { useGridEditingScroll } from '@epam/ai-dial-chat-shared';
146
166
  import { UseGridEditingScrollOptions } from '@epam/ai-dial-chat-shared';
147
167
  import { UseGridEditingScrollResult } from '@epam/ai-dial-chat-shared';
@@ -212,6 +232,26 @@ export declare interface AnnouncementContent {
212
232
  title: string | null;
213
233
  description: string | null;
214
234
  html: string | null;
235
+ /** Entries of the popover the banner opens. */
236
+ items?: readonly AnnouncementListItem[];
237
+ }
238
+
239
+ /** One entry of the announcements popover behind the banner's `+N` pill. */
240
+ export declare interface AnnouncementListItem {
241
+ /** Plain-text heading of the entry. */
242
+ title: string;
243
+ /** Supporting copy of the entry, sanitized before it is rendered. */
244
+ description?: string | null;
245
+ /** Optional call to action shown at the end of the entry. */
246
+ link?: AnnouncementListItemLink | null;
247
+ }
248
+
249
+ /** A link rendered as the call to action of an announcements-popover entry. */
250
+ export declare interface AnnouncementListItemLink {
251
+ /** Visible text of the call to action. */
252
+ label: string;
253
+ /** Absolute `http`/`https` target the call to action opens. */
254
+ href: string;
215
255
  }
216
256
 
217
257
  /** Normalized shape returned by {@link getApiErrorDetails}. */
@@ -227,6 +267,25 @@ export declare interface ApiErrorDetails {
227
267
  /** Appends a locale's uppercased code to a field label, e.g. `'Name [EN]'`. */
228
268
  export declare const appendLocaleCode: (label: string, locale: string) => string;
229
269
 
270
+ /**
271
+ * Applies a single SSE stream chunk to the message list.
272
+ *
273
+ *
274
+ * Attachments are accumulated: each chunk's attachments are appended to the
275
+ * existing array rather than replacing it.
276
+ *
277
+ * Annotations are merged by `index`: partial `body.title` and `body.quote`
278
+ * strings are concatenated across chunks, matching the same delta-merge
279
+ * semantics used for stages.
280
+ *
281
+ * `state` is overwritten (not merged) by each chunk that carries one,
282
+ * matching the DIAL stateful-app contract.
283
+ *
284
+ * @returns Updated message array, or `null` when the chunk carries no
285
+ * actionable data (empty content, no form_schema, and no attachments).
286
+ */
287
+ export declare const applyChunkToMessages: (messages: Message[], messageIndex: number, chunk: StreamChunk) => Message[] | null;
288
+
230
289
  /** Converts an APScheduler weekday (Monday=0..Sunday=6) to a JS `Date` weekday (Sunday=0..Saturday=6). */
231
290
  export declare const apSchedulerDayToJsDay: (apSchedulerDay: number) => number;
232
291
 
@@ -294,6 +353,7 @@ declare enum AttachmentContentType {
294
353
  Code = 'code',
295
354
  Html = 'html',
296
355
  Visualizer = 'visualizer',
356
+ GroupedVisualizer = 'grouped_visualizer',
297
357
  McpApp = 'mcp_app',
298
358
  Unsupported = 'unsupported',
299
359
  Error = 'error',
@@ -325,10 +385,12 @@ export declare const attachmentToDto: (attachment: Attachment) => AttachmentDto;
325
385
  export declare interface AttachmentValidationErrorEvent {
326
386
  /** Why the attachment(s) were rejected. */
327
387
  reason: AttachmentValidationErrorReason;
328
- /** The resolved MIME types the caller currently allows (possibly empty). */
329
- allowedMimeTypes: string[];
388
+ /** The resolved MIME types the caller currently allows (possibly empty). Present only when `reason` is `NoTypesAllowed` or `UnsupportedType`. */
389
+ allowedMimeTypes?: string[];
330
390
  /** Already-formatted, non-translated extension list (e.g. ".png, .jpg"), present only when `reason` is `UnsupportedType`. */
331
391
  formats?: string;
392
+ /** The size limit, in bytes, that was exceeded. Present only when `reason` is `FileTooLarge`. */
393
+ maxFileSizeBytes?: number;
332
394
  }
333
395
 
334
396
  /** Reason a rejected attachment failed validation. */
@@ -336,7 +398,9 @@ export declare enum AttachmentValidationErrorReason {
336
398
  /** No MIME types are allowed at all — attachments are disabled entirely. */
337
399
  NoTypesAllowed = "noTypesAllowed",
338
400
  /** The attachment's content type is not among the allowed MIME types. */
339
- UnsupportedType = "unsupportedType"
401
+ UnsupportedType = "unsupportedType",
402
+ /** The attachment's file size exceeds `maxFileSizeBytes`. */
403
+ FileTooLarge = "fileTooLarge"
340
404
  }
341
405
 
342
406
  /** Thrown by `transcribeAudio`; carries a machine-readable `reason` instead of translated text. */
@@ -353,7 +417,7 @@ export declare enum AudioTranscriptionErrorReason {
353
417
  Unavailable = "unavailable",
354
418
  /** The recording exceeds the caller's configured size limit. */
355
419
  TooLarge = "tooLarge",
356
- /** The upstream ASR provider stayed rate-limited or unavailable after retrying. */
420
+ /** Recognition is rate-limited, unavailable, or exhausted short gateway retries. */
357
421
  Busy = "busy",
358
422
  /** Recognition failed for any other reason. */
359
423
  Failed = "failed"
@@ -379,9 +443,18 @@ export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: strin
379
443
  * hidden only while the current announcement produces the same signature, so
380
444
  * editing any part of it brings the banner back with no version counter.
381
445
  *
446
+ * Every piece of content the banner surface renders feeds the signature — the
447
+ * title, the description, and the popover entries behind the pill, which live
448
+ * inside the banner and are hidden along with it. Publishing a new entry in
449
+ * that list therefore invalidates an earlier dismissal on its own, even when
450
+ * the banner line itself is untouched.
451
+ *
382
452
  * A legacy-only announcement returns the raw HTML string — byte-identical to
383
453
  * what shipped before the structured fields existed — so dismissals recorded
384
- * by older builds keep working without a storage migration.
454
+ * by older builds keep working without a storage migration. `items` is left
455
+ * out of the payload entirely when the list is empty for the same reason: a
456
+ * deployment that never configured the popover keeps matching the signatures
457
+ * its users already have stored.
385
458
  */
386
459
  export declare const buildAnnouncementSignature: (content: AnnouncementContent) => string;
387
460
 
@@ -493,6 +566,13 @@ export declare const buildSkillManifestFromFrontmatter: (baseFrontmatter: Record
493
566
  * authored it, when it last changed, and its file inventory. Grouping folders
494
567
  * in the file listing are excluded from both the count and the rows. Sizes are
495
568
  * not shown — the skill metadata carries no content-length field.
569
+ *
570
+ * `skill` is the authoritative `getSkillMetadata` response when that request
571
+ * fulfilled; the caller falls back to the catalog listing entry only when it
572
+ * rejected (`useSkillItemDetails`'s `onFetchSkillDetails`). Either way, this
573
+ * function never fills a gap in one source from the other — an absent
574
+ * `author` omits the row and an absent `updatedAt` leaves the updated row's
575
+ * value empty, exactly as `skill` carries it.
496
576
  */
497
577
  export declare const buildSkillOverview: (skill: SkillMetadataItemDto | undefined, files: SkillMetadataItemDto[], about: SkillAboutDetails | undefined, labels: SkillOverviewLabels) => CatalogItemOverview;
498
578
 
@@ -688,6 +768,13 @@ export declare interface ChatStreamCompletionOptions {
688
768
  signal?: AbortSignal;
689
769
  }
690
770
 
771
+ /**
772
+ * Classifies an import request's HTTP status into a semantic outcome: 400/413/422 are
773
+ * archive-content problems, 409 is a name collision, 429 is rate limiting, 502/503 mean the
774
+ * backend is unavailable, and anything else (including no status at all) is generic.
775
+ */
776
+ export declare const classifySkillArchiveImportError: (status: number | undefined) => SkillArchiveImportErrorKind;
777
+
691
778
  /** Clears all cached fetch results. Call this when leaving a conversation. */
692
779
  export declare const clearAttachmentCache: () => void;
693
780
 
@@ -929,6 +1016,12 @@ export declare const createMessagePair: (content: string, customContent?: Messag
929
1016
  */
930
1017
  export declare const createPublishApiClient: (publishApi: PublishApi) => PublishApiClient;
931
1018
 
1019
+ /**
1020
+ * Composes scheduler operations over an already configured generated client.
1021
+ * Authentication, base URL, CSRF, and retries remain host responsibilities.
1022
+ */
1023
+ export declare const createScheduledTasksApiClient: (client: ScheduledTasksConfiguredClient) => ScheduledTasksApiClient;
1024
+
932
1025
  /**
933
1026
  * Builds a generated-client `Middleware` that throws on 401, and on a
934
1027
  * classified invalid-CSRF 403 refreshes the token and retries the original
@@ -1095,6 +1188,14 @@ export declare const deriveConversationRowActionState: (item: Pick<ConversationL
1095
1188
  */
1096
1189
  export declare const deriveFavoriteItems: (items: readonly CatalogItem[]) => CatalogItem[];
1097
1190
 
1191
+ /**
1192
+ * Describes the complete trigger without requiring unrelated task metadata.
1193
+ * Unsupported constraints remain Custom, with the full source expression.
1194
+ * Calendar-month shifts crossing month boundaries or days 29–31 remain
1195
+ * Custom because a shifted monthly day is not equivalent around short months.
1196
+ */
1197
+ export declare const describeScheduledTaskTrigger: (trigger: ScheduleTriggerDto, { timeZone, referenceDate, }?: ScheduledTaskTriggerDescriptionOptions) => ScheduledTaskTriggerDescription;
1198
+
1098
1199
  /** Strip the "files/{bucket}/" prefix from a DIAL Core URL to get the path within the bucket. */
1099
1200
  export declare const dialCorePathToRelative: (dialCorePath: string, bucket: string) => string;
1100
1201
 
@@ -1606,6 +1707,9 @@ export declare const formatOperationFolderName: (destinationFolder: string, root
1606
1707
  */
1607
1708
  export declare const formatQuotedNameList: (names: string[]) => string;
1608
1709
 
1710
+ /** Formats a raw `resetsAt` into display strings, or returns `undefined` when it cannot be formatted. */
1711
+ export declare type FormatResetTime = (resetsAt: string | undefined) => ResetTimeDisplay | undefined;
1712
+
1609
1713
  /**
1610
1714
  * Reported through `onError` when the backend rejects a completion because
1611
1715
  * another generation is already active on the same conversation — what a
@@ -1809,6 +1913,30 @@ export declare interface GreetingTranslations {
1809
1913
  nightNoName: string;
1810
1914
  }
1811
1915
 
1916
+ /** Content payload for an application-scoped grouped visualizer: every attachment a message's visualizer claims, rendered together inside one sandboxed iframe. */
1917
+ declare interface GroupedVisualizerCanvasContent {
1918
+ /** Discriminates the content type to select the correct renderer. */
1919
+ type: AttachmentContentType.GroupedVisualizer;
1920
+ /** Iframe `src`, resolved from the matching registry entry's `url`. */
1921
+ url: string;
1922
+ /** One item per claimed attachment, in the message's attachment order. Each `url` is absolute, resolved by the host. */
1923
+ attachments: GroupedAttachmentItem[];
1924
+ /** Presentation layout hints (`themeId`, `width`, `height`, `mobileHeight`) shared by every item. */
1925
+ layout: CustomVisualizerDataLayout;
1926
+ /** postMessage protocol namespace — MUST equal the registry entry's `title`, or the iframe never receives data. */
1927
+ visualizerName: string;
1928
+ /** Milliseconds to wait for a `send()` request's response before rejecting. From the registry entry; does NOT bound the handshake. */
1929
+ requestTimeout?: number;
1930
+ }
1931
+
1932
+ /** Outcome of building a grouped visualizer payload. */
1933
+ export declare interface GroupedVisualizerResolution {
1934
+ /** The grouped payload, or `null` when no claimed attachment resolved to a URL. */
1935
+ content: GroupedVisualizerCanvasContent | null;
1936
+ /** The claimed attachments that reached `content.attachments`, in the input's order. The caller returns the rest to the ordinary attachment tray. */
1937
+ resolved: DisplayAttachment[];
1938
+ }
1939
+
1812
1940
  /** Whether at least one tool toggle in `value` is active. */
1813
1941
  export declare const hasActiveToolConfig: (value: Record<string, boolean> | undefined) => boolean;
1814
1942
 
@@ -2087,6 +2215,13 @@ export declare const mapFormValuesToCreateBody: (values: ScheduledTaskCreateForm
2087
2215
  */
2088
2216
  export declare const mapFormValuesToUpdateBody: (values: ScheduledTaskCreateFormValues) => UpdateScheduledTaskBodyDto;
2089
2217
 
2218
+ /**
2219
+ * Maps the same top-level Cost budgets used by the aggregate cards into table-header state.
2220
+ *
2221
+ * @param formatResetTime - Formats each period's top-level `resetsAt` into the header's reset trio. Omit it to produce statuses with no reset fields.
2222
+ */
2223
+ export declare const mapOverallCostLimitsToPeriodStatuses: (usage: UserLimitStatsResponseDto | undefined, activeLocale: string, t: Translate_2, formatResetTime?: FormatResetTime) => ModelLimitPeriodStatuses;
2224
+
2090
2225
  /**
2091
2226
  * Maps a prompt DTO into a catalog item.
2092
2227
  *
@@ -2145,6 +2280,13 @@ export declare interface MapSkillToCatalogItemOptions {
2145
2280
  favoriteIds: ReadonlySet<string>;
2146
2281
  }
2147
2282
 
2283
+ /**
2284
+ * Returns the normalized stages of a raw stage array or a message-like
2285
+ * payload (reading `custom_content.stages`, falling back to
2286
+ * `customContent.stages`), or `undefined` when there are none.
2287
+ */
2288
+ export declare const mapStages: (source: RawStage[] | RawStageSource | null | undefined) => Stage[] | undefined;
2289
+
2148
2290
  /**
2149
2291
  * Maps a toolset's specification into the lib's credential-status shape,
2150
2292
  * for refreshing the details panel after login/logout. Includes both
@@ -2169,6 +2311,24 @@ export declare interface MapToolsetToCatalogItemOptions {
2169
2311
  resolveIconUrl: (iconUrl: string | undefined) => string | undefined;
2170
2312
  }
2171
2313
 
2314
+ /**
2315
+ * Maps a `UserLimitStatsResponseDto` into `UsageLimitCardGroup`'s `cards` prop,
2316
+ * in Today / This week / This month order. A period is omitted entirely when
2317
+ * the response carries no usable stat for it. Each card's reset trio comes from
2318
+ * `formatResetTime`, and is absent when that callback returns `undefined`.
2319
+ */
2320
+ export declare const mapUsageDataToDashboard: (usage: UserLimitStatsResponseDto | undefined, t: Translate, formatResetTime: FormatResetTime) => UsageLimitCardData[];
2321
+
2322
+ /**
2323
+ * Maps `usage.deployments` into `ModelLimitsSection`'s `rows` prop, joined with model identity
2324
+ * from `deploymentItems`. Rows are included only when any displayed period stat has nonzero usage.
2325
+ * Order follows `Object.keys(deployments)` — `deploymentItems` is enrichment-only.
2326
+ *
2327
+ * @param resolveIconUrl - Resolves a deployment's raw `iconUrl` to the URL the avatar should load.
2328
+ * @param resolveDisplayName - Resolves a localized-text map or plain string to the display name for `activeLocale`.
2329
+ */
2330
+ export declare const mapUserUsageToModelLimits: (usage: UserLimitStatsResponseDto | undefined, deploymentItems: DeploymentItemDto[], activeLocale: string, t: Translate_2, resolveIconUrl: ResolveIconUrl, resolveDisplayName: ResolveDisplayName) => ModelLimitRow[];
2331
+
2172
2332
  /** Content payload for Markdown file attachments. */
2173
2333
  declare interface MarkdownCanvasContent {
2174
2334
  /** Discriminates the content type to select the correct renderer. */
@@ -2189,6 +2349,8 @@ declare type McpAppDisplayMode = NonNullable<McpUiHostContext['displayMode']>;
2189
2349
  declare interface McpAppHostAdapter {
2190
2350
  /** `McpUiHostContext` to deliver to the mounted app's `ui/initialize` handshake. */
2191
2351
  hostContext: McpUiHostContext;
2352
+ /** Host identity (`name`/`version`) to deliver to the mounted app's `ui/initialize` handshake. */
2353
+ hostInfo: Implementation;
2192
2354
  /** Operator-configured MCP Apps sandbox-proxy URL, or `null` when unconfigured. */
2193
2355
  sandboxUrl: string | null;
2194
2356
  /** Fetches the matched tool's MCP Apps `ui://` resource. */
@@ -2205,7 +2367,7 @@ export declare interface McpAppHostContextParams {
2205
2367
  mcpAppTheme?: string;
2206
2368
  /** Host's current i18n locale (BCP 47). */
2207
2369
  locale: string;
2208
- /** Operator-configured MCP App user-agent override. Defaults to `'ai-dial-chat'`. */
2370
+ /** Operator-configured MCP App user-agent override. Defaults to the browser's own `navigator.userAgent`. */
2209
2371
  mcpAppUserAgent?: string;
2210
2372
  /**
2211
2373
  * Display modes the host can switch an app between via
@@ -2327,6 +2489,22 @@ export declare enum McpResourceKind {
2327
2489
 
2328
2490
  export declare const mergeCreatedFolderIntoCache: (cache: Map<string, ListFilesItemDto[]>, parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => Map<string, ListFilesItemDto[]>;
2329
2491
 
2492
+ /**
2493
+ * Merges incoming stage deltas into an existing stage list, keyed by `index`.
2494
+ *
2495
+ * Partial `name` and `content` strings are concatenated across chunks;
2496
+ * attachments are merged by their own `index` (concatenating partial `title`
2497
+ * and `data`); every other field on the incoming delta overwrites the
2498
+ * accumulated one. A brand-new stage whose first chunk carries `name: null`
2499
+ * is normalized to `''`.
2500
+ *
2501
+ * Exported for hosts that keep a flattened `Stage[]` on the message instead
2502
+ * of `Message.custom_content.stages` and therefore cannot reuse
2503
+ * {@link applyChunkToMessages}. Prefer `useConversationStream` when the host
2504
+ * can delegate the whole stream loop.
2505
+ */
2506
+ export declare const mergeStages: (existing: Stage[], incoming: Stage[]) => Stage[];
2507
+
2330
2508
  /** True when `message` is an assistant message carrying at least one stage. */
2331
2509
  export declare const messageHasStages: (message: Message) => boolean;
2332
2510
 
@@ -2339,7 +2517,14 @@ export declare interface MessagePair {
2339
2517
  /** Formats MIME types as a human-readable, comma-separated list of dotted extensions (or the MIME type itself for wildcards). */
2340
2518
  export declare const mimeTypesToAttachmentExtensionLabels: (types: string[]) => string;
2341
2519
 
2342
- /** Normalizes `*` to the all-files wildcard and drops any value that is not a valid `DialFileAcceptType`. */
2520
+ /**
2521
+ * Normalizes `*` to the all-files wildcard, canonicalizes MIME aliases, and drops
2522
+ * any value that is not a valid `DialFileAcceptType`.
2523
+ *
2524
+ * Aliases are resolved because a file picker matches an `accept` entry against its
2525
+ * own MIME table: a declared `text/json` offers no `.json` file, while the
2526
+ * `application/json` it denotes does.
2527
+ */
2343
2528
  export declare const mimeTypesToDialFileAcceptTypes: (types?: string[]) => DialFileAcceptType[] | undefined;
2344
2529
 
2345
2530
  /**
@@ -2515,7 +2700,17 @@ declare interface OoxmlDocxHighlightLocation {
2515
2700
  text: string;
2516
2701
  }
2517
2702
 
2518
- /** Supported document formats rendered by the bundled `@silurus/ooxml` runtime. */
2703
+ /** A complete table row in the DOCX body, matched by cell text. */
2704
+ declare interface OoxmlDocxTableRowLocation {
2705
+ /** Location kind. */
2706
+ kind: OoxmlHighlightKind.DocxTableRow;
2707
+ /** Plain text of each cell, in column order. */
2708
+ cells: string[];
2709
+ /** 1-based matching row in document order. */
2710
+ occurrence: number;
2711
+ }
2712
+
2713
+ /** Supported document formats rendered by the installed `@silurus/ooxml` runtime. */
2519
2714
  declare enum OoxmlFileType {
2520
2715
  Docx = 'docx',
2521
2716
  Xlsx = 'xlsx',
@@ -2537,6 +2732,10 @@ declare enum OoxmlHighlightKind {
2537
2732
  DocxTextRange = 'docxTextRange',
2538
2733
  /** A character range inside a single PPTX shape on one slide. */
2539
2734
  PptxTextRange = 'pptxTextRange',
2735
+ /** A complete DOCX table row identified by its cell text. */
2736
+ DocxTableRow = 'docxTableRow',
2737
+ /** A complete PPTX table row identified by its cell text on one slide. */
2738
+ PptxTableRow = 'pptxTableRow',
2540
2739
  /** One cell, or a contiguous same-row cell range, on a named XLSX sheet. */
2541
2740
  XlsxCellRange = 'xlsxCellRange',
2542
2741
  }
@@ -2545,6 +2744,8 @@ declare enum OoxmlHighlightKind {
2545
2744
  declare type OoxmlHighlightLocation =
2546
2745
  | OoxmlDocxHighlightLocation
2547
2746
  | OoxmlPptxHighlightLocation
2747
+ | OoxmlDocxTableRowLocation
2748
+ | OoxmlPptxTableRowLocation
2548
2749
  | OoxmlXlsxHighlightLocation;
2549
2750
 
2550
2751
  /** A cited character range inside a single shape on one PPTX slide. */
@@ -2563,6 +2764,18 @@ declare interface OoxmlPptxHighlightLocation {
2563
2764
  text: string;
2564
2765
  }
2565
2766
 
2767
+ /** A complete table row on one PPTX slide, matched by cell text. */
2768
+ declare interface OoxmlPptxTableRowLocation {
2769
+ /** Location kind. */
2770
+ kind: OoxmlHighlightKind.PptxTableRow;
2771
+ /** Plain text of each cell, in column order. */
2772
+ cells: string[];
2773
+ /** 1-based matching row on the specified slide. */
2774
+ occurrence: number;
2775
+ /** 1-based slide number. */
2776
+ slide: number;
2777
+ }
2778
+
2566
2779
  /** A cited cell, or contiguous same-row cell range, on a named XLSX sheet. */
2567
2780
  declare interface OoxmlXlsxHighlightLocation {
2568
2781
  /** Discriminates this location within `OoxmlHighlightLocation`. */
@@ -2734,6 +2947,15 @@ export declare const prepareMoveRenameItems: (copiedItems: DialCopiedItem[], buc
2734
2947
  preparedMoveItems: PreparedCopyMoveItem<MoveItemDto>[];
2735
2948
  };
2736
2949
 
2950
+ /**
2951
+ * Validates form values before creating a request body. Hosts translate the
2952
+ * returned field codes and must not issue a write when `ok` is false.
2953
+ */
2954
+ export declare const prepareScheduledTaskCreateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<CreateScheduledTaskBodyDto>;
2955
+
2956
+ /** Validates form values before preparing an update request body. */
2957
+ export declare const prepareScheduledTaskUpdateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<UpdateScheduledTaskBodyDto>;
2958
+
2737
2959
  /** Maximum body length accepted by `CreatePromptDto.content`. */
2738
2960
  export declare const PROMPT_CONTENT_MAX_LENGTH = 50000;
2739
2961
 
@@ -2817,6 +3039,63 @@ export declare interface QuickAppSchemaLike {
2817
3039
  displayName?: string;
2818
3040
  }
2819
3041
 
3042
+ /**
3043
+ * One stage as it arrives from the REST API or the SSE stream, before
3044
+ * normalization. Structurally satisfied by the generated `StageDto` and by a
3045
+ * raw stream delta, both of which omit `index`/`name`/`status` on the chunk
3046
+ * that opens a stage.
3047
+ */
3048
+ export declare interface RawStage {
3049
+ /** Ordering key. Defaults to `0` when absent. */
3050
+ index?: number | null;
3051
+ /** Stage title. `null` on the chunk that opens the stage. */
3052
+ name?: string | null;
3053
+ /** Terminal state as a raw wire string; anything other than `'completed'`/`'failed'` means still running. */
3054
+ status?: string | null;
3055
+ /** Additional stage text. */
3056
+ content?: string | null;
3057
+ /** Short source/category label shown beside the stage name. */
3058
+ tag?: string | null;
3059
+ /** Files produced or referenced by this stage. */
3060
+ attachments?: RawStageAttachment[] | null;
3061
+ }
3062
+
3063
+ /**
3064
+ * One stage attachment as it arrives from the REST API or the SSE stream,
3065
+ * before normalization: every field is optional and may be `null`.
3066
+ */
3067
+ export declare interface RawStageAttachment {
3068
+ /** Zero-based position in the attachment list. */
3069
+ index?: number | null;
3070
+ /** MIME type of the attachment content. */
3071
+ type?: string | null;
3072
+ /** Display name shown in the UI. */
3073
+ title?: string | null;
3074
+ /** Inline base-64 encoded content. */
3075
+ data?: string | null;
3076
+ /** Remote URL pointing to the attachment content. */
3077
+ url?: string | null;
3078
+ /** MIME type of the referenced resource. */
3079
+ reference_type?: string | null;
3080
+ /** URL of an alternate reference resource. */
3081
+ reference_url?: string | null;
3082
+ }
3083
+
3084
+ /**
3085
+ * Message-like payload carrying stages under either the wire's snake_case
3086
+ * `custom_content` or a host's camelCased `customContent`.
3087
+ */
3088
+ export declare interface RawStageSource {
3089
+ /** Custom content as the DIAL wire format spells it. */
3090
+ custom_content?: {
3091
+ stages?: RawStage[] | null;
3092
+ } | null;
3093
+ /** Custom content as a camelCasing host spells it. */
3094
+ customContent?: {
3095
+ stages?: RawStage[] | null;
3096
+ } | null;
3097
+ }
3098
+
2820
3099
  /**
2821
3100
  * Reads a skill file response as raw bytes, or `null` when the body is
2822
3101
  * larger than `SKILL_MANIFEST_MAX_BYTES`. The declared `content-length` is
@@ -2827,6 +3106,24 @@ export declare interface QuickAppSchemaLike {
2827
3106
  */
2828
3107
  export declare const readSkillFileBytes: (response: Response) => Promise<Uint8Array | null>;
2829
3108
 
3109
+ /**
3110
+ * Reads a skill file response as raw bytes with no size ceiling, for the
3111
+ * supporting-file **preview** path.
3112
+ *
3113
+ * Previews are user-initiated, one file at a time, and a realistic binary
3114
+ * (a PDF, an image) routinely exceeds `SKILL_MANIFEST_MAX_BYTES` — a cap
3115
+ * sized for `SKILL.md` frontmatter, not for binaries — so applying that cap
3116
+ * here rejected virtually every real PDF before it was ever decoded. This
3117
+ * reader therefore never returns `null`: file size is not a failure class on
3118
+ * the preview path.
3119
+ *
3120
+ * `readSkillFileBytes` and `readSkillManifest` keep their
3121
+ * `SKILL_MANIFEST_MAX_BYTES` ceiling, because they feed the manifest parse
3122
+ * and the textual Content-tab read, where an oversized body must never be
3123
+ * decoded into a string.
3124
+ */
3125
+ export declare const readSkillFilePreviewBytes: (response: Response) => Promise<Uint8Array>;
3126
+
2830
3127
  /**
2831
3128
  * Reads a skill manifest response as text, or `null` when the body is larger
2832
3129
  * than `SKILL_MANIFEST_MAX_BYTES`. The size is checked before decoding, so an
@@ -2872,6 +3169,23 @@ export declare const referenceAttachmentToPdfCanvasContent: (attachment: Attachm
2872
3169
  /** Name reserved for the hidden marker file used to create empty folders. */
2873
3170
  export declare const RESERVED_MARKER_NAME = ".dial_folder";
2874
3171
 
3172
+ /**
3173
+ * One reset time, already parsed and formatted by the host. Declared
3174
+ * structurally here so this library never imports an application type; the
3175
+ * host passes a value that satisfies this shape (e.g. `apps/chat`'s own
3176
+ * `ResetTimeDisplay`).
3177
+ */
3178
+ export declare interface ResetTimeDisplay {
3179
+ /** Exclusive end of the period as an epoch ms value, for the host's boundary scheduling. */
3180
+ resetsAtMs: number;
3181
+ /** Machine-readable instant for a `<time dateTime>` attribute. */
3182
+ isoValue: string;
3183
+ /** Visible reset line. */
3184
+ label: string;
3185
+ /** Accessible expansion of the reset line. */
3186
+ ariaLabel: string;
3187
+ }
3188
+
2875
3189
  /**
2876
3190
  * Resolves the primary action for a catalog item.
2877
3191
  *
@@ -2891,7 +3205,8 @@ export declare const resolveCatalogPrimaryAction: (item: CatalogItem, fetchPromp
2891
3205
  /** Resolves a syntax-highlighted code canvas content payload from a DisplayAttachment, or `null` if unavailable. */
2892
3206
  export declare const resolveCodeCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, language?: string) => Promise<CodeCanvasContent | ErrorCanvasContent | null>;
2893
3207
 
2894
- export declare const resolveDeploymentFolder: (deployment: Pick<DeploymentItemDto, "isMy" | "sharedWithMe" | "applicationFolder">, labels: DeploymentFolderLabels) => string[];
3208
+ /** Resolves a deployment's display folder, including organization applications without a folder path. */
3209
+ export declare const resolveDeploymentFolder: (deployment: Pick<DeploymentItemDto, "isMy" | "sharedWithMe" | "applicationFolder"> & Partial<Pick<DeploymentItemDto, "type">>, labels: DeploymentFolderLabels) => string[];
2895
3210
 
2896
3211
  /**
2897
3212
  * Resolves a DialFile to the bucket-relative API path used by files BFF endpoints.
@@ -2909,6 +3224,9 @@ export declare const resolveDialFileBucketAndPath: (fileId: string) => {
2909
3224
  path: string;
2910
3225
  } | undefined;
2911
3226
 
3227
+ /** A callback that resolves a display name from a localized-text value. */
3228
+ declare type ResolveDisplayName = (name: string | Record<string, string> | undefined | null, locale: string) => string;
3229
+
2912
3230
  /** Resolves a DIAL Core file id to a downloadable URL. Host-owned — encodes the app's own file-download endpoint. */
2913
3231
  export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
2914
3232
 
@@ -2927,6 +3245,17 @@ export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
2927
3245
  */
2928
3246
  export declare const resolveExternalSourceContentType: (contentType: string, url: string) => string;
2929
3247
 
3248
+ /**
3249
+ * Builds the grouped payload for an application-scoped visualizer from the
3250
+ * attachments its entry claims, reporting which of them `resolveAbsoluteUrl`
3251
+ * could produce a URL for. Unlike the single-attachment resolver this fetches
3252
+ * nothing: the grouped protocol hands the visualizer URLs and lets it read
3253
+ * them itself, so the URLs must be absolute — a host-relative path would
3254
+ * resolve against the iframe's own origin. Producing one is host knowledge,
3255
+ * which is why it arrives as a callback rather than being built here.
3256
+ */
3257
+ export declare const resolveGroupedVisualizerCanvasContent: (attachments: DisplayAttachment[], resolveAbsoluteUrl: (attachment: DisplayAttachment) => string | undefined, entry: ApplicationVisualizer, themeId: string) => GroupedVisualizerResolution;
3258
+
2930
3259
  /**
2931
3260
  * Resolves an HTML canvas content payload from a DisplayAttachment.
2932
3261
  * Fetches and inlines the HTML as `srcdoc` when the attachment has a download URL or inline data.
@@ -2935,12 +3264,17 @@ export declare const resolveExternalSourceContentType: (contentType: string, url
2935
3264
  */
2936
3265
  export declare const resolveHtmlCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<HtmlCanvasContent | ErrorCanvasContent | null>;
2937
3266
 
3267
+ /** A callback that resolves an icon URL from a deployment's raw `iconUrl` field. */
3268
+ declare type ResolveIconUrl = (iconUrl: string | undefined) => string | undefined;
3269
+
2938
3270
  /**
2939
3271
  * Resolves an image canvas content payload from a DisplayAttachment without
2940
- * fetching — returns the BFF download URL (or a local/inline blob URL)
2941
- * directly so the browser cache can be shared with the conversation view's
2942
- * `<img>` element. Error detection is delegated to `<img onError>` in the
2943
- * canvas renderer. Returns `null` if no URL source is available.
3272
+ * fetching — returns a local blob URL or the BFF download URL directly so the
3273
+ * browser cache can be shared with the conversation view's `<img>` element.
3274
+ * A local `File` with bytes takes precedence over the DIAL download URL; a
3275
+ * 0-byte `File` (the file-manager placeholder) does not. Error detection is
3276
+ * delegated to `<img onError>` in the canvas renderer. Returns `null` if no
3277
+ * URL source is available.
2944
3278
  */
2945
3279
  export declare const resolveImageCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => ImageCanvasContent | null;
2946
3280
 
@@ -3058,6 +3392,106 @@ export declare type ScheduledTaskDtoMappingResult = {
3058
3392
  reason: UnsupportedTriggerReason;
3059
3393
  };
3060
3394
 
3395
+ /** A checked request preparation result that never serializes invalid values. */
3396
+ export declare type ScheduledTaskPreparationResult<TBody> = {
3397
+ ok: true;
3398
+ body: TBody;
3399
+ } | {
3400
+ ok: false;
3401
+ errors: ScheduledTaskValidationErrors;
3402
+ };
3403
+
3404
+ export declare interface ScheduledTaskRunsListRequest {
3405
+ scheduleId: string;
3406
+ limit?: number;
3407
+ offset?: number;
3408
+ signal?: AbortSignal;
3409
+ }
3410
+
3411
+ export declare interface ScheduledTasksApiClient {
3412
+ listScheduledTasks: (request?: ScheduledTasksListRequest) => Promise<ListScheduledTasksResponseDto>;
3413
+ listScheduledTaskRuns: (request: ScheduledTaskRunsListRequest) => Promise<ListScheduledTaskRunsResponseDto>;
3414
+ createScheduledTask: (body: CreateScheduledTaskBodyDto) => Promise<CreatedScheduledTaskDto>;
3415
+ getScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3416
+ updateScheduledTask: (scheduleId: string, body: UpdateScheduledTaskBodyDto) => Promise<UpdatedScheduledTaskDto>;
3417
+ pauseScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3418
+ resumeScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3419
+ deleteScheduledTask: (scheduleId: string) => Promise<void>;
3420
+ }
3421
+
3422
+ /** Narrow configured generated-client surface required by scheduler hooks. */
3423
+ export declare interface ScheduledTasksConfiguredClient {
3424
+ listScheduledTasks: (request: {
3425
+ limit?: number;
3426
+ offset?: number;
3427
+ search?: string;
3428
+ sort?: ListScheduledTasksSortEnum;
3429
+ }, options?: RequestInit) => Promise<ListScheduledTasksResponseDto>;
3430
+ listScheduledTaskRuns: (request: {
3431
+ scheduleId: string;
3432
+ limit?: number;
3433
+ offset?: number;
3434
+ }, options?: RequestInit) => Promise<ListScheduledTaskRunsResponseDto>;
3435
+ createScheduledTask: (request: {
3436
+ createScheduledTaskBodyDto: CreateScheduledTaskBodyDto;
3437
+ }) => Promise<CreatedScheduledTaskDto>;
3438
+ getScheduledTask: (request: {
3439
+ scheduleId: string;
3440
+ }) => Promise<ScheduledTaskDto>;
3441
+ updateScheduledTask: (request: {
3442
+ scheduleId: string;
3443
+ updateScheduledTaskBodyDto: UpdateScheduledTaskBodyDto;
3444
+ }) => Promise<UpdatedScheduledTaskDto>;
3445
+ pauseScheduledTask: (request: {
3446
+ scheduleId: string;
3447
+ }) => Promise<ScheduledTaskDto>;
3448
+ resumeScheduledTask: (request: {
3449
+ scheduleId: string;
3450
+ }) => Promise<ScheduledTaskDto>;
3451
+ deleteScheduledTask: (request: {
3452
+ scheduleId: string;
3453
+ }) => Promise<void>;
3454
+ }
3455
+
3456
+ /** App-agnostic request options accepted by the scheduler facade. */
3457
+ export declare interface ScheduledTasksListRequest {
3458
+ limit?: number;
3459
+ offset?: number;
3460
+ search?: string;
3461
+ sort?: ListScheduledTasksSortEnum;
3462
+ signal?: AbortSignal;
3463
+ }
3464
+
3465
+ export declare interface ScheduledTaskTriggerDescription {
3466
+ kind: ScheduledTaskTriggerDescriptionKind;
3467
+ time?: string;
3468
+ dayOfWeek?: string;
3469
+ dayOfMonth?: string;
3470
+ intervalMinutes?: number;
3471
+ date?: Date;
3472
+ expression?: string;
3473
+ sourceTimezone: 'utc';
3474
+ }
3475
+
3476
+ /** Display categories are independent of task editability. */
3477
+ export declare enum ScheduledTaskTriggerDescriptionKind {
3478
+ OneTime = "oneTime",
3479
+ Hourly = "hourly",
3480
+ EveryNMinutes = "everyNMinutes",
3481
+ Daily = "daily",
3482
+ Weekly = "weekly",
3483
+ Monthly = "monthly",
3484
+ Custom = "custom",
3485
+ Invalid = "invalid"
3486
+ }
3487
+
3488
+ export declare interface ScheduledTaskTriggerDescriptionOptions {
3489
+ /** Display timezone; defaults to UTC for backwards compatibility. */
3490
+ timeZone?: string;
3491
+ /** Date whose timezone offset is used. Defaults to now (the existing UTC-storage policy). */
3492
+ referenceDate?: Date;
3493
+ }
3494
+
3061
3495
  /** Serializes a prompt export envelope into a pretty-printed JSON blob. */
3062
3496
  export declare const serializePromptExport: (envelope: PromptExportFormat) => Blob;
3063
3497
 
@@ -3133,6 +3567,28 @@ export declare interface SkillAboutDetails {
3133
3567
  skillPrompt?: string;
3134
3568
  }
3135
3569
 
3570
+ /** Semantic classification of an import request failure. */
3571
+ export declare enum SkillArchiveImportErrorKind {
3572
+ Validation = "validation",
3573
+ Collision = "collision",
3574
+ RateLimited = "rateLimited",
3575
+ ServiceUnavailable = "serviceUnavailable",
3576
+ Generic = "generic"
3577
+ }
3578
+
3579
+ /** Phase of a skill-archive import, driving the host's loading/success/error presentation. */
3580
+ export declare enum SkillArchiveImportStatus {
3581
+ Idle = "idle",
3582
+ Uploading = "uploading",
3583
+ Success = "success",
3584
+ Error = "error"
3585
+ }
3586
+
3587
+ /** Reason a selected/dropped file was rejected before any request was made. */
3588
+ export declare enum SkillArchiveSelectionRejectionReason {
3589
+ UnsupportedFilename = "unsupportedFilename"
3590
+ }
3591
+
3136
3592
  /** Injected API port for skill detail fetching. Mirrors exact server-api wrapper signatures. */
3137
3593
  export declare interface SkillDetailsApi {
3138
3594
  /** Downloads a raw skill file, returning the raw fetch `Response`. */
@@ -3146,6 +3602,12 @@ export declare interface SkillDetailsApi {
3146
3602
  limit?: number;
3147
3603
  recursive?: boolean;
3148
3604
  }, signal?: AbortSignal): Promise<SkillFileListResponseDto>;
3605
+ /**
3606
+ * Fetches a single skill's own authoritative metadata (`author`,
3607
+ * `updatedAt`, and the rest of `SkillMetadataItemDto`) — not the catalog
3608
+ * listing entry, which may be sparse for a shared skill.
3609
+ */
3610
+ getSkillMetadata(bucket: string, path: string, signal?: AbortSignal): Promise<SkillMetadataItemDto>;
3149
3611
  }
3150
3612
 
3151
3613
  /** Already-configured DIAL Core download operations `useSkillEditorLoad` needs. */
@@ -3189,6 +3651,12 @@ export declare interface SkillEditorSubmitClient {
3189
3651
  export declare interface SkillEditorSubmitMessages {
3190
3652
  /** Shown when a required field is empty. */
3191
3653
  required: string;
3654
+ /**
3655
+ * Shown when the Instructions value opens with its own YAML frontmatter
3656
+ * block — pasting a whole `SKILL.md` in there would otherwise produce a
3657
+ * manifest with two frontmatter blocks.
3658
+ */
3659
+ instructionsFrontmatter: string;
3192
3660
  /** Shown when the normalized skill name fails DIAL's naming rules. */
3193
3661
  nameInvalid: string;
3194
3662
  /** Shown when the skill name already exists (409), or defensively on an unreachable create-mode 412. */
@@ -3395,6 +3863,28 @@ export declare const splitFileNameExtension: (fileName: string) => {
3395
3863
  extension: string;
3396
3864
  };
3397
3865
 
3866
+ /**
3867
+ * Answers one question: would appending this text after the fence that
3868
+ * `buildSkillManifest` writes produce a *second* frontmatter block?
3869
+ *
3870
+ * That happens when the text's first non-blank line is a bare `---` and some
3871
+ * later line is a bare `---` too — the exact shape of a `SKILL.md` pasted
3872
+ * wholesale into the editor's Instructions field.
3873
+ *
3874
+ * Detection is deliberately structural rather than YAML-based: a pasted block
3875
+ * whose fenced content fails to parse corrupts the stored manifest
3876
+ * identically (and renders as a setext `h2` in the Catalog's Details tab just
3877
+ * the same), so requiring parseable YAML here would let the worst cases
3878
+ * through. Keeping `parseYaml` out also makes this cheap enough to run on
3879
+ * every keystroke.
3880
+ *
3881
+ * A single unclosed fence returns `false`: with no closing fence there is no
3882
+ * second block, matching `FRONTMATTER_PATTERN`'s own requirement. A `---`
3883
+ * appearing later in the body (a horizontal rule, a setext underline) is
3884
+ * likewise not a frontmatter block.
3885
+ */
3886
+ export declare const startsWithFrontmatterBlock: (text: string) => boolean;
3887
+
3398
3888
  /** Options accepted by {@link ConversationStreamTransport.streamCompletion}. */
3399
3889
  export declare interface StreamCompletionOptions {
3400
3890
  onChunk: (chunk: StreamChunk) => void;
@@ -3720,6 +4210,13 @@ export declare const toPublishEntityType: (type: CatalogEntityType) => CatalogPu
3720
4210
  */
3721
4211
  export declare const toPublishRuleDto: (rule: PublicationRule) => PublishRuleDto;
3722
4212
 
4213
+ /**
4214
+ * Returns a renderable `Stage` for one raw payload: `index` defaults to `0`,
4215
+ * `name` to `''`, an unrecognized `status` to `null` (still running), and
4216
+ * `content`/`tag`/`attachments` are passed through when present.
4217
+ */
4218
+ export declare const toStage: (stage: RawStage) => Stage;
4219
+
3723
4220
  /** Request shape the host's selected-deployment recognition call accepts. */
3724
4221
  export declare interface TranscribeWithDeploymentParams {
3725
4222
  audioUrl: string;
@@ -3728,6 +4225,12 @@ export declare interface TranscribeWithDeploymentParams {
3728
4225
  signal: AbortSignal;
3729
4226
  }
3730
4227
 
4228
+ /** A translate function compatible with i18next's `TFunction`. */
4229
+ declare type Translate = (key: string, options?: Record<string, unknown>) => string;
4230
+
4231
+ /** A translate function compatible with i18next's `TFunction`. */
4232
+ declare type Translate_2 = (key: string, options?: Record<string, unknown>) => string;
4233
+
3731
4234
  export declare const trimFileNameToByteLimit: (name: string, limit?: number) => string;
3732
4235
 
3733
4236
  /** An error thrown to indicate the caller is unauthenticated. */
@@ -3786,6 +4289,62 @@ export declare interface UploadFileWithProgressOptions {
3786
4289
  /** Upload mode passed to `FilesApi.uploadFile`: overwrite an existing file or fail if it already exists. */
3787
4290
  export declare type UploadMode = 'overwrite' | 'create-only';
3788
4291
 
4292
+ /**
4293
+ * i18n key strings that the consuming app's translation bundle must define for
4294
+ * `mapUsageDataToDashboard` to produce correctly translated strings. The
4295
+ * values are the default key paths used by AI DIAL Chat.
4296
+ */
4297
+ export declare const USAGE_DATA_I18N_KEYS: {
4298
+ /** Title for the current-UTC-day card (e.g. `'Today'`). */
4299
+ readonly todayTitle: "usage.todayTitle";
4300
+ /** Accessible period description for the current-UTC-day card. */
4301
+ readonly todayPeriodDescription: "usage.todayPeriodDescription";
4302
+ /** Title for the current-UTC-week card (e.g. `'This week'`). */
4303
+ readonly thisWeekTitle: "usage.thisWeekTitle";
4304
+ /** Accessible period description for the current-UTC-week card. */
4305
+ readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
4306
+ /** Title for the current-UTC-month card (e.g. `'This month'`). */
4307
+ readonly thisMonthTitle: "usage.thisMonthTitle";
4308
+ /** Accessible period description for the current-UTC-month card. */
4309
+ readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
4310
+ /** Aria label when there is no limit. Receives `{ used: string }`. */
4311
+ readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
4312
+ /** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
4313
+ readonly progressAriaLabel: "usage.progressAriaLabel";
4314
+ };
4315
+
4316
+ /**
4317
+ * i18n key strings that the consuming app's translation bundle must define for
4318
+ * `mapUserUsageToModelLimits` and `mapOverallCostLimitsToPeriodStatuses` to produce
4319
+ * correctly translated strings. The values are the default key paths used by AI DIAL Chat.
4320
+ */
4321
+ export declare const USAGE_MODEL_LIMITS_I18N_KEYS: {
4322
+ /** Period label used in tooltip text. Receives no interpolation. */
4323
+ readonly todayPeriodDescription: "usage.todayPeriodDescription";
4324
+ /** Period label used in tooltip text. Receives no interpolation. */
4325
+ readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
4326
+ /** Period label used in tooltip text. Receives no interpolation. */
4327
+ readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
4328
+ /** Tooltip when the overall cost limit is running low. Receives `{ period: string }`. */
4329
+ readonly overallCostLimitRunningLowTooltip: "usage.overallCostLimitRunningLowTooltip";
4330
+ /** Tooltip when the overall cost limit is reached. Receives `{ period: string }`. */
4331
+ readonly overallCostLimitReachedTooltip: "usage.overallCostLimitReachedTooltip";
4332
+ /** Aria label for a metric cell with no data. */
4333
+ readonly unavailableLabel: "usage.unavailableLabel";
4334
+ /** Supporting label when a token limit follows the cost limit. */
4335
+ readonly followsCostLimitLabel: "usage.followsCostLimitLabel";
4336
+ /** Supporting label when there is no per-deployment token limit. */
4337
+ readonly noLimitLabel: "usage.noLimitLabel";
4338
+ /** Aria label when token usage has no limit but follows the cost limit. Receives `{ used: string }`. */
4339
+ readonly followsCostLimitAriaLabel: "usage.followsCostLimitAriaLabel";
4340
+ /** Aria label when there is no limit. Receives `{ used: string }`. */
4341
+ readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
4342
+ /** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
4343
+ readonly progressAriaLabel: "usage.progressAriaLabel";
4344
+ /** Label for the spent-cost cell. Receives `{ amount: string }`. */
4345
+ readonly spentLabel: "usage.spentLabel";
4346
+ };
4347
+
3789
4348
  /**
3790
4349
  * Synchronises the active conversation with the conversation list and returns
3791
4350
  * the panel-space id of the active conversation, or `undefined` when none is active.
@@ -3820,6 +4379,25 @@ export declare interface UseActiveConversationSyncParams {
3820
4379
  toPanelConversationId: (id: string) => string;
3821
4380
  }
3822
4381
 
4382
+ /** Loads fresh service statuses without coupling proactive credentials to a live completion. */
4383
+ export declare const useApplicationCredentials: ({ appId, externalServicesClient, offlineCredentialsClient, }: UseApplicationCredentialsParams) => {
4384
+ services: ApplicationExternalServiceDto[];
4385
+ isOfflineConnected: boolean;
4386
+ isLoading: boolean;
4387
+ hasError: boolean;
4388
+ refresh: () => Promise<void>;
4389
+ };
4390
+
4391
+ /** Configured operations for loading application credential metadata. */
4392
+ export declare interface UseApplicationCredentialsParams {
4393
+ /** Application identifier passed through to the configured client. */
4394
+ appId: string;
4395
+ /** Host-configured external-services API. */
4396
+ externalServicesClient: Pick<ExternalServicesApi, 'listExternalServices'>;
4397
+ /** Host-configured offline-credentials API. */
4398
+ offlineCredentialsClient: Pick<OfflineCredentialsApi, 'getOfflineCredentials'>;
4399
+ }
4400
+
3823
4401
  /**
3824
4402
  * Generic single-slot pending / loading / error state machine for
3825
4403
  * confirmation dialogs that trigger an async operation.
@@ -3862,8 +4440,8 @@ export declare const useAttachmentUpload: ({ filesApi, bucket, onNetworkError, d
3862
4440
 
3863
4441
  /** Parameters for {@link useAttachmentUpload}. */
3864
4442
  export declare interface UseAttachmentUploadParams {
3865
- /** Already-configured generated-client instance used to upload the file. */
3866
- filesApi: Pick<FilesApi, 'uploadFile'>;
4443
+ /** Already-configured client; optional listing skips stored names after a conflict. */
4444
+ filesApi: Pick<FilesApi, 'uploadFile'> & Partial<Pick<FilesApi, 'listFiles'>>;
3867
4445
  /** DIAL Core bucket the file is uploaded into. */
3868
4446
  bucket: string | undefined;
3869
4447
  /** Called with batched filenames after a burst of network-error upload failures. */
@@ -3883,12 +4461,14 @@ export declare interface UseAttachmentUploadResult {
3883
4461
  * MIME types, debouncing a burst of rejected files into a single
3884
4462
  * `onValidationError` call rather than firing one per file.
3885
4463
  */
3886
- export declare const useAttachmentValidation: ({ allowedMimeTypes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
4464
+ export declare const useAttachmentValidation: ({ allowedMimeTypes, maxFileSizeBytes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
3887
4465
 
3888
4466
  /** Parameters for {@link useAttachmentValidation}. */
3889
4467
  export declare interface UseAttachmentValidationParams {
3890
4468
  /** Resolved MIME types currently allowed for attachments. */
3891
4469
  allowedMimeTypes: string[];
4470
+ /** Maximum attachment file size, in bytes. When omitted, no file is rejected for size. */
4471
+ maxFileSizeBytes?: number;
3892
4472
  /** Called with a structured event when a rejected attachment is reported, at most once per debounce window. */
3893
4473
  onValidationError?: (event: AttachmentValidationErrorEvent) => void;
3894
4474
  /** Debounce window, in ms, before firing `onValidationError` for a rejected file. Defaults to `100`. */
@@ -4696,11 +5276,11 @@ export declare interface UseDialFileManagerResult {
4696
5276
  * current one becomes excluded. A `fileManagerTabs` of `undefined` means no
4697
5277
  * restriction — every tab in `allTabs` stays enabled and no reset ever fires.
4698
5278
  */
4699
- export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: TabModel[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
5279
+ export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: FilterChipItem<DialFileManagerTabs>[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
4700
5280
 
4701
5281
  /** Values returned by `useDialFileManagerTabConfig`. */
4702
5282
  export declare interface UseDialFileManagerTabConfigResult {
4703
- tabs: ToolbarOptions['tabs'];
5283
+ tabs: FileTreeOptions['tabs'];
4704
5284
  }
4705
5285
 
4706
5286
  /**
@@ -4889,6 +5469,64 @@ export declare interface UseFavoriteEntitiesStateResult {
4889
5469
  toggleFavorite: (id: string, isFavorite: boolean, entityType?: FavoriteEntityType) => Promise<void>;
4890
5470
  }
4891
5471
 
5472
+ /**
5473
+ * Composes the file-manager tab/listing hooks into the stateful part of an attachment picker:
5474
+ * active tab, selected paths, and hidden-path/MIME/size/folder row eligibility. Returns the
5475
+ * existing `useDialFileManager` controller unchanged and the selection/tab/eligibility fields
5476
+ * `FileManagerAttachModal` already consumes — it composes that modal, it does not replace it.
5477
+ * Final attachment filtering, deduplication, and count enforcement stay owned by the modal.
5478
+ */
5479
+ export declare const useFileAttachmentPicker: ({ fileManagerOptions, bucket, forbiddenSymbolsRegExp, tabLabels, allowedTabs, initialTab, allowedTypes, maxSelectableFileSize, canAttachFolders, }: UseFileAttachmentPickerOptions) => UseFileAttachmentPickerResult;
5480
+
5481
+ /** Options accepted by {@link useFileAttachmentPicker}. */
5482
+ export declare interface UseFileAttachmentPickerOptions {
5483
+ /**
5484
+ * Configured `useDialFileManager` options besides the values this hook derives:
5485
+ * `bucket`, `activeTab`, `rootLabel`, `variant`, and `forbiddenSymbolsRegExp`.
5486
+ */
5487
+ fileManagerOptions: Omit<UseDialFileManagerOptions, 'bucket' | 'activeTab' | 'rootLabel' | 'variant' | 'forbiddenSymbolsRegExp'>;
5488
+ /** DIAL Core bucket to browse. */
5489
+ bucket: string;
5490
+ /** Regexp of characters forbidden in file/folder names, forwarded to `useDialFileManager`. */
5491
+ forbiddenSymbolsRegExp?: RegExp;
5492
+ /** Host-translated label per tab; also supplies the active tab's root-folder label. */
5493
+ tabLabels: Record<DialFileManagerTabs, string>;
5494
+ /** Tab ids the host's configuration allows. `undefined` allows every tab. */
5495
+ allowedTabs?: string[];
5496
+ /** Initial active tab. Defaults to `DialFileManagerTabs.MyFiles`. */
5497
+ initialTab?: DialFileManagerTabs;
5498
+ /** MIME types eligible for selection/upload. Empty or absent allows every type. */
5499
+ allowedTypes?: string[];
5500
+ /** Files at or below this size (bytes) remain eligible; absent allows any size. */
5501
+ maxSelectableFileSize?: number;
5502
+ /** Whether folder rows are eligible for selection. Defaults to `false`. */
5503
+ canAttachFolders?: boolean;
5504
+ }
5505
+
5506
+ /** Result returned by {@link useFileAttachmentPicker}. */
5507
+ export declare interface UseFileAttachmentPickerResult {
5508
+ /** The composed file-manager controller; forward to `FileManagerAttachModal`'s `controller` prop. */
5509
+ controller: UseDialFileManagerResult;
5510
+ /** Active tab. */
5511
+ activeTab: DialFileManagerTabs;
5512
+ /** Tab list filtered to `allowedTabs`; forward to `FileManagerAttachModal`'s `tabs` prop. */
5513
+ tabs: FileTreeOptions['tabs'];
5514
+ /** Switches the active tab and clears the current selection. */
5515
+ onTabChange: (tab: DialFileManagerTabs) => void;
5516
+ /** Currently selected paths. */
5517
+ selectedPaths: Set<string>;
5518
+ /** Replaces the selection with a defensive copy of the given set. */
5519
+ onSelectedPathsChange: (paths: Set<string>) => void;
5520
+ /** Row eligibility predicate; forward to `FileManagerAttachModal`'s `isRowSelectable` prop. */
5521
+ isRowSelectable: (node: {
5522
+ data?: FileManagerSelectableNode | null;
5523
+ }) => boolean;
5524
+ /** MIME eligibility predicate; forward to `FileManagerAttachModal`'s `isFileTypeAllowed` prop. */
5525
+ isFileTypeAllowed: (contentType: string) => boolean;
5526
+ /** Accepted upload MIME types; forward to `FileManagerAttachModal`'s `allowedFileTypes` prop. */
5527
+ allowedFileTypes: DialFileAcceptType[] | undefined;
5528
+ }
5529
+
4892
5530
  export { useGridEditingScroll }
4893
5531
 
4894
5532
  export { UseGridEditingScrollOptions }
@@ -4932,10 +5570,11 @@ export declare interface UseImportFilePickerResult {
4932
5570
  * Builds the `McpAppHostAdapter` a host injects into `@epam/ai-dial-mcp-apps`'s
4933
5571
  * hooks/components, wiring the library's host-context/tool-call/resource-fetch
4934
5572
  * contract to a configured `McpAppsApiClient` and this app's theme/locale/config
4935
- * values (`hostContextParams`, `sandboxUrl`) — this hook itself never reads app
4936
- * context, so a host builds those values wherever it already has them.
5573
+ * values (`hostContextParams`, `sandboxUrl`), plus the host's own identity
5574
+ * (`hostInfo`) — this hook itself never reads app context, so a host builds
5575
+ * those values wherever it already has them.
4937
5576
  */
4938
- export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams) => McpAppHostAdapter;
5577
+ export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams, hostInfo: Implementation) => McpAppHostAdapter;
4939
5578
 
4940
5579
  /**
4941
5580
  * Builds the `McpUiHostContext` delivered to a mounted MCP App during its
@@ -5038,8 +5677,6 @@ export declare const useOpenMcpAppCanvas: (cache: McpAppResponseCache, hostAdapt
5038
5677
 
5039
5678
  /** User-facing text `useOpenMcpAppCanvas` needs but cannot resolve itself — a lib must not call `t()`. */
5040
5679
  export declare interface UseOpenMcpAppCanvasLabels {
5041
- /** Canvas panel title while an MCP App is loading or open. */
5042
- title: string;
5043
5680
  /** Error label shown when the resource fetch is forbidden (HTTP 403). */
5044
5681
  forbiddenErrorLabel: string;
5045
5682
  /** Error label shown for any other resource-load/tool-call failure. */
@@ -5177,6 +5814,50 @@ export declare interface UsePublishFoldersResult {
5177
5814
  hasPublishWriteAccess: (folderPath: string[]) => boolean;
5178
5815
  }
5179
5816
 
5817
+ /** Shared, cancellation-safe pagination for one schedule's run history. */
5818
+ export declare const useScheduledTaskRuns: (client: ScheduledTasksApiClient, { scheduleId, enabled, pageSize }: UseScheduledTaskRunsOptions) => {
5819
+ items: ScheduledTaskRunDto[];
5820
+ isLoading: boolean;
5821
+ isLoadingMore: boolean;
5822
+ initialError: Error | null;
5823
+ loadMoreError: Error | null;
5824
+ hasMore: boolean;
5825
+ loadMore: () => void;
5826
+ retryLoadMore: () => void;
5827
+ refetch: () => void;
5828
+ };
5829
+
5830
+ export declare interface UseScheduledTaskRunsOptions {
5831
+ scheduleId: string;
5832
+ enabled?: boolean;
5833
+ pageSize?: number;
5834
+ }
5835
+
5836
+ /** Shared scheduler-list lifecycle with generation-scoped stale-response guards. */
5837
+ export declare const useScheduledTasks: (client: ScheduledTasksApiClient, { enabled, pageSize, debounceMs, initialSearch, initialSort, }?: UseScheduledTasksOptions) => {
5838
+ items: ScheduledTaskDto[];
5839
+ searchQuery: string;
5840
+ setSearchQuery: Dispatch<SetStateAction<string>>;
5841
+ sortKey: "firstToRun" | "lastToRun" | "newest" | "nameAZ";
5842
+ setSortKey: Dispatch<SetStateAction<"firstToRun" | "lastToRun" | "newest" | "nameAZ">>;
5843
+ isLoading: boolean;
5844
+ isLoadingMore: boolean;
5845
+ initialError: Error | null;
5846
+ loadMoreError: Error | null;
5847
+ hasMore: boolean;
5848
+ loadMore: () => void;
5849
+ retryLoadMore: () => void;
5850
+ refetch: () => void;
5851
+ };
5852
+
5853
+ export declare interface UseScheduledTasksOptions {
5854
+ enabled?: boolean;
5855
+ pageSize?: number;
5856
+ debounceMs?: number;
5857
+ initialSearch?: string;
5858
+ initialSort?: ListScheduledTasksSortEnum;
5859
+ }
5860
+
5180
5861
  /**
5181
5862
  * Resolves and manages share-link data for a DIAL Core resource.
5182
5863
  *
@@ -5217,6 +5898,46 @@ export declare interface UseShareRecipientsCountResult {
5217
5898
  invalidateRecipientsCount: (itemId: string) => void;
5218
5899
  }
5219
5900
 
5901
+ /**
5902
+ * Headless controller for the skill-archive upload flow: dialog visibility, the exact-filename
5903
+ * precheck, in-flight exclusion, and import completion. The host supplies the configured request
5904
+ * and observes completion/failure through the injected callbacks; the hook never imports app
5905
+ * contexts, i18n, or a configured API client.
5906
+ */
5907
+ export declare const useSkillArchiveImport: <TResult>({ importArchive, onImported, onError, manifestFileName, }: UseSkillArchiveImportOptions<TResult>) => UseSkillArchiveImportResult;
5908
+
5909
+ /** Options accepted by {@link useSkillArchiveImport}. */
5910
+ export declare interface UseSkillArchiveImportOptions<TResult> {
5911
+ /** Submits the selected archive; the host owns request configuration and the client. */
5912
+ importArchive: (file: File) => Promise<TResult>;
5913
+ /** Called once after a successful import (and any awaited host follow-up) settles. */
5914
+ onImported: (result: TResult) => void | Promise<void>;
5915
+ /** Called once when the import request, or the host's follow-up in {@link onImported}, fails. */
5916
+ onError: (error: unknown, kind: SkillArchiveImportErrorKind) => void;
5917
+ /** Exact filename treated as the skill manifest. Defaults to `'SKILL.md'`. */
5918
+ manifestFileName?: string;
5919
+ }
5920
+
5921
+ /** Result returned by {@link useSkillArchiveImport}. */
5922
+ export declare interface UseSkillArchiveImportResult {
5923
+ /** Whether the upload dialog is open. */
5924
+ isDialogOpen: boolean;
5925
+ /** Current phase of the import. */
5926
+ status: SkillArchiveImportStatus;
5927
+ /** Reason the current/last selection was rejected locally; `undefined` once cleared. */
5928
+ selectionRejectionReason: SkillArchiveSelectionRejectionReason | undefined;
5929
+ /** Classified failure of the last import request; `undefined` outside a request failure. */
5930
+ errorKind: SkillArchiveImportErrorKind | undefined;
5931
+ /** Opens the dialog, unless an import is already in flight. */
5932
+ openDialog: () => void;
5933
+ /** Closes the dialog and clears any rejection reason. */
5934
+ closeDialog: () => void;
5935
+ /** Wire to the dialog drop zone's `onChange`. */
5936
+ handleFilesSelected: (files: File[]) => void;
5937
+ /** Wire to the dialog drop zone's `onReject`. */
5938
+ handleFilesRejected: () => void;
5939
+ }
5940
+
5220
5941
  /**
5221
5942
  * Headless data pipeline behind a skill details side panel: resolves the
5222
5943
  * selected skill from the listings, maps it to a catalog item with its
@@ -5358,6 +6079,10 @@ export declare interface UseSkillEditorSubmitResult {
5358
6079
  errors: SkillEditorErrors;
5359
6080
  /** General submit-time error, distinct from a stale-edit `conflict`. */
5360
6081
  submitError: string | undefined;
6082
+ /** Whether `submitError` was caused by something a plain re-send can clear, rather than by the submission itself. */
6083
+ isSubmitErrorRetryable: boolean;
6084
+ /** Re-submits the values of the attempt that produced `submitError`. No-op before the first submit. */
6085
+ retrySubmit: () => void;
5361
6086
  /** Present when the last save hit a stale-ETag conflict. */
5362
6087
  conflict: {
5363
6088
  message: string;
@@ -5366,6 +6091,12 @@ export declare interface UseSkillEditorSubmitResult {
5366
6091
  clearConflict: () => void;
5367
6092
  /** Validates and submits the given form values. */
5368
6093
  handleSubmit: (values: SkillEditorValues) => Promise<void>;
6094
+ /**
6095
+ * Re-runs the Instructions frontmatter check against the editor's current
6096
+ * values, so a pasted `SKILL.md` is flagged as the text lands rather than
6097
+ * only on submit. Pass as the editor's `onValuesChange`.
6098
+ */
6099
+ handleValuesChange: (values: SkillEditorValues) => void;
5369
6100
  }
5370
6101
 
5371
6102
  /**
@@ -5444,10 +6175,11 @@ export declare interface UseSkillFilePreviewResult {
5444
6175
 
5445
6176
  /**
5446
6177
  * Headless hook that encapsulates skill detail fetching: manifest download and
5447
- * parse, package file listing, overview construction, and in-package file
5448
- * loads. `useCatalogItemDetails` delegates its skill branch here; hosts that
5449
- * only surface skill details consume this hook directly, without the
5450
- * deployment and prompt ports the full catalog pipeline requires.
6178
+ * parse, package file listing, authoritative metadata fetching, overview
6179
+ * construction, and in-package file loads. `useCatalogItemDetails` delegates
6180
+ * its skill branch here; hosts that only surface skill details consume this
6181
+ * hook directly, without the deployment and prompt ports the full catalog
6182
+ * pipeline requires.
5451
6183
  */
5452
6184
  export declare const useSkillItemDetails: ({ api, skills, skillOverviewLabels, }: UseSkillItemDetailsOptions) => UseSkillItemDetailsResult;
5453
6185