@epam/ai-dial-chat-hooks 1.2.0-dev.99 → 1.2.0-rc.0

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 (84) hide show
  1. package/api-error/api-error.js +7 -4
  2. package/catalog/catalog-derivations.js +1 -1
  3. package/catalog/deployment-id.js +8 -2
  4. package/catalog/map-deployment-limits-to-catalog.js +16 -24
  5. package/catalog/map-deployment-limits-to-input.js +81 -9
  6. package/catalog/map-deployment-to-catalog-item.js +34 -34
  7. package/catalog/map-entity-details-to-catalog.js +237 -192
  8. package/catalog/map-skill-to-catalog-item.js +61 -54
  9. package/catalog/publish.js +4 -4
  10. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +122 -101
  11. package/catalog/useCatalogItemDetails.js +9 -8
  12. package/catalog/usePublishFolders/usePublishFolders.js +1 -1
  13. package/catalog.d.ts +171 -34
  14. package/catalog.js +23 -23
  15. package/conversation/conversation-transfer/export-conversation.js +24 -16
  16. package/conversation/conversation-transfer/import-conversation.js +80 -31
  17. package/conversation/create-chat-stream-api.js +85 -49
  18. package/conversation/get-model-id-from-conversation-id.js +15 -9
  19. package/conversation/message-utils.js +44 -2
  20. package/conversation/stage.js +6 -2
  21. package/conversation/useActiveConversationSync/useActiveConversationSync.js +7 -8
  22. package/conversation/useConversationExport/useConversationExport.js +9 -9
  23. package/conversation/useConversationHandlers/message-utils.js +8 -5
  24. package/conversation/useConversationHandlers/useConversationHandlers.js +181 -167
  25. package/conversation/useConversationImport/useConversationImport.js +123 -121
  26. package/conversation/useConversationPanelItems/useConversationPanelItems.js +49 -31
  27. package/conversation/useConversationStream/frame-scheduler.js +39 -0
  28. package/conversation/useConversationStream/generation-resume.js +122 -64
  29. package/conversation/useConversationStream/useConversationStream.js +277 -118
  30. package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +189 -0
  31. package/conversation-sources/useConversationSources/useConversationSources.js +31 -24
  32. package/conversation-sources.d.ts +1 -1
  33. package/conversation-transfer.d.ts +2 -1
  34. package/conversation.d.ts +205 -22
  35. package/conversation.js +32 -31
  36. package/file-manager-canvas.d.ts +27 -7
  37. package/file-manager.d.ts +87 -32
  38. package/file-manager.js +25 -24
  39. package/files/attachment-canvas.js +67 -44
  40. package/files/dial-file-manager-copy-move.util.js +9 -8
  41. package/files/dial-file-manager-mapping.util.js +2 -1
  42. package/files/dial-file-manager-path.util.js +24 -2
  43. package/files/dial-file-manager.model.js +23 -19
  44. package/files/dial-file-manager.types.js +3 -3
  45. package/files/file-manager-variant.js +1 -1
  46. package/files/resolve-dial-file-api-path.js +11 -12
  47. package/files/useDialFileListing/useDialFileListing.js +140 -127
  48. package/files/useDialFileManager/useDialFileManager.js +139 -135
  49. package/files/useDialFileManagerSections/useDialFileManagerSections.js +155 -0
  50. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +20 -15
  51. package/files/useDialFileMutations/useDialFileMutations.js +65 -60
  52. package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +117 -110
  53. package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +28 -23
  54. package/index.d.ts +630 -128
  55. package/index.js +136 -134
  56. package/mcp-apps/useMcpAppTools/useMcpAppTools.js +1 -1
  57. package/oauth/authorize-url.js +3 -3
  58. package/oauth/toolset-id.js +5 -3
  59. package/oauth/useToolsetLogin/useToolsetLogin.js +8 -8
  60. package/oauth.d.ts +34 -2
  61. package/oauth.js +9 -9
  62. package/package.json +19 -23
  63. package/scheduled-task/scheduled-task-description.js +43 -39
  64. package/scheduled-task/scheduled-task-trigger.js +74 -71
  65. package/scheduled-task/use-scheduled-task-runs.js +162 -50
  66. package/scheduled-task/use-scheduled-tasks.js +52 -48
  67. package/scheduled-tasks.d.ts +27 -6
  68. package/scheduled-tasks.js +2 -2
  69. package/shared/application-schema.js +5 -2
  70. package/shared/cron-day-of-month.js +13 -0
  71. package/skill/skill-archive.js +19 -0
  72. package/skill/skill-types.js +8 -7
  73. package/skill/skill.js +52 -29
  74. package/skill/useSkillArchiveImport/useSkillArchiveImport.js +38 -34
  75. package/skill/useSkillEditorLoad.js +65 -59
  76. package/skill/useSkillEditorSubmit.js +105 -93
  77. package/skill/useSkillFileActions.js +70 -58
  78. package/skill-editor.d.ts +62 -13
  79. package/skill-editor.js +9 -9
  80. package/usage/map-user-usage-to-model-limits.js +137 -95
  81. package/usage.d.ts +8 -3
  82. package/usePageFileDrag/usePageFileDrag.js +3 -3
  83. package/utils.d.ts +26 -6
  84. package/utils.js +10 -10
package/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Annotation } from '@epam/ai-dial-chat-shared';
2
2
  import { AnnotationGroup } from '@epam/ai-dial-quotations';
3
3
  import { ApplicationExternalServiceDto } from '@epam/ai-dial-chat-api-client';
4
+ import { ApplicationSchemaSummaryDto } from '@epam/ai-dial-chat-api-client';
4
5
  import { ApplicationVisualizer } from '@epam/ai-dial-chat-shared';
5
6
  import { ArchiveItemDto } from '@epam/ai-dial-chat-api-client';
6
7
  import { Attachment } from '@epam/ai-dial-chat-shared';
@@ -10,6 +11,7 @@ import { AttachmentErrorReason } from '@epam/ai-dial-chat-shared';
10
11
  import { AttachmentResource } from '@epam/ai-dial-chat-shared';
11
12
  import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
12
13
  import { CatalogContentTreeNode } from '@epam/ai-dial-catalog';
14
+ import { CatalogCreateSearch } from '@epam/ai-dial-catalog';
13
15
  import { CatalogEntityType } from '@epam/ai-dial-chat-shared';
14
16
  import { CatalogItem } from '@epam/ai-dial-catalog';
15
17
  import { CatalogItemApiDetails } from '@epam/ai-dial-catalog';
@@ -37,8 +39,6 @@ import type { CustomVisualizerDataLayout } from '@epam/ai-dial-chat-shared';
37
39
  import { DeleteFilesResponseDto } from '@epam/ai-dial-chat-api-client';
38
40
  import { DeleteItemDto } from '@epam/ai-dial-chat-api-client';
39
41
  import { DeploymentConfigurationSchema } from '@epam/ai-dial-chat-shared';
40
- import { DeploymentCreationFormLocaleEntry } from '@epam/ai-dial-builder-form';
41
- import { DeploymentCreationFormLocaleOption } from '@epam/ai-dial-builder-form';
42
42
  import { DeploymentDetailsDto } from '@epam/ai-dial-chat-api-client';
43
43
  import { DeploymentFeatures } from '@epam/ai-dial-chat-shared';
44
44
  import { DeploymentItemDto } from '@epam/ai-dial-chat-api-client';
@@ -75,10 +75,10 @@ import { FileUploadStatus } from '@epam/ai-dial-chat-shared';
75
75
  import { FileUploadValidationResult } from '@epam/ai-dial-chat-shared';
76
76
  import { FilterChipItem } from '@epam/ai-dial-ui-kit';
77
77
  import { FilterTab } from '@epam/ai-dial-chat-shared';
78
- import { getParentFolderPath } from '@epam/ai-dial-chat-shared';
79
78
  import type { GroupedAttachmentItem } from '@epam/ai-dial-chat-shared';
80
79
  import { Implementation } from '@modelcontextprotocol/sdk/types.js';
81
80
  import type { InputHighlightData } from '@epam/pdf-highlighter-kit';
81
+ import { LimitStatsDto } from '@epam/ai-dial-chat-api-client';
82
82
  import { ListFilesItemDto } from '@epam/ai-dial-chat-api-client';
83
83
  import { ListFilesResponseDto } from '@epam/ai-dial-chat-api-client';
84
84
  import { ListPublicFilesRequest } from '@epam/ai-dial-chat-api-client';
@@ -86,7 +86,9 @@ import { ListScheduledTaskRunsResponseDto } from '@epam/ai-dial-chat-api-client'
86
86
  import { ListScheduledTasksResponseDto } from '@epam/ai-dial-chat-api-client';
87
87
  import { ListScheduledTasksSortEnum } from '@epam/ai-dial-chat-api-client';
88
88
  import { ListSharedFilesRequest } from '@epam/ai-dial-chat-api-client';
89
+ import { LocaleOption } from '@epam/ai-dial-chat-shared';
89
90
  import { LocaleTextEntryDto } from '@epam/ai-dial-chat-api-client';
91
+ import { LocalizedTextEntry } from '@epam/ai-dial-chat-shared';
90
92
  import { McpAppToolSummaryDto } from '@epam/ai-dial-chat-api-client';
91
93
  import { McpUiHostContext } from '@mcp-ui/client';
92
94
  import { Message } from '@epam/ai-dial-chat-shared';
@@ -141,6 +143,7 @@ import { SkillEditorFileActions } from '@epam/ai-dial-skill-editor';
141
143
  import { SkillEditorValues } from '@epam/ai-dial-skill-editor';
142
144
  import { SkillFileBatchError } from '@epam/ai-dial-skill-editor';
143
145
  import { SkillFileListResponseDto } from '@epam/ai-dial-chat-api-client';
146
+ import { SkillFileSourceEntry } from '@epam/ai-dial-skill-editor';
144
147
  import { SkillFileTreeNode } from '@epam/ai-dial-skill-editor';
145
148
  import { SkillFileUploadCandidate } from '@epam/ai-dial-skill-editor';
146
149
  import { SkillFileValidationResult } from '@epam/ai-dial-skill-editor';
