@epam/ai-dial-chat-hooks 1.2.0-dev.99 → 1.3.0-dev.5
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.
- package/api-error/api-error.js +7 -4
- package/catalog/catalog-derivations.js +1 -1
- package/catalog/deployment-id.js +8 -2
- package/catalog/map-deployment-limits-to-catalog.js +16 -24
- package/catalog/map-deployment-limits-to-input.js +81 -9
- package/catalog/map-deployment-to-catalog-item.js +34 -34
- package/catalog/map-entity-details-to-catalog.js +237 -192
- package/catalog/map-skill-to-catalog-item.js +61 -54
- package/catalog/publish.js +4 -4
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +122 -101
- package/catalog/useCatalogItemDetails.js +9 -8
- package/catalog/usePublishFolders/usePublishFolders.js +1 -1
- package/catalog.d.ts +171 -34
- package/catalog.js +23 -23
- package/conversation/conversation-transfer/export-conversation.js +24 -16
- package/conversation/conversation-transfer/import-conversation.js +80 -31
- package/conversation/create-chat-stream-api.js +89 -49
- package/conversation/get-model-id-from-conversation-id.js +15 -9
- package/conversation/message-utils.js +44 -2
- package/conversation/stage.js +6 -2
- package/conversation/useActiveConversationSync/useActiveConversationSync.js +7 -8
- package/conversation/useConversationExport/useConversationExport.js +9 -9
- package/conversation/useConversationHandlers/message-utils.js +8 -5
- package/conversation/useConversationHandlers/useConversationHandlers.js +181 -167
- package/conversation/useConversationImport/useConversationImport.js +123 -121
- package/conversation/useConversationPanelItems/useConversationPanelItems.js +49 -31
- package/conversation/useConversationStream/frame-scheduler.js +39 -0
- package/conversation/useConversationStream/generation-resume.js +122 -64
- package/conversation/useConversationStream/useConversationStream.js +298 -118
- package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +189 -0
- package/conversation-sources/useConversationSources/useConversationSources.js +31 -24
- package/conversation-sources.d.ts +1 -1
- package/conversation-transfer.d.ts +2 -1
- package/conversation.d.ts +218 -22
- package/conversation.js +32 -31
- package/file-manager-canvas.d.ts +27 -7
- package/file-manager.d.ts +87 -32
- package/file-manager.js +25 -24
- package/files/attachment-canvas.js +67 -44
- package/files/dial-file-manager-copy-move.util.js +9 -8
- package/files/dial-file-manager-mapping.util.js +2 -1
- package/files/dial-file-manager-path.util.js +24 -2
- package/files/dial-file-manager.model.js +23 -19
- package/files/dial-file-manager.types.js +3 -3
- package/files/file-manager-variant.js +1 -1
- package/files/resolve-dial-file-api-path.js +11 -12
- package/files/useDialFileListing/useDialFileListing.js +140 -127
- package/files/useDialFileManager/useDialFileManager.js +139 -135
- package/files/useDialFileManagerSections/useDialFileManagerSections.js +155 -0
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +20 -15
- package/files/useDialFileMutations/useDialFileMutations.js +65 -60
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +117 -110
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +28 -23
- package/index.d.ts +643 -128
- package/index.js +136 -134
- package/mcp-apps/useMcpAppTools/useMcpAppTools.js +1 -1
- package/oauth/authorize-url.js +3 -3
- package/oauth/toolset-id.js +5 -3
- package/oauth/useToolsetLogin/useToolsetLogin.js +8 -8
- package/oauth.d.ts +34 -2
- package/oauth.js +9 -9
- package/package.json +19 -23
- package/scheduled-task/scheduled-task-description.js +43 -39
- package/scheduled-task/scheduled-task-trigger.js +74 -71
- package/scheduled-task/use-scheduled-task-runs.js +162 -50
- package/scheduled-task/use-scheduled-tasks.js +52 -48
- package/scheduled-tasks.d.ts +27 -6
- package/scheduled-tasks.js +2 -2
- package/shared/application-schema.js +5 -2
- package/shared/cron-day-of-month.js +13 -0
- package/skill/skill-archive.js +19 -0
- package/skill/skill-types.js +8 -7
- package/skill/skill.js +52 -29
- package/skill/useSkillArchiveImport/useSkillArchiveImport.js +38 -34
- package/skill/useSkillEditorLoad.js +65 -59
- package/skill/useSkillEditorSubmit.js +105 -93
- package/skill/useSkillFileActions.js +70 -58
- package/skill-editor.d.ts +62 -13
- package/skill-editor.js +9 -9
- package/usage/map-user-usage-to-model-limits.js +137 -95
- package/usage.d.ts +8 -3
- package/usePageFileDrag/usePageFileDrag.js +3 -3
- package/utils.d.ts +26 -6
- 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) =>
|
|
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.
|
|
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
|
-
*
|
|
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:
|
|
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
|
-
/**
|
|
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>>;
|
|
@@ -908,6 +963,13 @@ export declare interface ConversationStreamTransport {
|
|
|
908
963
|
attachToGeneration(path: string, signal: AbortSignal): Promise<ReadableStream<Uint8Array>>;
|
|
909
964
|
/** Reloads the persisted conversation by its full (bucket-qualified) id. */
|
|
910
965
|
getConversation(conversationId: string, signal?: AbortSignal): Promise<Conversation>;
|
|
966
|
+
/**
|
|
967
|
+
* Saves `conversation` at the bucket-stripped `path`, resolving with the saved
|
|
968
|
+
* conversation. Used only for the single recovery save after the backend's
|
|
969
|
+
* terminal save was rejected with `401`; without it that failure shows the
|
|
970
|
+
* persistence warning immediately.
|
|
971
|
+
*/
|
|
972
|
+
saveConversation?(path: string, conversation: Conversation): Promise<Conversation>;
|
|
911
973
|
}
|
|
912
974
|
|
|
913
975
|
export { ConversationTransferErrorCode }
|
|
@@ -967,6 +1029,12 @@ export declare interface CreateChatStreamApiDeps {
|
|
|
967
1029
|
getTimezone?: () => string | undefined;
|
|
968
1030
|
/** `fetch` implementation to issue requests through. Defaults to the global `fetch`. */
|
|
969
1031
|
fetchImpl?: typeof fetch;
|
|
1032
|
+
/**
|
|
1033
|
+
* How long an open completion stream may go without receiving a byte
|
|
1034
|
+
* (keepalive comments included) before it is reported as a
|
|
1035
|
+
* {@link StreamInterruptedError}. Defaults to {@link DEFAULT_STREAM_IDLE_TIMEOUT_MS}.
|
|
1036
|
+
*/
|
|
1037
|
+
idleTimeoutMs?: number;
|
|
970
1038
|
}
|
|
971
1039
|
|
|
972
1040
|
/**
|
|
@@ -1084,6 +1152,15 @@ export declare type CsrfRefreshOutcome = {
|
|
|
1084
1152
|
|
|
1085
1153
|
export declare const DATE_OPTIONS: Intl.DateTimeFormatOptions;
|
|
1086
1154
|
|
|
1155
|
+
/**
|
|
1156
|
+
* Inverse of `encodeDeploymentId` — decodes each `/`-separated segment back
|
|
1157
|
+
* to its raw, human-readable form. A segment that isn't valid
|
|
1158
|
+
* percent-encoding is passed through unchanged rather than throwing, since
|
|
1159
|
+
* this decodes externally-sourced ids (the settings iframe's postMessage
|
|
1160
|
+
* protocol).
|
|
1161
|
+
*/
|
|
1162
|
+
export declare const decodeDeploymentId: (id: string) => string;
|
|
1163
|
+
|
|
1087
1164
|
/**
|
|
1088
1165
|
* Inverse of `encodeToolsetId` — decodes each `/`-separated segment back to
|
|
1089
1166
|
* its raw, human-readable form. A segment that isn't valid percent-encoding
|
|
@@ -1100,11 +1177,17 @@ export declare const decodeToolsetId: (id: string) => string;
|
|
|
1100
1177
|
* present in either map, excluding `primaryLocale` — that key is already the
|
|
1101
1178
|
* primary Name/Description field, not a row in the popup.
|
|
1102
1179
|
*/
|
|
1103
|
-
export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) =>
|
|
1180
|
+
export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) => LocalizedTextEntry[];
|
|
1181
|
+
|
|
1182
|
+
/** The English Overview labels `mapEntityDetailsToCatalogDetails` uses when a host passes none. */
|
|
1183
|
+
export declare const DEFAULT_ENTITY_DETAILS_LABELS: EntityDetailsLabels;
|
|
1104
1184
|
|
|
1105
1185
|
/** Fallback text of a {@link GenerationConflictError} when no message is supplied. */
|
|
1106
1186
|
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
1187
|
|
|
1188
|
+
/** Safe fallback for hosts that do not supply a translated persistence warning. */
|
|
1189
|
+
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.";
|
|
1190
|
+
|
|
1108
1191
|
/**
|
|
1109
1192
|
* Default ceiling on the summed byte length of an export's attachments.
|
|
1110
1193
|
*
|
|
@@ -1118,6 +1201,8 @@ export declare const DEFAULT_GENERATION_CONFLICT_MESSAGE = "A response is alread
|
|
|
1118
1201
|
*/
|
|
1119
1202
|
export declare const DEFAULT_MAX_ARCHIVE_BYTES: number;
|
|
1120
1203
|
|
|
1204
|
+
export declare const DEFAULT_STREAM_IDLE_TIMEOUT_MS = 45000;
|
|
1205
|
+
|
|
1121
1206
|
/** Translated folder-path labels for the Personal/Shared/Public deployment groupings. */
|
|
1122
1207
|
export declare interface DeploymentFolderLabels {
|
|
1123
1208
|
personal: string;
|
|
@@ -1135,16 +1220,14 @@ export declare interface DeploymentGenerationApiSupport {
|
|
|
1135
1220
|
export declare interface DeploymentLimitsLabels {
|
|
1136
1221
|
/** Heading of the group every token stat row is listed under. */
|
|
1137
1222
|
tokenGroup: string;
|
|
1138
|
-
/** Label for the
|
|
1223
|
+
/** Label for the current-UTC-day token row, e.g. "Today". */
|
|
1139
1224
|
tokensPerDay: string;
|
|
1140
|
-
/** Label for the
|
|
1225
|
+
/** Label for the current-UTC-week token row, e.g. "This week". */
|
|
1141
1226
|
tokensPerWeek: string;
|
|
1142
|
-
/** Label for the
|
|
1227
|
+
/** Label for the current-UTC-month token row, e.g. "This month". */
|
|
1143
1228
|
tokensPerMonth: string;
|
|
1144
1229
|
/** Note shown instead of a total on a row whose limit follows the cost limit. */
|
|
1145
1230
|
followsCostLimit: string;
|
|
1146
|
-
/** Formats the "$X spent" caption under a row's label. */
|
|
1147
|
-
formatSpentCaption: (amount: string) => string;
|
|
1148
1231
|
/** Formats the combined used/total display value for a capped row. */
|
|
1149
1232
|
formatValueLabel: (used: string, total: string) => string;
|
|
1150
1233
|
/** Formats the ARIA label for a capped progress row. */
|
|
@@ -1158,6 +1241,8 @@ export declare interface DeploymentLimitsLabels {
|
|
|
1158
1241
|
label: string;
|
|
1159
1242
|
used: string;
|
|
1160
1243
|
}) => string;
|
|
1244
|
+
/** Formats each period's `resetsAt` into the row's reset line. Omit it to render rows without one. */
|
|
1245
|
+
formatResetTime?: FormatResetTime;
|
|
1161
1246
|
}
|
|
1162
1247
|
|
|
1163
1248
|
export declare const deriveActionProfile: (variant: DialFileManagerVariant) => DialFileManagerActionProfile;
|
|
@@ -1184,7 +1269,7 @@ export declare const deriveAvailableTabIds: <T extends CatalogEntityType>(items:
|
|
|
1184
1269
|
export declare const deriveConversationRowActionState: (item: Pick<ConversationListItemDto, "sharedWithMe" | "publishedWithMe" | "isReadonly">, publishHistory: PublishHistoryEntry[] | undefined, recipients: RecipientsCountEntry) => ConversationRowActionState;
|
|
1185
1270
|
|
|
1186
1271
|
/**
|
|
1187
|
-
* Returns items marked as a user favorite, in original order.
|
|
1272
|
+
* Returns items marked as a user favorite that are not hidden, in original order.
|
|
1188
1273
|
*/
|
|
1189
1274
|
export declare const deriveFavoriteItems: (items: readonly CatalogItem[]) => CatalogItem[];
|
|
1190
1275
|
|
|
@@ -1193,15 +1278,24 @@ export declare const deriveFavoriteItems: (items: readonly CatalogItem[]) => Cat
|
|
|
1193
1278
|
* Unsupported constraints remain Custom, with the full source expression.
|
|
1194
1279
|
* Calendar-month shifts crossing month boundaries or days 29–31 remain
|
|
1195
1280
|
* Custom because a shifted monthly day is not equivalent around short months.
|
|
1281
|
+
* The one exception is `day: 'last'` one day behind local time, which is
|
|
1282
|
+
* exactly the local 1st.
|
|
1196
1283
|
*/
|
|
1197
1284
|
export declare const describeScheduledTaskTrigger: (trigger: ScheduleTriggerDto, { timeZone, referenceDate, }?: ScheduledTaskTriggerDescriptionOptions) => ScheduledTaskTriggerDescription;
|
|
1198
1285
|
|
|
1286
|
+
/** Source tabs `useDialFileManagerSections` can merge into the All tab, in display order. */
|
|
1287
|
+
export declare const DIAL_FILE_MANAGER_SECTION_TABS: readonly DialFileManagerTabs[];
|
|
1288
|
+
|
|
1199
1289
|
/** Strip the "files/{bucket}/" prefix from a DIAL Core URL to get the path within the bucket. */
|
|
1200
1290
|
export declare const dialCorePathToRelative: (dialCorePath: string, bucket: string) => string;
|
|
1201
1291
|
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1292
|
+
/** One source tab rendered as a top-level folder of the All view. */
|
|
1293
|
+
export declare interface DialFileManagerSection {
|
|
1294
|
+
/** Source tab backing this section — `MyFiles`, `Shared` or `Organization`. */
|
|
1295
|
+
tab: DialFileManagerTabs;
|
|
1296
|
+
/** 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. */
|
|
1297
|
+
rootLabel: string;
|
|
1298
|
+
}
|
|
1205
1299
|
|
|
1206
1300
|
/**
|
|
1207
1301
|
* Operation port every file-manager hook that performs network I/O accepts as
|
|
@@ -1378,6 +1472,62 @@ export declare const encodeDeploymentId: (id: string) => string;
|
|
|
1378
1472
|
*/
|
|
1379
1473
|
export declare const encodeToolsetId: (id: string) => string;
|
|
1380
1474
|
|
|
1475
|
+
/**
|
|
1476
|
+
* Overview section titles and spec labels rendered by
|
|
1477
|
+
* `mapEntityDetailsToCatalogDetails`. Hosts pass translated strings; every
|
|
1478
|
+
* field defaults to the English text in {@link DEFAULT_ENTITY_DETAILS_LABELS}.
|
|
1479
|
+
*/
|
|
1480
|
+
export declare interface EntityDetailsLabels {
|
|
1481
|
+
/** Default: `'Capabilities'`. */
|
|
1482
|
+
capabilitiesTitle: string;
|
|
1483
|
+
/** Default: `'Specification'`. */
|
|
1484
|
+
specificationTitle: string;
|
|
1485
|
+
/** Default: `'Configuration'`. */
|
|
1486
|
+
configurationTitle: string;
|
|
1487
|
+
/** Default: `'Tools'`. */
|
|
1488
|
+
tools: string;
|
|
1489
|
+
/** Default: `'Parallel tool calls'`. */
|
|
1490
|
+
parallelToolCalls: string;
|
|
1491
|
+
/** Default: `'Reasoning efforts'`. */
|
|
1492
|
+
reasoningEfforts: string;
|
|
1493
|
+
/** Default: `'Skills'`. */
|
|
1494
|
+
skills: string;
|
|
1495
|
+
/** Default: `'Provider'`. */
|
|
1496
|
+
provider: string;
|
|
1497
|
+
/** Default: `'Vendor'`. */
|
|
1498
|
+
vendor: string;
|
|
1499
|
+
/** Default: `'License'`. */
|
|
1500
|
+
license: string;
|
|
1501
|
+
/** Default: `'Knowledge cutoff date'`. */
|
|
1502
|
+
knowledgeCutoffDate: string;
|
|
1503
|
+
/** Default: `'Parameters'`. */
|
|
1504
|
+
parameters: string;
|
|
1505
|
+
/** Default: `'Hosted by'`. */
|
|
1506
|
+
hostedBy: string;
|
|
1507
|
+
/** Default: `'Release date'`. */
|
|
1508
|
+
releaseDate: string;
|
|
1509
|
+
/** Default: `'Context window'`. */
|
|
1510
|
+
contextWindow: string;
|
|
1511
|
+
/** Default: `'Max output tokens'`. */
|
|
1512
|
+
maxOutputTokens: string;
|
|
1513
|
+
/** Default: `'Input modalities'`. */
|
|
1514
|
+
inputModalities: string;
|
|
1515
|
+
/** Default: `'Input attachments'`. */
|
|
1516
|
+
inputAttachments: string;
|
|
1517
|
+
/** Default: `'Routes'`. */
|
|
1518
|
+
routes: string;
|
|
1519
|
+
/** Default: `'Configuration schema'`. */
|
|
1520
|
+
configurationSchema: string;
|
|
1521
|
+
/** Default: `'Authentication'`. */
|
|
1522
|
+
authentication: string;
|
|
1523
|
+
/** Default: `'Authorization endpoint'`. */
|
|
1524
|
+
authorizationEndpoint: string;
|
|
1525
|
+
/** Default: `'Token endpoint'`. */
|
|
1526
|
+
tokenEndpoint: string;
|
|
1527
|
+
/** Default: `'OAuth scopes'`. */
|
|
1528
|
+
oauthScopes: string;
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1381
1531
|
/** Discriminated-union entity details for a deployment, keyed by catalog entity type. */
|
|
1382
1532
|
export declare type EntitySpecificDetails = {
|
|
1383
1533
|
type: 'MODEL';
|
|
@@ -1535,7 +1685,9 @@ export declare enum FileManagerNotificationReason {
|
|
|
1535
1685
|
/** `onUploadArchive` extracted some entries successfully and some failed; `count`/`names`/`restCount` describe the failures. */
|
|
1536
1686
|
UploadArchivePartiallyFailed = "uploadArchivePartiallyFailed",
|
|
1537
1687
|
/** `onUploadArchive`'s `uploadArchive` request itself rejected. */
|
|
1538
|
-
UploadArchiveRequestFailed = "uploadArchiveRequestFailed"
|
|
1688
|
+
UploadArchiveRequestFailed = "uploadArchiveRequestFailed",
|
|
1689
|
+
/** A copy/move targeted a destination in a different All-view section from its source items; no request was made. */
|
|
1690
|
+
CrossSectionTransferUnsupported = "crossSectionTransferUnsupported"
|
|
1539
1691
|
}
|
|
1540
1692
|
|
|
1541
1693
|
/**
|
|
@@ -1556,8 +1708,6 @@ export declare type FileNameValidationError = {
|
|
|
1556
1708
|
} | {
|
|
1557
1709
|
reason: FileNameValidationErrorReason.DuplicateName;
|
|
1558
1710
|
existingName: string;
|
|
1559
|
-
} | {
|
|
1560
|
-
reason: FileNameValidationErrorReason.LeadingDot;
|
|
1561
1711
|
};
|
|
1562
1712
|
|
|
1563
1713
|
/**
|
|
@@ -1570,8 +1720,7 @@ export declare enum FileNameValidationErrorReason {
|
|
|
1570
1720
|
ForbiddenSymbols = "forbiddenSymbols",
|
|
1571
1721
|
ReservedName = "reservedName",
|
|
1572
1722
|
TooLong = "tooLong",
|
|
1573
|
-
DuplicateName = "duplicateName"
|
|
1574
|
-
LeadingDot = "leadingDot"
|
|
1723
|
+
DuplicateName = "duplicateName"
|
|
1575
1724
|
}
|
|
1576
1725
|
|
|
1577
1726
|
/**
|
|
@@ -1588,7 +1737,10 @@ export declare enum FileOperationKind {
|
|
|
1588
1737
|
FileCopied = "fileCopied",
|
|
1589
1738
|
FilesCopied = "filesCopied",
|
|
1590
1739
|
FileMoved = "fileMoved",
|
|
1591
|
-
FilesMoved = "filesMoved"
|
|
1740
|
+
FilesMoved = "filesMoved",
|
|
1741
|
+
/** A copy whose every item landed in its own source folder (Duplicate). */
|
|
1742
|
+
FileDuplicated = "fileDuplicated",
|
|
1743
|
+
FilesDuplicated = "filesDuplicated"
|
|
1592
1744
|
}
|
|
1593
1745
|
|
|
1594
1746
|
/**
|
|
@@ -1603,13 +1755,15 @@ export declare interface FileOperationSuccessEvent {
|
|
|
1603
1755
|
name?: string;
|
|
1604
1756
|
/** Number of items the operation covered, when applicable. */
|
|
1605
1757
|
count?: number;
|
|
1606
|
-
/**
|
|
1758
|
+
/**
|
|
1759
|
+
* Destination folder as a slash-joined virtual path starting at the root
|
|
1760
|
+
* label (e.g. `My files/reports`), for copy/move/duplicate operations.
|
|
1761
|
+
*/
|
|
1607
1762
|
destinationFolderName?: string;
|
|
1608
1763
|
/**
|
|
1609
|
-
* Whether the affected item is a folder rather than a file.
|
|
1610
|
-
*
|
|
1611
|
-
*
|
|
1612
|
-
* "File renamed").
|
|
1764
|
+
* Whether the affected item is a folder rather than a file. Set for rename,
|
|
1765
|
+
* copy, move, and duplicate events; on a multi-item event it describes the
|
|
1766
|
+
* first successfully affected item (the one `name` refers to).
|
|
1613
1767
|
*/
|
|
1614
1768
|
isFolder?: boolean;
|
|
1615
1769
|
}
|
|
@@ -1644,8 +1798,6 @@ export declare interface FilesApiClient {
|
|
|
1644
1798
|
listSharedByMe: (bucket: string) => Promise<ListFilesResponseDto>;
|
|
1645
1799
|
}
|
|
1646
1800
|
|
|
1647
|
-
export { FileUploadValidationResult }
|
|
1648
|
-
|
|
1649
1801
|
/**
|
|
1650
1802
|
* Filters catalog items to those whose type is in `visibleTypes`.
|
|
1651
1803
|
* Call only when selector mode is active; otherwise pass through the original array.
|
|
@@ -1667,6 +1819,12 @@ export declare const filterHiddenOwnedItems: (items: readonly CatalogItem[], hid
|
|
|
1667
1819
|
*/
|
|
1668
1820
|
export declare const findDeploymentByIdOrReference: (deployments: DeploymentItemDto[], idOrReference: string | null | undefined) => DeploymentItemDto | undefined;
|
|
1669
1821
|
|
|
1822
|
+
/**
|
|
1823
|
+
* Returns the deployment a conversation belongs to, resolved from its id
|
|
1824
|
+
* alone, or `undefined` when no candidate matches `deployments`.
|
|
1825
|
+
*/
|
|
1826
|
+
export declare const findDeploymentForConversationId: (deployments: DeploymentItemDto[], conversationId: string) => DeploymentItemDto | undefined;
|
|
1827
|
+
|
|
1670
1828
|
export declare const findDialFileByPath: (nodes: DialFile[], targetPath: string) => DialFile | undefined;
|
|
1671
1829
|
|
|
1672
1830
|
export declare const findFirstSuccessfulCopyMoveItem: <TDto extends {
|
|
@@ -1721,7 +1879,19 @@ export declare class GenerationConflictError extends Error {
|
|
|
1721
1879
|
constructor(message?: string);
|
|
1722
1880
|
}
|
|
1723
1881
|
|
|
1724
|
-
/**
|
|
1882
|
+
/** Identifies a failed terminal save independently of the model's generation outcome. */
|
|
1883
|
+
export declare class GenerationPersistenceError extends Error {
|
|
1884
|
+
static readonly type = "conversation_save_failed";
|
|
1885
|
+
/** HTTP status of the rejected terminal write, when the backend reported one. */
|
|
1886
|
+
readonly status?: number;
|
|
1887
|
+
/**
|
|
1888
|
+
* Creates the error with the default persistence message.
|
|
1889
|
+
* @param status - HTTP status of the rejected terminal write, if known
|
|
1890
|
+
*/
|
|
1891
|
+
constructor(status?: number);
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
/** Normalizes any API error into a `{ status?, message, traceId?, code?, upstreamCode?, upstreamMessage? }` shape. */
|
|
1725
1895
|
export declare const getApiErrorDetails: (error: unknown) => Promise<ApiErrorDetails>;
|
|
1726
1896
|
|
|
1727
1897
|
/** Resolves a human-readable message from an API error's response body, or falls back to `Error.message`. */
|
|
@@ -1756,6 +1926,21 @@ export declare const getConversationSource: (item: Pick<ConversationListItemDto,
|
|
|
1756
1926
|
*/
|
|
1757
1927
|
export declare const getExternalServiceFallbackName: (serviceName: string) => string;
|
|
1758
1928
|
|
|
1929
|
+
/**
|
|
1930
|
+
* Returns the tool values the conversation's last message sets through its
|
|
1931
|
+
* `form_schema`, restricted to `toolIds`, plus a key identifying that exact
|
|
1932
|
+
* application. `undefined` when the last message is not an assistant message
|
|
1933
|
+
* or sets no known tool.
|
|
1934
|
+
*
|
|
1935
|
+
* Streamed chunks and reloads re-create an identical `form_schema`; comparing
|
|
1936
|
+
* keys rather than object identity applies an app's value once and leaves a
|
|
1937
|
+
* later user toggle alone until the app sends a different value.
|
|
1938
|
+
*/
|
|
1939
|
+
export declare const getFormSchemaToolSyncKey: (conversationId: string, messages: Message[], toolIds: readonly string[]) => {
|
|
1940
|
+
key: string;
|
|
1941
|
+
values: Record<string, boolean>;
|
|
1942
|
+
} | undefined;
|
|
1943
|
+
|
|
1759
1944
|
/**
|
|
1760
1945
|
* Returns the deployment the conversation was last running on: scanning
|
|
1761
1946
|
* backwards, the `new_deployment_id` of a `model_changed` status message or
|
|
@@ -1766,7 +1951,7 @@ export declare const getExternalServiceFallbackName: (serviceName: string) => st
|
|
|
1766
1951
|
* an edit truncates past one: the marker is appended at the end of the
|
|
1767
1952
|
* timeline, so truncating at an earlier message drops it, and the model the
|
|
1768
1953
|
* user picked reverted on the next page load even though the answer had been
|
|
1769
|
-
* regenerated on it (
|
|
1954
|
+
* regenerated on it ([#8712](https://github.com/epam/ai-dial-chat/issues/8712)). The assistant message the backend writes
|
|
1770
1955
|
* carries the deployment that produced it, which survives that truncation
|
|
1771
1956
|
* because it *is* the regenerated message.
|
|
1772
1957
|
*/
|
|
@@ -1779,6 +1964,21 @@ export declare const getLastDeploymentId: (messages: Message[]) => string | null
|
|
|
1779
1964
|
*/
|
|
1780
1965
|
export declare const getLastUserMessageToolConfiguration: (messages: Message[]) => Record<string, unknown> | undefined;
|
|
1781
1966
|
|
|
1967
|
+
/**
|
|
1968
|
+
* Returns the tool configuration a (re-)loaded conversation should show: the
|
|
1969
|
+
* last user message's `configuration_value`, overlaid in order by the
|
|
1970
|
+
* `form_schema` values of the assistant messages after it. An app that turned
|
|
1971
|
+
* a toggle off in its final response must not see it re-armed on reload just
|
|
1972
|
+
* because the user message that started the run had it on.
|
|
1973
|
+
*/
|
|
1974
|
+
export declare const getLatestToolConfiguration: (messages: Message[]) => Record<string, unknown> | undefined;
|
|
1975
|
+
|
|
1976
|
+
/**
|
|
1977
|
+
* Returns every deployment id a conversation id may belong to, longest first,
|
|
1978
|
+
* or an empty array when the format is unrecognised.
|
|
1979
|
+
*/
|
|
1980
|
+
export declare const getModelIdCandidatesFromConversationId: (id: string) => string[];
|
|
1981
|
+
|
|
1782
1982
|
/**
|
|
1783
1983
|
* Extracts the deployment/model ID from a DIAL Core conversation ID.
|
|
1784
1984
|
*
|
|
@@ -1806,8 +2006,6 @@ export declare const getLastUserMessageToolConfiguration: (messages: Message[])
|
|
|
1806
2006
|
*/
|
|
1807
2007
|
export declare const getModelIdFromConversationId: (id: string) => string | undefined;
|
|
1808
2008
|
|
|
1809
|
-
export { getParentFolderPath }
|
|
1810
|
-
|
|
1811
2009
|
/**
|
|
1812
2010
|
* The publish folder a public catalog entity id sits in: the segments between
|
|
1813
2011
|
* the `public` bucket and the entity name, decoded to the plain text the
|
|
@@ -1826,6 +2024,12 @@ export declare const getQuickAppConversationStarters: (conversationStarters: unk
|
|
|
1826
2024
|
*/
|
|
1827
2025
|
export declare const getRemainingCharacters: (value: string, maxLength: number) => number | null;
|
|
1828
2026
|
|
|
2027
|
+
/** Returns the schemas that create schema-based apps: unique by id, without id-less entries or the custom-app schema. */
|
|
2028
|
+
export declare const getRunnerSchemas: <T extends QuickAppSchemaLike>(schemas: T[]) => RunnerSchema<T>[];
|
|
2029
|
+
|
|
2030
|
+
/** Returns the limit each over-long skill field exceeds, keyed by field; fields within their limit are omitted. */
|
|
2031
|
+
export declare const getSkillFieldLengthViolations: (values: Record<SkillTextField, string>) => Partial<Record<SkillTextField, number>>;
|
|
2032
|
+
|
|
1829
2033
|
/**
|
|
1830
2034
|
* Returns the text to start/populate a conversation from a selected starter button.
|
|
1831
2035
|
* `description` (the schema property's shared intro/question text) is used only
|
|
@@ -1879,6 +2083,15 @@ export declare const getStarterSubmitText: (starter: StarterOption, description?
|
|
|
1879
2083
|
*/
|
|
1880
2084
|
export declare const getTimeOfDayGreeting: (hour: number, translations: GreetingTranslations, firstName?: string) => string;
|
|
1881
2085
|
|
|
2086
|
+
/**
|
|
2087
|
+
* Returns the boolean values an assistant message's `form_schema` sets, keyed
|
|
2088
|
+
* by property name, or `undefined` when no property resolves to a boolean.
|
|
2089
|
+
* Lets a DIAL app switch a tools-menu toggle (e.g. `deep_research`) per
|
|
2090
|
+
* message — on while a run is in progress, off once its result is delivered.
|
|
2091
|
+
* Not filtered by tool id: `restoreToolConfiguration` ignores unknown ids.
|
|
2092
|
+
*/
|
|
2093
|
+
export declare const getToolConfigurationFromFormSchema: (formSchema: DeploymentConfigurationSchema | undefined) => Record<string, boolean> | undefined;
|
|
2094
|
+
|
|
1882
2095
|
/** Name of the same-origin `BroadcastChannel` shared by an OAuth flow's opener and its callback popup. */
|
|
1883
2096
|
export declare const getToolsetOAuthChannelName: (flowId: string) => string;
|
|
1884
2097
|
|
|
@@ -1955,6 +2168,9 @@ export declare const hasDialFileWritePermission: (folder?: DialFile) => boolean;
|
|
|
1955
2168
|
|
|
1956
2169
|
export declare const hasForbiddenNameSymbols: (name: string, forbiddenSymbolsRegExp?: RegExp) => boolean;
|
|
1957
2170
|
|
|
2171
|
+
/** Returns `true` when both sets contain exactly the same paths. */
|
|
2172
|
+
export declare const hasSamePaths: (a: ReadonlySet<string>, b: ReadonlySet<string>) => boolean;
|
|
2173
|
+
|
|
1958
2174
|
/**
|
|
1959
2175
|
* Whether the operator configured the structured banner (title and/or
|
|
1960
2176
|
* description) rather than only the legacy HTML message. Drives which of the
|
|
@@ -1966,10 +2182,16 @@ export declare const hasStructuredAnnouncement: ({ title, description, }: Announ
|
|
|
1966
2182
|
declare interface HtmlCanvasContent {
|
|
1967
2183
|
/** Discriminates the content type to select the correct renderer. */
|
|
1968
2184
|
type: AttachmentContentType.Html;
|
|
1969
|
-
/** Full HTML text rendered via `srcdoc` in a sandboxed iframe.
|
|
2185
|
+
/** 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
2186
|
srcdoc?: string;
|
|
1971
|
-
/**
|
|
2187
|
+
/** 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
2188
|
url?: string;
|
|
2189
|
+
/** 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. */
|
|
2190
|
+
isSameOriginUrl?: boolean;
|
|
2191
|
+
/** 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. */
|
|
2192
|
+
resolveSourceText?: () => Promise<string>;
|
|
2193
|
+
/** 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`. */
|
|
2194
|
+
srcdocHostUrl?: string;
|
|
1973
2195
|
}
|
|
1974
2196
|
|
|
1975
2197
|
/** Content payload for image attachments. */
|
|
@@ -2003,11 +2225,12 @@ export declare const initiateOAuthLogin: (auth: ToolsetOAuthSettings, toolsetId:
|
|
|
2003
2225
|
export declare const isAnswerIncomplete: (answer: Message | undefined) => boolean;
|
|
2004
2226
|
|
|
2005
2227
|
/**
|
|
2006
|
-
* True when the conversation
|
|
2007
|
-
* placeholder: the backend only persists a
|
|
2008
|
-
* (empty placeholder) and at generation end
|
|
2009
|
-
* flagged `streamErrorMessage`/`wasStoppedByUser`)
|
|
2010
|
-
* generation
|
|
2228
|
+
* True when the conversation has a pending background message, or its last
|
|
2229
|
+
* message is an unresolved assistant placeholder: the backend only persists a
|
|
2230
|
+
* conversation at generation start (empty placeholder) and at generation end
|
|
2231
|
+
* (final content, or a partial flagged `streamErrorMessage`/`wasStoppedByUser`).
|
|
2232
|
+
* This can mean generation is still active elsewhere, or that its terminal save
|
|
2233
|
+
* failed.
|
|
2011
2234
|
*/
|
|
2012
2235
|
export declare const isAwaitingGenerationResume: (conversation: Conversation) => boolean;
|
|
2013
2236
|
|
|
@@ -2083,6 +2306,9 @@ export declare const isQuickAppSchema: (schema?: QuickAppSchemaLike) => boolean;
|
|
|
2083
2306
|
/** Share/Unshare/Remove access are Full-only — Browse and Attach never expose them. */
|
|
2084
2307
|
export declare const isShareActionsAllowed: (actionProfile: DialFileManagerActionProfile) => boolean;
|
|
2085
2308
|
|
|
2309
|
+
/** Whether a skill-relative path is a folder marker (`<folder>/.dial_folder`, never a root-level `.dial_folder`). */
|
|
2310
|
+
export declare const isSkillFolderMarkerPath: (path: string) => boolean;
|
|
2311
|
+
|
|
2086
2312
|
/** True when `value` is a well-formed absolute `http(s)://` URL. */
|
|
2087
2313
|
export declare const isValidAbsoluteUrl: (value: string) => boolean;
|
|
2088
2314
|
|
|
@@ -2093,7 +2319,10 @@ export declare const isValidFeaturesData: (value: string) => boolean;
|
|
|
2093
2319
|
* Client-side mirror of the backend's `isValidSkillRelativePath`
|
|
2094
2320
|
* (`apps/chat-api/src/skills/utils/skill-path.util.ts`), used only for
|
|
2095
2321
|
* immediate inline feedback — the server remains authoritative and may still
|
|
2096
|
-
* reject a path this function accepts.
|
|
2322
|
+
* reject a path this function accepts. It additionally reserves the
|
|
2323
|
+
* `.dial_folder` marker name so a user can never upload or name a folder
|
|
2324
|
+
* after it; the save payload's generated markers never pass through here
|
|
2325
|
+
* (the server accepts them only as a zero-byte final segment).
|
|
2097
2326
|
*/
|
|
2098
2327
|
export declare const isValidSkillRelativePath: (relativePath: string) => boolean;
|
|
2099
2328
|
|
|
@@ -2142,8 +2371,8 @@ export declare const mapDeploymentDetailsDtoToEntityDetails: (dto: DeploymentDet
|
|
|
2142
2371
|
/** Maps a deployment limits DTO to display-ready catalog limits, or `undefined` when no qualifying stats exist. */
|
|
2143
2372
|
export declare const mapDeploymentLimitsDtoToCatalogLimits: (dto: DeploymentLimitsResponseDto | undefined, labels: DeploymentLimitsLabels) => CatalogItemLimits | undefined;
|
|
2144
2373
|
|
|
2145
|
-
/** Maps
|
|
2146
|
-
export declare const mapDeploymentLimitsToInput: (dto: DeploymentLimitsResponseDto | undefined) =>
|
|
2374
|
+
/** 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. */
|
|
2375
|
+
export declare const mapDeploymentLimitsToInput: (dto: DeploymentLimitsResponseDto | undefined, labels: ConversationInputLimitsLabels, formatResetTime?: FormatResetTime) => CatalogItemLimits | undefined;
|
|
2147
2376
|
|
|
2148
2377
|
/** Maps a deployment listing row into the catalog UI's `CatalogItem` shape. */
|
|
2149
2378
|
export declare const mapDeploymentToCatalogItem: (deployment: DeploymentItemDto, { favoriteIds, entityDetails, folderLabels, editableSchemaIds, isCustomAppsEditable, activeLocale, primaryLocale, resolveIconUrl, }: MapDeploymentToCatalogItemOptions) => CatalogItem;
|
|
@@ -2185,10 +2414,11 @@ export declare const mapDeploymentToolsetCredentials: (toolsetId: string, authSe
|
|
|
2185
2414
|
|
|
2186
2415
|
/**
|
|
2187
2416
|
* Converts a strongly-typed entity domain model into the lib's `CatalogItemTabData` shape.
|
|
2188
|
-
*
|
|
2189
|
-
*
|
|
2417
|
+
* Section titles and spec labels come from `labels`, merged over
|
|
2418
|
+
* {@link DEFAULT_ENTITY_DETAILS_LABELS} — the lib cannot import a host's
|
|
2419
|
+
* translation keys, so the host passes its translated strings in.
|
|
2190
2420
|
*/
|
|
2191
|
-
export declare const mapEntityDetailsToCatalogDetails: (details: EntitySpecificDetails) => CatalogItemTabData;
|
|
2421
|
+
export declare const mapEntityDetailsToCatalogDetails: (details: EntitySpecificDetails, labels?: Partial<EntityDetailsLabels>) => CatalogItemTabData;
|
|
2192
2422
|
|
|
2193
2423
|
/**
|
|
2194
2424
|
* Overlays a `FileMetadataResponseDto` response onto the clicked grid row so
|
|
@@ -2209,9 +2439,8 @@ export declare const mapFileMetadataToDialFile: (metadata: FileMetadataResponseD
|
|
|
2209
2439
|
export declare const mapFormValuesToCreateBody: (values: ScheduledTaskCreateFormValues) => CreateScheduledTaskBodyDto;
|
|
2210
2440
|
|
|
2211
2441
|
/**
|
|
2212
|
-
* Maps validated edit
|
|
2213
|
-
*
|
|
2214
|
-
* `CreateScheduledTaskBodyDto`, so this reuses the same trigger-building logic.
|
|
2442
|
+
* Maps a complete, validated edit draft to an update body. An unset skill
|
|
2443
|
+
* emits null to remove the saved reference; hydrate from detail before editing.
|
|
2215
2444
|
*/
|
|
2216
2445
|
export declare const mapFormValuesToUpdateBody: (values: ScheduledTaskCreateFormValues) => UpdateScheduledTaskBodyDto;
|
|
2217
2446
|
|
|
@@ -2281,9 +2510,12 @@ export declare interface MapSkillToCatalogItemOptions {
|
|
|
2281
2510
|
}
|
|
2282
2511
|
|
|
2283
2512
|
/**
|
|
2284
|
-
* Returns the normalized stages of a raw stage array or a
|
|
2285
|
-
* payload (reading `custom_content.stages`, falling back to
|
|
2286
|
-
* `customContent.stages`), or `undefined` when there are none.
|
|
2513
|
+
* Returns the normalized stages of a complete raw stage array or a
|
|
2514
|
+
* message-like payload (reading `custom_content.stages`, falling back to
|
|
2515
|
+
* `customContent.stages`), or `undefined` when there are none. An entry
|
|
2516
|
+
* without an `index` takes its array position — the identity a complete
|
|
2517
|
+
* non-streaming array's `parent_stage_index` refers to — while explicit
|
|
2518
|
+
* (possibly sparse) indexes are kept. Not for partial stream deltas.
|
|
2287
2519
|
*/
|
|
2288
2520
|
export declare const mapStages: (source: RawStage[] | RawStageSource | null | undefined) => Stage[] | undefined;
|
|
2289
2521
|
|
|
@@ -2320,9 +2552,10 @@ export declare interface MapToolsetToCatalogItemOptions {
|
|
|
2320
2552
|
export declare const mapUsageDataToDashboard: (usage: UserLimitStatsResponseDto | undefined, t: Translate, formatResetTime: FormatResetTime) => UsageLimitCardData[];
|
|
2321
2553
|
|
|
2322
2554
|
/**
|
|
2323
|
-
* Maps `usage.deployments` into `ModelLimitsSection`'s `rows` prop, joined with model
|
|
2324
|
-
* from `deploymentItems`. Rows are included only when any displayed period stat has nonzero
|
|
2325
|
-
* Order follows `Object.keys(deployments)` —
|
|
2555
|
+
* Maps `usage.deployments` into `ModelLimitsSection`'s `rows` prop, joined with model or application
|
|
2556
|
+
* identity from `deploymentItems`. Rows are included only when any displayed period stat has nonzero
|
|
2557
|
+
* usage (Cost stats only, for an application). Order follows `Object.keys(deployments)` —
|
|
2558
|
+
* `deploymentItems` is enrichment-only.
|
|
2326
2559
|
*
|
|
2327
2560
|
* @param resolveIconUrl - Resolves a deployment's raw `iconUrl` to the URL the avatar should load.
|
|
2328
2561
|
* @param resolveDisplayName - Resolves a localized-text map or plain string to the display name for `activeLocale`.
|
|
@@ -2489,6 +2722,15 @@ export declare enum McpResourceKind {
|
|
|
2489
2722
|
|
|
2490
2723
|
export declare const mergeCreatedFolderIntoCache: (cache: Map<string, ListFilesItemDto[]>, parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => Map<string, ListFilesItemDto[]>;
|
|
2491
2724
|
|
|
2725
|
+
/**
|
|
2726
|
+
* Merges a freshly-fetched page 0 into the currently-loaded run list: an
|
|
2727
|
+
* already-known id is replaced in place at its existing array position, an
|
|
2728
|
+
* unseen id is prepended (upstream order is `created_at desc`, so it is the
|
|
2729
|
+
* newest), and an id absent from `incoming` is left untouched — a background
|
|
2730
|
+
* refresh never removes a loaded run.
|
|
2731
|
+
*/
|
|
2732
|
+
export declare const mergeRunsById: (current: ScheduledTaskRunDto[], incoming: ScheduledTaskRunDto[]) => ScheduledTaskRunDto[];
|
|
2733
|
+
|
|
2492
2734
|
/**
|
|
2493
2735
|
* Merges incoming stage deltas into an existing stage list, keyed by `index`.
|
|
2494
2736
|
*
|
|
@@ -2514,6 +2756,20 @@ export declare interface MessagePair {
|
|
|
2514
2756
|
assistantMessage: Message;
|
|
2515
2757
|
}
|
|
2516
2758
|
|
|
2759
|
+
/** A stable snapshot of one eligible native text selection. */
|
|
2760
|
+
export declare interface MessageSelectionReplySnapshot {
|
|
2761
|
+
/** Scope that owned the selection when it was captured. */
|
|
2762
|
+
conversationId: string;
|
|
2763
|
+
/** Message text root containing the captured range. */
|
|
2764
|
+
body: HTMLDivElement;
|
|
2765
|
+
/** Captured native range. */
|
|
2766
|
+
range: Range;
|
|
2767
|
+
/** Native selected text preserved for the generated file. */
|
|
2768
|
+
text: string;
|
|
2769
|
+
/** Visible fragment of the selected range. */
|
|
2770
|
+
rect: DOMRect;
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2517
2773
|
/** Formats MIME types as a human-readable, comma-separated list of dotted extensions (or the MIME type itself for wildcards). */
|
|
2518
2774
|
export declare const mimeTypesToAttachmentExtensionLabels: (types: string[]) => string;
|
|
2519
2775
|
|
|
@@ -2552,6 +2808,7 @@ export declare interface ModelCapabilities {
|
|
|
2552
2808
|
hasResume?: boolean;
|
|
2553
2809
|
hasChatCompletion?: boolean;
|
|
2554
2810
|
hasResponsesApi?: boolean;
|
|
2811
|
+
hasSkills?: boolean;
|
|
2555
2812
|
reasoningEfforts?: string[];
|
|
2556
2813
|
}
|
|
2557
2814
|
|
|
@@ -2575,6 +2832,8 @@ export declare interface ModelPriceRow {
|
|
|
2575
2832
|
export declare interface ModelPricing {
|
|
2576
2833
|
/** Every price DIAL Core reports for the deployment, `unit` excluded. */
|
|
2577
2834
|
prices?: ModelPriceRow[];
|
|
2835
|
+
/** DIAL Core billing unit the prices are quoted in, e.g. `token` or `char_without_whitespace`; absent means tokens. */
|
|
2836
|
+
unit?: string;
|
|
2578
2837
|
}
|
|
2579
2838
|
|
|
2580
2839
|
/** Catalog-facing specification fields for a model deployment. */
|
|
@@ -2591,18 +2850,6 @@ export declare interface ModelSpecification {
|
|
|
2591
2850
|
createdAt?: number;
|
|
2592
2851
|
}
|
|
2593
2852
|
|
|
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
2853
|
/** Returns a skill relative path's final segment (its display name in the file tree). */
|
|
2607
2854
|
export declare const nameFromPath: (path: string) => string;
|
|
2608
2855
|
|
|
@@ -2614,6 +2861,20 @@ export declare const nameFromPath: (path: string) => string;
|
|
|
2614
2861
|
*/
|
|
2615
2862
|
export declare const navigateToolsetOAuthPopup: (popup: Window, auth: ToolsetOAuthSettings, toolsetId: string, callbackPath: string, credentialsLevel?: ToolsetCredentialsLevel, resourceKind?: OAuthResourceKind, offlineUsageConsent?: boolean) => ToolsetOAuthInitiationResult;
|
|
2616
2863
|
|
|
2864
|
+
/**
|
|
2865
|
+
* Encodes a deployment/application id to its single-encoded form regardless
|
|
2866
|
+
* of whether the value it received was already percent-encoded or the raw,
|
|
2867
|
+
* human-readable form — decoding first then re-encoding once is idempotent
|
|
2868
|
+
* either way, since `decodeDeploymentId` on a raw (unencoded) id is a no-op.
|
|
2869
|
+
* Use this instead of `encodeDeploymentId` at a boundary that cannot
|
|
2870
|
+
* guarantee which form it receives, such as a `postMessage` payload from the
|
|
2871
|
+
* settings iframe: calling `encodeDeploymentId` directly on a value the
|
|
2872
|
+
* sender already encoded escapes the existing `%` characters a second time
|
|
2873
|
+
* (`%20` becomes `%2520`), which the backend only ever undoes once and so
|
|
2874
|
+
* 404s on.
|
|
2875
|
+
*/
|
|
2876
|
+
export declare const normalizeDeploymentId: (id: string) => string;
|
|
2877
|
+
|
|
2617
2878
|
/**
|
|
2618
2879
|
* Normalises a stored response-format string to the current enum. Legacy data
|
|
2619
2880
|
* may contain `'Markdown'` or `'PlainText'` (capital-first) instead of the
|
|
@@ -2629,6 +2890,19 @@ export declare const normalizeResponseFormat: (value: string | undefined) => Res
|
|
|
2629
2890
|
*/
|
|
2630
2891
|
export declare const normalizeSkillName: (input: string) => string;
|
|
2631
2892
|
|
|
2893
|
+
/**
|
|
2894
|
+
* Encodes a toolset id to its single-encoded form regardless of whether the
|
|
2895
|
+
* value received it in was already percent-encoded or the raw,
|
|
2896
|
+
* human-readable form — decoding first then re-encoding once is idempotent
|
|
2897
|
+
* either way, since `decodeToolsetId` on a raw (unencoded) id is a no-op.
|
|
2898
|
+
* Use this instead of `encodeToolsetId` at a boundary that cannot guarantee
|
|
2899
|
+
* which form it receives, such as a `postMessage` payload from an embedded
|
|
2900
|
+
* iframe: calling `encodeToolsetId` directly on a value the sender already
|
|
2901
|
+
* encoded escapes the existing `%` characters a second time (`%20` becomes
|
|
2902
|
+
* `%2520`), which the backend only ever undoes once and so 404s on.
|
|
2903
|
+
*/
|
|
2904
|
+
export declare const normalizeToolsetId: (toolsetId: string) => string;
|
|
2905
|
+
|
|
2632
2906
|
export declare const normalizeVirtualPath: (value: string) => string;
|
|
2633
2907
|
|
|
2634
2908
|
/** Arguments handed to the host's exchange callback. */
|
|
@@ -2694,7 +2968,7 @@ declare interface OoxmlDocxHighlightLocation {
|
|
|
2694
2968
|
path: number[];
|
|
2695
2969
|
/** Inclusive start character offset within the story's matched text. */
|
|
2696
2970
|
start: number;
|
|
2697
|
-
/** Exclusive end character offset
|
|
2971
|
+
/** Exclusive end character offset — the wire's `end`, already exclusive, copied through unchanged. */
|
|
2698
2972
|
endExclusive: number;
|
|
2699
2973
|
/** The cited text, compared against the text resolved over `[start, endExclusive)`. */
|
|
2700
2974
|
text: string;
|
|
@@ -2758,7 +3032,7 @@ declare interface OoxmlPptxHighlightLocation {
|
|
|
2758
3032
|
shapeId: string;
|
|
2759
3033
|
/** Inclusive start character offset within the shape's matched text. */
|
|
2760
3034
|
start: number;
|
|
2761
|
-
/** Exclusive end character offset
|
|
3035
|
+
/** Exclusive end character offset — the wire's `end`, already exclusive, copied through unchanged. */
|
|
2762
3036
|
endExclusive: number;
|
|
2763
3037
|
/** The cited text, compared against the text resolved over `[start, endExclusive)`. */
|
|
2764
3038
|
text: string;
|
|
@@ -2938,7 +3212,7 @@ export declare interface PreparedCopyMoveItem<TDto> {
|
|
|
2938
3212
|
export declare const prepareDownloadDestination: (filename: string, mimeType?: string) => Promise<DownloadDestination>;
|
|
2939
3213
|
|
|
2940
3214
|
/**
|
|
2941
|
-
* Rename-vs-move disambiguation (design.md D3): entries whose parent folder
|
|
3215
|
+
* Rename-vs-move disambiguation (`openspec/changes/archive/2026-07-21-split-use-dial-file-manager/design.md` D3): entries whose parent folder
|
|
2942
3216
|
* is unchanged become `renameDtos`; entries whose parent folder changed
|
|
2943
3217
|
* become `preparedMoveItems`.
|
|
2944
3218
|
*/
|
|
@@ -3007,7 +3281,11 @@ export declare enum PromptSource {
|
|
|
3007
3281
|
Public = "public"
|
|
3008
3282
|
}
|
|
3009
3283
|
|
|
3010
|
-
/**
|
|
3284
|
+
/**
|
|
3285
|
+
* DIAL Core bucket holding organisation-wide skills.
|
|
3286
|
+
*
|
|
3287
|
+
* @deprecated Use `PUBLIC_BUCKET` from `@epam/ai-dial-chat-shared`.
|
|
3288
|
+
*/
|
|
3011
3289
|
export declare const PUBLIC_SKILL_BUCKET = "public";
|
|
3012
3290
|
|
|
3013
3291
|
/** The DIAL publish API surface produced by {@link createPublishApiClient}. */
|
|
@@ -3058,6 +3336,11 @@ export declare interface RawStage {
|
|
|
3058
3336
|
tag?: string | null;
|
|
3059
3337
|
/** Files produced or referenced by this stage. */
|
|
3060
3338
|
attachments?: RawStageAttachment[] | null;
|
|
3339
|
+
/**
|
|
3340
|
+
* `index` of the parent stage (its array position in a complete unindexed
|
|
3341
|
+
* array). Nullish means top level; `0` is a valid parent.
|
|
3342
|
+
*/
|
|
3343
|
+
parent_stage_index?: number | null;
|
|
3061
3344
|
}
|
|
3062
3345
|
|
|
3063
3346
|
/**
|
|
@@ -3258,9 +3541,18 @@ export declare const resolveGroupedVisualizerCanvasContent: (attachments: Displa
|
|
|
3258
3541
|
|
|
3259
3542
|
/**
|
|
3260
3543
|
* Resolves an HTML canvas content payload from a DisplayAttachment.
|
|
3261
|
-
*
|
|
3262
|
-
*
|
|
3263
|
-
*
|
|
3544
|
+
* When the attachment has a download URL, that URL is the primary render
|
|
3545
|
+
* target so the preview loads via `src` and gets its own response-level CSP
|
|
3546
|
+
* instead of inheriting the host document's — no HTML text is fetched up
|
|
3547
|
+
* front; `resolveSourceText` fetches it lazily, only when the "View source"
|
|
3548
|
+
* toggle is used, and rejects if that fetch fails. `isSameOriginUrl` reflects
|
|
3549
|
+
* a real comparison against the embedding document's own origin.
|
|
3550
|
+
* With no download URL (local file or inline data), falls back to `srcdoc`,
|
|
3551
|
+
* rejecting payloads larger than 1 MiB to prevent browser truncation, and
|
|
3552
|
+
* forwards `resolvers.htmlSrcdocHostUrl` so that HTML can still render under
|
|
3553
|
+
* its own response-level CSP.
|
|
3554
|
+
* Returns `null` if no source is available, or an `ErrorCanvasContent` when
|
|
3555
|
+
* that fallback fetch fails.
|
|
3264
3556
|
*/
|
|
3265
3557
|
export declare const resolveHtmlCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<HtmlCanvasContent | ErrorCanvasContent | null>;
|
|
3266
3558
|
|
|
@@ -3320,6 +3612,9 @@ export declare const resolvePdfCanvasContent: (attachment: DisplayAttachment, re
|
|
|
3320
3612
|
*/
|
|
3321
3613
|
export declare const resolveRelativeDialFilePath: (pathOrFileId: string, bucket: string) => string;
|
|
3322
3614
|
|
|
3615
|
+
/** Returns the section whose root label is the first segment of `virtualPath`, or `undefined` when none matches. */
|
|
3616
|
+
export declare const resolveSectionByPath: <TSection extends DialFileManagerSection>(virtualPath: string, sections: readonly TSection[]) => TSection | undefined;
|
|
3617
|
+
|
|
3323
3618
|
/**
|
|
3324
3619
|
* Converts an opaque file-listing id into the path expected by the single-file
|
|
3325
3620
|
* download endpoint. Core may prefix listing paths with the skill path and its
|
|
@@ -3339,6 +3634,16 @@ export declare const resolveSkillManifestFileId: (files: SkillMetadataItemDto[],
|
|
|
3339
3634
|
/** Resolves a plain-text canvas content payload from a DisplayAttachment, or `null` if unavailable. */
|
|
3340
3635
|
export declare const resolveTextCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<PlainTextCanvasContent | ErrorCanvasContent | null>;
|
|
3341
3636
|
|
|
3637
|
+
/**
|
|
3638
|
+
* Resolves which credentials level a toolset's login applies to, per DIAL
|
|
3639
|
+
* Core's public/private toolset convention: a `public`-bucket toolset is
|
|
3640
|
+
* shared credentials-wise at `User` level, while a private/workspace toolset
|
|
3641
|
+
* is scoped at `Global` level. Every surface that drives a toolset login
|
|
3642
|
+
* (the sign-in-interrupt dialog, the QuickApps editor iframe bridge,
|
|
3643
|
+
* `useToolsetLogin`) must resolve the level this way rather than assuming one.
|
|
3644
|
+
*/
|
|
3645
|
+
export declare const resolveToolsetCredentialsLevel: (toolsetId: string) => ToolsetCredentialsLevel.User | ToolsetCredentialsLevel.Global;
|
|
3646
|
+
|
|
3342
3647
|
/**
|
|
3343
3648
|
* Fetches the attachment payload and builds a `VisualizerCanvasContent` for the
|
|
3344
3649
|
* given registry entry and theme. Returns `null` when the payload cannot be
|
|
@@ -3351,6 +3656,11 @@ export declare const resolveTextCanvasContent: (attachment: DisplayAttachment, r
|
|
|
3351
3656
|
*/
|
|
3352
3657
|
export declare const resolveVisualizerCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, entry: CustomVisualizer, themeId: string) => Promise<VisualizerCanvasContent | null>;
|
|
3353
3658
|
|
|
3659
|
+
/** An application schema with a resolved id, as returned by {@link getRunnerSchemas}. */
|
|
3660
|
+
export declare type RunnerSchema<T extends QuickAppSchemaLike> = T & {
|
|
3661
|
+
id: string;
|
|
3662
|
+
};
|
|
3663
|
+
|
|
3354
3664
|
/** Decodes a URI-encoded path segment, returning the original string if decoding fails. */
|
|
3355
3665
|
export declare const safeDecodeURI: (path: string) => string;
|
|
3356
3666
|
|
|
@@ -3426,6 +3736,7 @@ export declare interface ScheduledTasksConfiguredClient {
|
|
|
3426
3736
|
offset?: number;
|
|
3427
3737
|
search?: string;
|
|
3428
3738
|
sort?: ListScheduledTasksSortEnum;
|
|
3739
|
+
model?: string;
|
|
3429
3740
|
}, options?: RequestInit) => Promise<ListScheduledTasksResponseDto>;
|
|
3430
3741
|
listScheduledTaskRuns: (request: {
|
|
3431
3742
|
scheduleId: string;
|
|
@@ -3459,6 +3770,8 @@ export declare interface ScheduledTasksListRequest {
|
|
|
3459
3770
|
offset?: number;
|
|
3460
3771
|
search?: string;
|
|
3461
3772
|
sort?: ListScheduledTasksSortEnum;
|
|
3773
|
+
/** Only tasks that run against this model/application id, exactly as stored. */
|
|
3774
|
+
model?: string;
|
|
3462
3775
|
signal?: AbortSignal;
|
|
3463
3776
|
}
|
|
3464
3777
|
|
|
@@ -3492,6 +3805,14 @@ export declare interface ScheduledTaskTriggerDescriptionOptions {
|
|
|
3492
3805
|
referenceDate?: Date;
|
|
3493
3806
|
}
|
|
3494
3807
|
|
|
3808
|
+
/**
|
|
3809
|
+
* Picks the auth-status field matching one credentials level out of a
|
|
3810
|
+
* toolset's `authSettings` — DIAL Core reports `userLevelAuthStatus` and
|
|
3811
|
+
* `globalAuthStatus` as independent fields rather than one status keyed by
|
|
3812
|
+
* level.
|
|
3813
|
+
*/
|
|
3814
|
+
export declare const selectToolsetAuthStatus: (authSettings: Pick<DialToolsetAuthSettingsDto, "userLevelAuthStatus" | "globalAuthStatus"> | undefined, credentialsLevel: ToolsetCredentialsLevel) => string | undefined;
|
|
3815
|
+
|
|
3495
3816
|
/** Serializes a prompt export envelope into a pretty-printed JSON blob. */
|
|
3496
3817
|
export declare const serializePromptExport: (envelope: PromptExportFormat) => Blob;
|
|
3497
3818
|
|
|
@@ -3525,6 +3846,13 @@ export declare const shouldWatchForDisplayNameUpdate: (conversation: Conversatio
|
|
|
3525
3846
|
*/
|
|
3526
3847
|
export declare const SKILL_FILE_UPLOAD_MAX_BYTES = 1048576;
|
|
3527
3848
|
|
|
3849
|
+
/**
|
|
3850
|
+
* Zero-byte object written at `<folder>/.dial_folder` so an otherwise empty
|
|
3851
|
+
* skill folder survives a save — DIAL Core storage has no directory objects,
|
|
3852
|
+
* so a folder only exists as a file's path prefix.
|
|
3853
|
+
*/
|
|
3854
|
+
export declare const SKILL_FOLDER_MARKER = ".dial_folder";
|
|
3855
|
+
|
|
3528
3856
|
/**
|
|
3529
3857
|
* Upper bound on `nextToken` follow-ups per listing, so a pathological bucket
|
|
3530
3858
|
* cannot spin the client forever.
|
|
@@ -3543,6 +3871,9 @@ export declare const SKILL_MANIFEST_FILE = "SKILL.md";
|
|
|
3543
3871
|
*/
|
|
3544
3872
|
export declare const SKILL_MANIFEST_MAX_BYTES: number;
|
|
3545
3873
|
|
|
3874
|
+
/** Length limit of each skill editor text field. */
|
|
3875
|
+
export declare const SKILL_TEXT_FIELD_MAX_LENGTHS: Record<SkillTextField, number>;
|
|
3876
|
+
|
|
3546
3877
|
/**
|
|
3547
3878
|
* Client-side mirror of the backend's default `SKILL_UPLOAD_MAX_FILES`
|
|
3548
3879
|
* (`apps/chat-api/src/config/environment.config.ts`), used only for
|
|
@@ -3651,6 +3982,8 @@ export declare interface SkillEditorSubmitClient {
|
|
|
3651
3982
|
export declare interface SkillEditorSubmitMessages {
|
|
3652
3983
|
/** Shown when a required field is empty. */
|
|
3653
3984
|
required: string;
|
|
3985
|
+
/** Shown when a name, description or instructions value exceeds its length limit, given that limit. */
|
|
3986
|
+
tooLong: (maxLength: number) => string;
|
|
3654
3987
|
/**
|
|
3655
3988
|
* Shown when the Instructions value opens with its own YAML frontmatter
|
|
3656
3989
|
* block — pasting a whole `SKILL.md` in there would otherwise produce a
|
|
@@ -3791,6 +4124,9 @@ export declare interface SkillFilesPayload {
|
|
|
3791
4124
|
*/
|
|
3792
4125
|
export declare const skillFileToAttachment: (node: SkillFileTreeNode, content: SkillFileContent) => Attachment;
|
|
3793
4126
|
|
|
4127
|
+
/** Returns the folder path a marker path stands for (`docs/.dial_folder` → `docs`). */
|
|
4128
|
+
export declare const skillFolderMarkerParent: (markerPath: string) => string;
|
|
4129
|
+
|
|
3794
4130
|
/** A `SKILL.md` split into its frontmatter fields and its prose body. */
|
|
3795
4131
|
export declare interface SkillManifestDocument {
|
|
3796
4132
|
/** `name` frontmatter field, when present and a string. */
|
|
@@ -3857,12 +4193,27 @@ export declare enum SkillSource {
|
|
|
3857
4193
|
Public = "public"
|
|
3858
4194
|
}
|
|
3859
4195
|
|
|
4196
|
+
/** Skill editor text fields with a length limit. */
|
|
4197
|
+
export declare type SkillTextField = 'name' | 'description' | 'instructions';
|
|
4198
|
+
|
|
3860
4199
|
/** Splits a file name into its base and extension, using only the last dot. */
|
|
3861
4200
|
export declare const splitFileNameExtension: (fileName: string) => {
|
|
3862
4201
|
base: string;
|
|
3863
4202
|
extension: string;
|
|
3864
4203
|
};
|
|
3865
4204
|
|
|
4205
|
+
/** Per-start options of {@link UseConversationStreamResult.startStream}. */
|
|
4206
|
+
export declare interface StartStreamOptions {
|
|
4207
|
+
/**
|
|
4208
|
+
* Treats a `GenerationConflictError` as "this turn is already being
|
|
4209
|
+
* generated" — e.g. a page reloaded before that generation saved its start
|
|
4210
|
+
* state — and joins the running generation instead of showing the conflict
|
|
4211
|
+
* message, which remains the fallback. Only for a start that sends no new
|
|
4212
|
+
* user text; a send the user typed must keep reporting the conflict.
|
|
4213
|
+
*/
|
|
4214
|
+
resumeOnConflict?: boolean;
|
|
4215
|
+
}
|
|
4216
|
+
|
|
3866
4217
|
/**
|
|
3867
4218
|
* Answers one question: would appending this text after the fence that
|
|
3868
4219
|
* `buildSkillManifest` writes produce a *second* frontmatter block?
|
|
@@ -3893,6 +4244,29 @@ export declare interface StreamCompletionOptions {
|
|
|
3893
4244
|
signal: AbortSignal;
|
|
3894
4245
|
}
|
|
3895
4246
|
|
|
4247
|
+
/**
|
|
4248
|
+
* Reported through `onError` when the network connection carrying a
|
|
4249
|
+
* completion stream is lost (a rejected `fetch`, or a read that fails after a
|
|
4250
|
+
* 2xx response) or goes silent past the idle timeout — what a laptop sleep or
|
|
4251
|
+
* a phone lock mid-generation produces. The backend-owned generation may
|
|
4252
|
+
* still be running, so the caller can recover it rather than treat the
|
|
4253
|
+
* response as failed. `cause` holds the original error, when there is one.
|
|
4254
|
+
*/
|
|
4255
|
+
export declare class StreamInterruptedError extends Error {
|
|
4256
|
+
constructor(cause?: unknown);
|
|
4257
|
+
}
|
|
4258
|
+
|
|
4259
|
+
/**
|
|
4260
|
+
* Reported through `onError` when DIAL Core itself signals a failure with an
|
|
4261
|
+
* in-band `{ error: { message } }` SSE chunk. Its `message` is upstream text
|
|
4262
|
+
* intended for the user, unlike a transport failure (failed `fetch`, non-OK
|
|
4263
|
+
* status, broken stream), whose message is technical detail. A custom
|
|
4264
|
+
* transport raises this for any user-facing upstream error text.
|
|
4265
|
+
*/
|
|
4266
|
+
export declare class StreamUpstreamError extends Error {
|
|
4267
|
+
constructor(message: string);
|
|
4268
|
+
}
|
|
4269
|
+
|
|
3896
4270
|
/** Strips leading and trailing slashes from a path segment. */
|
|
3897
4271
|
export declare const stripSurroundingSlashes: (path: string) => string;
|
|
3898
4272
|
|
|
@@ -4213,7 +4587,8 @@ export declare const toPublishRuleDto: (rule: PublicationRule) => PublishRuleDto
|
|
|
4213
4587
|
/**
|
|
4214
4588
|
* Returns a renderable `Stage` for one raw payload: `index` defaults to `0`,
|
|
4215
4589
|
* `name` to `''`, an unrecognized `status` to `null` (still running), and
|
|
4216
|
-
* `content`/`tag`/`attachments` are passed through when
|
|
4590
|
+
* `content`/`tag`/`attachments`/`parent_stage_index` are passed through when
|
|
4591
|
+
* present (a parent of `0` included).
|
|
4217
4592
|
*/
|
|
4218
4593
|
export declare const toStage: (stage: RawStage) => Stage;
|
|
4219
4594
|
|
|
@@ -4239,19 +4614,25 @@ export declare interface UnauthorizedErrorLike extends Error {
|
|
|
4239
4614
|
readonly url: string;
|
|
4240
4615
|
}
|
|
4241
4616
|
|
|
4617
|
+
/** Returns a new set containing every path from each of `pathSets`. */
|
|
4618
|
+
export declare const unionPathSets: (pathSets: readonly ReadonlySet<string>[]) => Set<string>;
|
|
4619
|
+
|
|
4242
4620
|
/** A skill archive unpacked into its manifest text and a relative-path → bytes map of every other entry. */
|
|
4243
4621
|
export declare interface UnpackedSkillArchive {
|
|
4244
4622
|
/** The root `SKILL.md` entry's decoded text content. */
|
|
4245
4623
|
manifestText: string;
|
|
4246
|
-
/** Every non-manifest entry, keyed by relative path. */
|
|
4624
|
+
/** Every non-manifest, non-marker entry, keyed by relative path. */
|
|
4247
4625
|
files: Map<string, Uint8Array>;
|
|
4626
|
+
/** Folder paths restored from `<folder>/.dial_folder` marker entries. */
|
|
4627
|
+
folders: string[];
|
|
4248
4628
|
}
|
|
4249
4629
|
|
|
4250
4630
|
/**
|
|
4251
4631
|
* Unpacks a whole-skill ZIP (as downloaded from `GET /api/v1/skills/download`
|
|
4252
4632
|
* — DIAL Core's whole-resource `GET` is the one place this contract still
|
|
4253
|
-
* uses a ZIP, per design.md) into its manifest text
|
|
4254
|
-
* bytes
|
|
4633
|
+
* uses a ZIP, per `openspec/changes/archive/2026-10-05-persist-skill-empty-folders/design.md`) into its manifest text, every other entry's
|
|
4634
|
+
* bytes, and the folders its empty-folder markers stand for. Throws if the
|
|
4635
|
+
* archive has no root `SKILL.md` entry.
|
|
4255
4636
|
*/
|
|
4256
4637
|
export declare const unpackSkillArchive: (bytes: Uint8Array) => UnpackedSkillArchive;
|
|
4257
4638
|
|
|
@@ -4265,7 +4646,7 @@ export declare enum UnsupportedTriggerReason {
|
|
|
4265
4646
|
MissingRequiredFields = "missingRequiredFields"
|
|
4266
4647
|
}
|
|
4267
4648
|
|
|
4268
|
-
export declare const updateEntry: (prev: FileUploadBatchState | null,
|
|
4649
|
+
export declare const updateEntry: (prev: FileUploadBatchState | null, id: string, patch: FileUploadStatus | Partial<Pick<FileUploadEntry, "status" | "percent">>) => FileUploadBatchState | null;
|
|
4269
4650
|
|
|
4270
4651
|
/** Max number of files uploaded concurrently within a single upload batch. */
|
|
4271
4652
|
export declare const UPLOAD_CONCURRENCY = 3;
|
|
@@ -4343,6 +4724,10 @@ export declare const USAGE_MODEL_LIMITS_I18N_KEYS: {
|
|
|
4343
4724
|
readonly progressAriaLabel: "usage.progressAriaLabel";
|
|
4344
4725
|
/** Label for the spent-cost cell. Receives `{ amount: string }`. */
|
|
4345
4726
|
readonly spentLabel: "usage.spentLabel";
|
|
4727
|
+
/** Type caption for an application (agent) row. Receives no interpolation. */
|
|
4728
|
+
readonly applicationTypeLabel: "usage.applicationTypeLabel";
|
|
4729
|
+
/** Supporting label on an application row's spent cost. Receives no interpolation. */
|
|
4730
|
+
readonly includesCalledModelsLabel: "usage.includesCalledModelsLabel";
|
|
4346
4731
|
};
|
|
4347
4732
|
|
|
4348
4733
|
/**
|
|
@@ -4353,7 +4738,8 @@ export declare const USAGE_MODEL_LIMITS_I18N_KEYS: {
|
|
|
4353
4738
|
* 1. If the active conversation is not present in the list, requests a
|
|
4354
4739
|
* refresh. The list and refresh callback are intentionally excluded from
|
|
4355
4740
|
* the dependency array to avoid a refresh-loop on every list update.
|
|
4356
|
-
* 2. Marks the active conversation as viewed
|
|
4741
|
+
* 2. Marks the active conversation as viewed when its matching identity becomes
|
|
4742
|
+
* available. List refreshes and persistence rollback do not retry the write.
|
|
4357
4743
|
*/
|
|
4358
4744
|
export declare const useActiveConversationSync: ({ activeConversationId, items, refreshConversations, markConversationViewed, conversationIdsMatch, toPanelConversationId, }: UseActiveConversationSyncParams) => string | undefined;
|
|
4359
4745
|
|
|
@@ -4493,7 +4879,7 @@ export declare interface UseAttachmentValidationResult {
|
|
|
4493
4879
|
* item through the endpoint its type owns and refetching/notifying on
|
|
4494
4880
|
* completion, and building the Create dropdown's options.
|
|
4495
4881
|
*/
|
|
4496
|
-
export declare const useCatalogEditNavigation: ({ deployments, isCustomAppsEnabled, isSchemaAppsEnabled, isHideCustomAppCreationEnabled, isToolsetsEnabled, isPromptsEnabled,
|
|
4882
|
+
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
4883
|
|
|
4498
4884
|
/** Parameters accepted by {@link useCatalogEditNavigation}. */
|
|
4499
4885
|
export declare interface UseCatalogEditNavigationParams {
|
|
@@ -4503,8 +4889,8 @@ export declare interface UseCatalogEditNavigationParams {
|
|
|
4503
4889
|
isHideCustomAppCreationEnabled: boolean;
|
|
4504
4890
|
isToolsetsEnabled: boolean;
|
|
4505
4891
|
isPromptsEnabled: boolean;
|
|
4506
|
-
/**
|
|
4507
|
-
|
|
4892
|
+
/** Application type schemas (runners) loaded at startup; each one except the custom-app schema gets its own Create option. */
|
|
4893
|
+
schemas: ApplicationSchemaSummaryDto[];
|
|
4508
4894
|
/** Already-configured editor-route URL builders. */
|
|
4509
4895
|
urls: CatalogEditNavigationUrls;
|
|
4510
4896
|
/** Navigates the host to a URL built by `urls`. */
|
|
@@ -4535,7 +4921,10 @@ export declare interface UseCatalogEditNavigationParams {
|
|
|
4535
4921
|
export declare interface UseCatalogEditNavigationResult {
|
|
4536
4922
|
handleEdit: (item: CatalogItem) => void;
|
|
4537
4923
|
handleDelete: (item: CatalogItem) => Promise<void>;
|
|
4924
|
+
/** The Create dropdown's items: runners and static options sorted together by label, all filtered by `createSearch.value`. */
|
|
4538
4925
|
createOptions: DropdownItem[];
|
|
4926
|
+
/** The Create menu's search field state, or `undefined` when no runner option is offered. */
|
|
4927
|
+
createSearch: CatalogCreateSearch | undefined;
|
|
4539
4928
|
}
|
|
4540
4929
|
|
|
4541
4930
|
/**
|
|
@@ -4543,7 +4932,7 @@ export declare interface UseCatalogEditNavigationResult {
|
|
|
4543
4932
|
* Extracts the inline dispatch logic from `CatalogView` into a reusable,
|
|
4544
4933
|
* library-isolated unit.
|
|
4545
4934
|
*/
|
|
4546
|
-
export declare const useCatalogItemDetails: ({ api, skills, isAdmin, dialCoreExternalUrl, skillOverviewLabels, promptOverviewLabels, deploymentLimitsLabels, }: UseCatalogItemDetailsOptions) => UseCatalogItemDetailsResult;
|
|
4935
|
+
export declare const useCatalogItemDetails: ({ api, skills, isAdmin, dialCoreExternalUrl, skillOverviewLabels, promptOverviewLabels, deploymentLimitsLabels, entityDetailsLabels, }: UseCatalogItemDetailsOptions) => UseCatalogItemDetailsResult;
|
|
4547
4936
|
|
|
4548
4937
|
/** Options accepted by `useCatalogItemDetails`. */
|
|
4549
4938
|
export declare interface UseCatalogItemDetailsOptions {
|
|
@@ -4564,6 +4953,12 @@ export declare interface UseCatalogItemDetailsOptions {
|
|
|
4564
4953
|
promptOverviewLabels: PromptOverviewLabels;
|
|
4565
4954
|
/** Labels for deployment limits table. */
|
|
4566
4955
|
deploymentLimitsLabels: DeploymentLimitsLabels;
|
|
4956
|
+
/**
|
|
4957
|
+
* Overview section titles and spec labels for models, agents and toolsets,
|
|
4958
|
+
* merged over the English defaults. Memoise it like the other label objects:
|
|
4959
|
+
* a new object on every render recreates `onFetchDetails`.
|
|
4960
|
+
*/
|
|
4961
|
+
entityDetailsLabels?: Partial<EntityDetailsLabels>;
|
|
4567
4962
|
}
|
|
4568
4963
|
|
|
4569
4964
|
/** Returned callbacks from `useCatalogItemDetails`. All callbacks are stable for stable inputs. */
|
|
@@ -4798,7 +5193,8 @@ export declare interface UseConversationHandlersResult {
|
|
|
4798
5193
|
* `.dial`/`.zip`, v5 envelope, old- or new-chat origin) once per file, then
|
|
4799
5194
|
* re-uploads any archive attachments to `uploads/<YYYY-MM>/` —
|
|
4800
5195
|
* disambiguating a name collision with a ` (n)` suffix instead of rejecting
|
|
4801
|
-
* it — rewrites attachment references (and renamed titles),
|
|
5196
|
+
* it — rewrites attachment references (and renamed titles), drops any
|
|
5197
|
+
* reference still pointing into another user's bucket, regenerates each
|
|
4802
5198
|
* conversation's id/path with a fresh UUID (collision-free save, no replace
|
|
4803
5199
|
* dialog), and persists every conversation through the injected
|
|
4804
5200
|
* `conversationsApi`. One job per imported file, not per conversation.
|
|
@@ -4868,10 +5264,14 @@ export declare interface UseConversationLookupMapsParams {
|
|
|
4868
5264
|
* Returns a memoised array whose shape is compatible with the conversation
|
|
4869
5265
|
* panel's item contract. All app-specific concerns (icon URL resolution,
|
|
4870
5266
|
* route generation, id normalisation) are injected via resolver callbacks.
|
|
5267
|
+
*
|
|
5268
|
+
* While every input except `items` is unchanged, a DTO that is referentially
|
|
5269
|
+
* the same as in the previous render maps to the same item object, so a list
|
|
5270
|
+
* change (or a navigation that re-derives the list) re-renders only the rows
|
|
5271
|
+
* whose DTO actually changed.
|
|
4871
5272
|
*/
|
|
4872
|
-
export declare const useConversationPanelItems: ({ items, deployments, isDeploymentsLoading, toPanelConversationId, resolveIconUrl, resolveIconTooltip, resolveHref,
|
|
4873
|
-
|
|
4874
|
-
taskBadgeLabel?: string | undefined;
|
|
5273
|
+
export declare const useConversationPanelItems: ({ items, deployments, isDeploymentsLoading, toPanelConversationId, resolveIconUrl, resolveIconTooltip, resolveHref, resolveTaskPresentation, }: UseConversationPanelItemsParams) => {
|
|
5274
|
+
leadingIcon?: ReactNode;
|
|
4875
5275
|
isUnread?: boolean | undefined;
|
|
4876
5276
|
id: string;
|
|
4877
5277
|
title: string;
|
|
@@ -4907,11 +5307,12 @@ export declare interface UseConversationPanelItemsResolvers {
|
|
|
4907
5307
|
/** Resolves the href to navigate to when the conversation row is clicked. */
|
|
4908
5308
|
resolveHref: (panelConversationId: string) => string;
|
|
4909
5309
|
/**
|
|
4910
|
-
* Returns
|
|
4911
|
-
*
|
|
5310
|
+
* Returns the row presentation for a scheduled-task conversation — a
|
|
5311
|
+
* host-rendered leading icon that replaces the deployment avatar, and the
|
|
5312
|
+
* unread flag — or `undefined` for an ordinary conversation.
|
|
4912
5313
|
*/
|
|
4913
|
-
|
|
4914
|
-
|
|
5314
|
+
resolveTaskPresentation?: (item: ConversationListItemDto) => {
|
|
5315
|
+
leadingIcon?: ReactNode;
|
|
4915
5316
|
isUnread: boolean;
|
|
4916
5317
|
} | undefined;
|
|
4917
5318
|
}
|
|
@@ -4978,7 +5379,7 @@ export declare interface UseConversationSourcesResult {
|
|
|
4978
5379
|
uploaded: DisplayAttachment[];
|
|
4979
5380
|
/** Deduplicated attachments the assistant generated across the conversation. */
|
|
4980
5381
|
generated: DisplayAttachment[];
|
|
4981
|
-
/** Quotation sources referenced by assistant messages, deduplicated by URL
|
|
5382
|
+
/** Quotation sources referenced by assistant messages, deduplicated by URL; PDF sources are qualified with `#page=N`. */
|
|
4982
5383
|
sources: QuotationSource[];
|
|
4983
5384
|
}
|
|
4984
5385
|
|
|
@@ -4990,7 +5391,7 @@ export declare interface UseConversationSourcesResult {
|
|
|
4990
5391
|
* `transport`/`generation`/`channel`/`overlay` capabilities rather than any
|
|
4991
5392
|
* app context or `server-api` import.
|
|
4992
5393
|
*/
|
|
4993
|
-
export declare const useConversationStream: ({ conversationId, state: { setConversation, conversationRef }, transport, generation: { startGeneration, completeGeneration }, channel, overlay, onStopError, generationConflictMessage, }: UseConversationStreamParams) => UseConversationStreamResult;
|
|
5394
|
+
export declare const useConversationStream: ({ conversationId, state: { setConversation, conversationRef }, transport, generation: { startGeneration, completeGeneration }, channel, overlay, onStopError, generationConflictMessage, generationPersistenceErrorMessage, onStreamError, batchChunksPerFrame, }: UseConversationStreamParams) => UseConversationStreamResult;
|
|
4994
5395
|
|
|
4995
5396
|
/** Parameters for {@link useConversationStream}. */
|
|
4996
5397
|
export declare interface UseConversationStreamParams {
|
|
@@ -5008,17 +5409,39 @@ export declare interface UseConversationStreamParams {
|
|
|
5008
5409
|
* {@link DEFAULT_GENERATION_CONFLICT_MESSAGE}.
|
|
5009
5410
|
*/
|
|
5010
5411
|
generationConflictMessage?: string;
|
|
5412
|
+
/** Host-translated warning shown when the received answer could not be saved. */
|
|
5413
|
+
generationPersistenceErrorMessage?: string;
|
|
5414
|
+
/**
|
|
5415
|
+
* Receives the original error of every failed stream. The hook shows only
|
|
5416
|
+
* host-supplied or upstream-supplied text on the message bubble and hides
|
|
5417
|
+
* transport detail (e.g. `Failed to fetch`), so this is where the host can
|
|
5418
|
+
* still log or report the raw error.
|
|
5419
|
+
*/
|
|
5420
|
+
onStreamError?: (error: Error) => void;
|
|
5421
|
+
/**
|
|
5422
|
+
* Coalesces the displayed chunk updates into one `setConversation` per
|
|
5423
|
+
* animation frame. Chunks still reach the per-path buffer immediately, and
|
|
5424
|
+
* any pending update is flushed before completion, error, stop, or a
|
|
5425
|
+
* superseding generation. Defaults to `false` (one update per chunk).
|
|
5426
|
+
*/
|
|
5427
|
+
batchChunksPerFrame?: boolean;
|
|
5011
5428
|
}
|
|
5012
5429
|
|
|
5013
5430
|
/** Return value of {@link useConversationStream}. */
|
|
5014
5431
|
export declare interface UseConversationStreamResult {
|
|
5015
|
-
startStream: (conversationId: string, userContent: string, messageIndex: number, model: string, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum) => void;
|
|
5432
|
+
startStream: (conversationId: string, userContent: string, messageIndex: number, model: string, customContent?: MessageCustomContent, generationId?: string, mode?: SendCompletionDtoModeEnum, options?: StartStreamOptions) => void;
|
|
5016
5433
|
handleStop: () => void;
|
|
5017
5434
|
resumeIfAwaitingGeneration: (currentConversationId: string, conversation: Conversation) => void;
|
|
5018
5435
|
/** Restores the accumulated live assistant message when its conversation is loaded again before completion. */
|
|
5019
5436
|
restoreBufferedGeneration: (currentConversationId: string, conversation: Conversation) => Conversation;
|
|
5020
5437
|
isStreaming: boolean;
|
|
5021
5438
|
canStopStreaming: boolean;
|
|
5439
|
+
/** Whether the displayed conversation's terminal read failed. */
|
|
5440
|
+
hasConversationReloadError: boolean;
|
|
5441
|
+
/** Whether a retry of that read is in flight. */
|
|
5442
|
+
isReloadingConversation: boolean;
|
|
5443
|
+
/** Retries the failed read without saving or regenerating the answer. */
|
|
5444
|
+
retryConversationReload: () => Promise<void>;
|
|
5022
5445
|
}
|
|
5023
5446
|
|
|
5024
5447
|
/**
|
|
@@ -5026,14 +5449,14 @@ export declare interface UseConversationStreamResult {
|
|
|
5026
5449
|
* tree's expand/collapse state, search, and the shared per-folder cache that
|
|
5027
5450
|
* `useDialFileUploadBatch`/`useDialFileMutations`/`useDialFileSharing` invalidate
|
|
5028
5451
|
* through `invalidateFolders`/`bumpRetry` after their own mutations settle
|
|
5029
|
-
* (design.md D1) — this hook is the sole owner/writer of that cache.
|
|
5452
|
+
* (`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
5453
|
*
|
|
5031
5454
|
* Supports three listing sources via `activeTab`:
|
|
5032
5455
|
* - my_files: user's own bucket via `DialFilesApi.listFiles`
|
|
5033
5456
|
* - shared: files shared with the user via `DialFilesApi.listSharedFiles`
|
|
5034
5457
|
* - organization: public bucket via `DialFilesApi.listPublicFiles`
|
|
5035
5458
|
*/
|
|
5036
|
-
export declare const useDialFileListing: ({ filesApi, bucket, rootLabel, activeTab, onNotification, }: UseDialFileListingOptions) => UseDialFileListingResult;
|
|
5459
|
+
export declare const useDialFileListing: ({ filesApi, bucket, rootLabel, activeTab, onNotification, isActive, sessionKey, }: UseDialFileListingOptions) => UseDialFileListingResult;
|
|
5037
5460
|
|
|
5038
5461
|
/** Options accepted by `useDialFileListing`. */
|
|
5039
5462
|
export declare interface UseDialFileListingOptions {
|
|
@@ -5047,6 +5470,10 @@ export declare interface UseDialFileListingOptions {
|
|
|
5047
5470
|
activeTab: DialFileManagerTabs;
|
|
5048
5471
|
/** Called with a structured event when a folder-load operation fails. */
|
|
5049
5472
|
onNotification?: (notification: FileManagerNotification) => void;
|
|
5473
|
+
/** When false, the hook issues no `DialFilesApi` call and reports `isLoading: false`. Defaults to `true`. */
|
|
5474
|
+
isActive?: boolean;
|
|
5475
|
+
/** Changing this value resets cache and navigation exactly like an `activeTab` change. Defaults to `undefined`. */
|
|
5476
|
+
sessionKey?: string;
|
|
5050
5477
|
}
|
|
5051
5478
|
|
|
5052
5479
|
/** Values returned by `useDialFileListing`. */
|
|
@@ -5082,7 +5509,7 @@ export declare interface UseDialFileListingResult {
|
|
|
5082
5509
|
/**
|
|
5083
5510
|
* Deletes the given API-path cache keys so the next listing fetch/expand for
|
|
5084
5511
|
* that folder re-fetches from the server. The only way sibling sub-hooks may
|
|
5085
|
-
* invalidate the shared cache (design.md D1).
|
|
5512
|
+
* invalidate the shared cache (`openspec/changes/archive/2026-07-21-split-use-dial-file-manager/design.md` D1).
|
|
5086
5513
|
*/
|
|
5087
5514
|
invalidateFolders: (apiPaths: string[]) => void;
|
|
5088
5515
|
/** Merges a just-created folder into its parent's cache entry (optimistic display for create-folder). */
|
|
@@ -5103,7 +5530,7 @@ export declare interface UseDialFileListingResult {
|
|
|
5103
5530
|
* every translated string reaches it through `labels`,
|
|
5104
5531
|
* `disabledNewButtonTooltip`, and `buildValidationErrorMessage`.
|
|
5105
5532
|
*/
|
|
5106
|
-
export declare const useDialFileManager: ({ filesApi, bucket, rootLabel, activeTab, onNotification, onOperationSuccess, forbiddenSymbolsRegExp, variant, actionProfile, labels, locale, disabledNewButtonTooltip, downloadDestination, buildValidationErrorMessage, }: UseDialFileManagerOptions) => UseDialFileManagerResult;
|
|
5533
|
+
export declare const useDialFileManager: ({ filesApi, bucket, rootLabel, activeTab, isActive, sessionKey, onNotification, onOperationSuccess, forbiddenSymbolsRegExp, variant, actionProfile, labels, locale, disabledNewButtonTooltip, downloadDestination, buildValidationErrorMessage, }: UseDialFileManagerOptions) => UseDialFileManagerResult;
|
|
5107
5534
|
|
|
5108
5535
|
export declare interface UseDialFileManagerOptions {
|
|
5109
5536
|
/** Injected operation port used for every file-manager network call. */
|
|
@@ -5114,6 +5541,10 @@ export declare interface UseDialFileManagerOptions {
|
|
|
5114
5541
|
rootLabel?: string;
|
|
5115
5542
|
/** Active tab — drives listing source and per-tab options. Defaults to MyFiles. */
|
|
5116
5543
|
activeTab?: DialFileManagerTabs;
|
|
5544
|
+
/** When false, the listing issues no `DialFilesApi` call and reports `isLoading: false`. Defaults to `true`. */
|
|
5545
|
+
isActive?: boolean;
|
|
5546
|
+
/** Changing this value resets cache and navigation exactly like an `activeTab` change. Defaults to `undefined`. */
|
|
5547
|
+
sessionKey?: string;
|
|
5117
5548
|
/** Called when a file-manager action should surface a toast notification. */
|
|
5118
5549
|
onNotification?: (notification: FileManagerNotification) => void;
|
|
5119
5550
|
/** Called when a mutation succeeds, instead of invoking an application notification service directly. */
|
|
@@ -5168,7 +5599,7 @@ export declare interface UseDialFileManagerResult {
|
|
|
5168
5599
|
onSearchFiles: (folder: string, query: string) => void;
|
|
5169
5600
|
/** Search: true while a search request is in flight. */
|
|
5170
5601
|
isSearching: boolean;
|
|
5171
|
-
/** Search: flat
|
|
5602
|
+
/** Search: flat, unfiltered recursive listing of the current folder, or null when search is not active. */
|
|
5172
5603
|
searchResults: DialFile[] | null;
|
|
5173
5604
|
/** Search: clears results and exits search mode. */
|
|
5174
5605
|
clearSearchResults: () => void;
|
|
@@ -5192,7 +5623,9 @@ export declare interface UseDialFileManagerResult {
|
|
|
5192
5623
|
uploadBatchState: FileUploadBatchState | null;
|
|
5193
5624
|
/** Upload: abort all in-flight and queued uploads. */
|
|
5194
5625
|
cancelUpload: () => void;
|
|
5195
|
-
/** Upload:
|
|
5626
|
+
/** Upload: abort one queued or in-flight upload by its entry id. */
|
|
5627
|
+
cancelUploadFile: (id: string) => void;
|
|
5628
|
+
/** Upload: empty the upload queue. */
|
|
5196
5629
|
clearUploadBatch: () => void;
|
|
5197
5630
|
/** Folder creation: called when user confirms a new folder name. */
|
|
5198
5631
|
onCreateFolder: (file: DialUploadFileItem, folderPath: string, fileId: string) => Promise<void>;
|
|
@@ -5259,7 +5692,7 @@ export declare interface UseDialFileManagerResult {
|
|
|
5259
5692
|
/**
|
|
5260
5693
|
* True while any mutating file-manager operation is in flight: the OR of
|
|
5261
5694
|
* `isCreatingFolder`, `isDownloading`, `isDeleting`, `isRenaming`, `isCopying`,
|
|
5262
|
-
* `isMoving`, `isUnsharing`, `isRemovingAccess`, and
|
|
5695
|
+
* `isMoving`, `isUnsharing`, `isRemovingAccess`, and any upload still queued or running.
|
|
5263
5696
|
*
|
|
5264
5697
|
* Deliberately excludes three flags, each already fully contained by its own
|
|
5265
5698
|
* scoped loading UI:
|
|
@@ -5270,11 +5703,36 @@ export declare interface UseDialFileManagerResult {
|
|
|
5270
5703
|
isAnyOperationInProgress: boolean;
|
|
5271
5704
|
}
|
|
5272
5705
|
|
|
5706
|
+
/**
|
|
5707
|
+
* Composes one `useDialFileManager` per source tab (My files, Shared,
|
|
5708
|
+
* Organization) so the File storage page can offer an All tab without a
|
|
5709
|
+
* second copy of the per-tab rules. On a single tab it returns that section's
|
|
5710
|
+
* result; on All it merges the section roots into one tree and routes every
|
|
5711
|
+
* callback to the section owning the path. Section availability and names
|
|
5712
|
+
* arrive through `sections` — the hook reads no config, i18n, or context.
|
|
5713
|
+
*/
|
|
5714
|
+
export declare const useDialFileManagerSections: ({ activeTab, sections, ...managerOptions }: UseDialFileManagerSectionsOptions) => UseDialFileManagerSectionsResult;
|
|
5715
|
+
|
|
5716
|
+
/** Options accepted by `useDialFileManagerSections`. */
|
|
5717
|
+
export declare interface UseDialFileManagerSectionsOptions extends Omit<UseDialFileManagerOptions, 'activeTab' | 'rootLabel' | 'isActive' | 'sessionKey'> {
|
|
5718
|
+
/** Active tab, including `DialFileManagerTabs.All`. */
|
|
5719
|
+
activeTab: DialFileManagerTabs;
|
|
5720
|
+
/** Enabled source tabs in display order, each with its translated top-level folder name. */
|
|
5721
|
+
sections: DialFileManagerSection[];
|
|
5722
|
+
}
|
|
5723
|
+
|
|
5724
|
+
/** Values returned by `useDialFileManagerSections`. */
|
|
5725
|
+
export declare interface UseDialFileManagerSectionsResult extends UseDialFileManagerResult {
|
|
5726
|
+
/** Source tab of the browsed folder; never `DialFileManagerTabs.All`. */
|
|
5727
|
+
sectionTab: DialFileManagerTabs;
|
|
5728
|
+
}
|
|
5729
|
+
|
|
5273
5730
|
/**
|
|
5274
5731
|
* Filters the file-manager's tab list down to the host's configured set and
|
|
5275
5732
|
* resets `activeTab` to the highest-priority still-enabled tab when the
|
|
5276
5733
|
* current one becomes excluded. A `fileManagerTabs` of `undefined` means no
|
|
5277
5734
|
* restriction — every tab in `allTabs` stays enabled and no reset ever fires.
|
|
5735
|
+
* The All tab is kept only while at least two source tabs are enabled.
|
|
5278
5736
|
*/
|
|
5279
5737
|
export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: FilterChipItem<DialFileManagerTabs>[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
|
|
5280
5738
|
|
|
@@ -5405,10 +5863,11 @@ export declare interface UseDialFileSharingResult {
|
|
|
5405
5863
|
|
|
5406
5864
|
/**
|
|
5407
5865
|
* Manages upload batches (single-file and ZIP-archive extraction), including
|
|
5408
|
-
* concurrency-limited progress tracking and abort.
|
|
5409
|
-
*
|
|
5410
|
-
* `
|
|
5411
|
-
* cache
|
|
5866
|
+
* concurrency-limited progress tracking and per-file abort. A batch started
|
|
5867
|
+
* while another is on screen is appended to it, and settled entries stay in
|
|
5868
|
+
* `uploadBatchState` until `clearUploadBatch`. Invalidates the shared listing
|
|
5869
|
+
* cache for the destination folder through `invalidateFolders`/`bumpRetry`
|
|
5870
|
+
* after a batch settles — it never holds its own copy of the cache.
|
|
5412
5871
|
*/
|
|
5413
5872
|
export declare const useDialFileUploadBatch: ({ filesApi, bucket, rootLabel, activeTab, cache, sharedRootMetaRef, invalidateFolders, bumpRetry, onNotification, }: UseDialFileUploadBatchOptions) => UseDialFileUploadBatchResult;
|
|
5414
5873
|
|
|
@@ -5441,6 +5900,7 @@ export declare interface UseDialFileUploadBatchResult {
|
|
|
5441
5900
|
onValidateUpload: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => Promise<FileUploadValidationResult>;
|
|
5442
5901
|
uploadBatchState: FileUploadBatchState | null;
|
|
5443
5902
|
cancelUpload: () => void;
|
|
5903
|
+
cancelUploadFile: (id: string) => void;
|
|
5444
5904
|
clearUploadBatch: () => void;
|
|
5445
5905
|
}
|
|
5446
5906
|
|
|
@@ -5604,6 +6064,35 @@ export declare const useMcpAppHostContext: (displayMode: "inline" | "fullscreen"
|
|
|
5604
6064
|
*/
|
|
5605
6065
|
export declare const useMcpAppTools: (client: McpAppsApiClient, deployment: DeploymentItemDto | undefined, messages: Message[], toolsets: DialToolsetDto[]) => McpAppToolRef[];
|
|
5606
6066
|
|
|
6067
|
+
/**
|
|
6068
|
+
* Captures eligible message text and creates Reply files for an existing composer
|
|
6069
|
+
* attachment flow without acquiring host deployment, upload or localization knowledge.
|
|
6070
|
+
*/
|
|
6071
|
+
export declare const useMessageSelectionReply: ({ conversationId, enabled, droppedFiles, onDroppedFilesConsumed, }: UseMessageSelectionReplyParams) => {
|
|
6072
|
+
contentRef: (node: HTMLDivElement | null) => (() => void) | undefined;
|
|
6073
|
+
actionRef: RefObject<HTMLDivElement | null>;
|
|
6074
|
+
selection: MessageSelectionReplySnapshot | null;
|
|
6075
|
+
onReply: () => void;
|
|
6076
|
+
dismiss: () => void;
|
|
6077
|
+
pendingFiles: File[];
|
|
6078
|
+
onFilesConsumed: () => void;
|
|
6079
|
+
focusRequestId: number | undefined;
|
|
6080
|
+
onAttachmentsChange: (attachments: Attachment[]) => void;
|
|
6081
|
+
addedRevision: number;
|
|
6082
|
+
};
|
|
6083
|
+
|
|
6084
|
+
/** Parameters accepted by {@link useMessageSelectionReply}. */
|
|
6085
|
+
export declare interface UseMessageSelectionReplyParams {
|
|
6086
|
+
/** Identifier used to discard selection and queued files after a scope change. */
|
|
6087
|
+
conversationId: string;
|
|
6088
|
+
/** Whether the host currently permits a Reply attachment. */
|
|
6089
|
+
enabled: boolean;
|
|
6090
|
+
/** Files from the host's ordinary page-drop queue. */
|
|
6091
|
+
droppedFiles: File[];
|
|
6092
|
+
/** Acknowledges the captured page-drop batch after the composer accepts it. */
|
|
6093
|
+
onDroppedFilesConsumed: () => void;
|
|
6094
|
+
}
|
|
6095
|
+
|
|
5607
6096
|
/**
|
|
5608
6097
|
* Completes an OAuth authorization-code flow from inside the callback popup:
|
|
5609
6098
|
* reads and clears the redirect state written into this popup's own
|
|
@@ -5805,17 +6294,17 @@ export declare interface UsePublishFoldersResult {
|
|
|
5805
6294
|
*/
|
|
5806
6295
|
onCreatePublishFolder: (parentPath: string[], name: string) => Promise<void>;
|
|
5807
6296
|
/**
|
|
5808
|
-
* Records `folderPath` as
|
|
5809
|
-
* so it keeps appearing in the tree on
|
|
5810
|
-
* successful publish.
|
|
6297
|
+
* Records `folderPath` as the most recent publish destination (moving it to
|
|
6298
|
+
* the front if already remembered), so it keeps appearing in the tree on
|
|
6299
|
+
* later publishes. Call it after a successful publish.
|
|
5811
6300
|
*/
|
|
5812
6301
|
rememberPublishFolder: (folderPath: string[]) => void;
|
|
5813
6302
|
/** Heuristic write-access check for a folder path (see the TODO above). */
|
|
5814
6303
|
hasPublishWriteAccess: (folderPath: string[]) => boolean;
|
|
5815
6304
|
}
|
|
5816
6305
|
|
|
5817
|
-
/** Shared, cancellation-safe pagination for one schedule's run history. */
|
|
5818
|
-
export declare const useScheduledTaskRuns: (client: ScheduledTasksApiClient, { scheduleId, enabled, pageSize }: UseScheduledTaskRunsOptions) => {
|
|
6306
|
+
/** Shared, cancellation-safe pagination and background refresh for one schedule's run history. */
|
|
6307
|
+
export declare const useScheduledTaskRuns: (client: ScheduledTasksApiClient, { scheduleId, enabled, pageSize, nextRunTime, }: UseScheduledTaskRunsOptions) => {
|
|
5819
6308
|
items: ScheduledTaskRunDto[];
|
|
5820
6309
|
isLoading: boolean;
|
|
5821
6310
|
isLoadingMore: boolean;
|
|
@@ -5831,10 +6320,16 @@ export declare interface UseScheduledTaskRunsOptions {
|
|
|
5831
6320
|
scheduleId: string;
|
|
5832
6321
|
enabled?: boolean;
|
|
5833
6322
|
pageSize?: number;
|
|
6323
|
+
/**
|
|
6324
|
+
* The task's next scheduled run time (ISO string), when known. Drives the
|
|
6325
|
+
* one-shot background refresh described on {@link useScheduledTaskRuns}.
|
|
6326
|
+
* The caller already holds the task DTO — this hook never fetches it.
|
|
6327
|
+
*/
|
|
6328
|
+
nextRunTime?: string | null;
|
|
5834
6329
|
}
|
|
5835
6330
|
|
|
5836
6331
|
/** Shared scheduler-list lifecycle with generation-scoped stale-response guards. */
|
|
5837
|
-
export declare const useScheduledTasks: (client: ScheduledTasksApiClient, { enabled, pageSize, debounceMs, initialSearch, initialSort, }?: UseScheduledTasksOptions) => {
|
|
6332
|
+
export declare const useScheduledTasks: (client: ScheduledTasksApiClient, { enabled, pageSize, debounceMs, initialSearch, initialSort, model, }?: UseScheduledTasksOptions) => {
|
|
5838
6333
|
items: ScheduledTaskDto[];
|
|
5839
6334
|
searchQuery: string;
|
|
5840
6335
|
setSearchQuery: Dispatch<SetStateAction<string>>;
|
|
@@ -5856,6 +6351,8 @@ export declare interface UseScheduledTasksOptions {
|
|
|
5856
6351
|
debounceMs?: number;
|
|
5857
6352
|
initialSearch?: string;
|
|
5858
6353
|
initialSort?: ListScheduledTasksSortEnum;
|
|
6354
|
+
/** Restricts the list to tasks of one model/application; changing it reloads from the first page. */
|
|
6355
|
+
model?: string;
|
|
5859
6356
|
}
|
|
5860
6357
|
|
|
5861
6358
|
/**
|
|
@@ -5900,7 +6397,7 @@ export declare interface UseShareRecipientsCountResult {
|
|
|
5900
6397
|
|
|
5901
6398
|
/**
|
|
5902
6399
|
* 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
|
|
6400
|
+
* precheck, in-flight exclusion, abort-on-close, and import completion. The host supplies the configured request
|
|
5904
6401
|
* and observes completion/failure through the injected callbacks; the hook never imports app
|
|
5905
6402
|
* contexts, i18n, or a configured API client.
|
|
5906
6403
|
*/
|
|
@@ -5908,8 +6405,8 @@ export declare const useSkillArchiveImport: <TResult>({ importArchive, onImporte
|
|
|
5908
6405
|
|
|
5909
6406
|
/** Options accepted by {@link useSkillArchiveImport}. */
|
|
5910
6407
|
export declare interface UseSkillArchiveImportOptions<TResult> {
|
|
5911
|
-
/** Submits the selected archive; the host owns
|
|
5912
|
-
importArchive: (file: File) => Promise<TResult>;
|
|
6408
|
+
/** Submits the selected archive; the host owns the client. `signal` aborts when the dialog closes or the hook unmounts mid-upload. */
|
|
6409
|
+
importArchive: (file: File, signal: AbortSignal) => Promise<TResult>;
|
|
5913
6410
|
/** Called once after a successful import (and any awaited host follow-up) settles. */
|
|
5914
6411
|
onImported: (result: TResult) => void | Promise<void>;
|
|
5915
6412
|
/** Called once when the import request, or the host's follow-up in {@link onImported}, fails. */
|
|
@@ -5924,13 +6421,15 @@ export declare interface UseSkillArchiveImportResult {
|
|
|
5924
6421
|
isDialogOpen: boolean;
|
|
5925
6422
|
/** Current phase of the import. */
|
|
5926
6423
|
status: SkillArchiveImportStatus;
|
|
6424
|
+
/** Whether an import request is in flight; the dialog stays open until it succeeds. */
|
|
6425
|
+
isUploading: boolean;
|
|
5927
6426
|
/** Reason the current/last selection was rejected locally; `undefined` once cleared. */
|
|
5928
6427
|
selectionRejectionReason: SkillArchiveSelectionRejectionReason | undefined;
|
|
5929
6428
|
/** Classified failure of the last import request; `undefined` outside a request failure. */
|
|
5930
6429
|
errorKind: SkillArchiveImportErrorKind | undefined;
|
|
5931
|
-
/** Opens the dialog
|
|
6430
|
+
/** Opens the dialog and clears any previous rejection or request failure. */
|
|
5932
6431
|
openDialog: () => void;
|
|
5933
|
-
/** Closes the dialog and clears any rejection reason. */
|
|
6432
|
+
/** Closes the dialog, aborting an in-flight import, and clears any rejection reason. */
|
|
5934
6433
|
closeDialog: () => void;
|
|
5935
6434
|
/** Wire to the dialog drop zone's `onChange`. */
|
|
5936
6435
|
handleFilesSelected: (files: File[]) => void;
|
|
@@ -6039,7 +6538,7 @@ export declare interface UseSkillEditorLoadResult {
|
|
|
6039
6538
|
* `client.createSkill`/`client.updateSkill`, and mapping the resulting
|
|
6040
6539
|
* success/error/conflict outcomes to presentable state.
|
|
6041
6540
|
*/
|
|
6042
|
-
export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, frontmatterRef, loadedPathRef, etagRef, returnUrl, refetchSkills, client, messages, onNavigate, onNotify, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
|
|
6541
|
+
export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, frontmatterRef, loadedPathRef, etagRef, returnUrl, getCreateReturnUrl, refetchSkills, client, messages, onNavigate, onNotify, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
|
|
6043
6542
|
|
|
6044
6543
|
/** Parameters accepted by {@link useSkillEditorSubmit}. */
|
|
6045
6544
|
export declare interface UseSkillEditorSubmitParams {
|
|
@@ -6059,6 +6558,8 @@ export declare interface UseSkillEditorSubmitParams {
|
|
|
6059
6558
|
etagRef: React.MutableRefObject<string | undefined>;
|
|
6060
6559
|
/** Where to navigate on a successful save. */
|
|
6061
6560
|
returnUrl: string;
|
|
6561
|
+
/** Resolves the destination after creation from the normalized skill path. Defaults to `returnUrl`. */
|
|
6562
|
+
getCreateReturnUrl?: (path: string) => string;
|
|
6062
6563
|
/** Refetches the host's skill listing after a successful save. */
|
|
6063
6564
|
refetchSkills: () => Promise<void>;
|
|
6064
6565
|
/** Already-configured create/update operations. */
|
|
@@ -6079,6 +6580,10 @@ export declare interface UseSkillEditorSubmitResult {
|
|
|
6079
6580
|
errors: SkillEditorErrors;
|
|
6080
6581
|
/** General submit-time error, distinct from a stale-edit `conflict`. */
|
|
6081
6582
|
submitError: string | undefined;
|
|
6583
|
+
/** Whether `submitError` was caused by something a plain re-send can clear, rather than by the submission itself. */
|
|
6584
|
+
isSubmitErrorRetryable: boolean;
|
|
6585
|
+
/** Re-submits the values of the attempt that produced `submitError`. No-op before the first submit. */
|
|
6586
|
+
retrySubmit: () => void;
|
|
6082
6587
|
/** Present when the last save hit a stale-ETag conflict. */
|
|
6083
6588
|
conflict: {
|
|
6084
6589
|
message: string;
|
|
@@ -6098,10 +6603,11 @@ export declare interface UseSkillEditorSubmitResult {
|
|
|
6098
6603
|
/**
|
|
6099
6604
|
* Owns the Skill Editor's batch file upload workflow: validating a staged
|
|
6100
6605
|
* batch, committing it atomically (supporting files plus an optional
|
|
6101
|
-
* `SKILL.md` manifest import, with a confirmation gate),
|
|
6606
|
+
* `SKILL.md` manifest import, with a confirmation gate), creating empty
|
|
6607
|
+
* folders, expanding `.zip` archives for staging, and removing
|
|
6102
6608
|
* already-committed nodes.
|
|
6103
6609
|
*/
|
|
6104
|
-
export declare const useSkillFileActions: ({ files, setFiles, filesContentRef, frontmatterRef, loadedValues, setLoadedValues, isEditMode, isDirty, setSelectedPath, messages, }: UseSkillFileActionsParams) => UseSkillFileActionsResult;
|
|
6610
|
+
export declare const useSkillFileActions: ({ files, setFiles, filesContentRef, frontmatterRef, loadedValues, setLoadedValues, isEditMode, isDirty, setSelectedPath, messages, pickFromFileSystem, }: UseSkillFileActionsParams) => UseSkillFileActionsResult;
|
|
6105
6611
|
|
|
6106
6612
|
/** Parameters accepted by {@link useSkillFileActions}. */
|
|
6107
6613
|
export declare interface UseSkillFileActionsParams {
|
|
@@ -6125,6 +6631,12 @@ export declare interface UseSkillFileActionsParams {
|
|
|
6125
6631
|
setSelectedPath: Dispatch<SetStateAction<string>>;
|
|
6126
6632
|
/** Localized messages, resolved by the host. */
|
|
6127
6633
|
messages: SkillFileActionsMessages;
|
|
6634
|
+
/**
|
|
6635
|
+
* Opens the host's file-system picker; passed through unchanged as
|
|
6636
|
+
* `fileActions.pickFromFileSystem`. Omit to hide the editor's "Open DIAL
|
|
6637
|
+
* file system" entry.
|
|
6638
|
+
*/
|
|
6639
|
+
pickFromFileSystem?: () => Promise<SkillFileSourceEntry[] | undefined>;
|
|
6128
6640
|
}
|
|
6129
6641
|
|
|
6130
6642
|
/** Return value of {@link useSkillFileActions}. */
|
|
@@ -6456,4 +6968,7 @@ export declare enum WithLogin {
|
|
|
6456
6968
|
WithConfig = "with-config"
|
|
6457
6969
|
}
|
|
6458
6970
|
|
|
6971
|
+
/** Returns `sections` with every root label usable as a unique first path segment, falling back to the tab id. */
|
|
6972
|
+
export declare const withRoutableRootLabels: <TSection extends DialFileManagerSection>(sections: readonly TSection[]) => TSection[];
|
|
6973
|
+
|
|
6459
6974
|
export { }
|