@uipath/flow-tool 1.197.0-preview.79 → 1.198.0-preview.80

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/init.js CHANGED
@@ -165937,6 +165937,7 @@ function getLogFilePath() {
165937
165937
  // ../common/src/output-format-context.ts
165938
165938
  var formatSlot = singleton("OutputFormat");
165939
165939
  var formatExplicitSlot = singleton("OutputFormatExplicit");
165940
+ var helpRequestedSlot = singleton("HelpRequested");
165940
165941
  var filterSlot = singleton("OutputFilter");
165941
165942
  function getOutputFormat() {
165942
165943
  return formatSlot.get("json");
@@ -167004,6 +167005,9 @@ var OutputFormatter;
167004
167005
  if (opts?.warning) {
167005
167006
  data.Warning = opts.warning;
167006
167007
  }
167008
+ if (opts?.pagination) {
167009
+ data.Pagination = opts.pagination;
167010
+ }
167007
167011
  success(data);
167008
167012
  }
167009
167013
  OutputFormatter.emitList = emitList;
@@ -167443,6 +167447,7 @@ var savedOriginalsSlot = singleton("ConsoleGuardOriginals");
167443
167447
  var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
167444
167448
  // ../common/src/interactivity-context.ts
167445
167449
  var modeSlot = singleton("InteractivityMode");
167450
+ var interactiveFlagSlot = singleton("InteractiveFlag");
167446
167451
  // ../common/src/polling/types.ts
167447
167452
  var PollOutcome = {
167448
167453
  Completed: "completed",
@@ -194611,6 +194616,10 @@ var KNOWN_ERROR_CODES = new Set([
194611
194616
  "ENOTDIR",
194612
194617
  "EUNKNOWN"
194613
194618
  ]);
194619
+
194620
+ // ../auth/src/index.ts
194621
+ init_constants();
194622
+
194614
194623
  // ../auth/src/interactive.ts
194615
194624
  init_src();
194616
194625
 
@@ -195197,7 +195206,7 @@ class TextApiResponse {
195197
195206
  var package_default = {
195198
195207
  name: "@uipath/integrationservice-sdk",
195199
195208
  license: "MIT",
195200
- version: "1.197.0-preview.79",
195209
+ version: "1.198.0-preview.80",
195201
195210
  repository: {
195202
195211
  type: "git",
195203
195212
  url: "https://github.com/UiPath/cli.git",
@@ -200937,6 +200946,17 @@ var API_DOMAIN_MAP = new Map([
200937
200946
  [SessionsApi, "connections"],
200938
200947
  [ElementsApi, "elements"]
200939
200948
  ]);
200949
+ function baseApiClassName(name) {
200950
+ let end = name.length;
200951
+ while (end > 0 && name[end - 1] >= "0" && name[end - 1] <= "9") {
200952
+ end--;
200953
+ }
200954
+ return name.slice(0, end);
200955
+ }
200956
+ var API_DOMAIN_BY_NAME = new Map([...API_DOMAIN_MAP].map(([ApiClass, domain3]) => [
200957
+ baseApiClassName(ApiClass.name),
200958
+ domain3
200959
+ ]));
200940
200960
  // ../integrationservice-sdk/src/dap/essential-config.ts
200941
200961
  var JIT_INPUT_OPERATIONS = new Set(["create", "update", "replace"]);
200942
200962
  // ../integrationservice-sdk/src/dap/filter-builder/workflow-value.ts
@@ -201460,7 +201480,9 @@ var ENABLED_MANIFEST_FLAGS = new Set([
201460
201480
  MANIFEST_FEATURE_FLAGS.CONNECTOR_NODES,
201461
201481
  MANIFEST_FEATURE_FLAGS.EXTRACT_DOCUMENT,
201462
201482
  MANIFEST_FEATURE_FLAGS.HITL,
201463
- MANIFEST_FEATURE_FLAGS.LOOP_CONTAINER
201483
+ MANIFEST_FEATURE_FLAGS.LOOP_CONTAINER,
201484
+ MANIFEST_FEATURE_FLAGS.BATCH_TRANSFORM,
201485
+ MANIFEST_FEATURE_FLAGS.SUMMARIZE
201464
201486
  ]);
201465
201487
  // ../orchestrator-sdk/generated/src/runtime.ts
201466
201488
  var BASE_PATH3 = "https://alpha.uipath.com/uipattycyrhx/abizon_1/orchestrator_".replace(/\/+$/, "");
@@ -201685,7 +201707,7 @@ function querystringSingleKey3(key, value, keyPrefix = "") {
201685
201707
  var package_default2 = {
201686
201708
  name: "@uipath/orchestrator-sdk",
201687
201709
  license: "MIT",
201688
- version: "1.197.0",
201710
+ version: "1.198.0",
201689
201711
  repository: {
201690
201712
  type: "git",
201691
201713
  url: "https://github.com/UiPath/cli.git",
@@ -201978,7 +202000,7 @@ function querystringSingleKey4(key, value, keyPrefix = "") {
201978
202000
  var package_default3 = {
201979
202001
  name: "@uipath/solution-sdk",
201980
202002
  license: "MIT",
201981
- version: "1.197.0-preview.79",
202003
+ version: "1.198.0-preview.80",
201982
202004
  repository: {
201983
202005
  type: "git",
201984
202006
  url: "https://github.com/UiPath/cli.git",
@@ -204431,6 +204453,10 @@ class ProjectTool {
204431
204453
  this.logger.info("Pack operation is a noop");
204432
204454
  return ToolResult.success();
204433
204455
  }
204456
+ async cleanupAsync(_options, _cancellationToken) {
204457
+ this.logger.info("Cleanup operation is a noop");
204458
+ return ToolResult.success();
204459
+ }
204434
204460
  async getUiProjectAsync(projectPath) {
204435
204461
  const filePath = Path.join(projectPath, ProjectTool.ProjectFileName);
204436
204462
  if (!await this.fileSystem.exists(filePath)) {
@@ -204510,7 +204536,7 @@ init_dist2();
204510
204536
  // ../packager/packager-tool-flow/package.json
204511
204537
  var package_default4 = {
204512
204538
  name: "@uipath/packager-tool-flow",
204513
- version: "1.197.0-preview.79",
204539
+ version: "1.198.0-preview.80",
204514
204540
  description: "UiPath Flow tool implementation",
204515
204541
  type: "module",
204516
204542
  exports: {
@@ -216392,10 +216418,14 @@ var PROCESS_NODE_PREFIXES = [
216392
216418
  "uipath.core.agent.",
216393
216419
  "uipath.core.api-workflow."
216394
216420
  ];
216395
- var UNRESOLVED_BINDING_PATTERN = /^<bindings\.\w+>$/;
216421
+ var CONNECTOR_TOOL_PREFIX = "uipath.agent.resource.tool.connector.";
216422
+ var UNRESOLVED_BINDING_PATTERN = /^<bindings\.[^>]+>$/;
216396
216423
  function isProcessNode(nodeType) {
216397
216424
  return PROCESS_NODE_PREFIXES.some((prefix2) => nodeType?.startsWith(prefix2));
216398
216425
  }
216426
+ function isConnectorToolNode(nodeType) {
216427
+ return nodeType?.startsWith(CONNECTOR_TOOL_PREFIX) ?? false;
216428
+ }
216399
216429
  function extractProcessGuid(nodeType) {
216400
216430
  const match = nodeType.match(/^(?:uipath\.core\.rpa-workflow|uipath\.agent\.resource\.tool\.process|uipath\.core\.agent|uipath\.core\.api-workflow)\.([0-9a-f-]+)$/i);
216401
216431
  if (!match) {
@@ -216447,13 +216477,50 @@ function resolveContextPlaceholders(context, storedName, storedFolder) {
216447
216477
  }
216448
216478
  }
216449
216479
  }
216480
+ function createConnectorToolBindings(node2, definition97) {
216481
+ const model = definition97.model;
216482
+ const detail = node2.inputs?.detail;
216483
+ const connectionId = detail?.connectionId ?? "";
216484
+ const connectionFolderKey = detail?.connectionFolderKey ?? "";
216485
+ const values = model?.bindings?.values ?? [];
216486
+ const connValue = values.find((v2) => v2.propertyAttribute === "ConnectionId");
216487
+ const folderValue = values.find((v2) => v2.propertyAttribute === "FolderKey");
216488
+ const connectionBinding = createBinding({
216489
+ name: connValue?.name ?? "connection",
216490
+ value: connectionId,
216491
+ resource: "Connection",
216492
+ resourceKey: connectionId,
216493
+ propertyAttribute: "ConnectionId"
216494
+ });
216495
+ const folderKeyBinding = createBinding({
216496
+ name: folderValue?.name ?? "FolderKey",
216497
+ value: connectionFolderKey,
216498
+ resource: "Connection",
216499
+ resourceKey: connectionId,
216500
+ propertyAttribute: "FolderKey"
216501
+ });
216502
+ return { connectionBinding, folderKeyBinding };
216503
+ }
216504
+ function resolveConnectorContextPlaceholders(context, storedConnection, storedFolderKey) {
216505
+ if (!context)
216506
+ return;
216507
+ for (const entry of context) {
216508
+ if (typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)) {
216509
+ if (entry.name === "connection") {
216510
+ entry.default = storedConnection.default;
216511
+ entry.value = `=bindings.${storedConnection.id}`;
216512
+ } else if (entry.name === "folderKey") {
216513
+ entry.default = storedFolderKey.default;
216514
+ entry.value = `=bindings.${storedFolderKey.id}`;
216515
+ }
216516
+ }
216517
+ }
216518
+ }
216450
216519
  function ensureProcessBindings(workflow, logger3) {
216451
216520
  const nodes = workflow.nodes ?? [];
216452
216521
  const definitions = workflow.definitions ?? [];
216453
216522
  let bindingsCreated = 0;
216454
216523
  for (const node2 of nodes) {
216455
- if (!isProcessNode(node2.type))
216456
- continue;
216457
216524
  const nodeModel = node2.model;
216458
216525
  const defModel = definitions.find((d2) => d2.nodeType === node2.type)?.model;
216459
216526
  const hasUnresolved = [nodeModel, defModel].some((m2) => m2?.context?.some((entry) => typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)));
@@ -216462,25 +216529,49 @@ function ensureProcessBindings(workflow, logger3) {
216462
216529
  const definition97 = definitions.find((d2) => d2.nodeType === node2.type);
216463
216530
  if (!definition97)
216464
216531
  continue;
216465
- let nameBinding;
216466
- let folderBinding;
216467
- try {
216468
- ({ nameBinding, folderBinding } = createProcessBindings(definition97));
216469
- } catch (err2) {
216470
- logger3.warn(`Skipping binding resolution for node "${node2.id}": ${err2 instanceof Error ? err2.message : String(err2)}`);
216532
+ if (isProcessNode(node2.type)) {
216533
+ let nameBinding;
216534
+ let folderBinding;
216535
+ try {
216536
+ ({ nameBinding, folderBinding } = createProcessBindings(definition97));
216537
+ } catch (err2) {
216538
+ logger3.warn(`Skipping binding resolution for node "${node2.id}": ${err2 instanceof Error ? err2.message : String(err2)}`);
216539
+ continue;
216540
+ }
216541
+ const beforeCount = workflow.bindings?.length ?? 0;
216542
+ addBinding(workflow, nameBinding);
216543
+ addBinding(workflow, folderBinding);
216544
+ const storedBindings = workflow.bindings;
216545
+ const storedName = storedBindings.find((b2) => b2.resourceKey === nameBinding.resourceKey && b2.propertyAttribute === nameBinding.propertyAttribute) ?? nameBinding;
216546
+ const storedFolder = storedBindings.find((b2) => b2.resourceKey === folderBinding.resourceKey && b2.propertyAttribute === folderBinding.propertyAttribute) ?? folderBinding;
216547
+ resolveContextPlaceholders(nodeModel?.context, storedName, storedFolder);
216548
+ resolveContextPlaceholders(defModel?.context, storedName, storedFolder);
216549
+ const added = (workflow.bindings?.length ?? 0) - beforeCount;
216550
+ bindingsCreated += added;
216551
+ logger3.info(`Resolved process bindings for node "${node2.id}" (${node2.type})`);
216471
216552
  continue;
216472
216553
  }
216473
- const beforeCount = workflow.bindings?.length ?? 0;
216474
- addBinding(workflow, nameBinding);
216475
- addBinding(workflow, folderBinding);
216476
- const storedBindings = workflow.bindings;
216477
- const storedName = storedBindings.find((b2) => b2.resourceKey === nameBinding.resourceKey && b2.propertyAttribute === nameBinding.propertyAttribute) ?? nameBinding;
216478
- const storedFolder = storedBindings.find((b2) => b2.resourceKey === folderBinding.resourceKey && b2.propertyAttribute === folderBinding.propertyAttribute) ?? folderBinding;
216479
- resolveContextPlaceholders(nodeModel?.context, storedName, storedFolder);
216480
- resolveContextPlaceholders(defModel?.context, storedName, storedFolder);
216481
- const added = (workflow.bindings?.length ?? 0) - beforeCount;
216482
- bindingsCreated += added;
216483
- logger3.info(`Resolved process bindings for node "${node2.id}" (${node2.type})`);
216554
+ if (isConnectorToolNode(node2.type)) {
216555
+ let connectionBinding;
216556
+ let folderKeyBinding;
216557
+ try {
216558
+ ({ connectionBinding, folderKeyBinding } = createConnectorToolBindings(node2, definition97));
216559
+ } catch (err2) {
216560
+ logger3.warn(`Skipping connector binding resolution for node "${node2.id}": ${err2 instanceof Error ? err2.message : String(err2)}`);
216561
+ continue;
216562
+ }
216563
+ const beforeCount = workflow.bindings?.length ?? 0;
216564
+ addBinding(workflow, connectionBinding);
216565
+ addBinding(workflow, folderKeyBinding);
216566
+ const storedBindings = workflow.bindings;
216567
+ const storedConn = storedBindings.find((b2) => b2.resourceKey === connectionBinding.resourceKey && b2.propertyAttribute === connectionBinding.propertyAttribute) ?? connectionBinding;
216568
+ const storedFk = storedBindings.find((b2) => b2.resourceKey === folderKeyBinding.resourceKey && b2.propertyAttribute === folderKeyBinding.propertyAttribute) ?? folderKeyBinding;
216569
+ resolveConnectorContextPlaceholders(nodeModel?.context, storedConn, storedFk);
216570
+ resolveConnectorContextPlaceholders(defModel?.context, storedConn, storedFk);
216571
+ const added = (workflow.bindings?.length ?? 0) - beforeCount;
216572
+ bindingsCreated += added;
216573
+ logger3.info(`Resolved connector bindings for node "${node2.id}" (${node2.type})`);
216574
+ }
216484
216575
  }
216485
216576
  if (bindingsCreated > 0) {
216486
216577
  logger3.info(`ensureProcessBindings: created ${bindingsCreated} binding(s) for directly-authored nodes`);
@@ -218308,4 +218399,4 @@ export {
218308
218399
  flowInitAsync
218309
218400
  };
218310
218401
 
218311
- //# debugId=65AA79A91A76B07A64756E2164756E21
218402
+ //# debugId=93A57A59115463F864756E2164756E21
@@ -159757,6 +159757,10 @@ class ProjectTool {
159757
159757
  this.logger.info("Pack operation is a noop");
159758
159758
  return ToolResult.success();
159759
159759
  }
159760
+ async cleanupAsync(_options, _cancellationToken) {
159761
+ this.logger.info("Cleanup operation is a noop");
159762
+ return ToolResult.success();
159763
+ }
159760
159764
  async getUiProjectAsync(projectPath) {
159761
159765
  const filePath = Path.join(projectPath, ProjectTool.ProjectFileName);
159762
159766
  if (!await this.fileSystem.exists(filePath)) {
@@ -159836,7 +159840,7 @@ init_dist6();
159836
159840
  // ../packager/packager-tool-flow/package.json
159837
159841
  var package_default = {
159838
159842
  name: "@uipath/packager-tool-flow",
159839
- version: "1.197.0-preview.79",
159843
+ version: "1.198.0-preview.80",
159840
159844
  description: "UiPath Flow tool implementation",
159841
159845
  type: "module",
159842
159846
  exports: {
@@ -171779,10 +171783,14 @@ var PROCESS_NODE_PREFIXES = [
171779
171783
  "uipath.core.agent.",
171780
171784
  "uipath.core.api-workflow."
171781
171785
  ];
171782
- var UNRESOLVED_BINDING_PATTERN = /^<bindings\.\w+>$/;
171786
+ var CONNECTOR_TOOL_PREFIX = "uipath.agent.resource.tool.connector.";
171787
+ var UNRESOLVED_BINDING_PATTERN = /^<bindings\.[^>]+>$/;
171783
171788
  function isProcessNode(nodeType) {
171784
171789
  return PROCESS_NODE_PREFIXES.some((prefix2) => nodeType?.startsWith(prefix2));
171785
171790
  }
171791
+ function isConnectorToolNode(nodeType) {
171792
+ return nodeType?.startsWith(CONNECTOR_TOOL_PREFIX) ?? false;
171793
+ }
171786
171794
  function extractProcessGuid(nodeType) {
171787
171795
  const match = nodeType.match(/^(?:uipath\.core\.rpa-workflow|uipath\.agent\.resource\.tool\.process|uipath\.core\.agent|uipath\.core\.api-workflow)\.([0-9a-f-]+)$/i);
171788
171796
  if (!match) {
@@ -171834,13 +171842,50 @@ function resolveContextPlaceholders(context, storedName, storedFolder) {
171834
171842
  }
171835
171843
  }
171836
171844
  }
171845
+ function createConnectorToolBindings(node, definition95) {
171846
+ const model = definition95.model;
171847
+ const detail = node.inputs?.detail;
171848
+ const connectionId = detail?.connectionId ?? "";
171849
+ const connectionFolderKey = detail?.connectionFolderKey ?? "";
171850
+ const values = model?.bindings?.values ?? [];
171851
+ const connValue = values.find((v2) => v2.propertyAttribute === "ConnectionId");
171852
+ const folderValue = values.find((v2) => v2.propertyAttribute === "FolderKey");
171853
+ const connectionBinding = createBinding2({
171854
+ name: connValue?.name ?? "connection",
171855
+ value: connectionId,
171856
+ resource: "Connection",
171857
+ resourceKey: connectionId,
171858
+ propertyAttribute: "ConnectionId"
171859
+ });
171860
+ const folderKeyBinding = createBinding2({
171861
+ name: folderValue?.name ?? "FolderKey",
171862
+ value: connectionFolderKey,
171863
+ resource: "Connection",
171864
+ resourceKey: connectionId,
171865
+ propertyAttribute: "FolderKey"
171866
+ });
171867
+ return { connectionBinding, folderKeyBinding };
171868
+ }
171869
+ function resolveConnectorContextPlaceholders(context, storedConnection, storedFolderKey) {
171870
+ if (!context)
171871
+ return;
171872
+ for (const entry of context) {
171873
+ if (typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)) {
171874
+ if (entry.name === "connection") {
171875
+ entry.default = storedConnection.default;
171876
+ entry.value = `=bindings.${storedConnection.id}`;
171877
+ } else if (entry.name === "folderKey") {
171878
+ entry.default = storedFolderKey.default;
171879
+ entry.value = `=bindings.${storedFolderKey.id}`;
171880
+ }
171881
+ }
171882
+ }
171883
+ }
171837
171884
  function ensureProcessBindings(workflow, logger) {
171838
171885
  const nodes = workflow.nodes ?? [];
171839
171886
  const definitions = workflow.definitions ?? [];
171840
171887
  let bindingsCreated = 0;
171841
171888
  for (const node of nodes) {
171842
- if (!isProcessNode(node.type))
171843
- continue;
171844
171889
  const nodeModel = node.model;
171845
171890
  const defModel = definitions.find((d2) => d2.nodeType === node.type)?.model;
171846
171891
  const hasUnresolved = [nodeModel, defModel].some((m2) => m2?.context?.some((entry) => typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)));
@@ -171849,25 +171894,49 @@ function ensureProcessBindings(workflow, logger) {
171849
171894
  const definition95 = definitions.find((d2) => d2.nodeType === node.type);
171850
171895
  if (!definition95)
171851
171896
  continue;
171852
- let nameBinding;
171853
- let folderBinding;
171854
- try {
171855
- ({ nameBinding, folderBinding } = createProcessBindings(definition95));
171856
- } catch (err2) {
171857
- logger.warn(`Skipping binding resolution for node "${node.id}": ${err2 instanceof Error ? err2.message : String(err2)}`);
171897
+ if (isProcessNode(node.type)) {
171898
+ let nameBinding;
171899
+ let folderBinding;
171900
+ try {
171901
+ ({ nameBinding, folderBinding } = createProcessBindings(definition95));
171902
+ } catch (err2) {
171903
+ logger.warn(`Skipping binding resolution for node "${node.id}": ${err2 instanceof Error ? err2.message : String(err2)}`);
171904
+ continue;
171905
+ }
171906
+ const beforeCount = workflow.bindings?.length ?? 0;
171907
+ addBinding(workflow, nameBinding);
171908
+ addBinding(workflow, folderBinding);
171909
+ const storedBindings = workflow.bindings;
171910
+ const storedName = storedBindings.find((b2) => b2.resourceKey === nameBinding.resourceKey && b2.propertyAttribute === nameBinding.propertyAttribute) ?? nameBinding;
171911
+ const storedFolder = storedBindings.find((b2) => b2.resourceKey === folderBinding.resourceKey && b2.propertyAttribute === folderBinding.propertyAttribute) ?? folderBinding;
171912
+ resolveContextPlaceholders(nodeModel?.context, storedName, storedFolder);
171913
+ resolveContextPlaceholders(defModel?.context, storedName, storedFolder);
171914
+ const added = (workflow.bindings?.length ?? 0) - beforeCount;
171915
+ bindingsCreated += added;
171916
+ logger.info(`Resolved process bindings for node "${node.id}" (${node.type})`);
171858
171917
  continue;
171859
171918
  }
171860
- const beforeCount = workflow.bindings?.length ?? 0;
171861
- addBinding(workflow, nameBinding);
171862
- addBinding(workflow, folderBinding);
171863
- const storedBindings = workflow.bindings;
171864
- const storedName = storedBindings.find((b2) => b2.resourceKey === nameBinding.resourceKey && b2.propertyAttribute === nameBinding.propertyAttribute) ?? nameBinding;
171865
- const storedFolder = storedBindings.find((b2) => b2.resourceKey === folderBinding.resourceKey && b2.propertyAttribute === folderBinding.propertyAttribute) ?? folderBinding;
171866
- resolveContextPlaceholders(nodeModel?.context, storedName, storedFolder);
171867
- resolveContextPlaceholders(defModel?.context, storedName, storedFolder);
171868
- const added = (workflow.bindings?.length ?? 0) - beforeCount;
171869
- bindingsCreated += added;
171870
- logger.info(`Resolved process bindings for node "${node.id}" (${node.type})`);
171919
+ if (isConnectorToolNode(node.type)) {
171920
+ let connectionBinding;
171921
+ let folderKeyBinding;
171922
+ try {
171923
+ ({ connectionBinding, folderKeyBinding } = createConnectorToolBindings(node, definition95));
171924
+ } catch (err2) {
171925
+ logger.warn(`Skipping connector binding resolution for node "${node.id}": ${err2 instanceof Error ? err2.message : String(err2)}`);
171926
+ continue;
171927
+ }
171928
+ const beforeCount = workflow.bindings?.length ?? 0;
171929
+ addBinding(workflow, connectionBinding);
171930
+ addBinding(workflow, folderKeyBinding);
171931
+ const storedBindings = workflow.bindings;
171932
+ const storedConn = storedBindings.find((b2) => b2.resourceKey === connectionBinding.resourceKey && b2.propertyAttribute === connectionBinding.propertyAttribute) ?? connectionBinding;
171933
+ const storedFk = storedBindings.find((b2) => b2.resourceKey === folderKeyBinding.resourceKey && b2.propertyAttribute === folderKeyBinding.propertyAttribute) ?? folderKeyBinding;
171934
+ resolveConnectorContextPlaceholders(nodeModel?.context, storedConn, storedFk);
171935
+ resolveConnectorContextPlaceholders(defModel?.context, storedConn, storedFk);
171936
+ const added = (workflow.bindings?.length ?? 0) - beforeCount;
171937
+ bindingsCreated += added;
171938
+ logger.info(`Resolved connector bindings for node "${node.id}" (${node.type})`);
171939
+ }
171871
171940
  }
171872
171941
  if (bindingsCreated > 0) {
171873
171942
  logger.info(`ensureProcessBindings: created ${bindingsCreated} binding(s) for directly-authored nodes`);
@@ -174488,4 +174557,4 @@ var toolsFactoryRepository2 = _global2[REGISTRY_KEY2];
174488
174557
  // src/packager-tool.ts
174489
174558
  toolsFactoryRepository2.registerProjectToolFactory(new FlowToolFactory);
174490
174559
 
174491
- //# debugId=C6B24BF94738F27664756E2164756E21
174560
+ //# debugId=D817C8310D0A394364756E2164756E21
@@ -0,0 +1,11 @@
1
+ import type { IFileSystem } from "@uipath/filesystem";
2
+ export declare function ensureDirectory(fs: IFileSystem, path: string): Promise<void>;
3
+ export declare class FlowEvalFileStore {
4
+ private readonly fs;
5
+ constructor(fs: IFileSystem);
6
+ readJsonFiles<T extends {
7
+ fileName?: string;
8
+ }>(dir: string): Promise<T[]>;
9
+ writeJsonFile(path: string, value: unknown): Promise<void>;
10
+ remove(path: string): Promise<void>;
11
+ }
@@ -0,0 +1,51 @@
1
+ import { type MigrationErrorTracker, type MigrationWorkflow } from "@uipath/flow-migrations";
2
+ /**
3
+ * Studio Web runs the workflow migration chain when it opens a `.flow`, and
4
+ * rejects the flow if any step fails (e.g. "Workflow migration failed at
5
+ * 1.3->1.4: Invalid input for migration 1.3 -> 1.4"). The CLI bundles the same
6
+ * `@uipath/flow-migrations` engine, so it can reproduce that failure locally —
7
+ * this module is the shared plumbing that both `flow migrate` and `flow
8
+ * validate` use to do so (UV-15030).
9
+ *
10
+ * `migrateWorkflow` does NOT throw on a failed step; it returns the ORIGINAL
11
+ * workflow with `migrated: false` and a populated `error: { step, message }`.
12
+ * The offending field paths are only reachable through the optional
13
+ * `errorTracker`, not the returned `error`. `captureMigrationIssues` wires that
14
+ * tracker up so callers can enrich the bare "Invalid input" message with the
15
+ * exact nodes/fields that failed.
16
+ */
17
+ export declare function captureMigrationIssues(): {
18
+ tracker: MigrationErrorTracker;
19
+ fieldPaths: () => string[];
20
+ };
21
+ /**
22
+ * Human-facing explanation for a failed workflow migration step, shared by
23
+ * `flow migrate` (as a thrown error message) and `flow validate` (as a
24
+ * validation issue). `step` and `rawMessage` come straight from
25
+ * `migrateWorkflow`'s returned `error`; `fieldPaths` come from
26
+ * `captureMigrationIssues`.
27
+ */
28
+ export declare function formatMigrationFailureMessage(step: string, rawMessage: string, fieldPaths: string[]): string;
29
+ export type ForwardMigrationCheck = {
30
+ ok: true;
31
+ } | {
32
+ ok: false;
33
+ step: string;
34
+ rawMessage: string;
35
+ message: string;
36
+ fieldPaths: string[];
37
+ };
38
+ /**
39
+ * Run the forward migration Studio Web would run when opening this flow, in
40
+ * memory — no write, no network. Returns `{ ok: false, ... }` only when a
41
+ * migration STEP fails (the flow is at a known version but its shape is
42
+ * invalid for the next step); that flow will not open in Studio Web until
43
+ * fixed.
44
+ *
45
+ * Returns `{ ok: true }` when the flow migrates cleanly, is already current,
46
+ * OR when the chain can't be built at all — a missing/unknown/newer-than-
47
+ * bundled `version` makes `migrateWorkflow` throw before running any step.
48
+ * That last case means the CLI's bundled migrations are out of step with the
49
+ * flow (version skew), which is not a flow defect we should hard-fail on.
50
+ */
51
+ export declare function checkForwardMigration(rawWorkflow: MigrationWorkflow): ForwardMigrationCheck;
@@ -82,6 +82,18 @@ export declare class FlowValidateService {
82
82
  private loadCurrentManifestMap;
83
83
  private loadCurrentManifestMapUncached;
84
84
  validateFile(flowFilePath: string): Promise<FlowValidateResult>;
85
+ /**
86
+ * Forward-migration preflight (UV-15030).
87
+ *
88
+ * Studio Web runs the `@uipath/flow-migrations` chain when it opens a
89
+ * `.flow`; a flow that fails a migration step (e.g. 1.3->1.4) passes every
90
+ * structural/semantic check here yet never opens in the browser. The CLI
91
+ * bundles the same engine, so we run it in-memory (no write, no network)
92
+ * and turn a failed step into a blocking error naming the offending
93
+ * fields. A flow that migrates cleanly, is already current, or carries an
94
+ * unknown/skewed version yields no issue — see `checkForwardMigration`.
95
+ */
96
+ private validateForwardMigration;
85
97
  /**
86
98
  * For agent nodes that reference an external agent definition via a
87
99
  * `projectId` UUID, read the sibling `<uuid>/agent.json` file and
@@ -55,7 +55,24 @@ export interface InlineAgentPackage {
55
55
  entryPoint: EntryPoint;
56
56
  /** The raw agent.json content (for .agent-builder/agent.json). */
57
57
  agentJson: Record<string, unknown>;
58
+ bindingsJson?: PackagingBindingsJson;
58
59
  }
60
+ export interface PackagingBindingsJson extends Record<string, unknown> {
61
+ version: string;
62
+ resources: Record<string, unknown>[];
63
+ }
64
+ export interface PackagingArtifacts {
65
+ entryPoints: EntryPoint[];
66
+ bindingsJson: PackagingBindingsJson;
67
+ }
68
+ export interface PackagingArtifactOptions {
69
+ additionalEntryPoints?: EntryPoint[];
70
+ additionalBindingsJsons?: Array<PackagingBindingsJson | undefined>;
71
+ packageDescriptorJson?: Record<string, unknown>;
72
+ }
73
+ export declare function normalizePackagingBindingsJson(value: unknown): PackagingBindingsJson | undefined;
74
+ export declare function emptyPackagingBindingsJson(): PackagingBindingsJson;
75
+ export declare function mergePackagingBindingsJson(bindingsJsons: Array<PackagingBindingsJson | undefined>): PackagingBindingsJson;
59
76
  /**
60
77
  * Scan workflow nodes for inline agents, read their agent.json,
61
78
  * and build entry points + metadata for packaging.
@@ -71,6 +88,12 @@ export declare function packageInlineAgents(fs: IFileSystem, projectDir: string,
71
88
  inputs?: Record<string, unknown>;
72
89
  model?: Record<string, unknown>;
73
90
  }>): Promise<InlineAgentPackage[]>;
91
+ /**
92
+ * Copy each referenced inline agent's directory into the staging project and
93
+ * write its `.agent-builder` files (agent.json + bindings.json) — the agent's
94
+ * runtime execution contract the runtime loads when it runs the agent.
95
+ */
96
+ export declare function stageInlineAgentPackageFiles(fs: IFileSystem, sourceProjectPath: string, stagingProjectDir: string, inlineAgents: InlineAgentPackage[], formatLogMessage: (source: string) => string): Promise<void>;
74
97
  /**
75
98
  * Build inline-agent descriptors for a debug session's FpsProperties
76
99
  * injection. Mirrors flow-workbench's `extractInlineAgents` shape:
@@ -101,7 +124,8 @@ export declare function buildInlineAgentDescriptors(nodes: Array<{
101
124
  * Returns the computed entry points so callers can derive PIMS entry point paths
102
125
  * without calling getEntryPoints again.
103
126
  */
104
- export declare function writePackagingArtifacts(fs: IFileSystem, projectDir: string, projectId: string, packagingNodes: PackagingNode[], bindings: PackagingBinding[], variables: PackagingWorkflowVariables, bpmnFileName: string, startEventId: string, flowFileName?: string, definitions?: PackagingNodeManifest[]): Promise<EntryPoint[]>;
127
+ export declare function writePackagingArtifacts(fs: IFileSystem, projectDir: string, projectId: string, packagingNodes: PackagingNode[], bindings: PackagingBinding[], variables: PackagingWorkflowVariables, bpmnFileName: string, startEventId: string, flowFileName?: string, definitions?: PackagingNodeManifest[], options?: PackagingArtifactOptions): Promise<EntryPoint[]>;
128
+ export declare function writePackagingArtifactsDetailed(fs: IFileSystem, projectDir: string, projectId: string, packagingNodes: PackagingNode[], bindings: PackagingBinding[], variables: PackagingWorkflowVariables, bpmnFileName: string, startEventId: string, flowFileName?: string, definitions?: PackagingNodeManifest[], options?: PackagingArtifactOptions): Promise<PackagingArtifacts>;
105
129
  /**
106
130
  * Re-read a .flow file and regenerate bindings_v2.json in the same project directory.
107
131
  * Called after `node add` (process nodes), `node delete`, and `node configure` to