@uipath/agent-tool 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.
Files changed (62) hide show
  1. package/README.md +51 -0
  2. package/dist/THIRD-PARTY-NOTICES.md +5 -5
  3. package/dist/agent-tool-OK5DK57D-bjevqt47.js +10 -0
  4. package/dist/{de-MUJPA4EB-209jpeqe.js → de-AI7ML6JM-km47f8k4.js} +47 -5
  5. package/dist/{embedded-file-reader-r66242ey.js → embedded-file-reader-0228j82a.js} +1 -4
  6. package/dist/en-LAVDF7IQ-xe939kq1.js +254 -0
  7. package/dist/{es-MX-2MYFZU7X-6v0q5rbn.js → es-MX-7KJZPEQN-1fq0a9jr.js} +47 -5
  8. package/dist/{es-7SE7HX2X-qda7whn6.js → es-SPNKTD5Y-vw5cbgv5.js} +47 -5
  9. package/dist/executor-tool.js +8 -10
  10. package/dist/first-party-service-ahcc6xc6.js +8 -0
  11. package/dist/{fr-MDFKNZ4C-qmypp92m.js → fr-AXJGUT53-hdg3pmd4.js} +47 -5
  12. package/dist/index-20nm3a1t.js +36 -0
  13. package/dist/{index-ar269vgy.js → index-js1wb4x0.js} +223 -199
  14. package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
  15. package/dist/index-ybw87d41.js +21 -0
  16. package/dist/index-z2qk2qn6.js +24 -0
  17. package/dist/index.js +15 -19
  18. package/dist/{ja-UTQEAP34-hvyf683h.js → ja-C7GZV6YP-hvtbngr5.js} +47 -5
  19. package/dist/{jmespath-e4a59c8w.js → jmespath-ab6tdc42.js} +1 -1
  20. package/dist/{js-yaml-87cdx6bm.js → js-yaml-a2bk27p6.js} +1 -3
  21. package/dist/{ko-AXCHW2OK-pkwdcbmx.js → ko-Q24HSSL4-5vn55pte.js} +47 -5
  22. package/dist/{memory-runtime-service-h9wdsd31.js → memory-runtime-service-h5bqa30b.js} +16 -27
  23. package/dist/{packager-tool-je2re4j6.js → packager-tool-0ajs8pnk.js} +53 -8
  24. package/dist/packager-tool-1593sna4.js +1434 -0
  25. package/dist/{packager-tool-3hmm8f9s.js → packager-tool-1cn7vbjr.js} +49 -60
  26. package/dist/{packager-tool-fza8z686.js → packager-tool-21r3phhc.js} +984 -467
  27. package/dist/{packager-tool-jd8cfevc.js → packager-tool-4j09ztk2.js} +10 -40
  28. package/dist/{packager-tool-22e4nhzm.js → packager-tool-4shqngrj.js} +2 -2
  29. package/dist/packager-tool-bh92xy8d.js +17988 -0
  30. package/dist/{packager-tool-16007tbr.js → packager-tool-d1tw3gdx.js} +1533 -726
  31. package/dist/{packager-tool-1yh8g550.js → packager-tool-epsr41wx.js} +8 -12
  32. package/dist/packager-tool-fc08rcbk.js +253 -0
  33. package/dist/{packager-tool-xbzpm6s2.js → packager-tool-kawtadzm.js} +44 -38
  34. package/dist/{packager-tool-gdtpsdn7.js → packager-tool-mm1x18d6.js} +223 -28
  35. package/dist/{packager-tool-vwsq85y7.js → packager-tool-qr8dtv3r.js} +35 -18
  36. package/dist/{packager-tool-7sbsrgd5.js → packager-tool-qvsazy59.js} +6 -7
  37. package/dist/{packager-tool-b098y4a2.js → packager-tool-wbksf242.js} +97 -97
  38. package/dist/packager-tool-z6a5nr2d.js +2342 -0
  39. package/dist/packager-tool.js +5 -9
  40. package/dist/{pt-BR-Y6K6XHXK-37a932vp.js → pt-BR-BIUJXIPU-2sqzhr8y.js} +47 -5
  41. package/dist/{pt-3DIO5QWG-hb763vct.js → pt-MHX6JGAX-xfgvdqwg.js} +47 -5
  42. package/dist/{ro-BWR3ONRR-jmap5ajd.js → ro-3RKJNGJZ-xqj14e3d.js} +47 -5
  43. package/dist/{ru-WBLQ5B2U-8r3c7v6d.js → ru-WBLQ5B2U-bf20yr5y.js} +1 -4
  44. package/dist/solution-auth-wmeqt2hh.js +10 -0
  45. package/dist/tool.js +14 -18
  46. package/dist/{tr-5IIHSFW5-stsb3dar.js → tr-PQLUUHPC-qsb7btxn.js} +47 -5
  47. package/dist/{zh-CN-R2KU4U5L-q4yhc33t.js → zh-CN-OHNTHZRI-b0hjkfqn.js} +47 -5
  48. package/dist/{zh-TW-GNKMELBF-r4ay2475.js → zh-TW-E4D3Y6ZR-tn3bmzz5.js} +47 -5
  49. package/package.json +2 -2
  50. package/dist/agent-tool-OK5DK57D-1654w938.js +0 -12
  51. package/dist/en-GN2ZGWUE-03z2df4k.js +0 -136
  52. package/dist/first-party-service-srxaftkn.js +0 -27
  53. package/dist/index-8bp6b26w.js +0 -666
  54. package/dist/index-aa5b4rsq.js +0 -3174
  55. package/dist/index-kmp9fmhb.js +0 -25
  56. package/dist/packager-tool-4mna26cc.js +0 -133
  57. package/dist/packager-tool-53w8skv5.js +0 -262
  58. package/dist/packager-tool-607v4t05.js +0 -22083
  59. package/dist/packager-tool-c23zrhj8.js +0 -11
  60. package/dist/packager-tool-ceh8aqcd.js +0 -5365
  61. package/dist/packager-tool-emspfs60.js +0 -31133
  62. package/dist/solution-auth-h0yjcbsy.js +0 -11
@@ -1,74 +1,85 @@
1
1
  import {
2
- en_default
3
- } from "./packager-tool-4mna26cc.js";
4
- import {
5
- __glob
6
- } from "./packager-tool-c23zrhj8.js";
7
- import {
8
- AgentDebugAttachmentUploadError,
9
- AgentDebugService,
10
- AgentDebugStartOutcomeUnknownError,
11
- AgentLocalWorkspaceEvalPreparer,
12
- AgentProjectService,
13
- AttachmentInputError,
14
- migrateLegacyToolGuardrailPolicies,
15
- prepareAttachmentInputs,
16
- resolveStudioWebConfig,
17
- toAttachmentSummaries
18
- } from "./packager-tool-3hmm8f9s.js";
19
- import {
20
- StudioWebIncompatibleProjectError,
21
- UipignoreExcludesProjectError,
22
- buildSolutionUploadFailureOutput,
23
- isSolutionUploadHttpError
24
- } from "./packager-tool-ceh8aqcd.js";
25
- import {
26
- prepareProjectLocation,
27
- tryRegisterProjectInParentSolution
28
- } from "./packager-tool-jd8cfevc.js";
29
- import {
30
- JobAttachmentUploadError
31
- } from "./packager-tool-607v4t05.js";
32
- import {
33
- getAuthContext,
2
+ parseJWT,
34
3
  getLoginStatusAsync,
35
- parseJWT
36
- } from "./packager-tool-vwsq85y7.js";
4
+ getAuthContext
5
+ } from "./packager-tool-qr8dtv3r.js";
6
+ import {
7
+ getFileSystem
8
+ } from "./packager-tool-0ajs8pnk.js";
37
9
  import {
38
- ATTACHMENT_UPLOAD_INSTRUCTIONS,
39
- OutputFormatter,
40
- RESULTS,
41
- addSdkUserAgentHeader,
42
- appendOption,
43
10
  catchError,
44
11
  extractErrorDetails,
45
12
  extractErrorMessage,
46
13
  extractErrorMessageSync,
47
- getSdkUserAgentToken,
48
- installSdkUserAgentHeader,
14
+ appendOption,
15
+ ATTACHMENT_UPLOAD_INSTRUCTIONS,
16
+ RESULTS,
17
+ authContextFailure,
49
18
  logger,
19
+ OutputFormatter,
20
+ processContext,
50
21
  parseBoundedInt,
51
- processContext
52
- } from "./packager-tool-fza8z686.js";
22
+ getSdkUserAgentToken,
23
+ addSdkUserAgentHeader,
24
+ installSdkUserAgentHeader
25
+ } from "./packager-tool-21r3phhc.js";
53
26
  import {
54
- getFileSystem
55
- } from "./packager-tool-je2re4j6.js";
27
+ JobAttachmentUploadError2
28
+ } from "./packager-tool-z6a5nr2d.js";
56
29
  import {
30
+ StudioWebIncompatibleProjectError2,
31
+ UipignoreExcludesProjectError2,
32
+ isSolutionUploadHttpError2,
33
+ buildSolutionUploadFailureOutput2
34
+ } from "./packager-tool-1593sna4.js";
35
+ import {
36
+ migrateLegacyToolGuardrailPolicies,
37
+ AgentProjectService,
38
+ resolveStudioWebConfig,
39
+ AgentLocalWorkspaceEvalPreparer,
40
+ AttachmentInputError,
41
+ toAttachmentSummaries,
42
+ prepareAttachmentInputs,
43
+ AgentDebugAttachmentUploadError,
44
+ AgentDebugStartOutcomeUnknownError,
45
+ AgentDebugService
46
+ } from "./packager-tool-1cn7vbjr.js";
47
+ import {
48
+ string,
49
+ uuid,
50
+ number,
51
+ boolean,
52
+ any,
53
+ unknown,
54
+ array,
55
+ object,
56
+ looseObject,
57
+ union,
58
+ record,
59
+ _enum,
60
+ literal,
61
+ lazy,
62
+ custom,
63
+ migrations,
64
+ currentStorageSchema,
57
65
  currentAgentStorageSchema,
58
- currentEvaluationSetStorageSchema,
59
- currentFeatureStorageSchema,
60
66
  currentResourceStorageSchema,
61
- currentStorageSchema,
62
- exports_external,
63
- generateBindings,
67
+ currentFeatureStorageSchema,
68
+ currentEvaluationSetStorageSchema,
64
69
  getLatestVersion,
65
- migrations
66
- } from "./packager-tool-emspfs60.js";
70
+ generateBindings
71
+ } from "./packager-tool-bh92xy8d.js";
67
72
  import {
68
- __commonJS,
69
- __require,
70
- __toESM
71
- } from "./packager-tool-1yh8g550.js";
73
+ en_default
74
+ } from "./packager-tool-fc08rcbk.js";
75
+ import {
76
+ prepareProjectLocation2,
77
+ tryRegisterProjectInParentSolution2
78
+ } from "./packager-tool-4j09ztk2.js";
79
+ import {
80
+ __toESM,
81
+ __commonJS
82
+ } from "./packager-tool-epsr41wx.js";
72
83
 
73
84
  // ../../node_modules/ajv/dist/compile/codegen/code.js
