@shenghuabi/workflow 1.0.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.
Files changed (70) hide show
  1. package/index.d.ts +14 -0
  2. package/index.js +2078 -0
  3. package/index.js.map +7 -0
  4. package/index.mjs +2035 -0
  5. package/index.mjs.map +7 -0
  6. package/inline/inline.service.d.ts +8 -0
  7. package/inline/node/chat/chat.node.define.d.ts +185 -0
  8. package/inline/node/chat/common.d.ts +2 -0
  9. package/inline/node/chat/main/index.d.ts +209 -0
  10. package/inline/node/chat/main/llm.runner.d.ts +41 -0
  11. package/inline/node/chat/util.d.ts +8 -0
  12. package/inline/node/chat/webview/index.d.ts +2 -0
  13. package/inline/node/index.browser.d.ts +2 -0
  14. package/inline/node/index.node.d.ts +2 -0
  15. package/inline/node/text/common.d.ts +2 -0
  16. package/inline/node/text/main/index.d.ts +30 -0
  17. package/inline/node/text/main/textarea.runner.d.ts +7 -0
  18. package/inline/node/text/text.node.define.d.ts +6 -0
  19. package/inline/node/text/webview/index.d.ts +2 -0
  20. package/module.d.ts +23 -0
  21. package/package.json +52 -0
  22. package/plugin/plugin.service.d.ts +7 -0
  23. package/preset/context-build.service.d.ts +102 -0
  24. package/preset/inline-build.service.d.ts +11 -0
  25. package/preset/inline-runner.service.d.ts +16 -0
  26. package/runner/define.d.ts +12 -0
  27. package/runner/inline-input-item.runner.d.ts +8 -0
  28. package/runner/input-params.runner.d.ts +7 -0
  29. package/runner/iteration-start.runner.d.ts +7 -0
  30. package/runner/iteration.runner.d.ts +7 -0
  31. package/runner/parameters.runner.d.ts +10 -0
  32. package/runner/runner-error.d.ts +12 -0
  33. package/runner/runner-item.d.ts +35 -0
  34. package/runner/workflow-runner.service.d.ts +35 -0
  35. package/share/common/const.d.ts +2 -0
  36. package/share/common/define.d.ts +71 -0
  37. package/share/common/examples.define.d.ts +53 -0
  38. package/share/common/handle.define.d.ts +5 -0
  39. package/share/common/index.d.ts +5 -0
  40. package/share/common/inline-template.define.d.ts +15 -0
  41. package/share/common/llm.define.d.ts +29 -0
  42. package/share/const.d.ts +5 -0
  43. package/share/handle-node.d.ts +60 -0
  44. package/share/index.d.ts +8 -0
  45. package/share/index.js +336 -0
  46. package/share/index.js.map +7 -0
  47. package/share/index.mjs +296 -0
  48. package/share/index.mjs.map +7 -0
  49. package/share/type.d.ts +89 -0
  50. package/share/type2.d.ts +132 -0
  51. package/share/util/layout.d.ts +2 -0
  52. package/share/util.d.ts +5 -0
  53. package/share/workflow.const.d.ts +8 -0
  54. package/share/workflow.emit.d.ts +9 -0
  55. package/template-format.service.d.ts +29 -0
  56. package/test/chat.spec.d.ts +1 -0
  57. package/test/file.spec.d.ts +1 -0
  58. package/test/hello.spec.d.ts +1 -0
  59. package/test/plugin.spec.d.ts +1 -0
  60. package/token.d.ts +68 -0
  61. package/type/type.d.ts +5 -0
  62. package/webview/index.d.ts +1 -0
  63. package/webview/index.js +399 -0
  64. package/webview/index.js.map +7 -0
  65. package/webview/index.mjs +388 -0
  66. package/webview/index.mjs.map +7 -0
  67. package/workflow-exec.service.d.ts +41 -0
  68. package/workflow-file.service.d.ts +9 -0
  69. package/workflow-parser.service.d.ts +24 -0
  70. package/workflow-select.service.d.ts +13 -0
