@uipath/maestro-builder-sdk 6.8.1 → 6.8.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/bpmn/registry-types.json +1 -1
- package/dist/decompile.js +5 -1
- package/dist/migrate.js +77 -0
- package/dist/serialize.js +11 -1
- package/package.json +2 -2
package/dist/decompile.js
CHANGED
|
@@ -1247,7 +1247,11 @@ function emitAgentCluster(node, imp, inputNames, graph) {
|
|
|
1247
1247
|
if (node.type === T.conversationalAgent) {
|
|
1248
1248
|
const st = (i.conversationalAgentSettings ?? {});
|
|
1249
1249
|
const settingExpr = (k) => {
|
|
1250
|
-
|
|
1250
|
+
// `unwrapSource` rather than a string test: since the envelope reaches
|
|
1251
|
+
// these five keys (migrate's `NESTED_BINDING_INPUTS`), a bare string is
|
|
1252
|
+
// only what a pre-1.6 file carries. Reading strings alone made every
|
|
1253
|
+
// modern file decompile to a conversational agent with no turn wiring.
|
|
1254
|
+
const raw = unwrapSource(st[k]);
|
|
1251
1255
|
if (raw === undefined || raw === '')
|
|
1252
1256
|
return undefined;
|
|
1253
1257
|
const js = raw.startsWith('=js:') ? raw.slice(4) : raw;
|
package/dist/migrate.js
CHANGED
|
@@ -48,6 +48,82 @@ function isUnwrappedInput(nodeType, key) {
|
|
|
48
48
|
return false;
|
|
49
49
|
return UNWRAPPED_INPUTS.some((r) => nodeType.startsWith(r.typePrefix) && r.keys.has(key));
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Inputs whose value is an OBJECT of bindings, wrapped one level down.
|
|
53
|
+
*
|
|
54
|
+
* `wrapNodes` walks `n.inputs` one level and skips anything that is not a
|
|
55
|
+
* string, so a sub-object of bindings is never reached. For almost every input
|
|
56
|
+
* that is correct — a connector's `entityConfig` is a payload, not a binding
|
|
57
|
+
* table, and wrapping its leaves would corrupt it. `conversationalAgentSettings`
|
|
58
|
+
* is the exception: its five keys are per-turn BINDINGS, and the platform's own
|
|
59
|
+
* writer envelopes each one.
|
|
60
|
+
*
|
|
61
|
+
* **`uipath.agent.conversational` → `conversationalAgentSettings`** (measured
|
|
62
|
+
* 2026-09-23 against the same-ground A/B run):
|
|
63
|
+
*
|
|
64
|
+
* - Every binding written by the PRODUCT carries the envelope: 5 of 5 across
|
|
65
|
+
* the v1 arm's `conversationalAgentSettings`, each a
|
|
66
|
+
* `{ type: 'jsExpression', expression, fieldType }`. Every binding written
|
|
67
|
+
* by this SDK is a bare `=js:` string: 5 of 5 in the v2 arm. No mixed case
|
|
68
|
+
* anywhere in the corpus.
|
|
69
|
+
* - The bare string is the pre-1.3 spelling, and Studio Web renders it as
|
|
70
|
+
* literal text rather than evaluating it — so the flow deploys, validates
|
|
71
|
+
* `Valid`, and shows the author the text `$vars.listen.output…` where the
|
|
72
|
+
* transcript should be.
|
|
73
|
+
* - `uip maestro flow validate` accepts both, which is why this survived: the
|
|
74
|
+
* SDK's own `check`, `compile` and the product's static validator all passed
|
|
75
|
+
* on the broken shape. `skill-flow-conversational-chat-loop` scored 0.61
|
|
76
|
+
* with a green ladder.
|
|
77
|
+
*
|
|
78
|
+
* The `fieldType`s are a table rather than a schema read because the node's own
|
|
79
|
+
* manifest declares `conversationalAgentSettings` as an untyped `object`
|
|
80
|
+
* (`uipath.agent.conversational@1.6` and `@1.7`, `inputDefinition.properties`),
|
|
81
|
+
* so there is nothing underneath it to read. They are the types the product
|
|
82
|
+
* writes, from the same measurement.
|
|
83
|
+
*
|
|
84
|
+
* `mode` is deliberately absent: it is an editor-state enum (`'simple'` /
|
|
85
|
+
* `'custom'`), not a binding, and the product leaves it a plain string.
|
|
86
|
+
*/
|
|
87
|
+
const NESTED_BINDING_INPUTS = [
|
|
88
|
+
{
|
|
89
|
+
typePrefix: 'uipath.agent.conversational',
|
|
90
|
+
key: 'conversationalAgentSettings',
|
|
91
|
+
fieldTypes: {
|
|
92
|
+
context: 'object',
|
|
93
|
+
conversationId: 'string',
|
|
94
|
+
exchangeId: 'string',
|
|
95
|
+
messages: 'array',
|
|
96
|
+
userSettings: 'object',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
];
|
|
100
|
+
/**
|
|
101
|
+
* Wrap the binding leaves of an object-valued input, in place.
|
|
102
|
+
*
|
|
103
|
+
* Only the keys the table names are touched. An unknown key is left exactly as
|
|
104
|
+
* it is: the table is evidence about specific fields, and a key nobody measured
|
|
105
|
+
* is not covered by it.
|
|
106
|
+
*/
|
|
107
|
+
function wrapNestedBindings(node) {
|
|
108
|
+
if (typeof node.type !== 'string')
|
|
109
|
+
return;
|
|
110
|
+
for (const rule of NESTED_BINDING_INPUTS) {
|
|
111
|
+
if (!node.type.startsWith(rule.typePrefix))
|
|
112
|
+
continue;
|
|
113
|
+
const settings = node.inputs?.[rule.key];
|
|
114
|
+
if (!settings || typeof settings !== 'object' || Array.isArray(settings))
|
|
115
|
+
continue;
|
|
116
|
+
for (const [key, fieldType] of Object.entries(rule.fieldTypes)) {
|
|
117
|
+
const v = settings[key];
|
|
118
|
+
if (typeof v !== 'string' || isWrappedSource(v))
|
|
119
|
+
continue;
|
|
120
|
+
// The same rule the top-level loop applies: an expression always, and a
|
|
121
|
+
// literal whenever the field is not string-typed.
|
|
122
|
+
if (v.startsWith('=') || fieldType !== 'string')
|
|
123
|
+
settings[key] = wrap(v, fieldType);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
51
127
|
/**
|
|
52
128
|
* The only `fieldType` values `@uipath/flow-schema`'s `expressionValueSchema`
|
|
53
129
|
* accepts (it is `.strict()`, so anything else fails the file's schema and with
|
|
@@ -155,6 +231,7 @@ function wrapNodes(nodes, schemaByType, globalTypeByName, subflows = {}) {
|
|
|
155
231
|
if (v.startsWith('=') || declared !== 'string')
|
|
156
232
|
n.inputs[k] = wrap(v, declared);
|
|
157
233
|
}
|
|
234
|
+
wrapNestedBindings(n);
|
|
158
235
|
}
|
|
159
236
|
if (n.outputs) {
|
|
160
237
|
for (const [k, vobj] of Object.entries(n.outputs)) {
|
package/dist/serialize.js
CHANGED
|
@@ -1628,7 +1628,17 @@ function conversationalAgentJson(spec) {
|
|
|
1628
1628
|
// agent's — a debug run without both is refused before it starts.
|
|
1629
1629
|
maxTokens: spec.maxTokenPerResponse ?? 16384,
|
|
1630
1630
|
temperature: spec.temperature ?? 0,
|
|
1631
|
-
|
|
1631
|
+
// `basic-v2` is the NON-conversational inline agent's engine (the other
|
|
1632
|
+
// `agent.json` writer in this file, 100 lines down), and it was copied in
|
|
1633
|
+
// with the rest of that shape. Every instance of THIS node is
|
|
1634
|
+
// conversational — `metadata.isConversational` below says so
|
|
1635
|
+
// unconditionally — and `voiceAgentJson`, the sibling conversational
|
|
1636
|
+
// family, already spells it the other way. Measured across the 2026-09-23
|
|
1637
|
+
// A/B run: every product-written `agent.json` with `isConversational: true`
|
|
1638
|
+
// carries `conversational-v1` (3 of 3) and every one with `false` carries
|
|
1639
|
+
// `basic-v2` (6 of 6). The SDK's own voice path agreed (2 of 2); only this
|
|
1640
|
+
// path disagreed, and its task graded the sidecar as not conversational.
|
|
1641
|
+
engine: 'conversational-v1',
|
|
1632
1642
|
...(spec.maxIterations === undefined ? {} : { maxIterations: spec.maxIterations }),
|
|
1633
1643
|
mode: 'standard',
|
|
1634
1644
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.8.
|
|
3
|
+
"version": "6.8.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",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"@types/node": "^22.7.0",
|
|
88
88
|
"esbuild": "^0.28.1"
|
|
89
89
|
},
|
|
90
|
-
"gitref": "
|
|
90
|
+
"gitref": "f5a24a87ba04f618c911d5ebb3b855303c120891"
|
|
91
91
|
}
|