@uipath/packager-tool-flow 1.205.0-preview.276 → 1.206.0-preview.279

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.
@@ -0,0 +1,3 @@
1
+ import type { IFileSystem } from "@uipath/filesystem";
2
+ /** Find the project that owns a .flow file, or its directory for a loose file. */
3
+ export declare function findFlowProjectRoot(fs: IFileSystem, flowFilePath: string): Promise<string>;
@@ -73,12 +73,16 @@ export declare class FlowTool extends ProjectTool {
73
73
  * Reconcile each inline-agent node's `agentInputVariables` from its
74
74
  * agent's `inputSchema` before conversion. Reads the schema from the
75
75
  * already-built agent (`builtAgents`) first, falling back to an
76
- * `agent.json` copied under `content/<source>/`. Mutates `workflow.nodes`
77
- * in place; best-effort, so a missing/unreadable agent leaves the node
78
- * as-is.
76
+ * `agent.json` copied under `content/<source>/`. Mutates the top-level
77
+ * and subflow nodes in place; best-effort, so a missing/unreadable agent
78
+ * leaves the node as-is.
79
79
  */
80
80
  private hydrateInlineAgentInputs;
81
- /** Read an `agent.json` copied in without going through `buildAgent`. */
81
+ /**
82
+ * Read an `agent.json` copied in without going through `buildAgent`.
83
+ * `source` comes from the `.flow`, so only a bare project-id folder name
84
+ * is read — the same rule as packaging — never a path out of the package.
85
+ */
82
86
  private readCopiedAgentJson;
83
87
  /**
84
88
  * Copy project files into the correct nupkg structure.
package/dist/index.d.ts CHANGED
@@ -4,11 +4,12 @@ export { createProcessBindings, ensureProcessBindings, extractProcessGuid, } fro
4
4
  export { defaultEntryPointNodeId, entryPointTriggers, } from "./entry-point-triggers.js";
5
5
  export { replaceExporterVersion } from "./exporter-version.js";
6
6
  export { createFlowRefResolver, type FlowIoLogger, findProjectFlowFile, inlineFlowRefs, migrateRawWorkflow, readFlowWorkflow, resolveAndMigrateWorkflow, resolveProjectFlowFile, resolveWorkflowRefs, tryFindProjectFlowFile, tryResolveProjectFlowFile, } from "./flow-io.js";
7
+ export { findFlowProjectRoot } from "./flow-project-root.js";
7
8
  export { FlowTool } from "./flow-tool.js";
8
9
  export { FlowToolFactory } from "./flow-tool-factory.js";
9
10
  export { type DesignerRuleOptions, type FlowGraph, hydrateAgentNodeInputs, type ParsedFlowSource, parseFlowSource, runDesignerRules, validateFlowSource, } from "./flow-validation.js";
10
11
  export type { FlowValidationIssue, FlowValidationSeverity, } from "./flow-validation-hook.js";
11
- export { type AgentInputVariable, agentJsonReader, hydrateInlineAgentInputVariables, isInlineAgentNodeType, type ReadAgentJson, readInlineAgentSource, reconcileInlineAgentInputVariables, setPublishIntentOnInlineAgents, } from "./inline-agent-utils.js";
12
+ export { type AgentInputVariable, type AgentOutputVariable, agentJsonReader, agentOutputVariablesFromSchema, hydrateInlineAgentInputVariables, INLINE_AGENT_STRUCTURAL_INPUT_KEYS, isBareProjectIdSource, isInlineAgentNodeType, type ReadAgentJson, readInlineAgentSource, reconcileInlineAgentInputVariables, setPublishIntentOnInlineAgents, } from "./inline-agent-utils.js";
12
13
  export { describeUnboundInlineEntity, type EntityConfig, entityScopeKey, findInlineEntity, findUnboundInlineEntityNodes, INLINE_ENTITY_UNBOUND, type InlineEntity, type InlineEntityCheck, inlineEntityBindingIssues, isEntityNodeType, type ReadInlineEntities, registeredInlineEntityReader, registerInlineEntityReader, type ScannedWorkflow, type UnboundInlineEntityNode, } from "./inline-entity-bindings.js";
13
14
  export { applyRuntimeProfile, isMaestroAutomateSentinel, RuntimeProfile, resolveRuntimeProfile, resolveRuntimeProfileForFlowFile, withRuntimeProfile, } from "./maestro-automate.js";
14
15
  export { operateRuntimeOptions } from "./operate-runtime-options.js";
package/dist/index.js CHANGED
@@ -516,7 +516,7 @@ import {
516
516
  ensureProjectId,
517
517
  NugetConstants,
518
518
  NugetPackager,
519
- Path as Path4,
519
+ Path as Path5,
520
520
  ProjectTool,
521
521
  ProjectTypes,
522
522
  TemporaryStorageService,
@@ -527,7 +527,7 @@ import {
527
527
  // package.json
528
528
  var package_default = {
529
529
  name: "@uipath/packager-tool-flow",
530
- version: "1.205.0-preview.276",
530
+ version: "1.206.0-preview.279",
531
531
  description: "UiPath Flow tool implementation",
532
532
  type: "module",
533
533
  exports: {
@@ -569,10 +569,10 @@ var package_default = {
569
569
  license: "SEE LICENSE IN LICENSE.txt",
570
570
  peerDependencies: {
571
571
  "@uipath/filesystem": "workspace:*",
572
- "@uipath/flow-converter": "0.69.3",
573
- "@uipath/flow-core": "^0.129.1",
574
- "@uipath/flow-migrations": "^0.71.1",
575
- "@uipath/flow-schema": "0.68.0",
572
+ "@uipath/flow-converter": "0.100.3",
573
+ "@uipath/flow-core": "^0.160.0",
574
+ "@uipath/flow-migrations": "^0.92.0",
575
+ "@uipath/flow-schema": "0.124.0",
576
576
  "@uipath/solutionpackager-tool-core": "workspace:*",
577
577
  "@uipath/tool-agent": "^2.0.0",
578
578
  i18next: "^23.16.8"
@@ -580,8 +580,8 @@ var package_default = {
580
580
  devDependencies: {
581
581
  "@types/node": "^25.5.2",
582
582
  "@uipath/filesystem": "workspace:*",
583
- "@uipath/flow-converter": "0.69.3",
584
- "@uipath/flow-core": "^0.129.1",
583
+ "@uipath/flow-converter": "0.100.3",
584
+ "@uipath/flow-core": "^0.160.0",
585
585
  "@uipath/solutionpackager-tool-core": "workspace:*",
586
586
  "@uipath/tool-agent": "^2.0.0",
587
587
  "@vitest/browser": "^4.1.12",
@@ -632,7 +632,12 @@ import {
632
632
  import i18next from "i18next";
633
633
 
634
634
  // src/inline-agent-utils.ts
635
- import { isAgentNodeType, isVoiceAgentNodeType } from "@uipath/flow-schema";
635
+ import {
636
+ convertJobAttachmentRefsToFileTypes,
637
+ isAgentNodeType,
638
+ isJobAttachmentRef,
639
+ isVoiceAgentNodeType
640
+ } from "@uipath/flow-schema";
636
641
 
637
642
  // src/agent-input-encoding-utils.ts
638
643
  var SCHEMA_CONTAINER_MARKER = "x-uipath-container";
@@ -697,6 +702,9 @@ function readInlineAgentSource(node) {
697
702
  }
698
703
  return;
699
704
  }
705
+ function isBareProjectIdSource(source) {
706
+ return !/[/\\.]/.test(source);
707
+ }
700
708
  function agentJsonReader(fs, flowDir) {
701
709
  return async (sourceId) => {
702
710
  try {
@@ -713,6 +721,50 @@ function agentJsonReader(fs, flowDir) {
713
721
  function isInlineAgentNodeType(type) {
714
722
  return isAgentNodeType(type);
715
723
  }
724
+ var INLINE_AGENT_STRUCTURAL_INPUT_KEYS = new Set([
725
+ "source",
726
+ "agentInputVariables",
727
+ "agentOutputVariables",
728
+ "conversationalAgentSettings"
729
+ ]);
730
+ function agentOutputVariablesFromSchema(outputSchema, isConversational = false) {
731
+ const properties = outputSchema?.properties;
732
+ const entries = typeof properties === "object" && properties !== null && !Array.isArray(properties) ? Object.entries(properties) : [];
733
+ if (entries.length === 0) {
734
+ return isConversational ? [] : [{ id: "content", type: "string" }];
735
+ }
736
+ const required = outputSchema.required;
737
+ const requiredSet = new Set(Array.isArray(required) ? required.filter((id) => typeof id === "string") : []);
738
+ return entries.map(([id, rawProperty]) => {
739
+ const property = typeof rawProperty === "object" && rawProperty !== null && !Array.isArray(rawProperty) ? rawProperty : {};
740
+ const variable = {
741
+ id,
742
+ type: isJobAttachmentRef(property) ? "file" : typeof property.type === "string" && property.type ? property.type : "string"
743
+ };
744
+ if (typeof property.description === "string" && property.description) {
745
+ variable.description = property.description;
746
+ }
747
+ if (typeof property["x-uipath-source"] === "string" && property["x-uipath-source"]) {
748
+ variable.binding = property["x-uipath-source"];
749
+ }
750
+ if (requiredSet.has(id))
751
+ variable.required = true;
752
+ if (variable.type === "object" || variable.type === "array") {
753
+ const {
754
+ type: _type,
755
+ description: _description,
756
+ "x-uipath-container": _container,
757
+ "x-uipath-source": _source,
758
+ ...rest
759
+ } = property;
760
+ variable.schema = convertJobAttachmentRefsToFileTypes({
761
+ type: variable.type,
762
+ ...rest
763
+ });
764
+ }
765
+ return variable;
766
+ });
767
+ }
716
768
  function reconcileInlineAgentInputVariables(existing, inputSchema) {
717
769
  const leaves = collectAgentInputLeaves(inputSchema);
718
770
  if (leaves.length === 0) {
@@ -741,7 +793,7 @@ async function hydrateInlineAgentInputVariables(nodes, resolveInputSchema, onRec
741
793
  if (!source)
742
794
  continue;
743
795
  const reportable = !isVoiceAgentNodeType(node.type);
744
- if (/[/\\.]/.test(source)) {
796
+ if (!isBareProjectIdSource(source)) {
745
797
  if (reportable)
746
798
  onUnresolved?.(source, "invalid-source");
747
799
  continue;
@@ -904,7 +956,7 @@ async function hydrateInlineAgents(nodes, readAgentJson) {
904
956
  continue;
905
957
  }
906
958
  const source = readInlineAgentSource(node);
907
- if (source === undefined || /[/\\.]/.test(source))
959
+ if (source === undefined || !isBareProjectIdSource(source))
908
960
  continue;
909
961
  const agent = await readAgentJson(source);
910
962
  if (agent)
@@ -1101,15 +1153,32 @@ function nodeIdFromIssuePath(path) {
1101
1153
  }
1102
1154
 
1103
1155
  // src/maestro-automate.ts
1156
+ import { Path as Path4 } from "@uipath/solutionpackager-tool-core";
1157
+
1158
+ // src/flow-project-root.ts
1104
1159
  import { Path as Path3 } from "@uipath/solutionpackager-tool-core";
1160
+ async function findFlowProjectRoot(fs, flowFilePath) {
1161
+ const flowDir = Path3.dirname(fs.path.resolve(flowFilePath));
1162
+ let dir = flowDir;
1163
+ for (;; ) {
1164
+ if (await fs.exists(Path3.join(dir, "project.uiproj")))
1165
+ return dir;
1166
+ const parent = Path3.dirname(dir);
1167
+ if (parent === "." || parent === dir)
1168
+ return flowDir;
1169
+ dir = parent;
1170
+ }
1171
+ }
1172
+
1173
+ // src/maestro-automate.ts
1105
1174
  var SENTINEL_FILE_NAME = ".maestro_automate";
1106
1175
  var RuntimeProfile;
1107
- ((RuntimeProfile2) => {
1108
- RuntimeProfile2["Lite"] = "Lite";
1109
- RuntimeProfile2["Standard"] = "Standard";
1176
+ ((RuntimeProfile) => {
1177
+ RuntimeProfile["Lite"] = "Lite";
1178
+ RuntimeProfile["Standard"] = "Standard";
1110
1179
  })(RuntimeProfile ||= {});
1111
1180
  async function applyRuntimeProfile(fs, projectDir, profile) {
1112
- const sentinel = Path3.join(projectDir, SENTINEL_FILE_NAME);
1181
+ const sentinel = Path4.join(projectDir, SENTINEL_FILE_NAME);
1113
1182
  if (profile === "Lite" /* Lite */) {
1114
1183
  await fs.writeFile(sentinel, "");
1115
1184
  return;
@@ -1119,26 +1188,14 @@ async function applyRuntimeProfile(fs, projectDir, profile) {
1119
1188
  }
1120
1189
  }
