@uipath/maestro-builder-sdk 6.95.0 → 6.95.2

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.
@@ -963,7 +963,9 @@ export interface ScriptTaskOpts extends ActivityOpts {
963
963
  * script task's return value: `ScriptActivities.DoInvokeScriptTaskAsync` in
964
964
  * PO.BpmnEngine returns `{ "response": <whatever the script returned> }` when
965
965
  * `IsVersionAtLeast(version, 2)`. So the script may return any JSON value and
966
- * `=result.response` is that value; `=result.Error` is its error slot.
966
+ * `=result.response` is that value. The error row reads `=Error`, at the top level and
967
+ * not under `result`, as the platform's script-task template writes it
968
+ * (`<uipath:output name="Error" source="=Error" …/>`).
967
969
  * `check` reports a row on a v2-or-later task that reads `result` any other way
968
970
  * (`=result.severity`, `=result`) as `SCRIPT_RESULT_NOT_RESPONSE`, with the
969
971
  * corrected expression (`=result.response.severity`).
@@ -1278,14 +1280,12 @@ export interface HttpOpts extends ActivityOpts {
1278
1280
  connectorKey?: string;
1279
1281
  /**
1280
1282
  * EXTRA output rows: variable id → `=`-expression read against the node's own result,
1281
- * e.g. `{ runStatus: '=Status' }`.
1283
+ * e.g. `{ orderId: '=response.body.id' }`.
1282
1284
  *
1283
- * Needed for the same reason `.humanTask()` has it: this family declares a TYPED output
1284
- * (`type="Orchestrator.RunJob"` and friends) with no `source`, which the designer resolves
1285
- * into sub-fields but the local engine cannot — so the variable stays `undefined` on a local
1286
- * run and nothing downstream can read or branch on it. An explicit row maps one field the
1287
- * way every other output row works. The spec's own row is still emitted, so the artifact
1288
- * stays what the platform expects.
1285
+ * The result is `response`, holding `{ code, headers, body }`: the node's own rows read
1286
+ * `=response.code`, `=response.headers` and `=response.body`, so a field of the body is
1287
+ * `=response.body.<field>`. A row may not write any variable the node already writes
1288
+ * (see {@link HttpOpts.outputVar}).
1289
1289
  */
1290
1290
  outputs?: Record<string, string>;
1291
1291
  /**
@@ -1357,7 +1357,12 @@ export interface OrchestratorOpts extends ActivityOpts {
1357
1357
  folderKey?: string;
1358
1358
  /**
1359
1359
  * EXTRA output rows: variable id → `=`-expression read against the node's own result,
1360
- * e.g. `{ runStatus: '=Status' }`.
1360
+ * e.g. `{ message: '=result.message' }` for a job whose output argument is `message`.
1361
+ * The job's output arguments sit under `result`, as a live-verified
1362
+ * `Orchestrator.ExecuteApiWorkflowAsync` maps them (`source="=result.message"`).
1363
+ * The local engine does not bind `result` yet (it binds the job's output under
1364
+ * `response`, and a local `*Async` start returns none), so on a local run this row
1365
+ * reads `undefined`; the platform reads it.
1361
1366
  *
1362
1367
  * Needed for the same reason `.humanTask()` has it: this family declares a TYPED output
1363
1368
  * (`type="Orchestrator.RunJob"` and friends) with no `source`, which the designer resolves
@@ -1404,7 +1409,12 @@ export interface QueueItemOpts extends ActivityOpts {
1404
1409
  wait?: boolean;
1405
1410
  /**
1406
1411
  * EXTRA output rows: variable id → `=`-expression read against the node's own result,
1407
- * e.g. `{ runStatus: '=Status' }`.
1412
+ * e.g. `{ outputString: '=result.Output.OutputString' }` with `wait: true`. The processed
1413
+ * item sits under `result` and its output fields under `Output`, as a tenant-exported
1414
+ * `Orchestrator.CreateAndWaitForQueueItem` reads them (`source="=result"`, then
1415
+ * `vars.response.Output["OutputString"]`). The local engine does not bind `result`
1416
+ * yet and flattens `Output` into the item, so on a local run this row reads
1417
+ * `undefined`; the platform reads it.
1408
1418
  *
1409
1419
  * Needed for the same reason `.humanTask()` has it: this family declares a TYPED output
1410
1420
  * (`type="Orchestrator.RunJob"` and friends) with no `source`, which the designer resolves
package/dist/bpmn-api.md CHANGED
@@ -270,7 +270,7 @@ Extends `ActivityOpts` — its fields and methods apply here too.
270
270
  - `HttpOpts.connection?: string` — Symbolic binding name of an Integration Service **connection** to send the request through — which switches the node to…
271
271
  - `HttpOpts.folder?: string` — Symbolic binding name of the connection's folder — connector mode only, where the CLI requires it.
272
272
  - `HttpOpts.connectorKey?: string` — The connector the connection belongs to, connector mode only.
273
- - `HttpOpts.outputs?: Record<string, string>` — EXTRA output rows: variable id → `=`-expression read against the node's own result, e.g. `{ runStatus: '=Status' }`.
273
+ - `HttpOpts.outputs?: Record<string, string>` — EXTRA output rows: variable id → `=`-expression read against the node's own result, e.g. `{ orderId: '=response.body.id'…
274
274
  - `HttpOpts.outputVar?: string` — Variable the response body lands in.
275
275
  - `HttpOpts.skipCondition?: string` — `=`-expression that skips the request when truthy.
276
276
 
@@ -300,7 +300,7 @@ Extends `ActivityOpts` — its fields and methods apply here too.
300
300
  - `OrchestratorOpts.input?: Record<string, unknown>` — Input arguments — serialized as the node's `JobArguments` body.
301
301
  - `OrchestratorOpts.releaseKey?: string` — Address the release by KEY instead of by name — the deployed resource's `Key` from `uip or processes list --folder-path…
302
302
  - `OrchestratorOpts.folderKey?: string` — The folder's `FolderKey` GUID (the same `uip or processes list` row carries it), for a node addressed by…
303
- - `OrchestratorOpts.outputs?: Record<string, string>` — EXTRA output rows: variable id → `=`-expression read against the node's own result, e.g. `{ runStatus: '=Status' }`.
303
+ - `OrchestratorOpts.outputs?: Record<string, string>` — EXTRA output rows: variable id → `=`-expression read against the node's own result, e.g. `{ message: '=result.message'…
304
304
  - `OrchestratorOpts.outputVar?: string` — Variable the job response lands in.
305
305
  - `OrchestratorOpts.skipCondition?: string` — `=`-expression that skips the invocation when truthy.
306
306
 
@@ -323,7 +323,7 @@ Extends `ActivityOpts` — its fields and methods apply here too.
323
323
  - `QueueItemOpts.folder: string` — Folder path the queue lives in.
324
324
  - `QueueItemOpts.item?: Record<string, unknown>` — The item's content — serialized as the node's `ItemData` body.
325
325
  - `QueueItemOpts.wait?: boolean` — `true` waits for the item to be processed and maps its outcome back (`Orchestrator.CreateAndWaitForQueueItem`); default…
326
- - `QueueItemOpts.outputs?: Record<string, string>` — EXTRA output rows: variable id → `=`-expression read against the node's own result, e.g. `{ runStatus: '=Status' }`.
326
+ - `QueueItemOpts.outputs?: Record<string, string>` — EXTRA output rows: variable id → `=`-expression read against the node's own result, e.g. `{ outputString:…
327
327
  - `QueueItemOpts.outputVar?: string` — Variable the response lands in.
328
328
  - `QueueItemOpts.skipCondition?: string` — `=`-expression that skips the enqueue when truthy.
329
329
 
@@ -293,13 +293,6 @@ interface CaseIdentityPreservation {
293
293
  omit?: string[];
294
294
  }>>>;
295
295
  }
296
- /**
297
- * Non-authoring Case JSON lanes retained by decompile/recompile.
298
- *
299
- * This intentionally cannot carry stages, tasks, known metadata, or known
300
- * variable fields. Those constructs must use the typed builder or fail with a
301
- * named refusal.
302
- */
303
296
  /**
304
297
  * One output row of a task in the payload's `identities` (see `outputs` there):
305
298
  * the row's name and id, and the Designer-saved spellings compile puts back.
@@ -318,6 +311,13 @@ export interface PreservedOutputRow {
318
311
  noAlias?: true;
319
312
  customRow?: CustomRowShape;
320
313
  }
314
+ /**
315
+ * Non-authoring Case JSON lanes retained by decompile/recompile.
316
+ *
317
+ * This intentionally cannot carry stages, tasks, known metadata, or known
318
+ * variable fields. Those constructs must use the typed builder or fail with a
319
+ * named refusal.
320
+ */
321
321
  export interface CaseJsonPreservation {
322
322
  /** Unknown document-root fields. */
323
323
  topLevel?: Record<string, unknown>;
@@ -14,6 +14,14 @@ export interface OutputBackingProblem {
14
14
  export interface OutputBackingPlan {
15
15
  /** Output name → backing Variable id. */
16
16
  backing: Map<string, string>;
17
+ /**
18
+ * The outputs in `backing` whose Variable the author already declared: a
19
+ * `.var()` named `<output>Value` of the output's type, for an output a
20
+ * declared `default` alone asks to back. That Variable is emitted once, as the
21
+ * author wrote it, and is what the End copies the Output from; decompile
22
+ * prints exactly this pair when the saved backing carries no default.
23
+ */
24
+ adopted: Set<string>;
17
25
  /**
18
26
  * The same pairs, minus outputs that share their name with a step. Those
19
27
  * `$vars.<name>` reads are the step's output (`out('slug')` with an output
@@ -42,6 +50,7 @@ export declare function scopeVariableUse(steps: readonly Step[]): {
42
50
  */
43
51
  export declare function planOutputBacking(built: Pick<BuiltFlow, 'inputs' | 'steps' | 'entryPoints' | 'triggerId'>, outputs: readonly VarDecl[], vars: readonly {
44
52
  name: string;
53
+ type?: string;
45
54
  }[], sharedOutputs?: ReadonlySet<string>): OutputBackingPlan;
46
55
  /** The `inout` global that backs output `o`: its type and value metadata, no description. */
47
56
  export declare function outputBackingGlobal(o: {
@@ -165,6 +165,7 @@ export function planOutputBacking(built, outputs, vars, sharedOutputs = new Set(
165
165
  claim(s, `step "${s}"`);
166
166
  claim(built.triggerId ?? 'start', `trigger "${built.triggerId ?? 'start'}"`);
167
167
  const backing = new Map();
168
+ const adopted = new Set();
168
169
  const problems = [];
169
170
  for (const o of outputs) {
170
171
  const readsIt = use.read.has(o.name) && !use.stepNames.has(o.name);
@@ -173,6 +174,13 @@ export function planOutputBacking(built, outputs, vars, sharedOutputs = new Set(
173
174
  continue;
174
175
  const id = outputBackingName(o.name);
175
176
  const holder = taken.get(id);
177
+ const declared = vars.find((v) => v.name === id);
178
+ const onlyDefault = !use.written.has(o.name) && !readsIt && !sharedOutputs.has(o.name);
179
+ if (holder?.startsWith('variable ') && declared?.type === o.type && onlyDefault) {
180
+ backing.set(o.name, id);
181
+ adopted.add(o.name);
182
+ continue;
183
+ }
176
184
  if (holder) {
177
185
  problems.push({
178
186
  code: 'OUTPUT_BACKING_COLLISION', name: o.name,
@@ -187,7 +195,7 @@ export function planOutputBacking(built, outputs, vars, sharedOutputs = new Set(
187
195
  backing.set(o.name, id);
188
196
  }
189
197
  const reads = new Map([...backing].filter(([o]) => !use.stepNames.has(o)));
190
- return { backing, reads, problems };
198
+ return { backing, adopted, reads, problems };
191
199
  }
192
200
  /** The `inout` global that backs output `o`: its type and value metadata, no description. */
193
201
  export function outputBackingGlobal(o, id) {
package/dist/merge-cli.js CHANGED
@@ -43,19 +43,20 @@
43
43
  * `flow-merge: remove <dir>` line each (and `removed` in `--json`), because
44
44
  * copying the candidate over the project cannot delete a file: delete those
45
45
  * directories from the project. When the original sits in a Flow project
46
- * (`project.uiproj`), the project's `bindings_v2.json` is re-derived for the
47
- * changed agents, as compile does, and written beside the merged output.
46
+ * (`project.uiproj`), the project's `bindings_v2.json` is re-derived from the
47
+ * merged flow and its agents, as compile does, and written beside the merged
48
+ * output when it changes.
48
49
  */
49
50
  import { reportResult } from './cli-result.js';
50
51
  import { writeJsonFile } from './core/json-file.js';
51
52
  import { existsSync, mkdirSync, readdirSync, readFileSync } from 'node:fs';
52
- import { refreshInlineAgentRows } from './bindings-v2.js';
53
+ import { inlineAgentResources, mergeBindingsV2, projectBindingRows, refreshInlineAgentRows } from './bindings-v2.js';
53
54
  import { readBindingsV2, readInlineAgentFiles } from './bindings-v2-files.js';
54
- import { basename, dirname, join, resolve } from 'node:path';
55
+ import { basename, dirname, join, relative, resolve } from 'node:path';
55
56
  import { MergeRefusedError, mergeFlowWithSidecars } from './merge.js';
56
57
  import { sidecarSetFromList } from './merge-sidecars.js';
57
58
  import { isWithin } from './path-within.js';
58
- import { resourceSourcesOfOtherFlows } from './project-resource-users.js';
59
+ import { flowSources, projectMainFlow, resourceSourcesOfOtherFlows } from './project-resource-users.js';
59
60
  import { flagValue, flagValues, runWhenInvokedDirectly } from './cli-run.js';
60
61
  import { ensureTypeScriptRuntime } from './node-runtime.js';
61
62
  import { flowCheckOpts, openCliLibrary } from './cli-library.js';
@@ -99,34 +100,49 @@ export function sidecarsBeside(flowPath) {
99
100
  };
100
101
  }
101
102
  /**
102
- * The project's `bindings_v2.json` after merge's resource changes, or `undefined`
103
- * when the original is not in a Flow project (`project.uiproj`), no agent
104
- * resource changed, the file already holds the resulting rows, or the change
105
- * declares no different row (the rows derived
106
- * after the change equal those derived from the project as it is, so a changed
107
- * `resultCount` does not create or rewrite the file).
103
+ * The project's `bindings_v2.json` after the merge, as compile would derive it
104
+ * from the merged flow, or `undefined` when the original is not in a Flow project
105
+ * (`project.uiproj`) or the file already holds those rows.
108
106
  *
109
- * Only the agents whose resources changed are re-derived, each from its
110
- * directory as it will stand once the candidate is installed: the original's
111
- * files, with merge's writes over them and its removals taken out.
107
+ * The merged flow's connection and entity rows replace the ones on disk (compile
108
+ * does the same), and each inline agent's rows are re-derived from its directory
109
+ * as it will stand once the candidate is installed: the original's files, with
110
+ * merge's writes over them and its removals taken out.
112
111
  */
113
- function projectBindings(projectDir, writes, removals) {
112
+ function projectBindings(projectDir, originalPath, mergedFlow, writes, removals) {
114
113
  if (!existsSync(join(projectDir, 'project.uiproj')))
115
114
  return undefined;
115
+ const self = resolve(originalPath);
116
+ const main = projectMainFlow(projectDir);
117
+ const mainElsewhere = main.file !== undefined && resolve(main.file) !== self;
116
118
  const isResource = (path) => /\/resources\/[^/]+\/resource\.json$/.test(path);
117
119
  const agentOf = (path) => path.split('/')[0];
118
120
  const changedAgents = new Set([
119
121
  ...writes.filter((w) => isResource(w.path)).map((w) => agentOf(w.path)),
120
122
  ...removals.map(agentOf),
121
123
  ]);
122
- if (changedAgents.size === 0)
124
+ const flowAt = (path) => ({
125
+ file: relative(projectDir, path),
126
+ flow: resolve(path) === self ? mergedFlow : readJsonOrUndefined(path),
127
+ });
128
+ const rowFlows = main.file !== undefined ? [flowAt(main.file)]
129
+ : main.ambiguous.length > 0 ? main.ambiguous.map(flowAt) : [{ file: basename(self), flow: mergedFlow }];
130
+ if (mainElsewhere && changedAgents.size === 0)
123
131
  return undefined;
132
+ const sources = new Set([
133
+ ...changedAgents,
134
+ ...rowFlows.flatMap((f) => flowSources(f.flow)).filter((src) => isWithin(projectDir, resolve(projectDir, src)) && existsSync(join(projectDir, src, 'agent.json'))),
135
+ ]);
124
136
  const removedBodies = [];
125
137
  const agents = [];
126
- const agentsBefore = [];
127
138
  const asResources = (files) => [...files.values()].filter((r) => !!r && typeof r === 'object' && '$resourceType' in r);
128
- for (const source of changedAgents) {
139
+ for (const source of sources) {
129
140
  const onDisk = readInlineAgentFiles(join(projectDir, source));
141
+ if (!changedAgents.has(source)) {
142
+ if (onDisk)
143
+ agents.push(onDisk);
144
+ continue;
145
+ }
130
146
  const files = new Map();
131
147
  const resourcesDir = join(projectDir, source, 'resources');
132
148
  if (existsSync(resourcesDir)) {
@@ -139,7 +155,6 @@ function projectBindings(projectDir, writes, removals) {
139
155
  }
140
156
  }
141
157
  }
142
- agentsBefore.push({ agent: onDisk?.agent ?? {}, resources: asResources(files), features: onDisk?.features ?? [] });
143
158
  for (const dir of removals.filter((r) => agentOf(r) === source)) {
144
159
  const path = `${dir}/resource.json`;
145
160
  if (files.has(path))
@@ -156,13 +171,30 @@ function projectBindings(projectDir, writes, removals) {
156
171
  agents.push({ agent, resources: asResources(files), features: onDisk?.features ?? [] });
157
172
  }
158
173
  const existing = readBindingsV2(join(projectDir, 'bindings_v2.json'));
159
- const before = refreshInlineAgentRows(existing?.resources ?? [], agentsBefore, []);
160
- const after = refreshInlineAgentRows(existing?.resources ?? [], agents, removedBodies);
161
- // Nothing to write when the change declares nothing new, or the file already says it.
162
- if (JSON.stringify(after) === JSON.stringify(before) || JSON.stringify(after) === JSON.stringify(existing?.resources ?? []))
174
+ const current = existing?.resources ?? [];
175
+ const derived = mainElsewhere ? undefined : projectBindingRows(rowFlows);
176
+ const declares = (derived?.connections.length ?? 0) > 0 || (derived?.entities.length ?? 0) > 0
177
+ || agents.some((a) => inlineAgentResources(a).length > 0);
178
+ if (existing === undefined && !declares)
179
+ return undefined;
180
+ const base = derived
181
+ ? mergeBindingsV2(existing, derived.connections, derived.entities, { keepUnderived: derived.unreadable.length > 0 }).resources
182
+ : current;
183
+ const after = refreshInlineAgentRows(base, agents, removedBodies);
184
+ const settled = (rows) => JSON.stringify(rows.map((r) => JSON.stringify(r)).sort());
185
+ if (settled(after) === settled(current))
163
186
  return undefined;
164
187
  return { version: '2.0', ...existing, resources: after };
165
188
  }
189
+ /** A JSON file's contents, or `undefined` when it is missing or unreadable. */
190
+ function readJsonOrUndefined(path) {
191
+ try {
192
+ return JSON.parse(readFileSync(path, 'utf8'));
193
+ }
194
+ catch {
195
+ return undefined;
196
+ }
197
+ }
166
198
  export async function run(argv) {
167
199
  if (argv.length === 0 || argv[0] === '-h' || argv[0] === '--help') {
168
200
  console.error(USAGE);
@@ -358,10 +390,10 @@ export async function run(argv) {
358
390
  for (const dir of removed) {
359
391
  console.log(`flow-merge: remove ${dir} from the project: the edit removed this agent resource, and copying the candidate cannot delete it`);
360
392
  }
361
- const bindingsV2 = projectBindings(originalDir, merged.sidecars, removals);
393
+ const bindingsV2 = projectBindings(originalDir, originalPath, flow, merged.sidecars, removals);
362
394
  if (bindingsV2 !== undefined) {
363
395
  writeJsonFile(join(outDir, 'bindings_v2.json'), bindingsV2);
364
- console.log('flow-merge: wrote bindings_v2.json (the changed agents\' resource rows, re-derived as compile does)');
396
+ console.log('flow-merge: wrote bindings_v2.json (connection and agent resource rows, re-derived as compile does)');
365
397
  }
366
398
  reportResult({
367
399
  path: resolve(out),
@@ -18,6 +18,7 @@ import { loadBuiltFlow } from './load.js';
18
18
  import { serialize } from './serialize.js';
19
19
  import { CompileRefusal } from './core/compile-refusal.js';
20
20
  import { PACKAGE_NAME } from './package-name.js';
21
+ import { Bindings } from './bindings.js';
21
22
  import { check } from './check.js';
22
23
  import { placeDiagnostics } from './edit-scope.js';
23
24
  /**
@@ -54,7 +55,11 @@ export async function compileSourceDraftTolerant(file, opts = {}) {
54
55
  * The source goes to a temporary directory that is removed afterwards.
55
56
  */
56
57
  export async function baselineFromOriginal(originalPath, opts = {}, warn) {
57
- return withDecompiledOriginal(originalPath, (built) => ({ ...compileDraftTolerant(built, opts), built }), warn);
58
+ // The baseline reproduces the original, so a connection label it carries stays
59
+ // as written: resolving it through the project's bindings.json would make a
60
+ // label-to-id edit identical to the baseline and merge would drop it.
61
+ const asSaved = { ...opts, bindings: new Bindings() };
62
+ return withDecompiledOriginal(originalPath, (built) => ({ ...compileDraftTolerant(built, asSaved), built }), warn);
58
63
  }
59
64
  /**
60
65
  * Decompile the `.flow` at `originalPath` (reading agent sidecars beside it, as
package/dist/merge.js CHANGED
@@ -484,6 +484,7 @@ function mergeFlowFindings(original, edited, options) {
484
484
  result.bindings = mergeBindings(original.bindings, edited.bindings);
485
485
  result.bindings = withoutRowsMintedForKeptNodes(result.bindings, original, edited, options.baseline, keptFromOriginal, fieldwise);
486
486
  result.bindings = withoutSupersededAppRows(result.bindings, originalNodes, allNodes);
487
+ result.bindings = withoutStaleConnectionRows(result.bindings, originalNodes, allNodes);
487
488
  // metadata / solutionId / projectId / layout / runtime were carried by the
488
489
  // initial clone of `original` and are intentionally left untouched, apart
489
490
  // from the `layout.nodes` entries of removed nodes (dropped above) and added
@@ -727,6 +728,25 @@ function withoutSupersededAppRows(rows, originalNodes, mergedNodes) {
727
728
  return rows.filter((b) => !(b.resource === 'app' && typeof b.resourceKey === 'string'
728
729
  && before.has(b.resourceKey) && !after.has(b.resourceKey)));
729
730
  }
731
+ /**
732
+ * Drop the original's `connection` rows that an original node spelled and no
733
+ * merged node spells any more. An edit that swaps a connection (a label for its
734
+ * id, one id for another) brings the new rows, and the union would keep the old
735
+ * pair beside them, declared but unused. A row no original node spelled is not
736
+ * touched.
737
+ */
738
+ function withoutStaleConnectionRows(rows, originalNodes, mergedNodes) {
739
+ if (!rows)
740
+ return rows;
741
+ const before = JSON.stringify(originalNodes);
742
+ const after = JSON.stringify(mergedNodes);
743
+ return rows.filter((b) => {
744
+ if (b.resource !== 'connection' || typeof b.resourceKey !== 'string' || b.resourceKey === '')
745
+ return true;
746
+ const spelled = JSON.stringify(b.resourceKey);
747
+ return !(before.includes(spelled) && !after.includes(spelled));
748
+ });
749
+ }
730
750
  /**
731
751
  * Drop each added row that the no-edit recompile minted only for nodes the merge
732
752
  * kept from the original (#1133). A row qualifies when the original lacks it, the
package/dist/serialize.js CHANGED
@@ -714,7 +714,7 @@ function emittableGlobals(built, where, kind = 'root') {
714
714
  if (backing.problems.length) {
715
715
  throw new CompileRefusal(backing.problems[0].code, `${where}: ${backing.problems.map((p) => `[${p.code}] ${p.message}`).join(' ')}`, backing.problems[0].suggestion);
716
716
  }
717
- return { ...plan, backing: backing.backing, backingReads: backing.reads };
717
+ return { ...plan, backing: backing.backing, backingAdopted: backing.adopted, backingReads: backing.reads };
718
718
  }
719
719
  /**
720
720
  * The flow's `{ shared }` input plan (#924), its errors refused here (and
@@ -1972,7 +1972,7 @@ function serializeFlow(built, opts) {
1972
1972
  globals.push({ id: o.name, name: o.name, direction: 'out', type: o.type, ...varMeta(o) });
1973
1973
  for (const o of childGlobals.outputs) {
1974
1974
  const b = childGlobals.backing.get(o.name);
1975
- if (b)
1975
+ if (b && !childGlobals.backingAdopted.has(o.name))
1976
1976
  globals.push(outputBackingGlobal(o, b));
1977
1977
  }
1978
1978
  for (const vd of childGlobals.vars)
@@ -3561,7 +3561,7 @@ function serializeFlow(built, opts) {
3561
3561
  globals.push({ id: o.name, name: o.name, direction: 'out', type: o.type, ...varMeta(o) });
3562
3562
  for (const o of rootGlobals.outputs) {
3563
3563
  const b = rootGlobals.backing.get(o.name);
3564
- if (b)
3564
+ if (b && !rootGlobals.backingAdopted.has(o.name))
3565
3565
  globals.push(outputBackingGlobal(o, b));
3566
3566
  }
3567
3567
  for (const vd of rootGlobals.vars)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.95.0",
3
+ "version": "6.95.2",
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",
@@ -112,5 +112,5 @@
112
112
  "@types/node": "^22.7.0",
113
113
  "esbuild": "^0.28.1"
114
114
  },
115
- "gitref": "13b0485c8d353f4129c4b6d192b1432c5f9fc0b2"
115
+ "gitref": "ba0d70b57dd4f12a32eb7172d5eef52afad21364"
116
116
  }