dsh-auto-flow 0.1.2 → 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,140 +1,321 @@
1
1
  /* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
2
2
  import { z } from 'zod'
3
3
 
4
- const FlowDataValueRemoteCodec$schema = 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))])
5
- const FlowDataValueRemoteCodec$schema2 = 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))])
6
- const FlowDataValueRemoteCodec$schema3 = 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))])
7
- const FlowDataValueRemoteCodec$schema4 = 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))])
8
- const FlowDataValueRemoteCodec$schema5 = 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))])
9
- const FlowDataValueRemoteCodec$schema6 = 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))])
10
- const FlowDataValueRemoteCodec$schema7 = 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))])
11
- const FlowDataValueRemoteCodec$schema8 = 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))])
12
- const dsh_auto_flow_autoFlow_approveRun_parameter_0$schema = z.string()
13
- const dsh_auto_flow_autoFlow_approveRun_parameter_1$schema = z.string()
14
- const dsh_auto_flow_autoFlow_approveRun_result$schema = z.object({
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({
15
61
  'runId': z.string(),
16
62
  'workflowId': z.string(),
17
63
  'name': z.string(),
18
64
  'sessionId': z.union([z.undefined(), z.string()]).optional(),
19
- 'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("completed"), z.literal("failed"), z.literal("cancelled")]),
65
+ 'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("completed"), z.literal("failed"), z.literal("cancelled"), z.literal("crashed")]),
20
66
  'workspaceDir': z.string(),
21
67
  'steps': z.array(z.object({
68
+ 'index': z.number(),
22
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()),
73
+ })]).optional(),
74
+ 'inputSources': z.union([z.undefined(), z.array(z.string())]).optional(),
23
75
  'nodeType': z.string(),
24
76
  'label': z.string(),
25
- 'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("failed"), z.literal("pending"), z.literal("success"), z.literal("skipped")]),
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(),
26
81
  'script': z.union([z.undefined(), z.string()]).optional(),
27
82
  'stepDir': z.union([z.undefined(), z.string()]).optional(),
28
- 'result': 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$schema)), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema))])), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema))]).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(),
29
98
  'error': z.union([z.undefined(), z.string()]).optional(),
30
99
  'errorCode': z.union([z.undefined(), z.string()]).optional(),
31
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(),
32
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(),
33
126
  'createdAt': z.number(),
34
127
  'updatedAt': z.number(),
35
- })
36
- const dsh_auto_flow_autoFlow_cancelRun_parameter_0$schema = z.string()
37
- const dsh_auto_flow_autoFlow_cancelRun_result$schema = z.object({
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({
38
133
  'runId': z.string(),
39
134
  'workflowId': z.string(),
40
135
  'name': z.string(),
41
136
  'sessionId': z.union([z.undefined(), z.string()]).optional(),
42
- 'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("completed"), z.literal("failed"), z.literal("cancelled")]),
137
+ 'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("completed"), z.literal("failed"), z.literal("cancelled"), z.literal("crashed")]),
43
138
  'workspaceDir': z.string(),
44
139
  'steps': z.array(z.object({
140
+ 'index': z.number(),
45
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(),
46
147
  'nodeType': z.string(),
47
148
  'label': z.string(),
48
- 'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("failed"), z.literal("pending"), z.literal("success"), z.literal("skipped")]),
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(),
49
153
  'script': z.union([z.undefined(), z.string()]).optional(),
50
154
  'stepDir': z.union([z.undefined(), z.string()]).optional(),
51
- 'result': 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$schema8)), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema8))])), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema8))]).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(),
52
170
  'error': z.union([z.undefined(), z.string()]).optional(),
53
171
  'errorCode': z.union([z.undefined(), z.string()]).optional(),
54
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(),
55
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(),
57
199
  'updatedAt': z.number(),
58
- })
59
- const dsh_auto_flow_autoFlow_deleteFlow_parameter_0$schema = z.string()
60
- const dsh_auto_flow_autoFlow_deleteFlow_result$schema = z.object({
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({
61
205
  'deleted': z.boolean(),
62
- })
63
- const dsh_auto_flow_autoFlow_listFlows_result$schema = z.array(z.object({
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({
64
209
  'id': z.string(),
65
210
  'name': z.string(),
66
211
  'description': z.string(),
67
212
  'nodeCount': z.number(),
68
213
  'inputs': z.array(z.string()),
69
- }))
70
- const dsh_auto_flow_autoFlow_listLlmRoutes_result$schema = z.object({
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({
71
217
  'routes': z.array(z.object({
72
218
  'provider': z.string(),
73
219
  'displayName': z.string(),
74
220
  })),
75
- })
76
- const dsh_auto_flow_autoFlow_listRouteModels_parameter_0$schema = z.object({
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({
77
224
  'provider': z.string(),
78
- })
79
- const dsh_auto_flow_autoFlow_listRouteModels_result$schema = z.object({
225
+ }))
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({
80
228
  'models': z.array(z.object({
81
229
  'id': z.string(),
82
230
  'name': z.string(),
83
231
  })),
84
232
  'error': z.union([z.undefined(), z.string()]).optional(),
85
- })
86
- const dsh_auto_flow_autoFlow_listRuns_parameter_0$schema = z.object({
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({
87
236
  'sessionId': z.union([z.undefined(), z.string()]).optional(),
88
237
  'workflowId': z.union([z.undefined(), z.string()]).optional(),
89
- })
90
- const dsh_auto_flow_autoFlow_listRuns_result$schema = z.array(z.object({
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({
91
241
  'runId': z.string(),
92
242
  'workflowId': z.string(),
93
243
  'name': z.string(),
94
244
  'sessionId': z.union([z.undefined(), z.string()]).optional(),
95
- 'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("completed"), z.literal("failed"), z.literal("cancelled")]),
245
+ 'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("completed"), z.literal("failed"), z.literal("cancelled"), z.literal("crashed")]),
96
246
  'nodeCount': z.number(),
97
247
  'createdAt': z.number(),
98
248
  'updatedAt': z.number(),
99
- }))
100
- const dsh_auto_flow_autoFlow_listScripts_result$schema = z.array(z.object({
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({
101
252
  'name': z.string(),
102
253
  'label': z.string(),
103
254
  'description': z.string(),
104
255
  'params': z.array(z.object({
105
256
  'key': z.string(),
106
257
  'label': z.string(),
107
- 'type': z.union([z.literal("string"), z.literal("number"), z.literal("boolean"), z.literal("object"), z.literal("select"), z.literal("datetime"), z.literal("array")]),
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")]),
108
259
  'required': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
109
- '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$schema5)), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema5))])), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema5))]).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(),
110
261
  'options': z.union([z.undefined(), z.array(z.object({
111
262
  'label': z.string(),
112
- '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))]),
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()))]),
113
264
  }))]).optional(),
265
+ 'multiple': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
114
266
  'format': z.union([z.undefined(), z.string()]).optional(),
115
267
  'placeholder': z.union([z.undefined(), z.string()]).optional(),
116
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(),
117
286
  })),
118
287
  'artifacts': z.union([z.undefined(), z.object({
119
288
  'filesKey': z.union([z.undefined(), z.string()]).optional(),
120
- 'filesShape': z.union([z.undefined(), z.literal("paths"), z.literal("vidu-imgs")]).optional(),
289
+ 'filesShape': z.union([z.undefined(), z.literal("paths"), z.literal("prompt-pairs")]).optional(),
121
290
  'filesPromptKey': z.union([z.undefined(), z.string()]).optional(),
122
291
  })]).optional(),
123
- }))
124
- const dsh_auto_flow_autoFlow_loadFlow_parameter_0$schema = z.string()
125
- const dsh_auto_flow_autoFlow_loadFlow_result$schema = z.union([z.literal(null), z.object({
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({
126
306
  'formatVersion': z.number(),
127
307
  'name': z.string(),
128
308
  'description': z.string(),
129
309
  'nodes': z.array(z.object({
130
310
  'id': z.string(),
311
+ 'name': z.string(),
131
312
  'type': z.string(),
132
313
  'position': z.object({
133
314
  'x': z.number(),
134
315
  'y': z.number(),
135
316
  }),
136
- '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))])),
137
- '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(),
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(),
138
319
  })),
139
320
  'edges': z.array(z.object({
140
321
  'id': z.string(),
@@ -142,22 +323,107 @@ const dsh_auto_flow_autoFlow_loadFlow_result$schema = z.union([z.literal(null),
142
323
  'target': z.string(),
143
324
  'sourceHandle': z.union([z.undefined(), z.string()]).optional(),
144
325
  'targetHandle': z.union([z.undefined(), z.string()]).optional(),
145
- 'type': z.union([z.undefined(), z.string()]).optional(),
146
- 'animated': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
147
- '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$schema2)), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema2))]))]).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(),
148
327
  })),
149
- })])
150
- const dsh_auto_flow_autoFlow_runFlow_parameter_0$schema = z.object({
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(),
398
+ 'createdAt': z.number(),
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({
151
416
  'flow': z.object({
152
417
  'nodes': z.array(z.object({
153
418
  'id': z.string(),
419
+ 'name': z.string(),
154
420
  'type': z.string(),
155
421
  'position': z.object({
156
422
  'x': z.number(),
157
423
  'y': z.number(),
158
424
  }),
159
- '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$schema6)), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema6))])),
160
- '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$schema6)), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema6))]))]).optional(),
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(),
161
427
  })),
162
428
  'edges': z.array(z.object({
163
429
  'id': z.string(),
@@ -165,55 +431,106 @@ const dsh_auto_flow_autoFlow_runFlow_parameter_0$schema = z.object({
165
431
  'target': z.string(),
166
432
  'sourceHandle': z.union([z.undefined(), z.string()]).optional(),
167
433
  'targetHandle': z.union([z.undefined(), z.string()]).optional(),
168
- 'type': z.union([z.undefined(), z.string()]).optional(),
169
- 'animated': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
170
- '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(),
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(),
171
435
  })),
172
436
  }),
173
- 'workflowId': z.union([z.undefined(), z.string()]).optional(),
174
- 'name': z.union([z.undefined(), z.string()]).optional(),
175
- 'sessionId': z.union([z.undefined(), z.string()]).optional(),
176
- })
177
- const dsh_auto_flow_autoFlow_runFlow_result$schema = z.object({
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({
178
443
  'runId': z.string(),
179
- })
180
- const dsh_auto_flow_autoFlow_runState_parameter_0$schema = z.string()
181
- const dsh_auto_flow_autoFlow_runState_result$schema = z.union([z.literal(null), z.object({
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({
182
449
  'runId': z.string(),
183
450
  'workflowId': z.string(),
184
451
  'name': z.string(),
185
452
  'sessionId': z.union([z.undefined(), z.string()]).optional(),
186
- 'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("completed"), z.literal("failed"), z.literal("cancelled")]),
453
+ 'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("completed"), z.literal("failed"), z.literal("cancelled"), z.literal("crashed")]),
187
454
  'workspaceDir': z.string(),
188
455
  'steps': z.array(z.object({
456
+ 'index': z.number(),
189
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(),
190
463
  'nodeType': z.string(),
191
464
  'label': z.string(),
192
- 'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("failed"), z.literal("pending"), z.literal("success"), z.literal("skipped")]),
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(),
193
469
  'script': z.union([z.undefined(), z.string()]).optional(),
194
470
  'stepDir': z.union([z.undefined(), z.string()]).optional(),
195
- 'result': 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$schema7)), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema7))])), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema7))]).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(),
196
486
  'error': z.union([z.undefined(), z.string()]).optional(),
197
487
  'errorCode': z.union([z.undefined(), z.string()]).optional(),
198
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(),
199
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(),
200
514
  'createdAt': z.number(),
201
515
  'updatedAt': z.number(),
202
- })])
203
- const dsh_auto_flow_autoFlow_saveFlow_parameter_0$schema = z.string()
204
- const dsh_auto_flow_autoFlow_saveFlow_parameter_1$schema = z.object({
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({
205
521
  'formatVersion': z.number(),
206
522
  'name': z.string(),
207
523
  'description': z.string(),
208
524
  'nodes': z.array(z.object({
209
525
  'id': z.string(),
526
+ 'name': z.string(),
210
527
  'type': z.string(),
211
528
  'position': z.object({
212
529
  'x': z.number(),
213
530
  'y': z.number(),
214
531
  }),
215
- '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))])),
216
- '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(),
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(),
217
534
  })),
218
535
  'edges': z.array(z.object({
219
536
  'id': z.string(),
@@ -221,24 +538,24 @@ const dsh_auto_flow_autoFlow_saveFlow_parameter_1$schema = z.object({
221
538
  'target': z.string(),
222
539
  'sourceHandle': z.union([z.undefined(), z.string()]).optional(),
223
540
  'targetHandle': z.union([z.undefined(), z.string()]).optional(),
224
- 'type': z.union([z.undefined(), z.string()]).optional(),
225
- 'animated': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
226
- '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$schema3)), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema3))]))]).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(),
227
542
  })),
228
- })
229
- const dsh_auto_flow_autoFlow_saveFlow_result$schema = z.object({
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({
230
546
  'formatVersion': z.number(),
231
547
  'name': z.string(),
232
548
  'description': z.string(),
233
549
  'nodes': z.array(z.object({
234
550
  'id': z.string(),
551
+ 'name': z.string(),
235
552
  'type': z.string(),
236
553
  'position': z.object({
237
554
  'x': z.number(),
238
555
  'y': z.number(),
239
556
  }),
240
- '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$schema4)), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4))])),
241
- '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$schema4)), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4))]))]).optional(),
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(),
242
559
  })),
243
560
  'edges': z.array(z.object({
244
561
  'id': z.string(),
@@ -246,11 +563,16 @@ const dsh_auto_flow_autoFlow_saveFlow_result$schema = z.object({
246
563
  'target': z.string(),
247
564
  'sourceHandle': z.union([z.undefined(), z.string()]).optional(),
248
565
  'targetHandle': z.union([z.undefined(), z.string()]).optional(),
249
- 'type': z.union([z.undefined(), z.string()]).optional(),
250
- 'animated': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
251
- '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$schema4)), z.record(z.string(), z.lazy(() => FlowDataValueRemoteCodec$schema4))]))]).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(),
252
567
  })),
253
- })
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
+ }))
254
576
 
255
577
  export const TYPERT = {
256
578
  package: 'dsh-auto-flow',
@@ -272,7 +594,7 @@ export const TYPERT = {
272
594
  codec: {
273
595
  mode: 'strict',
274
596
  typeSymbol: 'dsh-auto-flow#autoFlow/approveRun:runId',
275
- schema: dsh_auto_flow_autoFlow_approveRun_parameter_0$schema,
597
+ create: dsh_auto_flow_autoFlow_approveRun_parameter_0$schema,
276
598
  },
277
599
  },
278
600
  {
@@ -282,16 +604,16 @@ export const TYPERT = {
282
604
  codec: {
283
605
  mode: 'strict',
284
606
  typeSymbol: 'dsh-auto-flow#autoFlow/approveRun:choice',
285
- schema: dsh_auto_flow_autoFlow_approveRun_parameter_1$schema,
607
+ create: dsh_auto_flow_autoFlow_approveRun_parameter_1$schema,
286
608
  },
287
609
  },
288
610
  ],
289
611
  result: {
290
612
  mode: 'strict',
291
- typeSymbol: 'dsh-auto-flow/types#RunState',
292
- schema: dsh_auto_flow_autoFlow_approveRun_result$schema,
613
+ typeSymbol: 'workflow/types#RunState',
614
+ create: dsh_auto_flow_autoFlow_approveRun_result$schema,
293
615
  },
294
- sourceLocation: {"file":"packages/dsh-auto-flow/src/host/service.ts","line":1019,"column":9},
616
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":533,"column":9},
295
617
  },
296
618
  {
297
619
  id: 'dsh-auto-flow#autoFlow/cancelRun',
@@ -307,16 +629,16 @@ export const TYPERT = {
307
629
  codec: {
308
630
  mode: 'strict',
309
631
  typeSymbol: 'dsh-auto-flow#autoFlow/cancelRun:runId',
310
- schema: dsh_auto_flow_autoFlow_cancelRun_parameter_0$schema,
632
+ create: dsh_auto_flow_autoFlow_cancelRun_parameter_0$schema,
311
633
  },
312
634
  },
313
635
  ],
314
636
  result: {
315
637
  mode: 'strict',
316
- typeSymbol: 'dsh-auto-flow/types#RunState',
317
- schema: dsh_auto_flow_autoFlow_cancelRun_result$schema,
638
+ typeSymbol: 'workflow/types#RunState',
639
+ create: dsh_auto_flow_autoFlow_cancelRun_result$schema,
318
640
  },
319
- sourceLocation: {"file":"packages/dsh-auto-flow/src/host/service.ts","line":988,"column":9},
641
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":527,"column":9},
320
642
  },
321
643
  {
322
644
  id: 'dsh-auto-flow#autoFlow/deleteFlow',
@@ -332,16 +654,16 @@ export const TYPERT = {
332
654
  codec: {
333
655
  mode: 'strict',
334
656
  typeSymbol: 'dsh-auto-flow#autoFlow/deleteFlow:flowId',
335
- schema: dsh_auto_flow_autoFlow_deleteFlow_parameter_0$schema,
657
+ create: dsh_auto_flow_autoFlow_deleteFlow_parameter_0$schema,
336
658
  },
337
659
  },
338
660
  ],
339
661
  result: {
340
662
  mode: 'strict',
341
663
  typeSymbol: 'dsh-auto-flow#autoFlow/deleteFlow:result',
342
- schema: dsh_auto_flow_autoFlow_deleteFlow_result$schema,
664
+ create: dsh_auto_flow_autoFlow_deleteFlow_result$schema,
343
665
  },
344
- sourceLocation: {"file":"packages/dsh-auto-flow/src/host/service.ts","line":420,"column":9},
666
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":410,"column":9},
345
667
  },
346
668
  {
347
669
  id: 'dsh-auto-flow#autoFlow/listFlows',
@@ -354,9 +676,9 @@ export const TYPERT = {
354
676
  result: {
355
677
  mode: 'strict',
356
678
  typeSymbol: 'dsh-auto-flow#autoFlow/listFlows:result',
357
- schema: dsh_auto_flow_autoFlow_listFlows_result$schema,
679
+ create: dsh_auto_flow_autoFlow_listFlows_result$schema,
358
680
  },
359
- sourceLocation: {"file":"packages/dsh-auto-flow/src/host/service.ts","line":365,"column":3},
681
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":282,"column":3},
360
682
  },
361
683
  {
362
684
  id: 'dsh-auto-flow#autoFlow/listLlmRoutes',
@@ -368,10 +690,10 @@ export const TYPERT = {
368
690
  ],
369
691
  result: {
370
692
  mode: 'strict',
371
- typeSymbol: 'dsh-auto-flow/types#WorkflowListLlmRoutesResult',
372
- schema: dsh_auto_flow_autoFlow_listLlmRoutes_result$schema,
693
+ typeSymbol: 'workflow/types#WorkflowListLlmRoutesResult',
694
+ create: dsh_auto_flow_autoFlow_listLlmRoutes_result$schema,
373
695
  },
374
- sourceLocation: {"file":"packages/dsh-auto-flow/src/host/service.ts","line":435,"column":3},
696
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":474,"column":3},
375
697
  },
376
698
  {
377
699
  id: 'dsh-auto-flow#autoFlow/listRouteModels',
@@ -386,17 +708,17 @@ export const TYPERT = {
386
708
  source: 'json',
387
709
  codec: {
388
710
  mode: 'strict',
389
- typeSymbol: 'dsh-auto-flow/types#WorkflowListRouteModelsRequest',
390
- schema: dsh_auto_flow_autoFlow_listRouteModels_parameter_0$schema,
711
+ typeSymbol: 'workflow/types#WorkflowListRouteModelsRequest',
712
+ create: dsh_auto_flow_autoFlow_listRouteModels_parameter_0$schema,
391
713
  },
392
714
  },
393
715
  ],
394
716
  result: {
395
717
  mode: 'strict',
396
- typeSymbol: 'dsh-auto-flow/types#WorkflowListRouteModelsResult',
397
- schema: dsh_auto_flow_autoFlow_listRouteModels_result$schema,
718
+ typeSymbol: 'workflow/types#WorkflowListRouteModelsResult',
719
+ create: dsh_auto_flow_autoFlow_listRouteModels_result$schema,
398
720
  },
399
- sourceLocation: {"file":"packages/dsh-auto-flow/src/host/service.ts","line":445,"column":9},
721
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":484,"column":9},
400
722
  },
401
723
  {
402
724
  id: 'dsh-auto-flow#autoFlow/listRuns',
@@ -411,17 +733,17 @@ export const TYPERT = {
411
733
  source: 'json',
412
734
  codec: {
413
735
  mode: 'strict',
414
- typeSymbol: 'dsh-auto-flow/types#WorkflowListRunsRequest',
415
- schema: dsh_auto_flow_autoFlow_listRuns_parameter_0$schema,
736
+ typeSymbol: 'workflow/types#WorkflowListRunsRequest',
737
+ create: dsh_auto_flow_autoFlow_listRuns_parameter_0$schema,
416
738
  },
417
739
  },
418
740
  ],
419
741
  result: {
420
742
  mode: 'strict',
421
743
  typeSymbol: 'dsh-auto-flow#autoFlow/listRuns:result',
422
- schema: dsh_auto_flow_autoFlow_listRuns_result$schema,
744
+ create: dsh_auto_flow_autoFlow_listRuns_result$schema,
423
745
  },
424
- sourceLocation: {"file":"packages/dsh-auto-flow/src/host/service.ts","line":384,"column":9},
746
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":305,"column":9},
425
747
  },
426
748
  {
427
749
  id: 'dsh-auto-flow#autoFlow/listScripts',
@@ -434,9 +756,9 @@ export const TYPERT = {
434
756
  result: {
435
757
  mode: 'strict',
436
758
  typeSymbol: 'dsh-auto-flow#autoFlow/listScripts:result',
437
- schema: dsh_auto_flow_autoFlow_listScripts_result$schema,
759
+ create: dsh_auto_flow_autoFlow_listScripts_result$schema,
438
760
  },
439
- sourceLocation: {"file":"packages/dsh-auto-flow/src/host/service.ts","line":427,"column":9},
761
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":423,"column":9},
440
762
  },
441
763
  {
442
764
  id: 'dsh-auto-flow#autoFlow/loadFlow',
@@ -452,16 +774,66 @@ export const TYPERT = {
452
774
  codec: {
453
775
  mode: 'strict',
454
776
  typeSymbol: 'dsh-auto-flow#autoFlow/loadFlow:flowId',
455
- schema: dsh_auto_flow_autoFlow_loadFlow_parameter_0$schema,
777
+ create: dsh_auto_flow_autoFlow_loadFlow_parameter_0$schema,
456
778
  },
457
779
  },
458
780
  ],
459
781
  result: {
460
782
  mode: 'strict',
461
783
  typeSymbol: 'dsh-auto-flow#autoFlow/loadFlow:result',
462
- schema: dsh_auto_flow_autoFlow_loadFlow_result$schema,
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,
803
+ },
804
+ },
805
+ ],
806
+ result: {
807
+ mode: 'strict',
808
+ typeSymbol: 'workflow/types#RunState',
809
+ create: dsh_auto_flow_autoFlow_resumeRun_result$schema,
463
810
  },
464
- sourceLocation: {"file":"packages/dsh-auto-flow/src/host/service.ts","line":403,"column":3},
811
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":544,"column":9},
812
+ },
813
+ {
814
+ id: 'dsh-auto-flow#autoFlow/retryRun',
815
+ service: 'autoFlow',
816
+ namespace: 'autoFlow',
817
+ method: 'retryRun',
818
+ invocation: { kind: 'direct' },
819
+ parameters: [
820
+ {
821
+ name: 'runId',
822
+ wire: 'runId',
823
+ source: 'json',
824
+ codec: {
825
+ mode: 'strict',
826
+ typeSymbol: 'dsh-auto-flow#autoFlow/retryRun:runId',
827
+ create: dsh_auto_flow_autoFlow_retryRun_parameter_0$schema,
828
+ },
829
+ },
830
+ ],
831
+ result: {
832
+ mode: 'strict',
833
+ typeSymbol: 'dsh-auto-flow#autoFlow/retryRun:result',
834
+ create: dsh_auto_flow_autoFlow_retryRun_result$schema,
835
+ },
836
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":559,"column":9},
465
837
  },
466
838
  {
467
839
  id: 'dsh-auto-flow#autoFlow/runFlow',
@@ -477,16 +849,16 @@ export const TYPERT = {
477
849
  codec: {
478
850
  mode: 'strict',
479
851
  typeSymbol: 'dsh-auto-flow#autoFlow/runFlow:request',
480
- schema: dsh_auto_flow_autoFlow_runFlow_parameter_0$schema,
852
+ create: dsh_auto_flow_autoFlow_runFlow_parameter_0$schema,
481
853
  },
482
854
  },
483
855
  ],
484
856
  result: {
485
857
  mode: 'strict',
486
858
  typeSymbol: 'dsh-auto-flow#autoFlow/runFlow:result',
487
- schema: dsh_auto_flow_autoFlow_runFlow_result$schema,
859
+ create: dsh_auto_flow_autoFlow_runFlow_result$schema,
488
860
  },
489
- sourceLocation: {"file":"packages/dsh-auto-flow/src/host/service.ts","line":470,"column":9},
861
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":510,"column":9},
490
862
  },
491
863
  {
492
864
  id: 'dsh-auto-flow#autoFlow/runState',
@@ -502,16 +874,16 @@ export const TYPERT = {
502
874
  codec: {
503
875
  mode: 'strict',
504
876
  typeSymbol: 'dsh-auto-flow#autoFlow/runState:runId',
505
- schema: dsh_auto_flow_autoFlow_runState_parameter_0$schema,
877
+ create: dsh_auto_flow_autoFlow_runState_parameter_0$schema,
506
878
  },
507
879
  },
508
880
  ],
509
881
  result: {
510
882
  mode: 'strict',
511
883
  typeSymbol: 'dsh-auto-flow#autoFlow/runState:result',
512
- schema: dsh_auto_flow_autoFlow_runState_result$schema,
884
+ create: dsh_auto_flow_autoFlow_runState_result$schema,
513
885
  },
514
- sourceLocation: {"file":"packages/dsh-auto-flow/src/host/service.ts","line":979,"column":9},
886
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":521,"column":9},
515
887
  },
516
888
  {
517
889
  id: 'dsh-auto-flow#autoFlow/saveFlow',
@@ -527,7 +899,7 @@ export const TYPERT = {
527
899
  codec: {
528
900
  mode: 'strict',
529
901
  typeSymbol: 'dsh-auto-flow#autoFlow/saveFlow:flowId',
530
- schema: dsh_auto_flow_autoFlow_saveFlow_parameter_0$schema,
902
+ create: dsh_auto_flow_autoFlow_saveFlow_parameter_0$schema,
531
903
  },
532
904
  },
533
905
  {
@@ -536,29 +908,68 @@ export const TYPERT = {
536
908
  source: 'json',
537
909
  codec: {
538
910
  mode: 'strict',
539
- typeSymbol: 'dsh-auto-flow/types#WorkflowDefinition',
540
- schema: dsh_auto_flow_autoFlow_saveFlow_parameter_1$schema,
911
+ typeSymbol: 'workflow/types#WorkflowDefinition',
912
+ create: dsh_auto_flow_autoFlow_saveFlow_parameter_1$schema,
541
913
  },
542
914
  },
543
915
  ],
544
916
  result: {
545
917
  mode: 'strict',
546
- typeSymbol: 'dsh-auto-flow/types#WorkflowDefinition',
547
- schema: dsh_auto_flow_autoFlow_saveFlow_result$schema,
918
+ typeSymbol: 'workflow/types#WorkflowDefinition',
919
+ create: dsh_auto_flow_autoFlow_saveFlow_result$schema,
548
920
  },
549
- sourceLocation: {"file":"packages/dsh-auto-flow/src/host/service.ts","line":411,"column":9},
921
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":359,"column":9},
922
+ },
923
+ {
924
+ id: 'dsh-auto-flow#autoFlow/unitUrl',
925
+ service: 'autoFlow',
926
+ namespace: 'autoFlow',
927
+ method: 'unitUrl',
928
+ invocation: { kind: 'direct' },
929
+ parameters: [
930
+ {
931
+ name: 'unit',
932
+ wire: 'unit',
933
+ source: 'json',
934
+ codec: {
935
+ mode: 'strict',
936
+ typeSymbol: 'dsh-auto-flow#autoFlow/unitUrl:unit',
937
+ create: dsh_auto_flow_autoFlow_unitUrl_parameter_0$schema,
938
+ },
939
+ },
940
+ ],
941
+ result: {
942
+ mode: 'strict',
943
+ typeSymbol: 'dsh-auto-flow/types#UnitEntryResult',
944
+ create: dsh_auto_flow_autoFlow_unitUrl_result$schema,
945
+ },
946
+ sourceLocation: {"file":"packages/business/dsh-auto-flow/src/host/service.ts","line":240,"column":9},
550
947
  },
551
948
  ],
552
949
  model: {
553
950
  "services": [
554
951
  {
555
- "description": "服务类即插件。依赖消费约定: - 可选依赖用 ctx.inject(settings),缺失照常加载; - storageDomain 是硬依赖,[Service.init] 缺失时大声失败(不静默内存态); - playwrightAg 用 ctx.get 读取,未组合时 runFlow 报 playwright-missing; - 持久层在 [Service.init] 异步打开。",
556
- "summary": "服务类即插件。依赖消费约定: - 可选依赖用 ctx.inject(settings),缺失照常加载; - storageDomain 是硬依赖,[Service.init] 缺失时大声失败(不静默内存态); - playwrightAg 用 ctx.get 读取,未组合时 runFlow 报 playwright-missing; - 持久层在 [Service.init] 异步打开。",
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] 异步打开。",
557
954
  "tags": [],
558
- "jsDoc": "/**\n * 服务类即插件。依赖消费约定:\n * - 可选依赖用 ctx.inject(settings),缺失照常加载;\n * - storageDomain 是硬依赖,[Service.init] 缺失时大声失败(不静默内存态);\n * - playwrightAg 用 ctx.get 读取,未组合时 runFlow 报 playwright-missing;\n * - 持久层在 [Service.init] 异步打开。\n */",
955
+ "jsDoc": "/**\n * 服务类即插件。依赖消费约定:\n * - 可选依赖用 ctx.inject(settings),缺失照常加载;\n * - storageDomain 是硬依赖,[Service.init] 缺失时大声失败(不静默内存态);\n * - ag 用 ctx.get 读取,未组合时 runFlow 报 ag-missing;\n * - 持久层在 [Service.init] 异步打开。\n */",
559
956
  "key": "autoFlow",
