@xpert-ai/plugin-sdk 3.21.0 → 3.21.1

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.
@@ -0,0 +1,60 @@
1
+ # Structured knowledge graph publication
2
+
3
+ Use `KnowledgeGraphRuntimeCapability` for source-owned, already structured data. It publishes explicit identities, relationships, typed properties, and source chunk references without LLM extraction or identity classification. Unstructured documents continue to use the normal extraction pipeline.
4
+
5
+ ## Source and publication lifecycle
6
+
7
+ 1. Create an Agent Knowledge Writer managed document owned by the publishing Assistant. Set `metadata.graphSource = { mode: 'structured' }` before writing chunks, so automatic graph extraction is skipped.
8
+ 2. Write the complete chunk projection and its embeddings using `AgentKnowledgeWriterCapability`. Use immutable, content-versioned chunk keys.
9
+ 3. Resolve `KnowledgeGraphRuntimeCapability` and call `publish`. Supply the managed document owner, external source version, complete chunk ID manifest, entities, and relations. Each item must reference one or more chunks in the manifest.
10
+ 4. Poll `status` until `success`. A queued receipt means the snapshot is accepted, not yet searchable. Display failure/retry separately from embedding completion.
11
+ 5. A new snapshot replaces only this document's graph contribution. `retract` publishes an empty graph while retaining chunks and contributions from other documents. Deleting the source document follows the existing source cleanup lifecycle.
12
+
13
+ ```ts
14
+ const graph = runtime.get(KnowledgeGraphRuntimeCapability)
15
+ const owner = { knowledgebaseId, documentId, xpertId, agentKey }
16
+ const receipt = await graph.publish({
17
+ ...owner,
18
+ publicationKey: 'automotive-bom:ASSEMBLY-01',
19
+ sourceVersion: 'R2:source-content-hash',
20
+ chunkIds: ['R2:root', 'R2:position-10'],
21
+ entities: [
22
+ {
23
+ id: 'root',
24
+ namespace: 'automotive:BOM:ASSEMBLY-01:R2',
25
+ nodeKey: 'ASSEMBLY-01',
26
+ type: 'Root',
27
+ name: 'Drive assembly',
28
+ chunkIds: ['R2:root']
29
+ },
30
+ {
31
+ id: 'sensor',
32
+ namespace: 'automotive:BOM:ASSEMBLY-01:R2:position-10',
33
+ nodeKey: 'SENSOR-01',
34
+ type: 'Component',
35
+ name: 'Temperature sensor',
36
+ properties: { resistance: 100, unit: 'ohm' },
37
+ chunkIds: ['R2:position-10']
38
+ }
39
+ ],
40
+ relations: [
41
+ {
42
+ source: 'root',
43
+ target: 'sensor',
44
+ type: 'CONTAINS',
45
+ properties: { quantity: 2, unit: 'EA' },
46
+ chunkIds: ['R2:position-10']
47
+ }
48
+ ]
49
+ })
50
+ ```
51
+
52
+ `namespace + nodeKey` is the exact identity within the knowledgebase. Include source revision and assembly occurrence in component namespaces; material master namespaces can be shared across BOMs. Do not merge occurrence-specific quantities or features onto a shared material. Relations reference local entity IDs in the same complete snapshot.
53
+
54
+ The platform validates ownership, KB write access, enabled graph configuration, endpoint identities and chunk membership before accepting. Repeating the same snapshot against the same source epoch is idempotent. Snapshot persistence and source-contribution replacement are transactional. Retry/rebuild replay the stored structured snapshot; they never fall back to an LLM. If the source chunks have changed, republish from the source application. The immutable chunk-key convention is necessary to distinguish payload changes that retain otherwise identical IDs.
55
+
56
+ Properties are JSON values, stored per source contribution and exposed in entity/relation metadata. `metadata.propertySources` retains per-document provenance when entities are shared. Graph visualization, graph/hybrid retrieval, entity evidence links and embedding indexes use the existing platform APIs.
57
+
58
+ For deployments without schema synchronization, apply `packages/server-ai/src/graphrag/migrations/20260913-structured-properties.sql` before starting the updated API. This additive migration adds property columns to both graph contribution tables.
59
+
60
+ If structured projections were created before the missing-confidence fix, also apply `20260913-structured-mention-confidence.sql` from that directory. It restores unknown mention confidence to `NULL` only for current structured snapshots without explicit confidence values. Model/manual evidence and explicit zero confidence are preserved. This prevents valid structured evidence from receiving a zero graph-retrieval score.
@@ -0,0 +1,86 @@
1
+ # Video Generation Protocol
2
+
3
+ The platform video generation service separates application requests from provider-specific tools.
4
+ Applications submit normalized workspace file references; provider plugins declare capabilities and
5
+ implement the standard tool arguments for the modes they support.
6
+
7
+ ## Versions
8
+
9
+ - Protocol v1 supports text-to-video and one image-to-video input.
10
+ - Protocol v2 adds multiple reference media, initial/final frames, and per-model input limits.
11
+ - The platform continues to discover and route v1 providers. New provider integrations should use v2.
12
+
13
+ ## Modes
14
+
15
+ | Mode | Normalized tool arguments |
16
+ | --------------------------- | ------------------------------------------------------------------------- |
17
+ | `text_to_video` | no media arguments |
18
+ | `image_to_video` | `input_image_file` |
19
+ | `first_last_frame_to_video` | `first_frame_file`, `last_frame_file` |
20
+ | `reference_to_video` | `reference_image_files`, `reference_video_files`, `reference_audio_files` |
21
+
22
+ Every file argument is a `WorkspacePortableFileReference`. Provider tools are responsible for
23
+ reading those references through Workspace Files and converting them to the provider's accepted
24
+ transport format. Applications must not send credentials, provider URLs, or provider tool names.
25
+
26
+ ## Capability Declaration
27
+
28
+ Provider strategies declare generator-level modes and tool mappings, then narrow them for each
29
+ model with `modes` and `inputs`. Reference limits are enforced by the host before invoking a paid
30
+ provider operation.
31
+
32
+ ```ts
33
+ videoGeneration: {
34
+ protocolVersion: 2,
35
+ family: 'seedance',
36
+ displayName: 'Seedance',
37
+ modes: [
38
+ 'text_to_video',
39
+ 'image_to_video',
40
+ 'first_last_frame_to_video',
41
+ 'reference_to_video'
42
+ ],
43
+ tools: {
44
+ textToVideo: 'provider_text_to_video',
45
+ imageToVideo: 'provider_image_to_video',
46
+ firstLastFrameToVideo: 'provider_first_last_frame_to_video',
47
+ referenceToVideo: 'provider_reference_to_video',
48
+ query: 'provider_video_query'
49
+ },
50
+ models: [{
51
+ id: 'provider-model-id',
52
+ label: 'Provider Model',
53
+ inputs: {
54
+ referenceImages: { maxItems: 9 },
55
+ referenceAudios: { maxItems: 3 },
56
+ initialFrame: true,
57
+ lastFrame: true
58
+ }
59
+ }]
60
+ }
61
+ ```
62
+
63
+ Discovery returns only modes backed by enabled tools and only models that retain at least one
64
+ available mode. Submit validates model, output settings, reference kinds, frame combinations,
65
+ per-model limits, duplicate files, and tool enablement before provider invocation.
66
+
67
+ ## Request Routing
68
+
69
+ The host derives the mode from reference purposes:
70
+
71
+ 1. No references: text-to-video.
72
+ 2. One `first_frame`: image-to-video.
73
+ 3. One `first_frame` and one `last_frame`: first/final-frame-to-video.
74
+ 4. Generic image, video, or audio references: reference-to-video.
75
+ 5. A v1 provider or a v2 model without reference mode may accept one generic image through its
76
+ image-to-video tool. Other unsupported combinations fail before submission.
77
+
78
+ Reference array order is preserved within each media kind. Prompts that refer to `image 1`,
79
+ `image 2`, and so on must use the same image order as the request.
80
+
81
+ ## Standard Results
82
+
83
+ Submit tools return artifact data containing `task_id`, `status`, and optionally `model`. Query tools
84
+ return `task_id`, `status`, optional provider error data, and generated video files in the artifact
85
+ `files` array. The platform exposes normalized task fields and Workspace Files references; it does
86
+ not expose provider response bodies, credentials, internal tool names, or provider media URLs.
@@ -0,0 +1,413 @@
1
+ # View Extension Protocol
2
+
3
+ This document defines the contract between a view extension provider, its manifest, and an iframe remote component. It is intentionally small: every new backend interaction must be added as an explicit capability instead of becoming a generic RPC tunnel.
4
+
5
+ ## Goals
6
+
7
+ - Keep plugin views portable across hosts.
8
+ - Keep iframe remote components token-free and host-agnostic.
9
+ - Make every backend interaction visible in the manifest.
10
+ - Let provider APIs grow by optional methods with clear permissions and tests.
11
+ - Avoid putting large files, streams, jobs, or assets into JSON actions.
12
+
13
+ ## Three Contract Layers
14
+
15
+ The view extension surface has three layers. A feature is complete only when all three layers are defined.
16
+
17
+ | Layer | Owner | Purpose |
18
+ | ------------------------ | ------------------------------- | ------------------------------------------------------------------------------ |
19
+ | Message protocol | Host web app + remote component | The `postMessage` request/response envelope used by iframe views. |
20
+ | Manifest declaration | Provider | The visible capability whitelist for a view, including actions and parameters. |
21
+ | Provider optional method | Plugin SDK | The server-side method that actually handles the declared capability. |
22
+
23
+ Do not add a broad `execute(any)` method to `IXpertViewExtensionProvider`. Add a named optional method only when a capability has a known lifecycle, payload type, and security boundary.
24
+
25
+ ## Assistant Workbench Slot
26
+
27
+ Use `AGENT_WORKBENCH_SLOT` from `@xpert-ai/contracts`, whose value is `agent.workbench`, for Assistant Workbench views. The host exposes one Workbench slot. Opening behavior belongs to `workbench.openMode` (`auto` or `on-demand`), and the manual menu entry is controlled by `workbench.menu.enabled`.
28
+
29
+ For compatibility, the host accepts requests to `agent.workbench.fixed` and `agent.workbench.main` and normalizes them to `agent.workbench`. Responses use the canonical slot. If a provider returns no manifests for the canonical slot, the host reads both legacy slots and merges their views by key. A duplicate key uses the complete `fixed` declaration; distinct keys from either legacy slot remain available. A provider's nonempty canonical catalog takes precedence over its legacy declarations.
30
+
31
+ Compatibility mapping preserves view keys, permissions, Feature activation, visibility, and opening preferences. It does not grant access. Legacy `workbench.fixed: false` still hides the view; new providers should use `visible` for visibility and `openMode` for opening behavior. Other host types and slots are unaffected.
32
+
33
+ ## Message Envelope
34
+
35
+ All iframe messages must use this envelope:
36
+
37
+ ```ts
38
+ type XpertRemoteComponentMessage = {
39
+ channel: 'xpertai.remote_component'
40
+ protocolVersion: 1
41
+ instanceId?: string
42
+ type: string
43
+ requestId?: string
44
+ }
45
+ ```
46
+
47
+ Rules:
48
+
49
+ - `channel` and `protocolVersion` are mandatory.
50
+ - `instanceId` binds a message to one iframe instance after `init`.
51
+ - `requestId` is mandatory for request/response messages.
52
+ - The iframe may only send messages to its parent. It must not call view extension APIs directly.
53
+ - The host must ignore messages from any source other than the iframe content window.
54
+
55
+ ## Supported Message Types
56
+
57
+ Parent to iframe:
58
+
59
+ | Type | Purpose |
60
+ | --------------------- | ------------------------------------------------------------------------- |
61
+ | `init` | Supplies manifest, initial data payload, query, locale, and theme tokens. |
62
+ | `hostEvent` | Delivers a host-side event that matched `manifest.hostEvents`. |
63
+ | `data` | Response to `requestData`. |
64
+ | `parameterOptions` | Response to `requestParameterOptions`. |
65
+ | `actionResult` | Response to `executeAction`. |
66
+ | `fileActionResult` | Response to `executeFileAction`. |
67
+ | `clientCommandResult` | Response to `invokeClientCommand`. |
68
+ | `error` | Request-scoped failure response. |
69
+
70
+ Iframe to parent:
71
+
72
+ | Type | Purpose |
73
+ | ------------------------- | -------------------------------------------- |
74
+ | `ready` | Signals that the iframe is ready for `init`. |
75
+ | `resize` | Requests host height adjustment. |
76
+ | `notify` | Requests a host notification. |
77
+ | `requestData` | Requests view data through `getViewData`. |
78
+ | `requestParameterOptions` | Requests dynamic parameter options. |
79
+ | `executeAction` | Executes a JSON action. |
80
+ | `executeFileAction` | Executes a multipart file action. |
81
+ | `invokeClientCommand` | Requests a host-side client command. |
82
+
83
+ No other message type may perform backend I/O until it is added to this document, the host bridge, and the provider interface.
84
+
85
+ Remote components and hosts should import the public identifiers from `@xpert-ai/contracts` instead of repeating
86
+ their wire values:
87
+
88
+ ```ts
89
+ import {
90
+ WORKBENCH_ASSISTANT_CONVERSATION_TARGET,
91
+ WORKBENCH_FILE_OPEN_COMMAND,
92
+ WORKBENCH_NAVIGATION_OPEN_COMMAND,
93
+ XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE,
94
+ type WorkbenchOpenFile,
95
+ type WorkbenchNavigationOpenPayload,
96
+ type XpertRemoteComponentInvokeClientCommandRequest
97
+ } from '@xpert-ai/contracts'
98
+ ```
99
+
100
+ ## Manifest Rules
101
+
102
+ The manifest is the capability whitelist. A remote component may only request operations that the manifest declares.
103
+
104
+ ```ts
105
+ type XpertRemoteComponentViewSchema = {
106
+ type: 'remote_component'
107
+ runtime: 'react' | 'vue' | 'esm'
108
+ protocolVersion: 1
109
+ component: {
110
+ isolation: 'iframe'
111
+ entry: string
112
+ }
113
+ dataSource: {
114
+ mode: 'platform'
115
+ }
116
+ }
117
+
118
+ type XpertViewActionDefinition = {
119
+ key: string
120
+ label: I18nObject
121
+ icon?: string
122
+ placement?: 'toolbar' | 'row'
123
+ actionType: 'invoke' | 'navigate' | 'open_detail' | 'refresh'
124
+ inputSchema?: JsonSchemaObjectType
125
+ inputDefaults?: 'target' | Record<string, unknown>
126
+ confirm?: {
127
+ title?: I18nObject
128
+ message?: I18nObject
129
+ }
130
+ permissions?: string[]
131
+
132
+ // Convention for extension hosts. Omitted means 'json'.
133
+ transport?: 'json' | 'file'
134
+ }
135
+ ```
136
+
137
+ Rules:
138
+
139
+ - `runtime: 'react'` is the legacy classic-script iframe runtime.
140
+ - `runtime: 'vue'` and `runtime: 'esm'` use an ES module iframe entry. They keep the same postMessage protocol and may use top-level await inside the bundled `appScript`.
141
+ - `transport: 'json'` maps to `executeViewAction`.
142
+ - `transport: 'file'` maps to `executeViewFileAction`.
143
+ - If `transport` is omitted, hosts must treat the action as `json` for backward compatibility.
144
+ - File actions should normally use `actionType: 'invoke'` and should not be rendered as generic toolbar buttons unless the host explicitly supports file input for declared actions.
145
+ - `inputSchema` only describes JSON fields. It does not describe the uploaded file body.
146
+ - `clientCommands` declares host-side UI capabilities that the iframe may request through `invokeClientCommand`.
147
+ - Client commands are resolved by the host page, not by the plugin provider. They must be allowlisted in the manifest and must return structured success or error data.
148
+ - `hostEvents` declares host-side events that the view wants to observe. The host owns event normalization and matching; the plugin owns event semantics and UI behavior.
149
+ - Manifests must not include access tokens, concrete API URLs, host IDs, assistant IDs, or tenant IDs.
150
+
151
+ ## Host Event Subscriptions
152
+
153
+ Host events let a view react to activity that happened outside the iframe, for example an assistant tool call completing in the visible ChatKit. They are browser-local signals, not backend subscriptions.
154
+
155
+ The provider declares subscriptions in the manifest:
156
+
157
+ ```ts
158
+ type XpertViewHostEventSubscription = {
159
+ key: string
160
+ event: string
161
+ filter?: {
162
+ sources?: string[]
163
+ toolNames?: string[]
164
+ viewKeys?: string[]
165
+ visualizationTypes?: string[]
166
+ }
167
+ action?: {
168
+ // Defaults to 'refresh'.
169
+ type?: 'refresh' | 'forward' | 'refresh-and-forward'
170
+ debounceMs?: number
171
+ }
172
+ }
173
+
174
+ type XpertExtensionViewManifest = {
175
+ hostEvents?: {
176
+ subscriptions?: XpertViewHostEventSubscription[]
177
+ }
178
+ }
179
+ ```
180
+
181
+ Current data-xpert hosts normalize ChatKit logs into these event types:
182
+
183
+ | Event | Source | Notes |
184
+ | --------------------------------- | --------- | ------------------------------------------------------------------------------------------------------ |
185
+ | `assistant.tool.completed` | `chatkit` | Emitted from `lg.tool.end` logs and component logs that contain tool output or visualization metadata. |
186
+ | `assistant.visualization.emitted` | `chatkit` | Emitted when a component log contains visualization metadata but the host cannot resolve a tool name. |
187
+
188
+ Action behavior:
189
+
190
+ | Action | Host behavior |
191
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
192
+ | `refresh` | Re-run the normal view refresh flow. Declarative views call `getViewData`; remote components receive the current `init` again. |
193
+ | `forward` | Send a `hostEvent` message to the iframe. The remote component decides whether and how to refresh. |
194
+ | `refresh-and-forward` | Do both. |
195
+
196
+ Matching rules:
197
+
198
+ - The host first matches the current assistant context. The assistant identifier is host-internal and must not be forwarded to the iframe.
199
+ - `subscription.event` must equal the normalized host event type.
200
+ - `sources`, `toolNames`, `viewKeys`, and `visualizationTypes` are optional allowlists. If present, the event field must match.
201
+ - `debounceMs` is a lightweight duplicate guard for cases where one tool completion appears in multiple ChatKit logs.
202
+ - The host must not hard-code plugin view keys or tool names in the workbench extension renderer. Plugin-owned behavior belongs in the manifest and the remote component.
203
+
204
+ The forwarded `hostEvent` payload is intentionally small and sanitized:
205
+
206
+ ```ts
207
+ {
208
+ type: 'hostEvent',
209
+ event: {
210
+ id: 'assistant.tool.completed:...',
211
+ type: 'assistant.tool.completed',
212
+ source: 'chatkit',
213
+ receivedAt: '2026-05-29T00:00:00.000Z',
214
+ toolName: 'save_contract',
215
+ toolCallId: 'tool-call-id',
216
+ runId: 'run-id',
217
+ threadId: 'thread-id',
218
+ data: {
219
+ output: {
220
+ contractId: 'contract-1'
221
+ }
222
+ },
223
+ visualization: {
224
+ type: 'xpert.extension_view',
225
+ viewKey: 'provider__review'
226
+ }
227
+ }
228
+ }
229
+ ```
230
+
231
+ The payload must not include access tokens, API URLs, host IDs, assistant IDs, tenant IDs, organization IDs, or host-internal assistant routing fields.
232
+
233
+ Remote components should treat `hostEvent` as an intent signal. They may inspect `event.toolName`, `event.data.output`, and visualization metadata to switch tabs, update query parameters, refresh one data section, or ignore the event.
234
+
235
+ ## Provider Interface Mapping
236
+
237
+ `IXpertViewExtensionProvider` exposes explicit optional methods:
238
+
239
+ ```ts
240
+ interface IXpertViewExtensionProvider {
241
+ supports(context: XpertResolvedViewHostContext): Promise<boolean> | boolean
242
+
243
+ getViewManifests(
244
+ context: XpertResolvedViewHostContext,
245
+ slot: string
246
+ ): Promise<XpertExtensionViewManifest[]> | XpertExtensionViewManifest[]
247
+
248
+ getViewData(
249
+ context: XpertResolvedViewHostContext,
250
+ viewKey: string,
251
+ query: XpertViewQuery
252
+ ): Promise<XpertViewDataResult> | XpertViewDataResult
253
+
254
+ executeViewAction?(
255
+ context: XpertResolvedViewHostContext,
256
+ viewKey: string,
257
+ actionKey: string,
258
+ request: XpertViewActionRequest
259
+ ): Promise<XpertViewActionResult> | XpertViewActionResult
260
+
261
+ executeViewFileAction?(
262
+ context: XpertResolvedViewHostContext,
263
+ viewKey: string,
264
+ actionKey: string,
265
+ request: XpertViewActionRequest,
266
+ file: XpertViewFileActionFile
267
+ ): Promise<XpertViewActionResult> | XpertViewActionResult
268
+
269
+ getViewParameterOptions?(
270
+ context: XpertResolvedViewHostContext,
271
+ viewKey: string,
272
+ parameterKey: string,
273
+ query: XpertViewParameterOptionsQuery
274
+ ): Promise<XpertViewParameterOptionsResult> | XpertViewParameterOptionsResult
275
+
276
+ getRemoteComponentEntry?(
277
+ context: XpertResolvedViewHostContext,
278
+ viewKey: string,
279
+ component: XpertRemoteComponentViewSchema['component']
280
+ ): Promise<XpertRemoteComponentEntry> | XpertRemoteComponentEntry
281
+ }
282
+ ```
283
+
284
+ Mapping:
285
+
286
+ | Capability | Manifest declaration | Message | API transport | Provider method |
287
+ | ----------------- | --------------------------------------------- | ------------------------- | ----------------------------------- | ------------------------- |
288
+ | Data query | `dataSource.mode = 'platform'` | `requestData` | `GET /data` | `getViewData` |
289
+ | Parameter options | `parameters[].optionSource.mode = 'provider'` | `requestParameterOptions` | `GET /parameters/:key/options` | `getViewParameterOptions` |
290
+ | JSON action | `actions[].transport = 'json'` or omitted | `executeAction` | JSON `POST /actions/:key` | `executeViewAction` |
291
+ | File action | `actions[].transport = 'file'` | `executeFileAction` | multipart `POST /actions/:key/file` | `executeViewFileAction` |
292
+ | Remote entry | `view.type = 'remote_component'` | host-managed | `GET /remote-component/entry` | `getRemoteComponentEntry` |
293
+ | Client command | `clientCommands[].key` | `invokeClientCommand` | host in-page registry | host-managed |
294
+ | Host event | `hostEvents.subscriptions[]` | `hostEvent` | browser-local | host-managed |
295
+
296
+ ## Client Command Rules
297
+
298
+ Client commands let a remote component ask the current host page to perform a UI-local action, for example sending a message through the page's visible assistant ChatKit. They are not backend RPC and they must not expose auth or host internals to the iframe.
299
+
300
+ ```ts
301
+ type XpertViewClientCommandDefinition = {
302
+ key: string
303
+ label?: I18nObject
304
+ description?: I18nObject
305
+ permissions?: string[]
306
+ }
307
+ ```
308
+
309
+ The public file preview command uses `WORKBENCH_FILE_OPEN_COMMAND` and a
310
+ `WorkbenchOpenFile` payload. Optional evidence metadata is represented by
311
+ `WorkbenchOpenFileEvidence` and `WorkbenchOpenFileEvidenceBox`; plugins should
312
+ import these contracts instead of repeating the payload shape.
313
+
314
+ Rules:
315
+
316
+ - The iframe may call only command keys declared in `manifest.clientCommands`.
317
+ - The host must reject messages from the wrong iframe window or wrong `instanceId`.
318
+ - Command payloads are intent data only. They may include text, attachments, references, and view state, but not tokens, API URLs, assistant IDs, or tenant IDs.
319
+ - If the command handler is missing or unavailable, the host should return a structured unsupported result so the remote component can fall back to a backend action.
320
+ - Provider code must continue to work without client commands; they are an optional host enhancement.
321
+
322
+ ## File Action Rules
323
+
324
+ File actions use multipart transport end to end.
325
+
326
+ ```text
327
+ iframe remote component
328
+ -> postMessage executeFileAction
329
+ -> host web app builds FormData
330
+ -> host API proxy resolves host context
331
+ -> xpert-pro view-host file endpoint
332
+ -> provider.executeViewFileAction(...)
333
+ ```
334
+
335
+ Rules:
336
+
337
+ - The multipart field name is `file`.
338
+ - JSON fields are `targetId`, `input`, and `parameters`.
339
+ - The iframe should send file bytes as a transferable `ArrayBuffer` or another host-supported file payload. Do not rely on cross-sandbox `File` objects being reusable by the parent window.
340
+ - The provider receives `XpertViewFileActionFile` with `buffer`, `originalname`, `mimetype`, and `size`.
341
+ - The provider must validate file type, required worksheet/header shape, maximum size, and business-level duplicate behavior.
342
+ - The provider must return `XpertViewActionResult`; large parsed previews should go in `data`, not in `message`.
343
+
344
+ ## Error Shape
345
+
346
+ Provider action results should use `success: false` for business failures that the UI can display.
347
+
348
+ ```ts
349
+ {
350
+ success: false,
351
+ message: {
352
+ en_US: 'Preview has validation errors',
353
+ },
354
+ data: {
355
+ errors: ['...'],
356
+ },
357
+ refresh: false,
358
+ }
359
+ ```
360
+
361
+ Transport, permission, and malformed request failures should be thrown by the host or provider service so they become request-scoped `error` messages.
362
+
363
+ ## Security Invariants
364
+
365
+ - Remote components must not receive access tokens.
366
+ - Remote components must not receive xpert-pro API base URLs.
367
+ - Remote components must not decide `hostType`, `hostId`, tenant, organization, or assistant identity.
368
+ - Hosts must resolve context from authenticated server-side state.
369
+ - Hosts must check that `viewKey` exists and is visible.
370
+ - Hosts must check that `actionKey` exists, is visible, and matches the requested transport.
371
+ - Hosts must forward only normalized JSON fields and multipart file bytes.
372
+ - Providers must re-check business permissions and never trust iframe-provided identifiers by themselves.
373
+
374
+ ## Versioning
375
+
376
+ `protocolVersion: 1` is the current iframe protocol.
377
+
378
+ Backward-compatible changes:
379
+
380
+ - New optional manifest fields.
381
+ - New optional provider methods.
382
+ - New message types that older hosts safely ignore.
383
+ - Additional fields inside existing result `data`.
384
+
385
+ Breaking changes require a new `protocolVersion`:
386
+
387
+ - Renaming existing message types.
388
+ - Changing request/response pairing.
389
+ - Changing required envelope fields.
390
+ - Changing file payload semantics.
391
+
392
+ ## Adding A New Capability
393
+
394
+ Before adding a new backend interaction, update this document and answer:
395
+
396
+ 1. What message type does the iframe send?
397
+ 2. What manifest field declares the capability?
398
+ 3. What API transport does the host use?
399
+ 4. What optional provider method handles it?
400
+ 5. What permissions and context are enforced by the host?
401
+ 6. What payload size and lifecycle constraints apply?
402
+ 7. What tests prove non-declared operations fail?
403
+
404
+ Recommended future capabilities:
405
+
406
+ | Capability | Suggested provider method |
407
+ | ------------------------ | ------------------------------------------------- |
408
+ | Streaming action | `executeViewStreamAction?` |
409
+ | Long-running job | `createViewJob?`, `getViewJob?`, `cancelViewJob?` |
410
+ | Generated asset download | `getViewAsset?` |
411
+ | Server-side subscription | `subscribeViewEvents?` |
412
+
413
+ Do not add them until a real view needs them.
package/index.cjs.js CHANGED
@@ -1130,6 +1130,19 @@ const KnowledgebaseProvisioningRuntimeCapability = modelProvider.createRuntimeCa
1130
1130
  description: 'Idempotently provision managed platform knowledgebases and connect them to an Agent.'
