dsh-auto-flow 0.1.1 → 0.1.3

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.
@@ -1,66 +1,578 @@
1
1
  /* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
2
2
  import { z } from 'zod'
3
3
 
4
- const dsh_auto_flow_autoFlow_exec_parameter_0$schema = z.object({
5
- 'command': z.string(),
6
- 'workdir': z.union([z.undefined(), z.string()]).optional(),
7
- 'timeoutMs': z.union([z.undefined(), z.number()]).optional(),
8
- 'stdoutMaxBytes': z.union([z.undefined(), z.number()]).optional(),
9
- 'runInBackground': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
10
- })
11
- const dsh_auto_flow_autoFlow_exec_result$schema = z.union([z.object({
12
- 'kind': z.literal("foreground"),
13
- 'exitCode': z.union([z.literal(null), z.number()]),
14
- 'signal': z.union([z.literal(null), z.string()]),
15
- 'timedOut': z.boolean(),
16
- 'aborted': z.boolean(),
17
- 'timeoutMs': z.number(),
18
- 'stdout': z.object({
19
- 'text': z.string(),
20
- 'truncated': z.boolean(),
21
- 'spillPath': z.union([z.undefined(), z.string()]).optional(),
22
- }),
23
- 'stderr': z.object({
24
- 'text': z.string(),
25
- 'truncated': z.boolean(),
26
- 'spillPath': z.union([z.undefined(), z.string()]).optional(),
27
- }),
28
- 'sandbox': z.union([z.undefined(), z.object({
29
- 'mode': z.string(),
30
- 'denied': z.boolean(),
31
- 'enforcement': z.union([z.undefined(), z.string()]).optional(),
32
- 'runnerFailed': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
4
+ let FlowDataValueRemoteCodec$schema$value
5
+ const FlowDataValueRemoteCodec$schema = () => (FlowDataValueRemoteCodec$schema$value ??= z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema()))]))
6
+ let FlowDataValueRemoteCodec$schema2$value
7
+ const FlowDataValueRemoteCodec$schema2 = () => (FlowDataValueRemoteCodec$schema2$value ??= z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema2())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema2()))]))
8
+ let FlowDataValueRemoteCodec$schema3$value
9
+ const FlowDataValueRemoteCodec$schema3 = () => (FlowDataValueRemoteCodec$schema3$value ??= z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema3())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema3()))]))
10
+ let FlowDataValueRemoteCodec$schema4$value
11
+ const FlowDataValueRemoteCodec$schema4 = () => (FlowDataValueRemoteCodec$schema4$value ??= z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema4())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))]))
12
+ let FlowDataValueRemoteCodec$schema5$value
13
+ const FlowDataValueRemoteCodec$schema5 = () => (FlowDataValueRemoteCodec$schema5$value ??= z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema5())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema5()))]))
14
+ let FlowDataValueRemoteCodec$schema6$value
15
+ const FlowDataValueRemoteCodec$schema6 = () => (FlowDataValueRemoteCodec$schema6$value ??= z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema6())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema6()))]))
16
+ let FlowDataValueRemoteCodec$schema7$value
17
+ const FlowDataValueRemoteCodec$schema7 = () => (FlowDataValueRemoteCodec$schema7$value ??= z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema7())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema7()))]))
18
+ let FlowDataValueRemoteCodec$schema8$value
19
+ const FlowDataValueRemoteCodec$schema8 = () => (FlowDataValueRemoteCodec$schema8$value ??= z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema8())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema8()))]))
20
+ let FlowDataValueRemoteCodec$schema9$value
21
+ const FlowDataValueRemoteCodec$schema9 = () => (FlowDataValueRemoteCodec$schema9$value ??= z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema9())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema9()))]))
22
+ let ScriptParamFieldRemoteCodec$schema$value
23
+ const ScriptParamFieldRemoteCodec$schema = () => (ScriptParamFieldRemoteCodec$schema$value ??= z.object({
24
+ 'key': z.string(),
25
+ 'label': z.string(),
26
+ 'type': z.union([z.literal("string"), z.literal("number"), z.literal("boolean"), z.literal("object"), z.literal("file"), z.literal("array"), z.literal("select"), z.literal("datetime")]),
27
+ 'required': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
28
+ 'defaultValue': z.union([z.undefined(), z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema4())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))])), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))]).optional(),
29
+ 'options': z.union([z.undefined(), z.array(z.object({
30
+ 'label': z.string(),
31
+ 'value': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema4())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))]),
32
+ }))]).optional(),
33
+ 'multiple': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
34
+ 'format': z.union([z.undefined(), z.string()]).optional(),
35
+ 'placeholder': z.union([z.undefined(), z.string()]).optional(),
36
+ 'description': z.union([z.undefined(), z.string()]).optional(),
37
+ 'children': z.union([z.undefined(), z.array(z.lazy(() => ScriptParamFieldRemoteCodec$schema()))]).optional(),
38
+ 'variants': z.union([z.undefined(), z.array(z.object({
39
+ 'when': z.string(),
40
+ 'value': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema4())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))]),
41
+ 'children': z.array(z.lazy(() => ScriptParamFieldRemoteCodec$schema())),
42
+ }))]).optional(),
43
+ 'visibleWhen': z.union([z.undefined(), z.object({
44
+ 'key': z.string(),
45
+ 'op': z.union([z.undefined(), z.literal("eq"), z.literal("not"), z.literal("gte"), z.literal("lte"), z.literal("gt"), z.literal("lt"), z.literal("startsWith"), z.literal("endsWith"), z.literal("includes"), z.literal("regex"), z.literal("exists")]).optional(),
46
+ 'value': z.union([z.undefined(), z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema4())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))])), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))]).optional(),
47
+ 'values': z.union([z.undefined(), z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema4())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))]))]).optional(),
48
+ }), z.array(z.object({
49
+ 'key': z.string(),
50
+ 'op': z.union([z.undefined(), z.literal("eq"), z.literal("not"), z.literal("gte"), z.literal("lte"), z.literal("gt"), z.literal("lt"), z.literal("startsWith"), z.literal("endsWith"), z.literal("includes"), z.literal("regex"), z.literal("exists")]).optional(),
51
+ 'value': z.union([z.undefined(), z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema4())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))])), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))]).optional(),
52
+ 'values': z.union([z.undefined(), z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema4())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))]))]).optional(),
53
+ }))]).optional(),
54
+ }))
55
+ let dsh_auto_flow_autoFlow_approveRun_parameter_0$schema$value
56
+ const dsh_auto_flow_autoFlow_approveRun_parameter_0$schema = () => (dsh_auto_flow_autoFlow_approveRun_parameter_0$schema$value ??= z.string())
57
+ let dsh_auto_flow_autoFlow_approveRun_parameter_1$schema$value
58
+ const dsh_auto_flow_autoFlow_approveRun_parameter_1$schema = () => (dsh_auto_flow_autoFlow_approveRun_parameter_1$schema$value ??= z.string())
59
+ let dsh_auto_flow_autoFlow_approveRun_result$schema$value
60
+ const dsh_auto_flow_autoFlow_approveRun_result$schema = () => (dsh_auto_flow_autoFlow_approveRun_result$schema$value ??= z.object({
61
+ 'runId': z.string(),
62
+ 'workflowId': z.string(),
63
+ 'name': z.string(),
64
+ 'sessionId': z.union([z.undefined(), z.string()]).optional(),
65
+ 'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("completed"), z.literal("failed"), z.literal("cancelled"), z.literal("crashed")]),
66
+ 'workspaceDir': z.string(),
67
+ 'steps': z.array(z.object({
68
+ 'index': z.number(),
69
+ 'nodeId': z.string(),
70
+ 'itemCounts': z.union([z.undefined(), z.object({
71
+ 'in': z.record(z.string(), z.number()),
72
+ 'out': z.record(z.string(), z.number()),
33
73
  })]).optional(),
34
- }), z.object({
35
- 'kind': z.literal("background"),
36
- 'jobId': z.string(),
37
- })])
38
- const dsh_auto_flow_autoFlow_execKill_parameter_0$schema = z.string()
39
- const dsh_auto_flow_autoFlow_execKill_result$schema = z.object({
40
- 'kind': z.union([z.literal("requested"), z.literal("already-finished")]),
41
- })
42
- const dsh_auto_flow_autoFlow_execRead_parameter_0$schema = z.string()
43
- const dsh_auto_flow_autoFlow_execRead_result$schema = z.object({
44
- 'text': z.string(),
45
- 'status': z.string(),
46
- 'detail': z.union([z.undefined(), z.string()]).optional(),
47
- })
48
- const dsh_auto_flow_autoFlow_last_result$schema = z.union([z.literal(null), z.object({
49
- 'id': z.number(),
50
- 'text': z.string(),
74
+ 'inputSources': z.union([z.undefined(), z.array(z.string())]).optional(),
75
+ 'nodeType': z.string(),
76
+ 'label': z.string(),
77
+ 'status': z.union([z.literal("success"), z.literal("running"), z.literal("waiting"), z.literal("failed"), z.literal("pending"), z.literal("skipped")]),
78
+ 'statusChangedAt': z.union([z.undefined(), z.number()]).optional(),
79
+ 'startedAt': z.union([z.undefined(), z.number()]).optional(),
80
+ 'finishedAt': z.union([z.undefined(), z.number()]).optional(),
81
+ 'script': z.union([z.undefined(), z.string()]).optional(),
82
+ 'stepDir': z.union([z.undefined(), z.string()]).optional(),
83
+ 'files': z.union([z.undefined(), z.array(z.string())]).optional(),
84
+ 'items': z.union([z.undefined(), z.array(z.object({
85
+ 'json': z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema8())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema8()))])),
86
+ 'pairedItem': z.union([z.undefined(), z.number()]).optional(),
87
+ }))]).optional(),
88
+ 'portItems': z.union([z.undefined(), z.record(z.string(), z.array(z.object({
89
+ 'json': z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema8())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema8()))])),
90
+ 'pairedItem': z.union([z.undefined(), z.number()]).optional(),
91
+ })))]).optional(),
92
+ 'failedItems': z.union([z.undefined(), z.array(z.object({
93
+ 'index': z.number(),
94
+ 'error': z.string(),
95
+ }))]).optional(),
96
+ 'skippedCount': z.union([z.undefined(), z.number()]).optional(),
97
+ 'itemsRef': z.union([z.undefined(), z.string()]).optional(),
98
+ 'error': z.union([z.undefined(), z.string()]).optional(),
99
+ 'errorCode': z.union([z.undefined(), z.string()]).optional(),
100
+ 'durationMs': z.union([z.undefined(), z.number()]).optional(),
101
+ 'attempts': z.union([z.undefined(), z.array(z.object({
102
+ 'attempt': z.number(),
103
+ 'startedAt': z.number(),
104
+ 'finishedAt': z.number(),
105
+ 'durationMs': z.number(),
106
+ 'ok': z.boolean(),
107
+ 'itemCounts': z.union([z.undefined(), z.record(z.string(), z.number())]).optional(),
108
+ 'error': z.union([z.undefined(), z.string()]).optional(),
109
+ 'errorCode': z.union([z.undefined(), z.string()]).optional(),
110
+ 'retryable': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
111
+ }))]).optional(),
112
+ 'logs': z.union([z.undefined(), z.array(z.object({
113
+ 'at': z.number(),
114
+ 'kind': z.string(),
115
+ 'message': z.string(),
116
+ 'data': z.union([z.undefined(), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema8())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema8()))]))]).optional(),
117
+ }))]).optional(),
118
+ })),
119
+ 'batch': z.union([z.undefined(), z.object({
120
+ 'batchId': z.string(),
121
+ 'nodeId': z.string(),
122
+ 'port': z.string(),
123
+ 'keyField': z.union([z.undefined(), z.string()]).optional(),
124
+ })]).optional(),
125
+ 'resumeMode': z.union([z.undefined(), z.literal("rerun-all"), z.literal("skip-succeeded")]).optional(),
51
126
  'createdAt': z.number(),
52
- })])
53
- const dsh_auto_flow_autoFlow_list_result$schema = z.array(z.object({
54
- 'id': z.number(),
55
- 'text': z.string(),
127
+ 'updatedAt': z.number(),
128
+ }))
129
+ let dsh_auto_flow_autoFlow_cancelRun_parameter_0$schema$value
130
+ const dsh_auto_flow_autoFlow_cancelRun_parameter_0$schema = () => (dsh_auto_flow_autoFlow_cancelRun_parameter_0$schema$value ??= z.string())
131
+ let dsh_auto_flow_autoFlow_cancelRun_result$schema$value
132
+ const dsh_auto_flow_autoFlow_cancelRun_result$schema = () => (dsh_auto_flow_autoFlow_cancelRun_result$schema$value ??= z.object({
133
+ 'runId': z.string(),
134
+ 'workflowId': z.string(),
135
+ 'name': z.string(),
136
+ 'sessionId': z.union([z.undefined(), z.string()]).optional(),
137
+ 'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("completed"), z.literal("failed"), z.literal("cancelled"), z.literal("crashed")]),
138
+ 'workspaceDir': z.string(),
139
+ 'steps': z.array(z.object({
140
+ 'index': z.number(),
141
+ 'nodeId': z.string(),
142
+ 'itemCounts': z.union([z.undefined(), z.object({
143
+ 'in': z.record(z.string(), z.number()),
144
+ 'out': z.record(z.string(), z.number()),
145
+ })]).optional(),
146
+ 'inputSources': z.union([z.undefined(), z.array(z.string())]).optional(),
147
+ 'nodeType': z.string(),
148
+ 'label': z.string(),
149
+ 'status': z.union([z.literal("success"), z.literal("running"), z.literal("waiting"), z.literal("failed"), z.literal("pending"), z.literal("skipped")]),
150
+ 'statusChangedAt': z.union([z.undefined(), z.number()]).optional(),
151
+ 'startedAt': z.union([z.undefined(), z.number()]).optional(),
152
+ 'finishedAt': z.union([z.undefined(), z.number()]).optional(),
153
+ 'script': z.union([z.undefined(), z.string()]).optional(),
154
+ 'stepDir': z.union([z.undefined(), z.string()]).optional(),
155
+ 'files': z.union([z.undefined(), z.array(z.string())]).optional(),
156
+ 'items': z.union([z.undefined(), z.array(z.object({
157
+ 'json': z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema7())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema7()))])),
158
+ 'pairedItem': z.union([z.undefined(), z.number()]).optional(),
159
+ }))]).optional(),
160
+ 'portItems': z.union([z.undefined(), z.record(z.string(), z.array(z.object({
161
+ 'json': z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema7())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema7()))])),
162
+ 'pairedItem': z.union([z.undefined(), z.number()]).optional(),
163
+ })))]).optional(),
164
+ 'failedItems': z.union([z.undefined(), z.array(z.object({
165
+ 'index': z.number(),
166
+ 'error': z.string(),
167
+ }))]).optional(),
168
+ 'skippedCount': z.union([z.undefined(), z.number()]).optional(),
169
+ 'itemsRef': z.union([z.undefined(), z.string()]).optional(),
170
+ 'error': z.union([z.undefined(), z.string()]).optional(),
171
+ 'errorCode': z.union([z.undefined(), z.string()]).optional(),
172
+ 'durationMs': z.union([z.undefined(), z.number()]).optional(),
173
+ 'attempts': z.union([z.undefined(), z.array(z.object({
174
+ 'attempt': z.number(),
175
+ 'startedAt': z.number(),
176
+ 'finishedAt': z.number(),
177
+ 'durationMs': z.number(),
178
+ 'ok': z.boolean(),
179
+ 'itemCounts': z.union([z.undefined(), z.record(z.string(), z.number())]).optional(),
180
+ 'error': z.union([z.undefined(), z.string()]).optional(),
181
+ 'errorCode': z.union([z.undefined(), z.string()]).optional(),
182
+ 'retryable': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
183
+ }))]).optional(),
184
+ 'logs': z.union([z.undefined(), z.array(z.object({
185
+ 'at': z.number(),
186
+ 'kind': z.string(),
187
+ 'message': z.string(),
188
+ 'data': z.union([z.undefined(), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema7())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema7()))]))]).optional(),
189
+ }))]).optional(),
190
+ })),
191
+ 'batch': z.union([z.undefined(), z.object({
192
+ 'batchId': z.string(),
193
+ 'nodeId': z.string(),
194
+ 'port': z.string(),
195
+ 'keyField': z.union([z.undefined(), z.string()]).optional(),
196
+ })]).optional(),
197
+ 'resumeMode': z.union([z.undefined(), z.literal("rerun-all"), z.literal("skip-succeeded")]).optional(),
56
198
  'createdAt': z.number(),
199
+ 'updatedAt': z.number(),
200
+ }))
201
+ let dsh_auto_flow_autoFlow_deleteFlow_parameter_0$schema$value
202
+ const dsh_auto_flow_autoFlow_deleteFlow_parameter_0$schema = () => (dsh_auto_flow_autoFlow_deleteFlow_parameter_0$schema$value ??= z.string())
203
+ let dsh_auto_flow_autoFlow_deleteFlow_result$schema$value
204
+ const dsh_auto_flow_autoFlow_deleteFlow_result$schema = () => (dsh_auto_flow_autoFlow_deleteFlow_result$schema$value ??= z.object({
205
+ 'deleted': z.boolean(),
206
+ }))
207
+ let dsh_auto_flow_autoFlow_listFlows_result$schema$value
208
+ const dsh_auto_flow_autoFlow_listFlows_result$schema = () => (dsh_auto_flow_autoFlow_listFlows_result$schema$value ??= z.array(z.object({
209
+ 'id': z.string(),
210
+ 'name': z.string(),
211
+ 'description': z.string(),
212
+ 'nodeCount': z.number(),
213
+ 'inputs': z.array(z.string()),
214
+ })))
215
+ let dsh_auto_flow_autoFlow_listLlmRoutes_result$schema$value
216
+ const dsh_auto_flow_autoFlow_listLlmRoutes_result$schema = () => (dsh_auto_flow_autoFlow_listLlmRoutes_result$schema$value ??= z.object({
217
+ 'routes': z.array(z.object({
218
+ 'provider': z.string(),
219
+ 'displayName': z.string(),
220
+ })),
221
+ }))
222
+ let dsh_auto_flow_autoFlow_listRouteModels_parameter_0$schema$value
223
+ const dsh_auto_flow_autoFlow_listRouteModels_parameter_0$schema = () => (dsh_auto_flow_autoFlow_listRouteModels_parameter_0$schema$value ??= z.object({
224
+ 'provider': z.string(),
57
225
  }))
58
- const dsh_auto_flow_autoFlow_send_parameter_0$schema = z.string()
59
- const dsh_auto_flow_autoFlow_send_result$schema = z.object({
60
- 'id': z.number(),
61
- 'text': z.string(),
226
+ let dsh_auto_flow_autoFlow_listRouteModels_result$schema$value
227
+ const dsh_auto_flow_autoFlow_listRouteModels_result$schema = () => (dsh_auto_flow_autoFlow_listRouteModels_result$schema$value ??= z.object({
228
+ 'models': z.array(z.object({
229
+ 'id': z.string(),
230
+ 'name': z.string(),
231
+ })),
232
+ 'error': z.union([z.undefined(), z.string()]).optional(),
233
+ }))
234
+ let dsh_auto_flow_autoFlow_listRuns_parameter_0$schema$value
235
+ const dsh_auto_flow_autoFlow_listRuns_parameter_0$schema = () => (dsh_auto_flow_autoFlow_listRuns_parameter_0$schema$value ??= z.object({
236
+ 'sessionId': z.union([z.undefined(), z.string()]).optional(),
237
+ 'workflowId': z.union([z.undefined(), z.string()]).optional(),
238
+ }))
239
+ let dsh_auto_flow_autoFlow_listRuns_result$schema$value
240
+ const dsh_auto_flow_autoFlow_listRuns_result$schema = () => (dsh_auto_flow_autoFlow_listRuns_result$schema$value ??= z.array(z.object({
241
+ 'runId': z.string(),
242
+ 'workflowId': z.string(),
243
+ 'name': z.string(),
244
+ 'sessionId': z.union([z.undefined(), z.string()]).optional(),
245
+ 'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("completed"), z.literal("failed"), z.literal("cancelled"), z.literal("crashed")]),
246
+ 'nodeCount': z.number(),
247
+ 'createdAt': z.number(),
248
+ 'updatedAt': z.number(),
249
+ })))
250
+ let dsh_auto_flow_autoFlow_listScripts_result$schema$value
251
+ const dsh_auto_flow_autoFlow_listScripts_result$schema = () => (dsh_auto_flow_autoFlow_listScripts_result$schema$value ??= z.array(z.object({
252
+ 'name': z.string(),
253
+ 'label': z.string(),
254
+ 'description': z.string(),
255
+ 'params': z.array(z.object({
256
+ 'key': z.string(),
257
+ 'label': z.string(),
258
+ 'type': z.union([z.literal("string"), z.literal("number"), z.literal("boolean"), z.literal("object"), z.literal("file"), z.literal("array"), z.literal("select"), z.literal("datetime")]),
259
+ 'required': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
260
+ 'defaultValue': z.union([z.undefined(), z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema4())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))])), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))]).optional(),
261
+ 'options': z.union([z.undefined(), z.array(z.object({
262
+ 'label': z.string(),
263
+ 'value': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema4())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))]),
264
+ }))]).optional(),
265
+ 'multiple': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
266
+ 'format': z.union([z.undefined(), z.string()]).optional(),
267
+ 'placeholder': z.union([z.undefined(), z.string()]).optional(),
268
+ 'description': z.union([z.undefined(), z.string()]).optional(),
269
+ 'children': z.union([z.undefined(), z.array(z.lazy(() => ScriptParamFieldRemoteCodec$schema()))]).optional(),
270
+ 'variants': z.union([z.undefined(), z.array(z.object({
271
+ 'when': z.string(),
272
+ 'value': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema4())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))]),
273
+ 'children': z.array(z.lazy(() => ScriptParamFieldRemoteCodec$schema())),
274
+ }))]).optional(),
275
+ 'visibleWhen': z.union([z.undefined(), z.object({
276
+ 'key': z.string(),
277
+ 'op': z.union([z.undefined(), z.literal("eq"), z.literal("not"), z.literal("gte"), z.literal("lte"), z.literal("gt"), z.literal("lt"), z.literal("startsWith"), z.literal("endsWith"), z.literal("includes"), z.literal("regex"), z.literal("exists")]).optional(),
278
+ 'value': z.union([z.undefined(), z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema4())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))])), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))]).optional(),
279
+ 'values': z.union([z.undefined(), z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema4())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))]))]).optional(),
280
+ }), z.array(z.object({
281
+ 'key': z.string(),
282
+ 'op': z.union([z.undefined(), z.literal("eq"), z.literal("not"), z.literal("gte"), z.literal("lte"), z.literal("gt"), z.literal("lt"), z.literal("startsWith"), z.literal("endsWith"), z.literal("includes"), z.literal("regex"), z.literal("exists")]).optional(),
283
+ 'value': z.union([z.undefined(), z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema4())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))])), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))]).optional(),
284
+ 'values': z.union([z.undefined(), z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema4())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4()))]))]).optional(),
285
+ }))]).optional(),
286
+ })),
287
+ 'artifacts': z.union([z.undefined(), z.object({
288
+ 'filesKey': z.union([z.undefined(), z.string()]).optional(),
289
+ 'filesShape': z.union([z.undefined(), z.literal("paths"), z.literal("prompt-pairs")]).optional(),
290
+ 'filesPromptKey': z.union([z.undefined(), z.string()]).optional(),
291
+ })]).optional(),
292
+ 'source': z.union([z.undefined(), z.object({
293
+ 'id': z.string(),
294
+ 'label': z.string(),
295
+ })]).optional(),
296
+ 'diagnostics': z.union([z.undefined(), z.array(z.object({
297
+ 'name': z.string(),
298
+ 'code': z.string(),
299
+ 'message': z.string(),
300
+ }))]).optional(),
301
+ })))
302
+ let dsh_auto_flow_autoFlow_loadFlow_parameter_0$schema$value
303
+ const dsh_auto_flow_autoFlow_loadFlow_parameter_0$schema = () => (dsh_auto_flow_autoFlow_loadFlow_parameter_0$schema$value ??= z.string())
304
+ let dsh_auto_flow_autoFlow_loadFlow_result$schema$value
305
+ const dsh_auto_flow_autoFlow_loadFlow_result$schema = () => (dsh_auto_flow_autoFlow_loadFlow_result$schema$value ??= z.union([z.literal(null), z.object({
306
+ 'formatVersion': z.number(),
307
+ 'name': z.string(),
308
+ 'description': z.string(),
309
+ 'nodes': z.array(z.object({
310
+ 'id': z.string(),
311
+ 'name': z.string(),
312
+ 'type': z.string(),
313
+ 'position': z.object({
314
+ 'x': z.number(),
315
+ 'y': z.number(),
316
+ }),
317
+ 'data': z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema()))])),
318
+ 'style': z.union([z.undefined(), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema()))]))]).optional(),
319
+ })),
320
+ 'edges': z.array(z.object({
321
+ 'id': z.string(),
322
+ 'source': z.string(),
323
+ 'target': z.string(),
324
+ 'sourceHandle': z.union([z.undefined(), z.string()]).optional(),
325
+ 'targetHandle': z.union([z.undefined(), z.string()]).optional(),
326
+ 'type': z.union([z.undefined(), z.literal("default"), z.literal("custom-edge"), z.literal("straight"), z.literal("step"), z.literal("smoothstep"), z.literal("simplebezier")]).optional(),
327
+ })),
328
+ })]))
329
+ let dsh_auto_flow_autoFlow_resumeRun_parameter_0$schema$value
330
+ const dsh_auto_flow_autoFlow_resumeRun_parameter_0$schema = () => (dsh_auto_flow_autoFlow_resumeRun_parameter_0$schema$value ??= z.string())
331
+ let dsh_auto_flow_autoFlow_resumeRun_result$schema$value
332
+ const dsh_auto_flow_autoFlow_resumeRun_result$schema = () => (dsh_auto_flow_autoFlow_resumeRun_result$schema$value ??= z.object({
333
+ 'runId': z.string(),
334
+ 'workflowId': z.string(),
335
+ 'name': z.string(),
336
+ 'sessionId': z.union([z.undefined(), z.string()]).optional(),
337
+ 'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("completed"), z.literal("failed"), z.literal("cancelled"), z.literal("crashed")]),
338
+ 'workspaceDir': z.string(),
339
+ 'steps': z.array(z.object({
340
+ 'index': z.number(),
341
+ 'nodeId': z.string(),
342
+ 'itemCounts': z.union([z.undefined(), z.object({
343
+ 'in': z.record(z.string(), z.number()),
344
+ 'out': z.record(z.string(), z.number()),
345
+ })]).optional(),
346
+ 'inputSources': z.union([z.undefined(), z.array(z.string())]).optional(),
347
+ 'nodeType': z.string(),
348
+ 'label': z.string(),
349
+ 'status': z.union([z.literal("success"), z.literal("running"), z.literal("waiting"), z.literal("failed"), z.literal("pending"), z.literal("skipped")]),
350
+ 'statusChangedAt': z.union([z.undefined(), z.number()]).optional(),
351
+ 'startedAt': z.union([z.undefined(), z.number()]).optional(),
352
+ 'finishedAt': z.union([z.undefined(), z.number()]).optional(),
353
+ 'script': z.union([z.undefined(), z.string()]).optional(),
354
+ 'stepDir': z.union([z.undefined(), z.string()]).optional(),
355
+ 'files': z.union([z.undefined(), z.array(z.string())]).optional(),
356
+ 'items': z.union([z.undefined(), z.array(z.object({
357
+ 'json': z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema9())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema9()))])),
358
+ 'pairedItem': z.union([z.undefined(), z.number()]).optional(),
359
+ }))]).optional(),
360
+ 'portItems': z.union([z.undefined(), z.record(z.string(), z.array(z.object({
361
+ 'json': z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema9())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema9()))])),
362
+ 'pairedItem': z.union([z.undefined(), z.number()]).optional(),
363
+ })))]).optional(),
364
+ 'failedItems': z.union([z.undefined(), z.array(z.object({
365
+ 'index': z.number(),
366
+ 'error': z.string(),
367
+ }))]).optional(),
368
+ 'skippedCount': z.union([z.undefined(), z.number()]).optional(),
369
+ 'itemsRef': z.union([z.undefined(), z.string()]).optional(),
370
+ 'error': z.union([z.undefined(), z.string()]).optional(),
371
+ 'errorCode': z.union([z.undefined(), z.string()]).optional(),
372
+ 'durationMs': z.union([z.undefined(), z.number()]).optional(),
373
+ 'attempts': z.union([z.undefined(), z.array(z.object({
374
+ 'attempt': z.number(),
375
+ 'startedAt': z.number(),
376
+ 'finishedAt': z.number(),
377
+ 'durationMs': z.number(),
378
+ 'ok': z.boolean(),
379
+ 'itemCounts': z.union([z.undefined(), z.record(z.string(), z.number())]).optional(),
380
+ 'error': z.union([z.undefined(), z.string()]).optional(),
381
+ 'errorCode': z.union([z.undefined(), z.string()]).optional(),
382
+ 'retryable': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
383
+ }))]).optional(),
384
+ 'logs': z.union([z.undefined(), z.array(z.object({
385
+ 'at': z.number(),
386
+ 'kind': z.string(),
387
+ 'message': z.string(),
388
+ 'data': z.union([z.undefined(), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema9())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema9()))]))]).optional(),
389
+ }))]).optional(),
390
+ })),
391
+ 'batch': z.union([z.undefined(), z.object({
392
+ 'batchId': z.string(),
393
+ 'nodeId': z.string(),
394
+ 'port': z.string(),
395
+ 'keyField': z.union([z.undefined(), z.string()]).optional(),
396
+ })]).optional(),
397
+ 'resumeMode': z.union([z.undefined(), z.literal("rerun-all"), z.literal("skip-succeeded")]).optional(),
62
398
  'createdAt': z.number(),
63
- })
399
+ 'updatedAt': z.number(),
400
+ }))
401
+ let dsh_auto_flow_autoFlow_retryRun_parameter_0$schema$value
402
+ const dsh_auto_flow_autoFlow_retryRun_parameter_0$schema = () => (dsh_auto_flow_autoFlow_retryRun_parameter_0$schema$value ??= z.string())
403
+ let dsh_auto_flow_autoFlow_retryRun_result$schema$value
404
+ const dsh_auto_flow_autoFlow_retryRun_result$schema = () => (dsh_auto_flow_autoFlow_retryRun_result$schema$value ??= z.object({
405
+ 'runId': z.string(),
406
+ 'plan': z.object({
407
+ 'batchId': z.string(),
408
+ 'keyField': z.string(),
409
+ 'resumeMode': z.union([z.literal("rerun-all"), z.literal("skip-succeeded")]),
410
+ 'pendingCount': z.number(),
411
+ 'knownCount': z.number(),
412
+ }),
413
+ }))
414
+ let dsh_auto_flow_autoFlow_runFlow_parameter_0$schema$value
415
+ const dsh_auto_flow_autoFlow_runFlow_parameter_0$schema = () => (dsh_auto_flow_autoFlow_runFlow_parameter_0$schema$value ??= z.object({
416
+ 'flow': z.object({
417
+ 'nodes': z.array(z.object({
418
+ 'id': z.string(),
419
+ 'name': z.string(),
420
+ 'type': z.string(),
421
+ 'position': z.object({
422
+ 'x': z.number(),
423
+ 'y': z.number(),
424
+ }),
425
+ 'data': z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema5())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema5()))])),
426
+ 'style': z.union([z.undefined(), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema5())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema5()))]))]).optional(),
427
+ })),
428
+ 'edges': z.array(z.object({
429
+ 'id': z.string(),
430
+ 'source': z.string(),
431
+ 'target': z.string(),
432
+ 'sourceHandle': z.union([z.undefined(), z.string()]).optional(),
433
+ 'targetHandle': z.union([z.undefined(), z.string()]).optional(),
434
+ 'type': z.union([z.undefined(), z.literal("default"), z.literal("custom-edge"), z.literal("straight"), z.literal("step"), z.literal("smoothstep"), z.literal("simplebezier")]).optional(),
435
+ })),
436
+ }),
437
+ 'workflowId': z.string().optional(),
438
+ 'name': z.string().optional(),
439
+ 'sessionId': z.string().optional(),
440
+ }))
441
+ let dsh_auto_flow_autoFlow_runFlow_result$schema$value
442
+ const dsh_auto_flow_autoFlow_runFlow_result$schema = () => (dsh_auto_flow_autoFlow_runFlow_result$schema$value ??= z.object({
443
+ 'runId': z.string(),
444
+ }))
445
+ let dsh_auto_flow_autoFlow_runState_parameter_0$schema$value
446
+ const dsh_auto_flow_autoFlow_runState_parameter_0$schema = () => (dsh_auto_flow_autoFlow_runState_parameter_0$schema$value ??= z.string())
447
+ let dsh_auto_flow_autoFlow_runState_result$schema$value
448
+ const dsh_auto_flow_autoFlow_runState_result$schema = () => (dsh_auto_flow_autoFlow_runState_result$schema$value ??= z.union([z.literal(null), z.object({
449
+ 'runId': z.string(),
450
+ 'workflowId': z.string(),
451
+ 'name': z.string(),
452
+ 'sessionId': z.union([z.undefined(), z.string()]).optional(),
453
+ 'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("completed"), z.literal("failed"), z.literal("cancelled"), z.literal("crashed")]),
454
+ 'workspaceDir': z.string(),
455
+ 'steps': z.array(z.object({
456
+ 'index': z.number(),
457
+ 'nodeId': z.string(),
458
+ 'itemCounts': z.union([z.undefined(), z.object({
459
+ 'in': z.record(z.string(), z.number()),
460
+ 'out': z.record(z.string(), z.number()),
461
+ })]).optional(),
462
+ 'inputSources': z.union([z.undefined(), z.array(z.string())]).optional(),
463
+ 'nodeType': z.string(),
464
+ 'label': z.string(),
465
+ 'status': z.union([z.literal("success"), z.literal("running"), z.literal("waiting"), z.literal("failed"), z.literal("pending"), z.literal("skipped")]),
466
+ 'statusChangedAt': z.union([z.undefined(), z.number()]).optional(),
467
+ 'startedAt': z.union([z.undefined(), z.number()]).optional(),
468
+ 'finishedAt': z.union([z.undefined(), z.number()]).optional(),
469
+ 'script': z.union([z.undefined(), z.string()]).optional(),
470
+ 'stepDir': z.union([z.undefined(), z.string()]).optional(),
471
+ 'files': z.union([z.undefined(), z.array(z.string())]).optional(),
472
+ 'items': z.union([z.undefined(), z.array(z.object({
473
+ 'json': z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema6())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema6()))])),
474
+ 'pairedItem': z.union([z.undefined(), z.number()]).optional(),
475
+ }))]).optional(),
476
+ 'portItems': z.union([z.undefined(), z.record(z.string(), z.array(z.object({
477
+ 'json': z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema6())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema6()))])),
478
+ 'pairedItem': z.union([z.undefined(), z.number()]).optional(),
479
+ })))]).optional(),
480
+ 'failedItems': z.union([z.undefined(), z.array(z.object({
481
+ 'index': z.number(),
482
+ 'error': z.string(),
483
+ }))]).optional(),
484
+ 'skippedCount': z.union([z.undefined(), z.number()]).optional(),
485
+ 'itemsRef': z.union([z.undefined(), z.string()]).optional(),
486
+ 'error': z.union([z.undefined(), z.string()]).optional(),
487
+ 'errorCode': z.union([z.undefined(), z.string()]).optional(),
488
+ 'durationMs': z.union([z.undefined(), z.number()]).optional(),
489
+ 'attempts': z.union([z.undefined(), z.array(z.object({
490
+ 'attempt': z.number(),
491
+ 'startedAt': z.number(),
492
+ 'finishedAt': z.number(),
493
+ 'durationMs': z.number(),
494
+ 'ok': z.boolean(),
495
+ 'itemCounts': z.union([z.undefined(), z.record(z.string(), z.number())]).optional(),
496
+ 'error': z.union([z.undefined(), z.string()]).optional(),
497
+ 'errorCode': z.union([z.undefined(), z.string()]).optional(),
498
+ 'retryable': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
499
+ }))]).optional(),
500
+ 'logs': z.union([z.undefined(), z.array(z.object({
501
+ 'at': z.number(),
502
+ 'kind': z.string(),
503
+ 'message': z.string(),
504
+ 'data': z.union([z.undefined(), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema6())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema6()))]))]).optional(),
505
+ }))]).optional(),
506
+ })),
507
+ 'batch': z.union([z.undefined(), z.object({
508
+ 'batchId': z.string(),
509
+ 'nodeId': z.string(),
510
+ 'port': z.string(),
511
+ 'keyField': z.union([z.undefined(), z.string()]).optional(),
512
+ })]).optional(),
513
+ 'resumeMode': z.union([z.undefined(), z.literal("rerun-all"), z.literal("skip-succeeded")]).optional(),
514
+ 'createdAt': z.number(),
515
+ 'updatedAt': z.number(),
516
+ })]))
517
+ let dsh_auto_flow_autoFlow_saveFlow_parameter_0$schema$value
518
+ const dsh_auto_flow_autoFlow_saveFlow_parameter_0$schema = () => (dsh_auto_flow_autoFlow_saveFlow_parameter_0$schema$value ??= z.string())
519
+ let dsh_auto_flow_autoFlow_saveFlow_parameter_1$schema$value
520
+ const dsh_auto_flow_autoFlow_saveFlow_parameter_1$schema = () => (dsh_auto_flow_autoFlow_saveFlow_parameter_1$schema$value ??= z.object({
521
+ 'formatVersion': z.number(),
522
+ 'name': z.string(),
523
+ 'description': z.string(),
524
+ 'nodes': z.array(z.object({
525
+ 'id': z.string(),
526
+ 'name': z.string(),
527
+ 'type': z.string(),
528
+ 'position': z.object({
529
+ 'x': z.number(),
530
+ 'y': z.number(),
531
+ }),
532
+ 'data': z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema2())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema2()))])),
533
+ 'style': z.union([z.undefined(), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema2())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema2()))]))]).optional(),
534
+ })),
535
+ 'edges': z.array(z.object({
536
+ 'id': z.string(),
537
+ 'source': z.string(),
538
+ 'target': z.string(),
539
+ 'sourceHandle': z.union([z.undefined(), z.string()]).optional(),
540
+ 'targetHandle': z.union([z.undefined(), z.string()]).optional(),
541
+ 'type': z.union([z.undefined(), z.literal("default"), z.literal("custom-edge"), z.literal("straight"), z.literal("step"), z.literal("smoothstep"), z.literal("simplebezier")]).optional(),
542
+ })),
543
+ }))
544
+ let dsh_auto_flow_autoFlow_saveFlow_result$schema$value
545
+ const dsh_auto_flow_autoFlow_saveFlow_result$schema = () => (dsh_auto_flow_autoFlow_saveFlow_result$schema$value ??= z.object({
546
+ 'formatVersion': z.number(),
547
+ 'name': z.string(),
548
+ 'description': z.string(),
549
+ 'nodes': z.array(z.object({
550
+ 'id': z.string(),
551
+ 'name': z.string(),
552
+ 'type': z.string(),
553
+ 'position': z.object({
554
+ 'x': z.number(),
555
+ 'y': z.number(),
556
+ }),
557
+ 'data': z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema3())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema3()))])),
558
+ 'style': z.union([z.undefined(), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => FlowDataValueRemoteCodec$schema3())), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema3()))]))]).optional(),
559
+ })),
560
+ 'edges': z.array(z.object({
561
+ 'id': z.string(),
562
+ 'source': z.string(),
563
+ 'target': z.string(),
564
+ 'sourceHandle': z.union([z.undefined(), z.string()]).optional(),
565
+ 'targetHandle': z.union([z.undefined(), z.string()]).optional(),
566
+ 'type': z.union([z.undefined(), z.literal("default"), z.literal("custom-edge"), z.literal("straight"), z.literal("step"), z.literal("smoothstep"), z.literal("simplebezier")]).optional(),
567
+ })),
568
+ }))
569
+ let dsh_auto_flow_autoFlow_unitUrl_parameter_0$schema$value
570
+ const dsh_auto_flow_autoFlow_unitUrl_parameter_0$schema = () => (dsh_auto_flow_autoFlow_unitUrl_parameter_0$schema$value ??= z.string())
571
+ let dsh_auto_flow_autoFlow_unitUrl_result$schema$value
572
+ const dsh_auto_flow_autoFlow_unitUrl_result$schema = () => (dsh_auto_flow_autoFlow_unitUrl_result$schema$value ??= z.object({
573
+ 'url': z.union([z.literal(null), z.string()]),
574
+ 'reason': z.string().optional(),
575
+ }))
64
576
 
65
577
  export const TYPERT = {
66
578
  package: 'dsh-auto-flow',
@@ -69,10 +581,150 @@ export const TYPERT = {
69
581
  ],
70
582
  invocations: [
71
583
  {
72
- id: 'dsh-auto-flow#autoFlow/exec',
584
+ id: 'dsh-auto-flow#autoFlow/approveRun',
73
585
  service: 'autoFlow',
74
586
  namespace: 'autoFlow',
75
- method: 'exec',
587
+ method: 'approveRun',
588
+ invocation: { kind: 'direct' },
589
+ parameters: [
590
+ {
591
+ name: 'runId',
592
+ wire: 'runId',
593
+ source: 'json',
594
+ codec: {
595
+ mode: 'strict',
596
+ typeSymbol: 'dsh-auto-flow#autoFlow/approveRun:runId',
597
+ create: dsh_auto_flow_autoFlow_approveRun_parameter_0$schema,
598
+ },
599
+ },
600
+ {
601
+ name: 'choice',
602
+ wire: 'choice',
603
+ source: 'json',
604
+ codec: {
605
+ mode: 'strict',
606
+ typeSymbol: 'dsh-auto-flow#autoFlow/approveRun:choice',
607
+ create: dsh_auto_flow_autoFlow_approveRun_parameter_1$schema,
608
+ },
609
+ },
610
+ ],
611
+ result: {
612
+ mode: 'strict',
613
+ typeSymbol: 'workflow/types#RunState',
614
+ create: dsh_auto_flow_autoFlow_approveRun_result$schema,
615
+ },
616
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":533,"column":9},
617
+ },
618
+ {
619
+ id: 'dsh-auto-flow#autoFlow/cancelRun',
620
+ service: 'autoFlow',
621
+ namespace: 'autoFlow',
622
+ method: 'cancelRun',
623
+ invocation: { kind: 'direct' },
624
+ parameters: [
625
+ {
626
+ name: 'runId',
627
+ wire: 'runId',
628
+ source: 'json',
629
+ codec: {
630
+ mode: 'strict',
631
+ typeSymbol: 'dsh-auto-flow#autoFlow/cancelRun:runId',
632
+ create: dsh_auto_flow_autoFlow_cancelRun_parameter_0$schema,
633
+ },
634
+ },
635
+ ],
636
+ result: {
637
+ mode: 'strict',
638
+ typeSymbol: 'workflow/types#RunState',
639
+ create: dsh_auto_flow_autoFlow_cancelRun_result$schema,
640
+ },
641
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":527,"column":9},
642
+ },
643
+ {
644
+ id: 'dsh-auto-flow#autoFlow/deleteFlow',
645
+ service: 'autoFlow',
646
+ namespace: 'autoFlow',
647
+ method: 'deleteFlow',
648
+ invocation: { kind: 'direct' },
649
+ parameters: [
650
+ {
651
+ name: 'flowId',
652
+ wire: 'flowId',
653
+ source: 'json',
654
+ codec: {
655
+ mode: 'strict',
656
+ typeSymbol: 'dsh-auto-flow#autoFlow/deleteFlow:flowId',
657
+ create: dsh_auto_flow_autoFlow_deleteFlow_parameter_0$schema,
658
+ },
659
+ },
660
+ ],
661
+ result: {
662
+ mode: 'strict',
663
+ typeSymbol: 'dsh-auto-flow#autoFlow/deleteFlow:result',
664
+ create: dsh_auto_flow_autoFlow_deleteFlow_result$schema,
665
+ },
666
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":410,"column":9},
667
+ },
668
+ {
669
+ id: 'dsh-auto-flow#autoFlow/listFlows',
670
+ service: 'autoFlow',
671
+ namespace: 'autoFlow',
672
+ method: 'listFlows',
673
+ invocation: { kind: 'direct' },
674
+ parameters: [
675
+ ],
676
+ result: {
677
+ mode: 'strict',
678
+ typeSymbol: 'dsh-auto-flow#autoFlow/listFlows:result',
679
+ create: dsh_auto_flow_autoFlow_listFlows_result$schema,
680
+ },
681
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":282,"column":3},
682
+ },
683
+ {
684
+ id: 'dsh-auto-flow#autoFlow/listLlmRoutes',
685
+ service: 'autoFlow',
686
+ namespace: 'autoFlow',
687
+ method: 'listLlmRoutes',
688
+ invocation: { kind: 'direct' },
689
+ parameters: [
690
+ ],
691
+ result: {
692
+ mode: 'strict',
693
+ typeSymbol: 'workflow/types#WorkflowListLlmRoutesResult',
694
+ create: dsh_auto_flow_autoFlow_listLlmRoutes_result$schema,
695
+ },
696
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":474,"column":3},
697
+ },
698
+ {
699
+ id: 'dsh-auto-flow#autoFlow/listRouteModels',
700
+ service: 'autoFlow',
701
+ namespace: 'autoFlow',
702
+ method: 'listRouteModels',
703
+ invocation: { kind: 'direct' },
704
+ parameters: [
705
+ {
706
+ name: 'request',
707
+ wire: 'request',
708
+ source: 'json',
709
+ codec: {
710
+ mode: 'strict',
711
+ typeSymbol: 'workflow/types#WorkflowListRouteModelsRequest',
712
+ create: dsh_auto_flow_autoFlow_listRouteModels_parameter_0$schema,
713
+ },
714
+ },
715
+ ],
716
+ result: {
717
+ mode: 'strict',
718
+ typeSymbol: 'workflow/types#WorkflowListRouteModelsResult',
719
+ create: dsh_auto_flow_autoFlow_listRouteModels_result$schema,
720
+ },
721
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":484,"column":9},
722
+ },
723
+ {
724
+ id: 'dsh-auto-flow#autoFlow/listRuns',
725
+ service: 'autoFlow',
726
+ namespace: 'autoFlow',
727
+ method: 'listRuns',
76
728
  invocation: { kind: 'direct' },
77
729
  parameters: [
78
730
  {
@@ -81,232 +733,556 @@ export const TYPERT = {
81
733
  source: 'json',
82
734
  codec: {
83
735
  mode: 'strict',
84
- typeSymbol: 'dsh-auto-flow/types#ExecRequest',
85
- schema: dsh_auto_flow_autoFlow_exec_parameter_0$schema,
736
+ typeSymbol: 'workflow/types#WorkflowListRunsRequest',
737
+ create: dsh_auto_flow_autoFlow_listRuns_parameter_0$schema,
738
+ },
739
+ },
740
+ ],
741
+ result: {
742
+ mode: 'strict',
743
+ typeSymbol: 'dsh-auto-flow#autoFlow/listRuns:result',
744
+ create: dsh_auto_flow_autoFlow_listRuns_result$schema,
745
+ },
746
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":305,"column":9},
747
+ },
748
+ {
749
+ id: 'dsh-auto-flow#autoFlow/listScripts',
750
+ service: 'autoFlow',
751
+ namespace: 'autoFlow',
752
+ method: 'listScripts',
753
+ invocation: { kind: 'direct' },
754
+ parameters: [
755
+ ],
756
+ result: {
757
+ mode: 'strict',
758
+ typeSymbol: 'dsh-auto-flow#autoFlow/listScripts:result',
759
+ create: dsh_auto_flow_autoFlow_listScripts_result$schema,
760
+ },
761
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":423,"column":9},
762
+ },
763
+ {
764
+ id: 'dsh-auto-flow#autoFlow/loadFlow',
765
+ service: 'autoFlow',
766
+ namespace: 'autoFlow',
767
+ method: 'loadFlow',
768
+ invocation: { kind: 'direct' },
769
+ parameters: [
770
+ {
771
+ name: 'flowId',
772
+ wire: 'flowId',
773
+ source: 'json',
774
+ codec: {
775
+ mode: 'strict',
776
+ typeSymbol: 'dsh-auto-flow#autoFlow/loadFlow:flowId',
777
+ create: dsh_auto_flow_autoFlow_loadFlow_parameter_0$schema,
778
+ },
779
+ },
780
+ ],
781
+ result: {
782
+ mode: 'strict',
783
+ typeSymbol: 'dsh-auto-flow#autoFlow/loadFlow:result',
784
+ create: dsh_auto_flow_autoFlow_loadFlow_result$schema,
785
+ },
786
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":332,"column":9},
787
+ },
788
+ {
789
+ id: 'dsh-auto-flow#autoFlow/resumeRun',
790
+ service: 'autoFlow',
791
+ namespace: 'autoFlow',
792
+ method: 'resumeRun',
793
+ invocation: { kind: 'direct' },
794
+ parameters: [
795
+ {
796
+ name: 'runId',
797
+ wire: 'runId',
798
+ source: 'json',
799
+ codec: {
800
+ mode: 'strict',
801
+ typeSymbol: 'dsh-auto-flow#autoFlow/resumeRun:runId',
802
+ create: dsh_auto_flow_autoFlow_resumeRun_parameter_0$schema,
86
803
  },
87
804
  },
88
805
  ],
89
806
  result: {
90
807
  mode: 'strict',
91
- typeSymbol: 'dsh-auto-flow/types#ExecResult',
92
- schema: dsh_auto_flow_autoFlow_exec_result$schema,
808
+ typeSymbol: 'workflow/types#RunState',
809
+ create: dsh_auto_flow_autoFlow_resumeRun_result$schema,
93
810
  },
94
- sourceLocation: {"file":"packages/dsh-auto-flow/src/index.ts","line":509,"column":9},
811
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":544,"column":9},
95
812
  },
96
813
  {
97
- id: 'dsh-auto-flow#autoFlow/execKill',
814
+ id: 'dsh-auto-flow#autoFlow/retryRun',
98
815
  service: 'autoFlow',
99
816
  namespace: 'autoFlow',
100
- method: 'execKill',
817
+ method: 'retryRun',
101
818
  invocation: { kind: 'direct' },
102
819
  parameters: [
103
820
  {
104
- name: 'jobId',
105
- wire: 'jobId',
821
+ name: 'runId',
822
+ wire: 'runId',
106
823
  source: 'json',
107
824
  codec: {
108
825
  mode: 'strict',
109
- typeSymbol: 'dsh-auto-flow#autoFlow/execKill:jobId',
110
- schema: dsh_auto_flow_autoFlow_execKill_parameter_0$schema,
826
+ typeSymbol: 'dsh-auto-flow#autoFlow/retryRun:runId',
827
+ create: dsh_auto_flow_autoFlow_retryRun_parameter_0$schema,
111
828
  },
112
829
  },
113
830
  ],
114
831
  result: {
115
832
  mode: 'strict',
116
- typeSymbol: 'dsh-auto-flow/types#ExecKillResult',
117
- schema: dsh_auto_flow_autoFlow_execKill_result$schema,
833
+ typeSymbol: 'dsh-auto-flow#autoFlow/retryRun:result',
834
+ create: dsh_auto_flow_autoFlow_retryRun_result$schema,
118
835
  },
119
- sourceLocation: {"file":"packages/dsh-auto-flow/src/index.ts","line":583,"column":9},
836
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":559,"column":9},
120
837
  },
121
838
  {
122
- id: 'dsh-auto-flow#autoFlow/execRead',
839
+ id: 'dsh-auto-flow#autoFlow/runFlow',
123
840
  service: 'autoFlow',
124
841
  namespace: 'autoFlow',
125
- method: 'execRead',
842
+ method: 'runFlow',
126
843
  invocation: { kind: 'direct' },
127
844
  parameters: [
128
845
  {
129
- name: 'jobId',
130
- wire: 'jobId',
846
+ name: 'request',
847
+ wire: 'request',
131
848
  source: 'json',
132
849
  codec: {
133
850
  mode: 'strict',
134
- typeSymbol: 'dsh-auto-flow#autoFlow/execRead:jobId',
135
- schema: dsh_auto_flow_autoFlow_execRead_parameter_0$schema,
851
+ typeSymbol: 'dsh-auto-flow#autoFlow/runFlow:request',
852
+ create: dsh_auto_flow_autoFlow_runFlow_parameter_0$schema,
136
853
  },
137
854
  },
138
855
  ],
139
856
  result: {
140
857
  mode: 'strict',
141
- typeSymbol: 'dsh-auto-flow/types#ExecReadResult',
142
- schema: dsh_auto_flow_autoFlow_execRead_result$schema,
858
+ typeSymbol: 'dsh-auto-flow#autoFlow/runFlow:result',
859
+ create: dsh_auto_flow_autoFlow_runFlow_result$schema,
143
860
  },
144
- sourceLocation: {"file":"packages/dsh-auto-flow/src/index.ts","line":557,"column":9},
861
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":510,"column":9},
145
862
  },
146
863
  {
147
- id: 'dsh-auto-flow#autoFlow/last',
864
+ id: 'dsh-auto-flow#autoFlow/runState',
148
865
  service: 'autoFlow',
149
866
  namespace: 'autoFlow',
150
- method: 'last',
867
+ method: 'runState',
151
868
  invocation: { kind: 'direct' },
152
869
  parameters: [
870
+ {
871
+ name: 'runId',
872
+ wire: 'runId',
873
+ source: 'json',
874
+ codec: {
875
+ mode: 'strict',
876
+ typeSymbol: 'dsh-auto-flow#autoFlow/runState:runId',
877
+ create: dsh_auto_flow_autoFlow_runState_parameter_0$schema,
878
+ },
879
+ },
153
880
  ],
154
881
  result: {
155
882
  mode: 'strict',
156
- typeSymbol: 'dsh-auto-flow#autoFlow/last:result',
157
- schema: dsh_auto_flow_autoFlow_last_result$schema,
883
+ typeSymbol: 'dsh-auto-flow#autoFlow/runState:result',
884
+ create: dsh_auto_flow_autoFlow_runState_result$schema,
158
885
  },
159
- sourceLocation: {"file":"packages/dsh-auto-flow/src/index.ts","line":485,"column":3},
886
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":521,"column":9},
160
887
  },
161
888
  {
162
- id: 'dsh-auto-flow#autoFlow/list',
889
+ id: 'dsh-auto-flow#autoFlow/saveFlow',
163
890
  service: 'autoFlow',
164
891
  namespace: 'autoFlow',
165
- method: 'list',
892
+ method: 'saveFlow',
166
893
  invocation: { kind: 'direct' },
167
894
  parameters: [
895
+ {
896
+ name: 'flowId',
897
+ wire: 'flowId',
898
+ source: 'json',
899
+ codec: {
900
+ mode: 'strict',
901
+ typeSymbol: 'dsh-auto-flow#autoFlow/saveFlow:flowId',
902
+ create: dsh_auto_flow_autoFlow_saveFlow_parameter_0$schema,
903
+ },
904
+ },
905
+ {
906
+ name: 'flow',
907
+ wire: 'flow',
908
+ source: 'json',
909
+ codec: {
910
+ mode: 'strict',
911
+ typeSymbol: 'workflow/types#WorkflowDefinition',
912
+ create: dsh_auto_flow_autoFlow_saveFlow_parameter_1$schema,
913
+ },
914
+ },
168
915
  ],
169
916
  result: {
170
917
  mode: 'strict',
171
- typeSymbol: 'dsh-auto-flow#autoFlow/list:result',
172
- schema: dsh_auto_flow_autoFlow_list_result$schema,
918
+ typeSymbol: 'workflow/types#WorkflowDefinition',
919
+ create: dsh_auto_flow_autoFlow_saveFlow_result$schema,
173
920
  },
174
- sourceLocation: {"file":"packages/dsh-auto-flow/src/index.ts","line":479,"column":3},
921
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":359,"column":9},
175
922
  },
176
923
  {
177
- id: 'dsh-auto-flow#autoFlow/send',
924
+ id: 'dsh-auto-flow#autoFlow/unitUrl',
178
925
  service: 'autoFlow',
179
926
  namespace: 'autoFlow',
180
- method: 'send',
927
+ method: 'unitUrl',
181
928
  invocation: { kind: 'direct' },
182
929
  parameters: [
183
930
  {
184
- name: 'text',
185
- wire: 'text',
931
+ name: 'unit',
932
+ wire: 'unit',
186
933
  source: 'json',
187
934
  codec: {
188
935
  mode: 'strict',
189
- typeSymbol: 'dsh-auto-flow#autoFlow/send:text',
190
- schema: dsh_auto_flow_autoFlow_send_parameter_0$schema,
936
+ typeSymbol: 'dsh-auto-flow#autoFlow/unitUrl:unit',
937
+ create: dsh_auto_flow_autoFlow_unitUrl_parameter_0$schema,
191
938
  },
192
939
  },
193
940
  ],
194
941
  result: {
195
942
  mode: 'strict',
196
- typeSymbol: 'dsh-auto-flow/types#Greeting',
197
- schema: dsh_auto_flow_autoFlow_send_result$schema,
943
+ typeSymbol: 'dsh-auto-flow/types#UnitEntryResult',
944
+ create: dsh_auto_flow_autoFlow_unitUrl_result$schema,
198
945
  },
199
- sourceLocation: {"file":"packages/dsh-auto-flow/src/index.ts","line":451,"column":9},
946
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":240,"column":9},
200
947
  },
201
948
  ],
202
949
  model: {
203
950
  "services": [
204
951
  {
205
- "description": "示例服务:类本身就是插件——static inject / Config 是 Cordis 类插件的约定, 构造器里的注册(工具/事件/设置/命令)随插件卸载自动回收。 平台服务消费方式(跨插件协作走 Cordis 服务、禁止互相 import): - 必需依赖用 `static inject`(tools); - 可选依赖用 `ctx.inject([...], cb)`(settings / commands / systemPrompt / autoFlowFormatter)——服务缺失时插件照常加载; - shell / sandboxPolicy 是可选服务:用 `ctx.get(...)` 读取,未组合时 `exec` 报错、插件其余部分照常工作; - 持久层异步打开走 `[Service.init]`(storageDomain 可选:缺省退化为内存态)。",
206
- "summary": "示例服务:类本身就是插件——static inject / Config 是 Cordis 类插件的约定, 构造器里的注册(工具/事件/设置/命令)随插件卸载自动回收。 平台服务消费方式(跨插件协作走 Cordis 服务、禁止互相 import): - 必需依赖用 `static inject`(tools); - 可选依赖用 `ctx.inject([...], cb)`(settings / commands / systemPrompt / autoFlowFormatter)——服务缺失时插件照常加载; - shell / sandboxPolicy 是可选服务:用 `ctx.get(...)` 读取,未组合时 `exec` 报错、插件其余部分照常工作; - 持久层异步打开走 `[Service.init]`(storageDomain 可选:缺省退化为内存态)。",
952
+ "description": "服务类即插件。依赖消费约定: - 可选依赖用 ctx.inject(settings),缺失照常加载; - storageDomain 是硬依赖,[Service.init] 缺失时大声失败(不静默内存态); - ag 用 ctx.get 读取,未组合时 runFlow 报 ag-missing; - 持久层在 [Service.init] 异步打开。",
953
+ "summary": "服务类即插件。依赖消费约定: - 可选依赖用 ctx.inject(settings),缺失照常加载; - storageDomain 是硬依赖,[Service.init] 缺失时大声失败(不静默内存态); - ag 用 ctx.get 读取,未组合时 runFlow 报 ag-missing; - 持久层在 [Service.init] 异步打开。",
207
954
  "tags": [],
208
- "jsDoc": "/**\n * 示例服务:类本身就是插件——static inject / Config 是 Cordis 类插件的约定,\n * 构造器里的注册(工具/事件/设置/命令)随插件卸载自动回收。\n *\n * 平台服务消费方式(跨插件协作走 Cordis 服务、禁止互相 import):\n * - 必需依赖用 `static inject`(tools);\n * - 可选依赖用 `ctx.inject([...], cb)`(settings / commands / systemPrompt /\n * autoFlowFormatter)——服务缺失时插件照常加载;\n * - shell / sandboxPolicy 是可选服务:用 `ctx.get(...)` 读取,未组合时\n * `exec` 报错、插件其余部分照常工作;\n * - 持久层异步打开走 `[Service.init]`(storageDomain 可选:缺省退化为内存态)。\n */",
955
+ "jsDoc": "/**\n * 服务类即插件。依赖消费约定:\n * - 可选依赖用 ctx.inject(settings),缺失照常加载;\n * - storageDomain 是硬依赖,[Service.init] 缺失时大声失败(不静默内存态);\n * - ag 用 ctx.get 读取,未组合时 runFlow 报 ag-missing;\n * - 持久层在 [Service.init] 异步打开。\n */",
209
956
  "key": "autoFlow",
