@xpert-ai/contracts 3.17.6 → 3.18.0

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.
@@ -10,6 +10,9 @@ export type XpertViewActionPlacement = 'toolbar' | 'row';
10
10
  export type XpertViewActionType = 'invoke' | 'navigate' | 'open_detail' | 'refresh';
11
11
  export type XpertViewActionTransport = 'json' | 'file';
12
12
  export type XpertViewFileAccessPurpose = 'preview' | 'download';
13
+ export type XpertViewHostAccessLevel = 'read' | 'edit' | 'manage';
14
+ export declare const XPERT_VIEW_PROJECT_ID_HEADER = "x-xpert-view-project-id";
15
+ export declare const XPERT_VIEW_CONVERSATION_ID_HEADER = "x-xpert-view-conversation-id";
13
16
  export type XpertViewSortDirection = 'asc' | 'desc';
14
17
  export type XpertViewFilterOperator = 'eq' | 'neq' | 'contains' | 'starts_with' | 'ends_with' | 'in' | 'gt' | 'gte' | 'lt' | 'lte';
15
18
  export type XpertViewScalar = string | number | boolean | null;
@@ -24,9 +27,77 @@ export interface XpertViewHostContext {
24
27
  route?: string;
25
28
  permissions?: string[];
26
29
  locale?: string;
30
+ runtimeScope?: XpertViewRuntimeScope;
27
31
  }
28
32
  export interface XpertViewHostCapabilities {
29
33
  features?: string[];
34
+ featureProviders?: Record<string, XpertViewFeatureProvider[]>;
35
+ }
36
+ export interface XpertViewRuntimeScopeInput {
37
+ projectId?: string | null;
38
+ conversationId?: string | null;
39
+ }
40
+ export interface XpertViewFeatureProvider {
41
+ xpertId: string;
42
+ name: string;
43
+ }
44
+ export interface XpertViewProjectAccess {
45
+ role: 'owner' | 'manager' | 'editor' | 'member';
46
+ canRead: boolean;
47
+ canEdit: boolean;
48
+ canManage: boolean;
49
+ canUse: boolean;
50
+ }
51
+ export interface XpertViewWorkspaceFilesScope {
52
+ catalog: 'projects' | 'xperts' | 'user-xperts';
53
+ scopeId: string;
54
+ projectId?: string | null;
55
+ xpertId?: string | null;
56
+ userId?: string | null;
57
+ isolateByUser?: boolean;
58
+ }
59
+ export interface XpertViewRuntimeScope {
60
+ projectId: string | null;
61
+ conversationId: string | null;
62
+ dataScopeKey: string;
63
+ project?: {
64
+ id: string;
65
+ name: string;
66
+ status?: string | null;
67
+ } | null;
68
+ projectAccess?: XpertViewProjectAccess | null;
69
+ workspaceFiles: XpertViewWorkspaceFilesScope;
70
+ }
71
+ export interface XpertViewRuntimeScopeInput {
72
+ projectId?: string | null;
73
+ conversationId?: string | null;
74
+ }
75
+ export interface XpertViewProjectAccess {
76
+ role: 'owner' | 'manager' | 'editor' | 'member';
77
+ canRead: boolean;
78
+ canEdit: boolean;
79
+ canManage: boolean;
80
+ canUse: boolean;
81
+ }
82
+ export interface XpertViewWorkspaceFilesScope {
83
+ catalog: 'projects' | 'xperts' | 'user-xperts';
84
+ scopeId: string;
85
+ projectId?: string | null;
86
+ xpertId?: string | null;
87
+ userId?: string | null;
88
+ isolateByUser?: boolean;
89
+ }
90
+ export interface XpertViewRuntimeScope {
91
+ projectId: string | null;
92
+ conversationId: string | null;
93
+ dataScopeKey: string;
94
+ project?: {
95
+ id: string;
96
+ name: string;
97
+ status?: string | null;
98
+ } | null;
99
+ projectAccess?: XpertViewProjectAccess | null;
100
+ workspaceFiles: XpertViewWorkspaceFilesScope;
30
101
  }
31
102
  export type XpertViewHostState = Record<string, unknown>;
32
103
  export interface XpertResolvedViewHostContext extends XpertViewHostContext {
@@ -222,6 +293,7 @@ export interface XpertViewActionDefinition {
222
293
  message?: I18nObject;
223
294
  };
224
295
  permissions?: string[];
296
+ requiredHostAccess?: XpertViewHostAccessLevel;
225
297
  }
226
298
  export interface XpertViewClientCommandDefinition {
227
299
  key: string;
@@ -311,6 +383,8 @@ export interface WorkbenchNavigationOpenPayload {
311
383
  conversationId?: string;
312
384
  threadId?: string;
313
385
  executionId?: string;
386
+ /** Untrusted Assistant hint; the host resolves the canonical owner from `conversationId`. */
387
+ xpertId?: string;
314
388
  /** Platform Chat Project selected for Project-scoped Assistant navigation. */
315
389
  projectId?: string;
316
390
  viewKey?: string;
@@ -321,6 +395,18 @@ export interface WorkbenchAssistantConversationOpenRequest {
321
395
  conversationId: string;
322
396
  threadId?: string;
323
397
  executionId?: string;
398
+ /** Untrusted hint; the host must resolve the canonical Assistant from `conversationId`. */
399
+ xpertId?: string;
400
+ /** Untrusted hint; the host must resolve the canonical Project from `conversationId`. */
401
+ projectId?: string;
402
+ }
403
+ /** Server-authorized runtime scope used to rebuild ChatKit for one persisted Assistant conversation. */
404
+ export interface WorkbenchAssistantConversationResolution {
405
+ conversationId: string;
406
+ threadId: string;
407
+ xpertId: string;
408
+ projectId: string | null;
409
+ isExternalAssistant: boolean;
324
410
  }
325
411
  export interface WorkbenchAssistantProjectOpenRequest {
326
412
  /** Trusted platform Chat Project id; this is distinct from plugin business ids. */
@@ -424,6 +510,7 @@ export interface XpertRemoteViewHostEventMessage {
424
510
  export interface XpertViewHostEventMessage extends XpertRemoteViewHostEventMessage {
425
511
  hostType?: string;
426
512
  hostId?: string;
513
+ dataScopeKey?: string;
427
514
  }
428
515
  export interface XpertExtensionViewManifest {
429
516
  key: string;
@@ -440,6 +527,9 @@ export interface XpertExtensionViewManifest {
440
527
  refreshable?: boolean;
441
528
  polling?: XpertViewPolling;
442
529
  activation?: XpertViewActivation;
530
+ runtime?: {
531
+ featureProviders?: XpertViewFeatureProvider[];
532
+ };
443
533
  workbench?: XpertWorkbenchViewOptions;
444
534
  view: XpertViewSchema;
445
535
  dataSource: XpertViewDataSource;