1131
1131
  });
1132
1132
 
1133
+ /** Knowledgebase discovery is scoped to the authenticated runtime, never caller-supplied identities. */ const knowledgebaseActions = [
1134
+ 'knowledgebase.read',
1135
+ 'knowledgebase.manage',
1136
+ 'content.search',
1137
+ 'documents.read',
1138
+ 'documents.create',
1139
+ 'documents.update',
1140
+ 'documents.delete',
1141
+ 'documents.process',
1142
+ 'chunks.write',
1143
+ 'chunks.delete'
1144
+ ];
1145
+
1133
1146
  const KnowledgeGraphRuntimeCapability = modelProvider.createRuntimeCapability('platform.knowledge-graph', {
1134
1147
  description: 'Publish, inspect, and retract source-owned structured knowledge graphs without model extraction.'
1135
1148
  });
@@ -10470,6 +10483,7 @@ exports.isSandboxTerminalAdapter = isSandboxTerminalAdapter;
10470
10483
  exports.isStrategyInstance = isStrategyInstance;
10471
10484
  exports.isStructuredMessageType = isStructuredMessageType;
10472
10485
  exports.isTenantGlobalScopeKey = isTenantGlobalScopeKey;
10486
+ exports.knowledgebaseActions = knowledgebaseActions;
10473
10487
  exports.loadYamlFile = loadYamlFile;