210
- "exportName": "AutoFlowService",
957
+ "exportName": "default",
211
958
  "members": [
212
959
  {
213
960
  "kind": "method",
214
- "name": "send",
215
- "signature": "@Remote('send') async send(text: string): Promise<Greeting>",
216
- "summary": "追加一条问候并返回记录(写透 domain storage;若有第二包则先格式化;提交后发域事件)。 不追加自定义会话事件:harness 的 session 持久化读路径会拒绝 `KNOWN_SESSION_EVENT_TYPES` 之外的事件类型(除非信封标记 `ignorable`,而 `Session.append` 无此参数),把插件 自定义事件写进会话日志会导致该会话在重启后无法打开。",
217
- "jsDoc": "/**\n * 追加一条问候并返回记录(写透 domain storage;若有第二包则先格式化;提交后发域事件)。\n *\n * 不追加自定义会话事件:harness 的 session 持久化读路径会拒绝 `KNOWN_SESSION_EVENT_TYPES`\n * 之外的事件类型(除非信封标记 `ignorable`,而 `Session.append` 无此参数),把插件\n * 自定义事件写进会话日志会导致该会话在重启后无法打开。\n */"
961
+ "name": "resolveScript",
962
+ "signature": "async resolveScript(name: string): Promise<ResolvedScript | undefined>",
963
+ "summary": "解析脚本名 → 具体来源与库内名(限定名优先,其次唯一命中的库内名)。 实现在 features/scripts/catalog.ts;此方法保持公开,因为模型工具与测试都从服务面取它。",
964
+ "jsDoc": "/**\n * 解析脚本名 → 具体来源与库内名(限定名优先,其次唯一命中的库内名)。\n * 实现在 features/scripts/catalog.ts;此方法保持公开,因为模型工具与测试都从服务面取它。\n */"
218
965
  },
219
966
  {
220
967
  "kind": "method",
221
- "name": "list",
222
- "signature": "@Remote('list') list(): Promise<Greeting[]>",
223
- "summary": "返回全部问候记录(内存视图,已由 domain storage 水合)。",
224
- "jsDoc": "/** 返回全部问候记录(内存视图,已由 domain storage 水合)。 */"
968
+ "name": "unitUrl",
969
+ "signature": "@Remote('unitUrl') async unitUrl(unit: string): Promise<UnitEntryResult>",
970
+ "summary": "某个应用单元的入口结果(带进程令牌的地址,或一条给面板看的原因)。 客户端半边把地址当 iframe 的 `src`:地址里带着进程令牌,单元服务据此换出 HttpOnly cookie (见 `app-unit` 的 README 的门一节)。 【为什么是 async】等单元就绪再回答 —— 见 `unitEntries` 字段的注释:客户端每次打开浮层只问一次, 把\"还没就绪\"也当成\"没有入口\"会让宿主刚起来那一下点开被永久判错。 【为什么按单元名问】会话面板里有几个入口就有几个单元(清单见 `src/client/dock-units.ts`):地址只由 询问方决定,宿主不替它挑一个。客户端半那边用的是**单元名的字面量**(它不许 import 登记表),与登记表 的对应由 `tests/client/apply.spec.tsx` 的一条断言守住;这里再判一次\"在不在登记表里\" —— 那一档的 原因要能让用户自查。",
971
+ "jsDoc": "/**\n * 某个应用单元的入口结果(带进程令牌的地址,或一条给面板看的原因)。\n *\n * 客户端半边把地址当 iframe 的 `src`:地址里带着进程令牌,单元服务据此换出 HttpOnly cookie\n * (见 `app-unit` 的 README 的门一节)。\n *\n * 【为什么是 async】等单元就绪再回答 —— 见 `unitEntries` 字段的注释:客户端每次打开浮层只问一次,\n * 把\"还没就绪\"也当成\"没有入口\"会让宿主刚起来那一下点开被永久判错。\n *\n * 【为什么按单元名问】会话面板里有几个入口就有几个单元(清单见 `src/client/dock-units.ts`):地址只由\n * 询问方决定,宿主不替它挑一个。客户端半那边用的是**单元名的字面量**(它不许 import 登记表),与登记表\n * 的对应由 `tests/client/apply.spec.tsx` 的一条断言守住;这里再判一次\"在不在登记表里\" —— 那一档的\n * 原因要能让用户自查。\n *\n * @param unit - 单元名(登记表 `APP_UNITS` 的键)。\n * @returns `{ url }` 或 `{ url: null, reason }`(缺前端、端口被占、本地开发配置非法…各自带原因与\n * 处置命令);宿主没有信任门、或这个名字不在登记表里时,各给一条说明。\n * **宿主没有信任门那一条在宿主日志留一条 warn。**\n */"
225
972
  },
226
973
  {
227
974
  "kind": "method",
228
- "name": "last",
229
- "signature": "@Remote('last') last(): Promise<Greeting | null>",
230
- "summary": "返回最近一次提交的问候(由域事件监听器维护),首次提交前为 null。",
231
- "jsDoc": "/** 返回最近一次提交的问候(由域事件监听器维护),首次提交前为 null。 */"
975
+ "name": "listFlows",
976
+ "signature": "@Remote('listFlows') listFlows(): Promise<FlowSummary[]>",
977
+ "summary": "列举全部工作流摘要(id + 名称 + 描述 + 节点数 + 输入键;按 id 升序)。",
978
+ "jsDoc": "/** 列举全部工作流摘要(id + 名称 + 描述 + 节点数 + 输入键;按 id 升序)。 */"
232
979
  },
233
980
  {
234
981
  "kind": "method",
235
- "name": "exec",
236
- "signature": "@Remote('exec') async exec(request: ExecRequest): Promise<ExecResult>",
237
- "summary": "执行一条命令行(宿主内经 ctx.shell,与 bash 工具同一执行器,绝不经过模型)。 输出只回调用方、不进会话日志。@Remote 严格契约保证浏览器端完整类型与校验。 相比模型工具(@deepseek-ai/dsh-tool-bash)的 shell 面,@Remote 轻执行只能拿到 能映射过来的子集:timeoutMs / stdoutMaxBytes / sandboxPolicy / 后台任务 / 结果保真。 模型工具专属的 seam(shellEnv.collect 需要 ToolExecution、sandbox 升级需要 approval + callId、abort 需要 ToolExecution.signal)不适用于",
238
- "jsDoc": "/**\n * 执行一条命令行(宿主内经 ctx.shell,与 bash 工具同一执行器,绝不经过模型)。\n * 输出只回调用方、不进会话日志。@Remote 严格契约保证浏览器端完整类型与校验。\n *\n * 相比模型工具(@deepseek-ai/dsh-tool-bash)的 shell 面,@Remote 轻执行只能拿到\n * 能映射过来的子集:timeoutMs / stdoutMaxBytes / sandboxPolicy / 后台任务 / 结果保真。\n * 模型工具专属的 seam(shellEnv.collect 需要 ToolExecution、sandbox 升级需要 approval\n * + callId、abort 需要 ToolExecution.signal)不适用于 @Remote,此处不做。\n *\n * 注意:@Remote 方法不能带 `agent: Agent` 参数——第三方仓库的 typert 生成器无法解析\n * `agent` lookup(其 wire 类型 SessionId 是 branded 类型,官方 monorepo 内才可用)。\n * 因此沙箱策略退化为「部署默认」(`sandboxPolicy.resolve()` 无 session)。\n *\n * 后台执行不走 ctx.jobs(那是给模型工具 job_output/job_kill 用的,需要 agent owner +\n * dsh-tool-jobs 控制器,@Remote 里拿不到):直接用 `shell.start()` 拿 ShellProcess\n * 句柄,自管在 this.background Map 里,execRead/execKill 直接操作句柄;卸载时统一 kill。\n *\n * shell / sandboxPolicy 是可选依赖:未组合时抛对应 RemoteError,插件其余照常。\n */"
982
+ "name": "listRuns",
983
+ "signature": "@Remote('listRuns') async listRuns(request: WorkflowListRunsRequest): Promise<RunSummary[]>",
984
+ "summary": "列举历史运行摘要(按 updatedAt 倒序,来自插件自持运行日志;支持按会话/工作流过滤,含归属标签)。",
985
+ "jsDoc": "/** 列举历史运行摘要(按 updatedAt 倒序,来自插件自持运行日志;支持按会话/工作流过滤,含归属标签)。\n * @param request - 可选过滤:发起会话与工作流(两个条件可同时使用)。 */"
239
986
  },
240
987
  {
241
988
  "kind": "method",
242
- "name": "execRead",
243
- "signature": "@Remote('execRead') async execRead(jobId: string): Promise<ExecReadResult>",
244
- "summary": "读后台进程的下一次增量/终态输出(自管 ShellProcess 句柄,不依赖 ctx.jobs)。",
245
- "jsDoc": "/** 读后台进程的下一次增量/终态输出(自管 ShellProcess 句柄,不依赖 ctx.jobs)。 */"
989
+ "name": "loadFlow",
990
+ "signature": "@Remote('loadFlow') async loadFlow(flowId: string): Promise<WorkflowDefinition | null>",
991
+ "summary": "按 id 读取工作流文档(不存在或未组合 storageDomain 时返回 null)。 读时会把脚本节点的**库内名**规范化为限定名(见 `canonicalizeScriptNames`)—— 修的是 「同一脚本两个身份」这个病根,而不是在下拉那一个消费点上再打一次补丁。",
992
+ "jsDoc": "/**\n * 按 id 读取工作流文档(不存在或未组合 storageDomain 时返回 null)。\n *\n * 读时会把脚本节点的**库内名**规范化为限定名(见 `canonicalizeScriptNames`)—— 修的是\n * 「同一脚本两个身份」这个病根,而不是在下拉那一个消费点上再打一次补丁。\n */"
246
993
  },
247
994
  {
248
995
  "kind": "method",
249
- "name": "execKill",
250
- "signature": "@Remote('execKill') async execKill(jobId: string): Promise<ExecKillResult>",
251
- "summary": "请求取消后台进程(自管 ShellProcess 句柄,不依赖 ctx.jobs)。",
252
- "jsDoc": "/** 请求取消后台进程(自管 ShellProcess 句柄,不依赖 ctx.jobs)。 */"
996
+ "name": "saveFlow",
997
+ "signature": "@Remote('saveFlow') async saveFlow(flowId: string, flow: WorkflowDefinition): Promise<WorkflowDefinition>",
998
+ "summary": "按 id 保存工作流文档(domain 打开时落盘,否则仅返回原样;失败大声抛出)。 写时同样规范化:这是**保证不变量成立的那一步** —— 画布新建的工作流以示例种子起步, 而种子按设计存库内名(来源 id 是运行时配置,静态模板不能硬编码它),所以只有在落盘前 改写一次,存档里才会是规范形态。返回值是**实际落盘**的文档(不再是入参原样)。 【为什么这个入口**不**做语义校验】它是画布的自动保存(fire-and-forget):半成品草稿 必须落盘 —— 一旦拦下,用户那次编辑就静默丢了(`useFlowAutosave` 是 `void` 调用,没人接 这个 rejection)。这里曾经调 `assertFlowValid`,于是「把某字段标成必填但还没填」「数值越界」 这类**编辑中的常态**会让整份文档存不进去,而界面上没有任何提示。 判据没有消失,只是换了承载者(同一份 `validateFlow`,强度按阶段分档): - **展示**:画布客户端算同一份诊断并画成节点徽标 / 字段级提示(`useFlowDiagnostics`); - **拒绝**:运行入口(`RunCoordinator`,失败有错误卡片承载)与模型工具 `workflow_save` (错误回到模型手里,它可以改)各自显式调 `assertFlowValid`。",
999
+ "jsDoc": "/**\n * 按 id 保存工作流文档(domain 打开时落盘,否则仅返回原样;失败大声抛出)。\n *\n * 写时同样规范化:这是**保证不变量成立的那一步** —— 画布新建的工作流以示例种子起步,\n * 而种子按设计存库内名(来源 id 是运行时配置,静态模板不能硬编码它),所以只有在落盘前\n * 改写一次,存档里才会是规范形态。返回值是**实际落盘**的文档(不再是入参原样)。\n *\n * 【为什么这个入口**不**做语义校验】它是画布的自动保存(fire-and-forget):半成品草稿\n * 必须落盘 —— 一旦拦下,用户那次编辑就静默丢了(`useFlowAutosave` 是 `void` 调用,没人接\n * 这个 rejection)。这里曾经调 `assertFlowValid`,于是「把某字段标成必填但还没填」「数值越界」\n * 这类**编辑中的常态**会让整份文档存不进去,而界面上没有任何提示。\n *\n * 判据没有消失,只是换了承载者(同一份 `validateFlow`,强度按阶段分档):\n * - **展示**:画布客户端算同一份诊断并画成节点徽标 / 字段级提示(`useFlowDiagnostics`);\n * - **拒绝**:运行入口(`RunCoordinator`,失败有错误卡片承载)与模型工具 `workflow_save`\n * (错误回到模型手里,它可以改)各自显式调 `assertFlowValid`。\n *\n * @throws {Error} 规范化或存储层失败(domain 不可用、写盘出错)—— 这些是真失败,必须冒泡。\n */"
1000
+ },
1001
+ {
1002
+ "kind": "method",
1003
+ "name": "assertFlowValid",
1004
+ "signature": "async assertFlowValid(flow: WorkflowDefinition): Promise<void>",
1005
+ "summary": "语义校验入口:**委托给运行协调器的同一入口**(判据只有一处)。 调用方按阶段自己决定强度:模型工具 `workflow_save` 在写盘前调它(错误回到模型手里), 运行入口调它并带上脚本参数清单与环境能力集(失败有错误卡片承载)。 画布自动保存**不调**它 —— 理由见 `saveFlow` 的文档。",
1006
+ "jsDoc": "/**\n * 语义校验入口:**委托给运行协调器的同一入口**(判据只有一处)。\n *\n * 调用方按阶段自己决定强度:模型工具 `workflow_save` 在写盘前调它(错误回到模型手里),\n * 运行入口调它并带上脚本参数清单与环境能力集(失败有错误卡片承载)。\n * 画布自动保存**不调**它 —— 理由见 `saveFlow` 的文档。\n *\n * @param flow - 待校验的文档(应当已经规范化)。\n * @throws {RemoteError} `autoFlow/invalid-flow`(见 `RunCoordinator.assertFlowValid`)。\n */"
1007
+ },
1008
+ {
1009
+ "kind": "method",
1010
+ "name": "deleteFlow",
1011
+ "signature": "@Remote('deleteFlow') async deleteFlow(flowId: string): Promise<{ deleted: boolean }>",
1012
+ "summary": "按 id 删除工作流。",
1013
+ "jsDoc": "/** 按 id 删除工作流。 */"
1014
+ },
1015
+ {
1016
+ "kind": "method",
1017
+ "name": "listScripts",
1018
+ "signature": "@Remote('listScripts') async listScripts(): Promise<ScriptInfo[]>",
1019
+ "summary": "列出可运行脚本清单(展示名/描述/参数/产物装配规则 + 来源 + 加载诊断)。 `name` 是**限定名**(`ag/xhs/collect`、`my-scripts/daily-report`), 来源是身份的一部分 —— 多个脚本库各有同名脚本时不会互相覆盖;`source` 供 UI 做一级分类。 未组合任何脚本来源时返回空(与改造前一致)。",
1020
+ "jsDoc": "/**\n * 列出可运行脚本清单(展示名/描述/参数/产物装配规则 + 来源 + 加载诊断)。\n *\n * `name` 是**限定名**(`ag/xhs/collect`、`my-scripts/daily-report`),\n * 来源是身份的一部分 —— 多个脚本库各有同名脚本时不会互相覆盖;`source` 供 UI 做一级分类。\n * 未组合任何脚本来源时返回空(与改造前一致)。\n */"
1021
+ },
1022
+ {
1023
+ "kind": "method",
1024
+ "name": "listLlmRoutes",
1025
+ "signature": "@Remote('listLlmRoutes') listLlmRoutes(): WorkflowListLlmRoutesResult",
1026
+ "summary": "列出实时 LLM 模型路由(llm/agent 节点的 provider 下拉)。",
1027
+ "jsDoc": "/** 列出实时 LLM 模型路由(llm/agent 节点的 provider 下拉)。 */"
1028
+ },
1029
+ {
1030
+ "kind": "method",
1031
+ "name": "listRouteModels",
1032
+ "signature": "@Remote('listRouteModels') async listRouteModels( request: WorkflowListRouteModelsRequest, ): Promise<WorkflowListRouteModelsResult>",
1033
+ "summary": "列出某实时模型路由上的模型目录(llm/agent 节点的 model 下拉)。",
1034
+ "jsDoc": "/** 列出某实时模型路由上的模型目录(llm/agent 节点的 model 下拉)。 */"
1035
+ },
1036
+ {
1037
+ "kind": "method",
1038
+ "name": "runFlow",
1039
+ "signature": "@Remote('runFlow') async runFlow(request: { flow: FlowGraph workflowId?: string name?: string sessionId?: string }): Promise<{ runId: string }>",
1040
+ "summary": "画布触发运行(实现见 features/runs/coordinator.ts):只等到「运行已启动」即返回 runId。",
1041
+ "jsDoc": "/** 画布触发运行(实现见 features/runs/coordinator.ts):只等到「运行已启动」即返回 runId。 */"
1042
+ },
1043
+ {
1044
+ "kind": "method",
1045
+ "name": "runState",
1046
+ "signature": "@Remote('runState') async runState(runId: string): Promise<RunState | null>",
1047
+ "summary": "轮询运行状态(内存权威;未在内存中时读运行日志兜底)。",
1048
+ "jsDoc": "/** 轮询运行状态(内存权威;未在内存中时读运行日志兜底)。 */"
1049
+ },
1050
+ {
1051
+ "kind": "method",
1052
+ "name": "cancelRun",
1053
+ "signature": "@Remote('cancelRun') async cancelRun(runId: string): Promise<RunState>",
1054
+ "summary": "取消运行(协作式;画布根运行会连带取消其审批上抛队列里的嵌套运行)。",
1055
+ "jsDoc": "/** 取消运行(协作式;画布根运行会连带取消其审批上抛队列里的嵌套运行)。 */"
1056
+ },
1057
+ {
1058
+ "kind": "method",
1059
+ "name": "approveRun",
1060
+ "signature": "@Remote('approveRun') async approveRun(runId: string, choice: string): Promise<RunState>",
1061
+ "summary": "放行/驳回一个等待中的审批(宿主重启后会自动先恢复该运行,再应用这次答复)。",
1062
+ "jsDoc": "/** 放行/驳回一个等待中的审批(宿主重启后会自动先恢复该运行,再应用这次答复)。 */"
1063
+ },
1064
+ {
1065
+ "kind": "method",
1066
+ "name": "resumeRun",
1067
+ "signature": "@Remote('resumeRun') async resumeRun(runId: string): Promise<RunState>",
1068
+ "summary": "恢复一个暂停中的运行(宿主重启 / 进程被杀之后的续跑入口)。",
1069
+ "jsDoc": "/**\n * 恢复一个暂停中的运行(宿主重启 / 进程被杀之后的续跑入口)。\n *\n * @param runId - 目标运行(磁盘上要有中途快照与未答复的暂停实体)。\n * @returns 恢复后的运行状态(已在跑)。\n */"
1070
+ },
1071
+ {
1072
+ "kind": "method",
1073
+ "name": "retryRun",
1074
+ "signature": "@Remote('retryRun') async retryRun(runId: string): Promise<{ runId: string; plan: RetryPlanSummary }>",
1075
+ "summary": "**重试未成功项**(与「重新运行」并列、行为可区分)。 读该运行的批次台账,算出没成功的业务键,只补做那些;正常执行不读台账。 无业务键的批次被**明确拒绝**(`autoFlow/batch-not-retryable`),不静默退化成按下标跳过。",
1076
+ "jsDoc": "/**\n * **重试未成功项**(与「重新运行」并列、行为可区分)。\n *\n * 读该运行的批次台账,算出没成功的业务键,只补做那些;正常执行不读台账。\n * 无业务键的批次被**明确拒绝**(`autoFlow/batch-not-retryable`),不静默退化成按下标跳过。\n *\n * @param runId - 目标运行(终态记录或暂停态现场都行)。\n * @returns 新运行的 runId + 本次计划(待补条数 / 跳过策略)。\n * @throws `autoFlow/run-not-found` / `autoFlow/run-not-retryable` / `autoFlow/batch-not-retryable`。\n */"
1077
+ },
1078
+ {
1079
+ "kind": "method",
1080
+ "name": "runForAgent",
1081
+ "signature": "async runForAgent( flowId: string, args: Record<string, FlowDataValue>, agent: unknown, signal?: AbortSignal, ): Promise<RunOutcome>",
1082
+ "summary": "由模型工具触发一次工作流运行(实现见 features/runs/coordinator.ts)。",
1083
+ "jsDoc": "/** 由模型工具触发一次工作流运行(实现见 features/runs/coordinator.ts)。 */"
1084
+ },
1085
+ {
1086
+ "kind": "method",
1087
+ "name": "runWorkflowCommand",
1088
+ "signature": "async runWorkflowCommand(invocation: { agent: unknown rawInput: string signal: AbortSignal }): Promise<{ kind: 'success'; text?: string } | { kind: 'error'; text: string }>",
1089
+ "summary": "/workflow 斜杠命令的处理器(实现见 features/runs/coordinator.ts)。",
1090
+ "jsDoc": "/** /workflow 斜杠命令的处理器(实现见 features/runs/coordinator.ts)。 */"
253
1091
  }
254
1092
  ],
