@uipath/maestro-builder-sdk 6.100.0 → 6.102.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/README.md +3 -0
- package/dist/api-index.md +14 -14
- package/dist/api-members.md +16 -16
- package/dist/cli/commands/capabilities.d.ts +10 -0
- package/dist/cli/commands/capabilities.js +24 -0
- package/dist/cli/common.d.ts +17 -17
- package/dist/cli/common.js +114 -20
- package/dist/cli/index.js +2 -0
- package/dist/core/actions.d.ts +6 -0
- package/dist/core/actions.js +7 -0
- package/dist/core/binding-messages.d.ts +33 -1
- package/dist/core/binding-messages.js +51 -0
- package/dist/core/connector-option-keys.d.ts +4 -0
- package/dist/core/connector-option-keys.js +9 -0
- package/dist/core/event-subscription.d.ts +8 -0
- package/dist/core/event-subscription.js +2 -4
- package/dist/core/nodes/node-type.d.ts +25 -0
- package/dist/core/nodes/versioned.d.ts +3 -1
- package/dist/core/nodes/versioned.js +1 -0
- package/dist/core/option-keys.d.ts +62 -0
- package/dist/core/option-keys.js +66 -0
- package/dist/core/refusals.d.ts +3 -0
- package/dist/core/refusals.js +5 -0
- package/dist/flow-node-type.d.ts +31 -1
- package/dist/flow-option-keys.d.ts +22 -0
- package/dist/flow-option-keys.js +33 -0
- package/dist/flow-sdk.js +5 -9
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/nodes/agent/flow/inline-agent.js +2 -4
- package/dist/nodes/agent/flow/node-type.js +12 -0
- package/dist/nodes/ai-patterns/flow/node-type.js +6 -0
- package/dist/nodes/connector/flow/event-trigger.js +4 -2
- package/dist/nodes/connector/flow/event-wait.js +4 -2
- package/dist/nodes/connector/flow/node-type.js +5 -4
- package/dist/nodes/connector/flow/raw-node.js +1 -1
- package/dist/nodes/conversation/flow/node-type.js +9 -0
- package/dist/nodes/data-fabric/flow/verbs.js +10 -0
- package/dist/nodes/delay/flow/node-type.js +4 -0
- package/dist/nodes/document/flow/ixp.js +4 -0
- package/dist/nodes/document/flow/node-type.js +6 -0
- package/dist/nodes/hitl/flow/node-type.js +4 -0
- package/dist/nodes/http/flow/check.js +55 -0
- package/dist/nodes/http/flow/node-type.js +7 -4
- package/dist/nodes/process/flow/node-type.js +10 -0
- package/dist/nodes/queue/flow/node-type.js +4 -0
- package/dist/nodes/script/flow/node-type.js +4 -0
- package/dist/nodes/transform/flow/node-type.js +4 -0
- package/dist/nodes/trigger/flow/node-type.js +6 -0
- package/dist/sdk-capabilities.d.ts +57 -0
- package/dist/sdk-capabilities.js +76 -0
- package/dist/serialize.js +73 -1
- package/package.json +9 -3
package/dist/serialize.js
CHANGED
|
@@ -15,6 +15,9 @@ import { connectorRawNodeRefusal } from './nodes/connector/flow/family.js';
|
|
|
15
15
|
import { isAgentResourceType } from './nodes/agent/flow/family.js';
|
|
16
16
|
import { CompileRefusal, LibraryRequiredRefusal } from './core/compile-refusal.js';
|
|
17
17
|
import { nearestName } from './core/edit-distance.js';
|
|
18
|
+
import { unknownOptionRefusal } from './core/option-keys.js';
|
|
19
|
+
import { ownEntry } from './core/own-entry.js';
|
|
20
|
+
import { ENTRY_POINT_OPTION_KEYS, STEP_OPTION_KEYS, TRIGGER_OPTION_KEYS } from './flow-option-keys.js';
|
|
18
21
|
import { rawNodeInputProblem, registeredRawType } from './raw-node-advice.js';
|
|
19
22
|
import { planContributionBindings } from './core/contribution-bindings.js';
|
|
20
23
|
import { declaredErrorPortRefusal, definitionHasErrorPort, errorPortRefusal } from './core/error-port.js';
|
|
@@ -26,7 +29,7 @@ import { indexCarriedDefinitions } from './core/carried-definitions.js';
|
|
|
26
29
|
import { sharedDefinition } from './core/shared-definition.js';
|
|
27
30
|
import { FlowBuildError, loweringExpressionErrors } from './flow-expr-check.js';
|
|
28
31
|
import { connectionConnectors } from './bindings-v2.js';
|
|
29
|
-
import { BindingRefusal, bindingLabelRefusal, connectionStubMessage } from './core/binding-messages.js';
|
|
32
|
+
import { BindingRefusal, bindingLabelRefusal, bindingPairRefusal, connectionStubMessage } from './core/binding-messages.js';
|
|
30
33
|
import { OUTCOME_HANDLE_NODE_TYPES, assertHitlExitInvariant, hitlExitViolation } from './core/hitl-routing.js';
|
|
31
34
|
import { STICKY_NOTE_TYPE, STICKY_NOTE_TYPE_VERSION } from './core/definitionless-node-types.js';
|
|
32
35
|
import { placeholderPosition } from './node-placement.js';
|
|
@@ -463,12 +466,27 @@ function resolveBinding(opts, name, attribute, where, target) {
|
|
|
463
466
|
opts.warn({ code: 'CONNECTION_STUB', message: stub });
|
|
464
467
|
return value;
|
|
465
468
|
}
|
|
469
|
+
/**
|
|
470
|
+
* A node's `{ connection, folder }` labels, each resolved by {@link resolveBinding}
|
|
471
|
+
* (its own refusals first), then the pair judged by `bindingPairRefusal`: one
|
|
472
|
+
* label for both, or two labels that resolve to one real key, is
|
|
473
|
+
* `BINDING_CONNECTION_IS_FOLDER` (#1968).
|
|
474
|
+
*/
|
|
475
|
+
function resolveBindingPair(opts, labels, where, target) {
|
|
476
|
+
const connectionId = resolveBinding(opts, labels.connection, 'connection', where, target);
|
|
477
|
+
const folderKey = resolveBinding(opts, labels.folder, 'folder', where, target);
|
|
478
|
+
const refused = bindingPairRefusal(opts.bindings, labels, where, target);
|
|
479
|
+
if (refused)
|
|
480
|
+
throw refused;
|
|
481
|
+
return { connectionId, folderKey };
|
|
482
|
+
}
|
|
466
483
|
/** What the shared event-subscription emission (`core/event-subscription.ts`) needs from these options. */
|
|
467
484
|
function eventEnv(opts) {
|
|
468
485
|
return {
|
|
469
486
|
...(opts.library !== undefined ? { library: opts.library } : {}),
|
|
470
487
|
...(opts.bindings !== undefined ? { bindings: opts.bindings } : {}),
|
|
471
488
|
resolveBinding: (name, attribute, where, target) => resolveBinding(opts, name, attribute, where, target),
|
|
489
|
+
resolveBindingPair: (labels, where, target) => resolveBindingPair(opts, labels, where, target),
|
|
472
490
|
};
|
|
473
491
|
}
|
|
474
492
|
/**
|
|
@@ -2004,6 +2022,7 @@ function serializeFlow(built, opts) {
|
|
|
2004
2022
|
// lowered eagerly to `$vars.start.output.x`, so a rename is applied by the
|
|
2005
2023
|
// same `renameRefs` pass that rewrites step names (see `rename.nodeIds`).
|
|
2006
2024
|
const triggerId = built.triggerId ?? 'start';
|
|
2025
|
+
refuseUnknownRootOptions('trigger', triggerId, built.trigger, built.triggerOptions, '.trigger()');
|
|
2007
2026
|
const trigger = emitRootNode('trigger', triggerId, built.trigger, built.triggerOptions?.version, () => {
|
|
2008
2027
|
// A custom FlowTrigger subclass (no `kind`) compiles through its own
|
|
2009
2028
|
// contribution: exact definition, author inputs, definition-owned identity.
|
|
@@ -2292,6 +2311,7 @@ function serializeFlow(built, opts) {
|
|
|
2292
2311
|
: bundledDefinition(typeName, v) ?? carriedFor(typeName, v)),
|
|
2293
2312
|
bindings: resourceBindings,
|
|
2294
2313
|
resolveBinding: ((name, attribute, at, target) => resolveBinding(bindingOpts, name, attribute, at, target)),
|
|
2314
|
+
resolveBindingPair: (labels, at, target) => resolveBindingPair(bindingOpts, labels, at, target),
|
|
2295
2315
|
bindConnection: (c) => {
|
|
2296
2316
|
const { entries } = connectionResourceBindings({
|
|
2297
2317
|
def: { model: c.model },
|
|
@@ -2522,6 +2542,46 @@ function serializeFlow(built, opts) {
|
|
|
2522
2542
|
}
|
|
2523
2543
|
refuseOn(scope, step.name, refusal);
|
|
2524
2544
|
}
|
|
2545
|
+
/**
|
|
2546
|
+
* FLOW_UNKNOWN_OPTION for every option object of `spec` its type declares
|
|
2547
|
+
* (`optionKeys`, flow-node-type.ts) and for `options` against `optionKeys`:
|
|
2548
|
+
* each key the serializer does not know would be dropped from the file, so
|
|
2549
|
+
* it is refused (builder-sdk#1990). `report` is how the caller refuses: on
|
|
2550
|
+
* a step, or on a root. A spec of no registered type, a custom node's, has
|
|
2551
|
+
* no declared keys and stays open.
|
|
2552
|
+
*/
|
|
2553
|
+
function unknownOptions(spec, lists, factory, options, optionKeys, where, report) {
|
|
2554
|
+
for (const [field, keys] of Object.entries(lists ?? {})) {
|
|
2555
|
+
if (keys === undefined || spec === null || typeof spec !== 'object')
|
|
2556
|
+
continue;
|
|
2557
|
+
const call = factory !== undefined ? `${factory}()${field === 'inputs' ? '' : `'s ${field}`}` : field;
|
|
2558
|
+
const refusal = unknownOptionRefusal(spec[field], keys, call, where);
|
|
2559
|
+
if (refusal)
|
|
2560
|
+
report(refusal);
|
|
2561
|
+
}
|
|
2562
|
+
if (optionKeys) {
|
|
2563
|
+
const refusal = unknownOptionRefusal(options, optionKeys.keys, `${optionKeys.call}'s options`, where);
|
|
2564
|
+
if (refusal)
|
|
2565
|
+
report(refusal);
|
|
2566
|
+
}
|
|
2567
|
+
}
|
|
2568
|
+
/** {@link unknownOptions} for one step: its spec's objects (an action's, a `.stepSwitch()`'s) and its builder options. */
|
|
2569
|
+
function refuseUnknownStepOptions(scope, step) {
|
|
2570
|
+
if (!('name' in step))
|
|
2571
|
+
return;
|
|
2572
|
+
const spec = 'spec' in step ? step.spec : undefined;
|
|
2573
|
+
const entry = spec !== undefined && typeof spec.kind === 'string' ? FLOW_NODE_TYPES.byKind(spec.kind, spec) : undefined;
|
|
2574
|
+
const lists = entry?.type.optionKeys;
|
|
2575
|
+
unknownOptions(spec, lists, entry?.type.factory, 'options' in step ? step.options : undefined, ownEntry(STEP_OPTION_KEYS, step.kind), `step "${step.name}"`, (refusal) => refuseOn(scope, step.name, refusal));
|
|
2576
|
+
}
|
|
2577
|
+
/** {@link unknownOptions} for one root: its trigger spec's objects and its `.trigger()` / `.entryPoint()` options. */
|
|
2578
|
+
function refuseUnknownRootOptions(name, nodeId, spec, options, call) {
|
|
2579
|
+
const kind = spec?.kind;
|
|
2580
|
+
const type = typeof kind === 'string' && !(spec instanceof FlowTrigger && !('kind' in spec)) ? FLOW_TRIGGER_TYPES.byKind(kind)?.type : undefined;
|
|
2581
|
+
const keys = call === '.trigger()' ? TRIGGER_OPTION_KEYS : ENTRY_POINT_OPTION_KEYS;
|
|
2582
|
+
unknownOptions(spec, type?.optionKeys, type?.factory, options, { call, keys }, call === '.trigger()' ? '.trigger()' : `.entryPoint("${name}")`, (refusal) => { if (!opts.collect)
|
|
2583
|
+
throw refusal; record(refusal, name, nodeId); });
|
|
2584
|
+
}
|
|
2525
2585
|
function refuseOn(scope, stepName, refusal) {
|
|
2526
2586
|
if (!opts.collect || stepName === undefined)
|
|
2527
2587
|
throw refusal;
|
|
@@ -2616,6 +2676,7 @@ function serializeFlow(built, opts) {
|
|
|
2616
2676
|
library: opts.library,
|
|
2617
2677
|
events: eventEnv(opts),
|
|
2618
2678
|
resolveBinding: (name, attribute, where, target) => resolveBinding(opts, name, attribute, where, target),
|
|
2679
|
+
resolveBindingPair: (labels, where, target) => resolveBindingPair(opts, labels, where, target),
|
|
2619
2680
|
bindConnection: (b) => {
|
|
2620
2681
|
const { entries } = connectionResourceBindings({ def: { model: b.model }, ...b }, resourceBindings);
|
|
2621
2682
|
for (const e of entries)
|
|
@@ -2741,6 +2802,10 @@ function serializeFlow(built, opts) {
|
|
|
2741
2802
|
return emitRegistered(registered, step, tails, scope, parentId);
|
|
2742
2803
|
if (spec.kind === 'subflow') {
|
|
2743
2804
|
refuseChildRoots(spec.child, step.name);
|
|
2805
|
+
// The child's `.trigger(manual(), { label, version, updates })` names its Start node: refuse a key it would drop.
|
|
2806
|
+
const childOptions = unknownOptionRefusal(spec.child?.triggerOptions, TRIGGER_OPTION_KEYS, ".trigger()'s options", `subflow "${step.name}"`);
|
|
2807
|
+
if (childOptions)
|
|
2808
|
+
refuseOn(scope, step.name, childOptions);
|
|
2744
2809
|
const id = stepUid(scope, step.name);
|
|
2745
2810
|
// `subflows` is ONE flat map for the whole file, keyed by the calling
|
|
2746
2811
|
// node's id. `stepUid` draws from the file-wide allocator, including in
|
|
@@ -2938,8 +3003,14 @@ function serializeFlow(built, opts) {
|
|
|
2938
3003
|
+ `path continues from it and ${'name' in step ? `"${step.name}"` : `.${step.kind}()`} after it would `
|
|
2939
3004
|
+ `have no incoming edge. Route each exit with .stepToList('<port>', …), e.g. .stepToList('case-<id>', …).`));
|
|
2940
3005
|
}
|
|
3006
|
+
// A family's own refusal of a key it knows is wrong (IXP_FORBIDDEN_INPUT,
|
|
3007
|
+
// AGENT_NO_KEY for `agent:`) says more than FLOW_UNKNOWN_OPTION, so an
|
|
3008
|
+
// action's emission goes first; any other step is judged before it.
|
|
3009
|
+
if (step.kind !== 'action')
|
|
3010
|
+
refuseUnknownStepOptions(scope, step);
|
|
2941
3011
|
if (step.kind === 'action') {
|
|
2942
3012
|
tails = emitStep(step, tails, scope, parentId, () => { applyUpdates(step); applyLabel(step); });
|
|
3013
|
+
refuseUnknownStepOptions(scope, step);
|
|
2943
3014
|
lastAction = step.name;
|
|
2944
3015
|
// A fan-out human task's `action: 'End'` outcomes end the run here: the
|
|
2945
3016
|
// flow runtime never reads `action`, so only an End node can. When the
|
|
@@ -3493,6 +3564,7 @@ function serializeFlow(built, opts) {
|
|
|
3493
3564
|
throw new CompileRefusal('ENTRY_POINT_DUP_ID', `.entryPoint("${ep.id}"): the id collides with a step, the trigger, or another entry point.`);
|
|
3494
3565
|
}
|
|
3495
3566
|
takenIds.add(ep.id);
|
|
3567
|
+
refuseUnknownRootOptions(ep.id, ep.id, ep.trigger, ep.options, '.entryPoint()');
|
|
3496
3568
|
// Stood in when refused in collect mode, so its prefix and the body are still judged.
|
|
3497
3569
|
emitRootNode(ep.id, ep.id, ep.trigger, ep.options?.version, () => {
|
|
3498
3570
|
const spec = ep.trigger;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.102.0",
|
|
4
4
|
"description": "Build UiPath Flow, Case, and BPMN artifacts by writing TypeScript.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docs.uipath.com/maestro",
|
|
@@ -78,7 +78,13 @@
|
|
|
78
78
|
"bpmn-merge-source",
|
|
79
79
|
"flow-merge-source",
|
|
80
80
|
"fetch-definitions",
|
|
81
|
-
"bpmn-check-baseline"
|
|
81
|
+
"bpmn-check-baseline",
|
|
82
|
+
"capabilities-command",
|
|
83
|
+
"project-min-version",
|
|
84
|
+
"flow-check-baseline",
|
|
85
|
+
"flow-decompile-scripts",
|
|
86
|
+
"flow-script-metadata",
|
|
87
|
+
"flow-pipeline-strict"
|
|
82
88
|
],
|
|
83
89
|
"files": [
|
|
84
90
|
"dist",
|
|
@@ -115,5 +121,5 @@
|
|
|
115
121
|
"@types/node": "^22.7.0",
|
|
116
122
|
"esbuild": "^0.28.1"
|
|
117
123
|
},
|
|
118
|
-
"gitref": "
|
|
124
|
+
"gitref": "ff60f24d741fc03b591278aa1d56ae76e7e3c7d7"
|
|
119
125
|
}
|