10474
10488
  exports.mergeCredentials = mergeCredentials;
10475
10489
  exports.mergeModelRequirements = mergeModelRequirements;
package/index.esm.js CHANGED
@@ -1112,6 +1112,19 @@ const KnowledgebaseProvisioningRuntimeCapability = createRuntimeCapability('plat
1112
1112
  description: 'Idempotently provision managed platform knowledgebases and connect them to an Agent.'
1113
1113
  });
1114
1114
 
1115
+ /** Knowledgebase discovery is scoped to the authenticated runtime, never caller-supplied identities. */ const knowledgebaseActions = [
1116
+ 'knowledgebase.read',
1117
+ 'knowledgebase.manage',
1118
+ 'content.search',
1119
+ 'documents.read',
1120
+ 'documents.create',
1121
+ 'documents.update',
1122
+ 'documents.delete',
1123
+ 'documents.process',
1124
+ 'chunks.write',
1125
+ 'chunks.delete'
1126
+ ];
1127
+
1115
1128
  const KnowledgeGraphRuntimeCapability = createRuntimeCapability('platform.knowledge-graph', {
1116
1129
  description: 'Publish, inspect, and retract source-owned structured knowledge graphs without model extraction.'
1117
1130
  });
@@ -10132,4 +10145,4 @@ Reflect.defineMetadata('__command__', {
10132
10145
  id: ImportDefaultAgentPluginsCommand.type
10133
10146
  }, ImportDefaultAgentPluginsCommand);
