@xpert-ai/plugin-sdk 3.18.7 → 3.20.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 +123 -0
- package/MIDDLEWARE_APPS.md +71 -0
- package/README.md +57 -0
- package/RESOURCE-CARDS-VALIDATION.md +51 -0
- package/RESOURCE-CARDS.md +361 -0
- package/TOOL-IMAGES.md +85 -0
- package/agent-results.cjs.default.js +1 -0
- package/agent-results.cjs.js +20 -0
- package/agent-results.cjs.mjs +2 -0
- package/agent-results.d.ts +1 -0
- package/agent-results.esm.js +4 -0
- package/index.cjs.js +586 -162
- package/index.esm.js +530 -167
- package/model-provider.cjs.js +5 -0
- package/model-provider.esm.js +5 -1
- package/package.json +8 -2
- package/results.cjs.js +50 -0
- package/results.esm.js +46 -0
- package/runtime-capabilities.md +35 -0
- package/src/agent-results.d.ts +2 -0
- package/src/index.d.ts +5 -0
- package/src/lib/agent/handoff/agent-chat.contract.d.ts +6 -1
- package/src/lib/agent/handoff/agent-runtime-message.contract.d.ts +319 -0
- package/src/lib/agent/handoff/index.d.ts +1 -0
- package/src/lib/agent/index.d.ts +2 -0
- package/src/lib/agent/middleware/capabilities/assistant-task.d.ts +55 -20
- package/src/lib/agent/middleware/index.d.ts +1 -0
- package/src/lib/agent/middleware/model-requirements.d.ts +9 -0
- package/src/lib/agent/middleware/strategy.interface.d.ts +4 -0
- package/src/lib/agent/middleware/types.d.ts +20 -3
- package/src/lib/agent/resource-card.d.ts +3 -0
- package/src/lib/agent/runtime/activity.d.ts +6 -0
- package/src/lib/agent/runtime/capability.d.ts +37 -0
- package/src/lib/agent/runtime/cli-model-profile.d.ts +62 -0
- package/src/lib/agent/runtime/dispatch.d.ts +517 -0
- package/src/lib/agent/runtime/execution-runner.d.ts +66 -0
- package/src/lib/agent/runtime/index.d.ts +10 -0
- package/src/lib/agent/runtime/model-execution.d.ts +15 -0
- package/src/lib/agent/runtime/results.d.ts +335 -0
- package/src/lib/agent/runtime/strategy.d.ts +53 -0
- package/src/lib/agent/runtime/task-wait.d.ts +35 -0
- package/src/lib/agent/runtime/types.d.ts +156 -0
- package/src/lib/ai-model/ai-model-provider.interface.d.ts +2 -0
- package/src/lib/ai-model/ai-model.d.ts +2 -0
- package/src/lib/ai-model/index.d.ts +3 -0
- package/src/lib/ai-model/llm.d.ts +4 -2
- package/src/lib/ai-model/native-model.d.ts +22 -0
- package/src/lib/ai-model/realtime.d.ts +36 -0
- package/src/lib/ai-model/token-usage.d.ts +13 -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/core/strategy-bus.d.ts +0 -3
- 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 +14 -1
- package/src/lib/project-task/index.d.ts +66 -0
- package/src/lib/project-type/index.d.ts +71 -0
- package/src/lib/resource-card-provider/index.d.ts +3 -0
- package/src/lib/resource-card-provider/provider.decorator.d.ts +4 -0
- package/src/lib/resource-card-provider/provider.registry.d.ts +14 -0
- package/src/lib/resource-card-provider/types.d.ts +36 -0
- package/src/lib/resource-card.d.ts +6 -0
- package/src/lib/runtime/capabilities/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 +13 -0
- package/src/lib/runtime/capabilities/tool-images.d.ts +24 -0
- package/src/lib/runtime/runtime-scope.d.ts +7 -1
- package/src/lib/sandbox/execution-environment.d.ts +12 -0
- package/src/lib/sandbox/execution.d.ts +13 -0
- package/src/lib/sandbox/index.d.ts +1 -0
- package/src/lib/sandbox/managed-service.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
|
@@ -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,12 @@
|
|
|
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
|
+
/** Explicit opt-in capabilities implemented by this execution backend. */
|
|
10
|
+
readonly capabilities?: readonly string[];
|
|
11
|
+
readonly desktop?: boolean;
|
|
12
|
+
}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
export interface SandboxExecutionOptions {
|
|
2
|
+
/** Trusted host correlation/capabilities, never part of the model-visible command schema. */
|
|
3
|
+
executionScope?: SandboxExecutionScope;
|
|
2
4
|
timeoutMs?: number;
|
|
3
5
|
maxOutputBytes?: number;
|
|
6
|
+
/** Request cancellation; the backend must implement guest process termination. */
|
|
7
|
+
signal?: AbortSignal;
|
|
4
8
|
}
|
|
5
9
|
export interface ResolvedSandboxExecutionOptions {
|
|
10
|
+
executionScope?: SandboxExecutionScope;
|
|
6
11
|
timeoutMs: number;
|
|
7
12
|
maxOutputBytes: number;
|
|
13
|
+
signal?: AbortSignal;
|
|
8
14
|
}
|
|
9
15
|
export declare const SANDBOX_SHELL_TIMEOUT_LIMITS_SEC: {
|
|
10
16
|
readonly min: 1;
|
|
@@ -25,3 +31,10 @@ export declare function formatSandboxTimeout(timeoutMs: number): string;
|
|
|
25
31
|
export declare function buildSandboxTimeoutMessage(subject: string, timeoutMs: number): string;
|
|
26
32
|
export declare function appendSandboxMessage(output: string, message: string): string;
|
|
27
33
|
export declare function resolveSandboxExecutionOptions(options?: SandboxExecutionOptions, defaults?: SandboxExecutionOptions): ResolvedSandboxExecutionOptions;
|
|
34
|
+
export interface SandboxExecutionScope {
|
|
35
|
+
parentExecutionId: string;
|
|
36
|
+
conversationId: string;
|
|
37
|
+
toolCallId: string;
|
|
38
|
+
/** Environment capabilities selected by the Assistant's middleware configuration. */
|
|
39
|
+
capabilities: readonly string[];
|
|
40
|
+
}
|
|
@@ -50,6 +50,7 @@ export type SandboxManagedServiceRestartOptions = {
|
|
|
50
50
|
export type SandboxManagedServiceStartResult = SandboxManagedServiceStateChange;
|
|
51
51
|
export interface SandboxManagedServiceAdapter {
|
|
52
52
|
getServiceLogs(options: SandboxManagedServiceLogsOptions): MaybePromise<TSandboxManagedServiceLogs>;
|
|
53
|
+
/** Inspect existing services only; do not create or recover a runtime during discovery. */
|
|
53
54
|
listServices(options: SandboxManagedServiceListOptions): MaybePromise<SandboxManagedServiceListResult>;
|
|
54
55
|
restartService(options: SandboxManagedServiceRestartOptions): MaybePromise<SandboxManagedServiceStartResult>;
|
|
55
56
|
startService(options: SandboxManagedServiceStartOptions): MaybePromise<SandboxManagedServiceStartResult>;
|
|
@@ -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
|
*
|