1121
1190
  async function resolveRuntimeProfile(fs, projectDir) {
1122
- const sentinel = Path3.join(projectDir, SENTINEL_FILE_NAME);
1191
+ const sentinel = Path4.join(projectDir, SENTINEL_FILE_NAME);
1123
1192
  return await fs.exists(sentinel) ? "Lite" /* Lite */ : "Standard" /* Standard */;
1124
1193
  }
1125
1194
  function isMaestroAutomateSentinel(fileName) {
1126
1195
  return fileName === SENTINEL_FILE_NAME;
1127
1196
  }
1128
- var PROJECT_FILE_NAME = "project.uiproj";
1129
1197
  async function resolveRuntimeProfileForFlowFile(fs, flowFilePath) {
1130
- const flowDir = Path3.dirname(flowFilePath);
1131
- let dir = flowDir;
1132
- for (;; ) {
1133
- if (await fs.exists(Path3.join(dir, PROJECT_FILE_NAME))) {
1134
- return resolveRuntimeProfile(fs, dir);
1135
- }
1136
- const parent = Path3.dirname(dir);
1137
- if (parent === dir)
1138
- break;
1139
- dir = parent;
1140
- }
1141
- return resolveRuntimeProfile(fs, flowDir);
1198
+ return resolveRuntimeProfile(fs, await findFlowProjectRoot(fs, flowFilePath));
1142
1199
  }
