@xpert-ai/plugin-sdk 3.18.6 → 3.19.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.
- package/CHANGELOG.md +27 -0
- package/MIDDLEWARE_APPS.md +71 -0
- package/README.md +2 -0
- package/data-workbench.cjs.js +217 -66
- package/data-workbench.esm.js +217 -66
- package/index.cjs.js +162 -46
- package/index.esm.js +148 -47
- package/package.json +2 -2
- package/runtime-capabilities.md +35 -0
- package/src/index.d.ts +3 -0
- package/src/lib/agent/index.d.ts +1 -0
- package/src/lib/agent/middleware/capabilities/assistant-task.d.ts +55 -20
- package/src/lib/agent/middleware/types.d.ts +13 -3
- package/src/lib/agent/runtime/capability.d.ts +29 -0
- package/src/lib/agent/runtime/index.d.ts +3 -0
- package/src/lib/agent/runtime/strategy.d.ts +50 -0
- package/src/lib/agent/runtime/types.d.ts +132 -0
- package/src/lib/assistant-capability/index.d.ts +42 -0
- package/src/lib/connector/runtime-capability.d.ts +2 -0
- package/src/lib/connector/strategy.interface.d.ts +8 -0
- package/src/lib/core/context/request-context.d.ts +6 -0
- package/src/lib/data/datasource/workbench-pagination.d.ts +6 -0
- package/src/lib/data/datasource/workbench-sql-lexer.d.ts +11 -0
- package/src/lib/data/datasource/workbench-sql-syntax.d.ts +3 -0
- package/src/lib/evolution/runtime-capability.d.ts +2 -1
- package/src/lib/integration/strategy.interface.d.ts +22 -0
- package/src/lib/mcp/app.d.ts +10 -0
- package/src/lib/project-task/index.d.ts +59 -0
- package/src/lib/project-type/index.d.ts +64 -0
- package/src/lib/rag/analyzer/index.d.ts +3 -0
- package/src/lib/rag/analyzer/strategy.decorator.d.ts +2 -0
- package/src/lib/rag/analyzer/strategy.interface.d.ts +11 -0
- package/src/lib/rag/analyzer/strategy.registry.d.ts +8 -0
- package/src/lib/rag/index.d.ts +1 -0
- package/src/lib/runtime/capabilities/knowledge-graph.d.ts +59 -0
- package/src/lib/runtime/capabilities/knowledgebase-documents.d.ts +21 -0
- package/src/lib/runtime/capabilities/knowledgebase.d.ts +8 -3
- package/src/lib/runtime/capabilities/project-access.d.ts +2 -1
- package/src/lib/runtime/capabilities/project-provisioning.d.ts +3 -0
- package/src/lib/runtime/runtime-scope.d.ts +7 -1
- package/src/lib/sandbox/execution-environment.d.ts +10 -0
- package/src/lib/sandbox/execution.d.ts +3 -0
- package/src/lib/sandbox/index.d.ts +1 -0
- package/src/lib/sandbox/protocol.d.ts +2 -0
- package/src/lib/tool-provider/types.d.ts +6 -0
- package/src/lib/types.d.ts +2 -1
- package/src/lib/workflow/trigger/strategy.interface.d.ts +2 -1
|
@@ -129,14 +129,19 @@ export type KnowledgebaseProvisioningSpec = {
|
|
|
129
129
|
score?: number;
|
|
130
130
|
metadataSchema?: KnowledgebaseProvisioningMetadataField[];
|
|
131
131
|
incrementalSyncEnabled?: boolean;
|
|
132
|
+
/** Set the graph switch without replacing existing graph retrieval or extraction settings. */
|
|
133
|
+
graphRag?: {
|
|
134
|
+
enabled: boolean;
|
|
135
|
+
};
|
|
132
136
|
};
|
|
133
137
|
export type KnowledgebaseEnsureInput = {
|
|
134
138
|
workspaceId: string;
|
|
135
139
|
namespace: string;
|
|
136
140
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
141
|
+
* Fill missing embedding bindings from the current user's available Copilot provider catalog,
|
|
142
|
+
* falling back to the most recently updated ordinary knowledgebase in this workspace.
|
|
143
|
+
* Existing bindings are preserved. No provider credentials are exposed to plugins.
|
|
144
|
+
* Provisioning fails explicitly when a missing binding cannot be resolved.
|
|
140
145
|
*/
|
|
141
146
|
inheritEmbeddingModel?: boolean;
|
|
142
147
|
knowledgebases: KnowledgebaseProvisioningSpec[];
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { XpertProjectClassification } from '@xpert-ai/contracts';
|
|
1
2
|
/** Trusted server actor. View providers derive this from host context; jobs persist that actor. */
|
|
2
3
|
export interface ProjectAccessActor {
|
|
3
4
|
tenantId: string;
|
|
4
5
|
organizationId?: string | null;
|
|
5
6
|
userId: string;
|
|
6
7
|
}
|
|
7
|
-
export interface ProjectHumanAccess {
|
|
8
|
+
export interface ProjectHumanAccess extends XpertProjectClassification {
|
|
8
9
|
projectId: string;
|
|
9
10
|
role: 'owner' | 'manager' | 'editor' | 'member';
|
|
10
11
|
canManage: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { XpertProjectTypeRef } from '@xpert-ai/contracts';
|
|
1
2
|
/** Lifecycle states that plugin-managed Projects may synchronize to the platform. */
|
|
2
3
|
export type ProjectProvisioningStatus = 'active' | 'archived';
|
|
3
4
|
/** Portable identity of one required, direct External Assistant binding. */
|
|
@@ -8,6 +9,8 @@ export type ProjectExternalAssistantExpectation = {
|
|
|
8
9
|
};
|
|
9
10
|
/** Stable identity and desired state for an idempotently provisioned Chat Project. */
|
|
10
11
|
export type ProjectEnsureInput = {
|
|
12
|
+
/** Registered application type. Omission preserves legacy unclassified callers. */
|
|
13
|
+
projectType?: XpertProjectTypeRef;
|
|
11
14
|
/** Caller-generated id reused across retries to prevent duplicate Projects. */
|
|
12
15
|
projectId: string;
|
|
13
16
|
/** @deprecated Projects no longer belong to a Workspace. Accepted only for legacy callers. */
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Trusted host context for scoped service factories. Each capability validates its required fields;
|
|
3
|
+
* missing values do not grant broader access. Do not accept this scope from model input.
|
|
4
|
+
*/
|
|
2
5
|
export type RuntimeIdentityScope = {
|
|
3
6
|
tenantId?: string | null;
|
|
4
7
|
organizationId?: string | null;
|
|
@@ -8,7 +11,10 @@ export type RuntimeIdentityScope = {
|
|
|
8
11
|
xpertId?: string | null;
|
|
9
12
|
xpertName?: string | null;
|
|
10
13
|
conversationId?: string | null;
|
|
14
|
+
/** Platform checkpoint thread, distinct from a provider session ID. */
|
|
11
15
|
threadId?: string | null;
|
|
16
|
+
/** Agent entry key within the calling Assistant. */
|
|
12
17
|
agentKey?: string | null;
|
|
18
|
+
/** Current platform execution; trusted adapters may supply it lazily. */
|
|
13
19
|
executionId?: string | null;
|
|
14
20
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Host-declared execution guarantees. Omitted fields mean unknown, not denied. */
|
|
2
|
+
export interface SandboxExecutionEnvironment {
|
|
3
|
+
readonly os?: 'linux' | 'darwin' | 'windows';
|
|
4
|
+
readonly homeDirectory?: string;
|
|
5
|
+
readonly shell?: string;
|
|
6
|
+
readonly shellState?: 'per-command' | 'persistent';
|
|
7
|
+
readonly persistentDirectories?: readonly string[];
|
|
8
|
+
readonly canInstallSystemPackages?: boolean;
|
|
9
|
+
readonly desktop?: boolean;
|
|
10
|
+
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export interface SandboxExecutionOptions {
|
|
2
2
|
timeoutMs?: number;
|
|
3
3
|
maxOutputBytes?: number;
|
|
4
|
+
/** Request cancellation; the backend must implement guest process termination. */
|
|
5
|
+
signal?: AbortSignal;
|
|
4
6
|
}
|
|
5
7
|
export interface ResolvedSandboxExecutionOptions {
|
|
6
8
|
timeoutMs: number;
|
|
7
9
|
maxOutputBytes: number;
|
|
10
|
+
signal?: AbortSignal;
|
|
8
11
|
}
|
|
9
12
|
export declare const SANDBOX_SHELL_TIMEOUT_LIMITS_SEC: {
|
|
10
13
|
readonly min: 1;
|
|
@@ -318,6 +318,8 @@ export interface BackendProtocol extends IBackendProtocol {
|
|
|
318
318
|
* and communicate via defined interfaces.
|
|
319
319
|
*/
|
|
320
320
|
export interface SandboxBackendProtocol extends BackendProtocol {
|
|
321
|
+
/** Optional host guarantees; do not infer missing facts from the backend ID. */
|
|
322
|
+
readonly executionEnvironment?: import('./execution-environment').SandboxExecutionEnvironment;
|
|
321
323
|
/**
|
|
322
324
|
* Execute a command in the sandbox.
|
|
323
325
|
*
|
|
@@ -64,6 +64,12 @@ export interface XpertToolOptions<TInputSchema extends ZodTypeAny = ZodTypeAny,
|
|
|
64
64
|
resultFormat?: 'dto' | 'tool_result';
|
|
65
65
|
/** true uses the class default, a string selects a declared group, false disables Middleware exposure. */
|
|
66
66
|
middleware?: true | string | false;
|
|
67
|
+
/** Native middleware App exposure; does not publish an MCP endpoint. */
|
|
68
|
+
app?: {
|
|
69
|
+
resourceKey?: string;
|
|
70
|
+
visibility: readonly ('model' | 'app')[];
|
|
71
|
+
approval?: 'required' | 'none';
|
|
72
|
+
};
|
|
67
73
|
/** MCP exposure is opt-in. */
|
|
68
74
|
mcp?: XpertMcpToolOptions | false;
|
|
69
75
|
/** LangChain Tool metadata used only on the Agent Middleware surface. */
|
package/src/lib/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconDefinition, I18nObject, JsonSchemaObjectType, PluginMeta, PluginTargetApp, PluginTargetAppMeta, TAvatar, type TPromptWorkflow, XpertTemplatePluginDependencies, XpertTypeEnum } from '@xpert-ai/contracts';
|
|
1
|
+
import { AssistantCapabilityDeclaration, IconDefinition, I18nObject, JsonSchemaObjectType, PluginMeta, PluginTargetApp, PluginTargetAppMeta, TAvatar, type TPromptWorkflow, XpertTemplatePluginDependencies, XpertTypeEnum } from '@xpert-ai/contracts';
|
|
2
2
|
import type { DynamicModule, INestApplicationContext } from '@nestjs/common';
|
|
3
3
|
import { ModuleRef } from '@nestjs/core';
|
|
4
4
|
import type { ZodSchema } from 'zod/v3';
|
|
@@ -84,6 +84,7 @@ export interface XpertTemplateContribution {
|
|
|
84
84
|
pluginVersion?: string;
|
|
85
85
|
contentHash?: string;
|
|
86
86
|
xpertName?: string;
|
|
87
|
+
capabilities?: AssistantCapabilityDeclaration[];
|
|
87
88
|
dependencies?: XpertTemplatePluginDependencies;
|
|
88
89
|
[key: string]: unknown;
|
|
89
90
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TWorkflowTriggerMeta, TXpertTeamNode } from '@xpert-ai/contracts';
|
|
1
|
+
import { TWorkflowTriggerConnectionStatus, TWorkflowTriggerMeta, TXpertTeamNode } from '@xpert-ai/contracts';
|
|
2
2
|
export type TWorkflowTriggerBootstrapMode = 'replay_publish' | 'skip';
|
|
3
3
|
export type TWorkflowTriggerBootstrapConfig = {
|
|
4
4
|
mode: TWorkflowTriggerBootstrapMode;
|
|
@@ -21,6 +21,7 @@ export interface IWorkflowTriggerStrategy<T> {
|
|
|
21
21
|
*/
|
|
22
22
|
bootstrap?: TWorkflowTriggerBootstrapConfig;
|
|
23
23
|
validate(payload: TWorkflowTriggerParams<T>): Promise<any[]>;
|
|
24
|
+
connectionStatus?(config: T): Promise<Pick<TWorkflowTriggerConnectionStatus, 'connected' | 'state'>>;
|
|
24
25
|
/**
|
|
25
26
|
* Initialize the trigger when publish xpert workflow
|
|
26
27
|
*
|