@epam/ai-dial-chat-hooks 1.2.0-dev.11 → 1.2.0-dev.112

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 (58) 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/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-overlay.d.ts +7 -0
  21. package/conversation-overlay.js +2 -0
  22. package/conversation.d.ts +108 -5
  23. package/conversation.js +24 -23
  24. package/file-manager-canvas.d.ts +398 -0
  25. package/file-manager-canvas.js +2 -0
  26. package/file-manager.d.ts +71 -330
  27. package/file-manager.js +15 -15
  28. package/files/attachment-canvas.js +51 -13
  29. package/files/attachment-types.js +14 -13
  30. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +1 -5
  31. package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +43 -0
  32. package/index.d.ts +717 -31
  33. package/index.js +123 -111
  34. package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.js +7 -5
  35. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +1 -1
  36. package/mcp-apps/useMcpAppTools/useMcpAppTools.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-task-trigger.js +7 -2
  43. package/scheduled-task/scheduled-tasks-api-client.js +19 -0
  44. package/scheduled-task/use-scheduled-task-runs.js +82 -0
  45. package/scheduled-task/use-scheduled-tasks.js +93 -0
  46. package/scheduled-tasks.d.ts +180 -3
  47. package/scheduled-tasks.js +7 -2
  48. package/skill/skill.js +10 -7
  49. package/skill/useSkillArchiveImport/useSkillArchiveImport.js +75 -0
  50. package/skill/useSkillEditorLoad.js +29 -28
  51. package/skill/useSkillEditorSubmit.js +92 -75
  52. package/skill-editor.d.ts +107 -0
  53. package/skill-editor.js +9 -8
  54. package/usage/map-usage-data-to-dashboard.js +66 -0
  55. package/usage/map-user-usage-to-model-limits.js +160 -0
  56. package/usage.d.ts +120 -0
  57. package/usage.js +3 -0
  58. 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