1143
1200
  function withRuntimeProfile(operateJson, profile) {
1144
1201
  return {
@@ -1290,9 +1347,9 @@ class FlowTool extends ProjectTool {
1290
1347
  return result;
1291
1348
  }
1292
1349
  toProjectRelative(projectPath, filePath) {
1293
- const root = `${Path4.normalize(projectPath).replace(/\/$/, "")}/`;
1294
- const file = Path4.normalize(filePath);
1295
- return file.toLowerCase().startsWith(root.toLowerCase()) ? file.slice(root.length) : Path4.basename(file);
1350
+ const root = `${Path5.normalize(projectPath).replace(/\/$/, "")}/`;
1351
+ const file = Path5.normalize(filePath);
1352
+ return file.toLowerCase().startsWith(root.toLowerCase()) ? file.slice(root.length) : Path5.basename(file);
1296
1353
  }
1297
1354
  async buildAsync(options, _cancellationToken) {
1298
1355
  if (!options.skipValidate) {
@@ -1302,13 +1359,13 @@ class FlowTool extends ProjectTool {
1302
1359
  }
1303
1360
  }
1304
1361
  const tempFolder = await this._temporaryStorage.getTempFolderPath();
1305
- const localBuildFolder = Path4.join(tempFolder, NugetConstants.OutputFolderName);
1306
- const contentFolder = Path4.join(localBuildFolder, NugetConstants.ContentFolderName);
1362
+ const localBuildFolder = Path5.join(tempFolder, NugetConstants.OutputFolderName);
1363
+ const contentFolder = Path5.join(localBuildFolder, NugetConstants.ContentFolderName);
1307
1364
  try {
1308
1365
  const sharesSolutionDirectory = this.solutionRoot !== undefined && this.fileSystem.path.resolve(options.projectPath) === this.fileSystem.path.resolve(this.solutionRoot);
1309
1366
  const sourceFlow = await tryResolveProjectFlowFile(this.fileSystem, options.projectPath);
1310
1367
  const canonicalSource = sourceFlow ? await resolveProjectOwnedFlowPath(this.fileSystem, options.projectPath, sourceFlow) : undefined;
1311
- const flowPath = sourceFlow ? Path4.join(contentFolder, this.fileSystem.path.relative(options.projectPath, sourceFlow).replace(/^content[\\/]/, "")) : undefined;
1368
+ const flowPath = sourceFlow ? Path5.join(contentFolder, this.fileSystem.path.relative(options.projectPath, sourceFlow).replace(/^content[\\/]/, "")) : undefined;
1312
1369
  this.logger.progress("Copying files...");
1313
1370
  await this.copyProjectFiles(options.projectPath, contentFolder, sharesSolutionDirectory);
1314
1371
  if (canonicalSource && flowPath) {
@@ -1347,7 +1404,7 @@ class FlowTool extends ProjectTool {
1347
1404
  try {
1348
1405
  this.logger.progress("Creating NuGet package...");
1349
1406
  const nupkgFileName = `${options.package.id}.${options.package.version}.nupkg`;
1350
- const nupkgPath = Path4.join(options.outputPath, nupkgFileName);
1407
+ const nupkgPath = Path5.join(options.outputPath, nupkgFileName);
1351
1408
  const packager = new NugetPackager(this.fileSystem);
1352
1409
  const result = await packager.packAsync(localBuildFolder, options.package, nupkgPath);
1353
1410
  this.logger.progress("Package created successfully");
@@ -1412,7 +1469,7 @@ class FlowTool extends ProjectTool {
1412
1469
  }
1413
1470
  await this.hydrateInlineAgentInputs(workflow, builtAgents, contentFolder);
1414
1471
  const bpmnFileName = flowFile.replace(/\.flow$/, ".bpmn");
1415
- const bpmnPath = Path4.join(contentFolder, bpmnFileName);
1472
+ const bpmnPath = Path5.join(contentFolder, bpmnFileName);
1416
1473
  const fileFormat = inMemoryWorkflowToFileFormat(workflow);
1417
1474
  setPublishIntentOnInlineAgents(fileFormat);
1418
1475
  const resolvedFlowJson = JSON.stringify(fileFormat);
@@ -1429,11 +1486,11 @@ class FlowTool extends ProjectTool {
1429
1486
  const packagingNodes = toPackagingNodes(workflow);
1430
1487
  const variables = workflow.variables ?? {};
1431
1488
  const definitions = workflow.definitions ?? [];
1432
- const entryPointsPath = Path4.join(contentFolder, FlowConstants.EntryPointsFileName);
1489
+ const entryPointsPath = Path5.join(contentFolder, FlowConstants.EntryPointsFileName);
1433
1490
  const entryPoints = getEntryPoints(bpmnFileName, packagingNodes, variables, definitions, ProjectType.Flow);
1434
1491
  const agentEntryPoints = [];
1435
1492
  const seenSources = new Set;
1436
- for (const node of workflow.nodes ?? []) {
1493
+ for (const node of allNodesOf(workflow)) {
1437
1494
  const n = node;
1438
1495
  if (!isInlineAgentNodeType(n.type))
1439
1496
  continue;
@@ -1470,11 +1527,11 @@ class FlowTool extends ProjectTool {
1470
1527
  const allEntryPoints = [...entryPoints, ...agentEntryPoints];
1471
1528
  await this.fileSystem.writeFile(entryPointsPath, `${JSON.stringify(generateEntryPointsJson(allEntryPoints), null, 2)}
1472
1529
  `);
1473
- const bindingsPath = Path4.join(contentFolder, FlowConstants.BindingsV2FileName);
1530
+ const bindingsPath = Path5.join(contentFolder, FlowConstants.BindingsV2FileName);
1474
1531
  const bindingResources = flowBindingResources(workflow, this.logger);
1475
1532
  await this.fileSystem.writeFile(bindingsPath, `${JSON.stringify(generateBindingsJson(bindingResources), null, 2)}
1476
1533
  `);
1477
- const operatePath = Path4.join(contentFolder, NugetConstants.OperateFileName);
1534
+ const operatePath = Path5.join(contentFolder, NugetConstants.OperateFileName);
1478
1535
  const startEventMatch = bpmn.match(/<bpmn:startEvent\s+id="([^"]+)"/);
1479
1536
  const startEventId = defaultEntryPointNodeId(workflow.nodes ?? []) ?? startEventMatch?.[1] ?? "start";
1480
1537
  const mainEntryPoint = `/${bpmnFileName}#${startEventId}`;
@@ -1496,14 +1553,17 @@ class FlowTool extends ProjectTool {
1496
1553
  return voiceAgents;
1497
1554
  }
1498
1555
  async hydrateInlineAgentInputs(workflow, builtAgents, contentFolder) {
1499
- const nodes = workflow.nodes ?? [];
1556
+ const nodes = allNodesOf(workflow);
1500
1557
  await hydrateInlineAgentInputVariables(nodes, async (source) => {
1501
1558
  const agent = builtAgents.get(source) ?? await this.readCopiedAgentJson(contentFolder, source);
1502
1559
  return agent?.inputSchema;
1503
1560
  }, (source, added) => this.logger.info(`Reconciled ${added} inline-agent input(s) for "${source}" from agent.json inputSchema`), (source, reason) => this.logger.warn(reason === "invalid-source" ? `Inline agent "${source}" is not a bare project-id folder, so its inputs were not reconciled and packaging skips it — the agent would ship with no bound inputs.` : `Could not read an inputSchema for inline agent "${source}", so its inputs were not reconciled — the agent would ship with no bound inputs. Check that ${source}/agent.json exists and parses.`));
1504
1561
  }
1505
1562
  async readCopiedAgentJson(contentFolder, source) {
1506
- const agentJsonPath = Path4.join(contentFolder, source, "agent.json");
1563
+ if (!isBareProjectIdSource(source)) {
1564
+ return;
1565
+ }
1566
+ const agentJsonPath = Path5.join(contentFolder, source, "agent.json");
1507
1567
  if (!await this.fileSystem.exists(agentJsonPath)) {
1508
1568
  return;
1509
1569
  }
@@ -1522,7 +1582,7 @@ class FlowTool extends ProjectTool {
1522
1582
  await this.fileSystem.mkdir(contentFolder);
1523
1583
  const entries = await this.fileSystem.readdir(projectPath);
1524
1584
  for (const entry of entries) {
1525
- const sourceEntry = Path4.join(projectPath, entry);
1585
+ const sourceEntry = Path5.join(projectPath, entry);
1526
1586
  const stat = await this.fileSystem.stat(sourceEntry);
1527
1587
  if (stat?.isDirectory()) {
1528
1588
  if (entry === NugetConstants.ContentFolderName) {
@@ -1534,7 +1594,7 @@ class FlowTool extends ProjectTool {
1534
1594
  }
1535
1595
  const content = await this.fileSystem.readFile(sourceEntry);
1536
1596
  if (content) {
1537
- await this.fileSystem.writeFile(Path4.join(contentFolder, entry), content);
1597
+ await this.fileSystem.writeFile(Path5.join(contentFolder, entry), content);
1538
1598
  }
1539
1599
  }
1540
1600
  }
@@ -1543,8 +1603,8 @@ class FlowTool extends ProjectTool {
1543
1603
  await this.fileSystem.mkdir(destinationPath);
1544
1604
  const entries = await this.fileSystem.readdir(sourcePath);
1545
1605
  for (const entry of entries) {
1546
- const sourceEntry = Path4.join(sourcePath, entry);
1547
- const destinationEntry = Path4.join(destinationPath, entry);
1606
+ const sourceEntry = Path5.join(sourcePath, entry);
1607
+ const destinationEntry = Path5.join(destinationPath, entry);
1548
1608
  const stat = await this.fileSystem.stat(sourceEntry);
1549
1609
  if (stat?.isDirectory()) {
1550
1610
  await this.copyDirectoryContents(sourceEntry, destinationEntry);
@@ -1562,7 +1622,7 @@ class FlowTool extends ProjectTool {
1562
1622
  projectId,
1563
1623
  contentType: ProjectTypes.Flow
1564
1624
  });
1565
- const operatePath = Path4.join(contentFolder, NugetConstants.OperateFileName);
1625
+ const operatePath = Path5.join(contentFolder, NugetConstants.OperateFileName);
1566
1626
  const raw = await this.fileSystem.readFile(operatePath);
1567
1627
  if (!raw)
1568
1628
  return;
@@ -1582,17 +1642,17 @@ class FlowTool extends ProjectTool {
1582
1642
  }
1583
1643
  async createPackageDescriptor(localBuildFolder, contentFolder) {
1584
1644
  const descriptorFiles = {};
1585
- descriptorFiles[NugetConstants.OperateFileName] = Path4.join(NugetConstants.ContentFolderName, NugetConstants.OperateFileName);
1586
- descriptorFiles[FlowConstants.EntryPointsFileName] = Path4.join(NugetConstants.ContentFolderName, FlowConstants.EntryPointsFileName);
1587
- descriptorFiles[NugetConstants.BindingsFileId] = Path4.join(NugetConstants.ContentFolderName, FlowConstants.BindingsV2FileName);
1588
- const contentEntries = await Path4.walkDirectory(this.fileSystem, contentFolder);
1645
+ descriptorFiles[NugetConstants.OperateFileName] = Path5.join(NugetConstants.ContentFolderName, NugetConstants.OperateFileName);
1646
+ descriptorFiles[FlowConstants.EntryPointsFileName] = Path5.join(NugetConstants.ContentFolderName, FlowConstants.EntryPointsFileName);
1647
+ descriptorFiles[NugetConstants.BindingsFileId] = Path5.join(NugetConstants.ContentFolderName, FlowConstants.BindingsV2FileName);
1648
+ const contentEntries = await Path5.walkDirectory(this.fileSystem, contentFolder);
1589
1649
  for (const entry of contentEntries) {
1590
- const ext = Path4.extname(entry.relativePath);
1650
+ const ext = Path5.extname(entry.relativePath);
1591
1651
  if (ext === ".bpmn" || ext === ".flow") {
1592
- descriptorFiles[entry.relativePath] = Path4.join(NugetConstants.ContentFolderName, entry.relativePath);
1652
+ descriptorFiles[entry.relativePath] = Path5.join(NugetConstants.ContentFolderName, entry.relativePath);
1593
1653
  }
1594
1654
  }
1595
- const packageDescriptorPath = Path4.join(localBuildFolder, NugetConstants.ContentFolderName, NugetConstants.PackageDescriptorFileName);
1655
+ const packageDescriptorPath = Path5.join(localBuildFolder, NugetConstants.ContentFolderName, NugetConstants.PackageDescriptorFileName);
1596
1656
  const packageDescriptorJson = JSON.stringify({
1597
1657
  $schema: "https://cloud.uipath.com/draft/2024-12/package-descriptor",
1598
1658
  files: descriptorFiles
@@ -1731,10 +1791,12 @@ toolsFactoryRepository.registerProjectToolFactory(new FlowToolFactory);
1731
1791
  export {
1732
1792
  FlowTool,
1733
1793
  FlowToolFactory,
1794
+ INLINE_AGENT_STRUCTURAL_INPUT_KEYS,
1734
1795
  INLINE_ENTITY_UNBOUND,
1735
1796
  RuntimeProfile,
1736
1797
  SCHEMA_CONTAINER_MARKER,
1737
1798
  agentJsonReader,
1799
+ agentOutputVariablesFromSchema,
1738
1800
  allNodesOf,
1739
1801
  applyRuntimeProfile,
1740
1802
  assertVoiceAgentDefinitionsEmbedded,
@@ -1750,6 +1812,7 @@ export {
1750
1812
  entityScopeKey,
1751
1813
  entryPointTriggers,
1752
1814
  extractProcessGuid,
1815
+ findFlowProjectRoot,
1753
1816
  findInlineEntity,
1754
1817
  findProjectFlowFile,
1755
1818
  findUnboundInlineEntityNodes,
@@ -1757,6 +1820,7 @@ export {
1757
1820
  hydrateInlineAgentInputVariables,
1758
1821
  inlineEntityBindingIssues,
1759
1822
  inlineFlowRefs,
1823
+ isBareProjectIdSource,
1760
1824
  isEntityNodeType,
1761
1825
  isInlineAgentNodeType,
1762
1826
  isMaestroAutomateSentinel,
@@ -1784,4 +1848,4 @@ export {
1784
1848
  withRuntimeProfile
1785
1849
  };
1786
1850
 
1787
- //# debugId=8D1B45E5FAC316A664756E2164756E21
1851
+ //# debugId=00087D5CC95AE5EC64756E2164756E21
@@ -9,6 +9,12 @@ export declare function readInlineAgentSource(node: {
9
9
  inputs?: Record<string, unknown>;
10
10
  model?: Record<string, unknown>;
11
11
  }): string | undefined;
12
+ /**
13
+ * True when an inline agent's `source` is a bare project-id folder name. The
14
+ * source comes from the `.flow`, so one holding `/`, `\` or `.` could point
15
+ * outside the package; every reader of `<source>/agent.json` skips it.
16
+ */
17
+ export declare function isBareProjectIdSource(source: string): boolean;
12
18
  /**
13
19
  * An inline agent's `agent.json`, looked up by the agent's source id.
14
20
  * `undefined` when there is none, or it cannot be read or parsed — the agent
@@ -19,6 +25,31 @@ export type ReadAgentJson = (sourceId: string) => Promise<Record<string, unknown
19
25
  export declare function agentJsonReader(fs: IFileSystem, flowDir: string): ReadAgentJson;
20
26
  /** True for a known inline-agent node type. */
21
27
  export declare function isInlineAgentNodeType(type: string | undefined): boolean;
28
+ /**
29
+ * Inline-agent node inputs that belong to the flow rather than the agent's
30
+ * `agent.json`. Studio Web writes an inline agent step with only these; the
31
+ * prompts, model and settings live in `agent.json`. Mirrors
32
+ * `STRUCTURAL_AGENT_INPUT_KEYS` in `@uipath/flow-schema`'s storage contract.
33
+ * Voice nodes also keep `callContext`. Keep this and agent-tool's shelling
34
+ * in sync until the storage contract is exported by our flow-schema version.
35
+ */
36
+ export declare const INLINE_AGENT_STRUCTURAL_INPUT_KEYS: ReadonlySet<string>;
37
+ /** One flow-node `agentOutputVariables[]` entry. */
38
+ export interface AgentOutputVariable {
39
+ id: string;
40
+ type: string;
41
+ binding?: string;
42
+ description?: string;
43
+ required?: boolean;
44
+ schema?: Record<string, unknown>;
45
+ }
46
+ /**
47
+ * The `agentOutputVariables` an inline agent step declares for an agent's
48
+ * `outputSchema`. Mirrors Flow Workbench's flat output conversion: each
49
+ * top-level property stays one variable, with its nested schema intact.
50
+ * Empty autonomous schemas use the default content output.
51
+ */
52
+ export declare function agentOutputVariablesFromSchema(outputSchema: unknown, isConversational?: boolean): AgentOutputVariable[];
22
53
  /** One flow-node `agentInputVariables[]` entry. */
23
54
  export interface AgentInputVariable {
24
55
  id?: string;
@@ -1,13 +1,30 @@
1
1
  // src/maestro-automate.ts
2
+ import { Path as Path2 } from "@uipath/solutionpackager-tool-core";
3
+
4
+ // src/flow-project-root.ts
2
5
  import { Path } from "@uipath/solutionpackager-tool-core";
6
+ async function findFlowProjectRoot(fs, flowFilePath) {
7
+ const flowDir = Path.dirname(fs.path.resolve(flowFilePath));
8
+ let dir = flowDir;
9
+ for (;; ) {
10
+ if (await fs.exists(Path.join(dir, "project.uiproj")))
11
+ return dir;
12
+ const parent = Path.dirname(dir);
13
+ if (parent === "." || parent === dir)
14
+ return flowDir;
15
+ dir = parent;
16
+ }
17
+ }
18
+
19
+ // src/maestro-automate.ts
3
20
  var SENTINEL_FILE_NAME = ".maestro_automate";
4
21
  var RuntimeProfile;
5
- ((RuntimeProfile2) => {
6
- RuntimeProfile2["Lite"] = "Lite";
7
- RuntimeProfile2["Standard"] = "Standard";
22
+ ((RuntimeProfile) => {
23
+ RuntimeProfile["Lite"] = "Lite";
24
+ RuntimeProfile["Standard"] = "Standard";
8
25
  })(RuntimeProfile ||= {});
9
26
  async function applyRuntimeProfile(fs, projectDir, profile) {
10
- const sentinel = Path.join(projectDir, SENTINEL_FILE_NAME);
27
+ const sentinel = Path2.join(projectDir, SENTINEL_FILE_NAME);
11
28
  if (profile === "Lite" /* Lite */) {
12
29
  await fs.writeFile(sentinel, "");
13
30
  return;
@@ -17,26 +34,14 @@ async function applyRuntimeProfile(fs, projectDir, profile) {
17
34
  }
18
35
  }
19
36
  async function resolveRuntimeProfile(fs, projectDir) {
20
- const sentinel = Path.join(projectDir, SENTINEL_FILE_NAME);
37
+ const sentinel = Path2.join(projectDir, SENTINEL_FILE_NAME);
21
38
  return await fs.exists(sentinel) ? "Lite" /* Lite */ : "Standard" /* Standard */;
22
39
  }
23
40
  function isMaestroAutomateSentinel(fileName) {
24
41
  return fileName === SENTINEL_FILE_NAME;
25
42
  }
26
- var PROJECT_FILE_NAME = "project.uiproj";
27
43
  async function resolveRuntimeProfileForFlowFile(fs, flowFilePath) {
28
- const flowDir = Path.dirname(flowFilePath);
29
- let dir = flowDir;
30
- for (;; ) {
31
- if (await fs.exists(Path.join(dir, PROJECT_FILE_NAME))) {
32
- return resolveRuntimeProfile(fs, dir);
33
- }
34
- const parent = Path.dirname(dir);
35
- if (parent === dir)
36
- break;
37
- dir = parent;
38
- }
39
- return resolveRuntimeProfile(fs, flowDir);
44
+ return resolveRuntimeProfile(fs, await findFlowProjectRoot(fs, flowFilePath));
40
45
  }
41
46
  function withRuntimeProfile(operateJson, profile) {
42
47
  return {
@@ -53,4 +58,4 @@ export {
53
58
  withRuntimeProfile
54
59
  };
55
60
 
56
- //# debugId=A6D16C6E2614839D64756E2164756E21
61
+ //# debugId=52AC04057510417364756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/packager-tool-flow",
3
- "version": "1.205.0-preview.276",
3
+ "version": "1.206.0-preview.279",
4
4
  "description": "UiPath Flow tool implementation",
5
5
  "type": "module",
6
6
  "exports": {
@@ -23,14 +23,14 @@
23
23
  "author": "UiPath",
24
24
  "license": "SEE LICENSE IN LICENSE.txt",
25
25
  "peerDependencies": {
26
- "@uipath/filesystem": "1.205.0",
27
- "@uipath/flow-converter": "0.69.3",
28
- "@uipath/flow-core": "^0.129.1",
29
- "@uipath/flow-migrations": "^0.71.1",
30
- "@uipath/flow-schema": "0.68.0",
31
- "@uipath/solutionpackager-tool-core": "1.205.0",
26
+ "@uipath/filesystem": "1.206.0",
27
+ "@uipath/flow-converter": "0.100.3",
28
+ "@uipath/flow-core": "^0.160.0",
29
+ "@uipath/flow-migrations": "^0.92.0",
30
+ "@uipath/flow-schema": "0.124.0",
31
+ "@uipath/solutionpackager-tool-core": "1.206.0",
32
32
  "@uipath/tool-agent": "^2.0.0",
33
33
  "i18next": "^23.16.8"
34
34
  },
35
- "gitHead": "9c262c3cc03e56190185733888dca266bbb01ba6"
35
+ "gitHead": "d2176feff38d4e91a9d84723af847b2dfd5c6008"
36
36
  }