@epam/ai-dial-chat-hooks 1.2.0-dev.11 → 1.2.0-dev.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-error/api-error.js +5 -4
- package/attachment/useAttachmentValidation/useAttachmentValidation.js +26 -19
- package/attachments.d.ts +10 -4
- package/catalog/map-deployment-to-catalog-item.js +2 -2
- package/catalog/map-skill-to-catalog-item.js +30 -27
- package/catalog/publish.js +2 -1
- package/catalog/useApplicationCredentials/useApplicationCredentials.js +39 -0
- package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js +39 -39
- package/catalog/useSkillItemDetails.js +17 -13
- package/catalog.d.ts +42 -5
- package/catalog.js +6 -5
- package/conversation/conversation-transfer/queue.js +8 -5
- package/conversation/stage.js +23 -0
- package/conversation/useAttachmentUpload/useAttachmentUpload.js +12 -5
- package/conversation/useConversationHandlers/useConversationHandlers.js +13 -17
- package/conversation/useConversationImport/useConversationImport.js +1 -1
- package/conversation/useConversationScroll/useConversationScroll.js +68 -64
- package/conversation/useConversationStream/apply-chunk.js +1 -1
- package/conversation/useConversationStream/useConversationStream.js +5 -1
- package/conversation-overlay.d.ts +7 -0
- package/conversation-overlay.js +2 -0
- package/conversation.d.ts +108 -5
- package/conversation.js +24 -23
- package/file-manager-canvas.d.ts +398 -0
- package/file-manager-canvas.js +2 -0
- package/file-manager.d.ts +71 -330
- package/file-manager.js +15 -15
- package/files/attachment-canvas.js +51 -13
- package/files/attachment-types.js +14 -13
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +1 -5
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +43 -0
- package/index.d.ts +717 -31
- package/index.js +123 -111
- package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.js +7 -5
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +1 -1
- package/mcp-apps/useMcpAppTools/useMcpAppTools.js +1 -1
- package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.js +25 -23
- package/mcp-apps.d.ts +8 -6
- package/package.json +37 -18
- package/scheduled-task/scheduled-task-description.js +77 -0
- package/scheduled-task/scheduled-task-preparation.js +24 -0
- package/scheduled-task/scheduled-task-trigger.js +7 -2
- package/scheduled-task/scheduled-tasks-api-client.js +19 -0
- package/scheduled-task/use-scheduled-task-runs.js +82 -0
- package/scheduled-task/use-scheduled-tasks.js +93 -0
- package/scheduled-tasks.d.ts +180 -3
- package/scheduled-tasks.js +7 -2
- package/skill/skill.js +10 -7
- package/skill/useSkillArchiveImport/useSkillArchiveImport.js +75 -0
- package/skill/useSkillEditorLoad.js +29 -28
- package/skill/useSkillEditorSubmit.js +92 -75
- package/skill-editor.d.ts +107 -0
- package/skill-editor.js +9 -8
- package/usage/map-usage-data-to-dashboard.js +66 -0
- package/usage/map-user-usage-to-model-limits.js +160 -0
- package/usage.d.ts +120 -0
- package/usage.js +3 -0
- package/utils.d.ts +3 -1
package/index.js
CHANGED
|
@@ -23,114 +23,126 @@ import { mapDeploymentDetailsDtoToEntityDetails as Q, mapEntityDetailsToCatalogD
|
|
|
23
23
|
import { mapDeploymentToCatalogItem as te, mapDeploymentToolsetCredentials as ne, mapToolsetToCatalogItem as re, resolveDeploymentFolder as ie } from "./catalog/map-deployment-to-catalog-item.js";
|
|
24
24
|
import { PromptSource as ae, parsePromptResourceUrl as oe } from "./prompt/prompt-resource.js";
|
|
25
25
|
import { buildPromptOverview as se, isOrganisationPromptItem as ce, mapPromptToCatalogItem as le } from "./catalog/map-prompt-to-catalog-item.js";
|
|
26
|
-
import { SKILL_FILE_UPLOAD_MAX_BYTES as ue, SKILL_MANIFEST_FILE as de, SKILL_UPLOAD_MAX_FILES as fe, SKILL_UPLOAD_MAX_TOTAL_BYTES as pe, buildSkillFilesPayload as me, buildSkillManifest as he, buildSkillManifestForSubmit as ge, buildSkillManifestFromFrontmatter as _e, isValidSkillRelativePath as ve, nameFromPath as ye, normalizeSkillName as be, parseSkillManifest as xe, skillFileBytesToBlob as Se,
|
|
27
|
-
import { PUBLIC_SKILL_BUCKET as
|
|
28
|
-
import { buildSkillContentTree as
|
|
29
|
-
import { McpResourceKind as
|
|
30
|
-
import { getPublicCatalogEntityFolderPath as
|
|
31
|
-
import { deriveAvailableTabIds as
|
|
32
|
-
import { CatalogPrimaryActionType as
|
|
33
|
-
import { useCatalogEditNavigation as
|
|
34
|
-
import { parseSkillManifestDocument as
|
|
35
|
-
import { useSkillItemDetails as
|
|
36
|
-
import { useCatalogItemDetails as
|
|
37
|
-
import { OAuthResourceKind as
|
|
38
|
-
import { emitToolsetLoginSuccess as
|
|
39
|
-
import { getToolsetOAuthChannelName as
|
|
40
|
-
import { buildToolsetAuthorizeUrl as
|
|
41
|
-
import { initiateOAuthLogin as
|
|
42
|
-
import { ToolsetLoginOutcomeType as
|
|
43
|
-
import { useCatalogToolsetCredentials as
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
116
|
-
import {
|
|
117
|
-
import {
|
|
118
|
-
import {
|
|
119
|
-
import {
|
|
120
|
-
import {
|
|
121
|
-
import {
|
|
122
|
-
import {
|
|
123
|
-
import {
|
|
124
|
-
import {
|
|
125
|
-
import {
|
|
126
|
-
import {
|
|
127
|
-
import {
|
|
128
|
-
import {
|
|
129
|
-
import {
|
|
130
|
-
import {
|
|
131
|
-
import {
|
|
132
|
-
import {
|
|
133
|
-
import {
|
|
134
|
-
import {
|
|
135
|
-
import {
|
|
136
|
-
|
|
26
|
+
import { SKILL_FILE_UPLOAD_MAX_BYTES as ue, SKILL_MANIFEST_FILE as de, SKILL_UPLOAD_MAX_FILES as fe, SKILL_UPLOAD_MAX_TOTAL_BYTES as pe, buildSkillFilesPayload as me, buildSkillManifest as he, buildSkillManifestForSubmit as ge, buildSkillManifestFromFrontmatter as _e, isValidSkillRelativePath as ve, nameFromPath as ye, normalizeSkillName as be, parseSkillManifest as xe, skillFileBytesToBlob as Se, startsWithFrontmatterBlock as Ce, unpackSkillArchive as we } from "./skill/skill.js";
|
|
27
|
+
import { PUBLIC_SKILL_BUCKET as Te, SKILL_LISTING_MAX_PAGES as Ee, SKILL_LISTING_PAGE_SIZE as De, SKILL_MANIFEST_MAX_BYTES as Oe, SkillSource as ke, parseSkillResourceUrl as Ae } from "./skill/skill-types.js";
|
|
28
|
+
import { buildSkillContentTree as je, buildSkillOverview as Me, mapSkillToCatalogItem as Ne, readSkillFileBytes as Pe, readSkillFilePreviewBytes as Fe, readSkillManifest as Ie, resolveSkillFileDownloadPath as Le, resolveSkillManifestFileId as Re } from "./catalog/map-skill-to-catalog-item.js";
|
|
29
|
+
import { McpResourceKind as ze, buildApplicationMcpUrl as Be, buildConnectApi as Ve, buildToolsetMcpUrl as He, resolveMcpResourceKind as Ue } from "./catalog/mcp-endpoint-url.js";
|
|
30
|
+
import { getPublicCatalogEntityFolderPath as We, isPublicCatalogEntityId as Ge, mapPublishConversationResultDto as Ke, mapPublishHistoryEntryDto as qe, toPublishEntityType as Je } from "./catalog/publish.js";
|
|
31
|
+
import { deriveAvailableTabIds as Ye, deriveFavoriteItems as Xe, filterCatalogItemsBySelector as Ze, filterHiddenOwnedItems as Qe, reconcileFilterTopics as $e } from "./catalog/catalog-derivations.js";
|
|
32
|
+
import { CatalogPrimaryActionType as et, resolveCatalogPrimaryAction as tt } from "./catalog/catalog-primary-action.js";
|
|
33
|
+
import { useCatalogEditNavigation as nt } from "./catalog/useCatalogEditNavigation/useCatalogEditNavigation.js";
|
|
34
|
+
import { parseSkillManifestDocument as rt } from "./skill/skill-manifest.js";
|
|
35
|
+
import { useSkillItemDetails as it } from "./catalog/useSkillItemDetails.js";
|
|
36
|
+
import { useCatalogItemDetails as at } from "./catalog/useCatalogItemDetails.js";
|
|
37
|
+
import { OAuthResourceKind as ot, TOOLSET_REDIRECT_STATE_KEY as st, ToolsetAuthStatus as ct, ToolsetAuthTypes as lt, ToolsetCredentialsLevel as ut, ToolsetOAuthCallbackQuery as dt, ToolsetOAuthChannelControlType as ft, ToolsetOAuthFailureReason as pt, ToolsetOAuthInitiationResultType as mt, ToolsetOAuthResultType as ht, WithLogin as gt } from "./oauth/types.js";
|
|
38
|
+
import { emitToolsetLoginSuccess as _t, subscribeToolsetLoginSuccess as vt } from "./shared/toolset-login-events.js";
|
|
39
|
+
import { getToolsetOAuthChannelName as yt, waitForToolsetOAuthResult as bt } from "./oauth/handshake.js";
|
|
40
|
+
import { buildToolsetAuthorizeUrl as xt, getToolsetRedirectUri as St } from "./oauth/authorize-url.js";
|
|
41
|
+
import { initiateOAuthLogin as Ct, navigateToolsetOAuthPopup as wt, openToolsetOAuthPopup as Tt } from "./oauth/popup.js";
|
|
42
|
+
import { ToolsetLoginOutcomeType as Et, useToolsetLogin as Dt } from "./oauth/useToolsetLogin/useToolsetLogin.js";
|
|
43
|
+
import { useCatalogToolsetCredentials as Ot } from "./catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js";
|
|
44
|
+
import { useApplicationCredentials as kt } from "./catalog/useApplicationCredentials/useApplicationCredentials.js";
|
|
45
|
+
import { useSkillDetailsPanelData as At } from "./catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js";
|
|
46
|
+
import { FavoriteEntityType as jt, useFavoriteEntitiesState as Mt } from "./catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js";
|
|
47
|
+
import { usePublishFolders as Nt } from "./catalog/usePublishFolders/usePublishFolders.js";
|
|
48
|
+
import { buildAnnouncementSignature as Pt, hasAnnouncementContent as Ft, hasStructuredAnnouncement as It, sanitizeAnnouncementHtml as Lt, sanitizeAnnouncementMessageHtml as Rt } from "./conversation/announcement-message.js";
|
|
49
|
+
import { DEFAULT_GENERATION_CONFLICT_MESSAGE as zt, GenerationConflictError as Bt, createChatStreamApi as Vt } from "./conversation/create-chat-stream-api.js";
|
|
50
|
+
import { shouldWatchForDisplayNameUpdate as Ht } from "./conversation/display-name-watch.js";
|
|
51
|
+
import { formatAppVersion as Ut, sanitizeFooterHtml as Wt } from "./conversation/footer-message.js";
|
|
52
|
+
import { getModelIdFromConversationId as Gt } from "./conversation/get-model-id-from-conversation-id.js";
|
|
53
|
+
import { getTimeOfDayGreeting as Kt } from "./conversation/greeting.js";
|
|
54
|
+
import { createDeploymentChangedMessage as qt } from "./conversation/message-factory.js";
|
|
55
|
+
import { getLastDeploymentId as Jt, getLastUserMessageToolConfiguration as Yt, isMessageStreaming as Xt, messageHasStages as Zt, normalizeResponseFormat as Qt } from "./conversation/message-utils.js";
|
|
56
|
+
import { toOverlayMessages as $t } from "./conversation/overlay-messages.js";
|
|
57
|
+
import { getQuickAppConversationStarters as en } from "./conversation/quick-app-conversation-starters.js";
|
|
58
|
+
import { mapStages as tn, toStage as nn } from "./conversation/stage.js";
|
|
59
|
+
import { getStarterPopulateText as rn, getStartersFromSchema as an } from "./conversation/starter-option.js";
|
|
60
|
+
import { useOAuthCallbackCompletion as on } from "./oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.js";
|
|
61
|
+
import { buildPromptExportEnvelope as sn, buildPromptExportFileName as cn, serializePromptExport as ln } from "./prompt/export-prompt.js";
|
|
62
|
+
import { PROMPT_CONTENT_MAX_LENGTH as un, PROMPT_COUNTER_ANNOUNCE_THRESHOLD as dn, PROMPT_DESCRIPTION_MAX_LENGTH as fn, PROMPT_NAME_MAX_LENGTH as pn, PromptFieldError as mn, buildPromptPath as hn, getRemainingCharacters as gn, validatePromptContent as _n, validatePromptDescription as vn, validatePromptName as yn } from "./prompt/prompt.js";
|
|
63
|
+
import { usePromptsState as bn } from "./prompt/usePromptsState/usePromptsState.js";
|
|
64
|
+
import { UnsupportedTriggerReason as xn } from "./scheduled-task/scheduled-task-mapping.js";
|
|
65
|
+
import { ScheduledTaskTriggerDescriptionKind as Sn, describeScheduledTaskTrigger as Cn } from "./scheduled-task/scheduled-task-description.js";
|
|
66
|
+
import { apSchedulerDayToJsDay as wn, jsDayToApSchedulerDay as Tn } from "./shared/cron-weekday.js";
|
|
67
|
+
import { mapFormValuesToCreateBody as En, mapFormValuesToUpdateBody as Dn, mapScheduledTaskDtoToFormValues as On } from "./scheduled-task/scheduled-task-trigger.js";
|
|
68
|
+
import { prepareScheduledTaskCreateBody as kn, prepareScheduledTaskUpdateBody as An } from "./scheduled-task/scheduled-task-preparation.js";
|
|
69
|
+
import { createScheduledTasksApiClient as jn } from "./scheduled-task/scheduled-tasks-api-client.js";
|
|
70
|
+
import { useScheduledTasks as Mn } from "./scheduled-task/use-scheduled-tasks.js";
|
|
71
|
+
import { useScheduledTaskRuns as Nn } from "./scheduled-task/use-scheduled-task-runs.js";
|
|
72
|
+
import { validateSkillFileBatch as Pn } from "./skill/skill-file-batch-validation.js";
|
|
73
|
+
import { skillFileToAttachment as Fn } from "./skill/skill-file-preview.js";
|
|
74
|
+
import { SkillEditorLoadState as In, useSkillEditorLoad as Ln } from "./skill/useSkillEditorLoad.js";
|
|
75
|
+
import { useSkillEditorSubmit as Rn } from "./skill/useSkillEditorSubmit.js";
|
|
76
|
+
import { useSkillFileActions as zn } from "./skill/useSkillFileActions.js";
|
|
77
|
+
import { SkillPreviewErrorKind as Bn, useSkillFilePreview as Vn } from "./skill/useSkillFilePreview.js";
|
|
78
|
+
import { useSkillsState as Hn } from "./skill/useSkillsState/useSkillsState.js";
|
|
79
|
+
import { SkillArchiveImportErrorKind as Un, SkillArchiveImportStatus as Wn, SkillArchiveSelectionRejectionReason as Gn, classifySkillArchiveImportError as Kn, useSkillArchiveImport as qn } from "./skill/useSkillArchiveImport/useSkillArchiveImport.js";
|
|
80
|
+
import { RecipientsCountStatus as Jn, useShareRecipientsCount as Yn } from "./useShareRecipientsCount/useShareRecipientsCount.js";
|
|
81
|
+
import { deriveConversationRowActionState as Xn } from "./conversation/deriveConversationRowActionState/deriveConversationRowActionState.js";
|
|
82
|
+
import { useActiveConversationSync as Zn } from "./conversation/useActiveConversationSync/useActiveConversationSync.js";
|
|
83
|
+
import { useAsyncConfirmDialog as Qn } from "./conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.js";
|
|
84
|
+
import { useConversationLookupMaps as $n } from "./conversation/useConversationLookupMaps/useConversationLookupMaps.js";
|
|
85
|
+
import { getConversationSource as er, useConversationPanelItems as tr } from "./conversation/useConversationPanelItems/useConversationPanelItems.js";
|
|
86
|
+
import { useImportFilePicker as nr } from "./conversation/useImportFilePicker/useImportFilePicker.js";
|
|
87
|
+
import { sanitizeFileName as rr, splitFileNameExtension as ir, trimFileNameToByteLimit as ar } from "./files/file-name.js";
|
|
88
|
+
import { useAttachmentUpload as or } from "./conversation/useAttachmentUpload/useAttachmentUpload.js";
|
|
89
|
+
import { AudioTranscriptionError as sr, AudioTranscriptionErrorReason as cr } from "./conversation/useTranscribeAudio/audio-transcription-error.js";
|
|
90
|
+
import { useTranscribeAudio as lr } from "./conversation/useTranscribeAudio/useTranscribeAudio.js";
|
|
91
|
+
import { DEFAULT_MAX_ARCHIVE_BYTES as ur, useConversationExport as dr } from "./conversation/useConversationExport/useConversationExport.js";
|
|
92
|
+
import { attachmentToDto as fr, attachmentsToDtos as pr } from "./conversation/useConversationHandlers/attachment-to-dto.js";
|
|
93
|
+
import { createMessagePair as mr } from "./conversation/useConversationHandlers/message-factory.js";
|
|
94
|
+
import { hasActiveToolConfig as hr, isAnswerIncomplete as gr, isMessageChanged as _r, shouldRerunGenerationOnEdit as vr } from "./conversation/useConversationHandlers/message-utils.js";
|
|
95
|
+
import { getStarterConversationText as yr, getStarterDisplayText as br, getStarterSubmitText as xr } from "./conversation/useConversationHandlers/starter-option.js";
|
|
96
|
+
import { getConversationPath as Sr } from "./conversation/useConversationStream/conversation-path.js";
|
|
97
|
+
import { useConversationHandlers as Cr } from "./conversation/useConversationHandlers/useConversationHandlers.js";
|
|
98
|
+
import { useConversationImport as wr } from "./conversation/useConversationImport/useConversationImport.js";
|
|
99
|
+
import { useConversationScroll as Tr } from "./conversation/useConversationScroll/useConversationScroll.js";
|
|
100
|
+
import { applyChunkToMessages as Er, mergeStages as Dr } from "./conversation/useConversationStream/apply-chunk.js";
|
|
101
|
+
import { isAwaitingGenerationResume as Or } from "./conversation/useConversationStream/generation-resume.js";
|
|
102
|
+
import { useConversationStream as kr } from "./conversation/useConversationStream/useConversationStream.js";
|
|
103
|
+
import { useConversationSources as Ar } from "./conversation-sources/useConversationSources/useConversationSources.js";
|
|
104
|
+
import { DialFilesApiUploadMode as jr } from "./files/dial-files-api.js";
|
|
105
|
+
import { FileManagerNotificationReason as Mr, FileNameValidationErrorReason as Nr, FileOperationKind as Pr } from "./files/dial-file-manager.types.js";
|
|
106
|
+
import { COLUMNS_WITHOUT_AUTHOR as Fr, COLUMNS_WITH_AUTHOR as Ir, CORE_PERMISSION_MAP as Lr, DATE_OPTIONS as Rr, PATH_SEPARATOR_REGEXP as zr, RESERVED_MARKER_NAME as Br, UPLOAD_CONCURRENCY as Vr } from "./files/dial-file-manager.model.js";
|
|
107
|
+
import { DialFileManagerActionProfile as Hr, DialFileManagerVariant as Ur, deriveActionProfile as Wr } from "./files/file-manager-variant.js";
|
|
108
|
+
import { buildSharedItemVirtualPath as Gr, dialCorePathToRelative as Kr, findDialFileByPath as qr, findFolderByVirtualPath as Jr, formatOperationFolderName as Yr, getVirtualPathName as Xr, hasDialFileWritePermission as Zr, hasForbiddenNameSymbols as Qr, isCopyMoveDuplicateAllowed as $r, isShareActionsAllowed as ei, normalizeVirtualPath as ti, parseNewFolderVirtualPath as ni, resolveOwnerCoords as ri } from "./files/dial-file-manager-path.util.js";
|
|
109
|
+
import { getParentFolderPath as ii, resolveDialFileApiPath as ai, virtualPathToApiPath as oi } from "./files/resolve-dial-file-api-path.js";
|
|
110
|
+
import { prepareCopyItems as si, prepareMoveRenameItems as ci } from "./files/dial-file-manager-copy-move.util.js";
|
|
111
|
+
import { buildFromCache as li, fetchByTab as ui, fetchForSearch as di, findFirstSuccessfulCopyMoveItem as fi, mapCorePermissions as pi, mapFileMetadataToDialFile as mi, mapSearchItem as hi, mergeCreatedFolderIntoCache as gi, updateEntry as _i } from "./files/dial-file-manager-mapping.util.js";
|
|
112
|
+
import { createFilesApiClient as vi } from "./files/create-files-api.js";
|
|
113
|
+
import { createUploadFileWithProgress as yi } from "./files/create-upload-file-with-progress.js";
|
|
114
|
+
import { openAnnotationAttachment as bi } from "./files/annotation.js";
|
|
115
|
+
import { annotationToOoxmlCanvasContent as xi, annotationToPdfCanvasContent as Si, clearAttachmentCache as Ci, hasAttachmentTextSource as wi, referenceAttachmentToPdfCanvasContent as Ti, resolveCodeCanvasContent as Ei, resolveGroupedVisualizerCanvasContent as Di, resolveHtmlCanvasContent as Oi, resolveImageCanvasContent as ki, resolveJsonCanvasContent as Ai, resolveMarkdownCanvasContent as ji, resolveOoxmlCanvasContent as Mi, resolvePdfCanvasContent as Ni, resolveTextCanvasContent as Pi, resolveVisualizerCanvasContent as Fi } from "./files/attachment-canvas.js";
|
|
116
|
+
import { getUrlFileName as Ii, isExternalSourcePreviewable as Li, resolveExternalSourceContentType as Ri } from "./files/source-content.js";
|
|
117
|
+
import { annotationToDisplayAttachment as zi, attachmentDtoToDisplayAttachment as Bi, attachmentDtosToDisplayAttachments as Vi } from "./files/attachment-dto-to-display.js";
|
|
118
|
+
import { dialFileToAttachment as Hi, dialFilesToAttachments as Ui, dialFolderPathToAttachment as Wi } from "./files/dial-file-to-attachment.js";
|
|
119
|
+
import { DownloadDestinationType as Gi } from "./files/download-destination.js";
|
|
120
|
+
import { prepareDownloadDestination as Ki } from "./files/prepare-download-destination.js";
|
|
121
|
+
import { useDialFileListing as qi } from "./files/useDialFileListing/useDialFileListing.js";
|
|
122
|
+
import { useDialFileMetadata as Ji } from "./files/useDialFileMetadata/useDialFileMetadata.js";
|
|
123
|
+
import { useDialFileMutations as Yi } from "./files/useDialFileMutations/useDialFileMutations.js";
|
|
124
|
+
import { useDialFileSharing as Xi } from "./files/useDialFileSharing/useDialFileSharing.js";
|
|
125
|
+
import { useDialFileUploadBatch as Zi } from "./files/useDialFileUploadBatch/useDialFileUploadBatch.js";
|
|
126
|
+
import { useDialFileManager as Qi } from "./files/useDialFileManager/useDialFileManager.js";
|
|
127
|
+
import { useDialFileManagerTabConfig as $i } from "./files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js";
|
|
128
|
+
import { useFileAttachmentPicker as ea } from "./files/useFileAttachmentPicker/useFileAttachmentPicker.js";
|
|
129
|
+
import { isCustomAppSchema as ta, isQuickAppSchema as na } from "./shared/application-schema.js";
|
|
130
|
+
import { getBrowserTimezone as ra } from "./shared/browser-timezone.js";
|
|
131
|
+
import { isValidAbsoluteUrl as ia, isValidFeaturesData as aa, parseFeaturesData as oa } from "./shared/custom-apps.js";
|
|
132
|
+
import { buildExternalServiceScopeId as sa, getExternalServiceFallbackName as ca, parseExternalServiceUrl as la } from "./shared/external-services.js";
|
|
133
|
+
import { useChatSettingsFormConfig as ua } from "./useChatSettingsFormConfig/useChatSettingsFormConfig.js";
|
|
134
|
+
import { usePageFileDrag as da } from "./usePageFileDrag/usePageFileDrag.js";
|
|
135
|
+
import { useViewportWidth as fa } from "./useViewportWidth/useViewportWidth.js";
|
|
136
|
+
import { usePanelMaxWidth as pa } from "./usePanelMaxWidth/usePanelMaxWidth.js";
|
|
137
|
+
import { useShareLink as ma } from "./useShareLink/useShareLink.js";
|
|
138
|
+
import { useToolsMenu as ha } from "./useToolsMenu/useToolsMenu.js";
|
|
139
|
+
import { USAGE_DATA_I18N_KEYS as ga, mapUsageDataToDashboard as _a } from "./usage/map-usage-data-to-dashboard.js";
|
|
140
|
+
import { USAGE_MODEL_LIMITS_I18N_KEYS as va, mapOverallCostLimitsToPeriodStatuses as ya, mapUserUsageToModelLimits as ba } from "./usage/map-user-usage-to-model-limits.js";
|
|
141
|
+
import { useUsageData as xa } from "./usage/useUsageData/useUsageData.js";
|
|
142
|
+
import { McpAppResourceFetchError as Sa, createMcpAppsApiClient as Ca } from "./mcp-apps/mcp-apps-api-client.js";
|
|
143
|
+
import { useMcpAppTools as wa } from "./mcp-apps/useMcpAppTools/useMcpAppTools.js";
|
|
144
|
+
import { useMcpAppHostContext as Ta } from "./mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js";
|
|
145
|
+
import { useMcpAppHostAdapter as Ea } from "./mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.js";
|
|
146
|
+
import { useOpenMcpAppCanvas as Da } from "./mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.js";
|
|
147
|
+
import { useGridEditingScroll as Oa } from "@epam/ai-dial-chat-shared";
|
|
148
|
+
export { x as AttachmentValidationErrorReason, sr as AudioTranscriptionError, cr as AudioTranscriptionErrorReason, R as AuthenticationType, Fr as COLUMNS_WITHOUT_AUTHOR, Ir as COLUMNS_WITH_AUTHOR, Lr as CORE_PERMISSION_MAP, et as CatalogPrimaryActionType, T as ConversationExportMode, E as ConversationTransferErrorCode, D as ConversationTransferWarningCode, Rr as DATE_OPTIONS, zt as DEFAULT_GENERATION_CONFLICT_MESSAGE, ur as DEFAULT_MAX_ARCHIVE_BYTES, Hr as DialFileManagerActionProfile, Ur as DialFileManagerVariant, jr as DialFilesApiUploadMode, Gi as DownloadDestinationType, k as EXPORT_APP_NAME, O as ExportFileNameKind, jt as FavoriteEntityType, Mr as FileManagerNotificationReason, Nr as FileNameValidationErrorReason, Pr as FileOperationKind, Bt as GenerationConflictError, Sa as McpAppResourceFetchError, ze as McpResourceKind, ot as OAuthResourceKind, zr as PATH_SEPARATOR_REGEXP, un as PROMPT_CONTENT_MAX_LENGTH, dn as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, fn as PROMPT_DESCRIPTION_MAX_LENGTH, pn as PROMPT_NAME_MAX_LENGTH, Te as PUBLIC_SKILL_BUCKET, mn as PromptFieldError, ae as PromptSource, Br as RESERVED_MARKER_NAME, Jn as RecipientsCountStatus, ue as SKILL_FILE_UPLOAD_MAX_BYTES, Ee as SKILL_LISTING_MAX_PAGES, De as SKILL_LISTING_PAGE_SIZE, de as SKILL_MANIFEST_FILE, Oe as SKILL_MANIFEST_MAX_BYTES, fe as SKILL_UPLOAD_MAX_FILES, pe as SKILL_UPLOAD_MAX_TOTAL_BYTES, Sn as ScheduledTaskTriggerDescriptionKind, Un as SkillArchiveImportErrorKind, Wn as SkillArchiveImportStatus, Gn as SkillArchiveSelectionRejectionReason, In as SkillEditorLoadState, Bn as SkillPreviewErrorKind, ke as SkillSource, st as TOOLSET_REDIRECT_STATE_KEY, ct as ToolsetAuthStatus, lt as ToolsetAuthTypes, ut as ToolsetCredentialsLevel, Et as ToolsetLoginOutcomeType, dt as ToolsetOAuthCallbackQuery, ft as ToolsetOAuthChannelControlType, pt as ToolsetOAuthFailureReason, mt as ToolsetOAuthInitiationResultType, ht as ToolsetOAuthResultType, Vr as UPLOAD_CONCURRENCY, ga as USAGE_DATA_I18N_KEYS, va as USAGE_MODEL_LIMITS_I18N_KEYS, xn as UnsupportedTriggerReason, gt as WithLogin, zi as annotationToDisplayAttachment, xi as annotationToOoxmlCanvasContent, Si as annotationToPdfCanvasContent, wn as apSchedulerDayToJsDay, W as appendLocaleCode, Er as applyChunkToMessages, Bi as attachmentDtoToDisplayAttachment, Vi as attachmentDtosToDisplayAttachments, fr as attachmentToDto, pr as attachmentsToDtos, G as buildAdditionalLocaleOptions, Pt as buildAnnouncementSignature, Be as buildApplicationMcpUrl, N as buildChatCompletionsUrl, Ve as buildConnectApi, P as buildDeploymentConnectApi, sa as buildExternalServiceScopeId, li as buildFromCache, sn as buildPromptExportEnvelope, cn as buildPromptExportFileName, se as buildPromptOverview, hn as buildPromptPath, F as buildResponsesUrl, Gr as buildSharedItemVirtualPath, je as buildSkillContentTree, me as buildSkillFilesPayload, he as buildSkillManifest, ge as buildSkillManifestForSubmit, _e as buildSkillManifestFromFrontmatter, Me as buildSkillOverview, xt as buildToolsetAuthorizeUrl, He as buildToolsetMcpUrl, Kn as classifySkillArchiveImportError, Ci as clearAttachmentCache, K as composeLocalePayload, Vt as createChatStreamApi, i as createCsrfMiddleware, qt as createDeploymentChangedMessage, vi as createFilesApiClient, Ca as createMcpAppsApiClient, mr as createMessagePair, j as createPublishApiClient, jn as createScheduledTasksApiClient, a as createUnauthorizedMiddleware, yi as createUploadFileWithProgress, V as decodeToolsetId, q as decomposeLocalizedFields, Wr as deriveActionProfile, Ye as deriveAvailableTabIds, Xn as deriveConversationRowActionState, Xe as deriveFavoriteItems, Cn as describeScheduledTaskTrigger, Kr as dialCorePathToRelative, Hi as dialFileToAttachment, Ui as dialFilesToAttachments, Wi as dialFolderPathToAttachment, m as downloadAttachment, _t as emitToolsetLoginSuccess, I as encodeDeploymentId, H as encodeToolsetId, ui as fetchByTab, di as fetchForSearch, Ze as filterCatalogItemsBySelector, Qe as filterHiddenOwnedItems, L as findDeploymentByIdOrReference, qr as findDialFileByPath, fi as findFirstSuccessfulCopyMoveItem, Jr as findFolderByVirtualPath, Ut as formatAppVersion, X as formatCalendarDate, C as formatDateYM, w as formatDateYMD, Yr as formatOperationFolderName, A as formatQuotedNameList, e as getApiErrorDetails, t as getApiErrorMessage, n as getApiErrorStatus, ra as getBrowserTimezone, Sr as getConversationPath, er as getConversationSource, ca as getExternalServiceFallbackName, Jt as getLastDeploymentId, Yt as getLastUserMessageToolConfiguration, Gt as getModelIdFromConversationId, ii as getParentFolderPath, We as getPublicCatalogEntityFolderPath, en as getQuickAppConversationStarters, gn as getRemainingCharacters, yr as getStarterConversationText, br as getStarterDisplayText, rn as getStarterPopulateText, xr as getStarterSubmitText, an as getStartersFromSchema, Kt as getTimeOfDayGreeting, yt as getToolsetOAuthChannelName, St as getToolsetRedirectUri, Ii as getUrlFileName, Xr as getVirtualPathName, hr as hasActiveToolConfig, Ft as hasAnnouncementContent, wi as hasAttachmentTextSource, Zr as hasDialFileWritePermission, Qr as hasForbiddenNameSymbols, It as hasStructuredAnnouncement, o as includesIgnoreCase, Ct as initiateOAuthLogin, gr as isAnswerIncomplete, Or as isAwaitingGenerationResume, r as isConversationNotFoundError, $r as isCopyMoveDuplicateAllowed, ta as isCustomAppSchema, _ as isDialFileAcceptType, d as isDialFileId, h as isDownloadableAttachment, Li as isExternalSourcePreviewable, _r as isMessageChanged, Xt as isMessageStreaming, ce as isOrganisationPromptItem, Ge as isPublicCatalogEntityId, U as isPublicToolsetId, na as isQuickAppSchema, ei as isShareActionsAllowed, ia as isValidAbsoluteUrl, aa as isValidFeaturesData, ve as isValidSkillRelativePath, Tn as jsDayToApSchedulerDay, pi as mapCorePermissions, Q as mapDeploymentDetailsDtoToEntityDetails, z as mapDeploymentLimitsDtoToCatalogLimits, B as mapDeploymentLimitsToInput, te as mapDeploymentToCatalogItem, ne as mapDeploymentToolsetCredentials, $ as mapEntityDetailsToCatalogDetails, mi as mapFileMetadataToDialFile, En as mapFormValuesToCreateBody, Dn as mapFormValuesToUpdateBody, ya as mapOverallCostLimitsToPeriodStatuses, le as mapPromptToCatalogItem, Ke as mapPublishConversationResultDto, qe as mapPublishHistoryEntryDto, On as mapScheduledTaskDtoToFormValues, hi as mapSearchItem, Ne as mapSkillToCatalogItem, tn as mapStages, ee as mapToolsetCredentials, re as mapToolsetToCatalogItem, _a as mapUsageDataToDashboard, ba as mapUserUsageToModelLimits, gi as mergeCreatedFolderIntoCache, Dr as mergeStages, Zt as messageHasStages, v as mimeTypesToAttachmentExtensionLabels, y as mimeTypesToDialFileAcceptTypes, b as mimeTypesToFileAccept, ye as nameFromPath, wt as navigateToolsetOAuthPopup, Qt as normalizeResponseFormat, be as normalizeSkillName, ti as normalizeVirtualPath, bi as openAnnotationAttachment, Tt as openToolsetOAuthPopup, Z as padTwoDigits, la as parseExternalServiceUrl, oa as parseFeaturesData, ni as parseNewFolderVirtualPath, oe as parsePromptResourceUrl, xe as parseSkillManifest, rt as parseSkillManifestDocument, Ae as parseSkillResourceUrl, si as prepareCopyItems, Ki as prepareDownloadDestination, ci as prepareMoveRenameItems, kn as prepareScheduledTaskCreateBody, An as prepareScheduledTaskUpdateBody, Pe as readSkillFileBytes, Fe as readSkillFilePreviewBytes, Ie as readSkillManifest, $e as reconcileFilterTopics, Ti as referenceAttachmentToPdfCanvasContent, tt as resolveCatalogPrimaryAction, Ei as resolveCodeCanvasContent, ie as resolveDeploymentFolder, ai as resolveDialFileApiPath, f as resolveDialFileBucketAndPath, Ri as resolveExternalSourceContentType, Di as resolveGroupedVisualizerCanvasContent, Oi as resolveHtmlCanvasContent, ki as resolveImageCanvasContent, Ai as resolveJsonCanvasContent, J as resolveLocalizedText, ji as resolveMarkdownCanvasContent, Ue as resolveMcpResourceKind, Mi as resolveOoxmlCanvasContent, ri as resolveOwnerCoords, Ni as resolvePdfCanvasContent, p as resolveRelativeDialFilePath, Le as resolveSkillFileDownloadPath, Re as resolveSkillManifestFileId, Pi as resolveTextCanvasContent, Fi as resolveVisualizerCanvasContent, s as safeDecodeURI, c as safeDecodeURIComponent, Lt as sanitizeAnnouncementHtml, Rt as sanitizeAnnouncementMessageHtml, rr as sanitizeFileName, Wt as sanitizeFooterHtml, ln as serializePromptExport, vr as shouldRerunGenerationOnEdit, Ht as shouldWatchForDisplayNameUpdate, Se as skillFileBytesToBlob, Fn as skillFileToAttachment, ir as splitFileNameExtension, Ce as startsWithFrontmatterBlock, l as stripSurroundingSlashes, u as stripTrailingSlashes, vt as subscribeToolsetLoginSuccess, Y as toBaseLocale, $t as toOverlayMessages, Je as toPublishEntityType, M as toPublishRuleDto, nn as toStage, ar as trimFileNameToByteLimit, we as unpackSkillArchive, _i as updateEntry, Zn as useActiveConversationSync, kt as useApplicationCredentials, Qn as useAsyncConfirmDialog, g as useAttachmentAction, or as useAttachmentUpload, S as useAttachmentValidation, nt as useCatalogEditNavigation, at as useCatalogItemDetails, Ot as useCatalogToolsetCredentials, ua as useChatSettingsFormConfig, dr as useConversationExport, Cr as useConversationHandlers, wr as useConversationImport, $n as useConversationLookupMaps, tr as useConversationPanelItems, Tr as useConversationScroll, Ar as useConversationSources, kr as useConversationStream, qi as useDialFileListing, Qi as useDialFileManager, $i as useDialFileManagerTabConfig, Ji as useDialFileMetadata, Yi as useDialFileMutations, Xi as useDialFileSharing, Zi as useDialFileUploadBatch, Mt as useFavoriteEntitiesState, ea as useFileAttachmentPicker, Oa as useGridEditingScroll, nr as useImportFilePicker, Ea as useMcpAppHostAdapter, Ta as useMcpAppHostContext, wa as useMcpAppTools, on as useOAuthCallbackCompletion, Da as useOpenMcpAppCanvas, da as usePageFileDrag, pa as usePanelMaxWidth, bn as usePromptsState, Nt as usePublishFolders, Nn as useScheduledTaskRuns, Mn as useScheduledTasks, ma as useShareLink, Yn as useShareRecipientsCount, qn as useSkillArchiveImport, At as useSkillDetailsPanelData, Ln as useSkillEditorLoad, Rn as useSkillEditorSubmit, zn as useSkillFileActions, Vn as useSkillFilePreview, it as useSkillItemDetails, Hn as useSkillsState, ha as useToolsMenu, Dt as useToolsetLogin, lr as useTranscribeAudio, xa as useUsageData, fa as useViewportWidth, _n as validatePromptContent, vn as validatePromptDescription, yn as validatePromptName, Pn as validateSkillFileBatch, oi as virtualPathToApiPath, bt as waitForToolsetOAuthResult };
|
|
@@ -2,8 +2,8 @@ import { getApiErrorMessage as e } from "../../api-error/api-error.js";
|
|
|
2
2
|
import { useMcpAppHostContext as t } from "../useMcpAppHostContext/useMcpAppHostContext.js";
|
|
3
3
|
import { useMemo as n } from "react";
|
|
4
4
|
//#region src/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.ts
|
|
5
|
-
var r = (r, i, a, o) => {
|
|
6
|
-
let
|
|
5
|
+
var r = (r, i, a, o, s) => {
|
|
6
|
+
let c = t(r, o), l = n(() => async (t, n, r, a) => {
|
|
7
7
|
try {
|
|
8
8
|
return await i.callTool(t, n, r, a);
|
|
9
9
|
} catch (t) {
|
|
@@ -11,15 +11,17 @@ var r = (r, i, a, o) => {
|
|
|
11
11
|
}
|
|
12
12
|
}, [i]);
|
|
13
13
|
return n(() => ({
|
|
14
|
-
hostContext:
|
|
14
|
+
hostContext: c,
|
|
15
|
+
hostInfo: s,
|
|
15
16
|
sandboxUrl: a,
|
|
16
17
|
fetchResourceHtml: i.fetchResourceHtml,
|
|
17
|
-
callTool:
|
|
18
|
+
callTool: l
|
|
18
19
|
}), [
|
|
20
|
+
c,
|
|
19
21
|
s,
|
|
20
22
|
a,
|
|
21
23
|
i.fetchResourceHtml,
|
|
22
|
-
|
|
24
|
+
l
|
|
23
25
|
]);
|
|
24
26
|
};
|
|
25
27
|
//#endregion
|
|
@@ -11,7 +11,7 @@ var t = /* @__PURE__ */ "--color-background-primary.--color-background-secondary
|
|
|
11
11
|
theme: i ?? r,
|
|
12
12
|
locale: a,
|
|
13
13
|
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
14
|
-
userAgent: o ??
|
|
14
|
+
userAgent: o ?? navigator.userAgent,
|
|
15
15
|
platform: "web",
|
|
16
16
|
displayMode: t,
|
|
17
17
|
availableDisplayModes: s ?? ["inline", "fullscreen"],
|
|
@@ -4,56 +4,58 @@ import { useCallback as i, useEffect as a, useRef as o } from "react";
|
|
|
4
4
|
import { computeMcpAppSeedKey as s, resolveMcpAppToolResult as c } from "@epam/ai-dial-mcp-apps";
|
|
5
5
|
//#region src/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.ts
|
|
6
6
|
var l = (l, u, d, f) => {
|
|
7
|
-
let { openCanvas: p, openCanvasLoading: m, closeCanvas: h } = r(), { hostContext: g,
|
|
8
|
-
if (
|
|
9
|
-
f?.(), m(
|
|
7
|
+
let { openCanvas: p, openCanvasLoading: m, closeCanvas: h } = r(), { hostContext: g, hostInfo: _, sandboxUrl: v, fetchResourceHtml: y, callTool: b } = u, x = i((e) => e === "inline" ? (h(), "inline") : "fullscreen", [h]), S = o(null), C = i(async (r, i, a, o = !1) => {
|
|
8
|
+
if (v == null) return !1;
|
|
9
|
+
f?.(), m(r.mcpToolName, i);
|
|
10
10
|
try {
|
|
11
11
|
let e = s(a), n = async () => {
|
|
12
|
-
let [e, t] = await Promise.all([
|
|
12
|
+
let [e, t] = await Promise.all([y(r.toolsetId, r.resourceUri), c(r, a, b)]);
|
|
13
13
|
return {
|
|
14
14
|
html: e,
|
|
15
15
|
toolResult: t
|
|
16
16
|
};
|
|
17
|
-
}, u,
|
|
18
|
-
return i != null && !o ? {html: u, toolResult:
|
|
17
|
+
}, u, d;
|
|
18
|
+
return i != null && !o ? {html: u, toolResult: d} = await l.getOrFetch(i, e, n) : ({html: u, toolResult: d} = await n(), i != null && l.set(i, {
|
|
19
19
|
html: u,
|
|
20
|
-
toolResult:
|
|
20
|
+
toolResult: d
|
|
21
21
|
}, e)), p({
|
|
22
22
|
type: t.McpApp,
|
|
23
23
|
html: u,
|
|
24
|
-
sandboxUrl:
|
|
24
|
+
sandboxUrl: v,
|
|
25
25
|
toolInput: a?.toolInput,
|
|
26
|
-
toolResult:
|
|
26
|
+
toolResult: d,
|
|
27
27
|
hostContext: g,
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
hostInfo: _,
|
|
29
|
+
onToolCall: (e, t) => b(r.toolsetId, e, t, r.kind),
|
|
30
|
+
onRequestDisplayMode: x,
|
|
30
31
|
onReload: () => {
|
|
31
|
-
i != null && l.invalidate(i),
|
|
32
|
+
i != null && l.invalidate(i), S.current?.(r, i, a, !0);
|
|
32
33
|
}
|
|
33
|
-
},
|
|
34
|
-
} catch (
|
|
35
|
-
let
|
|
34
|
+
}, r.mcpToolName, i), !0;
|
|
35
|
+
} catch (a) {
|
|
36
|
+
let o = a instanceof e && a.status === 403;
|
|
36
37
|
return p({
|
|
37
38
|
type: t.Error,
|
|
38
|
-
errorType:
|
|
39
|
-
label:
|
|
40
|
-
},
|
|
39
|
+
errorType: o ? n.Forbidden : n.LoadFailed,
|
|
40
|
+
label: o ? d.forbiddenErrorLabel : d.loadErrorLabel
|
|
41
|
+
}, r.mcpToolName, i), !1;
|
|
41
42
|
}
|
|
42
43
|
}, [
|
|
43
44
|
p,
|
|
44
45
|
m,
|
|
45
46
|
f,
|
|
46
|
-
_,
|
|
47
|
-
g,
|
|
48
47
|
v,
|
|
48
|
+
g,
|
|
49
|
+
_,
|
|
49
50
|
y,
|
|
51
|
+
b,
|
|
50
52
|
l,
|
|
51
53
|
d,
|
|
52
|
-
|
|
54
|
+
x
|
|
53
55
|
]);
|
|
54
56
|
return a(() => {
|
|
55
|
-
|
|
56
|
-
}, [
|
|
57
|
+
S.current = C;
|
|
58
|
+
}, [C]), { openMcpAppCanvas: C };
|
|
57
59
|
};
|
|
58
60
|
//#endregion
|
|
59
61
|
export { l as useOpenMcpAppCanvas };
|
package/mcp-apps.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
2
|
import { DeploymentItemDto } from '@epam/ai-dial-chat-api-client';
|
|
3
3
|
import { DialToolsetDto } from '@epam/ai-dial-chat-api-client';
|
|
4
|
+
import { Implementation } from '@modelcontextprotocol/sdk/types.js';
|
|
4
5
|
import { McpAppToolSummaryDto } from '@epam/ai-dial-chat-api-client';
|
|
5
6
|
import { McpUiHostContext } from '@mcp-ui/client';
|
|
6
7
|
import { Message } from '@epam/ai-dial-chat-shared';
|
|
@@ -48,6 +49,8 @@ declare type McpAppDisplayMode = NonNullable<McpUiHostContext['displayMode']>;
|
|
|
48
49
|
declare interface McpAppHostAdapter {
|
|
49
50
|
/** `McpUiHostContext` to deliver to the mounted app's `ui/initialize` handshake. */
|
|
50
51
|
hostContext: McpUiHostContext;
|
|
52
|
+
/** Host identity (`name`/`version`) to deliver to the mounted app's `ui/initialize` handshake. */
|
|
53
|
+
hostInfo: Implementation;
|
|
51
54
|
/** Operator-configured MCP Apps sandbox-proxy URL, or `null` when unconfigured. */
|
|
52
55
|
sandboxUrl: string | null;
|
|
53
56
|
/** Fetches the matched tool's MCP Apps `ui://` resource. */
|
|
@@ -64,7 +67,7 @@ export declare interface McpAppHostContextParams {
|
|
|
64
67
|
mcpAppTheme?: string;
|
|
65
68
|
/** Host's current i18n locale (BCP 47). */
|
|
66
69
|
locale: string;
|
|
67
|
-
/** Operator-configured MCP App user-agent override. Defaults to `
|
|
70
|
+
/** Operator-configured MCP App user-agent override. Defaults to the browser's own `navigator.userAgent`. */
|
|
68
71
|
mcpAppUserAgent?: string;
|
|
69
72
|
/**
|
|
70
73
|
* Display modes the host can switch an app between via
|
|
@@ -180,10 +183,11 @@ declare type McpDeploymentKind = 'toolset' | 'application';
|
|
|
180
183
|
* Builds the `McpAppHostAdapter` a host injects into `@epam/ai-dial-mcp-apps`'s
|
|
181
184
|
* hooks/components, wiring the library's host-context/tool-call/resource-fetch
|
|
182
185
|
* contract to a configured `McpAppsApiClient` and this app's theme/locale/config
|
|
183
|
-
* values (`hostContextParams`, `sandboxUrl`)
|
|
184
|
-
*
|
|
186
|
+
* values (`hostContextParams`, `sandboxUrl`), plus the host's own identity
|
|
187
|
+
* (`hostInfo`) — this hook itself never reads app context, so a host builds
|
|
188
|
+
* those values wherever it already has them.
|
|
185
189
|
*/
|
|
186
|
-
export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams) => McpAppHostAdapter;
|
|
190
|
+
export declare const useMcpAppHostAdapter: (displayMode: "inline" | "fullscreen", client: McpAppsApiClient, sandboxUrl: string | null, hostContextParams: McpAppHostContextParams, hostInfo: Implementation) => McpAppHostAdapter;
|
|
187
191
|
|
|
188
192
|
/**
|
|
189
193
|
* Builds the `McpUiHostContext` delivered to a mounted MCP App during its
|
|
@@ -243,8 +247,6 @@ export declare const useOpenMcpAppCanvas: (cache: McpAppResponseCache, hostAdapt
|
|
|
243
247
|
|
|
244
248
|
/** User-facing text `useOpenMcpAppCanvas` needs but cannot resolve itself — a lib must not call `t()`. */
|
|
245
249
|
export declare interface UseOpenMcpAppCanvasLabels {
|
|
246
|
-
/** Canvas panel title while an MCP App is loading or open. */
|
|
247
|
-
title: string;
|
|
248
250
|
/** Error label shown when the resource fetch is forbidden (HTTP 403). */
|
|
249
251
|
forbiddenErrorLabel: string;
|
|
250
252
|
/** Error label shown for any other resource-load/tool-call failure. */
|