@epam/ai-dial-chat-hooks 1.1.2 → 1.2.0-dev.101

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 (44) hide show
  1. package/attachment/useAttachmentValidation/useAttachmentValidation.js +26 -19
  2. package/attachments.d.ts +10 -4
  3. package/catalog/map-skill-to-catalog-item.js +48 -48
  4. package/catalog/publish.js +2 -1
  5. package/catalog/useApplicationCredentials/useApplicationCredentials.js +39 -0
  6. package/catalog.d.ts +22 -0
  7. package/catalog.js +6 -5
  8. package/conversation/conversation-transfer/queue.js +8 -5
  9. package/conversation/stage.js +23 -0
  10. package/conversation/useConversationImport/useConversationImport.js +1 -1
  11. package/conversation/useConversationScroll/useConversationScroll.js +68 -64
  12. package/conversation/useConversationStream/apply-chunk.js +1 -1
  13. package/conversation-sources/useConversationSources/useConversationSources.js +24 -31
  14. package/conversation-sources.d.ts +1 -1
  15. package/conversation.d.ts +107 -0
  16. package/conversation.js +23 -21
  17. package/file-manager.d.ts +71 -5
  18. package/file-manager.js +3 -2
  19. package/files/attachment-types.js +14 -13
  20. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +1 -5
  21. package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +43 -0
  22. package/index.d.ts +614 -16
  23. package/index.js +123 -111
  24. package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.js +7 -5
  25. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +1 -1
  26. package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.js +25 -23
  27. package/mcp-apps.d.ts +8 -6
  28. package/package.json +26 -17
  29. package/scheduled-task/scheduled-task-description.js +77 -0
  30. package/scheduled-task/scheduled-task-preparation.js +24 -0
  31. package/scheduled-task/scheduled-tasks-api-client.js +19 -0
  32. package/scheduled-task/use-scheduled-task-runs.js +82 -0
  33. package/scheduled-task/use-scheduled-tasks.js +93 -0
  34. package/scheduled-tasks.d.ts +178 -0
  35. package/scheduled-tasks.js +7 -2
  36. package/skill/skill.js +10 -7
  37. package/skill/useSkillArchiveImport/useSkillArchiveImport.js +75 -0
  38. package/skill/useSkillEditorSubmit.js +83 -71
  39. package/skill-editor.d.ts +103 -0
  40. package/skill-editor.js +9 -8
  41. package/usage/map-usage-data-to-dashboard.js +66 -0
  42. package/usage/map-user-usage-to-model-limits.js +160 -0
  43. package/usage.d.ts +120 -0
  44. package/usage.js +3 -0
package/index.d.ts CHANGED
@@ -1,5 +1,6 @@
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';
3
4
  import { ApplicationVisualizer } from '@epam/ai-dial-chat-shared';
4
5
  import { ArchiveItemDto } from '@epam/ai-dial-chat-api-client';
5
6
  import { Attachment } from '@epam/ai-dial-chat-shared';
@@ -26,6 +27,7 @@ import { ConversationTransferJob } from '@epam/ai-dial-chat-shared';
26
27
  import { ConversationTransferWarningCode } from '@epam/ai-dial-chat-shared';
27
28
  import { CopyFilesResponseDto } from '@epam/ai-dial-chat-api-client';
28
29
  import { CopyItemDto } from '@epam/ai-dial-chat-api-client';
