@uipath/maestro-builder-sdk 6.60.0 → 6.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +10 -12
  2. package/dist/api-index.md +5 -4
  3. package/dist/check-cli.js +8 -7
  4. package/dist/check.d.ts +11 -0
  5. package/dist/check.js +192 -783
  6. package/dist/cli-library.d.ts +2 -1
  7. package/dist/cli-library.js +7 -2
  8. package/dist/cli-result.d.ts +14 -0
  9. package/dist/cli-result.js +18 -1
  10. package/dist/compile-cli.js +2 -2
  11. package/dist/core/compile-refusal.d.ts +7 -1
  12. package/dist/core/compile-refusal.js +9 -1
  13. package/dist/core/connector-checks.d.ts +8 -30
  14. package/dist/core/connector-checks.js +11 -60
  15. package/dist/core/connector-inputs.js +9 -1
  16. package/dist/core/event-checks.d.ts +15 -2
  17. package/dist/core/event-checks.js +28 -13
  18. package/dist/core/hitl-routing.d.ts +10 -1
  19. package/dist/core/hitl-routing.js +20 -5
  20. package/dist/core/lookups.d.ts +13 -0
  21. package/dist/core/lookups.js +26 -0
  22. package/dist/core/refusals.d.ts +2 -0
  23. package/dist/core/refusals.js +5 -1
  24. package/dist/flow-node-type.d.ts +35 -21
  25. package/dist/flow-parallel-hitl.d.ts +105 -0
  26. package/dist/flow-parallel-hitl.js +214 -0
  27. package/dist/flow-sdk.d.ts +4 -4
  28. package/dist/flow-sdk.js +2 -2
  29. package/dist/flow-terminate-names.d.ts +2 -2
  30. package/dist/flow-terminate-names.js +2 -2
  31. package/dist/merge-compile.js +2 -1
  32. package/dist/nodes/agent/flow/check.js +13 -88
  33. package/dist/nodes/agent/flow/inline-agent.js +41 -14
  34. package/dist/nodes/connector/flow/node-type.js +45 -18
  35. package/dist/nodes/document/flow/ixp.d.ts +1 -1
  36. package/dist/nodes/document/flow/ixp.js +22 -26
  37. package/dist/nodes/hitl/flow/check.js +4 -11
  38. package/dist/nodes/hitl/flow/node-type.js +16 -7
  39. package/dist/nodes/http/flow/check.js +5 -31
  40. package/dist/nodes/http/flow/node-type.js +7 -4
  41. package/dist/nodes/queue/flow/check.d.ts +4 -3
  42. package/dist/nodes/queue/flow/check.js +7 -6
  43. package/dist/nodes/queue/flow/node-type.js +1 -1
  44. package/dist/nodes/transform/flow/check.d.ts +2 -0
  45. package/dist/nodes/transform/flow/check.js +3 -6
  46. package/dist/nodes/transform/flow/node-type.js +6 -6
  47. package/dist/raw-node.js +8 -8
  48. package/dist/serialize.d.ts +38 -3
  49. package/dist/serialize.js +757 -322
  50. package/package.json +2 -2
package/README.md CHANGED
@@ -105,20 +105,18 @@ write what you mean — an email address, the word `bot` — and `lookup()` reco
105
105
  the question. Now `check` has something to say:
106
106
 
107
107
  ```
108
- ⚠ [LOOKUP_UNRESOLVED] Connector step "announce": input "channel" is an unresolved
109
- lookup (profile.email="ada@example.com"). Compile does not make network calls, so
110
- the value has to be resolved first:
111
- npx flow-sdk registry prepare uipath-salesforce-slack --action send-message-to-user \
112
- --resolve channel:profile.email=ada@example.com
113
- Compile will fail until this is recorded.
114
-
115
- ⚠ [LOOKUP_UNRESOLVED] … and the same for "send_as" (name="bot").
108
+ ✗ [LOOKUP_UNRESOLVED] connector uipath.connector.uipath-salesforce-slack.send-message-to-user:
109
+ inputs `channel` (profile.email="ada@example.com"), `send_as` (name="bot") are unresolved
110
+ lookups. Compile does not make network calls, so the values have to be resolved first:
111
+ npx flow-sdk registry prepare uipath-salesforce-slack --action send-message-to-user \
112
+ --resolve channel:profile.email=ada@example.com \
113
+ --resolve send_as:name=bot
116
114
  ```
117
115
 
118
- Warnings, not errors — the source pass still succeeds. It is `compile` that
119
- refuses, because resolving a lookup means asking the tenant and compile makes no
120
- network calls. That is what `prepare` is for: it is the one verb that does talk
121
- to the tenant. Run what `check` named, both fields at once:
116
+ An error: `compile` refuses the step, because resolving a lookup means asking the
117
+ tenant and compile makes no network calls, and `check` reports every refusal
118
+ `compile` would raise. That is what `prepare` is for: it is the one verb that
119
+ does talk to the tenant. Run what `check` named, both fields at once:
122
120
 