255
1093
  "types": [
256
1094
  {
257
- "name": "ExecBackgroundResult",
258
- "declaration": "export interface ExecBackgroundResult {\n kind: 'background';\n jobId: string;\n}"
1095
+ "name": "Batch",
1096
+ "declaration": "export interface Batch {\n batchId: string;\n nodeId: string;\n port: string;\n keyField?: string | undefined;\n}"
1097
+ },
1098
+ {
1099
+ "name": "FieldCondition",
1100
+ "declaration": "export interface FieldCondition {\n key: string;\n op?: FieldConditionOperator | undefined;\n value?: FlowDataValue | undefined;\n values?: readonly FlowDataValue[] | undefined;\n}"
1101
+ },
1102
+ {
1103
+ "name": "FieldConditionOperator",
1104
+ "declaration": "export type FieldConditionOperator = ScriptFieldConditionOperator;"
259
1105
  },
260
1106
  {
261
- "name": "ExecForegroundResult",
262
- "declaration": "export interface ExecForegroundResult {\n kind: 'foreground';\n exitCode: number | null;\n signal: string | null;\n timedOut: boolean;\n aborted: boolean;\n timeoutMs: number;\n stdout: ExecOutput;\n stderr: ExecOutput;\n sandbox?: ExecSandboxInfo;\n}"
1107
+ "name": "FieldConditionSet",
1108
+ "declaration": "export type FieldConditionSet = FieldCondition | readonly FieldCondition[];"
263
1109
  },
264
1110
  {
265
- "name": "ExecKillResult",
266
- "declaration": "export interface ExecKillResult {\n kind: 'requested' | 'already-finished';\n}"
1111
+ "name": "FlowDataValue",
1112
+ "declaration": "export type FlowDataValue = string | number | boolean | null | FlowDataValue[] | { [key: string]: FlowDataValue; };"
267
1113
  },
268
1114
  {
269
- "name": "ExecOutput",
270
- "declaration": "export interface ExecOutput {\n text: string;\n truncated: boolean;\n spillPath?: string;\n}"
1115
+ "name": "FlowEdge",
1116
+ "declaration": "export interface FlowEdge {\n id: string;\n source: string;\n target: string;\n sourceHandle?: string | undefined;\n targetHandle?: string | undefined;\n type?: FlowEdgeType | undefined;\n}"
271
1117
  },
272
1118
  {
273
- "name": "ExecReadResult",
274
- "declaration": "export interface ExecReadResult {\n text: string;\n status: string;\n detail?: string;\n}"
1119
+ "name": "FlowEdgeType",
1120
+ "declaration": "export type FlowEdgeType = 'custom-edge' | 'default' | 'straight' | 'step' | 'smoothstep' | 'simplebezier';"
275
1121
  },
276
1122
  {
277
- "name": "ExecRequest",
278
- "declaration": "export interface ExecRequest {\n command: string;\n workdir?: string;\n timeoutMs?: number;\n stdoutMaxBytes?: number;\n runInBackground?: boolean;\n}"
1123
+ "name": "FlowGraph",
1124
+ "declaration": "export interface FlowGraph {\n nodes: FlowNode[];\n edges: FlowEdge[];\n}"
279
1125
  },
280
1126
  {
281
- "name": "ExecResult",
282
- "declaration": "export type ExecResult = ExecForegroundResult | ExecBackgroundResult;"
1127
+ "name": "FlowNode",
1128
+ "declaration": "export interface FlowNode {\n id: string;\n name: string;\n type: string;\n position: { x: number; y: number; };\n data: FlowNodeData;\n style?: Record<string, FlowDataValue> | undefined;\n}"
283
1129
  },
284
1130
  {
285
- "name": "ExecSandboxInfo",
286
- "declaration": "export interface ExecSandboxInfo {\n mode: string;\n denied: boolean;\n enforcement?: string;\n runnerFailed?: boolean;\n}"
1131
+ "name": "FlowNodeData",
1132
+ "declaration": "export type FlowNodeData = Record<string, FlowDataValue>;"
287
1133
  },
288
1134
  {
289
- "name": "Greeting",
290
- "declaration": "export interface Greeting {\n id: number;\n text: string;\n createdAt: number;\n}"
1135
+ "name": "FlowSummary",
1136
+ "declaration": "export interface FlowSummary {\n id: string;\n name: string;\n description: string;\n nodeCount: number;\n inputs: string[];\n}"
1137
+ },
1138
+ {
1139
+ "name": "Item",
1140
+ "declaration": "export interface Item {\n json: Record<string, FlowDataValue>;\n pairedItem?: number | undefined;\n}"
1141
+ },
1142
+ {
1143
+ "name": "NodeAttempt",
1144
+ "declaration": "export interface NodeAttempt {\n attempt: number;\n startedAt: number;\n finishedAt: number;\n durationMs: number;\n ok: boolean;\n itemCounts?: Record<string, number> | undefined;\n error?: string | undefined;\n errorCode?: string | undefined;\n retryable?: boolean | undefined;\n}"
1145
+ },
1146
+ {
1147
+ "name": "NodeLogEntry",
1148
+ "declaration": "export interface NodeLogEntry {\n at: number;\n kind: string;\n message: string;\n data?: Record<string, FlowDataValue> | undefined;\n}"
1149
+ },
1150
+ {
1151
+ "name": "PropertyType",
1152
+ "declaration": "export type PropertyType = 'string' | 'number' | 'boolean' | 'select' | 'datetime' | 'array' | 'object' | 'file';"
1153
+ },
1154
+ {
1155
+ "name": "ResolvedScript",
1156
+ "declaration": "export interface ResolvedScript {\n qualified: string;\n provider: ScriptProvider;\n localName: string;\n}"
1157
+ },
1158
+ {
1159
+ "name": "ResumeMode",
1160
+ "declaration": "export type ResumeMode = (typeof RESUME_MODES)[number];"
1161
+ },
1162
+ {
1163
+ "name": "RetryPlanSummary",
1164
+ "declaration": "export interface RetryPlanSummary {\n batchId: string;\n keyField: string;\n resumeMode: ResumeMode;\n pendingCount: number;\n knownCount: number;\n}"
1165
+ },
1166
+ {
1167
+ "name": "RunOutcome",
1168
+ "declaration": "export interface RunOutcome {\n runId: string;\n ok: boolean;\n result?: FlowDataValue | undefined;\n error?: string | undefined;\n steps: RunState['steps'];\n}"
1169
+ },
1170
+ {
1171
+ "name": "RunState",
1172
+ "declaration": "export interface RunState {\n runId: string;\n workflowId: string;\n name: string;\n sessionId?: string | undefined;\n status: 'running' | 'waiting' | 'completed' | 'failed' | 'cancelled' | 'crashed';\n workspaceDir: string;\n steps: RunStep[];\n batch?: Batch | undefined;\n resumeMode?: ResumeMode | undefined;\n createdAt: number;\n updatedAt: number;\n}"
1173
+ },
1174
+ {
1175
+ "name": "RunStep",
1176
+ "declaration": "export interface RunStep {\n index: number;\n nodeId: string;\n itemCounts?: { in: Record<string, number>; out: Record<string, number>; } | undefined;\n inputSources?: string[] | undefined;\n nodeType: string;\n label: string;\n status: 'pending' | 'running' | 'waiting' | 'success' | 'failed' | 'skipped';\n statusChangedAt?: number | undefined;\n startedAt?: number | undefined;\n finishedAt?: number | undefined;\n script?: string | undefined;\n stepDir?: string | undefined;\n files?: string[] | undefined;\n items?: Item[] | undefined;\n portItems?: Record<string, Item[]> | undefined;\n failedItems?: { index: number; error: string; }[] | undefined;\n skippedCount?: number | undefined;\n itemsRef?: string | undefined;\n error?: string | undefined;\n errorCode?: string | undefined;\n durationMs?: number | undefined;\n attempts?: NodeAttempt[] | undefined;\n logs?: NodeLogEntry[] | undefined;\n}"
1177
+ },
1178
+ {
1179
+ "name": "RunSummary",
1180
+ "declaration": "export interface RunSummary {\n runId: string;\n workflowId: string;\n name: string;\n sessionId?: string | undefined;\n status: RunState['status'];\n nodeCount: number;\n createdAt: number;\n updatedAt: number;\n}"
1181
+ },
1182
+ {
1183
+ "name": "ScriptArtifactSpec",
1184
+ "declaration": "export type ScriptArtifactSpec = z.infer<typeof ScriptArtifactSpecSchema>;"
1185
+ },
1186
+ {
1187
+ "name": "ScriptDiagnosticInfo",
1188
+ "declaration": "export interface ScriptDiagnosticInfo {\n name: string;\n code: string;\n message: string;\n}"
1189
+ },
1190
+ {
1191
+ "name": "ScriptFieldConditionOperator",
1192
+ "declaration": "export type ScriptFieldConditionOperator = (typeof SCRIPT_FIELD_CONDITION_OPERATORS)[number];"
1193
+ },
1194
+ {
1195
+ "name": "ScriptInfo",
1196
+ "declaration": "export interface ScriptInfo {\n name: string;\n label: string;\n description: string;\n params: ScriptParamField[];\n artifacts?: ScriptArtifactSpec | undefined;\n source?: ScriptSourceInfo | undefined;\n diagnostics?: ScriptDiagnosticInfo[] | undefined;\n}"
1197
+ },
1198
+ {
1199
+ "name": "ScriptParamField",
1200
+ "declaration": "export interface ScriptParamField {\n key: string;\n label: string;\n type: PropertyType;\n required?: boolean | undefined;\n defaultValue?: FlowDataValue | undefined;\n options?: SelectOption[] | undefined;\n multiple?: boolean | undefined;\n format?: string | undefined;\n placeholder?: string | undefined;\n description?: string | undefined;\n children?: ScriptParamField[] | undefined;\n variants?: { when: string; value: FlowDataValue; children: ScriptParamField[]; }[] | undefined;\n visibleWhen?: FieldConditionSet | undefined;\n}"
1201
+ },
1202
+ {
1203
+ "name": "ScriptPayload",
1204
+ "declaration": "export type ScriptPayload = z.infer<typeof ScriptPayloadSchema>;"
1205
+ },
1206
+ {
1207
+ "name": "ScriptProvider",
1208
+ "declaration": "export interface ScriptProvider {\n source: ScriptSourceInfo;\n listScripts(): Promise<ScriptInfo[]>;\n runScript(script: string, payload: ScriptPayload, options?: ScriptRunOptions, signal?: AbortSignal | undefined): Promise<ScriptResult>;\n}"
1209
+ },
1210
+ {
1211
+ "name": "ScriptResult",
1212
+ "declaration": "export type ScriptResult = z.infer<typeof ScriptResultSchema>;"
1213
+ },
1214
+ {
1215
+ "name": "ScriptRunOptions",
1216
+ "declaration": "export type ScriptRunOptions = z.infer<typeof ScriptRunOptionsSchema>;"
1217
+ },
1218
+ {
1219
+ "name": "ScriptSourceInfo",
1220
+ "declaration": "export interface ScriptSourceInfo {\n id: string;\n label: string;\n}"
1221
+ },
1222
+ {
1223
+ "name": "SelectOption",
1224
+ "declaration": "export interface SelectOption {\n label: string;\n value: FlowDataValue;\n}"
1225
+ },
1226
+ {
1227
+ "name": "UnitEntryResult",
1228
+ "declaration": "export interface UnitEntryResult {\n url: string | null;\n reason?: string;\n}"
1229
+ },
1230
+ {
1231
+ "name": "WorkflowDefinition",
1232
+ "declaration": "export interface WorkflowDefinition {\n formatVersion: number;\n name: string;\n description: string;\n nodes: FlowNode[];\n edges: FlowEdge[];\n}"
1233
+ },
1234
+ {
1235
+ "name": "WorkflowListLlmRoutesResult",
1236
+ "declaration": "export interface WorkflowListLlmRoutesResult {\n routes: WorkflowLlmRoute[];\n}"
1237
+ },
1238
+ {
1239
+ "name": "WorkflowListRouteModelsRequest",
1240
+ "declaration": "export interface WorkflowListRouteModelsRequest {\n provider: string;\n}"
1241
+ },
1242
+ {
1243
+ "name": "WorkflowListRouteModelsResult",
1244
+ "declaration": "export interface WorkflowListRouteModelsResult {\n models: WorkflowRouteModel[];\n error?: string | undefined;\n}"
1245
+ },
1246
+ {
1247
+ "name": "WorkflowListRunsRequest",
1248
+ "declaration": "export interface WorkflowListRunsRequest {\n sessionId?: string | undefined;\n workflowId?: string | undefined;\n}"
1249
+ },
1250
+ {
1251
+ "name": "WorkflowLlmRoute",
1252
+ "declaration": "export interface WorkflowLlmRoute {\n provider: string;\n displayName: string;\n}"
1253
+ },
1254
+ {
1255
+ "name": "WorkflowRouteModel",
1256
+ "declaration": "export interface WorkflowRouteModel {\n id: string;\n name: string;\n}"
291
1257
  }
292
1258
  ]
