@uipath/maestro-builder-sdk 6.20.2 → 6.20.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.
- package/dist/check.js +47 -20
- package/dist/serialize.d.ts +20 -0
- package/dist/serialize.js +46 -18
- package/package.json +2 -2
package/dist/check.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Expr, SCHEDULE_PRESETS, parseIxpProjectType, flatNameOf, flatNameSegmen
|
|
|
9
9
|
import { FlowNode } from './core/node-classes.js';
|
|
10
10
|
import { planContributionBindings } from './core/contribution-bindings.js';
|
|
11
11
|
import { definitionHasErrorPort, errorPortRefusal } from './core/error-port.js';
|
|
12
|
-
import { bundledActionNodeType, bundledDefinition, resolveContributionDefinition } from './serialize.js';
|
|
12
|
+
import { bundledActionNodeType, bundledDefinition, perCallDefinition, resolveContributionDefinition } from './serialize.js';
|
|
13
13
|
import { sdkFormFieldType } from './core/form-field-type.js';
|
|
14
14
|
import { QUEUE_ITEM_RECORD_SCHEMA } from './core/queue-record.js';
|
|
15
15
|
import { AGENTIC_PROCESS_FORMS } from './core/agentic-process-forms.js';
|
|
@@ -4952,25 +4952,31 @@ function collectActionExprs(s, out, errorSource) {
|
|
|
4952
4952
|
}
|
|
4953
4953
|
}
|
|
4954
4954
|
/**
|
|
4955
|
-
* The families
|
|
4956
|
-
*
|
|
4957
|
-
*
|
|
4958
|
-
* `agenticProcessDef` / `agentDef` / `ixpExtractDef` set
|
|
4959
|
-
* `supportsErrorHandling: true`; Integration Service connector activities
|
|
4960
|
-
* declare the `error` handle).
|
|
4955
|
+
* The families with no definition this SDK can ask, and an error port anyway:
|
|
4956
|
+
* an Integration Service connector activity's definition comes from the
|
|
4957
|
+
* connector library, and every connector activity declares the `error` handle.
|
|
4961
4958
|
*
|
|
4962
|
-
* Every family
|
|
4963
|
-
* that definition (`bundledActionNodeType` + `definitionHasErrorPort`), so a
|
|
4964
|
-
* family cannot drift from its definition again (#1011: `documentClassify` was
|
|
4965
|
-
* missing here although `uipath.document.classify@1.0` sets the flag).
|
|
4959
|
+
* Every other family is decided by a definition, never by a list:
|
|
4966
4960
|
*
|
|
4967
|
-
*
|
|
4968
|
-
*
|
|
4969
|
-
*
|
|
4961
|
+
* - a bundled family by its bundled definition (`bundledActionNodeType` +
|
|
4962
|
+
* `bundledDefinition`, #1011: `documentClassify` was missing from the old
|
|
4963
|
+
* list although `uipath.document.classify@1.0` sets the flag);
|
|
4964
|
+
* - a per-tenant family (`rpaWorkflow`, `apiWorkflow`, `agenticProcess`,
|
|
4965
|
+
* `publishedFunction`, `agent`, `ixpExtract`) by the definition serialize
|
|
4966
|
+
* synthesizes for it (`perCallDefinition`, #1040: `publishedFunction` was
|
|
4967
|
+
* refused here although `publishedFunctionDef` sets the flag).
|
|
4968
|
+
*
|
|
4969
|
+
* `publishedFunction`'s flag is measured, not assumed: on 2026-10-08 four
|
|
4970
|
+
* `flow debug` jobs on alpha/codereval called `acme-echo` with a non-string
|
|
4971
|
+
* `message` (null, object, number, array). In each, the function job failed
|
|
4972
|
+
* (`Python.FUNCTION_EXECUTION_ERROR`, category User, status 502), the node's
|
|
4973
|
+
* error boundary fired, and the handler's `err('message')` read
|
|
4974
|
+
* "Failure in the Orchestrator Job".
|
|
4975
|
+
*
|
|
4976
|
+
* A kind in none of these (`waitEvent`) has no error port: an event wait
|
|
4977
|
+
* resumes or does not.
|
|
4970
4978
|
*/
|
|
4971
|
-
const
|
|
4972
|
-
'connector', 'rpaWorkflow', 'apiWorkflow', 'agenticProcess', 'agent', 'ixpExtract',
|
|
4973
|
-
]);
|
|
4979
|
+
const NO_DEFINITION_ERROR_PORT_KINDS = new Set(['connector']);
|
|
4974
4980
|
/**
|
|
4975
4981
|
* The ONERROR_NO_ERROR_PORT sentence for a typed step — a built-in family or a
|
|
4976
4982
|
* registered node type — whose node type has no error port. One spelling for
|
|
@@ -5084,9 +5090,30 @@ placed) {
|
|
|
5084
5090
|
// no definition here to ask; version resolution reports that, not this check.
|
|
5085
5091
|
const bundledType = bundledActionNodeType(spec);
|
|
5086
5092
|
const bundledDef = bundledType ? bundledDefinition(bundledType, step.options?.version) : undefined;
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5093
|
+
// A per-tenant family: ask the definition serialize synthesizes for it (#1040).
|
|
5094
|
+
let perCallDef;
|
|
5095
|
+
if (!bundledType) {
|
|
5096
|
+
try {
|
|
5097
|
+
perCallDef = perCallDefinition(spec);
|
|
5098
|
+
}
|
|
5099
|
+
catch {
|
|
5100
|
+
// The family's own checks report a spec its builder cannot lower.
|
|
5101
|
+
return;
|
|
5102
|
+
}
|
|
5103
|
+
}
|
|
5104
|
+
const def = bundledType ? bundledDef : perCallDef;
|
|
5105
|
+
const noPort = def !== undefined
|
|
5106
|
+
? !definitionHasErrorPort(def)
|
|
5107
|
+
: !bundledType && !NO_DEFINITION_ERROR_PORT_KINDS.has(spec.kind);
|
|
5108
|
+
if (noPort && perCallDef !== undefined) {
|
|
5109
|
+
diags.push({
|
|
5110
|
+
level: 'error',
|
|
5111
|
+
code: 'ONERROR_NO_ERROR_PORT',
|
|
5112
|
+
message: errorPortRefusal(step.name, perCallDef, { bundled: true }),
|
|
5113
|
+
step: step.name,
|
|
5114
|
+
});
|
|
5115
|
+
return;
|
|
5116
|
+
}
|
|
5090
5117
|
if (noPort) {
|
|
5091
5118
|
diags.push({
|
|
5092
5119
|
level: 'error',
|
package/dist/serialize.d.ts
CHANGED
|
@@ -102,6 +102,26 @@ export declare function bundledActionNodeType(spec: {
|
|
|
102
102
|
kind?: string;
|
|
103
103
|
inputs?: any;
|
|
104
104
|
} | undefined): string | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* The definition serialize synthesizes for a family that has no bundled one:
|
|
107
|
+
* a published process resource (`rpaWorkflow`, `apiWorkflow`,
|
|
108
|
+
* `agenticProcess`, `publishedFunction`, `agent`) or an `ixpExtract` step.
|
|
109
|
+
* Their node type carries a tenant's key, so the SDK builds the definition
|
|
110
|
+
* per call, transcribed from what `registry get` returns. `undefined` for
|
|
111
|
+
* every other kind (a bundled family, a connector, a container).
|
|
112
|
+
*
|
|
113
|
+
* The emit path builds its definition here, and `check` asks this same
|
|
114
|
+
* definition whether the node has an error port (#1040), so the two cannot
|
|
115
|
+
* disagree. For instance `publishedFunction(...)` yields
|
|
116
|
+
* `uipath.core.function.<key>@1.0.0` with `supportsErrorHandling: true`.
|
|
117
|
+
*
|
|
118
|
+
* Throws what the family's builder throws for an unusable spec (an
|
|
119
|
+
* `ixpExtract` project that is not a node type).
|
|
120
|
+
*/
|
|
121
|
+
export declare function perCallDefinition(spec: {
|
|
122
|
+
kind?: string;
|
|
123
|
+
inputs?: any;
|
|
124
|
+
} | undefined): any | undefined;
|
|
105
125
|
/**
|
|
106
126
|
* The bundled definition of `nodeType` that `makeNode` resolves: the author's
|
|
107
127
|
* exact `{ version }` when given, otherwise the pinned default (the first
|
package/dist/serialize.js
CHANGED
|
@@ -3793,6 +3793,48 @@ export function bundledActionNodeType(spec) {
|
|
|
3793
3793
|
default: return undefined;
|
|
3794
3794
|
}
|
|
3795
3795
|
}
|
|
3796
|
+
/**
|
|
3797
|
+
* The definition serialize synthesizes for a family that has no bundled one:
|
|
3798
|
+
* a published process resource (`rpaWorkflow`, `apiWorkflow`,
|
|
3799
|
+
* `agenticProcess`, `publishedFunction`, `agent`) or an `ixpExtract` step.
|
|
3800
|
+
* Their node type carries a tenant's key, so the SDK builds the definition
|
|
3801
|
+
* per call, transcribed from what `registry get` returns. `undefined` for
|
|
3802
|
+
* every other kind (a bundled family, a connector, a container).
|
|
3803
|
+
*
|
|
3804
|
+
* The emit path builds its definition here, and `check` asks this same
|
|
3805
|
+
* definition whether the node has an error port (#1040), so the two cannot
|
|
3806
|
+
* disagree. For instance `publishedFunction(...)` yields
|
|
3807
|
+
* `uipath.core.function.<key>@1.0.0` with `supportsErrorHandling: true`.
|
|
3808
|
+
*
|
|
3809
|
+
* Throws what the family's builder throws for an unusable spec (an
|
|
3810
|
+
* `ixpExtract` project that is not a node type).
|
|
3811
|
+
*/
|
|
3812
|
+
export function perCallDefinition(spec) {
|
|
3813
|
+
const s = spec?.inputs ?? {};
|
|
3814
|
+
switch (spec?.kind) {
|
|
3815
|
+
case 'publishedFunction':
|
|
3816
|
+
return publishedFunctionDef({ key: s.key, name: s.name, folderPath: s.folderPath, inputs: s.inputs ?? {}, returns: s.returns });
|
|
3817
|
+
case 'apiWorkflow':
|
|
3818
|
+
return apiWorkflowDef({ key: s.key, name: s.name, folderPath: s.folderPath, inputs: s.inputs ?? {}, returns: s.returns });
|
|
3819
|
+
case 'agenticProcess':
|
|
3820
|
+
return agenticProcessDef({
|
|
3821
|
+
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
3822
|
+
inputs: s.inputs ?? {}, returns: s.returns, form: s.form,
|
|
3823
|
+
});
|
|
3824
|
+
case 'rpaWorkflow':
|
|
3825
|
+
return rpaWorkflowDef({
|
|
3826
|
+
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
3827
|
+
inputs: s.inputs ?? {}, returns: s.returns,
|
|
3828
|
+
});
|
|
3829
|
+
case 'agent':
|
|
3830
|
+
return agentDef({
|
|
3831
|
+
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
3832
|
+
inputs: s.inputs ?? {}, returns: s.returns, flavour: s.flavour,
|
|
3833
|
+
});
|
|
3834
|
+
case 'ixpExtract': return ixpExtractDef(s);
|
|
3835
|
+
default: return undefined;
|
|
3836
|
+
}
|
|
3837
|
+
}
|
|
3796
3838
|
/**
|
|
3797
3839
|
* The bundled definition of `nodeType` that `makeNode` resolves: the author's
|
|
3798
3840
|
* exact `{ version }` when given, otherwise the pinned default (the first
|
|
@@ -5267,10 +5309,7 @@ export function serialize(built, opts = {}) {
|
|
|
5267
5309
|
// because `inputs` is required here (the empty-input floor — see
|
|
5268
5310
|
// `AgentInputs.inputs`) and because the emitted binding subtype is `Agent`.
|
|
5269
5311
|
const s = spec.inputs;
|
|
5270
|
-
const def =
|
|
5271
|
-
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
5272
|
-
inputs: s.inputs, returns: s.returns, flavour: s.flavour,
|
|
5273
|
-
});
|
|
5312
|
+
const def = perCallDefinition(spec);
|
|
5274
5313
|
// The pair's key and folder come off the definition, as for rpa / agentic
|
|
5275
5314
|
// steps: one place decides the in-solution shape.
|
|
5276
5315
|
const pairFolder = def.model.bindings.values.find((v) => v.name === 'folderPath').default;
|
|
@@ -5842,19 +5881,8 @@ export function serialize(built, opts = {}) {
|
|
|
5842
5881
|
const s = spec.inputs;
|
|
5843
5882
|
const nodeInputs = s.inputs ?? {};
|
|
5844
5883
|
const fireAndForget = spec.kind === 'agenticProcess' && spec.inputs.completion === 'fire-and-forget';
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
: spec.kind === 'apiWorkflow'
|
|
5848
|
-
? apiWorkflowDef({ key: spec.inputs.key, name: s.name, folderPath: spec.inputs.folderPath, inputs: nodeInputs, returns: spec.inputs.returns })
|
|
5849
|
-
: spec.kind === 'agenticProcess'
|
|
5850
|
-
? agenticProcessDef({
|
|
5851
|
-
key: spec.inputs.key, name: s.name, folderPath: s.folderPath, location: spec.inputs.location,
|
|
5852
|
-
projectId: spec.inputs.projectId, inputs: nodeInputs, returns: spec.inputs.returns, form: spec.inputs.form,
|
|
5853
|
-
})
|
|
5854
|
-
: rpaWorkflowDef({
|
|
5855
|
-
key: spec.inputs.key, name: s.name, folderPath: s.folderPath, location: spec.inputs.location,
|
|
5856
|
-
projectId: spec.inputs.projectId, inputs: nodeInputs, returns: spec.inputs.returns,
|
|
5857
|
-
});
|
|
5884
|
+
// The same definition `check` asks about the error port.
|
|
5885
|
+
const def = perCallDefinition(spec);
|
|
5858
5886
|
// The bindings first: two steps on the same process share ONE pair, and the
|
|
5859
5887
|
// definition's `model.context` names ids that have to exist.
|
|
5860
5888
|
// Read off the definition: one kind carries several subtypes (agenticProcess by `form`).
|
|
@@ -6155,7 +6183,7 @@ export function serialize(built, opts = {}) {
|
|
|
6155
6183
|
}
|
|
6156
6184
|
if (spec.kind === 'ixpExtract') {
|
|
6157
6185
|
const s = spec.inputs;
|
|
6158
|
-
const def =
|
|
6186
|
+
const def = perCallDefinition(spec); // ixpExtractDef: throws on an unparseable project
|
|
6159
6187
|
const { versionId } = parseIxpProjectType(s.project); // ixpExtractDef threw if it could not parse
|
|
6160
6188
|
// The bindings first: two steps on the same project share ONE pair, and
|
|
6161
6189
|
// the definition's `model.bindings.resourceKey` names the key they hang off.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.20.
|
|
3
|
+
"version": "6.20.3",
|
|
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",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"@types/node": "^22.7.0",
|
|
93
93
|
"esbuild": "^0.28.1"
|
|
94
94
|
},
|
|
95
|
-
"gitref": "
|
|
95
|
+
"gitref": "15fa01717ebe49d6cf51c9ec11cca4a7ebbf9bb7"
|
|
96
96
|
}
|