560
957
  "exportName": "default",
561
958
  "members": [
959
+ {
960
+ "kind": "method",
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 */"
965
+ },
966
+ {
967
+ "kind": "method",
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 */"
972
+ },
562
973
  {
563
974
  "kind": "method",
564
975
  "name": "listFlows",
@@ -576,16 +987,23 @@ export const TYPERT = {
576
987
  {
577
988
  "kind": "method",
578
989
  "name": "loadFlow",
579
- "signature": "@Remote('loadFlow') loadFlow(flowId: string): Promise<WorkflowDefinition | null>",
580
- "summary": "按 id 读取工作流文档(不存在或未组合 storageDomain 时返回 null)。",
581
- "jsDoc": "/** 按 id 读取工作流文档(不存在或未组合 storageDomain 时返回 null)。 */"
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 */"
582
993
  },
583
994
  {
584
995
  "kind": "method",
585
996
  "name": "saveFlow",
586
997
  "signature": "@Remote('saveFlow') async saveFlow(flowId: string, flow: WorkflowDefinition): Promise<WorkflowDefinition>",
587
- "summary": "按 id 保存工作流文档(domain 打开时落盘,否则仅返回原样;失败大声抛出)。",
588
- "jsDoc": "/** 按 id 保存工作流文档(domain 打开时落盘,否则仅返回原样;失败大声抛出)。 */"
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 */"
589
1007
  },
590
1008
  {
591
1009
  "kind": "method",
@@ -598,43 +1016,29 @@ export const TYPERT = {
598
1016
  "kind": "method",
599
1017
  "name": "listScripts",
600
1018
  "signature": "@Remote('listScripts') async listScripts(): Promise<ScriptInfo[]>",
601
- "summary": "列出可运行脚本清单(展示名/描述/参数/产物装配规则;playwright-ag 为准,缺失时返回空)。",
602
- "jsDoc": "/** 列出可运行脚本清单(展示名/描述/参数/产物装配规则;playwright-ag 为准,缺失时返回空)。 */"
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 */"
603
1021
  },
604
1022
  {
605
1023
  "kind": "method",
606
1024
  "name": "listLlmRoutes",
607
1025
  "signature": "@Remote('listLlmRoutes') listLlmRoutes(): WorkflowListLlmRoutesResult",
608
- "summary": "列出实时 LLM 模型路由(llm/vision/agent 节点的 provider 下拉)。",
609
- "jsDoc": "/** 列出实时 LLM 模型路由(llm/vision/agent 节点的 provider 下拉)。 */"
1026
+ "summary": "列出实时 LLM 模型路由(llm/agent 节点的 provider 下拉)。",
1027
+ "jsDoc": "/** 列出实时 LLM 模型路由(llm/agent 节点的 provider 下拉)。 */"
610
1028
  },
611
1029
  {
612
1030
  "kind": "method",
613
1031
  "name": "listRouteModels",
614
1032
  "signature": "@Remote('listRouteModels') async listRouteModels( request: WorkflowListRouteModelsRequest, ): Promise<WorkflowListRouteModelsResult>",
615
- "summary": "列出某实时模型路由上的模型目录(llm/vision/agent 节点的 model 下拉)。",
616
- "jsDoc": "/** 列出某实时模型路由上的模型目录(llm/vision/agent 节点的 model 下拉)。 */"
1033
+ "summary": "列出某实时模型路由上的模型目录(llm/agent 节点的 model 下拉)。",
1034
+ "jsDoc": "/** 列出某实时模型路由上的模型目录(llm/agent 节点的 model 下拉)。 */"
617
1035
  },
618
1036
  {
619
1037
  "kind": "method",
620
1038
  "name": "runFlow",
621
1039
  "signature": "@Remote('runFlow') async runFlow(request: { flow: FlowGraph workflowId?: string name?: string sessionId?: string }): Promise<{ runId: string }>",
622
- "summary": "启动一次工作流运行(@Remote,画布触发):按层级并发执行 表单→脚本→审批,审批经画布 approveRun/cancelRun 放行。 返回 runId 即返回,进度经 runState 轮询;校验失败抛 invalid-flow(含诊断项)。 sessionId 用于把产物落到「当前会话工作区」(缺省回退配置 workspaceDir)。",
623
- "jsDoc": "/**\n * 启动一次工作流运行(@Remote,画布触发):按层级并发执行 表单→脚本→审批,审批经画布 approveRun/cancelRun 放行。\n * 返回 runId 即返回,进度经 runState 轮询;校验失败抛 invalid-flow(含诊断项)。\n * sessionId 用于把产物落到「当前会话工作区」(缺省回退配置 workspaceDir)。\n */"
624
- },
625
- {
626
- "kind": "method",
627
- "name": "runForAgent",
628
- "signature": "async runForAgent( flowId: string, args: Record<string, FlowDataValue>, agent: unknown, signal?: AbortSignal, ): Promise<RunOutcome>",
629
- "summary": "供模型工具:按 flowId 加载并运行,args 覆盖表单默认值,等待完成返回结算结果。 同时把最近一条用户消息的图片/文本补填进缺失的 image/task 输入(会话上下文注入)。",
630
- "jsDoc": "/** 供模型工具:按 flowId 加载并运行,args 覆盖表单默认值,等待完成返回结算结果。\n * 同时把最近一条用户消息的图片/文本补填进缺失的 image/task 输入(会话上下文注入)。 */"
631
- },
632
- {
633
- "kind": "method",
634
- "name": "runWorkflowCommand",
635
- "signature": "async runWorkflowCommand(invocation: { agent: unknown rawInput: string signal: AbortSignal }): Promise<{ kind: 'success'; text?: string } | { kind: 'error'; text: string }>",
636
- "summary": "执行 /workflow 命令:不带参数列出工作流;/workflow <id> [key=value ...] 运行并等待结算。",
637
- "jsDoc": "/** 执行 /workflow 命令:不带参数列出工作流;/workflow <id> [key=value ...] 运行并等待结算。 */"
1040
+ "summary": "画布触发运行(实现见 features/runs/coordinator.ts):只等到「运行已启动」即返回 runId。",
1041
+ "jsDoc": "/** 画布触发运行(实现见 features/runs/coordinator.ts):只等到「运行已启动」即返回 runId。 */"
638
1042
  },
639
1043
  {
640
1044
  "kind": "method",
@@ -647,25 +1051,73 @@ export const TYPERT = {
647
1051
  "kind": "method",
648
1052
  "name": "cancelRun",
649
1053
  "signature": "@Remote('cancelRun') async cancelRun(runId: string): Promise<RunState>",
650
- "summary": "取消运行:协作式取消,中止在飞的脚本/LLM/shell/HTTP,引擎在下一个步骤边界停下;若正等待审批则放行让引擎退出。 画布面向的根运行取消时会连带取消其整个审批上抛队列中的嵌套运行。",
651
- "jsDoc": "/** 取消运行:协作式取消,中止在飞的脚本/LLM/shell/HTTP,引擎在下一个步骤边界停下;若正等待审批则放行让引擎退出。\n * 画布面向的根运行取消时会连带取消其整个审批上抛队列中的嵌套运行。 */"
1054
+ "summary": "取消运行(协作式;画布根运行会连带取消其审批上抛队列里的嵌套运行)。",
1055
+ "jsDoc": "/** 取消运行(协作式;画布根运行会连带取消其审批上抛队列里的嵌套运行)。 */"
652
1056
  },
653
1057
  {
654
1058
  "kind": "method",
655
1059
  "name": "approveRun",
656
1060
  "signature": "@Remote('approveRun') async approveRun(runId: string, choice: string): Promise<RunState>",
657
- "summary": "审批选择:choice = 审批节点的某个选项标签;画布用根 runId 操作时,自动作用于当前待处理的嵌套审批(队首)。",
658
- "jsDoc": "/** 审批选择:choice = 审批节点的某个选项标签;画布用根 runId 操作时,自动作用于当前待处理的嵌套审批(队首)。 */"
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)。 */"
659
1091
  }
660
1092
  ],
661
1093
  "types": [
1094
+ {
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;"
1105
+ },
1106
+ {
1107
+ "name": "FieldConditionSet",
1108
+ "declaration": "export type FieldConditionSet = FieldCondition | readonly FieldCondition[];"
1109
+ },
662
1110
  {
663
1111
  "name": "FlowDataValue",
664
1112
  "declaration": "export type FlowDataValue = string | number | boolean | null | FlowDataValue[] | { [key: string]: FlowDataValue; };"
665
1113
  },
666
1114
  {
667
1115
  "name": "FlowEdge",
668
- "declaration": "export interface FlowEdge {\n id: string;\n source: string;\n target: string;\n sourceHandle?: string | undefined;\n targetHandle?: string | undefined;\n type?: string | undefined;\n animated?: boolean | undefined;\n data?: Record<string, FlowDataValue> | undefined;\n}"
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}"
1117
+ },
1118
+ {
1119
+ "name": "FlowEdgeType",
1120
+ "declaration": "export type FlowEdgeType = 'custom-edge' | 'default' | 'straight' | 'step' | 'smoothstep' | 'simplebezier';"
669
1121
  },
670
1122
  {
671
1123
  "name": "FlowGraph",
@@ -673,7 +1125,7 @@ export const TYPERT = {
673
1125
  },
674
1126
  {
675
1127
  "name": "FlowNode",
676
- "declaration": "export interface FlowNode {\n id: string;\n type: string;\n position: { x: number; y: number; };\n data: FlowNodeData;\n style?: Record<string, FlowDataValue> | undefined;\n}"
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}"
677
1129
  },
678
1130
  {
679
1131
  "name": "FlowNodeData",
@@ -683,9 +1135,33 @@ export const TYPERT = {
683
1135
  "name": "FlowSummary",
684
1136
  "declaration": "export interface FlowSummary {\n id: string;\n name: string;\n description: string;\n nodeCount: number;\n inputs: string[];\n}"
685
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
+ },
686
1150
  {
687
1151
  "name": "PropertyType",
688
- "declaration": "export type PropertyType = 'string' | 'number' | 'boolean' | 'select' | 'datetime' | 'array' | 'object';"
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}"
689
1165
  },
690
1166
  {
691
1167
  "name": "RunOutcome",
@@ -693,11 +1169,11 @@ export const TYPERT = {
693
1169
  },
694
1170
  {
695
1171
  "name": "RunState",
696
- "declaration": "export interface RunState {\n runId: string;\n workflowId: string;\n name: string;\n sessionId?: string | undefined;\n status: 'running' | 'waiting' | 'completed' | 'failed' | 'cancelled';\n workspaceDir: string;\n steps: RunStep[];\n createdAt: number;\n updatedAt: number;\n}"
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}"
697
1173
  },
698
1174
  {
699
1175
  "name": "RunStep",
700
- "declaration": "export interface RunStep {\n nodeId: string;\n nodeType: string;\n label: string;\n status: 'pending' | 'running' | 'waiting' | 'success' | 'failed' | 'skipped';\n script?: string | undefined;\n stepDir?: string | undefined;\n result?: FlowDataValue | undefined;\n error?: string | undefined;\n errorCode?: string | undefined;\n durationMs?: number | undefined;\n}"
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}"
701
1177
  },
702
1178
  {
703
1179
  "name": "RunSummary",
@@ -705,20 +1181,52 @@ export const TYPERT = {
705
1181
  },
706
1182
  {
707
1183
  "name": "ScriptArtifactSpec",
708
- "declaration": "export interface ScriptArtifactSpec {\n filesKey?: string | undefined;\n filesShape?: 'paths' | 'vidu-imgs' | undefined;\n filesPromptKey?: string | undefined;\n}"
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];"
709
1193
  },
710
1194
  {
711
1195
  "name": "ScriptInfo",
712
- "declaration": "export interface ScriptInfo {\n name: string;\n label: string;\n description: string;\n params: ScriptParamField[];\n artifacts?: ScriptArtifactSpec | undefined;\n}"
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}"
713
1197
  },
714
1198
  {
715
1199
  "name": "ScriptParamField",
716
- "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 format?: string | undefined;\n placeholder?: string | undefined;\n description?: string | undefined;\n}"
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}"
717
1221
  },
718
1222
  {
719
1223
  "name": "SelectOption",
720
1224
  "declaration": "export interface SelectOption {\n label: string;\n value: FlowDataValue;\n}"
721
1225
  },
1226
+ {
1227
+ "name": "UnitEntryResult",
1228
+ "declaration": "export interface UnitEntryResult {\n url: string | null;\n reason?: string;\n}"
1229
+ },
722
1230
  {
723
1231
  "name": "WorkflowDefinition",
724
1232
  "declaration": "export interface WorkflowDefinition {\n formatVersion: number;\n name: string;\n description: string;\n nodes: FlowNode[];\n edges: FlowEdge[];\n}"