@@ -0,0 +1,209 @@
1
+ import { LlmRunner } from './llm.runner';
2
+ export declare const ChatMainConfig: {
3
+ readonly runner: typeof LlmRunner;
4
+ readonly define: import("valibot").LooseObjectSchema<{
5
+ readonly data: import("valibot").LooseObjectSchema<{
6
+ readonly config: import("valibot").SchemaWithPipe<readonly [import("valibot").ObjectSchema<{
7
+ readonly llm: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").IntersectSchema<[import("valibot").SchemaWithPipe<readonly [import("valibot").IntersectSchema<[import("valibot").SchemaWithPipe<readonly [import("valibot").ObjectSchema<{
8
+ readonly name: import("valibot").SchemaWithPipe<readonly [import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>, import("valibot").TitleAction<string | undefined, "预定义模型配置">, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", string | undefined, import("@piying/view-angular-core").AnyCoreSchemaHandle>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", string | undefined, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
9
+ readonly model: import("valibot").SchemaWithPipe<readonly [import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>, import("valibot").TitleAction<string | undefined, "模型">]>;
10
+ readonly baseURL: import("valibot").SchemaWithPipe<readonly [import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>, import("valibot").TitleAction<string | undefined, "地址">]>;
11
+ }, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
12
+ name?: string | undefined;
13
+ model?: string | undefined;
14
+ baseURL?: string | undefined;
15
+ }, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>], undefined>, import("valibot").TitleAction<{
16
+ name?: string | undefined;
17
+ model?: string | undefined;
18
+ baseURL?: string | undefined;
19
+ }, string>, import("@piying/valibot-visit").ConditionAction<{
20
+ name?: string | undefined;
21
+ model?: string | undefined;
22
+ baseURL?: string | undefined;
23
+ }>]>], undefined>, import("@piying/valibot-visit").ConditionAction<{
24
+ name?: string | undefined;
25
+ model?: string | undefined;
26
+ baseURL?: string | undefined;
27
+ }>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
28
+ name?: string | undefined;
29
+ model?: string | undefined;
30
+ baseURL?: string | undefined;
31
+ }, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>, undefined>;
32
+ readonly responseFormat: import("valibot").SchemaWithPipe<readonly [import("valibot").OptionalSchema<import("valibot").PicklistSchema<readonly ["text", "json_object", "json_schema"], undefined>, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", "text" | "json_schema" | "json_object" | undefined, import("@piying/view-angular-core").AnyCoreSchemaHandle>, import("valibot").TitleAction<"text" | "json_schema" | "json_object" | undefined, "响应格式">]>;
33
+ readonly parseBy: import("valibot").SchemaWithPipe<readonly [import("valibot").OptionalSchema<import("valibot").PicklistSchema<readonly ["json", "markdown", "yaml"], undefined>, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", "json" | "markdown" | "yaml" | undefined, import("@piying/view-angular-core").AnyCoreSchemaHandle>, import("valibot").TitleAction<"json" | "markdown" | "yaml" | undefined, "返回解析">, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", "json" | "markdown" | "yaml" | undefined, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
34
+ readonly examples: import("valibot").SchemaWithPipe<readonly [import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").SchemaWithPipe<readonly [import("valibot").ObjectSchema<{
35
+ readonly input: import("valibot").SchemaWithPipe<readonly [import("valibot").ObjectSchema<{
36
+ readonly format: import("valibot").SchemaWithPipe<readonly [import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, false>, import("valibot").DescriptionAction<boolean, "选中后会尝试使用yaml解析为对象,再序列化为对应的响应类型">, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", boolean, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
37
+ readonly value: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TitleAction<string, "问题">, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", string, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
38
+ }, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
39
+ format: boolean;
40
+ value: string;
41
+ }, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
42
+ readonly output: import("valibot").SchemaWithPipe<readonly [import("valibot").ObjectSchema<{
43
+ readonly format: import("valibot").SchemaWithPipe<readonly [import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, false>, import("valibot").DescriptionAction<boolean, "是否需要格式化">, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", boolean, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
44
+ readonly value: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TitleAction<string, "回答">, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", string, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
45
+ }, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
46
+ format: boolean;
47
+ value: string;
48
+ }, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
49
+ }, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
50
+ input: {
51
+ format: boolean;
52
+ value: string;
53
+ };
54
+ output: {
55
+ format: boolean;
56
+ value: string;
57
+ };
58
+ }, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>, undefined>, readonly []>, import("valibot").TitleAction<{
59
+ input: {
60
+ format: boolean;
61
+ value: string;
62
+ };
63
+ output: {
64
+ format: boolean;
65
+ value: string;
66
+ };
67
+ }[], "用例">, import("valibot").DescriptionAction<{
68
+ input: {
69
+ format: boolean;
70
+ value: string;
71
+ };
72
+ output: {
73
+ format: boolean;
74
+ value: string;
75
+ };
76
+ }[], "回答问题之前,会参考定义的用例格式进行回复,用于规范回答">, import("@piying/valibot-visit").ConditionAction<{
77
+ input: {
78
+ format: boolean;
79
+ value: string;
80
+ };
81
+ output: {
82
+ format: boolean;
83
+ value: string;
84
+ };
85
+ }[]>]>;
86
+ }, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
87
+ llm?: {
88
+ name?: string | undefined;
89
+ model?: string | undefined;
90
+ baseURL?: string | undefined;
91
+ } | undefined;
92
+ responseFormat?: "text" | "json_schema" | "json_object" | undefined;
93
+ parseBy?: "json" | "markdown" | "yaml" | undefined;
94
+ examples: {
95
+ input: {
96
+ format: boolean;
97
+ value: string;
98
+ };
99
+ output: {
100
+ format: boolean;
101
+ value: string;
102
+ };
103
+ }[];
104
+ }, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
105
+ readonly value: import("valibot").SchemaWithPipe<readonly [import("valibot").CustomSchema<({
106
+ role: "system";
107
+ content: {
108
+ text: string;
109
+ type: "text";
110
+ }[];
111
+ } | {
112
+ role: "user";
113
+ content: ({
114
+ text: string;
115
+ type: "text";
116
+ } | {
117
+ image_url: {
118
+ url: string;
119
+ detail?: "auto" | "low" | "high" | undefined;
120
+ };
121
+ type: "image_url";
122
+ })[];
123
+ } | {
124
+ role: "assistant";
125
+ content: {
126
+ text: string;
127
+ type: "text";
128
+ }[];
129
+ thinkContent?: string | undefined;
130
+ })[], undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", ({
131
+ role: "system";
132
+ content: {
133
+ text: string;
134
+ type: "text";
135
+ }[];
136
+ } | {
137
+ role: "user";
138
+ content: ({
139
+ text: string;
140
+ type: "text";
141
+ } | {
142
+ image_url: {
143
+ url: string;
144
+ detail?: "auto" | "low" | "high" | undefined;
145
+ };
146
+ type: "image_url";
147
+ })[];
148
+ } | {
149
+ role: "assistant";
150
+ content: {
151
+ text: string;
152
+ type: "text";
153
+ }[];
154
+ thinkContent?: string | undefined;
155
+ })[], import("@piying/view-angular-core").AnyCoreSchemaHandle>, import("@piying/valibot-visit").ConditionAction<({
156
+ role: "system";
157
+ content: {
158
+ text: string;
159
+ type: "text";
160
+ }[];
161
+ } | {
162
+ role: "user";
163
+ content: ({
164
+ text: string;
165
+ type: "text";
166
+ } | {
167
+ image_url: {
168
+ url: string;
169
+ detail?: "auto" | "low" | "high" | undefined;
170
+ };
171
+ type: "image_url";
172
+ })[];
173
+ } | {
174
+ role: "assistant";
175
+ content: {
176
+ text: string;
177
+ type: "text";
178
+ }[];
179
+ thinkContent?: string | undefined;
180
+ })[]>]>;
181
+ }, undefined>;
182
+ }, undefined>;
183
+ readonly afterAdd?: (node: import("../../../..").CustomNode, injector: import("static-injector").Injector) => any;
184
+ readonly priority?: number;
185
+ readonly type: string;
186
+ readonly label?: string | undefined;
187
+ readonly icon?: {
188
+ fontIcon: string;
189
+ fontSet?: string | undefined;
190
+ } | {
191
+ fontIcon: string;
192
+ fontSet: undefined;
193
+ } | undefined;
194
+ readonly color?: "warn" | "primary" | "accent" | undefined;
195
+ readonly help?: string | undefined;
196
+ readonly inputs?: {
197
+ inputType?: string | undefined;
198
+ optional?: boolean | undefined;
199
+ label: string;
200
+ value: string;
201
+ }[][] | undefined;
202
+ readonly outputs?: {
203
+ label: string;
204
+ value: string;
205
+ }[][] | undefined;
206
+ readonly disableHead: boolean;
207
+ readonly disableConnect: boolean;
208
+ readonly nodeMode?: "default" | "condition" | undefined;
209
+ };
@@ -0,0 +1,41 @@
1
+ import { NodeRunnerBase } from '../../../../runner/runner-item';
2
+ export declare class LlmRunner extends NodeRunnerBase {
3
+ #private;
4
+ run(): Promise<(outputName: string) => Promise<{
5
+ value: any;
6
+ dataId: string;
7
+ extra: {
8
+ content: string;
9
+ thinkContent?: string | undefined;
10
+ isThinking?: boolean | undefined;
11
+ delta: string;
12
+ historyList: ({
13
+ role: "system";
14
+ content: {
15
+ text: string;
16
+ type: "text";
17
+ }[];
18
+ } | {
19
+ role: "user";
20
+ content: ({
21
+ text: string;
22
+ type: "text";
23
+ } | {
24
+ image_url: {
25
+ url: string;
26
+ detail?: "auto" | "low" | "high" | undefined;
27
+ };
28
+ type: "image_url";
29
+ })[];
30
+ } | {
31
+ role: "assistant";
32
+ content: {
33
+ text: string;
34
+ type: "text";
35
+ }[];
36
+ thinkContent?: string | undefined;
37
+ })[];
38
+ references?: import("../../../..").ChatMetadata[] | undefined;
39
+ };
40
+ }>>;
41
+ }
@@ -0,0 +1,8 @@
1
+ export declare function getHumanTemplate(): {
2
+ role: "user";
3
+ content: never[];
4
+ };
5
+ export declare function getSystemTemplate(): {
6
+ role: string;
7
+ content: never[];
8
+ };
@@ -0,0 +1,2 @@
1
+ import { WebviewNodeConfig } from '../../../../share/type';
2
+ export declare const ChatWebviewConfig: WebviewNodeConfig;
@@ -0,0 +1,2 @@
1
+ export * from './chat/webview';
2
+ export * from './text/webview';
@@ -0,0 +1,2 @@
1
+ export * from './chat/main';
2
+ export * from './text/main';
@@ -0,0 +1,2 @@
1
+ import { NodeComponentType } from '../../../share/type';
2
+ export declare const NODE_COMMON: NodeComponentType;
@@ -0,0 +1,30 @@
1
+ import { TextareaRunner } from './textarea.runner';
2
+ export declare const TextMainConfig: {
3
+ readonly runner: typeof TextareaRunner;
4
+ readonly afterAdd?: (node: import("../../../..").CustomNode, injector: import("static-injector").Injector) => any;
5
+ readonly priority?: number;
6
+ readonly type: string;
7
+ readonly label?: string | undefined;
8
+ readonly icon?: {
9
+ fontIcon: string;
10
+ fontSet?: string | undefined;
11
+ } | {
12
+ fontIcon: string;
13
+ fontSet: undefined;
14
+ } | undefined;
15
+ readonly color?: "warn" | "primary" | "accent" | undefined;
16
+ readonly help?: string | undefined;
17
+ readonly inputs?: {
18
+ inputType?: string | undefined;
19
+ optional?: boolean | undefined;
20
+ label: string;
21
+ value: string;
22
+ }[][] | undefined;
23
+ readonly outputs?: {
24
+ label: string;
25
+ value: string;
26
+ }[][] | undefined;
27
+ readonly disableHead: boolean;
28
+ readonly disableConnect: boolean;
29
+ readonly nodeMode?: "default" | "condition" | undefined;
30
+ };
@@ -0,0 +1,7 @@
1
+ import { NodeRunnerBase } from '../../../../runner/runner-item';
2
+ export declare class TextareaRunner extends NodeRunnerBase {
3
+ #private;
4
+ run(): Promise<() => Promise<{
5
+ value: string;
6
+ }>>;
7
+ }
@@ -0,0 +1,6 @@
1
+ import * as v from 'valibot';
2
+ export declare const TEXT_NODE_DEFINE: v.LooseObjectSchema<{
3
+ readonly data: v.LooseObjectSchema<{
4
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, import("@piying/valibot-visit").ConditionAction<string>]>;
5
+ }, undefined>;
6
+ }, undefined>;
@@ -0,0 +1,2 @@
1
+ import { WebviewNodeConfig } from '../../../../share/type';
2
+ export declare const TextWebviewConfig: WebviewNodeConfig;
package/module.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ import { InlineNodeService } from './inline/inline.service';
2
+ import { WorkflowPluginService } from './plugin/plugin.service';
3
+ import { ContextBuildService } from './preset/context-build.service';
4
+ import { InlineBuilderService } from './preset/inline-build.service';
5
+ import { InlineParametersService } from './preset/inline-runner.service';
6
+ import { WorkflowRunnerService } from './runner/workflow-runner.service';
7
+ import { WorkflowFileService } from './workflow-file.service';
8
+ import { WorkflowExecService } from './workflow-exec.service';
9
+ import { WorkflowParserService } from './workflow-parser.service';
10
+ import { WorkflowSelectService } from './workflow-select.service';
11
+ export declare const WORKFLOW_MODULE: {
12
+ provider: (typeof WorkflowRunnerService | typeof WorkflowPluginService | typeof InlineNodeService | typeof WorkflowParserService | typeof InlineBuilderService | typeof InlineParametersService | typeof ContextBuildService | typeof WorkflowExecService | typeof WorkflowFileService | typeof WorkflowSelectService)[];
13
+ token: {
14
+ ChatServiceToken: import("static-injector").InjectionToken<{
15
+ chat: (input: Partial<import("@shenghuabi/openai").ChatModelOptions>) => ReturnType<import("@shenghuabi/openai").ChatProviderService["create"]>;
16
+ getMetadataEndRef: (list?: import("./share").ChatMetadata[]) => string;
17
+ getModelConfig: (name?: string) => import("valibot").InferOutput<typeof import("@shenghuabi/openai").ChatParamsListDefine>;
18
+ }>;
19
+ WorkflowConfigToken: import("static-injector").InjectionToken<import("static-injector").Signal<{
20
+ dir: string;
21
+ }>>;
22
+ };
23
+ };
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@shenghuabi/workflow",
3
+ "version": "1.0.0",
4
+ "description": "模板",
5
+ "author": "wszgrcy",
6
+ "sideEffects": false,
7
+ "type": "module",
8
+ "peerDependencies": {
9
+ "@cyia/bundle-file": "^1.5.2",
10
+ "@cyia/code-util": "^2.8.1",
11
+ "@cyia/external-call": "^1.5.2",
12
+ "@shenghuabi/openai": "1.0.0",
13
+ "@cyia/util": "^1.5.2",
14
+ "@cyia/vfs2": "^1.5.2",
15
+ "static-injector": "^6.1.2"
16
+ },
17
+ "dependencies": {
18
+ "@angular/core": "^20.3.3",
19
+ "@xyflow/react": "^12.8.6",
20
+ "graphology": "^0.26.0",
21
+ "handlebars": "^4.7.8",
22
+ "liquidjs": "^10.22.0",
23
+ "uuid": "^13.0.0"
24
+ },
25
+ "overrides": {},
26
+ "exports": {
27
+ ".": {
28
+ "types": "./index.d.ts",
29
+ "import": "./index.mjs",
30
+ "node": "./index.js",
31
+ "require": "./index.js"
32
+ },
33
+ "./share": {
34
+ "types": "./share/index.d.ts",
35
+ "import": "./share/index.mjs",
36
+ "node": "./share/index.js",
37
+ "require": "./share/index.js"
38
+ },
39
+ "./webview": {
40
+ "types": "./webview/index.d.ts",
41
+ "import": "./webview/index.mjs",
42
+ "node": "./webview/index.js",
43
+ "require": "./webview/index.js"
44
+ }
45
+ },
46
+ "publishConfig": {
47
+ "access": "public"
48
+ },
49
+ "repository": {
50
+ "url": "https://github.com/wszgrcy/toolkit"
51
+ }
52
+ }
@@ -0,0 +1,7 @@
1
+ import { NodeItemDefine } from '../type/type';
2
+ export declare class WorkflowPluginService {
3
+ nodeList: import("static-injector").WritableSignal<NodeItemDefine[]>;
4
+ setNodeObject(obj: NodeItemDefine[]): void;
5
+ conditionNodeList$$: import("static-injector").Signal<Record<string, any>>;
6
+ getNodeRunner(type: string): typeof import("..").NodeRunnerBase;
7
+ }
@@ -0,0 +1,102 @@
1
+ import { TemplateFormatService } from '../template-format.service';
2
+ import { WorkflowParserService } from '../workflow-parser.service';
3
+ import { WorkflowNodeType } from '../share/workflow.const';
4
+ import { ChatMessageListInputType } from '@shenghuabi/openai/define';
5
+ /** 对话使用 */
6
+ export declare class ContextBuildService {
7
+ template: TemplateFormatService;
8
+ parser: WorkflowParserService;
9
+ createWorkflow(input: {
10
+ template: ChatMessageListInputType;
11
+ input: Record<string, any>;
12
+ context: any;
13
+ }, inlineMode: boolean): {
14
+ nodes: ({
15
+ id: string;
16
+ data: {
17
+ title: string;
18
+ handle: {
19
+ input: {
20
+ id: string;
21
+ value: string;
22
+ label: string;
23
+ }[][];
24
+ output: {
25
+ id: string;
26
+ label: string;
27
+ value: string;
28
+ }[][];
29
+ };
30
+ value: ({
31
+ role: "system";
32
+ content: {
33
+ text: string;
34
+ type: "text";
35
+ }[];
36
+ } | {
37
+ role: "user";
38
+ content: ({
39
+ text: string;
40
+ type: "text";
41
+ } | {
42
+ image_url: {
43
+ url: string;
44
+ detail?: "auto" | "low" | "high" | undefined;
45
+ };
46
+ type: "image_url";
47
+ })[];
48
+ } | {
49
+ role: "assistant";
50
+ content: {
51
+ text: string;
52
+ type: "text";
53
+ }[];
54
+ thinkContent?: string | undefined;
55
+ })[];
56
+ config: {};
57
+ };
58
+ type: string;
59
+ } | {
60
+ id: string;
61
+ type: WorkflowNodeType;
62
+ data: {
63
+ handle: {
64
+ input: {
65
+ inputType: string;
66
+ id: string;
67
+ label: string;
68
+ value: string;
69
+ }[][];
70
+ output: {
71
+ id: string;
72
+ value: string;
73
+ label: string;
74
+ }[][];
75
+ };
76
+ };
77
+ } | {
78
+ id: string;
79
+ type: "inlineInputItem";
80
+ data: {
81
+ handle: {
82
+ input: {
83
+ id: string;
84
+ value: string;
85
+ label: string;
86
+ }[][];
87
+ output: {
88
+ id: string;
89
+ label: string;
90
+ value: string;
91
+ }[][];
92
+ };
93
+ };
94
+ })[];
95
+ edges: {
96
+ source: string;
97
+ sourceHandle: string;
98
+ target: string;
99
+ targetHandle: string;
100
+ }[];
101
+ };
102
+ }
@@ -0,0 +1,11 @@
1
+ import { TemplateFormatService } from '../template-format.service';
2
+ import { WorkflowParserService } from '../workflow-parser.service';
3
+ export declare class InlineBuilderService {
4
+ #private;
5
+ template: TemplateFormatService;
6
+ parser: WorkflowParserService;
7
+ createDefine(input: {
8
+ input: Record<string, any>;
9
+ context: Record<string, any>;
10
+ }): import("..").ResolvedWorkflowResult;
11
+ }
@@ -0,0 +1,16 @@
1
+ import { WorkflowRunnerEnvironmentParams } from '../share/type2';
2
+ import { ChatModelOptions } from '@shenghuabi/openai';
3
+ export declare class InlineParametersService {
4
+ #private;
5
+ run(input: {
6
+ input?: Record<string, any>;
7
+ context?: Record<string, any>;
8
+ modelOptions?: ChatModelOptions;
9
+ environmentParameters?: WorkflowRunnerEnvironmentParams;
10
+ }): Promise<{
11
+ value: Record<string, {
12
+ value: any;
13
+ extra?: any;
14
+ }>;
15
+ }>;
16
+ }
@@ -0,0 +1,12 @@
1
+ import { InlineInputItemRunner } from './inline-input-item.runner';
2
+ import { InputParamsRunner } from './input-params.runner';
3
+ import { IterationStartRunner } from './iteration-start.runner';
4
+ import { IterationRunner } from './iteration.runner';
5
+ import { ParametersRunner } from './parameters.runner';
6
+ export declare const ItemRunnerObject: {
7
+ iteration: typeof IterationRunner;
8
+ "iteration-start": typeof IterationStartRunner;
9
+ "input-params": typeof InputParamsRunner;
10
+ parameters: typeof ParametersRunner;
11
+ inlineInputItem: typeof InlineInputItemRunner;
12
+ };
@@ -0,0 +1,8 @@
1
+ import { NodeRunnerBase } from './runner-item';
2
+ export declare class InlineInputItemRunner extends NodeRunnerBase {
3
+ #private;
4
+ static runnerName: "inlineInputItem";
5
+ run(): Promise<() => Promise<{
6
+ value: any;
7
+ }>>;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { NodeRunnerBase } from './runner-item';
2
+ export declare class InputParamsRunner extends NodeRunnerBase {
3
+ #private;
4
+ run(): Promise<() => Promise<{
5
+ value: import("..").WorkflowRunnerEnvironmentParams;
6
+ }>>;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { NodeRunnerBase } from './runner-item';
2
+ export declare class IterationStartRunner extends NodeRunnerBase {
3
+ run(): Promise<() => Promise<{
4
+ value: any;
5
+ extra?: any;
6
+ }>>;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { NodeRunnerBase } from './runner-item';
2
+ export declare class IterationRunner extends NodeRunnerBase {
3
+ run(): Promise<(outputName: string) => Promise<{
4
+ extra?: any;
5
+ value: any;
6
+ }>>;
7
+ }
@@ -0,0 +1,10 @@
1
+ import { NodeRunnerBase } from './runner-item';
2
+ export declare class ParametersRunner extends NodeRunnerBase {
3
+ static runnerName: "parameters";
4
+ run(): Promise<() => Promise<{
5
+ value: Record<string, {
6
+ value: any;
7
+ extra?: any;
8
+ }>;
9
+ }>>;
10
+ }
@@ -0,0 +1,12 @@
1
+ export declare class RunnerError extends Error {
2
+ #private;
3
+ constructor(origin: any, list: {
4
+ title: string;
5
+ message?: string;
6
+ }[]);
7
+ create(item: {
8
+ title: string;
9
+ }): RunnerError;
10
+ }
11
+ export declare class AbortSignalError extends Error {
12
+ }