@epam/ai-dial-chat-hooks 1.2.0-dev.14 → 1.2.0-dev.142

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 (61) 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/map-deployment-to-catalog-item.js +2 -2
  5. package/catalog/map-skill-to-catalog-item.js +30 -27
  6. package/catalog/publish.js +2 -1
  7. package/catalog/useApplicationCredentials/useApplicationCredentials.js +39 -0
  8. package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js +39 -39
  9. package/catalog/useSkillItemDetails.js +17 -13
  10. package/catalog.d.ts +42 -5
  11. package/catalog.js +6 -5
  12. package/conversation/conversation-transfer/queue.js +8 -5
  13. package/conversation/create-chat-stream-api.js +30 -21
  14. package/conversation/stage.js +23 -0
  15. package/conversation/useAttachmentUpload/useAttachmentUpload.js +12 -5
  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/generation-resume.js +75 -63
  20. package/conversation/useConversationStream/useConversationStream.js +145 -102
  21. package/conversation-overlay.d.ts +7 -0
  22. package/conversation-overlay.js +2 -0
  23. package/conversation-sources/useConversationSources/useConversationSources.js +31 -24
  24. package/conversation-sources.d.ts +1 -1
  25. package/conversation.d.ts +140 -8
  26. package/conversation.js +31 -30
  27. package/file-manager-canvas.d.ts +398 -0
  28. package/file-manager-canvas.js +2 -0
  29. package/file-manager.d.ts +71 -330
  30. package/file-manager.js +15 -15
  31. package/files/attachment-canvas.js +51 -13
  32. package/files/attachment-types.js +14 -13
  33. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +1 -5
  34. package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +43 -0
  35. package/index.d.ts +750 -35
  36. package/index.js +123 -111
  37. package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.js +7 -5
  38. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +1 -1
  39. package/mcp-apps/useMcpAppTools/useMcpAppTools.js +1 -1
  40. package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.js +25 -23
  41. package/mcp-apps.d.ts +8 -6
  42. package/package.json +37 -18
  43. package/scheduled-task/scheduled-task-description.js +77 -0
  44. package/scheduled-task/scheduled-task-preparation.js +24 -0
  45. package/scheduled-task/scheduled-task-trigger.js +7 -2
  46. package/scheduled-task/scheduled-tasks-api-client.js +19 -0
  47. package/scheduled-task/use-scheduled-task-runs.js +82 -0
  48. package/scheduled-task/use-scheduled-tasks.js +93 -0
  49. package/scheduled-tasks.d.ts +180 -3
  50. package/scheduled-tasks.js +7 -2
  51. package/skill/skill.js +10 -7
  52. package/skill/useSkillArchiveImport/useSkillArchiveImport.js +75 -0
  53. package/skill/useSkillEditorLoad.js +29 -28
  54. package/skill/useSkillEditorSubmit.js +92 -75
  55. package/skill-editor.d.ts +107 -0
  56. package/skill-editor.js +9 -8
  57. package/usage/map-usage-data-to-dashboard.js +66 -0
  58. package/usage/map-user-usage-to-model-limits.js +160 -0
  59. package/usage.d.ts +120 -0
  60. package/usage.js +3 -0
  61. package/utils.d.ts +3 -1
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';
@@ -236,6 +256,8 @@ export declare interface AnnouncementListItemLink {
236
256
 
237
257
  /** Normalized shape returned by {@link getApiErrorDetails}. */
238
258
  export declare interface ApiErrorDetails {
259
+ /** Stable domain error code supplied by the API, when present. */
260
+ code?: string;
239
261
  /** HTTP status code carried by the error, when available. */
240
262
  status?: number;
241
263
  /** Resolved human-readable error message, or `null` when none could be resolved. */
@@ -247,6 +269,25 @@ export declare interface ApiErrorDetails {
247
269
  /** Appends a locale's uppercased code to a field label, e.g. `'Name [EN]'`. */
248
270
  export declare const appendLocaleCode: (label: string, locale: string) => string;
249
271
 
272
+ /**
273
+ * Applies a single SSE stream chunk to the message list.
274
+ *
275
+ *
276
+ * Attachments are accumulated: each chunk's attachments are appended to the
277
+ * existing array rather than replacing it.
278
+ *
279
+ * Annotations are merged by `index`: partial `body.title` and `body.quote`
280
+ * strings are concatenated across chunks, matching the same delta-merge
281
+ * semantics used for stages.
282
+ *
283
+ * `state` is overwritten (not merged) by each chunk that carries one,
284
+ * matching the DIAL stateful-app contract.
285
+ *
286
+ * @returns Updated message array, or `null` when the chunk carries no
287
+ * actionable data (empty content, no form_schema, and no attachments).
288
+ */
289
+ export declare const applyChunkToMessages: (messages: Message[], messageIndex: number, chunk: StreamChunk) => Message[] | null;
290
+
250
291
  /** Converts an APScheduler weekday (Monday=0..Sunday=6) to a JS `Date` weekday (Sunday=0..Saturday=6). */
251
292
  export declare const apSchedulerDayToJsDay: (apSchedulerDay: number) => number;
252
293
 
@@ -314,6 +355,7 @@ declare enum AttachmentContentType {
314
355
  Code = 'code',
315
356
  Html = 'html',
316
357
  Visualizer = 'visualizer',
358
+ GroupedVisualizer = 'grouped_visualizer',
317
359
  McpApp = 'mcp_app',
318
360
  Unsupported = 'unsupported',
319
361
  Error = 'error',
@@ -345,10 +387,12 @@ export declare const attachmentToDto: (attachment: Attachment) => AttachmentDto;
345
387
  export declare interface AttachmentValidationErrorEvent {
346
388
  /** Why the attachment(s) were rejected. */
347
389
  reason: AttachmentValidationErrorReason;
348
- /** The resolved MIME types the caller currently allows (possibly empty). */
349
- allowedMimeTypes: string[];
390
+ /** The resolved MIME types the caller currently allows (possibly empty). Present only when `reason` is `NoTypesAllowed` or `UnsupportedType`. */
391
+ allowedMimeTypes?: string[];
350
392
  /** Already-formatted, non-translated extension list (e.g. ".png, .jpg"), present only when `reason` is `UnsupportedType`. */
351
393
  formats?: string;
394
+ /** The size limit, in bytes, that was exceeded. Present only when `reason` is `FileTooLarge`. */
395
+ maxFileSizeBytes?: number;
352
396
  }
353
397
 
354
398
  /** Reason a rejected attachment failed validation. */
@@ -356,7 +400,9 @@ export declare enum AttachmentValidationErrorReason {
356
400
  /** No MIME types are allowed at all — attachments are disabled entirely. */
357
401
  NoTypesAllowed = "noTypesAllowed",
358
402
  /** The attachment's content type is not among the allowed MIME types. */
359
- UnsupportedType = "unsupportedType"
403
+ UnsupportedType = "unsupportedType",
404
+ /** The attachment's file size exceeds `maxFileSizeBytes`. */
405
+ FileTooLarge = "fileTooLarge"
360
406
  }
361
407
 
362
408
  /** Thrown by `transcribeAudio`; carries a machine-readable `reason` instead of translated text. */
@@ -522,6 +568,13 @@ export declare const buildSkillManifestFromFrontmatter: (baseFrontmatter: Record
522
568
  * authored it, when it last changed, and its file inventory. Grouping folders
523
569
  * in the file listing are excluded from both the count and the rows. Sizes are
524
570
  * not shown — the skill metadata carries no content-length field.
571
+ *
572
+ * `skill` is the authoritative `getSkillMetadata` response when that request
573
+ * fulfilled; the caller falls back to the catalog listing entry only when it
574
+ * rejected (`useSkillItemDetails`'s `onFetchSkillDetails`). Either way, this
575
+ * function never fills a gap in one source from the other — an absent
576
+ * `author` omits the row and an absent `updatedAt` leaves the updated row's
577
+ * value empty, exactly as `skill` carries it.
525
578
  */
526
579
  export declare const buildSkillOverview: (skill: SkillMetadataItemDto | undefined, files: SkillMetadataItemDto[], about: SkillAboutDetails | undefined, labels: SkillOverviewLabels) => CatalogItemOverview;
527
580
 
@@ -717,6 +770,13 @@ export declare interface ChatStreamCompletionOptions {
717
770
  signal?: AbortSignal;
718
771
  }
719
772
 
773
+ /**
774
+ * Classifies an import request's HTTP status into a semantic outcome: 400/413/422 are
775
+ * archive-content problems, 409 is a name collision, 429 is rate limiting, 502/503 mean the
776
+ * backend is unavailable, and anything else (including no status at all) is generic.
777
+ */
778
+ export declare const classifySkillArchiveImportError: (status: number | undefined) => SkillArchiveImportErrorKind;
779
+
720
780
  /** Clears all cached fetch results. Call this when leaving a conversation. */
721
781
  export declare const clearAttachmentCache: () => void;
722
782
 
@@ -958,6 +1018,12 @@ export declare const createMessagePair: (content: string, customContent?: Messag
958
1018
  */
959
1019
  export declare const createPublishApiClient: (publishApi: PublishApi) => PublishApiClient;
960
1020
 
1021
+ /**
1022
+ * Composes scheduler operations over an already configured generated client.
1023
+ * Authentication, base URL, CSRF, and retries remain host responsibilities.
1024
+ */
1025
+ export declare const createScheduledTasksApiClient: (client: ScheduledTasksConfiguredClient) => ScheduledTasksApiClient;
1026
+
961
1027
  /**
962
1028
  * Builds a generated-client `Middleware` that throws on 401, and on a
963
1029
  * classified invalid-CSRF 403 refreshes the token and retries the original
@@ -1041,6 +1107,9 @@ export declare const decomposeLocalizedFields: (displayName: LocalizedText | und
1041
1107
  /** Fallback text of a {@link GenerationConflictError} when no message is supplied. */
1042
1108
  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
1109
 
1110
+ /** Safe fallback for hosts that do not supply a translated persistence warning. */
1111
+ 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.";
1112
+
1044
1113
  /**
1045
1114
  * Default ceiling on the summed byte length of an export's attachments.
1046
1115
  *
@@ -1124,6 +1193,14 @@ export declare const deriveConversationRowActionState: (item: Pick<ConversationL
1124
1193
  */
1125
1194
  export declare const deriveFavoriteItems: (items: readonly CatalogItem[]) => CatalogItem[];
1126
1195
 
1196
+ /**
1197
+ * Describes the complete trigger without requiring unrelated task metadata.
1198
+ * Unsupported constraints remain Custom, with the full source expression.
1199
+ * Calendar-month shifts crossing month boundaries or days 29–31 remain
1200
+ * Custom because a shifted monthly day is not equivalent around short months.
1201
+ */
1202
+ export declare const describeScheduledTaskTrigger: (trigger: ScheduleTriggerDto, { timeZone, referenceDate, }?: ScheduledTaskTriggerDescriptionOptions) => ScheduledTaskTriggerDescription;
1203
+
1127
1204
  /** Strip the "files/{bucket}/" prefix from a DIAL Core URL to get the path within the bucket. */
1128
1205
  export declare const dialCorePathToRelative: (dialCorePath: string, bucket: string) => string;
1129
1206
 
@@ -1635,6 +1712,9 @@ export declare const formatOperationFolderName: (destinationFolder: string, root
1635
1712
  */
1636
1713
  export declare const formatQuotedNameList: (names: string[]) => string;
1637
1714
 
1715
+ /** Formats a raw `resetsAt` into display strings, or returns `undefined` when it cannot be formatted. */
1716
+ export declare type FormatResetTime = (resetsAt: string | undefined) => ResetTimeDisplay | undefined;
1717
+
1638
1718
  /**
1639
1719
  * Reported through `onError` when the backend rejects a completion because
1640
1720
  * another generation is already active on the same conversation — what a
@@ -1646,7 +1726,13 @@ export declare class GenerationConflictError extends Error {
1646
1726
  constructor(message?: string);
1647
1727
  }
1648
1728
 
1649
- /** Normalizes any API error into a `{ status?, message, traceId? }` shape. */
1729
+ /** Identifies a failed terminal save independently of the model's generation outcome. */
1730
+ export declare class GenerationPersistenceError extends Error {
1731
+ static readonly type = "conversation_save_failed";
1732
+ constructor();
1733
+ }
1734
+
1735
+ /** Normalizes any API error into a `{ status?, message, traceId?, code? }` shape. */
1650
1736
  export declare const getApiErrorDetails: (error: unknown) => Promise<ApiErrorDetails>;
1651
1737
 
1652
1738
  /** Resolves a human-readable message from an API error's response body, or falls back to `Error.message`. */
@@ -1838,6 +1924,30 @@ export declare interface GreetingTranslations {
1838
1924
  nightNoName: string;
1839
1925
  }
1840
1926
 
1927
+ /** Content payload for an application-scoped grouped visualizer: every attachment a message's visualizer claims, rendered together inside one sandboxed iframe. */
1928
+ declare interface GroupedVisualizerCanvasContent {
1929
+ /** Discriminates the content type to select the correct renderer. */
1930
+ type: AttachmentContentType.GroupedVisualizer;
1931
+ /** Iframe `src`, resolved from the matching registry entry's `url`. */
1932
+ url: string;
1933
+ /** One item per claimed attachment, in the message's attachment order. Each `url` is absolute, resolved by the host. */
1934
+ attachments: GroupedAttachmentItem[];
1935
+ /** Presentation layout hints (`themeId`, `width`, `height`, `mobileHeight`) shared by every item. */
1936
+ layout: CustomVisualizerDataLayout;
1937
+ /** postMessage protocol namespace — MUST equal the registry entry's `title`, or the iframe never receives data. */
1938
+ visualizerName: string;
1939
+ /** Milliseconds to wait for a `send()` request's response before rejecting. From the registry entry; does NOT bound the handshake. */
1940
+ requestTimeout?: number;
1941
+ }
1942
+
1943
+ /** Outcome of building a grouped visualizer payload. */
1944
+ export declare interface GroupedVisualizerResolution {
1945
+ /** The grouped payload, or `null` when no claimed attachment resolved to a URL. */
1946
+ content: GroupedVisualizerCanvasContent | null;
1947
+ /** The claimed attachments that reached `content.attachments`, in the input's order. The caller returns the rest to the ordinary attachment tray. */
1948
+ resolved: DisplayAttachment[];
1949
+ }
1950
+
1841
1951
  /** Whether at least one tool toggle in `value` is active. */
1842
1952
  export declare const hasActiveToolConfig: (value: Record<string, boolean> | undefined) => boolean;
1843
1953
 
@@ -1907,8 +2017,8 @@ export declare const isAnswerIncomplete: (answer: Message | undefined) => boolea
1907
2017
  * True when the conversation's last message is an unresolved assistant
1908
2018
  * placeholder: the backend only persists a conversation at generation start
1909
2019
  * (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.
2020
+ * flagged `streamErrorMessage`/`wasStoppedByUser`). This can mean generation
2021
+ * is still active elsewhere, or that its terminal save failed.
1912
2022
  */
1913
2023
  export declare const isAwaitingGenerationResume: (conversation: Conversation) => boolean;
1914
2024
 
@@ -2110,12 +2220,18 @@ export declare const mapFileMetadataToDialFile: (metadata: FileMetadataResponseD
2110
2220
  export declare const mapFormValuesToCreateBody: (values: ScheduledTaskCreateFormValues) => CreateScheduledTaskBodyDto;
2111
2221
 
2112
2222
  /**
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.
2223
+ * Maps a complete, validated edit draft to an update body. An unset skill
2224
+ * emits null to remove the saved reference; hydrate from detail before editing.
2116
2225
  */
2117
2226
  export declare const mapFormValuesToUpdateBody: (values: ScheduledTaskCreateFormValues) => UpdateScheduledTaskBodyDto;
2118
2227
 
2228
+ /**
2229
+ * Maps the same top-level Cost budgets used by the aggregate cards into table-header state.
2230
+ *
2231
+ * @param formatResetTime - Formats each period's top-level `resetsAt` into the header's reset trio. Omit it to produce statuses with no reset fields.
2232
+ */
2233
+ export declare const mapOverallCostLimitsToPeriodStatuses: (usage: UserLimitStatsResponseDto | undefined, activeLocale: string, t: Translate_2, formatResetTime?: FormatResetTime) => ModelLimitPeriodStatuses;
2234
+
2119
2235
  /**
2120
2236
  * Maps a prompt DTO into a catalog item.
2121
2237
  *
@@ -2174,6 +2290,13 @@ export declare interface MapSkillToCatalogItemOptions {
2174
2290
  favoriteIds: ReadonlySet<string>;
2175
2291
  }
2176
2292
 
2293
+ /**
2294
+ * Returns the normalized stages of a raw stage array or a message-like
2295
+ * payload (reading `custom_content.stages`, falling back to
2296
+ * `customContent.stages`), or `undefined` when there are none.
2297
+ */
2298
+ export declare const mapStages: (source: RawStage[] | RawStageSource | null | undefined) => Stage[] | undefined;
2299
+
2177
2300
  /**
2178
2301
  * Maps a toolset's specification into the lib's credential-status shape,
2179
2302
  * for refreshing the details panel after login/logout. Includes both
@@ -2198,6 +2321,24 @@ export declare interface MapToolsetToCatalogItemOptions {
2198
2321
  resolveIconUrl: (iconUrl: string | undefined) => string | undefined;
2199
2322
  }
2200
2323
 
2324
+ /**
2325
+ * Maps a `UserLimitStatsResponseDto` into `UsageLimitCardGroup`'s `cards` prop,
2326
+ * in Today / This week / This month order. A period is omitted entirely when
2327
+ * the response carries no usable stat for it. Each card's reset trio comes from
2328
+ * `formatResetTime`, and is absent when that callback returns `undefined`.
2329
+ */
2330
+ export declare const mapUsageDataToDashboard: (usage: UserLimitStatsResponseDto | undefined, t: Translate, formatResetTime: FormatResetTime) => UsageLimitCardData[];
2331
+
2332
+ /**
2333
+ * Maps `usage.deployments` into `ModelLimitsSection`'s `rows` prop, joined with model identity
2334
+ * from `deploymentItems`. Rows are included only when any displayed period stat has nonzero usage.
2335
+ * Order follows `Object.keys(deployments)` — `deploymentItems` is enrichment-only.
2336
+ *
2337
+ * @param resolveIconUrl - Resolves a deployment's raw `iconUrl` to the URL the avatar should load.
2338
+ * @param resolveDisplayName - Resolves a localized-text map or plain string to the display name for `activeLocale`.
2339
+ */
2340
+ export declare const mapUserUsageToModelLimits: (usage: UserLimitStatsResponseDto | undefined, deploymentItems: DeploymentItemDto[], activeLocale: string, t: Translate_2, resolveIconUrl: ResolveIconUrl, resolveDisplayName: ResolveDisplayName) => ModelLimitRow[];
2341
+
2201
2342
  /** Content payload for Markdown file attachments. */
2202
2343
  declare interface MarkdownCanvasContent {
2203
2344
  /** Discriminates the content type to select the correct renderer. */
@@ -2218,6 +2359,8 @@ declare type McpAppDisplayMode = NonNullable<McpUiHostContext['displayMode']>;
2218
2359
  declare interface McpAppHostAdapter {
2219
2360
  /** `McpUiHostContext` to deliver to the mounted app's `ui/initialize` handshake. */
2220
2361
  hostContext: McpUiHostContext;
2362
+ /** Host identity (`name`/`version`) to deliver to the mounted app's `ui/initialize` handshake. */
2363
+ hostInfo: Implementation;
2221
2364
  /** Operator-configured MCP Apps sandbox-proxy URL, or `null` when unconfigured. */
2222
2365
  sandboxUrl: string | null;
2223
2366
  /** Fetches the matched tool's MCP Apps `ui://` resource. */
@@ -2234,7 +2377,7 @@ export declare interface McpAppHostContextParams {
2234
2377
  mcpAppTheme?: string;
2235
2378
  /** Host's current i18n locale (BCP 47). */
2236
2379
  locale: string;
2237
- /** Operator-configured MCP App user-agent override. Defaults to `'ai-dial-chat'`. */
2380
+ /** Operator-configured MCP App user-agent override. Defaults to the browser's own `navigator.userAgent`. */
2238
2381
  mcpAppUserAgent?: string;
2239
2382
  /**
2240
2383
  * Display modes the host can switch an app between via
@@ -2356,6 +2499,22 @@ export declare enum McpResourceKind {
2356
2499
 
2357
2500
  export declare const mergeCreatedFolderIntoCache: (cache: Map<string, ListFilesItemDto[]>, parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => Map<string, ListFilesItemDto[]>;
2358
2501
 
2502
+ /**
2503
+ * Merges incoming stage deltas into an existing stage list, keyed by `index`.
2504
+ *
2505
+ * Partial `name` and `content` strings are concatenated across chunks;
2506
+ * attachments are merged by their own `index` (concatenating partial `title`
2507
+ * and `data`); every other field on the incoming delta overwrites the
2508
+ * accumulated one. A brand-new stage whose first chunk carries `name: null`
2509
+ * is normalized to `''`.
2510
+ *
2511
+ * Exported for hosts that keep a flattened `Stage[]` on the message instead
2512
+ * of `Message.custom_content.stages` and therefore cannot reuse
2513
+ * {@link applyChunkToMessages}. Prefer `useConversationStream` when the host
2514
+ * can delegate the whole stream loop.
2515
+ */
2516
+ export declare const mergeStages: (existing: Stage[], incoming: Stage[]) => Stage[];
2517
+
2359
2518
  /** True when `message` is an assistant message carrying at least one stage. */
2360
2519
  export declare const messageHasStages: (message: Message) => boolean;
2361
2520
 
@@ -2368,7 +2527,14 @@ export declare interface MessagePair {
2368
2527
  /** Formats MIME types as a human-readable, comma-separated list of dotted extensions (or the MIME type itself for wildcards). */
2369
2528
  export declare const mimeTypesToAttachmentExtensionLabels: (types: string[]) => string;
2370
2529
 
2371
- /** Normalizes `*` to the all-files wildcard and drops any value that is not a valid `DialFileAcceptType`. */
2530
+ /**
2531
+ * Normalizes `*` to the all-files wildcard, canonicalizes MIME aliases, and drops
2532
+ * any value that is not a valid `DialFileAcceptType`.
2533
+ *
2534
+ * Aliases are resolved because a file picker matches an `accept` entry against its
2535
+ * own MIME table: a declared `text/json` offers no `.json` file, while the
2536
+ * `application/json` it denotes does.
2537
+ */
2372
2538
  export declare const mimeTypesToDialFileAcceptTypes: (types?: string[]) => DialFileAcceptType[] | undefined;
2373
2539
 
2374
2540
  /**
@@ -2544,7 +2710,17 @@ declare interface OoxmlDocxHighlightLocation {
2544
2710
  text: string;
2545
2711
  }
2546
2712
 
2547
- /** Supported document formats rendered by the bundled `@silurus/ooxml` runtime. */
2713
+ /** A complete table row in the DOCX body, matched by cell text. */
2714
+ declare interface OoxmlDocxTableRowLocation {
2715
+ /** Location kind. */
2716
+ kind: OoxmlHighlightKind.DocxTableRow;
2717
+ /** Plain text of each cell, in column order. */
2718
+ cells: string[];
2719
+ /** 1-based matching row in document order. */
2720
+ occurrence: number;
2721
+ }
2722
+
2723
+ /** Supported document formats rendered by the installed `@silurus/ooxml` runtime. */
2548
2724
  declare enum OoxmlFileType {
2549
2725
  Docx = 'docx',
2550
2726
  Xlsx = 'xlsx',
@@ -2566,6 +2742,10 @@ declare enum OoxmlHighlightKind {
2566
2742
  DocxTextRange = 'docxTextRange',
2567
2743
  /** A character range inside a single PPTX shape on one slide. */
2568
2744
  PptxTextRange = 'pptxTextRange',
2745
+ /** A complete DOCX table row identified by its cell text. */
2746
+ DocxTableRow = 'docxTableRow',
2747
+ /** A complete PPTX table row identified by its cell text on one slide. */
2748
+ PptxTableRow = 'pptxTableRow',
2569
2749
  /** One cell, or a contiguous same-row cell range, on a named XLSX sheet. */
2570
2750
  XlsxCellRange = 'xlsxCellRange',
2571
2751
  }
@@ -2574,6 +2754,8 @@ declare enum OoxmlHighlightKind {
2574
2754
  declare type OoxmlHighlightLocation =
2575
2755
  | OoxmlDocxHighlightLocation
2576
2756
  | OoxmlPptxHighlightLocation
2757
+ | OoxmlDocxTableRowLocation
2758
+ | OoxmlPptxTableRowLocation
2577
2759
  | OoxmlXlsxHighlightLocation;
2578
2760
 
2579
2761
  /** A cited character range inside a single shape on one PPTX slide. */
@@ -2592,6 +2774,18 @@ declare interface OoxmlPptxHighlightLocation {
2592
2774
  text: string;
2593
2775
  }
2594
2776
 
2777
+ /** A complete table row on one PPTX slide, matched by cell text. */
2778
+ declare interface OoxmlPptxTableRowLocation {
2779
+ /** Location kind. */
2780
+ kind: OoxmlHighlightKind.PptxTableRow;
2781
+ /** Plain text of each cell, in column order. */
2782
+ cells: string[];
2783
+ /** 1-based matching row on the specified slide. */
2784
+ occurrence: number;
2785
+ /** 1-based slide number. */
2786
+ slide: number;
2787
+ }
2788
+
2595
2789
  /** A cited cell, or contiguous same-row cell range, on a named XLSX sheet. */
2596
2790
  declare interface OoxmlXlsxHighlightLocation {
2597
2791
  /** Discriminates this location within `OoxmlHighlightLocation`. */
@@ -2763,6 +2957,15 @@ export declare const prepareMoveRenameItems: (copiedItems: DialCopiedItem[], buc
2763
2957
  preparedMoveItems: PreparedCopyMoveItem<MoveItemDto>[];
2764
2958
  };
2765
2959
 
2960
+ /**
2961
+ * Validates form values before creating a request body. Hosts translate the
2962
+ * returned field codes and must not issue a write when `ok` is false.
2963
+ */
2964
+ export declare const prepareScheduledTaskCreateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<CreateScheduledTaskBodyDto>;
2965
+
2966
+ /** Validates form values before preparing an update request body. */
2967
+ export declare const prepareScheduledTaskUpdateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<UpdateScheduledTaskBodyDto>;
2968
+
2766
2969
  /** Maximum body length accepted by `CreatePromptDto.content`. */
2767
2970
  export declare const PROMPT_CONTENT_MAX_LENGTH = 50000;
2768
2971
 
@@ -2846,6 +3049,63 @@ export declare interface QuickAppSchemaLike {
2846
3049
  displayName?: string;
2847
3050
  }
2848
3051
 
3052
+ /**
3053
+ * One stage as it arrives from the REST API or the SSE stream, before
3054
+ * normalization. Structurally satisfied by the generated `StageDto` and by a
3055
+ * raw stream delta, both of which omit `index`/`name`/`status` on the chunk
3056
+ * that opens a stage.
3057
+ */
3058
+ export declare interface RawStage {
3059
+ /** Ordering key. Defaults to `0` when absent. */
3060
+ index?: number | null;
3061
+ /** Stage title. `null` on the chunk that opens the stage. */
3062
+ name?: string | null;
3063
+ /** Terminal state as a raw wire string; anything other than `'completed'`/`'failed'` means still running. */
3064
+ status?: string | null;
3065
+ /** Additional stage text. */
3066
+ content?: string | null;
3067
+ /** Short source/category label shown beside the stage name. */
3068
+ tag?: string | null;
3069
+ /** Files produced or referenced by this stage. */
3070
+ attachments?: RawStageAttachment[] | null;
3071
+ }
3072
+
3073
+ /**
3074
+ * One stage attachment as it arrives from the REST API or the SSE stream,
3075
+ * before normalization: every field is optional and may be `null`.
3076
+ */
3077
+ export declare interface RawStageAttachment {
3078
+ /** Zero-based position in the attachment list. */
3079
+ index?: number | null;
3080
+ /** MIME type of the attachment content. */
3081
+ type?: string | null;
3082
+ /** Display name shown in the UI. */
3083
+ title?: string | null;
3084
+ /** Inline base-64 encoded content. */
3085
+ data?: string | null;
3086
+ /** Remote URL pointing to the attachment content. */
3087
+ url?: string | null;
3088
+ /** MIME type of the referenced resource. */
3089
+ reference_type?: string | null;
3090
+ /** URL of an alternate reference resource. */
3091
+ reference_url?: string | null;
3092
+ }
3093
+
3094
+ /**
3095
+ * Message-like payload carrying stages under either the wire's snake_case
3096
+ * `custom_content` or a host's camelCased `customContent`.
3097
+ */
3098
+ export declare interface RawStageSource {
3099
+ /** Custom content as the DIAL wire format spells it. */
3100
+ custom_content?: {
3101
+ stages?: RawStage[] | null;
3102
+ } | null;
3103
+ /** Custom content as a camelCasing host spells it. */
3104
+ customContent?: {
3105
+ stages?: RawStage[] | null;
3106
+ } | null;
3107
+ }
3108
+
2849
3109
  /**
2850
3110
  * Reads a skill file response as raw bytes, or `null` when the body is
2851
3111
  * larger than `SKILL_MANIFEST_MAX_BYTES`. The declared `content-length` is
@@ -2919,6 +3179,23 @@ export declare const referenceAttachmentToPdfCanvasContent: (attachment: Attachm
2919
3179
  /** Name reserved for the hidden marker file used to create empty folders. */
2920
3180
  export declare const RESERVED_MARKER_NAME = ".dial_folder";
2921
3181
 
3182
+ /**
3183
+ * One reset time, already parsed and formatted by the host. Declared
3184
+ * structurally here so this library never imports an application type; the
3185
+ * host passes a value that satisfies this shape (e.g. `apps/chat`'s own
3186
+ * `ResetTimeDisplay`).
3187
+ */
3188
+ export declare interface ResetTimeDisplay {
3189
+ /** Exclusive end of the period as an epoch ms value, for the host's boundary scheduling. */
3190
+ resetsAtMs: number;
3191
+ /** Machine-readable instant for a `<time dateTime>` attribute. */
3192
+ isoValue: string;
3193
+ /** Visible reset line. */
3194
+ label: string;
3195
+ /** Accessible expansion of the reset line. */
3196
+ ariaLabel: string;
3197
+ }
3198
+
2922
3199
  /**
2923
3200
  * Resolves the primary action for a catalog item.
2924
3201
  *
@@ -2938,7 +3215,8 @@ export declare const resolveCatalogPrimaryAction: (item: CatalogItem, fetchPromp
2938
3215
  /** Resolves a syntax-highlighted code canvas content payload from a DisplayAttachment, or `null` if unavailable. */
2939
3216
  export declare const resolveCodeCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, language?: string) => Promise<CodeCanvasContent | ErrorCanvasContent | null>;
2940
3217
 
2941
- export declare const resolveDeploymentFolder: (deployment: Pick<DeploymentItemDto, "isMy" | "sharedWithMe" | "applicationFolder">, labels: DeploymentFolderLabels) => string[];
3218
+ /** Resolves a deployment's display folder, including organization applications without a folder path. */
3219
+ export declare const resolveDeploymentFolder: (deployment: Pick<DeploymentItemDto, "isMy" | "sharedWithMe" | "applicationFolder"> & Partial<Pick<DeploymentItemDto, "type">>, labels: DeploymentFolderLabels) => string[];
2942
3220
 
2943
3221
  /**
2944
3222
  * Resolves a DialFile to the bucket-relative API path used by files BFF endpoints.
@@ -2956,6 +3234,9 @@ export declare const resolveDialFileBucketAndPath: (fileId: string) => {
2956
3234
  path: string;
2957
3235
  } | undefined;
2958
3236
 
3237
+ /** A callback that resolves a display name from a localized-text value. */
3238
+ declare type ResolveDisplayName = (name: string | Record<string, string> | undefined | null, locale: string) => string;
3239
+
2959
3240
  /** Resolves a DIAL Core file id to a downloadable URL. Host-owned — encodes the app's own file-download endpoint. */
2960
3241
  export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
2961
3242
 
@@ -2974,6 +3255,17 @@ export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
2974
3255
  */
2975
3256
  export declare const resolveExternalSourceContentType: (contentType: string, url: string) => string;
2976
3257
 
3258
+ /**
3259
+ * Builds the grouped payload for an application-scoped visualizer from the
3260
+ * attachments its entry claims, reporting which of them `resolveAbsoluteUrl`
3261
+ * could produce a URL for. Unlike the single-attachment resolver this fetches
3262
+ * nothing: the grouped protocol hands the visualizer URLs and lets it read
3263
+ * them itself, so the URLs must be absolute — a host-relative path would
3264
+ * resolve against the iframe's own origin. Producing one is host knowledge,
3265
+ * which is why it arrives as a callback rather than being built here.
3266
+ */
3267
+ export declare const resolveGroupedVisualizerCanvasContent: (attachments: DisplayAttachment[], resolveAbsoluteUrl: (attachment: DisplayAttachment) => string | undefined, entry: ApplicationVisualizer, themeId: string) => GroupedVisualizerResolution;
3268
+
2977
3269
  /**
2978
3270
  * Resolves an HTML canvas content payload from a DisplayAttachment.
2979
3271
  * Fetches and inlines the HTML as `srcdoc` when the attachment has a download URL or inline data.
@@ -2982,12 +3274,17 @@ export declare const resolveExternalSourceContentType: (contentType: string, url
2982
3274
  */
2983
3275
  export declare const resolveHtmlCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<HtmlCanvasContent | ErrorCanvasContent | null>;
2984
3276
 
3277
+ /** A callback that resolves an icon URL from a deployment's raw `iconUrl` field. */
3278
+ declare type ResolveIconUrl = (iconUrl: string | undefined) => string | undefined;
3279
+
2985
3280
  /**
2986
3281
  * Resolves an image canvas content payload from a DisplayAttachment without
2987
- * fetching — returns the BFF download URL (or a local/inline blob URL)
2988
- * directly so the browser cache can be shared with the conversation view's
2989
- * `<img>` element. Error detection is delegated to `<img onError>` in the
2990
- * canvas renderer. Returns `null` if no URL source is available.
3282
+ * fetching — returns a local blob URL or the BFF download URL directly so the
3283
+ * browser cache can be shared with the conversation view's `<img>` element.
3284
+ * A local `File` with bytes takes precedence over the DIAL download URL; a
3285
+ * 0-byte `File` (the file-manager placeholder) does not. Error detection is
3286
+ * delegated to `<img onError>` in the canvas renderer. Returns `null` if no
3287
+ * URL source is available.
2991
3288
  */
2992
3289
  export declare const resolveImageCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => ImageCanvasContent | null;
2993
3290
 
@@ -3105,6 +3402,106 @@ export declare type ScheduledTaskDtoMappingResult = {
3105
3402
  reason: UnsupportedTriggerReason;
3106
3403
  };
3107
3404
 
3405
+ /** A checked request preparation result that never serializes invalid values. */
3406
+ export declare type ScheduledTaskPreparationResult<TBody> = {
3407
+ ok: true;
3408
+ body: TBody;
3409
+ } | {
3410
+ ok: false;
3411
+ errors: ScheduledTaskValidationErrors;
3412
+ };
3413
+
3414
+ export declare interface ScheduledTaskRunsListRequest {
3415
+ scheduleId: string;
3416
+ limit?: number;
3417
+ offset?: number;
3418
+ signal?: AbortSignal;
3419
+ }
3420
+
3421
+ export declare interface ScheduledTasksApiClient {
3422
+ listScheduledTasks: (request?: ScheduledTasksListRequest) => Promise<ListScheduledTasksResponseDto>;
3423
+ listScheduledTaskRuns: (request: ScheduledTaskRunsListRequest) => Promise<ListScheduledTaskRunsResponseDto>;
3424
+ createScheduledTask: (body: CreateScheduledTaskBodyDto) => Promise<CreatedScheduledTaskDto>;
3425
+ getScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3426
+ updateScheduledTask: (scheduleId: string, body: UpdateScheduledTaskBodyDto) => Promise<UpdatedScheduledTaskDto>;
3427
+ pauseScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3428
+ resumeScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3429
+ deleteScheduledTask: (scheduleId: string) => Promise<void>;
3430
+ }
3431
+
3432
+ /** Narrow configured generated-client surface required by scheduler hooks. */
3433
+ export declare interface ScheduledTasksConfiguredClient {
3434
+ listScheduledTasks: (request: {
3435
+ limit?: number;
3436
+ offset?: number;
3437
+ search?: string;
3438
+ sort?: ListScheduledTasksSortEnum;
3439
+ }, options?: RequestInit) => Promise<ListScheduledTasksResponseDto>;
3440
+ listScheduledTaskRuns: (request: {
3441
+ scheduleId: string;
3442
+ limit?: number;
3443
+ offset?: number;
3444
+ }, options?: RequestInit) => Promise<ListScheduledTaskRunsResponseDto>;
3445
+ createScheduledTask: (request: {
3446
+ createScheduledTaskBodyDto: CreateScheduledTaskBodyDto;
3447
+ }) => Promise<CreatedScheduledTaskDto>;
3448
+ getScheduledTask: (request: {
3449
+ scheduleId: string;
3450
+ }) => Promise<ScheduledTaskDto>;
3451
+ updateScheduledTask: (request: {
3452
+ scheduleId: string;
3453
+ updateScheduledTaskBodyDto: UpdateScheduledTaskBodyDto;
3454
+ }) => Promise<UpdatedScheduledTaskDto>;
3455
+ pauseScheduledTask: (request: {
3456
+ scheduleId: string;
3457
+ }) => Promise<ScheduledTaskDto>;
3458
+ resumeScheduledTask: (request: {
3459
+ scheduleId: string;
3460
+ }) => Promise<ScheduledTaskDto>;
3461
+ deleteScheduledTask: (request: {
3462
+ scheduleId: string;
3463
+ }) => Promise<void>;
3464
+ }
3465
+
3466
+ /** App-agnostic request options accepted by the scheduler facade. */
3467
+ export declare interface ScheduledTasksListRequest {
3468
+ limit?: number;
3469
+ offset?: number;
3470
+ search?: string;
3471
+ sort?: ListScheduledTasksSortEnum;
3472
+ signal?: AbortSignal;
3473
+ }
3474
+
3475
+ export declare interface ScheduledTaskTriggerDescription {
3476
+ kind: ScheduledTaskTriggerDescriptionKind;
3477
+ time?: string;
3478
+ dayOfWeek?: string;
3479
+ dayOfMonth?: string;
3480
+ intervalMinutes?: number;
3481
+ date?: Date;
3482
+ expression?: string;
3483
+ sourceTimezone: 'utc';
3484
+ }
3485
+
3486
+ /** Display categories are independent of task editability. */
3487
+ export declare enum ScheduledTaskTriggerDescriptionKind {
3488
+ OneTime = "oneTime",
3489
+ Hourly = "hourly",
3490
+ EveryNMinutes = "everyNMinutes",
3491
+ Daily = "daily",
3492
+ Weekly = "weekly",
3493
+ Monthly = "monthly",
3494
+ Custom = "custom",
3495
+ Invalid = "invalid"
3496
+ }
3497
+
3498
+ export declare interface ScheduledTaskTriggerDescriptionOptions {
3499
+ /** Display timezone; defaults to UTC for backwards compatibility. */
3500
+ timeZone?: string;
3501
+ /** Date whose timezone offset is used. Defaults to now (the existing UTC-storage policy). */
3502
+ referenceDate?: Date;
3503
+ }
3504
+
3108
3505
  /** Serializes a prompt export envelope into a pretty-printed JSON blob. */
3109
3506
  export declare const serializePromptExport: (envelope: PromptExportFormat) => Blob;
3110
3507
 
@@ -3180,6 +3577,28 @@ export declare interface SkillAboutDetails {
3180
3577
  skillPrompt?: string;
3181
3578
  }
3182
3579
 
3580
+ /** Semantic classification of an import request failure. */
3581
+ export declare enum SkillArchiveImportErrorKind {
3582
+ Validation = "validation",
3583
+ Collision = "collision",
3584
+ RateLimited = "rateLimited",
3585
+ ServiceUnavailable = "serviceUnavailable",
3586
+ Generic = "generic"
3587
+ }
3588
+
3589
+ /** Phase of a skill-archive import, driving the host's loading/success/error presentation. */
3590
+ export declare enum SkillArchiveImportStatus {
3591
+ Idle = "idle",
3592
+ Uploading = "uploading",
3593
+ Success = "success",
3594
+ Error = "error"
3595
+ }
3596
+
3597
+ /** Reason a selected/dropped file was rejected before any request was made. */
3598
+ export declare enum SkillArchiveSelectionRejectionReason {
3599
+ UnsupportedFilename = "unsupportedFilename"
3600
+ }
3601
+
3183
3602
  /** Injected API port for skill detail fetching. Mirrors exact server-api wrapper signatures. */
3184
3603
  export declare interface SkillDetailsApi {
3185
3604
  /** Downloads a raw skill file, returning the raw fetch `Response`. */
@@ -3193,6 +3612,12 @@ export declare interface SkillDetailsApi {
3193
3612
  limit?: number;
3194
3613
  recursive?: boolean;
3195
3614
  }, signal?: AbortSignal): Promise<SkillFileListResponseDto>;
3615
+ /**
3616
+ * Fetches a single skill's own authoritative metadata (`author`,
3617
+ * `updatedAt`, and the rest of `SkillMetadataItemDto`) — not the catalog
3618
+ * listing entry, which may be sparse for a shared skill.
3619
+ */
3620
+ getSkillMetadata(bucket: string, path: string, signal?: AbortSignal): Promise<SkillMetadataItemDto>;
3196
3621
  }
3197
3622
 
3198
3623
  /** Already-configured DIAL Core download operations `useSkillEditorLoad` needs. */
@@ -3236,6 +3661,12 @@ export declare interface SkillEditorSubmitClient {
3236
3661
  export declare interface SkillEditorSubmitMessages {
3237
3662
  /** Shown when a required field is empty. */
3238
3663
  required: string;
3664
+ /**
3665
+ * Shown when the Instructions value opens with its own YAML frontmatter
3666
+ * block — pasting a whole `SKILL.md` in there would otherwise produce a
3667
+ * manifest with two frontmatter blocks.
3668
+ */
3669
+ instructionsFrontmatter: string;
3239
3670
  /** Shown when the normalized skill name fails DIAL's naming rules. */
3240
3671
  nameInvalid: string;
3241
3672
  /** Shown when the skill name already exists (409), or defensively on an unreachable create-mode 412. */
@@ -3442,6 +3873,28 @@ export declare const splitFileNameExtension: (fileName: string) => {
3442
3873
  extension: string;
3443
3874
  };
3444
3875
 
3876
+ /**
3877
+ * Answers one question: would appending this text after the fence that
3878
+ * `buildSkillManifest` writes produce a *second* frontmatter block?
3879
+ *
3880
+ * That happens when the text's first non-blank line is a bare `---` and some
3881
+ * later line is a bare `---` too — the exact shape of a `SKILL.md` pasted
3882
+ * wholesale into the editor's Instructions field.
3883
+ *
3884
+ * Detection is deliberately structural rather than YAML-based: a pasted block
3885
+ * whose fenced content fails to parse corrupts the stored manifest
3886
+ * identically (and renders as a setext `h2` in the Catalog's Details tab just
3887
+ * the same), so requiring parseable YAML here would let the worst cases
3888
+ * through. Keeping `parseYaml` out also makes this cheap enough to run on
3889
+ * every keystroke.
3890
+ *
3891
+ * A single unclosed fence returns `false`: with no closing fence there is no
3892
+ * second block, matching `FRONTMATTER_PATTERN`'s own requirement. A `---`
3893
+ * appearing later in the body (a horizontal rule, a setext underline) is
3894
+ * likewise not a frontmatter block.
3895
+ */
3896
+ export declare const startsWithFrontmatterBlock: (text: string) => boolean;
3897
+
3445
3898
  /** Options accepted by {@link ConversationStreamTransport.streamCompletion}. */
3446
3899
  export declare interface StreamCompletionOptions {
3447
3900
  onChunk: (chunk: StreamChunk) => void;
@@ -3450,6 +3903,17 @@ export declare interface StreamCompletionOptions {
3450
3903
  signal: AbortSignal;
3451
3904
  }
3452
3905
 
3906
+ /**
3907
+ * Reported through `onError` when DIAL Core itself signals a failure with an
3908
+ * in-band `{ error: { message } }` SSE chunk. Its `message` is upstream text
3909
+ * intended for the user, unlike a transport failure (failed `fetch`, non-OK
3910
+ * status, broken stream), whose message is technical detail. A custom
3911
+ * transport raises this for any user-facing upstream error text.
3912
+ */
3913
+ export declare class StreamUpstreamError extends Error {
3914
+ constructor(message: string);
3915
+ }
3916
+
3453
3917
  /** Strips leading and trailing slashes from a path segment. */
3454
3918
  export declare const stripSurroundingSlashes: (path: string) => string;
3455
3919
 
@@ -3767,6 +4231,13 @@ export declare const toPublishEntityType: (type: CatalogEntityType) => CatalogPu
3767
4231
  */
3768
4232
  export declare const toPublishRuleDto: (rule: PublicationRule) => PublishRuleDto;
3769
4233
 
4234
+ /**
4235
+ * Returns a renderable `Stage` for one raw payload: `index` defaults to `0`,
4236
+ * `name` to `''`, an unrecognized `status` to `null` (still running), and
4237
+ * `content`/`tag`/`attachments` are passed through when present.
4238
+ */
4239
+ export declare const toStage: (stage: RawStage) => Stage;
4240
+
3770
4241
  /** Request shape the host's selected-deployment recognition call accepts. */
3771
4242
  export declare interface TranscribeWithDeploymentParams {
3772
4243
  audioUrl: string;
@@ -3775,6 +4246,12 @@ export declare interface TranscribeWithDeploymentParams {
3775
4246
  signal: AbortSignal;
3776
4247
  }
3777
4248
 
4249
+ /** A translate function compatible with i18next's `TFunction`. */
4250
+ declare type Translate = (key: string, options?: Record<string, unknown>) => string;
4251
+
4252
+ /** A translate function compatible with i18next's `TFunction`. */
4253
+ declare type Translate_2 = (key: string, options?: Record<string, unknown>) => string;
4254
+
3778
4255
  export declare const trimFileNameToByteLimit: (name: string, limit?: number) => string;
3779
4256
 
3780
4257
  /** An error thrown to indicate the caller is unauthenticated. */
@@ -3833,6 +4310,62 @@ export declare interface UploadFileWithProgressOptions {
3833
4310
  /** Upload mode passed to `FilesApi.uploadFile`: overwrite an existing file or fail if it already exists. */
3834
4311
  export declare type UploadMode = 'overwrite' | 'create-only';
3835
4312
 
4313
+ /**
4314
+ * i18n key strings that the consuming app's translation bundle must define for
4315
+ * `mapUsageDataToDashboard` to produce correctly translated strings. The
4316
+ * values are the default key paths used by AI DIAL Chat.
4317
+ */
4318
+ export declare const USAGE_DATA_I18N_KEYS: {
4319
+ /** Title for the current-UTC-day card (e.g. `'Today'`). */
4320
+ readonly todayTitle: "usage.todayTitle";
4321
+ /** Accessible period description for the current-UTC-day card. */
4322
+ readonly todayPeriodDescription: "usage.todayPeriodDescription";
4323
+ /** Title for the current-UTC-week card (e.g. `'This week'`). */
4324
+ readonly thisWeekTitle: "usage.thisWeekTitle";
4325
+ /** Accessible period description for the current-UTC-week card. */
4326
+ readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
4327
+ /** Title for the current-UTC-month card (e.g. `'This month'`). */
4328
+ readonly thisMonthTitle: "usage.thisMonthTitle";
4329
+ /** Accessible period description for the current-UTC-month card. */
4330
+ readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
4331
+ /** Aria label when there is no limit. Receives `{ used: string }`. */
4332
+ readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
4333
+ /** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
4334
+ readonly progressAriaLabel: "usage.progressAriaLabel";
4335
+ };
4336
+
4337
+ /**
4338
+ * i18n key strings that the consuming app's translation bundle must define for
4339
+ * `mapUserUsageToModelLimits` and `mapOverallCostLimitsToPeriodStatuses` to produce
4340
+ * correctly translated strings. The values are the default key paths used by AI DIAL Chat.
4341
+ */
4342
+ export declare const USAGE_MODEL_LIMITS_I18N_KEYS: {
4343
+ /** Period label used in tooltip text. Receives no interpolation. */
4344
+ readonly todayPeriodDescription: "usage.todayPeriodDescription";
4345
+ /** Period label used in tooltip text. Receives no interpolation. */
4346
+ readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
4347
+ /** Period label used in tooltip text. Receives no interpolation. */
4348
+ readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
4349
+ /** Tooltip when the overall cost limit is running low. Receives `{ period: string }`. */
4350
+ readonly overallCostLimitRunningLowTooltip: "usage.overallCostLimitRunningLowTooltip";
4351
+ /** Tooltip when the overall cost limit is reached. Receives `{ period: string }`. */
4352
+ readonly overallCostLimitReachedTooltip: "usage.overallCostLimitReachedTooltip";
4353
+ /** Aria label for a metric cell with no data. */
4354
+ readonly unavailableLabel: "usage.unavailableLabel";
4355
+ /** Supporting label when a token limit follows the cost limit. */
4356
+ readonly followsCostLimitLabel: "usage.followsCostLimitLabel";
4357
+ /** Supporting label when there is no per-deployment token limit. */
4358
+ readonly noLimitLabel: "usage.noLimitLabel";
4359
+ /** Aria label when token usage has no limit but follows the cost limit. Receives `{ used: string }`. */
4360
+ readonly followsCostLimitAriaLabel: "usage.followsCostLimitAriaLabel";
4361
+ /** Aria label when there is no limit. Receives `{ used: string }`. */
4362
+ readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
4363
+ /** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
4364
+ readonly progressAriaLabel: "usage.progressAriaLabel";
4365
+ /** Label for the spent-cost cell. Receives `{ amount: string }`. */
4366
+ readonly spentLabel: "usage.spentLabel";
4367
+ };
4368
+
3836
4369
  /**
3837
4370
  * Synchronises the active conversation with the conversation list and returns
3838
4371
  * the panel-space id of the active conversation, or `undefined` when none is active.
@@ -3867,6 +4400,25 @@ export declare interface UseActiveConversationSyncParams {
3867
4400
  toPanelConversationId: (id: string) => string;
3868
4401
  }
3869
4402
 
4403
+ /** Loads fresh service statuses without coupling proactive credentials to a live completion. */
4404
+ export declare const useApplicationCredentials: ({ appId, externalServicesClient, offlineCredentialsClient, }: UseApplicationCredentialsParams) => {
4405
+ services: ApplicationExternalServiceDto[];
4406
+ isOfflineConnected: boolean;
4407
+ isLoading: boolean;
4408
+ hasError: boolean;
4409
+ refresh: () => Promise<void>;
4410
+ };
4411
+
4412
+ /** Configured operations for loading application credential metadata. */
4413
+ export declare interface UseApplicationCredentialsParams {
4414
+ /** Application identifier passed through to the configured client. */
4415
+ appId: string;
4416
+ /** Host-configured external-services API. */
4417
+ externalServicesClient: Pick<ExternalServicesApi, 'listExternalServices'>;
4418
+ /** Host-configured offline-credentials API. */
4419
+ offlineCredentialsClient: Pick<OfflineCredentialsApi, 'getOfflineCredentials'>;
4420
+ }
4421
+
3870
4422
  /**
3871
4423
  * Generic single-slot pending / loading / error state machine for
3872
4424
  * confirmation dialogs that trigger an async operation.
@@ -3909,8 +4461,8 @@ export declare const useAttachmentUpload: ({ filesApi, bucket, onNetworkError, d
3909
4461
 
3910
4462
  /** Parameters for {@link useAttachmentUpload}. */
3911
4463
  export declare interface UseAttachmentUploadParams {
3912
- /** Already-configured generated-client instance used to upload the file. */
3913
- filesApi: Pick<FilesApi, 'uploadFile'>;
4464
+ /** Already-configured client; optional listing skips stored names after a conflict. */
4465
+ filesApi: Pick<FilesApi, 'uploadFile'> & Partial<Pick<FilesApi, 'listFiles'>>;
3914
4466
  /** DIAL Core bucket the file is uploaded into. */
3915
4467
  bucket: string | undefined;
3916
4468
  /** Called with batched filenames after a burst of network-error upload failures. */
@@ -3930,12 +4482,14 @@ export declare interface UseAttachmentUploadResult {
3930
4482
  * MIME types, debouncing a burst of rejected files into a single
3931
4483
  * `onValidationError` call rather than firing one per file.
3932
4484
  */
3933
- export declare const useAttachmentValidation: ({ allowedMimeTypes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
4485
+ export declare const useAttachmentValidation: ({ allowedMimeTypes, maxFileSizeBytes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
3934
4486
 
3935
4487
  /** Parameters for {@link useAttachmentValidation}. */
3936
4488
  export declare interface UseAttachmentValidationParams {
3937
4489
  /** Resolved MIME types currently allowed for attachments. */
3938
4490
  allowedMimeTypes: string[];
4491
+ /** Maximum attachment file size, in bytes. When omitted, no file is rejected for size. */
4492
+ maxFileSizeBytes?: number;
3939
4493
  /** Called with a structured event when a rejected attachment is reported, at most once per debounce window. */
3940
4494
  onValidationError?: (event: AttachmentValidationErrorEvent) => void;
3941
4495
  /** Debounce window, in ms, before firing `onValidationError` for a rejected file. Defaults to `100`. */
@@ -4445,7 +4999,7 @@ export declare interface UseConversationSourcesResult {
4445
4999
  uploaded: DisplayAttachment[];
4446
5000
  /** Deduplicated attachments the assistant generated across the conversation. */
4447
5001
  generated: DisplayAttachment[];
4448
- /** Quotation sources referenced by assistant messages, deduplicated by URL. */
5002
+ /** Quotation sources referenced by assistant messages, deduplicated by URL; PDF sources are qualified with `#page=N`. */
4449
5003
  sources: QuotationSource[];
4450
5004
  }
4451
5005
 
@@ -4457,7 +5011,7 @@ export declare interface UseConversationSourcesResult {
4457
5011
  * `transport`/`generation`/`channel`/`overlay` capabilities rather than any
4458
5012
  * app context or `server-api` import.
4459
5013
  */
4460
- export declare const useConversationStream: ({ conversationId, state: { setConversation, conversationRef }, transport, generation: { startGeneration, completeGeneration }, channel, overlay, onStopError, generationConflictMessage, }: UseConversationStreamParams) => UseConversationStreamResult;
5014
+ export declare const useConversationStream: ({ conversationId, state: { setConversation, conversationRef }, transport, generation: { startGeneration, completeGeneration }, channel, overlay, onStopError, generationConflictMessage, generationPersistenceErrorMessage, onStreamError, }: UseConversationStreamParams) => UseConversationStreamResult;
4461
5015
 
4462
5016
  /** Parameters for {@link useConversationStream}. */
4463
5017
  export declare interface UseConversationStreamParams {
@@ -4475,6 +5029,15 @@ export declare interface UseConversationStreamParams {
4475
5029
  * {@link DEFAULT_GENERATION_CONFLICT_MESSAGE}.
4476
5030
  */
4477
5031
  generationConflictMessage?: string;
5032
+ /** Host-translated warning shown when the received answer could not be saved. */
5033
+ generationPersistenceErrorMessage?: string;
5034
+ /**
5035
+ * Receives the original error of every failed stream. The hook shows only
5036
+ * host-supplied or upstream-supplied text on the message bubble and hides
5037
+ * transport detail (e.g. `Failed to fetch`), so this is where the host can
5038
+ * still log or report the raw error.
5039
+ */
5040
+ onStreamError?: (error: Error) => void;
4478
5041
  }
4479
5042
 
4480
5043
  /** Return value of {@link useConversationStream}. */
@@ -4743,11 +5306,11 @@ export declare interface UseDialFileManagerResult {
4743
5306
  * current one becomes excluded. A `fileManagerTabs` of `undefined` means no
4744
5307
  * restriction — every tab in `allTabs` stays enabled and no reset ever fires.
4745
5308
  */
4746
- export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: TabModel[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
5309
+ export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: FilterChipItem<DialFileManagerTabs>[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
4747
5310
 
4748
5311
  /** Values returned by `useDialFileManagerTabConfig`. */
4749
5312
  export declare interface UseDialFileManagerTabConfigResult {
4750
- tabs: ToolbarOptions['tabs'];
5313
+ tabs: FileTreeOptions['tabs'];
4751
5314
  }
4752
5315
 
4753
5316
  /**
@@ -4936,6 +5499,64 @@ export declare interface UseFavoriteEntitiesStateResult {
4936
5499
  toggleFavorite: (id: string, isFavorite: boolean, entityType?: FavoriteEntityType) => Promise<void>;
4937
5500
  }
4938
5501
 
5502
+ /**
5503
+ * Composes the file-manager tab/listing hooks into the stateful part of an attachment picker:
5504
+ * active tab, selected paths, and hidden-path/MIME/size/folder row eligibility. Returns the
5505
+ * existing `useDialFileManager` controller unchanged and the selection/tab/eligibility fields
5506
+ * `FileManagerAttachModal` already consumes — it composes that modal, it does not replace it.
5507
+ * Final attachment filtering, deduplication, and count enforcement stay owned by the modal.
5508
+ */
5509
+ export declare const useFileAttachmentPicker: ({ fileManagerOptions, bucket, forbiddenSymbolsRegExp, tabLabels, allowedTabs, initialTab, allowedTypes, maxSelectableFileSize, canAttachFolders, }: UseFileAttachmentPickerOptions) => UseFileAttachmentPickerResult;
5510
+
5511
+ /** Options accepted by {@link useFileAttachmentPicker}. */
5512
+ export declare interface UseFileAttachmentPickerOptions {
5513
+ /**
5514
+ * Configured `useDialFileManager` options besides the values this hook derives:
5515
+ * `bucket`, `activeTab`, `rootLabel`, `variant`, and `forbiddenSymbolsRegExp`.
5516
+ */
5517
+ fileManagerOptions: Omit<UseDialFileManagerOptions, 'bucket' | 'activeTab' | 'rootLabel' | 'variant' | 'forbiddenSymbolsRegExp'>;
5518
+ /** DIAL Core bucket to browse. */
5519
+ bucket: string;
5520
+ /** Regexp of characters forbidden in file/folder names, forwarded to `useDialFileManager`. */
5521
+ forbiddenSymbolsRegExp?: RegExp;
5522
+ /** Host-translated label per tab; also supplies the active tab's root-folder label. */
5523
+ tabLabels: Record<DialFileManagerTabs, string>;
5524
+ /** Tab ids the host's configuration allows. `undefined` allows every tab. */
5525
+ allowedTabs?: string[];
5526
+ /** Initial active tab. Defaults to `DialFileManagerTabs.MyFiles`. */
5527
+ initialTab?: DialFileManagerTabs;
5528
+ /** MIME types eligible for selection/upload. Empty or absent allows every type. */
5529
+ allowedTypes?: string[];
5530
+ /** Files at or below this size (bytes) remain eligible; absent allows any size. */
5531
+ maxSelectableFileSize?: number;
5532
+ /** Whether folder rows are eligible for selection. Defaults to `false`. */
5533
+ canAttachFolders?: boolean;
5534
+ }
5535
+
5536
+ /** Result returned by {@link useFileAttachmentPicker}. */
5537
+ export declare interface UseFileAttachmentPickerResult {
5538
+ /** The composed file-manager controller; forward to `FileManagerAttachModal`'s `controller` prop. */
5539
+ controller: UseDialFileManagerResult;
5540
+ /** Active tab. */
5541
+ activeTab: DialFileManagerTabs;
5542
+ /** Tab list filtered to `allowedTabs`; forward to `FileManagerAttachModal`'s `tabs` prop. */
5543
+ tabs: FileTreeOptions['tabs'];
5544
+ /** Switches the active tab and clears the current selection. */
5545
+ onTabChange: (tab: DialFileManagerTabs) => void;
5546
+ /** Currently selected paths. */
5547
+ selectedPaths: Set<string>;
5548
+ /** Replaces the selection with a defensive copy of the given set. */
5549
+ onSelectedPathsChange: (paths: Set<string>) => void;
5550
+ /** Row eligibility predicate; forward to `FileManagerAttachModal`'s `isRowSelectable` prop. */
5551
+ isRowSelectable: (node: {
5552
+ data?: FileManagerSelectableNode | null;
5553
+ }) => boolean;
5554
+ /** MIME eligibility predicate; forward to `FileManagerAttachModal`'s `isFileTypeAllowed` prop. */
5555
+ isFileTypeAllowed: (contentType: string) => boolean;
5556
+ /** Accepted upload MIME types; forward to `FileManagerAttachModal`'s `allowedFileTypes` prop. */
5557
+ allowedFileTypes: DialFileAcceptType[] | undefined;
5558
+ }
5559
+
4939
5560
  export { useGridEditingScroll }
4940
5561
 
4941
5562
  export { UseGridEditingScrollOptions }
@@ -4979,10 +5600,11 @@ export declare interface UseImportFilePickerResult {
4979
5600
  * Builds the `McpAppHostAdapter` a host injects into `@epam/ai-dial-mcp-apps`'s
4980
5601
  * hooks/components, wiring the library's host-context/tool-call/resource-fetch
4981
5602
  * contract to a configured `McpAppsApiClient` and this app's theme/locale/config
4982
- * values (`hostContextParams`, `sandboxUrl`) — this hook itself never reads app
4983
- * context, so a host builds those values wherever it already has them.
5603
+ * values (`hostContextParams`, `sandboxUrl`), plus the host's own identity
5604
+ * (`hostInfo`) — this hook itself never reads app context, so a host builds
5605
+ * those values wherever it already has them.
4984
5606
  */
4985
- export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams) => McpAppHostAdapter;
5607
+ export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams, hostInfo: Implementation) => McpAppHostAdapter;
4986
5608
 
4987
5609
  /**
4988
5610
  * Builds the `McpUiHostContext` delivered to a mounted MCP App during its
@@ -5085,8 +5707,6 @@ export declare const useOpenMcpAppCanvas: (cache: McpAppResponseCache, hostAdapt
5085
5707
 
5086
5708
  /** User-facing text `useOpenMcpAppCanvas` needs but cannot resolve itself — a lib must not call `t()`. */
5087
5709
  export declare interface UseOpenMcpAppCanvasLabels {
5088
- /** Canvas panel title while an MCP App is loading or open. */
5089
- title: string;
5090
5710
  /** Error label shown when the resource fetch is forbidden (HTTP 403). */
5091
5711
  forbiddenErrorLabel: string;
5092
5712
  /** Error label shown for any other resource-load/tool-call failure. */
@@ -5224,6 +5844,50 @@ export declare interface UsePublishFoldersResult {
5224
5844
  hasPublishWriteAccess: (folderPath: string[]) => boolean;
5225
5845
  }
5226
5846
 
5847
+ /** Shared, cancellation-safe pagination for one schedule's run history. */
5848
+ export declare const useScheduledTaskRuns: (client: ScheduledTasksApiClient, { scheduleId, enabled, pageSize }: UseScheduledTaskRunsOptions) => {
5849
+ items: ScheduledTaskRunDto[];
5850
+ isLoading: boolean;
5851
+ isLoadingMore: boolean;
5852
+ initialError: Error | null;
5853
+ loadMoreError: Error | null;
5854
+ hasMore: boolean;
5855
+ loadMore: () => void;
5856
+ retryLoadMore: () => void;
5857
+ refetch: () => void;
5858
+ };
5859
+
5860
+ export declare interface UseScheduledTaskRunsOptions {
5861
+ scheduleId: string;
5862
+ enabled?: boolean;
5863
+ pageSize?: number;
5864
+ }
5865
+
5866
+ /** Shared scheduler-list lifecycle with generation-scoped stale-response guards. */
5867
+ export declare const useScheduledTasks: (client: ScheduledTasksApiClient, { enabled, pageSize, debounceMs, initialSearch, initialSort, }?: UseScheduledTasksOptions) => {
5868
+ items: ScheduledTaskDto[];
5869
+ searchQuery: string;
5870
+ setSearchQuery: Dispatch<SetStateAction<string>>;
5871
+ sortKey: "firstToRun" | "lastToRun" | "newest" | "nameAZ";
5872
+ setSortKey: Dispatch<SetStateAction<"firstToRun" | "lastToRun" | "newest" | "nameAZ">>;
5873
+ isLoading: boolean;
5874
+ isLoadingMore: boolean;
5875
+ initialError: Error | null;
5876
+ loadMoreError: Error | null;
5877
+ hasMore: boolean;
5878
+ loadMore: () => void;
5879
+ retryLoadMore: () => void;
5880
+ refetch: () => void;
5881
+ };
5882
+
5883
+ export declare interface UseScheduledTasksOptions {
5884
+ enabled?: boolean;
5885
+ pageSize?: number;
5886
+ debounceMs?: number;
5887
+ initialSearch?: string;
5888
+ initialSort?: ListScheduledTasksSortEnum;
5889
+ }
5890
+
5227
5891
  /**
5228
5892
  * Resolves and manages share-link data for a DIAL Core resource.
5229
5893
  *
@@ -5264,6 +5928,46 @@ export declare interface UseShareRecipientsCountResult {
5264
5928
  invalidateRecipientsCount: (itemId: string) => void;
5265
5929
  }
5266
5930
 
5931
+ /**
5932
+ * Headless controller for the skill-archive upload flow: dialog visibility, the exact-filename
5933
+ * precheck, in-flight exclusion, and import completion. The host supplies the configured request
5934
+ * and observes completion/failure through the injected callbacks; the hook never imports app
5935
+ * contexts, i18n, or a configured API client.
5936
+ */
5937
+ export declare const useSkillArchiveImport: <TResult>({ importArchive, onImported, onError, manifestFileName, }: UseSkillArchiveImportOptions<TResult>) => UseSkillArchiveImportResult;
5938
+
5939
+ /** Options accepted by {@link useSkillArchiveImport}. */
5940
+ export declare interface UseSkillArchiveImportOptions<TResult> {
5941
+ /** Submits the selected archive; the host owns request configuration and the client. */
5942
+ importArchive: (file: File) => Promise<TResult>;
5943
+ /** Called once after a successful import (and any awaited host follow-up) settles. */
5944
+ onImported: (result: TResult) => void | Promise<void>;
5945
+ /** Called once when the import request, or the host's follow-up in {@link onImported}, fails. */
5946
+ onError: (error: unknown, kind: SkillArchiveImportErrorKind) => void;
5947
+ /** Exact filename treated as the skill manifest. Defaults to `'SKILL.md'`. */
5948
+ manifestFileName?: string;
5949
+ }
5950
+
5951
+ /** Result returned by {@link useSkillArchiveImport}. */
5952
+ export declare interface UseSkillArchiveImportResult {
5953
+ /** Whether the upload dialog is open. */
5954
+ isDialogOpen: boolean;
5955
+ /** Current phase of the import. */
5956
+ status: SkillArchiveImportStatus;
5957
+ /** Reason the current/last selection was rejected locally; `undefined` once cleared. */
5958
+ selectionRejectionReason: SkillArchiveSelectionRejectionReason | undefined;
5959
+ /** Classified failure of the last import request; `undefined` outside a request failure. */
5960
+ errorKind: SkillArchiveImportErrorKind | undefined;
5961
+ /** Opens the dialog, unless an import is already in flight. */
5962
+ openDialog: () => void;
5963
+ /** Closes the dialog and clears any rejection reason. */
5964
+ closeDialog: () => void;
5965
+ /** Wire to the dialog drop zone's `onChange`. */
5966
+ handleFilesSelected: (files: File[]) => void;
5967
+ /** Wire to the dialog drop zone's `onReject`. */
5968
+ handleFilesRejected: () => void;
5969
+ }
5970
+
5267
5971
  /**
5268
5972
  * Headless data pipeline behind a skill details side panel: resolves the
5269
5973
  * selected skill from the listings, maps it to a catalog item with its
@@ -5405,6 +6109,10 @@ export declare interface UseSkillEditorSubmitResult {
5405
6109
  errors: SkillEditorErrors;
5406
6110
  /** General submit-time error, distinct from a stale-edit `conflict`. */
5407
6111
  submitError: string | undefined;
6112
+ /** Whether `submitError` was caused by something a plain re-send can clear, rather than by the submission itself. */
6113
+ isSubmitErrorRetryable: boolean;
6114
+ /** Re-submits the values of the attempt that produced `submitError`. No-op before the first submit. */
6115
+ retrySubmit: () => void;
5408
6116
  /** Present when the last save hit a stale-ETag conflict. */
5409
6117
  conflict: {
5410
6118
  message: string;
@@ -5413,6 +6121,12 @@ export declare interface UseSkillEditorSubmitResult {
5413
6121
  clearConflict: () => void;
5414
6122
  /** Validates and submits the given form values. */
5415
6123
  handleSubmit: (values: SkillEditorValues) => Promise<void>;
6124
+ /**
6125
+ * Re-runs the Instructions frontmatter check against the editor's current
6126
+ * values, so a pasted `SKILL.md` is flagged as the text lands rather than
6127
+ * only on submit. Pass as the editor's `onValuesChange`.
6128
+ */
6129
+ handleValuesChange: (values: SkillEditorValues) => void;
5416
6130
  }
5417
6131
 
5418
6132
  /**
@@ -5491,10 +6205,11 @@ export declare interface UseSkillFilePreviewResult {
5491
6205
 
5492
6206
  /**
5493
6207
  * Headless hook that encapsulates skill detail fetching: manifest download and
5494
- * parse, package file listing, overview construction, and in-package file
5495
- * loads. `useCatalogItemDetails` delegates its skill branch here; hosts that
5496
- * only surface skill details consume this hook directly, without the
5497
- * deployment and prompt ports the full catalog pipeline requires.
6208
+ * parse, package file listing, authoritative metadata fetching, overview
6209
+ * construction, and in-package file loads. `useCatalogItemDetails` delegates
6210
+ * its skill branch here; hosts that only surface skill details consume this
6211
+ * hook directly, without the deployment and prompt ports the full catalog
6212
+ * pipeline requires.
5498
6213
  */
5499
6214
  export declare const useSkillItemDetails: ({ api, skills, skillOverviewLabels, }: UseSkillItemDetailsOptions) => UseSkillItemDetailsResult;
5500
6215