293
1259
  }
294
1260
  ],
295
1261
  "events": [
296
1262
  {
297
- "description": "一次问候已提交(域事件,跨插件实时通知 seam)。发出方在 `send` 提交后 emit;其它插件可 `ctx.on('autoFlow/recorded', ...)` 订阅。",
298
- "summary": "一次问候已提交(域事件,跨插件实时通知 seam)。发出方在 `send` 提交后 emit;其它插件可 `ctx.on('autoFlow/recorded', ...)` 订阅。",
299
- "tags": [
300
- {
301
- "name": "mode",
302
- "comment": "emit",
303
- "text": "@mode emit"
304
- }
305
- ],
306
- "jsDoc": "/**\n * 一次问候已提交(域事件,跨插件实时通知 seam)。发出方在 `send` 提交后\n * emit;其它插件可 `ctx.on('autoFlow/recorded', ...)` 订阅。\n * @mode emit\n */",
307
- "name": "autoFlow/recorded",
308
- "mode": "emit",
309
- "signature": "'autoFlow/recorded'(payload: { readonly greeting: Greeting; }): void"
1263
+ "tags": [],
1264
+ "name": "auto-flow/node-result",
1265
+ "signature": "'auto-flow/node-result'(data: RunNodeResultEvent): void"
1266
+ },
1267
+ {
1268
+ "tags": [],
1269
+ "name": "auto-flow/node-start",
1270
+ "signature": "'auto-flow/node-start'(data: RunNodeEvent): void"
1271
+ },
1272
+ {
1273
+ "tags": [],
1274
+ "name": "auto-flow/run-end",
1275
+ "signature": "'auto-flow/run-end'(data: RunEndEvent): void"
1276
+ },
1277
+ {
1278
+ "tags": [],
1279
+ "name": "auto-flow/run-need-approval",
1280
+ "signature": "'auto-flow/run-need-approval'(data: RunNeedApprovalEvent): void"
1281
+ },
1282
+ {
1283
+ "tags": [],
1284
+ "name": "auto-flow/run-start",
1285
+ "signature": "'auto-flow/run-start'(data: RunStartEvent): void"
310
1286
  }
311
1287
  ],
312
1288
  "objects": []