@uipath/agent-tool 1.206.0-preview.303 → 1.207.0-preview.305

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.
Files changed (43) hide show
  1. package/dist/THIRD-PARTY-NOTICES.md +2 -2
  2. package/dist/{agent-tool-OK5DK57D-bjevqt47.js → agent-tool-OK5DK57D-swanc7b5.js} +2 -2
  3. package/dist/{browser-strategy-gnftxwsf.js → browser-strategy-1nk8hgcf.js} +1 -1
  4. package/dist/{de-AI7ML6JM-km47f8k4.js → de-B6IFKV43-9sk50xx0.js} +164 -2
  5. package/dist/{en-LAVDF7IQ-xe939kq1.js → en-5JIPZTS5-q1x823gc.js} +4 -2
  6. package/dist/{es-SPNKTD5Y-vw5cbgv5.js → es-AQW6PFIU-q2mz247f.js} +164 -2
  7. package/dist/{es-MX-7KJZPEQN-1fq0a9jr.js → es-MX-KWITVBWE-w49gknha.js} +164 -2
  8. package/dist/executor-tool.js +42 -9
  9. package/dist/{fr-AXJGUT53-hdg3pmd4.js → fr-RNWK2TMC-dpyzj366.js} +164 -2
  10. package/dist/index-9vtvwe74.js +26 -0
  11. package/dist/{index-89cxyepj.js → index-je168ncz.js} +7 -5
  12. package/dist/{index-r7ff4pb0.js → index-knn2nm9e.js} +104 -60
  13. package/dist/{index-18dnd3nk.js → index-v88kds1m.js} +5 -5
  14. package/dist/{index-kvhrzcvf.js → index-yv2728h1.js} +3 -3
  15. package/dist/index.js +9 -9
  16. package/dist/{ja-C7GZV6YP-hvtbngr5.js → ja-DH4I3GEF-ywyhhppa.js} +164 -2
  17. package/dist/{ko-Q24HSSL4-5vn55pte.js → ko-R5BCWVO7-whzgmh6q.js} +164 -2
  18. package/dist/{memory-runtime-service-tt5y1af6.js → memory-runtime-service-zk17fk27.js} +57 -11
  19. package/dist/{node-strategy-fk02jqd8.js → node-strategy-ems5bj71.js} +2 -2
  20. package/dist/{packager-tool-9xrkfzn1.js → packager-tool-4px3x90r.js} +51 -9
  21. package/dist/{packager-tool-j4an6b3v.js → packager-tool-85qp13np.js} +786 -294
  22. package/dist/{packager-tool-0ajs8pnk.js → packager-tool-9thx6ae9.js} +30 -8
  23. package/dist/{packager-tool-1qg04b7q.js → packager-tool-bzcphfa8.js} +4 -2
  24. package/dist/{packager-tool-2dd1qswc.js → packager-tool-fjgtaen6.js} +144 -12
  25. package/dist/{packager-tool-4shqngrj.js → packager-tool-gpm2hwy5.js} +316 -261
  26. package/dist/{packager-tool-kawtadzm.js → packager-tool-hgmpt45k.js} +34 -34
  27. package/dist/{packager-tool-fc08rcbk.js → packager-tool-k7h03v9f.js} +5 -3
  28. package/dist/{packager-tool-9nh85680.js → packager-tool-m0wy5pqh.js} +4 -2
  29. package/dist/{packager-tool-3t6d1zdz.js → packager-tool-m63j60x7.js} +120 -13
  30. package/dist/{packager-tool-dy6gcgks.js → packager-tool-wqg51y3z.js} +328 -133
  31. package/dist/{packager-tool-ehaw8hwg.js → packager-tool-xmv0ajm4.js} +56 -15
  32. package/dist/{packager-tool-kphvt8vb.js → packager-tool-yz4vywz9.js} +52 -15
  33. package/dist/packager-tool.js +6 -6
  34. package/dist/{pt-BR-BIUJXIPU-2sqzhr8y.js → pt-BR-6TBBEDQS-y3f2vg5d.js} +164 -2
  35. package/dist/{pt-MHX6JGAX-xfgvdqwg.js → pt-ZSQC5RZ3-8kp3g1z5.js} +164 -2
  36. package/dist/{ro-3RKJNGJZ-xqj14e3d.js → ro-P33AQ6ZL-s92z1mgg.js} +164 -2
  37. package/dist/solution-auth-1tdetckr.js +11 -0
  38. package/dist/tool.js +9 -9
  39. package/dist/{tr-PQLUUHPC-qsb7btxn.js → tr-XD73CQAA-tb2nrpyp.js} +164 -2
  40. package/dist/{zh-CN-OHNTHZRI-b0hjkfqn.js → zh-CN-GWP3B2EM-c07fm17a.js} +164 -2
  41. package/dist/{zh-TW-E4D3Y6ZR-tn3bmzz5.js → zh-TW-2DLUOA7C-9khqnr4r.js} +164 -2
  42. package/package.json +2 -2
  43. package/dist/solution-auth-4zs3axft.js +0 -11
