@uipath/maestro-builder-sdk 6.20.4 → 6.20.5
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 +7 -5
- package/dist/serialize.d.ts +20 -0
- package/dist/serialize.js +42 -4
- 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, perCallDefinition, resolveContributionDefinition } from './serialize.js';
|
|
12
|
+
import { actionVersion, 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';
|
|
@@ -5087,13 +5087,15 @@ placed) {
|
|
|
5087
5087
|
return;
|
|
5088
5088
|
}
|
|
5089
5089
|
// A typed family with a bundled definition: ask the definition serialize will
|
|
5090
|
-
// emit, at the version it will emit (#1011)
|
|
5091
|
-
//
|
|
5092
|
-
//
|
|
5090
|
+
// emit, at the version it will emit (#1011), chosen by the same selector
|
|
5091
|
+
// serialize uses (#1041). For instance `voiceAgent()` defaults to
|
|
5092
|
+
// uipath.agent.voice@1.0 (no error port) and `{ version: '1.1' }` selects @1.1
|
|
5093
|
+
// (which has one); `hitl({ exposeError: true })` selects uipath.human-in-the-loop@1.2
|
|
5094
|
+
// with no `{ version }` at all.
|
|
5093
5095
|
// A version the SDK does not bundle (an inline agent's registry version) has
|
|
5094
5096
|
// no definition here to ask; version resolution reports that, not this check.
|
|
5095
5097
|
const bundledType = bundledActionNodeType(spec);
|
|
5096
|
-
const bundledDef = bundledType ? bundledDefinition(bundledType, step.options?.version) : undefined;
|
|
5098
|
+
const bundledDef = bundledType ? bundledDefinition(bundledType, actionVersion(spec, step.options?.version)) : undefined;
|
|
5097
5099
|
// A per-tenant family: ask the definition serialize synthesizes for it (#1040).
|
|
5098
5100
|
let perCallDef;
|
|
5099
5101
|
if (!bundledType) {
|
package/dist/serialize.d.ts
CHANGED
|
@@ -122,6 +122,26 @@ export declare function perCallDefinition(spec: {
|
|
|
122
122
|
kind?: string;
|
|
123
123
|
inputs?: any;
|
|
124
124
|
} | undefined): any | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* The definition version serialize emits for a typed action step that is not
|
|
127
|
+
* yet on the node-type registry: the author's `{ version }` when given,
|
|
128
|
+
* otherwise the version the step's inputs select, otherwise `undefined` (the
|
|
129
|
+
* pinned default). Two such families pick a version themselves:
|
|
130
|
+
*
|
|
131
|
+
* - `hitl`: `exposeError` selects `@1.2`, per-outcome routing selects `@1.1`;
|
|
132
|
+
* - `inlineAgent`: the newest bundled version, not the first bundled entry.
|
|
133
|
+
*
|
|
134
|
+
* The emit paths read their version here, and `check` resolves the definition
|
|
135
|
+
* it asks about with this same version (#1041), so the two cannot pick
|
|
136
|
+
* different definitions. For instance `inlineAgent({ ... })` gives the newest
|
|
137
|
+
* bundled version in both. A registered family (e.g. `dataFabricRead`, whose
|
|
138
|
+
* `resultMode` selects `core.datafabric.read@1.4`) gets the same guarantee from
|
|
139
|
+
* the registry's `resolveVersion`, which check and serialize both call.
|
|
140
|
+
*/
|
|
141
|
+
export declare function actionVersion(spec: {
|
|
142
|
+
kind?: string;
|
|
143
|
+
inputs?: any;
|
|
144
|
+
} | undefined, explicit: string | undefined): string | undefined;
|
|
125
145
|
/**
|
|
126
146
|
* The bundled definition of `nodeType` that `makeNode` resolves: the author's
|
|
127
147
|
* exact `{ version }` when given, otherwise the pinned default (the first
|
package/dist/serialize.js
CHANGED
|
@@ -3836,6 +3836,45 @@ export function perCallDefinition(spec) {
|
|
|
3836
3836
|
default: return undefined;
|
|
3837
3837
|
}
|
|
3838
3838
|
}
|
|
3839
|
+
/**
|
|
3840
|
+
* The definition version serialize emits for a typed action step that is not
|
|
3841
|
+
* yet on the node-type registry: the author's `{ version }` when given,
|
|
3842
|
+
* otherwise the version the step's inputs select, otherwise `undefined` (the
|
|
3843
|
+
* pinned default). Two such families pick a version themselves:
|
|
3844
|
+
*
|
|
3845
|
+
* - `hitl`: `exposeError` selects `@1.2`, per-outcome routing selects `@1.1`;
|
|
3846
|
+
* - `inlineAgent`: the newest bundled version, not the first bundled entry.
|
|
3847
|
+
*
|
|
3848
|
+
* The emit paths read their version here, and `check` resolves the definition
|
|
3849
|
+
* it asks about with this same version (#1041), so the two cannot pick
|
|
3850
|
+
* different definitions. For instance `inlineAgent({ ... })` gives the newest
|
|
3851
|
+
* bundled version in both. A registered family (e.g. `dataFabricRead`, whose
|
|
3852
|
+
* `resultMode` selects `core.datafabric.read@1.4`) gets the same guarantee from
|
|
3853
|
+
* the registry's `resolveVersion`, which check and serialize both call.
|
|
3854
|
+
*/
|
|
3855
|
+
export function actionVersion(spec, explicit) {
|
|
3856
|
+
if (explicit !== undefined)
|
|
3857
|
+
return explicit;
|
|
3858
|
+
// Keyed by the node type `bundledActionNodeType` already picks, so the
|
|
3859
|
+
// version rule adds no second dispatch on the step's kind.
|
|
3860
|
+
const type = bundledActionNodeType(spec);
|
|
3861
|
+
if (type === NODE_TYPE.hitl)
|
|
3862
|
+
return hitlNeededVersion(spec?.inputs);
|
|
3863
|
+
if (type === INLINE_AGENT_TYPE)
|
|
3864
|
+
return INLINE_AGENT_DEFAULT_VERSION;
|
|
3865
|
+
return undefined;
|
|
3866
|
+
}
|
|
3867
|
+
/**
|
|
3868
|
+
* The base human task version a task's inputs need when nothing is pinned:
|
|
3869
|
+
* `exposeError` needs 1.2 (it adds the `error` output), and a task that
|
|
3870
|
+
* routes per outcome needs 1.1. Only the base task reaches here: a variant
|
|
3871
|
+
* (quick-form, app task) has its own node type and one definition.
|
|
3872
|
+
*/
|
|
3873
|
+
function hitlNeededVersion(inputs) {
|
|
3874
|
+
if (inputs?.exposeError)
|
|
3875
|
+
return '1.2';
|
|
3876
|
+
return hitlExitModel(inputs, undefined).shape === 'per-outcome' ? '1.1' : undefined;
|
|
3877
|
+
}
|
|
3839
3878
|
/**
|
|
3840
3879
|
* The bundled definition of `nodeType` that `makeNode` resolves: the author's
|
|
3841
3880
|
* exact `{ version }` when given, otherwise the pinned default (the first
|
|
@@ -5356,7 +5395,7 @@ export function serialize(built, opts = {}) {
|
|
|
5356
5395
|
// the node to another version as a side effect (#956). Both now live in
|
|
5357
5396
|
// the sidecar and on edges; neither selects a definition. An explicit
|
|
5358
5397
|
// `{ version }` (what decompile writes back) resolves exactly.
|
|
5359
|
-
const version = step.options?.version
|
|
5398
|
+
const version = actionVersion(spec, step.options?.version);
|
|
5360
5399
|
// `definitions[]` holds one entry per type@version, so a flow where any
|
|
5361
5400
|
// agent attaches memory keeps the handle for all of them.
|
|
5362
5401
|
const withMemory = s.memory !== undefined
|
|
@@ -6278,13 +6317,12 @@ export function serialize(built, opts = {}) {
|
|
|
6278
6317
|
throw new Error(`"${step.name}": outcomePorts: true, but the '${spec.inputs?.variant}' variant reads its outcomes `
|
|
6279
6318
|
+ `from its app and leaves on its single 'completed' exit. Route on out('${step.name}', 'Action') downstream.`);
|
|
6280
6319
|
}
|
|
6281
|
-
const neededVersion = hitlType !== NODE_TYPE.hitl ? undefined
|
|
6282
|
-
: spec.inputs?.exposeError ? '1.2' : exitModel.shape === 'per-outcome' ? '1.1' : undefined;
|
|
6283
6320
|
if (spec.inputs?.exposeError === true && pinned !== undefined && pinned !== '1.2') {
|
|
6284
6321
|
throw new Error(`"${step.name}": exposeError needs the task's 1.2 definition, but { version: '${pinned}' } pins it. `
|
|
6285
6322
|
+ `Drop the pin or match it.`);
|
|
6286
6323
|
}
|
|
6287
|
-
|
|
6324
|
+
// The same version `check` resolves the definition at (#1041).
|
|
6325
|
+
const node = makeNode(hitlType, id, step.name, { parentId, requestedVersion: actionVersion(spec, pinned) });
|
|
6288
6326
|
const { inputs, outputs } = hitlInputs(spec.inputs, id, built.id, step.name, scope.rename);
|
|
6289
6327
|
node.inputs = inputs;
|
|
6290
6328
|
// The definition's `outputDefinition` gives the two output SLOTS; the form
|
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.5",
|
|
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": "2ed3ce64cea5047f9da44c287cacc18f0f66f37d"
|
|
96
96
|
}
|