@xpert-ai/xpert-sdk 0.0.14 → 0.0.16
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/dist/auth/types.d.ts +1 -0
- package/dist/client.d.ts +34 -0
- package/dist/client.js +210 -25
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +210 -25
- package/dist/client.mjs.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -1
- package/dist/mcp/apps.d.ts +11 -0
- package/dist/mcp/apps.js +49 -0
- package/dist/mcp/apps.js.map +1 -0
- package/dist/mcp/apps.mjs +49 -0
- package/dist/mcp/apps.mjs.map +1 -0
- package/dist/mcp/apps.test.d.ts +1 -0
- package/dist/mcp/apps.test.js +77 -0
- package/dist/mcp/apps.test.js.map +1 -0
- package/dist/mcp/apps.test.mjs +77 -0
- package/dist/mcp/apps.test.mjs.map +1 -0
- package/dist/mcp/index.d.ts +11 -0
- package/dist/mcp/index.js +13 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/index.mjs +13 -0
- package/dist/mcp/index.mjs.map +1 -0
- package/dist/mcp/publications.d.ts +27 -0
- package/dist/mcp/publications.js +101 -0
- package/dist/mcp/publications.js.map +1 -0
- package/dist/mcp/publications.mjs +101 -0
- package/dist/mcp/publications.mjs.map +1 -0
- package/dist/mcp/publications.test.d.ts +1 -0
- package/dist/mcp/publications.test.js +176 -0
- package/dist/mcp/publications.test.js.map +1 -0
- package/dist/mcp/publications.test.mjs +176 -0
- package/dist/mcp/publications.test.mjs.map +1 -0
- package/dist/mcp/transport.d.ts +10 -0
- package/dist/mcp/transport.js +2 -0
- package/dist/mcp/transport.js.map +1 -0
- package/dist/mcp/transport.mjs +2 -0
- package/dist/mcp/transport.mjs.map +1 -0
- package/dist/mcp/types.d.ts +326 -0
- package/dist/mcp/types.js +2 -0
- package/dist/mcp/types.js.map +1 -0
- package/dist/mcp/types.mjs +2 -0
- package/dist/mcp/types.mjs.map +1 -0
- package/dist/tests/fetch.test.js +16 -0
- package/dist/tests/fetch.test.js.map +1 -1
- package/dist/tests/fetch.test.mjs +16 -0
- package/dist/tests/fetch.test.mjs.map +1 -1
- package/dist/tests/view-hosts.test.d.ts +1 -0
- package/dist/tests/view-hosts.test.js +222 -0
- package/dist/tests/view-hosts.test.js.map +1 -0
- package/dist/tests/view-hosts.test.mjs +222 -0
- package/dist/tests/view-hosts.test.mjs.map +1 -0
- package/dist/view-extension.d.ts +428 -0
- package/dist/view-extension.js +10 -0
- package/dist/view-extension.js.map +1 -0
- package/dist/view-extension.mjs +10 -0
- package/dist/view-extension.mjs.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import type { IconDefinition } from "./schema.js";
|
|
2
|
+
export type XpertViewHostType = "integration" | "knowledgebase" | "agent" | "project" | "sandbox" | (string & {});
|
|
3
|
+
export type XpertViewSlotMode = "tabs" | "sections" | "widgets" | "sidebar";
|
|
4
|
+
export type XpertViewSchemaType = "stats" | "table" | "list" | "detail" | "raw_json" | "remote_component";
|
|
5
|
+
export type XpertRemoteComponentRuntime = "react" | "vue" | "esm";
|
|
6
|
+
export type XpertViewValueType = "text" | "number" | "status" | "datetime" | "json";
|
|
7
|
+
export type XpertViewColumnDataType = "text" | "number" | "date" | "datetime" | "status" | "tag" | "avatar" | "link";
|
|
8
|
+
export type XpertViewActionPlacement = "toolbar" | "row";
|
|
9
|
+
export type XpertViewActionType = "invoke" | "navigate" | "open_detail" | "refresh";
|
|
10
|
+
export type XpertViewActionTransport = "json" | "file";
|
|
11
|
+
export type XpertViewFileAccessPurpose = "preview" | "download";
|
|
12
|
+
export type XpertViewSortDirection = "asc" | "desc";
|
|
13
|
+
export type XpertViewFilterOperator = "eq" | "neq" | "contains" | "starts_with" | "ends_with" | "in" | "gt" | "gte" | "lt" | "lte";
|
|
14
|
+
export type XpertViewScalar = string | number | boolean | null;
|
|
15
|
+
export interface XpertI18nObject {
|
|
16
|
+
en_US: string;
|
|
17
|
+
zh_Hans?: string;
|
|
18
|
+
}
|
|
19
|
+
export type XpertViewJsonSchemaValue = string | number | boolean | null | XpertViewJsonSchemaValue[] | {
|
|
20
|
+
[key: string]: XpertViewJsonSchemaValue;
|
|
21
|
+
};
|
|
22
|
+
export interface XpertViewJsonSchemaNode {
|
|
23
|
+
type?: string | string[];
|
|
24
|
+
title?: XpertI18nObject;
|
|
25
|
+
description?: XpertI18nObject;
|
|
26
|
+
default?: XpertViewJsonSchemaValue;
|
|
27
|
+
enum?: XpertViewJsonSchemaValue[];
|
|
28
|
+
properties?: Record<string, XpertViewJsonSchemaNode>;
|
|
29
|
+
items?: XpertViewJsonSchemaNode | XpertViewJsonSchemaNode[];
|
|
30
|
+
required?: string[];
|
|
31
|
+
additionalProperties?: boolean | XpertViewJsonSchemaNode;
|
|
32
|
+
[key: string]: XpertViewJsonSchemaValue | XpertViewJsonSchemaNode | XpertViewJsonSchemaNode[] | Record<string, XpertViewJsonSchemaNode> | XpertI18nObject | undefined;
|
|
33
|
+
}
|
|
34
|
+
export interface XpertViewJsonSchema extends XpertViewJsonSchemaNode {
|
|
35
|
+
type: "object";
|
|
36
|
+
properties: Record<string, XpertViewJsonSchemaNode>;
|
|
37
|
+
}
|
|
38
|
+
export interface XpertViewHostContext {
|
|
39
|
+
tenantId: string;
|
|
40
|
+
organizationId?: string | null;
|
|
41
|
+
workspaceId?: string | null;
|
|
42
|
+
userId: string;
|
|
43
|
+
hostType: XpertViewHostType;
|
|
44
|
+
hostId: string;
|
|
45
|
+
module?: string;
|
|
46
|
+
route?: string;
|
|
47
|
+
permissions?: string[];
|
|
48
|
+
locale?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface XpertViewHostCapabilities {
|
|
51
|
+
features?: string[];
|
|
52
|
+
}
|
|
53
|
+
export type XpertViewHostState = Record<string, unknown>;
|
|
54
|
+
export interface XpertResolvedViewHostContext extends XpertViewHostContext {
|
|
55
|
+
slots: XpertViewSlot[];
|
|
56
|
+
hostSnapshot?: unknown;
|
|
57
|
+
capabilities?: XpertViewHostCapabilities;
|
|
58
|
+
hostState?: XpertViewHostState;
|
|
59
|
+
}
|
|
60
|
+
export interface XpertViewSlot {
|
|
61
|
+
key: string;
|
|
62
|
+
title?: XpertI18nObject;
|
|
63
|
+
mode: XpertViewSlotMode;
|
|
64
|
+
order?: number;
|
|
65
|
+
manifestPolicy?: {
|
|
66
|
+
requireFeatureActivation?: boolean;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export interface XpertViewSource {
|
|
70
|
+
provider: string;
|
|
71
|
+
plugin?: string;
|
|
72
|
+
version?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface XpertViewBadge {
|
|
75
|
+
type: "count" | "status" | "text";
|
|
76
|
+
value?: string | number;
|
|
77
|
+
}
|
|
78
|
+
export interface XpertViewPolling {
|
|
79
|
+
enabled: boolean;
|
|
80
|
+
intervalMs?: number;
|
|
81
|
+
}
|
|
82
|
+
export interface XpertViewActivation {
|
|
83
|
+
requiredFeatures?: string[];
|
|
84
|
+
}
|
|
85
|
+
export interface XpertWorkbenchViewOptions {
|
|
86
|
+
fixed?: boolean;
|
|
87
|
+
menu?: {
|
|
88
|
+
enabled?: boolean;
|
|
89
|
+
label?: string | XpertI18nObject;
|
|
90
|
+
order?: number;
|
|
91
|
+
icon?: IconDefinition;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export interface XpertViewCachePolicy {
|
|
95
|
+
enabled?: boolean;
|
|
96
|
+
ttlMs?: number;
|
|
97
|
+
}
|
|
98
|
+
export interface XpertViewQuerySchema {
|
|
99
|
+
supportsPagination?: boolean;
|
|
100
|
+
supportsSearch?: boolean;
|
|
101
|
+
supportsSort?: boolean;
|
|
102
|
+
supportsFilter?: boolean;
|
|
103
|
+
supportsCursor?: boolean;
|
|
104
|
+
supportsSelection?: boolean;
|
|
105
|
+
supportsParameters?: boolean;
|
|
106
|
+
defaultPageSize?: number;
|
|
107
|
+
}
|
|
108
|
+
export interface XpertViewDataSource {
|
|
109
|
+
mode: "platform";
|
|
110
|
+
querySchema?: XpertViewQuerySchema;
|
|
111
|
+
cache?: XpertViewCachePolicy;
|
|
112
|
+
polling?: XpertViewPolling;
|
|
113
|
+
}
|
|
114
|
+
export interface XpertViewFilter {
|
|
115
|
+
key: string;
|
|
116
|
+
operator?: XpertViewFilterOperator;
|
|
117
|
+
value: XpertViewScalar | XpertViewScalar[];
|
|
118
|
+
}
|
|
119
|
+
export interface XpertViewQuery {
|
|
120
|
+
page?: number;
|
|
121
|
+
pageSize?: number;
|
|
122
|
+
cursor?: string;
|
|
123
|
+
search?: string;
|
|
124
|
+
sortBy?: string;
|
|
125
|
+
sortDirection?: XpertViewSortDirection;
|
|
126
|
+
filters?: XpertViewFilter[];
|
|
127
|
+
selectionId?: string;
|
|
128
|
+
parameters?: Record<string, XpertViewScalar | XpertViewScalar[]>;
|
|
129
|
+
}
|
|
130
|
+
export interface XpertStatsViewSchema {
|
|
131
|
+
type: "stats";
|
|
132
|
+
items: Array<{
|
|
133
|
+
key: string;
|
|
134
|
+
label: XpertI18nObject;
|
|
135
|
+
valueType?: XpertViewValueType;
|
|
136
|
+
}>;
|
|
137
|
+
}
|
|
138
|
+
export interface XpertTableViewSchema {
|
|
139
|
+
type: "table";
|
|
140
|
+
columns: Array<{
|
|
141
|
+
key: string;
|
|
142
|
+
label: XpertI18nObject;
|
|
143
|
+
dataType?: XpertViewColumnDataType;
|
|
144
|
+
width?: string;
|
|
145
|
+
sortable?: boolean;
|
|
146
|
+
searchable?: boolean;
|
|
147
|
+
}>;
|
|
148
|
+
pagination?: {
|
|
149
|
+
enabled: boolean;
|
|
150
|
+
pageSize?: number;
|
|
151
|
+
};
|
|
152
|
+
search?: {
|
|
153
|
+
enabled: boolean;
|
|
154
|
+
placeholder?: XpertI18nObject;
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
export interface XpertListViewSchema {
|
|
158
|
+
type: "list";
|
|
159
|
+
item: {
|
|
160
|
+
titleKey: string;
|
|
161
|
+
subtitleKey?: string;
|
|
162
|
+
descriptionKey?: string;
|
|
163
|
+
metaKeys?: string[];
|
|
164
|
+
};
|
|
165
|
+
pagination?: {
|
|
166
|
+
enabled: boolean;
|
|
167
|
+
pageSize?: number;
|
|
168
|
+
};
|
|
169
|
+
search?: {
|
|
170
|
+
enabled: boolean;
|
|
171
|
+
placeholder?: XpertI18nObject;
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
export interface XpertDetailViewSchema {
|
|
175
|
+
type: "detail";
|
|
176
|
+
fields: Array<{
|
|
177
|
+
key: string;
|
|
178
|
+
label: XpertI18nObject;
|
|
179
|
+
dataType?: XpertViewValueType;
|
|
180
|
+
}>;
|
|
181
|
+
}
|
|
182
|
+
export interface XpertRawJsonViewSchema {
|
|
183
|
+
type: "raw_json";
|
|
184
|
+
}
|
|
185
|
+
export interface XpertRemoteComponentViewSchema {
|
|
186
|
+
type: "remote_component";
|
|
187
|
+
runtime: XpertRemoteComponentRuntime;
|
|
188
|
+
protocolVersion: 1;
|
|
189
|
+
component: {
|
|
190
|
+
isolation: "iframe" | "module_federation";
|
|
191
|
+
entry: string;
|
|
192
|
+
module?: string;
|
|
193
|
+
exportName?: string;
|
|
194
|
+
integrity?: string;
|
|
195
|
+
propsSchema?: XpertViewJsonSchema;
|
|
196
|
+
};
|
|
197
|
+
dataSource: {
|
|
198
|
+
mode: "platform";
|
|
199
|
+
};
|
|
200
|
+
actions?: XpertViewActionDefinition[];
|
|
201
|
+
}
|
|
202
|
+
export interface XpertRemoteComponentEntry {
|
|
203
|
+
html: string;
|
|
204
|
+
contentType?: "text/html; charset=utf-8";
|
|
205
|
+
}
|
|
206
|
+
export type XpertViewSchema = XpertStatsViewSchema | XpertTableViewSchema | XpertListViewSchema | XpertDetailViewSchema | XpertRawJsonViewSchema | XpertRemoteComponentViewSchema;
|
|
207
|
+
export interface XpertViewParameterDefinition {
|
|
208
|
+
key: string;
|
|
209
|
+
label: XpertI18nObject;
|
|
210
|
+
description?: XpertI18nObject;
|
|
211
|
+
required?: boolean;
|
|
212
|
+
type?: "string" | "number" | "boolean";
|
|
213
|
+
optionSource?: {
|
|
214
|
+
mode: "provider";
|
|
215
|
+
searchable?: boolean;
|
|
216
|
+
preload?: boolean;
|
|
217
|
+
dependsOn?: string[];
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
export interface XpertViewParameterOption {
|
|
221
|
+
value: XpertViewScalar;
|
|
222
|
+
label: string;
|
|
223
|
+
description?: string | null;
|
|
224
|
+
disabled?: boolean;
|
|
225
|
+
}
|
|
226
|
+
export interface XpertViewParameterOptionsQuery {
|
|
227
|
+
search?: string;
|
|
228
|
+
parameters?: Record<string, XpertViewScalar | XpertViewScalar[]>;
|
|
229
|
+
}
|
|
230
|
+
export interface XpertViewParameterOptionsResult {
|
|
231
|
+
items: XpertViewParameterOption[];
|
|
232
|
+
}
|
|
233
|
+
export interface XpertViewActionDefinition {
|
|
234
|
+
key: string;
|
|
235
|
+
label: XpertI18nObject;
|
|
236
|
+
icon?: string;
|
|
237
|
+
placement?: XpertViewActionPlacement;
|
|
238
|
+
actionType: XpertViewActionType;
|
|
239
|
+
transport?: XpertViewActionTransport;
|
|
240
|
+
inputSchema?: XpertViewJsonSchema;
|
|
241
|
+
inputDefaults?: "target" | Record<string, unknown>;
|
|
242
|
+
confirm?: {
|
|
243
|
+
title?: XpertI18nObject;
|
|
244
|
+
message?: XpertI18nObject;
|
|
245
|
+
};
|
|
246
|
+
permissions?: string[];
|
|
247
|
+
}
|
|
248
|
+
export interface XpertViewClientCommandDefinition {
|
|
249
|
+
key: string;
|
|
250
|
+
label?: XpertI18nObject;
|
|
251
|
+
description?: XpertI18nObject;
|
|
252
|
+
permissions?: string[];
|
|
253
|
+
}
|
|
254
|
+
export interface XpertViewFileAccessDefinition {
|
|
255
|
+
purposes: XpertViewFileAccessPurpose[];
|
|
256
|
+
}
|
|
257
|
+
export interface XpertViewFileAccessRequest {
|
|
258
|
+
fileKey: string;
|
|
259
|
+
targetId?: string;
|
|
260
|
+
purpose: XpertViewFileAccessPurpose;
|
|
261
|
+
}
|
|
262
|
+
export interface XpertViewFileAccessSessionResult {
|
|
263
|
+
sessionId: string;
|
|
264
|
+
expiresAt: string;
|
|
265
|
+
}
|
|
266
|
+
export interface XpertViewFileAccessGrantResult {
|
|
267
|
+
url: string;
|
|
268
|
+
expiresAt: string;
|
|
269
|
+
fileName: string;
|
|
270
|
+
mimeType: string;
|
|
271
|
+
size?: number;
|
|
272
|
+
}
|
|
273
|
+
export declare const ASSISTANT_CHAT_SEND_MESSAGE_COMMAND = "assistant.chat.send_message";
|
|
274
|
+
export declare const ASSISTANT_CONTEXT_SET_COMMAND = "assistant.context.set";
|
|
275
|
+
export declare const WORKBENCH_FILE_OPEN_COMMAND = "workbench.file.open";
|
|
276
|
+
export declare const WORKBENCH_NAVIGATION_OPEN_COMMAND = "workbench.navigation.open";
|
|
277
|
+
export declare const WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET = "knowledgebase.documents";
|
|
278
|
+
export declare const WORKBENCH_ASSISTANT_CONVERSATION_TARGET = "assistant.conversation";
|
|
279
|
+
export declare const XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE = "invokeClientCommand";
|
|
280
|
+
export interface WorkbenchOpenFileEvidenceBox {
|
|
281
|
+
x: number;
|
|
282
|
+
y: number;
|
|
283
|
+
width: number;
|
|
284
|
+
height: number;
|
|
285
|
+
}
|
|
286
|
+
export interface WorkbenchOpenFileEvidence {
|
|
287
|
+
observationId?: string;
|
|
288
|
+
attributeCode?: string;
|
|
289
|
+
displayValue?: string;
|
|
290
|
+
text?: string;
|
|
291
|
+
method?: string;
|
|
292
|
+
region?: string;
|
|
293
|
+
confidence?: number;
|
|
294
|
+
locator?: {
|
|
295
|
+
sourceType?: string;
|
|
296
|
+
page?: number;
|
|
297
|
+
coordinateSpace?: string;
|
|
298
|
+
recognitionRotation?: number;
|
|
299
|
+
orientationConfidence?: number;
|
|
300
|
+
box?: WorkbenchOpenFileEvidenceBox;
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
export interface WorkbenchOpenFile {
|
|
304
|
+
id?: string;
|
|
305
|
+
fileId?: string;
|
|
306
|
+
fileAssetId?: string;
|
|
307
|
+
storageFileId?: string;
|
|
308
|
+
name: string;
|
|
309
|
+
mimeType?: string;
|
|
310
|
+
size?: number;
|
|
311
|
+
url: string;
|
|
312
|
+
previewUrl?: string;
|
|
313
|
+
evidence?: WorkbenchOpenFileEvidence;
|
|
314
|
+
}
|
|
315
|
+
export type WorkbenchNavigationOpenTarget = typeof WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET | typeof WORKBENCH_ASSISTANT_CONVERSATION_TARGET;
|
|
316
|
+
export interface WorkbenchNavigationOpenPayload {
|
|
317
|
+
target: WorkbenchNavigationOpenTarget;
|
|
318
|
+
knowledgebaseId?: string;
|
|
319
|
+
conversationId?: string;
|
|
320
|
+
threadId?: string;
|
|
321
|
+
executionId?: string;
|
|
322
|
+
}
|
|
323
|
+
export interface WorkbenchAssistantConversationOpenRequest {
|
|
324
|
+
conversationId: string;
|
|
325
|
+
threadId?: string;
|
|
326
|
+
executionId?: string;
|
|
327
|
+
}
|
|
328
|
+
export interface XpertRemoteComponentInvokeClientCommandRequest {
|
|
329
|
+
type: typeof XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE;
|
|
330
|
+
requestId: string;
|
|
331
|
+
commandKey: string;
|
|
332
|
+
payload?: unknown;
|
|
333
|
+
}
|
|
334
|
+
export declare const ASSISTANT_CITATION_OPEN_EVENT = "assistant.citation.open";
|
|
335
|
+
export declare const KNOWLEDGEBASE_OPEN_CITATION_EFFECT = "knowledgebase.open_citation";
|
|
336
|
+
export type XpertViewHostEventSubscriptionActionType = "refresh" | "forward" | "refresh-and-forward";
|
|
337
|
+
export interface XpertViewHostEventSubscription {
|
|
338
|
+
key: string;
|
|
339
|
+
event: string;
|
|
340
|
+
filter?: {
|
|
341
|
+
sources?: string[];
|
|
342
|
+
toolNames?: string[];
|
|
343
|
+
viewKeys?: string[];
|
|
344
|
+
visualizationTypes?: string[];
|
|
345
|
+
};
|
|
346
|
+
action?: {
|
|
347
|
+
type?: XpertViewHostEventSubscriptionActionType;
|
|
348
|
+
debounceMs?: number;
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
export interface XpertViewHostEvents {
|
|
352
|
+
subscriptions?: XpertViewHostEventSubscription[];
|
|
353
|
+
}
|
|
354
|
+
export interface XpertViewHostEventVisualization {
|
|
355
|
+
type?: string;
|
|
356
|
+
viewKey?: string;
|
|
357
|
+
title?: string;
|
|
358
|
+
slotKey?: string;
|
|
359
|
+
parameterKey?: string;
|
|
360
|
+
}
|
|
361
|
+
export interface XpertRemoteViewHostEventMessage {
|
|
362
|
+
id: string;
|
|
363
|
+
type: string;
|
|
364
|
+
source: string;
|
|
365
|
+
receivedAt: string;
|
|
366
|
+
threadId?: string;
|
|
367
|
+
toolName?: string;
|
|
368
|
+
toolCallId?: string;
|
|
369
|
+
runId?: string;
|
|
370
|
+
durationMs?: number;
|
|
371
|
+
data?: Record<string, unknown>;
|
|
372
|
+
visualization?: XpertViewHostEventVisualization;
|
|
373
|
+
}
|
|
374
|
+
export interface XpertViewHostEventMessage extends XpertRemoteViewHostEventMessage {
|
|
375
|
+
hostType?: string;
|
|
376
|
+
hostId?: string;
|
|
377
|
+
}
|
|
378
|
+
export interface XpertExtensionViewManifest {
|
|
379
|
+
key: string;
|
|
380
|
+
title: XpertI18nObject;
|
|
381
|
+
description?: XpertI18nObject;
|
|
382
|
+
icon?: IconDefinition;
|
|
383
|
+
hostType: XpertViewHostType;
|
|
384
|
+
slot: string;
|
|
385
|
+
order?: number;
|
|
386
|
+
visible?: boolean;
|
|
387
|
+
source: XpertViewSource;
|
|
388
|
+
permissions?: string[];
|
|
389
|
+
badge?: XpertViewBadge;
|
|
390
|
+
refreshable?: boolean;
|
|
391
|
+
polling?: XpertViewPolling;
|
|
392
|
+
activation?: XpertViewActivation;
|
|
393
|
+
workbench?: XpertWorkbenchViewOptions;
|
|
394
|
+
view: XpertViewSchema;
|
|
395
|
+
dataSource: XpertViewDataSource;
|
|
396
|
+
parameters?: XpertViewParameterDefinition[];
|
|
397
|
+
actions?: XpertViewActionDefinition[];
|
|
398
|
+
clientCommands?: XpertViewClientCommandDefinition[];
|
|
399
|
+
fileAccess?: XpertViewFileAccessDefinition;
|
|
400
|
+
hostEvents?: XpertViewHostEvents;
|
|
401
|
+
}
|
|
402
|
+
export interface XpertViewActionRequest {
|
|
403
|
+
targetId?: string;
|
|
404
|
+
input?: Record<string, unknown> | null;
|
|
405
|
+
parameters?: Record<string, XpertViewScalar | XpertViewScalar[]>;
|
|
406
|
+
}
|
|
407
|
+
export interface XpertViewDataResult<TItem = unknown, TSummary = unknown> {
|
|
408
|
+
items?: TItem[];
|
|
409
|
+
item?: TItem;
|
|
410
|
+
total?: number;
|
|
411
|
+
nextCursor?: string;
|
|
412
|
+
summary?: TSummary;
|
|
413
|
+
meta?: unknown;
|
|
414
|
+
}
|
|
415
|
+
export interface XpertViewActionResult<TData = unknown> {
|
|
416
|
+
success: boolean;
|
|
417
|
+
message?: XpertI18nObject;
|
|
418
|
+
data?: TData;
|
|
419
|
+
refresh?: boolean;
|
|
420
|
+
}
|
|
421
|
+
export type XpertViewFile = File | Blob | ArrayBuffer | ArrayBufferView;
|
|
422
|
+
export interface XpertViewFileActionRequest extends XpertViewActionRequest {
|
|
423
|
+
file: XpertViewFile;
|
|
424
|
+
fileName?: string;
|
|
425
|
+
}
|
|
426
|
+
export interface XpertViewRequestOptions {
|
|
427
|
+
signal?: AbortSignal;
|
|
428
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const ASSISTANT_CHAT_SEND_MESSAGE_COMMAND = "assistant.chat.send_message";
|
|
2
|
+
export const ASSISTANT_CONTEXT_SET_COMMAND = "assistant.context.set";
|
|
3
|
+
export const WORKBENCH_FILE_OPEN_COMMAND = "workbench.file.open";
|
|
4
|
+
export const WORKBENCH_NAVIGATION_OPEN_COMMAND = "workbench.navigation.open";
|
|
5
|
+
export const WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET = "knowledgebase.documents";
|
|
6
|
+
export const WORKBENCH_ASSISTANT_CONVERSATION_TARGET = "assistant.conversation";
|
|
7
|
+
export const XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE = "invokeClientCommand";
|
|
8
|
+
export const ASSISTANT_CITATION_OPEN_EVENT = "assistant.citation.open";
|
|
9
|
+
export const KNOWLEDGEBASE_OPEN_CITATION_EFFECT = "knowledgebase.open_citation";
|
|
10
|
+
//# sourceMappingURL=view-extension.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-extension.js","sourceRoot":"","sources":["../src/view-extension.ts"],"names":[],"mappings":"AA+WA,MAAM,CAAC,MAAM,mCAAmC,GAC9C,6BAA6B,CAAC;AAChC,MAAM,CAAC,MAAM,6BAA6B,GAAG,uBAAuB,CAAC;AACrE,MAAM,CAAC,MAAM,2BAA2B,GAAG,qBAAqB,CAAC;AACjE,MAAM,CAAC,MAAM,iCAAiC,GAAG,2BAA2B,CAAC;AAC7E,MAAM,CAAC,MAAM,wCAAwC,GACnD,yBAAyB,CAAC;AAC5B,MAAM,CAAC,MAAM,uCAAuC,GAAG,wBAAwB,CAAC;AAChF,MAAM,CAAC,MAAM,yDAAyD,GACpE,qBAAqB,CAAC;AAiExB,MAAM,CAAC,MAAM,6BAA6B,GAAG,yBAAyB,CAAC;AACvE,MAAM,CAAC,MAAM,kCAAkC,GAAG,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const ASSISTANT_CHAT_SEND_MESSAGE_COMMAND = "assistant.chat.send_message";
|
|
2
|
+
export const ASSISTANT_CONTEXT_SET_COMMAND = "assistant.context.set";
|
|
3
|
+
export const WORKBENCH_FILE_OPEN_COMMAND = "workbench.file.open";
|
|
4
|
+
export const WORKBENCH_NAVIGATION_OPEN_COMMAND = "workbench.navigation.open";
|
|
5
|
+
export const WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET = "knowledgebase.documents";
|
|
6
|
+
export const WORKBENCH_ASSISTANT_CONVERSATION_TARGET = "assistant.conversation";
|
|
7
|
+
export const XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE = "invokeClientCommand";
|
|
8
|
+
export const ASSISTANT_CITATION_OPEN_EVENT = "assistant.citation.open";
|
|
9
|
+
export const KNOWLEDGEBASE_OPEN_CITATION_EFFECT = "knowledgebase.open_citation";
|
|
10
|
+
//# sourceMappingURL=view-extension.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-extension.mjs","sourceRoot":"","sources":["../src/view-extension.ts"],"names":[],"mappings":"AA+WA,MAAM,CAAC,MAAM,mCAAmC,GAC9C,6BAA6B,CAAC;AAChC,MAAM,CAAC,MAAM,6BAA6B,GAAG,uBAAuB,CAAC;AACrE,MAAM,CAAC,MAAM,2BAA2B,GAAG,qBAAqB,CAAC;AACjE,MAAM,CAAC,MAAM,iCAAiC,GAAG,2BAA2B,CAAC;AAC7E,MAAM,CAAC,MAAM,wCAAwC,GACnD,yBAAyB,CAAC;AAC5B,MAAM,CAAC,MAAM,uCAAuC,GAAG,wBAAwB,CAAC;AAChF,MAAM,CAAC,MAAM,yDAAyD,GACpE,qBAAqB,CAAC;AAiExB,MAAM,CAAC,MAAM,6BAA6B,GAAG,yBAAyB,CAAC;AACvE,MAAM,CAAC,MAAM,kCAAkC,GAAG,6BAA6B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xpert-ai/xpert-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"description": "SDK Core functionality package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
|
-
"module": "dist/index.
|
|
7
|
+
"module": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.js"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"files": [
|