@flowgram.ai/runtime-interface 0.2.19 → 0.2.21
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/dist/index.d.mts +16 -6
- package/dist/index.d.ts +16 -6
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -135,6 +135,15 @@ interface IFlowRefValue {
|
|
|
135
135
|
type: 'ref';
|
|
136
136
|
content?: string[];
|
|
137
137
|
}
|
|
138
|
+
interface IFlowExpressionValue {
|
|
139
|
+
type: 'expression';
|
|
140
|
+
content?: string;
|
|
141
|
+
}
|
|
142
|
+
interface IFlowTemplateValue {
|
|
143
|
+
type: 'template';
|
|
144
|
+
content?: string;
|
|
145
|
+
}
|
|
146
|
+
type IFlowValue = IFlowConstantValue | IFlowRefValue | IFlowExpressionValue | IFlowTemplateValue;
|
|
138
147
|
type IFlowConstantRefValue = IFlowConstantValue | IFlowRefValue;
|
|
139
148
|
|
|
140
149
|
/**
|
|
@@ -148,7 +157,7 @@ interface WorkflowNodeSchema<T = string, D = any> {
|
|
|
148
157
|
meta: WorkflowNodeMetaSchema;
|
|
149
158
|
data: D & {
|
|
150
159
|
title?: string;
|
|
151
|
-
inputsValues?: Record<string,
|
|
160
|
+
inputsValues?: Record<string, IFlowValue>;
|
|
152
161
|
inputs?: IJsonSchema;
|
|
153
162
|
outputs?: IJsonSchema;
|
|
154
163
|
[key: string]: any;
|
|
@@ -395,7 +404,7 @@ interface CreatePortParams {
|
|
|
395
404
|
*/
|
|
396
405
|
|
|
397
406
|
interface NodeDeclare {
|
|
398
|
-
inputsValues?: Record<string,
|
|
407
|
+
inputsValues?: Record<string, IFlowValue>;
|
|
399
408
|
inputs?: IJsonSchema;
|
|
400
409
|
outputs?: IJsonSchema;
|
|
401
410
|
}
|
|
@@ -461,7 +470,8 @@ interface IState {
|
|
|
461
470
|
outputs: WorkflowOutputs;
|
|
462
471
|
}): void;
|
|
463
472
|
parseRef<T = unknown>(ref: IFlowRefValue): IVariableParseResult<T> | null;
|
|
464
|
-
|
|
473
|
+
parseTemplate(template: IFlowTemplateValue): IVariableParseResult<string> | null;
|
|
474
|
+
parseValue<T = unknown>(flowValue: IFlowValue, type?: WorkflowVariableType): IVariableParseResult<T> | null;
|
|
465
475
|
isExecutedNode(node: INode): boolean;
|
|
466
476
|
addExecutedNode(node: INode): void;
|
|
467
477
|
}
|
|
@@ -554,8 +564,8 @@ interface LLMNodeData {
|
|
|
554
564
|
modelType: IFlowConstantRefValue;
|
|
555
565
|
baseURL: IFlowConstantRefValue;
|
|
556
566
|
temperature: IFlowConstantRefValue;
|
|
557
|
-
systemPrompt:
|
|
558
|
-
prompt:
|
|
567
|
+
systemPrompt: IFlowConstantValue | IFlowTemplateValue;
|
|
568
|
+
prompt: IFlowConstantValue | IFlowTemplateValue;
|
|
559
569
|
};
|
|
560
570
|
}
|
|
561
571
|
type LLMNodeSchema = WorkflowNodeSchema<FlowGramNode.LLM, LLMNodeData>;
|
|
@@ -726,4 +736,4 @@ interface IRuntimeClient {
|
|
|
726
736
|
[FlowGramAPIName.TaskCancel]: (input: TaskCancelInput) => Promise<TaskCancelOutput | undefined>;
|
|
727
737
|
}
|
|
728
738
|
|
|
729
|
-
export { type ContainerService, type ContextData, type CreateEdgeParams, type CreateNodeParams, type CreatePortParams, type EndNodeSchema, type EngineServices, type ExecutionContext, type ExecutionResult, type FlowGramAPIDefine, type FlowGramAPIDefines, FlowGramAPIMethod, FlowGramAPIModule, FlowGramAPIName, FlowGramAPINames, FlowGramAPIs, FlowGramNode, type IBasicJsonSchema, type IContainer, type IContext, type IDocument, type IEdge, IEngine, IExecutor, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowRefValue, type IIOCenter, type IJsonSchema, type INode, type INodeExecutor, type INodeExecutorFactory, type IOData, type IPort, type IReport, type IReporter, type IRuntimeClient, type ISnapshot, type ISnapshotCenter, type IState, type IStatus, type IStatusCenter, type ITask, IValidation, type IVariable, type IVariableParseResult, type IVariableStore, type InvokeParams, type JsonSchemaBasicType, type LLMNodeSchema, type NodeReport, type NodeDeclare as NodeVariable, type PositionSchema, ServerInfoDefine, type ServerInfoInput, type ServerInfoOutput, type Snapshot, type SnapshotData, type StartNodeSchema, type StatusData, TaskCancelDefine, type TaskCancelInput, type TaskCancelOutput, type TaskParams, TaskReportDefine, type TaskReportInput, type TaskReportOutput, TaskResultDefine, type TaskResultInput, type TaskResultOutput, TaskRunDefine, type TaskRunInput, type TaskRunOutput, type VOData, ValidationDefine, type ValidationReq, type ValidationRes, type ValidationResult, type WorkflowEdgeSchema, type WorkflowInputs, type WorkflowNodeMetaSchema, type WorkflowNodeSchema, type WorkflowOutputs, WorkflowPortType, type WorkflowRuntimeInvoke, type WorkflowSchema, WorkflowStatus, WorkflowVariableType, type XYSchema };
|
|
739
|
+
export { type ContainerService, type ContextData, type CreateEdgeParams, type CreateNodeParams, type CreatePortParams, type EndNodeSchema, type EngineServices, type ExecutionContext, type ExecutionResult, type FlowGramAPIDefine, type FlowGramAPIDefines, FlowGramAPIMethod, FlowGramAPIModule, FlowGramAPIName, FlowGramAPINames, FlowGramAPIs, FlowGramNode, type IBasicJsonSchema, type IContainer, type IContext, type IDocument, type IEdge, IEngine, IExecutor, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IIOCenter, type IJsonSchema, type INode, type INodeExecutor, type INodeExecutorFactory, type IOData, type IPort, type IReport, type IReporter, type IRuntimeClient, type ISnapshot, type ISnapshotCenter, type IState, type IStatus, type IStatusCenter, type ITask, IValidation, type IVariable, type IVariableParseResult, type IVariableStore, type InvokeParams, type JsonSchemaBasicType, type LLMNodeSchema, type NodeReport, type NodeDeclare as NodeVariable, type PositionSchema, ServerInfoDefine, type ServerInfoInput, type ServerInfoOutput, type Snapshot, type SnapshotData, type StartNodeSchema, type StatusData, TaskCancelDefine, type TaskCancelInput, type TaskCancelOutput, type TaskParams, TaskReportDefine, type TaskReportInput, type TaskReportOutput, TaskResultDefine, type TaskResultInput, type TaskResultOutput, TaskRunDefine, type TaskRunInput, type TaskRunOutput, type VOData, ValidationDefine, type ValidationReq, type ValidationRes, type ValidationResult, type WorkflowEdgeSchema, type WorkflowInputs, type WorkflowNodeMetaSchema, type WorkflowNodeSchema, type WorkflowOutputs, WorkflowPortType, type WorkflowRuntimeInvoke, type WorkflowSchema, WorkflowStatus, WorkflowVariableType, type XYSchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -135,6 +135,15 @@ interface IFlowRefValue {
|
|
|
135
135
|
type: 'ref';
|
|
136
136
|
content?: string[];
|
|
137
137
|
}
|
|
138
|
+
interface IFlowExpressionValue {
|
|
139
|
+
type: 'expression';
|
|
140
|
+
content?: string;
|
|
141
|
+
}
|
|
142
|
+
interface IFlowTemplateValue {
|
|
143
|
+
type: 'template';
|
|
144
|
+
content?: string;
|
|
145
|
+
}
|
|
146
|
+
type IFlowValue = IFlowConstantValue | IFlowRefValue | IFlowExpressionValue | IFlowTemplateValue;
|
|
138
147
|
type IFlowConstantRefValue = IFlowConstantValue | IFlowRefValue;
|
|
139
148
|
|
|
140
149
|
/**
|
|
@@ -148,7 +157,7 @@ interface WorkflowNodeSchema<T = string, D = any> {
|
|
|
148
157
|
meta: WorkflowNodeMetaSchema;
|
|
149
158
|
data: D & {
|
|
150
159
|
title?: string;
|
|
151
|
-
inputsValues?: Record<string,
|
|
160
|
+
inputsValues?: Record<string, IFlowValue>;
|
|
152
161
|
inputs?: IJsonSchema;
|
|
153
162
|
outputs?: IJsonSchema;
|
|
154
163
|
[key: string]: any;
|
|
@@ -395,7 +404,7 @@ interface CreatePortParams {
|
|
|
395
404
|
*/
|
|
396
405
|
|
|
397
406
|
interface NodeDeclare {
|
|
398
|
-
inputsValues?: Record<string,
|
|
407
|
+
inputsValues?: Record<string, IFlowValue>;
|
|
399
408
|
inputs?: IJsonSchema;
|
|
400
409
|
outputs?: IJsonSchema;
|
|
401
410
|
}
|
|
@@ -461,7 +470,8 @@ interface IState {
|
|
|
461
470
|
outputs: WorkflowOutputs;
|
|
462
471
|
}): void;
|
|
463
472
|
parseRef<T = unknown>(ref: IFlowRefValue): IVariableParseResult<T> | null;
|
|
464
|
-
|
|
473
|
+
parseTemplate(template: IFlowTemplateValue): IVariableParseResult<string> | null;
|
|
474
|
+
parseValue<T = unknown>(flowValue: IFlowValue, type?: WorkflowVariableType): IVariableParseResult<T> | null;
|
|
465
475
|
isExecutedNode(node: INode): boolean;
|
|
466
476
|
addExecutedNode(node: INode): void;
|
|
467
477
|
}
|
|
@@ -554,8 +564,8 @@ interface LLMNodeData {
|
|
|
554
564
|
modelType: IFlowConstantRefValue;
|
|
555
565
|
baseURL: IFlowConstantRefValue;
|
|
556
566
|
temperature: IFlowConstantRefValue;
|
|
557
|
-
systemPrompt:
|
|
558
|
-
prompt:
|
|
567
|
+
systemPrompt: IFlowConstantValue | IFlowTemplateValue;
|
|
568
|
+
prompt: IFlowConstantValue | IFlowTemplateValue;
|
|
559
569
|
};
|
|
560
570
|
}
|
|
561
571
|
type LLMNodeSchema = WorkflowNodeSchema<FlowGramNode.LLM, LLMNodeData>;
|
|
@@ -726,4 +736,4 @@ interface IRuntimeClient {
|
|
|
726
736
|
[FlowGramAPIName.TaskCancel]: (input: TaskCancelInput) => Promise<TaskCancelOutput | undefined>;
|
|
727
737
|
}
|
|
728
738
|
|
|
729
|
-
export { type ContainerService, type ContextData, type CreateEdgeParams, type CreateNodeParams, type CreatePortParams, type EndNodeSchema, type EngineServices, type ExecutionContext, type ExecutionResult, type FlowGramAPIDefine, type FlowGramAPIDefines, FlowGramAPIMethod, FlowGramAPIModule, FlowGramAPIName, FlowGramAPINames, FlowGramAPIs, FlowGramNode, type IBasicJsonSchema, type IContainer, type IContext, type IDocument, type IEdge, IEngine, IExecutor, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowRefValue, type IIOCenter, type IJsonSchema, type INode, type INodeExecutor, type INodeExecutorFactory, type IOData, type IPort, type IReport, type IReporter, type IRuntimeClient, type ISnapshot, type ISnapshotCenter, type IState, type IStatus, type IStatusCenter, type ITask, IValidation, type IVariable, type IVariableParseResult, type IVariableStore, type InvokeParams, type JsonSchemaBasicType, type LLMNodeSchema, type NodeReport, type NodeDeclare as NodeVariable, type PositionSchema, ServerInfoDefine, type ServerInfoInput, type ServerInfoOutput, type Snapshot, type SnapshotData, type StartNodeSchema, type StatusData, TaskCancelDefine, type TaskCancelInput, type TaskCancelOutput, type TaskParams, TaskReportDefine, type TaskReportInput, type TaskReportOutput, TaskResultDefine, type TaskResultInput, type TaskResultOutput, TaskRunDefine, type TaskRunInput, type TaskRunOutput, type VOData, ValidationDefine, type ValidationReq, type ValidationRes, type ValidationResult, type WorkflowEdgeSchema, type WorkflowInputs, type WorkflowNodeMetaSchema, type WorkflowNodeSchema, type WorkflowOutputs, WorkflowPortType, type WorkflowRuntimeInvoke, type WorkflowSchema, WorkflowStatus, WorkflowVariableType, type XYSchema };
|
|
739
|
+
export { type ContainerService, type ContextData, type CreateEdgeParams, type CreateNodeParams, type CreatePortParams, type EndNodeSchema, type EngineServices, type ExecutionContext, type ExecutionResult, type FlowGramAPIDefine, type FlowGramAPIDefines, FlowGramAPIMethod, FlowGramAPIModule, FlowGramAPIName, FlowGramAPINames, FlowGramAPIs, FlowGramNode, type IBasicJsonSchema, type IContainer, type IContext, type IDocument, type IEdge, IEngine, IExecutor, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IIOCenter, type IJsonSchema, type INode, type INodeExecutor, type INodeExecutorFactory, type IOData, type IPort, type IReport, type IReporter, type IRuntimeClient, type ISnapshot, type ISnapshotCenter, type IState, type IStatus, type IStatusCenter, type ITask, IValidation, type IVariable, type IVariableParseResult, type IVariableStore, type InvokeParams, type JsonSchemaBasicType, type LLMNodeSchema, type NodeReport, type NodeDeclare as NodeVariable, type PositionSchema, ServerInfoDefine, type ServerInfoInput, type ServerInfoOutput, type Snapshot, type SnapshotData, type StartNodeSchema, type StatusData, TaskCancelDefine, type TaskCancelInput, type TaskCancelOutput, type TaskParams, TaskReportDefine, type TaskReportInput, type TaskReportOutput, TaskResultDefine, type TaskResultInput, type TaskResultOutput, TaskRunDefine, type TaskRunInput, type TaskRunOutput, type VOData, ValidationDefine, type ValidationReq, type ValidationRes, type ValidationResult, type WorkflowEdgeSchema, type WorkflowInputs, type WorkflowNodeMetaSchema, type WorkflowNodeSchema, type WorkflowOutputs, WorkflowPortType, type WorkflowRuntimeInvoke, type WorkflowSchema, WorkflowStatus, WorkflowVariableType, type XYSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowgram.ai/runtime-interface",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.21",
|
|
4
4
|
"homepage": "https://flowgram.ai/",
|
|
5
5
|
"repository": "https://github.com/bytedance/flowgram.ai",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"tsup": "^8.0.1",
|
|
24
24
|
"typescript": "^5.0.4",
|
|
25
25
|
"vitest": "^0.34.6",
|
|
26
|
-
"@flowgram.ai/eslint-config": "0.2.
|
|
27
|
-
"@flowgram.ai/ts-config": "0.2.
|
|
26
|
+
"@flowgram.ai/eslint-config": "0.2.21",
|
|
27
|
+
"@flowgram.ai/ts-config": "0.2.21"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public",
|