@@ -1124,6 +1190,14 @@ export declare const deriveConversationRowActionState: (item: Pick<ConversationL
1124
1190
  */
1125
1191
  export declare const deriveFavoriteItems: (items: readonly CatalogItem[]) => CatalogItem[];
1126
1192
 
1193
+ /**
1194
+ * Describes the complete trigger without requiring unrelated task metadata.
1195
+ * Unsupported constraints remain Custom, with the full source expression.
1196
+ * Calendar-month shifts crossing month boundaries or days 29–31 remain
1197
+ * Custom because a shifted monthly day is not equivalent around short months.
1198
+ */
1199
+ export declare const describeScheduledTaskTrigger: (trigger: ScheduleTriggerDto, { timeZone, referenceDate, }?: ScheduledTaskTriggerDescriptionOptions) => ScheduledTaskTriggerDescription;
1200
+
1127
1201
  /** Strip the "files/{bucket}/" prefix from a DIAL Core URL to get the path within the bucket. */
1128
1202
  export declare const dialCorePathToRelative: (dialCorePath: string, bucket: string) => string;
1129
1203
 
@@ -1635,6 +1709,9 @@ export declare const formatOperationFolderName: (destinationFolder: string, root
1635
1709
  */
1636
1710
  export declare const formatQuotedNameList: (names: string[]) => string;
1637
1711
 
1712
+ /** Formats a raw `resetsAt` into display strings, or returns `undefined` when it cannot be formatted. */
1713
+ export declare type FormatResetTime = (resetsAt: string | undefined) => ResetTimeDisplay | undefined;
1714
+
1638
1715
  /**
1639
1716
  * Reported through `onError` when the backend rejects a completion because
1640
1717
  * another generation is already active on the same conversation — what a
@@ -1646,7 +1723,7 @@ export declare class GenerationConflictError extends Error {
1646
1723
  constructor(message?: string);
1647
1724
  }
1648
1725
 
1649
- /** Normalizes any API error into a `{ status?, message, traceId? }` shape. */
1726
+ /** Normalizes any API error into a `{ status?, message, traceId?, code? }` shape. */
1650
1727
  export declare const getApiErrorDetails: (error: unknown) => Promise<ApiErrorDetails>;
1651
1728
 
1652
1729
  /** Resolves a human-readable message from an API error's response body, or falls back to `Error.message`. */
@@ -1838,6 +1915,30 @@ export declare interface GreetingTranslations {
1838
1915
  nightNoName: string;
1839
1916
  }
1840
1917
 
1918
+ /** Content payload for an application-scoped grouped visualizer: every attachment a message's visualizer claims, rendered together inside one sandboxed iframe. */
1919
+ declare interface GroupedVisualizerCanvasContent {
1920
+ /** Discriminates the content type to select the correct renderer. */
1921
+ type: AttachmentContentType.GroupedVisualizer;
1922
+ /** Iframe `src`, resolved from the matching registry entry's `url`. */
1923
+ url: string;
1924
+ /** One item per claimed attachment, in the message's attachment order. Each `url` is absolute, resolved by the host. */
1925
+ attachments: GroupedAttachmentItem[];
1926
+ /** Presentation layout hints (`themeId`, `width`, `height`, `mobileHeight`) shared by every item. */
1927
+ layout: CustomVisualizerDataLayout;
1928
+ /** postMessage protocol namespace — MUST equal the registry entry's `title`, or the iframe never receives data. */
1929
+ visualizerName: string;
1930
+ /** Milliseconds to wait for a `send()` request's response before rejecting. From the registry entry; does NOT bound the handshake. */
1931
+ requestTimeout?: number;
1932
+ }
1933
+
1934
+ /** Outcome of building a grouped visualizer payload. */
1935
+ export declare interface GroupedVisualizerResolution {
1936
+ /** The grouped payload, or `null` when no claimed attachment resolved to a URL. */
1937
+ content: GroupedVisualizerCanvasContent | null;
1938
+ /** The claimed attachments that reached `content.attachments`, in the input's order. The caller returns the rest to the ordinary attachment tray. */
1939
+ resolved: DisplayAttachment[];
1940
+ }
1941
+
1841
1942
  /** Whether at least one tool toggle in `value` is active. */
1842
1943
  export declare const hasActiveToolConfig: (value: Record<string, boolean> | undefined) => boolean;
1843
1944
 
@@ -2110,12 +2211,18 @@ export declare const mapFileMetadataToDialFile: (metadata: FileMetadataResponseD
2110
2211
  export declare const mapFormValuesToCreateBody: (values: ScheduledTaskCreateFormValues) => CreateScheduledTaskBodyDto;
2111
2212
 
2112
2213
  /**
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.
2214
+ * Maps a complete, validated edit draft to an update body. An unset skill
2215
+ * emits null to remove the saved reference; hydrate from detail before editing.
2116
2216
  */
2117
2217
  export declare const mapFormValuesToUpdateBody: (values: ScheduledTaskCreateFormValues) => UpdateScheduledTaskBodyDto;
2118
2218
 
2219
+ /**
2220
+ * Maps the same top-level Cost budgets used by the aggregate cards into table-header state.
2221
+ *
2222
+ * @param formatResetTime - Formats each period's top-level `resetsAt` into the header's reset trio. Omit it to produce statuses with no reset fields.
2223
+ */
2224
+ export declare const mapOverallCostLimitsToPeriodStatuses: (usage: UserLimitStatsResponseDto | undefined, activeLocale: string, t: Translate_2, formatResetTime?: FormatResetTime) => ModelLimitPeriodStatuses;
2225
+
2119
2226
  /**
2120
2227
  * Maps a prompt DTO into a catalog item.
2121
2228
  *
@@ -2174,6 +2281,13 @@ export declare interface MapSkillToCatalogItemOptions {
2174
2281
  favoriteIds: ReadonlySet<string>;
2175
2282
  }
2176
2283
 
2284
+ /**
2285
+ * Returns the normalized stages of a raw stage array or a message-like
2286
+ * payload (reading `custom_content.stages`, falling back to
2287
+ * `customContent.stages`), or `undefined` when there are none.
2288
+ */
2289
+ export declare const mapStages: (source: RawStage[] | RawStageSource | null | undefined) => Stage[] | undefined;
2290
+
2177
2291
  /**
2178
2292
  * Maps a toolset's specification into the lib's credential-status shape,
2179
2293
  * for refreshing the details panel after login/logout. Includes both
@@ -2198,6 +2312,24 @@ export declare interface MapToolsetToCatalogItemOptions {
2198
2312
  resolveIconUrl: (iconUrl: string | undefined) => string | undefined;
2199
2313
  }
2200
2314
 
2315
+ /**
2316
+ * Maps a `UserLimitStatsResponseDto` into `UsageLimitCardGroup`'s `cards` prop,
2317
+ * in Today / This week / This month order. A period is omitted entirely when
2318
+ * the response carries no usable stat for it. Each card's reset trio comes from
2319
+ * `formatResetTime`, and is absent when that callback returns `undefined`.
2320
+ */
2321
+ export declare const mapUsageDataToDashboard: (usage: UserLimitStatsResponseDto | undefined, t: Translate, formatResetTime: FormatResetTime) => UsageLimitCardData[];
2322
+
2323
+ /**
2324
+ * Maps `usage.deployments` into `ModelLimitsSection`'s `rows` prop, joined with model identity
2325
+ * from `deploymentItems`. Rows are included only when any displayed period stat has nonzero usage.
2326
+ * Order follows `Object.keys(deployments)` — `deploymentItems` is enrichment-only.
2327
+ *
2328
+ * @param resolveIconUrl - Resolves a deployment's raw `iconUrl` to the URL the avatar should load.
2329
+ * @param resolveDisplayName - Resolves a localized-text map or plain string to the display name for `activeLocale`.
2330
+ */
2331
+ export declare const mapUserUsageToModelLimits: (usage: UserLimitStatsResponseDto | undefined, deploymentItems: DeploymentItemDto[], activeLocale: string, t: Translate_2, resolveIconUrl: ResolveIconUrl, resolveDisplayName: ResolveDisplayName) => ModelLimitRow[];
2332
+
2201
2333
  /** Content payload for Markdown file attachments. */
2202
2334
  declare interface MarkdownCanvasContent {
2203
2335
  /** Discriminates the content type to select the correct renderer. */
@@ -2218,6 +2350,8 @@ declare type McpAppDisplayMode = NonNullable<McpUiHostContext['displayMode']>;
2218
2350
  declare interface McpAppHostAdapter {
2219
2351
  /** `McpUiHostContext` to deliver to the mounted app's `ui/initialize` handshake. */
2220
2352
  hostContext: McpUiHostContext;
2353
+ /** Host identity (`name`/`version`) to deliver to the mounted app's `ui/initialize` handshake. */
2354
+ hostInfo: Implementation;
2221
2355
  /** Operator-configured MCP Apps sandbox-proxy URL, or `null` when unconfigured. */
2222
2356
  sandboxUrl: string | null;
2223
2357
  /** Fetches the matched tool's MCP Apps `ui://` resource. */
@@ -2234,7 +2368,7 @@ export declare interface McpAppHostContextParams {
2234
2368
  mcpAppTheme?: string;
2235
2369
  /** Host's current i18n locale (BCP 47). */
2236
2370
  locale: string;
2237
- /** Operator-configured MCP App user-agent override. Defaults to `'ai-dial-chat'`. */
2371
+ /** Operator-configured MCP App user-agent override. Defaults to the browser's own `navigator.userAgent`. */
2238
2372
  mcpAppUserAgent?: string;
2239
2373
  /**
2240
2374
  * Display modes the host can switch an app between via
@@ -2356,6 +2490,22 @@ export declare enum McpResourceKind {
2356
2490
 
2357
2491
  export declare const mergeCreatedFolderIntoCache: (cache: Map<string, ListFilesItemDto[]>, parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => Map<string, ListFilesItemDto[]>;
2358
2492
 
2493
+ /**
2494
+ * Merges incoming stage deltas into an existing stage list, keyed by `index`.
2495
+ *
2496
+ * Partial `name` and `content` strings are concatenated across chunks;
2497
+ * attachments are merged by their own `index` (concatenating partial `title`
2498
+ * and `data`); every other field on the incoming delta overwrites the
2499
+ * accumulated one. A brand-new stage whose first chunk carries `name: null`
2500
+ * is normalized to `''`.
2501
+ *
2502
+ * Exported for hosts that keep a flattened `Stage[]` on the message instead
2503
+ * of `Message.custom_content.stages` and therefore cannot reuse
2504
+ * {@link applyChunkToMessages}. Prefer `useConversationStream` when the host
2505
+ * can delegate the whole stream loop.
2506
+ */
2507
+ export declare const mergeStages: (existing: Stage[], incoming: Stage[]) => Stage[];
2508
+
2359
2509
  /** True when `message` is an assistant message carrying at least one stage. */
2360
2510
  export declare const messageHasStages: (message: Message) => boolean;
2361
2511
 
@@ -2368,7 +2518,14 @@ export declare interface MessagePair {
2368
2518
  /** Formats MIME types as a human-readable, comma-separated list of dotted extensions (or the MIME type itself for wildcards). */
2369
2519
  export declare const mimeTypesToAttachmentExtensionLabels: (types: string[]) => string;
2370
2520
 
2371
- /** Normalizes `*` to the all-files wildcard and drops any value that is not a valid `DialFileAcceptType`. */
2521
+ /**
2522
+ * Normalizes `*` to the all-files wildcard, canonicalizes MIME aliases, and drops
2523
+ * any value that is not a valid `DialFileAcceptType`.
2524
+ *
2525
+ * Aliases are resolved because a file picker matches an `accept` entry against its
2526
+ * own MIME table: a declared `text/json` offers no `.json` file, while the
2527
+ * `application/json` it denotes does.
2528
+ */
2372
2529
  export declare const mimeTypesToDialFileAcceptTypes: (types?: string[]) => DialFileAcceptType[] | undefined;
2373
2530
 
2374
2531
  /**
@@ -2544,7 +2701,17 @@ declare interface OoxmlDocxHighlightLocation {
2544
2701
  text: string;
2545
2702
  }
2546
2703
 
2547
- /** Supported document formats rendered by the bundled `@silurus/ooxml` runtime. */
2704
+ /** A complete table row in the DOCX body, matched by cell text. */
2705
+ declare interface OoxmlDocxTableRowLocation {
2706
+ /** Location kind. */
2707
+ kind: OoxmlHighlightKind.DocxTableRow;
2708
+ /** Plain text of each cell, in column order. */
2709
+ cells: string[];
2710
+ /** 1-based matching row in document order. */
2711
+ occurrence: number;
2712
+ }
2713
+
2714
+ /** Supported document formats rendered by the installed `@silurus/ooxml` runtime. */
2548
2715
  declare enum OoxmlFileType {
2549
2716
  Docx = 'docx',
2550
2717
  Xlsx = 'xlsx',
@@ -2566,6 +2733,10 @@ declare enum OoxmlHighlightKind {
2566
2733
  DocxTextRange = 'docxTextRange',
2567
2734
  /** A character range inside a single PPTX shape on one slide. */
2568
2735
  PptxTextRange = 'pptxTextRange',
2736
+ /** A complete DOCX table row identified by its cell text. */
2737
+ DocxTableRow = 'docxTableRow',
2738
+ /** A complete PPTX table row identified by its cell text on one slide. */
2739
+ PptxTableRow = 'pptxTableRow',
2569
2740
  /** One cell, or a contiguous same-row cell range, on a named XLSX sheet. */
2570
2741
  XlsxCellRange = 'xlsxCellRange',
2571
2742
  }
@@ -2574,6 +2745,8 @@ declare enum OoxmlHighlightKind {
2574
2745
  declare type OoxmlHighlightLocation =
2575
2746
  | OoxmlDocxHighlightLocation
2576
2747
  | OoxmlPptxHighlightLocation
2748
+ | OoxmlDocxTableRowLocation
2749
+ | OoxmlPptxTableRowLocation
2577
2750
  | OoxmlXlsxHighlightLocation;
2578
2751
 
2579
2752
  /** A cited character range inside a single shape on one PPTX slide. */
@@ -2592,6 +2765,18 @@ declare interface OoxmlPptxHighlightLocation {
2592
2765
  text: string;
2593
2766
  }
2594
2767
 
2768
+ /** A complete table row on one PPTX slide, matched by cell text. */
2769
+ declare interface OoxmlPptxTableRowLocation {
2770
+ /** Location kind. */
2771
+ kind: OoxmlHighlightKind.PptxTableRow;
2772
+ /** Plain text of each cell, in column order. */
2773
+ cells: string[];
2774
+ /** 1-based matching row on the specified slide. */
2775
+ occurrence: number;
2776
+ /** 1-based slide number. */
2777
+ slide: number;
2778
+ }
2779
+
2595
2780
  /** A cited cell, or contiguous same-row cell range, on a named XLSX sheet. */
2596
2781
  declare interface OoxmlXlsxHighlightLocation {
2597
2782
  /** Discriminates this location within `OoxmlHighlightLocation`. */
@@ -2763,6 +2948,15 @@ export declare const prepareMoveRenameItems: (copiedItems: DialCopiedItem[], buc
2763
2948
  preparedMoveItems: PreparedCopyMoveItem<MoveItemDto>[];
2764
2949
  };
2765
2950
 
2951
+ /**
2952
+ * Validates form values before creating a request body. Hosts translate the
2953
+ * returned field codes and must not issue a write when `ok` is false.
2954
+ */
2955
+ export declare const prepareScheduledTaskCreateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<CreateScheduledTaskBodyDto>;
2956
+
2957
+ /** Validates form values before preparing an update request body. */
2958
+ export declare const prepareScheduledTaskUpdateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<UpdateScheduledTaskBodyDto>;
2959
+
2766
2960
  /** Maximum body length accepted by `CreatePromptDto.content`. */
2767
2961
  export declare const PROMPT_CONTENT_MAX_LENGTH = 50000;
2768
2962
 
@@ -2846,6 +3040,63 @@ export declare interface QuickAppSchemaLike {
2846
3040
  displayName?: string;
2847
3041
  }
2848
3042
 
3043
+ /**
3044
+ * One stage as it arrives from the REST API or the SSE stream, before
3045
+ * normalization. Structurally satisfied by the generated `StageDto` and by a
3046
+ * raw stream delta, both of which omit `index`/`name`/`status` on the chunk
3047
+ * that opens a stage.
3048
+ */
3049
+ export declare interface RawStage {
3050
+ /** Ordering key. Defaults to `0` when absent. */
3051
+ index?: number | null;
3052
+ /** Stage title. `null` on the chunk that opens the stage. */
3053
+ name?: string | null;
3054
+ /** Terminal state as a raw wire string; anything other than `'completed'`/`'failed'` means still running. */
3055
+ status?: string | null;
3056
+ /** Additional stage text. */
3057
+ content?: string | null;
3058
+ /** Short source/category label shown beside the stage name. */
3059
+ tag?: string | null;
3060
+ /** Files produced or referenced by this stage. */
3061
+ attachments?: RawStageAttachment[] | null;
3062
+ }
3063
+
3064
+ /**
3065
+ * One stage attachment as it arrives from the REST API or the SSE stream,
3066
+ * before normalization: every field is optional and may be `null`.
3067
+ */
3068
+ export declare interface RawStageAttachment {
3069
+ /** Zero-based position in the attachment list. */
3070
+ index?: number | null;
3071
+ /** MIME type of the attachment content. */
3072
+ type?: string | null;
3073
+ /** Display name shown in the UI. */
3074
+ title?: string | null;
3075
+ /** Inline base-64 encoded content. */
3076
+ data?: string | null;
3077
+ /** Remote URL pointing to the attachment content. */
3078
+ url?: string | null;
3079
+ /** MIME type of the referenced resource. */
3080
+ reference_type?: string | null;
3081
+ /** URL of an alternate reference resource. */
3082
+ reference_url?: string | null;
3083
+ }
3084
+
3085
+ /**
3086
+ * Message-like payload carrying stages under either the wire's snake_case
3087
+ * `custom_content` or a host's camelCased `customContent`.
3088
+ */
3089
+ export declare interface RawStageSource {
3090
+ /** Custom content as the DIAL wire format spells it. */
3091
+ custom_content?: {
3092
+ stages?: RawStage[] | null;
3093
+ } | null;
3094
+ /** Custom content as a camelCasing host spells it. */
3095
+ customContent?: {
3096
+ stages?: RawStage[] | null;
3097
+ } | null;
3098
+ }
3099
+
2849
3100
  /**
2850
3101
  * Reads a skill file response as raw bytes, or `null` when the body is
2851
3102
  * larger than `SKILL_MANIFEST_MAX_BYTES`. The declared `content-length` is
@@ -2919,6 +3170,23 @@ export declare const referenceAttachmentToPdfCanvasContent: (attachment: Attachm
2919
3170
  /** Name reserved for the hidden marker file used to create empty folders. */
2920
3171
  export declare const RESERVED_MARKER_NAME = ".dial_folder";
2921
3172
 
3173
+ /**
3174
+ * One reset time, already parsed and formatted by the host. Declared
3175
+ * structurally here so this library never imports an application type; the
3176
+ * host passes a value that satisfies this shape (e.g. `apps/chat`'s own
3177
+ * `ResetTimeDisplay`).
3178
+ */
3179
+ export declare interface ResetTimeDisplay {
3180
+ /** Exclusive end of the period as an epoch ms value, for the host's boundary scheduling. */
3181
+ resetsAtMs: number;
3182
+ /** Machine-readable instant for a `<time dateTime>` attribute. */
3183
+ isoValue: string;
3184
+ /** Visible reset line. */
3185
+ label: string;
3186
+ /** Accessible expansion of the reset line. */
3187
+ ariaLabel: string;
3188
+ }
3189
+
2922
3190
  /**
2923
3191
  * Resolves the primary action for a catalog item.
2924
3192
  *
@@ -2938,7 +3206,8 @@ export declare const resolveCatalogPrimaryAction: (item: CatalogItem, fetchPromp
2938
3206
  /** Resolves a syntax-highlighted code canvas content payload from a DisplayAttachment, or `null` if unavailable. */
2939
3207
  export declare const resolveCodeCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, language?: string) => Promise<CodeCanvasContent | ErrorCanvasContent | null>;
2940
3208
 
2941
- export declare const resolveDeploymentFolder: (deployment: Pick<DeploymentItemDto, "isMy" | "sharedWithMe" | "applicationFolder">, labels: DeploymentFolderLabels) => string[];
3209
+ /** Resolves a deployment's display folder, including organization applications without a folder path. */
3210
+ export declare const resolveDeploymentFolder: (deployment: Pick<DeploymentItemDto, "isMy" | "sharedWithMe" | "applicationFolder"> & Partial<Pick<DeploymentItemDto, "type">>, labels: DeploymentFolderLabels) => string[];
2942
3211
 
2943
3212
  /**
2944
3213
  * Resolves a DialFile to the bucket-relative API path used by files BFF endpoints.
@@ -2956,6 +3225,9 @@ export declare const resolveDialFileBucketAndPath: (fileId: string) => {
2956
3225
  path: string;
2957
3226
  } | undefined;
2958
3227
 
3228
+ /** A callback that resolves a display name from a localized-text value. */
3229
+ declare type ResolveDisplayName = (name: string | Record<string, string> | undefined | null, locale: string) => string;
3230
+
2959
3231
  /** Resolves a DIAL Core file id to a downloadable URL. Host-owned — encodes the app's own file-download endpoint. */
2960
3232
  export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
2961
3233
 
@@ -2974,6 +3246,17 @@ export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
2974
3246
  */
2975
3247
  export declare const resolveExternalSourceContentType: (contentType: string, url: string) => string;
2976
3248
 
3249
+ /**
3250
+ * Builds the grouped payload for an application-scoped visualizer from the
3251
+ * attachments its entry claims, reporting which of them `resolveAbsoluteUrl`
3252
+ * could produce a URL for. Unlike the single-attachment resolver this fetches
3253
+ * nothing: the grouped protocol hands the visualizer URLs and lets it read
3254
+ * them itself, so the URLs must be absolute — a host-relative path would
3255
+ * resolve against the iframe's own origin. Producing one is host knowledge,
3256
+ * which is why it arrives as a callback rather than being built here.
3257
+ */
3258
+ export declare const resolveGroupedVisualizerCanvasContent: (attachments: DisplayAttachment[], resolveAbsoluteUrl: (attachment: DisplayAttachment) => string | undefined, entry: ApplicationVisualizer, themeId: string) => GroupedVisualizerResolution;
3259
+
2977
3260
  /**
2978
3261
  * Resolves an HTML canvas content payload from a DisplayAttachment.
2979
3262
  * Fetches and inlines the HTML as `srcdoc` when the attachment has a download URL or inline data.
@@ -2982,12 +3265,17 @@ export declare const resolveExternalSourceContentType: (contentType: string, url
2982
3265
  */
2983
3266
  export declare const resolveHtmlCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<HtmlCanvasContent | ErrorCanvasContent | null>;
2984
3267
 
3268
+ /** A callback that resolves an icon URL from a deployment's raw `iconUrl` field. */
3269
+ declare type ResolveIconUrl = (iconUrl: string | undefined) => string | undefined;
3270
+
2985
3271
  /**
2986
3272
  * 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.
3273
+ * fetching — returns a local blob URL or the BFF download URL directly so the
3274
+ * browser cache can be shared with the conversation view's `<img>` element.
3275
+ * A local `File` with bytes takes precedence over the DIAL download URL; a
3276
+ * 0-byte `File` (the file-manager placeholder) does not. Error detection is
3277
+ * delegated to `<img onError>` in the canvas renderer. Returns `null` if no
3278
+ * URL source is available.
2991
3279
  */
2992
3280
  export declare const resolveImageCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => ImageCanvasContent | null;
2993
3281
 
@@ -3105,6 +3393,106 @@ export declare type ScheduledTaskDtoMappingResult = {
3105
3393
  reason: UnsupportedTriggerReason;
3106
3394
  };
3107
3395
 
3396
+ /** A checked request preparation result that never serializes invalid values. */
3397
+ export declare type ScheduledTaskPreparationResult<TBody> = {
3398
+ ok: true;
3399
+ body: TBody;
3400
+ } | {
3401
+ ok: false;
3402
+ errors: ScheduledTaskValidationErrors;
3403
+ };
3404
+
3405
+ export declare interface ScheduledTaskRunsListRequest {
3406
+ scheduleId: string;
3407
+ limit?: number;
3408
+ offset?: number;
3409
+ signal?: AbortSignal;
3410
+ }
3411
+
3412
+ export declare interface ScheduledTasksApiClient {
3413
+ listScheduledTasks: (request?: ScheduledTasksListRequest) => Promise<ListScheduledTasksResponseDto>;
3414
+ listScheduledTaskRuns: (request: ScheduledTaskRunsListRequest) => Promise<ListScheduledTaskRunsResponseDto>;
3415
+ createScheduledTask: (body: CreateScheduledTaskBodyDto) => Promise<CreatedScheduledTaskDto>;
3416
+ getScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3417
+ updateScheduledTask: (scheduleId: string, body: UpdateScheduledTaskBodyDto) => Promise<UpdatedScheduledTaskDto>;
3418
+ pauseScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3419
+ resumeScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3420
+ deleteScheduledTask: (scheduleId: string) => Promise<void>;
3421
+ }
3422
+
3423
+ /** Narrow configured generated-client surface required by scheduler hooks. */
3424
+ export declare interface ScheduledTasksConfiguredClient {
3425
+ listScheduledTasks: (request: {
3426
+ limit?: number;
3427
+ offset?: number;
3428
+ search?: string;
3429
+ sort?: ListScheduledTasksSortEnum;
3430
+ }, options?: RequestInit) => Promise<ListScheduledTasksResponseDto>;
3431
+ listScheduledTaskRuns: (request: {
3432
+ scheduleId: string;
3433
+ limit?: number;
3434
+ offset?: number;
3435
+ }, options?: RequestInit) => Promise<ListScheduledTaskRunsResponseDto>;
3436
+ createScheduledTask: (request: {
3437
+ createScheduledTaskBodyDto: CreateScheduledTaskBodyDto;
3438
+ }) => Promise<CreatedScheduledTaskDto>;
3439
+ getScheduledTask: (request: {
3440
+ scheduleId: string;
3441
+ }) => Promise<ScheduledTaskDto>;
3442
+ updateScheduledTask: (request: {
3443
+ scheduleId: string;
3444
+ updateScheduledTaskBodyDto: UpdateScheduledTaskBodyDto;
3445
+ }) => Promise<UpdatedScheduledTaskDto>;
3446
+ pauseScheduledTask: (request: {
3447
+ scheduleId: string;
3448
+ }) => Promise<ScheduledTaskDto>;
3449
+ resumeScheduledTask: (request: {
3450
+ scheduleId: string;
3451
+ }) => Promise<ScheduledTaskDto>;
3452
+ deleteScheduledTask: (request: {
3453
+ scheduleId: string;
3454
+ }) => Promise<void>;
3455
+ }
3456
+
3457
+ /** App-agnostic request options accepted by the scheduler facade. */
3458
+ export declare interface ScheduledTasksListRequest {
3459
+ limit?: number;
3460
+ offset?: number;
3461
+ search?: string;
3462
+ sort?: ListScheduledTasksSortEnum;
3463
+ signal?: AbortSignal;
3464
+ }
3465
+
3466
+ export declare interface ScheduledTaskTriggerDescription {
3467
+ kind: ScheduledTaskTriggerDescriptionKind;
3468
+ time?: string;
3469
+ dayOfWeek?: string;
3470
+ dayOfMonth?: string;
3471
+ intervalMinutes?: number;
3472
+ date?: Date;
3473
+ expression?: string;
3474
+ sourceTimezone: 'utc';
3475
+ }
3476
+
3477
+ /** Display categories are independent of task editability. */
3478
+ export declare enum ScheduledTaskTriggerDescriptionKind {
3479
+ OneTime = "oneTime",
3480
+ Hourly = "hourly",
3481
+ EveryNMinutes = "everyNMinutes",
3482
+ Daily = "daily",
3483
+ Weekly = "weekly",
3484
+ Monthly = "monthly",
3485
+ Custom = "custom",
3486
+ Invalid = "invalid"
3487
+ }
3488
+
3489
+ export declare interface ScheduledTaskTriggerDescriptionOptions {
3490
+ /** Display timezone; defaults to UTC for backwards compatibility. */
3491
+ timeZone?: string;
3492
+ /** Date whose timezone offset is used. Defaults to now (the existing UTC-storage policy). */
3493
+ referenceDate?: Date;
3494
+ }
3495
+
3108
3496
  /** Serializes a prompt export envelope into a pretty-printed JSON blob. */
3109
3497
  export declare const serializePromptExport: (envelope: PromptExportFormat) => Blob;
3110
3498
 
@@ -3180,6 +3568,28 @@ export declare interface SkillAboutDetails {
3180
3568
  skillPrompt?: string;
3181
3569
  }
3182
3570
 
3571
+ /** Semantic classification of an import request failure. */
3572
+ export declare enum SkillArchiveImportErrorKind {
3573
+ Validation = "validation",
3574
+ Collision = "collision",
3575
+ RateLimited = "rateLimited",
3576
+ ServiceUnavailable = "serviceUnavailable",
3577
+ Generic = "generic"
3578
+ }
3579
+
3580
+ /** Phase of a skill-archive import, driving the host's loading/success/error presentation. */
3581
+ export declare enum SkillArchiveImportStatus {
3582
+ Idle = "idle",
3583
+ Uploading = "uploading",
3584
+ Success = "success",
3585
+ Error = "error"
3586
+ }
3587
+
3588
+ /** Reason a selected/dropped file was rejected before any request was made. */
3589
+ export declare enum SkillArchiveSelectionRejectionReason {
3590
+ UnsupportedFilename = "unsupportedFilename"
3591
+ }
3592
+
3183
3593
  /** Injected API port for skill detail fetching. Mirrors exact server-api wrapper signatures. */
3184
3594
  export declare interface SkillDetailsApi {
3185
3595
  /** Downloads a raw skill file, returning the raw fetch `Response`. */
@@ -3193,6 +3603,12 @@ export declare interface SkillDetailsApi {
3193
3603
  limit?: number;
3194
3604
  recursive?: boolean;
3195
3605
  }, signal?: AbortSignal): Promise<SkillFileListResponseDto>;
3606
+ /**
3607
+ * Fetches a single skill's own authoritative metadata (`author`,
3608
+ * `updatedAt`, and the rest of `SkillMetadataItemDto`) — not the catalog
3609
+ * listing entry, which may be sparse for a shared skill.
3610
+ */
3611
+ getSkillMetadata(bucket: string, path: string, signal?: AbortSignal): Promise<SkillMetadataItemDto>;
3196
3612
  }
3197
3613
 
3198
3614
  /** Already-configured DIAL Core download operations `useSkillEditorLoad` needs. */
@@ -3236,6 +3652,12 @@ export declare interface SkillEditorSubmitClient {
3236
3652
  export declare interface SkillEditorSubmitMessages {
3237
3653
  /** Shown when a required field is empty. */
3238
3654
  required: string;
3655
+ /**
3656
+ * Shown when the Instructions value opens with its own YAML frontmatter
3657
+ * block — pasting a whole `SKILL.md` in there would otherwise produce a
3658
+ * manifest with two frontmatter blocks.
3659
+ */
3660
+ instructionsFrontmatter: string;
3239
3661
  /** Shown when the normalized skill name fails DIAL's naming rules. */
3240
3662
  nameInvalid: string;
3241
3663
  /** Shown when the skill name already exists (409), or defensively on an unreachable create-mode 412. */
@@ -3442,6 +3864,28 @@ export declare const splitFileNameExtension: (fileName: string) => {
3442
3864
  extension: string;
3443
3865
  };
3444
3866
 
3867
+ /**
3868
+ * Answers one question: would appending this text after the fence that
3869
+ * `buildSkillManifest` writes produce a *second* frontmatter block?
3870
+ *
3871
+ * That happens when the text's first non-blank line is a bare `---` and some
3872
+ * later line is a bare `---` too — the exact shape of a `SKILL.md` pasted
3873
+ * wholesale into the editor's Instructions field.
3874
+ *
3875
+ * Detection is deliberately structural rather than YAML-based: a pasted block
3876
+ * whose fenced content fails to parse corrupts the stored manifest
3877
+ * identically (and renders as a setext `h2` in the Catalog's Details tab just
3878
+ * the same), so requiring parseable YAML here would let the worst cases
3879
+ * through. Keeping `parseYaml` out also makes this cheap enough to run on
3880
+ * every keystroke.
3881
+ *
3882
+ * A single unclosed fence returns `false`: with no closing fence there is no
3883
+ * second block, matching `FRONTMATTER_PATTERN`'s own requirement. A `---`
3884
+ * appearing later in the body (a horizontal rule, a setext underline) is
3885
+ * likewise not a frontmatter block.
3886
+ */
3887
+ export declare const startsWithFrontmatterBlock: (text: string) => boolean;
3888
+
3445
3889
  /** Options accepted by {@link ConversationStreamTransport.streamCompletion}. */
3446
3890
  export declare interface StreamCompletionOptions {
3447
3891
  onChunk: (chunk: StreamChunk) => void;
@@ -3767,6 +4211,13 @@ export declare const toPublishEntityType: (type: CatalogEntityType) => CatalogPu
3767
4211
  */
3768
4212
  export declare const toPublishRuleDto: (rule: PublicationRule) => PublishRuleDto;
3769
4213
 
4214
+ /**
4215
+ * Returns a renderable `Stage` for one raw payload: `index` defaults to `0`,
4216
+ * `name` to `''`, an unrecognized `status` to `null` (still running), and
4217
+ * `content`/`tag`/`attachments` are passed through when present.
4218
+ */
4219
+ export declare const toStage: (stage: RawStage) => Stage;
4220
+
3770
4221
  /** Request shape the host's selected-deployment recognition call accepts. */
3771
4222
  export declare interface TranscribeWithDeploymentParams {
3772
4223
  audioUrl: string;
@@ -3775,6 +4226,12 @@ export declare interface TranscribeWithDeploymentParams {
3775
4226
  signal: AbortSignal;
3776
4227
  }
3777
4228
 
4229
+ /** A translate function compatible with i18next's `TFunction`. */
4230
+ declare type Translate = (key: string, options?: Record<string, unknown>) => string;
4231
+
4232
+ /** A translate function compatible with i18next's `TFunction`. */
4233
+ declare type Translate_2 = (key: string, options?: Record<string, unknown>) => string;
4234
+
3778
4235
  export declare const trimFileNameToByteLimit: (name: string, limit?: number) => string;
3779
4236
 
3780
4237
  /** An error thrown to indicate the caller is unauthenticated. */
@@ -3833,6 +4290,62 @@ export declare interface UploadFileWithProgressOptions {
3833
4290
  /** Upload mode passed to `FilesApi.uploadFile`: overwrite an existing file or fail if it already exists. */
3834
4291
  export declare type UploadMode = 'overwrite' | 'create-only';
3835
4292
 
4293
+ /**
4294
+ * i18n key strings that the consuming app's translation bundle must define for
4295
+ * `mapUsageDataToDashboard` to produce correctly translated strings. The
4296
+ * values are the default key paths used by AI DIAL Chat.
4297
+ */
4298
+ export declare const USAGE_DATA_I18N_KEYS: {
4299
+ /** Title for the current-UTC-day card (e.g. `'Today'`). */
4300
+ readonly todayTitle: "usage.todayTitle";
4301
+ /** Accessible period description for the current-UTC-day card. */
4302
+ readonly todayPeriodDescription: "usage.todayPeriodDescription";
4303
+ /** Title for the current-UTC-week card (e.g. `'This week'`). */
4304
+ readonly thisWeekTitle: "usage.thisWeekTitle";
4305
+ /** Accessible period description for the current-UTC-week card. */
4306
+ readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
4307
+ /** Title for the current-UTC-month card (e.g. `'This month'`). */
4308
+ readonly thisMonthTitle: "usage.thisMonthTitle";
4309
+ /** Accessible period description for the current-UTC-month card. */
4310
+ readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
4311
+ /** Aria label when there is no limit. Receives `{ used: string }`. */
4312
+ readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
4313
+ /** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
4314
+ readonly progressAriaLabel: "usage.progressAriaLabel";
4315
+ };
4316
+
4317
+ /**
4318
+ * i18n key strings that the consuming app's translation bundle must define for
4319
+ * `mapUserUsageToModelLimits` and `mapOverallCostLimitsToPeriodStatuses` to produce
4320
+ * correctly translated strings. The values are the default key paths used by AI DIAL Chat.
4321
+ */
4322
+ export declare const USAGE_MODEL_LIMITS_I18N_KEYS: {
4323
+ /** Period label used in tooltip text. Receives no interpolation. */
4324
+ readonly todayPeriodDescription: "usage.todayPeriodDescription";
4325
+ /** Period label used in tooltip text. Receives no interpolation. */
4326
+ readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
4327
+ /** Period label used in tooltip text. Receives no interpolation. */
4328
+ readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
4329
+ /** Tooltip when the overall cost limit is running low. Receives `{ period: string }`. */
4330
+ readonly overallCostLimitRunningLowTooltip: "usage.overallCostLimitRunningLowTooltip";
4331
+ /** Tooltip when the overall cost limit is reached. Receives `{ period: string }`. */
4332
+ readonly overallCostLimitReachedTooltip: "usage.overallCostLimitReachedTooltip";
4333
+ /** Aria label for a metric cell with no data. */
4334
+ readonly unavailableLabel: "usage.unavailableLabel";
4335
+ /** Supporting label when a token limit follows the cost limit. */
4336
+ readonly followsCostLimitLabel: "usage.followsCostLimitLabel";
4337
+ /** Supporting label when there is no per-deployment token limit. */
4338
+ readonly noLimitLabel: "usage.noLimitLabel";
4339
+ /** Aria label when token usage has no limit but follows the cost limit. Receives `{ used: string }`. */
4340
+ readonly followsCostLimitAriaLabel: "usage.followsCostLimitAriaLabel";
4341
+ /** Aria label when there is no limit. Receives `{ used: string }`. */
4342
+ readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
4343
+ /** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
4344
+ readonly progressAriaLabel: "usage.progressAriaLabel";
4345
+ /** Label for the spent-cost cell. Receives `{ amount: string }`. */
4346
+ readonly spentLabel: "usage.spentLabel";
4347
+ };
4348
+
3836
4349
  /**
3837
4350
  * Synchronises the active conversation with the conversation list and returns
3838
4351
  * the panel-space id of the active conversation, or `undefined` when none is active.
@@ -3867,6 +4380,25 @@ export declare interface UseActiveConversationSyncParams {
3867
4380
  toPanelConversationId: (id: string) => string;
3868
4381
  }
3869
4382
 
4383
+ /** Loads fresh service statuses without coupling proactive credentials to a live completion. */
4384
+ export declare const useApplicationCredentials: ({ appId, externalServicesClient, offlineCredentialsClient, }: UseApplicationCredentialsParams) => {
4385
+ services: ApplicationExternalServiceDto[];
4386
+ isOfflineConnected: boolean;
4387
+ isLoading: boolean;
4388
+ hasError: boolean;
4389
+ refresh: () => Promise<void>;
4390
+ };
4391
+
4392
+ /** Configured operations for loading application credential metadata. */
4393
+ export declare interface UseApplicationCredentialsParams {
4394
+ /** Application identifier passed through to the configured client. */
4395
+ appId: string;
4396
+ /** Host-configured external-services API. */
4397
+ externalServicesClient: Pick<ExternalServicesApi, 'listExternalServices'>;
4398
+ /** Host-configured offline-credentials API. */
4399
+ offlineCredentialsClient: Pick<OfflineCredentialsApi, 'getOfflineCredentials'>;
4400
+ }
4401
+
3870
4402
  /**
3871
4403
  * Generic single-slot pending / loading / error state machine for
3872
4404
  * confirmation dialogs that trigger an async operation.
@@ -3909,8 +4441,8 @@ export declare const useAttachmentUpload: ({ filesApi, bucket, onNetworkError, d
3909
4441
 
3910
4442
  /** Parameters for {@link useAttachmentUpload}. */
3911
4443
  export declare interface UseAttachmentUploadParams {
3912
- /** Already-configured generated-client instance used to upload the file. */
3913
- filesApi: Pick<FilesApi, 'uploadFile'>;
4444
+ /** Already-configured client; optional listing skips stored names after a conflict. */
4445
+ filesApi: Pick<FilesApi, 'uploadFile'> & Partial<Pick<FilesApi, 'listFiles'>>;
3914
4446
  /** DIAL Core bucket the file is uploaded into. */
3915
4447
  bucket: string | undefined;
3916
4448
  /** Called with batched filenames after a burst of network-error upload failures. */
@@ -3930,12 +4462,14 @@ export declare interface UseAttachmentUploadResult {
3930
4462
  * MIME types, debouncing a burst of rejected files into a single
3931
4463
  * `onValidationError` call rather than firing one per file.
3932
4464
  */
3933
- export declare const useAttachmentValidation: ({ allowedMimeTypes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
4465
+ export declare const useAttachmentValidation: ({ allowedMimeTypes, maxFileSizeBytes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
3934
4466
 
3935
4467
  /** Parameters for {@link useAttachmentValidation}. */
3936
4468
  export declare interface UseAttachmentValidationParams {
3937
4469
  /** Resolved MIME types currently allowed for attachments. */
3938
4470
  allowedMimeTypes: string[];
4471
+ /** Maximum attachment file size, in bytes. When omitted, no file is rejected for size. */
4472
+ maxFileSizeBytes?: number;
3939
4473
  /** Called with a structured event when a rejected attachment is reported, at most once per debounce window. */
3940
4474
  onValidationError?: (event: AttachmentValidationErrorEvent) => void;
3941
4475
  /** Debounce window, in ms, before firing `onValidationError` for a rejected file. Defaults to `100`. */
@@ -4743,11 +5277,11 @@ export declare interface UseDialFileManagerResult {
4743
5277
  * current one becomes excluded. A `fileManagerTabs` of `undefined` means no
4744
5278
  * restriction — every tab in `allTabs` stays enabled and no reset ever fires.
4745
5279
  */
4746
- export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: TabModel[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
5280
+ export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: FilterChipItem<DialFileManagerTabs>[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
4747
5281
 
4748
5282
  /** Values returned by `useDialFileManagerTabConfig`. */
4749
5283
  export declare interface UseDialFileManagerTabConfigResult {
4750
- tabs: ToolbarOptions['tabs'];
5284
+ tabs: FileTreeOptions['tabs'];
4751
5285
  }
4752
5286
 
4753
5287
  /**
@@ -4936,6 +5470,64 @@ export declare interface UseFavoriteEntitiesStateResult {
4936
5470
  toggleFavorite: (id: string, isFavorite: boolean, entityType?: FavoriteEntityType) => Promise<void>;
4937
5471
  }
4938
5472
 
5473
+ /**
5474
+ * Composes the file-manager tab/listing hooks into the stateful part of an attachment picker:
5475
+ * active tab, selected paths, and hidden-path/MIME/size/folder row eligibility. Returns the
5476
+ * existing `useDialFileManager` controller unchanged and the selection/tab/eligibility fields
5477
+ * `FileManagerAttachModal` already consumes — it composes that modal, it does not replace it.
5478
+ * Final attachment filtering, deduplication, and count enforcement stay owned by the modal.
5479
+ */
5480
+ export declare const useFileAttachmentPicker: ({ fileManagerOptions, bucket, forbiddenSymbolsRegExp, tabLabels, allowedTabs, initialTab, allowedTypes, maxSelectableFileSize, canAttachFolders, }: UseFileAttachmentPickerOptions) => UseFileAttachmentPickerResult;
5481
+
5482
+ /** Options accepted by {@link useFileAttachmentPicker}. */
5483
+ export declare interface UseFileAttachmentPickerOptions {
5484
+ /**
5485
+ * Configured `useDialFileManager` options besides the values this hook derives:
5486
+ * `bucket`, `activeTab`, `rootLabel`, `variant`, and `forbiddenSymbolsRegExp`.
5487
+ */
5488
+ fileManagerOptions: Omit<UseDialFileManagerOptions, 'bucket' | 'activeTab' | 'rootLabel' | 'variant' | 'forbiddenSymbolsRegExp'>;
5489
+ /** DIAL Core bucket to browse. */
5490
+ bucket: string;
5491
+ /** Regexp of characters forbidden in file/folder names, forwarded to `useDialFileManager`. */
5492
+ forbiddenSymbolsRegExp?: RegExp;
5493
+ /** Host-translated label per tab; also supplies the active tab's root-folder label. */
5494
+ tabLabels: Record<DialFileManagerTabs, string>;
5495
+ /** Tab ids the host's configuration allows. `undefined` allows every tab. */
5496
+ allowedTabs?: string[];
5497
+ /** Initial active tab. Defaults to `DialFileManagerTabs.MyFiles`. */
5498
+ initialTab?: DialFileManagerTabs;
5499
+ /** MIME types eligible for selection/upload. Empty or absent allows every type. */
5500
+ allowedTypes?: string[];
5501
+ /** Files at or below this size (bytes) remain eligible; absent allows any size. */
5502
+ maxSelectableFileSize?: number;
5503
+ /** Whether folder rows are eligible for selection. Defaults to `false`. */
5504
+ canAttachFolders?: boolean;
5505
+ }
5506
+
5507
+ /** Result returned by {@link useFileAttachmentPicker}. */
5508
+ export declare interface UseFileAttachmentPickerResult {
5509
+ /** The composed file-manager controller; forward to `FileManagerAttachModal`'s `controller` prop. */
5510
+ controller: UseDialFileManagerResult;
5511
+ /** Active tab. */
5512
+ activeTab: DialFileManagerTabs;
5513
+ /** Tab list filtered to `allowedTabs`; forward to `FileManagerAttachModal`'s `tabs` prop. */
5514
+ tabs: FileTreeOptions['tabs'];
5515
+ /** Switches the active tab and clears the current selection. */
5516
+ onTabChange: (tab: DialFileManagerTabs) => void;
5517
+ /** Currently selected paths. */
5518
+ selectedPaths: Set<string>;
5519
+ /** Replaces the selection with a defensive copy of the given set. */
5520
+ onSelectedPathsChange: (paths: Set<string>) => void;
5521
+ /** Row eligibility predicate; forward to `FileManagerAttachModal`'s `isRowSelectable` prop. */
5522
+ isRowSelectable: (node: {
5523
+ data?: FileManagerSelectableNode | null;
5524
+ }) => boolean;
5525
+ /** MIME eligibility predicate; forward to `FileManagerAttachModal`'s `isFileTypeAllowed` prop. */
5526
+ isFileTypeAllowed: (contentType: string) => boolean;
5527
+ /** Accepted upload MIME types; forward to `FileManagerAttachModal`'s `allowedFileTypes` prop. */
5528
+ allowedFileTypes: DialFileAcceptType[] | undefined;
5529
+ }
5530
+
4939
5531
  export { useGridEditingScroll }
4940
5532
 
4941
5533
  export { UseGridEditingScrollOptions }
@@ -4979,10 +5571,11 @@ export declare interface UseImportFilePickerResult {
4979
5571
  * Builds the `McpAppHostAdapter` a host injects into `@epam/ai-dial-mcp-apps`'s
4980
5572
  * hooks/components, wiring the library's host-context/tool-call/resource-fetch
4981
5573
  * 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.
5574
+ * values (`hostContextParams`, `sandboxUrl`), plus the host's own identity
5575
+ * (`hostInfo`) — this hook itself never reads app context, so a host builds
5576
+ * those values wherever it already has them.
4984
5577
  */
4985
- export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams) => McpAppHostAdapter;
5578
+ export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams, hostInfo: Implementation) => McpAppHostAdapter;
4986
5579
 
4987
5580
  /**
4988
5581
  * Builds the `McpUiHostContext` delivered to a mounted MCP App during its
@@ -5085,8 +5678,6 @@ export declare const useOpenMcpAppCanvas: (cache: McpAppResponseCache, hostAdapt
5085
5678
 
5086
5679
  /** User-facing text `useOpenMcpAppCanvas` needs but cannot resolve itself — a lib must not call `t()`. */
5087
5680
  export declare interface UseOpenMcpAppCanvasLabels {
5088
- /** Canvas panel title while an MCP App is loading or open. */
5089
- title: string;
5090
5681
  /** Error label shown when the resource fetch is forbidden (HTTP 403). */
5091
5682
  forbiddenErrorLabel: string;
5092
5683
  /** Error label shown for any other resource-load/tool-call failure. */
@@ -5224,6 +5815,50 @@ export declare interface UsePublishFoldersResult {
5224
5815
  hasPublishWriteAccess: (folderPath: string[]) => boolean;
5225
5816
  }
5226
5817
 
5818
+ /** Shared, cancellation-safe pagination for one schedule's run history. */
5819
+ export declare const useScheduledTaskRuns: (client: ScheduledTasksApiClient, { scheduleId, enabled, pageSize }: UseScheduledTaskRunsOptions) => {
5820
+ items: ScheduledTaskRunDto[];
5821
+ isLoading: boolean;
5822
+ isLoadingMore: boolean;
5823
+ initialError: Error | null;
5824
+ loadMoreError: Error | null;
5825
+ hasMore: boolean;
5826
+ loadMore: () => void;
5827
+ retryLoadMore: () => void;
5828
+ refetch: () => void;
5829
+ };
5830
+
5831
+ export declare interface UseScheduledTaskRunsOptions {
5832
+ scheduleId: string;
5833
+ enabled?: boolean;
5834
+ pageSize?: number;
5835
+ }
5836
+
5837
+ /** Shared scheduler-list lifecycle with generation-scoped stale-response guards. */
5838
+ export declare const useScheduledTasks: (client: ScheduledTasksApiClient, { enabled, pageSize, debounceMs, initialSearch, initialSort, }?: UseScheduledTasksOptions) => {
5839
+ items: ScheduledTaskDto[];
5840
+ searchQuery: string;
5841
+ setSearchQuery: Dispatch<SetStateAction<string>>;
5842
+ sortKey: "firstToRun" | "lastToRun" | "newest" | "nameAZ";
5843
+ setSortKey: Dispatch<SetStateAction<"firstToRun" | "lastToRun" | "newest" | "nameAZ">>;
5844
+ isLoading: boolean;
5845
+ isLoadingMore: boolean;
5846
+ initialError: Error | null;
5847
+ loadMoreError: Error | null;
5848
+ hasMore: boolean;
5849
+ loadMore: () => void;
5850
+ retryLoadMore: () => void;
5851
+ refetch: () => void;
5852
+ };
5853
+
5854
+ export declare interface UseScheduledTasksOptions {
5855
+ enabled?: boolean;
5856
+ pageSize?: number;
5857
+ debounceMs?: number;
5858
+ initialSearch?: string;
5859
+ initialSort?: ListScheduledTasksSortEnum;
5860
+ }
5861
+
5227
5862
  /**
5228
5863
  * Resolves and manages share-link data for a DIAL Core resource.
5229
5864
  *
@@ -5264,6 +5899,46 @@ export declare interface UseShareRecipientsCountResult {
5264
5899
  invalidateRecipientsCount: (itemId: string) => void;
5265
5900
  }
5266
5901
 
5902
+ /**
5903
+ * Headless controller for the skill-archive upload flow: dialog visibility, the exact-filename
5904
+ * precheck, in-flight exclusion, and import completion. The host supplies the configured request
5905
+ * and observes completion/failure through the injected callbacks; the hook never imports app
5906
+ * contexts, i18n, or a configured API client.
5907
+ */
5908
+ export declare const useSkillArchiveImport: <TResult>({ importArchive, onImported, onError, manifestFileName, }: UseSkillArchiveImportOptions<TResult>) => UseSkillArchiveImportResult;
5909
+
5910
+ /** Options accepted by {@link useSkillArchiveImport}. */
5911
+ export declare interface UseSkillArchiveImportOptions<TResult> {
5912
+ /** Submits the selected archive; the host owns request configuration and the client. */
5913
+ importArchive: (file: File) => Promise<TResult>;
5914
+ /** Called once after a successful import (and any awaited host follow-up) settles. */
5915
+ onImported: (result: TResult) => void | Promise<void>;
5916
+ /** Called once when the import request, or the host's follow-up in {@link onImported}, fails. */
5917
+ onError: (error: unknown, kind: SkillArchiveImportErrorKind) => void;
5918
+ /** Exact filename treated as the skill manifest. Defaults to `'SKILL.md'`. */
5919
+ manifestFileName?: string;
5920
+ }
5921
+
5922
+ /** Result returned by {@link useSkillArchiveImport}. */
5923
+ export declare interface UseSkillArchiveImportResult {
5924
+ /** Whether the upload dialog is open. */
5925
+ isDialogOpen: boolean;
5926
+ /** Current phase of the import. */
5927
+ status: SkillArchiveImportStatus;
5928
+ /** Reason the current/last selection was rejected locally; `undefined` once cleared. */
5929
+ selectionRejectionReason: SkillArchiveSelectionRejectionReason | undefined;
5930
+ /** Classified failure of the last import request; `undefined` outside a request failure. */
5931
+ errorKind: SkillArchiveImportErrorKind | undefined;
5932
+ /** Opens the dialog, unless an import is already in flight. */
5933
+ openDialog: () => void;
5934
+ /** Closes the dialog and clears any rejection reason. */
5935
+ closeDialog: () => void;
5936
+ /** Wire to the dialog drop zone's `onChange`. */
5937
+ handleFilesSelected: (files: File[]) => void;
5938
+ /** Wire to the dialog drop zone's `onReject`. */
5939
+ handleFilesRejected: () => void;
5940
+ }
5941
+
5267
5942
  /**
5268
5943
  * Headless data pipeline behind a skill details side panel: resolves the
5269
5944
  * selected skill from the listings, maps it to a catalog item with its
@@ -5405,6 +6080,10 @@ export declare interface UseSkillEditorSubmitResult {
5405
6080
  errors: SkillEditorErrors;
5406
6081
  /** General submit-time error, distinct from a stale-edit `conflict`. */
5407
6082
  submitError: string | undefined;
6083
+ /** Whether `submitError` was caused by something a plain re-send can clear, rather than by the submission itself. */
6084
+ isSubmitErrorRetryable: boolean;
6085
+ /** Re-submits the values of the attempt that produced `submitError`. No-op before the first submit. */
6086
+ retrySubmit: () => void;
5408
6087
  /** Present when the last save hit a stale-ETag conflict. */
5409
6088
  conflict: {
5410
6089
  message: string;
@@ -5413,6 +6092,12 @@ export declare interface UseSkillEditorSubmitResult {
5413
6092
  clearConflict: () => void;
5414
6093
  /** Validates and submits the given form values. */
5415
6094
  handleSubmit: (values: SkillEditorValues) => Promise<void>;
6095
+ /**
6096
+ * Re-runs the Instructions frontmatter check against the editor's current
6097
+ * values, so a pasted `SKILL.md` is flagged as the text lands rather than
6098
+ * only on submit. Pass as the editor's `onValuesChange`.
6099
+ */
6100
+ handleValuesChange: (values: SkillEditorValues) => void;
5416
6101
  }
5417
6102
 
5418
6103
  /**
@@ -5491,10 +6176,11 @@ export declare interface UseSkillFilePreviewResult {
5491
6176
 
5492
6177
  /**
5493
6178
  * 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.
6179
+ * parse, package file listing, authoritative metadata fetching, overview
6180
+ * construction, and in-package file loads. `useCatalogItemDetails` delegates
6181
+ * its skill branch here; hosts that only surface skill details consume this
6182
+ * hook directly, without the deployment and prompt ports the full catalog
6183
+ * pipeline requires.
5498
6184
  */
5499
6185
  export declare const useSkillItemDetails: ({ api, skills, skillOverviewLabels, }: UseSkillItemDetailsOptions) => UseSkillItemDetailsResult;
5500
6186