123
121
  ```bash
124
122
  uip maestro registry pull # once per machine: the connector library
package/dist/api-index.md CHANGED
@@ -37,7 +37,7 @@ could hand you spans for a version you do not have.
37
37
 
38
38
  ## `@uipath/maestro-builder-sdk`
39
39
 
40
- 242 symbol(s). Import from `@uipath/maestro-builder-sdk`.
40
+ 243 symbol(s). Import from `@uipath/maestro-builder-sdk`.
41
41
 
42
42
  | Symbol | Kind | Declaration | Area | Summary |
43
43
  | --- | --- | --- | --- | --- |
@@ -192,7 +192,7 @@ could hand you spans for a version you do not have.
192
192
  | `LookupResolution` | interface | `dist/core/lookups.d.ts:165-174` | Generated descriptors | One recorded resolution, as `connectors-local/resolutions.json` stores it. |
193
193
  | `LookupResolutions` | type | `dist/core/lookups.d.ts:175-176` | Generated descriptors | Every recorded resolution, keyed by lookupKey. |
194
194
  | `LookupSpec` | interface | `dist/core/lookups.d.ts:11-36` | Generated descriptors | One lookup field's retrieval contract, generated from `reference`. |
195
- | `lookupSpecOf` | function | `dist/core/lookups.d.ts:221-228` | Generated descriptors | The LookupSpec for one field, or `undefined` when it earns no helper. |
195
+ | `lookupSpecOf` | function | `dist/core/lookups.d.ts:234-241` | Generated descriptors | The LookupSpec for one field, or `undefined` when it earns no helper. |
196
196
  | `LookupStrategy` | type | `dist/core/lookups.d.ts:1-10` | Generated descriptors | How `prepare` should retrieve the collection, chosen from the metadata. |
197
197
  | `LookupToken` | interface | `dist/core/lookups.d.ts:37-52` | Generated descriptors | An unresolved lookup: what `.byEmail(…)` returns. |
198
198
  | `LoopOptions` | interface | `dist/flow-sdk.d.ts:522-546` | Option shapes | Loop-specific options. |
@@ -221,11 +221,11 @@ could hand you spans for a version you do not have.
221
221
  | `QueuePriority` | type | `dist/nodes/queue/flow/spec.d.ts:9-10` | Supporting types | The three priorities an Orchestrator queue item can carry. |
222
222
  | `ran` | function | `dist/core/expr.d.ts:95-141` | Expressions and types | Did this step run? |
223
223
  | `rawNode` | function | `dist/raw-node.d.ts:9-71` | Supporting types | Place a node this SDK has no factory for, carrying its definition verbatim (`uipath.exotic.thing@2.1` and the manifest… |
224
- | `RawReference` | type | `dist/core/lookups.d.ts:212-220` | Supporting types | |
224
+ | `RawReference` | type | `dist/core/lookups.d.ts:225-233` | Supporting types | |
225
225
  | `RemoteA2aToolRef` | interface | `dist/core/actions.d.ts:471-491` | Supporting types | A remote A2A (agent-to-agent) endpoint the agent may delegate to. |
226
226
  | `resolvedEventValue` | function | `dist/core/lookups.d.ts:185-201` | Generated descriptors | resolvedValue for a token on an event's `where`. |
227
227
  | `resolvedValue` | function | `dist/core/lookups.d.ts:177-184` | Generated descriptors | The recorded id for a token, or `undefined`. |
228
- | `resolveEventWhere` | function | `dist/core/lookups.d.ts:229-246` | Generated descriptors | An event subscription's `where` with every lookup token swapped for the id `registry prepare --resolve` recorded, or a… |
228
+ | `resolveEventWhere` | function | `dist/core/lookups.d.ts:242-259` | Generated descriptors | An event subscription's `where` with every lookup token swapped for the id `registry prepare --resolve` recorded, or a… |
229
229
  | `ReturnFieldType` | type | `dist/core/actions.d.ts:268-285` | Supporting types | A JSON-schema-ish type for one field of a step's declared `returns`. |
230
230
  | `ReturnOptions` | interface | `dist/flow-sdk.d.ts:480-521` | Option shapes | `.return(...)`-specific options. |
231
231
  | `rpaWorkflow` | function | `dist/nodes/process/flow/factories.d.ts:8-52` | Actions | Invoke a deployed RPA (robotic process automation) workflow — a classic UI-automation process, published to… |
@@ -272,6 +272,7 @@ could hand you spans for a version you do not have.
272
272
  | `TypeDesc` | type | `dist/core/expr.d.ts:385` | Supporting types | |
273
273
  | `types` | const | `dist/core/expr.d.ts:369-384` | Expressions and types | Variable type descriptors (map to Flow variable `type` values). |
274
274
  | `unresolvedLookupMessage` | function | `dist/core/lookups.d.ts:202-211` | Generated descriptors | The message for a lookup nothing has resolved — the command that fixes it. |
275
+ | `unresolvedLookupsMessage` | function | `dist/core/lookups.d.ts:212-224` | Generated descriptors | The message for every lookup one node still owes, with the ONE `prepare` that records them all (it takes every… |
275
276
  | `v` | function | `dist/core/expr.d.ts:29-41` | Expressions and types | Reference a flow variable or output by name → `$vars.<name>`. |
276
277
  | `VarDecl` | interface | `dist/flow-sdk.d.ts:61-73` | Supporting types | 7 field(s) |
277
278
  | `VarSpec` | interface | `dist/flow-sdk.d.ts:74-129` | Supporting types | The rich spelling of a variable declaration: pass it instead of a bare `types.*` descriptor wherever `.input()` /… |
package/dist/check-cli.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Usage: node --experimental-strip-types check-cli.js <flow.ts | BaseName>
6
6
  * Prints diagnostics; exits non-zero if any errors.
7
7
  */
8
- import { reportDiagnostics } from './cli-result.js';
8
+ import { diagnosticLine, reportDiagnostics } from './cli-result.js';
9
9
  import { defaultBindingsFile } from './workdir.js';
10
10
  import { resolveFlowFile, loadBuiltFlow } from './load.js';
11
11
  import { check } from './check.js';
@@ -17,14 +17,15 @@ import { ensureTypeScriptRuntime } from './node-runtime.js';
17
17
  const VALUE_FLAGS = new Set(['--library', '--bindings', '--connectors-local']);
18
18
  /**
19
19
  * Library lookups for the checks whose facts live in the connector corpus:
20
- * event parameters and measured list envelopes.
20
+ * event parameters and measured list envelopes, and the library `check`'s
21
+ * serializer run compiles with.
21
22
  *
22
23
  * Deliberately optional. `check` is the fast inner-loop rung and stays a pure
23
24
  * function of the built flow — with no library it simply cannot know whether an
24
- * empty `where` is correct, so it fails open (a warning, not an error). Given a
25
- * library, `compile` and `check` make the same call with the facts in hand.
26
- * `--library` and `--connectors-local` mirror compile-cli's flags and defaults,
27
- * through the same `openCliLibrary`.
25
+ * empty `where` is correct, or lower a connector step, so it fails open (a
26
+ * warning, or nothing). Given a library, `compile` and `check` make the same
27
+ * call with the facts in hand. `--library` and `--connectors-local` mirror
28
+ * compile-cli's flags and defaults, through the same `openCliLibrary`.
28
29
  */
29
30
  function checkOpts(argv) {
30
31
  // The default bindings.json (workdir.ts), exactly as compile-cli finds it — so the
@@ -53,7 +54,7 @@ export async function run(argv) {
53
54
  return 0;
54
55
  }
55
56
  for (const d of diags)
56
- console.log(`${d.level === 'error' ? '✗' : '⚠'} [${d.code}] ${d.message}${d.suggestion ? ` (did you mean "${d.suggestion}"?)` : ''}`);
57
+ console.log(diagnosticLine(d));
57
58
  const errors = diags.filter((d) => d.level === 'error').length;
58
59
  console.log(`\n${errors} error(s), ${diags.length - errors} warning(s)`);
59
60
  return errors ? 1 : 0;
package/dist/check.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { Library } from './core/library.js';
1
2
  import type { BuiltFlow } from './flow-sdk.js';
2
3
  import { type EventCheckOpts } from './core/event-checks.js';
3
4
  export type { EventParamFields } from './core/event-checks.js';
@@ -34,6 +35,16 @@ export interface CheckOpts extends ConnectorCheckOpts, EventCheckOpts {
34
35
  * whether it grants an error port is then the same answer in both rungs.
35
36
  */
36
37
  connectorDefinition?: (connector: string, operation: string, version?: string, object?: string) => unknown;
38
+ /**
39
+ * The connector library `compile` serializes with. `check` runs the
40
+ * serializer in collect mode, with this library and `bindings`, to report
41
+ * every refusal `compile` would raise from the one place each rule lives;
42
+ * `flowCheckOpts` passes the library `compile` opens. Without one, a step only
43
+ * a library can lower is not judged (check fails open, as its library rules do).
44
+ */
45
+ library?: Library;
46
+ /** `false` skips the serializer pass, for a caller that compiles the flow itself (`merge`). */
47
+ serializer?: false;
37
48
  }
38
49
  export declare function check(built: BuiltFlow, opts?: CheckOpts): Diagnostic[];
39
50
  /**