@uipath/maestro-builder-sdk 6.107.0 → 6.109.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-index.md +10 -10
- package/dist/api-members.md +50 -45
- package/dist/check-cli.js +8 -3
- package/dist/check.d.ts +8 -0
- package/dist/check.js +10 -6
- package/dist/compile-cli.js +5 -0
- package/dist/core/nodes/node-type.d.ts +12 -2
- package/dist/core/refusals.d.ts +13 -0
- package/dist/core/refusals.js +13 -0
- package/dist/core/resource-resolution.d.ts +32 -0
- package/dist/core/resource-resolution.js +2 -0
- package/dist/core/solution-projects.d.ts +63 -0
- package/dist/core/solution-projects.js +37 -0
- package/dist/flow-node-type.d.ts +17 -0
- package/dist/merge-cli.js +8 -3
- package/dist/nodes/process/flow/check.js +36 -20
- package/dist/nodes/process/flow/contract.d.ts +81 -0
- package/dist/nodes/process/flow/contract.js +253 -0
- package/dist/nodes/process/flow/in-solution.d.ts +32 -0
- package/dist/nodes/process/flow/in-solution.js +169 -0
- package/dist/nodes/process/flow/node-type.js +37 -12
- package/dist/nodes/process/flow/refusals.d.ts +4 -1
- package/dist/nodes/process/flow/refusals.js +13 -1
- package/dist/nodes/process/flow/spec.d.ts +175 -20
- package/dist/registry/prepare/process-schema.d.ts +39 -0
- package/dist/registry/prepare/process-schema.js +90 -0
- package/dist/registry/prepare/resources.d.ts +2 -1
- package/dist/registry/prepare/resources.js +24 -3
- package/dist/registry/uip/commands.d.ts +8 -0
- package/dist/registry/uip/commands.js +10 -0
- package/dist/serialize.d.ts +9 -0
- package/dist/serialize.js +4 -2
- package/dist/solution-projects-files.d.ts +6 -0
- package/dist/solution-projects-files.js +163 -0
- package/package.json +2 -2
|
@@ -15,19 +15,46 @@ export interface RpaWorkflowInputs {
|
|
|
15
15
|
* `uip or processes list --all-folders --process-type Process` (the row's `Key`)
|
|
16
16
|
* or `uip maestro flow registry search "uipath.core.rpa-workflow"`.
|
|
17
17
|
*
|
|
18
|
-
* For an in-solution sibling it
|
|
18
|
+
* For an in-solution sibling, leave it out and set `project`: compile fills
|
|
19
|
+
* it with `resource.key` from
|
|
19
20
|
* `resources/solution_folder/process/process/<project>.json` — the suffix of the
|
|
20
21
|
* node type `uip maestro flow registry list --local` shows.
|
|
22
|
+
*
|
|
23
|
+
* **Or leave it out** for a published one and run the `registry prepare`
|
|
24
|
+
* command `check` prints (`--kind Process --name <name> --folder-path <path>`).
|
|
25
|
+
* It records the key and the published argument schema; `compile` writes the
|
|
26
|
+
* key from that record, and `check` validates `inputs` and `returns` against it.
|
|
27
|
+
*
|
|
28
|
+
* @enforcedBy RPA_NO_KEY With no key, the process must be recorded by `prepare`.
|
|
21
29
|
*/
|
|
22
|
-
key
|
|
23
|
-
/** The process's name in Orchestrator — e.g. `'RPA Workflow'`. */
|
|
24
|
-
name
|
|
30
|
+
key?: string;
|
|
31
|
+
/** The process's name in Orchestrator — e.g. `'RPA Workflow'`. Filled from `project` for an in-solution sibling. */
|
|
32
|
+
name?: string;
|
|
25
33
|
/**
|
|
26
34
|
* Where the process lives. `'published'` (the default) is a process deployed
|
|
27
35
|
* to `folderPath`. `'in-solution'` is a sibling RPA project of the same
|
|
28
36
|
* solution: it needs `projectId` and no `folderPath`.
|
|
29
37
|
*/
|
|
30
38
|
location?: ProcessLocation;
|
|
39
|
+
/**
|
|
40
|
+
* The sibling project of this solution to call, by name — e.g.
|
|
41
|
+
* `'CalculatePay'`. It implies `location: 'in-solution'`. `compile` and `check`
|
|
42
|
+
* then read the project's `resources/solution_folder/process/<type>/<project>.json`
|
|
43
|
+
* and `entry-points.json`, and fill `key`, `projectId`, `name` and (when you
|
|
44
|
+
* declare none) `returns`, so none of them is copied by hand:
|
|
45
|
+
*
|
|
46
|
+
* ```ts
|
|
47
|
+
* rpaWorkflow({ location: 'in-solution', project: 'CalculatePay', inputs: { hours: 40 } })
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* The flow must be compiled from inside its solution (a folder at or above it
|
|
51
|
+
* holds the `.uipx`), after `uip solution resources refresh`.
|
|
52
|
+
*
|
|
53
|
+
* @enforcedBy IN_SOLUTION_PROJECT_NOT_FOUND The solution has a project of this name.
|
|
54
|
+
* @enforcedBy IN_SOLUTION_WRONG_BUILDER The project is one this builder calls.
|
|
55
|
+
* @enforcedBy IN_SOLUTION_NO_SOLUTION The flow is compiled inside a solution.
|
|
56
|
+
*/
|
|
57
|
+
project?: string;
|
|
31
58
|
/**
|
|
32
59
|
* The Orchestrator folder holding the process — e.g.
|
|
33
60
|
* `'Shared/uipath-maestro-flow/ProjectEuler RPA'`. Required for a published
|
|
@@ -41,7 +68,8 @@ export interface RpaWorkflowInputs {
|
|
|
41
68
|
* `resources/solution_folder/process/process/<project>.json`. Used only when
|
|
42
69
|
* `location` is `'in-solution'`. The step resolves by `key`, so omitting it is a
|
|
43
70
|
* warning, not an error; but Studio Web's Run node reads it to deploy the
|
|
44
|
-
* sibling first, so set it on a step you author
|
|
71
|
+
* sibling first, so set it on a step you author,
|
|
72
|
+
* or set `project` and compile fills it.
|
|
45
73
|
*
|
|
46
74
|
* @enforcedBy RPA_LOCAL_NO_PROJECT_ID An in-solution process should name its project (warning).
|
|
47
75
|
*/
|
|
@@ -66,6 +94,10 @@ export interface RpaWorkflowInputs {
|
|
|
66
94
|
*
|
|
67
95
|
* @enforcedBy RPA_READ_UNKNOWN_FIELD A read of the output must name a field declared here.
|
|
68
96
|
* @enforcedBy RPA_READ_WITHOUT_RETURNS Reading a field off the result requires declaring it here.
|
|
97
|
+
*
|
|
98
|
+
* Leave it out once `registry prepare` has recorded the published process:
|
|
99
|
+
* compile then writes the recorded output schema, and `check` reads it.
|
|
100
|
+
* Declared, it is checked against that record (`PROCESS_RETURNS_UNKNOWN`).
|
|
69
101
|
*/
|
|
70
102
|
returns?: Record<string, ReturnFieldType>;
|
|
71
103
|
}
|
|
@@ -77,13 +109,21 @@ export interface ApiWorkflowInputs {
|
|
|
77
109
|
* `ProcessKey` reads `<name>.api.<name>`; the GUID you want is the row's `Key`)
|
|
78
110
|
* or `uip maestro flow registry search`.
|
|
79
111
|
*
|
|
80
|
-
* For an in-solution sibling it
|
|
112
|
+
* For an in-solution sibling, leave it out and set `project`: compile fills
|
|
113
|
+
* it with `resource.key` from
|
|
81
114
|
* `resources/solution_folder/process/api/<project>.json`, the suffix of the
|
|
82
115
|
* node type `uip maestro flow registry list --local` shows.
|
|
116
|
+
*
|
|
117
|
+
* **Or leave it out** for a published one and run the `registry prepare`
|
|
118
|
+
* command `check` prints (`--kind Process --name <name> --folder-path <path>`).
|
|
119
|
+
* It records the key and the published argument schema; `compile` writes the
|
|
120
|
+
* key from that record, and `check` validates `inputs` and `returns` against it.
|
|
121
|
+
*
|
|
122
|
+
* @enforcedBy APIWF_NO_KEY With no key, the process must be recorded by `prepare`.
|
|
83
123
|
*/
|
|
84
|
-
key
|
|
85
|
-
/** The workflow's name in Orchestrator — e.g. `'NameToAgeFixed'`. */
|
|
86
|
-
name
|
|
124
|
+
key?: string;
|
|
125
|
+
/** The workflow's name in Orchestrator — e.g. `'NameToAgeFixed'`. Filled from `project` for an in-solution sibling. */
|
|
126
|
+
name?: string;
|
|
87
127
|
/**
|
|
88
128
|
* Where the workflow lives. `'published'` (the default) is a workflow
|
|
89
129
|
* deployed to `folderPath`. `'in-solution'` is a sibling API workflow project
|
|
@@ -91,6 +131,25 @@ export interface ApiWorkflowInputs {
|
|
|
91
131
|
* that sibling's `resource.key`.
|
|
92
132
|
*/
|
|
93
133
|
location?: ProcessLocation;
|
|
134
|
+
/**
|
|
135
|
+
* The sibling project of this solution to call, by name — e.g.
|
|
136
|
+
* `'CalculatePay'`. It implies `location: 'in-solution'`. `compile` and `check`
|
|
137
|
+
* then read the project's `resources/solution_folder/process/<type>/<project>.json`
|
|
138
|
+
* and `entry-points.json`, and fill `key`, `projectId`, `name` and (when you
|
|
139
|
+
* declare none) `returns`, so none of them is copied by hand:
|
|
140
|
+
*
|
|
141
|
+
* ```ts
|
|
142
|
+
* rpaWorkflow({ location: 'in-solution', project: 'CalculatePay', inputs: { hours: 40 } })
|
|
143
|
+
* ```
|
|
144
|
+
*
|
|
145
|
+
* The flow must be compiled from inside its solution (a folder at or above it
|
|
146
|
+
* holds the `.uipx`), after `uip solution resources refresh`.
|
|
147
|
+
*
|
|
148
|
+
* @enforcedBy IN_SOLUTION_PROJECT_NOT_FOUND The solution has a project of this name.
|
|
149
|
+
* @enforcedBy IN_SOLUTION_WRONG_BUILDER The project is one this builder calls.
|
|
150
|
+
* @enforcedBy IN_SOLUTION_NO_SOLUTION The flow is compiled inside a solution.
|
|
151
|
+
*/
|
|
152
|
+
project?: string;
|
|
94
153
|
/**
|
|
95
154
|
* The Orchestrator folder holding it — e.g. `'Shared'`. Required for a
|
|
96
155
|
* published workflow; omit it for an in-solution sibling.
|
|
@@ -126,6 +185,10 @@ export interface ApiWorkflowInputs {
|
|
|
126
185
|
*
|
|
127
186
|
* @enforcedBy APIWF_READ_WITHOUT_RETURNS Reading a field off the result requires
|
|
128
187
|
* declaring it here.
|
|
188
|
+
*
|
|
189
|
+
* Leave it out once `registry prepare` has recorded the published process:
|
|
190
|
+
* compile then writes the recorded output schema, and `check` reads it.
|
|
191
|
+
* Declared, it is checked against that record (`PROCESS_RETURNS_UNKNOWN`).
|
|
129
192
|
*/
|
|
130
193
|
returns?: Record<string, ReturnFieldType>;
|
|
131
194
|
}
|
|
@@ -142,13 +205,21 @@ export interface PublishedFunctionInputs {
|
|
|
142
205
|
* `uip maestro flow registry search "uipath.core.function"` (after
|
|
143
206
|
* `registry pull --force`) or the Orchestrator process listing.
|
|
144
207
|
*
|
|
145
|
-
* For an in-solution sibling it
|
|
208
|
+
* For an in-solution sibling, leave it out and set `project`: compile fills
|
|
209
|
+
* it with `resource.key` from
|
|
146
210
|
* `resources/solution_folder/process/function/<project>.json` — the suffix of
|
|
147
211
|
* the node type `uip maestro flow registry list --local` shows.
|
|
212
|
+
*
|
|
213
|
+
* **Or leave it out** for a published one and run the `registry prepare`
|
|
214
|
+
* command `check` prints (`--kind Process --name <name> --folder-path <path>`).
|
|
215
|
+
* It records the key and the published argument schema; `compile` writes the
|
|
216
|
+
* key from that record, and `check` validates `inputs` and `returns` against it.
|
|
217
|
+
*
|
|
218
|
+
* @enforcedBy FUNCTION_NO_KEY With no key, the process must be recorded by `prepare`.
|
|
148
219
|
*/
|
|
149
|
-
key
|
|
150
|
-
/** The function's name in Orchestrator, e.g. `'acme-echo'`. */
|
|
151
|
-
name
|
|
220
|
+
key?: string;
|
|
221
|
+
/** The function's name in Orchestrator, e.g. `'acme-echo'`. Filled from `project` for an in-solution sibling. */
|
|
222
|
+
name?: string;
|
|
152
223
|
/**
|
|
153
224
|
* Where the function lives. `'published'` (the default) is a function
|
|
154
225
|
* deployed to `folderPath`. `'in-solution'` is a sibling coded-function
|
|
@@ -157,6 +228,25 @@ export interface PublishedFunctionInputs {
|
|
|
157
228
|
* `resources/solution_folder/process/function/<project>.json`.
|
|
158
229
|
*/
|
|
159
230
|
location?: ProcessLocation;
|
|
231
|
+
/**
|
|
232
|
+
* The sibling project of this solution to call, by name — e.g.
|
|
233
|
+
* `'CalculatePay'`. It implies `location: 'in-solution'`. `compile` and `check`
|
|
234
|
+
* then read the project's `resources/solution_folder/process/<type>/<project>.json`
|
|
235
|
+
* and `entry-points.json`, and fill `key`, `projectId`, `name` and (when you
|
|
236
|
+
* declare none) `returns`, so none of them is copied by hand:
|
|
237
|
+
*
|
|
238
|
+
* ```ts
|
|
239
|
+
* rpaWorkflow({ location: 'in-solution', project: 'CalculatePay', inputs: { hours: 40 } })
|
|
240
|
+
* ```
|
|
241
|
+
*
|
|
242
|
+
* The flow must be compiled from inside its solution (a folder at or above it
|
|
243
|
+
* holds the `.uipx`), after `uip solution resources refresh`.
|
|
244
|
+
*
|
|
245
|
+
* @enforcedBy IN_SOLUTION_PROJECT_NOT_FOUND The solution has a project of this name.
|
|
246
|
+
* @enforcedBy IN_SOLUTION_WRONG_BUILDER The project is one this builder calls.
|
|
247
|
+
* @enforcedBy IN_SOLUTION_NO_SOLUTION The flow is compiled inside a solution.
|
|
248
|
+
*/
|
|
249
|
+
project?: string;
|
|
160
250
|
/**
|
|
161
251
|
* The Orchestrator folder holding it. A function is usually deployed into a
|
|
162
252
|
* folder of its OWN name (e.g. `'Shared/acme-echo'`), and the binding's
|
|
@@ -188,6 +278,10 @@ export interface PublishedFunctionInputs {
|
|
|
188
278
|
*
|
|
189
279
|
* @enforcedBy FUNCTION_READ_WITHOUT_RETURNS Reading a field off the result
|
|
190
280
|
* requires declaring it here.
|
|
281
|
+
*
|
|
282
|
+
* Leave it out once `registry prepare` has recorded the published process:
|
|
283
|
+
* compile then writes the recorded output schema, and `check` reads it.
|
|
284
|
+
* Declared, it is checked against that record (`PROCESS_RETURNS_UNKNOWN`).
|
|
191
285
|
*/
|
|
192
286
|
returns?: Record<string, ReturnFieldType>;
|
|
193
287
|
}
|
|
@@ -202,10 +296,17 @@ interface AgenticProcessInputsBase {
|
|
|
202
296
|
* `--all-folders` PAGINATES at 50 rows and says so in `Pagination.HasMore` — pass
|
|
203
297
|
* `--limit`/`--offset`, or scope the call with `--folder-path`, or a process that
|
|
204
298
|
* exists will look as though it does not.
|
|
299
|
+
*
|
|
300
|
+
* **Or leave it out** for a published one and run the `registry prepare`
|
|
301
|
+
* command `check` prints (`--kind Process --name <name> --folder-path <path>`).
|
|
302
|
+
* It records the key and the published argument schema; `compile` writes the
|
|
303
|
+
* key from that record, and `check` validates `inputs` and `returns` against it.
|
|
304
|
+
*
|
|
305
|
+
* @enforcedBy AGENTIC_NO_KEY With no key, the process must be recorded by `prepare`.
|
|
205
306
|
*/
|
|
206
|
-
key
|
|
207
|
-
/** The process's name in Orchestrator — e.g. `'ProcurementProcess'`. */
|
|
208
|
-
name
|
|
307
|
+
key?: string;
|
|
308
|
+
/** The process's name in Orchestrator — e.g. `'ProcurementProcess'`. Filled from `project` for an in-solution sibling. */
|
|
309
|
+
name?: string;
|
|
209
310
|
/**
|
|
210
311
|
* Where the process lives. `'published'` (the default) is a process deployed
|
|
211
312
|
* to `folderPath`. `'in-solution'` is a sibling Flow of the same solution, so
|
|
@@ -217,6 +318,25 @@ interface AgenticProcessInputsBase {
|
|
|
217
318
|
* @enforcedBy AGENTIC_LOCAL_FORM_UNVERIFIED In-solution is supported for `form: 'flow'` only.
|
|
218
319
|
*/
|
|
219
320
|
location?: ProcessLocation;
|
|
321
|
+
/**
|
|
322
|
+
* The sibling project of this solution to call, by name — e.g.
|
|
323
|
+
* `'CalculatePay'`. It implies `location: 'in-solution'`. `compile` and `check`
|
|
324
|
+
* then read the project's `resources/solution_folder/process/<type>/<project>.json`
|
|
325
|
+
* and `entry-points.json`, and fill `key`, `projectId`, `name` and (when you
|
|
326
|
+
* declare none) `returns`, so none of them is copied by hand:
|
|
327
|
+
*
|
|
328
|
+
* ```ts
|
|
329
|
+
* rpaWorkflow({ location: 'in-solution', project: 'CalculatePay', inputs: { hours: 40 } })
|
|
330
|
+
* ```
|
|
331
|
+
*
|
|
332
|
+
* The flow must be compiled from inside its solution (a folder at or above it
|
|
333
|
+
* holds the `.uipx`), after `uip solution resources refresh`.
|
|
334
|
+
*
|
|
335
|
+
* @enforcedBy IN_SOLUTION_PROJECT_NOT_FOUND The solution has a project of this name.
|
|
336
|
+
* @enforcedBy IN_SOLUTION_WRONG_BUILDER The project is one this builder calls.
|
|
337
|
+
* @enforcedBy IN_SOLUTION_NO_SOLUTION The flow is compiled inside a solution.
|
|
338
|
+
*/
|
|
339
|
+
project?: string;
|
|
220
340
|
/**
|
|
221
341
|
* The Orchestrator folder holding it — e.g.
|
|
222
342
|
* `'Shared/uipath-agents/ProcurementProcess'`. Required for a published
|
|
@@ -275,6 +395,10 @@ export type AgenticProcessCompletion = {
|
|
|
275
395
|
*
|
|
276
396
|
* @enforcedBy AGENTIC_READ_WITHOUT_RETURNS Reading a field off the result requires
|
|
277
397
|
* declaring it here.
|
|
398
|
+
*
|
|
399
|
+
* Leave it out once `registry prepare` has recorded the published process:
|
|
400
|
+
* compile then writes the recorded output schema, and `check` reads it.
|
|
401
|
+
* Declared, it is checked against that record (`PROCESS_RETURNS_UNKNOWN`).
|
|
278
402
|
*/
|
|
279
403
|
returns?: Record<string, ReturnFieldType>;
|
|
280
404
|
} | {
|
|
@@ -303,7 +427,8 @@ export interface AgentInputs {
|
|
|
303
427
|
/**
|
|
304
428
|
* The agent resource key (a GUID). It becomes the node's TYPE,
|
|
305
429
|
* `uipath.core.agent.<key>`. For a published agent this is the Orchestrator
|
|
306
|
-
* release key; for an in-solution sibling it
|
|
430
|
+
* release key; for an in-solution sibling, leave it out and set `project`: compile fills it
|
|
431
|
+
* with `resource.key` from
|
|
307
432
|
* `resources/solution_folder/process/agent/<project>.json`.
|
|
308
433
|
*
|
|
309
434
|
* Find it with `uip or processes list --all-folders --process-type Agent` (an agent's
|
|
@@ -312,16 +437,42 @@ export interface AgentInputs {
|
|
|
312
437
|
*
|
|
313
438
|
* Pass `--limit`: `--all-folders` returns 50 rows and reports the truncation
|
|
314
439
|
* only in `Pagination.HasMore`, so an agent that exists can look absent.
|
|
440
|
+
*
|
|
441
|
+
* **Or leave it out** for a published one and run the `registry prepare`
|
|
442
|
+
* command `check` prints (`--kind Process --name <name> --folder-path <path>`).
|
|
443
|
+
* It records the key and the published argument schema; `compile` writes the
|
|
444
|
+
* key from that record, and `check` validates `inputs` and `returns` against it.
|
|
445
|
+
*
|
|
446
|
+
* @enforcedBy AGENT_NO_KEY With no key, the process must be recorded by `prepare`.
|
|
315
447
|
*/
|
|
316
|
-
key
|
|
317
|
-
/** The agent project name. */
|
|
318
|
-
name
|
|
448
|
+
key?: string;
|
|
449
|
+
/** The agent project name. Filled from `project` for an in-solution sibling. */
|
|
450
|
+
name?: string;
|
|
319
451
|
/**
|
|
320
452
|
* Where the referenced agent lives. Published is the backward-compatible
|
|
321
453
|
* default. Use `in-solution` only after registering a sibling agent project
|
|
322
454
|
* with `uip solution projects add`.
|
|
323
455
|
*/
|
|
324
456
|
location?: AgentLocation;
|
|
457
|
+
/**
|
|
458
|
+
* The sibling project of this solution to call, by name — e.g.
|
|
459
|
+
* `'CalculatePay'`. It implies `location: 'in-solution'`. `compile` and `check`
|
|
460
|
+
* then read the project's `resources/solution_folder/process/<type>/<project>.json`
|
|
461
|
+
* and `entry-points.json`, and fill `key`, `projectId`, `name` and (when you
|
|
462
|
+
* declare none) `returns`, so none of them is copied by hand:
|
|
463
|
+
*
|
|
464
|
+
* ```ts
|
|
465
|
+
* rpaWorkflow({ location: 'in-solution', project: 'CalculatePay', inputs: { hours: 40 } })
|
|
466
|
+
* ```
|
|
467
|
+
*
|
|
468
|
+
* The flow must be compiled from inside its solution (a folder at or above it
|
|
469
|
+
* holds the `.uipx`), after `uip solution resources refresh`.
|
|
470
|
+
*
|
|
471
|
+
* @enforcedBy IN_SOLUTION_PROJECT_NOT_FOUND The solution has a project of this name.
|
|
472
|
+
* @enforcedBy IN_SOLUTION_WRONG_BUILDER The project is one this builder calls.
|
|
473
|
+
* @enforcedBy IN_SOLUTION_NO_SOLUTION The flow is compiled inside a solution.
|
|
474
|
+
*/
|
|
475
|
+
project?: string;
|
|
325
476
|
/**
|
|
326
477
|
* The Orchestrator folder holding it — e.g.
|
|
327
478
|
* `'Shared/uipath-maestro-flow/CountLetters LowCode'`.
|
|
@@ -376,6 +527,10 @@ export interface AgentInputs {
|
|
|
376
527
|
*
|
|
377
528
|
* @enforcedBy AGENT_READ_WITHOUT_RETURNS Reading a field off the result requires
|
|
378
529
|
* declaring it here.
|
|
530
|
+
*
|
|
531
|
+
* Leave it out once `registry prepare` has recorded the published process:
|
|
532
|
+
* compile then writes the recorded output schema, and `check` reads it.
|
|
533
|
+
* Declared, it is checked against that record (`PROCESS_RETURNS_UNKNOWN`).
|
|
379
534
|
*/
|
|
380
535
|
returns?: Record<string, ReturnFieldType>;
|
|
381
536
|
/**
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `registry prepare --kind Process --name <name> --folder-path <path>`: after
|
|
3
|
+
* the catalogue names the published process, read its type and argument
|
|
4
|
+
* contract and record them on the row, so `check` can validate a step's
|
|
5
|
+
* `inputs` and `returns` and `compile` can fill in `key` and `returns` (#1979).
|
|
6
|
+
*
|
|
7
|
+
* The catalogue row (`uip solution resources list --kind Process`) carries the
|
|
8
|
+
* process's release `Key`; `uip or processes get <Key> --all-fields` carries
|
|
9
|
+
* `ProcessType` and `ArgumentsV2`, whose `Input` and `Output` are JSON Schemas
|
|
10
|
+
* written as escaped JSON strings. Read on the dev tenant 2026-11-13, for an API
|
|
11
|
+
* workflow:
|
|
12
|
+
*
|
|
13
|
+
* ```json
|
|
14
|
+
* { "Key": "ce857908-…", "Name": "NameToAgeFixed", "ProcessType": "Api",
|
|
15
|
+
* "ArgumentsV2": { "Input": "{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"}}}",
|
|
16
|
+
* "Output": "{\"type\":\"object\",\"properties\":{\"EstimatedAge\":{\"type\":\"integer\"}}}" } }
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* Every process type the Flow process family starts has the same shape: RPA
|
|
20
|
+
* (`Process`), API workflow (`Api`), function (`Function`), agentic process
|
|
21
|
+
* (`ProcessOrchestration`, `Flow`, `CaseManagement`) and agent (`Agent`).
|
|
22
|
+
*
|
|
23
|
+
* A process authored in the solution (no remote twin) has no release yet, so
|
|
24
|
+
* nothing is read for it here; its contract lives in the solution's files.
|
|
25
|
+
*/
|
|
26
|
+
import type { ResourceResolution } from "../../core/resource-resolution.js";
|
|
27
|
+
import type { UipClient } from "../uip/client.js";
|
|
28
|
+
/**
|
|
29
|
+
* The row with the published process's `processType` and `schema` added, read
|
|
30
|
+
* from `uip or processes get`. A row the solution authored, or one with no key,
|
|
31
|
+
* is returned as it is.
|
|
32
|
+
*
|
|
33
|
+
* @throws Refusal `PROCESS_SCHEMA_READ_FAILED` when the read fails or its
|
|
34
|
+
* `ArgumentsV2` is not JSON: "the process takes no arguments" and "the read
|
|
35
|
+
* failed" have opposite remedies, so nothing is recorded.
|
|
36
|
+
*/
|
|
37
|
+
export declare function withProcessSchema(client: UipClient, row: ResourceResolution, cwd: string): Promise<ResourceResolution>;
|
|
38
|
+
/** The console lines for a recorded process's type and arguments; none for a row with neither. */
|
|
39
|
+
export declare function processSchemaLines(row: ResourceResolution): string[];
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Refusal } from "../errors.js";
|
|
2
|
+
import { orProcessGet } from "../uip/commands.js";
|
|
3
|
+
import { failureReason, getCI, isSuccess, parseEnvelope } from "../uip/envelope.js";
|
|
4
|
+
/**
|
|
5
|
+
* One `ArgumentsV2` side as a JSON Schema object, `undefined` for a blank or
|
|
6
|
+
* missing side, or a refusal for text that is not one. Blank is "not
|
|
7
|
+
* extracted", not "no arguments": `GreetingApi` takes a string and answers
|
|
8
|
+
* `{"Input":"","Output":""}`, so reading it as empty would report every input
|
|
9
|
+
* the step passes as unknown.
|
|
10
|
+
*/
|
|
11
|
+
function schemaSide(value, side, process, argv) {
|
|
12
|
+
if (value === undefined || value === null || (typeof value === "string" && value.trim() === ""))
|
|
13
|
+
return undefined;
|
|
14
|
+
let parsed = value;
|
|
15
|
+
if (typeof value === "string") {
|
|
16
|
+
try {
|
|
17
|
+
parsed = JSON.parse(value);
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
throw new Refusal(`process ${JSON.stringify(process)}: ArgumentsV2.${side} is not JSON (${error instanceof Error ? error.message : String(error)}).\n` +
|
|
21
|
+
` ${argv.join(" ")}`, "PROCESS_SCHEMA_READ_FAILED");
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
25
|
+
throw new Refusal(`process ${JSON.stringify(process)}: ArgumentsV2.${side} is not a JSON Schema object.\n ${argv.join(" ")}`, "PROCESS_SCHEMA_READ_FAILED");
|
|
26
|
+
}
|
|
27
|
+
return parsed;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The row with the published process's `processType` and `schema` added, read
|
|
31
|
+
* from `uip or processes get`. A row the solution authored, or one with no key,
|
|
32
|
+
* is returned as it is.
|
|
33
|
+
*
|
|
34
|
+
* @throws Refusal `PROCESS_SCHEMA_READ_FAILED` when the read fails or its
|
|
35
|
+
* `ArgumentsV2` is not JSON: "the process takes no arguments" and "the read
|
|
36
|
+
* failed" have opposite remedies, so nothing is recorded.
|
|
37
|
+
*/
|
|
38
|
+
export async function withProcessSchema(client, row, cwd) {
|
|
39
|
+
if (row.source !== "remote" || row.key === null)
|
|
40
|
+
return row;
|
|
41
|
+
const argv = orProcessGet(row.key);
|
|
42
|
+
const result = await client.run(argv, { cwd });
|
|
43
|
+
const envelope = parseEnvelope(result.stdout);
|
|
44
|
+
if (result.code !== 0 || !isSuccess(envelope)) {
|
|
45
|
+
throw new Refusal(`could not read the arguments of process ${JSON.stringify(row.name)} (${failureReason(result)}).\n` +
|
|
46
|
+
` ${argv.join(" ")}\n` +
|
|
47
|
+
"Check `uip login status`, then re-run. Nothing was recorded.", "PROCESS_SCHEMA_READ_FAILED");
|
|
48
|
+
}
|
|
49
|
+
const data = getCI(envelope, "Data");
|
|
50
|
+
const type = getCI(data, "ProcessType");
|
|
51
|
+
const args = getCI(data, "ArgumentsV2");
|
|
52
|
+
const sides = typeof args === "object" && args !== null && !Array.isArray(args)
|
|
53
|
+
? { input: schemaSide(getCI(args, "Input"), "Input", row.name, argv), output: schemaSide(getCI(args, "Output"), "Output", row.name, argv) }
|
|
54
|
+
: {};
|
|
55
|
+
const schema = sides.input === undefined && sides.output === undefined
|
|
56
|
+
? undefined
|
|
57
|
+
: { ...(sides.input !== undefined ? { input: sides.input } : {}), ...(sides.output !== undefined ? { output: sides.output } : {}) };
|
|
58
|
+
return {
|
|
59
|
+
...row,
|
|
60
|
+
...(typeof type === "string" && type !== "" ? { processType: type } : {}),
|
|
61
|
+
...(schema !== undefined ? { schema } : {}),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/** A side's properties for the console: `name: string, id: integer (required)`; `(not recorded)` for an unknown side. */
|
|
65
|
+
function propertyLines(schema) {
|
|
66
|
+
if (schema === undefined)
|
|
67
|
+
return "(not recorded: Orchestrator left it blank, so check does not validate it)";
|
|
68
|
+
const properties = schema.properties;
|
|
69
|
+
if (typeof properties !== "object" || properties === null || Object.keys(properties).length === 0)
|
|
70
|
+
return "(none)";
|
|
71
|
+
const required = new Set(Array.isArray(schema.required) ? schema.required.filter((r) => typeof r === "string") : []);
|
|
72
|
+
return Object.entries(properties)
|
|
73
|
+
.map(([name, p]) => {
|
|
74
|
+
const t = p?.type;
|
|
75
|
+
return `${name}: ${Array.isArray(t) ? t.join("|") : typeof t === "string" ? t : "any"}${required.has(name) ? " (required)" : ""}`;
|
|
76
|
+
})
|
|
77
|
+
.join(", ");
|
|
78
|
+
}
|
|
79
|
+
/** The console lines for a recorded process's type and arguments; none for a row with neither. */
|
|
80
|
+
export function processSchemaLines(row) {
|
|
81
|
+
return [
|
|
82
|
+
...(row.processType !== undefined ? [`Type ${row.processType}`] : []),
|
|
83
|
+
...(row.schema !== undefined
|
|
84
|
+
? [`Inputs ${propertyLines(row.schema.input)}`, `Outputs ${propertyLines(row.schema.output)}`]
|
|
85
|
+
: row.source === "remote" && row.key !== null
|
|
86
|
+
? ["Arguments not recorded: Orchestrator left the process's ArgumentsV2 blank, so check cannot validate inputs or returns.",
|
|
87
|
+
"Declare `returns` for the fields the flow reads; compile writes the key from this record."]
|
|
88
|
+
: []),
|
|
89
|
+
];
|
|
90
|
+
}
|
|
@@ -92,7 +92,8 @@ export interface ResolvedResource {
|
|
|
92
92
|
* @param client - The `uip` client every call goes through.
|
|
93
93
|
* @param request - The kind, the name, its folder path when the author gave one, and which listings to consult.
|
|
94
94
|
* @returns The row to record, a note for the author when it was found without a folder, and how to read an entity's columns.
|
|
95
|
-
* @throws Refusal `RESOURCE_AMBIGUOUS`, `RESOURCE_NOT_IN_FOLDER`, `RESOURCE_NOT_FOUND` or `RESOURCE_LISTING_FAILED
|
|
95
|
+
* @throws Refusal `RESOURCE_AMBIGUOUS`, `RESOURCE_NOT_IN_FOLDER`, `RESOURCE_NOT_FOUND` or `RESOURCE_LISTING_FAILED`; for a
|
|
96
|
+
* published process, `PROCESS_SCHEMA_READ_FAILED` when its arguments cannot be read.
|
|
96
97
|
*/
|
|
97
98
|
export declare function resolveResource(client: UipClient, request: ResolveResourceRequest): Promise<ResolvedResource>;
|
|
98
99
|
/** One line per recorded fact, for the console. */
|
|
@@ -25,12 +25,13 @@
|
|
|
25
25
|
*/
|
|
26
26
|
import { existsSync, mkdirSync, readdirSync, readFileSync, renameSync } from "node:fs";
|
|
27
27
|
import { dirname, resolve } from "node:path";
|
|
28
|
-
import { ENTITY_KIND, canonicalKind, parseResourceLedger, resourceLedgerKey, resourceNoun, resourcePlural, resourcePrepareCommand, } from "../../core/resource-resolution.js";
|
|
28
|
+
import { ENTITY_KIND, PROCESS_KIND, canonicalKind, parseResourceLedger, resourceLedgerKey, resourceNoun, resourcePlural, resourcePrepareCommand, } from "../../core/resource-resolution.js";
|
|
29
29
|
import { editDistance } from "../../core/edit-distance.js";
|
|
30
30
|
import { writeJsonFile } from "../../core/json-file.js";
|
|
31
31
|
import { workPath } from "../../workdir.js";
|
|
32
32
|
import { Refusal } from "../errors.js";
|
|
33
33
|
import { dfEntitiesList, solutionResourceList } from "../uip/commands.js";
|
|
34
|
+
import { processSchemaLines, withProcessSchema } from "./process-schema.js";
|
|
34
35
|
import { dataItems, failureReason, getCI, parseEnvelope, isSuccess } from "../uip/envelope.js";
|
|
35
36
|
/** The ledger's file name, under the SDK's work directory. */
|
|
36
37
|
export const RESOURCE_LEDGER_FILENAME = "resources.json";
|
|
@@ -329,6 +330,15 @@ function nearMisses(name, pool) {
|
|
|
329
330
|
.slice(0, NEAR_MISS_LIMIT)
|
|
330
331
|
.map(({ c }) => c);
|
|
331
332
|
}
|
|
333
|
+
/** How the source pins a candidate found without a folder: an entity's `{ name, folder }`, a process step's `folderPath`, else the token. */
|
|
334
|
+
function pinnedSpelling(c) {
|
|
335
|
+
const folder = c.folderPath ?? "";
|
|
336
|
+
if (c.kind === ENTITY_KIND)
|
|
337
|
+
return `entity: { name: '${c.name}', folder: '${folder}' }`;
|
|
338
|
+
if (c.kind === PROCESS_KIND)
|
|
339
|
+
return `name: '${c.name}', folderPath: '${folder}'`;
|
|
340
|
+
return `resource('${c.kind}', '${c.name}', { folder: '${folder}' })`;
|
|
341
|
+
}
|
|
332
342
|
function asRow(c) {
|
|
333
343
|
return { kind: c.kind, name: c.name, scope: c.scope, folderPath: c.folderPath, folderKey: c.folderKey, key: c.key, source: c.source };
|
|
334
344
|
}
|
|
@@ -362,9 +372,19 @@ function localCandidates(local, remote) {
|
|
|
362
372
|
* @param client - The `uip` client every call goes through.
|
|
363
373
|
* @param request - The kind, the name, its folder path when the author gave one, and which listings to consult.
|
|
364
374
|
* @returns The row to record, a note for the author when it was found without a folder, and how to read an entity's columns.
|
|
365
|
-
* @throws Refusal `RESOURCE_AMBIGUOUS`, `RESOURCE_NOT_IN_FOLDER`, `RESOURCE_NOT_FOUND` or `RESOURCE_LISTING_FAILED
|
|
375
|
+
* @throws Refusal `RESOURCE_AMBIGUOUS`, `RESOURCE_NOT_IN_FOLDER`, `RESOURCE_NOT_FOUND` or `RESOURCE_LISTING_FAILED`; for a
|
|
376
|
+
* published process, `PROCESS_SCHEMA_READ_FAILED` when its arguments cannot be read.
|
|
366
377
|
*/
|
|
367
378
|
export async function resolveResource(client, request) {
|
|
379
|
+
const found = await findResource(client, request);
|
|
380
|
+
// A published process also records its type and argument contract, which
|
|
381
|
+
// `check` validates a step's inputs and returns against (#1979).
|
|
382
|
+
if (canonicalKind(request.kind) !== PROCESS_KIND)
|
|
383
|
+
return found;
|
|
384
|
+
return { ...found, row: await withProcessSchema(client, found.row, request.cwd ?? process.cwd()) };
|
|
385
|
+
}
|
|
386
|
+
/** {@link resolveResource}'s catalogue half: the one candidate, or the refusal. */
|
|
387
|
+
async function findResource(client, request) {
|
|
368
388
|
const kind = canonicalKind(request.kind);
|
|
369
389
|
const isEntity = kind === ENTITY_KIND;
|
|
370
390
|
const cwd = request.cwd ?? process.cwd();
|
|
@@ -445,7 +465,7 @@ export async function resolveResource(client, request) {
|
|
|
445
465
|
const note = only.scope === "tenant"
|
|
446
466
|
? `Found at tenant level. A tenant-level entity needs no prepare; write it as entity: '${only.name}'`
|
|
447
467
|
: `Found in folder ${JSON.stringify(only.folderPath)}${only.source === "local" ? " (authored in this solution)" : ""} with no folder given. `
|
|
448
|
-
+ `Pin it in the source: ${
|
|
468
|
+
+ `Pin it in the source: ${pinnedSpelling(only)}`;
|
|
449
469
|
return resolved(only, note);
|
|
450
470
|
}
|
|
451
471
|
if (all.length > 1) {
|
|
@@ -491,6 +511,7 @@ export function recordedLines(row, ledger) {
|
|
|
491
511
|
...(row.key !== null ? [`Key ${row.key}`] : []),
|
|
492
512
|
...(row.folderKey !== null ? [`Folder ${row.folderKey}`] : []),
|
|
493
513
|
...(row.fields !== undefined ? [`Columns ${columnSummary(row.fields)}`] : []),
|
|
514
|
+
...processSchemaLines(row),
|
|
494
515
|
`Recorded ${ledger}`,
|
|
495
516
|
];
|
|
496
517
|
}
|
|
@@ -89,3 +89,11 @@ export declare function dfChoiceSetValues(id: string, opts?: {
|
|
|
89
89
|
limit?: number;
|
|
90
90
|
offset?: number;
|
|
91
91
|
}): string[];
|
|
92
|
+
/**
|
|
93
|
+
* `uip or processes get <key> --all-fields`: one published process by its
|
|
94
|
+
* release key. `--all-fields` is what exposes `ProcessType` and `ArgumentsV2`,
|
|
95
|
+
* the process's argument contract: `Input` and `Output` are JSON Schemas,
|
|
96
|
+
* each carried as an escaped JSON string (#1979). The key is tenant-unique, so
|
|
97
|
+
* no folder is needed.
|
|
98
|
+
*/
|
|
99
|
+
export declare function orProcessGet(key: string): string[];
|
|
@@ -147,3 +147,13 @@ export function dfChoiceSetValues(id, opts = {}) {
|
|
|
147
147
|
"--output", "json",
|
|
148
148
|
];
|
|
149
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* `uip or processes get <key> --all-fields`: one published process by its
|
|
152
|
+
* release key. `--all-fields` is what exposes `ProcessType` and `ArgumentsV2`,
|
|
153
|
+
* the process's argument contract: `Input` and `Output` are JSON Schemas,
|
|
154
|
+
* each carried as an escaped JSON string (#1979). The key is tenant-unique, so
|
|
155
|
+
* no folder is needed.
|
|
156
|
+
*/
|
|
157
|
+
export function orProcessGet(key) {
|
|
158
|
+
return [UIP, "or", "processes", "get", key, "--all-fields", "--output", "json"];
|
|
159
|
+
}
|
package/dist/serialize.d.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* the platform emits, so the result passes `uip maestro flow validate`.
|
|
8
8
|
*/
|
|
9
9
|
import { type ResourceResolutions } from './core/resource-resolution.js';
|
|
10
|
+
import type { SolutionProjects } from './core/solution-projects.js';
|
|
10
11
|
import type { NodeCatalog } from './core/node-catalog.js';
|
|
11
12
|
import type { DefinitionReference } from './core/node-classes.js';
|
|
12
13
|
import type { BuiltFlow } from './flow-sdk.js';
|
|
@@ -79,6 +80,14 @@ export interface SerializeOpts {
|
|
|
79
80
|
* cache at `~/.uipath/nodes/index.json`; a programmatic caller passes its own.
|
|
80
81
|
*/
|
|
81
82
|
nodeCatalog?: NodeCatalog;
|
|
83
|
+
/**
|
|
84
|
+
* The solution the flow is authored in and its sibling projects, read by the
|
|
85
|
+
* CLI (`readSolutionProjects`, #1978). An in-solution process step named by
|
|
86
|
+
* `project` compiles from its sibling's resource file, and an explicit `key`
|
|
87
|
+
* or `projectId` is checked against it. Absent: a step named by `project` is
|
|
88
|
+
* refused (`IN_SOLUTION_NO_SOLUTION`) and an explicit key is not judged.
|
|
89
|
+
*/
|
|
90
|
+
solution?: SolutionProjects;
|
|
82
91
|
/**
|
|
83
92
|
* Receives each {@link SerializeWarning}. `compile-cli` prints them as
|
|
84
93
|
* `⚠ [CODE] …` after `check()`'s diagnostics; a caller that passes nothing
|
package/dist/serialize.js
CHANGED
|
@@ -2256,11 +2256,12 @@ function serializeFlow(built, opts) {
|
|
|
2256
2256
|
*/
|
|
2257
2257
|
function emitRegistered(entry, step, tails, scope, parentId) {
|
|
2258
2258
|
const where = `step "${step.name}"`;
|
|
2259
|
-
const spec = step.spec;
|
|
2260
2259
|
// A pin the registry has no implementation for, but the flow carries, is
|
|
2261
2260
|
// emitted at that version with the carried definition (#1128).
|
|
2262
|
-
const resolved = resolveVersionCarried(entry.type, spec, step.options?.version, where, carriedFor);
|
|
2261
|
+
const resolved = resolveVersionCarried(entry.type, step.spec, step.options?.version, where, carriedFor);
|
|
2263
2262
|
const impl = resolved.impl;
|
|
2263
|
+
// What the solution says about a sibling the step names (#1978), as check reads it.
|
|
2264
|
+
const spec = impl.withSolution ? impl.withSolution(step.spec, opts.solution) : step.spec;
|
|
2264
2265
|
const version = resolved.version;
|
|
2265
2266
|
const id = stepUid(scope, step.name);
|
|
2266
2267
|
if (impl.capsOpenTail)
|
|
@@ -2311,6 +2312,7 @@ function serializeFlow(built, opts) {
|
|
|
2311
2312
|
// to the step's next resource (two tools on one process share it).
|
|
2312
2313
|
bind: (b) => { bound.push(b); resourceBindings.set(b.id, b); },
|
|
2313
2314
|
resources: opts.resources,
|
|
2315
|
+
...(opts.solution !== undefined ? { solution: opts.solution } : {}),
|
|
2314
2316
|
// At a carried version the node's own definition IS the carried one,
|
|
2315
2317
|
// whatever version the implementation asks for (it was written for a
|
|
2316
2318
|
// bundled one), so its defaults and outputs come from the file's entry.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SolutionProjects } from './core/solution-projects.js';
|
|
2
|
+
/**
|
|
3
|
+
* The solution `fromDir` sits in, and its sibling projects; `undefined` when
|
|
4
|
+
* no folder at or above `fromDir` holds a `.uipx`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function readSolutionProjects(fromDir: string): SolutionProjects | undefined;
|