30
+ import { CreatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
29
31
  import { CreateFolderDto } from '@epam/ai-dial-chat-api-client';
30
32
  import { CreateFolderResponseDto } from '@epam/ai-dial-chat-api-client';
31
33
  import { CreateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
@@ -60,21 +62,29 @@ import { Dispatch } from 'react';
60
62
  import { DisplayAttachment } from '@epam/ai-dial-chat-shared';
61
63
  import { DropdownItem } from '@epam/ai-dial-ui-kit';
62
64
  import { ExportFolder } from '@epam/ai-dial-chat-shared';
65
+ import { ExternalServicesApi } from '@epam/ai-dial-chat-api-client';
63
66
  import { FileManagerColumnKey } from '@epam/ai-dial-react-file-manager';
67
+ import { FileManagerSelectableNode } from '@epam/ai-dial-chat-shared';
64
68
  import { FileMetadataResponseDto } from '@epam/ai-dial-chat-api-client';
65
69
  import { FilesApi } from '@epam/ai-dial-chat-api-client';
70
+ import { FileTreeOptions } from '@epam/ai-dial-react-file-manager';
66
71
  import { FileUploadBatchState } from '@epam/ai-dial-chat-shared';
67
72
  import { FileUploadEntry } from '@epam/ai-dial-chat-shared';
68
73
  import { FileUploadResponseDto } from '@epam/ai-dial-chat-api-client';
69
74
  import { FileUploadStatus } from '@epam/ai-dial-chat-shared';
70
75
  import { FileUploadValidationResult } from '@epam/ai-dial-chat-shared';
76
+ import { FilterChipItem } from '@epam/ai-dial-ui-kit';
71
77
  import { FilterTab } from '@epam/ai-dial-chat-shared';
72
78
  import { getParentFolderPath } from '@epam/ai-dial-chat-shared';
73
79
  import type { GroupedAttachmentItem } from '@epam/ai-dial-chat-shared';
80
+ import { Implementation } from '@modelcontextprotocol/sdk/types.js';
74
81
  import type { InputHighlightData } from '@epam/pdf-highlighter-kit';
75
82
  import { ListFilesItemDto } from '@epam/ai-dial-chat-api-client';
76
83
  import { ListFilesResponseDto } from '@epam/ai-dial-chat-api-client';
77
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';
78
88
  import { ListSharedFilesRequest } from '@epam/ai-dial-chat-api-client';
79
89
  import { LocaleTextEntryDto } from '@epam/ai-dial-chat-api-client';
80
90
  import { McpAppToolSummaryDto } from '@epam/ai-dial-chat-api-client';
@@ -84,10 +94,13 @@ import { MessageAttachment } from '@epam/ai-dial-chat-shared';
84
94
  import { MessageCustomContent } from '@epam/ai-dial-chat-shared';
85
95
  import { MessageRating } from '@epam/ai-dial-chat-shared';
86
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';
87
99
  import { MoveFilesResponseDto } from '@epam/ai-dial-chat-api-client';
88
100
  import { MoveItemDto } from '@epam/ai-dial-chat-api-client';
89
101
  import { MutableRefObject } from 'react';
90
102
  import { NotificationVariant } from '@epam/ai-dial-ui-kit';
103
+ import { OfflineCredentialsApi } from '@epam/ai-dial-chat-api-client';
91
104
  import { OverlayChatMessage } from '@epam/ai-dial-chat-overlay';
92
105
  import { PromptFolderResponseDto } from '@epam/ai-dial-chat-api-client';
93
106
  import { PromptListResponseDto } from '@epam/ai-dial-chat-api-client';
@@ -113,6 +126,10 @@ import { RevokeAccessItemDto } from '@epam/ai-dial-chat-api-client';
113
126
  import { RevokeAccessResponseDto } from '@epam/ai-dial-chat-api-client';
114
127
  import { ScheduledTaskCreateFormValues } from '@epam/ai-dial-scheduled-tasks';
115
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';
116
133
  import { SendCompletionDtoModeEnum } from '@epam/ai-dial-chat-api-client';
117
134
  import { SetStateAction } from 'react';
118
135
  import { ShareApi } from '@epam/ai-dial-chat-api-client';
@@ -129,11 +146,10 @@ import { SkillFileUploadCandidate } from '@epam/ai-dial-skill-editor';
129
146
  import { SkillFileValidationResult } from '@epam/ai-dial-skill-editor';
130
147
  import { SkillMetadataItemDto } from '@epam/ai-dial-chat-api-client';
131
148
  import { SkillUploadResponseDto } from '@epam/ai-dial-chat-api-client';
149
+ import { Stage } from '@epam/ai-dial-chat-shared';
132
150
  import { StarterOption } from '@epam/ai-dial-chat-shared';
133
151
  import { StatusMessage } from '@epam/ai-dial-chat-shared';
134
152
  import { StreamChunk } from '@epam/ai-dial-chat-shared';
135
- import { TabModel } from '@epam/ai-dial-ui-kit';
136
- import { ToolbarOptions } from '@epam/ai-dial-react-file-manager';
137
153
  import { ToolMenuItem } from '@epam/ai-dial-chat-shared';
138
154
  import { ToolsetLoginBodyDto } from '@epam/ai-dial-chat-api-client';
139
155
  import { ToolsetLogoutBodyDto } from '@epam/ai-dial-chat-api-client';
@@ -141,9 +157,11 @@ import { ToolsetsApi } from '@epam/ai-dial-chat-api-client';
141
157
  import { TranscriptionApi } from '@epam/ai-dial-chat-api-client';
142
158
  import { UnpublishCatalogEntityDto } from '@epam/ai-dial-chat-api-client';
143
159
  import { UnpublishResultDto } from '@epam/ai-dial-chat-api-client';
160
+ import { UpdatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
144
161
  import { UpdateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
145
162
  import { UploadArchiveResponseDto } from '@epam/ai-dial-chat-api-client';
146
163
  import { UploadedAttachmentResult } from '@epam/ai-dial-chat-shared';
164
+ import { UsageLimitCardData } from '@epam/ai-dial-usage-dashboard';
147
165
  import { useGridEditingScroll } from '@epam/ai-dial-chat-shared';
148
166
  import { UseGridEditingScrollOptions } from '@epam/ai-dial-chat-shared';
149
167
  import { UseGridEditingScrollResult } from '@epam/ai-dial-chat-shared';
@@ -249,6 +267,25 @@ export declare interface ApiErrorDetails {
249
267
  /** Appends a locale's uppercased code to a field label, e.g. `'Name [EN]'`. */
250
268
  export declare const appendLocaleCode: (label: string, locale: string) => string;
251
269
 
270
+ /**
271
+ * Applies a single SSE stream chunk to the message list.
272
+ *
273
+ *
274
+ * Attachments are accumulated: each chunk's attachments are appended to the
275
+ * existing array rather than replacing it.
276
+ *
277
+ * Annotations are merged by `index`: partial `body.title` and `body.quote`
278
+ * strings are concatenated across chunks, matching the same delta-merge
279
+ * semantics used for stages.
280
+ *
281
+ * `state` is overwritten (not merged) by each chunk that carries one,
282
+ * matching the DIAL stateful-app contract.
283
+ *
284
+ * @returns Updated message array, or `null` when the chunk carries no
285
+ * actionable data (empty content, no form_schema, and no attachments).
286
+ */
287
+ export declare const applyChunkToMessages: (messages: Message[], messageIndex: number, chunk: StreamChunk) => Message[] | null;
288
+
252
289
  /** Converts an APScheduler weekday (Monday=0..Sunday=6) to a JS `Date` weekday (Sunday=0..Saturday=6). */
253
290
  export declare const apSchedulerDayToJsDay: (apSchedulerDay: number) => number;
254
291
 
@@ -348,10 +385,12 @@ export declare const attachmentToDto: (attachment: Attachment) => AttachmentDto;
348
385
  export declare interface AttachmentValidationErrorEvent {
349
386
  /** Why the attachment(s) were rejected. */
350
387
  reason: AttachmentValidationErrorReason;
351
- /** The resolved MIME types the caller currently allows (possibly empty). */
352
- allowedMimeTypes: string[];
388
+ /** The resolved MIME types the caller currently allows (possibly empty). Present only when `reason` is `NoTypesAllowed` or `UnsupportedType`. */
389
+ allowedMimeTypes?: string[];
353
390
  /** Already-formatted, non-translated extension list (e.g. ".png, .jpg"), present only when `reason` is `UnsupportedType`. */
354
391
  formats?: string;
392
+ /** The size limit, in bytes, that was exceeded. Present only when `reason` is `FileTooLarge`. */
393
+ maxFileSizeBytes?: number;
355
394
  }
356
395
 
357
396
  /** Reason a rejected attachment failed validation. */
@@ -359,7 +398,9 @@ export declare enum AttachmentValidationErrorReason {
359
398
  /** No MIME types are allowed at all — attachments are disabled entirely. */
360
399
  NoTypesAllowed = "noTypesAllowed",
361
400
  /** The attachment's content type is not among the allowed MIME types. */
362
- UnsupportedType = "unsupportedType"
401
+ UnsupportedType = "unsupportedType",
402
+ /** The attachment's file size exceeds `maxFileSizeBytes`. */
403
+ FileTooLarge = "fileTooLarge"
363
404
  }
364
405
 
365
406
  /** Thrown by `transcribeAudio`; carries a machine-readable `reason` instead of translated text. */
@@ -727,6 +768,13 @@ export declare interface ChatStreamCompletionOptions {
727
768
  signal?: AbortSignal;
728
769
  }
729
770
 
771
+ /**
772
+ * Classifies an import request's HTTP status into a semantic outcome: 400/413/422 are
773
+ * archive-content problems, 409 is a name collision, 429 is rate limiting, 502/503 mean the
774
+ * backend is unavailable, and anything else (including no status at all) is generic.
775
+ */
776
+ export declare const classifySkillArchiveImportError: (status: number | undefined) => SkillArchiveImportErrorKind;
777
+
730
778
  /** Clears all cached fetch results. Call this when leaving a conversation. */
731
779
  export declare const clearAttachmentCache: () => void;
732
780
 
@@ -968,6 +1016,12 @@ export declare const createMessagePair: (content: string, customContent?: Messag
968
1016
  */
969
1017
  export declare const createPublishApiClient: (publishApi: PublishApi) => PublishApiClient;
970
1018
 
1019
+ /**
1020
+ * Composes scheduler operations over an already configured generated client.
1021
+ * Authentication, base URL, CSRF, and retries remain host responsibilities.
1022
+ */
1023
+ export declare const createScheduledTasksApiClient: (client: ScheduledTasksConfiguredClient) => ScheduledTasksApiClient;
1024
+
971
1025
  /**
972
1026
  * Builds a generated-client `Middleware` that throws on 401, and on a
973
1027
  * classified invalid-CSRF 403 refreshes the token and retries the original
@@ -1134,6 +1188,14 @@ export declare const deriveConversationRowActionState: (item: Pick<ConversationL
1134
1188
  */
1135
1189
  export declare const deriveFavoriteItems: (items: readonly CatalogItem[]) => CatalogItem[];
1136
1190
 
1191
+ /**
1192
+ * Describes the complete trigger without requiring unrelated task metadata.
1193
+ * Unsupported constraints remain Custom, with the full source expression.
1194
+ * Calendar-month shifts crossing month boundaries or days 29–31 remain
1195
+ * Custom because a shifted monthly day is not equivalent around short months.
1196
+ */
1197
+ export declare const describeScheduledTaskTrigger: (trigger: ScheduleTriggerDto, { timeZone, referenceDate, }?: ScheduledTaskTriggerDescriptionOptions) => ScheduledTaskTriggerDescription;
1198
+
1137
1199
  /** Strip the "files/{bucket}/" prefix from a DIAL Core URL to get the path within the bucket. */
1138
1200
  export declare const dialCorePathToRelative: (dialCorePath: string, bucket: string) => string;
1139
1201
 
@@ -1645,6 +1707,9 @@ export declare const formatOperationFolderName: (destinationFolder: string, root
1645
1707
  */
1646
1708
  export declare const formatQuotedNameList: (names: string[]) => string;
1647
1709
 
1710
+ /** Formats a raw `resetsAt` into display strings, or returns `undefined` when it cannot be formatted. */
1711
+ export declare type FormatResetTime = (resetsAt: string | undefined) => ResetTimeDisplay | undefined;
1712
+
1648
1713
  /**
1649
1714
  * Reported through `onError` when the backend rejects a completion because
1650
1715
  * another generation is already active on the same conversation — what a
@@ -2150,6 +2215,13 @@ export declare const mapFormValuesToCreateBody: (values: ScheduledTaskCreateForm
2150
2215
  */
2151
2216
  export declare const mapFormValuesToUpdateBody: (values: ScheduledTaskCreateFormValues) => UpdateScheduledTaskBodyDto;
2152
2217
 
2218
+ /**
2219
+ * Maps the same top-level Cost budgets used by the aggregate cards into table-header state.
2220
+ *
2221
+ * @param formatResetTime - Formats each period's top-level `resetsAt` into the header's reset trio. Omit it to produce statuses with no reset fields.
2222
+ */
2223
+ export declare const mapOverallCostLimitsToPeriodStatuses: (usage: UserLimitStatsResponseDto | undefined, activeLocale: string, t: Translate_2, formatResetTime?: FormatResetTime) => ModelLimitPeriodStatuses;
2224
+
2153
2225
  /**
2154
2226
  * Maps a prompt DTO into a catalog item.
2155
2227
  *
@@ -2208,6 +2280,13 @@ export declare interface MapSkillToCatalogItemOptions {
2208
2280
  favoriteIds: ReadonlySet<string>;
2209
2281
  }
2210
2282
 
2283
+ /**
2284
+ * Returns the normalized stages of a raw stage array or a message-like
2285
+ * payload (reading `custom_content.stages`, falling back to
2286
+ * `customContent.stages`), or `undefined` when there are none.
2287
+ */
2288
+ export declare const mapStages: (source: RawStage[] | RawStageSource | null | undefined) => Stage[] | undefined;
2289
+
2211
2290
  /**
2212
2291
  * Maps a toolset's specification into the lib's credential-status shape,
2213
2292
  * for refreshing the details panel after login/logout. Includes both
@@ -2232,6 +2311,24 @@ export declare interface MapToolsetToCatalogItemOptions {
2232
2311
  resolveIconUrl: (iconUrl: string | undefined) => string | undefined;
2233
2312
  }
2234
2313
 
2314
+ /**
2315
+ * Maps a `UserLimitStatsResponseDto` into `UsageLimitCardGroup`'s `cards` prop,
2316
+ * in Today / This week / This month order. A period is omitted entirely when
2317
+ * the response carries no usable stat for it. Each card's reset trio comes from
2318
+ * `formatResetTime`, and is absent when that callback returns `undefined`.
2319
+ */
2320
+ export declare const mapUsageDataToDashboard: (usage: UserLimitStatsResponseDto | undefined, t: Translate, formatResetTime: FormatResetTime) => UsageLimitCardData[];
2321
+
2322
+ /**
2323
+ * Maps `usage.deployments` into `ModelLimitsSection`'s `rows` prop, joined with model identity
2324
+ * from `deploymentItems`. Rows are included only when any displayed period stat has nonzero usage.
2325
+ * Order follows `Object.keys(deployments)` — `deploymentItems` is enrichment-only.
2326
+ *
2327
+ * @param resolveIconUrl - Resolves a deployment's raw `iconUrl` to the URL the avatar should load.
2328
+ * @param resolveDisplayName - Resolves a localized-text map or plain string to the display name for `activeLocale`.
2329
+ */
2330
+ export declare const mapUserUsageToModelLimits: (usage: UserLimitStatsResponseDto | undefined, deploymentItems: DeploymentItemDto[], activeLocale: string, t: Translate_2, resolveIconUrl: ResolveIconUrl, resolveDisplayName: ResolveDisplayName) => ModelLimitRow[];
2331
+
2235
2332
  /** Content payload for Markdown file attachments. */
2236
2333
  declare interface MarkdownCanvasContent {
2237
2334
  /** Discriminates the content type to select the correct renderer. */
@@ -2252,6 +2349,8 @@ declare type McpAppDisplayMode = NonNullable<McpUiHostContext['displayMode']>;
2252
2349
  declare interface McpAppHostAdapter {
2253
2350
  /** `McpUiHostContext` to deliver to the mounted app's `ui/initialize` handshake. */
2254
2351
  hostContext: McpUiHostContext;
2352
+ /** Host identity (`name`/`version`) to deliver to the mounted app's `ui/initialize` handshake. */
2353
+ hostInfo: Implementation;
2255
2354
  /** Operator-configured MCP Apps sandbox-proxy URL, or `null` when unconfigured. */
2256
2355
  sandboxUrl: string | null;
2257
2356
  /** Fetches the matched tool's MCP Apps `ui://` resource. */
@@ -2268,7 +2367,7 @@ export declare interface McpAppHostContextParams {
2268
2367
  mcpAppTheme?: string;
2269
2368
  /** Host's current i18n locale (BCP 47). */
2270
2369
  locale: string;
2271
- /** Operator-configured MCP App user-agent override. Defaults to `'ai-dial-chat'`. */
2370
+ /** Operator-configured MCP App user-agent override. Defaults to the browser's own `navigator.userAgent`. */
2272
2371
  mcpAppUserAgent?: string;
2273
2372
  /**
2274
2373
  * Display modes the host can switch an app between via
@@ -2390,6 +2489,22 @@ export declare enum McpResourceKind {
2390
2489
 
2391
2490
  export declare const mergeCreatedFolderIntoCache: (cache: Map<string, ListFilesItemDto[]>, parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => Map<string, ListFilesItemDto[]>;
2392
2491
 
2492
+ /**
2493
+ * Merges incoming stage deltas into an existing stage list, keyed by `index`.
2494
+ *
2495
+ * Partial `name` and `content` strings are concatenated across chunks;
2496
+ * attachments are merged by their own `index` (concatenating partial `title`
2497
+ * and `data`); every other field on the incoming delta overwrites the
2498
+ * accumulated one. A brand-new stage whose first chunk carries `name: null`
2499
+ * is normalized to `''`.
2500
+ *
2501
+ * Exported for hosts that keep a flattened `Stage[]` on the message instead
2502
+ * of `Message.custom_content.stages` and therefore cannot reuse
2503
+ * {@link applyChunkToMessages}. Prefer `useConversationStream` when the host
2504
+ * can delegate the whole stream loop.
2505
+ */
2506
+ export declare const mergeStages: (existing: Stage[], incoming: Stage[]) => Stage[];
2507
+
2393
2508
  /** True when `message` is an assistant message carrying at least one stage. */
2394
2509
  export declare const messageHasStages: (message: Message) => boolean;
2395
2510
 
@@ -2402,7 +2517,14 @@ export declare interface MessagePair {
2402
2517
  /** Formats MIME types as a human-readable, comma-separated list of dotted extensions (or the MIME type itself for wildcards). */
2403
2518
  export declare const mimeTypesToAttachmentExtensionLabels: (types: string[]) => string;
2404
2519
 
2405
- /** Normalizes `*` to the all-files wildcard and drops any value that is not a valid `DialFileAcceptType`. */
2520
+ /**
2521
+ * Normalizes `*` to the all-files wildcard, canonicalizes MIME aliases, and drops
2522
+ * any value that is not a valid `DialFileAcceptType`.
2523
+ *
2524
+ * Aliases are resolved because a file picker matches an `accept` entry against its
2525
+ * own MIME table: a declared `text/json` offers no `.json` file, while the
2526
+ * `application/json` it denotes does.
2527
+ */
2406
2528
  export declare const mimeTypesToDialFileAcceptTypes: (types?: string[]) => DialFileAcceptType[] | undefined;
2407
2529
 
2408
2530
  /**
@@ -2825,6 +2947,15 @@ export declare const prepareMoveRenameItems: (copiedItems: DialCopiedItem[], buc
2825
2947
  preparedMoveItems: PreparedCopyMoveItem<MoveItemDto>[];
2826
2948
  };
2827
2949
 
2950
+ /**
2951
+ * Validates form values before creating a request body. Hosts translate the
2952
+ * returned field codes and must not issue a write when `ok` is false.
2953
+ */
2954
+ export declare const prepareScheduledTaskCreateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<CreateScheduledTaskBodyDto>;
2955
+
2956
+ /** Validates form values before preparing an update request body. */
2957
+ export declare const prepareScheduledTaskUpdateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<UpdateScheduledTaskBodyDto>;
2958
+
2828
2959
  /** Maximum body length accepted by `CreatePromptDto.content`. */
2829
2960
  export declare const PROMPT_CONTENT_MAX_LENGTH = 50000;
2830
2961
 
@@ -2908,6 +3039,63 @@ export declare interface QuickAppSchemaLike {
2908
3039
  displayName?: string;
2909
3040
  }
2910
3041
 
3042
+ /**
3043
+ * One stage as it arrives from the REST API or the SSE stream, before
3044
+ * normalization. Structurally satisfied by the generated `StageDto` and by a
3045
+ * raw stream delta, both of which omit `index`/`name`/`status` on the chunk
3046
+ * that opens a stage.
3047
+ */
3048
+ export declare interface RawStage {
3049
+ /** Ordering key. Defaults to `0` when absent. */
3050
+ index?: number | null;
3051
+ /** Stage title. `null` on the chunk that opens the stage. */
3052
+ name?: string | null;
3053
+ /** Terminal state as a raw wire string; anything other than `'completed'`/`'failed'` means still running. */
3054
+ status?: string | null;
3055
+ /** Additional stage text. */
3056
+ content?: string | null;
3057
+ /** Short source/category label shown beside the stage name. */
3058
+ tag?: string | null;
3059
+ /** Files produced or referenced by this stage. */
3060
+ attachments?: RawStageAttachment[] | null;
3061
+ }
3062
+
3063
+ /**
3064
+ * One stage attachment as it arrives from the REST API or the SSE stream,
3065
+ * before normalization: every field is optional and may be `null`.
3066
+ */
3067
+ export declare interface RawStageAttachment {
3068
+ /** Zero-based position in the attachment list. */
3069
+ index?: number | null;
3070
+ /** MIME type of the attachment content. */
3071
+ type?: string | null;
3072
+ /** Display name shown in the UI. */
3073
+ title?: string | null;
3074
+ /** Inline base-64 encoded content. */
3075
+ data?: string | null;
3076
+ /** Remote URL pointing to the attachment content. */
3077
+ url?: string | null;
3078
+ /** MIME type of the referenced resource. */
3079
+ reference_type?: string | null;
3080
+ /** URL of an alternate reference resource. */
3081
+ reference_url?: string | null;
3082
+ }
3083
+
3084
+ /**
3085
+ * Message-like payload carrying stages under either the wire's snake_case
3086
+ * `custom_content` or a host's camelCased `customContent`.
3087
+ */
3088
+ export declare interface RawStageSource {
3089
+ /** Custom content as the DIAL wire format spells it. */
3090
+ custom_content?: {
3091
+ stages?: RawStage[] | null;
3092
+ } | null;
3093
+ /** Custom content as a camelCasing host spells it. */
3094
+ customContent?: {
3095
+ stages?: RawStage[] | null;
3096
+ } | null;
3097
+ }
3098
+
2911
3099
  /**
2912
3100
  * Reads a skill file response as raw bytes, or `null` when the body is
2913
3101
  * larger than `SKILL_MANIFEST_MAX_BYTES`. The declared `content-length` is
@@ -2981,6 +3169,23 @@ export declare const referenceAttachmentToPdfCanvasContent: (attachment: Attachm
2981
3169
  /** Name reserved for the hidden marker file used to create empty folders. */
2982
3170
  export declare const RESERVED_MARKER_NAME = ".dial_folder";
2983
3171
 
3172
+ /**
3173
+ * One reset time, already parsed and formatted by the host. Declared
3174
+ * structurally here so this library never imports an application type; the
3175
+ * host passes a value that satisfies this shape (e.g. `apps/chat`'s own
3176
+ * `ResetTimeDisplay`).
3177
+ */
3178
+ export declare interface ResetTimeDisplay {
3179
+ /** Exclusive end of the period as an epoch ms value, for the host's boundary scheduling. */
3180
+ resetsAtMs: number;
3181
+ /** Machine-readable instant for a `<time dateTime>` attribute. */
3182
+ isoValue: string;
3183
+ /** Visible reset line. */
3184
+ label: string;
3185
+ /** Accessible expansion of the reset line. */
3186
+ ariaLabel: string;
3187
+ }
3188
+
2984
3189
  /**
2985
3190
  * Resolves the primary action for a catalog item.
2986
3191
  *
@@ -3019,6 +3224,9 @@ export declare const resolveDialFileBucketAndPath: (fileId: string) => {
3019
3224
  path: string;
3020
3225
  } | undefined;
3021
3226
 
3227
+ /** A callback that resolves a display name from a localized-text value. */
3228
+ declare type ResolveDisplayName = (name: string | Record<string, string> | undefined | null, locale: string) => string;
3229
+
3022
3230
  /** Resolves a DIAL Core file id to a downloadable URL. Host-owned — encodes the app's own file-download endpoint. */
3023
3231
  export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
3024
3232
 
@@ -3056,6 +3264,9 @@ export declare const resolveGroupedVisualizerCanvasContent: (attachments: Displa
3056
3264
  */
3057
3265
  export declare const resolveHtmlCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<HtmlCanvasContent | ErrorCanvasContent | null>;
3058
3266
 
3267
+ /** A callback that resolves an icon URL from a deployment's raw `iconUrl` field. */
3268
+ declare type ResolveIconUrl = (iconUrl: string | undefined) => string | undefined;
3269
+
3059
3270
  /**
3060
3271
  * Resolves an image canvas content payload from a DisplayAttachment without
3061
3272
  * fetching — returns a local blob URL or the BFF download URL directly so the
@@ -3181,6 +3392,106 @@ export declare type ScheduledTaskDtoMappingResult = {
3181
3392
  reason: UnsupportedTriggerReason;
3182
3393
  };
3183
3394
 
3395
+ /** A checked request preparation result that never serializes invalid values. */
3396
+ export declare type ScheduledTaskPreparationResult<TBody> = {
3397
+ ok: true;
3398
+ body: TBody;
3399
+ } | {
3400
+ ok: false;
3401
+ errors: ScheduledTaskValidationErrors;
3402
+ };
3403
+
3404
+ export declare interface ScheduledTaskRunsListRequest {
3405
+ scheduleId: string;
3406
+ limit?: number;
3407
+ offset?: number;
3408
+ signal?: AbortSignal;
3409
+ }
3410
+
3411
+ export declare interface ScheduledTasksApiClient {
3412
+ listScheduledTasks: (request?: ScheduledTasksListRequest) => Promise<ListScheduledTasksResponseDto>;
3413
+ listScheduledTaskRuns: (request: ScheduledTaskRunsListRequest) => Promise<ListScheduledTaskRunsResponseDto>;
3414
+ createScheduledTask: (body: CreateScheduledTaskBodyDto) => Promise<CreatedScheduledTaskDto>;
3415
+ getScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3416
+ updateScheduledTask: (scheduleId: string, body: UpdateScheduledTaskBodyDto) => Promise<UpdatedScheduledTaskDto>;
3417
+ pauseScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3418
+ resumeScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
3419
+ deleteScheduledTask: (scheduleId: string) => Promise<void>;
3420
+ }
3421
+
3422
+ /** Narrow configured generated-client surface required by scheduler hooks. */
3423
+ export declare interface ScheduledTasksConfiguredClient {
3424
+ listScheduledTasks: (request: {
3425
+ limit?: number;
3426
+ offset?: number;
3427
+ search?: string;
3428
+ sort?: ListScheduledTasksSortEnum;
3429
+ }, options?: RequestInit) => Promise<ListScheduledTasksResponseDto>;
3430
+ listScheduledTaskRuns: (request: {
3431
+ scheduleId: string;
3432
+ limit?: number;
3433
+ offset?: number;
3434
+ }, options?: RequestInit) => Promise<ListScheduledTaskRunsResponseDto>;
3435
+ createScheduledTask: (request: {
3436
+ createScheduledTaskBodyDto: CreateScheduledTaskBodyDto;
3437
+ }) => Promise<CreatedScheduledTaskDto>;
3438
+ getScheduledTask: (request: {
3439
+ scheduleId: string;
3440
+ }) => Promise<ScheduledTaskDto>;
3441
+ updateScheduledTask: (request: {
3442
+ scheduleId: string;
3443
+ updateScheduledTaskBodyDto: UpdateScheduledTaskBodyDto;
3444
+ }) => Promise<UpdatedScheduledTaskDto>;
3445
+ pauseScheduledTask: (request: {
3446
+ scheduleId: string;
3447
+ }) => Promise<ScheduledTaskDto>;
3448
+ resumeScheduledTask: (request: {
3449
+ scheduleId: string;
3450
+ }) => Promise<ScheduledTaskDto>;
3451
+ deleteScheduledTask: (request: {
3452
+ scheduleId: string;
3453
+ }) => Promise<void>;
3454
+ }
3455
+
3456
+ /** App-agnostic request options accepted by the scheduler facade. */
3457
+ export declare interface ScheduledTasksListRequest {
3458
+ limit?: number;
3459
+ offset?: number;
3460
+ search?: string;
3461
+ sort?: ListScheduledTasksSortEnum;
3462
+ signal?: AbortSignal;
3463
+ }
3464
+
3465
+ export declare interface ScheduledTaskTriggerDescription {
3466
+ kind: ScheduledTaskTriggerDescriptionKind;
3467
+ time?: string;
3468
+ dayOfWeek?: string;
3469
+ dayOfMonth?: string;
3470
+ intervalMinutes?: number;
3471
+ date?: Date;
3472
+ expression?: string;
3473
+ sourceTimezone: 'utc';
3474
+ }
3475
+
3476
+ /** Display categories are independent of task editability. */
3477
+ export declare enum ScheduledTaskTriggerDescriptionKind {
3478
+ OneTime = "oneTime",
3479
+ Hourly = "hourly",
3480
+ EveryNMinutes = "everyNMinutes",
3481
+ Daily = "daily",
3482
+ Weekly = "weekly",
3483
+ Monthly = "monthly",
3484
+ Custom = "custom",
3485
+ Invalid = "invalid"
3486
+ }
3487
+
3488
+ export declare interface ScheduledTaskTriggerDescriptionOptions {
3489
+ /** Display timezone; defaults to UTC for backwards compatibility. */
3490
+ timeZone?: string;
3491
+ /** Date whose timezone offset is used. Defaults to now (the existing UTC-storage policy). */
3492
+ referenceDate?: Date;
3493
+ }
3494
+
3184
3495
  /** Serializes a prompt export envelope into a pretty-printed JSON blob. */
3185
3496
  export declare const serializePromptExport: (envelope: PromptExportFormat) => Blob;
3186
3497
 
@@ -3256,6 +3567,28 @@ export declare interface SkillAboutDetails {
3256
3567
  skillPrompt?: string;
3257
3568
  }
3258
3569
 
3570
+ /** Semantic classification of an import request failure. */
3571
+ export declare enum SkillArchiveImportErrorKind {
3572
+ Validation = "validation",
3573
+ Collision = "collision",
3574
+ RateLimited = "rateLimited",
3575
+ ServiceUnavailable = "serviceUnavailable",
3576
+ Generic = "generic"
3577
+ }
3578
+
3579
+ /** Phase of a skill-archive import, driving the host's loading/success/error presentation. */
3580
+ export declare enum SkillArchiveImportStatus {
3581
+ Idle = "idle",
3582
+ Uploading = "uploading",
3583
+ Success = "success",
3584
+ Error = "error"
3585
+ }
3586
+
3587
+ /** Reason a selected/dropped file was rejected before any request was made. */
3588
+ export declare enum SkillArchiveSelectionRejectionReason {
3589
+ UnsupportedFilename = "unsupportedFilename"
3590
+ }
3591
+
3259
3592
  /** Injected API port for skill detail fetching. Mirrors exact server-api wrapper signatures. */
3260
3593
  export declare interface SkillDetailsApi {
3261
3594
  /** Downloads a raw skill file, returning the raw fetch `Response`. */
@@ -3318,6 +3651,12 @@ export declare interface SkillEditorSubmitClient {
3318
3651
  export declare interface SkillEditorSubmitMessages {
3319
3652
  /** Shown when a required field is empty. */
3320
3653
  required: string;
3654
+ /**
3655
+ * Shown when the Instructions value opens with its own YAML frontmatter
3656
+ * block — pasting a whole `SKILL.md` in there would otherwise produce a
3657
+ * manifest with two frontmatter blocks.
3658
+ */
3659
+ instructionsFrontmatter: string;
3321
3660
  /** Shown when the normalized skill name fails DIAL's naming rules. */
3322
3661
  nameInvalid: string;
3323
3662
  /** Shown when the skill name already exists (409), or defensively on an unreachable create-mode 412. */
@@ -3524,6 +3863,28 @@ export declare const splitFileNameExtension: (fileName: string) => {
3524
3863
  extension: string;
3525
3864
  };
3526
3865
 
3866
+ /**
3867
+ * Answers one question: would appending this text after the fence that
3868
+ * `buildSkillManifest` writes produce a *second* frontmatter block?
3869
+ *
3870
+ * That happens when the text's first non-blank line is a bare `---` and some
3871
+ * later line is a bare `---` too — the exact shape of a `SKILL.md` pasted
3872
+ * wholesale into the editor's Instructions field.
3873
+ *
3874
+ * Detection is deliberately structural rather than YAML-based: a pasted block
3875
+ * whose fenced content fails to parse corrupts the stored manifest
3876
+ * identically (and renders as a setext `h2` in the Catalog's Details tab just
3877
+ * the same), so requiring parseable YAML here would let the worst cases
3878
+ * through. Keeping `parseYaml` out also makes this cheap enough to run on
3879
+ * every keystroke.
3880
+ *
3881
+ * A single unclosed fence returns `false`: with no closing fence there is no
3882
+ * second block, matching `FRONTMATTER_PATTERN`'s own requirement. A `---`
3883
+ * appearing later in the body (a horizontal rule, a setext underline) is
3884
+ * likewise not a frontmatter block.
3885
+ */
3886
+ export declare const startsWithFrontmatterBlock: (text: string) => boolean;
3887
+
3527
3888
  /** Options accepted by {@link ConversationStreamTransport.streamCompletion}. */
3528
3889
  export declare interface StreamCompletionOptions {
3529
3890
  onChunk: (chunk: StreamChunk) => void;
@@ -3849,6 +4210,13 @@ export declare const toPublishEntityType: (type: CatalogEntityType) => CatalogPu
3849
4210
  */
3850
4211
  export declare const toPublishRuleDto: (rule: PublicationRule) => PublishRuleDto;
3851
4212
 
4213
+ /**
4214
+ * Returns a renderable `Stage` for one raw payload: `index` defaults to `0`,
4215
+ * `name` to `''`, an unrecognized `status` to `null` (still running), and
4216
+ * `content`/`tag`/`attachments` are passed through when present.
4217
+ */
4218
+ export declare const toStage: (stage: RawStage) => Stage;
4219
+
3852
4220
  /** Request shape the host's selected-deployment recognition call accepts. */
3853
4221
  export declare interface TranscribeWithDeploymentParams {
3854
4222
  audioUrl: string;
@@ -3857,6 +4225,12 @@ export declare interface TranscribeWithDeploymentParams {
3857
4225
  signal: AbortSignal;
3858
4226
  }
3859
4227
 
4228
+ /** A translate function compatible with i18next's `TFunction`. */
4229
+ declare type Translate = (key: string, options?: Record<string, unknown>) => string;
4230
+
4231
+ /** A translate function compatible with i18next's `TFunction`. */
4232
+ declare type Translate_2 = (key: string, options?: Record<string, unknown>) => string;
4233
+
3860
4234
  export declare const trimFileNameToByteLimit: (name: string, limit?: number) => string;
3861
4235
 
3862
4236
  /** An error thrown to indicate the caller is unauthenticated. */
@@ -3915,6 +4289,62 @@ export declare interface UploadFileWithProgressOptions {
3915
4289
  /** Upload mode passed to `FilesApi.uploadFile`: overwrite an existing file or fail if it already exists. */
3916
4290
  export declare type UploadMode = 'overwrite' | 'create-only';
3917
4291
 
4292
+ /**
4293
+ * i18n key strings that the consuming app's translation bundle must define for
4294
+ * `mapUsageDataToDashboard` to produce correctly translated strings. The
4295
+ * values are the default key paths used by AI DIAL Chat.
4296
+ */
4297
+ export declare const USAGE_DATA_I18N_KEYS: {
4298
+ /** Title for the current-UTC-day card (e.g. `'Today'`). */
4299
+ readonly todayTitle: "usage.todayTitle";
4300
+ /** Accessible period description for the current-UTC-day card. */
4301
+ readonly todayPeriodDescription: "usage.todayPeriodDescription";
4302
+ /** Title for the current-UTC-week card (e.g. `'This week'`). */
4303
+ readonly thisWeekTitle: "usage.thisWeekTitle";
4304
+ /** Accessible period description for the current-UTC-week card. */
4305
+ readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
4306
+ /** Title for the current-UTC-month card (e.g. `'This month'`). */
4307
+ readonly thisMonthTitle: "usage.thisMonthTitle";
4308
+ /** Accessible period description for the current-UTC-month card. */
4309
+ readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
4310
+ /** Aria label when there is no limit. Receives `{ used: string }`. */
4311
+ readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
4312
+ /** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
4313
+ readonly progressAriaLabel: "usage.progressAriaLabel";
4314
+ };
4315
+
4316
+ /**
4317
+ * i18n key strings that the consuming app's translation bundle must define for
4318
+ * `mapUserUsageToModelLimits` and `mapOverallCostLimitsToPeriodStatuses` to produce
4319
+ * correctly translated strings. The values are the default key paths used by AI DIAL Chat.
4320
+ */
4321
+ export declare const USAGE_MODEL_LIMITS_I18N_KEYS: {
4322
+ /** Period label used in tooltip text. Receives no interpolation. */
4323
+ readonly todayPeriodDescription: "usage.todayPeriodDescription";
4324
+ /** Period label used in tooltip text. Receives no interpolation. */
4325
+ readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
4326
+ /** Period label used in tooltip text. Receives no interpolation. */
4327
+ readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
4328
+ /** Tooltip when the overall cost limit is running low. Receives `{ period: string }`. */
4329
+ readonly overallCostLimitRunningLowTooltip: "usage.overallCostLimitRunningLowTooltip";
4330
+ /** Tooltip when the overall cost limit is reached. Receives `{ period: string }`. */
4331
+ readonly overallCostLimitReachedTooltip: "usage.overallCostLimitReachedTooltip";
4332
+ /** Aria label for a metric cell with no data. */
4333
+ readonly unavailableLabel: "usage.unavailableLabel";
4334
+ /** Supporting label when a token limit follows the cost limit. */
4335
+ readonly followsCostLimitLabel: "usage.followsCostLimitLabel";
4336
+ /** Supporting label when there is no per-deployment token limit. */
4337
+ readonly noLimitLabel: "usage.noLimitLabel";
4338
+ /** Aria label when token usage has no limit but follows the cost limit. Receives `{ used: string }`. */
4339
+ readonly followsCostLimitAriaLabel: "usage.followsCostLimitAriaLabel";
4340
+ /** Aria label when there is no limit. Receives `{ used: string }`. */
4341
+ readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
4342
+ /** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
4343
+ readonly progressAriaLabel: "usage.progressAriaLabel";
4344
+ /** Label for the spent-cost cell. Receives `{ amount: string }`. */
4345
+ readonly spentLabel: "usage.spentLabel";
4346
+ };
4347
+
3918
4348
  /**
3919
4349
  * Synchronises the active conversation with the conversation list and returns
3920
4350
  * the panel-space id of the active conversation, or `undefined` when none is active.
@@ -3949,6 +4379,25 @@ export declare interface UseActiveConversationSyncParams {
3949
4379
  toPanelConversationId: (id: string) => string;
3950
4380
  }
3951
4381
 
4382
+ /** Loads fresh service statuses without coupling proactive credentials to a live completion. */
4383
+ export declare const useApplicationCredentials: ({ appId, externalServicesClient, offlineCredentialsClient, }: UseApplicationCredentialsParams) => {
4384
+ services: ApplicationExternalServiceDto[];
4385
+ isOfflineConnected: boolean;
4386
+ isLoading: boolean;
4387
+ hasError: boolean;
4388
+ refresh: () => Promise<void>;
4389
+ };
4390
+
4391
+ /** Configured operations for loading application credential metadata. */
4392
+ export declare interface UseApplicationCredentialsParams {
4393
+ /** Application identifier passed through to the configured client. */
4394
+ appId: string;
4395
+ /** Host-configured external-services API. */
4396
+ externalServicesClient: Pick<ExternalServicesApi, 'listExternalServices'>;
4397
+ /** Host-configured offline-credentials API. */
4398
+ offlineCredentialsClient: Pick<OfflineCredentialsApi, 'getOfflineCredentials'>;
4399
+ }
4400
+
3952
4401
  /**
3953
4402
  * Generic single-slot pending / loading / error state machine for
3954
4403
  * confirmation dialogs that trigger an async operation.
@@ -4012,12 +4461,14 @@ export declare interface UseAttachmentUploadResult {
4012
4461
  * MIME types, debouncing a burst of rejected files into a single
4013
4462
  * `onValidationError` call rather than firing one per file.
4014
4463
  */
4015
- export declare const useAttachmentValidation: ({ allowedMimeTypes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
4464
+ export declare const useAttachmentValidation: ({ allowedMimeTypes, maxFileSizeBytes, onValidationError, debounceMs, }: UseAttachmentValidationParams) => UseAttachmentValidationResult;
4016
4465
 
4017
4466
  /** Parameters for {@link useAttachmentValidation}. */
4018
4467
  export declare interface UseAttachmentValidationParams {
4019
4468
  /** Resolved MIME types currently allowed for attachments. */
4020
4469
  allowedMimeTypes: string[];
4470
+ /** Maximum attachment file size, in bytes. When omitted, no file is rejected for size. */
4471
+ maxFileSizeBytes?: number;
4021
4472
  /** Called with a structured event when a rejected attachment is reported, at most once per debounce window. */
4022
4473
  onValidationError?: (event: AttachmentValidationErrorEvent) => void;
4023
4474
  /** Debounce window, in ms, before firing `onValidationError` for a rejected file. Defaults to `100`. */
@@ -4527,7 +4978,7 @@ export declare interface UseConversationSourcesResult {
4527
4978
  uploaded: DisplayAttachment[];
4528
4979
  /** Deduplicated attachments the assistant generated across the conversation. */
4529
4980
  generated: DisplayAttachment[];
4530
- /** Quotation sources referenced by assistant messages, deduplicated by URL; PDF sources are qualified with `#page=N`. */
4981
+ /** Quotation sources referenced by assistant messages, deduplicated by URL. */
4531
4982
  sources: QuotationSource[];
4532
4983
  }
4533
4984
 
@@ -4825,11 +5276,11 @@ export declare interface UseDialFileManagerResult {
4825
5276
  * current one becomes excluded. A `fileManagerTabs` of `undefined` means no
4826
5277
  * restriction — every tab in `allTabs` stays enabled and no reset ever fires.
4827
5278
  */
4828
- export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: TabModel[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
5279
+ export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: FilterChipItem<DialFileManagerTabs>[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
4829
5280
 
4830
5281
  /** Values returned by `useDialFileManagerTabConfig`. */
4831
5282
  export declare interface UseDialFileManagerTabConfigResult {
4832
- tabs: ToolbarOptions['tabs'];
5283
+ tabs: FileTreeOptions['tabs'];
4833
5284
  }
4834
5285
 
4835
5286
  /**
@@ -5018,6 +5469,64 @@ export declare interface UseFavoriteEntitiesStateResult {
5018
5469
  toggleFavorite: (id: string, isFavorite: boolean, entityType?: FavoriteEntityType) => Promise<void>;
5019
5470
  }
5020
5471
 
5472
+ /**
5473
+ * Composes the file-manager tab/listing hooks into the stateful part of an attachment picker:
5474
+ * active tab, selected paths, and hidden-path/MIME/size/folder row eligibility. Returns the
5475
+ * existing `useDialFileManager` controller unchanged and the selection/tab/eligibility fields
5476
+ * `FileManagerAttachModal` already consumes — it composes that modal, it does not replace it.
5477
+ * Final attachment filtering, deduplication, and count enforcement stay owned by the modal.
5478
+ */
5479
+ export declare const useFileAttachmentPicker: ({ fileManagerOptions, bucket, forbiddenSymbolsRegExp, tabLabels, allowedTabs, initialTab, allowedTypes, maxSelectableFileSize, canAttachFolders, }: UseFileAttachmentPickerOptions) => UseFileAttachmentPickerResult;
5480
+
5481
+ /** Options accepted by {@link useFileAttachmentPicker}. */
5482
+ export declare interface UseFileAttachmentPickerOptions {
5483
+ /**
5484
+ * Configured `useDialFileManager` options besides the values this hook derives:
5485
+ * `bucket`, `activeTab`, `rootLabel`, `variant`, and `forbiddenSymbolsRegExp`.
5486
+ */
5487
+ fileManagerOptions: Omit<UseDialFileManagerOptions, 'bucket' | 'activeTab' | 'rootLabel' | 'variant' | 'forbiddenSymbolsRegExp'>;
5488
+ /** DIAL Core bucket to browse. */
5489
+ bucket: string;
5490
+ /** Regexp of characters forbidden in file/folder names, forwarded to `useDialFileManager`. */
5491
+ forbiddenSymbolsRegExp?: RegExp;
5492
+ /** Host-translated label per tab; also supplies the active tab's root-folder label. */
5493
+ tabLabels: Record<DialFileManagerTabs, string>;
5494
+ /** Tab ids the host's configuration allows. `undefined` allows every tab. */
5495
+ allowedTabs?: string[];
5496
+ /** Initial active tab. Defaults to `DialFileManagerTabs.MyFiles`. */
5497
+ initialTab?: DialFileManagerTabs;
5498
+ /** MIME types eligible for selection/upload. Empty or absent allows every type. */
5499
+ allowedTypes?: string[];
5500
+ /** Files at or below this size (bytes) remain eligible; absent allows any size. */
5501
+ maxSelectableFileSize?: number;
5502
+ /** Whether folder rows are eligible for selection. Defaults to `false`. */
5503
+ canAttachFolders?: boolean;
5504
+ }
5505
+
5506
+ /** Result returned by {@link useFileAttachmentPicker}. */
5507
+ export declare interface UseFileAttachmentPickerResult {
5508
+ /** The composed file-manager controller; forward to `FileManagerAttachModal`'s `controller` prop. */
5509
+ controller: UseDialFileManagerResult;
5510
+ /** Active tab. */
5511
+ activeTab: DialFileManagerTabs;
5512
+ /** Tab list filtered to `allowedTabs`; forward to `FileManagerAttachModal`'s `tabs` prop. */
5513
+ tabs: FileTreeOptions['tabs'];
5514
+ /** Switches the active tab and clears the current selection. */
5515
+ onTabChange: (tab: DialFileManagerTabs) => void;
5516
+ /** Currently selected paths. */
5517
+ selectedPaths: Set<string>;
5518
+ /** Replaces the selection with a defensive copy of the given set. */
5519
+ onSelectedPathsChange: (paths: Set<string>) => void;
5520
+ /** Row eligibility predicate; forward to `FileManagerAttachModal`'s `isRowSelectable` prop. */
5521
+ isRowSelectable: (node: {
5522
+ data?: FileManagerSelectableNode | null;
5523
+ }) => boolean;
5524
+ /** MIME eligibility predicate; forward to `FileManagerAttachModal`'s `isFileTypeAllowed` prop. */
5525
+ isFileTypeAllowed: (contentType: string) => boolean;
5526
+ /** Accepted upload MIME types; forward to `FileManagerAttachModal`'s `allowedFileTypes` prop. */
5527
+ allowedFileTypes: DialFileAcceptType[] | undefined;
5528
+ }
5529
+
5021
5530
  export { useGridEditingScroll }
5022
5531
 
5023
5532
  export { UseGridEditingScrollOptions }
@@ -5061,10 +5570,11 @@ export declare interface UseImportFilePickerResult {
5061
5570
  * Builds the `McpAppHostAdapter` a host injects into `@epam/ai-dial-mcp-apps`'s
5062
5571
  * hooks/components, wiring the library's host-context/tool-call/resource-fetch
5063
5572
  * contract to a configured `McpAppsApiClient` and this app's theme/locale/config
5064
- * values (`hostContextParams`, `sandboxUrl`) — this hook itself never reads app
5065
- * context, so a host builds those values wherever it already has them.
5573
+ * values (`hostContextParams`, `sandboxUrl`), plus the host's own identity
5574
+ * (`hostInfo`) — this hook itself never reads app context, so a host builds
5575
+ * those values wherever it already has them.
5066
5576
  */
5067
- export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams) => McpAppHostAdapter;
5577
+ export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams, hostInfo: Implementation) => McpAppHostAdapter;
5068
5578
 
5069
5579
  /**
5070
5580
  * Builds the `McpUiHostContext` delivered to a mounted MCP App during its
@@ -5167,8 +5677,6 @@ export declare const useOpenMcpAppCanvas: (cache: McpAppResponseCache, hostAdapt
5167
5677
 
5168
5678
  /** User-facing text `useOpenMcpAppCanvas` needs but cannot resolve itself — a lib must not call `t()`. */
5169
5679
  export declare interface UseOpenMcpAppCanvasLabels {
5170
- /** Canvas panel title while an MCP App is loading or open. */
5171
- title: string;
5172
5680
  /** Error label shown when the resource fetch is forbidden (HTTP 403). */
5173
5681
  forbiddenErrorLabel: string;
5174
5682
  /** Error label shown for any other resource-load/tool-call failure. */
@@ -5306,6 +5814,50 @@ export declare interface UsePublishFoldersResult {
5306
5814
  hasPublishWriteAccess: (folderPath: string[]) => boolean;
5307
5815
  }
5308
5816
 
5817
+ /** Shared, cancellation-safe pagination for one schedule's run history. */
5818
+ export declare const useScheduledTaskRuns: (client: ScheduledTasksApiClient, { scheduleId, enabled, pageSize }: UseScheduledTaskRunsOptions) => {
5819
+ items: ScheduledTaskRunDto[];
5820
+ isLoading: boolean;
5821
+ isLoadingMore: boolean;
5822
+ initialError: Error | null;
5823
+ loadMoreError: Error | null;
5824
+ hasMore: boolean;
5825
+ loadMore: () => void;
5826
+ retryLoadMore: () => void;
5827
+ refetch: () => void;
5828
+ };
5829
+
5830
+ export declare interface UseScheduledTaskRunsOptions {
5831
+ scheduleId: string;
5832
+ enabled?: boolean;
5833
+ pageSize?: number;
5834
+ }
5835
+
5836
+ /** Shared scheduler-list lifecycle with generation-scoped stale-response guards. */
5837
+ export declare const useScheduledTasks: (client: ScheduledTasksApiClient, { enabled, pageSize, debounceMs, initialSearch, initialSort, }?: UseScheduledTasksOptions) => {
5838
+ items: ScheduledTaskDto[];
5839
+ searchQuery: string;
5840
+ setSearchQuery: Dispatch<SetStateAction<string>>;
5841
+ sortKey: "firstToRun" | "lastToRun" | "newest" | "nameAZ";
5842
+ setSortKey: Dispatch<SetStateAction<"firstToRun" | "lastToRun" | "newest" | "nameAZ">>;
5843
+ isLoading: boolean;
5844
+ isLoadingMore: boolean;
5845
+ initialError: Error | null;
5846
+ loadMoreError: Error | null;
5847
+ hasMore: boolean;
5848
+ loadMore: () => void;
5849
+ retryLoadMore: () => void;
5850
+ refetch: () => void;
5851
+ };
5852
+
5853
+ export declare interface UseScheduledTasksOptions {
5854
+ enabled?: boolean;
5855
+ pageSize?: number;
5856
+ debounceMs?: number;
5857
+ initialSearch?: string;
5858
+ initialSort?: ListScheduledTasksSortEnum;
5859
+ }
5860
+
5309
5861
  /**
5310
5862
  * Resolves and manages share-link data for a DIAL Core resource.
5311
5863
  *
@@ -5346,6 +5898,46 @@ export declare interface UseShareRecipientsCountResult {
5346
5898
  invalidateRecipientsCount: (itemId: string) => void;
5347
5899
  }
5348
5900
 
5901
+ /**
5902
+ * Headless controller for the skill-archive upload flow: dialog visibility, the exact-filename
5903
+ * precheck, in-flight exclusion, and import completion. The host supplies the configured request
5904
+ * and observes completion/failure through the injected callbacks; the hook never imports app
5905
+ * contexts, i18n, or a configured API client.
5906
+ */
5907
+ export declare const useSkillArchiveImport: <TResult>({ importArchive, onImported, onError, manifestFileName, }: UseSkillArchiveImportOptions<TResult>) => UseSkillArchiveImportResult;
5908
+
5909
+ /** Options accepted by {@link useSkillArchiveImport}. */
5910
+ export declare interface UseSkillArchiveImportOptions<TResult> {
5911
+ /** Submits the selected archive; the host owns request configuration and the client. */
5912
+ importArchive: (file: File) => Promise<TResult>;
5913
+ /** Called once after a successful import (and any awaited host follow-up) settles. */
5914
+ onImported: (result: TResult) => void | Promise<void>;
5915
+ /** Called once when the import request, or the host's follow-up in {@link onImported}, fails. */
5916
+ onError: (error: unknown, kind: SkillArchiveImportErrorKind) => void;
5917
+ /** Exact filename treated as the skill manifest. Defaults to `'SKILL.md'`. */
5918
+ manifestFileName?: string;
5919
+ }
5920
+
5921
+ /** Result returned by {@link useSkillArchiveImport}. */
5922
+ export declare interface UseSkillArchiveImportResult {
5923
+ /** Whether the upload dialog is open. */
5924
+ isDialogOpen: boolean;
5925
+ /** Current phase of the import. */
5926
+ status: SkillArchiveImportStatus;
5927
+ /** Reason the current/last selection was rejected locally; `undefined` once cleared. */
5928
+ selectionRejectionReason: SkillArchiveSelectionRejectionReason | undefined;
5929
+ /** Classified failure of the last import request; `undefined` outside a request failure. */
5930
+ errorKind: SkillArchiveImportErrorKind | undefined;
5931
+ /** Opens the dialog, unless an import is already in flight. */
5932
+ openDialog: () => void;
5933
+ /** Closes the dialog and clears any rejection reason. */
5934
+ closeDialog: () => void;
5935
+ /** Wire to the dialog drop zone's `onChange`. */
5936
+ handleFilesSelected: (files: File[]) => void;
5937
+ /** Wire to the dialog drop zone's `onReject`. */
5938
+ handleFilesRejected: () => void;
5939
+ }
5940
+
5349
5941
  /**
5350
5942
  * Headless data pipeline behind a skill details side panel: resolves the
5351
5943
  * selected skill from the listings, maps it to a catalog item with its
@@ -5495,6 +6087,12 @@ export declare interface UseSkillEditorSubmitResult {
5495
6087
  clearConflict: () => void;
5496
6088
  /** Validates and submits the given form values. */
5497
6089
  handleSubmit: (values: SkillEditorValues) => Promise<void>;
6090
+ /**
6091
+ * Re-runs the Instructions frontmatter check against the editor's current
6092
+ * values, so a pasted `SKILL.md` is flagged as the text lands rather than
6093
+ * only on submit. Pass as the editor's `onValuesChange`.
6094
+ */
6095
+ handleValuesChange: (values: SkillEditorValues) => void;
5498
6096
  }
5499
6097
 
5500
6098
  /**