@epam/ai-dial-chat-hooks 1.2.0-dev.28 → 1.2.0-dev.282
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/attachment/useAttachmentValidation/useAttachmentValidation.js +26 -19
- package/attachments.d.ts +10 -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 +7 -0
- package/catalog/map-skill-to-catalog-item.js +55 -48
- package/catalog/publish.js +6 -5
- package/catalog/useApplicationCredentials/useApplicationCredentials.js +39 -0
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +122 -101
- package/catalog/usePublishFolders/usePublishFolders.js +1 -1
- package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js +39 -39
- package/catalog/useSkillItemDetails.js +17 -13
- package/catalog.d.ts +139 -34
- package/catalog.js +23 -22
- package/conversation/conversation-transfer/export-conversation.js +24 -16
- package/conversation/conversation-transfer/import-conversation.js +80 -31
- package/conversation/conversation-transfer/queue.js +8 -5
- package/conversation/create-chat-stream-api.js +85 -49
- package/conversation/message-utils.js +44 -2
- package/conversation/stage.js +27 -0
- package/conversation/useActiveConversationSync/useActiveConversationSync.js +7 -8
- package/conversation/useConversationExport/useConversationExport.js +9 -9
- package/conversation/useConversationHandlers/useConversationHandlers.js +73 -57
- package/conversation/useConversationImport/useConversationImport.js +123 -121
- package/conversation/useConversationPanelItems/useConversationPanelItems.js +50 -32
- package/conversation/useConversationScroll/useConversationScroll.js +68 -64
- package/conversation/useConversationStream/apply-chunk.js +1 -1
- package/conversation/useConversationStream/frame-scheduler.js +39 -0
- package/conversation/useConversationStream/generation-resume.js +122 -64
- package/conversation/useConversationStream/useConversationStream.js +265 -116
- 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 +295 -17
- package/conversation.js +32 -29
- package/file-manager-canvas.d.ts +53 -5
- package/file-manager.d.ts +156 -26
- package/file-manager.js +25 -23
- package/files/attachment-canvas.js +74 -40
- package/files/attachment-types.js +14 -13
- package/files/dial-file-manager-mapping.util.js +2 -1
- package/files/dial-file-manager-path.util.js +23 -1
- package/files/dial-file-manager.model.js +23 -19
- package/files/dial-file-manager.types.js +3 -3
- package/files/useDialFileListing/useDialFileListing.js +139 -127
- package/files/useDialFileManager/useDialFileManager.js +132 -128
- package/files/useDialFileManagerSections/useDialFileManagerSections.js +155 -0
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +20 -19
- package/files/useDialFileMutations/useDialFileMutations.js +33 -32
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +117 -110
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +49 -0
- package/index.d.ts +1178 -112
- package/index.js +136 -122
- 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/oauth/toolset-id.js +5 -3
- package/oauth/useToolsetLogin/useToolsetLogin.js +8 -8
- package/oauth.d.ts +32 -0
- package/oauth.js +9 -9
- package/package.json +26 -21
- package/scheduled-task/scheduled-task-description.js +81 -0
- package/scheduled-task/scheduled-task-preparation.js +24 -0
- package/scheduled-task/scheduled-task-trigger.js +74 -71
- package/scheduled-task/scheduled-tasks-api-client.js +19 -0
- package/scheduled-task/use-scheduled-task-runs.js +194 -0
- package/scheduled-task/use-scheduled-tasks.js +93 -0
- package/scheduled-tasks.d.ts +197 -3
- package/scheduled-tasks.js +7 -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 +53 -27
- package/skill/useSkillArchiveImport/useSkillArchiveImport.js +79 -0
- package/skill/useSkillEditorLoad.js +65 -59
- package/skill/useSkillEditorSubmit.js +108 -84
- package/skill/useSkillFileActions.js +70 -58
- package/skill-editor.d.ts +160 -8
- 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 +202 -0
- package/usage.d.ts +125 -0
- package/usage.js +3 -0
- package/usePageFileDrag/usePageFileDrag.js +3 -3
- package/utils.d.ts +26 -6
- package/utils.js +10 -10
package/catalog.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { ApplicationExternalServiceDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { ApplicationSchemaSummaryDto } from '@epam/ai-dial-chat-api-client';
|
|
1
3
|
import { CatalogContentTreeNode } from '@epam/ai-dial-catalog';
|
|
4
|
+
import { CatalogCreateSearch } from '@epam/ai-dial-catalog';
|
|
2
5
|
import { CatalogEntityType } from '@epam/ai-dial-chat-shared';
|
|
3
6
|
import { CatalogItem } from '@epam/ai-dial-catalog';
|
|
4
7
|
import { CatalogItemApiDetails } from '@epam/ai-dial-catalog';
|
|
@@ -14,8 +17,11 @@ import { DeploymentLimitsResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
|
14
17
|
import { DialToolsetAuthSettingsDto } from '@epam/ai-dial-chat-api-client';
|
|
15
18
|
import { DialToolsetDto } from '@epam/ai-dial-chat-api-client';
|
|
16
19
|
import { DropdownItem } from '@epam/ai-dial-ui-kit';
|
|
20
|
+
import { ExternalServicesApi } from '@epam/ai-dial-chat-api-client';
|
|
21
|
+
import { LimitStatsDto } from '@epam/ai-dial-chat-api-client';
|
|
17
22
|
import { ListFilesResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
18
23
|
import { NotificationVariant } from '@epam/ai-dial-ui-kit';
|
|
24
|
+
import { OfflineCredentialsApi } from '@epam/ai-dial-chat-api-client';
|
|
19
25
|
import { PromptResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
20
26
|
import { PublicationRule } from '@epam/ai-dial-publish-panel';
|
|
21
27
|
import { PublishApi } from '@epam/ai-dial-chat-api-client';
|
|
@@ -32,6 +38,7 @@ import { ToolsetLoginBodyDto } from '@epam/ai-dial-chat-api-client';
|
|
|
32
38
|
import { ToolsetLogoutBodyDto } from '@epam/ai-dial-chat-api-client';
|
|
33
39
|
import { UnpublishCatalogEntityDto } from '@epam/ai-dial-chat-api-client';
|
|
34
40
|
import { UnpublishResultDto } from '@epam/ai-dial-chat-api-client';
|
|
41
|
+
import { UsageLimitProgressRow } from '@epam/ai-dial-catalog';
|
|
35
42
|
|
|
36
43
|
/** Feature-support flags for an agent (application) deployment. */
|
|
37
44
|
export declare interface AgentCapabilities {
|
|
@@ -47,6 +54,7 @@ export declare interface AgentCapabilities {
|
|
|
47
54
|
hasConfiguration?: boolean;
|
|
48
55
|
hasChatCompletion?: boolean;
|
|
49
56
|
hasResponsesApi?: boolean;
|
|
57
|
+
hasSkills?: boolean;
|
|
50
58
|
}
|
|
51
59
|
|
|
52
60
|
/** Input-attachment configuration for an agent (application) deployment. */
|
|
@@ -105,6 +113,8 @@ export declare const buildDeploymentConnectApi: (baseUrl: string, id: string, {
|
|
|
105
113
|
*/
|
|
106
114
|
export declare const buildPromptOverview: (prompt: PromptResponseDto, labels: PromptOverviewLabels) => CatalogItemOverview;
|
|
107
115
|
|
|
116
|
+
export declare const buildResetFields: (stats: LimitStatsDto, formatResetTime: FormatResetTime | undefined) => Pick<UsageLimitProgressRow, "resetLabel" | "resetIsoValue" | "resetAriaLabel">;
|
|
117
|
+
|
|
108
118
|
/** Builds the Responses API endpoint URL for a deployment. */
|
|
109
119
|
export declare const buildResponsesUrl: (baseUrl: string) => string;
|
|
110
120
|
|
|
@@ -119,7 +129,9 @@ export declare const buildResponsesUrl: (baseUrl: string) => string;
|
|
|
119
129
|
* itself) contributes no node. Every folder entry is attached under its own
|
|
120
130
|
* stripped path so an empty grouping folder still appears; every file entry
|
|
121
131
|
* attaches under the folder chain its stripped path implies, synthesizing
|
|
122
|
-
* any intermediate folder the listing never enumerated on its own.
|
|
132
|
+
* any intermediate folder the listing never enumerated on its own. An
|
|
133
|
+
* empty-folder marker (`.dial_folder`) only proves its folder exists and
|
|
134
|
+
* never becomes a file node. A file
|
|
123
135
|
* node's `id` is the listing entry's own (unstripped) path, so it round-trips
|
|
124
136
|
* back to `downloadSkillFile` without being re-derived; a folder node's `id`
|
|
125
137
|
* is the stripped path and only keys client-side expand/collapse state.
|
|
@@ -132,6 +144,13 @@ export declare const buildSkillContentTree: (files: SkillMetadataItemDto[], skil
|
|
|
132
144
|
* authored it, when it last changed, and its file inventory. Grouping folders
|
|
133
145
|
* in the file listing are excluded from both the count and the rows. Sizes are
|
|
134
146
|
* not shown — the skill metadata carries no content-length field.
|
|
147
|
+
*
|
|
148
|
+
* `skill` is the authoritative `getSkillMetadata` response when that request
|
|
149
|
+
* fulfilled; the caller falls back to the catalog listing entry only when it
|
|
150
|
+
* rejected (`useSkillItemDetails`'s `onFetchSkillDetails`). Either way, this
|
|
151
|
+
* function never fills a gap in one source from the other — an absent
|
|
152
|
+
* `author` omits the row and an absent `updatedAt` leaves the updated row's
|
|
153
|
+
* value empty, exactly as `skill` carries it.
|
|
135
154
|
*/
|
|
136
155
|
export declare const buildSkillOverview: (skill: SkillMetadataItemDto | undefined, files: SkillMetadataItemDto[], about: SkillAboutDetails | undefined, labels: SkillOverviewLabels) => CatalogItemOverview;
|
|
137
156
|
|
|
@@ -152,7 +171,6 @@ export declare interface CatalogDetailsApi extends SkillDetailsApi {
|
|
|
152
171
|
|
|
153
172
|
/** Localized copy `useCatalogEditNavigation` needs for the Create menu and delete errors. */
|
|
154
173
|
export declare interface CatalogEditNavigationLabels {
|
|
155
|
-
createQuickApp: string;
|
|
156
174
|
createToolset: string;
|
|
157
175
|
createCustomApp: string;
|
|
158
176
|
createSkill: string;
|
|
@@ -190,9 +208,9 @@ export declare interface CatalogEditNavigationUrls {
|
|
|
190
208
|
buildCustomAppEditUrl(appId: string): string;
|
|
191
209
|
/** URL to create a new custom (schema-less) app. */
|
|
192
210
|
buildCustomAppCreateUrl(): string;
|
|
193
|
-
/** URL to edit an existing quick app under the given schema. */
|
|
211
|
+
/** URL to edit an existing schema-based app (quick app or any other runner) under the given schema. */
|
|
194
212
|
buildQuickAppEditUrl(schemaId: string, appId: string): string;
|
|
195
|
-
/** URL to create a new quick app under the given schema. */
|
|
213
|
+
/** URL to create a new schema-based app (quick app or any other runner) under the given schema. */
|
|
196
214
|
buildQuickAppCreateUrl(schemaId: string): string;
|
|
197
215
|
}
|
|
198
216
|
|
|
@@ -237,6 +255,28 @@ export declare enum CatalogPrimaryActionType {
|
|
|
237
255
|
*/
|
|
238
256
|
export declare type CatalogPublishEntityType = 'model' | 'toolset' | 'application' | 'prompt' | 'skill';
|
|
239
257
|
|
|
258
|
+
/** Labels and formatter callbacks for the conversation-input limits mapping utility. */
|
|
259
|
+
export declare interface ConversationInputLimitsLabels {
|
|
260
|
+
/** Heading of the group listing the selected deployment's token limits. */
|
|
261
|
+
tokenGroup: string;
|
|
262
|
+
/** Heading of the group listing the caller's cost budget and spend against it. */
|
|
263
|
+
costGroup: string;
|
|
264
|
+
/** Label for the current-UTC-day row, used by both groups. */
|
|
265
|
+
periodDay: string;
|
|
266
|
+
/** Label for the current-UTC-week row, used by both groups. */
|
|
267
|
+
periodWeek: string;
|
|
268
|
+
/** Label for the current-UTC-month row, used by both groups. */
|
|
269
|
+
periodMonth: string;
|
|
270
|
+
/** Formats the combined used/total display value for a capped row. */
|
|
271
|
+
formatValueLabel: (used: string, total: string) => string;
|
|
272
|
+
/** Formats the ARIA label for a capped progress row. */
|
|
273
|
+
formatProgressAriaLabel: (params: {
|
|
274
|
+
label: string;
|
|
275
|
+
used: string;
|
|
276
|
+
total: string;
|
|
277
|
+
}) => string;
|
|
278
|
+
}
|
|
279
|
+
|
|
240
280
|
/**
|
|
241
281
|
* Wraps the generated `PublishApi` in the positional-argument surface the
|
|
242
282
|
* catalog and conversation publish flows call, so each host app re-exports one
|
|
@@ -245,6 +285,15 @@ export declare type CatalogPublishEntityType = 'model' | 'toolset' | 'applicatio
|
|
|
245
285
|
*/
|
|
246
286
|
export declare const createPublishApiClient: (publishApi: PublishApi) => PublishApiClient;
|
|
247
287
|
|
|
288
|
+
/**
|
|
289
|
+
* Inverse of `encodeDeploymentId` — decodes each `/`-separated segment back
|
|
290
|
+
* to its raw, human-readable form. A segment that isn't valid
|
|
291
|
+
* percent-encoding is passed through unchanged rather than throwing, since
|
|
292
|
+
* this decodes externally-sourced ids (the settings iframe's postMessage
|
|
293
|
+
* protocol).
|
|
294
|
+
*/
|
|
295
|
+
export declare const decodeDeploymentId: (id: string) => string;
|
|
296
|
+
|
|
248
297
|
/** Translated folder-path labels for the Personal/Shared/Public deployment groupings. */
|
|
249
298
|
export declare interface DeploymentFolderLabels {
|
|
250
299
|
personal: string;
|
|
@@ -262,16 +311,14 @@ export declare interface DeploymentGenerationApiSupport {
|
|
|
262
311
|
export declare interface DeploymentLimitsLabels {
|
|
263
312
|
/** Heading of the group every token stat row is listed under. */
|
|
264
313
|
tokenGroup: string;
|
|
265
|
-
/** Label for the
|
|
314
|
+
/** Label for the current-UTC-day token row, e.g. "Today". */
|
|
266
315
|
tokensPerDay: string;
|
|
267
|
-
/** Label for the
|
|
316
|
+
/** Label for the current-UTC-week token row, e.g. "This week". */
|
|
268
317
|
tokensPerWeek: string;
|
|
269
|
-
/** Label for the
|
|
318
|
+
/** Label for the current-UTC-month token row, e.g. "This month". */
|
|
270
319
|
tokensPerMonth: string;
|
|
271
320
|
/** Note shown instead of a total on a row whose limit follows the cost limit. */
|
|
272
321
|
followsCostLimit: string;
|
|
273
|
-
/** Formats the "$X spent" caption under a row's label. */
|
|
274
|
-
formatSpentCaption: (amount: string) => string;
|
|
275
322
|
/** Formats the combined used/total display value for a capped row. */
|
|
276
323
|
formatValueLabel: (used: string, total: string) => string;
|
|
277
324
|
/** Formats the ARIA label for a capped progress row. */
|
|
@@ -285,6 +332,8 @@ export declare interface DeploymentLimitsLabels {
|
|
|
285
332
|
label: string;
|
|
286
333
|
used: string;
|
|
287
334
|
}) => string;
|
|
335
|
+
/** Formats each period's `resetsAt` into the row's reset line. Omit it to render rows without one. */
|
|
336
|
+
formatResetTime?: FormatResetTime;
|
|
288
337
|
}
|
|
289
338
|
|
|
290
339
|
/**
|
|
@@ -294,7 +343,7 @@ export declare interface DeploymentLimitsLabels {
|
|
|
294
343
|
export declare const deriveAvailableTabIds: <T extends CatalogEntityType>(items: readonly CatalogItem[], tabOrder: readonly T[]) => T[];
|
|
295
344
|
|
|
296
345
|
/**
|
|
297
|
-
* Returns items marked as a user favorite, in original order.
|
|
346
|
+
* Returns items marked as a user favorite that are not hidden, in original order.
|
|
298
347
|
*/
|
|
299
348
|
export declare const deriveFavoriteItems: (items: readonly CatalogItem[]) => CatalogItem[];
|
|
300
349
|
|
|
@@ -359,6 +408,9 @@ export declare const filterHiddenOwnedItems: (items: readonly CatalogItem[], hid
|
|
|
359
408
|
*/
|
|
360
409
|
export declare const findDeploymentByIdOrReference: (deployments: DeploymentItemDto[], idOrReference: string | null | undefined) => DeploymentItemDto | undefined;
|
|
361
410
|
|
|
411
|
+
/** Formats a raw `resetsAt` into display strings, or returns `undefined` when it cannot be formatted. */
|
|
412
|
+
declare type FormatResetTime = (resetsAt: string | undefined) => ResetTimeDisplay | undefined;
|
|
413
|
+
|
|
362
414
|
/**
|
|
363
415
|
* The publish folder a public catalog entity id sits in: the segments between
|
|
364
416
|
* the `public` bucket and the entity name, decoded to the plain text the
|
|
@@ -396,8 +448,8 @@ export declare const mapDeploymentDetailsDtoToEntityDetails: (dto: DeploymentDet
|
|
|
396
448
|
/** Maps a deployment limits DTO to display-ready catalog limits, or `undefined` when no qualifying stats exist. */
|
|
397
449
|
export declare const mapDeploymentLimitsDtoToCatalogLimits: (dto: DeploymentLimitsResponseDto | undefined, labels: DeploymentLimitsLabels) => CatalogItemLimits | undefined;
|
|
398
450
|
|
|
399
|
-
/** Maps
|
|
400
|
-
export declare const mapDeploymentLimitsToInput: (dto: DeploymentLimitsResponseDto | undefined) =>
|
|
451
|
+
/** 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. */
|
|
452
|
+
export declare const mapDeploymentLimitsToInput: (dto: DeploymentLimitsResponseDto | undefined, labels: ConversationInputLimitsLabels, formatResetTime?: FormatResetTime) => CatalogItemLimits | undefined;
|
|
401
453
|
|
|
402
454
|
/** Maps a deployment listing row into the catalog UI's `CatalogItem` shape. */
|
|
403
455
|
export declare const mapDeploymentToCatalogItem: (deployment: DeploymentItemDto, { favoriteIds, entityDetails, folderLabels, editableSchemaIds, isCustomAppsEditable, activeLocale, primaryLocale, resolveIconUrl, }: MapDeploymentToCatalogItemOptions) => CatalogItem;
|
|
@@ -540,6 +592,7 @@ export declare interface ModelCapabilities {
|
|
|
540
592
|
hasResume?: boolean;
|
|
541
593
|
hasChatCompletion?: boolean;
|
|
542
594
|
hasResponsesApi?: boolean;
|
|
595
|
+
hasSkills?: boolean;
|
|
543
596
|
reasoningEfforts?: string[];
|
|
544
597
|
}
|
|
545
598
|
|
|
@@ -579,17 +632,19 @@ export declare interface ModelSpecification {
|
|
|
579
632
|
createdAt?: number;
|
|
580
633
|
}
|
|
581
634
|
|
|
582
|
-
/**
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
635
|
+
/**
|
|
636
|
+
* Encodes a deployment/application id to its single-encoded form regardless
|
|
637
|
+
* of whether the value it received was already percent-encoded or the raw,
|
|
638
|
+
* human-readable form — decoding first then re-encoding once is idempotent
|
|
639
|
+
* either way, since `decodeDeploymentId` on a raw (unencoded) id is a no-op.
|
|
640
|
+
* Use this instead of `encodeDeploymentId` at a boundary that cannot
|
|
641
|
+
* guarantee which form it receives, such as a `postMessage` payload from the
|
|
642
|
+
* settings iframe: calling `encodeDeploymentId` directly on a value the
|
|
643
|
+
* sender already encoded escapes the existing `%` characters a second time
|
|
644
|
+
* (`%20` becomes `%2520`), which the backend only ever undoes once and so
|
|
645
|
+
* 404s on.
|
|
646
|
+
*/
|
|
647
|
+
export declare const normalizeDeploymentId: (id: string) => string;
|
|
593
648
|
|
|
594
649
|
/** A skill resource URL split into the bucket and the path within it. */
|
|
595
650
|
export declare interface ParsedSkillResourceUrl {
|
|
@@ -623,7 +678,11 @@ declare enum PromptSource {
|
|
|
623
678
|
Public = "public"
|
|
624
679
|
}
|
|
625
680
|
|
|
626
|
-
/**
|
|
681
|
+
/**
|
|
682
|
+
* DIAL Core bucket holding organisation-wide skills.
|
|
683
|
+
*
|
|
684
|
+
* @deprecated Use `PUBLIC_BUCKET` from `@epam/ai-dial-chat-shared`.
|
|
685
|
+
*/
|
|
627
686
|
export declare const PUBLIC_SKILL_BUCKET = "public";
|
|
628
687
|
|
|
629
688
|
/** The DIAL publish API surface produced by {@link createPublishApiClient}. */
|
|
@@ -683,6 +742,23 @@ export declare const readSkillManifest: (response: Response) => Promise<string |
|
|
|
683
742
|
*/
|
|
684
743
|
export declare const reconcileFilterTopics: (persistedTopics: ReadonlySet<string>, items: readonly CatalogItem[]) => Set<string>;
|
|
685
744
|
|
|
745
|
+
/**
|
|
746
|
+
* One reset time, already parsed and formatted by the host. Declared
|
|
747
|
+
* structurally here so this library never imports an application type; the
|
|
748
|
+
* host passes a value that satisfies this shape (e.g. `apps/chat`'s own
|
|
749
|
+
* `ResetTimeDisplay`).
|
|
750
|
+
*/
|
|
751
|
+
declare interface ResetTimeDisplay {
|
|
752
|
+
/** Exclusive end of the period as an epoch ms value, for the host's boundary scheduling. */
|
|
753
|
+
resetsAtMs: number;
|
|
754
|
+
/** Machine-readable instant for a `<time dateTime>` attribute. */
|
|
755
|
+
isoValue: string;
|
|
756
|
+
/** Visible reset line. */
|
|
757
|
+
label: string;
|
|
758
|
+
/** Accessible expansion of the reset line. */
|
|
759
|
+
ariaLabel: string;
|
|
760
|
+
}
|
|
761
|
+
|
|
686
762
|
/**
|
|
687
763
|
* Resolves the primary action for a catalog item.
|
|
688
764
|
*
|
|
@@ -757,6 +833,12 @@ export declare interface SkillDetailsApi {
|
|
|
757
833
|
limit?: number;
|
|
758
834
|
recursive?: boolean;
|
|
759
835
|
}, signal?: AbortSignal): Promise<SkillFileListResponseDto>;
|
|
836
|
+
/**
|
|
837
|
+
* Fetches a single skill's own authoritative metadata (`author`,
|
|
838
|
+
* `updatedAt`, and the rest of `SkillMetadataItemDto`) — not the catalog
|
|
839
|
+
* listing entry, which may be sparse for a shared skill.
|
|
840
|
+
*/
|
|
841
|
+
getSkillMetadata(bucket: string, path: string, signal?: AbortSignal): Promise<SkillMetadataItemDto>;
|
|
760
842
|
}
|
|
761
843
|
|
|
762
844
|
/** A skill's parsed manifest details. */
|
|
@@ -899,13 +981,32 @@ export declare const toPublishEntityType: (type: CatalogEntityType) => CatalogPu
|
|
|
899
981
|
*/
|
|
900
982
|
export declare const toPublishRuleDto: (rule: PublicationRule) => PublishRuleDto;
|
|
901
983
|
|
|
984
|
+
/** Loads fresh service statuses without coupling proactive credentials to a live completion. */
|
|
985
|
+
export declare const useApplicationCredentials: ({ appId, externalServicesClient, offlineCredentialsClient, }: UseApplicationCredentialsParams) => {
|
|
986
|
+
services: ApplicationExternalServiceDto[];
|
|
987
|
+
isOfflineConnected: boolean;
|
|
988
|
+
isLoading: boolean;
|
|
989
|
+
hasError: boolean;
|
|
990
|
+
refresh: () => Promise<void>;
|
|
991
|
+
};
|
|
992
|
+
|
|
993
|
+
/** Configured operations for loading application credential metadata. */
|
|
994
|
+
export declare interface UseApplicationCredentialsParams {
|
|
995
|
+
/** Application identifier passed through to the configured client. */
|
|
996
|
+
appId: string;
|
|
997
|
+
/** Host-configured external-services API. */
|
|
998
|
+
externalServicesClient: Pick<ExternalServicesApi, 'listExternalServices'>;
|
|
999
|
+
/** Host-configured offline-credentials API. */
|
|
1000
|
+
offlineCredentialsClient: Pick<OfflineCredentialsApi, 'getOfflineCredentials'>;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
902
1003
|
/**
|
|
903
1004
|
* Owns the catalog's edit/delete/create-menu navigation: routing the details
|
|
904
1005
|
* panel's Edit action to the right editor URL for each item type, deleting an
|
|
905
1006
|
* item through the endpoint its type owns and refetching/notifying on
|
|
906
1007
|
* completion, and building the Create dropdown's options.
|
|
907
1008
|
*/
|
|
908
|
-
export declare const useCatalogEditNavigation: ({ deployments, isCustomAppsEnabled, isSchemaAppsEnabled, isHideCustomAppCreationEnabled, isToolsetsEnabled, isPromptsEnabled,
|
|
1009
|
+
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;
|
|
909
1010
|
|
|
910
1011
|
/** Parameters accepted by {@link useCatalogEditNavigation}. */
|
|
911
1012
|
export declare interface UseCatalogEditNavigationParams {
|
|
@@ -915,8 +1016,8 @@ export declare interface UseCatalogEditNavigationParams {
|
|
|
915
1016
|
isHideCustomAppCreationEnabled: boolean;
|
|
916
1017
|
isToolsetsEnabled: boolean;
|
|
917
1018
|
isPromptsEnabled: boolean;
|
|
918
|
-
/**
|
|
919
|
-
|
|
1019
|
+
/** Application type schemas (runners) loaded at startup; each one except the custom-app schema gets its own Create option. */
|
|
1020
|
+
schemas: ApplicationSchemaSummaryDto[];
|
|
920
1021
|
/** Already-configured editor-route URL builders. */
|
|
921
1022
|
urls: CatalogEditNavigationUrls;
|
|
922
1023
|
/** Navigates the host to a URL built by `urls`. */
|
|
@@ -947,7 +1048,10 @@ export declare interface UseCatalogEditNavigationParams {
|
|
|
947
1048
|
export declare interface UseCatalogEditNavigationResult {
|
|
948
1049
|
handleEdit: (item: CatalogItem) => void;
|
|
949
1050
|
handleDelete: (item: CatalogItem) => Promise<void>;
|
|
1051
|
+
/** The Create dropdown's items: runners and static options sorted together by label, all filtered by `createSearch.value`. */
|
|
950
1052
|
createOptions: DropdownItem[];
|
|
1053
|
+
/** The Create menu's search field state, or `undefined` when no runner option is offered. */
|
|
1054
|
+
createSearch: CatalogCreateSearch | undefined;
|
|
951
1055
|
}
|
|
952
1056
|
|
|
953
1057
|
/**
|
|
@@ -1125,9 +1229,9 @@ export declare interface UsePublishFoldersResult {
|
|
|
1125
1229
|
*/
|
|
1126
1230
|
onCreatePublishFolder: (parentPath: string[], name: string) => Promise<void>;
|
|
1127
1231
|
/**
|
|
1128
|
-
* Records `folderPath` as
|
|
1129
|
-
* so it keeps appearing in the tree on
|
|
1130
|
-
* successful publish.
|
|
1232
|
+
* Records `folderPath` as the most recent publish destination (moving it to
|
|
1233
|
+
* the front if already remembered), so it keeps appearing in the tree on
|
|
1234
|
+
* later publishes. Call it after a successful publish.
|
|
1131
1235
|
*/
|
|
1132
1236
|
rememberPublishFolder: (folderPath: string[]) => void;
|
|
1133
1237
|
/** Heuristic write-access check for a folder path (see the TODO above). */
|
|
@@ -1218,10 +1322,11 @@ export declare interface UseSkillFilePreviewResult {
|
|
|
1218
1322
|
|
|
1219
1323
|
/**
|
|
1220
1324
|
* Headless hook that encapsulates skill detail fetching: manifest download and
|
|
1221
|
-
* parse, package file listing,
|
|
1222
|
-
* loads. `useCatalogItemDetails` delegates
|
|
1223
|
-
* only surface skill details consume this
|
|
1224
|
-
* deployment and prompt ports the full catalog
|
|
1325
|
+
* parse, package file listing, authoritative metadata fetching, overview
|
|
1326
|
+
* construction, and in-package file loads. `useCatalogItemDetails` delegates
|
|
1327
|
+
* its skill branch here; hosts that only surface skill details consume this
|
|
1328
|
+
* hook directly, without the deployment and prompt ports the full catalog
|
|
1329
|
+
* pipeline requires.
|
|
1225
1330
|
*/
|
|
1226
1331
|
export declare const useSkillItemDetails: ({ api, skills, skillOverviewLabels, }: UseSkillItemDetailsOptions) => UseSkillItemDetailsResult;
|
|
1227
1332
|
|
package/catalog.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { createPublishApiClient as e, toPublishRuleDto as t } from "./catalog/create-publish-api.js";
|
|
2
2
|
import { buildChatCompletionsUrl as n, buildDeploymentConnectApi as r, buildResponsesUrl as i } from "./catalog/deployment-endpoint-url.js";
|
|
3
|
-
import {
|
|
4
|
-
import { AuthenticationType as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { mapDeploymentDetailsDtoToEntityDetails as
|
|
8
|
-
import { mapDeploymentToCatalogItem as
|
|
9
|
-
import { buildPromptOverview as
|
|
10
|
-
import { PUBLIC_SKILL_BUCKET as
|
|
11
|
-
import { buildSkillContentTree as
|
|
12
|
-
import { McpResourceKind as
|
|
13
|
-
import { getPublicCatalogEntityFolderPath as
|
|
14
|
-
import { deriveAvailableTabIds as
|
|
15
|
-
import { CatalogPrimaryActionType as
|
|
16
|
-
import { useCatalogEditNavigation as
|
|
17
|
-
import { useSkillItemDetails as
|
|
18
|
-
import { useCatalogItemDetails as
|
|
19
|
-
import { useCatalogToolsetCredentials as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
|
|
3
|
+
import { decodeDeploymentId as a, encodeDeploymentId as o, findDeploymentByIdOrReference as s, normalizeDeploymentId as c } from "./catalog/deployment-id.js";
|
|
4
|
+
import { AuthenticationType as l } from "./catalog/entity-details.js";
|
|
5
|
+
import { buildResetFields as u, mapDeploymentLimitsToInput as d } from "./catalog/map-deployment-limits-to-input.js";
|
|
6
|
+
import { mapDeploymentLimitsDtoToCatalogLimits as f } from "./catalog/map-deployment-limits-to-catalog.js";
|
|
7
|
+
import { mapDeploymentDetailsDtoToEntityDetails as p, mapEntityDetailsToCatalogDetails as m, mapToolsetCredentials as h } from "./catalog/map-entity-details-to-catalog.js";
|
|
8
|
+
import { mapDeploymentToCatalogItem as g, mapDeploymentToolsetCredentials as _, mapToolsetToCatalogItem as v, resolveDeploymentFolder as y } from "./catalog/map-deployment-to-catalog-item.js";
|
|
9
|
+
import { buildPromptOverview as b, isOrganisationPromptItem as x, mapPromptToCatalogItem as S } from "./catalog/map-prompt-to-catalog-item.js";
|
|
10
|
+
import { PUBLIC_SKILL_BUCKET as C, SKILL_LISTING_MAX_PAGES as w, SKILL_LISTING_PAGE_SIZE as T, SKILL_MANIFEST_MAX_BYTES as E, SkillSource as D, parseSkillResourceUrl as O } from "./skill/skill-types.js";
|
|
11
|
+
import { buildSkillContentTree as k, buildSkillOverview as A, mapSkillToCatalogItem as j, readSkillFileBytes as M, readSkillFilePreviewBytes as N, readSkillManifest as P, resolveSkillFileDownloadPath as F, resolveSkillManifestFileId as I } from "./catalog/map-skill-to-catalog-item.js";
|
|
12
|
+
import { McpResourceKind as L, buildApplicationMcpUrl as R, buildConnectApi as z, buildToolsetMcpUrl as B, resolveMcpResourceKind as V } from "./catalog/mcp-endpoint-url.js";
|
|
13
|
+
import { getPublicCatalogEntityFolderPath as H, isPublicCatalogEntityId as U, mapPublishConversationResultDto as W, mapPublishHistoryEntryDto as G, toPublishEntityType as K } from "./catalog/publish.js";
|
|
14
|
+
import { deriveAvailableTabIds as q, deriveFavoriteItems as J, filterCatalogItemsBySelector as Y, filterHiddenOwnedItems as X, reconcileFilterTopics as Z } from "./catalog/catalog-derivations.js";
|
|
15
|
+
import { CatalogPrimaryActionType as Q, resolveCatalogPrimaryAction as $ } from "./catalog/catalog-primary-action.js";
|
|
16
|
+
import { useCatalogEditNavigation as ee } from "./catalog/useCatalogEditNavigation/useCatalogEditNavigation.js";
|
|
17
|
+
import { useSkillItemDetails as te } from "./catalog/useSkillItemDetails.js";
|
|
18
|
+
import { useCatalogItemDetails as ne } from "./catalog/useCatalogItemDetails.js";
|
|
19
|
+
import { useCatalogToolsetCredentials as re } from "./catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js";
|
|
20
|
+
import { useApplicationCredentials as ie } from "./catalog/useApplicationCredentials/useApplicationCredentials.js";
|
|
21
|
+
import { useSkillDetailsPanelData as ae } from "./catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js";
|
|
22
|
+
import { FavoriteEntityType as oe, useFavoriteEntitiesState as se } from "./catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js";
|
|
23
|
+
import { usePublishFolders as ce } from "./catalog/usePublishFolders/usePublishFolders.js";
|
|
24
|
+
import { SkillPreviewErrorKind as le, useSkillFilePreview as ue } from "./skill/useSkillFilePreview.js";
|
|
25
|
+
export { l as AuthenticationType, Q as CatalogPrimaryActionType, oe as FavoriteEntityType, L as McpResourceKind, C as PUBLIC_SKILL_BUCKET, w as SKILL_LISTING_MAX_PAGES, T as SKILL_LISTING_PAGE_SIZE, E as SKILL_MANIFEST_MAX_BYTES, le as SkillPreviewErrorKind, D as SkillSource, R as buildApplicationMcpUrl, n as buildChatCompletionsUrl, z as buildConnectApi, r as buildDeploymentConnectApi, b as buildPromptOverview, u as buildResetFields, i as buildResponsesUrl, k as buildSkillContentTree, A as buildSkillOverview, B as buildToolsetMcpUrl, e as createPublishApiClient, a as decodeDeploymentId, q as deriveAvailableTabIds, J as deriveFavoriteItems, o as encodeDeploymentId, Y as filterCatalogItemsBySelector, X as filterHiddenOwnedItems, s as findDeploymentByIdOrReference, H as getPublicCatalogEntityFolderPath, x as isOrganisationPromptItem, U as isPublicCatalogEntityId, p as mapDeploymentDetailsDtoToEntityDetails, f as mapDeploymentLimitsDtoToCatalogLimits, d as mapDeploymentLimitsToInput, g as mapDeploymentToCatalogItem, _ as mapDeploymentToolsetCredentials, m as mapEntityDetailsToCatalogDetails, S as mapPromptToCatalogItem, W as mapPublishConversationResultDto, G as mapPublishHistoryEntryDto, j as mapSkillToCatalogItem, h as mapToolsetCredentials, v as mapToolsetToCatalogItem, c as normalizeDeploymentId, O as parseSkillResourceUrl, M as readSkillFileBytes, N as readSkillFilePreviewBytes, P as readSkillManifest, Z as reconcileFilterTopics, $ as resolveCatalogPrimaryAction, y as resolveDeploymentFolder, V as resolveMcpResourceKind, F as resolveSkillFileDownloadPath, I as resolveSkillManifestFileId, K as toPublishEntityType, t as toPublishRuleDto, ie as useApplicationCredentials, ee as useCatalogEditNavigation, ne as useCatalogItemDetails, re as useCatalogToolsetCredentials, se as useFavoriteEntitiesState, ce as usePublishFolders, ae as useSkillDetailsPanelData, ue as useSkillFilePreview, te as useSkillItemDetails };
|
|
@@ -1,32 +1,40 @@
|
|
|
1
1
|
import { formatDateYMD as e } from "./date.js";
|
|
2
2
|
import { ExportFileNameKind as t } from "./types.js";
|
|
3
3
|
//#region src/conversation/conversation-transfer/export-conversation.ts
|
|
4
|
-
var n = "ai_dial", r = (e) => e.map(({ attachments: e, ...t }) => t), i = (e) => {
|
|
4
|
+
var n = "ai_dial", r = (e) => e.map(({ attachments: e, ...t }) => t), i = (e) => e.map((e) => {
|
|
5
|
+
if (e.body?.source == null) return e;
|
|
6
|
+
let { source: t, ...n } = e.body;
|
|
7
|
+
return {
|
|
8
|
+
...e,
|
|
9
|
+
body: n
|
|
10
|
+
};
|
|
11
|
+
}), a = (e) => {
|
|
5
12
|
let t = e.custom_content;
|
|
6
13
|
if (!t) return e;
|
|
7
|
-
let { attachments: n, stages:
|
|
8
|
-
if (n == null &&
|
|
9
|
-
let
|
|
10
|
-
...
|
|
11
|
-
...
|
|
14
|
+
let { attachments: n, stages: a, annotations: o, ...s } = t;
|
|
15
|
+
if (n == null && a == null && o == null) return e;
|
|
16
|
+
let c = {
|
|
17
|
+
...s,
|
|
18
|
+
...a ? { stages: r(a) } : {},
|
|
19
|
+
...o ? { annotations: i(o) } : {}
|
|
12
20
|
};
|
|
13
|
-
if (Object.keys(
|
|
21
|
+
if (Object.keys(c).length > 0) return {
|
|
14
22
|
...e,
|
|
15
|
-
custom_content:
|
|
23
|
+
custom_content: c
|
|
16
24
|
};
|
|
17
|
-
let { custom_content:
|
|
18
|
-
return
|
|
19
|
-
},
|
|
25
|
+
let { custom_content: l, ...u } = e;
|
|
26
|
+
return u;
|
|
27
|
+
}, o = (e) => ({
|
|
20
28
|
...e,
|
|
21
|
-
messages: e.messages.map(
|
|
22
|
-
}),
|
|
29
|
+
messages: e.messages.map(a)
|
|
30
|
+
}), s = (e, t = []) => ({
|
|
23
31
|
version: 5,
|
|
24
32
|
history: e,
|
|
25
33
|
folders: t
|
|
26
|
-
}),
|
|
34
|
+
}), c = (e) => new Blob([JSON.stringify(e, null, 2)], { type: "application/json" }), l = {
|
|
27
35
|
[t.SingleConversation]: "json",
|
|
28
36
|
[t.SingleConversationWithAttachments]: "dial",
|
|
29
37
|
[t.AllConversationsHistory]: "json"
|
|
30
|
-
},
|
|
38
|
+
}, u = (t, n, r = /* @__PURE__ */ new Date()) => `${e(r)}_${n}_${t}.${l[t]}`;
|
|
31
39
|
//#endregion
|
|
32
|
-
export { n as EXPORT_APP_NAME,
|
|
40
|
+
export { n as EXPORT_APP_NAME, s as buildExportEnvelope, u as buildExportFileName, c as serializeExportEnvelope, o as stripConversationAttachments };
|