74
85
  var require_code = __commonJS(function(exports) {
@@ -237,9 +248,9 @@ var require_scope = __commonJS(function(exports) {
237
248
  }
238
249
  }
239
250
  var UsedValueState;
240
- (function(UsedValueState2) {
241
- UsedValueState2[UsedValueState2["Started"] = 0] = "Started";
242
- UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed";
251
+ (function(UsedValueState) {
252
+ UsedValueState[UsedValueState["Started"] = 0] = "Started";
253
+ UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
243
254
  })(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
244
255
  exports.varKinds = {
245
256
  const: new code_1.Name("const"),
@@ -1221,9 +1232,9 @@ var require_util = __commonJS(function(exports) {
1221
1232
  }
1222
1233
  exports.useFunc = useFunc;
1223
1234
  var Type;
1224
- (function(Type2) {
1225
- Type2[Type2["Num"] = 0] = "Num";
1226
- Type2[Type2["Str"] = 1] = "Str";
1235
+ (function(Type) {
1236
+ Type[Type["Num"] = 0] = "Num";
1237
+ Type[Type["Str"] = 1] = "Str";
1227
1238
  })(Type || (exports.Type = Type = {}));
1228
1239
  function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
1229
1240
  if (dataProp instanceof codegen_1.Name) {
@@ -1493,9 +1504,9 @@ var require_dataType = __commonJS(function(exports) {
1493
1504
  var codegen_1 = require_codegen();
1494
1505
  var util_1 = require_util();
1495
1506
  var DataType;
1496
- (function(DataType2) {
1497
- DataType2[DataType2["Correct"] = 0] = "Correct";
1498
- DataType2[DataType2["Wrong"] = 1] = "Wrong";
1507
+ (function(DataType) {
1508
+ DataType[DataType["Correct"] = 0] = "Correct";
1509
+ DataType[DataType["Wrong"] = 1] = "Wrong";
1499
1510
  })(DataType || (exports.DataType = DataType = {}));
1500
1511
  function getSchemaTypes(schema) {
1501
1512
  const types = getJSONTypes(schema.type);
@@ -1891,8 +1902,8 @@ var require_keyword = __commonJS(function(exports) {
1891
1902
  gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
1892
1903
  }
1893
1904
  function reportErrs(errors) {
1894
- var _a2;
1895
- gen.if((0, codegen_1.not)((_a2 = def.valid) !== null && _a2 !== undefined ? _a2 : valid), errors);
1905
+ var _a;
1906
+ gen.if((0, codegen_1.not)((_a = def.valid) !== null && _a !== undefined ? _a : valid), errors);
1896
1907
  }
1897
1908
  }
1898
1909
  exports.funcKeywordCode = funcKeywordCode;
@@ -4744,13 +4755,13 @@ var require_core = __commonJS(function(exports) {
4744
4755
  return metaOpts;
4745
4756
  }
4746
4757
  var noLogs = { log() {}, warn() {}, error() {} };
4747
- function getLogger(logger2) {
4748
- if (logger2 === false)
4758
+ function getLogger(logger) {
4759
+ if (logger === false)
4749
4760
  return noLogs;
4750
- if (logger2 === undefined)
4761
+ if (logger === undefined)
4751
4762
  return console;
4752
- if (logger2.log && logger2.warn && logger2.error)
4753
- return logger2;
4763
+ if (logger.log && logger.warn && logger.error)
4764
+ return logger;
4754
4765
  throw new Error("logger must implement log, warn and error methods");
4755
4766
  }
4756
4767
  var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;
@@ -6395,9 +6406,9 @@ var require_types = __commonJS(function(exports) {
6395
6406
  Object.defineProperty(exports, "__esModule", { value: true });
6396
6407
  exports.DiscrError = undefined;
6397
6408
  var DiscrError;
6398
- (function(DiscrError2) {
6399
- DiscrError2["Tag"] = "tag";
6400
- DiscrError2["Mapping"] = "mapping";
6409
+ (function(DiscrError) {
6410
+ DiscrError["Tag"] = "tag";
6411
+ DiscrError["Mapping"] = "mapping";
6401
6412
  })(DiscrError || (exports.DiscrError = DiscrError = {}));
6402
6413
  });
6403
6414
 
@@ -7003,7 +7014,7 @@ var require_index_cjs = __commonJS(function(exports, module) {
7003
7014
  var PROPERTY = "Property";
7004
7015
  var index = {
7005
7016
  name: "object",
7006
- init(jsep2) {
7017
+ init(jsep) {
7007
7018
  function gobbleObjectExpression(env) {
7008
7019
  if (this.code === OCURLY_CODE) {
7009
7020
  this.index++;
@@ -7023,7 +7034,7 @@ var require_index_cjs = __commonJS(function(exports, module) {
7023
7034
  break;
7024
7035
  }
7025
7036
  this.gobbleSpaces();
7026
- if (key.type === jsep2.IDENTIFIER && (this.code === jsep2.COMMA_CODE || this.code === CCURLY_CODE)) {
7037
+ if (key.type === jsep.IDENTIFIER && (this.code === jsep.COMMA_CODE || this.code === CCURLY_CODE)) {
7027
7038
  properties.push({
7028
7039
  type: PROPERTY,
7029
7040
  computed: false,
@@ -7031,13 +7042,13 @@ var require_index_cjs = __commonJS(function(exports, module) {
7031
7042
  value: key,
7032
7043
  shorthand: true
7033
7044
  });
7034
- } else if (this.code === jsep2.COLON_CODE) {
7045
+ } else if (this.code === jsep.COLON_CODE) {
7035
7046
  this.index++;
7036
7047
  const value = this.gobbleExpression();
7037
7048
  if (!value) {
7038
7049
  this.throwError("unexpected object property");
7039
7050
  }
7040
- const computed = key.type === jsep2.ARRAY_EXP;
7051
+ const computed = key.type === jsep.ARRAY_EXP;
7041
7052
  properties.push({
7042
7053
  type: PROPERTY,
7043
7054
  computed,
@@ -7049,14 +7060,14 @@ var require_index_cjs = __commonJS(function(exports, module) {
7049
7060
  } else if (key) {
7050
7061
  properties.push(key);
7051
7062
  }
7052
- if (this.code === jsep2.COMMA_CODE) {
7063
+ if (this.code === jsep.COMMA_CODE) {
7053
7064
  this.index++;
7054
7065
  }
7055
7066
  }
7056
7067
  this.throwError("missing }");
7057
7068
  }
7058
7069
  }
7059
- jsep2.hooks.add("gobble-token", gobbleObjectExpression);
7070
+ jsep.hooks.add("gobble-token", gobbleObjectExpression);
7060
7071
  }
7061
7072
  };
7062
7073
  module.exports = index;
@@ -7066,7 +7077,7 @@ var package_default = {
7066
7077
  name: "@uipath/agent-tool",
7067
7078
  author: "UiPath",
7068
7079
  license: "SEE LICENSE IN LICENSE.txt",
7069
- version: "1.205.0-preview.276",
7080
+ version: "1.206.0-preview.279",
7070
7081
  description: "cli plugin for creating and managing UiPath low-code agents",
7071
7082
  private: false,
7072
7083
  repository: {
@@ -7095,6 +7106,7 @@ var package_default = {
7095
7106
  ],
7096
7107
  scripts: {
7097
7108
  build: "bun ../../tools/build-tool.ts",
7109
+ typecheck: "tsc --noEmit",
7098
7110
  package: "bun run build && bun pm pack",
7099
7111
  lint: "biome check .",
7100
7112
  "lint:fix": "biome check --write .",
@@ -7109,7 +7121,7 @@ var package_default = {
7109
7121
  "@uipath/auth": "workspace:*",
7110
7122
  "@uipath/common": "workspace:*",
7111
7123
  "@uipath/filesystem": "workspace:*",
7112
- "@uipath/flow-schema": "0.68.0",
7124
+ "@uipath/flow-schema": "0.124.0",
7113
7125
  "@uipath/integrationservice-sdk": "workspace:*",
7114
7126
  "@uipath/llmgw-sdk": "workspace:*",
7115
7127
  "@uipath/orchestrator-sdk": "workspace:*",
@@ -7171,17 +7183,17 @@ function parsePositiveNumber(value, flag) {
7171
7183
  }
7172
7184
  var registerDebugCommand = (program) => {
7173
7185
  program.command("debug").description("Debug a low-code agent by running it on Studio Web and streaming the result. Job-attachment inputs can be supplied from local files with --attachment field=path.").argument("<project-path>", "Path to the agent project directory (containing agent.json)").option("-i, --inputs <json>", `Input arguments as JSON string (e.g. '{"input":"hello"}'). For a job-attachment field pass an existing Orchestrator attachment reference {"ID": "<attachment-id>"} (Data.Attachments of a previous --attachment run lists the IDs), or use --attachment to upload a local file.`).option("--attachment <field=path>", 'Upload a local file into a job-attachment input field of agent.json (repeatable). Format: field=path, e.g. --attachment fileIn=./invoice.pdf. The field must be declared as {"$ref": "#/definitions/job-attachment"} in inputSchema. Uploaded attachment IDs are returned in Data.Attachments.', appendOption, []).option("--poll-interval <ms>", "Polling interval in milliseconds", "2000").option("--timeout <seconds>", "Maximum seconds to wait for the debug run to finish").option("--login-validity <minutes>", "Minimum minutes before token expiration", (v) => Number.parseInt(v, 10), 10).examples(AGENT_DEBUG_EXAMPLES).trackedAction(processContext, async (projectPath, options) => {
7186
+ const [authError, authContext] = await catchError(getAuthContext({
7187
+ ensureTokenValidityMinutes: options.loginValidity,
7188
+ requireOrganizationId: true,
7189
+ requireTenantName: true
7190
+ }));
7191
+ if (authError) {
7192
+ OutputFormatter.error(await authContextFailure(authError));
7193
+ processContext.exit(1);
7194
+ return;
7195
+ }
7174
7196
  const [error, result] = await catchError((async () => {
7175
- const loginStatus = await getLoginStatusAsync({
7176
- ensureTokenValidityMinutes: options.loginValidity
7177
- });
7178
- if (loginStatus.loginStatus !== "Logged in" || !loginStatus.accessToken || !loginStatus.baseUrl || !loginStatus.organizationId) {
7179
- throw new Error("Not logged in. Run 'uip login' first.");
7180
- }
7181
- const tenantName = loginStatus.tenantName;
7182
- if (!tenantName) {
7183
- throw new Error("Tenant must be selected during login. Run 'uip login' or 'uip login tenant set <tenant>'.");
7184
- }
7185
7197
  let inputs = {};
7186
7198
  if (options.inputs !== undefined) {
7187
7199
  const [parseError, parsed] = catchError(() => JSON.parse(options.inputs));
@@ -7195,10 +7207,10 @@ var registerDebugCommand = (program) => {
7195
7207
  const pollIntervalMs = parsePositiveNumber(options.pollInterval ?? "2000", "--poll-interval");
7196
7208
  const maxPolls = options.timeout !== undefined ? Math.max(1, Math.ceil(parsePositiveNumber(options.timeout, "--timeout") * 1000 / pollIntervalMs)) : Math.ceil(DEFAULT_TIMEOUT_MS / pollIntervalMs);
7197
7209
  const auth = {
7198
- baseUrl: loginStatus.baseUrl,
7199
- accessToken: loginStatus.accessToken,
7200
- organizationId: loginStatus.organizationId,
7201
- tenantName
7210
+ baseUrl: authContext.baseUrl,
7211
+ accessToken: authContext.accessToken,
7212
+ organizationId: authContext.organizationId,
7213
+ tenantName: authContext.tenantName
7202
7214
  };
7203
7215
  return new AgentDebugService().debug({
7204
7216
  projectPath,
@@ -7226,7 +7238,7 @@ var registerDebugCommand = (program) => {
7226
7238
  if (error instanceof AgentDebugAttachmentUploadError) {
7227
7239
  const details = await extractErrorDetails(error);
7228
7240
  const sdkError = error.cause;
7229
- const scopeHint = details.errorCode === "permission_denied" && sdkError instanceof JobAttachmentUploadError && sdkError.stage === "create" ? " Attachment upload calls POST /odata/Attachments, which needs the OR.Folders or OR.Folders.Write scope on the login." : "";
7241
+ const scopeHint = details.errorCode === "permission_denied" && sdkError instanceof JobAttachmentUploadError2 && sdkError.stage === "create" ? " Attachment upload calls POST /odata/Attachments, which needs the OR.Folders or OR.Folders.Write scope on the login." : "";
7230
7242
  OutputFormatter.error({
7231
7243
  Result: RESULTS.Failure,
7232
7244
  ErrorCode: details.errorCode,
@@ -7238,7 +7250,7 @@ var registerDebugCommand = (program) => {
7238
7250
  processContext.exit(1);
7239
7251
  return;
7240
7252
  }
7241
- if (error instanceof StudioWebIncompatibleProjectError) {
7253
+ if (error instanceof StudioWebIncompatibleProjectError2) {
7242
7254
  OutputFormatter.error({
7243
7255
  Result: RESULTS.Failure,
7244
7256
  ErrorCode: "invalid_argument",
@@ -7248,7 +7260,7 @@ var registerDebugCommand = (program) => {
7248
7260
  processContext.exit(1);
7249
7261
  return;
7250
7262
  }
7251
- if (error instanceof UipignoreExcludesProjectError) {
7263
+ if (error instanceof UipignoreExcludesProjectError2) {
7252
7264
  OutputFormatter.error({
7253
7265
  Result: RESULTS.Failure,
7254
7266
  ErrorCode: "invalid_argument",
@@ -7258,8 +7270,8 @@ var registerDebugCommand = (program) => {
7258
7270
  processContext.exit(1);
7259
7271
  return;
7260
7272
  }
7261
- if (isSolutionUploadHttpError(error)) {
7262
- OutputFormatter.error(buildSolutionUploadFailureOutput(error, {
7273
+ if (isSolutionUploadHttpError2(error)) {
7274
+ OutputFormatter.error(buildSolutionUploadFailureOutput2(error, {
7263
7275
  subject: "agent",
7264
7276
  importCheckHint: "Run 'uip agent validate' to confirm the project is well-formed."
7265
7277
  }));
@@ -7267,9 +7279,9 @@ var registerDebugCommand = (program) => {
7267
7279
  return;
7268
7280
  }
7269
7281
  if (error instanceof AgentDebugStartOutcomeUnknownError) {
7270
- const data2 = {};
7282
+ const data = {};
7271
7283
  if (error.bound.length > 0) {
7272
- data2.Attachments = toAttachmentSummaries(error.bound);
7284
+ data.Attachments = toAttachmentSummaries(error.bound);
7273
7285
  }
7274
7286
  OutputFormatter.error({
7275
7287
  Result: RESULTS.Failure,
@@ -7277,7 +7289,7 @@ var registerDebugCommand = (program) => {
7277
7289
  Message: error.message,
7278
7290
  Instructions: `Look for a job that started just now in your Orchestrator personal workspace before running this again: one may exist, and a second 'uip agent debug' would start another. ${error.bound.length > 0 ? "The uploaded attachments were kept and are listed in Data.Attachments." : ""}`.trim(),
7279
7291
  Retry: "RetryLater",
7280
- ...Object.keys(data2).length > 0 ? { Data: data2 } : {}
7292
+ ...Object.keys(data).length > 0 ? { Data: data } : {}
7281
7293
  });
7282
7294
  processContext.exit(1);
7283
7295
  return;
@@ -7594,7 +7606,7 @@ var package_default2 = {
7594
7606
  name: "@uipath/agent-sdk",
7595
7607
  author: "UiPath",
7596
7608
  license: "SEE LICENSE IN LICENSE.txt",
7597
- version: "1.205.0-preview.276",
7609
+ version: "1.206.0-preview.279",
7598
7610
  description: "SDK for the UiPath Agent Runtime API — evaluation execution and debug sessions.",
7599
7611
  repository: {
7600
7612
  type: "git",
@@ -7693,16 +7705,40 @@ function FewShotExampleToJSONTyped(value, ignoreDiscriminator = false) {
7693
7705
  }
7694
7706
 
7695
7707
  // ../agent-sdk/generated/src/models/Role.ts
7708
+ function RoleFromJSON(json) {
7709
+ return RoleFromJSONTyped(json, false);
7710
+ }
7711
+ function RoleFromJSONTyped(json, ignoreDiscriminator) {
7712
+ return json;
7713
+ }
7696
7714
  function RoleToJSON(value) {
7697
7715
  return value;
7698
7716
  }
7699
7717
 
7700
7718
  // ../agent-sdk/generated/src/models/TextTokenType.ts
7719
+ function TextTokenTypeFromJSON(json) {
7720
+ return TextTokenTypeFromJSONTyped(json, false);
7721
+ }
7722
+ function TextTokenTypeFromJSONTyped(json, ignoreDiscriminator) {
7723
+ return json;
7724
+ }
7701
7725
  function TextTokenTypeToJSON(value) {
7702
7726
  return value;
7703
7727
  }
7704
7728
 
7705
7729
  // ../agent-sdk/generated/src/models/TextToken.ts
7730
+ function TextTokenFromJSON(json) {
7731
+ return TextTokenFromJSONTyped(json, false);
7732
+ }
7733
+ function TextTokenFromJSONTyped(json, ignoreDiscriminator) {
7734
+ if (json == null) {
7735
+ return json;
7736
+ }
7737
+ return {
7738
+ type: json["type"] == null ? undefined : TextTokenTypeFromJSON(json["type"]),
7739
+ rawString: json["rawString"] == null ? undefined : json["rawString"]
7740
+ };
7741
+ }
7706
7742
  function TextTokenToJSON(json) {
7707
7743
  return TextTokenToJSONTyped(json, false);
7708
7744
  }
@@ -7717,6 +7753,19 @@ function TextTokenToJSONTyped(value, ignoreDiscriminator = false) {
7717
7753
  }
7718
7754
 
7719
7755
  // ../agent-sdk/generated/src/models/Message.ts
7756
+ function MessageFromJSON(json) {
7757
+ return MessageFromJSONTyped(json, false);
7758
+ }
7759
+ function MessageFromJSONTyped(json, ignoreDiscriminator) {
7760
+ if (json == null) {
7761
+ return json;
7762
+ }
7763
+ return {
7764
+ role: json["role"] == null ? undefined : RoleFromJSON(json["role"]),
7765
+ content: json["content"] == null ? undefined : json["content"],
7766
+ contentTokens: json["contentTokens"] == null ? undefined : json["contentTokens"].map(TextTokenFromJSON)
7767
+ };
7768
+ }
7720
7769
  function MessageToJSON(json) {
7721
7770
  return MessageToJSONTyped(json, false);
7722
7771
  }
@@ -7732,6 +7781,12 @@ function MessageToJSONTyped(value, ignoreDiscriminator = false) {
7732
7781
  }
7733
7782
 
7734
7783
  // ../agent-sdk/generated/src/models/RuntimeType.ts
7784
+ function RuntimeTypeFromJSON(json) {
7785
+ return RuntimeTypeFromJSONTyped(json, false);
7786
+ }
7787
+ function RuntimeTypeFromJSONTyped(json, ignoreDiscriminator) {
7788
+ return json;
7789
+ }
7735
7790
  function RuntimeTypeToJSON(value) {
7736
7791
  return value;
7737
7792
  }
@@ -8859,9 +8914,8 @@ async function createAgentRuntimeConfig(options) {
8859
8914
  requireOrganizationId: true,
8860
8915
  requireTenantId: true
8861
8916
  });
8862
- const organizationId = ctx.organizationId;
8863
- const tenantId = ctx.tenantId;
8864
- const basePath = `${ctx.baseUrl}/${organizationId}/${tenantId}/agentsruntime_`;
8917
+ const { organizationId, tenantId } = ctx;
8918
+ const basePath = `${ctx.baseUrl}/${encodeURIComponent(organizationId)}/${encodeURIComponent(tenantId)}/agentsruntime_`;
8865
8919
  const headers = addSdkUserAgentHeader({
8866
8920
  Authorization: `Bearer ${ctx.accessToken}`,
8867
8921
  "X-UiPath-Internal-TenantId": tenantId
@@ -9018,7 +9072,7 @@ class EvalService {
9018
9072
  throw new Error(`Unknown evaluator type "${opts.type}". Valid types: ${Object.keys(EVALUATOR_TYPES).join(", ")}`);
9019
9073
  }
9020
9074
  const existingEvaluators = await this.projectService.listEvaluators(projectPath);
9021
- if (existingEvaluators.some((evaluator2) => evaluator2.name.trim() === normalizedName)) {
9075
+ if (existingEvaluators.some((evaluator) => evaluator.name.trim() === normalizedName)) {
9022
9076
  throw new Error(`Evaluator "${normalizedName}" already exists`);
9023
9077
  }
9024
9078
  const id = crypto.randomUUID();
@@ -9067,7 +9121,7 @@ class EvalService {
9067
9121
  throw new Error("Evaluation set name cannot be empty");
9068
9122
  }
9069
9123
  const existingSets = await this.projectService.listEvalSets(projectPath);
9070
- if (existingSets.some((evalSet2) => evalSet2.name.trim() === normalizedName)) {
9124
+ if (existingSets.some((evalSet) => evalSet.name.trim() === normalizedName)) {
9071
9125
  throw new Error(`Evaluation set "${normalizedName}" already exists`);
9072
9126
  }
9073
9127
  const id = crypto.randomUUID();
@@ -9342,18 +9396,22 @@ function formatEvalRunRow(r, evaluators, verbose = false) {
9342
9396
  EvaluatorScores: evalScores,
9343
9397
  Tokens: tokenDisplay,
9344
9398
  Duration: r.completionMetrics?.duration ? `${(r.completionMetrics.duration / 1000).toFixed(1)}s` : "-",
9345
- Error: r.errorMessage ?? "-"
9399
+ Error: runErrorMessage(r) ?? "-"
9346
9400
  };
9347
9401
  if (verbose) {
9348
9402
  row.Justifications = justifications;
9349
9403
  }
9350
9404
  return row;
9351
9405
  }
9406
+ function runErrorMessage(r) {
9407
+ const value = "errorMessage" in r ? r.errorMessage : undefined;
9408
+ return typeof value === "string" ? value : undefined;
9409
+ }
9352
9410
  function isFailedRun(r) {
9353
9411
  const status = String(r.status);
9354
9412
  if (status === "failed" || status === "3")
9355
9413
  return true;
9356
- if (r.errorMessage)
9414
+ if (runErrorMessage(r))
9357
9415
  return true;
9358
9416
  if (r.result?.score?.type !== undefined) {
9359
9417
  if (String(r.result.score.type) === "error" || String(r.result.score.type) === "2") {
@@ -9426,12 +9484,11 @@ async function buildAgentPayloadFromProject(projectService, projectPath, cloudPr
9426
9484
  metadata: {
9427
9485
  isConversational: agent.metadata.isConversational ?? false,
9428
9486
  storageVersion: agent.metadata.storageVersion,
9429
- targetRuntime: agent.metadata.targetRuntime,
9430
- showProjectCreationExperience: agent.metadata.showProjectCreationExperience ?? true
9487
+ targetRuntime: agent.metadata.targetRuntime === undefined ? undefined : RuntimeTypeFromJSON(agent.metadata.targetRuntime)
9431
9488
  },
9432
9489
  systemPrompt: { content: systemMessage?.content ?? "" },
9433
9490
  userPrompt: { content: userMessage?.content ?? "" },
9434
- messages: agent.messages,
9491
+ messages: agent.messages.map(MessageFromJSON),
9435
9492
  inputSchema: agent.inputSchema,
9436
9493
  outputSchema: agent.outputSchema,
9437
9494
  settings: {
@@ -9531,7 +9588,7 @@ var registerEvalRunCommands = (evalCmd) => {
9531
9588
  runServerless: true,
9532
9589
  entrypoint: "agent.json",
9533
9590
  evaluationSetFileName: evalSetFileName,
9534
- evaluationIds: evaluations.map((e) => e.id)
9591
+ evaluationIds: evalSet.evaluations.map((e) => e.id)
9535
9592
  };
9536
9593
  OutputFormatter.log({
9537
9594
  Message: `Starting evaluation run for "${evalSet.name}" (${evaluations.length} test cases, ${evaluators.length} evaluators)...`
@@ -9543,7 +9600,7 @@ var registerEvalRunCommands = (evalCmd) => {
9543
9600
  evalSetMultipleEvaluatorsStartRequest: payload
9544
9601
  }));
9545
9602
  if (startError) {
9546
- const resp = startError?.response;
9603
+ const resp = startError.response;
9547
9604
  const body = resp?.text ? await resp.text() : "";
9548
9605
  throw new Error(`API error starting eval: ${body || startError.message}`);
9549
9606
  }
@@ -10214,7 +10271,7 @@ var registerEvaluatorCommands = (evalCmd) => {
10214
10271
  evaluator.command("add").description("Add an evaluator to the agent").argument("<name>", "Evaluator name").requiredOption("--type <type>", `Evaluator type: ${EvalService.getValidTypes().join(", ")}`).option("--description <desc>", "Evaluator description").option("--prompt <prompt>", "Custom evaluation prompt").option("--target-key <key>", "Target output key to evaluate").option("--path <path>", "Path to agent project directory", ".").examples(EVALUATOR_ADD_EXAMPLES).trackedAction(processContext, async (name, options) => {
10215
10272
  const [error] = await catchError((async () => {
10216
10273
  const service = new EvalService;
10217
- const evaluator2 = await service.addEvaluator(options.path, {
10274
+ const evaluator = await service.addEvaluator(options.path, {
10218
10275
  name,
10219
10276
  type: options.type,
10220
10277
  description: options.description,
@@ -10226,10 +10283,10 @@ var registerEvaluatorCommands = (evalCmd) => {
10226
10283
  Code: "AgentEvaluatorAdd",
10227
10284
  Data: {
10228
10285
  Status: "Evaluator added",
10229
- Name: evaluator2.name,
10230
- Type: evaluator2.type,
10231
- Id: evaluator2.id,
10232
- File: evaluator2.fileName
10286
+ Name: evaluator.name,
10287
+ Type: evaluator.type,
10288
+ Id: evaluator.id,
10289
+ File: evaluator.fileName
10233
10290
  }
10234
10291
  });
10235
10292
  })());
@@ -10312,19 +10369,14 @@ var SERVICE_PATH = {
10312
10369
  "llm-gateway": "llmgateway_"
10313
10370
  };
10314
10371
  var REQUESTING_PRODUCT = "uipath-cli";
10315
- async function resolveStatus(options) {
10316
- const status = await getLoginStatusAsync({
10317
- ensureTokenValidityMinutes: options?.loginValidity
10372
+ async function resolveAuth(options) {
10373
+ const auth = await getAuthContext({
10374
+ ensureTokenValidityMinutes: options?.loginValidity,
10375
+ requireOrganizationId: true
10318
10376
  });
10319
- if (status.loginStatus !== "Logged in" || !status.baseUrl || !status.accessToken) {
10320
- throw new Error(status.hint ? `Not logged in. ${status.hint}` : "Not logged in. Run 'uip login' first.");
10321
- }
10322
- if (!status.organizationId) {
10323
- throw new Error("Organization ID not available. Ensure you are logged in with an organization context.");
10324
- }
10325
10377
  return {
10326
- status,
10327
- bearerToken: options?.s2sToken ?? status.accessToken
10378
+ auth,
10379
+ bearerToken: options?.s2sToken ?? auth.accessToken
10328
10380
  };
10329
10381
  }
10330
10382
  function stripTrailingSlash(s) {
@@ -10355,28 +10407,26 @@ async function readErrorBody(response) {
10355
10407
  return `${response.status} ${response.statusText}: ${text.slice(0, 1000)}`;
10356
10408
  }
10357
10409
  async function createAiHttpContext(service, options) {
10358
- const { status, bearerToken } = await resolveStatus(options);
10359
- const explicitTenantOverride = options?.tenantName !== undefined;
10360
- const tenantName = options?.tenantName ?? status.tenantName;
10361
- const tenantSegment = explicitTenantOverride ? options?.tenantName : status.tenantId ?? status.tenantName;
10410
+ const { auth, bearerToken } = await resolveAuth(options);
10411
+ const explicitTenantOverride = Boolean(options?.tenantName);
10412
+ const tenantName = options?.tenantName || auth.tenantName;
10413
+ const tenantSegment = explicitTenantOverride ? options?.tenantName : auth.tenantId ?? auth.tenantName;
10362
10414
  const segments = [
10363
- status.baseUrl ? stripTrailingSlash(status.baseUrl) : undefined,
10364
- status.organizationId ? encodeURIComponent(status.organizationId) : undefined
10415
+ stripTrailingSlash(auth.baseUrl),
10416
+ encodeURIComponent(auth.organizationId)
10365
10417
  ];
10366
10418
  if (tenantSegment) {
10367
10419
  segments.push(encodeURIComponent(tenantSegment));
10368
10420
  }
10369
10421
  segments.push(SERVICE_PATH[service]);
10370
- const baseUrl = segments.filter(Boolean).join("/");
10422
+ const baseUrl = segments.join("/");
10371
10423
  const baseHeaders = {
10372
10424
  Authorization: `Bearer ${bearerToken}`,
10373
- Accept: "application/json"
10425
+ Accept: "application/json",
10426
+ "x-uipath-internal-accountid": auth.organizationId
10374
10427
  };
10375
- if (status.organizationId) {
10376
- baseHeaders["x-uipath-internal-accountid"] = status.organizationId;
10377
- }
10378
- if (!explicitTenantOverride && status.tenantId) {
10379
- baseHeaders["x-uipath-internal-tenantid"] = status.tenantId;
10428
+ if (!explicitTenantOverride && auth.tenantId) {
10429
+ baseHeaders["x-uipath-internal-tenantid"] = auth.tenantId;
10380
10430
  }
10381
10431
  baseHeaders["x-uipath-requestingproduct"] = REQUESTING_PRODUCT;
10382
10432
  baseHeaders["X-UiPath-LLMGateway-AllowFull4xxResponse"] = "true";
@@ -10425,8 +10475,8 @@ async function createAiHttpContext(service, options) {
10425
10475
  };
10426
10476
  return {
10427
10477
  baseUrl,
10428
- organizationId: status.organizationId,
10429
- tenantId: explicitTenantOverride ? undefined : status.tenantId,
10478
+ organizationId: auth.organizationId,
10479
+ tenantId: explicitTenantOverride ? undefined : auth.tenantId,
10430
10480
  tenantName,
10431
10481
  requestingProduct: REQUESTING_PRODUCT,
10432
10482
  fetchJson,
@@ -10466,11 +10516,11 @@ var LLM_AS_JUDGE_DISCOVERY = {
10466
10516
  operationCode: "Guardrails.LlmAsJudge.Debug"
10467
10517
  };
10468
10518
  async function getLlmJudgeModelIds(options) {
10469
- const models2 = await getDiscoveryModels({
10519
+ const models = await getDiscoveryModels({
10470
10520
  ...options,
10471
10521
  ...LLM_AS_JUDGE_DISCOVERY
10472
10522
  });
10473
- return models2.filter((m) => !m.isBlockedByPolicy).map((m) => m.modelId);
10523
+ return models.filter((m) => !m.isBlockedByPolicy).map((m) => m.modelId);
10474
10524
  }
10475
10525
  // src/commands/guardrail-manage.ts
10476
10526
  var GUARDRAIL_LLM_AS_JUDGE_MODELS_EXAMPLES = [
@@ -10702,7 +10752,7 @@ var registerGuardrailCommands = (program) => {
10702
10752
  });
10703
10753
  });
10704
10754
  guardrails.command("llm-as-judge-models").description("List LLM models available for the LLM-as-judge guardrail.").examples(GUARDRAIL_LLM_AS_JUDGE_MODELS_EXAMPLES).trackedAction(processContext, async () => {
10705
- const [error, models2] = await catchError(getDiscoveryModels({
10755
+ const [error, models] = await catchError(getDiscoveryModels({
10706
10756
  product: "guardrails",
10707
10757
  feature: "llm-as-judge-validator",
10708
10758
  operationCode: "Guardrails.LlmAsJudge.Debug"
@@ -10719,7 +10769,7 @@ var registerGuardrailCommands = (program) => {
10719
10769
  OutputFormatter.success({
10720
10770
  Result: RESULTS.Success,
10721
10771
  Code: "LlmGatewayModelsList",
10722
- Data: models2.filter((m) => !m.isBlockedByPolicy).map(formatModel)
10772
+ Data: models.filter((m) => !m.isBlockedByPolicy).map(formatModel)
10723
10773
  });
10724
10774
  });
10725
10775
  guardrails.command("catalog").description("Fetch guardrail catalog entries with authored metadata (descriptions, use cases, examples)").option("--validator <id>", "Filter to a single validator by snake_case ID (e.g. pii_detection)").examples(GUARDRAIL_CATALOG_EXAMPLES).trackedAction(processContext, async (options) => {
@@ -10752,7 +10802,7 @@ var registerGuardrailCommands = (program) => {
10752
10802
 
10753
10803
  // src/services/project-artifacts.ts
10754
10804
  async function ensureProjectArtifacts(args) {
10755
- const { addProjectArtifactsToSolutionAsync } = await import("./index-ar269vgy.js");
10805
+ const { addProjectArtifactsToSolutionAsync } = await import("./index-js1wb4x0.js");
10756
10806
  return addProjectArtifactsToSolutionAsync(args);
10757
10807
  }
10758
10808
 
@@ -10902,6 +10952,12 @@ function createFlowLayout() {
10902
10952
  return { zoom: 1.12 };
10903
10953
  }
10904
10954
  function createInlineAgentDefinition(opts) {
10955
+ const systemText = opts.systemPrompt ?? "";
10956
+ const systemMessage = {
10957
+ role: "system",
10958
+ content: systemText,
10959
+ contentTokens: systemText ? textTokens(systemText) : []
10960
+ };
10905
10961
  if (opts.conversational) {
10906
10962
  return {
10907
10963
  version: AGENT_SCHEMA_VERSION,
@@ -10929,11 +10985,7 @@ function createInlineAgentDefinition(opts) {
10929
10985
  type: "lowCode",
10930
10986
  guardrails: [],
10931
10987
  messages: [
10932
- {
10933
- role: "system",
10934
- content: "",
10935
- contentTokens: []
10936
- },
10988
+ systemMessage,
10937
10989
  {
10938
10990
  role: "user",
10939
10991
  content: "",
@@ -10974,11 +11026,7 @@ function createInlineAgentDefinition(opts) {
10974
11026
  type: "lowCode",
10975
11027
  guardrails: [],
10976
11028
  messages: [
10977
- {
10978
- role: "system",
10979
- content: "",
10980
- contentTokens: []
10981
- },
11029
+ systemMessage,
10982
11030
  {
10983
11031
  role: "user",
10984
11032
  content: "",
@@ -11113,7 +11161,7 @@ async function scaffoldStandaloneAgent(targetPath, options) {
11113
11161
  if (!VALID_NAME_REGEX.test(name)) {
11114
11162
  throw new Error(`Invalid agent name "${name}" derived from path. ` + "Directory name may only contain letters, numbers, spaces, underscores, and hyphens.");
11115
11163
  }
11116
- const { projectDir, autoCreatedSolution } = await prepareProjectLocation(fs, candidateProjectDir, name, { skipRegistration: options.skipSolutionRegistration === true });
11164
+ const { projectDir, autoCreatedSolution } = await prepareProjectLocation2(fs, candidateProjectDir, name, { skipRegistration: options.skipSolutionRegistration === true });
11117
11165
  const dirExists = await fs.exists(projectDir);
11118
11166
  if (dirExists && !options.force) {
11119
11167
  const entries = await fs.readdir(projectDir);
@@ -11148,7 +11196,7 @@ async function scaffoldStandaloneAgent(targetPath, options) {
11148
11196
  await fs.mkdir(fs.path.join(projectDir, "evals", "eval-sets"));
11149
11197
  await fs.mkdir(fs.path.join(projectDir, "features"));
11150
11198
  await fs.mkdir(fs.path.join(projectDir, "resources"));
11151
- const write = async (path, data2) => fs.writeFile(path, `${JSON.stringify(data2, null, 2)}
11199
+ const write = async (path, data) => fs.writeFile(path, `${JSON.stringify(data, null, 2)}
11152
11200
  `);
11153
11201
  await write(fs.path.join(projectDir, "agent.json"), agent);
11154
11202
  await write(fs.path.join(projectDir, "project.uiproj"), createProjectUiproj(name));
@@ -11157,7 +11205,7 @@ async function scaffoldStandaloneAgent(targetPath, options) {
11157
11205
  await write(fs.path.join(projectDir, "evals", "evaluators", semanticEval.fileName), semanticEval);
11158
11206
  await write(fs.path.join(projectDir, "evals", "evaluators", trajectoryEval.fileName), trajectoryEval);
11159
11207
  await write(fs.path.join(projectDir, "evals", "eval-sets", "evaluation-set-default.json"), evalSet);
11160
- const solutionRegistration = await tryRegisterProjectInParentSolution(fs, projectDir, { skipRegistration: options.skipSolutionRegistration === true });
11208
+ const solutionRegistration = await tryRegisterProjectInParentSolution2(fs, projectDir, { skipRegistration: options.skipSolutionRegistration === true });
11161
11209
  let projectArtifacts;
11162
11210
  if ((solutionRegistration.Status === "Registered" || solutionRegistration.Status === "AlreadyRegistered") && solutionRegistration.Solution && solutionRegistration.ProjectId) {
11163
11211
  projectArtifacts = await ensureProjectArtifacts({
@@ -11198,7 +11246,7 @@ function buildStandaloneNextSteps(projectPath, solutionRegistration) {
11198
11246
  return steps.join(`
11199
11247
  `);
11200
11248
  }
11201
- steps.push("# Then link to a solution:", 'uip solution init "<SolutionName>"', `uip solution projects add ${JSON.stringify(projectPath)} <SolutionName>.uipx`, "# Or if the solution already exists:", `uip solution projects add ${JSON.stringify(projectPath)} <existing>.uipx`, "# Run refresh to generate entry-points.json and bindings_v2.json:", `uip agent refresh ${JSON.stringify(projectPath)}`, "# Then validate the project is ready for upload:", `uip agent validate ${JSON.stringify(projectPath)}`, "# Bundle and upload to Studio Web:", "uip solution bundle . -d ./dist", "uip solution upload ./dist/<SolutionName>.uis");
11249
+ steps.push("# Then link to a solution:", 'uip solution init "<SolutionName>"', `uip solution projects add ${JSON.stringify(projectPath)} <SolutionName>.uipx`, "# Or if the solution already exists:", `uip solution projects add ${JSON.stringify(projectPath)} <existing>.uipx`, "# Run refresh to generate entry-points.json and bindings_v2.json:", `uip agent refresh ${JSON.stringify(projectPath)}`, "# Then validate the project is ready for upload:", `uip agent validate ${JSON.stringify(projectPath)}`, "# Upload the solution to Studio Web from the solution directory:", "uip solution upload .");
11202
11250
  return steps.join(`
11203
11251
  `);
11204
11252
  }
@@ -11214,7 +11262,8 @@ async function scaffoldInlineAgent(targetPath, options) {
11214
11262
  const agent = createInlineAgentDefinition({
11215
11263
  projectId,
11216
11264
  conversational: options.conversational,
11217
- model: options.model
11265
+ model: options.model,
11266
+ systemPrompt: options.systemPrompt
11218
11267
  });
11219
11268
  await fs.mkdir(agentDir);
11220
11269
  await fs.mkdir(fs.path.join(agentDir, "evals", "eval-sets"));
@@ -11253,7 +11302,7 @@ var SOLUTION_FOLDER = "solution_folder";
11253
11302
  // src/services/memory-space-solution-link.ts
11254
11303
  async function findEnclosingSolutionFile(projectPath) {
11255
11304
  const fs = getFileSystem();
11256
- const { findSolutionFileUpward } = await import("./index-8bp6b26w.js");
11305
+ const { findSolutionFileUpward } = await import("./index-20nm3a1t.js");
11257
11306
  const [error, solutionFile] = await catchError(findSolutionFileUpward(fs, fs.path.resolve(projectPath)));
11258
11307
  if (error) {
11259
11308
  if (error.message.startsWith("No .uipx solution file found")) {
@@ -11303,7 +11352,7 @@ async function activeTenantId() {
11303
11352
  return status.tenantId ?? undefined;
11304
11353
  }
11305
11354
  async function openSolution(solutionDir) {
11306
- const engine = await import("./index-ar269vgy.js");
11355
+ const engine = await import("./index-js1wb4x0.js");
11307
11356
  const services = await engine.createResourceBuilderServices();
11308
11357
  await engine.normalizeResourceFileCasing(solutionDir);
11309
11358
  const builder = await services.getSolutionBuilder(solutionDir);
@@ -11468,9 +11517,9 @@ class ResourceService {
11468
11517
  if (retryError || !retryRaw) {
11469
11518
  throw new Error(`Builder file not found: ${builderPath}. Run "uip agent init" before managing agent resources.`);
11470
11519
  }
11471
- const [parseError2, retryBuilder] = catchError(() => JSON.parse(retryRaw));
11472
- if (parseError2 || !retryBuilder) {
11473
- throw new Error(`Builder file is malformed: ${builderPath}. ${parseError2?.message ?? ""}`);
11520
+ const [parseError, retryBuilder] = catchError(() => JSON.parse(retryRaw));
11521
+ if (parseError || !retryBuilder) {
11522
+ throw new Error(`Builder file is malformed: ${builderPath}. ${parseError?.message ?? ""}`);
11474
11523
  }
11475
11524
  return retryBuilder;
11476
11525
  }
@@ -11813,7 +11862,7 @@ async function resolveRuntimeTarget(memoryName, options) {
11813
11862
  if (options.folderKey === undefined && folderPath.toLowerCase() === SOLUTION_FOLDER) {
11814
11863
  throw new Error(`Feature "${feature.name}" points at ${SOLUTION_FOLDER}, the placeholder the deploy replaces with the deployment folder. Pass --folder-path <deployed folder path> or --folder-key <key> for the folder the solution is deployed to ('uip solution deploy list' shows it).`);
11815
11864
  }
11816
- const { findRuntimeMemorySpace, resolveRuntimeFolder } = await import("./memory-runtime-service-h9wdsd31.js");
11865
+ const { findRuntimeMemorySpace, resolveRuntimeFolder } = await import("./memory-runtime-service-h5bqa30b.js");
11817
11866
  const folder = await resolveRuntimeFolder(options.folderKey !== undefined ? { folderKey: options.folderKey } : { folderPath });
11818
11867
  if (folder === undefined) {
11819
11868
  throw new Error("Memory items are not available in this build; use the uip CLI.");
@@ -11954,7 +12003,7 @@ var registerMemoryCommands = (program) => {
11954
12003
  const memoryType = parseMemoryType(options.memoryType);
11955
12004
  const request = buildItemRequest(memoryType, options);
11956
12005
  const target = await resolveRuntimeTarget(memoryName, options);
11957
- const { addRuntimeMemoryItem } = await import("./memory-runtime-service-h9wdsd31.js");
12006
+ const { addRuntimeMemoryItem } = await import("./memory-runtime-service-h5bqa30b.js");
11958
12007
  const item = await addRuntimeMemoryItem(target.space.id, target.folder.key, request);
11959
12008
  OutputFormatter.success({
11960
12009
  Result: RESULTS.Success,
@@ -11987,7 +12036,7 @@ var registerMemoryCommands = (program) => {
11987
12036
  const [error] = await catchError((async () => {
11988
12037
  const memoryType = options.memoryType === undefined ? undefined : parseMemoryType(options.memoryType);
11989
12038
  const target = await resolveRuntimeTarget(memoryName, options);
11990
- const { listRuntimeMemoryItems } = await import("./memory-runtime-service-h9wdsd31.js");
12039
+ const { listRuntimeMemoryItems } = await import("./memory-runtime-service-h5bqa30b.js");
11991
12040
  const items = await listRuntimeMemoryItems(target.space.id, target.folder.key, memoryType);
11992
12041
  OutputFormatter.success({
11993
12042
  Result: RESULTS.Success,
@@ -12064,7 +12113,7 @@ var formatModel2 = (m) => ({
12064
12113
  var registerModelCommands = (program) => {
12065
12114
  const model = program.command("model").description("Manage agent LLM models");
12066
12115
  model.command("list").description("List available LLM models for the authenticated tenant").option("--all-fields", "Return full model objects with all fields").examples(MODEL_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
12067
- const [error, models2] = await catchError(getAvailableModels());
12116
+ const [error, models] = await catchError(getAvailableModels());
12068
12117
  if (error) {
12069
12118
  OutputFormatter.error({
12070
12119
  Result: RESULTS.Failure,
@@ -12077,12 +12126,20 @@ var registerModelCommands = (program) => {
12077
12126
  OutputFormatter.success({
12078
12127
  Result: RESULTS.Success,
12079
12128
  Code: "AgentModelList",
12080
- Data: options.allFields ? models2 : models2.map(formatModel2)
12129
+ Data: options.allFields ? models : models.map(formatModel2)
12081
12130
  });
12082
12131
  });
12083
12132
  };
12084
12133
 
12085
- // ../../node_modules/@uipath/flow-schema/dist/chunk-4P5M5KWK.js
12134
+ // ../../node_modules/@uipath/flow-schema/dist/chunk-QKQ47GQZ.js
12135
+ var __glob = (map) => (path) => {
12136
+ var fn = map[path];
12137
+ if (fn)
12138
+ return fn();
12139
+ throw new Error("Module not found in bundle: " + path);
12140
+ };
12141
+
12142
+ // ../../node_modules/@uipath/flow-schema/dist/chunk-2VO2NOQC.js
12086
12143
  var SUPPORTED_LOCALES = ["en", "es", "pt", "de", "fr", "ja", "ko", "ru", "tr", "ro", "zh-CN", "zh-TW", "pt-BR", "es-MX"];
12087
12144
  function normalizeCasing(locale) {
12088
12145
  const [language, country] = locale.split("-");
@@ -12133,20 +12190,20 @@ function createI18nRegistrar(options) {
12133
12190
  };
12134
12191
  }
12135
12192
  var globImport_locales_json = __glob({
12136
- "../../locales/de.json": () => import("./de-MUJPA4EB-209jpeqe.js"),
12137
- "../../locales/en.json": () => import("./en-GN2ZGWUE-03z2df4k.js"),
12138
- "../../locales/es-MX.json": () => import("./es-MX-2MYFZU7X-6v0q5rbn.js"),
12139
- "../../locales/es.json": () => import("./es-7SE7HX2X-qda7whn6.js"),
12140
- "../../locales/fr.json": () => import("./fr-MDFKNZ4C-qmypp92m.js"),
12141
- "../../locales/ja.json": () => import("./ja-UTQEAP34-hvyf683h.js"),
12142
- "../../locales/ko.json": () => import("./ko-AXCHW2OK-pkwdcbmx.js"),
12143
- "../../locales/pt-BR.json": () => import("./pt-BR-Y6K6XHXK-37a932vp.js"),
12144
- "../../locales/pt.json": () => import("./pt-3DIO5QWG-hb763vct.js"),
12145
- "../../locales/ro.json": () => import("./ro-BWR3ONRR-jmap5ajd.js"),
12146
- "../../locales/ru.json": () => import("./ru-WBLQ5B2U-8r3c7v6d.js"),
12147
- "../../locales/tr.json": () => import("./tr-5IIHSFW5-stsb3dar.js"),
12148
- "../../locales/zh-CN.json": () => import("./zh-CN-R2KU4U5L-q4yhc33t.js"),
12149
- "../../locales/zh-TW.json": () => import("./zh-TW-GNKMELBF-r4ay2475.js")
12193
+ "../../locales/de.json": () => import("./de-AI7ML6JM-km47f8k4.js"),
12194
+ "../../locales/en.json": () => import("./en-LAVDF7IQ-xe939kq1.js"),
12195
+ "../../locales/es-MX.json": () => import("./es-MX-7KJZPEQN-1fq0a9jr.js"),
12196
+ "../../locales/es.json": () => import("./es-SPNKTD5Y-vw5cbgv5.js"),
12197
+ "../../locales/fr.json": () => import("./fr-AXJGUT53-hdg3pmd4.js"),
12198
+ "../../locales/ja.json": () => import("./ja-C7GZV6YP-hvtbngr5.js"),
12199
+ "../../locales/ko.json": () => import("./ko-Q24HSSL4-5vn55pte.js"),
12200
+ "../../locales/pt-BR.json": () => import("./pt-BR-BIUJXIPU-2sqzhr8y.js"),
12201
+ "../../locales/pt.json": () => import("./pt-MHX6JGAX-xfgvdqwg.js"),
12202
+ "../../locales/ro.json": () => import("./ro-3RKJNGJZ-xqj14e3d.js"),
12203
+ "../../locales/ru.json": () => import("./ru-WBLQ5B2U-bf20yr5y.js"),
12204
+ "../../locales/tr.json": () => import("./tr-PQLUUHPC-qsb7btxn.js"),
12205
+ "../../locales/zh-CN.json": () => import("./zh-CN-OHNTHZRI-b0hjkfqn.js"),
12206
+ "../../locales/zh-TW.json": () => import("./zh-TW-E4D3Y6ZR-tn3bmzz5.js")
12150
12207
  });
12151
12208
  var VALIDATION_NAMESPACE = "validation";
12152
12209
  var registerFlowSchemaI18n = createI18nRegistrar({
@@ -12154,17 +12211,89 @@ var registerFlowSchemaI18n = createI18nRegistrar({
12154
12211
  englishBundle: en_default,
12155
12212
  loadCatalog: (lng) => globImport_locales_json(`../../locales/${lng}.json`)
12156
12213
  });
12157
- // ../../node_modules/@uipath/flow-schema/dist/chunk-GWRTD4DY.js
12158
- var expressionFieldTypeSchema = exports_external.enum(["string", "number", "boolean", "object", "array", "null"]);
12159
- var expressionModeSchema = exports_external.enum(["literal", "jsExpression"]);
12160
- var expressionValueSchema = exports_external.object({
12214
+ // ../../node_modules/@uipath/flow-schema/dist/chunk-SL4QEZOZ.js
12215
+ var JS_EXPRESSION_PREFIX = "=js:";
12216
+ var expressionFieldTypeSchema = _enum(["string", "number", "boolean", "object", "array", "null"]);
12217
+ var expressionModeSchema = _enum(["literal", "jsExpression"]);
12218
+ var expressionValueSchema = object({
12161
12219
  type: expressionModeSchema,
12162
- expression: exports_external.string(),
12220
+ expression: string(),
12163
12221
  fieldType: expressionFieldTypeSchema
12164
12222
  }).strict();
12165
- var expressionLikeSchema = exports_external.union([exports_external.string(), expressionValueSchema]);
12223
+ var expressionLikeSchema = union([string(), expressionValueSchema]);
12224
+ function isExpressionValue(v) {
12225
+ return expressionValueSchema.safeParse(v).success;
12226
+ }
12227
+ function decodeLiteral(ev) {
12228
+ if (ev.type === "jsExpression")
12229
+ return ev.expression;
12230
+ switch (ev.fieldType) {
12231
+ case "string":
12232
+ return ev.expression;
12233
+ case "number":
12234
+ return ev.expression === "" ? undefined : Number(ev.expression);
12235
+ case "boolean":
12236
+ return ev.expression === "" ? undefined : ev.expression === "true";
12237
+ case "null":
12238
+ return null;
12239
+ case "object":
12240
+ case "array":
12241
+ if (ev.expression === "")
12242
+ return;
12243
+ try {
12244
+ return JSON.parse(ev.expression);
12245
+ } catch {
12246
+ return;
12247
+ }
12248
+ }
12249
+ }
12250
+ var RESERVED_WORDS = [
12251
+ "break",
12252
+ "case",
12253
+ "catch",
12254
+ "continue",
12255
+ "debugger",
12256
+ "default",
12257
+ "delete",
12258
+ "do",
12259
+ "else",
12260
+ "finally",
12261
+ "for",
12262
+ "function",
12263
+ "if",
12264
+ "in",
12265
+ "instanceof",
12266
+ "new",
12267
+ "return",
12268
+ "switch",
12269
+ "this",
12270
+ "throw",
12271
+ "try",
12272
+ "typeof",
12273
+ "var",
12274
+ "void",
12275
+ "while",
12276
+ "with",
12277
+ "class",
12278
+ "const",
12279
+ "enum",
12280
+ "export",
12281
+ "extends",
12282
+ "import",
12283
+ "super",
12284
+ "implements",
12285
+ "interface",
12286
+ "let",
12287
+ "package",
12288
+ "private",
12289
+ "protected",
12290
+ "public",
12291
+ "static",
12292
+ "yield"
12293
+ ];
12294
+ var RESERVED_WORD_SET = new Set(RESERVED_WORDS);
12166
12295
 
12167
- // ../../node_modules/@uipath/flow-schema/dist/chunk-M4DXYS4M.js
12296
+ // ../../node_modules/@uipath/flow-schema/dist/chunk-HI5GJO4X.js
12168
12297
  var import_ajv_errors = __toESM(require_dist(), 1);
12169
12298
 
12170
12299
  // ../../node_modules/i18next/dist/esm/i18next.js
@@ -12780,23 +12909,23 @@ class Translator extends EventEmitter {
12780
12909
  }
12781
12910
  if (keySeparator) {
12782
12911
  const resTypeIsArray = Array.isArray(res);
12783
- const copy2 = resTypeIsArray ? [] : {};
12912
+ const copy = resTypeIsArray ? [] : {};
12784
12913
  const newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;
12785
12914
  for (const m in res) {
12786
12915
  if (Object.prototype.hasOwnProperty.call(res, m)) {
12787
12916
  const deepKey = `${newKeyToUse}${keySeparator}${m}`;
12788
- copy2[m] = this.translate(deepKey, {
12917
+ copy[m] = this.translate(deepKey, {
12789
12918
  ...options,
12790
12919
  ...{
12791
12920
  joinArrays: false,
12792
12921
  ns: namespaces
12793
12922
  }
12794
12923
  });
12795
- if (copy2[m] === deepKey)
12796
- copy2[m] = res[m];
12924
+ if (copy[m] === deepKey)
12925
+ copy[m] = res[m];
12797
12926
  }
12798
12927
  }
12799
- res = copy2;
12928
+ res = copy;
12800
12929
  }
12801
12930
  } else if (handleAsObjectInI18nFormat && isString(joinArrays) && Array.isArray(res)) {
12802
12931
  res = res.join(joinArrays);
@@ -14722,14 +14851,14 @@ var loadLanguages = instance.loadLanguages;
14722
14851
  class Hooks {
14723
14852
  add(name, callback, first) {
14724
14853
  if (typeof arguments[0] != "string") {
14725
- for (let name2 in arguments[0]) {
14726
- this.add(name2, arguments[0][name2], arguments[1]);
14854
+ for (let name in arguments[0]) {
14855
+ this.add(name, arguments[0][name], arguments[1]);
14727
14856
  }
14728
14857
  } else {
14729
- (Array.isArray(name) ? name : [name]).forEach(function(name2) {
14730
- this[name2] = this[name2] || [];
14858
+ (Array.isArray(name) ? name : [name]).forEach(function(name) {
14859
+ this[name] = this[name] || [];
14731
14860
  if (callback) {
14732
- this[name2][first ? "unshift" : "push"](callback);
14861
+ this[name][first ? "unshift" : "push"](callback);
14733
14862
  }
14734
14863
  }, this);
14735
14864
  }
@@ -15355,9 +15484,9 @@ jsep.Jsep = Jsep;
15355
15484
  var CONDITIONAL_EXP = "ConditionalExpression";
15356
15485
  var ternary = {
15357
15486
  name: "ternary",
15358
- init(jsep2) {
15359
- jsep2.hooks.add("after-expression", function gobbleTernary(env) {
15360
- if (env.node && this.code === jsep2.QUMARK_CODE) {
15487
+ init(jsep) {
15488
+ jsep.hooks.add("after-expression", function gobbleTernary(env) {
15489
+ if (env.node && this.code === jsep.QUMARK_CODE) {
15361
15490
  this.index++;
15362
15491
  const test = env.node;
15363
15492
  const consequent = this.gobbleExpression();
@@ -15365,7 +15494,7 @@ var ternary = {
15365
15494
  this.throwError("Expected expression");
15366
15495
  }
15367
15496
  this.gobbleSpaces();
15368
- if (this.code === jsep2.COLON_CODE) {
15497
+ if (this.code === jsep.COLON_CODE) {
15369
15498
  this.index++;
15370
15499
  const alternate = this.gobbleExpression();
15371
15500
  if (!alternate) {
@@ -15377,9 +15506,9 @@ var ternary = {
15377
15506
  consequent,
15378
15507
  alternate
15379
15508
  };
15380
- if (test.operator && jsep2.binary_ops[test.operator] <= 0.9) {
15509
+ if (test.operator && jsep.binary_ops[test.operator] <= 0.9) {
15381
15510
  let newTest = test;
15382
- while (newTest.right.operator && jsep2.binary_ops[newTest.right.operator] <= 0.9) {
15511
+ while (newTest.right.operator && jsep.binary_ops[newTest.right.operator] <= 0.9) {
15383
15512
  newTest = newTest.right;
15384
15513
  }
15385
15514
  env.node.test = newTest.right;
@@ -15395,24 +15524,42 @@ var ternary = {
15395
15524
  };
15396
15525
  jsep.plugins.register(ternary);
15397
15526
 
15398
- // ../../node_modules/@uipath/flow-schema/dist/chunk-M4DXYS4M.js
15399
- var agentEnforcementsSchema = exports_external.object({
15400
- maxTokens: exports_external.number().nullable(),
15401
- maxTemperature: exports_external.number().nullable(),
15402
- policyName: exports_external.string(),
15403
- shouldEnforceHumanInTheLoop: exports_external.boolean().optional(),
15404
- maxIterations: exports_external.number().nullable().optional()
15527
+ // ../../node_modules/@uipath/flow-schema/dist/chunk-HI5GJO4X.js
15528
+ var agentEnforcementsSchema = object({
15529
+ maxTokens: number().nullable(),
15530
+ maxTemperature: number().nullable(),
15531
+ policyName: string(),
15532
+ shouldEnforceHumanInTheLoop: boolean().optional(),
15533
+ maxIterations: number().nullable().optional()
15405
15534
  });
15406
15535
  var t2 = instance.getFixedT(null, VALIDATION_NAMESPACE);
15536
+ var AJV_KEYWORD_CODES = {
15537
+ required: "REQUIRED_FIELD",
15538
+ minLength: "REQUIRED_FIELD",
15539
+ type: "TYPE_MISMATCH",
15540
+ enum: "INVALID_ENUM",
15541
+ pattern: "INVALID_PATTERN",
15542
+ minimum: "OUT_OF_RANGE",
15543
+ maximum: "OUT_OF_RANGE",
15544
+ exclusiveMinimum: "OUT_OF_RANGE",
15545
+ exclusiveMaximum: "OUT_OF_RANGE"
15546
+ };
15547
+ var FALLBACK_SCHEMA_CODE = "SCHEMA_ERROR";
15548
+ var SCHEMA_ERROR_CODES = /* @__PURE__ */ new Set([...Object.values(AJV_KEYWORD_CODES), FALLBACK_SCHEMA_CODE]);
15407
15549
  var t22 = instance.getFixedT(null, VALIDATION_NAMESPACE);
15550
+ var DECISION_NODE_TYPE = "core.logic.decision";
15551
+ var SWITCH_NODE_TYPE = "core.logic.switch";
15408
15552
  var AUTONOMOUS_AGENT_NODE_TYPE = "uipath.agent.autonomous";
15409
15553
  var CONVERSATIONAL_AGENT_NODE_TYPE = "uipath.agent.conversational";
15410
15554
  var VOICE_AGENT_NODE_TYPE = "uipath.agent.voice";
15411
15555
  var AGENT_NODE_TYPES = [AUTONOMOUS_AGENT_NODE_TYPE, CONVERSATIONAL_AGENT_NODE_TYPE, VOICE_AGENT_NODE_TYPE];
15556
+ function isVoiceAgentNodeType(nodeType2) {
15557
+ return nodeType2 === VOICE_AGENT_NODE_TYPE;
15558
+ }
15412
15559
  function isAgentNodeType(nodeType2) {
15413
15560
  if (!nodeType2)
15414
15561
  return false;
15415
- return AGENT_NODE_TYPES.some((t13) => nodeType2 === t13 || nodeType2.startsWith(`${t13}.`));
15562
+ return AGENT_NODE_TYPES.some((t16) => nodeType2 === t16 || nodeType2.startsWith(`${t16}.`));
15416
15563
  }
15417
15564
  var t3 = instance.getFixedT(null, VALIDATION_NAMESPACE);
15418
15565
  var t4 = instance.getFixedT(null, VALIDATION_NAMESPACE);
@@ -15426,11 +15573,323 @@ var ESCALATION_TASK_TYPES = new Set(Object.values(ESCALATION_TASK_TYPE));
15426
15573
  var DEFAULT_STORAGE_VERSION = currentStorageSchema.version;
15427
15574
  var t6 = instance.getFixedT(null, VALIDATION_NAMESPACE);
15428
15575
  var t7 = instance.getFixedT(null, VALIDATION_NAMESPACE);
15429
- var t8 = instance.getFixedT(null, VALIDATION_NAMESPACE);
15430
- var t9 = instance.getFixedT(null, VALIDATION_NAMESPACE);
15431
- var VARS_PATH_CAPTURE = String.raw`[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*|\[\d+\])*`;
15432
- var VARS_REF_REGEX = new RegExp(String.raw`\{\{\s*\$vars\.(${VARS_PATH_CAPTURE})\s*\}\}`, "g");
15433
- var RAW_VARS_REF_REGEX = new RegExp(String.raw`(?<!\w)\$vars\.(${VARS_PATH_CAPTURE})`, "g");
15576
+ var JEV_STATE_ARGUMENT = "state";
15577
+ var JEV_QUESTIONS_ARGUMENT = "questions";
15578
+ var JEV_NAME_PATTERN_SOURCE = "^[A-Za-z_][A-Za-z0-9_]{0,63}$";
15579
+ var JEV_CHOICE_MIN_OPTIONS = 2;
15580
+ var JEV_CHOICE_MAX_OPTIONS = 255;
15581
+ var JEV_SCORE_MIN_LEVELS = 2;
15582
+ var JEV_SCORE_MAX_LEVELS = 10;
15583
+ var JEV_QUESTION_TYPES = ["choice", "score", "noul"];
15584
+ var JEV_DEFAULT_STATE_DESCRIPTIONS = {
15585
+ string: "The text to classify.",
15586
+ object: "The object to classify.",
15587
+ array: "The items to classify."
15588
+ };
15589
+ var JEV_QUESTIONS_DEFAULT_DESCRIPTION = 'The questions Jev answers about the state, each answered with calibrated probabilities. Use "choice" to pick one of several options, "score" to rate on ordered levels from lowest to highest, and "noul" for the probability that a statement holds true. Give each question a unique name; it becomes the key of its answer in the tool output.';
15590
+ var createJevValueSource = (mode = "prompt", patch = {}) => ({
15591
+ mode,
15592
+ textValue: "",
15593
+ promptValue: "",
15594
+ argumentPath: "",
15595
+ ...patch
15596
+ });
15597
+ var createJevStateProperty = (name = "") => ({
15598
+ name,
15599
+ type: "string",
15600
+ description: "",
15601
+ required: true,
15602
+ value: createJevValueSource("prompt")
15603
+ });
15604
+ var createJevScoreLevels = () => ["", ""];
15605
+ var DEFAULT_QUESTIONS = [
15606
+ {
15607
+ name: "sentiment",
15608
+ type: "choice",
15609
+ instructions: "The overall sentiment expressed in the text",
15610
+ options: [
15611
+ { name: "positive", description: "Satisfied, happy or appreciative" },
15612
+ { name: "neutral", description: "" },
15613
+ { name: "negative", description: "Unhappy, frustrated or complaining" }
15614
+ ],
15615
+ levels: createJevScoreLevels(),
15616
+ criteria: { true: "", false: "" }
15617
+ }
15618
+ ];
15619
+ var createDefaultJevClassifierConfig = () => ({
15620
+ state: {
15621
+ type: "string",
15622
+ source: "prompt",
15623
+ description: "",
15624
+ argumentPath: "",
15625
+ text: "",
15626
+ json: "",
15627
+ properties: [createJevStateProperty()],
15628
+ itemsType: "string",
15629
+ itemProperties: [createJevStateProperty()]
15630
+ },
15631
+ questions: {
15632
+ source: "static",
15633
+ description: "",
15634
+ argumentPath: "",
15635
+ items: structuredClone(DEFAULT_QUESTIONS),
15636
+ builder: []
15637
+ }
15638
+ });
15639
+ var JEV_QUESTION_FIELDS = {
15640
+ choice: ["instructions", "options"],
15641
+ score: ["instructions", "levels"],
15642
+ noul: ["instructions", "criteria"]
15643
+ };
15644
+ var jevStateDeclaresShape = (state) => state.source === "prompt" || state.source === "builder" && state.type === "object";
15645
+ var TOKEN_PATTERN = /\{\{[^}]*\}\}/;
15646
+ var getJevFixedText = (source) => source.mode === "text-builder" && !TOKEN_PATTERN.test(source.textValue) ? source.textValue : undefined;
15647
+ var withDescription = (schema, description) => description ? { ...schema, description } : schema;
15648
+ var buildStatePropertySchema = (type) => type === "array" ? { type: "array", items: { type: "string" } } : { type };
15649
+ var statePropertyDescription = (property, builder) => builder && property.value.mode === "prompt" ? property.value.promptValue || property.description : property.description;
15650
+ var buildStateObjectSchema = (properties, builder = false) => ({
15651
+ type: "object",
15652
+ properties: Object.fromEntries(properties.map((property) => [
15653
+ property.name,
15654
+ withDescription(buildStatePropertySchema(property.type), statePropertyDescription(property, builder))
15655
+ ])),
15656
+ required: properties.filter((property) => property.required).map((property) => property.name)
15657
+ });
15658
+ var buildJevStateSchema = (state) => {
15659
+ const description = state.source === "prompt" && state.description.trim() || JEV_DEFAULT_STATE_DESCRIPTIONS[state.type];
15660
+ const declares = jevStateDeclaresShape(state);
15661
+ switch (state.type) {
15662
+ case "string":
15663
+ return { type: "string", description };
15664
+ case "object": {
15665
+ const schema = declares && state.properties.length > 0 ? buildStateObjectSchema(state.properties, state.source === "builder") : {};
15666
+ return { type: "object", ...schema, description };
15667
+ }
15668
+ case "array": {
15669
+ if (!declares)
15670
+ return { type: "array", description };
15671
+ const items = state.itemsType === "object" ? buildStateObjectSchema(state.itemProperties) : { type: "string" };
15672
+ return { type: "array", items, description };
15673
+ }
15674
+ }
15675
+ };
15676
+ var QUESTION_NAME_SCHEMA = {
15677
+ type: "string",
15678
+ pattern: JEV_NAME_PATTERN_SOURCE,
15679
+ description: "Unique identifier of the question and the key of its answer in the tool output."
15680
+ };
15681
+ var QUESTION_INSTRUCTIONS_SCHEMA = {
15682
+ type: "string",
15683
+ description: "The question to answer about the state, written as an instruction."
15684
+ };
15685
+ var OPTION_SCHEMA = {
15686
+ type: "object",
15687
+ properties: {
15688
+ name: { type: "string", description: "The option's value, returned as the answer." },
15689
+ description: { type: "string", description: "What the option means." }
15690
+ },
15691
+ required: ["name"]
15692
+ };
15693
+ var optionsSchema = (description) => ({
15694
+ type: "array",
15695
+ minItems: JEV_CHOICE_MIN_OPTIONS,
15696
+ maxItems: JEV_CHOICE_MAX_OPTIONS,
15697
+ ...description ? { description } : {},
15698
+ items: OPTION_SCHEMA
15699
+ });
15700
+ var criteriaSchema = (description) => ({
15701
+ type: "object",
15702
+ description,
15703
+ properties: {
15704
+ true: { type: "string", description: "What counts as a true answer." },
15705
+ false: { type: "string", description: "What counts as a false answer." }
15706
+ }
15707
+ });
15708
+ var levelsSchema = (description) => ({
15709
+ type: "array",
15710
+ minItems: JEV_SCORE_MIN_LEVELS,
15711
+ maxItems: JEV_SCORE_MAX_LEVELS,
15712
+ items: { type: "string" },
15713
+ ...description ? { description } : {}
15714
+ });
15715
+ var QUESTION_ITEM_SCHEMA = {
15716
+ type: "object",
15717
+ properties: {
15718
+ name: QUESTION_NAME_SCHEMA,
15719
+ type: {
15720
+ type: "string",
15721
+ enum: [...JEV_QUESTION_TYPES],
15722
+ description: "choice: pick one option. score: rate on ordered levels. noul: probability that a statement holds true."
15723
+ },
15724
+ instructions: QUESTION_INSTRUCTIONS_SCHEMA,
15725
+ options: optionsSchema("Required when type is choice; omit otherwise."),
15726
+ levels: levelsSchema("Required when type is score, from lowest to highest; omit otherwise."),
15727
+ criteria: criteriaSchema("What counts as a true or a false answer (noul); omit otherwise.")
15728
+ },
15729
+ required: ["name", "type", "instructions"]
15730
+ };
15731
+ var buildJevQuestionsListSchema = (description) => ({
15732
+ type: "array",
15733
+ minItems: 1,
15734
+ description: description?.trim() || JEV_QUESTIONS_DEFAULT_DESCRIPTION,
15735
+ items: QUESTION_ITEM_SCHEMA
15736
+ });
15737
+ var builderFieldDescription = (question, field) => {
15738
+ if (field === "instructions")
15739
+ return question.instructions.mode === "prompt" ? question.instructions.promptValue || undefined : undefined;
15740
+ const source = question[field];
15741
+ return source.mode === "prompt" ? source.promptValue || undefined : undefined;
15742
+ };
15743
+ var BUILDER_FIELD_SCHEMAS = {
15744
+ instructions: (description) => withDescription(QUESTION_INSTRUCTIONS_SCHEMA, description),
15745
+ options: (description) => optionsSchema(description || "The options to choose from."),
15746
+ levels: (description) => levelsSchema(description || "The levels to rate on, from lowest to highest."),
15747
+ criteria: (description) => criteriaSchema(description || "What counts as a true or a false answer.")
15748
+ };
15749
+ var buildJevQuestionsBuilderSchema = (questions) => ({
15750
+ type: "object",
15751
+ properties: Object.fromEntries(questions.map((question) => {
15752
+ const fields = JEV_QUESTION_FIELDS[question.type];
15753
+ return [
15754
+ question.name,
15755
+ {
15756
+ type: "object",
15757
+ properties: {
15758
+ type: { type: "string", enum: [question.type] },
15759
+ ...Object.fromEntries(fields.map((field) => [field, BUILDER_FIELD_SCHEMAS[field](builderFieldDescription(question, field))]))
15760
+ },
15761
+ required: ["type", ...fields.filter((field) => field !== "criteria")]
15762
+ }
15763
+ ];
15764
+ })),
15765
+ required: questions.map((question) => question.name)
15766
+ });
15767
+ var buildQuestionsSchema = (questions) => questions.source === "builder" ? buildJevQuestionsBuilderSchema(questions.builder) : buildJevQuestionsListSchema(questions.source === "prompt" ? questions.description : undefined);
15768
+ var buildJevClassifierInputSchema = (config) => ({
15769
+ type: "object",
15770
+ properties: {
15771
+ [JEV_STATE_ARGUMENT]: buildJevStateSchema(config.state),
15772
+ [JEV_QUESTIONS_ARGUMENT]: buildQuestionsSchema(config.questions)
15773
+ },
15774
+ required: [JEV_STATE_ARGUMENT, JEV_QUESTIONS_ARGUMENT]
15775
+ });
15776
+ var CONFIDENCE_PROPERTY = { type: "number", description: "Confidence in the answer, from 0 to 1." };
15777
+ var probabilitiesProperty = (description) => ({
15778
+ type: "object",
15779
+ additionalProperties: { type: "number" },
15780
+ description
15781
+ });
15782
+ var legendProperty = (description) => ({
15783
+ type: "object",
15784
+ additionalProperties: { type: "string" },
15785
+ description
15786
+ });
15787
+ var buildAnswerSchema = (question) => {
15788
+ const description = question.instructions ? { description: question.instructions } : {};
15789
+ const type = { type: "string", enum: [question.type] };
15790
+ switch (question.type) {
15791
+ case "choice":
15792
+ return {
15793
+ type: "object",
15794
+ ...description,
15795
+ properties: {
15796
+ type,
15797
+ choice: {
15798
+ type: "string",
15799
+ ...question.options ? { enum: [...question.options] } : {},
15800
+ description: "The selected option."
15801
+ },
15802
+ confidence: CONFIDENCE_PROPERTY,
15803
+ probabilities: probabilitiesProperty("Probability of each option, keyed by option name.")
15804
+ },
15805
+ required: ["type", "choice", "confidence", "probabilities"],
15806
+ additionalProperties: true
15807
+ };
15808
+ case "score": {
15809
+ const { levels } = question;
15810
+ const scoreDescription = levels ? `Probability-weighted level index from 0 to ${Math.max(levels.length - 1, 0)}; can land between levels. Levels: ${levels.map((level, index) => `${index}=${level}`).join(", ")}` : "Probability-weighted level index from 0 to the number of levels minus 1; can land between levels.";
15811
+ return {
15812
+ type: "object",
15813
+ ...description,
15814
+ properties: {
15815
+ type,
15816
+ score: { type: "number", description: scoreDescription },
15817
+ confidence: CONFIDENCE_PROPERTY,
15818
+ probabilities: probabilitiesProperty("Probability of each level, keyed by level index."),
15819
+ legend: legendProperty("The text of each level, keyed by level index, from lowest (0) to highest.")
15820
+ },
15821
+ required: ["type", "score", "confidence", "probabilities"],
15822
+ additionalProperties: true
15823
+ };
15824
+ }
15825
+ case "noul":
15826
+ return {
15827
+ type: "object",
15828
+ ...description,
15829
+ properties: {
15830
+ type,
15831
+ noul: { type: "number", description: "Probability that the answer is yes, from 0 (no) to 1 (yes)." }
15832
+ },
15833
+ required: ["type", "noul"],
15834
+ additionalProperties: true
15835
+ };
15836
+ }
15837
+ };
15838
+ var GENERIC_ANSWER_SCHEMA = {
15839
+ type: "object",
15840
+ properties: {
15841
+ type: { type: "string", enum: [...JEV_QUESTION_TYPES], description: "The question type." },
15842
+ choice: { type: "string", description: "The selected option (choice)." },
15843
+ score: {
15844
+ type: "number",
15845
+ description: "Probability-weighted level index, from 0 (lowest level) up; can land between levels (score)."
15846
+ },
15847
+ confidence: CONFIDENCE_PROPERTY,
15848
+ probabilities: probabilitiesProperty("Probability of each option, keyed by option name (choice), or of each level, keyed by level index (score)."),
15849
+ legend: legendProperty("The text of each level, keyed by level index (score)."),
15850
+ noul: { type: "number", description: "Probability that the answer is yes, from 0 to 1 (noul)." }
15851
+ },
15852
+ required: ["type"],
15853
+ additionalProperties: true
15854
+ };
15855
+ var keyedOutputSchema = (entries) => ({
15856
+ type: "object",
15857
+ properties: Object.fromEntries(entries.map(([name, question]) => [name, buildAnswerSchema(question)])),
15858
+ required: [...new Set(entries.map(([name]) => name))]
15859
+ });
15860
+ var buildJevClassifierOutputSchema = (config) => {
15861
+ const { questions } = config;
15862
+ switch (questions.source) {
15863
+ case "static":
15864
+ return keyedOutputSchema(questions.items.map((question) => [
15865
+ question.name,
15866
+ {
15867
+ type: question.type,
15868
+ instructions: question.instructions,
15869
+ ...question.type === "choice" ? { options: question.options.map((option) => option.name) } : {},
15870
+ ...question.type === "score" ? { levels: question.levels } : {}
15871
+ }
15872
+ ]));
15873
+ case "builder":
15874
+ return keyedOutputSchema(questions.builder.map((question) => [
15875
+ question.name,
15876
+ {
15877
+ type: question.type,
15878
+ instructions: getJevFixedText(question.instructions),
15879
+ ...question.type === "choice" && question.options.mode === "static" ? { options: question.options.value.map((option) => option.name) } : {},
15880
+ ...question.type === "score" && question.levels.mode === "static" ? { levels: question.levels.value } : {}
15881
+ }
15882
+ ]));
15883
+ case "prompt":
15884
+ case "variable":
15885
+ return {
15886
+ type: "object",
15887
+ description: "Answers keyed by question name.",
15888
+ properties: {},
15889
+ additionalProperties: GENERIC_ANSWER_SCHEMA
15890
+ };
15891
+ }
15892
+ };
15434
15893
  var JobAttachmentSchema = {
15435
15894
  type: "object",
15436
15895
  "x-uipath-resource-kind": "JobAttachment",
@@ -15590,14 +16049,57 @@ var HTTP_REQUEST_SCHEMA = {
15590
16049
  properties: {}
15591
16050
  }
15592
16051
  };
16052
+ var JEV_CLASSIFIER_SCHEMA = {
16053
+ inputSchema: buildJevClassifierInputSchema(createDefaultJevClassifierConfig()),
16054
+ outputSchema: buildJevClassifierOutputSchema(createDefaultJevClassifierConfig())
16055
+ };
16056
+ var CREATE_FILE_PATH_DESCRIPTIONS = {
16057
+ standard: "Not available for this agent. Leave this empty and put the file's text in content.",
16058
+ advanced: "Path of a file existing in your workspace (e.g., '/report.md'). Use this or content, not both."
16059
+ };
16060
+ var CREATE_FILE_SCHEMA = {
16061
+ inputSchema: {
16062
+ type: "object",
16063
+ properties: {
16064
+ fileName: {
16065
+ type: "string",
16066
+ description: "Name of the file to create, including its extension (e.g., 'summary.md' or 'accounts.csv'). The extension sets the file type, so it must match the content."
16067
+ },
16068
+ content: {
16069
+ type: "string",
16070
+ description: "Text content of the file."
16071
+ },
16072
+ filePath: {
16073
+ type: "string",
16074
+ description: CREATE_FILE_PATH_DESCRIPTIONS.standard
16075
+ }
16076
+ },
16077
+ required: ["fileName"]
16078
+ },
16079
+ outputSchema: {
16080
+ type: "object",
16081
+ properties: {
16082
+ file: {
16083
+ $ref: "#/definitions/job-attachment",
16084
+ description: "Reference to the created file"
16085
+ }
16086
+ },
16087
+ required: ["file"],
16088
+ definitions: {
16089
+ "job-attachment": JobAttachmentSchema
16090
+ }
16091
+ }
16092
+ };
15593
16093
  var BUILT_IN_TOOL_SCHEMAS = {
15594
16094
  "uipath.agent.resource.tool.builtin.analyzefiles": ANALYZE_FILES_SCHEMA,
15595
16095
  "uipath.agent.resource.tool.builtin.summarize": SUMMARIZE_SCHEMA,
15596
16096
  "uipath.agent.resource.tool.builtin.batchtransform": BATCH_TRANSFORM_SCHEMA,
15597
- "uipath.agent.resource.tool.builtin.httprequest": HTTP_REQUEST_SCHEMA
16097
+ "uipath.agent.resource.tool.builtin.httprequest": HTTP_REQUEST_SCHEMA,
16098
+ "uipath.agent.resource.tool.builtin.createfile": CREATE_FILE_SCHEMA,
16099
+ "uipath.agent.resource.tool.builtin.jevclassifier": JEV_CLASSIFIER_SCHEMA
15598
16100
  };
15599
16101
  var FILE_SCHEMA_FIELDS = Object.keys(JobAttachmentSchema.properties ?? {});
15600
- function isFileShapedInputNode(node) {
16102
+ function isFileShapedSchemaNode(node) {
15601
16103
  if (!node || typeof node !== "object")
15602
16104
  return false;
15603
16105
  const n = node;
@@ -15609,568 +16111,811 @@ function isFileShapedInputNode(node) {
15609
16111
  return true;
15610
16112
  if (n.properties && FILE_SCHEMA_FIELDS.every((field) => (field in n.properties)))
15611
16113
  return true;
15612
- return isFileShapedInputNode(n.items);
16114
+ return isFileShapedSchemaNode(n.items);
15613
16115
  }
15614
16116
  function schemaAcceptsFileInput(inputSchema) {
15615
16117
  const properties = inputSchema?.properties;
15616
16118
  if (!properties)
15617
16119
  return false;
15618
- return Object.values(properties).some(isFileShapedInputNode);
16120
+ return Object.values(properties).some(isFileShapedSchemaNode);
16121
+ }
16122
+ function schemaProducesFileOutput(outputSchema) {
16123
+ if (isFileShapedSchemaNode(outputSchema))
16124
+ return true;
16125
+ const properties = outputSchema?.properties;
16126
+ return properties ? Object.values(properties).some(isFileShapedSchemaNode) : false;
15619
16127
  }
15620
16128
  var FILE_CAPABLE_BUILTIN_TOOL_TYPES = new Set(Object.entries(BUILT_IN_TOOL_SCHEMAS).filter(([, schemas]) => schemaAcceptsFileInput(schemas.inputSchema)).map(([nodeType2]) => nodeType2));
16129
+ var FILE_PRODUCING_BUILTIN_TOOL_TYPES = new Set(Object.entries(BUILT_IN_TOOL_SCHEMAS).filter(([, schemas]) => schemaProducesFileOutput(schemas.outputSchema)).map(([nodeType2]) => nodeType2));
16130
+ var t8 = instance.getFixedT(null, VALIDATION_NAMESPACE);
16131
+ var t9 = instance.getFixedT(null, VALIDATION_NAMESPACE);
15621
16132
  var t10 = instance.getFixedT(null, VALIDATION_NAMESPACE);
16133
+ var ASSETS_PREFIX = "$assets";
16134
+ var VARIABLE_PATH_IDENTIFIER_PATTERN = String.raw`[a-zA-Z_]\w*`;
16135
+ var VARIABLE_PATH_QUOTED_KEY_PATTERN = String.raw`\[(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')\]`;
16136
+ var VARIABLE_PATH_SELECTOR_PATTERN = String.raw`(?:\[\d+\]|${VARIABLE_PATH_QUOTED_KEY_PATTERN}|\.${VARIABLE_PATH_IDENTIFIER_PATTERN})*`;
16137
+ var VARIABLE_PATH_PATTERN = `${VARIABLE_PATH_IDENTIFIER_PATTERN}${VARIABLE_PATH_SELECTOR_PATTERN}`;
16138
+ var IDENTIFIER_KEY_REGEX = new RegExp(`^${VARIABLE_PATH_IDENTIFIER_PATTERN}$`);
16139
+ var PATH_SEGMENT_REGEX = new RegExp(String.raw`(?:^|\.)(${VARIABLE_PATH_IDENTIFIER_PATTERN})|\[(\d+)\]|(${VARIABLE_PATH_QUOTED_KEY_PATTERN})`, "y");
16140
+ var QUOTED_KEY_REGEX = new RegExp(VARIABLE_PATH_QUOTED_KEY_PATTERN);
16141
+ var QUOTED_KEY_GLOBAL_REGEX = new RegExp(VARIABLE_PATH_QUOTED_KEY_PATTERN, "g");
16142
+ var ASSET_NAME_PATTERN = VARIABLE_PATH_IDENTIFIER_PATTERN;
16143
+ var ASSETS_REF_PATTERN = String.raw`(?<!\w)` + ASSETS_PREFIX.replace("$", String.raw`\$`) + String.raw`\.(${ASSET_NAME_PATTERN})(?![\w\x80-\uFFFF])`;
16144
+ var TRAILING_SELECTOR_REGEX = new RegExp(String.raw`(?:\.${VARIABLE_PATH_IDENTIFIER_PATTERN}|\[\d+\]|${VARIABLE_PATH_QUOTED_KEY_PATTERN})$`);
15622
16145
  var t11 = instance.getFixedT(null, VALIDATION_NAMESPACE);
16146
+ var VARS_PATH_CAPTURE = String.raw`[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*|\[\d+\]|${VARIABLE_PATH_QUOTED_KEY_PATTERN})*`;
16147
+ var QUOTED_KEY_GLOBAL = new RegExp(VARIABLE_PATH_QUOTED_KEY_PATTERN, "g");
16148
+ var VARS_REF_REGEX = new RegExp(String.raw`\{\{\s*\$vars\.(${VARS_PATH_CAPTURE})\s*\}\}`, "g");
16149
+ var RAW_VARS_REF_REGEX = new RegExp(String.raw`(?<!\w)\$vars\.(${VARS_PATH_CAPTURE})`, "g");
16150
+ var ASSETS_REF_REGEX = new RegExp(ASSETS_REF_PATTERN, "g");
15623
16151
  var t12 = instance.getFixedT(null, VALIDATION_NAMESPACE);
15624
-
15625
- // ../../node_modules/@uipath/flow-schema/dist/index.js
15626
- var import_object = __toESM(require_index_cjs(), 1);
15627
- var workflowRuntimeSchema = exports_external.enum(["maestro", "api-function"]);
15628
- var argumentBindingSchema = exports_external.object({
15629
- nodeId: exports_external.string(),
15630
- outputId: exports_external.string()
15631
- });
15632
- var workflowVariableSchema = exports_external.object({
15633
- id: exports_external.string().min(1),
15634
- direction: exports_external.enum(["in", "out", "inout"]),
15635
- type: exports_external.string().default("string"),
15636
- subType: exports_external.string().optional(),
15637
- schema: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
15638
- defaultValue: exports_external.unknown().optional(),
15639
- description: exports_external.string().optional(),
15640
- triggerNodeId: exports_external.string().optional()
15641
- });
15642
- var variableUpdateSchema = exports_external.object({
15643
- variableId: exports_external.string(),
15644
- expression: expressionLikeSchema
15645
- });
15646
- var nodeVariableSchema = exports_external.object({
15647
- id: exports_external.string().min(1),
15648
- type: exports_external.string().default("string"),
15649
- subType: exports_external.string().optional(),
15650
- schema: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
15651
- description: exports_external.string().optional(),
15652
- binding: argumentBindingSchema
15653
- });
15654
- var workflowVariablesSchema = exports_external.object({
15655
- globals: exports_external.array(workflowVariableSchema).optional(),
15656
- nodes: exports_external.array(nodeVariableSchema).optional(),
15657
- variableUpdates: exports_external.record(exports_external.string(), exports_external.array(variableUpdateSchema)).optional()
15658
- });
15659
- var EMPTY_VARIABLES = Object.freeze({ globals: [], nodes: [], variableUpdates: {} });
15660
- var workflowConnectionSchema = exports_external.object({
15661
- type: exports_external.enum(["cloud", "local"]),
15662
- environment: exports_external.enum(["cloud", "staging", "alpha"]).optional(),
15663
- baseUrl: exports_external.string().optional(),
15664
- organizationId: exports_external.string().optional(),
15665
- tenantId: exports_external.string().optional(),
15666
- tenantName: exports_external.string().optional(),
15667
- localUrl: exports_external.string().url().optional()
15668
- });
15669
- var nodeLayoutSchema = exports_external.looseObject({
15670
- position: exports_external.object({ x: exports_external.number(), y: exports_external.number() }),
15671
- size: exports_external.object({ width: exports_external.number(), height: exports_external.number() }).optional(),
15672
- collapsed: exports_external.boolean().optional()
15673
- });
15674
- var waypointSchema = exports_external.object({
15675
- id: exports_external.string(),
15676
- x: exports_external.number(),
15677
- y: exports_external.number()
15678
- });
15679
- var edgeLayoutSchema = exports_external.looseObject({
15680
- waypoints: exports_external.array(waypointSchema).optional(),
15681
- routedWaypoints: exports_external.array(waypointSchema).optional()
15682
- });
15683
- var layoutSchema = exports_external.object({
15684
- nodes: exports_external.record(exports_external.string(), nodeLayoutSchema),
15685
- edges: exports_external.record(exports_external.string(), edgeLayoutSchema).optional()
15686
- });
15687
- var bindingSchema = exports_external.object({
15688
- id: exports_external.string(),
15689
- name: exports_external.string(),
15690
- type: exports_external.string(),
15691
- resource: exports_external.string(),
15692
- resourceKey: exports_external.string(),
15693
- default: exports_external.string().optional(),
15694
- propertyAttribute: exports_external.string().optional(),
15695
- resourceSubType: exports_external.string().optional()
15696
- });
15697
- var categoryManifestSchema = exports_external.object({
15698
- id: exports_external.string().min(1),
15699
- name: exports_external.string().min(1),
15700
- description: exports_external.string().optional(),
15701
- parentId: exports_external.string().optional(),
15702
- sortOrder: exports_external.number().int().nonnegative(),
15703
- color: exports_external.string().min(1).optional(),
15704
- colorDark: exports_external.string().min(1).optional(),
15705
- icon: exports_external.string().min(1).optional(),
15706
- tags: exports_external.array(exports_external.string())
16152
+ var t13 = instance.getFixedT(null, VALIDATION_NAMESPACE);
16153
+ var t14 = instance.getFixedT(null, VALIDATION_NAMESPACE);
16154
+ var RETRY_BACKOFF = {
16155
+ static: "Static",
16156
+ linear: "Linear",
16157
+ exponential: "Exponential"
16158
+ };
16159
+ var RETRY_DEFAULTS = {
16160
+ maxCount: 1,
16161
+ initialDelay: "PT1S",
16162
+ backoffType: RETRY_BACKOFF.static,
16163
+ maxDuration: "PT30S",
16164
+ exponentialBase: 2
16165
+ };
16166
+ var BACKOFF_TYPES = Object.values(RETRY_BACKOFF);
16167
+ var t15 = instance.getFixedT(null, VALIDATION_NAMESPACE);
16168
+ var categoryManifestSchema = object({
16169
+ id: string().min(1),
16170
+ name: string().min(1),
16171
+ description: string().optional(),
16172
+ parentId: string().optional(),
16173
+ sortOrder: number().int().nonnegative(),
16174
+ color: string().min(1).optional(),
16175
+ colorDark: string().min(1).optional(),
16176
+ icon: string().min(1).optional(),
16177
+ tags: array(string())
15707
16178
  });
15708
- var handleTargetSchema = exports_external.object({
15709
- nodeType: exports_external.string(),
15710
- handleId: exports_external.string().optional()
16179
+ var handleTargetSchema = object({
16180
+ nodeType: string(),
16181
+ handleId: string().optional()
15711
16182
  });
15712
- var connectionConstraintSchema = exports_external.object({
15713
- maxConnections: exports_external.number().int().positive().optional(),
15714
- minConnections: exports_external.number().int().nonnegative().optional(),
15715
- allowedTargets: exports_external.array(handleTargetSchema).optional(),
15716
- forbiddenTargets: exports_external.array(handleTargetSchema).optional(),
15717
- allowedSources: exports_external.array(handleTargetSchema).optional(),
15718
- forbiddenSources: exports_external.array(handleTargetSchema).optional(),
15719
- allowedTargetCategories: exports_external.array(exports_external.string()).optional(),
15720
- forbiddenTargetCategories: exports_external.array(exports_external.string()).optional(),
15721
- allowedSourceCategories: exports_external.array(exports_external.string()).optional(),
15722
- forbiddenSourceCategories: exports_external.array(exports_external.string()).optional(),
15723
- customValidation: exports_external.string().optional(),
15724
- validationMessage: exports_external.string().optional(),
15725
- severity: exports_external["enum"]([
16183
+ var connectionConstraintSchema = object({
16184
+ maxConnections: number().int().positive().optional(),
16185
+ minConnections: number().int().nonnegative().optional(),
16186
+ allowedTargets: array(handleTargetSchema).optional(),
16187
+ forbiddenTargets: array(handleTargetSchema).optional(),
16188
+ allowedSources: array(handleTargetSchema).optional(),
16189
+ forbiddenSources: array(handleTargetSchema).optional(),
16190
+ allowedTargetCategories: array(string()).optional(),
16191
+ forbiddenTargetCategories: array(string()).optional(),
16192
+ allowedSourceCategories: array(string()).optional(),
16193
+ forbiddenSourceCategories: array(string()).optional(),
16194
+ customValidation: string().optional(),
16195
+ validationMessage: string().optional(),
16196
+ severity: _enum([
15726
16197
  "warning",
15727
16198
  "error",
15728
16199
  "critical",
15729
16200
  "info"
15730
16201
  ]).optional()
15731
16202
  });
15732
- var handlePositionSchema = exports_external["enum"]([
16203
+ var handlePositionSchema = _enum([
15733
16204
  "left",
15734
16205
  "top",
15735
16206
  "right",
15736
16207
  "bottom"
15737
16208
  ]);
15738
- var handleBoundarySchema = exports_external["enum"]([
16209
+ var handleBoundarySchema = _enum([
15739
16210
  "outer",
15740
16211
  "inner"
15741
16212
  ]);
15742
- var handleTypeSchema = exports_external["enum"]([
16213
+ var handleTypeSchema = _enum([
15743
16214
  "source",
15744
16215
  "target"
15745
16216
  ]);
15746
- var handleTypeDisplaySchema = exports_external["enum"]([
16217
+ var handleTypeDisplaySchema = _enum([
15747
16218
  "artifact",
15748
16219
  "input",
15749
16220
  "output"
15750
16221
  ]);
15751
- var handleLabelVisibilitySchema = exports_external["enum"]([
16222
+ var handleLabelVisibilitySchema = _enum([
15752
16223
  "always",
15753
16224
  "hover"
15754
16225
  ]);
15755
- var handleConfigurationSpecificPositionSchema = exports_external.object({
15756
- height: exports_external.number().optional(),
15757
- width: exports_external.number().optional(),
15758
- top: exports_external.number().optional(),
15759
- bottom: exports_external.number().optional(),
15760
- left: exports_external.number().optional(),
15761
- right: exports_external.number().optional()
16226
+ var handleConfigurationSpecificPositionSchema = object({
16227
+ height: number().optional(),
16228
+ width: number().optional(),
16229
+ top: number().optional(),
16230
+ bottom: number().optional(),
16231
+ left: number().optional(),
16232
+ right: number().optional()
15762
16233
  });
15763
- var handleManifestSchema = exports_external.object({
15764
- id: exports_external.string().min(1),
16234
+ var handleManifestSchema = object({
16235
+ id: string().min(1),
15765
16236
  type: handleTypeSchema,
15766
16237
  handleType: handleTypeDisplaySchema,
15767
- label: exports_external.string().optional(),
15768
- visible: exports_external.union([
15769
- exports_external.boolean(),
15770
- exports_external.string()
16238
+ label: string().optional(),
16239
+ visible: union([
16240
+ boolean(),
16241
+ string()
15771
16242
  ]).optional(),
15772
- repeat: exports_external.string().optional(),
15773
- itemVar: exports_external.string().optional(),
15774
- indexVar: exports_external.string().optional(),
15775
- showButton: exports_external.boolean().optional(),
16243
+ repeat: string().optional(),
16244
+ itemVar: string().optional(),
16245
+ indexVar: string().optional(),
16246
+ showButton: boolean().optional(),
15776
16247
  labelVisibility: handleLabelVisibilitySchema.optional(),
15777
16248
  constraints: connectionConstraintSchema.optional(),
15778
- isDefaultForType: exports_external.boolean().optional()
16249
+ isDefaultForType: boolean().optional()
15779
16250
  });
15780
- var handleGroupManifestSchema = exports_external.object({
16251
+ var handleGroupManifestSchema = object({
15781
16252
  position: handlePositionSchema,
15782
16253
  boundary: handleBoundarySchema.optional(),
15783
16254
  customPositionAndOffsets: handleConfigurationSpecificPositionSchema.optional(),
15784
- handles: exports_external.array(handleManifestSchema),
15785
- visible: exports_external.boolean().optional()
16255
+ handles: array(handleManifestSchema),
16256
+ visible: boolean().optional()
15786
16257
  });
15787
- var handleGroupOverrideSchema = exports_external.object({
16258
+ var handleGroupOverrideSchema = object({
15788
16259
  position: handlePositionSchema,
15789
- handles: exports_external.array(handleManifestSchema),
15790
- visible: exports_external.boolean().optional()
16260
+ handles: array(handleManifestSchema),
16261
+ visible: boolean().optional()
15791
16262
  });
15792
- var nodeShapeSchema = exports_external["enum"]([
16263
+ var nodeShapeSchema = _enum([
15793
16264
  "circle",
15794
16265
  "square",
15795
16266
  "rectangle",
15796
- "container"
16267
+ "container",
16268
+ "pill",
16269
+ "clipped",
16270
+ "document"
15797
16271
  ]);
15798
- var toolbarActionSchema = exports_external.object({
15799
- id: exports_external.string(),
15800
- icon: exports_external.string(),
15801
- label: exports_external.string(),
15802
- shortcut: exports_external.string().optional(),
15803
- condition: exports_external.object({
15804
- requiresPermissions: exports_external.array(exports_external.string()).optional(),
15805
- hideOnExecution: exports_external.boolean().optional(),
15806
- nodeTypes: exports_external.array(exports_external.string()).optional(),
15807
- shapes: exports_external.array(nodeShapeSchema).optional(),
15808
- handles: exports_external.array(exports_external.object({
15809
- handleType: exports_external["enum"]([
16272
+ var toolbarActionSchema = object({
16273
+ id: string(),
16274
+ icon: string(),
16275
+ label: string(),
16276
+ shortcut: string().optional(),
16277
+ condition: object({
16278
+ requiresPermissions: array(string()).optional(),
16279
+ hideOnExecution: boolean().optional(),
16280
+ nodeTypes: array(string()).optional(),
16281
+ shapes: array(nodeShapeSchema).optional(),
16282
+ handles: array(object({
16283
+ handleType: _enum([
15810
16284
  "output",
15811
16285
  "input",
15812
16286
  "artifact"
15813
16287
  ]),
15814
- type: exports_external["enum"]([
16288
+ type: _enum([
15815
16289
  "source",
15816
16290
  "target"
15817
16291
  ]).optional()
15818
16292
  })).optional()
15819
16293
  }).optional()
15820
16294
  });
15821
- var modeToolbarConfigSchema = exports_external.object({
15822
- actions: exports_external.array(toolbarActionSchema),
15823
- overflowActions: exports_external.array(toolbarActionSchema).optional()
16295
+ var modeToolbarConfigSchema = object({
16296
+ actions: array(toolbarActionSchema),
16297
+ overflowActions: array(toolbarActionSchema).optional()
15824
16298
  });
15825
- var toolbarConfigurationSchema = exports_external.record(exports_external.string(), modeToolbarConfigSchema);
15826
- var nodeDebugManifestSchema = exports_external.object({
15827
- runtime: exports_external.string().min(1)
16299
+ var toolbarConfigurationSchema = record(string(), modeToolbarConfigSchema);
16300
+ var nodeDebugManifestSchema = object({
16301
+ runtime: string().min(1)
16302
+ });
16303
+ var nodeContainerDisplayManifestSchema = object({
16304
+ kind: string().min(1).optional(),
16305
+ badge: union([
16306
+ literal(false),
16307
+ string().min(1)
16308
+ ]).optional(),
16309
+ subtitle: string().min(1).optional(),
16310
+ emptyStateLabel: string().min(1).optional(),
16311
+ borderStyle: _enum([
16312
+ "solid",
16313
+ "dashed"
16314
+ ]).optional(),
16315
+ accent: _enum([
16316
+ "default",
16317
+ "info",
16318
+ "warning",
16319
+ "error",
16320
+ "success"
16321
+ ]).optional(),
16322
+ radius: _enum([
16323
+ "default",
16324
+ "lg",
16325
+ "xl"
16326
+ ]).optional(),
16327
+ bodyFrame: _enum([
16328
+ "dashed",
16329
+ "solid",
16330
+ "none"
16331
+ ]).optional(),
16332
+ labelEditable: boolean().optional()
15828
16333
  });
15829
- var nodeDisplayManifestSchema = exports_external.object({
15830
- label: exports_external.string().min(1),
15831
- canvasLabel: exports_external.string().min(1).optional(),
15832
- description: exports_external.string().optional(),
15833
- icon: exports_external.string().min(1).optional(),
16334
+ var nodeDisplayManifestSchema = object({
16335
+ label: string().min(1),
16336
+ canvasLabel: string().min(1).optional(),
16337
+ description: string().optional(),
16338
+ icon: string().min(1).optional(),
15834
16339
  shape: nodeShapeSchema.optional(),
15835
- color: exports_external.string().optional(),
15836
- background: exports_external.string().optional(),
15837
- iconBackground: exports_external.string().optional(),
15838
- iconBackgroundDark: exports_external.string().optional(),
15839
- iconColor: exports_external.string().optional(),
15840
- shadow: exports_external.boolean().optional()
16340
+ color: string().optional(),
16341
+ background: string().optional(),
16342
+ iconBackground: string().optional(),
16343
+ iconBackgroundDark: string().optional(),
16344
+ iconColor: string().optional(),
16345
+ shadow: boolean().optional(),
16346
+ container: nodeContainerDisplayManifestSchema.optional()
15841
16347
  });
15842
- var nodeRuntimeConstraintsManifestSchema = exports_external.union([
15843
- exports_external.object({
15844
- include: exports_external.array(exports_external.string())
16348
+ var nodeRuntimeConstraintsManifestSchema = union([
16349
+ object({
16350
+ include: array(string())
15845
16351
  }),
15846
- exports_external.object({
15847
- exclude: exports_external.array(exports_external.string())
16352
+ object({
16353
+ exclude: array(string())
15848
16354
  })
15849
16355
  ]);
15850
- var nodeManifestSchema = exports_external.object({
15851
- nodeType: exports_external.string().min(1),
15852
- version: exports_external.string().min(1),
15853
- description: exports_external.string().optional(),
15854
- category: exports_external.string().min(1).optional(),
15855
- tags: exports_external.array(exports_external.string()),
15856
- sortOrder: exports_external.number().int().nonnegative(),
16356
+ var nodeManifestSchema = object({
16357
+ nodeType: string().min(1),
16358
+ version: string().min(1),
16359
+ description: string().optional(),
16360
+ category: string().min(1).optional(),
16361
+ tags: array(string()),
16362
+ sortOrder: number().int().nonnegative(),
15857
16363
  display: nodeDisplayManifestSchema,
15858
- handleConfiguration: exports_external.array(handleGroupManifestSchema),
16364
+ handleConfiguration: array(handleGroupManifestSchema),
15859
16365
  toolbarExtensions: toolbarConfigurationSchema.optional(),
15860
- suppressDefaultToolbarActions: exports_external.record(exports_external.string(), exports_external.array(exports_external.string())).optional(),
15861
- inputDefaults: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
15862
- inputDefinition: exports_external.record(exports_external.string(), exports_external.any()).optional(),
15863
- outputDefinition: exports_external.record(exports_external.string(), exports_external.any()).optional(),
15864
- drillable: exports_external.boolean().optional(),
16366
+ suppressDefaultToolbarActions: record(string(), array(string())).optional(),
16367
+ inputDefaults: record(string(), unknown()).optional(),
16368
+ inputDefinition: record(string(), any()).optional(),
16369
+ outputDefinition: record(string(), any()).optional(),
16370
+ drillable: boolean().optional(),
15865
16371
  debug: nodeDebugManifestSchema.optional(),
15866
- model: exports_external.any().optional(),
15867
- defaultProperties: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
15868
- form: exports_external.custom().optional(),
15869
- deprecated: exports_external.boolean().optional(),
16372
+ model: any().optional(),
16373
+ defaultProperties: record(string(), unknown()).optional(),
16374
+ form: custom().optional(),
16375
+ deprecated: boolean().optional(),
15870
16376
  runtimeConstraints: nodeRuntimeConstraintsManifestSchema.optional()
15871
16377
  });
15872
- var idSchema = exports_external.string().min(1);
15873
- var versionSchema = exports_external.string().regex(/^\d+\.\d+\.\d+$/, 'Version must be in semver format (e.g., "1.0.0")');
15874
- var typeVersionKeySchema = exports_external.string().regex(/^.+:\d+\.\d+\.\d+$/, 'TypeVersionKey must be in format "type:version" (e.g., "myType:1.0.0")');
15875
- var displayConfigSchema = exports_external.object({
15876
- label: exports_external.string().optional(),
15877
- canvasLabel: exports_external.string().optional(),
15878
- subLabel: exports_external.any().optional(),
16378
+ var idSchema = string().min(1);
16379
+ var versionSchema = string().regex(/^\d+\.\d+\.\d+$/, 'Version must be in semver format (e.g., "1.0.0")');
16380
+ var typeVersionKeySchema = string().regex(/^.+:\d+\.\d+\.\d+$/, 'TypeVersionKey must be in format "type:version" (e.g., "myType:1.0.0")');
16381
+ var displayConfigSchema = object({
16382
+ label: string().optional(),
16383
+ canvasLabel: string().optional(),
16384
+ subLabel: any().optional(),
15879
16385
  shape: nodeShapeSchema.optional(),
15880
- background: exports_external.string().optional(),
15881
- iconBackground: exports_external.string().optional(),
15882
- iconBackgroundDark: exports_external.string().optional(),
15883
- iconColor: exports_external.string().optional(),
15884
- icon: exports_external.string().optional(),
15885
- iconElement: exports_external.any().optional(),
15886
- color: exports_external.string().optional(),
15887
- labelTooltip: exports_external.string().optional(),
15888
- labelBackgroundColor: exports_external.string().optional(),
15889
- centerAdornmentComponent: exports_external.any().optional(),
15890
- footerComponent: exports_external.any().optional(),
15891
- footerVariant: exports_external.string().optional(),
15892
- shadow: exports_external.boolean().optional()
15893
- }).catchall(exports_external.unknown());
15894
- var waypointSchema2 = exports_external.object({
15895
- id: exports_external.string().min(1),
15896
- x: exports_external.number(),
15897
- y: exports_external.number()
16386
+ background: string().optional(),
16387
+ iconBackground: string().optional(),
16388
+ iconBackgroundDark: string().optional(),
16389
+ iconColor: string().optional(),
16390
+ icon: string().optional(),
16391
+ iconElement: any().optional(),
16392
+ color: string().optional(),
16393
+ labelTooltip: string().optional(),
16394
+ labelBackgroundColor: string().optional(),
16395
+ centerAdornmentComponent: any().optional(),
16396
+ footerComponent: any().optional(),
16397
+ footerVariant: string().optional(),
16398
+ shadow: boolean().optional()
16399
+ }).catchall(unknown());
16400
+ var waypointSchema = object({
16401
+ id: string().min(1),
16402
+ x: number(),
16403
+ y: number()
15898
16404
  });
15899
- var edgeUiSchema = exports_external.object({
15900
- waypoints: exports_external.array(waypointSchema2).optional(),
15901
- routedWaypoints: exports_external.array(waypointSchema2).optional(),
15902
- autoRouted: exports_external.boolean().optional()
15903
- }).catchall(exports_external.unknown());
15904
- var edgeSchema = exports_external.object({
16405
+ var edgeUiSchema = object({
16406
+ waypoints: array(waypointSchema).optional(),
16407
+ routedWaypoints: array(waypointSchema).optional(),
16408
+ autoRouted: boolean().optional()
16409
+ }).catchall(unknown());
16410
+ var edgeSchema = object({
15905
16411
  id: idSchema,
15906
16412
  sourceNodeId: idSchema,
15907
- sourcePort: exports_external.string().min(1),
16413
+ sourcePort: string().min(1),
15908
16414
  targetNodeId: idSchema,
15909
- targetPort: exports_external.string().min(1),
16415
+ targetPort: string().min(1),
15910
16416
  ui: edgeUiSchema.nullish().transform((value) => value ?? undefined).optional(),
15911
- data: exports_external.object({
15912
- label: exports_external.string().optional()
16417
+ data: object({
16418
+ label: string().optional()
15913
16419
  }).passthrough().optional()
15914
16420
  });
15915
- var uiSchema = exports_external.object({
15916
- position: exports_external.object({
15917
- x: exports_external.number(),
15918
- y: exports_external.number()
16421
+ var uiSchema = object({
16422
+ position: object({
16423
+ x: number(),
16424
+ y: number()
15919
16425
  }),
15920
- size: exports_external.object({
15921
- width: exports_external.number(),
15922
- height: exports_external.number()
16426
+ size: object({
16427
+ width: number(),
16428
+ height: number()
15923
16429
  }).optional(),
15924
- collapsed: exports_external.boolean().optional()
15925
- }).catchall(exports_external.unknown());
15926
- var nodeSchema = exports_external.object({
16430
+ collapsed: boolean().optional()
16431
+ }).catchall(unknown());
16432
+ var nodeSchema = object({
15927
16433
  id: idSchema,
15928
- type: exports_external.string().min(1),
16434
+ type: string().min(1),
15929
16435
  typeVersion: versionSchema,
15930
16436
  ui: uiSchema,
15931
16437
  display: displayConfigSchema,
15932
- inputs: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
15933
- outputs: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
15934
- handleCustomization: exports_external.object({
15935
- groups: exports_external.array(handleGroupOverrideSchema)
16438
+ inputs: record(string(), unknown()).optional(),
16439
+ outputs: record(string(), unknown()).optional(),
16440
+ handleCustomization: object({
16441
+ groups: array(handleGroupOverrideSchema)
15936
16442
  }).optional(),
15937
- model: exports_external.unknown().optional(),
16443
+ model: unknown().optional(),
15938
16444
  parentId: idSchema.optional()
15939
16445
  });
16446
+ var workflowRuntimeSchema = _enum(["maestro", "api-function"]);
16447
+ var argumentBindingSchema = object({
16448
+ nodeId: string(),
16449
+ outputId: string()
16450
+ });
16451
+ var workflowVariableSchema = object({
16452
+ id: string().min(1),
16453
+ direction: _enum(["in", "out", "inout"]),
16454
+ type: string().default("string"),
16455
+ subType: string().optional(),
16456
+ schema: record(string(), unknown()).optional(),
16457
+ defaultValue: unknown().optional(),
16458
+ description: string().optional(),
16459
+ triggerNodeId: string().optional()
16460
+ });
16461
+ var variableUpdateSchema = object({
16462
+ variableId: string(),
16463
+ expression: expressionLikeSchema
16464
+ });
16465
+ var nodeVariableSchema = object({
16466
+ id: string().min(1),
16467
+ type: string().default("string"),
16468
+ subType: string().optional(),
16469
+ schema: record(string(), unknown()).optional(),
16470
+ description: string().optional(),
16471
+ binding: argumentBindingSchema
16472
+ });
16473
+ var workflowVariablesSchema = object({
16474
+ globals: array(workflowVariableSchema).optional(),
16475
+ nodes: array(nodeVariableSchema).optional(),
16476
+ variableUpdates: record(string(), array(variableUpdateSchema)).optional()
16477
+ });
16478
+ var EMPTY_VARIABLES = Object.freeze({ globals: [], nodes: [], variableUpdates: {} });
16479
+ var workflowConnectionSchema = object({
16480
+ type: _enum(["cloud", "local"]),
16481
+ environment: _enum(["cloud", "staging", "alpha"]).optional(),
16482
+ baseUrl: string().optional(),
16483
+ organizationId: string().optional(),
16484
+ tenantId: string().optional(),
16485
+ tenantName: string().optional(),
16486
+ localUrl: string().url().optional()
16487
+ });
16488
+ var nodeLayoutSchema = looseObject({
16489
+ position: object({ x: number(), y: number() }),
16490
+ size: object({ width: number(), height: number() }).optional(),
16491
+ collapsed: boolean().optional()
16492
+ });
16493
+ var waypointSchema2 = object({
16494
+ id: string(),
16495
+ x: number(),
16496
+ y: number()
16497
+ });
16498
+ var edgeLayoutSchema = looseObject({
16499
+ waypoints: array(waypointSchema2).optional(),
16500
+ routedWaypoints: array(waypointSchema2).optional()
16501
+ });
16502
+ var layoutSchema = object({
16503
+ nodes: record(string(), nodeLayoutSchema),
16504
+ edges: record(string(), edgeLayoutSchema).optional()
16505
+ });
16506
+ var bindingSchema = object({
16507
+ id: string(),
16508
+ name: string(),
16509
+ type: string(),
16510
+ resource: string(),
16511
+ resourceKey: string(),
16512
+ default: string().optional(),
16513
+ propertyAttribute: string().optional(),
16514
+ resourceSubType: string().optional()
16515
+ });
16516
+ var nodeUniqueIdSchema = uuid();
15940
16517
  var edgeSchema2 = edgeSchema.extend({
15941
16518
  ui: edgeLayoutSchema.optional()
15942
16519
  });
15943
16520
  var nodeSchema2 = nodeSchema.extend({
15944
- typeVersion: exports_external.string().regex(/^\d+\.\d+(\.\d+)?$/, 'Version must be in format "x.y" or "x.y.z"')
16521
+ typeVersion: string().regex(/^\d+\.\d+(\.\d+)?$/, 'Version must be in format "x.y" or "x.y.z"'),
16522
+ uniqueId: nodeUniqueIdSchema.optional().catch(undefined)
15945
16523
  });
15946
- var nodeManifestSchema2 = exports_external.lazy(() => nodeManifestSchema.extend({
15947
- display: nodeDisplayManifestSchema.extend({ isPreview: exports_external.boolean().optional() }),
15948
- projectId: exports_external.string().optional(),
15949
- entryPointPath: exports_external.string().optional(),
15950
- unsupportedRuntime: exports_external.boolean().optional(),
15951
- takeoverTabs: exports_external.array(exports_external.string()).optional()
16524
+ var nodeManifestSchema2 = lazy(() => nodeManifestSchema.extend({
16525
+ display: nodeDisplayManifestSchema.extend({ isPreview: boolean().optional() }),
16526
+ projectId: string().optional(),
16527
+ entryPointPath: string().optional(),
16528
+ unsupportedRuntime: boolean().optional(),
16529
+ takeoverTabs: array(string()).optional(),
16530
+ maxInstances: union([number().int().positive(), record(string(), number().int().positive())]).optional()
15952
16531
  }));
15953
- var categoryManifestSchema2 = exports_external.lazy(() => categoryManifestSchema.extend({
15954
- displayIfEmpty: exports_external.boolean().optional()
16532
+ var categoryManifestSchema2 = lazy(() => categoryManifestSchema.extend({
16533
+ displayIfEmpty: boolean().optional()
15955
16534
  }));
15956
- var versionSchema2 = exports_external.string().regex(/^\d+\.\d+(\.\d+)?$/, 'Version must be in format "x.y" or "x.y.z"');
15957
- var subflowEntrySchema = exports_external.object({
15958
- nodes: exports_external.array(nodeSchema2),
15959
- edges: exports_external.array(edgeSchema2),
16535
+ var versionSchema2 = string().regex(/^\d+\.\d+(\.\d+)?$/, 'Version must be in format "x.y" or "x.y.z"');
16536
+ var SWITCH_CASE_HANDLE_PREFIX = "case-";
16537
+ var switchCaseHandle = (caseId) => `${SWITCH_CASE_HANDLE_PREFIX}${caseId}`;
16538
+ function asString2(value) {
16539
+ const raw = isExpressionValue(value) && value.type === "literal" ? decodeLiteral(value) : value;
16540
+ return typeof raw === "string" && raw.trim() ? raw : undefined;
16541
+ }
16542
+ function asBoolean(value) {
16543
+ const raw = isExpressionValue(value) && value.type === "literal" ? decodeLiteral(value) : value;
16544
+ return typeof raw === "boolean" ? raw : undefined;
16545
+ }
16546
+ function asExpressionText(value) {
16547
+ const raw = isExpressionValue(value) ? value.type === "jsExpression" ? value.expression : undefined : typeof value === "string" ? value : undefined;
16548
+ if (raw === undefined)
16549
+ return;
16550
+ const stripped = raw.startsWith(JS_EXPRESSION_PREFIX) ? raw.slice(JS_EXPRESSION_PREFIX.length) : raw;
16551
+ return asString2(stripped);
16552
+ }
16553
+ function getDecisionBranches(inputs) {
16554
+ const expression = asExpressionText(inputs.expression);
16555
+ const trueLabel = asString2(inputs.trueLabel);
16556
+ const falseLabel = asString2(inputs.falseLabel);
16557
+ const effective = expression ?? "false";
16558
+ return [
16559
+ {
16560
+ id: "true",
16561
+ handle: "true",
16562
+ label: trueLabel ?? "True",
16563
+ authoredLabel: trueLabel,
16564
+ expression,
16565
+ condition: effective,
16566
+ isFallback: false
16567
+ },
16568
+ {
16569
+ id: "false",
16570
+ handle: "false",
16571
+ label: falseLabel ?? "False",
16572
+ authoredLabel: falseLabel,
16573
+ expression,
16574
+ condition: `!(${effective}
16575
+ )`,
16576
+ isFallback: true
16577
+ }
16578
+ ];
16579
+ }
16580
+ function getCaseEntries(inputs) {
16581
+ const cases = Array.isArray(inputs.cases) ? inputs.cases : [];
16582
+ return cases.filter((entry) => typeof entry === "object" && entry !== null);
16583
+ }
16584
+ function getSwitchBranches(inputs) {
16585
+ const branches = [];
16586
+ getCaseEntries(inputs).forEach(({ id, label, expression }, index) => {
16587
+ const handleId = asString2(id);
16588
+ if (!handleId)
16589
+ return;
16590
+ const branchExpression = asExpressionText(expression);
16591
+ const caseLabel = asString2(label);
16592
+ branches.push({
16593
+ id: handleId,
16594
+ handle: switchCaseHandle(handleId),
16595
+ label: caseLabel ?? `Case ${index + 1}`,
16596
+ authoredLabel: caseLabel,
16597
+ expression: branchExpression,
16598
+ condition: branchExpression ?? "false",
16599
+ isFallback: false
16600
+ });
16601
+ });
16602
+ const defaultBranch = inputs.defaultBranch;
16603
+ const defaultLabel = asString2(defaultBranch?.label);
16604
+ branches.push({
16605
+ id: "default",
16606
+ handle: "default",
16607
+ label: defaultLabel ?? "Default",
16608
+ authoredLabel: defaultLabel,
16609
+ isFallback: true
16610
+ });
16611
+ return branches;
16612
+ }
16613
+ function getSwitchBranchLabels(inputs) {
16614
+ const defaultBranch = inputs.defaultBranch;
16615
+ const enabled = asBoolean(defaultBranch?.enabled);
16616
+ return {
16617
+ cases: getCaseEntries(inputs).map(({ id, label }) => ({ id: asString2(id), label: asString2(label) })),
16618
+ defaultBranch: { label: asString2(defaultBranch?.label), ...enabled !== undefined && { enabled } }
16619
+ };
16620
+ }
16621
+ var GATEWAYS = Object.assign(/* @__PURE__ */ Object.create(null), {
16622
+ [DECISION_NODE_TYPE]: {
16623
+ getBranches: getDecisionBranches,
16624
+ getBranchConditionSources: (inputs) => [inputs],
16625
+ getBranchLabels: (inputs) => ({ trueLabel: asString2(inputs.trueLabel), falseLabel: asString2(inputs.falseLabel) })
16626
+ },
16627
+ [SWITCH_NODE_TYPE]: {
16628
+ getBranches: getSwitchBranches,
16629
+ getBranchConditionSources: getCaseEntries,
16630
+ getBranchLabels: getSwitchBranchLabels
16631
+ }
16632
+ });
16633
+
16634
+ // ../../node_modules/@uipath/flow-schema/dist/index.js
16635
+ var import_object = __toESM(require_index_cjs(), 1);
16636
+ var subflowEntrySchema = object({
16637
+ nodes: array(nodeSchema2),
16638
+ edges: array(edgeSchema2),
15960
16639
  variables: workflowVariablesSchema.optional()
15961
16640
  });
15962
- var workflowSchema = exports_external.object({
16641
+ var workflowSchema = object({
15963
16642
  id: idSchema,
15964
16643
  version: versionSchema2,
15965
- name: exports_external.string().min(1),
15966
- description: exports_external.string().optional(),
16644
+ name: string().min(1),
16645
+ description: string().optional(),
15967
16646
  runtime: workflowRuntimeSchema.optional(),
15968
- nodes: exports_external.array(nodeSchema2),
15969
- edges: exports_external.array(edgeSchema2),
15970
- definitions: exports_external.array(nodeManifestSchema2),
15971
- bindings: exports_external.array(bindingSchema).optional(),
16647
+ nodes: array(nodeSchema2),
16648
+ edges: array(edgeSchema2),
16649
+ definitions: array(nodeManifestSchema2),
16650
+ bindings: array(bindingSchema).optional(),
15972
16651
  variables: workflowVariablesSchema.optional(),
15973
16652
  connection: workflowConnectionSchema.optional(),
15974
- subflows: exports_external.record(exports_external.string(), subflowEntrySchema).optional()
16653
+ subflows: record(string(), subflowEntrySchema).optional()
15975
16654
  });
15976
- var fileFormatNodeSchema = exports_external.lazy(() => nodeSchema2.extend({
16655
+ var fileFormatNodeSchema = lazy(() => nodeSchema2.extend({
15977
16656
  ui: nodeSchema2.shape.ui.optional()
15978
16657
  }));
15979
- var subflowFileSchema = exports_external.object({
15980
- nodes: exports_external.array(fileFormatNodeSchema),
15981
- edges: exports_external.array(edgeSchema2),
16658
+ var subflowFileSchema = object({
16659
+ nodes: array(fileFormatNodeSchema),
16660
+ edges: array(edgeSchema2),
15982
16661
  variables: workflowVariablesSchema.optional(),
15983
16662
  layout: layoutSchema.optional()
15984
16663
  });
15985
- var workflowSchemaV1_0_0 = exports_external.object({
16664
+ var workflowSchemaV1_0_0 = object({
15986
16665
  id: idSchema,
15987
- version: exports_external.literal("1.0.0"),
15988
- name: exports_external.string().min(1),
15989
- description: exports_external.string().optional(),
16666
+ version: literal("1.0.0"),
16667
+ name: string().min(1),
16668
+ description: string().optional(),
15990
16669
  runtime: workflowRuntimeSchema.optional(),
15991
- nodes: exports_external.array(fileFormatNodeSchema),
15992
- edges: exports_external.array(edgeSchema2),
15993
- definitions: exports_external.array(nodeManifestSchema2),
15994
- bindings: exports_external.array(bindingSchema).optional(),
16670
+ nodes: array(fileFormatNodeSchema),
16671
+ edges: array(edgeSchema2),
16672
+ definitions: array(nodeManifestSchema2),
16673
+ bindings: array(bindingSchema).optional(),
15995
16674
  variables: workflowVariablesSchema.optional(),
15996
16675
  connection: workflowConnectionSchema.optional(),
15997
- subflows: exports_external.record(exports_external.string(), subflowFileSchema).optional(),
16676
+ subflows: record(string(), subflowFileSchema).optional(),
15998
16677
  layout: layoutSchema.optional()
15999
16678
  });
16000
- var fileFormatNodeSchema2 = exports_external.lazy(() => nodeSchema2.extend({
16679
+ var fileFormatNodeSchema2 = lazy(() => nodeSchema2.extend({
16001
16680
  ui: nodeSchema2.shape.ui.optional()
16002
16681
  }));
16003
- var subflowFileSchema2 = exports_external.object({
16004
- nodes: exports_external.array(fileFormatNodeSchema2),
16005
- edges: exports_external.array(edgeSchema2),
16682
+ var subflowFileSchema2 = object({
16683
+ nodes: array(fileFormatNodeSchema2),
16684
+ edges: array(edgeSchema2),
16006
16685
  variables: workflowVariablesSchema.optional(),
16007
16686
  layout: layoutSchema.optional()
16008
16687
  });
16009
- var workflowSchemaV1_0 = exports_external.object({
16688
+ var workflowSchemaV1_0 = object({
16010
16689
  id: idSchema,
16011
- version: exports_external.literal("1.0"),
16012
- name: exports_external.string().min(1),
16013
- description: exports_external.string().optional(),
16690
+ version: literal("1.0"),
16691
+ name: string().min(1),
16692
+ description: string().optional(),
16014
16693
  runtime: workflowRuntimeSchema.optional(),
16015
- nodes: exports_external.array(fileFormatNodeSchema2),
16016
- edges: exports_external.array(edgeSchema2),
16017
- definitions: exports_external.array(nodeManifestSchema2),
16018
- bindings: exports_external.array(bindingSchema).optional(),
16694
+ nodes: array(fileFormatNodeSchema2),
16695
+ edges: array(edgeSchema2),
16696
+ definitions: array(nodeManifestSchema2),
16697
+ bindings: array(bindingSchema).optional(),
16019
16698
  variables: workflowVariablesSchema.optional(),
16020
16699
  connection: workflowConnectionSchema.optional(),
16021
- subflows: exports_external.record(exports_external.string(), subflowFileSchema2).optional(),
16700
+ subflows: record(string(), subflowFileSchema2).optional(),
16022
16701
  layout: layoutSchema.optional()
16023
16702
  });
16024
16703
  var workflowSchemaV1_1 = workflowSchemaV1_0.extend({
16025
- version: exports_external.literal("1.1")
16704
+ version: literal("1.1")
16026
16705
  });
16027
16706
  var workflowSchemaV1_2 = workflowSchemaV1_1.extend({
16028
- version: exports_external.literal("1.2")
16707
+ version: literal("1.2")
16029
16708
  });
16030
- var fileFormatNodeSchema3 = exports_external.lazy(() => nodeSchema2.extend({
16709
+ var fileFormatNodeSchema3 = lazy(() => nodeSchema2.extend({
16031
16710
  ui: nodeSchema2.shape.ui.optional()
16032
16711
  }));
16033
- var v1_3VariableUpdateSchema = exports_external.object({
16034
- variableId: exports_external.string(),
16712
+ var v1_3VariableUpdateSchema = object({
16713
+ variableId: string(),
16035
16714
  expression: expressionValueSchema
16036
16715
  });
16037
- var v1_3WorkflowVariablesSchema = exports_external.object({
16038
- globals: exports_external.array(workflowVariableSchema).optional(),
16039
- nodes: exports_external.array(nodeVariableSchema).optional(),
16040
- variableUpdates: exports_external.record(exports_external.string(), exports_external.array(v1_3VariableUpdateSchema)).optional()
16716
+ var v1_3WorkflowVariablesSchema = object({
16717
+ globals: array(workflowVariableSchema).optional(),
16718
+ nodes: array(nodeVariableSchema).optional(),
16719
+ variableUpdates: record(string(), array(v1_3VariableUpdateSchema)).optional()
16041
16720
  });
16042
- var subflowFileSchema3 = exports_external.object({
16043
- nodes: exports_external.array(fileFormatNodeSchema3),
16044
- edges: exports_external.array(edgeSchema2),
16721
+ var subflowFileSchema3 = object({
16722
+ nodes: array(fileFormatNodeSchema3),
16723
+ edges: array(edgeSchema2),
16045
16724
  variables: v1_3WorkflowVariablesSchema.optional(),
16046
16725
  layout: layoutSchema.optional()
16047
16726
  });
16048
- var workflowSchemaV1_3 = exports_external.object({
16727
+ var workflowSchemaV1_3 = object({
16049
16728
  id: idSchema,
16050
- version: exports_external.literal("1.3"),
16051
- name: exports_external.string().min(1),
16052
- description: exports_external.string().optional(),
16729
+ version: literal("1.3"),
16730
+ name: string().min(1),
16731
+ description: string().optional(),
16053
16732
  runtime: workflowRuntimeSchema.optional(),
16054
- nodes: exports_external.array(fileFormatNodeSchema3),
16055
- edges: exports_external.array(edgeSchema2),
16056
- definitions: exports_external.array(nodeManifestSchema2),
16057
- bindings: exports_external.array(bindingSchema).optional(),
16733
+ nodes: array(fileFormatNodeSchema3),
16734
+ edges: array(edgeSchema2),
16735
+ definitions: array(nodeManifestSchema2),
16736
+ bindings: array(bindingSchema).optional(),
16058
16737
  variables: v1_3WorkflowVariablesSchema.optional(),
16059
16738
  connection: workflowConnectionSchema.optional(),
16060
- subflows: exports_external.record(exports_external.string(), subflowFileSchema3).optional(),
16739
+ subflows: record(string(), subflowFileSchema3).optional(),
16061
16740
  layout: layoutSchema.optional()
16062
16741
  });
16063
- var fileFormatNodeSchema4 = exports_external.lazy(() => nodeSchema2.extend({
16742
+ var fileFormatNodeSchema4 = lazy(() => nodeSchema2.extend({
16064
16743
  ui: nodeSchema2.shape.ui.optional()
16065
16744
  }));
16066
- var v1_4VariableUpdateSchema = exports_external.object({
16067
- variableId: exports_external.string(),
16745
+ var v1_4VariableUpdateSchema = object({
16746
+ variableId: string(),
16068
16747
  expression: expressionValueSchema
16069
16748
  });
16070
- var v1_4WorkflowVariablesSchema = exports_external.object({
16071
- globals: exports_external.array(workflowVariableSchema).optional(),
16072
- nodes: exports_external.array(nodeVariableSchema).optional(),
16073
- variableUpdates: exports_external.record(exports_external.string(), exports_external.array(v1_4VariableUpdateSchema)).optional()
16749
+ var v1_4WorkflowVariablesSchema = object({
16750
+ globals: array(workflowVariableSchema).optional(),
16751
+ nodes: array(nodeVariableSchema).optional(),
16752
+ variableUpdates: record(string(), array(v1_4VariableUpdateSchema)).optional()
16074
16753
  });
16075
- var subflowFileSchema4 = exports_external.object({
16076
- nodes: exports_external.array(fileFormatNodeSchema4),
16077
- edges: exports_external.array(edgeSchema2),
16754
+ var subflowFileSchema4 = object({
16755
+ nodes: array(fileFormatNodeSchema4),
16756
+ edges: array(edgeSchema2),
16078
16757
  variables: v1_4WorkflowVariablesSchema.optional(),
16079
16758
  layout: layoutSchema.optional()
16080
16759
  });
16081
- var workflowSchemaV1_4 = exports_external.object({
16760
+ var workflowSchemaV1_4 = object({
16082
16761
  id: idSchema,
16083
- version: exports_external.literal("1.4"),
16084
- name: exports_external.string().min(1),
16085
- description: exports_external.string().optional(),
16762
+ version: literal("1.4"),
16763
+ name: string().min(1),
16764
+ description: string().optional(),
16086
16765
  runtime: workflowRuntimeSchema.optional(),
16087
- nodes: exports_external.array(fileFormatNodeSchema4),
16088
- edges: exports_external.array(edgeSchema2),
16089
- definitions: exports_external.array(nodeManifestSchema2),
16090
- bindings: exports_external.array(bindingSchema).optional(),
16766
+ nodes: array(fileFormatNodeSchema4),
16767
+ edges: array(edgeSchema2),
16768
+ definitions: array(nodeManifestSchema2),
16769
+ bindings: array(bindingSchema).optional(),
16091
16770
  variables: v1_4WorkflowVariablesSchema.optional(),
16092
16771
  connection: workflowConnectionSchema.optional(),
16093
- subflows: exports_external.record(exports_external.string(), subflowFileSchema4).optional(),
16772
+ subflows: record(string(), subflowFileSchema4).optional(),
16094
16773
  layout: layoutSchema.optional()
16095
16774
  });
16096
16775
  var workflowSchemaV1_5 = workflowSchemaV1_4.extend({
16097
- version: exports_external.literal("1.5")
16776
+ version: literal("1.5")
16098
16777
  });
16099
16778
  var workflowSchemaV1_6 = workflowSchemaV1_5.extend({
16100
- version: exports_external.literal("1.6")
16779
+ version: literal("1.6")
16101
16780
  });
16102
16781
  var workflowSchemaV1_7 = workflowSchemaV1_6.extend({
16103
- version: exports_external.literal("1.7")
16782
+ version: literal("1.7")
16104
16783
  });
16105
16784
  var workflowSchemaV1_8 = workflowSchemaV1_7.extend({
16106
- version: exports_external.literal("1.8")
16785
+ version: literal("1.8")
16107
16786
  });
16787
+ var subflowFileSchema5 = workflowSchemaV1_8.shape.subflows.unwrap().valueType;
16108
16788
  var workflowSchemaV1_9 = workflowSchemaV1_8.extend({
16109
- version: exports_external.literal("1.9")
16789
+ version: literal("1.9"),
16790
+ variables: workflowVariablesSchema.optional(),
16791
+ subflows: record(string(), subflowFileSchema5.extend({ variables: workflowVariablesSchema.optional() })).optional()
16110
16792
  });
16111
16793
  var workflowSchemaV1_10 = workflowSchemaV1_9.extend({
16112
- version: exports_external.literal("1.10")
16794
+ version: literal("1.10")
16113
16795
  });
16114
- var fileFormatNodeSchema5 = exports_external.lazy(() => nodeSchema2.extend({
16796
+ var fileFormatNodeSchema5 = lazy(() => nodeSchema2.extend({
16115
16797
  ui: nodeSchema2.shape.ui.optional()
16116
16798
  }));
16117
- var subflowFileSchema5 = exports_external.object({
16118
- nodes: exports_external.array(fileFormatNodeSchema5),
16119
- edges: exports_external.array(edgeSchema2),
16799
+ var subflowFileSchema6 = object({
16800
+ nodes: array(fileFormatNodeSchema5),
16801
+ edges: array(edgeSchema2),
16120
16802
  variables: workflowVariablesSchema.optional(),
16121
16803
  layout: layoutSchema.optional()
16122
16804
  });
16123
- var workflowManifestSchema = exports_external.object({
16124
- version: exports_external.string().min(1),
16125
- categories: exports_external.array(categoryManifestSchema2),
16126
- nodes: exports_external.array(nodeManifestSchema2)
16805
+ var workflowManifestSchema = object({
16806
+ version: string().min(1),
16807
+ categories: array(categoryManifestSchema2),
16808
+ nodes: array(nodeManifestSchema2)
16127
16809
  });
16128
- var manifestResponseSchema = exports_external.object({
16129
- success: exports_external.boolean(),
16810
+ var manifestResponseSchema = object({
16811
+ success: boolean(),
16130
16812
  data: workflowManifestSchema.optional(),
16131
- error: exports_external.string().optional(),
16132
- timestamp: exports_external.string().optional()
16813
+ error: string().optional(),
16814
+ timestamp: string().optional()
16133
16815
  });
16134
- var handleTargetSchema2 = exports_external.object({
16135
- nodeType: exports_external.string(),
16136
- handleId: exports_external.string().optional()
16816
+ var handleTargetSchema2 = object({
16817
+ nodeType: string(),
16818
+ handleId: string().optional()
16137
16819
  });
16138
- var addNodePanelSearchScopeSchema = exports_external.enum(["global", "direct", "deep"]);
16139
- var addNodePanelCreateActionSchema = exports_external.object({
16140
- label: exports_external.string(),
16141
- icon: exports_external.string().optional(),
16142
- description: exports_external.string().optional(),
16143
- urlTemplate: exports_external.string(),
16144
- categoryId: exports_external.string()
16820
+ var addNodePanelSearchScopeSchema = _enum(["global", "direct", "deep"]);
16821
+ var addNodePanelCreateActionSchema = object({
16822
+ label: string(),
16823
+ icon: string().optional(),
16824
+ description: string().optional(),
16825
+ urlTemplate: string(),
16826
+ categoryId: string()
16145
16827
  });
16146
- var addNodePanelConfigSchema = exports_external.object({
16828
+ var addNodePanelConfigSchema = object({
16147
16829
  searchScope: addNodePanelSearchScopeSchema.optional(),
16148
- searchProviders: exports_external.array(exports_external.enum(["connector-events", "connector-triggers"])).optional(),
16149
- refreshOnFocus: exports_external.string().optional(),
16150
- createNewActions: exports_external.array(addNodePanelCreateActionSchema).optional()
16830
+ searchProviders: array(_enum(["connector-events", "connector-triggers"])).optional(),
16831
+ refreshOnFocus: string().optional(),
16832
+ createNewActions: array(addNodePanelCreateActionSchema).optional()
16151
16833
  });
16152
- var connectionConstraintSchema2 = exports_external.object({
16153
- maxConnections: exports_external.number().int().positive().optional(),
16154
- minConnections: exports_external.number().int().nonnegative().optional(),
16155
- allowedTargets: exports_external.array(handleTargetSchema2).optional(),
16156
- forbiddenTargets: exports_external.array(handleTargetSchema2).optional(),
16157
- allowedSources: exports_external.array(handleTargetSchema2).optional(),
16158
- forbiddenSources: exports_external.array(handleTargetSchema2).optional(),
16159
- allowedTargetCategories: exports_external.array(exports_external.string()).optional(),
16160
- forbiddenTargetCategories: exports_external.array(exports_external.string()).optional(),
16161
- allowedSourceCategories: exports_external.array(exports_external.string()).optional(),
16162
- forbiddenSourceCategories: exports_external.array(exports_external.string()).optional(),
16163
- customValidation: exports_external.string().optional(),
16164
- validationMessage: exports_external.string().optional(),
16834
+ var connectionConstraintSchema2 = object({
16835
+ maxConnections: number().int().positive().optional(),
16836
+ minConnections: number().int().nonnegative().optional(),
16837
+ allowedTargets: array(handleTargetSchema2).optional(),
16838
+ forbiddenTargets: array(handleTargetSchema2).optional(),
16839
+ allowedSources: array(handleTargetSchema2).optional(),
16840
+ forbiddenSources: array(handleTargetSchema2).optional(),
16841
+ allowedTargetCategories: array(string()).optional(),
16842
+ forbiddenTargetCategories: array(string()).optional(),
16843
+ allowedSourceCategories: array(string()).optional(),
16844
+ forbiddenSourceCategories: array(string()).optional(),
16845
+ customValidation: string().optional(),
16846
+ validationMessage: string().optional(),
16165
16847
  addNodePanel: addNodePanelConfigSchema.optional()
16166
16848
  });
16167
16849
  jsep.plugins.register(import_object.default);
16850
+ var ASSET_BINDING_RESOURCE = "asset";
16851
+ var CONNECTION_BINDING_RESOURCE = "connection";
16852
+ function isConnectionBindingResource(resource) {
16853
+ return resource?.toLowerCase() === CONNECTION_BINDING_RESOURCE.toLowerCase();
16854
+ }
16855
+ var normalizeConnectionResource = (resource) => isConnectionBindingResource(resource) ? CONNECTION_BINDING_RESOURCE : resource;
16168
16856
  var CRON_TOKEN = "(?:\\d+[LW]?|[A-Z]{3}|LW|L|W|\\?|\\*)";
16169
16857
  var CRON_FIELD = `${CRON_TOKEN}(?:[,/#-]${CRON_TOKEN})*`;
16170
16858
  var QUARTZ_CRON_RE = new RegExp(`^\\s*${CRON_FIELD}(?:\\s+${CRON_FIELD}){5,6}\\s*$`);
16859
+ var BINDINGS_PATH_PREFIX = "=bindings.";
16860
+ var BINDINGS_PATH_PREFIX_PATTERN = BINDINGS_PATH_PREFIX.replace(".", String.raw`\.`);
16861
+ var PROPERTY_RESOURCE = "Property";
16171
16862
  var FORM_TRIGGER_RESOURCE = "FormTrigger";
16863
+ var EVENT_TRIGGER_RESOURCE = "EventTrigger";
16864
+ var ENTRY_POINT_UNIQUE_ID = "EntryPointUniqueId";
16865
+ var RESOURCE_CONFIG = {
16866
+ process: {
16867
+ nameField: "name",
16868
+ displayName: "Process name"
16869
+ },
16870
+ "process.Agent": {
16871
+ nameField: "name",
16872
+ displayName: "Process name",
16873
+ resource: "process",
16874
+ subType: "Agent"
16875
+ },
16876
+ BusinessRule: {
16877
+ nameField: "name",
16878
+ displayName: "Business rule"
16879
+ },
16880
+ queue: {
16881
+ nameField: "queueName",
16882
+ displayName: "Queue"
16883
+ },
16884
+ app: {
16885
+ nameField: "name",
16886
+ displayName: "App name"
16887
+ },
16888
+ ixpDeployment: {
16889
+ nameField: "name",
16890
+ displayName: "IXP model"
16891
+ },
16892
+ [ASSET_BINDING_RESOURCE]: {
16893
+ nameField: "name",
16894
+ displayName: "Orchestrator asset"
16895
+ },
16896
+ Entity: {
16897
+ nameField: "name",
16898
+ displayName: "Entity"
16899
+ }
16900
+ };
16901
+ var canonicalizeResourceCasing = (resource) => resource ? normalizeConnectionResource(resource) ?? "" : "";
16902
+ var isResourceType = (resource, expected) => (resource ?? "").toLowerCase() === expected.toLowerCase();
16903
+ var bindingResourceIdentity = (resource, keyOrId) => {
16904
+ const canonicalResource = canonicalizeResourceCasing(resource);
16905
+ const key = keyOrId ?? "";
16906
+ const comparableKey = isConnectionBindingResource(canonicalResource) ? key.toLowerCase() : key;
16907
+ return `${canonicalResource.toLowerCase()}\x00${comparableKey}`;
16908
+ };
16909
+ var bindingResourceMergeIdentity = (r) => {
16910
+ const base = bindingResourceIdentity(r.resource, r.key ?? r.id);
16911
+ if (!isResourceType(r.resource, PROPERTY_RESOURCE))
16912
+ return base;
16913
+ const parentResourceKey = r.metadata?.ParentResourceKey;
16914
+ return isNonEmptyString(parentResourceKey) ? `${base}\x00${parentResourceKey}` : base;
16915
+ };
16172
16916
  var JOB_ATTACHMENT_DEFINITION_KEY = "job-attachment";
16173
16917
  var JOB_ATTACHMENT_REF = `#/definitions/${JOB_ATTACHMENT_DEFINITION_KEY}`;
16918
+ var isNonEmptyString = (value) => typeof value === "string" && value !== "";
16174
16919
  var mergeBindingResources = (resources) => {
16175
16920
  const seen = /* @__PURE__ */ new Map;
16176
16921
  const result = [];
@@ -16178,52 +16923,59 @@ var mergeBindingResources = (resources) => {
16178
16923
  if (!r.key && !r.id) {
16179
16924
  console.warn("[packaging] binding resource has neither key nor id; may collapse with a sibling", { resource: r.resource });
16180
16925
  }
16181
- const k = `${(r.resource ?? "").toLowerCase()}\x00${r.key ?? r.id ?? ""}`;
16926
+ const k = bindingResourceMergeIdentity(r);
16182
16927
  const existing = seen.get(k);
16183
16928
  if (existing) {
16184
- assertNoFormTriggerConflict(existing, r);
16929
+ assertDuplicateIsSameTrigger(existing, r);
16185
16930
  continue;
16186
16931
  }
16187
- seen.set(k, r);
16188
- result.push(r);
16932
+ const canonical = canonicalizeResourceCasing(r.resource);
16933
+ const emitted = canonical === r.resource ? r : { ...r, resource: canonical };
16934
+ seen.set(k, emitted);
16935
+ result.push(emitted);
16189
16936
  }
16190
16937
  return result;
16191
16938
  };
16192
- function assertNoFormTriggerConflict(existing, incoming) {
16193
- if (incoming.resource !== FORM_TRIGGER_RESOURCE)
16939
+ function assertDuplicateIsSameTrigger(existing, incoming) {
16940
+ if (isResourceType(incoming.resource, FORM_TRIGGER_RESOURCE)) {
16941
+ if (JSON.stringify(existing) === JSON.stringify(incoming))
16942
+ return;
16943
+ throw new Error(`Two Form Triggers share entry-point id ${incoming.key}. Each Form Trigger needs its own id; this usually means a .flow file was copied.`);
16944
+ }
16945
+ if (!isResourceType(incoming.resource, EVENT_TRIGGER_RESOURCE))
16194
16946
  return;
16195
- if (JSON.stringify(existing) === JSON.stringify(incoming))
16947
+ const existingEntryPoint = existing.value?.[ENTRY_POINT_UNIQUE_ID]?.defaultValue;
16948
+ const incomingEntryPoint = incoming.value?.[ENTRY_POINT_UNIQUE_ID]?.defaultValue;
16949
+ if (existingEntryPoint === incomingEntryPoint)
16196
16950
  return;
16197
- throw new Error(`Two Form Triggers share entry-point id ${incoming.key}. Each Form Trigger needs its own id; this usually means a .flow file was copied.`);
16951
+ throw new Error(`Two connector event triggers share binding key ${incoming.key} but start different entry points (${existingEntryPoint} and ${incomingEntryPoint}). Each trigger needs its own entry-point id; this usually means a .flow file was copied.`);
16198
16952
  }
16199
16953
  var GEMINI_PERSONAS = ["Aoede", "Charon", "Fenrir", "Kore", "Leda", "Orus", "Puck", "Zephyr"];
16200
- var OPENAI_PERSONAS = ["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse"];
16201
- var DEFAULT_CONVERSATIONAL_VOICE_MODEL = "gemini-3.1-flash-live-preview";
16202
- var VOICE_MODELS = [
16203
- {
16204
- name: DEFAULT_CONVERSATIONAL_VOICE_MODEL,
16205
- maxTokens: 65536,
16206
- isPreview: true,
16207
- personas: GEMINI_PERSONAS
16208
- },
16209
- {
16210
- name: "gpt-realtime-2",
16211
- maxTokens: 32000,
16212
- isPreview: true,
16213
- personas: OPENAI_PERSONAS
16214
- }
16215
- ];
16216
- var defaultVoiceModel = VOICE_MODELS.find((m) => m.name === DEFAULT_CONVERSATIONAL_VOICE_MODEL);
16217
- if (!defaultVoiceModel) {
16218
- throw new Error(`Default conversational voice model "${DEFAULT_CONVERSATIONAL_VOICE_MODEL}" is missing from the catalog`);
16219
- }
16220
- var DEFAULT_CONVERSATIONAL_VOICE_MODEL_ENTRY = defaultVoiceModel;
16954
+ var OPENAI_PERSONAS = ["marin", "cedar", "alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse"];
16955
+ var DEFAULT_CONVERSATIONAL_VOICE_MODEL = "gpt-realtime-2.1";
16956
+ var OPENAI_VOICE_DEFAULTS = { maxTokens: 32000, personas: OPENAI_PERSONAS };
16957
+ var GEMINI_VOICE_DEFAULTS = { maxTokens: 65536, personas: GEMINI_PERSONAS };
16958
+ var isOpenAiModel = (modelName, modelFamily) => modelName.startsWith("gpt") || Boolean(modelFamily?.toLowerCase().includes("openai"));
16959
+ var toVoiceModel = ({ name, modelFamily, isPreview }) => ({
16960
+ ...isOpenAiModel(name, modelFamily) ? OPENAI_VOICE_DEFAULTS : GEMINI_VOICE_DEFAULTS,
16961
+ name,
16962
+ isPreview: isPreview ?? false
16963
+ });
16964
+ var defaultVoiceModel = toVoiceModel({ name: DEFAULT_CONVERSATIONAL_VOICE_MODEL });
16965
+ var directVoiceModelSchema = union([
16966
+ string().transform((name) => ({ name })),
16967
+ object({ name: string(), isPreview: boolean().optional() })
16968
+ ]);
16969
+ var voiceModelCatalogSchema = object({
16970
+ direct: array(directVoiceModelSchema).default([]),
16971
+ hidden: array(string()).default([])
16972
+ });
16221
16973
  var DEFAULT_VOICE_AGENT_SPEAKS_FIRST = true;
16222
16974
  var DEFAULT_CONVERSATIONAL_VOICE_SETTINGS = {
16223
16975
  model: DEFAULT_CONVERSATIONAL_VOICE_MODEL,
16224
- maxTokens: DEFAULT_CONVERSATIONAL_VOICE_MODEL_ENTRY.maxTokens,
16225
- temperature: 0,
16226
- persona: DEFAULT_CONVERSATIONAL_VOICE_MODEL_ENTRY.personas[0],
16976
+ maxTokens: defaultVoiceModel.maxTokens,
16977
+ temperature: 1,
16978
+ persona: defaultVoiceModel.personas[0],
16227
16979
  agentSpeaksFirst: DEFAULT_VOICE_AGENT_SPEAKS_FIRST
16228
16980
  };
16229
16981
 
@@ -16232,6 +16984,15 @@ function generateBindings2(agent, resources, features) {
16232
16984
  return generateBindings(agent, resources, features);
16233
16985
  }
16234
16986
 
16987
+ // src/utils/read-required-text-file.ts
16988
+ async function readRequiredTextFile(fs, path) {
16989
+ const raw = await fs.readFile(path, "utf-8");
16990
+ if (raw === null) {
16991
+ throw new Error(`File not found: ${path}`);
16992
+ }
16993
+ return raw;
16994
+ }
16995
+
16235
16996
  // src/services/agent-builder-service.ts
16236
16997
  async function findParentFlowProject(startDir, fs) {
16237
16998
  const parent = fs.path.dirname(startDir);
@@ -16272,7 +17033,7 @@ async function generateDerivedFiles(projectDir, options = {}) {
16272
17033
  let agent;
16273
17034
  let agentRaw;
16274
17035
  try {
16275
- agentRaw = await fs.readFile(agentPath, "utf-8");
17036
+ agentRaw = await readRequiredTextFile(fs, agentPath);
16276
17037
  agent = JSON.parse(agentRaw);
16277
17038
  } catch {
16278
17039
  return {
@@ -16295,7 +17056,7 @@ async function generateDerivedFiles(projectDir, options = {}) {
16295
17056
  for (const folder of resourceFolders) {
16296
17057
  const resFile = fs.path.join(resourcesDir, folder, "resource.json");
16297
17058
  try {
16298
- const raw = await fs.readFile(resFile, "utf-8");
17059
+ const raw = await readRequiredTextFile(fs, resFile);
16299
17060
  const parsed = JSON.parse(raw);
16300
17061
  if (parsed.$resourceType) {
16301
17062
  fileResources.push(parsed);
@@ -16324,7 +17085,7 @@ async function generateDerivedFiles(projectDir, options = {}) {
16324
17085
  for (const folder of featureFolders) {
16325
17086
  const featureFile = fs.path.join(featuresDir, folder, "feature.json");
16326
17087
  try {
16327
- const raw = await fs.readFile(featureFile, "utf-8");
17088
+ const raw = await readRequiredTextFile(fs, featureFile);
16328
17089
  const parsed = JSON.parse(raw);
16329
17090
  if (parsed.$featureType) {
16330
17091
  fileFeatures.push(parsed);
@@ -16334,7 +17095,7 @@ async function generateDerivedFiles(projectDir, options = {}) {
16334
17095
  const fileFeatureNames = new Set(fileFeatures.map((f) => f.name));
16335
17096
  const inlineFeatures = (agent.features ?? []).filter((f) => !fileFeatureNames.has(f.name));
16336
17097
  const allFeatures = [...fileFeatures, ...inlineFeatures];
16337
- const toolNames = new Set(allToolResources.map((t13) => t13.name));
17098
+ const toolNames = new Set(allToolResources.map((t) => t.name));
16338
17099
  for (const g of agent.guardrails ?? []) {
16339
17100
  if (!g.selector?.scopes?.includes("Tool"))
16340
17101
  continue;
@@ -16350,7 +17111,7 @@ async function generateDerivedFiles(projectDir, options = {}) {
16350
17111
  let existingSchema = "https://cloud.uipath.com/draft/2024-12/entry-point";
16351
17112
  let existingId = "entry-points.json";
16352
17113
  try {
16353
- const existingRaw = await fs.readFile(epPath, "utf-8");
17114
+ const existingRaw = await readRequiredTextFile(fs, epPath);
16354
17115
  const existing = JSON.parse(existingRaw);
16355
17116
  if (existing.entryPoints?.[0]?.uniqueId) {
16356
17117
  existingUniqueId = existing.entryPoints[0].uniqueId;
@@ -16410,7 +17171,7 @@ async function generateDerivedFiles(projectDir, options = {}) {
16410
17171
  if (bindingsModel.resources.length > 0) {
16411
17172
  let existing = [];
16412
17173
  try {
16413
- const raw = await fs.readFile(bindingsTargetPath, "utf-8");
17174
+ const raw = await readRequiredTextFile(fs, bindingsTargetPath);
16414
17175
  const parsed = JSON.parse(raw);
16415
17176
  if (Array.isArray(parsed.resources)) {
16416
17177
  existing = parsed.resources;
@@ -16714,8 +17475,8 @@ class BaseAPI2 {
16714
17475
  return BaseAPI2.jsonRegex.test(mime);
16715
17476
  }
16716
17477
  async request(context, initOverrides) {
16717
- const { url, init: init2 } = await this.createFetchParams(context, initOverrides);
16718
- const response = await this.fetchApi(url, init2);
17478
+ const { url, init } = await this.createFetchParams(context, initOverrides);
17479
+ const response = await this.fetchApi(url, init);
16719
17480
  if (response && (response.status >= 200 && response.status < 300)) {
16720
17481
  return response;
16721
17482
  }
@@ -16750,14 +17511,14 @@ class BaseAPI2 {
16750
17511
  } else {
16751
17512
  body = overriddenInit.body;
16752
17513
  }
16753
- const init2 = {
17514
+ const init = {
16754
17515
  ...overriddenInit,
16755
17516
  body
16756
17517
  };
16757
- return { url, init: init2 };
17518
+ return { url, init };
16758
17519
  }
16759
- fetchApi = async (url, init2) => {
16760
- let fetchParams = { url, init: init2 };
17520
+ fetchApi = async (url, init) => {
17521
+ let fetchParams = { url, init };
16761
17522
  for (const middleware of this.middleware) {
16762
17523
  if (middleware.pre) {
16763
17524
  fetchParams = await middleware.pre({
@@ -16971,8 +17732,8 @@ class BaseAPI3 {
16971
17732
  return BaseAPI3.jsonRegex.test(mime);
16972
17733
  }
16973
17734
  async request(context, initOverrides) {
16974
- const { url, init: init2 } = await this.createFetchParams(context, initOverrides);
16975
- const response = await this.fetchApi(url, init2);
17735
+ const { url, init } = await this.createFetchParams(context, initOverrides);
17736
+ const response = await this.fetchApi(url, init);
16976
17737
  if (response && (response.status >= 200 && response.status < 300)) {
16977
17738
  return response;
16978
17739
  }
@@ -17007,14 +17768,14 @@ class BaseAPI3 {
17007
17768
  } else {
17008
17769
  body = overriddenInit.body;
17009
17770
  }
17010
- const init2 = {
17771
+ const init = {
17011
17772
  ...overriddenInit,
17012
17773
  body
17013
17774
  };
17014
- return { url, init: init2 };
17775
+ return { url, init };
17015
17776
  }
17016
- fetchApi = async (url, init2) => {
17017
- let fetchParams = { url, init: init2 };
17777
+ fetchApi = async (url, init) => {
17778
+ let fetchParams = { url, init };
17018
17779
  for (const middleware of this.middleware) {
17019
17780
  if (middleware.pre) {
17020
17781
  fetchParams = await middleware.pre({
@@ -17165,7 +17926,7 @@ var package_default3 = {
17165
17926
  name: "@uipath/integrationservice-sdk",
17166
17927
  author: "UiPath",
17167
17928
  license: "SEE LICENSE IN LICENSE.txt",
17168
- version: "1.205.0-preview.276",
17929
+ version: "1.206.0-preview.279",
17169
17930
  repository: {
17170
17931
  type: "git",
17171
17932
  url: "https://github.com/UiPath/cli.git",
@@ -17186,17 +17947,26 @@ var package_default3 = {
17186
17947
  ".": {
17187
17948
  types: "./dist/src/index.d.ts",
17188
17949
  default: "./dist/index.js"
17950
+ },
17951
+ "./bindings": {
17952
+ types: "./dist/src/bindings.d.ts",
17953
+ default: "./dist/bindings.js"
17954
+ },
17955
+ "./connections": {
17956
+ types: "./dist/src/connections.d.ts",
17957
+ default: "./dist/connections.js"
17189
17958
  }
17190
17959
  },
17191
17960
  files: [
17192
17961
  "dist"
17193
17962
  ],
17194
17963
  scripts: {
17195
- build: "bun build ./src/index.ts --outdir dist --format esm --target node --sourcemap=linked && tsc -p tsconfig.build.json --noCheck",
17964
+ build: "bun build ./src/index.ts ./src/bindings.ts ./src/connections.ts --outdir dist --root ./src --format esm --target node --sourcemap=linked && tsc -p tsconfig.build.json --noCheck",
17196
17965
  generate: "bun run src/scripts/generate-sdk.ts",
17197
17966
  lint: "biome check .",
17198
17967
  test: "vitest run",
17199
- "test:coverage": "vitest run --coverage"
17968
+ "test:coverage": "vitest run --coverage",
17969
+ typecheck: "tsc --noEmit"
17200
17970
  },
17201
17971
  devDependencies: {
17202
17972
  "@uipath/auth": "workspace:*",
@@ -17207,7 +17977,7 @@ var package_default3 = {
17207
17977
  typescript: "^7.0.2"
17208
17978
  },
17209
17979
  dependencies: {
17210
- "@uipath/integration-service-design-time": "2.10.0"
17980
+ "@uipath/integration-service-design-time": "3.3.0"
17211
17981
  }
17212
17982
  };
17213
17983
 
@@ -19455,9 +20225,9 @@ function MessageLiteFromJSONTyped(json, ignoreDiscriminator) {
19455
20225
 
19456
20226
  // ../integrationservice-sdk/generated/elements/src/models/Message.ts
19457
20227
  function MessageFromJSON2(json) {
19458
- return MessageFromJSONTyped2(json, false);
20228
+ return MessageFromJSONTyped3(json, false);
19459
20229
  }
19460
- function MessageFromJSONTyped2(json, ignoreDiscriminator) {
20230
+ function MessageFromJSONTyped3(json, ignoreDiscriminator) {
19461
20231
  if (json == null) {
19462
20232
  return json;
19463
20233
  }
@@ -22943,10 +23713,13 @@ async function getValidatedAuthContext(options) {
22943
23713
  tenantName: ctx.tenantName
22944
23714
  };
22945
23715
  }
23716
+ function tenantServiceRoot(baseUrl, organizationId, tenantName) {
23717
+ return `${baseUrl}/${encodeURIComponent(organizationId)}/${encodeURIComponent(tenantName)}`;
23718
+ }
22946
23719
  async function createConnectionsConfig(options) {
22947
23720
  const { baseUrl, accessToken, organizationId, tenantName } = await getValidatedAuthContext(options);
22948
23721
  return new Configuration2({
22949
- basePath: `${baseUrl}/${organizationId}/${tenantName}/connections_`,
23722
+ basePath: `${tenantServiceRoot(baseUrl, organizationId, tenantName)}/connections_`,
22950
23723
  accessToken: async () => accessToken,
22951
23724
  headers: addSdkUserAgentHeader({
22952
23725
  "x-uipath-source": "UiPath.CodingAgent"
@@ -22956,7 +23729,7 @@ async function createConnectionsConfig(options) {
22956
23729
  async function createElementsConfig(options) {
22957
23730
  const { baseUrl, accessToken, organizationId, tenantName } = await getValidatedAuthContext(options);
22958
23731
  return new Configuration3({
22959
- basePath: `${baseUrl}/${organizationId}/${tenantName}/elements_/v3/element`,
23732
+ basePath: `${tenantServiceRoot(baseUrl, organizationId, tenantName)}/elements_/v3/element`,
22960
23733
  accessToken: async () => accessToken,
22961
23734
  headers: addSdkUserAgentHeader({
22962
23735
  "x-uipath-source": "UiPath.CodingAgent"
@@ -22968,7 +23741,11 @@ async function createApiClient2(ApiClass, options) {
22968
23741
  if (!domain) {
22969
23742
  throw new Error(`Unknown API class: ${ApiClass.name}`);
22970
23743
  }
22971
- const config = domain === "connections" ? await createConnectionsConfig(options) : await createElementsConfig(options);
23744
+ if (domain === "connections") {
23745
+ const config = await createConnectionsConfig(options);
23746
+ return new ApiClass(config);
23747
+ }
23748
+ const config = await createElementsConfig(options);
22972
23749
  return new ApiClass(config);
22973
23750
  }
22974
23751
  // ../integrationservice-sdk/src/connection-state.ts
@@ -22978,8 +23755,34 @@ var CONNECTION_STATE_NAMES = new Map([
22978
23755
  [ConnectionState.Expired, "Expired"],
22979
23756
  [ConnectionState.Failed, "Failed"]
22980
23757
  ]);
23758
+ // ../integrationservice-sdk/src/dap/managed-http.ts
23759
+ var MANAGED_HTTP_METHODS = new Set([
23760
+ "GET",
23761
+ "POST",
23762
+ "PUT",
23763
+ "PATCH",
23764
+ "DELETE",
23765
+ "OPTIONS",
23766
+ "HEAD"
23767
+ ]);
23768
+ var MANAGED_HTTP_KEYS = new Set([
23769
+ "authentication",
23770
+ "method",
23771
+ "url",
23772
+ "connectionId",
23773
+ "folderKey",
23774
+ "targetConnector",
23775
+ "headers",
23776
+ "query",
23777
+ "body"
23778
+ ]);
23779
+
22981
23780
  // ../integrationservice-sdk/src/dap/essential-config.ts
22982
23781
  var JIT_INPUT_OPERATIONS = new Set(["create", "update", "replace"]);
23782
+ // ../integrationservice-sdk/src/dap/bindings-v2.ts
23783
+ var JSON_STRING_PREFIX = "=jsonString:";
23784
+ var stripJsonStringGuard = (value) => value.startsWith(JSON_STRING_PREFIX) ? value.slice(JSON_STRING_PREFIX.length) : value;
23785
+
22983
23786
  // ../integrationservice-sdk/src/dap/validation/rules.ts
22984
23787
  var VALID_HTTP_METHODS = new Set(["GET", "POST", "PUT", "PATCH", "DELETE"]);
22985
23788
  // ../integrationservice-sdk/src/metadata/resource-metadata.ts
@@ -23116,7 +23919,7 @@ function parseConfiguration(detail) {
23116
23919
  const raw = detail.configuration;
23117
23920
  if (typeof raw !== "string")
23118
23921
  return {};
23119
- const json = raw.startsWith("=jsonString:") ? raw.slice("=jsonString:".length) : raw;
23922
+ const json = stripJsonStringGuard(raw);
23120
23923
  let parsed;
23121
23924
  try {
23122
23925
  parsed = JSON.parse(json);
@@ -23450,7 +24253,7 @@ async function discoverConnectorToolNodes(agentDir, agentProjectId) {
23450
24253
  }
23451
24254
  let workflow;
23452
24255
  try {
23453
- const raw = await fs.readFile(flowPath, "utf-8");
24256
+ const raw = await readRequiredTextFile(fs, flowPath);
23454
24257
  workflow = JSON.parse(raw);
23455
24258
  } catch (err) {
23456
24259
  logger.warn(`Could not parse parent .flow file at ${flowPath}: ${err instanceof Error ? err.message : String(err)}`);
@@ -23915,7 +24718,7 @@ async function validateProjectAgainstCurrentSchema(projectDir) {
23915
24718
  const fs = getFileSystem();
23916
24719
  let agentJsonRaw;
23917
24720
  try {
23918
- agentJsonRaw = await fs.readFile(fs.path.join(projectDir, "agent.json"), "utf-8");
24721
+ agentJsonRaw = await readRequiredTextFile(fs, fs.path.join(projectDir, "agent.json"));
23919
24722
  } catch (err) {
23920
24723
  return {
23921
24724
  issues: [
@@ -24024,9 +24827,7 @@ var STRUCTURAL_AGENT_INPUT_KEYS = new Set([
24024
24827
  "source",
24025
24828
  "agentInputVariables",
24026
24829
  "agentOutputVariables",
24027
- "conversationalAgentSettings",
24028
- "endExchange",
24029
- "callContext"
24830
+ "conversationalAgentSettings"
24030
24831
  ]);
24031
24832
  var RESOURCE_KEEP_KEYS = new Set(["source", "detail", "itemsDescription"]);
24032
24833
  var AGENT_RESOURCE_SOURCE_HANDLES2 = new Set([
@@ -24071,7 +24872,8 @@ function shellifyInlineAgents(flow, options) {
24071
24872
  continue;
24072
24873
  }
24073
24874
  if (isPlainInputs(node.inputs)) {
24074
- if (retainKeys(node.inputs, STRUCTURAL_AGENT_INPUT_KEYS)) {
24875
+ const keepKeys = isVoiceAgentNodeType(node.type) ? new Set([...STRUCTURAL_AGENT_INPUT_KEYS, "callContext"]) : STRUCTURAL_AGENT_INPUT_KEYS;
24876
+ if (retainKeys(node.inputs, keepKeys)) {
24075
24877
  changed = true;
24076
24878
  }
24077
24879
  }
@@ -24255,8 +25057,8 @@ function validateInputVariableReferences(messages, inputSchema, errors) {
24255
25057
  const raw = token.rawString;
24256
25058
  const path = `messages[${i}].content`;
24257
25059
  if (!raw.startsWith("input.")) {
24258
- const key2 = raw.trim();
24259
- const hint = declared.includes(key2) ? `Write it as {{input.${key2}}}.` : `Write it as {{input.<key>}} where <key> is declared in inputSchema.properties (${declaredList}).`;
25060
+ const key = raw.trim();
25061
+ const hint = declared.includes(key) ? `Write it as {{input.${key}}}.` : `Write it as {{input.<key>}} where <key> is declared in inputSchema.properties (${declaredList}).`;
24260
25062
  errors.push(err(path, `Variable {{${raw}}} does not use the input. prefix. Only {{input.<key>}} is bound at runtime; the bare form is left as literal text. ${hint}`));
24261
25063
  continue;
24262
25064
  }
@@ -24444,7 +25246,7 @@ async function performStaticValidation(targetPath, options) {
24444
25246
  let agent;
24445
25247
  let agentJsonRaw;
24446
25248
  try {
24447
- agentJsonRaw = await fs.readFile(agentPath, "utf-8");
25249
+ agentJsonRaw = await readRequiredTextFile(fs, agentPath);
24448
25250
  agent = JSON.parse(agentJsonRaw);
24449
25251
  } catch (e) {
24450
25252
  OutputFormatter.error({
@@ -24523,7 +25325,7 @@ async function performStaticValidation(targetPath, options) {
24523
25325
  for (const folder of resourceFolders) {
24524
25326
  const resFile = fs.path.join(resourcesDir, folder, "resource.json");
24525
25327
  try {
24526
- const raw = await fs.readFile(resFile, "utf-8");
25328
+ const raw = await readRequiredTextFile(fs, resFile);
24527
25329
  const parsed = JSON.parse(raw);
24528
25330
  if (parsed.$resourceType) {
24529
25331
  fileBasedResources.push(parsed);
@@ -24540,7 +25342,7 @@ async function performStaticValidation(targetPath, options) {
24540
25342
  if (!inline && epExists && !options.skipSchemaSync) {
24541
25343
  let ep = null;
24542
25344
  try {
24543
- ep = JSON.parse(await fs.readFile(epPath, "utf-8"));
25345
+ ep = JSON.parse(await readRequiredTextFile(fs, epPath));
24544
25346
  } catch (e) {
24545
25347
  staticErrors.push(err("entry-points.json", `not valid JSON: ${String(e)}`));
24546
25348
  }
@@ -24560,7 +25362,7 @@ async function performStaticValidation(targetPath, options) {
24560
25362
  }
24561
25363
  if (!inline && projExists) {
24562
25364
  try {
24563
- const proj = JSON.parse(await fs.readFile(projPath, "utf-8"));
25365
+ const proj = JSON.parse(await readRequiredTextFile(fs, projPath));
24564
25366
  if (proj.ProjectType !== "Agent") {
24565
25367
  staticErrors.push(err("project.uiproj.ProjectType", 'must be "Agent"'));
24566
25368
  }
@@ -24626,7 +25428,8 @@ var registerValidateCommand = (program) => {
24626
25428
  Message: `Validation failed with ${staticResult.errors.length} error(s)`,
24627
25429
  Data: {
24628
25430
  Errors: staticResult.errors.map((e) => e.path ? `${e.path}: ${e.message}` : e.message)
24629
- }
25431
+ },
25432
+ Instructions: `Fix the errors listed in Data.Errors, then run \`uip agent validate\` again.`
24630
25433
  });
24631
25434
  processContext.exit(1);
24632
25435
  return;
@@ -24643,13 +25446,14 @@ var registerValidateCommand = (program) => {
24643
25446
  Errors: [
24644
25447
  "flow-layout.json: file not found"
24645
25448
  ]
24646
- }
25449
+ },
25450
+ Instructions: "Run `uip agent refresh` to generate flow-layout.json, then run `uip agent validate` again."
24647
25451
  });
24648
25452
  processContext.exit(1);
24649
25453
  return;
24650
25454
  }
24651
25455
  const [parseErr] = await catchError((async () => {
24652
- const raw = await fs.readFile(flowLayoutPath, "utf-8");
25456
+ const raw = await readRequiredTextFile(fs, flowLayoutPath);
24653
25457
  JSON.parse(raw);
24654
25458
  })());
24655
25459
  if (parseErr) {
@@ -24693,7 +25497,8 @@ var registerValidateCommand = (program) => {
24693
25497
  Message: `Schema validation failed with ${schemaResult.issues.length} error(s)`,
24694
25498
  Data: {
24695
25499
  Errors: schemaResult.issues.map((issue) => issue.path ? `${issue.file} → ${issue.path}: ${issue.message}` : `${issue.file}: ${issue.message}`)
24696
- }
25500
+ },
25501
+ Instructions: `Fix the errors listed in Data.Errors, then run \`uip agent validate\` again.`
24697
25502
  });
24698
25503
  processContext.exit(1);
24699
25504
  return;
@@ -24869,7 +25674,8 @@ var registerRefreshCommand = (program) => {
24869
25674
  Message: `Validation failed with ${staticResult.errors.length} error(s)`,
24870
25675
  Data: {
24871
25676
  Errors: staticResult.errors.map((e) => e.path ? `${e.path}: ${e.message}` : e.message)
24872
- }
25677
+ },
25678
+ Instructions: `Fix the errors listed in Data.Errors, then run \`uip agent refresh\` again.`
24873
25679
  });
24874
25680
  processContext.exit(1);
24875
25681
  return;
@@ -24887,7 +25693,8 @@ var registerRefreshCommand = (program) => {
24887
25693
  Message: `Schema validation failed with ${migrationResult.issues.length} error(s)`,
24888
25694
  Data: {
24889
25695
  Errors: migrationResult.issues.map((issue) => issue.path ? `${issue.file} → ${issue.path}: ${issue.message}` : `${issue.file}: ${issue.message}`)
24890
- }
25696
+ },
25697
+ Instructions: `Fix the errors listed in Data.Errors, then run \`uip agent refresh\` again.`
24891
25698
  });
24892
25699
  processContext.exit(1);
24893
25700
  return;
@@ -24963,11 +25770,11 @@ var registerRefreshCommand = (program) => {
24963
25770
  data.MigratedFiles = migrationResult.migratedFiles.length;
24964
25771
  }
24965
25772
  if (connectorToolsGenerated.length > 0) {
24966
- data.ConnectorToolsGenerated = connectorToolsGenerated.map((t13) => ({
24967
- nodeId: t13.nodeId,
24968
- name: t13.toolName,
24969
- connectorKey: t13.connectorKey,
24970
- resourceId: t13.resourceId
25773
+ data.ConnectorToolsGenerated = connectorToolsGenerated.map((t) => ({
25774
+ nodeId: t.nodeId,
25775
+ name: t.toolName,
25776
+ connectorKey: t.connectorKey,
25777
+ resourceId: t.resourceId
24971
25778
  }));
24972
25779
  }
24973
25780
  if (derivedResult.generated) {
@@ -25055,8 +25862,8 @@ async function loadLowCodeProjectContext(projectPath, fs) {
25055
25862
  let parsed;
25056
25863
  try {
25057
25864
  parsed = JSON.parse(agentFile.raw);
25058
- } catch (err2) {
25059
- const message = err2 instanceof Error ? err2.message : String(err2);
25865
+ } catch (err) {
25866
+ const message = err instanceof Error ? err.message : String(err);
25060
25867
  return {
25061
25868
  ok: false,
25062
25869
  reason: `agent.json is not valid JSON: ${message}`
@@ -25090,19 +25897,19 @@ function parseJsonObject(raw) {
25090
25897
  }
25091
25898
  return null;
25092
25899
  }
25093
- async function readDirSorted(fs, dir2) {
25094
- const stats = await fs.stat(dir2);
25900
+ async function readDirSorted(fs, dir) {
25901
+ const stats = await fs.stat(dir);
25095
25902
  if (!stats?.isDirectory()) {
25096
25903
  return [];
25097
25904
  }
25098
- return [...await fs.readdir(dir2)].map((name) => name.endsWith("/") ? name.slice(0, -1) : name).sort((a, b) => a.localeCompare(b));
25905
+ return [...await fs.readdir(dir)].map((name) => name.endsWith("/") ? name.slice(0, -1) : name).sort((a, b) => a.localeCompare(b));
25099
25906
  }
25100
25907
  async function loadResources2(fs, projectPath) {
25101
- const dir2 = fs.path.join(projectPath, "resources");
25102
- const names = await readDirSorted(fs, dir2);
25908
+ const dir = fs.path.join(projectPath, "resources");
25909
+ const names = await readDirSorted(fs, dir);
25103
25910
  const out = [];
25104
25911
  for (const name of names) {
25105
- const sub = fs.path.join(dir2, name);
25912
+ const sub = fs.path.join(dir, name);
25106
25913
  const stats = await fs.stat(sub);
25107
25914
  if (!stats?.isDirectory()) {
25108
25915
  continue;
@@ -25120,15 +25927,15 @@ async function loadResources2(fs, projectPath) {
25120
25927
  return out;
25121
25928
  }
25122
25929
  async function loadJsonDir(fs, projectPath, segments) {
25123
- const dir2 = fs.path.join(projectPath, ...segments);
25124
- const names = await readDirSorted(fs, dir2);
25930
+ const dir = fs.path.join(projectPath, ...segments);
25931
+ const names = await readDirSorted(fs, dir);
25125
25932
  const prefix = segments.join("/");
25126
25933
  const out = [];
25127
25934
  for (const name of names) {
25128
25935
  if (!name.endsWith(".json")) {
25129
25936
  continue;
25130
25937
  }
25131
- const raw = await fs.readFile(fs.path.join(dir2, name), "utf-8");
25938
+ const raw = await fs.readFile(fs.path.join(dir, name), "utf-8");
25132
25939
  if (raw === null) {
25133
25940
  continue;
25134
25941
  }
@@ -25251,8 +26058,8 @@ async function runRules2(rules, context, fs, options) {
25251
26058
  let ruleIssues;
25252
26059
  try {
25253
26060
  ruleIssues = await rule.run(context, fs);
25254
- } catch (err2) {
25255
- const message = err2 instanceof Error ? err2.message : String(err2);
26061
+ } catch (err) {
26062
+ const message = err instanceof Error ? err.message : String(err);
25256
26063
  issues.push({
25257
26064
  ruleId: "RULE_RUNTIME_ERROR",
25258
26065
  category: "general",
@@ -25777,8 +26584,8 @@ var lowCodeEvalNoToolSimulation = {
25777
26584
  category: "evals",
25778
26585
  severity: "warning",
25779
26586
  run: async (ctx) => {
25780
- const toolCount2 = resourcesOfType(ctx, "tool").length;
25781
- if (toolCount2 === 0) {
26587
+ const toolCount = resourcesOfType(ctx, "tool").length;
26588
+ if (toolCount === 0) {
25782
26589
  return [];
25783
26590
  }
25784
26591
  const datapoints = allDatapoints(ctx);
@@ -25793,7 +26600,7 @@ var lowCodeEvalNoToolSimulation = {
25793
26600
  }
25794
26601
  return [
25795
26602
  {
25796
- description: `Agent has ${toolCount2} tool resource(s) but no datapoint simulates tool calls (\`simulateTools: true\` + \`toolsToSimulate\`) and no eval set uses a trajectory evaluator. The eval suite checks only the final output, not tool selection or ordering.`,
26603
+ description: `Agent has ${toolCount} tool resource(s) but no datapoint simulates tool calls (\`simulateTools: true\` + \`toolsToSimulate\`) and no eval set uses a trajectory evaluator. The eval suite checks only the final output, not tool selection or ordering.`,
25797
26604
  suggestedFix: "Enable tool simulation on representative datapoints (`simulateTools: true` + `toolsToSimulate: [{ name: '…' }]`), or score the set with a trajectory evaluator, so the eval covers tool use rather than just final output."
25798
26605
  }
25799
26606
  ];
@@ -26950,8 +27757,8 @@ var LOW_CODE_RULES = [
26950
27757
  async function reviewLowCodeAgent(projectPath, options, fs) {
26951
27758
  const loaded = await loadLowCodeProjectContext(projectPath, fs);
26952
27759
  if (!loaded.ok) {
26953
- const issue2 = buildInvalidAgentJsonIssue(loaded);
26954
- return { ok: true, result: computeReviewResult([issue2], []) };
27760
+ const issue = buildInvalidAgentJsonIssue(loaded);
27761
+ return { ok: true, result: computeReviewResult([issue], []) };
26955
27762
  }
26956
27763
  const context = {
26957
27764
  ...loaded.context,
@@ -26999,8 +27806,8 @@ var parseHistory = (raw) => {
26999
27806
  let parsed;
27000
27807
  try {
27001
27808
  parsed = JSON.parse(raw);
27002
- } catch (err2) {
27003
- const message = err2 instanceof Error ? err2.message : String(err2);
27809
+ } catch (err) {
27810
+ const message = err instanceof Error ? err.message : String(err);
27004
27811
  return { success: false, error: `invalid JSON: ${message}` };
27005
27812
  }
27006
27813
  if (!Array.isArray(parsed)) {
@@ -27023,11 +27830,11 @@ var writeAtomically = async (file, content, fs) => {
27023
27830
  try {
27024
27831
  await fs.writeFile(tempFile, content);
27025
27832
  await fs.rename(tempFile, file);
27026
- } catch (err2) {
27833
+ } catch (err) {
27027
27834
  await fs.rm(tempFile).catch(() => {
27028
27835
  return;
27029
27836
  });
27030
- throw err2;
27837
+ throw err;
27031
27838
  }
27032
27839
  };
27033
27840
  var appendEntry = async (file, grade, input, fs) => {
@@ -27088,8 +27895,8 @@ async function loadGuardrailDefinitions(fs, projectPath) {
27088
27895
  if (agentConfig === undefined || !hasBuiltInGuardrail(agentConfig)) {
27089
27896
  return;
27090
27897
  }
27091
- const [err2, definitions] = await catchError(getGuardrailDefinitions());
27092
- if (err2 || definitions === undefined) {
27898
+ const [err, definitions] = await catchError(getGuardrailDefinitions());
27899
+ if (err || definitions === undefined) {
27093
27900
  return;
27094
27901
  }
27095
27902
  return definitions.map(toReviewerDefinition);
@@ -27099,11 +27906,11 @@ async function loadLlmJudgeModels(fs, projectPath) {
27099
27906
  if (agentConfig === undefined || !hasLlmAsJudgeGuardrail(agentConfig)) {
27100
27907
  return;
27101
27908
  }
27102
- const [err2, models4] = await catchError(getLlmJudgeModelIds());
27103
- if (err2 || models4 === undefined) {
27909
+ const [err, models] = await catchError(getLlmJudgeModelIds());
27910
+ if (err || models === undefined) {
27104
27911
  return;
27105
27912
  }
27106
- return models4;
27913
+ return models;
27107
27914
  }
27108
27915
  async function readAgentConfig(fs, projectPath) {
27109
27916
  const [readErr, raw] = await catchError(fs.readFile(fs.path.join(projectPath, "agent.json"), "utf-8"));
@@ -27223,16 +28030,16 @@ var registerReviewCommand = (program) => {
27223
28030
  }
27224
28031
  categories = parts;
27225
28032
  }
27226
- const [guardrailDefinitions2, llmJudgeModels] = await Promise.all([
28033
+ const [guardrailDefinitions, llmJudgeModels] = await Promise.all([
27227
28034
  loadGuardrailDefinitions(fs, projectPath),
27228
28035
  loadLlmJudgeModels(fs, projectPath)
27229
28036
  ]);
27230
- const [err2, outcome] = await catchError(reviewLowCodeAgent(projectPath, { categories, guardrailDefinitions: guardrailDefinitions2, llmJudgeModels }, fs));
27231
- if (err2) {
28037
+ const [err, outcome] = await catchError(reviewLowCodeAgent(projectPath, { categories, guardrailDefinitions, llmJudgeModels }, fs));
28038
+ if (err) {
27232
28039
  OutputFormatter.error({
27233
28040
  Result: RESULTS.Failure,
27234
28041
  Code: CODES.failed,
27235
- Message: `Review failed: ${extractErrorMessageSync(err2)}`,
28042
+ Message: `Review failed: ${extractErrorMessageSync(err)}`,
27236
28043
  Instructions: "Verify the project path exists and is a readable agent project. " + "Run `uip agent review --help` for usage."
27237
28044
  });
27238
28045
  processContext.exit(1);
@@ -27342,16 +28149,16 @@ var registerReviewHistoryCommands = (program) => {
27342
28149
  reviewHistory.command("add").description(`Record a review grade in the project's ${REVIEW_HISTORY_FILE}. ` + `Keeps the newest ${MAX_REVIEW_HISTORY_ENTRIES} entries, most recent first. Does not run the review.`).argument("<grade>", "Letter grade to record (A to F)").argument("[path]", "Agent project directory", ".").option("--errors <count>", "Number of error findings to record", parseCount("--errors")).option("--warnings <count>", "Number of warning findings to record", parseCount("--warnings")).examples(ADD_EXAMPLES).trackedAction(processContext, async (grade, targetPath, options) => {
27343
28150
  const fs = getFileSystem();
27344
28151
  const projectPath = fs.path.resolve(targetPath);
27345
- const [err2, outcome] = await catchError(recordReview(projectPath, {
28152
+ const [err, outcome] = await catchError(recordReview(projectPath, {
27346
28153
  grade,
27347
28154
  errors: options.errors,
27348
28155
  warnings: options.warnings
27349
28156
  }, fs));
27350
- if (err2) {
28157
+ if (err) {
27351
28158
  OutputFormatter.error({
27352
28159
  Result: RESULTS.Failure,
27353
28160
  Code: CODES2.failed,
27354
- Message: `Recording the review failed: ${extractErrorMessageSync(err2)}`,
28161
+ Message: `Recording the review failed: ${extractErrorMessageSync(err)}`,
27355
28162
  Instructions: "Verify the project directory is writable. " + "Run `uip agent review-history add --help` for usage."
27356
28163
  });
27357
28164
  processContext.exit(1);
@@ -27417,11 +28224,11 @@ var registerToolListCommand = (program) => {
27417
28224
  OutputFormatter.success({
27418
28225
  Result: RESULTS.Success,
27419
28226
  Code: "AgentToolList",
27420
- Data: tools.map((t13) => ({
27421
- Name: t13.name,
27422
- Type: t13.type,
27423
- Id: t13.id,
27424
- Enabled: t13.isEnabled ?? true
28227
+ Data: tools.map((t) => ({
28228
+ Name: t.name,
28229
+ Type: t.type,
28230
+ Id: t.id,
28231
+ Enabled: t.isEnabled ?? true
27425
28232
  }))
27426
28233
  });
27427
28234
  })());
@@ -27437,13 +28244,13 @@ var registerToolListCommand = (program) => {
27437
28244
  };
27438
28245
 
27439
28246
  // src/tool.ts
27440
- var metadata = {
28247
+ var metadata2 = {
27441
28248
  name: "agent-tool",
27442
28249
  version: package_default.version,
27443
28250
  description: "UiPath Agent Tool for creating and managing low-code agents",
27444
28251
  commandPrefix: "agent"
27445
28252
  };
27446
- var registerCommands = async (program) => {
28253
+ var registerCommands2 = async (program) => {
27447
28254
  registerInitCommand(program);
27448
28255
  registerValidateCommand(program);
27449
28256
  registerRefreshCommand(program);
@@ -27457,6 +28264,6 @@ var registerCommands = async (program) => {
27457
28264
  registerDebugCommand(program);
27458
28265
  };
27459
28266
 
27460
- export { metadata, registerCommands };
28267
+ export { metadata2, registerCommands2 };
27461
28268
 
27462
- //# debugId=C08AC4E4D3EEAFBB64756E2164756E21
28269
+ //# debugId=BC1D146650C2E61C64756E2164756E21