@@ -162,6 +165,7 @@ import { UpdateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
162
165
  import { UploadArchiveResponseDto } from '@epam/ai-dial-chat-api-client';
163
166
  import { UploadedAttachmentResult } from '@epam/ai-dial-chat-shared';
164
167
  import { UsageLimitCardData } from '@epam/ai-dial-usage-dashboard';
168
+ import { UsageLimitProgressRow } from '@epam/ai-dial-catalog';
165
169
  import { useGridEditingScroll } from '@epam/ai-dial-chat-shared';
166
170
  import { UseGridEditingScrollOptions } from '@epam/ai-dial-chat-shared';
167
171
  import { UseGridEditingScrollResult } from '@epam/ai-dial-chat-shared';
@@ -181,6 +185,7 @@ export declare interface AgentCapabilities {
181
185
  hasConfiguration?: boolean;
182
186
  hasChatCompletion?: boolean;
183
187
  hasResponsesApi?: boolean;
188
+ hasSkills?: boolean;
184
189
  }
185
190
 
186
191
  /** Input-attachment configuration for an agent (application) deployment. */
@@ -223,6 +228,9 @@ export declare const annotationToOoxmlCanvasContent: (annotation: Annotation, an
223
228
  /**
224
229
  * Builds a `PdfCanvasContent` for a PDF citation annotation, including highlights
225
230
  * for the clicked annotation's document within its citation group.
231
+ * When the clicked annotation has a page but no selector with valid geometry,
232
+ * an invisible page-anchor highlight is added and selected so the viewer
233
+ * still opens that page.
226
234
  * Returns `null` if the annotation has no PDF source attachment.
227
235
  */
228
236
  export declare const annotationToPdfCanvasContent: (annotation: Annotation, groups: AnnotationGroup[], resolvers: AttachmentCanvasUrlResolvers) => PdfCanvasContent | null;
@@ -256,12 +264,24 @@ export declare interface AnnouncementListItemLink {
256
264
 
257
265
  /** Normalized shape returned by {@link getApiErrorDetails}. */
258
266
  export declare interface ApiErrorDetails {
267
+ /** Stable domain error code supplied by the API, when present. */
268
+ code?: string;
259
269
  /** HTTP status code carried by the error, when available. */
260
270
  status?: number;
261
271
  /** Resolved human-readable error message, or `null` when none could be resolved. */
262
272
  message: string | null;
263
273
  /** Extracted W3C trace ID, when the error's response carries a valid `traceparent`. */
264
274
  traceId?: string;
275
+ /**
276
+ * Error code reported by the service behind the API, when the API forwards one
277
+ * (`upstreamCode`). Passed through as-is; the host decides whether to act on it.
278
+ */
279
+ upstreamCode?: string;
280
+ /**
281
+ * Error reason reported by the service behind the API, when the API forwards one
282
+ * (`upstreamMessage`). Untranslated; the host decides whether to display it.
283
+ */
284
+ upstreamMessage?: string;
265
285
  }
266
286
 
267
287
  /** Appends a locale's uppercased code to a field label, e.g. `'Name [EN]'`. */
@@ -338,6 +358,8 @@ export declare interface AttachmentCanvasUrlResolvers {
338
358
  resolveDialUrl: (attachment: DisplayAttachment) => string | undefined;
339
359
  /** Resolves a DIAL Core file id to a fetchable metadata URL (used for cache-freshness validation). */
340
360
  resolveDialFileMetadataUrl: (fileId: string) => string | undefined;
361
+ /** URL of a host-served bootstrap document that renders HTML with no download URL (inline `data`) under its own response CSP instead of the embedding page's — forwarded as `HtmlCanvasContent.srcdocHostUrl`. When omitted, that HTML renders via plain `srcdoc`. */
362
+ htmlSrcdocHostUrl?: string;
341
363
  }
342
364
 
343
365
  /** The type of content the canvas can display. */
@@ -435,7 +457,7 @@ export declare enum AuthenticationType {
435
457
  * `additionalLocaleCodes` and excluding whichever code is already the
436
458
  * primary Name/Description field.
437
459
  */
438
- export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: string[], primaryLocale: string) => DeploymentCreationFormLocaleOption[];
460
+ export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: string[], primaryLocale: string) => LocaleOption[];
439
461
 
440
462
  /**
441
463
  * Builds the value persisted under `StorageKey.TextOfClosedAnnouncement` when
@@ -497,6 +519,8 @@ export declare const buildPromptOverview: (prompt: PromptResponseDto, labels: Pr
497
519
  /** Joins a folder path and a prompt name into the DIAL prompt path used as an id. */
498
520
  export declare const buildPromptPath: (folderId: string, name: string) => string;
499
521
 
522
+ export declare const buildResetFields: (stats: LimitStatsDto, formatResetTime: FormatResetTime | undefined) => Pick<UsageLimitProgressRow, "resetLabel" | "resetIsoValue" | "resetAriaLabel">;
523
+
500
524
  /** Builds the Responses API endpoint URL for a deployment. */
501
525
  export declare const buildResponsesUrl: (baseUrl: string) => string;
502
526
 
@@ -522,7 +546,9 @@ export declare const buildSharedItemVirtualPath: (relativePath: string, rootLabe
522
546
  * itself) contributes no node. Every folder entry is attached under its own
523
547
  * stripped path so an empty grouping folder still appears; every file entry
524
548
  * attaches under the folder chain its stripped path implies, synthesizing
525
- * any intermediate folder the listing never enumerated on its own. A file
549
+ * any intermediate folder the listing never enumerated on its own. An
550
+ * empty-folder marker (`.dial_folder`) only proves its folder exists and
551
+ * never becomes a file node. A file
526
552
  * node's `id` is the listing entry's own (unstripped) path, so it round-trips
527
553
  * back to `downloadSkillFile` without being re-derived; a folder node's `id`
528
554
  * is the stripped path and only keys client-side expand/collapse state.
@@ -532,7 +558,10 @@ export declare const buildSkillContentTree: (files: SkillMetadataItemDto[], skil
532
558
  /**
533
559
  * Builds the ordered supporting-file paths and `Blob` payload
534
560
  * `createSkill`/`updateSkill` expect from the editor's file tree and
535
- * in-memory content map.
561
+ * in-memory content map. Every folder node with no descendant node gets a
562
+ * zero-byte `<folder>/.dial_folder` marker after the real files, so the
563
+ * empty folder survives the whole-skill write; a folder with content needs
564
+ * none, and a marker it had before is dropped by that same write.
536
565
  */
537
566
  export declare const buildSkillFilesPayload: (files: SkillFileTreeNode[], filesContent: Map<string, SkillFileContent>) => SkillFilesPayload;
538
567
 
@@ -580,8 +609,8 @@ export declare const buildSkillOverview: (skill: SkillMetadataItemDto | undefine
580
609
  * Builds the OAuth authorize URL for a given, already-generated `state`
581
610
  * value. The caller owns what `state` carries — see `initiateOAuthLogin`.
582
611
  * Returns `null` rather than throwing for a configuration that cannot
583
- * produce a valid URL, including one whose authorization endpoint is not
584
- * reachable over a secure transport.
612
+ * produce a valid URL, including one whose authorization endpoint is not an
613
+ * `http:`/`https:` URL.
585
614
  */
586
615
  export declare const buildToolsetAuthorizeUrl: (auth: ToolsetOAuthSettings, redirectUri: string, state: string) => string | null;
587
616
 
@@ -618,7 +647,6 @@ export declare interface CatalogDetailsApi extends SkillDetailsApi {
618
647
 
619
648
  /** Localized copy `useCatalogEditNavigation` needs for the Create menu and delete errors. */
620
649
  export declare interface CatalogEditNavigationLabels {
621
- createQuickApp: string;
622
650
  createToolset: string;
623
651
  createCustomApp: string;
624
652
  createSkill: string;
@@ -656,9 +684,9 @@ export declare interface CatalogEditNavigationUrls {
656
684
  buildCustomAppEditUrl(appId: string): string;
657
685
  /** URL to create a new custom (schema-less) app. */
658
686
  buildCustomAppCreateUrl(): string;
659
- /** URL to edit an existing quick app under the given schema. */
687
+ /** URL to edit an existing schema-based app (quick app or any other runner) under the given schema. */
660
688
  buildQuickAppEditUrl(schemaId: string, appId: string): string;
661
- /** URL to create a new quick app under the given schema. */
689
+ /** URL to create a new schema-based app (quick app or any other runner) under the given schema. */
662
690
  buildQuickAppCreateUrl(schemaId: string): string;
663
691
  }
664
692
 
@@ -757,6 +785,7 @@ export declare interface ChatStreamApi {
757
785
  stopCompletion: (dto: {
758
786
  generationId: string;
759
787
  path: string;
788
+ content?: string;
760
789
  }) => Promise<void>;
761
790
  }
762
791
 
@@ -801,7 +830,7 @@ export declare const COLUMNS_WITHOUT_AUTHOR: FileManagerColumnKey[];
801
830
  * `undefined` (not `[]`) when nothing remains, so a request untouched by
802
831
  * this feature stays byte-identical to today.
803
832
  */
804
- export declare const composeLocalePayload: (otherLocales: DeploymentCreationFormLocaleEntry[], primaryLocale: string) => LocaleTextEntryDto[] | undefined;
833
+ export declare const composeLocalePayload: (otherLocales: LocalizedTextEntry[], primaryLocale: string) => LocaleTextEntryDto[] | undefined;
805
834
 
806
835
  /** Whether an export includes the conversation's attachments. */
807
836
  export declare enum ConversationExportMode {
@@ -817,6 +846,28 @@ export declare interface ConversationGenerationLifecycle {
817
846
  completeGeneration: (path: string, generationId: string) => void;
818
847
  }
819
848
 
849
+ /** Labels and formatter callbacks for the conversation-input limits mapping utility. */
850
+ export declare interface ConversationInputLimitsLabels {
851
+ /** Heading of the group listing the selected deployment's token limits. */
852
+ tokenGroup: string;
853
+ /** Heading of the group listing the caller's cost budget and spend against it. */
854
+ costGroup: string;
855
+ /** Label for the current-UTC-day row, used by both groups. */
856
+ periodDay: string;
857
+ /** Label for the current-UTC-week row, used by both groups. */
858
+ periodWeek: string;
859
+ /** Label for the current-UTC-month row, used by both groups. */
860
+ periodMonth: string;
861
+ /** Formats the combined used/total display value for a capped row. */
862
+ formatValueLabel: (used: string, total: string) => string;
863
+ /** Formats the ARIA label for a capped progress row. */
864
+ formatProgressAriaLabel: (params: {
865
+ label: string;
866
+ used: string;
867
+ total: string;
868
+ }) => string;
869
+ }
870
+
820
871
  /** Stable reverse-lookup maps returned by `useConversationLookupMaps`. */
821
872
  export declare interface ConversationLookupMaps {
822
873
  /** Returns the raw context id for a panel-space conversation id, or `undefined` when not found. */
@@ -880,7 +931,7 @@ export declare interface ConversationStreamOverlayNotifier {
880
931
  }
881
932
 
882
933
  /** The exact `startStream` shape `useConversationStream` returns. */
883
- export declare type ConversationStreamStarter = (conversationPath: string, userContent: string, messageIndex: number, model: string, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum) => void;
934
+ export declare type ConversationStreamStarter = (conversationPath: string, userContent: string, messageIndex: number, model: string, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum, options?: StartStreamOptions) => void;
884
935
 
885
936
  /**
886
937
  * Host-owned transport for the DIAL Core completion protocol. Implemented at
@@ -890,10 +941,14 @@ export declare type ConversationStreamStarter = (conversationPath: string, userC
890
941
  export declare interface ConversationStreamTransport {
891
942
  /** Starts a completion; delivers chunks/completion/error through `options`, aborted via `options.signal`. */
892
943
  streamCompletion(path: string, message: string | undefined, model: string, options: StreamCompletionOptions, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum, messageIndex?: number, clientChannelId?: string): void;
893
- /** Requests the backend stop an active generation. */
944
+ /**
945
+ * Requests the backend stop an active generation. `content` is the answer text shown
946
+ * so far; the backend saves it for a generation whose text it does not hold.
947
+ */
894
948
  stopCompletion(params: {
895
949
  generationId: string;
896
950
  path: string;
951
+ content?: string;
897
952
  }): Promise<void>;
898
953
  /** Opens a stream of resource-update events for `path`, until aborted via `signal`. */
899
954
  watchConversation(path: string, signal: AbortSignal): Promise<ReadableStream<Uint8Array>>;
@@ -967,6 +1022,12 @@ export declare interface CreateChatStreamApiDeps {
967
1022
  getTimezone?: () => string | undefined;
968
1023
  /** `fetch` implementation to issue requests through. Defaults to the global `fetch`. */
969
1024
  fetchImpl?: typeof fetch;
1025
+ /**
1026
+ * How long an open completion stream may go without receiving a byte
1027
+ * (keepalive comments included) before it is reported as a
1028
+ * {@link StreamInterruptedError}. Defaults to {@link DEFAULT_STREAM_IDLE_TIMEOUT_MS}.
1029
+ */
1030
+ idleTimeoutMs?: number;
970
1031
  }
971
1032
 
972
1033
  /**
@@ -1084,6 +1145,15 @@ export declare type CsrfRefreshOutcome = {
1084
1145
 
1085
1146
  export declare const DATE_OPTIONS: Intl.DateTimeFormatOptions;
1086
1147
 
1148
+ /**
1149
+ * Inverse of `encodeDeploymentId` — decodes each `/`-separated segment back
1150
+ * to its raw, human-readable form. A segment that isn't valid
1151
+ * percent-encoding is passed through unchanged rather than throwing, since
1152
+ * this decodes externally-sourced ids (the settings iframe's postMessage
1153
+ * protocol).
1154
+ */
1155
+ export declare const decodeDeploymentId: (id: string) => string;
1156
+
1087
1157
  /**
1088
1158
  * Inverse of `encodeToolsetId` — decodes each `/`-separated segment back to
1089
1159
  * its raw, human-readable form. A segment that isn't valid percent-encoding
@@ -1100,11 +1170,17 @@ export declare const decodeToolsetId: (id: string) => string;
1100
1170
  * present in either map, excluding `primaryLocale` — that key is already the
1101
1171
  * primary Name/Description field, not a row in the popup.
1102
1172
  */
1103
- export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) => DeploymentCreationFormLocaleEntry[];
1173
+ export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) => LocalizedTextEntry[];
1174
+
1175
+ /** The English Overview labels `mapEntityDetailsToCatalogDetails` uses when a host passes none. */
1176
+ export declare const DEFAULT_ENTITY_DETAILS_LABELS: EntityDetailsLabels;
1104
1177
 
1105
1178
  /** Fallback text of a {@link GenerationConflictError} when no message is supplied. */
1106
1179
  export declare const DEFAULT_GENERATION_CONFLICT_MESSAGE = "A response is already being generated in this conversation. Wait for it to finish or stop it before sending another message.";
1107
1180
 
1181
+ /** Safe fallback for hosts that do not supply a translated persistence warning. */
1182
+ export declare const DEFAULT_GENERATION_PERSISTENCE_ERROR_MESSAGE = "The response could not be saved. It is still shown here, but may be lost if you reload or leave this page. Copy it before continuing.";
1183
+
1108
1184
  /**
1109
1185
  * Default ceiling on the summed byte length of an export's attachments.
1110
1186
  *
@@ -1118,6 +1194,8 @@ export declare const DEFAULT_GENERATION_CONFLICT_MESSAGE = "A response is alread
1118
1194
  */
1119
1195
  export declare const DEFAULT_MAX_ARCHIVE_BYTES: number;
1120
1196
 
1197
+ export declare const DEFAULT_STREAM_IDLE_TIMEOUT_MS = 45000;
1198
+
1121
1199
  /** Translated folder-path labels for the Personal/Shared/Public deployment groupings. */
1122
1200
  export declare interface DeploymentFolderLabels {
1123
1201
  personal: string;
@@ -1135,16 +1213,14 @@ export declare interface DeploymentGenerationApiSupport {
1135
1213
  export declare interface DeploymentLimitsLabels {
1136
1214
  /** Heading of the group every token stat row is listed under. */
1137
1215
  tokenGroup: string;
1138
- /** Label for the tokens-per-day stat row. */
1216
+ /** Label for the current-UTC-day token row, e.g. "Today". */
1139
1217
  tokensPerDay: string;
1140
- /** Label for the tokens-per-week stat row. */
1218
+ /** Label for the current-UTC-week token row, e.g. "This week". */
1141
1219
  tokensPerWeek: string;
1142
- /** Label for the tokens-per-month stat row. */
1220
+ /** Label for the current-UTC-month token row, e.g. "This month". */
1143
1221
  tokensPerMonth: string;
1144
1222
  /** Note shown instead of a total on a row whose limit follows the cost limit. */
1145
1223
  followsCostLimit: string;
1146
- /** Formats the "$X spent" caption under a row's label. */
1147
- formatSpentCaption: (amount: string) => string;
1148
1224
  /** Formats the combined used/total display value for a capped row. */
1149
1225
  formatValueLabel: (used: string, total: string) => string;
1150
1226
  /** Formats the ARIA label for a capped progress row. */
@@ -1158,6 +1234,8 @@ export declare interface DeploymentLimitsLabels {
1158
1234
  label: string;
1159
1235
  used: string;
1160
1236
  }) => string;
1237
+ /** Formats each period's `resetsAt` into the row's reset line. Omit it to render rows without one. */
1238
+ formatResetTime?: FormatResetTime;
1161
1239
  }
1162
1240
 
1163
1241
  export declare const deriveActionProfile: (variant: DialFileManagerVariant) => DialFileManagerActionProfile;
@@ -1184,7 +1262,7 @@ export declare const deriveAvailableTabIds: <T extends CatalogEntityType>(items:
1184
1262
  export declare const deriveConversationRowActionState: (item: Pick<ConversationListItemDto, "sharedWithMe" | "publishedWithMe" | "isReadonly">, publishHistory: PublishHistoryEntry[] | undefined, recipients: RecipientsCountEntry) => ConversationRowActionState;
1185
1263
 
1186
1264
  /**
1187
- * Returns items marked as a user favorite, in original order.
1265
+ * Returns items marked as a user favorite that are not hidden, in original order.
1188
1266
  */
1189
1267
  export declare const deriveFavoriteItems: (items: readonly CatalogItem[]) => CatalogItem[];
1190
1268
 
@@ -1193,15 +1271,24 @@ export declare const deriveFavoriteItems: (items: readonly CatalogItem[]) => Cat
1193
1271
  * Unsupported constraints remain Custom, with the full source expression.
1194
1272
  * Calendar-month shifts crossing month boundaries or days 29–31 remain
1195
1273
  * Custom because a shifted monthly day is not equivalent around short months.
1274
+ * The one exception is `day: 'last'` one day behind local time, which is
1275
+ * exactly the local 1st.
1196
1276
  */
1197
1277
  export declare const describeScheduledTaskTrigger: (trigger: ScheduleTriggerDto, { timeZone, referenceDate, }?: ScheduledTaskTriggerDescriptionOptions) => ScheduledTaskTriggerDescription;
1198
1278
 
1279
+ /** Source tabs `useDialFileManagerSections` can merge into the All tab, in display order. */
1280
+ export declare const DIAL_FILE_MANAGER_SECTION_TABS: readonly DialFileManagerTabs[];
1281
+
1199
1282
  /** Strip the "files/{bucket}/" prefix from a DIAL Core URL to get the path within the bucket. */
1200
1283
  export declare const dialCorePathToRelative: (dialCorePath: string, bucket: string) => string;
1201
1284
 
1202
- export { DialFileManagerActionProfile }
1203
-
1204
- export { DialFileManagerVariant }
1285
+ /** One source tab rendered as a top-level folder of the All view. */
1286
+ export declare interface DialFileManagerSection {
1287
+ /** Source tab backing this section — `MyFiles`, `Shared` or `Organization`. */
1288
+ tab: DialFileManagerTabs;
1289
+ /** Display name of the section's top-level folder; also the first segment of its virtual paths. An empty, slash-containing or repeated label is replaced by the tab id. */
1290
+ rootLabel: string;
1291
+ }
1205
1292
 
1206
1293
  /**
1207
1294
  * Operation port every file-manager hook that performs network I/O accepts as
@@ -1378,6 +1465,62 @@ export declare const encodeDeploymentId: (id: string) => string;
1378
1465
  */
1379
1466
  export declare const encodeToolsetId: (id: string) => string;
1380
1467
 
1468
+ /**
1469
+ * Overview section titles and spec labels rendered by
1470
+ * `mapEntityDetailsToCatalogDetails`. Hosts pass translated strings; every
1471
+ * field defaults to the English text in {@link DEFAULT_ENTITY_DETAILS_LABELS}.
1472
+ */
1473
+ export declare interface EntityDetailsLabels {
1474
+ /** Default: `'Capabilities'`. */
1475
+ capabilitiesTitle: string;
1476
+ /** Default: `'Specification'`. */
1477
+ specificationTitle: string;
1478
+ /** Default: `'Configuration'`. */
1479
+ configurationTitle: string;
1480
+ /** Default: `'Tools'`. */
1481
+ tools: string;
1482
+ /** Default: `'Parallel tool calls'`. */
1483
+ parallelToolCalls: string;
1484
+ /** Default: `'Reasoning efforts'`. */
1485
+ reasoningEfforts: string;
1486
+ /** Default: `'Skills'`. */
1487
+ skills: string;
1488
+ /** Default: `'Provider'`. */
1489
+ provider: string;
1490
+ /** Default: `'Vendor'`. */
1491
+ vendor: string;
1492
+ /** Default: `'License'`. */
1493
+ license: string;
1494
+ /** Default: `'Knowledge cutoff date'`. */
1495
+ knowledgeCutoffDate: string;
1496
+ /** Default: `'Parameters'`. */
1497
+ parameters: string;
1498
+ /** Default: `'Hosted by'`. */
1499
+ hostedBy: string;
1500
+ /** Default: `'Release date'`. */
1501
+ releaseDate: string;
1502
+ /** Default: `'Context window'`. */
1503
+ contextWindow: string;
1504
+ /** Default: `'Max output tokens'`. */
1505
+ maxOutputTokens: string;
1506
+ /** Default: `'Input modalities'`. */
1507
+ inputModalities: string;
1508
+ /** Default: `'Input attachments'`. */
1509
+ inputAttachments: string;
1510
+ /** Default: `'Routes'`. */
1511
+ routes: string;
1512
+ /** Default: `'Configuration schema'`. */
1513
+ configurationSchema: string;
1514
+ /** Default: `'Authentication'`. */
1515
+ authentication: string;
1516
+ /** Default: `'Authorization endpoint'`. */
1517
+ authorizationEndpoint: string;
1518
+ /** Default: `'Token endpoint'`. */
1519
+ tokenEndpoint: string;
1520
+ /** Default: `'OAuth scopes'`. */
1521
+ oauthScopes: string;
1522
+ }
1523
+
1381
1524
  /** Discriminated-union entity details for a deployment, keyed by catalog entity type. */
1382
1525
  export declare type EntitySpecificDetails = {
1383
1526
  type: 'MODEL';
@@ -1535,7 +1678,9 @@ export declare enum FileManagerNotificationReason {
1535
1678
  /** `onUploadArchive` extracted some entries successfully and some failed; `count`/`names`/`restCount` describe the failures. */
1536
1679
  UploadArchivePartiallyFailed = "uploadArchivePartiallyFailed",
1537
1680
  /** `onUploadArchive`'s `uploadArchive` request itself rejected. */
1538
- UploadArchiveRequestFailed = "uploadArchiveRequestFailed"
1681
+ UploadArchiveRequestFailed = "uploadArchiveRequestFailed",
1682
+ /** A copy/move targeted a destination in a different All-view section from its source items; no request was made. */
1683
+ CrossSectionTransferUnsupported = "crossSectionTransferUnsupported"
1539
1684
  }
1540
1685
 
1541
1686
  /**
@@ -1556,8 +1701,6 @@ export declare type FileNameValidationError = {
1556
1701
  } | {
1557
1702
  reason: FileNameValidationErrorReason.DuplicateName;
1558
1703
  existingName: string;
1559
- } | {
1560
- reason: FileNameValidationErrorReason.LeadingDot;
1561
1704
  };
1562
1705
 
1563
1706
  /**
@@ -1570,8 +1713,7 @@ export declare enum FileNameValidationErrorReason {
1570
1713
  ForbiddenSymbols = "forbiddenSymbols",
1571
1714
  ReservedName = "reservedName",
1572
1715
  TooLong = "tooLong",
1573
- DuplicateName = "duplicateName",
1574
- LeadingDot = "leadingDot"
1716
+ DuplicateName = "duplicateName"
1575
1717
  }
1576
1718
 
1577
1719
  /**
@@ -1588,7 +1730,10 @@ export declare enum FileOperationKind {
1588
1730
  FileCopied = "fileCopied",
1589
1731
  FilesCopied = "filesCopied",
1590
1732
  FileMoved = "fileMoved",
1591
- FilesMoved = "filesMoved"
1733
+ FilesMoved = "filesMoved",
1734
+ /** A copy whose every item landed in its own source folder (Duplicate). */
1735
+ FileDuplicated = "fileDuplicated",
1736
+ FilesDuplicated = "filesDuplicated"
1592
1737
  }
1593
1738
 
1594
1739
  /**
@@ -1603,13 +1748,15 @@ export declare interface FileOperationSuccessEvent {
1603
1748
  name?: string;
1604
1749
  /** Number of items the operation covered, when applicable. */
1605
1750
  count?: number;
1606
- /** Destination folder name, for copy/move operations. */
1751
+ /**
1752
+ * Destination folder as a slash-joined virtual path starting at the root
1753
+ * label (e.g. `My files/reports`), for copy/move/duplicate operations.
1754
+ */
1607
1755
  destinationFolderName?: string;
1608
1756
  /**
1609
- * Whether the affected item is a folder rather than a file. Only set for
1610
- * `fileRenamed`, since it is the only kind whose current wording depends
1611
- * on the item's node type (a rename toast reads "Folder renamed" vs.
1612
- * "File renamed").
1757
+ * Whether the affected item is a folder rather than a file. Set for rename,
1758
+ * copy, move, and duplicate events; on a multi-item event it describes the
1759
+ * first successfully affected item (the one `name` refers to).
1613
1760
  */
1614
1761
  isFolder?: boolean;
1615
1762
  }
@@ -1644,8 +1791,6 @@ export declare interface FilesApiClient {
1644
1791
  listSharedByMe: (bucket: string) => Promise<ListFilesResponseDto>;
1645
1792
  }
1646
1793
 
1647
- export { FileUploadValidationResult }
1648
-
1649
1794
  /**
1650
1795
  * Filters catalog items to those whose type is in `visibleTypes`.
1651
1796
  * Call only when selector mode is active; otherwise pass through the original array.
@@ -1667,6 +1812,12 @@ export declare const filterHiddenOwnedItems: (items: readonly CatalogItem[], hid
1667
1812
  */
1668
1813
  export declare const findDeploymentByIdOrReference: (deployments: DeploymentItemDto[], idOrReference: string | null | undefined) => DeploymentItemDto | undefined;
1669
1814
 
1815
+ /**
1816
+ * Returns the deployment a conversation belongs to, resolved from its id
1817
+ * alone, or `undefined` when no candidate matches `deployments`.
1818
+ */
1819
+ export declare const findDeploymentForConversationId: (deployments: DeploymentItemDto[], conversationId: string) => DeploymentItemDto | undefined;
1820
+
1670
1821
  export declare const findDialFileByPath: (nodes: DialFile[], targetPath: string) => DialFile | undefined;
1671
1822
 
1672
1823
  export declare const findFirstSuccessfulCopyMoveItem: <TDto extends {
@@ -1721,7 +1872,13 @@ export declare class GenerationConflictError extends Error {
1721
1872
  constructor(message?: string);
1722
1873
  }
1723
1874
 
1724
- /** Normalizes any API error into a `{ status?, message, traceId? }` shape. */
1875
+ /** Identifies a failed terminal save independently of the model's generation outcome. */
1876
+ export declare class GenerationPersistenceError extends Error {
1877
+ static readonly type = "conversation_save_failed";
1878
+ constructor();
1879
+ }
1880
+
1881
+ /** Normalizes any API error into a `{ status?, message, traceId?, code?, upstreamCode?, upstreamMessage? }` shape. */
1725
1882
  export declare const getApiErrorDetails: (error: unknown) => Promise<ApiErrorDetails>;
1726
1883
 
1727
1884
  /** Resolves a human-readable message from an API error's response body, or falls back to `Error.message`. */
@@ -1756,6 +1913,21 @@ export declare const getConversationSource: (item: Pick<ConversationListItemDto,
1756
1913
  */
1757
1914
  export declare const getExternalServiceFallbackName: (serviceName: string) => string;
1758
1915
 
1916
+ /**
1917
+ * Returns the tool values the conversation's last message sets through its
1918
+ * `form_schema`, restricted to `toolIds`, plus a key identifying that exact
1919
+ * application. `undefined` when the last message is not an assistant message
1920
+ * or sets no known tool.
1921
+ *
1922
+ * Streamed chunks and reloads re-create an identical `form_schema`; comparing
1923
+ * keys rather than object identity applies an app's value once and leaves a
1924
+ * later user toggle alone until the app sends a different value.
1925
+ */
1926
+ export declare const getFormSchemaToolSyncKey: (conversationId: string, messages: Message[], toolIds: readonly string[]) => {
1927
+ key: string;
1928
+ values: Record<string, boolean>;
1929
+ } | undefined;
1930
+
1759
1931
  /**
1760
1932
  * Returns the deployment the conversation was last running on: scanning
1761
1933
  * backwards, the `new_deployment_id` of a `model_changed` status message or
@@ -1766,7 +1938,7 @@ export declare const getExternalServiceFallbackName: (serviceName: string) => st
1766
1938
  * an edit truncates past one: the marker is appended at the end of the
1767
1939
  * timeline, so truncating at an earlier message drops it, and the model the
1768
1940
  * user picked reverted on the next page load even though the answer had been
1769
- * regenerated on it (issue #8712). The assistant message the backend writes
1941
+ * regenerated on it ([#8712](https://github.com/epam/ai-dial-chat/issues/8712)). The assistant message the backend writes
1770
1942
  * carries the deployment that produced it, which survives that truncation
1771
1943
  * because it *is* the regenerated message.
1772
1944
  */
@@ -1779,6 +1951,21 @@ export declare const getLastDeploymentId: (messages: Message[]) => string | null
1779
1951
  */
1780
1952
  export declare const getLastUserMessageToolConfiguration: (messages: Message[]) => Record<string, unknown> | undefined;
1781
1953
 
1954
+ /**
1955
+ * Returns the tool configuration a (re-)loaded conversation should show: the
1956
+ * last user message's `configuration_value`, overlaid in order by the
1957
+ * `form_schema` values of the assistant messages after it. An app that turned
1958
+ * a toggle off in its final response must not see it re-armed on reload just
1959
+ * because the user message that started the run had it on.
1960
+ */
1961
+ export declare const getLatestToolConfiguration: (messages: Message[]) => Record<string, unknown> | undefined;
1962
+
1963
+ /**
1964
+ * Returns every deployment id a conversation id may belong to, longest first,
1965
+ * or an empty array when the format is unrecognised.
1966
+ */
1967
+ export declare const getModelIdCandidatesFromConversationId: (id: string) => string[];
1968
+
1782
1969
  /**
1783
1970
  * Extracts the deployment/model ID from a DIAL Core conversation ID.
1784
1971
  *
@@ -1806,8 +1993,6 @@ export declare const getLastUserMessageToolConfiguration: (messages: Message[])
1806
1993
  */
1807
1994
  export declare const getModelIdFromConversationId: (id: string) => string | undefined;
1808
1995
 
1809
- export { getParentFolderPath }
1810
-
1811
1996
  /**
1812
1997
  * The publish folder a public catalog entity id sits in: the segments between
1813
1998
  * the `public` bucket and the entity name, decoded to the plain text the
@@ -1826,6 +2011,12 @@ export declare const getQuickAppConversationStarters: (conversationStarters: unk
1826
2011
  */
1827
2012
  export declare const getRemainingCharacters: (value: string, maxLength: number) => number | null;
1828
2013
 
2014
+ /** Returns the schemas that create schema-based apps: unique by id, without id-less entries or the custom-app schema. */
2015
+ export declare const getRunnerSchemas: <T extends QuickAppSchemaLike>(schemas: T[]) => RunnerSchema<T>[];
2016
+
2017
+ /** Returns the limit each over-long skill field exceeds, keyed by field; fields within their limit are omitted. */
2018
+ export declare const getSkillFieldLengthViolations: (values: Record<SkillTextField, string>) => Partial<Record<SkillTextField, number>>;
2019
+
1829
2020
  /**
1830
2021
  * Returns the text to start/populate a conversation from a selected starter button.
1831
2022
  * `description` (the schema property's shared intro/question text) is used only
@@ -1879,6 +2070,15 @@ export declare const getStarterSubmitText: (starter: StarterOption, description?
1879
2070
  */
1880
2071
  export declare const getTimeOfDayGreeting: (hour: number, translations: GreetingTranslations, firstName?: string) => string;
1881
2072
 
2073
+ /**
2074
+ * Returns the boolean values an assistant message's `form_schema` sets, keyed
2075
+ * by property name, or `undefined` when no property resolves to a boolean.
2076
+ * Lets a DIAL app switch a tools-menu toggle (e.g. `deep_research`) per
2077
+ * message — on while a run is in progress, off once its result is delivered.
2078
+ * Not filtered by tool id: `restoreToolConfiguration` ignores unknown ids.
2079
+ */
2080
+ export declare const getToolConfigurationFromFormSchema: (formSchema: DeploymentConfigurationSchema | undefined) => Record<string, boolean> | undefined;
2081
+
1882
2082
  /** Name of the same-origin `BroadcastChannel` shared by an OAuth flow's opener and its callback popup. */
1883
2083
  export declare const getToolsetOAuthChannelName: (flowId: string) => string;
1884
2084
 
@@ -1955,6 +2155,9 @@ export declare const hasDialFileWritePermission: (folder?: DialFile) => boolean;
1955
2155
 
1956
2156
  export declare const hasForbiddenNameSymbols: (name: string, forbiddenSymbolsRegExp?: RegExp) => boolean;
1957
2157
 
2158
+ /** Returns `true` when both sets contain exactly the same paths. */
2159
+ export declare const hasSamePaths: (a: ReadonlySet<string>, b: ReadonlySet<string>) => boolean;
2160
+
1958
2161
  /**
1959
2162
  * Whether the operator configured the structured banner (title and/or
1960
2163
  * description) rather than only the legacy HTML message. Drives which of the
@@ -1966,10 +2169,16 @@ export declare const hasStructuredAnnouncement: ({ title, description, }: Announ
1966
2169
  declare interface HtmlCanvasContent {
1967
2170
  /** Discriminates the content type to select the correct renderer. */
1968
2171
  type: AttachmentContentType.Html;
1969
- /** Full HTML text rendered via `srcdoc` in a sandboxed iframe. Used for file attachments. */
2172
+ /** Full HTML text rendered via `srcdoc` in a sandboxed iframe. Populated only when no `url` is available (local, non-downloadable file attachments); when `url` is set, "View source" instead calls `resolveSourceText`. */
1970
2173
  srcdoc?: string;
1971
- /** External URL rendered via `src` in a sandboxed iframe. Used for external link sources. */
2174
+ /** URL rendered via `src` in a sandboxed iframe when `srcdoc` is absent, or in preference to `srcdoc` when `isSameOriginUrl` is set. Also used as the download-button/"Open in new tab" target. */
1972
2175
  url?: string;
2176
+ /** True when `url`'s origin matches the embedding document's own origin. Forces the iframe sandbox to omit `allow-same-origin` — granting it would let a same-origin framed document reach this page's own cookies/storage — and makes `src` take precedence over `srcdoc`; also skips the `contentDocument` block-detection check, since the iframe is intentionally opaque-origin either way. */
2177
+ isSameOriginUrl?: boolean;
2178
+ /** Lazily fetches the full HTML source text for the "View source" toggle. Used instead of an eagerly-populated `srcdoc` when `url` is set; absent when `srcdoc` is already populated. */
2179
+ resolveSourceText?: () => Promise<string>;
2180
+ /** Host-served bootstrap document used to render `srcdoc` without inheriting the embedding page's CSP. When set alongside `srcdoc`, the iframe loads this URL via `src` (still `sandbox="allow-scripts"`) and posts `{ type: HTML_PREVIEW_FRAME_RENDER_MESSAGE, html: srcdoc }` to it once loaded, so the HTML renders under that response's own policy. Ignored when `srcdoc` is absent or `isSameOriginUrl` selects `url`. */
2181
+ srcdocHostUrl?: string;
1973
2182
  }
1974
2183
 
1975
2184
  /** Content payload for image attachments. */
@@ -2003,11 +2212,12 @@ export declare const initiateOAuthLogin: (auth: ToolsetOAuthSettings, toolsetId:
2003
2212
  export declare const isAnswerIncomplete: (answer: Message | undefined) => boolean;
2004
2213
 
2005
2214
  /**
2006
- * True when the conversation's last message is an unresolved assistant
2007
- * placeholder: the backend only persists a conversation at generation start
2008
- * (empty placeholder) and at generation end (final content, or a partial
2009
- * flagged `streamErrorMessage`/`wasStoppedByUser`), so this shape means a
2010
- * generation was still active elsewhere when the conversation was loaded.
2215
+ * True when the conversation has a pending background message, or its last
2216
+ * message is an unresolved assistant placeholder: the backend only persists a
2217
+ * conversation at generation start (empty placeholder) and at generation end
2218
+ * (final content, or a partial flagged `streamErrorMessage`/`wasStoppedByUser`).
2219
+ * This can mean generation is still active elsewhere, or that its terminal save
2220
+ * failed.
2011
2221
  */
2012
2222
  export declare const isAwaitingGenerationResume: (conversation: Conversation) => boolean;
2013
2223
 
@@ -2083,6 +2293,9 @@ export declare const isQuickAppSchema: (schema?: QuickAppSchemaLike) => boolean;
2083
2293
  /** Share/Unshare/Remove access are Full-only — Browse and Attach never expose them. */
2084
2294
  export declare const isShareActionsAllowed: (actionProfile: DialFileManagerActionProfile) => boolean;
2085
2295
 
2296
+ /** Whether a skill-relative path is a folder marker (`<folder>/.dial_folder`, never a root-level `.dial_folder`). */
2297
+ export declare const isSkillFolderMarkerPath: (path: string) => boolean;
2298
+
2086
2299
  /** True when `value` is a well-formed absolute `http(s)://` URL. */
2087
2300
  export declare const isValidAbsoluteUrl: (value: string) => boolean;
2088
2301
 
@@ -2093,7 +2306,10 @@ export declare const isValidFeaturesData: (value: string) => boolean;
2093
2306
  * Client-side mirror of the backend's `isValidSkillRelativePath`
2094
2307
  * (`apps/chat-api/src/skills/utils/skill-path.util.ts`), used only for
2095
2308
  * immediate inline feedback — the server remains authoritative and may still
2096
- * reject a path this function accepts.
2309
+ * reject a path this function accepts. It additionally reserves the
2310
+ * `.dial_folder` marker name so a user can never upload or name a folder
2311
+ * after it; the save payload's generated markers never pass through here
2312
+ * (the server accepts them only as a zero-byte final segment).
2097
2313
  */
2098
2314
  export declare const isValidSkillRelativePath: (relativePath: string) => boolean;
2099
2315
 
@@ -2142,8 +2358,8 @@ export declare const mapDeploymentDetailsDtoToEntityDetails: (dto: DeploymentDet
2142
2358
  /** Maps a deployment limits DTO to display-ready catalog limits, or `undefined` when no qualifying stats exist. */
2143
2359
  export declare const mapDeploymentLimitsDtoToCatalogLimits: (dto: DeploymentLimitsResponseDto | undefined, labels: DeploymentLimitsLabels) => CatalogItemLimits | undefined;
2144
2360
 
2145
- /** Maps the monthly deployment token limit to a display-ready value. */
2146
- export declare const mapDeploymentLimitsToInput: (dto: DeploymentLimitsResponseDto | undefined) => MonthlyUsageLimit | undefined;
2361
+ /** Maps a deployment's day, week, and month token limits and the caller's cost budget to display-ready rows, or `undefined` when none qualify. */
2362
+ export declare const mapDeploymentLimitsToInput: (dto: DeploymentLimitsResponseDto | undefined, labels: ConversationInputLimitsLabels, formatResetTime?: FormatResetTime) => CatalogItemLimits | undefined;
2147
2363
 
2148
2364
  /** Maps a deployment listing row into the catalog UI's `CatalogItem` shape. */
2149
2365
  export declare const mapDeploymentToCatalogItem: (deployment: DeploymentItemDto, { favoriteIds, entityDetails, folderLabels, editableSchemaIds, isCustomAppsEditable, activeLocale, primaryLocale, resolveIconUrl, }: MapDeploymentToCatalogItemOptions) => CatalogItem;
@@ -2185,10 +2401,11 @@ export declare const mapDeploymentToolsetCredentials: (toolsetId: string, authSe
2185
2401
 
2186
2402
  /**
2187
2403
  * Converts a strongly-typed entity domain model into the lib's `CatalogItemTabData` shape.
2188
- * Every label is a fixed English string — the app's i18n keys for these labels are dropped
2189
- * on the move, since the lib cannot import the app's translation-key enum.
2404
+ * Section titles and spec labels come from `labels`, merged over
2405
+ * {@link DEFAULT_ENTITY_DETAILS_LABELS} — the lib cannot import a host's
2406
+ * translation keys, so the host passes its translated strings in.
2190
2407
  */
2191
- export declare const mapEntityDetailsToCatalogDetails: (details: EntitySpecificDetails) => CatalogItemTabData;
2408
+ export declare const mapEntityDetailsToCatalogDetails: (details: EntitySpecificDetails, labels?: Partial<EntityDetailsLabels>) => CatalogItemTabData;
2192
2409
 
2193
2410
  /**
2194
2411
  * Overlays a `FileMetadataResponseDto` response onto the clicked grid row so
@@ -2209,9 +2426,8 @@ export declare const mapFileMetadataToDialFile: (metadata: FileMetadataResponseD
2209
2426
  export declare const mapFormValuesToCreateBody: (values: ScheduledTaskCreateFormValues) => CreateScheduledTaskBodyDto;
2210
2427
 
2211
2428
  /**
2212
- * Maps validated edit-form values to the `PUT /api/v1/scheduled-tasks/:scheduleId`
2213
- * request body. `UpdateScheduledTaskBodyDto` has the same shape as
2214
- * `CreateScheduledTaskBodyDto`, so this reuses the same trigger-building logic.
2429
+ * Maps a complete, validated edit draft to an update body. An unset skill
2430
+ * emits null to remove the saved reference; hydrate from detail before editing.
2215
2431
  */
2216
2432
  export declare const mapFormValuesToUpdateBody: (values: ScheduledTaskCreateFormValues) => UpdateScheduledTaskBodyDto;
2217
2433
 
@@ -2281,9 +2497,12 @@ export declare interface MapSkillToCatalogItemOptions {
2281
2497
  }
2282
2498
 
2283
2499
  /**
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.
2500
+ * Returns the normalized stages of a complete raw stage array or a
2501
+ * message-like payload (reading `custom_content.stages`, falling back to
2502
+ * `customContent.stages`), or `undefined` when there are none. An entry
2503
+ * without an `index` takes its array position — the identity a complete
2504
+ * non-streaming array's `parent_stage_index` refers to — while explicit
2505
+ * (possibly sparse) indexes are kept. Not for partial stream deltas.
2287
2506
  */
2288
2507
  export declare const mapStages: (source: RawStage[] | RawStageSource | null | undefined) => Stage[] | undefined;
2289
2508
 
@@ -2320,9 +2539,10 @@ export declare interface MapToolsetToCatalogItemOptions {
2320
2539
  export declare const mapUsageDataToDashboard: (usage: UserLimitStatsResponseDto | undefined, t: Translate, formatResetTime: FormatResetTime) => UsageLimitCardData[];
2321
2540
 
2322
2541
  /**
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.
2542
+ * Maps `usage.deployments` into `ModelLimitsSection`'s `rows` prop, joined with model or application
2543
+ * identity from `deploymentItems`. Rows are included only when any displayed period stat has nonzero
2544
+ * usage (Cost stats only, for an application). Order follows `Object.keys(deployments)` —
2545
+ * `deploymentItems` is enrichment-only.
2326
2546
  *
2327
2547
  * @param resolveIconUrl - Resolves a deployment's raw `iconUrl` to the URL the avatar should load.
2328
2548
  * @param resolveDisplayName - Resolves a localized-text map or plain string to the display name for `activeLocale`.
@@ -2489,6 +2709,15 @@ export declare enum McpResourceKind {
2489
2709
 
2490
2710
  export declare const mergeCreatedFolderIntoCache: (cache: Map<string, ListFilesItemDto[]>, parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => Map<string, ListFilesItemDto[]>;
2491
2711
 
2712
+ /**
2713
+ * Merges a freshly-fetched page 0 into the currently-loaded run list: an
2714
+ * already-known id is replaced in place at its existing array position, an
2715
+ * unseen id is prepended (upstream order is `created_at desc`, so it is the
2716
+ * newest), and an id absent from `incoming` is left untouched — a background
2717
+ * refresh never removes a loaded run.
2718
+ */
2719
+ export declare const mergeRunsById: (current: ScheduledTaskRunDto[], incoming: ScheduledTaskRunDto[]) => ScheduledTaskRunDto[];
2720
+
2492
2721
  /**
2493
2722
  * Merges incoming stage deltas into an existing stage list, keyed by `index`.
2494
2723
  *
@@ -2514,6 +2743,20 @@ export declare interface MessagePair {
2514
2743
  assistantMessage: Message;
2515
2744
  }
2516
2745
 
2746
+ /** A stable snapshot of one eligible native text selection. */
2747
+ export declare interface MessageSelectionReplySnapshot {
2748
+ /** Scope that owned the selection when it was captured. */
2749
+ conversationId: string;
2750
+ /** Message text root containing the captured range. */
2751
+ body: HTMLDivElement;
2752
+ /** Captured native range. */
2753
+ range: Range;
2754
+ /** Native selected text preserved for the generated file. */
2755
+ text: string;
2756
+ /** Visible fragment of the selected range. */
2757
+ rect: DOMRect;
2758
+ }
2759
+
2517
2760
  /** Formats MIME types as a human-readable, comma-separated list of dotted extensions (or the MIME type itself for wildcards). */
2518
2761
  export declare const mimeTypesToAttachmentExtensionLabels: (types: string[]) => string;
2519
2762
 
@@ -2552,6 +2795,7 @@ export declare interface ModelCapabilities {
2552
2795
  hasResume?: boolean;
2553
2796
  hasChatCompletion?: boolean;
2554
2797
  hasResponsesApi?: boolean;
2798
+ hasSkills?: boolean;
2555
2799
  reasoningEfforts?: string[];
2556
2800
  }
2557
2801
 
@@ -2575,6 +2819,8 @@ export declare interface ModelPriceRow {
2575
2819
  export declare interface ModelPricing {
2576
2820
  /** Every price DIAL Core reports for the deployment, `unit` excluded. */
2577
2821
  prices?: ModelPriceRow[];
2822
+ /** DIAL Core billing unit the prices are quoted in, e.g. `token` or `char_without_whitespace`; absent means tokens. */
2823
+ unit?: string;
2578
2824
  }
2579
2825
 
2580
2826
  /** Catalog-facing specification fields for a model deployment. */
@@ -2591,18 +2837,6 @@ export declare interface ModelSpecification {
2591
2837
  createdAt?: number;
2592
2838
  }
2593
2839
 
2594
- /** Normalized monthly token usage consumed by the conversation input control. */
2595
- export declare interface MonthlyUsageLimit {
2596
- /** Normalized used-token count. */
2597
- used: number;
2598
- /** Configured monthly token limit. */
2599
- total: number;
2600
- /** Remaining monthly tokens, clamped to zero. */
2601
- remaining: number;
2602
- /** Monthly utilization percentage, clamped to 0–100. */
2603
- usedPercent: number;
2604
- }
2605
-
2606
2840
  /** Returns a skill relative path's final segment (its display name in the file tree). */
2607
2841
  export declare const nameFromPath: (path: string) => string;
2608
2842
 
@@ -2614,6 +2848,20 @@ export declare const nameFromPath: (path: string) => string;
2614
2848
  */
2615
2849
  export declare const navigateToolsetOAuthPopup: (popup: Window, auth: ToolsetOAuthSettings, toolsetId: string, callbackPath: string, credentialsLevel?: ToolsetCredentialsLevel, resourceKind?: OAuthResourceKind, offlineUsageConsent?: boolean) => ToolsetOAuthInitiationResult;
2616
2850
 
2851
+ /**
2852
+ * Encodes a deployment/application id to its single-encoded form regardless
2853
+ * of whether the value it received was already percent-encoded or the raw,
2854
+ * human-readable form — decoding first then re-encoding once is idempotent
2855
+ * either way, since `decodeDeploymentId` on a raw (unencoded) id is a no-op.
2856
+ * Use this instead of `encodeDeploymentId` at a boundary that cannot
2857
+ * guarantee which form it receives, such as a `postMessage` payload from the
2858
+ * settings iframe: calling `encodeDeploymentId` directly on a value the
2859
+ * sender already encoded escapes the existing `%` characters a second time
2860
+ * (`%20` becomes `%2520`), which the backend only ever undoes once and so
2861
+ * 404s on.
2862
+ */
2863
+ export declare const normalizeDeploymentId: (id: string) => string;
2864
+
2617
2865
  /**
2618
2866
  * Normalises a stored response-format string to the current enum. Legacy data
2619
2867
  * may contain `'Markdown'` or `'PlainText'` (capital-first) instead of the
@@ -2629,6 +2877,19 @@ export declare const normalizeResponseFormat: (value: string | undefined) => Res
2629
2877
  */
2630
2878
  export declare const normalizeSkillName: (input: string) => string;
2631
2879
 
2880
+ /**
2881
+ * Encodes a toolset id to its single-encoded form regardless of whether the
2882
+ * value received it in was already percent-encoded or the raw,
2883
+ * human-readable form — decoding first then re-encoding once is idempotent
2884
+ * either way, since `decodeToolsetId` on a raw (unencoded) id is a no-op.
2885
+ * Use this instead of `encodeToolsetId` at a boundary that cannot guarantee
2886
+ * which form it receives, such as a `postMessage` payload from an embedded
2887
+ * iframe: calling `encodeToolsetId` directly on a value the sender already
2888
+ * encoded escapes the existing `%` characters a second time (`%20` becomes
2889
+ * `%2520`), which the backend only ever undoes once and so 404s on.
2890
+ */
2891
+ export declare const normalizeToolsetId: (toolsetId: string) => string;
2892
+
2632
2893
  export declare const normalizeVirtualPath: (value: string) => string;
2633
2894
 
2634
2895
  /** Arguments handed to the host's exchange callback. */
@@ -2694,7 +2955,7 @@ declare interface OoxmlDocxHighlightLocation {
2694
2955
  path: number[];
2695
2956
  /** Inclusive start character offset within the story's matched text. */
2696
2957
  start: number;
2697
- /** Exclusive end character offset, already converted from the wire's inclusive `end`. */
2958
+ /** Exclusive end character offset — the wire's `end`, already exclusive, copied through unchanged. */
2698
2959
  endExclusive: number;
2699
2960
  /** The cited text, compared against the text resolved over `[start, endExclusive)`. */
2700
2961
  text: string;
@@ -2758,7 +3019,7 @@ declare interface OoxmlPptxHighlightLocation {
2758
3019
  shapeId: string;
2759
3020
  /** Inclusive start character offset within the shape's matched text. */
2760
3021
  start: number;
2761
- /** Exclusive end character offset, already converted from the wire's inclusive `end`. */
3022
+ /** Exclusive end character offset — the wire's `end`, already exclusive, copied through unchanged. */
2762
3023
  endExclusive: number;
2763
3024
  /** The cited text, compared against the text resolved over `[start, endExclusive)`. */
2764
3025
  text: string;
@@ -2938,7 +3199,7 @@ export declare interface PreparedCopyMoveItem<TDto> {
2938
3199
  export declare const prepareDownloadDestination: (filename: string, mimeType?: string) => Promise<DownloadDestination>;
2939
3200
 
2940
3201
  /**
2941
- * Rename-vs-move disambiguation (design.md D3): entries whose parent folder
3202
+ * Rename-vs-move disambiguation (`openspec/changes/archive/2026-07-21-split-use-dial-file-manager/design.md` D3): entries whose parent folder
2942
3203
  * is unchanged become `renameDtos`; entries whose parent folder changed
2943
3204
  * become `preparedMoveItems`.
2944
3205
  */
@@ -3007,7 +3268,11 @@ export declare enum PromptSource {
3007
3268
  Public = "public"
3008
3269
  }
3009
3270
 
3010
- /** DIAL Core bucket holding organisation-wide skills. */
3271
+ /**
3272
+ * DIAL Core bucket holding organisation-wide skills.
3273
+ *
3274
+ * @deprecated Use `PUBLIC_BUCKET` from `@epam/ai-dial-chat-shared`.
3275
+ */
3011
3276
  export declare const PUBLIC_SKILL_BUCKET = "public";
3012
3277
 
3013
3278
  /** The DIAL publish API surface produced by {@link createPublishApiClient}. */
@@ -3058,6 +3323,11 @@ export declare interface RawStage {
3058
3323
  tag?: string | null;
3059
3324
  /** Files produced or referenced by this stage. */
3060
3325
  attachments?: RawStageAttachment[] | null;
3326
+ /**
3327
+ * `index` of the parent stage (its array position in a complete unindexed
3328
+ * array). Nullish means top level; `0` is a valid parent.
3329
+ */
3330
+ parent_stage_index?: number | null;
3061
3331
  }
3062
3332
 
3063
3333
  /**
@@ -3258,9 +3528,18 @@ export declare const resolveGroupedVisualizerCanvasContent: (attachments: Displa
3258
3528
 
3259
3529
  /**
3260
3530
  * Resolves an HTML canvas content payload from a DisplayAttachment.
3261
- * Fetches and inlines the HTML as `srcdoc` when the attachment has a download URL or inline data.
3262
- * Returns `null` if no source is available, or an `ErrorCanvasContent` on fetch failure.
3263
- * Rejects `srcdoc` payloads larger than 1 MiB to prevent browser truncation.
3531
+ * When the attachment has a download URL, that URL is the primary render
3532
+ * target so the preview loads via `src` and gets its own response-level CSP
3533
+ * instead of inheriting the host document's — no HTML text is fetched up
3534
+ * front; `resolveSourceText` fetches it lazily, only when the "View source"
3535
+ * toggle is used, and rejects if that fetch fails. `isSameOriginUrl` reflects
3536
+ * a real comparison against the embedding document's own origin.
3537
+ * With no download URL (local file or inline data), falls back to `srcdoc`,
3538
+ * rejecting payloads larger than 1 MiB to prevent browser truncation, and
3539
+ * forwards `resolvers.htmlSrcdocHostUrl` so that HTML can still render under
3540
+ * its own response-level CSP.
3541
+ * Returns `null` if no source is available, or an `ErrorCanvasContent` when
3542
+ * that fallback fetch fails.
3264
3543
  */
3265
3544
  export declare const resolveHtmlCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<HtmlCanvasContent | ErrorCanvasContent | null>;
3266
3545
 
@@ -3320,6 +3599,9 @@ export declare const resolvePdfCanvasContent: (attachment: DisplayAttachment, re
3320
3599
  */
3321
3600
  export declare const resolveRelativeDialFilePath: (pathOrFileId: string, bucket: string) => string;
3322
3601
 
3602
+ /** Returns the section whose root label is the first segment of `virtualPath`, or `undefined` when none matches. */
3603
+ export declare const resolveSectionByPath: <TSection extends DialFileManagerSection>(virtualPath: string, sections: readonly TSection[]) => TSection | undefined;
3604
+
3323
3605
  /**
3324
3606
  * Converts an opaque file-listing id into the path expected by the single-file
3325
3607
  * download endpoint. Core may prefix listing paths with the skill path and its
@@ -3339,6 +3621,16 @@ export declare const resolveSkillManifestFileId: (files: SkillMetadataItemDto[],
3339
3621
  /** Resolves a plain-text canvas content payload from a DisplayAttachment, or `null` if unavailable. */
3340
3622
  export declare const resolveTextCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<PlainTextCanvasContent | ErrorCanvasContent | null>;
3341
3623
 
3624
+ /**
3625
+ * Resolves which credentials level a toolset's login applies to, per DIAL
3626
+ * Core's public/private toolset convention: a `public`-bucket toolset is
3627
+ * shared credentials-wise at `User` level, while a private/workspace toolset
3628
+ * is scoped at `Global` level. Every surface that drives a toolset login
3629
+ * (the sign-in-interrupt dialog, the QuickApps editor iframe bridge,
3630
+ * `useToolsetLogin`) must resolve the level this way rather than assuming one.
3631
+ */
3632
+ export declare const resolveToolsetCredentialsLevel: (toolsetId: string) => ToolsetCredentialsLevel.User | ToolsetCredentialsLevel.Global;
3633
+
3342
3634
  /**
3343
3635
  * Fetches the attachment payload and builds a `VisualizerCanvasContent` for the
3344
3636
  * given registry entry and theme. Returns `null` when the payload cannot be
@@ -3351,6 +3643,11 @@ export declare const resolveTextCanvasContent: (attachment: DisplayAttachment, r
3351
3643
  */
3352
3644
  export declare const resolveVisualizerCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, entry: CustomVisualizer, themeId: string) => Promise<VisualizerCanvasContent | null>;
3353
3645
 
3646
+ /** An application schema with a resolved id, as returned by {@link getRunnerSchemas}. */
3647
+ export declare type RunnerSchema<T extends QuickAppSchemaLike> = T & {
3648
+ id: string;
3649
+ };
3650
+
3354
3651
  /** Decodes a URI-encoded path segment, returning the original string if decoding fails. */
3355
3652
  export declare const safeDecodeURI: (path: string) => string;
3356
3653
 
@@ -3426,6 +3723,7 @@ export declare interface ScheduledTasksConfiguredClient {
3426
3723
  offset?: number;
3427
3724
  search?: string;
3428
3725
  sort?: ListScheduledTasksSortEnum;
3726
+ model?: string;
3429
3727
  }, options?: RequestInit) => Promise<ListScheduledTasksResponseDto>;
3430
3728
  listScheduledTaskRuns: (request: {
3431
3729
  scheduleId: string;
@@ -3459,6 +3757,8 @@ export declare interface ScheduledTasksListRequest {
3459
3757
  offset?: number;
3460
3758
  search?: string;
3461
3759
  sort?: ListScheduledTasksSortEnum;
3760
+ /** Only tasks that run against this model/application id, exactly as stored. */
3761
+ model?: string;
3462
3762
  signal?: AbortSignal;
3463
3763
  }
3464
3764
 
@@ -3492,6 +3792,14 @@ export declare interface ScheduledTaskTriggerDescriptionOptions {
3492
3792
  referenceDate?: Date;
3493
3793
  }
3494
3794
 
3795
+ /**
3796
+ * Picks the auth-status field matching one credentials level out of a
3797
+ * toolset's `authSettings` — DIAL Core reports `userLevelAuthStatus` and
3798
+ * `globalAuthStatus` as independent fields rather than one status keyed by
3799
+ * level.
3800
+ */
3801
+ export declare const selectToolsetAuthStatus: (authSettings: Pick<DialToolsetAuthSettingsDto, "userLevelAuthStatus" | "globalAuthStatus"> | undefined, credentialsLevel: ToolsetCredentialsLevel) => string | undefined;
3802
+
3495
3803
  /** Serializes a prompt export envelope into a pretty-printed JSON blob. */
3496
3804
  export declare const serializePromptExport: (envelope: PromptExportFormat) => Blob;
3497
3805
 
@@ -3525,6 +3833,13 @@ export declare const shouldWatchForDisplayNameUpdate: (conversation: Conversatio
3525
3833
  */
3526
3834
  export declare const SKILL_FILE_UPLOAD_MAX_BYTES = 1048576;
3527
3835
 
3836
+ /**
3837
+ * Zero-byte object written at `<folder>/.dial_folder` so an otherwise empty
3838
+ * skill folder survives a save — DIAL Core storage has no directory objects,
3839
+ * so a folder only exists as a file's path prefix.
3840
+ */
3841
+ export declare const SKILL_FOLDER_MARKER = ".dial_folder";
3842
+
3528
3843
  /**
3529
3844
  * Upper bound on `nextToken` follow-ups per listing, so a pathological bucket
3530
3845
  * cannot spin the client forever.
@@ -3543,6 +3858,9 @@ export declare const SKILL_MANIFEST_FILE = "SKILL.md";
3543
3858
  */
3544
3859
  export declare const SKILL_MANIFEST_MAX_BYTES: number;
3545
3860
 
3861
+ /** Length limit of each skill editor text field. */
3862
+ export declare const SKILL_TEXT_FIELD_MAX_LENGTHS: Record<SkillTextField, number>;
3863
+
3546
3864
  /**
3547
3865
  * Client-side mirror of the backend's default `SKILL_UPLOAD_MAX_FILES`
3548
3866
  * (`apps/chat-api/src/config/environment.config.ts`), used only for
@@ -3651,6 +3969,8 @@ export declare interface SkillEditorSubmitClient {
3651
3969
  export declare interface SkillEditorSubmitMessages {
3652
3970
  /** Shown when a required field is empty. */
3653
3971
  required: string;
3972
+ /** Shown when a name, description or instructions value exceeds its length limit, given that limit. */
3973
+ tooLong: (maxLength: number) => string;
3654
3974
  /**
3655
3975
  * Shown when the Instructions value opens with its own YAML frontmatter
3656
3976
  * block — pasting a whole `SKILL.md` in there would otherwise produce a
@@ -3791,6 +4111,9 @@ export declare interface SkillFilesPayload {
3791
4111
  */
3792
4112
  export declare const skillFileToAttachment: (node: SkillFileTreeNode, content: SkillFileContent) => Attachment;
3793
4113
 
4114
+ /** Returns the folder path a marker path stands for (`docs/.dial_folder` → `docs`). */
4115
+ export declare const skillFolderMarkerParent: (markerPath: string) => string;
4116
+
3794
4117
  /** A `SKILL.md` split into its frontmatter fields and its prose body. */
3795
4118
  export declare interface SkillManifestDocument {
3796
4119
  /** `name` frontmatter field, when present and a string. */
@@ -3857,12 +4180,27 @@ export declare enum SkillSource {
3857
4180
  Public = "public"
3858
4181
  }
3859
4182
 
4183
+ /** Skill editor text fields with a length limit. */
4184
+ export declare type SkillTextField = 'name' | 'description' | 'instructions';
4185
+
3860
4186
  /** Splits a file name into its base and extension, using only the last dot. */
3861
4187
  export declare const splitFileNameExtension: (fileName: string) => {
3862
4188
  base: string;
3863
4189
  extension: string;
3864
4190
  };
3865
4191
 
4192
+ /** Per-start options of {@link UseConversationStreamResult.startStream}. */
4193
+ export declare interface StartStreamOptions {
4194
+ /**
4195
+ * Treats a `GenerationConflictError` as "this turn is already being
4196
+ * generated" — e.g. a page reloaded before that generation saved its start
4197
+ * state — and joins the running generation instead of showing the conflict
4198
+ * message, which remains the fallback. Only for a start that sends no new
4199
+ * user text; a send the user typed must keep reporting the conflict.
4200
+ */
4201
+ resumeOnConflict?: boolean;
4202
+ }
4203
+
3866
4204
  /**
3867
4205
  * Answers one question: would appending this text after the fence that
3868
4206
  * `buildSkillManifest` writes produce a *second* frontmatter block?
@@ -3893,6 +4231,29 @@ export declare interface StreamCompletionOptions {
3893
4231
  signal: AbortSignal;
3894
4232
  }
3895
4233
 
4234
+ /**
4235
+ * Reported through `onError` when the network connection carrying a
4236
+ * completion stream is lost (a rejected `fetch`, or a read that fails after a
4237
+ * 2xx response) or goes silent past the idle timeout — what a laptop sleep or
4238
+ * a phone lock mid-generation produces. The backend-owned generation may
4239
+ * still be running, so the caller can recover it rather than treat the
4240
+ * response as failed. `cause` holds the original error, when there is one.
4241
+ */
4242
+ export declare class StreamInterruptedError extends Error {
4243
+ constructor(cause?: unknown);
4244
+ }
4245
+
4246
+ /**
4247
+ * Reported through `onError` when DIAL Core itself signals a failure with an
4248
+ * in-band `{ error: { message } }` SSE chunk. Its `message` is upstream text
4249
+ * intended for the user, unlike a transport failure (failed `fetch`, non-OK
4250
+ * status, broken stream), whose message is technical detail. A custom
4251
+ * transport raises this for any user-facing upstream error text.
4252
+ */
4253
+ export declare class StreamUpstreamError extends Error {
4254
+ constructor(message: string);
4255
+ }
4256
+
3896
4257
  /** Strips leading and trailing slashes from a path segment. */
3897
4258
  export declare const stripSurroundingSlashes: (path: string) => string;
3898
4259
 
@@ -4213,7 +4574,8 @@ export declare const toPublishRuleDto: (rule: PublicationRule) => PublishRuleDto
4213
4574
  /**
4214
4575
  * Returns a renderable `Stage` for one raw payload: `index` defaults to `0`,
4215
4576
  * `name` to `''`, an unrecognized `status` to `null` (still running), and
4216
- * `content`/`tag`/`attachments` are passed through when present.
4577
+ * `content`/`tag`/`attachments`/`parent_stage_index` are passed through when
4578
+ * present (a parent of `0` included).
4217
4579
  */
4218
4580
  export declare const toStage: (stage: RawStage) => Stage;
4219
4581
 
@@ -4239,19 +4601,25 @@ export declare interface UnauthorizedErrorLike extends Error {
4239
4601
  readonly url: string;
4240
4602
  }
4241
4603
 
4604
+ /** Returns a new set containing every path from each of `pathSets`. */
4605
+ export declare const unionPathSets: (pathSets: readonly ReadonlySet<string>[]) => Set<string>;
4606
+
4242
4607
  /** A skill archive unpacked into its manifest text and a relative-path → bytes map of every other entry. */
4243
4608
  export declare interface UnpackedSkillArchive {
4244
4609
  /** The root `SKILL.md` entry's decoded text content. */
4245
4610
  manifestText: string;
4246
- /** Every non-manifest entry, keyed by relative path. */
4611
+ /** Every non-manifest, non-marker entry, keyed by relative path. */
4247
4612
  files: Map<string, Uint8Array>;
4613
+ /** Folder paths restored from `<folder>/.dial_folder` marker entries. */
4614
+ folders: string[];
4248
4615
  }
4249
4616
 
4250
4617
  /**
4251
4618
  * Unpacks a whole-skill ZIP (as downloaded from `GET /api/v1/skills/download`
4252
4619
  * — DIAL Core's whole-resource `GET` is the one place this contract still
4253
- * uses a ZIP, per design.md) into its manifest text and every other entry's
4254
- * bytes. Throws if the archive has no root `SKILL.md` entry.
4620
+ * uses a ZIP, per `openspec/changes/archive/2026-10-05-persist-skill-empty-folders/design.md`) into its manifest text, every other entry's
4621
+ * bytes, and the folders its empty-folder markers stand for. Throws if the
4622
+ * archive has no root `SKILL.md` entry.
4255
4623
  */
4256
4624
  export declare const unpackSkillArchive: (bytes: Uint8Array) => UnpackedSkillArchive;
4257
4625
 
@@ -4265,7 +4633,7 @@ export declare enum UnsupportedTriggerReason {
4265
4633
  MissingRequiredFields = "missingRequiredFields"
4266
4634
  }
4267
4635
 
4268
- export declare const updateEntry: (prev: FileUploadBatchState | null, index: number, patch: FileUploadStatus | Partial<Pick<FileUploadEntry, "status" | "percent">>) => FileUploadBatchState | null;
4636
+ export declare const updateEntry: (prev: FileUploadBatchState | null, id: string, patch: FileUploadStatus | Partial<Pick<FileUploadEntry, "status" | "percent">>) => FileUploadBatchState | null;
4269
4637
 
4270
4638
  /** Max number of files uploaded concurrently within a single upload batch. */
4271
4639
  export declare const UPLOAD_CONCURRENCY = 3;
@@ -4343,6 +4711,10 @@ export declare const USAGE_MODEL_LIMITS_I18N_KEYS: {
4343
4711
  readonly progressAriaLabel: "usage.progressAriaLabel";
4344
4712
  /** Label for the spent-cost cell. Receives `{ amount: string }`. */
4345
4713
  readonly spentLabel: "usage.spentLabel";
4714
+ /** Type caption for an application (agent) row. Receives no interpolation. */
4715
+ readonly applicationTypeLabel: "usage.applicationTypeLabel";
4716
+ /** Supporting label on an application row's spent cost. Receives no interpolation. */
4717
+ readonly includesCalledModelsLabel: "usage.includesCalledModelsLabel";
4346
4718
  };
4347
4719
 
4348
4720
  /**
@@ -4353,7 +4725,8 @@ export declare const USAGE_MODEL_LIMITS_I18N_KEYS: {
4353
4725
  * 1. If the active conversation is not present in the list, requests a
4354
4726
  * refresh. The list and refresh callback are intentionally excluded from
4355
4727
  * the dependency array to avoid a refresh-loop on every list update.
4356
- * 2. Marks the active conversation as viewed whenever it or the list changes.
4728
+ * 2. Marks the active conversation as viewed when its matching identity becomes
4729
+ * available. List refreshes and persistence rollback do not retry the write.
4357
4730
  */
4358
4731
  export declare const useActiveConversationSync: ({ activeConversationId, items, refreshConversations, markConversationViewed, conversationIdsMatch, toPanelConversationId, }: UseActiveConversationSyncParams) => string | undefined;
4359
4732
 
@@ -4493,7 +4866,7 @@ export declare interface UseAttachmentValidationResult {
4493
4866
  * item through the endpoint its type owns and refetching/notifying on
4494
4867
  * completion, and building the Create dropdown's options.
4495
4868
  */
4496
- export declare const useCatalogEditNavigation: ({ deployments, isCustomAppsEnabled, isSchemaAppsEnabled, isHideCustomAppCreationEnabled, isToolsetsEnabled, isPromptsEnabled, quickAppSchemaId, urls, onNavigate, deletePrompt, deleteToolset, deleteSkill, deleteApplication, refetchPrompts, refetchToolsets, refetchSkills, refetchDeployments, onDeleteSuccess, labels, onNotify, onSkillUploadClick, }: UseCatalogEditNavigationParams) => UseCatalogEditNavigationResult;
4869
+ export declare const useCatalogEditNavigation: ({ deployments, isCustomAppsEnabled, isSchemaAppsEnabled, isHideCustomAppCreationEnabled, isToolsetsEnabled, isPromptsEnabled, schemas, urls, onNavigate, deletePrompt, deleteToolset, deleteSkill, deleteApplication, refetchPrompts, refetchToolsets, refetchSkills, refetchDeployments, onDeleteSuccess, labels, onNotify, onSkillUploadClick, }: UseCatalogEditNavigationParams) => UseCatalogEditNavigationResult;
4497
4870
 
4498
4871
  /** Parameters accepted by {@link useCatalogEditNavigation}. */
4499
4872
  export declare interface UseCatalogEditNavigationParams {
@@ -4503,8 +4876,8 @@ export declare interface UseCatalogEditNavigationParams {
4503
4876
  isHideCustomAppCreationEnabled: boolean;
4504
4877
  isToolsetsEnabled: boolean;
4505
4878
  isPromptsEnabled: boolean;
4506
- /** The quick-app schema id resolved by `useCatalogItems`, or `undefined` when no quick-app schema exists. */
4507
- quickAppSchemaId: string | undefined;
4879
+ /** Application type schemas (runners) loaded at startup; each one except the custom-app schema gets its own Create option. */
4880
+ schemas: ApplicationSchemaSummaryDto[];
4508
4881
  /** Already-configured editor-route URL builders. */
4509
4882
  urls: CatalogEditNavigationUrls;
4510
4883
  /** Navigates the host to a URL built by `urls`. */
@@ -4535,7 +4908,10 @@ export declare interface UseCatalogEditNavigationParams {
4535
4908
  export declare interface UseCatalogEditNavigationResult {
4536
4909
  handleEdit: (item: CatalogItem) => void;
4537
4910
  handleDelete: (item: CatalogItem) => Promise<void>;
4911
+ /** The Create dropdown's items: runners and static options sorted together by label, all filtered by `createSearch.value`. */
4538
4912
  createOptions: DropdownItem[];
4913
+ /** The Create menu's search field state, or `undefined` when no runner option is offered. */
4914
+ createSearch: CatalogCreateSearch | undefined;
4539
4915
  }
4540
4916
 
4541
4917
  /**
@@ -4543,7 +4919,7 @@ export declare interface UseCatalogEditNavigationResult {
4543
4919
  * Extracts the inline dispatch logic from `CatalogView` into a reusable,
4544
4920
  * library-isolated unit.
4545
4921
  */
4546
- export declare const useCatalogItemDetails: ({ api, skills, isAdmin, dialCoreExternalUrl, skillOverviewLabels, promptOverviewLabels, deploymentLimitsLabels, }: UseCatalogItemDetailsOptions) => UseCatalogItemDetailsResult;
4922
+ export declare const useCatalogItemDetails: ({ api, skills, isAdmin, dialCoreExternalUrl, skillOverviewLabels, promptOverviewLabels, deploymentLimitsLabels, entityDetailsLabels, }: UseCatalogItemDetailsOptions) => UseCatalogItemDetailsResult;
4547
4923
 
4548
4924
  /** Options accepted by `useCatalogItemDetails`. */
4549
4925
  export declare interface UseCatalogItemDetailsOptions {
@@ -4564,6 +4940,12 @@ export declare interface UseCatalogItemDetailsOptions {
4564
4940
  promptOverviewLabels: PromptOverviewLabels;
4565
4941
  /** Labels for deployment limits table. */
4566
4942
  deploymentLimitsLabels: DeploymentLimitsLabels;
4943
+ /**
4944
+ * Overview section titles and spec labels for models, agents and toolsets,
4945
+ * merged over the English defaults. Memoise it like the other label objects:
4946
+ * a new object on every render recreates `onFetchDetails`.
4947
+ */
4948
+ entityDetailsLabels?: Partial<EntityDetailsLabels>;
4567
4949
  }
4568
4950
 
4569
4951
  /** Returned callbacks from `useCatalogItemDetails`. All callbacks are stable for stable inputs. */
@@ -4798,7 +5180,8 @@ export declare interface UseConversationHandlersResult {
4798
5180
  * `.dial`/`.zip`, v5 envelope, old- or new-chat origin) once per file, then
4799
5181
  * re-uploads any archive attachments to `uploads/<YYYY-MM>/` —
4800
5182
  * disambiguating a name collision with a ` (n)` suffix instead of rejecting
4801
- * it — rewrites attachment references (and renamed titles), regenerates each
5183
+ * it — rewrites attachment references (and renamed titles), drops any
5184
+ * reference still pointing into another user's bucket, regenerates each
4802
5185
  * conversation's id/path with a fresh UUID (collision-free save, no replace
4803
5186
  * dialog), and persists every conversation through the injected
4804
5187
  * `conversationsApi`. One job per imported file, not per conversation.
@@ -4868,10 +5251,14 @@ export declare interface UseConversationLookupMapsParams {
4868
5251
  * Returns a memoised array whose shape is compatible with the conversation
4869
5252
  * panel's item contract. All app-specific concerns (icon URL resolution,
4870
5253
  * route generation, id normalisation) are injected via resolver callbacks.
5254
+ *
5255
+ * While every input except `items` is unchanged, a DTO that is referentially
5256
+ * the same as in the previous render maps to the same item object, so a list
5257
+ * change (or a navigation that re-derives the list) re-renders only the rows
5258
+ * whose DTO actually changed.
4871
5259
  */
4872
- export declare const useConversationPanelItems: ({ items, deployments, isDeploymentsLoading, toPanelConversationId, resolveIconUrl, resolveIconTooltip, resolveHref, resolveTaskBadge, }: UseConversationPanelItemsParams) => {
4873
- showTaskBadge?: boolean | undefined;
4874
- taskBadgeLabel?: string | undefined;
5260
+ export declare const useConversationPanelItems: ({ items, deployments, isDeploymentsLoading, toPanelConversationId, resolveIconUrl, resolveIconTooltip, resolveHref, resolveTaskPresentation, }: UseConversationPanelItemsParams) => {
5261
+ leadingIcon?: ReactNode;
4875
5262
  isUnread?: boolean | undefined;
4876
5263
  id: string;
4877
5264
  title: string;
@@ -4907,11 +5294,12 @@ export declare interface UseConversationPanelItemsResolvers {
4907
5294
  /** Resolves the href to navigate to when the conversation row is clicked. */
4908
5295
  resolveHref: (panelConversationId: string) => string;
4909
5296
  /**
4910
- * Returns badge metadata for a scheduled-task conversation, or `undefined`
4911
- * when the item should not show a task badge.
5297
+ * Returns the row presentation for a scheduled-task conversation — a
5298
+ * host-rendered leading icon that replaces the deployment avatar, and the
5299
+ * unread flag — or `undefined` for an ordinary conversation.
4912
5300
  */
4913
- resolveTaskBadge?: (item: ConversationListItemDto) => {
4914
- label: string;
5301
+ resolveTaskPresentation?: (item: ConversationListItemDto) => {
5302
+ leadingIcon?: ReactNode;
4915
5303
  isUnread: boolean;
4916
5304
  } | undefined;
4917
5305
  }
@@ -4978,7 +5366,7 @@ export declare interface UseConversationSourcesResult {
4978
5366
  uploaded: DisplayAttachment[];
4979
5367
  /** Deduplicated attachments the assistant generated across the conversation. */
4980
5368
  generated: DisplayAttachment[];
4981
- /** Quotation sources referenced by assistant messages, deduplicated by URL. */
5369
+ /** Quotation sources referenced by assistant messages, deduplicated by URL; PDF sources are qualified with `#page=N`. */
4982
5370
  sources: QuotationSource[];
4983
5371
  }
4984
5372
 
@@ -4990,7 +5378,7 @@ export declare interface UseConversationSourcesResult {
4990
5378
  * `transport`/`generation`/`channel`/`overlay` capabilities rather than any
4991
5379
  * app context or `server-api` import.
4992
5380
  */
4993
- export declare const useConversationStream: ({ conversationId, state: { setConversation, conversationRef }, transport, generation: { startGeneration, completeGeneration }, channel, overlay, onStopError, generationConflictMessage, }: UseConversationStreamParams) => UseConversationStreamResult;
5381
+ export declare const useConversationStream: ({ conversationId, state: { setConversation, conversationRef }, transport, generation: { startGeneration, completeGeneration }, channel, overlay, onStopError, generationConflictMessage, generationPersistenceErrorMessage, onStreamError, batchChunksPerFrame, }: UseConversationStreamParams) => UseConversationStreamResult;
4994
5382
 
4995
5383
  /** Parameters for {@link useConversationStream}. */
4996
5384
  export declare interface UseConversationStreamParams {
@@ -5008,17 +5396,39 @@ export declare interface UseConversationStreamParams {
5008
5396
  * {@link DEFAULT_GENERATION_CONFLICT_MESSAGE}.
5009
5397
  */
5010
5398
  generationConflictMessage?: string;
5399
+ /** Host-translated warning shown when the received answer could not be saved. */
5400
+ generationPersistenceErrorMessage?: string;
5401
+ /**
5402
+ * Receives the original error of every failed stream. The hook shows only
5403
+ * host-supplied or upstream-supplied text on the message bubble and hides
5404
+ * transport detail (e.g. `Failed to fetch`), so this is where the host can
5405
+ * still log or report the raw error.
5406
+ */
5407
+ onStreamError?: (error: Error) => void;
5408
+ /**
5409
+ * Coalesces the displayed chunk updates into one `setConversation` per
5410
+ * animation frame. Chunks still reach the per-path buffer immediately, and
5411
+ * any pending update is flushed before completion, error, stop, or a
5412
+ * superseding generation. Defaults to `false` (one update per chunk).
5413
+ */
5414
+ batchChunksPerFrame?: boolean;
5011
5415
  }
5012
5416
 
5013
5417
  /** Return value of {@link useConversationStream}. */
5014
5418
  export declare interface UseConversationStreamResult {
5015
- startStream: (conversationId: string, userContent: string, messageIndex: number, model: string, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum) => void;
5419
+ startStream: (conversationId: string, userContent: string, messageIndex: number, model: string, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum, options?: StartStreamOptions) => void;
5016
5420
  handleStop: () => void;
5017
5421
  resumeIfAwaitingGeneration: (currentConversationId: string, conversation: Conversation) => void;
5018
5422
  /** Restores the accumulated live assistant message when its conversation is loaded again before completion. */
5019
5423
  restoreBufferedGeneration: (currentConversationId: string, conversation: Conversation) => Conversation;
5020
5424
  isStreaming: boolean;
5021
5425
  canStopStreaming: boolean;
5426
+ /** Whether the displayed conversation's terminal read failed. */
5427
+ hasConversationReloadError: boolean;
5428
+ /** Whether a retry of that read is in flight. */
5429
+ isReloadingConversation: boolean;
5430
+ /** Retries the failed read without saving or regenerating the answer. */
5431
+ retryConversationReload: () => Promise<void>;
5022
5432
  }
5023
5433
 
5024
5434
  /**
@@ -5026,14 +5436,14 @@ export declare interface UseConversationStreamResult {
5026
5436
  * tree's expand/collapse state, search, and the shared per-folder cache that
5027
5437
  * `useDialFileUploadBatch`/`useDialFileMutations`/`useDialFileSharing` invalidate
5028
5438
  * through `invalidateFolders`/`bumpRetry` after their own mutations settle
5029
- * (design.md D1) — this hook is the sole owner/writer of that cache.
5439
+ * (`openspec/changes/archive/2026-07-21-split-use-dial-file-manager/design.md` D1) — this hook is the sole owner/writer of that cache.
5030
5440
  *
5031
5441
  * Supports three listing sources via `activeTab`:
5032
5442
  * - my_files: user's own bucket via `DialFilesApi.listFiles`
5033
5443
  * - shared: files shared with the user via `DialFilesApi.listSharedFiles`
5034
5444
  * - organization: public bucket via `DialFilesApi.listPublicFiles`
5035
5445
  */
5036
- export declare const useDialFileListing: ({ filesApi, bucket, rootLabel, activeTab, onNotification, }: UseDialFileListingOptions) => UseDialFileListingResult;
5446
+ export declare const useDialFileListing: ({ filesApi, bucket, rootLabel, activeTab, onNotification, isActive, sessionKey, }: UseDialFileListingOptions) => UseDialFileListingResult;
5037
5447
 
5038
5448
  /** Options accepted by `useDialFileListing`. */
5039
5449
  export declare interface UseDialFileListingOptions {
@@ -5047,6 +5457,10 @@ export declare interface UseDialFileListingOptions {
5047
5457
  activeTab: DialFileManagerTabs;
5048
5458
  /** Called with a structured event when a folder-load operation fails. */
5049
5459
  onNotification?: (notification: FileManagerNotification) => void;
5460
+ /** When false, the hook issues no `DialFilesApi` call and reports `isLoading: false`. Defaults to `true`. */
5461
+ isActive?: boolean;
5462
+ /** Changing this value resets cache and navigation exactly like an `activeTab` change. Defaults to `undefined`. */
5463
+ sessionKey?: string;
5050
5464
  }
5051
5465
 
5052
5466
  /** Values returned by `useDialFileListing`. */
@@ -5082,7 +5496,7 @@ export declare interface UseDialFileListingResult {
5082
5496
  /**
5083
5497
  * Deletes the given API-path cache keys so the next listing fetch/expand for
5084
5498
  * that folder re-fetches from the server. The only way sibling sub-hooks may
5085
- * invalidate the shared cache (design.md D1).
5499
+ * invalidate the shared cache (`openspec/changes/archive/2026-07-21-split-use-dial-file-manager/design.md` D1).
5086
5500
  */
5087
5501
  invalidateFolders: (apiPaths: string[]) => void;
5088
5502
  /** Merges a just-created folder into its parent's cache entry (optimistic display for create-folder). */
@@ -5103,7 +5517,7 @@ export declare interface UseDialFileListingResult {
5103
5517
  * every translated string reaches it through `labels`,
5104
5518
  * `disabledNewButtonTooltip`, and `buildValidationErrorMessage`.
5105
5519
  */
5106
- export declare const useDialFileManager: ({ filesApi, bucket, rootLabel, activeTab, onNotification, onOperationSuccess, forbiddenSymbolsRegExp, variant, actionProfile, labels, locale, disabledNewButtonTooltip, downloadDestination, buildValidationErrorMessage, }: UseDialFileManagerOptions) => UseDialFileManagerResult;
5520
+ export declare const useDialFileManager: ({ filesApi, bucket, rootLabel, activeTab, isActive, sessionKey, onNotification, onOperationSuccess, forbiddenSymbolsRegExp, variant, actionProfile, labels, locale, disabledNewButtonTooltip, downloadDestination, buildValidationErrorMessage, }: UseDialFileManagerOptions) => UseDialFileManagerResult;
5107
5521
 
5108
5522
  export declare interface UseDialFileManagerOptions {
5109
5523
  /** Injected operation port used for every file-manager network call. */
@@ -5114,6 +5528,10 @@ export declare interface UseDialFileManagerOptions {
5114
5528
  rootLabel?: string;
5115
5529
  /** Active tab — drives listing source and per-tab options. Defaults to MyFiles. */
5116
5530
  activeTab?: DialFileManagerTabs;
5531
+ /** When false, the listing issues no `DialFilesApi` call and reports `isLoading: false`. Defaults to `true`. */
5532
+ isActive?: boolean;
5533
+ /** Changing this value resets cache and navigation exactly like an `activeTab` change. Defaults to `undefined`. */
5534
+ sessionKey?: string;
5117
5535
  /** Called when a file-manager action should surface a toast notification. */
5118
5536
  onNotification?: (notification: FileManagerNotification) => void;
5119
5537
  /** Called when a mutation succeeds, instead of invoking an application notification service directly. */
@@ -5168,7 +5586,7 @@ export declare interface UseDialFileManagerResult {
5168
5586
  onSearchFiles: (folder: string, query: string) => void;
5169
5587
  /** Search: true while a search request is in flight. */
5170
5588
  isSearching: boolean;
5171
- /** Search: flat list of matching files, or null when search is not active. */
5589
+ /** Search: flat, unfiltered recursive listing of the current folder, or null when search is not active. */
5172
5590
  searchResults: DialFile[] | null;
5173
5591
  /** Search: clears results and exits search mode. */
5174
5592
  clearSearchResults: () => void;
@@ -5192,7 +5610,9 @@ export declare interface UseDialFileManagerResult {
5192
5610
  uploadBatchState: FileUploadBatchState | null;
5193
5611
  /** Upload: abort all in-flight and queued uploads. */
5194
5612
  cancelUpload: () => void;
5195
- /** Upload: dismiss the progress modal after the batch has settled. */
5613
+ /** Upload: abort one queued or in-flight upload by its entry id. */
5614
+ cancelUploadFile: (id: string) => void;
5615
+ /** Upload: empty the upload queue. */
5196
5616
  clearUploadBatch: () => void;
5197
5617
  /** Folder creation: called when user confirms a new folder name. */
5198
5618
  onCreateFolder: (file: DialUploadFileItem, folderPath: string, fileId: string) => Promise<void>;
@@ -5259,7 +5679,7 @@ export declare interface UseDialFileManagerResult {
5259
5679
  /**
5260
5680
  * True while any mutating file-manager operation is in flight: the OR of
5261
5681
  * `isCreatingFolder`, `isDownloading`, `isDeleting`, `isRenaming`, `isCopying`,
5262
- * `isMoving`, `isUnsharing`, `isRemovingAccess`, and `uploadBatchState != null`.
5682
+ * `isMoving`, `isUnsharing`, `isRemovingAccess`, and any upload still queued or running.
5263
5683
  *
5264
5684
  * Deliberately excludes three flags, each already fully contained by its own
5265
5685
  * scoped loading UI:
@@ -5270,11 +5690,36 @@ export declare interface UseDialFileManagerResult {
5270
5690
  isAnyOperationInProgress: boolean;
5271
5691
  }
5272
5692
 
5693
+ /**
5694
+ * Composes one `useDialFileManager` per source tab (My files, Shared,
5695
+ * Organization) so the File storage page can offer an All tab without a
5696
+ * second copy of the per-tab rules. On a single tab it returns that section's
5697
+ * result; on All it merges the section roots into one tree and routes every
5698
+ * callback to the section owning the path. Section availability and names
5699
+ * arrive through `sections` — the hook reads no config, i18n, or context.
5700
+ */
5701
+ export declare const useDialFileManagerSections: ({ activeTab, sections, ...managerOptions }: UseDialFileManagerSectionsOptions) => UseDialFileManagerSectionsResult;
5702
+
5703
+ /** Options accepted by `useDialFileManagerSections`. */
5704
+ export declare interface UseDialFileManagerSectionsOptions extends Omit<UseDialFileManagerOptions, 'activeTab' | 'rootLabel' | 'isActive' | 'sessionKey'> {
5705
+ /** Active tab, including `DialFileManagerTabs.All`. */
5706
+ activeTab: DialFileManagerTabs;
5707
+ /** Enabled source tabs in display order, each with its translated top-level folder name. */
5708
+ sections: DialFileManagerSection[];
5709
+ }
5710
+
5711
+ /** Values returned by `useDialFileManagerSections`. */
5712
+ export declare interface UseDialFileManagerSectionsResult extends UseDialFileManagerResult {
5713
+ /** Source tab of the browsed folder; never `DialFileManagerTabs.All`. */
5714
+ sectionTab: DialFileManagerTabs;
5715
+ }
5716
+
5273
5717
  /**
5274
5718
  * Filters the file-manager's tab list down to the host's configured set and
5275
5719
  * resets `activeTab` to the highest-priority still-enabled tab when the
5276
5720
  * current one becomes excluded. A `fileManagerTabs` of `undefined` means no
5277
5721
  * restriction — every tab in `allTabs` stays enabled and no reset ever fires.
5722
+ * The All tab is kept only while at least two source tabs are enabled.
5278
5723
  */
5279
5724
  export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: FilterChipItem<DialFileManagerTabs>[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
5280
5725
 
@@ -5405,10 +5850,11 @@ export declare interface UseDialFileSharingResult {
5405
5850
 
5406
5851
  /**
5407
5852
  * Manages upload batches (single-file and ZIP-archive extraction), including
5408
- * concurrency-limited progress tracking and abort. Invalidates the shared
5409
- * listing cache for the destination folder through `invalidateFolders`/
5410
- * `bumpRetry` after a batch settles — it never holds its own copy of the
5411
- * cache.
5853
+ * concurrency-limited progress tracking and per-file abort. A batch started
5854
+ * while another is on screen is appended to it, and settled entries stay in
5855
+ * `uploadBatchState` until `clearUploadBatch`. Invalidates the shared listing
5856
+ * cache for the destination folder through `invalidateFolders`/`bumpRetry`
5857
+ * after a batch settles — it never holds its own copy of the cache.
5412
5858
  */
5413
5859
  export declare const useDialFileUploadBatch: ({ filesApi, bucket, rootLabel, activeTab, cache, sharedRootMetaRef, invalidateFolders, bumpRetry, onNotification, }: UseDialFileUploadBatchOptions) => UseDialFileUploadBatchResult;
5414
5860
 
@@ -5441,6 +5887,7 @@ export declare interface UseDialFileUploadBatchResult {
5441
5887
  onValidateUpload: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => Promise<FileUploadValidationResult>;
5442
5888
  uploadBatchState: FileUploadBatchState | null;
5443
5889
  cancelUpload: () => void;
5890
+ cancelUploadFile: (id: string) => void;
5444
5891
  clearUploadBatch: () => void;
5445
5892
  }
5446
5893
 
@@ -5604,6 +6051,35 @@ export declare const useMcpAppHostContext: (displayMode: "inline" | "fullscreen"
5604
6051
  */
5605
6052
  export declare const useMcpAppTools: (client: McpAppsApiClient, deployment: DeploymentItemDto | undefined, messages: Message[], toolsets: DialToolsetDto[]) => McpAppToolRef[];
5606
6053
 
6054
+ /**
6055
+ * Captures eligible message text and creates Reply files for an existing composer
6056
+ * attachment flow without acquiring host deployment, upload or localization knowledge.
6057
+ */
6058
+ export declare const useMessageSelectionReply: ({ conversationId, enabled, droppedFiles, onDroppedFilesConsumed, }: UseMessageSelectionReplyParams) => {
6059
+ contentRef: (node: HTMLDivElement | null) => (() => void) | undefined;
6060
+ actionRef: RefObject<HTMLDivElement | null>;
6061
+ selection: MessageSelectionReplySnapshot | null;
6062
+ onReply: () => void;
6063
+ dismiss: () => void;
6064
+ pendingFiles: File[];
6065
+ onFilesConsumed: () => void;
6066
+ focusRequestId: number | undefined;
6067
+ onAttachmentsChange: (attachments: Attachment[]) => void;
6068
+ addedRevision: number;
6069
+ };
6070
+
6071
+ /** Parameters accepted by {@link useMessageSelectionReply}. */
6072
+ export declare interface UseMessageSelectionReplyParams {
6073
+ /** Identifier used to discard selection and queued files after a scope change. */
6074
+ conversationId: string;
6075
+ /** Whether the host currently permits a Reply attachment. */
6076
+ enabled: boolean;
6077
+ /** Files from the host's ordinary page-drop queue. */
6078
+ droppedFiles: File[];
6079
+ /** Acknowledges the captured page-drop batch after the composer accepts it. */
6080
+ onDroppedFilesConsumed: () => void;
6081
+ }
6082
+
5607
6083
  /**
5608
6084
  * Completes an OAuth authorization-code flow from inside the callback popup:
5609
6085
  * reads and clears the redirect state written into this popup's own
@@ -5805,17 +6281,17 @@ export declare interface UsePublishFoldersResult {
5805
6281
  */
5806
6282
  onCreatePublishFolder: (parentPath: string[], name: string) => Promise<void>;
5807
6283
  /**
5808
- * Records `folderPath` as a publish destination the user has actually used,
5809
- * so it keeps appearing in the tree on later publishes. Call it after a
5810
- * successful publish.
6284
+ * Records `folderPath` as the most recent publish destination (moving it to
6285
+ * the front if already remembered), so it keeps appearing in the tree on
6286
+ * later publishes. Call it after a successful publish.
5811
6287
  */
5812
6288
  rememberPublishFolder: (folderPath: string[]) => void;
5813
6289
  /** Heuristic write-access check for a folder path (see the TODO above). */
5814
6290
  hasPublishWriteAccess: (folderPath: string[]) => boolean;
5815
6291
  }
5816
6292
 
5817
- /** Shared, cancellation-safe pagination for one schedule's run history. */
5818
- export declare const useScheduledTaskRuns: (client: ScheduledTasksApiClient, { scheduleId, enabled, pageSize }: UseScheduledTaskRunsOptions) => {
6293
+ /** Shared, cancellation-safe pagination and background refresh for one schedule's run history. */
6294
+ export declare const useScheduledTaskRuns: (client: ScheduledTasksApiClient, { scheduleId, enabled, pageSize, nextRunTime, }: UseScheduledTaskRunsOptions) => {
5819
6295
  items: ScheduledTaskRunDto[];
5820
6296
  isLoading: boolean;
5821
6297
  isLoadingMore: boolean;
@@ -5831,10 +6307,16 @@ export declare interface UseScheduledTaskRunsOptions {
5831
6307
  scheduleId: string;
5832
6308
  enabled?: boolean;
5833
6309
  pageSize?: number;
6310
+ /**
6311
+ * The task's next scheduled run time (ISO string), when known. Drives the
6312
+ * one-shot background refresh described on {@link useScheduledTaskRuns}.
6313
+ * The caller already holds the task DTO — this hook never fetches it.
6314
+ */
6315
+ nextRunTime?: string | null;
5834
6316
  }
5835
6317
 
5836
6318
  /** Shared scheduler-list lifecycle with generation-scoped stale-response guards. */
5837
- export declare const useScheduledTasks: (client: ScheduledTasksApiClient, { enabled, pageSize, debounceMs, initialSearch, initialSort, }?: UseScheduledTasksOptions) => {
6319
+ export declare const useScheduledTasks: (client: ScheduledTasksApiClient, { enabled, pageSize, debounceMs, initialSearch, initialSort, model, }?: UseScheduledTasksOptions) => {
5838
6320
  items: ScheduledTaskDto[];
5839
6321
  searchQuery: string;
5840
6322
  setSearchQuery: Dispatch<SetStateAction<string>>;
@@ -5856,6 +6338,8 @@ export declare interface UseScheduledTasksOptions {
5856
6338
  debounceMs?: number;
5857
6339
  initialSearch?: string;
5858
6340
  initialSort?: ListScheduledTasksSortEnum;
6341
+ /** Restricts the list to tasks of one model/application; changing it reloads from the first page. */
6342
+ model?: string;
5859
6343
  }
5860
6344
 
5861
6345
  /**
@@ -5900,7 +6384,7 @@ export declare interface UseShareRecipientsCountResult {
5900
6384
 
5901
6385
  /**
5902
6386
  * 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
6387
+ * precheck, in-flight exclusion, abort-on-close, and import completion. The host supplies the configured request
5904
6388
  * and observes completion/failure through the injected callbacks; the hook never imports app
5905
6389
  * contexts, i18n, or a configured API client.
5906
6390
  */
@@ -5908,8 +6392,8 @@ export declare const useSkillArchiveImport: <TResult>({ importArchive, onImporte
5908
6392
 
5909
6393
  /** Options accepted by {@link useSkillArchiveImport}. */
5910
6394
  export declare interface UseSkillArchiveImportOptions<TResult> {
5911
- /** Submits the selected archive; the host owns request configuration and the client. */
5912
- importArchive: (file: File) => Promise<TResult>;
6395
+ /** Submits the selected archive; the host owns the client. `signal` aborts when the dialog closes or the hook unmounts mid-upload. */
6396
+ importArchive: (file: File, signal: AbortSignal) => Promise<TResult>;
5913
6397
  /** Called once after a successful import (and any awaited host follow-up) settles. */
5914
6398
  onImported: (result: TResult) => void | Promise<void>;
5915
6399
  /** Called once when the import request, or the host's follow-up in {@link onImported}, fails. */
@@ -5924,13 +6408,15 @@ export declare interface UseSkillArchiveImportResult {
5924
6408
  isDialogOpen: boolean;
5925
6409
  /** Current phase of the import. */
5926
6410
  status: SkillArchiveImportStatus;
6411
+ /** Whether an import request is in flight; the dialog stays open until it succeeds. */
6412
+ isUploading: boolean;
5927
6413
  /** Reason the current/last selection was rejected locally; `undefined` once cleared. */
5928
6414
  selectionRejectionReason: SkillArchiveSelectionRejectionReason | undefined;
5929
6415
  /** Classified failure of the last import request; `undefined` outside a request failure. */
5930
6416
  errorKind: SkillArchiveImportErrorKind | undefined;
5931
- /** Opens the dialog, unless an import is already in flight. */
6417
+ /** Opens the dialog and clears any previous rejection or request failure. */
5932
6418
  openDialog: () => void;
5933
- /** Closes the dialog and clears any rejection reason. */
6419
+ /** Closes the dialog, aborting an in-flight import, and clears any rejection reason. */
5934
6420
  closeDialog: () => void;
5935
6421
  /** Wire to the dialog drop zone's `onChange`. */
5936
6422
  handleFilesSelected: (files: File[]) => void;
@@ -6039,7 +6525,7 @@ export declare interface UseSkillEditorLoadResult {
6039
6525
  * `client.createSkill`/`client.updateSkill`, and mapping the resulting
6040
6526
  * success/error/conflict outcomes to presentable state.
6041
6527
  */
6042
- export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, frontmatterRef, loadedPathRef, etagRef, returnUrl, refetchSkills, client, messages, onNavigate, onNotify, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
6528
+ export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, frontmatterRef, loadedPathRef, etagRef, returnUrl, getCreateReturnUrl, refetchSkills, client, messages, onNavigate, onNotify, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
6043
6529
 
6044
6530
  /** Parameters accepted by {@link useSkillEditorSubmit}. */
6045
6531
  export declare interface UseSkillEditorSubmitParams {
@@ -6059,6 +6545,8 @@ export declare interface UseSkillEditorSubmitParams {
6059
6545
  etagRef: React.MutableRefObject<string | undefined>;
6060
6546
  /** Where to navigate on a successful save. */
6061
6547
  returnUrl: string;
6548
+ /** Resolves the destination after creation from the normalized skill path. Defaults to `returnUrl`. */
6549
+ getCreateReturnUrl?: (path: string) => string;
6062
6550
  /** Refetches the host's skill listing after a successful save. */
6063
6551
  refetchSkills: () => Promise<void>;
6064
6552
  /** Already-configured create/update operations. */
@@ -6079,6 +6567,10 @@ export declare interface UseSkillEditorSubmitResult {
6079
6567
  errors: SkillEditorErrors;
6080
6568
  /** General submit-time error, distinct from a stale-edit `conflict`. */
6081
6569
  submitError: string | undefined;
6570
+ /** Whether `submitError` was caused by something a plain re-send can clear, rather than by the submission itself. */
6571
+ isSubmitErrorRetryable: boolean;
6572
+ /** Re-submits the values of the attempt that produced `submitError`. No-op before the first submit. */
6573
+ retrySubmit: () => void;
6082
6574
  /** Present when the last save hit a stale-ETag conflict. */
6083
6575
  conflict: {
6084
6576
  message: string;
@@ -6098,10 +6590,11 @@ export declare interface UseSkillEditorSubmitResult {
6098
6590
  /**
6099
6591
  * Owns the Skill Editor's batch file upload workflow: validating a staged
6100
6592
  * batch, committing it atomically (supporting files plus an optional
6101
- * `SKILL.md` manifest import, with a confirmation gate), and removing
6593
+ * `SKILL.md` manifest import, with a confirmation gate), creating empty
6594
+ * folders, expanding `.zip` archives for staging, and removing
6102
6595
  * already-committed nodes.
6103
6596
  */
6104
- export declare const useSkillFileActions: ({ files, setFiles, filesContentRef, frontmatterRef, loadedValues, setLoadedValues, isEditMode, isDirty, setSelectedPath, messages, }: UseSkillFileActionsParams) => UseSkillFileActionsResult;
6597
+ export declare const useSkillFileActions: ({ files, setFiles, filesContentRef, frontmatterRef, loadedValues, setLoadedValues, isEditMode, isDirty, setSelectedPath, messages, pickFromFileSystem, }: UseSkillFileActionsParams) => UseSkillFileActionsResult;
6105
6598
 
6106
6599
  /** Parameters accepted by {@link useSkillFileActions}. */
6107
6600
  export declare interface UseSkillFileActionsParams {
@@ -6125,6 +6618,12 @@ export declare interface UseSkillFileActionsParams {
6125
6618
  setSelectedPath: Dispatch<SetStateAction<string>>;
6126
6619
  /** Localized messages, resolved by the host. */
6127
6620
  messages: SkillFileActionsMessages;
6621
+ /**
6622
+ * Opens the host's file-system picker; passed through unchanged as
6623
+ * `fileActions.pickFromFileSystem`. Omit to hide the editor's "Open DIAL
6624
+ * file system" entry.
6625
+ */
6626
+ pickFromFileSystem?: () => Promise<SkillFileSourceEntry[] | undefined>;
6128
6627
  }
6129
6628
 
6130
6629
  /** Return value of {@link useSkillFileActions}. */
@@ -6456,4 +6955,7 @@ export declare enum WithLogin {
6456
6955
  WithConfig = "with-config"
6457
6956
  }
6458
6957
 
6958
+ /** Returns `sections` with every root label usable as a unique first path segment, falling back to the tab id. */
6959
+ export declare const withRoutableRootLabels: <TSection extends DialFileManagerSection>(sections: readonly TSection[]) => TSection[];
6960
+
6459
6961
  export { }