@@ -1,11 +1,11 @@
1
1
  import {
2
- Path,
3
- TemporaryStorageService,
4
- NugetConstants,
5
- ToolResult,
6
- NugetPackager,
7
- ProjectTool
8
- } from "./packager-tool-4shqngrj.js";
2
+ Path2,
3
+ TemporaryStorageService2,
4
+ NugetConstants2,
5
+ ToolResult2,
6
+ NugetPackager2,
7
+ ProjectTool2
8
+ } from "./packager-tool-gpm2hwy5.js";
9
9
  import {
10
10
  string,
11
11
  uuid,
@@ -1834,7 +1834,7 @@ async function readJsonFile(fileSystem, path, parser) {
1834
1834
  return parser ? parser(parsed) : parsed;
1835
1835
  }
1836
1836
  async function writeJsonFile(fileSystem, path, data) {
1837
- const dir = Path.dirname(path);
1837
+ const dir = Path2.dirname(path);
1838
1838
  await fileSystem.mkdir(dir);
1839
1839
  const serialized = serializeJson(data);
1840
1840
  await fileSystem.writeFile(path, serialized);
@@ -1906,7 +1906,7 @@ async function buildFolderTree(fileSystem, folderPath, name) {
1906
1906
  const files = [];
1907
1907
  const folders = [];
1908
1908
  for (const entry of entries) {
1909
- const entryPath = Path.join(folderPath, entry);
1909
+ const entryPath = Path2.join(folderPath, entry);
1910
1910
  const stat = await fileSystem.stat(entryPath);
1911
1911
  if (stat?.isFile()) {
1912
1912
  const content = await fileSystem.readFile(entryPath);
@@ -1925,7 +1925,7 @@ async function buildProjectTree(fileSystem, projectPath, storageMajorVersion) {
1925
1925
  const rootFiles = [];
1926
1926
  const rootFolders = [];
1927
1927
  for (const fileName of MIGRATION_ROOT_FILES) {
1928
- const filePath = Path.join(projectPath, fileName);
1928
+ const filePath = Path2.join(projectPath, fileName);
1929
1929
  const content = await fileSystem.readFile(filePath);
1930
1930
  if (content) {
1931
1931
  rootFiles.push({ name: fileName, content: new TextDecoder().decode(content) });
@@ -1933,7 +1933,7 @@ async function buildProjectTree(fileSystem, projectPath, storageMajorVersion) {
1933
1933
  }
1934
1934
  const supportedRootFolders = getSupportedRootFolders(storageMajorVersion);
1935
1935
  for (const folderName of supportedRootFolders) {
1936
- const folderPath = Path.join(projectPath, folderName);
1936
+ const folderPath = Path2.join(projectPath, folderName);
1937
1937
  if (await fileSystem.exists(folderPath)) {
1938
1938
  rootFolders.push(await buildFolderTree(fileSystem, folderPath, folderName));
1939
1939
  } else if (isRootFolderRequired(folderName, storageMajorVersion)) {
@@ -2016,7 +2016,7 @@ var ProjectMigrator = class {
2016
2016
  return extractMigratedProjectData(tree);
2017
2017
  }
2018
2018
  async resolveVersion(projectPath) {
2019
- const agentPath = Path.join(projectPath, FileConstants.AgentFileName);
2019
+ const agentPath = Path2.join(projectPath, FileConstants.AgentFileName);
2020
2020
  const agentRaw = await readJsonFile(this.fileSystem, agentPath);
2021
2021
  const latestVersion = getLatestVersion(migrations);
2022
2022
  const versionState = resolveProjectVersionState(agentRaw, latestVersion);
@@ -2234,8 +2234,8 @@ function compilePolicy(policy) {
2234
2234
  }
2235
2235
  async function isVenvDirectory(fileSystem, dirPath) {
2236
2236
  const [posix, windows] = await Promise.all([
2237
- fileSystem.exists(Path.join(dirPath, "bin", "activate")),
2238
- fileSystem.exists(Path.join(dirPath, "Scripts", "activate"))
2237
+ fileSystem.exists(Path2.join(dirPath, "bin", "activate")),
2238
+ fileSystem.exists(Path2.join(dirPath, "Scripts", "activate"))
2239
2239
  ]);
2240
2240
  return posix || windows;
2241
2241
  }
@@ -2264,7 +2264,7 @@ async function copyDirectoryRecursively(fileSystem, sourceDir, targetDir, relDir
2264
2264
  await fileSystem.mkdir(targetDir);
2265
2265
  const entries = await fileSystem.readdir(sourceDir);
2266
2266
  for (const entry of entries) {
2267
- const sourcePath = Path.join(sourceDir, entry);
2267
+ const sourcePath = Path2.join(sourceDir, entry);
2268
2268
  const relPath = relDir ? `${relDir}/${entry}` : entry;
2269
2269
  const stat = await fileSystem.stat(sourcePath);
2270
2270
  if (stat?.isFile()) {
@@ -2273,18 +2273,18 @@ async function copyDirectoryRecursively(fileSystem, sourceDir, targetDir, relDir
2273
2273
  const targetFileName = policy.fileNameMappings[entry] ?? entry;
2274
2274
  const content = await fileSystem.readFile(sourcePath);
2275
2275
  if (content) {
2276
- await fileSystem.writeFile(Path.join(targetDir, targetFileName), content);
2276
+ await fileSystem.writeFile(Path2.join(targetDir, targetFileName), content);
2277
2277
  }
2278
2278
  } else if (stat?.isDirectory()) {
2279
2279
  if (await shouldSkipDirectory(fileSystem, entry, relPath, sourcePath, policy))
2280
2280
  continue;
2281
- await copyDirectoryRecursively(fileSystem, sourcePath, Path.join(targetDir, entry), relPath, policy);
2281
+ await copyDirectoryRecursively(fileSystem, sourcePath, Path2.join(targetDir, entry), relPath, policy);
2282
2282
  }
2283
2283
  }
2284
2284
  }
2285
2285
  async function copyCodeFiles(fileSystem, sourcePath, outputPath, policy = DEFAULT_CODE_COPY_POLICY) {
2286
2286
  const compiledPolicy = compilePolicy(policy);
2287
- await copyDirectoryRecursively(fileSystem, sourcePath, Path.join(outputPath, compiledPolicy.contentDirectory), "", compiledPolicy);
2287
+ await copyDirectoryRecursively(fileSystem, sourcePath, Path2.join(outputPath, compiledPolicy.contentDirectory), "", compiledPolicy);
2288
2288
  }
2289
2289
  function buildCopyPolicy(packOptions) {
2290
2290
  if (!packOptions)
@@ -2312,7 +2312,7 @@ var PackageBuilder = class {
2312
2312
  this.logger.progress("Reading agent data...");
2313
2313
  const agentData = await readAgentsProjectData(this.fileSystem, this.logger, projectPath);
2314
2314
  this.logger.progress("Generating package artifacts...");
2315
- const out = (file) => Path.join(outputPath, file);
2315
+ const out = (file) => Path2.join(outputPath, file);
2316
2316
  const agentUnifiedModel = buildAgentUnifiedModel(agentData.agent, agentData.resources, agentData.features, { projectStorageId: options.projectStorageId, projectName: options.projectName });
2317
2317
  await Promise.all([
2318
2318
  writeJsonFile(this.fileSystem, out(PackageDescriptorConstants.AgentFilePath), agentUnifiedModel),
@@ -2325,14 +2325,14 @@ var PackageBuilder = class {
2325
2325
  }
2326
2326
  async buildCodedPackage(projectPath, outputPath, projectStorageId) {
2327
2327
  this.logger.progress("Reading coded agent configuration...");
2328
- const entryPoints = await readJsonFile(this.fileSystem, Path.join(projectPath, PackageConstants.EntryPointsFileName), (raw) => entryPointsFileSchema.parse(raw));
2329
- const codedConfig = await readJsonFile(this.fileSystem, Path.join(projectPath, CodedProjectConstants.CodedAgentConfigFileName), (raw) => codedConfigSchema.parse(raw));
2328
+ const entryPoints = await readJsonFile(this.fileSystem, Path2.join(projectPath, PackageConstants.EntryPointsFileName), (raw) => entryPointsFileSchema.parse(raw));
2329
+ const codedConfig = await readJsonFile(this.fileSystem, Path2.join(projectPath, CodedProjectConstants.CodedAgentConfigFileName), (raw) => codedConfigSchema.parse(raw));
2330
2330
  const [firstEntryPoint] = entryPoints.entryPoints;
2331
2331
  if (!firstEntryPoint) {
2332
2332
  throw new Error("entry-points.json must contain at least one entry point");
2333
2333
  }
2334
2334
  this.logger.progress("Generating package artifacts...");
2335
- const out = (file) => Path.join(outputPath, file);
2335
+ const out = (file) => Path2.join(outputPath, file);
2336
2336
  const copyPolicy = buildCopyPolicy(codedConfig.packOptions);
2337
2337
  await Promise.all([
2338
2338
  copyCodeFiles(this.fileSystem, projectPath, outputPath, copyPolicy),
@@ -2342,7 +2342,7 @@ var PackageBuilder = class {
2342
2342
  }
2343
2343
  };
2344
2344
  async function detectProjectKind(fileSystem, projectPath) {
2345
- const pythonDependenciesPath = Path.join(projectPath, CodedProjectConstants.PythonDependenciesFileName);
2345
+ const pythonDependenciesPath = Path2.join(projectPath, CodedProjectConstants.PythonDependenciesFileName);
2346
2346
  return await fileSystem.exists(pythonDependenciesPath) ? "coded" : "agents";
2347
2347
  }
2348
2348
  var AgentToolError = class extends Error {
@@ -2389,23 +2389,23 @@ function mapToolErrorToResult(error) {
2389
2389
  if (error instanceof AgentToolError) {
2390
2390
  const causeMessage = formatCause(error.causeError);
2391
2391
  const message2 = causeMessage ? `${error.message}: ${causeMessage}` : error.message;
2392
- return ToolResult.error(error.code, message2);
2392
+ return ToolResult2.error(error.code, message2);
2393
2393
  }
2394
2394
  if (isAbortError(error)) {
2395
- return ToolResult.error("CANCELED" /* Canceled */, "Operation canceled");
2395
+ return ToolResult2.error("CANCELED" /* Canceled */, "Operation canceled");
2396
2396
  }
2397
2397
  const message = error instanceof Error ? error.message : String(error);
2398
- return ToolResult.error("INTERNAL_ERROR" /* InternalError */, message);
2398
+ return ToolResult2.error("INTERNAL_ERROR" /* InternalError */, message);
2399
2399
  }
2400
- var AgentTool2 = class extends ProjectTool {
2400
+ var AgentTool2 = class extends ProjectTool2 {
2401
2401
  constructor(fileSystem, logger) {
2402
2402
  super(fileSystem, logger);
2403
- this._temporaryStorage = new TemporaryStorageService(fileSystem);
2403
+ this._temporaryStorage = new TemporaryStorageService2(fileSystem);
2404
2404
  this._packageBuilder = new PackageBuilder(fileSystem, logger);
2405
2405
  }
2406
2406
  async buildAsync(options, _cancellationToken) {
2407
2407
  const tempFolder = await this._temporaryStorage.getTempFolderPath();
2408
- const localBuildFolder = Path.join(tempFolder, NugetConstants.OutputFolderName);
2408
+ const localBuildFolder = Path2.join(tempFolder, NugetConstants2.OutputFolderName);
2409
2409
  try {
2410
2410
  this.logger.info(`buildAsync started: projectPath=${options.projectPath}, outputPath=${localBuildFolder}`);
2411
2411
  this.logger.progress("Building agent package...");
@@ -2422,7 +2422,7 @@ var AgentTool2 = class extends ProjectTool {
2422
2422
  }
2423
2423
  this.logger.info(`buildAsync finished: outputPath=${localBuildFolder}`);
2424
2424
  this.logger.progress("Build completed successfully");
2425
- return new ToolResult("SUCCESS" /* Success */, "done", [localBuildFolder]);
2425
+ return new ToolResult2("SUCCESS" /* Success */, "done", [localBuildFolder]);
2426
2426
  } catch (error) {
2427
2427
  const errorMessage = error instanceof Error ? error.toString() : String(error);
2428
2428
  this.logger.error(`buildAsync failed: ${errorMessage}`);
@@ -2444,12 +2444,12 @@ var AgentTool2 = class extends ProjectTool {
2444
2444
  try {
2445
2445
  this.logger.progress("Creating NuGet package...");
2446
2446
  const nupkgFileName = `${options.package.id}.${options.package.version}.nupkg`;
2447
- const nupkgPath = Path.join(options.outputPath, nupkgFileName);
2448
- const packager = new NugetPackager(this.fileSystem);
2447
+ const nupkgPath = Path2.join(options.outputPath, nupkgFileName);
2448
+ const packager = new NugetPackager2(this.fileSystem);
2449
2449
  const result = await packager.packAsync(localBuildFolder, options.package, nupkgPath);
2450
2450
  this.logger.info(`packAsync finished: nupkgPath=${result.outputPath}`);
2451
2451
  this.logger.progress("Package created successfully");
2452
- return new ToolResult("SUCCESS" /* Success */, "done", [result.outputPath]);
2452
+ return new ToolResult2("SUCCESS" /* Success */, "done", [result.outputPath]);
2453
2453
  } catch (error) {
2454
2454
  const errorMessage = error instanceof Error ? error.toString() : String(error);
2455
2455
  this.logger.error(`packAsync failed: ${errorMessage}`);
@@ -2470,4 +2470,4 @@ var AgentTool2 = class extends ProjectTool {
2470
2470
 
2471
2471
  export { AgentTool2 };
2472
2472
 
2473
- //# debugId=B49F3BDB7C576C1464756E2164756E21
2473
+ //# debugId=F6A80D32B558560064756E2164756E21
@@ -1,4 +1,4 @@
1
- // ../../node_modules/@uipath/flow-schema/dist/chunk-QFZO24YK.js
1
+ // ../../node_modules/@uipath/flow-schema/dist/chunk-UYKVJHW7.js
2
2
  var agentDuplicateToolNames_duplicateName_message2 = 'Tool name "{{name}}" is used by multiple tools on this agent. Each tool must have a unique name.';
3
3
  var agentEmptyVar_unwrittenVariable_message2 = `Agent uses "$vars.{{root}}" but no node assigns a value to "{{root}}", so it will be empty at runtime. Bind it to a node output (e.g. a connector's "<node>.output") or give it a value source.`;
4
4
  var agentFileNotAnalyzed_unconsumedFileVar_message2 = 'Agent uses the file variable "$vars.{{path}}" in its prompt, but it has no tool that can read files, so the agent gets only the file reference and not its contents. Add a file-reading tool such as Analyze Files.';
@@ -36,6 +36,7 @@ var entityQuery_emptyFilterValueList_message2 = "Add at least one value to the f
36
36
  var entityQuery_incompleteSingleRecordRow_message2 = "Select a field and enter a value";
37
37
  var entityQuery_invalidRecordLimit_message2 = "Enter a whole number from {{min}} to {{max}} for Record limit";
38
38
  var entityQuery_invalidRecordSkip_message2 = "Enter a whole number of {{min}} or more for Records to skip";
39
+ var entityQuery_nonUniqueSingleRecordField_message2 = "{{field}} is no longer unique. Select a unique field.";
39
40
  var entityQuery_uncarryableExpression_message2 = "Store this expression in a variable, or write it without spaces, quotes, or backslashes";
40
41
  var entityQuery_uncarryableRelationPath_message2 = "{{path}} cannot be used as written. Remove any spaces, quotes or backslashes from the column name.";
41
42
  var entityQuery_unfilteredSingleRecord_message2 = "Add a condition, or read multiple records instead";
@@ -160,6 +161,7 @@ var en_default = {
160
161
  entityQuery_incompleteSingleRecordRow_message: entityQuery_incompleteSingleRecordRow_message2,
161
162
  entityQuery_invalidRecordLimit_message: entityQuery_invalidRecordLimit_message2,
162
163
  entityQuery_invalidRecordSkip_message: entityQuery_invalidRecordSkip_message2,
164
+ entityQuery_nonUniqueSingleRecordField_message: entityQuery_nonUniqueSingleRecordField_message2,
163
165
  entityQuery_uncarryableExpression_message: entityQuery_uncarryableExpression_message2,
164
166
  entityQuery_uncarryableRelationPath_message: entityQuery_uncarryableRelationPath_message2,
165
167
  entityQuery_unfilteredSingleRecord_message: entityQuery_unfilteredSingleRecord_message2,
@@ -248,6 +250,6 @@ var en_default = {
248
250
  triggerRequired_message: triggerRequired_message2
249
251
  };
250
252
 
251
- export { agentDuplicateToolNames_duplicateName_message2, agentEmptyVar_unwrittenVariable_message2, agentFileNotAnalyzed_unconsumedFileVar_message2, agentInputRefs_ambiguousUnderscoreAsset_message2, agentInputRefs_ambiguousUnderscoreRoot_message2, agentInputRefs_normalizedNameCollision_message2, agentInputRefs_reservedAssetsRoot_message2, agentInputRefs_reservedMetadataRoot_message2, agentInputRefs_reservedNamespace_message2, agentInputRefs_unresolvedRef_message2, agenticSwitchDuplicateChoices_duplicateName_message2, conditionExpression_decisionWrapped_message2, conditionExpression_incomplete_message2, conditionExpression_invalid_message2, conditionExpression_required_message2, conversationTrigger_displayPromptRequired_message2, conversationalRequired_contextRequired_message2, conversationalRequired_conversationIdRequired_message2, conversationalVoiceEndCall_callContextInvalid_message2, conversationalVoice_callContextInvalid_message2, conversationalVoice_callContextRequired_message2, dataTransform_customScriptMissing_message2, dataTransform_filterMissingField_message2, dataTransform_filterNoConditions_message2, dataTransform_groupByAggMissingField_message2, dataTransform_groupByAggMissingOutputName_message2, dataTransform_groupByMissingField_message2, dataTransform_mapMissingField_message2, dataTransform_mapNoMappings_message2, dataTransform_missingCollection_message2, dataTransform_noOperations_message2, doWhile_limitOutOfRange_message2, entityQuery_emptyFilterExpression_message2, entityQuery_emptyFilterValueList_message2, entityQuery_incompleteSingleRecordRow_message2, entityQuery_invalidRecordLimit_message2, entityQuery_invalidRecordSkip_message2, entityQuery_uncarryableExpression_message2, entityQuery_uncarryableRelationPath_message2, entityQuery_unfilteredSingleRecord_message2, entityQuery_unresolvedRelation_message2, entitySchema_fieldMissing_message2, entityWrite_readNodeFilterless_message2, entityWrite_readNodeMissing_message2, entityWrite_readNodeMultiRecord_message2, entityWrite_readNodeNonNative_message2, entityWrite_readNodeUnusableFilter_message2, entityWrite_requiredFieldBlanked_message2, entityWrite_requiredFieldMissing_message2, errorHandlerPlacement_connected_message2, errorHandlerPlacement_duplicate_message2, errorHandlerPlacement_nested_message2, errorHandlerPlacement_subflow_message2, escalation_appRequired_message2, escalation_memoryArgumentRequired_message2, escalation_nameRequired_message2, escalation_quickFormDuplicateFieldLabel_message2, escalation_recipientRequired_message2, governance_hitlRequired_message2, governance_maxIterationsExceeded_message2, governance_maxTokensExceeded_message2, governance_modelNotAvailable_message2, governance_noAllowedModel_message2, governance_temperatureExceeded_message2, hitlDocClassification_processedDocumentRequired_message2, hitlDocValidation_extractionOutputRequired_message2, hitlDocValidation_extractionResultRequired_message2, hitlDocValidation_taxonomyRequired_message2, hitlQuickForm_emptySchema_message2, hitlQuickForm_fieldLabelRequired_message2, ixpSchemaDraft_invalidWithDetail_message2, ixpSchemaDraft_invalid_message2, ixpSchemaLimits_exceeded_message2, jevClassifier_instructionsMissing_message2, jevClassifier_instructionsVariableMissing_message2, jevClassifier_instructionsVariableType_message2, jevClassifier_levelTextMissing_message2, jevClassifier_levelsCount_message2, jevClassifier_modelMissing_message2, jevClassifier_optionNameDuplicate_message2, jevClassifier_optionNameMissing_message2, jevClassifier_optionsCount_message2, jevClassifier_questionFieldVariableMissing_message2, jevClassifier_questionFieldVariableType_message2, jevClassifier_questionNameDuplicate_message2, jevClassifier_questionNameInvalid_message2, jevClassifier_questionNameMissing_message2, jevClassifier_questionsMissing_message2, jevClassifier_questionsVariableMissing_message2, jevClassifier_questionsVariableType_message2, jevClassifier_stateJsonArray_message2, jevClassifier_stateJsonObject_message2, jevClassifier_statePropertiesMissing_message2, jevClassifier_statePropertyNameDuplicate_message2, jevClassifier_statePropertyNameInvalid_message2, jevClassifier_statePropertyNameMissing_message2, jevClassifier_statePropertyValueInvalid_message2, jevClassifier_statePropertyValueMissing_message2, jevClassifier_statePropertyVariableMissing_message2, jevClassifier_statePropertyVariableType_message2, jevClassifier_stateTextMissing_message2, jevClassifier_stateVariableMissing_message2, jevClassifier_stateVariableType_message2, nodeId_invalidFormat_message2, nodeId_reservedWord_message2, nodeMaxInstances_exceeded_message2, outputMapping_missing_message2, patternPlaceholder_step_message2, retry_durationInvalid_message2, retry_exponentialBaseInvalid_message2, retry_maxCountInvalid_message2, schemaValidator_genericKeyword_message2, schemaValidator_invalidEnum_message2, schemaValidator_invalidField_message2, schemaValidator_invalidPattern_message2, schemaValidator_outOfRange_message2, schemaValidator_required_message2, schemaValidator_typeMismatch_message2, schemaValidator_validation_genericError2, scriptBody_mustache_message2, singleConversationTrigger_message2, timeLimit_durationInvalid_message2, triggerRequired_message2, en_default };
253
+ export { agentDuplicateToolNames_duplicateName_message2, agentEmptyVar_unwrittenVariable_message2, agentFileNotAnalyzed_unconsumedFileVar_message2, agentInputRefs_ambiguousUnderscoreAsset_message2, agentInputRefs_ambiguousUnderscoreRoot_message2, agentInputRefs_normalizedNameCollision_message2, agentInputRefs_reservedAssetsRoot_message2, agentInputRefs_reservedMetadataRoot_message2, agentInputRefs_reservedNamespace_message2, agentInputRefs_unresolvedRef_message2, agenticSwitchDuplicateChoices_duplicateName_message2, conditionExpression_decisionWrapped_message2, conditionExpression_incomplete_message2, conditionExpression_invalid_message2, conditionExpression_required_message2, conversationTrigger_displayPromptRequired_message2, conversationalRequired_contextRequired_message2, conversationalRequired_conversationIdRequired_message2, conversationalVoiceEndCall_callContextInvalid_message2, conversationalVoice_callContextInvalid_message2, conversationalVoice_callContextRequired_message2, dataTransform_customScriptMissing_message2, dataTransform_filterMissingField_message2, dataTransform_filterNoConditions_message2, dataTransform_groupByAggMissingField_message2, dataTransform_groupByAggMissingOutputName_message2, dataTransform_groupByMissingField_message2, dataTransform_mapMissingField_message2, dataTransform_mapNoMappings_message2, dataTransform_missingCollection_message2, dataTransform_noOperations_message2, doWhile_limitOutOfRange_message2, entityQuery_emptyFilterExpression_message2, entityQuery_emptyFilterValueList_message2, entityQuery_incompleteSingleRecordRow_message2, entityQuery_invalidRecordLimit_message2, entityQuery_invalidRecordSkip_message2, entityQuery_nonUniqueSingleRecordField_message2, entityQuery_uncarryableExpression_message2, entityQuery_uncarryableRelationPath_message2, entityQuery_unfilteredSingleRecord_message2, entityQuery_unresolvedRelation_message2, entitySchema_fieldMissing_message2, entityWrite_readNodeFilterless_message2, entityWrite_readNodeMissing_message2, entityWrite_readNodeMultiRecord_message2, entityWrite_readNodeNonNative_message2, entityWrite_readNodeUnusableFilter_message2, entityWrite_requiredFieldBlanked_message2, entityWrite_requiredFieldMissing_message2, errorHandlerPlacement_connected_message2, errorHandlerPlacement_duplicate_message2, errorHandlerPlacement_nested_message2, errorHandlerPlacement_subflow_message2, escalation_appRequired_message2, escalation_memoryArgumentRequired_message2, escalation_nameRequired_message2, escalation_quickFormDuplicateFieldLabel_message2, escalation_recipientRequired_message2, governance_hitlRequired_message2, governance_maxIterationsExceeded_message2, governance_maxTokensExceeded_message2, governance_modelNotAvailable_message2, governance_noAllowedModel_message2, governance_temperatureExceeded_message2, hitlDocClassification_processedDocumentRequired_message2, hitlDocValidation_extractionOutputRequired_message2, hitlDocValidation_extractionResultRequired_message2, hitlDocValidation_taxonomyRequired_message2, hitlQuickForm_emptySchema_message2, hitlQuickForm_fieldLabelRequired_message2, ixpSchemaDraft_invalidWithDetail_message2, ixpSchemaDraft_invalid_message2, ixpSchemaLimits_exceeded_message2, jevClassifier_instructionsMissing_message2, jevClassifier_instructionsVariableMissing_message2, jevClassifier_instructionsVariableType_message2, jevClassifier_levelTextMissing_message2, jevClassifier_levelsCount_message2, jevClassifier_modelMissing_message2, jevClassifier_optionNameDuplicate_message2, jevClassifier_optionNameMissing_message2, jevClassifier_optionsCount_message2, jevClassifier_questionFieldVariableMissing_message2, jevClassifier_questionFieldVariableType_message2, jevClassifier_questionNameDuplicate_message2, jevClassifier_questionNameInvalid_message2, jevClassifier_questionNameMissing_message2, jevClassifier_questionsMissing_message2, jevClassifier_questionsVariableMissing_message2, jevClassifier_questionsVariableType_message2, jevClassifier_stateJsonArray_message2, jevClassifier_stateJsonObject_message2, jevClassifier_statePropertiesMissing_message2, jevClassifier_statePropertyNameDuplicate_message2, jevClassifier_statePropertyNameInvalid_message2, jevClassifier_statePropertyNameMissing_message2, jevClassifier_statePropertyValueInvalid_message2, jevClassifier_statePropertyValueMissing_message2, jevClassifier_statePropertyVariableMissing_message2, jevClassifier_statePropertyVariableType_message2, jevClassifier_stateTextMissing_message2, jevClassifier_stateVariableMissing_message2, jevClassifier_stateVariableType_message2, nodeId_invalidFormat_message2, nodeId_reservedWord_message2, nodeMaxInstances_exceeded_message2, outputMapping_missing_message2, patternPlaceholder_step_message2, retry_durationInvalid_message2, retry_exponentialBaseInvalid_message2, retry_maxCountInvalid_message2, schemaValidator_genericKeyword_message2, schemaValidator_invalidEnum_message2, schemaValidator_invalidField_message2, schemaValidator_invalidPattern_message2, schemaValidator_outOfRange_message2, schemaValidator_required_message2, schemaValidator_typeMismatch_message2, schemaValidator_validation_genericError2, scriptBody_mustache_message2, singleConversationTrigger_message2, timeLimit_durationInvalid_message2, triggerRequired_message2, en_default };
252
254
 
253
- //# debugId=A5C90AA07D04C18B64756E2164756E21
255
+ //# debugId=FA4950C8B5EB271264756E2164756E21
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getAuthContext2
3
- } from "./packager-tool-9xrkfzn1.js";
3
+ } from "./packager-tool-4px3x90r.js";
4
4
 
5
5
  // ../solution-sdk/src/solution-auth.ts
6
6
  async function getSolutionAuthContext2(options) {
@@ -16,6 +16,8 @@ async function getSolutionAuthContext2(options) {
16
16
  return {
17
17
  accessToken: ctx.accessToken,
18
18
  basePath,
19
+ baseUrl: ctx.baseUrl,
20
+ organizationName: ctx.organizationName,
19
21
  organizationId,
20
22
  tenantName,
21
23
  identity: ctx.identity
@@ -24,4 +26,4 @@ async function getSolutionAuthContext2(options) {
24
26
 
25
27
  export { getSolutionAuthContext2 };
26
28
 
27
- //# debugId=59B6698CEFEA9F4764756E2164756E21
29
+ //# debugId=A1BC8AA35686C4D764756E2164756E21
@@ -3,9 +3,17 @@ import {
3
3
  logger,
4
4
  quoteForShell,
5
5
  unsupportedSolutionProjectType
6
- } from "./packager-tool-dy6gcgks.js";
6
+ } from "./packager-tool-wqg51y3z.js";
7
7
 
8
8
  // ../solution-sdk/src/solution-file.ts
9
+ class SolutionFileError extends Error {
10
+ errorCode;
11
+ constructor(message, errorCode) {
12
+ super(message);
13
+ this.name = "SolutionFileError";
14
+ this.errorCode = errorCode;
15
+ }
16
+ }
9
17
  var STUDIO_WEB_PROJECT_TYPE_OVERRIDES = {
10
18
  ProcessOrchestration: "processOrchestration"
11
19
  };
@@ -122,6 +130,29 @@ async function warnIfCandidateDirShadowed(fs, candidateDir, projectDir) {
122
130
  }
123
131
  logger.warn(`An existing directory "${candidateDir}" was left untouched. ` + `The project was created inside the auto-created solution at "${projectDir}". ` + "Run init from inside an existing solution, or pass --skip-solution-registration, if you meant to use the existing directory.");
124
132
  }
133
+ var DEFAULT_UIPX_INDENT = " ";
134
+ function escapeRegExp(text) {
135
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
136
+ }
137
+ function withSolutionId(content, parsed, newSolutionId) {
138
+ const previous = parsed.SolutionId;
139
+ if (typeof previous === "string") {
140
+ const pattern = new RegExp(`("SolutionId"\\s*:\\s*")${escapeRegExp(previous)}(")`, "g");
141
+ const matches = content.match(pattern) ?? [];
142
+ if (matches.length === 1) {
143
+ return content.replace(pattern, (_match, open, close) => `${open}${newSolutionId}${close}`);
144
+ }
145
+ }
146
+ const indent = content.match(/^([ \t]+)"/m)?.[1] ?? DEFAULT_UIPX_INDENT;
147
+ const text = JSON.stringify({ ...parsed, SolutionId: newSolutionId }, null, indent);
148
+ const eol = content.includes(`\r
149
+ `) ? `\r
150
+ ` : `
151
+ `;
152
+ const body = text.replace(/\n/g, eol);
153
+ return content.endsWith(`
154
+ `) ? `${body}${eol}` : body;
155
+ }
125
156
  async function updateUipxSolutionId2(fs, uipxPath, newSolutionId) {
126
157
  const [readError, content] = await catchError(fs.readFile(uipxPath, "utf-8"));
127
158
  if (readError || !content) {
@@ -133,13 +164,21 @@ async function updateUipxSolutionId2(fs, uipxPath, newSolutionId) {
133
164
  logger.error(`Could not parse .uipx file for update: ${parseError.message}`);
134
165
  return;
135
166
  }
136
- parsed.SolutionId = newSolutionId;
137
- const [writeError] = await catchError(fs.writeFile(uipxPath, JSON.stringify(parsed, null, 4)));
167
+ if (parsed.SolutionId === newSolutionId) {
168
+ return;
169
+ }
170
+ const [writeError] = await catchError(fs.writeFile(uipxPath, withSolutionId(content, parsed, newSolutionId)));
138
171
  if (writeError) {
139
172
  logger.error(`Could not update .uipx with new SolutionId: ${writeError.message}`);
140
- } else {
141
- logger.info(`Updated .uipx with Studio Web SolutionId: ${newSolutionId}`);
173
+ return;
142
174
  }
175
+ const from = typeof parsed.SolutionId === "string" ? parsed.SolutionId : undefined;
176
+ logger.warn(from ? `Rewrote SolutionId in ${uipxPath}: ${from} -> ${newSolutionId} (Studio Web's id for this solution).` : `Wrote SolutionId ${newSolutionId} into ${uipxPath} (Studio Web's id for this solution).`);
177
+ return {
178
+ Path: uipxPath,
179
+ ...from ? { From: from } : {},
180
+ To: newSolutionId
181
+ };
143
182
  }
144
183
  async function findSolutionFile2(fs, projectPath) {
145
184
  const parentDir = fs.path.resolve(projectPath, "..");
@@ -185,7 +224,7 @@ async function updateSolutionFile2(fs, projectPath, newSolutionId) {
185
224
  if (!uipxFile)
186
225
  return;
187
226
  const uipxPath = fs.path.join(parentDir, uipxFile);
188
- await updateUipxSolutionId2(fs, uipxPath, newSolutionId);
227
+ return updateUipxSolutionId2(fs, uipxPath, newSolutionId);
189
228
  }
190
229
  async function tryRegisterProjectInParentSolution2(fs, projectDir, options) {
191
230
  if (options?.skipRegistration) {
@@ -287,8 +326,7 @@ async function registerProjectInParentSolution(fs, projectDir) {
287
326
  Id: projectId
288
327
  });
289
328
  solution.content.Projects = solution.projects;
290
- const [writeError] = await catchError(fs.writeFile(solutionFile, `${JSON.stringify(solution.content, null, 2)}
291
- `));
329
+ const [writeError] = await catchError(writeSolutionManifest(fs, solutionFile, solution.content));
292
330
  if (writeError) {
293
331
  return {
294
332
  Status: "Failed",
@@ -307,6 +345,30 @@ async function registerProjectInParentSolution(fs, projectDir) {
307
345
  Instructions: buildRegistrationSuccessInstructions(solutionDir)
308
346
  };
309
347
  }
348
+ async function writeSolutionManifest(fs, solutionFile, content) {
349
+ const [, previous] = await catchError(fs.readFile(solutionFile, "utf-8"));
350
+ const before = typeof previous === "string" ? previous : "";
351
+ const bom = before.startsWith("\uFEFF");
352
+ const crlf = before.includes(`\r
353
+ `);
354
+ const indent = /\n([ \t]+)\S/.exec(before.replace(/\r\n/g, `
355
+ `))?.[1] ?? " ";
356
+ const finalNewline = before === "" || /\n$/.test(before);
357
+ let text = JSON.stringify(content, null, indent) + (finalNewline ? `
358
+ ` : "");
359
+ if (crlf)
360
+ text = text.replace(/\n/g, `\r
361
+ `);
362
+ if (bom)
363
+ text = `\uFEFF${text}`;
364
+ const temp = `${solutionFile}.${crypto.randomUUID()}.tmp`;
365
+ await fs.writeFile(temp, text);
366
+ const [renameError] = await catchError(fs.rename(temp, solutionFile));
367
+ if (renameError) {
368
+ await catchError(fs.rm(temp));
369
+ throw renameError;
370
+ }
371
+ }
310
372
  async function findNearestParentUipxFile(fs, projectDir) {
311
373
  let currentDir = fs.path.dirname(fs.path.resolve(projectDir));
312
374
  while (true) {
@@ -410,7 +472,7 @@ async function readSolutionManifest(fs, solutionFile) {
410
472
  null
411
473
  ];
412
474
  }
413
- const [parseError, parsed] = catchError(() => JSON.parse(rawContent));
475
+ const [parseError, parsed] = catchError(() => JSON.parse(rawContent.replace(/^\uFEFF/, "")));
414
476
  if (parseError) {
415
477
  return [
416
478
  new Error(`Invalid JSON in solution file: ${parseError.message}`),
@@ -496,16 +558,61 @@ async function findSolutionFileUpward2(fs, startDir) {
496
558
  return fs.path.join(dir, files[0]);
497
559
  }
498
560
  if (files.length > 1) {
499
- throw new Error(`Multiple .uipx files found in ${dir}. Please specify which solution file to use.`);
561
+ throw new SolutionFileError(`Multiple .uipx files found in ${dir}. Please specify which solution file to use.`, "invalid_argument");
500
562
  }
501
563
  const parent = fs.path.dirname(dir);
502
564
  if (parent === dir) {
503
- throw new Error(`No .uipx solution file found (searched from ${startDir} to filesystem root)`);
565
+ throw new SolutionFileError(`No .uipx solution file found (searched from ${startDir} to filesystem root)`, "not_found");
504
566
  }
505
567
  dir = parent;
506
568
  }
507
569
  }
508
570
 
509
- export { normalizeProjectType, toPortableRelativePath, readUipxFile, prepareProjectLocation2, updateUipxSolutionId2, findSolutionFile2, updateSolutionFile2, tryRegisterProjectInParentSolution2, findSolutionFileUpward2 };
571
+ // ../solution-sdk/src/resources/services/resource-name.ts
572
+ var MAX_RESOURCE_NAME_LENGTH2 = 256;
573
+ var UNSAFE_NAME_CHARS = /[\\/:*?"<>|]/;
574
+ function hasControlChar(value) {
575
+ for (let i = 0;i < value.length; i++) {
576
+ if (value.charCodeAt(i) < 32)
577
+ return true;
578
+ }
579
+ return false;
580
+ }
581
+ function hasUnsafeNameChars2(name) {
582
+ return UNSAFE_NAME_CHARS.test(name) || hasControlChar(name);
583
+ }
584
+ function validateResourceName2(name, options = {}) {
585
+ const optionName = options.optionName ?? "--name";
586
+ if (name.trim() === "") {
587
+ return {
588
+ ok: false,
589
+ message: `${optionName} must not be blank`,
590
+ instructions: "Pass a non-empty resource name."
591
+ };
592
+ }
593
+ if (name.length > MAX_RESOURCE_NAME_LENGTH2) {
594
+ return {
595
+ ok: false,
596
+ message: `${optionName} exceeds the ${MAX_RESOURCE_NAME_LENGTH2}-character limit (got ${name.length})`,
597
+ instructions: "Shorten the resource name. Orchestrator name limits are kind-specific (queues cap at 50, assets at 256)."
598
+ };
599
+ }
600
+ if (hasUnsafeNameChars2(name)) {
601
+ return {
602
+ ok: false,
603
+ message: `${optionName} contains unsafe characters`,
604
+ instructions: 'Resource names cannot contain path separators (/, \\), control characters, or any of: : * ? " < > |'
605
+ };
606
+ }
607
+ return { ok: true };
608
+ }
609
+ function assertValidResourceName2(name, options = {}) {
610
+ const result = validateResourceName2(name, options);
611
+ if (!result.ok) {
612
+ throw new Error(`${result.message}. ${result.instructions}`);
613
+ }
614
+ }
615
+
616
+ export { SolutionFileError, normalizeProjectType, toPortableRelativePath, readUipxFile, prepareProjectLocation2, updateUipxSolutionId2, findSolutionFile2, updateSolutionFile2, tryRegisterProjectInParentSolution2, findSolutionFileUpward2, MAX_RESOURCE_NAME_LENGTH2, hasUnsafeNameChars2, validateResourceName2, assertValidResourceName2 };
510
617
 
511
- //# debugId=A7FFF6E6EF1B5CB164756E2164756E21
618
+ //# debugId=6A7B0C5890D1D75F64756E2164756E21