10134
10147
 
10135
- export { ACCOUNT_BINDING_PERMISSION_SERVICE_TOKEN, AGENT_CHAT_DISPATCH_ERROR_STEER_TARGET_NOT_RUNNING, AGENT_CHAT_DISPATCH_MESSAGE_TYPE, AGENT_MIDDLEWARE_STRATEGY, AGENT_RUNTIME_EVENT_MESSAGE_TYPE, AGENT_RUNTIME_STRATEGY, AIModel, AIModelProviderNotFoundException, AIModelProviderRegistry, AIModelProviderStrategy, AI_MODEL_PROVIDER, ASSISTANT_CAPABILITY_PROVIDER, AdapterDataSourceStrategy, AgentExecutionRunnerCapability, AgentExecutionRunnerFactoryCapability, AgentInvocationRuntimeCapability, AgentMiddlewareRegistry, AgentMiddlewareStrategy, AgentRuntimeFactoryCapability, AgentRuntimeRegistry, AgentRuntimeStrategy, AiModelNotFoundException, AssistantCapabilityProvider, AssistantCapabilityProviderRegistry, AssistantTaskRuntimeCapability, BOUND_IDENTITY_LOGIN_PERMISSION_SERVICE_TOKEN, BUILTIN_GLOBAL_SCOPE, BaseHTTPQueryRunner, BaseQueryRunner, BaseSQLQueryRunner, BaseSandbox, BaseStrategyRegistry, BuiltinToolset, CHAT_CHANNEL, CHAT_CHANNEL_TEXT_LIMITS, CLI_MODEL_TOKEN_REFERENCE, COLLABORATION_DOCUMENT_PROVIDER, CONNECTION_COMMAND_ROUTER_TOKEN, CONNECTOR_STRATEGY, CancelConversationCommand, ChatChannel, ChatChannelRegistry, ChatOAICompatReasoningModel, CliModelProfilesCapability, CollaborationDocumentProvider, CollaborationDocumentProviderRegistry, CollaborationRuntimeCapability, CommonParameterRules, ConnectorRuntimeCapability, ConnectorRuntimeFactoryCapability, ConnectorStrategyKey, ConnectorStrategyRegistry, CreateModelClientCommand, CredentialsValidateFailedError, DATASOURCE_STRATEGY, DBCreateTableMode, DBProtocolEnum, DBSyntaxEnum, DBTableAction, DBTableDataAction, DEFAULT_EXECUTION_CONFIG, DEFAULT_SANDBOX_EXECUTION_MAX_OUTPUT_BYTES, DEFAULT_SANDBOX_FILE_OPERATION_EXECUTION_OPTIONS, DEFAULT_SANDBOX_FILE_OPERATION_TIMEOUT_MS, DEFAULT_SANDBOX_FILE_OPERATION_TIMEOUT_SEC, DEFAULT_SANDBOX_FILE_SEARCH_EXECUTION_OPTIONS, DEFAULT_SANDBOX_FILE_SEARCH_TIMEOUT_MS, DEFAULT_SANDBOX_FILE_SEARCH_TIMEOUT_SEC, DEFAULT_SANDBOX_SHELL_EXECUTION_OPTIONS, DEFAULT_SANDBOX_SHELL_TIMEOUT_MS, DEFAULT_SANDBOX_SHELL_TIMEOUT_SEC, DOCUMENT_SOURCE_STRATEGY, DOCUMENT_TRANSFORMER_STRATEGY, DataSourceStrategy, DataSourceStrategyRegistry, DecoratedAgentMiddlewareStrategy, DecoratedToolsetStrategy, DocumentSourceRegistry, DocumentSourceStrategy, DocumentTransformerRegistry, DocumentTransformerStrategy, EVOLUTION_RUNTIME_SERVICE_TOKEN, EVOLUTION_TARGET_PROVIDER, EvolutionBaselineRuntimeCapability, EvolutionChangeRuntimeCapability, EvolutionRuntimeCapability, EvolutionTargetProviderRegistry, EvolutionTargetProviderStrategy, FILE_STORAGE_PROVIDER, FILE_UPLOAD_TARGET_STRATEGY, FileRuntimeCapability, FileStorageProvider, FileStorageProviderRegistry, FileUploadTargetRegistry, FileUploadTargetStrategy, GLOBAL_ORGANIZATION_SCOPE, HANDOFF_PERMISSION_SERVICE_TOKEN, HANDOFF_PROCESSOR_STRATEGY, HANDOFF_QUEUE_SERVICE_TOKEN, HandoffProcessorRegistry, HandoffProcessorStrategy, IMAGE_UNDERSTANDING_STRATEGY, INTEGRATION_PERMISSION_SERVICE_TOKEN, INTEGRATION_STRATEGY, ImageGenerationModel, ImageUnderstandingRegistry, ImageUnderstandingStrategy, ImportDefaultAgentPluginsCommand, IntegrationStrategyKey, IntegrationStrategyRegistry, JUMP_TO_TARGETS, JsonSchemaValidator, KEYWORD_ANALYZER_STRATEGY, KNOWLEDGE_STRATEGY, KeywordAnalyzerRegistry, KeywordAnalyzerStrategy, KnowledgeDocumentVisualAssetsRuntimeCapability, KnowledgeDocumentVisualAssetsRuntimeFactoryCapability, KnowledgeGraphRuntimeCapability, KnowledgeStrategyKey, KnowledgeStrategyRegistry, KnowledgebaseDocumentsRuntimeCapability, KnowledgebaseProvisioningRuntimeCapability, KnowledgebaseRuntimeCapability, LLMUsage, LargeLanguageModel, MANAGED_CONNECTION_REGISTRY_TOKEN, MANAGED_QUEUE_HANDLER_REGISTRY_TOKEN, MANAGED_QUEUE_SERVICE_TOKEN, MCP_CAPABILITY_CHANGE_EVENT_TYPES, MODEL_OUTPUT_VALIDATION_ERROR_CODE, ModelExecutionEnvironmentCapability, ModelOutputValidationError, ModelProvider, ORGANIZATION_METADATA_KEY, OpenAICompatibleReranker, PERMISSION_OPERATION_METADATA_KEY, PLUGIN_CONFIG_RESOLVER_TOKEN, PLUGIN_JOB_PROCESSOR_METADATA, PLUGIN_METADATA, PLUGIN_METADATA_KEY, PLUGIN_VERSION_METADATA_KEY, PLUGIN_WEBHOOK_AUTH_METADATA_KEY, PLUGIN_WEBHOOK_AUTH_SERVICE_TOKEN, PROJECT_TASK_PROVIDER, PROJECT_TYPE_PROVIDER, PROVIDE_AI_MODEL_LLM, PROVIDE_AI_MODEL_MODERATION, PROVIDE_AI_MODEL_RERANK, PROVIDE_AI_MODEL_SPEECH2TEXT, PROVIDE_AI_MODEL_TEXT_EMBEDDING, PROVIDE_AI_MODEL_TTS, PluginJobProcessor, PluginWebhookAuth, PluginWebhookAuthGuard, ProjectTaskProvider, ProjectTaskProviderRegistry, ProjectTasksRuntimeCapability, ProjectTypeProvider, ProjectTypeProviderRegistry, RESOURCE_CARD_EVENT, RESOURCE_CARD_PROVIDER, RETRIEVER_STRATEGY, RequestContext, RequestContextMiddleware, RequirePermissionOperation, RerankModel, ResourceCardProvider, ResourceCardProviderRegistry, RetrieverRegistry, RetrieverStrategy, SANDBOX_PROVIDER, SANDBOX_RUNTIME_PROVIDER, SANDBOX_SHELL_TIMEOUT_LIMITS_SEC, SANDBOX_WORKSPACE_MAPPER, SKILL_SOURCE_PROVIDER, SPEECH_TO_TEXT_PERMISSION_SERVICE_TOKEN, SPEECH_TO_TEXT_SERVICE_TOKEN, SSOProviderRegistry, SSOProviderStrategyKey, SSO_BINDING_PERMISSION_SERVICE_TOKEN, SSO_PROVIDER, STRATEGY_META_KEY, SYSTEM_GLOBAL_SCOPE, SandboxProviderRegistry, SandboxProviderStrategy, SandboxRuntimeProviderRegistry, SandboxRuntimeProviderStrategy, SandboxWorkspaceMapperRegistry, SandboxWorkspaceMapperStrategy, ShellModelExecutionSourceCapability, SkillSourceProviderRegistry, SkillSourceProviderStrategy, Speech2TextChatModel, SpeechToTextModel, StrategyBus, TENANT_GLOBAL_SCOPE_PREFIX, TENANT_GLOBAL_SCOPE_SUFFIX, TEXT_SPLITTER_STRATEGY, TOOLSET_STRATEGY, TextEmbeddingModelManager, TextSplitterRegistry, TextSplitterStrategy, TextToSpeechModel, ToolsetRegistry, ToolsetStrategy, USER_PERMISSION_SERVICE_TOKEN, VECTOR_STORE_STRATEGY, VIDEO_GENERATION_PERMISSION_SERVICE_TOKEN, VIDEO_GENERATION_SERVICE_TOKEN, VIDEO_GENERATOR_FAMILIES, VIEW_EXTENSION_CACHE_SERVICE_TOKEN, VIEW_EXTENSION_PROVIDER, VectorStoreRegistry, VectorStoreStrategy, VideoGenerationModel, ViewExtensionProvider, ViewExtensionProviderRegistry, WORKFLOW_NODE_STRATEGY, WORKFLOW_TRIGGER_STRATEGY, WorkflowNodeRegistry, WorkflowNodeStrategy, WorkflowTriggerRegistry, WorkflowTriggerStrategy, WorkspaceFilesRuntimeCapability, WrapWorkflowNodeExecutionCommand, XPERT_AGENT_MIDDLEWARE_RUNTIME_TOKEN, XPERT_TOOL_METHOD_METADATA, XPERT_TOOL_PROVIDER, XPERT_TOOL_PROVIDER_METADATA, XPERT_TOOL_RESULT_FORMAT_VERSION, XpFileSystem, XpertPrompt, XpertResource, XpertResourceTemplate, XpertServerPlugin, XpertTool, XpertToolProvider, XpertToolProviderCoordinator, XpertToolProviderRegistry, agentInvocationDispatchContextSchema, agentRuntimeConsumptionStateSchema, agentRuntimeDeliveryStateSchema, agentRuntimeEventMessageId, agentRuntimeEventSchema, agentRuntimeReplyTargetSchema, agentRuntimeResultClaimSchema, agentRuntimeResultConsumptionKey, als, appendSandboxMessage, assertConnectorDefinition, buildSandboxTimeoutMessage, calcTokenUsage, calculateLLMUsagePrice, calculateModelPrice, calculateModelUsageCharge, chunkText, countTextTokens, countTokensSafe, createI18nInstance, createPluginLogger, createRuntimeCapability, defineAgentMessageType, defineChannelMessageType, defineMcpApp, defineMcpCapabilities, defineMcpPrompt, defineMcpResource, defineMcpResourceTemplate, defineXpertTool, derivePluginArtifactNamespace, describeXpertToolProvider, downloadRemoteFile, emitResourceCard, formatSandboxTimeout, getDefaultTenantId, getErrorMessage, getModelContextSize, getPermissionOperationMetadata, getPositionList, getPositionMap, getRequestContext, getRequiredPermissionOperation, getTenantGlobalScopeKey, getXpertToolMethod, isAgentInvocationTerminal, isDevelopmentSandboxRuntimeEnvironment, isModelOutputValidationError, isModelUsagePricingConfig, isRemoteFile, isSandboxBackend, isSandboxManagedServiceAdapter, isSandboxServiceProxyAdapter, isSandboxTerminalAdapter, isStrategyInstance, isStructuredMessageType, isTenantGlobalScopeKey, loadYamlFile, mergeCredentials, mergeModelRequirements, mergeParentChildChunks, nativeModelTransport, normalizeContextSize, normalizeTokenUsage, pluginArtifactTableName, prepareToolResult, processAsyncAIGCManagedJob, renderRemoteModuleIframeHtml, renderRemoteReactIframeHtml, renderRemoteVueIframeHtml, resolveModelUsagePricingSnapshot, resolveSandboxBackend, resolveSandboxExecutionOptions, resolveSandboxManagedServiceAdapter, resolveSandboxServiceProxyAdapter, resolveSandboxTerminalAdapter, resolveStrategyMetadataTarget, resolveTenantGlobalScopeKey, resolveTokenUsage, resolveTokenUsageCandidates, resolveXpertMcpExtensions, runWithRequestContext, runtimeToolProviderComponent, secondsToMilliseconds, setDefaultTenantId, sumTokenUsage, taskWaitReason, textTokenBoundaries };
10148
+ export { ACCOUNT_BINDING_PERMISSION_SERVICE_TOKEN, AGENT_CHAT_DISPATCH_ERROR_STEER_TARGET_NOT_RUNNING, AGENT_CHAT_DISPATCH_MESSAGE_TYPE, AGENT_MIDDLEWARE_STRATEGY, AGENT_RUNTIME_EVENT_MESSAGE_TYPE, AGENT_RUNTIME_STRATEGY, AIModel, AIModelProviderNotFoundException, AIModelProviderRegistry, AIModelProviderStrategy, AI_MODEL_PROVIDER, ASSISTANT_CAPABILITY_PROVIDER, AdapterDataSourceStrategy, AgentExecutionRunnerCapability, AgentExecutionRunnerFactoryCapability, AgentInvocationRuntimeCapability, AgentMiddlewareRegistry, AgentMiddlewareStrategy, AgentRuntimeFactoryCapability, AgentRuntimeRegistry, AgentRuntimeStrategy, AiModelNotFoundException, AssistantCapabilityProvider, AssistantCapabilityProviderRegistry, AssistantTaskRuntimeCapability, BOUND_IDENTITY_LOGIN_PERMISSION_SERVICE_TOKEN, BUILTIN_GLOBAL_SCOPE, BaseHTTPQueryRunner, BaseQueryRunner, BaseSQLQueryRunner, BaseSandbox, BaseStrategyRegistry, BuiltinToolset, CHAT_CHANNEL, CHAT_CHANNEL_TEXT_LIMITS, CLI_MODEL_TOKEN_REFERENCE, COLLABORATION_DOCUMENT_PROVIDER, CONNECTION_COMMAND_ROUTER_TOKEN, CONNECTOR_STRATEGY, CancelConversationCommand, ChatChannel, ChatChannelRegistry, ChatOAICompatReasoningModel, CliModelProfilesCapability, CollaborationDocumentProvider, CollaborationDocumentProviderRegistry, CollaborationRuntimeCapability, CommonParameterRules, ConnectorRuntimeCapability, ConnectorRuntimeFactoryCapability, ConnectorStrategyKey, ConnectorStrategyRegistry, CreateModelClientCommand, CredentialsValidateFailedError, DATASOURCE_STRATEGY, DBCreateTableMode, DBProtocolEnum, DBSyntaxEnum, DBTableAction, DBTableDataAction, DEFAULT_EXECUTION_CONFIG, DEFAULT_SANDBOX_EXECUTION_MAX_OUTPUT_BYTES, DEFAULT_SANDBOX_FILE_OPERATION_EXECUTION_OPTIONS, DEFAULT_SANDBOX_FILE_OPERATION_TIMEOUT_MS, DEFAULT_SANDBOX_FILE_OPERATION_TIMEOUT_SEC, DEFAULT_SANDBOX_FILE_SEARCH_EXECUTION_OPTIONS, DEFAULT_SANDBOX_FILE_SEARCH_TIMEOUT_MS, DEFAULT_SANDBOX_FILE_SEARCH_TIMEOUT_SEC, DEFAULT_SANDBOX_SHELL_EXECUTION_OPTIONS, DEFAULT_SANDBOX_SHELL_TIMEOUT_MS, DEFAULT_SANDBOX_SHELL_TIMEOUT_SEC, DOCUMENT_SOURCE_STRATEGY, DOCUMENT_TRANSFORMER_STRATEGY, DataSourceStrategy, DataSourceStrategyRegistry, DecoratedAgentMiddlewareStrategy, DecoratedToolsetStrategy, DocumentSourceRegistry, DocumentSourceStrategy, DocumentTransformerRegistry, DocumentTransformerStrategy, EVOLUTION_RUNTIME_SERVICE_TOKEN, EVOLUTION_TARGET_PROVIDER, EvolutionBaselineRuntimeCapability, EvolutionChangeRuntimeCapability, EvolutionRuntimeCapability, EvolutionTargetProviderRegistry, EvolutionTargetProviderStrategy, FILE_STORAGE_PROVIDER, FILE_UPLOAD_TARGET_STRATEGY, FileRuntimeCapability, FileStorageProvider, FileStorageProviderRegistry, FileUploadTargetRegistry, FileUploadTargetStrategy, GLOBAL_ORGANIZATION_SCOPE, HANDOFF_PERMISSION_SERVICE_TOKEN, HANDOFF_PROCESSOR_STRATEGY, HANDOFF_QUEUE_SERVICE_TOKEN, HandoffProcessorRegistry, HandoffProcessorStrategy, IMAGE_UNDERSTANDING_STRATEGY, INTEGRATION_PERMISSION_SERVICE_TOKEN, INTEGRATION_STRATEGY, ImageGenerationModel, ImageUnderstandingRegistry, ImageUnderstandingStrategy, ImportDefaultAgentPluginsCommand, IntegrationStrategyKey, IntegrationStrategyRegistry, JUMP_TO_TARGETS, JsonSchemaValidator, KEYWORD_ANALYZER_STRATEGY, KNOWLEDGE_STRATEGY, KeywordAnalyzerRegistry, KeywordAnalyzerStrategy, KnowledgeDocumentVisualAssetsRuntimeCapability, KnowledgeDocumentVisualAssetsRuntimeFactoryCapability, KnowledgeGraphRuntimeCapability, KnowledgeStrategyKey, KnowledgeStrategyRegistry, KnowledgebaseDocumentsRuntimeCapability, KnowledgebaseProvisioningRuntimeCapability, KnowledgebaseRuntimeCapability, LLMUsage, LargeLanguageModel, MANAGED_CONNECTION_REGISTRY_TOKEN, MANAGED_QUEUE_HANDLER_REGISTRY_TOKEN, MANAGED_QUEUE_SERVICE_TOKEN, MCP_CAPABILITY_CHANGE_EVENT_TYPES, MODEL_OUTPUT_VALIDATION_ERROR_CODE, ModelExecutionEnvironmentCapability, ModelOutputValidationError, ModelProvider, ORGANIZATION_METADATA_KEY, OpenAICompatibleReranker, PERMISSION_OPERATION_METADATA_KEY, PLUGIN_CONFIG_RESOLVER_TOKEN, PLUGIN_JOB_PROCESSOR_METADATA, PLUGIN_METADATA, PLUGIN_METADATA_KEY, PLUGIN_VERSION_METADATA_KEY, PLUGIN_WEBHOOK_AUTH_METADATA_KEY, PLUGIN_WEBHOOK_AUTH_SERVICE_TOKEN, PROJECT_TASK_PROVIDER, PROJECT_TYPE_PROVIDER, PROVIDE_AI_MODEL_LLM, PROVIDE_AI_MODEL_MODERATION, PROVIDE_AI_MODEL_RERANK, PROVIDE_AI_MODEL_SPEECH2TEXT, PROVIDE_AI_MODEL_TEXT_EMBEDDING, PROVIDE_AI_MODEL_TTS, PluginJobProcessor, PluginWebhookAuth, PluginWebhookAuthGuard, ProjectTaskProvider, ProjectTaskProviderRegistry, ProjectTasksRuntimeCapability, ProjectTypeProvider, ProjectTypeProviderRegistry, RESOURCE_CARD_EVENT, RESOURCE_CARD_PROVIDER, RETRIEVER_STRATEGY, RequestContext, RequestContextMiddleware, RequirePermissionOperation, RerankModel, ResourceCardProvider, ResourceCardProviderRegistry, RetrieverRegistry, RetrieverStrategy, SANDBOX_PROVIDER, SANDBOX_RUNTIME_PROVIDER, SANDBOX_SHELL_TIMEOUT_LIMITS_SEC, SANDBOX_WORKSPACE_MAPPER, SKILL_SOURCE_PROVIDER, SPEECH_TO_TEXT_PERMISSION_SERVICE_TOKEN, SPEECH_TO_TEXT_SERVICE_TOKEN, SSOProviderRegistry, SSOProviderStrategyKey, SSO_BINDING_PERMISSION_SERVICE_TOKEN, SSO_PROVIDER, STRATEGY_META_KEY, SYSTEM_GLOBAL_SCOPE, SandboxProviderRegistry, SandboxProviderStrategy, SandboxRuntimeProviderRegistry, SandboxRuntimeProviderStrategy, SandboxWorkspaceMapperRegistry, SandboxWorkspaceMapperStrategy, ShellModelExecutionSourceCapability, SkillSourceProviderRegistry, SkillSourceProviderStrategy, Speech2TextChatModel, SpeechToTextModel, StrategyBus, TENANT_GLOBAL_SCOPE_PREFIX, TENANT_GLOBAL_SCOPE_SUFFIX, TEXT_SPLITTER_STRATEGY, TOOLSET_STRATEGY, TextEmbeddingModelManager, TextSplitterRegistry, TextSplitterStrategy, TextToSpeechModel, ToolsetRegistry, ToolsetStrategy, USER_PERMISSION_SERVICE_TOKEN, VECTOR_STORE_STRATEGY, VIDEO_GENERATION_PERMISSION_SERVICE_TOKEN, VIDEO_GENERATION_SERVICE_TOKEN, VIDEO_GENERATOR_FAMILIES, VIEW_EXTENSION_CACHE_SERVICE_TOKEN, VIEW_EXTENSION_PROVIDER, VectorStoreRegistry, VectorStoreStrategy, VideoGenerationModel, ViewExtensionProvider, ViewExtensionProviderRegistry, WORKFLOW_NODE_STRATEGY, WORKFLOW_TRIGGER_STRATEGY, WorkflowNodeRegistry, WorkflowNodeStrategy, WorkflowTriggerRegistry, WorkflowTriggerStrategy, WorkspaceFilesRuntimeCapability, WrapWorkflowNodeExecutionCommand, XPERT_AGENT_MIDDLEWARE_RUNTIME_TOKEN, XPERT_TOOL_METHOD_METADATA, XPERT_TOOL_PROVIDER, XPERT_TOOL_PROVIDER_METADATA, XPERT_TOOL_RESULT_FORMAT_VERSION, XpFileSystem, XpertPrompt, XpertResource, XpertResourceTemplate, XpertServerPlugin, XpertTool, XpertToolProvider, XpertToolProviderCoordinator, XpertToolProviderRegistry, agentInvocationDispatchContextSchema, agentRuntimeConsumptionStateSchema, agentRuntimeDeliveryStateSchema, agentRuntimeEventMessageId, agentRuntimeEventSchema, agentRuntimeReplyTargetSchema, agentRuntimeResultClaimSchema, agentRuntimeResultConsumptionKey, als, appendSandboxMessage, assertConnectorDefinition, buildSandboxTimeoutMessage, calcTokenUsage, calculateLLMUsagePrice, calculateModelPrice, calculateModelUsageCharge, chunkText, countTextTokens, countTokensSafe, createI18nInstance, createPluginLogger, createRuntimeCapability, defineAgentMessageType, defineChannelMessageType, defineMcpApp, defineMcpCapabilities, defineMcpPrompt, defineMcpResource, defineMcpResourceTemplate, defineXpertTool, derivePluginArtifactNamespace, describeXpertToolProvider, downloadRemoteFile, emitResourceCard, formatSandboxTimeout, getDefaultTenantId, getErrorMessage, getModelContextSize, getPermissionOperationMetadata, getPositionList, getPositionMap, getRequestContext, getRequiredPermissionOperation, getTenantGlobalScopeKey, getXpertToolMethod, isAgentInvocationTerminal, isDevelopmentSandboxRuntimeEnvironment, isModelOutputValidationError, isModelUsagePricingConfig, isRemoteFile, isSandboxBackend, isSandboxManagedServiceAdapter, isSandboxServiceProxyAdapter, isSandboxTerminalAdapter, isStrategyInstance, isStructuredMessageType, isTenantGlobalScopeKey, knowledgebaseActions, loadYamlFile, mergeCredentials, mergeModelRequirements, mergeParentChildChunks, nativeModelTransport, normalizeContextSize, normalizeTokenUsage, pluginArtifactTableName, prepareToolResult, processAsyncAIGCManagedJob, renderRemoteModuleIframeHtml, renderRemoteReactIframeHtml, renderRemoteVueIframeHtml, resolveModelUsagePricingSnapshot, resolveSandboxBackend, resolveSandboxExecutionOptions, resolveSandboxManagedServiceAdapter, resolveSandboxServiceProxyAdapter, resolveSandboxTerminalAdapter, resolveStrategyMetadataTarget, resolveTenantGlobalScopeKey, resolveTokenUsage, resolveTokenUsageCandidates, resolveXpertMcpExtensions, runWithRequestContext, runtimeToolProviderComponent, secondsToMilliseconds, setDefaultTenantId, sumTokenUsage, taskWaitReason, textTokenBoundaries };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpert-ai/plugin-sdk",
3
- "version": "3.21.0",
3
+ "version": "3.21.1",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,4 +1,5 @@
1
1
  export * from './knowledgebase';
2
+ export * from './knowledgebase-catalog';
2
3
  export * from './knowledge-graph';
3
4
  export * from './knowledgebase-documents';
4
5
  export * from './knowledge-upload-sessions';