@xpert-ai/plugin-sdk 3.7.2 → 3.8.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/index.cjs.js +773 -0
- package/index.esm.js +747 -1
- package/package.json +2 -1
- package/src/index.d.ts +2 -0
- package/src/lib/agent/handoff/agent-chat.contract.d.ts +20 -0
- package/src/lib/agent/handoff/handoff-processor.decorator.d.ts +11 -0
- package/src/lib/agent/handoff/handoff-processor.registry.d.ts +6 -0
- package/src/lib/agent/handoff/handoff.interface.d.ts +17 -0
- package/src/lib/agent/handoff/index.d.ts +6 -0
- package/src/lib/agent/handoff/message-type.d.ts +24 -0
- package/src/lib/agent/handoff/types.d.ts +110 -0
- package/src/lib/agent/index.d.ts +1 -0
- package/src/lib/agent/middleware/runtime.d.ts +2 -0
- package/src/lib/agent/middleware/strategy.interface.d.ts +5 -1
- package/src/lib/agent/middleware/types.d.ts +2 -2
- package/src/lib/ai-model/utils/index.d.ts +1 -0
- package/src/lib/ai-model/utils/limits.d.ts +4 -0
- package/src/lib/channel/cancel-conversation.command.d.ts +14 -0
- package/src/lib/channel/index.d.ts +4 -0
- package/src/lib/channel/strategy.decorator.d.ts +23 -0
- package/src/lib/channel/strategy.interface.d.ts +345 -0
- package/src/lib/channel/strategy.registry.d.ts +30 -0
- package/src/lib/core/permissions/analytics.d.ts +46 -0
- package/src/lib/core/{permissions.d.ts → permissions/general.d.ts} +9 -12
- package/src/lib/core/permissions/handoff.d.ts +36 -0
- package/src/lib/core/permissions/index.d.ts +24 -0
- package/src/lib/core/permissions/operation.d.ts +8 -0
- package/src/lib/core/permissions/user.d.ts +29 -0
- package/src/lib/integration/strategy.interface.d.ts +3 -1
- package/src/lib/sandbox/index.d.ts +8 -0
- package/src/lib/sandbox/protocol.d.ts +265 -0
- package/src/lib/sandbox/sandbox.d.ts +70 -0
- package/src/lib/sandbox/sandbox.decorator.d.ts +2 -0
- package/src/lib/sandbox/sandbox.interface.d.ts +38 -0
- package/src/lib/sandbox/sandbox.registry.d.ts +6 -0
- package/src/lib/toolset/strategy.interface.d.ts +2 -6
- package/src/lib/types.d.ts +7 -1
- package/src/lib/workflow/node/strategy.interface.d.ts +4 -2
- package/src/lib/workflow/trigger/strategy.interface.d.ts +13 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Runnable } from '@langchain/core/runnables';
|
|
2
2
|
import { BaseChannel } from '@langchain/langgraph';
|
|
3
|
-
import { IEnvironment, IWorkflowNode, TWorkflowNodeMeta, TXpertGraph, TXpertParameter, TXpertTeamNode } from '@metad/contracts';
|
|
3
|
+
import { IEnvironment, IWorkflowNode, TWorkflowNodeMeta, TXpertGraph, TWorkflowVarGroup, TXpertParameter, TXpertTeamNode } from '@metad/contracts';
|
|
4
|
+
import { PromiseOrValue } from '../../types';
|
|
4
5
|
export type TWorkflowNodeParams<TConfig = any> = {
|
|
5
6
|
xpertId: string;
|
|
6
7
|
agentKey?: string;
|
|
@@ -36,6 +37,7 @@ export interface IWorkflowNodeStrategy<TConfig = any, TResult = any> {
|
|
|
36
37
|
xpertId: string;
|
|
37
38
|
environment: IEnvironment;
|
|
38
39
|
isDraft: boolean;
|
|
39
|
-
}): TWorkflowNodeResult
|
|
40
|
+
}): PromiseOrValue<TWorkflowNodeResult>;
|
|
41
|
+
inputVariables?(entity: IWorkflowNode, variables?: TWorkflowVarGroup[]): TXpertParameter[];
|
|
40
42
|
outputVariables(entity: IWorkflowNode): TXpertParameter[];
|
|
41
43
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { TWorkflowTriggerMeta, TXpertTeamNode } from '@metad/contracts';
|
|
2
|
+
export type TWorkflowTriggerBootstrapMode = 'replay_publish' | 'skip';
|
|
3
|
+
export type TWorkflowTriggerBootstrapConfig = {
|
|
4
|
+
mode: TWorkflowTriggerBootstrapMode;
|
|
5
|
+
critical?: boolean;
|
|
6
|
+
};
|
|
2
7
|
export type TWorkflowTriggerParams<T> = {
|
|
3
8
|
xpertId: string;
|
|
4
9
|
agentKey?: string;
|
|
@@ -7,6 +12,14 @@ export type TWorkflowTriggerParams<T> = {
|
|
|
7
12
|
};
|
|
8
13
|
export interface IWorkflowTriggerStrategy<T> {
|
|
9
14
|
meta: TWorkflowTriggerMeta;
|
|
15
|
+
/**
|
|
16
|
+
* Controls how this trigger should be recovered during system bootstrap.
|
|
17
|
+
*
|
|
18
|
+
* Default when omitted:
|
|
19
|
+
* - mode: "replay_publish"
|
|
20
|
+
* - critical: false
|
|
21
|
+
*/
|
|
22
|
+
bootstrap?: TWorkflowTriggerBootstrapConfig;
|
|
10
23
|
validate(payload: TWorkflowTriggerParams<T>): Promise<any[]>;
|
|
11
24
|
/**
|
|
12
25
|
* Initialize the trigger when publish xpert workflow
|