@xpert-ai/contracts 3.17.3 → 3.17.5
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/index.cjs.js +203 -2
- package/index.esm.js +184 -3
- package/package.json +2 -2
- package/src/ai/ai-model.model.d.ts +1 -0
- package/src/ai/feature.model.d.ts +1 -0
- package/src/ai/index.d.ts +4 -0
- package/src/ai/mcp-audit.model.d.ts +23 -0
- package/src/ai/mcp-auth.model.d.ts +46 -0
- package/src/ai/mcp-capability.model.d.ts +102 -0
- package/src/ai/mcp-publication.model.d.ts +101 -0
- package/src/ai/membership.model.d.ts +1 -0
- package/src/ai/role-permissions.d.ts +4 -0
- package/src/ai/xpert-project.model.d.ts +210 -1
- package/src/ai/xpert-tool-mcp.model.d.ts +79 -0
- package/src/ai/xpert-tool.model.d.ts +1 -1
- package/src/ai/xpert-toolset.model.d.ts +5 -0
- package/src/ai/xpert.model.d.ts +7 -0
- package/src/ai/xpert.utils.d.ts +2 -0
- package/src/business-area.model.d.ts +23 -0
- package/src/index.d.ts +1 -0
- package/src/plugin.d.ts +18 -5
- package/src/role-permission.model.d.ts +3 -0
- package/src/runtime-control.d.ts +37 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
|
|
2
|
+
/**
|
|
3
|
+
* Canonical business-area master data owned by xpert-pro.
|
|
4
|
+
* Consumers may attach their own usage records by `id`, but must not duplicate
|
|
5
|
+
* this entity as another source of truth.
|
|
6
|
+
*/
|
|
7
|
+
export interface IBusinessArea extends IBasePerTenantAndOrganizationEntityModel {
|
|
8
|
+
type?: BusinessType;
|
|
9
|
+
name?: string;
|
|
10
|
+
parentId?: string | null;
|
|
11
|
+
level?: number;
|
|
12
|
+
children?: IBusinessArea[];
|
|
13
|
+
}
|
|
14
|
+
export declare enum BusinessType {
|
|
15
|
+
SEMANTIC_MODEL = "SEMANTIC_MODEL",
|
|
16
|
+
STORY = "STORY",
|
|
17
|
+
INDICATOR = "INDICATOR"
|
|
18
|
+
}
|
|
19
|
+
export interface CreateBusinessAreaInput {
|
|
20
|
+
name: string;
|
|
21
|
+
parentId?: string | null;
|
|
22
|
+
}
|
|
23
|
+
export type UpdateBusinessAreaInput = Partial<CreateBusinessAreaInput>;
|
package/src/index.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export * from './ai/index';
|
|
|
52
52
|
export * from './agent/index';
|
|
53
53
|
export * from './api-key.model';
|
|
54
54
|
export * from './artifact.model';
|
|
55
|
+
export * from './business-area.model';
|
|
55
56
|
export * from './collaboration.model';
|
|
56
57
|
export * from './schedule';
|
|
57
58
|
export * from './tools/index';
|
package/src/plugin.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { JsonSchemaObjectType } from './ai/types';
|
|
|
3
3
|
import type { IXpert } from './ai/xpert.model';
|
|
4
4
|
import type { TMcpStdioRuntimePolicy } from './ai/xpert-tool-mcp.model';
|
|
5
5
|
import type { JSONValue } from './core.model';
|
|
6
|
+
import type { IPluginRuntimeConvergence, IRuntimePluginRequirement } from './runtime-control';
|
|
6
7
|
import { IconDefinition, I18nObject } from './types';
|
|
7
8
|
export type PluginName = string;
|
|
8
9
|
export declare const PLUGIN_LEVEL: {
|
|
@@ -30,6 +31,7 @@ export declare const PLUGIN_LOAD_STATUS: {
|
|
|
30
31
|
export declare const PLUGIN_COMPONENT_TYPE: {
|
|
31
32
|
readonly SKILL: "skill";
|
|
32
33
|
readonly MCP_SERVER: "mcp_server";
|
|
34
|
+
readonly TOOLSET: "toolset";
|
|
33
35
|
readonly APP: "app";
|
|
34
36
|
readonly HOOK: "hook";
|
|
35
37
|
readonly ASSET: "asset";
|
|
@@ -84,7 +86,7 @@ export type PluginResourceErrorCode = (typeof PLUGIN_RESOURCE_ERROR_CODE)[keyof
|
|
|
84
86
|
export type PluginScopeRelation = 'none' | 'overrides-global' | 'shadowed-by-organization';
|
|
85
87
|
export type PluginTargetApp = 'xpert' | 'data-xpert' | (string & {});
|
|
86
88
|
export type PluginSdkCompatibilityWarningCode = 'plugin-sdk-peer-dependency-missing' | 'plugin-sdk-peer-range-invalid' | 'plugin-sdk-peer-range-incompatible' | 'plugin-sdk-peer-range-spans-major';
|
|
87
|
-
export type PluginMarketplaceContributionType = 'app' | 'view' | 'feature' | 'skill' | 'tool' | 'hook' | 'assistant-template' | (string & {});
|
|
89
|
+
export type PluginMarketplaceContributionType = 'app' | 'view' | 'feature' | 'skill' | 'tool' | 'mcp' | 'hook' | 'assistant-template' | (string & {});
|
|
88
90
|
export type PluginMarketplaceOperationAccess = 'read' | 'write' | 'admin' | (string & {});
|
|
89
91
|
export interface PluginMarketplaceOperation {
|
|
90
92
|
name: string;
|
|
@@ -174,6 +176,8 @@ export interface XpertPluginBundleManifest {
|
|
|
174
176
|
keywords?: string[];
|
|
175
177
|
skills?: string | string[];
|
|
176
178
|
mcpServers?: string | string[] | JSONValue;
|
|
179
|
+
/** Host-native toolset providers contributed by the loaded plugin. */
|
|
180
|
+
toolsets?: string | string[] | JSONValue;
|
|
177
181
|
apps?: string | string[] | JSONValue;
|
|
178
182
|
connectors?: string | string[] | JSONValue;
|
|
179
183
|
hooks?: string | string[] | JSONValue | JSONValue[];
|
|
@@ -521,11 +525,15 @@ export interface IPluginInstallResult {
|
|
|
521
525
|
organizationId: string;
|
|
522
526
|
currentVersion?: string;
|
|
523
527
|
/**
|
|
524
|
-
* The plugin package was installed and persisted, but
|
|
525
|
-
* intentionally
|
|
526
|
-
*
|
|
528
|
+
* The plugin package was installed and persisted, but automatic runtime convergence is either
|
|
529
|
+
* intentionally deferred or unavailable. All API replicas must be gracefully replaced before
|
|
530
|
+
* this version is considered active.
|
|
527
531
|
*/
|
|
528
532
|
restartRequired?: boolean;
|
|
533
|
+
/** Automatic organization-level convergence that the client should wait for before refreshing runtime data. */
|
|
534
|
+
runtimeConvergence?: IPluginRuntimeConvergence;
|
|
535
|
+
/** Expected runtime state used when an explicit restart is required. */
|
|
536
|
+
runtimeRequirements?: IRuntimePluginRequirement[];
|
|
529
537
|
}
|
|
530
538
|
export interface IPluginUpdateResult extends IPluginInstallResult {
|
|
531
539
|
latestVersion?: string;
|
|
@@ -539,6 +547,7 @@ export interface IPluginUninstallResult {
|
|
|
539
547
|
* remain active until the API process is gracefully replaced.
|
|
540
548
|
*/
|
|
541
549
|
restartRequired?: boolean;
|
|
550
|
+
runtimeRequirements?: IRuntimePluginRequirement[];
|
|
542
551
|
}
|
|
543
552
|
export interface IPluginDescriptor {
|
|
544
553
|
scopeKey?: string;
|
|
@@ -584,6 +593,7 @@ export interface PluginComponentSummary {
|
|
|
584
593
|
total: number;
|
|
585
594
|
skills: number;
|
|
586
595
|
mcpServers: number;
|
|
596
|
+
toolsets: number;
|
|
587
597
|
apps: number;
|
|
588
598
|
hooks: number;
|
|
589
599
|
}
|
|
@@ -626,7 +636,7 @@ export interface IPluginResourceInstallation extends IBasePerTenantAndOrganizati
|
|
|
626
636
|
pluginName: PluginName;
|
|
627
637
|
componentType: PluginComponentType;
|
|
628
638
|
componentKey: string;
|
|
629
|
-
workspaceId
|
|
639
|
+
workspaceId?: string | null;
|
|
630
640
|
xpertId?: string | null;
|
|
631
641
|
agentKey?: string | null;
|
|
632
642
|
runtimeType: PluginResourceRuntimeType;
|
|
@@ -646,6 +656,9 @@ export interface PluginResourceInstallWorkspaceInput {
|
|
|
646
656
|
workspaceId: string;
|
|
647
657
|
components?: PluginResourceComponentSelector[];
|
|
648
658
|
}
|
|
659
|
+
export interface PluginResourceInstallOrganizationInput {
|
|
660
|
+
components?: PluginResourceComponentSelector[];
|
|
661
|
+
}
|
|
649
662
|
export interface PluginResourceInstallXpertInput {
|
|
650
663
|
xpertId: string;
|
|
651
664
|
components?: PluginResourceComponentSelector[];
|
|
@@ -49,6 +49,9 @@ export declare enum PermissionsEnum {
|
|
|
49
49
|
INTEGRATION_VIEW = "INTEGRATION_VIEW",
|
|
50
50
|
DATA_SOURCE_VIEW = "DATA_SOURCE_VIEW",
|
|
51
51
|
DATA_SOURCE_EDIT = "DATA_SOURCE_EDIT",
|
|
52
|
+
BUSINESS_AREA_VIEW = "BUSINESS_AREA_VIEW",
|
|
53
|
+
BUSINESS_AREA_MANAGE = "BUSINESS_AREA_MANAGE",
|
|
54
|
+
BUSINESS_AREA_ASSIGN = "BUSINESS_AREA_ASSIGN",
|
|
52
55
|
FILE_STORAGE_VIEW = "FILE_STORAGE_VIEW",
|
|
53
56
|
SMS_GATEWAY_VIEW = "SMS_GATEWAY_VIEW",
|
|
54
57
|
CUSTOM_SMTP_VIEW = "CUSTOM_SMTP_VIEW",
|
package/src/runtime-control.d.ts
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
export declare const RUNTIME_RESTART_CONFIRMATION: "RESTART";
|
|
2
|
-
export type RuntimeRestartMode = 'self-signal';
|
|
2
|
+
export type RuntimeRestartMode = 'self-signal' | 'rolling-self-signal';
|
|
3
|
+
export type RuntimeRestartStatus = 'in_progress' | 'completed' | 'failed';
|
|
4
|
+
export interface IRuntimePluginRequirement {
|
|
5
|
+
scopeKey: string;
|
|
6
|
+
pluginName: string;
|
|
7
|
+
version?: string;
|
|
8
|
+
/** Immutable staged artifact or source revision required on every API replica. */
|
|
9
|
+
runtimeRevision?: string;
|
|
10
|
+
state: 'loaded' | 'absent';
|
|
11
|
+
}
|
|
12
|
+
export interface IPluginRuntimeConvergence {
|
|
13
|
+
generation: number;
|
|
14
|
+
}
|
|
3
15
|
export type RuntimeRestartCapabilityReason = 'allowed' | 'interactive-auth-required' | 'super-admin-required' | 'default-tenant-required';
|
|
4
16
|
export interface IRuntimeRestartCapability {
|
|
5
17
|
allowed: boolean;
|
|
@@ -11,16 +23,40 @@ export interface IRuntimeRestartRequest {
|
|
|
11
23
|
confirmation: typeof RUNTIME_RESTART_CONFIRMATION;
|
|
12
24
|
/** Optional non-sensitive reason written to the structured server audit log. */
|
|
13
25
|
reason?: string;
|
|
26
|
+
/** Plugin runtime state that every replacement process must confirm after boot. */
|
|
27
|
+
runtimeRequirements?: IRuntimePluginRequirement[];
|
|
14
28
|
}
|
|
15
29
|
export interface IRuntimeRestartResponse {
|
|
16
30
|
accepted: true;
|
|
17
31
|
restartId: string;
|
|
32
|
+
/** Durable convergence generation when staged requirements were queued behind another rollout. */
|
|
33
|
+
pluginGeneration?: number;
|
|
18
34
|
mode: RuntimeRestartMode;
|
|
19
35
|
instanceId: string;
|
|
20
36
|
requestedAt: string;
|
|
21
37
|
signalAfterMs: number;
|
|
22
38
|
drainTimeoutMs: number;
|
|
23
39
|
}
|
|
40
|
+
export interface IRuntimeRestartStatus {
|
|
41
|
+
restartId: string;
|
|
42
|
+
mode: RuntimeRestartMode;
|
|
43
|
+
status: RuntimeRestartStatus;
|
|
44
|
+
requestedAt: string;
|
|
45
|
+
targetReplicaCount: number;
|
|
46
|
+
completedReplicaCount: number;
|
|
47
|
+
failedReplicaCount: number;
|
|
48
|
+
pluginGeneration: number;
|
|
49
|
+
error?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface IPluginRuntimeConvergenceStatus {
|
|
52
|
+
generation: number;
|
|
53
|
+
status: RuntimeRestartStatus;
|
|
54
|
+
restartId?: string;
|
|
55
|
+
targetReplicaCount: number;
|
|
56
|
+
completedReplicaCount: number;
|
|
57
|
+
failedReplicaCount: number;
|
|
58
|
+
error?: string;
|
|
59
|
+
}
|
|
24
60
|
export interface IRuntimeReadiness {
|
|
25
61
|
status: 'ready' | 'draining';
|
|
26
62
|
instanceId: string;
|